@owrede/vault-memory 2.0.0 → 2.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +32 -0
- package/README.md +35 -11
- package/dist/cli.js +5103 -4569
- package/dist/cli.js.map +1 -1
- package/package.json +2 -1
package/CHANGELOG.md
CHANGED
|
@@ -14,6 +14,38 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
14
14
|
|
|
15
15
|
_Nothing yet._
|
|
16
16
|
|
|
17
|
+
## [2.2.0] — 2026-06-29
|
|
18
|
+
|
|
19
|
+
### Added
|
|
20
|
+
|
|
21
|
+
- **ContextFit — a CPU-only, full-featured second retrieval engine (ADR-008).** vault-memory now supports a `RetrievalBackend` seam with two engines selectable **per vault**: the default `ollama` (embeddings + sqlite-vec + FTS5 hybrid) and a new `contextfit` ([ContextFit](https://www.context.fit/)) — a token-native, CPU-only engine (BM25 + Semantic-IDs; no embeddings, no GPU). Enable with `vault-memory add-vault <path> --backend contextfit` or `backend = "contextfit"` in `config.toml`. Makes vault-memory runnable on resource-limited, non-GPU hosts such as a Synology NAS. Requires `pipx install contextfit`. See `docs/v2/CONTEXTFIT-BACKEND.md`.
|
|
22
|
+
|
|
23
|
+
A ContextFit vault builds the **full SQLite content layer without embeddings** (`indexVault`/`indexNote` gain an `embeddings: "none"` mode), so the whole tool surface works — search (via the ContextFit engine), graph (`expand`/`cluster`/backlinks/forward-links/broken-links), sections/assembly (`get_outline`/`search_sections`/`get_document_bundle`/`assemble_dossier`), frontmatter/stats, **live re-indexing** (watcher refreshes SQLite + the KB, debounced), **catch-up reconciliation** on start, **incremental** hash-skip, and **write→KB refresh**. The only exception is `search_text` (Ollama-path FTS5), which returns a note pointing to `search_hybrid`/`search_semantic`.
|
|
24
|
+
|
|
25
|
+
Results use the canonical `SearchHit` shape (`scoreBreakdown.contextfit` carries the raw score). Ollama vaults are byte-identical — no behavior change when `backend` is omitted.
|
|
26
|
+
|
|
27
|
+
### Fixed
|
|
28
|
+
|
|
29
|
+
- **Live re-index now maintains sections.** The single-note indexer (`indexNote`, used by the watcher + catch-up) previously deleted chunks without first deleting the sections that reference them (FK violation) and never rebuilt sections — so live-edited notes silently lost their section rows. It now deletes sections before chunks and rebuilds them, for **both** the Ollama and ContextFit paths.
|
|
30
|
+
|
|
31
|
+
## [2.1.0] — 2026-06-25
|
|
32
|
+
|
|
33
|
+
### Added
|
|
34
|
+
|
|
35
|
+
- **Alias-aware query expansion** (`ISSUE-aliases-not-in-fulltext-retrieval.md`). A note's frontmatter `aliases` live in `note_aliases`, not in the BM25 source (`chunks_fts`), so searching an exact alias (e.g. `JHE`) never surfaced its target person note. `search_hybrid` now resolves an exact-alias query and injects/promotes the target note to the top of the results. Additive and guarded — non-alias queries are byte-identical (no BM25/semantic scoring change). Set `aliasExpansion: false` to restore prior behavior. `SearchHit.scoreBreakdown` gains an optional `alias` provenance field.
|
|
36
|
+
|
|
37
|
+
### Fixed
|
|
38
|
+
|
|
39
|
+
- **Obsidian plugin self-heals when the `vault-memory` CLI isn't on the GUI PATH** (`ISSUE-install-vault-memory-skill-improvements.md` §23). When Obsidian is launched from Finder/Dock its stripped PATH can make even an absolute path to the CLI fail (the `#!/usr/bin/env node` shebang can't find `node`). On `ENOENT` the plugin now probes common dev-machine locations (homebrew, npm-global, `~/.local`, volta, asdf, nvm versioned dirs) for both the `vault-memory` script and `node`, and retries as `node <script> serve`. The not-found banner now lists every path it tried.
|
|
40
|
+
|
|
41
|
+
### Changed
|
|
42
|
+
|
|
43
|
+
- **Internal: `server.ts` split into per-domain handler modules.** The 3329-line request dispatcher is now `src/server/handlers/{vault,notes,search,graph,memory,brief,assembly,contracts}.ts` over a shared `HandlerDeps` bundle, with a boot-time completeness gate (every registered tool must have a handler). Pure structural refactor — no behavior or API change. Also extracted `errorMessage()` (`src/errors/format.ts`), replacing ~43 inline error-narrowing ternaries.
|
|
44
|
+
|
|
45
|
+
### Docs
|
|
46
|
+
|
|
47
|
+
- **ADR-032** — duplicate section anchors are collapsed (`INSERT OR IGNORE`), not positionally suffixed; documents why suffixing would violate ADR-003 H-7 (content-hash anchors / D-05 source hashes). Closes the deferred "better fix" from the two duplicate-anchor issues.
|
|
48
|
+
|
|
17
49
|
## [2.0.0] — 2026-06-25
|
|
18
50
|
|
|
19
51
|
### Fixed
|
package/README.md
CHANGED
|
@@ -177,32 +177,56 @@ phase plan and the v3/v4 deferred sections.
|
|
|
177
177
|
|
|
178
178
|
## Install and docs
|
|
179
179
|
|
|
180
|
+
### Guided install (recommended)
|
|
181
|
+
|
|
182
|
+
Ask your agent to **"install vault-memory"** (or run `/vmem:install`). The
|
|
183
|
+
installer asks two questions — which retrieval engine, and which vault(s) — then
|
|
184
|
+
installs every missing dependency for the chosen path, registers the vault(s),
|
|
185
|
+
builds the index, and wires the MCP server. See
|
|
186
|
+
[`docs/v2/CONTEXTFIT-BACKEND.md`](docs/v2/CONTEXTFIT-BACKEND.md) for the engine
|
|
187
|
+
comparison.
|
|
188
|
+
|
|
189
|
+
### Choose a retrieval engine
|
|
190
|
+
|
|
191
|
+
vault-memory supports two engines, selectable **per vault**:
|
|
192
|
+
|
|
193
|
+
- **Ollama (vector / embeddings)** — best semantic search; needs Ollama + an
|
|
194
|
+
embedding model resident (GPU recommended).
|
|
195
|
+
- **ContextFit (CPU-only)** — token-native BM25 + Semantic-IDs; **no GPU, no
|
|
196
|
+
model**, ~41 MB deps. Ideal for resource-limited / non-GPU hosts (e.g. a
|
|
197
|
+
Synology NAS). Requires the `contextfit` CLI (`pipx install contextfit`).
|
|
198
|
+
|
|
180
199
|
### Prerequisites
|
|
181
200
|
|
|
182
201
|
- **Node.js >= 22** — runtime for the MCP server (`brew install node@22`).
|
|
183
|
-
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
(`ollama pull bge-m3`).
|
|
187
|
-
-
|
|
188
|
-
-
|
|
202
|
+
- One or more Obsidian vaults; an MCP-aware client.
|
|
203
|
+
- **Ollama engine only:** [Ollama](https://ollama.com) on `localhost:11434`
|
|
204
|
+
(`brew install ollama && brew services start ollama`) + the `bge-m3` model
|
|
205
|
+
(~1.1 GB, `ollama pull bge-m3`). Optional ONNX reranker
|
|
206
|
+
(`bge-reranker-v2-m3`, ~570 MB) via `bash scripts/download-reranker.sh`.
|
|
207
|
+
- **ContextFit engine only:** Python 3.10+ and `pipx install contextfit`.
|
|
189
208
|
|
|
190
|
-
Tested on macOS. Linux should work; Windows untested.
|
|
191
|
-
(`bge-reranker-v2-m3`, ~570 MB) via `bash scripts/download-reranker.sh`.
|
|
209
|
+
Tested on macOS. Linux should work; Windows untested.
|
|
192
210
|
|
|
193
|
-
###
|
|
211
|
+
### Manual install
|
|
194
212
|
|
|
195
213
|
```bash
|
|
196
214
|
npm install -g @owrede/vault-memory
|
|
215
|
+
|
|
216
|
+
# Ollama (default) vault:
|
|
197
217
|
vault-memory add-vault "/path/to/your/obsidian/vault"
|
|
218
|
+
|
|
219
|
+
# OR a CPU-only ContextFit vault (no Ollama/GPU):
|
|
220
|
+
vault-memory add-vault "/path/to/your/obsidian/vault" --backend contextfit
|
|
221
|
+
|
|
198
222
|
vault-memory serve
|
|
199
223
|
```
|
|
200
224
|
|
|
201
225
|
The `add-vault` command appends a `[[vaults]]` block to
|
|
202
226
|
`~/.vault-memory/config.toml`, writes a `.mcp.json` into the vault root, and runs
|
|
203
227
|
the initial index. Idempotent — re-running on a known path fills in whatever is
|
|
204
|
-
missing. Flags: `--name <slug>`, `--write`
|
|
205
|
-
`--no-index` (skip the initial index).
|
|
228
|
+
missing. Flags: `--name <slug>`, `--backend ollama|contextfit`, `--write`
|
|
229
|
+
(enable MCP writes; default read-only), `--no-index` (skip the initial index).
|
|
206
230
|
|
|
207
231
|
### Documentation
|
|
208
232
|
|