-
Notifications
You must be signed in to change notification settings - Fork 0
Implement WebSocket real-time feed using Litestar channels plugin #34
Copy link
Copy link
Closed
Labels
prio:mediumShould do, but not blockingShould do, but not blockingscope:medium1-3 days of work1-3 days of workspec:agent-systemDESIGN_SPEC Section 3 - Agent SystemDESIGN_SPEC Section 3 - Agent Systemspec:architectureDESIGN_SPEC Section 15 - Technical ArchitectureDESIGN_SPEC Section 15 - Technical Architecturespec:communicationDESIGN_SPEC Section 5 - Communication ArchitectureDESIGN_SPEC Section 5 - Communication Architecturespec:human-interactionDESIGN_SPEC Section 13 - Human Interaction LayerDESIGN_SPEC Section 13 - Human Interaction Layertype:featureNew feature implementationNew feature implementationtype:testTest coverage, test infrastructureTest coverage, test infrastructure
Milestone
Description
Context
Implement real-time WebSocket streaming using Litestar's built-in channels plugin for pub/sub broadcasting. The channels plugin handles connection management, per-channel subscriptions, backpressure, and subscriber backlog out of the box.
Streamed events include:
- Agent messages (inter-agent communication)
- Task status changes (created, assigned, in progress, completed, failed)
- Budget and cost update events (spending events, budget warnings)
- System events (agent hired/fired, errors)
Acceptance Criteria
- Litestar channels plugin configured with channel definitions
- Channels for each event type:
tasks,agents,budget,messages,system - WebSocket endpoint at
/api/v1/wswith channel subscription support - Clients can subscribe to specific channels (filter by event type, agent, project)
- JSON message format with event type, timestamp, and payload
- Integration with message bus from M4 for event sourcing
- Backpressure handling configured (backoff or eviction strategy)
- Connection heartbeat/ping-pong for keep-alive
- Unit tests for channel event serialization and subscription
Dependencies
- Set up Litestar application with REST API skeleton #31 — Litestar skeleton must be set up
- Evaluate and implement message bus (asyncio queues vs external broker) #8 — Message bus (closed, M4)
Design Spec Reference
- §13.1 — API architecture (real-time requirements)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
prio:mediumShould do, but not blockingShould do, but not blockingscope:medium1-3 days of work1-3 days of workspec:agent-systemDESIGN_SPEC Section 3 - Agent SystemDESIGN_SPEC Section 3 - Agent Systemspec:architectureDESIGN_SPEC Section 15 - Technical ArchitectureDESIGN_SPEC Section 15 - Technical Architecturespec:communicationDESIGN_SPEC Section 5 - Communication ArchitectureDESIGN_SPEC Section 5 - Communication Architecturespec:human-interactionDESIGN_SPEC Section 13 - Human Interaction LayerDESIGN_SPEC Section 13 - Human Interaction Layertype:featureNew feature implementationNew feature implementationtype:testTest coverage, test infrastructureTest coverage, test infrastructure