viewer
etrack.api.viewer
api/viewer: ViewerApi — the viewer's doors over HTTP: the laid-out graph, the threads, a thread live, the canvas.
GET /api/topology is the declared graph as placed; GET /api/threads the threads the watched sink keeps, the most
recently written first; GET /api/threads/{thread}/events a thread over Server-Sent Events — each message's id is
the frame's offset in the thread and its data the RunEvent as JSON — e-serde canonicalizes what a source carried
(LangChain messages, dataclasses, dates), unknown objects as their text — replayed past the cursor then followed live. The
cursor is ?after= or, on a browser's automatic reconnect, the Last-Event-ID header: a reconnect misses nothing
still kept. / serves the canvas from etrack/ui/dist when the bundle is there; without it the API runs alone. The
app is plain ASGI: a host mounts it under any prefix, or GranianAdapter serves it on its own port.
ViewerApi
The viewer's ASGI app over one laid-out topology and one watched sink.