pub struct CliHarness { /* private fields */ }Expand description
A harness that runs each activity attempt as a plain-stdout CLI child process.
Holds the harness-specific settings (the command, its fixed arguments, and its environment) so
the AgentRunSpec stays harness-blind — the spec never carries CLI configuration. Because the
agent has no control channel, the produced session’s capability set is always empty.
Implementations§
Source§impl CliHarness
impl CliHarness
Sourcepub fn new(program: impl Into<PathBuf>) -> Self
pub fn new(program: impl Into<PathBuf>) -> Self
A harness that runs program with no fixed arguments and does not pass the input as an arg.
Sourcepub fn with_arg(self, arg: impl Into<OsString>) -> Self
pub fn with_arg(self, arg: impl Into<OsString>) -> Self
Adds a fixed argument passed to every spawned child.
Sourcepub fn with_env(self, key: impl Into<String>, value: impl Into<String>) -> Self
pub fn with_env(self, key: impl Into<String>, value: impl Into<String>) -> Self
Sets an environment variable on every spawned child (applied to the CHILD only).
Sourcepub fn passing_input_as_arg(self) -> Self
pub fn passing_input_as_arg(self) -> Self
Passes the spec’s input payload (decoded as UTF-8) to the child as a trailing argument.
A plain-stdout agent has no run/execute request to carry the prompt, so the input is
handed on argv. Off by default (some CLIs take input on stdin or a file); enabling it lets a
fake line-emitter echo the run input.
Trait Implementations§
Source§impl AgentHarness for CliHarness
impl AgentHarness for CliHarness
Source§type Session = CliSession
type Session = CliSession
Source§fn start<'life0, 'async_trait>(
&'life0 self,
spec: AgentRunSpec,
) -> Pin<Box<dyn Future<Output = Result<Self::Session, HarnessError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn start<'life0, 'async_trait>(
&'life0 self,
spec: AgentRunSpec,
) -> Pin<Box<dyn Future<Output = Result<Self::Session, HarnessError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Source§impl Clone for CliHarness
impl Clone for CliHarness
Source§fn clone(&self) -> CliHarness
fn clone(&self) -> CliHarness
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more