crispy-recall 0.1.6 → 0.2.1

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/README.md CHANGED
@@ -6,6 +6,60 @@ Searchable memory for your Claude Code and Codex sessions. Local, fast, no daemo
6
6
 
7
7
  A standalone spin-off of the recall feature from [Crispy](https://github.com/TheSylvester/crispy). See the parent project for the broader multi-agent orchestration GUI.
8
8
 
9
+ ## What's new in 0.2.1
10
+
11
+ - **macOS install support.** 0.2.0's native SQLite engine shipped without ever
12
+ running on Apple hardware; 0.2.1 fixes the macOS install path and validates it
13
+ end-to-end on Apple Silicon. Fixes: a pre-flight macOS-version check (the
14
+ bundled llama.cpp embedding binaries need macOS 14+ on arm64, 13.7+ on Intel),
15
+ a Node path that stays valid across `brew upgrade node` during in-place
16
+ upgrades (it previously pinned a Homebrew Cellar path that a later upgrade
17
+ removes), an up-front rejection of Node 23 (no prebuilt SQLite binding) with an
18
+ explanation instead of a late failure, and a load-check of the staged SQLite
19
+ binding before the installer trusts it. Non-macOS installs are unaffected.
20
+ - **`recall install` no longer hangs during setup.** Extraction of the embedding
21
+ binaries is now time-boxed with a fallback to the OS unzip tool
22
+ (`unzip`/`ditto`/`Expand-Archive`), so a stalled extract can no longer wedge
23
+ the installer.
24
+
25
+ ## What's new in 0.2.0
26
+
27
+ - **Native SQLite engine with real WAL.** The database now runs on
28
+ better-sqlite3 with write-ahead logging instead of the previous WebAssembly
29
+ binding — which never actually engaged WAL and could silently corrupt the
30
+ index when multiple processes wrote at once. That failure mode is eliminated
31
+ at the root. `recall doctor` gains a SQLite-binding health section.
32
+ **Node.js 22 LTS (≥ 22.16) or 24+ is now required** (Node 23 has no prebuilt
33
+ SQLite binding).
34
+ - **Git provenance: `--commit` and `--blame`.** `recall --commit <hash>` lists
35
+ the session(s) that produced a commit; `recall --blame <path>[:line[-line]]`
36
+ traces a file or line range back to the conversations responsible. Matching
37
+ is structural (your sessions' actual edits vs the commit's diff), not
38
+ timestamp-based. These flags were documented in the skill but missing from
39
+ the shipped CLI; they now work as documented.
40
+ - **Better semantic retrieval (embedding v3).** Stored messages and queries now
41
+ carry the task prefixes the embedding model was trained on, and short turns
42
+ (one-line answers, approvals, decisions) are embedded together with their
43
+ preceding context so they're finally findable by meaning. Measurably improves
44
+ retrieval on the LoCoMo benchmark (recall@5 54.9 → 58.4).
45
+ - **Semantic search stays available during migrations.** Upgrading re-embeds
46
+ your history in the background; until it finishes, search transparently
47
+ blends old- and new-format vectors and tags output with
48
+ `(migrating: N% re-embedded)` instead of going dark.
49
+ - **Relevance-first ranking.** The hidden age penalty is off by default —
50
+ older sessions now rank purely by relevance (previously the right old result
51
+ could rank 2× worse just for being old). Pass `--recent` to prefer newer
52
+ sessions explicitly.
53
+ - **Faster indexing on large databases.** A new index removes a full-table
54
+ scan from every embedding batch and end-of-turn catch-up (~0.3 s → ~0.05 s
55
+ at ~287K messages). Created automatically on first run.
56
+ - **Safe in-place upgrade for existing installs.** `recall install` migrates
57
+ an existing database in place: rollback snapshot → WAL conversion →
58
+ integrity check with auto-repair → background re-embed. See
59
+ [Upgrading from 0.1.x](#upgrading-from-01x).
60
+ - **New scripting flags.** `--raw-messages` (full ranked per-message JSON) and
61
+ `--no-idf` (keep common words in keyword search), both off by default.
62
+
9
63
  ## Install
10
64
 
11
65
  Install the command globally, then run the one-time setup:
@@ -28,18 +82,58 @@ Run it in the environment where you actually use Claude Code: **WSL and
28
82
  Windows-native are separate installs.** If you use both, run the install in each
29
83
  — the installer only configures the environment it is invoked in.
30
84
 
85
+ > **macOS: use Node 22 LTS or 24+.** Node 23 has no prebuilt SQLite binding, so
86
+ > `npm install -g` would fall back to compiling it and fail without Xcode
87
+ > Command Line Tools. macOS 14+ (Apple Silicon) / 13.7+ (Intel) is required for
88
+ > the bundled semantic-embedding binaries.
89
+
31
90
  > **Don't install via `npx`.** recall must stay resident. `npx` runs from an
32
91
  > ephemeral cache and leaves no `recall` command on your PATH, so follow-up
33
92
  > commands (`recall status` / `doctor` / `repair` / `uninstall`) and the
34
93
  > installed skill's command contract have nothing to call. Use the global
35
94
  > install above.
36
95
 
37
- Prerequisites: Node ≥ 20 and Claude Code installed. If Codex is detected
96
+ Prerequisites: Node 22 LTS (22.16) or 24+ Node 23 is unsupported (no
97
+ prebuilt SQLite binding) — and Claude Code installed. If Codex is detected
38
98
  (`~/.codex/` exists), recall installs the `recall` skill into Codex (so the
39
99
  agent can search) and you can index your Codex history with
40
100
  `recall backfill --vendor codex`. Real-time per-turn Codex indexing is **not
41
101
  yet** supported.
42
102
 
103
+ ### Upgrading from 0.1.x
104
+
105
+ ```bash
106
+ npm install -g crispy-recall
107
+ recall install # run this FIRST, before any other recall command
108
+ ```
109
+
110
+ Exit any running Claude/Codex sessions first, then make `recall install` the
111
+ first recall command you run after the npm upgrade — it performs a one-time,
112
+ in-place migration of your existing database (rollback snapshot → WAL
113
+ conversion → integrity check → background re-embed). If a live session is
114
+ still holding the database the installer aborts cleanly and asks you to
115
+ re-run; re-running is always safe and picks up where it left off.
116
+
117
+ What to expect:
118
+
119
+ - **Your indexed history is preserved — even without the original
120
+ transcripts.** Claude Code deletes session `.jsonl` files after 30 days by
121
+ default; the migration never reads them. It works on the database in place,
122
+ and the re-embed sources text from the database itself.
123
+ - A rollback snapshot is written to `~/.recall/recall.db.pre-upgrade-<stamp>`
124
+ (needs free disk roughly equal to your DB size; delete it once you're
125
+ satisfied).
126
+ - A background re-embed upgrades your vectors to the new format — roughly an
127
+ hour per 20K messages on CPU, minutes on GPU. Search works the entire time
128
+ (output shows `migrating: N% re-embedded`); watch progress with
129
+ `recall status`. It resumes automatically after reboots.
130
+ - The migration is one-way: **don't downgrade** to ≤ 0.1.6 afterwards — the
131
+ old engine fails closed on the converted database.
132
+ - **Avoid `recall repair --full` unless you accept losing older history** — it
133
+ rebuilds the index from the transcripts still on disk, which for most
134
+ machines means only the last 30 days. Your database is the store of record;
135
+ the pre-upgrade snapshot is the rollback path if anything looks wrong.
136
+
43
137
  ## What it does
44
138
 
45
139
  - A **Stop hook** ingests every turn into a local SQLite DB the moment a session ends — no daemon, no background polling.
@@ -96,6 +190,22 @@ output. `recall install` also takes `--offline` (use a pre-staged binary +
96
190
  model instead of downloading) and `--no-backfill` / `--auto-backfill` to control
97
191
  the initial history index. Run `recall --help` for the full flag set.
98
192
 
193
+ ### Commit attribution (`--commit` / `--blame`)
194
+
195
+ Find the session(s) that produced a commit, or the session(s) responsible for
196
+ the current state of a file or line. Matching is structural — session
197
+ Edit/Write/MultiEdit tool calls are compared against the commit's diff via
198
+ tri-gram intersection, not clock proximity. `--blame` is HEAD-relative: it runs
199
+ `git blame` to find the commits behind the current file (or line range) and
200
+ attributes each; sessions overwritten by a later commit won't appear. Results
201
+ list top-level sessions and subagent leaves chronologically (oldest first).
202
+
203
+ ```bash
204
+ recall --commit 25dd0f8 # sessions that produced a commit
205
+ recall --blame src/paths.ts:82-84 # sessions behind a line range
206
+ recall --blame src/foo.ts:42 src/bar.ts:10-20 --limit 20 # union of specs
207
+ ```
208
+
99
209
  ## Where things live
100
210
 
101
211
  - `~/.recall/` — the DB, model, binary, logs, and `config.json` (the resolved GPU/CPU embedder mode).