The session log is the database’s write-ahead log.
VHDB reads the ledger that smart-workbench already writes and the log the plugin keeps itself. Everything else — segments, indexes, the manifest — is derived, and can be deleted and rebuilt from the logs alone.
The log is the WAL
Reads sessions/*.jsonl as written by smart-workbench, read-only. Derived files can be deleted and rebuilt from the log; the result is identical.
Immutable files, atomic swap
Checksummed segments are written first; replacing MANIFEST atomically is what makes new state visible. Crash at any point, re-read the same bytes, reach the same result.
Indexed search, exhaustive truth
The fast path is continuously checked against scoring every candidate one by one — same documents, same order, same score bits — on random data.
One engine, three places
The same engine crate runs as WASM inside the Claude Code plugin, as a personal daemon, and as a team server.
| Crate | Role | Ships as |
|---|---|---|
| vhdb-core | The engine: segments, index SSTs with bloom filters, MANIFEST, ingest, compaction, search (VQL, BM25), recovery, partitions, tiers, vectors, history logic. | Library |
| vhdb-cli | The vhdb command: stat, ingest, search, history, verify, compact, rebuild, dump, archive. | Installed as vhdbctl in server packages |
| vhdb-wasm | The engine as a single WASM file with a Node host for file access. | Bundled in vhdb-plugin as engine/vhdb.wasm |
| vhdbd | One local daemon per project directory. Holds the write lock, follows the log tail, answers over a unix socket. | cargo build --release -p vhdbd |
| vhdb-server | Team server: ingest and compaction, /v1/* API, accounts, projects and tokens, audit log. | .deb, .rpm, tar.gz (x86_64, aarch64) |
The core depends only on serde, serde_json, regex-lite and miniz_oxide. The server adds TLS and hashing. Minimum Rust is 1.85.
What gets stored
A record is one line of the ledger: session id, turn, time, a kind, a body, and optional fields such as file or commit.
Give your sessions a memory.
MIT licensed. Source on GitHub.