Skip to main content

aa_storage/
lib.rs

1//! Storage trait abstraction for the Agent Assembly persistence layer.
2//!
3//! This crate is a thin **facade** over [`aa_core::storage`]: it re-exports the
4//! storage trait contract verbatim. The traits themselves live in `aa-core` so
5//! they can also be reached at `aa_core::storage::*` — the two import paths are
6//! interchangeable. Backend driver crates may depend on this crate to express
7//! "I implement the storage contract" without coupling to the rest of `aa-core`'s
8//! API surface, and existing `aa_storage::*` paths keep working.
9//!
10//! The crate is a pure interface — no concrete backend dependency (no `sqlx`,
11//! `redis`, or `tonic`).
12//!
13//! # Traits
14//!
15//! - [`PolicyStore`] — fetch and invalidate an agent's effective policy
16//! - [`AuditSink`] — append-only emission of audit entries
17//! - [`SessionStore`] — persist, load, and delete per-execution session records
18//! - [`CredentialStore`] — store and retrieve named secret material
19//! - [`RateLimitCounter`] — read-modify-write counters for rate limiting
20//! - [`LifecycleStore`] — agent register / heartbeat / deregister bookkeeping
21//!
22//! # Single import path
23//!
24//! ```
25//! use aa_storage::{AgentId, AuditSink, PolicyDocument, PolicyStore};
26//! ```
27
28#![warn(missing_docs)]
29
30pub use aa_core::storage::*;
31
32pub mod builtin;
33pub mod factory;
34
35mod config;
36mod driver_name;
37mod error;
38mod registry;
39
40pub use config::StorageConfig;
41pub use driver_name::DriverName;
42pub use error::ConfigError;
43pub use registry::Registry;