[kimi] Add visitor_state message handler (#670) #699
Reference in New Issue
Block a user
Delete Branch "kimi/issue-670"
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?
Fixes #670
Summary
Created
src/infrastructure/visitor.pywith aVisitorStatedataclass andVisitorRegistrysingleton for tracking active Matrix visitors and broadcasting their positions.Changes
add()- Add a new visitorremove()- Remove a visitorupdate_position()- Update visitor position and rotationget()- Get a single visitor's stateget_all()- Get all visitors as Matrix protocol message dictsclear()- Remove all visitors (useful for testing)Protocol Format
get_all()returns list of dicts in Matrix protocol format with type, visitor_id, data (display_name, position, rotation, connected_at), and ts fields.Testing
tests/unit/test_visitor.pytox -e unittox -e lint