claude-recall 0.28.6 → 0.28.8
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
|
@@ -105,7 +105,23 @@ claude-recall kiro setup --merge-into <agent-name>
|
|
|
105
105
|
|
|
106
106
|
This finds the agent config (workspace `.kiro/agents/` first, then `~/.kiro/agents/`; `--global` to target the global one directly), writes a timestamped backup, and appends the claude-recall pieces — MCP server, pre-approved read-only tools, and the four hooks — without touching anything the agent already had. Idempotent: re-running changes nothing. If the agent restricts tools with an explicit list, `@claude-recall` is added to it.
|
|
107
107
|
|
|
108
|
-
> **⚠️
|
|
108
|
+
> **⚠️ After `kiro setup` or `--merge-into`: start ONE fresh conversation per project (no `--resume`).** Kiro snapshots the agent config into each conversation **at creation** — `--resume` restores that snapshot and ignores agent-config changes made since. So conversations created *before* you wired claude-recall will **never** run its hooks, no matter how often you resume them or restart Kiro. Start one fresh conversation after wiring; every conversation created from then on carries the hooks, **including when resumed** (`--resume` works normally afterwards — this is a one-time rollover per project).
|
|
109
|
+
|
|
110
|
+
The rollover, concretely (add your usual flags, e.g. `--classic`, `--trust-all-tools`):
|
|
111
|
+
|
|
112
|
+
```bash
|
|
113
|
+
cd ~/path/to/your-project
|
|
114
|
+
kiro-cli chat --agent <your-agent>
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
In that session state something memorable (e.g. `recall the deploy pipeline uses helm`), exit, then verify it was captured:
|
|
118
|
+
|
|
119
|
+
```bash
|
|
120
|
+
claude-recall search "helm"
|
|
121
|
+
tail -5 ~/.claude-recall/hook-logs/hook-dispatcher.log
|
|
122
|
+
```
|
|
123
|
+
|
|
124
|
+
The log should show a `scope [...] → project=your-project` line; `claude-recall kiro doctor` gives a fuller health report.
|
|
109
125
|
|
|
110
126
|
> **Tip:** export `ANTHROPIC_API_KEY` in the shell you launch Kiro from. Hooks then use Claude Haiku to classify what's worth remembering; without it a conservative regex fallback runs, which catches explicit phrasings ("remember ...", "always ...", "never ...", "I prefer ...") but misses subtler ones.
|
|
111
127
|
|
|
@@ -129,12 +145,12 @@ With Option B the agent has the memory tools (`load_rules`, `store_memory`, `sea
|
|
|
129
145
|
|
|
130
146
|
**Not available under Kiro** with either option (Kiro's hooks expose no transcript): transcript-based failure detection and session-end auto-checkpoints.
|
|
131
147
|
|
|
132
|
-
> **Project scoping & `--resume`.** Memories scope to the **working directory Kiro reports for the session
|
|
148
|
+
> **Project scoping & `--resume`.** Memories scope to the **working directory Kiro reports for the session** — normally the directory you launched Kiro from. `kiro --resume` resumes the most recent conversation *from the current directory* (it's per-project), so scoping and `--resume` naturally agree. Just remember the snapshot rule above: only conversations **created after** wiring run the hooks.
|
|
133
149
|
>
|
|
134
|
-
> To force a fixed project regardless of
|
|
150
|
+
> To force a fixed project id regardless of directory, pin it with `CLAUDE_RECALL_PROJECT_ID`. A per-project shell alias makes it seamless:
|
|
135
151
|
>
|
|
136
152
|
> ```bash
|
|
137
|
-
> alias kiro-
|
|
153
|
+
> alias kiro-myproj='CLAUDE_RECALL_PROJECT_ID=my-project kiro-cli chat --agent <your-agent> --resume'
|
|
138
154
|
> ```
|
|
139
155
|
>
|
|
140
156
|
> `claude-recall kiro doctor` always prints the resolved project (and whether it's pinned) so you can confirm where memories are landing before trusting it.
|
|
@@ -506,6 +522,8 @@ claude-recall hook run memory-sync # Stop + PreCompact hook (syncs rul
|
|
|
506
522
|
|
|
507
523
|
Each project gets isolated memory based on its working directory. **Project ID** is derived from the `cwd` passed by the agent. Universal memories (no project scope) are available everywhere. Switching projects switches memory automatically.
|
|
508
524
|
|
|
525
|
+
To pin the project id explicitly — e.g. one logical project spanning several directories (worktrees, subrepos) — set `CLAUDE_RECALL_PROJECT_ID` (see [Environment Variables](#environment-variables)).
|
|
526
|
+
|
|
509
527
|
Database location: `~/.claude-recall/claude-recall.db` (shared file, scoped by `project_id` column).
|
|
510
528
|
|
|
511
529
|
---
|
|
@@ -555,7 +573,7 @@ Runtime behavior can be tuned via environment variables. Defaults are chosen so
|
|
|
555
573
|
| `CLAUDE_RECALL_ENFORCE_MODE` | `on` | Set to `off` to bypass the search-enforcer hook. |
|
|
556
574
|
| `CLAUDE_RECALL_LLM_TIMEOUT_MS` | `5000` | Timeout for hook-context LLM calls (classification, hindsight hints). Hooks fall back to regex when it fires. |
|
|
557
575
|
| `CLAUDE_RECALL_STOP_DEBOUNCE_MS` | `300000` | Debounce for the heavy Stop-hook pipeline (episodes, session extraction, promotion). Citations still scan every turn. `0` disables. |
|
|
558
|
-
| `CLAUDE_RECALL_PROJECT_ID` | *(cwd)* | Pin the project scope to a fixed id, overriding working-directory detection. Useful when
|
|
576
|
+
| `CLAUDE_RECALL_PROJECT_ID` | *(cwd)* | Pin the project scope to a fixed id, overriding working-directory detection. Useful when one logical project spans several directories (worktrees, subrepos). |
|
|
559
577
|
|
|
560
578
|
---
|
|
561
579
|
|
|
@@ -185,10 +185,11 @@ class HookCommands {
|
|
|
185
185
|
// happened to inherit. Both Claude Code and Kiro include `cwd`; for CC
|
|
186
186
|
// it equals process.cwd() so this is a no-op, but for Kiro it pins
|
|
187
187
|
// scoping to the session's working directory. Without this a memory
|
|
188
|
-
// captured while working on project A could land in project B (
|
|
189
|
-
//
|
|
190
|
-
// capture (userPromptSubmit) and injection
|
|
191
|
-
// disagree. Project memories must scope to
|
|
188
|
+
// captured while working on project A could land in project B (any
|
|
189
|
+
// session whose declared cwd differs from what this subprocess
|
|
190
|
+
// inherited), and capture (userPromptSubmit) and injection
|
|
191
|
+
// (agentSpawn) could even disagree. Project memories must scope to
|
|
192
|
+
// ONE deterministic project.
|
|
192
193
|
try {
|
|
193
194
|
const { ConfigService } = await Promise.resolve().then(() => __importStar(require('../../services/config')));
|
|
194
195
|
const cfg = ConfigService.getInstance();
|
|
@@ -220,8 +220,15 @@ class KiroCommands {
|
|
|
220
220
|
for (const c of changes)
|
|
221
221
|
console.log(` • ${c}`);
|
|
222
222
|
console.log('');
|
|
223
|
-
console.log('
|
|
224
|
-
console.log(
|
|
223
|
+
console.log('⚠️ IMPORTANT — one-time rollover per project: Kiro snapshots the agent');
|
|
224
|
+
console.log('config into each conversation AT CREATION, and --resume restores that');
|
|
225
|
+
console.log('snapshot. Conversations created BEFORE this merge will never run the');
|
|
226
|
+
console.log(`memory hooks. In each project, start ONE fresh conversation (no --resume):`);
|
|
227
|
+
console.log('');
|
|
228
|
+
console.log(`kiro-cli chat --agent ${safeName}`);
|
|
229
|
+
console.log('');
|
|
230
|
+
console.log('Every conversation created from now on carries the hooks — including');
|
|
231
|
+
console.log('when resumed, so your normal --resume workflow works from then on.');
|
|
225
232
|
process.exit(0);
|
|
226
233
|
}
|
|
227
234
|
/** Action body, separated from commander wiring so tests can call it directly. */
|
|
@@ -261,6 +268,11 @@ class KiroCommands {
|
|
|
261
268
|
console.log('preferences you state are captured; memories are shared with Claude Code');
|
|
262
269
|
console.log('(same database, same per-project scoping).');
|
|
263
270
|
console.log('');
|
|
271
|
+
console.log('⚠️ Kiro snapshots the agent config into each conversation at creation —');
|
|
272
|
+
console.log('conversations created before this setup never run the hooks, even when');
|
|
273
|
+
console.log('resumed. Start ONE fresh conversation (no --resume) per project; every');
|
|
274
|
+
console.log('conversation from then on carries the hooks, including when resumed.');
|
|
275
|
+
console.log('');
|
|
264
276
|
console.log('Not available under Kiro: transcript-based failure detection and');
|
|
265
277
|
console.log('session-end checkpoints (Kiro exposes no transcript to hooks).');
|
|
266
278
|
process.exit(0);
|
|
@@ -404,7 +416,7 @@ class KiroCommands {
|
|
|
404
416
|
line('✓', `kiro hooks last ran${KiroCommands.fmtAge(kiro.ageMs)}: ${kiro.line.replace(/^\[[^\]]+\]\s*/, '')}`);
|
|
405
417
|
}
|
|
406
418
|
else {
|
|
407
|
-
line('⚠', 'no kiro.log — Kiro hooks have never fired.
|
|
419
|
+
line('⚠', 'no kiro.log — Kiro hooks have never fired. Kiro snapshots agent config into each conversation at creation, so conversations created before wiring never run hooks (even resumed). Start ONE fresh conversation (no --resume) in each project.');
|
|
408
420
|
}
|
|
409
421
|
if (cd) {
|
|
410
422
|
line('✓', `capture hook last ran${KiroCommands.fmtAge(cd.ageMs)}: ${cd.line.replace(/^\[[^\]]+\]\s*/, '')}`);
|
package/dist/services/config.js
CHANGED
|
@@ -99,9 +99,9 @@ class ConfigService {
|
|
|
99
99
|
name: process.env.CLAUDE_PROJECT_NAME,
|
|
100
100
|
// Explicit project pin. Overrides cwd-based scoping entirely — set it
|
|
101
101
|
// to force every memory into one project regardless of which directory
|
|
102
|
-
// the runtime reports (
|
|
103
|
-
//
|
|
104
|
-
//
|
|
102
|
+
// the runtime reports (useful when one logical project spans several
|
|
103
|
+
// directories, or to keep scoping stable across worktrees/subdirs).
|
|
104
|
+
// CLAUDE_RECALL_PROJECT_ID is the documented name;
|
|
105
105
|
// CLAUDE_PROJECT_ID is honored for backward compatibility.
|
|
106
106
|
id: process.env.CLAUDE_RECALL_PROJECT_ID || process.env.CLAUDE_PROJECT_ID
|
|
107
107
|
},
|
package/package.json
CHANGED