ryo-storage 0.1.0

Persistent storage and transaction log for RYO
Documentation
#![warn(missing_docs)]
//! RYO Storage - Persistent storage and transaction log
//!
//! This crate provides:
//! - **Storage**: Session persistence and replay
//! - **TxLog**: Transaction logging for undo/redo and replay
//!
//! # Architecture
//!
//! ```text
//! ┌─────────────────────────────────────────────────────────────────────────┐
//! │  Layer 1: Mutation (Functional Layer)                                   │
//! │  - trait Mutation { apply(), describe(), ... }                          │
//! └─────────────────────────────────────────────────────────────────────────┘
//!                             ↓ generates at execution time
//! ┌─────────────────────────────────────────────────────────────────────────┐
//! │  Layer 2: MutationRecord (Recording Layer)                              │
//! │  - Serializable record of each mutation                                 │
//! │  - Contains: MutationSpec + StateRef(pre) + StateRef(post)              │
//! └─────────────────────────────────────────────────────────────────────────┘
//!                             ↓ references
//! ┌─────────────────────────────────────────────────────────────────────────┐
//! │  Layer 3: StateStore (State Layer)                                      │
//! │  - Content-addressed storage for file states                            │
//! │  - Immutable: StateRef = hash of content                                │
//! └─────────────────────────────────────────────────────────────────────────┘
//! ```
//!
//! # Usage
//!
//! ```ignore
//! use ryo_storage::{RyoStorage, TxLog, TxLogger};
//!
//! // Create storage
//! let mut storage = RyoStorage::global()?;
//! storage.ensure_init()?;
//!
//! // Start logging
//! let logger = TxLogger::start(project_path, file_count);
//! logger.log_mutation("Rename", "foo → bar", 3);
//! let log = logger.finish();
//!
//! // Save session
//! let session_id = storage.dump(&log)?;
//!
//! // Load and replay
//! let loaded = storage.load(&session_id)?;
//! ```

pub mod storage;
pub mod txlog;
pub mod uuid_storage;

// Re-export storage types
pub use storage::{
    AutoSaveLogger, CliConfig, ConfigError, Format, FormatError, FormatResult, GlobalConfig,
    ProjectIndex, ProjectMeta, RyoStorage, ServerConfig, SessionFormat, SessionIndex, SessionMeta,
    StateRef, StateStore, StorageError, StorageResult, TxLogMode,
};

// Re-export txlog types
pub use txlog::{
    MutationRecord, ReplayAnalysis, ReplayEngine, ReplayError, ReplayMode, ReplayResult, TxAction,
    TxEntry, TxLog, TxLogger, TxSummary,
};

// Re-export UUID storage types
pub use uuid_storage::FileUuidStorage;