Skip to main content

prospero_core/
lib.rs

1//! Core orchestration logic and shared types for Prospero.
2//!
3//! This crate is the shared library behind the `prospero` CLI, the
4//! `prosperod` daemon, and the web/API surface. It models a fleet of Caliban
5//! agents across repos and speaks caliban's NDJSON IPC protocol through a thin,
6//! self-contained client — the wire format is the only coupling to caliban.
7
8pub mod bus;
9pub mod caliband;
10pub mod config_store;
11pub mod discovery;
12pub mod distributed_bus;
13pub mod error;
14pub mod event;
15pub mod fleet;
16pub mod fleet_provider;
17#[cfg(feature = "k8s")]
18pub mod k8s;
19pub mod leased_ownership;
20pub mod metrics;
21pub mod model;
22pub mod ownership;
23mod pg;
24pub mod postgres_config_store;
25pub mod postgres_store;
26pub mod provider_env;
27pub mod registry;
28pub mod sqlite_store;
29pub mod store;
30
31#[cfg(any(test, feature = "testkit"))]
32pub mod testkit;
33
34pub use bus::{BusEvent, BusSubscription, EventBus, InProcessBus};
35pub use caliband::sources::{Source, discover_sources};
36pub use caliband::wire::AttachInbound;
37pub use config_store::{ConfigStore, SqliteConfigStore};
38pub use distributed_bus::DistributedBus;
39pub use error::{CoreError, Result};
40pub use event::{EventKind, FleetEvent, OutputStream};
41pub use fleet::{FleetConfig, FleetManager, SpawnRequest};
42pub use fleet_provider::{FleetAdmin, FleetProvider, LocalFleet};
43#[cfg(feature = "k8s")]
44pub use k8s::fleet::{CalibanTaskApi, K8sFleet, KubeTaskApi};
45#[cfg(feature = "k8s")]
46pub use k8s::workspace_api::{K8sWorkspaceAdmin, KubeWorkspaceApi, WorkspaceApi};
47pub use leased_ownership::LeasedOwnership;
48pub use metrics::{Metrics, MetricsSnapshot};
49pub use model::{Agent, AgentStatus, FleetSnapshot, Readiness, Workspace, WorkspaceHealth};
50pub use ownership::{Lease, Ownership, SelfOwnsAll};
51pub use postgres_config_store::PostgresConfigStore;
52pub use postgres_store::PostgresStore;
53pub use registry::{RegisteredWorkspace, Registry, RepoProviderConfig};
54pub use sqlite_store::SqliteStore;
55pub use store::{JsonlStore, Store};
56
57/// Crate version, sourced from `Cargo.toml`.
58pub const VERSION: &str = env!("CARGO_PKG_VERSION");