Skip to main content

ContainerLauncher

Trait ContainerLauncher 

Source
pub trait ContainerLauncher: Send + Sync {
    // Required methods
    fn launch<'life0, 'async_trait>(
        &'life0 self,
        spec: RunSpec,
        outputs: Sender<ContainerOutput>,
        on_start: StartHook,
    ) -> Pin<Box<dyn Future<Output = RunResult> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn hard_timeout(&self, config: &ContainerConfig) -> Duration;
}
Expand description

Launches one agent container run.

Required Methods§

Source

fn launch<'life0, 'async_trait>( &'life0 self, spec: RunSpec, outputs: Sender<ContainerOutput>, on_start: StartHook, ) -> Pin<Box<dyn Future<Output = RunResult> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Run spec to completion. Every output frame is sent, in order, to outputs (the sender is dropped when the run is over). The channel is bounded (crate::output_limits::OUTPUT_CHANNEL_CAPACITY): a launcher waits for room (backpressure) and drops frames once the receiver is gone (the orchestrator aborted the run). on_start receives the container right after it was spawned. Never fails: problems are reported in the RunResult.

Source

fn hard_timeout(&self, config: &ContainerConfig) -> Duration

Longest a run with config may live without producing output (used to size the per-run LLM token TTL).

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§