stasis-rs 0.2.0

Durable AI orchestration framework with runtime jobs, lineage, and memory integration
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
use async_trait::async_trait;

use crate::domain::errors::Result;
use crate::ports::outbound::memory::memory_models::{
    MemoryAggregateRequest, MemoryAggregateResponse, MemoryRollupRequest, MemoryRollupResponse,
    MemorySchemaResponse, MemoryTransformRequest, MemoryTransformResponse,
};

#[async_trait]
pub trait MemoryOperations: Send + Sync {
    async fn aggregate(&self, request: &MemoryAggregateRequest) -> Result<MemoryAggregateResponse>;

    async fn transform(&self, request: &MemoryTransformRequest) -> Result<MemoryTransformResponse>;

    async fn rollup(&self, request: &MemoryRollupRequest) -> Result<MemoryRollupResponse>;

    async fn schema(&self) -> Result<MemorySchemaResponse>;
}