Skip to main content

AgenticSystemExecutionStorePort

Trait AgenticSystemExecutionStorePort 

Source
pub trait AgenticSystemExecutionStorePort: Send + Sync {
    // Required methods
    fn create<'life0, 'async_trait>(
        &'life0 self,
        execution: AgenticSystemExecution,
    ) -> Pin<Box<dyn Future<Output = Result<AgenticSystemExecutionCreation, DomainError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn get<'life0, 'life1, 'async_trait>(
        &'life0 self,
        id: &'life1 AgenticSystemExecutionId,
    ) -> Pin<Box<dyn Future<Output = Result<Option<AgenticSystemExecution>, DomainError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn update<'life0, 'async_trait>(
        &'life0 self,
        execution: AgenticSystemExecution,
        expected_updated_at: OffsetDateTime,
    ) -> Pin<Box<dyn Future<Output = Result<AgenticSystemExecutionUpdate, DomainError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn list_by_system<'life0, 'life1, 'async_trait>(
        &'life0 self,
        id: &'life1 AgenticSystemId,
    ) -> Pin<Box<dyn Future<Output = Result<Vec<AgenticSystemExecution>, DomainError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
}
Expand description

Persistence for runs, separate from the designs they run.

The design store protects an author’s edits; this one protects a run’s progress, and they are different races between different parties. Keeping them in one store would mean every advance of every run contended with every edit of the design.

Required Methods§

Source

fn create<'life0, 'async_trait>( &'life0 self, execution: AgenticSystemExecution, ) -> Pin<Box<dyn Future<Output = Result<AgenticSystemExecutionCreation, DomainError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Open a run, or hand back the one that identifier already names.

Source

fn get<'life0, 'life1, 'async_trait>( &'life0 self, id: &'life1 AgenticSystemExecutionId, ) -> Pin<Box<dyn Future<Output = Result<Option<AgenticSystemExecution>, DomainError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source

fn update<'life0, 'async_trait>( &'life0 self, execution: AgenticSystemExecution, expected_updated_at: OffsetDateTime, ) -> Pin<Box<dyn Future<Output = Result<AgenticSystemExecutionUpdate, DomainError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Write a run back, against the moment the caller last saw it.

The timestamp is the version: a run carries no revision of its own, and every write moves updated_at, so comparing it is what keeps two advances of the same run from each overwriting the other’s links.

Source

fn list_by_system<'life0, 'life1, 'async_trait>( &'life0 self, id: &'life1 AgenticSystemId, ) -> Pin<Box<dyn Future<Output = Result<Vec<AgenticSystemExecution>, DomainError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Every run of one design, newest last.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§