Skip to main content

Module storage

Module storage 

Source
Expand description

Storage trait abstraction for the Agent Assembly persistence layer.

This module defines the narrow storage traits that every persistence backend implements. It is a pure interface — no concrete backend dependency (no sqlx, no redis, no tonic); it uses only async-trait, thiserror, and the concrete domain types from aa-core.

The OSS Postgres/Redis/memory drivers and the Enterprise gateway driver all implement the same contract, so swapping the persistence backend never changes any caller code.

Callers import the traits and the domain types they reference from one path:

use aa_core::storage::{AgentId, AuditSink, PolicyDocument, PolicyStore};

The aa-storage crate re-exports this module verbatim, so aa_storage::* and aa_core::storage::* are interchangeable.

Re-exports§

pub use crate::audit::AuditEntry;
pub use crate::identity::AgentId;
pub use crate::identity::SessionId;
pub use crate::policy::PolicyDocument;

Modules§

conformance
Reusable trait-conformance harness for driver crates.

Structs§

SessionRecord
A persisted record of a single agent execution session.

Enums§

StorageError
Failure modes common to all storage backends.

Traits§

AuditSink
Append-only sink for governance AuditEntry records.
CredentialStore
Stores and retrieves named secret material as opaque bytes.
LifecycleStore
Tracks agent liveness through register, heartbeat, and deregister.
PolicyStore
Fetches and invalidates the effective PolicyDocument for an agent.
RateLimitCounter
Atomic counters keyed by an arbitrary string, used for rate limiting.
SessionStore
Persists, loads, and deletes SessionRecords.

Type Aliases§

Result
Convenience alias for results returned by storage trait methods.