signal_bus module — generic SSE event publisher for real-time signal streams #58
Labels
No labels
architecture
backlog
enhancement
module:documents
module:hardware
module:manage
module:pipeline
module:voice
priority:backlog
priority:high
priority:medium
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: Circuit-Forge/circuitforge-core#58
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
Both Merlin (gesture events) and Linnet (transcription/tone events) need a real-time event
stream that local services can subscribe to. Extract into cf-core rather than duplicating.
Interface:
Implementation: SSE via FastAPI StreamingResponse. Bounded asyncio.Queue per subscriber
(drop oldest on overflow). publish() safe to call from sync threads via loop.call_soon_threadsafe().
BCI adaptive feedback loop use case (Phase C): The signal bus also carries the closed-loop
neurofeedback channel. Merlin publishes decoded EEG state (e.g. 'alpha_rising', 'motor_intent_left');
the training UI subscribes and renders real-time visual/audio cues that the user reacts to.
This closes the feedback loop: stimulus -> EEG response -> decoded state -> next stimulus.
The bus must carry sub-100ms round-trip latency to be useful for neurofeedback.
Products that will use this: Merlin (gestures, EEG state), Linnet (transcription events),
future products needing real-time signal streaming.
MIT licensed.