Skip to main content

Crate prospero_api

Crate prospero_api 

Source
Expand description

HTTP API and embedded web dashboard for Prospero.

Turns a [FleetManager] into a control surface: REST endpoints for the fleet, repos, and agents; a Server-Sent-Events stream per agent (replay-then-tail); and a static dashboard. The CLI and the browser both talk to this one surface.

Modules§

dashboard
Serve the embedded deprecated v1 dashboard (no Node toolchain — assets are compiled in).
dashboard_v2
Serve the embedded Dashboard v2 bundle (Dioxus/WASM — #97, epic #95).
dto
Request/response payloads for the HTTP API.
error
Mapping CoreError to HTTP responses. Typed errors become precise status codes (404/409/503) — never an opaque 500 for an expected condition.
handlers
REST endpoint handlers over the FleetManager.
sse
Server-Sent Events: replay an agent’s history from the store, then tail the live event bus — joined on the monotonic seq with no gap or dup.

Structs§

AppState
Shared application state handed to every handler. Backend-agnostic (#76): the control plane is a FleetProvider, the workspace-registry plane an optional FleetAdmin (None under k8s → those routes 405), and observability (history/SSE) reads the shared Store/EventBus directly.

Functions§

router
Build the application router over the backend seams (constructed once, at the daemon’s composition edge — see prospero-daemon’s main.rs).