ryo-storage
Status: stable. Part of the ryo workspace — AST-centric Rust programming for AI agents.
Persistent storage and transaction log. Three-layer design: a Mutation
function layer, a serializable MutationRecord recording layer, and a
content-addressed StateStore for file-state snapshots. Sessions are dumped
under ~/.ryo/sessions/ as JSON TxLogs for replay / undo / inspection.
Install
Quickstart
use ;
// Create storage at ~/.ryo
let mut storage = global?;
storage.ensure_init?;
// Start logging
let logger = start;
logger.log_mutation;
let log = logger.finish;
// Save session and load it back
let session_id = storage.dump?;
let loaded = storage.load?;
API Summary
| Item | Purpose |
|---|---|
RyoStorage |
Session persistence over ~/.ryo |
TxLog / TxLogger / TxAction |
Transaction log primitives |
Format (JSON / JsonCompact) |
Session serialization format |
SessionIndex / SessionMeta |
Session lookup / metadata |
StateStore / StateRef / WorkspaceSnapshot |
Content-addressed state store |
ProjectIndex / ProjectMeta |
Per-project metadata under ~/.ryo |
FileUuidStorage |
UUID ↔ path indirection |
Status
API surface considered stable for the v0.1.0 release. BincodeFormat was
removed in the run-up to v0.1.0 (incompatible with serde_json::Value-carrying
TxActions); JSON formats remain.
License
Licensed under either of Apache-2.0 or MIT at your option.