Skip to main content

ResolveCli

Trait ResolveCli 

Source
pub trait ResolveCli {
    // Required method
    fn resolve_cli(self) -> Self;
}
Expand description

Resolving an agent’s CLI before running it.

An extension on cli_stream::Command, so resolution reads as a step in the same builder rather than a function wrapping it:

use cli_stream::Command;
use harness::ResolveCli;

let handle = Command::new("claude").args(["-p", "hi"]).resolve_cli().stream(|_| {})?;

Required Methods§

Source

fn resolve_cli(self) -> Self

Resolve a bare program name to its absolute path, and put that program’s own directory at the front of PATH.

Every adapter driving a CLI goes through here. The engine takes the environment it is given — spawning is its job, knowing where a user’s nvm lives is not — so this is the one place that knowledge is applied, and the first place to look when a packaged app cannot find a CLI that a terminal finds fine.

A PATH the caller set still wins: it is applied after this one.

Dyn Compatibility§

This trait is not dyn compatible.

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

Implementors§