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§
- Session
Record - A persisted record of a single agent execution session.
Enums§
- Storage
Error - Failure modes common to all storage backends.
Traits§
- Audit
Sink - Append-only sink for governance
AuditEntryrecords. - Credential
Store - Stores and retrieves named secret material as opaque bytes.
- Lifecycle
Store - Tracks agent liveness through register, heartbeat, and deregister.
- Policy
Store - Fetches and invalidates the effective
PolicyDocumentfor an agent. - Rate
Limit Counter - Atomic counters keyed by an arbitrary string, used for rate limiting.
- Session
Store - Persists, loads, and deletes
SessionRecords.
Type Aliases§
- Result
- Convenience alias for results returned by storage trait methods.