KeiSeiKit-1.0/_primitives/_rust/kei-memory-sqlite/src/lib.rs
Parfii-bot 0be354a920 KeiSeiKit-public — clean state
Single-commit clean baseline after security scrub of niche-tells,
project codenames, internal jargon, and contributor-email leaks.

Contents:
- 100 Rust crates (_primitives/_rust/)
- 37 agent manifests (_manifests/) + generated specs (_generated/)
- 67 user-invocable skills (skills/)
- 33 hooks (hooks/)
- Composition blocks (_blocks/)
- Documentation (docs/, README.md)
- TS adapter packages (_ts_packages/)
- Assembler (_assembler/)
- Roles (_roles/)
- Templates (_templates/)
- Forgejo CI (.forgejo/)

Author: Denis Parfionovich <info@greendragon.info>

License: see LICENSE.
2026-05-01 12:09:03 +08:00

32 lines
1.3 KiB
Rust

// SPDX-License-Identifier: Apache-2.0
// Copyright 2026 <author org>
//!
//! kei-memory-sqlite — `MemoryBackend` impl over SQLite (rusqlite bundled).
//!
//! Hosted Sleep Wave 6 atomar. Offline-first, single-process, embedded
//! storage. Suitable for:
//! - per-user VM local memory store (file-backed)
//! - offline-first agents needing structured `MemoryItem` storage with
//! indexed query (kind / key-prefix / tags / time)
//! - test fixtures (in-memory via `SqliteStore::from_memory`)
//!
//! Constructor Pattern (one file = one responsibility):
//! - [`error`] : crate-local error type, mappable into `kei_runtime_core::Error`.
//! - [`schema`] : DDL + idempotent `apply_schema`.
//! - [`store`] : low-level rusqlite handle + path/in-memory constructors.
//! - [`backend`] : [`backend::SqliteBackend`] glues `SqliteStore` to the
//! `MemoryBackend` trait + carries a DNA.
//!
//! Out of scope:
//! - cross-process concurrency beyond what SQLite offers (use Redis/sled siblings)
//! - remote mirroring (`mirror_to_remote` returns `Provider` error;
//! git-push is the responsibility of `kei-sleep-sync.sh` per RULE 0.15)
pub mod backend;
pub mod error;
pub mod schema;
pub mod store;
pub use backend::SqliteBackend;
pub use error::{Error, Result};
pub use store::SqliteStore;