feat: add event bus for cross-session coordination (Phase 4)#94
feat: add event bus for cross-session coordination (Phase 4)#94evansenter merged 5 commits intomainfrom
Conversation
Implements SQLite-backed event bus for clemini sessions to communicate: - EventBus module with SQLite persistence (~/.clemini/event_bus.db) - Session registration with heartbeats and auto-expiration (5 min timeout) - Channel-based pub-sub: all, session:<id>, repo:<name>, machine:<name> - Cursor-based event streaming for resumable consumption - Session resumption via machine + client_id matching Tools added (7 new tools): - event_bus_register: Register a session - event_bus_list_sessions: List active sessions - event_bus_list_channels: List channels with subscriber counts - event_bus_publish: Publish events to channels - event_bus_get_events: Get events with filtering/pagination - event_bus_unregister: Unregister a session - event_bus_notify: Send desktop notifications (Linux/macOS) Test coverage: 17 unit tests for event bus module, 5 for tools Part of #90 (ACP integration) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Code ReviewSummaryAdds a SQLite-backed event bus module ( Issues FoundCriticalNone Important
Suggestions
VerdictREQUEST_CHANGES - Important issue with unused Automated review by Claude Code |
Add logging to trace ACP prompt handling: - Log prompt text extraction (length and preview) - Log before/after run_interaction calls Helps debug hangs during Toad integration. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Code ReviewSummaryAdds a SQLite-backed event bus module ( Issues FoundCriticalNone Important
Suggestions
VerdictREQUEST_CHANGES - Important issue with unused Automated review by Claude Code |
- Remove EventBusNotifyTool (notifications can use system tools) - Remove temporary ACP debug logging - Keep 6 core event bus tools: register, list_sessions, list_channels, publish, get_events, unregister Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Code ReviewSummaryAdds a SQLite-backed event bus module ( Issues FoundCriticalNone Important
Suggestions
VerdictREQUEST_CHANGES - Important issue: PR description claims 7 tools but only 6 are implemented (missing Automated review by Claude Code |
Addresses automated review feedback: 1. **Critical**: Fix deadlock in list_channels() - was calling list_sessions() while holding the Mutex lock. Now releases lock before calling list_sessions(). Added test to verify. 2. **Suggestion**: Replace custom UUID v4 implementation with uuid crate for correctness guarantees and simpler code. 3. **Suggestion**: Add documentation for 6 event bus tools to docs/TOOLS.md with parameters, returns, and examples. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Feedback AddressedImplemented
|
Code ReviewSummaryImplements Phase 4 of ACP integration (#90): a SQLite-backed event bus for cross-session coordination with 6 tools ( Issues FoundCriticalNone ImportantNone Suggestions
Previously Addressed (Filtered)
VerdictREQUEST_CHANGES - Minor suggestion: duplicate Automated review by Claude Code |
Leftover from removing test_uuid_v4_format test. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Code ReviewSummaryImplements Phase 4 of ACP integration (#90): a SQLite-backed event bus for cross-session coordination with 6 tools ( Issues FoundCriticalNone ImportantNone Suggestions
Previously Addressed (Filtered)
VerdictREQUEST_CHANGES - Minor suggestion: PR description should be updated to reflect the actual 6 tools implemented (not 7). Automated review by Claude Code |
Final Feedback AddressedImplemented
All CI checks passing. Ready to merge. |
Summary
Implements Phase 4 of ACP integration (#90): a SQLite-backed event bus for cross-session coordination.
src/event_bus.rs): Core event bus implementation with SQLite persistence at~/.clemini/event_bus.dbsrc/tools/event_bus_tools.rs): 6 tools for AI-driven session coordinationFeatures
all,session:<id>,repo:<name>,machine:<name>Tools
event_bus_register- Register a session with the event busevent_bus_list_sessions- List active sessionsevent_bus_list_channels- List channels with subscriber countsevent_bus_publish- Publish events to channelsevent_bus_get_events- Get events with filtering and paginationevent_bus_unregister- Unregister a sessionTest plan
make clippypassesmake fmtpassesmake testpassesPart of #90
🤖 Generated with Claude Code