1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
//! # MindCore
//!
//! A pluggable, feature-gated memory engine for AI agent applications.
//!
//! MindCore provides persistent storage, keyword search (FTS5), vector search,
//! hybrid retrieval (RRF), graph relationships, memory consolidation, cognitive
//! decay modeling, and token-budget-aware context assembly.
//!
//! ## Quick Start
//!
//! ```rust,no_run
//! use mindcore::prelude::*;
//!
//! // Define your memory type
//! // (implement MemoryRecord for your struct)
//!
//! // Build the engine
//! // let engine = MemoryEngine::<MyMemory>::builder()
//! // .database("memory.db")
//! // .build()?;
//! ```
//!
//! ## Feature Flags
//!
//! | Feature | Description |
//! |---------|-------------|
//! | `fts5` (default) | FTS5 keyword search with Porter stemming |
//! | `vector-search` | Candle embeddings + hybrid RRF search |
//! | `reranking` | Cross-encoder reranking (post-RRF) |
//! | `graph-memory` | SQLite relationship tables + CTE traversal |
//! | `temporal` | Bi-temporal validity tracking |
//! | `consolidation` | Hash/similarity/LLM-assisted dedup pipeline |
//! | `activation-model` | ACT-R cognitive decay model |
//! | `two-tier` | Global + project memory with promotion |
//! | `encryption` | SQLCipher encryption at rest |
//! | `mcp-server` | MCP server interface |
//! | `full` | All features except encryption and mcp-server |
/// Prelude module — common imports for consumers.