fix: wire Pip familiar into Workshop state pipeline #412

Merged
hermes merged 1 commits from kimi/issue-222 into main 2026-03-19 03:09:23 -04:00
Collaborator

Summary

Pip's backend behavioral AI (state machine, mood mirroring, event reactions) existed but was never connected to the Workshop world state API. The frontend Pip wandered randomly with no connection to the backend.

Changes

  • workshop_state.py: Add _pip_snapshot() helper that ticks Pip and feeds Timmy's mood/confidence into Pip's behavioral AI each heartbeat cycle. Include familiar snapshot in get_state_dict().
  • world.py: Include familiar field in _build_world_state() API response. Trigger pip_familiar.on_event("visitor_spoke") when visitors chat.

What this enables

  • Frontend can now receive Pip's behavioral state (sleeping/wandering/alert/playful/hiding) via the world state API and WebSocket
  • Pip reacts to Timmy's mood and confidence (e.g., goes ALERT when confidence < 0.3, PLAYFUL when energized)
  • Pip reacts to visitor chat events (investigates when spoken to)

Fixes #222

## Summary Pip's backend behavioral AI (state machine, mood mirroring, event reactions) existed but was never connected to the Workshop world state API. The frontend Pip wandered randomly with no connection to the backend. ### Changes - **`workshop_state.py`**: Add `_pip_snapshot()` helper that ticks Pip and feeds Timmy's mood/confidence into Pip's behavioral AI each heartbeat cycle. Include familiar snapshot in `get_state_dict()`. - **`world.py`**: Include `familiar` field in `_build_world_state()` API response. Trigger `pip_familiar.on_event("visitor_spoke")` when visitors chat. ### What this enables - Frontend can now receive Pip's behavioral state (sleeping/wandering/alert/playful/hiding) via the world state API and WebSocket - Pip reacts to Timmy's mood and confidence (e.g., goes ALERT when confidence < 0.3, PLAYFUL when energized) - Pip reacts to visitor chat events (investigates when spoken to) Fixes #222
kimi added 1 commit 2026-03-19 03:05:42 -04:00
fix: wire Pip familiar into Workshop state pipeline
All checks were successful
Tests / lint (pull_request) Successful in 5s
Tests / test (pull_request) Successful in 58s
59c182cdfa
Pip's backend behavioral AI (state machine, mood mirroring, event
reactions) was never connected to the world state API. The frontend
Pip wandered randomly with no connection to the backend.

- Add _pip_snapshot() to workshop_state.py — ticks Pip and feeds
  Timmy's mood/confidence into Pip's behavioral AI each heartbeat
- Include familiar snapshot in presence state dict (get_state_dict)
- Include familiar in _build_world_state() API response
- Trigger pip_familiar.on_event("visitor_spoke") when visitors chat

Fixes #222

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
hermes merged commit 9b8ad3629a into main 2026-03-19 03:09:23 -04:00
hermes deleted branch kimi/issue-222 2026-03-19 03:09:24 -04:00
Sign in to join this conversation.