[Integration] Cognitive bridge — map Timmy's thinking engine output to Matrix protocol #69
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Context
Timmy's dashboard has a fully operational cognitive loop:
think_once()) fires every 5 min — generates thoughts, distills facts, files Gitea issues, checks workspacepresence.json, broadcaststimmy_stateon WS every 30sNone of this reaches the Matrix. The two WS protocols are disconnected:
timmy_state(mood, activity, energy)agent_state(agentId, state)timmy_speech(bark text)bark(text, agentId, emotion)timmy_thinking(thought content)agent_behaviororbarkworld_state(full snapshot)agent_state+scene_batchWhat to build
An outbound WS client in Timmy's dashboard that connects to the Matrix and translates cognitive events into Matrix protocol messages.
Module:
src/integrations/matrix_bridge.pyws://<matrix-host>/ws/matrixasagent:timmythink_once()produces a thoughtagent_behavior: ponder+barkwith thought excerptagent_statewith mapped stateagent_state: idle+ slower behavior cadenceagent_behavior: place(artifact in world) +barkagent_behavior: inspect(move to message location)agent_state: activeagent_register+ initialagent_statetimmy_stateasagent_stateevery 30sHook points in existing code
thinking.py:_broadcast()— after thought is stored, also send to Matrix bridgeworkshop_state.py:broadcast_world_state()— also forward to Matrix bridgecognitive_state.py:CognitiveTracker.update()— trigger state translationfamiliar.py:Familiar.tick()— optionally mirror Pip in MatrixGather → Reason → Act integration
The Act phase (
src/loop/phase3_act.py) is currently a stub. When fleshed out, it should emit Matrix protocol messages as part of its action output —scene_addfor building,agent_movefor navigation,barkfor communication.Acceptance Criteria
think_once()output appears in the Matrix as a bark within 5 secondsagent_statewithin 2 secondsponderbehavior when thinking engine firesMATRIX_WS_URL,MATRIX_AGENT_TOKENin settingsDependencies
agent_move)agent_behavior)Supersedes / relates to
Cross-repo
Implementation lives in
rockachopa/Timmy-time-dashboard. Filed here for cross-repo visibility (same as #8).Closed by PR #72 —
server/bridge.pyimplements the full cognitive-to-Matrix translation layer. Maps think_once() → ponder+bark, mood→agent_state, energy→idle override, issue filed→place+bark, visitor→converse. Two modes: standalone (polls presence.json) or integrated (direct calls from dashboard). State dedup + auto-reconnect. 8/8 integration tests pass.