Skip to main content

Runner

Trait Runner 

Source
pub trait Runner {
    // Required method
    fn run(&self, job: Job, cwd: &Path, tmp: &Path) -> Result<Outcome, String>;

    // Provided methods
    fn ask(&self, _q: &Question) -> Answer { ... }
    fn cancelled(&self) -> bool { ... }
    fn plan(&self) -> EnvPlan { ... }
    fn chat(&self) -> Option<String> { ... }
}
Expand description

Runs a sandboxed job for a provider (the tool’s own sandbox, with the support layer).

Required Methods§

Source

fn run(&self, job: Job, cwd: &Path, tmp: &Path) -> Result<Outcome, String>

Run job in cwd with tmp as its private temp folder.

Provided Methods§

Source

fn ask(&self, _q: &Question) -> Answer

Ask the user (see byob_tools::ToolContext::ask).

Source

fn cancelled(&self) -> bool

The user pressed Stop.

Source

fn plan(&self) -> EnvPlan

What the chat’s settings decide about where it runs (see EnvPlan).

Source

fn chat(&self) -> Option<String>

The chat the call runs in, if known (the model is told things once per chat).

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§