Repository navigation
feat(live): zero-dependency real-time run dashboard (EventBus + SSE) - #897
Merged
Merged
Conversation
SynapseKit Live lets you watch an agent/RAG/graph run live in the browser with no new dependencies. Phase 1+2 of #896: - synapsekit.live.EventBus: one in-process pub/sub every finished observe span publishes to (bounded history, drop-on-backpressure, no-op when disabled so there is zero prod overhead). - Stdlib http.server + Server-Sent Events server (no FastAPI/uvicorn/ websockets) serving a single self-contained dashboard.html from the wheel (light theme, SynapseKit green, Story/Trace toggle, live cost/token meters). - Enable via SYNAPSEKIT_LIVE=1 (auto-start on first span), `synapsekit ui --live`, or synapsekit.live.enable(). Bound to 127.0.0.1, token-gated. - observe.end_span now streams spans to the bus (additive, guarded). - Tests (real bus + real HTTP/SSE, no mocks) and examples/live_dashboard.py. Refs #896
9 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Phases 1–2 of #896. Watch what SynapseKit is doing, live in the browser — with zero new dependencies.
What's here
synapsekit.live.EventBus— one in-process pub/sub every finished observe span publishes to. Bounded history (replays to late-joining tabs), drop-on-backpressure (never blocks the agent), and a no-op when disabled (single attribute read) so there's zero overhead in production.http.server+ Server-Sent Events. No FastAPI/uvicorn/websockets. Serves one self-containeddashboard.html(light theme, SynapseKit green logo, Story/Trace toggle, live cost/token meters) straight from the wheel.SYNAPSEKIT_LIVE=1(auto-starts on the first span),synapsekit ui --live, orsynapsekit.live.enable().127.0.0.1,/eventstoken-gated. Nothing leaves the machine.observe.end_spannow streams spans to the bus (additive, guarded — observe tests unaffected).Lightweight contract (verified)
Try it
Tests
10 live tests (real EventBus + real HTTP/SSE via urllib, token-gate 403, no-op-when-off, observe→bus) + the existing observe suite (134) still green. Mock target: the design artifact.
Refs #896 (P1 EventBus + P2 stdlib dashboard; P3 story/replay + P4 demote-FastAPI-to-extra to follow).