pub struct AgentSpec {Show 14 fields
pub name: String,
pub command: Vec<CommandPart>,
pub model: Option<String>,
pub effort: Option<String>,
pub output: OutputMode,
pub message_match: BTreeMap<String, String>,
pub message_path: Option<String>,
pub search_paths: Vec<String>,
pub system_via: SystemVia,
pub timeout: u64,
pub fallback: Option<Box<AgentSpec>>,
pub models: Vec<String>,
pub efforts: Vec<String>,
pub options_note: Option<String>,
}Expand description
Everything needed to drive one CLI. An agent is data, not a class: supporting a new tool is a preset file.
Fields§
§name: String§command: Vec<CommandPart>§model: Option<String>§effort: Option<String>§output: OutputMode§message_match: BTreeMap<String, String>For jsonl: the event fields that identify the agent’s own message.
message_path: Option<String>For jsonl: the dotted path to the text inside a matching event.
search_paths: Vec<String>Extra places to look for the binary when it is not on PATH.
system_via: SystemVia§timeout: u64§fallback: Option<Box<AgentSpec>>A stand in for when this agent cannot answer at all: a CLI that is down, out of quota, or refusing the request on policy grounds.
Declared as a nested table rather than by naming a third agent, because spar takes exactly two and a backup is not a third opinion. It never reviews alongside the pair, it only answers in place of the one that failed, so the alternation the design rests on is unchanged.
Built by build_spec from the [agents.NAME.fallback] table, never
deserialized directly, so a preset of its own still resolves.
models: Vec<String>Model names this CLI is known to accept.
efforts: Vec<String>Effort levels this CLI is known to accept.
options_note: Option<String>Where to check the current list, when spar cannot enumerate it.