Skip to main content

Module dto

Module dto 

Source
Expand description

Request/response payloads for the HTTP API.

The shared contract types now live in prospero-types (#172) so the WASM dashboard can use the exact same definitions — see that crate’s api module for why. They are re-exported here from their original paths, so every import site and all serde output are unchanged.

What stays in this crate is what does not belong in a neutral DTO crate: the axum query extractor, and the mapping from a wire body onto prospero-core’s domain types. ADR 0006 makes api → core one-directional, so that mapping is the adapter’s job — pushing it into core (or into prospero-types) would drag a transport concept downward.

Structs§

AddWorkspaceBody
Body for POST /api/workspaces.
AgentInputBody
Body for POST /api/agents/{id}/input.
Capabilities
Backend capability signal for the dashboard (GET /api/capabilities).
FromSeq
Query params for GET /api/agents/{id}/events and /stream.
OutcomeCounts
How many agents reached each terminal state.
RespawnedResponse
Response for POST /api/agents/{id}/respawn.
SetConfigBody
Body for PUT /api/workspaces/{name}/config.
SpawnBody
Body for POST /api/workspaces/{repo}/agents.
SpawnedResponse
Response for a successful spawn.
UsageBucket
One day’s usage within a workspace — the unit the fleet charts plot.
UsageGroup
One workspace’s totals over the whole window, plus its daily series.
UsageQuery
Query params for GET /api/usage.
UsageReport
GET /api/usage — aggregated spend and outcomes per workspace.
WorkspaceSummary
A workspace summary (no agents) for GET /api/workspaces.

Functions§

spawn_request
Map a spawn request body onto the core SpawnRequest.
usage_report
Fold the store’s flat (workspace, day) rows into the per-workspace report.