Skip to main content

Module execution

Module execution 

Source
Expand description

Execution orchestration for background agent runs.

This module provides the shared execution infrastructure used by all background execution paths: HTTP execute handler, spawn scheduler, and schedule manager.

§Key types

Re-exports§

pub use agent_spawn::log_base_system_prompt_snapshot;
pub use agent_spawn::reserve_session_execution;
pub use agent_spawn::spawn_session_execution;
pub use agent_spawn::SessionCompletionHook;
pub use agent_spawn::SessionExecutionArgs;
pub use agent_spawn::SessionExecutionOutcome;
pub use agent_spawn::SessionExecutionReservation;
pub use agent_spawn::SessionExecutionReserveOutcome;
pub use child_completion::ChildCompletion;
pub use child_completion::ChildCompletionHandler;
pub use event_forwarder::create_event_forwarder;
pub use event_forwarder::AccountFeedInbox;
pub use runner_lifecycle::finalize_runner;
pub use runner_lifecycle::finalize_runner_exact;
pub use runner_lifecycle::reserve_runner_core;
pub use runner_lifecycle::status_from_execution_result;
pub use runner_lifecycle::try_reserve_runner;
pub use runner_lifecycle::ReserveOutcome;
pub use runner_lifecycle::RunnerReservation;
pub use runner_state::AgentRunner;
pub use runner_state::AgentStatus;
pub use session_events::get_or_create_event_sender;
pub use session_events::SESSION_EVENT_CHANNEL_CAPACITY;
pub use spawn::ChildRunLaunchHook;
pub use spawn::ExternalChildRunner;
pub use spawn::SessionInboxRuntimeBinding;
pub use spawn::SpawnContext;
pub use spawn::SpawnJob;
pub use spawn::SpawnScheduler;

Modules§

agent_spawn
Core agent execution spawning logic.
child_completion
Child-session completion notification primitives.
event_forwarder
Event forwarding from MPSC to broadcast channels.
event_publication
Per-run atomic publication fence. Token traffic never acquires the shared runner registry. Replacement closes the old fence and drains synchronous publications before the successor can emit Started on the same channel.
runner_lifecycle
Runner lifecycle helpers for background agent execution.
runner_state
Runner state types for background agent execution.
session_events
Session-scoped event sender management.
spawn
Sub-session spawn scheduler.