Documentation
¶
Overview ¶
Package dashboard serves the Chronos visual studio: a read-only API over sessions, checkpoints, graph topology, and per-session cost, plus start/resume/time-travel actions that build a fresh graph.Runner against an application-supplied GraphRegistry. It is mounted by the ChronosOS control plane (os/server.go) behind the same auth/tenant chain as every other /api/ route; approvals and live streaming reuse the existing /api/approval/* and /api/agui/stream endpoints rather than duplicating them here.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type GraphRegistry ¶
type GraphRegistry map[string]*graph.CompiledGraph
GraphRegistry maps an agent id (storage.Session.AgentID) to the compiled graph that agent runs. The dashboard uses it to render a session's graph topology and to build the Runner for resume/time-travel requests. Without one configured (WithGraphs), those actions return 501.
type Handler ¶
type Handler struct {
// contains filtered or unexported fields
}
Handler serves the dashboard's API. Configure it with the With* methods before mounting; it holds no other mutable state.
func (*Handler) ServeHTTP ¶
func (h *Handler) ServeHTTP(w http.ResponseWriter, r *http.Request)
ServeHTTP dispatches on the request path (relative to the mount point — callers strip their own prefix, e.g. "/api/dashboard/", before serving).
func (*Handler) WithCostTracker ¶
func (h *Handler) WithCostTracker(ct *hooks.CostTracker) *Handler
WithCostTracker enriches the dashboard with per-session token/cost reporting from an already-wired engine/hooks.CostTracker.
func (*Handler) WithGraphs ¶
func (h *Handler) WithGraphs(g GraphRegistry) *Handler
WithGraphs registers the compiled graphs the dashboard may render and resume, keyed by agent id.