use crate::error::StoreError;
use async_trait::async_trait;
use attuned_core::StateSnapshot;
#[async_trait]
pub trait StateStore: Send + Sync {
async fn upsert_latest(&self, snapshot: StateSnapshot) -> Result<(), StoreError>;
async fn get_latest(&self, user_id: &str) -> Result<Option<StateSnapshot>, StoreError>;
async fn delete(&self, user_id: &str) -> Result<(), StoreError> {
let _ = user_id;
Ok(())
}
async fn get_history(
&self,
user_id: &str,
limit: usize,
) -> Result<Vec<StateSnapshot>, StoreError> {
let _ = (user_id, limit);
Ok(vec![])
}
async fn health_check(&self) -> Result<bool, StoreError> {
Ok(true)
}
}