AsyncEventBridge bridges sync EventEmitter to asyncio consumers. FastAPI app with session management, discussion control, roles/providers. WebSocket for real-time events + inject, SSE for read-only streaming. Minimal dark-theme HTML/JS UI. `meeting-room serve` CLI subcommand. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
959 B
959 B
v2-p2-async-bridge
Goal
Bridge synchronous EventEmitter to asyncio so DiscussionEngine can run in a thread while WebSocket/SSE consumers receive events asynchronously.
Key files
meeting_room/events.py— add AsyncEventBridge classmeeting_room/engine.py— no changes (runs in thread as-is)
Decisions log
- 2026-05-04: AsyncEventBridge + asyncio.to_thread() chosen over async engine rewrite. Minimizes changes, engine stays sync.
Open questions
- None
Completed steps
- AsyncEventBridge class in events.py
- Thread-safe bridge with call_soon_threadsafe
- subscribe/unsubscribe consumer queues
- Drop policy on full queues
- Tests (10/10 passing)
Notes
- events.py already has comment: "In Phase 2, an AsyncEventBridge will forward events to WebSocket clients"
- Bridge subscribes to sync EventEmitter, puts events into asyncio.Queue
- Consumers (WebSocket handlers, SSE handlers) read from the queue