swactor/crates/dashboard/README.md
Zachery Aaron Shores-Chmielewski b3dbd7ce11 refactor: datastream crate is now telemetry
The crate is the per-node metrics/logging pipe with a universal
subscriber endpoint, but "datastream" kept getting misread as a general
messaging plane. Rename crate, module paths, and public API
(`DatastreamEndpoint` → `TelemetryEndpoint`, etc.) so misuse is visible
on sight.

Renamed contracts (all in-repo producers/consumers migrated):
- env vars `MYELIN_DATASTREAM_*` → `MYELIN_TELEMETRY_*`
- artifact `datastream.ndjson` → `telemetry.ndjson`
- actor names `telemetry-publisher` / `telemetry-sink`
- wire ALPN `swactor/telemetry/0`
- `DATASTREAM_SPEC.md` → `TELEMETRY_SPEC.md`

Also fixes two latent test breaks: `process` and `iroh-driver` tests
imported `DatastreamEvent` from the crate root, which was never
re-exported; they now use the observer path `telemetry::frame::`.
2026-08-15 12:18:56 +04:00

24 lines
1.5 KiB
Markdown

# dashboard
Read-only HTML/SSE dashboard over incoming telemetry frames.
The crate owns the Axum server, bounded raw frame window, and view registry. Component crates can keep their own view implementations beside their code and register them through `DashboardHandle::register_view`. The built-in swactor views are hosted here because worker/actor/message processing is universal to swactor programs: the worker page, and the actor overview (fused roster) plus per-actor dossier.
## Routes
- `GET /` — dashboard index
- `GET /events` — raw incoming frames as SSE
- `GET /api/frames` — recent raw frame window
- `GET /api/views` — registered view metadata
- `GET /view/telemetry/live` — generic live explorer over retained and incoming telemetry frames
- `GET /api/view/telemetry/live` — bounded per-stream/channel explorer snapshot
- `GET /view/fleet` — compact fleet overview and focused machine telemetry
- `GET /api/view/fleet` — fleet and machine telemetry JSON snapshot
- `GET /view/swactor/workers` — built-in worker page
- `GET /api/view/swactor/workers` — worker page JSON snapshot
- `GET /view/swactor/actor-overview` — built-in actor overview + roster page
- `GET /api/view/swactor/actor-overview` — actor overview JSON snapshot
- `GET /view/swactor/actor-dossier` — built-in per-actor dossier page
- `GET /api/view/swactor/actor-dossier` — actor dossier JSON snapshot
All state is derived from observed frames. The dashboard sends no control signals back to producers.