claude-recall 0.28.3 → 0.28.4
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 +3 -0
- package/dist/cli/claude-recall-cli.js +20 -0
- package/dist/cli/commands/hook-commands.js +18 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -129,6 +129,8 @@ With Option B the agent has the memory tools (`load_rules`, `store_memory`, `sea
|
|
|
129
129
|
|
|
130
130
|
**Not available under Kiro** with either option (Kiro's hooks expose no transcript): transcript-based failure detection and session-end auto-checkpoints.
|
|
131
131
|
|
|
132
|
+
> **Project scoping under Kiro.** Memories scope to the **working directory Kiro reports for the session**, not your shell's current directory. These are usually the same — but `kiro --resume` carries the *original* session's directory, so a resumed session captures into the project it was first started in (even if your shell has since moved). Start Kiro fresh from a project directory to scope there. `claude-recall kiro doctor` prints the resolved project so you can confirm where memories are landing.
|
|
133
|
+
|
|
132
134
|
### Shared Database
|
|
133
135
|
|
|
134
136
|
All runtimes (Claude Code, Pi, Kiro CLI) use the same database at `~/.claude-recall/claude-recall.db`, scoped per project by working directory. A correction learned in one agent is available in the others.
|
|
@@ -425,6 +427,7 @@ claude-recall store "content" -t <type> # Store with type (preference, correcti
|
|
|
425
427
|
claude-recall export backup.json # Export current project's memories to JSON
|
|
426
428
|
claude-recall export backup.json --global # Export all projects
|
|
427
429
|
claude-recall import backup.json # Import memories from JSON
|
|
430
|
+
claude-recall delete <key> # Delete one memory by key (get keys from `search`)
|
|
428
431
|
claude-recall clear --force # Clear current project (auto-backup written first)
|
|
429
432
|
claude-recall clear --force --global # Clear all projects
|
|
430
433
|
claude-recall failures # View failure memories
|
|
@@ -1961,6 +1961,26 @@ async function main() {
|
|
|
1961
1961
|
await cli.import(input, options);
|
|
1962
1962
|
process.exit(0);
|
|
1963
1963
|
});
|
|
1964
|
+
// Delete a single memory by key
|
|
1965
|
+
program
|
|
1966
|
+
.command('delete <key>')
|
|
1967
|
+
.description('Delete a single memory by its key (find keys with `search`)')
|
|
1968
|
+
.action((key) => {
|
|
1969
|
+
try {
|
|
1970
|
+
const deleted = memory_1.MemoryService.getInstance().delete(key);
|
|
1971
|
+
if (deleted) {
|
|
1972
|
+
console.log(`✅ Deleted memory: ${key}`);
|
|
1973
|
+
}
|
|
1974
|
+
else {
|
|
1975
|
+
console.log(`⚠️ No memory found with key: ${key}`);
|
|
1976
|
+
}
|
|
1977
|
+
process.exit(deleted ? 0 : 1);
|
|
1978
|
+
}
|
|
1979
|
+
catch (error) {
|
|
1980
|
+
console.error(`❌ Delete failed: ${error.message}`);
|
|
1981
|
+
process.exit(1);
|
|
1982
|
+
}
|
|
1983
|
+
});
|
|
1964
1984
|
// Clear command
|
|
1965
1985
|
program
|
|
1966
1986
|
.command('clear')
|
|
@@ -180,6 +180,24 @@ class HookCommands {
|
|
|
180
180
|
(0, shared_1.hookLog)('hook-dispatcher', `stdin read failed (continuing with empty payload): ${(0, shared_1.safeErrorMessage)(err)}`);
|
|
181
181
|
input = {};
|
|
182
182
|
}
|
|
183
|
+
// Deterministic project scoping. Resolve the project from the cwd the
|
|
184
|
+
// RUNTIME declares in the hook payload — NOT the cwd this subprocess
|
|
185
|
+
// happened to inherit. Both Claude Code and Kiro include `cwd`; for CC
|
|
186
|
+
// it equals process.cwd() so this is a no-op, but for Kiro it pins
|
|
187
|
+
// scoping to the session's working directory. Without this a memory
|
|
188
|
+
// captured while working on project A could land in project B (e.g. a
|
|
189
|
+
// `kiro --resume`d session whose cwd differs from the shell's), and
|
|
190
|
+
// capture (userPromptSubmit) and injection (agentSpawn) could even
|
|
191
|
+
// disagree. Project memories must scope to ONE deterministic project.
|
|
192
|
+
if (input && typeof input.cwd === 'string' && input.cwd.trim()) {
|
|
193
|
+
try {
|
|
194
|
+
const { ConfigService } = await Promise.resolve().then(() => __importStar(require('../../services/config')));
|
|
195
|
+
ConfigService.getInstance().updateConfig({ project: { rootDir: input.cwd } });
|
|
196
|
+
}
|
|
197
|
+
catch (err) {
|
|
198
|
+
(0, shared_1.hookLog)('hook-dispatcher', `cwd scoping failed (using inherited cwd): ${(0, shared_1.safeErrorMessage)(err)}`);
|
|
199
|
+
}
|
|
200
|
+
}
|
|
183
201
|
for (const name of names) {
|
|
184
202
|
try {
|
|
185
203
|
await HookCommands.runOne(name, input);
|
package/package.json
CHANGED