//! Orchestrator for managing sandboxed worker containers. //! //! The orchestrator runs in the main agent process and provides: //! - An internal HTTP API for worker communication (LLM proxy, status, secrets) //! - Per-job bearer token authentication //! - Container lifecycle management (create, monitor, stop) //! //! ```text //! ┌───────────────────────────────────────────────┐ //! │ Orchestrator │ //! │ │ //! │ Internal API (default :50051, configurable) │ //! │ POST /worker/{id}/llm/complete │ //! │ POST /worker/{id}/llm/complete_with_tools │ //! │ GET /worker/{id}/job │ //! │ GET /worker/{id}/credentials │ //! │ POST /worker/{id}/status │ //! │ POST /worker/{id}/complete │ //! │ │ //! │ ContainerJobManager │ //! │ create_job() -> container + token │ //! │ stop_job() │ //! │ list_jobs() │ //! │ │ //! │ TokenStore │ //! │ per-job bearer tokens (in-memory only) │ //! │ per-job credential grants (in-memory only) │ //! └───────────────────────────────────────────────┘ //! ``` pub mod api; pub mod auth; pub mod job_manager; pub mod reaper; pub use api::OrchestratorApi; pub use auth::{CredentialGrant, TokenStore}; pub use job_manager::{ CompletionResult, ContainerHandle, ContainerJobConfig, ContainerJobManager, JobMode, }; pub use reaper::{ReaperConfig, SandboxReaper};