claude-recall 0.27.0 → 0.27.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.
|
@@ -131,9 +131,9 @@ memories to form a skill (3+ for most types, 5+ for preferences). If so, it writ
|
|
|
131
131
|
a SKILL.md file that Claude Code loads automatically.
|
|
132
132
|
|
|
133
133
|
**CLI commands:**
|
|
134
|
-
- `
|
|
135
|
-
- `
|
|
136
|
-
- `
|
|
134
|
+
- `claude-recall skills list` — see generated skills
|
|
135
|
+
- `claude-recall skills generate --force` — force regeneration
|
|
136
|
+
- `claude-recall skills clean --force` — remove all auto-generated skills
|
|
137
137
|
|
|
138
138
|
## Automatic Capture Hooks
|
|
139
139
|
|
|
@@ -158,7 +158,7 @@ Claude Recall registers hooks on six Claude Code events for automatic capture, j
|
|
|
158
158
|
- Auto-checkpoint quality gate: refuses to save when the LLM detects the task was already complete — manual checkpoints stay sticky
|
|
159
159
|
- Always exits 0 — hooks never block Claude
|
|
160
160
|
|
|
161
|
-
**Setup:** Run `
|
|
161
|
+
**Setup:** Run `claude-recall setup --install` to register hooks in `.claude/settings.json`. After an upgrade whose release notes mention new or changed hooks (a `hooksVersion` bump), re-run it in each active project — it's idempotent, so when hooks are already current it's a no-op and touches nothing.
|
|
162
162
|
|
|
163
163
|
## Example Workflows
|
|
164
164
|
|
package/README.md
CHANGED
|
@@ -49,6 +49,16 @@ claude mcp add claude-recall -- claude-recall mcp start
|
|
|
49
49
|
|
|
50
50
|
Restart Claude Code. Ask *"Load my rules"* to verify — Claude should call `load_rules`.
|
|
51
51
|
|
|
52
|
+
Prefer it active in **every** project? Register the MCP server once at user scope instead of per project (memories stay isolated per project either way — scoping comes from the working directory, not the install):
|
|
53
|
+
|
|
54
|
+
```bash
|
|
55
|
+
claude mcp add --scope user claude-recall -- claude-recall mcp start
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
Hook-based auto-capture remains a per-project opt-in via `claude-recall setup --install` (it writes to that project's `.claude/settings.json`).
|
|
59
|
+
|
|
60
|
+
> **Do NOT add claude-recall as a project dependency** (`npm install claude-recall` inside a project). All projects share one database at `~/.claude-recall/` and whatever binary touches it runs schema migrations — multiple project-local copies at different versions fight over the same file. Worse, `npx claude-recall` prefers a project-local copy over your up-to-date global one, so a stale local install silently shadows every upgrade. One global binary; per-project *activation* only.
|
|
61
|
+
|
|
52
62
|
> **Hit `EACCES: permission denied`?** Your global npm is owned by root. Either `sudo npm install -g claude-recall` once, or do the permanent fix described in [Upgrading](#upgrading) below.
|
|
53
63
|
|
|
54
64
|
### Install for Pi
|
|
@@ -71,6 +81,15 @@ claude-recall upgrade
|
|
|
71
81
|
|
|
72
82
|
One command. Checks the registry, refreshes the global binary, clears any running MCP servers — Claude Code respawns them on the next tool call, picking up the new version. **No `claude mcp add` re-run needed** — existing registrations point at the `claude-recall` command, not a pinned path.
|
|
73
83
|
|
|
84
|
+
If the release notes mention new or changed hooks (a `hooksVersion` bump), also re-run `claude-recall setup --install` in each active project. It's safe to run any time: when your hooks are already current it's a no-op and touches nothing.
|
|
85
|
+
|
|
86
|
+
> **Registered before v0.27.x?** Older versions auto-registered the MCP server with an `npx`-based command, which re-resolves the package on every server start and can be shadowed by stale project-local installs. Switch to the direct binary form (run in each affected project):
|
|
87
|
+
>
|
|
88
|
+
> ```bash
|
|
89
|
+
> claude mcp remove claude-recall
|
|
90
|
+
> claude mcp add claude-recall -- claude-recall mcp start
|
|
91
|
+
> ```
|
|
92
|
+
|
|
74
93
|
For Pi, run `pi update npm:claude-recall` and restart Pi.
|
|
75
94
|
|
|
76
95
|
> **Seeing `error: unknown command 'upgrade'`?** Your installed version predates 0.23.2 (the release that added the `upgrade` command). Bootstrap once with `npm install -g claude-recall@latest`, then all future upgrades use `claude-recall upgrade`.
|
|
@@ -943,7 +943,7 @@ class ClaudeRecallCLI {
|
|
|
943
943
|
else if (!hasPi) {
|
|
944
944
|
console.log('Claude Code MCP:');
|
|
945
945
|
console.log(' Status: Not registered');
|
|
946
|
-
console.log(' Command: claude mcp add claude-recall claude-recall mcp start');
|
|
946
|
+
console.log(' Command: claude mcp add claude-recall -- claude-recall mcp start');
|
|
947
947
|
}
|
|
948
948
|
else {
|
|
949
949
|
// Pi is present; show Claude Code MCP as optional
|
|
@@ -1339,24 +1339,32 @@ async function main() {
|
|
|
1339
1339
|
installSkillsAndHook();
|
|
1340
1340
|
}
|
|
1341
1341
|
else {
|
|
1342
|
-
// Show activation instructions
|
|
1342
|
+
// Show activation instructions. Registration uses the global
|
|
1343
|
+
// `claude-recall` binary, NOT `npx ... @latest`: npx resolves through
|
|
1344
|
+
// any stale project-local install (shadow trap) and @latest hits the
|
|
1345
|
+
// registry on every server spawn. Consecutive commands are printed
|
|
1346
|
+
// flush-left as one contiguous block so they can be copy-pasted in
|
|
1347
|
+
// one go.
|
|
1343
1348
|
console.log('\n✅ Claude Recall Setup\n');
|
|
1344
1349
|
console.log('━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━');
|
|
1345
|
-
console.log('📌 ACTIVATE CLAUDE RECALL:');
|
|
1350
|
+
console.log('📌 ACTIVATE CLAUDE RECALL (run in each project):');
|
|
1346
1351
|
console.log('━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━');
|
|
1347
1352
|
console.log('');
|
|
1348
|
-
console.log('
|
|
1353
|
+
console.log('claude-recall setup --install');
|
|
1354
|
+
console.log('claude mcp add claude-recall -- claude-recall mcp start');
|
|
1349
1355
|
console.log('');
|
|
1350
1356
|
console.log(' Then restart Claude Code (exit and re-enter the session).');
|
|
1351
1357
|
console.log('');
|
|
1352
1358
|
console.log('━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━');
|
|
1353
1359
|
console.log('');
|
|
1354
|
-
console.log('🔄
|
|
1355
|
-
console.log(' claude mcp remove claude-recall');
|
|
1356
|
-
console.log(' claude mcp add claude-recall -- npx -y claude-recall@latest mcp start');
|
|
1360
|
+
console.log('🔄 Registered under an old npx-based command? Remove and re-add:');
|
|
1357
1361
|
console.log('');
|
|
1358
|
-
console.log('
|
|
1359
|
-
console.log('
|
|
1362
|
+
console.log('claude mcp remove claude-recall');
|
|
1363
|
+
console.log('claude mcp add claude-recall -- claude-recall mcp start');
|
|
1364
|
+
console.log('');
|
|
1365
|
+
console.log('🛑 Stop a running old instance:');
|
|
1366
|
+
console.log('');
|
|
1367
|
+
console.log('claude-recall mcp stop');
|
|
1360
1368
|
console.log('');
|
|
1361
1369
|
}
|
|
1362
1370
|
process.exit(0);
|
|
@@ -1428,7 +1436,7 @@ async function main() {
|
|
|
1428
1436
|
}
|
|
1429
1437
|
if (!settingsPath) {
|
|
1430
1438
|
console.log('❌ No .claude/settings.json found in directory tree');
|
|
1431
|
-
console.log(' Run:
|
|
1439
|
+
console.log(' Run: claude-recall repair\n');
|
|
1432
1440
|
return;
|
|
1433
1441
|
}
|
|
1434
1442
|
console.log(`✅ Found settings: ${settingsPath}`);
|
|
@@ -1485,7 +1493,7 @@ async function main() {
|
|
|
1485
1493
|
}
|
|
1486
1494
|
}
|
|
1487
1495
|
if (hasIssues) {
|
|
1488
|
-
console.log('\n⚠️ Issues found. Run:
|
|
1496
|
+
console.log('\n⚠️ Issues found. Run: claude-recall repair\n');
|
|
1489
1497
|
}
|
|
1490
1498
|
else {
|
|
1491
1499
|
console.log('\n✅ All hooks OK!\n');
|
|
@@ -1516,7 +1524,7 @@ async function main() {
|
|
|
1516
1524
|
}
|
|
1517
1525
|
if (!enforcerPath) {
|
|
1518
1526
|
console.log('❌ Could not find search_enforcer.py');
|
|
1519
|
-
console.log(' Run:
|
|
1527
|
+
console.log(' Run: claude-recall repair\n');
|
|
1520
1528
|
return;
|
|
1521
1529
|
}
|
|
1522
1530
|
console.log(`📍 Enforcer: ${enforcerPath}`);
|
|
@@ -1600,7 +1608,7 @@ async function main() {
|
|
|
1600
1608
|
}
|
|
1601
1609
|
else {
|
|
1602
1610
|
console.log('❌ Some tests failed. Check hook configuration.\n');
|
|
1603
|
-
console.log('Run:
|
|
1611
|
+
console.log('Run: claude-recall repair\n');
|
|
1604
1612
|
}
|
|
1605
1613
|
}
|
|
1606
1614
|
// Hooks command group
|
|
@@ -1700,7 +1708,7 @@ async function main() {
|
|
|
1700
1708
|
console.log('\n📋 Auto-Generated Skills\n');
|
|
1701
1709
|
if (skills.length === 0) {
|
|
1702
1710
|
console.log('No auto-generated skills found.\n');
|
|
1703
|
-
console.log('Run `
|
|
1711
|
+
console.log('Run `claude-recall skills generate` to create skills from memories.\n');
|
|
1704
1712
|
}
|
|
1705
1713
|
else {
|
|
1706
1714
|
for (const skill of skills) {
|
|
@@ -102,7 +102,7 @@ class MCPCommands {
|
|
|
102
102
|
else {
|
|
103
103
|
console.log();
|
|
104
104
|
console.log(chalk_1.default.yellow('⚠ Project not registered in registry'));
|
|
105
|
-
console.log(chalk_1.default.gray(' Run `
|
|
105
|
+
console.log(chalk_1.default.gray(' Run `claude-recall project register` to register'));
|
|
106
106
|
}
|
|
107
107
|
console.log();
|
|
108
108
|
}
|
|
@@ -135,7 +135,7 @@ class MCPCommands {
|
|
|
135
135
|
console.log(` ${chalk_1.default.gray(server.projectId.padEnd(40))} PID: ${chalk_1.default.gray(server.pid)} (not running)`);
|
|
136
136
|
}
|
|
137
137
|
console.log();
|
|
138
|
-
console.log(chalk_1.default.yellow(`💡 Run '
|
|
138
|
+
console.log(chalk_1.default.yellow(`💡 Run 'claude-recall mcp cleanup' to remove stale PID files`));
|
|
139
139
|
console.log();
|
|
140
140
|
}
|
|
141
141
|
// Show registered projects that don't have running servers
|
|
@@ -147,7 +147,7 @@ class MCPCommands {
|
|
|
147
147
|
console.log(` ${chalk_1.default.gray(projectId.padEnd(40))} v${entry.version}`);
|
|
148
148
|
}
|
|
149
149
|
console.log();
|
|
150
|
-
console.log(chalk_1.default.gray(`💡 Run '
|
|
150
|
+
console.log(chalk_1.default.gray(`💡 Run 'claude-recall project list' for detailed registry info`));
|
|
151
151
|
console.log();
|
|
152
152
|
}
|
|
153
153
|
}
|
|
@@ -214,7 +214,7 @@ class MCPCommands {
|
|
|
214
214
|
await new Promise(resolve => setTimeout(resolve, 2000));
|
|
215
215
|
}
|
|
216
216
|
console.log('\nTo start the server, run:');
|
|
217
|
-
console.log(chalk_1.default.cyan('
|
|
217
|
+
console.log(chalk_1.default.cyan(' claude-recall mcp start'));
|
|
218
218
|
console.log();
|
|
219
219
|
console.log(chalk_1.default.gray('Note: The MCP server is normally started automatically by Claude Code.'));
|
|
220
220
|
console.log(chalk_1.default.gray(' You only need to run this manually for debugging purposes.'));
|
|
@@ -189,7 +189,7 @@ class ProjectCommands {
|
|
|
189
189
|
if (projects.length === 0) {
|
|
190
190
|
console.log(chalk_1.default.gray('No projects registered.'));
|
|
191
191
|
console.log();
|
|
192
|
-
console.log(chalk_1.default.yellow('💡 Run `
|
|
192
|
+
console.log(chalk_1.default.yellow('💡 Run `claude-recall project register` to register the current project'));
|
|
193
193
|
console.log();
|
|
194
194
|
return;
|
|
195
195
|
}
|
|
@@ -226,7 +226,7 @@ class ProjectCommands {
|
|
|
226
226
|
if (!entry) {
|
|
227
227
|
console.log(chalk_1.default.yellow(`⚠ Project not found: ${targetProjectId}`));
|
|
228
228
|
console.log();
|
|
229
|
-
console.log(chalk_1.default.gray('Run `
|
|
229
|
+
console.log(chalk_1.default.gray('Run `claude-recall project list` to see registered projects'));
|
|
230
230
|
console.log();
|
|
231
231
|
return;
|
|
232
232
|
}
|
package/package.json
CHANGED
package/scripts/postinstall.js
CHANGED
|
@@ -4,7 +4,7 @@ const fs = require('fs');
|
|
|
4
4
|
const path = require('path');
|
|
5
5
|
const os = require('os');
|
|
6
6
|
|
|
7
|
-
console.log('\n🚀 Setting up Claude Recall
|
|
7
|
+
console.log('\n🚀 Setting up Claude Recall...\n');
|
|
8
8
|
|
|
9
9
|
const { execSync } = require('child_process');
|
|
10
10
|
|
|
@@ -53,22 +53,20 @@ try {
|
|
|
53
53
|
console.log(`📁 Created database directory: ${dbDir}`);
|
|
54
54
|
}
|
|
55
55
|
|
|
56
|
-
//
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
console.log(' Run manually: claude mcp add claude-recall -- npx claude-recall mcp start');
|
|
71
|
-
}
|
|
56
|
+
// MCP registration: instructions only, no auto-registration.
|
|
57
|
+
//
|
|
58
|
+
// Earlier versions ran `claude mcp remove` + `claude mcp add ... npx ...`
|
|
59
|
+
// here on EVERY install/upgrade. That was wrong three ways:
|
|
60
|
+
// • it silently REPLACED whatever registration the user had — including
|
|
61
|
+
// the correct `claude-recall mcp start` form the README recommends —
|
|
62
|
+
// with an npx-based one (registry lookup per server spawn, and npx
|
|
63
|
+
// resolves through stale project-local installs);
|
|
64
|
+
// • `claude mcp add` registers at LOCAL scope for whatever cwd npm
|
|
65
|
+
// happened to run postinstall in — for `npm install -g` that is not
|
|
66
|
+
// the user's project at all;
|
|
67
|
+
// • a postinstall mutating user configuration unprompted is the same
|
|
68
|
+
// overreach class the 0.24.0 audit fixes removed for hooks.
|
|
69
|
+
// Registration is now a conscious per-project step (printed below).
|
|
72
70
|
|
|
73
71
|
// Auto-register project
|
|
74
72
|
try {
|
|
@@ -112,10 +110,10 @@ try {
|
|
|
112
110
|
// unrelated PreToolUse hooks). When `npm install -g` was run from $HOME it
|
|
113
111
|
// even clobbered the user's GLOBAL Claude Code settings at ~/.claude/settings.json.
|
|
114
112
|
//
|
|
115
|
-
//
|
|
116
|
-
// auto-capture and search enforcement
|
|
117
|
-
// `claude-recall setup` invocation by the user, which is
|
|
118
|
-
// produces a diff the user can see.
|
|
113
|
+
// MCP registration (instructions printed below) is enough for memory tools
|
|
114
|
+
// to work. Hook-based auto-capture and search enforcement require an
|
|
115
|
+
// explicit `claude-recall setup --install` invocation by the user, which is
|
|
116
|
+
// conscious and produces a diff the user can see.
|
|
119
117
|
|
|
120
118
|
// Conservative repair on upgrade: fix broken absolute hook paths in
|
|
121
119
|
// ~/.claude/settings.json AND every project's .claude/settings.json under
|
|
@@ -146,25 +144,27 @@ try {
|
|
|
146
144
|
|
|
147
145
|
console.log('\n✅ Installation complete!\n');
|
|
148
146
|
console.log('━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━');
|
|
149
|
-
console.log('📌 ACTIVATE CLAUDE RECALL:');
|
|
147
|
+
console.log('📌 ACTIVATE CLAUDE RECALL — run in each project where you want it:');
|
|
150
148
|
console.log('━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━');
|
|
151
149
|
console.log('');
|
|
152
|
-
|
|
153
|
-
console.log('
|
|
154
|
-
console.log('');
|
|
155
|
-
console.log(' 2. (Optional) Enable hook-based auto-capture and search enforcement');
|
|
156
|
-
console.log(' in the CURRENT project. This writes to .claude/settings.json — review');
|
|
157
|
-
console.log(' the diff before committing:');
|
|
158
|
-
console.log(' npx claude-recall setup');
|
|
150
|
+
// Contiguous flush-left block: both commands copy-paste in one go
|
|
151
|
+
console.log('claude-recall setup --install');
|
|
152
|
+
console.log('claude mcp add claude-recall -- claude-recall mcp start');
|
|
159
153
|
console.log('');
|
|
160
154
|
console.log(' Then restart Claude Code.');
|
|
161
155
|
console.log('');
|
|
156
|
+
console.log(' (`setup --install` writes hooks/skills to .claude/settings.json —');
|
|
157
|
+
console.log(' review the diff before committing. Idempotent: re-runs are no-ops');
|
|
158
|
+
console.log(' when already current.)');
|
|
159
|
+
console.log('');
|
|
162
160
|
console.log('━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━');
|
|
163
161
|
console.log('');
|
|
164
162
|
console.log('💡 Your memories persist across conversations and restarts.\n');
|
|
165
163
|
|
|
166
164
|
} catch (error) {
|
|
167
165
|
console.error('❌ Error during setup:', error.message);
|
|
168
|
-
console.log('\
|
|
169
|
-
console.log('
|
|
166
|
+
console.log('\nActivate manually in each project:');
|
|
167
|
+
console.log('');
|
|
168
|
+
console.log('claude-recall setup --install');
|
|
169
|
+
console.log('claude mcp add claude-recall -- claude-recall mcp start');
|
|
170
170
|
}
|