mcpr_integrations/store/mod.rs
1//! SQLite-based request storage engine and query layer for mcpr.
2//!
3//! Pure persistence logic: open the DB, write events, run read-only
4//! queries. The `EventSink` adapter that plugs this store into the event
5//! bus lives in [`crate::sinks::sqlite_sink`].
6//!
7//! # Architecture
8//!
9//! ```text
10//! SqliteSink ──► Store::record() ──► mpsc channel ──► Writer thread ──► SQLite (WAL)
11//! (non-blocking) (10k buffer) (batch flush)
12//!
13//! CLI commands ──► QueryEngine ──► read-only SQLite connection
14//! ```
15
16pub mod config;
17pub mod db;
18pub mod duration;
19pub mod engine;
20pub mod event;
21pub mod path;
22pub mod query;
23pub mod schema;
24pub mod writer;
25
26// Re-export the main public types for convenience.
27pub use config::FileStoreConfig;
28pub use duration::{parse_duration, since_to_cutoff_ms};
29pub use engine::{Store, StoreConfig, StoreError};
30pub use event::{RequestEvent, RequestStatus, SessionEvent, StoreEvent};
31pub use query::QueryEngine;