pub struct InMemoryRunControlStore { /* private fields */ }Expand description
Holds in memory run control store application-layer state or configuration. Use it with the documented coordinator methods; run, journal, event, provider, or port effects are called out on those methods rather than on construction.
Implementations§
Source§impl InMemoryRunControlStore
impl InMemoryRunControlStore
Sourcepub fn register_run(
&self,
run_id: RunId,
agent_id: AgentId,
) -> Result<(), AgentError>
pub fn register_run( &self, run_id: RunId, agent_id: AgentId, ) -> Result<(), AgentError>
Register run. This inserts a run into in-memory test run-control state for deterministic handle tests.
Sourcepub fn mark_visible_output_complete(
&self,
run_id: &RunId,
output: impl Into<String>,
) -> Result<(), AgentError>
pub fn mark_visible_output_complete( &self, run_id: &RunId, output: impl Into<String>, ) -> Result<(), AgentError>
Mark visible output complete. This records final visible output in in-memory test run-control state.
Sourcepub fn seal_terminal_result_from_journal(
&self,
record: &JournalRecord,
output: impl Into<String>,
) -> Result<RunResult, AgentError>
pub fn seal_terminal_result_from_journal( &self, record: &JournalRecord, output: impl Into<String>, ) -> Result<RunResult, AgentError>
Seals terminal run-control state from a journal terminal record.
This stores the derived RunResult in the in-memory run-control map; it does not append a
journal record, publish an event, or execute provider/tool work.
Sourcepub fn cancel_request_count(&self, run_id: &RunId) -> Result<usize, AgentError>
pub fn cancel_request_count(&self, run_id: &RunId) -> Result<usize, AgentError>
Returns the cancel request count currently held by this value. This reads the number of cancellation requests recorded for the run.
Sourcepub fn visible_output(
&self,
run_id: &RunId,
) -> Result<Option<String>, AgentError>
pub fn visible_output( &self, run_id: &RunId, ) -> Result<Option<String>, AgentError>
Returns visible output for callers that need to inspect the contract state. This reads visible output state from run control and does not change run status or output delivery.
Trait Implementations§
Source§impl Clone for InMemoryRunControlStore
impl Clone for InMemoryRunControlStore
Source§fn clone(&self) -> InMemoryRunControlStore
fn clone(&self) -> InMemoryRunControlStore
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more