strands/session/mod.rs
1//! Session persistence.
2//!
3//! Sessions save agent [`Snapshot`](crate::types::Snapshot)s to a [`Storage`](crate::storage::Storage)
4//! under the layout shared with the other Strands SDKs, so agents in any of them can share a session:
5//!
6//! ```text
7//! <sessionId>/scopes/<scope>/<scopeId>/snapshots/
8//! snapshot_latest.json
9//! manifest.json
10//! immutable_history/snapshot_<uuidv7>.json
11//! ```
12//!
13//! Session, scope and snapshot ids match `^[a-z0-9_-]+$`; immutable snapshot ids are UUID v7s.
14//! [`SessionManager`] attaches a session to an agent.
15
16pub(crate) mod clock;
17mod session_manager;
18pub(crate) mod snapshot_storage_adapter;
19mod types;
20pub(crate) mod validation;
21
22pub use session_manager::{SaveLatestStrategy, SessionManager, SessionManagerBuilder, SessionManagerConfig};
23pub use types::{SnapshotManifest, SnapshotTriggerCallback, SnapshotTriggerParams};