pub trait CliInvoker: Send + Sync {
// Required method
fn invoke<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
agent_id: &'life1 str,
task: &'life2 str,
opts: InvokeOptions,
emitter: StreamEventEmitter,
) -> Pin<Box<dyn Future<Output = Result<InvokeResult, InvokeError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
}Expand description
The CLI seam: one invocation of an external agent.
Exists for the same reason native_loop takes a &dyn TurnGenerator — the
loop’s interesting behavior (budget accounting, retry-vs-replan, round
counting) is decided by what comes back from here, and none of it is
testable while the call is hard-wired to a real subprocess.
Required Methods§
fn invoke<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
agent_id: &'life1 str,
task: &'life2 str,
opts: InvokeOptions,
emitter: StreamEventEmitter,
) -> Pin<Box<dyn Future<Output = Result<InvokeResult, InvokeError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".