[kimi] Add Pip familiar state to agent_state messages (#676) #738

Merged
kimi merged 1 commits from kimi/issue-676 into main 2026-03-21 14:37:40 +00:00
Collaborator

Fixes #676

Summary

This PR extends the agent_state message for Timmy to include Pip familiar state as required by the Matrix Unification epic.

Changes

  • src/infrastructure/presence.py:

    • Added DEFAULT_PIP_STATE constant with default Pip values (name, mood, energy, color, trail_color)
    • Added _get_familiar_state() helper function that retrieves Pip state from timmy.familiar.pip_familiar
    • Extended produce_agent_state() to include familiar field in the data dict
    • Graceful fallback to default state if familiar module is unavailable or raises an exception
  • tests/unit/test_presence.py:

    • Added TestFamiliarState class with tests for _get_familiar_state()
    • Added tests for familiar data in produce_agent_state() output
    • Added test for fallback behavior when familiar raises an exception

Acceptance Criteria Verification

  • agent_state.data.familiar includes: name, mood, energy, color, trail_color
  • Falls back to default Pip state if familiar module not available
  • Does not crash if familiar.py raises an exception
  • tox -e unit passes
  • tox -e lint passes
Fixes #676 ## Summary This PR extends the `agent_state` message for Timmy to include Pip familiar state as required by the Matrix Unification epic. ## Changes - **src/infrastructure/presence.py**: - Added `DEFAULT_PIP_STATE` constant with default Pip values (name, mood, energy, color, trail_color) - Added `_get_familiar_state()` helper function that retrieves Pip state from `timmy.familiar.pip_familiar` - Extended `produce_agent_state()` to include `familiar` field in the `data` dict - Graceful fallback to default state if familiar module is unavailable or raises an exception - **tests/unit/test_presence.py**: - Added `TestFamiliarState` class with tests for `_get_familiar_state()` - Added tests for familiar data in `produce_agent_state()` output - Added test for fallback behavior when familiar raises an exception ## Acceptance Criteria Verification - [x] `agent_state.data.familiar` includes: name, mood, energy, color, trail_color - [x] Falls back to default Pip state if familiar module not available - [x] Does not crash if familiar.py raises an exception - [x] tox -e unit passes - [x] tox -e lint passes
kimi added 1 commit 2026-03-21 14:37:13 +00:00
feat: Add Pip familiar state to agent_state messages
Some checks failed
Tests / lint (pull_request) Has been cancelled
Tests / test (pull_request) Has been cancelled
3da0d89ba6
- Extend produce_agent_state() to include familiar field in data
- Add _get_familiar_state() helper with graceful fallback to default Pip state
- DEFAULT_PIP_STATE includes: name, mood, energy, color, trail_color
- Falls back to default if familiar module unavailable or raises exception
- Add comprehensive tests for familiar state in agent_state

Fixes #676
kimi merged commit ada0774ca6 into main 2026-03-21 14:37:40 +00:00
kimi deleted branch kimi/issue-676 2026-03-21 14:37:40 +00:00
Sign in to join this conversation.
No Reviewers
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Rockachopa/Timmy-time-dashboard#738