Skip to main content

RunStore

Trait RunStore 

Source
pub trait RunStore: Send + Sync {
    // Required methods
    fn start_run(&self, agent_id: &str) -> Result<String, RuntimeError>;
    fn update_run_state(
        &self,
        run_id: &str,
        state: &str,
        error: Option<&str>,
    ) -> Result<(), RuntimeError>;
    fn finish_run(&self, run_id: &str) -> Result<(), RuntimeError>;
    fn fail_run(&self, run_id: &str, error: &str) -> Result<(), RuntimeError>;
}
Expand description

Persistence backend for tracked agent runs.

This trait stores lifecycle transitions for turns and interrupted runs.

Required Methods§

Source

fn start_run(&self, agent_id: &str) -> Result<String, RuntimeError>

Source

fn update_run_state( &self, run_id: &str, state: &str, error: Option<&str>, ) -> Result<(), RuntimeError>

Source

fn finish_run(&self, run_id: &str) -> Result<(), RuntimeError>

Source

fn fail_run(&self, run_id: &str, error: &str) -> Result<(), RuntimeError>

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§