pub mod registry;
pub mod types;
pub mod worker;
pub use registry::{CancelOutcome, JobRegistryStats, RegisterError, ToolJobRegistry};
pub use types::{JobLimits, JobOutcome, JobRecord, JobStatus};
pub use worker::{JobSpawn, drain_queued, enqueue_and_launch, launch_job, run_job_blocking, spawn_cleanup_task};
#[must_use]
pub fn registry_from_config(cfg: &crate::cm_config::AgentConfig) -> std::sync::Arc<ToolJobRegistry> {
std::sync::Arc::new(ToolJobRegistry::new(JobLimits::from_config(
&cfg.tool_registry_policy,
)))
}