Skip to main content

Crate prospero_types

Crate prospero_types 

Source
Expand description

Shared, wasm-compatible serde DTOs for the prospero API surface.

Depends only on serde/serde_json, so both the native server (prospero-core/prospero-api) and the WASM dashboard (prospero #97) can share these exact types — no client/server drift. Behavior-bearing types (the fleet manager, stores, k8s backend, …) stay in prospero-core, which re-exports each type here from its original path for source compatibility.

Structs§

AddWorkspaceBody
Body for POST /api/workspaces.
Agent
Prospero’s view of a single agent (projected from a caliban AgentRecord).
AgentId
Stable identifier for a running agent (caliband’s agent id).
AgentInputBody
Body for POST /api/agents/{id}/input.
Capabilities
Backend capability signal for the dashboard (GET /api/capabilities).
CredentialsRef
A by-name reference to a key within an existing Secret.
FleetEvent
A normalized, sequenced fleet event.
FleetSnapshot
A point-in-time view of the whole fleet on one host.
GapSignal
Payload of a gap SSE event on GET /api/agents/{id}/stream.
IsolationConfig
Isolation defaults for agents launched against a workspace.
OutcomeCounts
How many agents reached each terminal state.
ProviderInfo
A provider as surfaced on the read side (GET /api/workspaces): enough for the dashboard’s launch-modal provider picker and a “has credentials” pill, without exposing the Secret reference itself.
ProviderSpec
A named model provider within a workspace. Each agent binds one by name.
Readiness
Aggregate readiness of prosperod, distinct from mere liveness.
RepoProviderConfig
Per-repo provider/environment configuration applied to its caliband daemon.
RespawnedResponse
Response for POST /api/agents/{id}/respawn.
SetConfigBody
Body for PUT /api/workspaces/{name}/config.
Source
One source checkout within a workspace. (The discover_sources filesystem logic stays in prospero-core; only this struct is shared.)
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.
UsageReport
GET /api/usage — aggregated spend and outcomes per workspace.
Workspace
A managed workspace (root + its source checkouts) and the agents running under its single caliband.
WorkspaceConfig
Backend-neutral workspace configuration accepted at the API boundary (POST /api/workspaces, PUT /api/workspaces/{name}/config).
WorkspaceInfo
A workspace as seen by the config plane’s read side: the persisted configuration plus reconciliation status. Returned by FleetAdmin::list_workspaces and merged into GET /api/workspaces so a configured-but-agentless workspace is still visible with its status.
WorkspaceSourceSpec
A source checkout spec for a workspace: a git remote and where to mount it. Used by the k8s config plane to build a Workspace CR’s sources[].
WorkspaceStatusInfo
Reconciliation status of a workspace, surfaced for the dashboard’s status pill + failure tooltip. Backend-neutral (local workspaces report None).
WorkspaceSummary
A workspace summary (no agents) for GET /api/workspaces.

Enums§

AgentStatus
Lifecycle state of an agent. Mirrors caliban’s AgentStatus wire enum exactly so the same value round-trips through both protocols.
EventKind
The semantic payload of a fleet event.
OutputStream
Which textual stream a chunk of output came from.
WorkspaceHealth
Connectivity of a managed workspace’s caliband daemon.

Functions§

stream_key_for
The ordered stream a (repo, agent_id) pair belongs to. Agent events key on the agent id; repo-level events (no agent) on repo:<name>; fleet-level events (neither) on the singleton fleet stream. seq is monotonic within the returned key.