pub struct AgentSpec {
pub kind: AgentKind,
pub binary: &'static str,
pub version_args: &'static [&'static str],
pub run_args: &'static [&'static str],
pub prompt_positional: bool,
pub json_args: &'static [&'static str],
pub model_flag: &'static str,
pub result_format: ResultFormat,
}Expand description
Everything wt needs to detect and drive one agent CLI.
Fields§
§kind: AgentKindThe agent kind this spec describes.
binary: &'static strThe binary name as found on PATH (e.g. "claude").
version_args: &'static [&'static str]Arguments that print the version (e.g. ["--version"]).
run_args: &'static [&'static str]Fixed leading arguments for a non-interactive run, before the prompt and
the JSON flag (e.g. ["-p"]).
prompt_positional: boolWhether the prompt is passed as a positional argument after run_args.
json_args: &'static [&'static str]Arguments that select JSON output (e.g. ["--output-format", "json"]).
model_flag: &'static strThe flag that selects a model (e.g. "--model"); empty if the agent has
no model selector, in which case the model is not passed.
result_format: ResultFormatHow to parse stdout in JSON mode.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for AgentSpec
impl RefUnwindSafe for AgentSpec
impl Send for AgentSpec
impl Sync for AgentSpec
impl Unpin for AgentSpec
impl UnsafeUnpin for AgentSpec
impl UnwindSafe for AgentSpec
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more