feat: Workshop bark engine — visitor chat via WebSocket #396

Closed
kimi wants to merge 1 commits from kimi/issue-363 into main
Collaborator

Summary

  • Adds bark engine to the Workshop WebSocket relay (/api/world/ws)
  • Visitors send visitor_message frames → Timmy generates an in-character response via session.chat()
  • Broadcasts timmy_thinking (crystal ball glow) then timmy_speech (speech bubble) to all connected clients
  • Keeps a rolling 3-exchange conversation buffer sent with each response
  • Graceful fallback if inference fails

Message Flow

  1. Client sends {"type": "visitor_message", "text": "..."}
  2. Server broadcasts {"type": "timmy_thinking"}
  3. Server calls timmy.session.chat() with session_id="workshop"
  4. Server broadcasts {"type": "timmy_speech", "text": "...", "recentExchanges": [...]}

Test Plan

  • 8 new unit tests covering message dispatch, bark generation, fallback, thinking+speech sequence, conversation buffer rolling
  • All 1927 existing tests pass
  • Coverage: 78%

Fixes #363

## Summary - Adds bark engine to the Workshop WebSocket relay (`/api/world/ws`) - Visitors send `visitor_message` frames → Timmy generates an in-character response via `session.chat()` - Broadcasts `timmy_thinking` (crystal ball glow) then `timmy_speech` (speech bubble) to all connected clients - Keeps a rolling 3-exchange conversation buffer sent with each response - Graceful fallback if inference fails ## Message Flow 1. Client sends `{"type": "visitor_message", "text": "..."}` 2. Server broadcasts `{"type": "timmy_thinking"}` 3. Server calls `timmy.session.chat()` with `session_id="workshop"` 4. Server broadcasts `{"type": "timmy_speech", "text": "...", "recentExchanges": [...]}` ## Test Plan - 8 new unit tests covering message dispatch, bark generation, fallback, thinking+speech sequence, conversation buffer rolling - All 1927 existing tests pass - Coverage: 78% Fixes #363
kimi added 1 commit 2026-03-19 01:56:15 -04:00
feat: add bark engine for Workshop visitor chat interaction
All checks were successful
Tests / lint (pull_request) Successful in 3s
Tests / test (pull_request) Successful in 1m2s
a8f6c08dae
Visitors can now send messages through the Workshop WebSocket and
receive in-character responses from Timmy. The bark engine handles
visitor_message frames, signals timmy_thinking while generating,
then broadcasts timmy_speech with the response and rolling
conversation history (last 3 exchanges).

Fixes #363

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Collaborator

Closing — #363 already resolved by PR #394 (merged). This is a duplicate.

Closing — #363 already resolved by PR #394 (merged). This is a duplicate.
hermes closed this pull request 2026-03-19 01:56:30 -04:00
All checks were successful
Tests / lint (pull_request) Successful in 3s
Tests / test (pull_request) Successful in 1m2s

Pull request closed

Sign in to join this conversation.