pub struct MockAgentHarness { /* private fields */ }Expand description
An interveneable mock harness advertising {inject_message, cancel}.
Deterministic: it replays a fixed two-event transcript (a message + a terminal stop), keeps the
run live until the paired RunHandle is dropped, and yields a fixed result. The applied log
is shared so a driver can assert an accepted command reached the session; commands outside the
advertised set are gated and never logged.
Implementations§
Source§impl MockAgentHarness
impl MockAgentHarness
Sourcepub fn applied(&self) -> AppliedLog
pub fn applied(&self) -> AppliedLog
The shared log of commands sessions from this harness have accepted.
Sourcepub fn take_run_handle(&self) -> Option<RunHandle>
pub fn take_run_handle(&self) -> Option<RunHandle>
Takes the RunHandle for the most recently started run, if a run has started and its
handle has not already been taken.
A driver ends the run by dropping this handle (or calling RunHandle::end_run); until then
the run stays live so commands can be delivered mid-run.
Sourcepub fn advertised_capabilities() -> InterventionCapabilities
pub fn advertised_capabilities() -> InterventionCapabilities
The capability set this harness advertises: {inject_message, cancel} — a strict subset of
the five neutral primitives, so pause_resume, update_budget, and respond_to_approval
are all advertised-unsupported and gated.
Trait Implementations§
Source§impl AgentHarness for MockAgentHarness
impl AgentHarness for MockAgentHarness
Source§type Session = MockAgentSession
type Session = MockAgentSession
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 MockAgentHarness
impl Clone for MockAgentHarness
Source§fn clone(&self) -> MockAgentHarness
fn clone(&self) -> MockAgentHarness
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more