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
//! Memory pack — `memory.remember` and `memory.recall` verbs with decay-aware ranking.
pub
pub
pub use MemoryPack;
/// Bump the durable memory-ANN corpus epoch (#812 review REQUEST CHANGES
/// HIGH). `kkernel reindex` mutates note vectors and deletes the persisted
/// Vamana snapshot directly, out of process from any running khive daemon —
/// its in-memory write-generation counter (`ann::bump_generation`) is simply
/// unreachable from a separate process. Call this after invalidating the
/// snapshot so a warm daemon sharing the same database file has a durable
/// signal to observe on its next amortized freshness check
/// (`ann::maybe_check_durable_epoch`, sampled from the recall path) and
/// schedules a rebuild instead of serving pre-reindex vectors indefinitely.
pub async
/// Ensure the `memory_ann_epoch` table exists on `rt` (idempotent, #812
/// review REQUEST CHANGES MEDIUM — pack schema contract). Declared via
/// `MemoryPack::SCHEMA_PLAN` for daemon boot (`server.rs`/`serve.rs` apply
/// every loaded pack's schema plan up front), but `kkernel reindex` runs
/// directly against a raw `KhiveRuntime` without ever booting a pack
/// registry — it calls this explicitly, once, before its first
/// `bump_memory_ann_epoch`, so a reindex against a brand-new database (no
/// daemon ever started) doesn't fail before this table exists.
pub async