Skip to main content

bamboo_engine/runtime/execution/
mod.rs

1//! Execution orchestration for background agent runs.
2//!
3//! This module provides the shared execution infrastructure used by all
4//! background execution paths: HTTP execute handler, spawn scheduler,
5//! and schedule manager.
6//!
7//! # Key types
8//!
9//! - [`AgentRunner`] / [`AgentStatus`] — lifecycle state of an agent run
10//! - [`try_reserve_runner`] — atomically reserve a runner slot
11//! - [`finalize_runner`] — update runner terminal status
12//! - [`create_event_forwarder`] — MPSC → broadcast channel forwarder
13//! - [`get_or_create_event_sender`] — session-scoped event broadcaster
14//! - [`spawn_session_execution`] — spawn agent execution with full orchestration
15
16pub mod agent_spawn;
17pub mod event_forwarder;
18pub mod runner_lifecycle;
19pub mod runner_state;
20pub mod session_events;
21pub mod spawn;
22
23pub use agent_spawn::{
24    log_base_system_prompt_snapshot, preserve_concurrent_session_overrides,
25    spawn_session_execution, SessionExecutionArgs,
26};
27pub use event_forwarder::create_event_forwarder;
28pub use runner_lifecycle::{finalize_runner, status_from_execution_result, try_reserve_runner};
29pub use runner_state::{AgentRunner, AgentStatus};
30pub use session_events::{get_or_create_event_sender, SESSION_EVENT_CHANNEL_CAPACITY};
31pub use spawn::{SpawnContext, SpawnJob, SpawnScheduler};