lore_cli/storage/
mod.rs

1//! Storage layer for Lore.
2//!
3//! This module provides SQLite-based persistence for sessions, messages,
4//! and session-to-commit links. It handles schema migrations and provides
5//! query methods for the CLI and future daemon.
6//!
7//! # Submodules
8//!
9//! - `db` - Database connection and query operations
10//! - `models` - Data structures for sessions, messages, and links
11
12/// SQLite database connection and query operations.
13pub mod db;
14
15/// Data structures representing sessions, messages, and links.
16pub mod models;
17
18pub use db::Database;
19// DatabaseStats is also available at crate::storage::db::DatabaseStats if needed
20pub use models::{
21    extract_session_files, ContentBlock, LinkCreator, LinkType, MessageContent, MessageRole,
22    SessionLink,
23};
24
25// Re-exported for use by integration tests. These types are used through the
26// storage module in tests/cli_integration.rs even though they're not directly
27// used in the binary crate itself.
28#[allow(unused_imports)]
29pub use models::{Message, Session};