Releases: pbmagnet4/nlm-memory
v0.12.0
Full Changelog: v0.11.1...v0.12.0
v0.11.1
Full Changelog: v0.11.0...v0.11.1
v0.11.0
Full Changelog: v0.10.1...v0.11.0
v0.10.1
Full Changelog: v0.10.0...v0.10.1
v0.10.0 — integrity, supersedence split, and a critical install fix
If a previous version crashed immediately after install, this release fixes that
migrations/ was missing from the published npm package, so fresh installs of v0.6.0 through v0.9.2 failed with ENOENT: scandir .../migrations on the first command. v0.10.0 ships the migrations and installs cleanly.
This release repairs stored data on first start
Three migrations run automatically when the daemon starts after upgrading:
- 018 removes self-loop supersedence edges and restores sessions that were wrongly marked superseded by a resume-ingest bug (in one production corpus this affected 181 of 185 superseded sessions)
- 019 splits mechanical re-ingest from operator-asserted supersedence: re-parsed transcripts are now
replaced/replaces, andsuperseded/supersedesis reserved for reasoning that was actually overturned - 020 collapses duplicate active facts left by a SQLite supersedence bug (the newest fact per (subject, predicate) stays active)
Run nlm doctor before and after upgrading if you want to see exactly what was repaired.
New
nlm doctor— integrity self-checks over the memory store (self-loops, orphaned statuses, cycles, dangling references, duplicate facts), with--fixfor the mechanically safe repairs. A daily watchdog surfaces violations as Pulse alerts.- Supersedence semantics split — Thread collapses mechanical earlier versions behind an "N earlier versions" affordance; operator-overturned sessions stay visibly dimmed.
- Cycle detection — supersedence chains can no longer form loops (HTTP 400 on attempts).
Fixed
- Recall no longer ranks superseded or replaced sessions into results served to agents
- PostgreSQL: sessions are no longer silently lost when classification fails; BIGINT size comparison no longer re-classifies every file on every tick
- Low-confidence classifications no longer re-classify in an infinite loop; files re-attempt when they grow
- SQLite fact supersedence now collapses all active priors, matching PostgreSQL semantics
962 tests passing. Thanks to a cold-install simulation for catching the packaging bug — it is now part of the release process.
v0.9.2 — interoperability fixes
Bug fixes + docs
Fix: conversation_id now threaded through all three hooks
Previously only session-start-hook had the sentinel guard. This release applies the same pattern consistently:
prompt-recall-hook—conversationIdis now passed as the third argument torecallOverHttp, so UserPromptSubmit queries are logged withconversation_id(omitted whensession_idis absent)stop-hook— citation POST body omitsconversation_idwhen the sentinel fires rather than writing"unknown"into the citation log
In practice the Stop hook always receives session_id from Claude Code, so the guard is defensive rather than corrective. Both hooks behave correctly on any runtime that provides session_id and gracefully on any that doesn't.
Docs: When to call cite_session
Added a "When to call cite_session" paragraph to the MCP Tools section of the README. Previously the behavioral rule ("call it when the session changes your answer") only existed in private CLAUDE.md files. Any user installing nlm-memory now has the guidance inline.
v0.9.1 — precision metric fix
Bug fix
Fix: nlm precision metric was always null
When payload.session_id was absent from the Claude Code SessionStart payload, the hook fell back to the sentinel string "unknown" and forwarded it as the conversation_id URL parameter. Every log entry for those fires was written with conversation_id: "unknown", causing the precision join to treat them as a single false conversation. nlm precision would report a nonsensical result or fail to find any scoreable conversations.
The fix passes undefined to recallOverHttp when conversationId === "unknown", so the conversation_id field is omitted from query_log.jsonl entirely for those entries. Hook fires with a real session_id (the common case once hooks are registered) are unaffected.
Changes
src/hook/session-start-hook.ts— sentinel guard at recall call sitepackage.json— version bump to 0.9.1
v0.9.0 — Supersedence correctness + recall legibility
What's new in 0.9.0
Supersedence fact cascade
mark_superseded(A, B) now correctly cascades to extracted facts. When a session is retired, its facts are automatically linked to their counterparts in the successor session via (subject, predicate) matching. Previously agents could see a session was superseded but still retrieve stale decisions from it via recall_facts.
Supersedence reason visibility
get_session now returns reason and recordedBy on the supersededBy field. Agents can distinguish intentional mark_superseded calls from automatic collision-detect supersedence at ingest time.
Session summaries in pointer block
The hook pointer block now includes up to 120 chars of session summary inline:
- cc_abc123 · nlm-memory Wave 2 upgrade (2026-06-09) — Upgraded React 18→19, Vite 5→8, TypeScript 5→6...
Agents can pre-filter relevance without calling get_session.
Upgrade
npm install -g nlm-memory@0.9.0Requires Node >=22.
v0.8.0 — Recall quality improvements
What's new in 0.8.0
Smarter recall — no more noise on short prompts
Short/conversational messages ("yes please", "ok", "proceed") no longer fire FTS5 recall. A content-word extractor strips stopwords and returns empty recall when fewer than 2 content words remain, eliminating the garbage-session problem identified in query_log.jsonl.
Real-world precision measurement
New nlm precision CLI command joins query_log.jsonl × citation_log.jsonl to compute precision@k — the fraction of surfaced sessions that were actually cited. Run nlm precision --days 30 --verbose to see your recall quality.
Citation-frequency reranker
Sessions that have been explicitly cited in past conversations now receive a log-scaled score boost (ALPHA=0.15 × log(1 + count)) on top of FTS5 ranking. Zero-score results are never promoted above non-zero FTS5 hits. The reranker compounds over time as the citation log grows.
Upgrade
npm install -g nlm-memory@0.8.0Requires Node >=22.
v0.7.0 — Wave 2 major dep upgrades
What's new
Upgrades all major dependencies deferred from 0.6.0. No new features — pure dependency hygiene.
Upgraded
- React 18 → 19 + react-dom 18 → 19
- Vite 5 → 8 + @vitejs/plugin-react 4 → 6
- Vitest 2 → 4
- TypeScript 5 → 6
- Commander 12 → 15
- Zod 3 → 4
- better-sqlite3 11 → 12
- pgvector 0.2 → 0.3
Breaking: Node ≥22 required
Commander 15 and pgvector 0.3 both require Node ≥22. Node 20 reached EOL on 2026-04-30. If you're still on Node 20, stay on v0.6.x until you can upgrade.
Security
Clears all 5 vulnerabilities from v0.6.0 (1 critical + 4 moderate — esbuild dev-only vuln via the vite/vitest dep chain).
Also included
Rebuilt codex-plugin artifacts (nlm/index.js, plugin/scripts/*.mjs) from the already-committed hook TypeScript source. These were stale since the facts-in-recall feature landed in src/hook/ before 0.6.0 but artifacts were not rebuilt at release time.