pub struct RuntimeStore { /* private fields */ }Expand description
Runtime store facade composing session, execution, run, embedding, and artifact stores.
Provides a unified interface for all runtime persistence operations. Individual sub-stores are accessed via their respective accessor methods.
Implementations§
Source§impl RuntimeStore
impl RuntimeStore
Sourcepub fn new(
sessions: Box<dyn SessionStore>,
executions: Box<dyn ExecutionStore>,
runs: Box<dyn RunStore>,
) -> Self
pub fn new( sessions: Box<dyn SessionStore>, executions: Box<dyn ExecutionStore>, runs: Box<dyn RunStore>, ) -> Self
Creates a new runtime store with session, execution, and run stores.
Embedding and artifact stores are optional — attach them with
with_embeddings and
with_artifacts.
Sourcepub fn with_embeddings(self, store: Box<dyn EmbeddingStore>) -> Self
pub fn with_embeddings(self, store: Box<dyn EmbeddingStore>) -> Self
Attaches an optional embedding store for vector search operations.
Sourcepub fn with_artifacts(self, store: Box<dyn ArtifactStore>) -> Self
pub fn with_artifacts(self, store: Box<dyn ArtifactStore>) -> Self
Attaches an optional artifact store for file/blob storage.
Sourcepub fn sessions(&self) -> &dyn SessionStore
pub fn sessions(&self) -> &dyn SessionStore
Returns the session store.
Sourcepub fn executions(&self) -> &dyn ExecutionStore
pub fn executions(&self) -> &dyn ExecutionStore
Returns the execution store.
Sourcepub fn embeddings(&self) -> Option<&dyn EmbeddingStore>
pub fn embeddings(&self) -> Option<&dyn EmbeddingStore>
Returns the embedding store, if configured.
Sourcepub fn artifacts(&self) -> Option<&dyn ArtifactStore>
pub fn artifacts(&self) -> Option<&dyn ArtifactStore>
Returns the artifact store, if configured.
Sourcepub fn from_extensions(exts: &Extensions) -> Self
pub fn from_extensions(exts: &Extensions) -> Self
Creates a RuntimeStore from an Extensions facade, cloning its
store extension points. Backed by default in-memory stores when no
entries are registered.
Sourcepub fn sessions_ep(&self) -> &ExtensionPoint<dyn SessionStore>
pub fn sessions_ep(&self) -> &ExtensionPoint<dyn SessionStore>
Returns the session store extension point.
Sourcepub fn executions_ep(&self) -> &ExtensionPoint<dyn ExecutionStore>
pub fn executions_ep(&self) -> &ExtensionPoint<dyn ExecutionStore>
Returns the execution store extension point.
Sourcepub fn runs_ep(&self) -> &ExtensionPoint<dyn RunStore>
pub fn runs_ep(&self) -> &ExtensionPoint<dyn RunStore>
Returns the run store extension point.
Sourcepub fn embeddings_ep(&self) -> &ExtensionPoint<dyn EmbeddingStore>
pub fn embeddings_ep(&self) -> &ExtensionPoint<dyn EmbeddingStore>
Returns the embedding store extension point.
Sourcepub fn artifacts_ep(&self) -> &ExtensionPoint<dyn ArtifactStore>
pub fn artifacts_ep(&self) -> &ExtensionPoint<dyn ArtifactStore>
Returns the artifact store extension point.
Sourcepub async fn ensure_session(
&self,
session_id: Option<Uuid>,
) -> RuntimeResult<Uuid>
pub async fn ensure_session( &self, session_id: Option<Uuid>, ) -> RuntimeResult<Uuid>
Creates or loads a session.
§Errors
Returns RuntimeError::SessionNotFound when session_id is provided
but does not exist, or RuntimeError::Storage on persistence failure.