Expand description
Core orchestration logic and shared types for Prospero.
This crate is the shared library behind the prospero CLI, the
prosperod daemon, and the web/API surface. It models a fleet of Caliban
agents across repos and speaks caliban’s NDJSON IPC protocol through a thin,
self-contained client — the wire format is the only coupling to caliban.
Re-exports§
pub use bus::BusEvent;pub use bus::BusSubscription;pub use bus::EventBus;pub use bus::InProcessBus;pub use caliband::sources::discover_sources;pub use caliband::wire::AttachInbound;pub use config_store::ConfigStore;pub use config_store::SqliteConfigStore;pub use distributed_bus::DistributedBus;pub use error::CoreError;pub use error::Result;pub use fleet::FleetConfig;pub use fleet::FleetManager;pub use fleet::SpawnRequest;pub use fleet_provider::FleetAdmin;pub use fleet_provider::FleetProvider;pub use fleet_provider::LocalFleet;pub use leased_ownership::LeasedOwnership;pub use metrics::Metrics;pub use metrics::MetricsSnapshot;pub use ownership::Lease;pub use ownership::Ownership;pub use ownership::SelfOwnsAll;pub use postgres_config_store::PostgresConfigStore;pub use postgres_store::PostgresStore;pub use registry::RegisteredWorkspace;pub use registry::Registry;pub use sqlite_store::SqliteStore;pub use store::JsonlStore;pub use store::Store;
Modules§
- bus
- Live event distribution behind a trait.
- caliband
- Caliban integration: wire types, NDJSON framing, the control client, and the stream-json normalizer. The wire format is the only coupling to caliban.
- config_
store - Mutable config records (the managed-repo registry) on the shared DB.
- discovery
- Resolve a repo root to its caliband control socket, and ensure a daemon is running for it.
- distributed_
bus - Clustered live distribution via Postgres
LISTEN/NOTIFY— the doorbell. - error
- Error types for the orchestration core.
- event
- Prospero’s normalized event type — the stable contract consumers see.
- fleet
- The runtime heart of the control plane.
- fleet_
provider - The
FleetProviderseam: an ensure-desired-state + observe abstraction over a fleet of caliband-supervised agents.LocalFleetis the caliband-over-Unix -sockets backend (today’s behavior); future backends (K8sFleet — epic #274 P2; remote — prospero #1) implement the same trait. The live session plane (attach/stream/steer) is deliberately NOT part of this trait — it stays onCalibandClientand is shared across backends. - leased_
ownership - Clustered single-writer ownership via a Postgres lease row per stream.
- metrics
- Process-lifetime operational counters for prosperod.
- model
- Prospero’s fleet domain model:
Host -> Workspace -> [Agent]. - ownership
- Which process is the single writer for a given stream.
- postgres_
config_ store - sqlx-backed Postgres
ConfigStore— the clustered-tier config backend. - postgres_
store - sqlx-backed Postgres
Store— the clustered-tier event backend. - provider_
env - Pure resolution of a repo’s caliband environment overlay.
- registry
- The persisted set of workspaces Prospero manages.
- sqlite_
store - sqlx-backed sqlite
Store— the defaultprosperodbackend. - store
- Durable history for fleet events.
Structs§
- Agent
- Prospero’s view of a single agent (projected from a caliban
AgentRecord). - Fleet
Event - A normalized, sequenced fleet event.
- Fleet
Snapshot - A point-in-time view of the whole fleet on one host.
- Readiness
- Aggregate readiness of prosperod, distinct from mere liveness.
- Repo
Provider Config - Per-repo provider/environment configuration applied to its caliband daemon.
- Source
- One source checkout within a workspace. (The
discover_sourcesfilesystem logic stays inprospero-core; only this struct is shared.) - Workspace
- A managed workspace (root + its source checkouts) and the agents running under its single caliband.
Enums§
- Agent
Status - Lifecycle state of an agent. Mirrors caliban’s
AgentStatuswire enum exactly so the same value round-trips through both protocols. - Event
Kind - The semantic payload of a fleet event.
- Output
Stream - Which textual stream a chunk of output came from.
- Workspace
Health - Connectivity of a managed workspace’s caliband daemon.
Constants§
- VERSION
- Crate version, sourced from
Cargo.toml.