pub struct Invocation {
pub print: Option<String>,
pub model: Option<String>,
pub flags: Vec<(String, Option<String>)>,
pub command: Option<String>,
pub arguments: Vec<String>,
}Expand description
The agent’s arguments, in the canonical form the launcher passes on
(Invocation::to_args): the model, each plugin option as
--name=VALUE, then the print prompt after --print --, or a plugin’s
command and its arguments. The launcher reads the user’s command line
against the agent’s AgentDescription report first
(AgentDescription::invocation), so rig -p "…" and the agent binary run
alone agree on them.
Fields§
§print: Option<String>Some for print mode: answer this one prompt, then exit, with the
answer on stdout and text piped in on stdin after the prompt (which
may be empty when stdin is piped). None runs the terminal view, or
no view at all without one.
model: Option<String>A catalog model (vendor/model) for the session’s first agent.
flags: Vec<(String, Option<String>)>The options of the agent’s plugins, in the order given: each
--name with its value, if any. The agent refuses one no plugin of
its build takes.
command: Option<String>A plugin’s command, rig <command> …, which chooses the front that
runs.
arguments: Vec<String>The words after the command, as given.
Implementations§
Source§impl Invocation
impl Invocation
Sourcepub fn parse<S: AsRef<str>>(args: &[S]) -> Result<Self, String>
pub fn parse<S: AsRef<str>>(args: &[S]) -> Result<Self, String>
Reads the agent’s arguments in their canonical form, without the
program name: a plugin option’s value comes after =. Without
--print, the first other word is a command, and every word after
it is the command’s.
Sourcepub fn is_headless(&self) -> bool
pub fn is_headless(&self) -> bool
Whether nobody sits at a terminal view, and the run ends by itself.
Sourcepub fn to_args(&self) -> Vec<OsString>
pub fn to_args(&self) -> Vec<OsString>
The arguments that Self::parse reads back as self.