Expand description
The Vault facade: the single entry point both the CLI and the Tauri app
use. It coordinates the file store (source of truth) with the derived redb +
tantivy indexes, guarded by a cross-process advisory lock (§5.7).
§Concurrency model
redb guarantees a single in-process writer but nothing across processes.
We bracket every operation with an fs2 flock on meta.redb.lock:
- shared for reads (multiple readers, including a CLI reading while the GUI runs),
- exclusive for writes.
redb and tantivy are opened transiently within the lock scope, so no
process holds them open across the boundary — two processes never collide on
redb’s or tantivy’s own single-writer locks. This keeps the agent path
(oximemo … while the GUI is running) correct.
Structs§
- Doctor
Report - Output of
oximemo doctor(§9.3). - Vault