claude-recall 0.20.1 → 0.20.3

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.
@@ -8,10 +8,14 @@ source: claude-recall
8
8
 
9
9
  # Corrections
10
10
 
11
- Auto-generated from 6 memories. Last updated: 2026-04-02.
11
+ Auto-generated from 10 memories. Last updated: 2026-04-02.
12
12
 
13
13
  ## Rules
14
14
 
15
+ - CORRECTION: Memory with complex metadata
16
+ - CORRECTION: Memory with complex metadata
17
+ - CORRECTION: Memory with complex metadata
18
+ - CORRECTION: Memory with complex metadata
15
19
  - CORRECTION: Memory with complex metadata
16
20
  - CORRECTION: Memory with complex metadata
17
21
  - CORRECTION: Memory with complex metadata
@@ -1,9 +1,13 @@
1
1
  {
2
2
  "topicId": "corrections",
3
- "sourceHash": "b1b937b59846b125f1209888415c3c3ba1eb668bee822d20b08fd6a70783510f",
4
- "memoryCount": 6,
5
- "generatedAt": "2026-04-02T20:13:01.816Z",
3
+ "sourceHash": "07b8f6a7f77482f9cf1dc02ae46a52bf39ce1920188d0142c2391dca2790f7c9",
4
+ "memoryCount": 10,
5
+ "generatedAt": "2026-04-02T22:40:39.113Z",
6
6
  "memoryKeys": [
7
+ "memory_1775169639101_rmxkftqtk",
8
+ "memory_1775169273281_4fod7ku6f",
9
+ "memory_1775169256118_y7kc07y6y",
10
+ "memory_1775169244673_d6d0uc33a",
7
11
  "memory_1775160781806_vnqf355e9",
8
12
  "memory_1775159399542_awfryrxp3",
9
13
  "memory_1775157082825_8uvrul28i",
@@ -8,10 +8,32 @@ source: claude-recall
8
8
 
9
9
  # Preferences
10
10
 
11
- Auto-generated from 22 memories. Last updated: 2026-04-02.
11
+ Auto-generated from 44 memories. Last updated: 2026-04-02.
12
12
 
13
13
  ## Rules
14
14
 
15
+ - Session test preference 1775169639212
16
+ - Test preference 1775169639121-2
17
+ - Test preference 1775169639121-1
18
+ - Test preference 1775169639121-0
19
+ - Test memory content
20
+ - Session test preference 1775169273366
21
+ - Test preference 1775169273296-2
22
+ - Test preference 1775169273296-1
23
+ - Test preference 1775169273296-0
24
+ - Test memory content
25
+ - Session test preference 1775169256189
26
+ - Test preference 1775169256133-2
27
+ - Test preference 1775169256133-1
28
+ - Test preference 1775169256133-0
29
+ - Test memory content
30
+ - Session test preference 1775169244752
31
+ - Test preference 1775169244686-2
32
+ - Test preference 1775169244686-1
33
+ - Test preference 1775169244686-0
34
+ - Test memory content
35
+ - Markdown documentation files should be named with the convention YYYYMMDD_<filename>.md (e.g., 20260402_nemoclaw_integration.md). Use underscores, not hyphens, in the date-prefixed filenames.
36
+ - Never commit to git unless the user explicitly approves. Always show the commit message and wait for a clear "yes", "go ahead", "commit", or similar confirmation before running git commit.
15
37
  - Session test preference 1775160781884
16
38
  - Test preference 1775160781820-2
17
39
  - Test preference 1775160781820-1
@@ -1,9 +1,31 @@
1
1
  {
2
2
  "topicId": "preferences",
3
- "sourceHash": "d26df6886905013086073ba0031b5e052ec17ae91863e95938269e72d1d5a556",
4
- "memoryCount": 22,
5
- "generatedAt": "2026-04-02T20:13:01.897Z",
3
+ "sourceHash": "635f364634c1a9d7b4f550114bcc69d1b222abef09952268bb356f4499d336e7",
4
+ "memoryCount": 44,
5
+ "generatedAt": "2026-04-02T22:40:39.234Z",
6
6
  "memoryKeys": [
7
+ "memory_1775169639213_w3i85h357",
8
+ "memory_1775169639170_iewh2evi0",
9
+ "memory_1775169639145_x9s0519l7",
10
+ "memory_1775169639123_fa53agp0a",
11
+ "memory_1775169639037_f290kffwd",
12
+ "memory_1775169273368_c1e5jdl9r",
13
+ "memory_1775169273337_wozxe12k3",
14
+ "memory_1775169273319_3o1ww90na",
15
+ "memory_1775169273297_oqmyxziav",
16
+ "memory_1775169273232_eoymf3ezj",
17
+ "memory_1775169256190_681x8frvt",
18
+ "memory_1775169256164_kqderurux",
19
+ "memory_1775169256150_0nqbk7tx9",
20
+ "memory_1775169256134_ftj0m44bb",
21
+ "memory_1775169256069_dywd646f7",
22
+ "memory_1775169244754_sjfarlk41",
23
+ "memory_1775169244722_mavida9fg",
24
+ "memory_1775169244707_nmmu0s0lu",
25
+ "memory_1775169244688_03q4mmcky",
26
+ "memory_1775169244628_7kuhf5met",
27
+ "memory_1775168901303_o8o0i4952",
28
+ "memory_1775162828137_l6uw5swdn",
7
29
  "memory_1775160781885_fkbnc0s85",
8
30
  "memory_1775160781857_gj5y299dr",
9
31
  "memory_1775160781842_0xmv146n5",
@@ -467,9 +467,8 @@ class MemoryTools {
467
467
  }
468
468
  }
469
469
  exports.MemoryTools = MemoryTools;
470
- MemoryTools.LOAD_RULES_DIRECTIVE = 'INSTRUCTION: Before your FIRST Write, Edit, or Bash action, you MUST output an\n' +
471
- '"Applying memories:" section listing which rules below apply to the current task.\n' +
472
- 'If none apply, say so. Do NOT skip this step — the user expects visible confirmation\n' +
473
- 'that you checked your memories before acting.\n' +
474
- 'As you work, cite each applied rule inline: (applied from memory: <rule summary>)\n' +
470
+ MemoryTools.LOAD_RULES_DIRECTIVE = 'Before your FIRST action, briefly state which rules below you will apply to this task.\n' +
471
+ 'As you work, cite each rule at the point where it influences your action:\n' +
472
+ '(applied from memory: <short rule name>)\n' +
473
+ 'Place citations next to the action they influenced — not at the end of unrelated text.\n' +
475
474
  'If a rule conflicts with your plan, follow the rule — it reflects a user decision.';
@@ -14,11 +14,27 @@ const config_1 = require("../services/config");
14
14
  const outcome_storage_1 = require("../services/outcome-storage");
15
15
  const logging_1 = require("../services/logging");
16
16
  const event_processors_1 = require("../shared/event-processors");
17
- const LOAD_RULES_DIRECTIVE = 'INSTRUCTION: Before your FIRST edit or bash action, you MUST output an\n' +
18
- '"Applying memories:" section listing which rules below apply to the current task.\n' +
19
- 'If none apply, say so. Do NOT skip this step.\n' +
20
- 'As you work, cite each applied rule inline: (applied from memory: <rule summary>)\n' +
17
+ const LOAD_RULES_DIRECTIVE = 'Before your FIRST action, briefly state which rules below you will apply to this task.\n' +
18
+ 'As you work, cite each rule at the point where it influences your action:\n' +
19
+ '(applied from memory: <short rule name>)\n' +
20
+ 'Place citations next to the action they influenced not at the end of unrelated text.\n' +
21
21
  'If a rule conflicts with your plan, follow the rule — it reflects a user decision.';
22
+ function truncateStr(s, max) {
23
+ return s.length <= max ? s : s.substring(0, max - 3) + '...';
24
+ }
25
+ /** Check if tool output indicates a failure (mirrors event-processors logic). */
26
+ function isFailureOutput(toolName, output) {
27
+ if (toolName === 'bash' || toolName === 'Bash') {
28
+ return /Exit code (\d+)/.test(output) && !/Exit code 0/.test(output);
29
+ }
30
+ if (['edit', 'write', 'Edit', 'Write'].includes(toolName)) {
31
+ return /permission denied|EACCES|ENOENT|file not found|old_string.*not found|not unique in the file/i.test(output);
32
+ }
33
+ if (output.length < 500) {
34
+ return /error|failed|exception|timeout/i.test(output);
35
+ }
36
+ return false;
37
+ }
22
38
  /** Format a memory value for display. */
23
39
  function extractVal(value) {
24
40
  if (typeof value === 'string')
@@ -90,12 +106,23 @@ function default_1(pi) {
90
106
  }
91
107
  });
92
108
  // --- Event: capture tool outcomes ---
93
- pi.on('tool_result', (event, _ctx) => {
109
+ pi.on('tool_result', (event, ctx) => {
94
110
  const output = event.content
95
111
  .filter((c) => c.type === 'text')
96
112
  .map(c => c.text)
97
113
  .join('\n');
114
+ // Notify user when a failure is captured
115
+ const wasFailing = event.isError || isFailureOutput(event.toolName, output);
98
116
  (0, event_processors_1.processToolOutcome)(event.toolName, event.input, output, event.isError, sessionId);
117
+ if (wasFailing && ctx.hasUI) {
118
+ const label = event.input?.command
119
+ ? truncateStr(event.input.command, 40)
120
+ : event.toolName;
121
+ try {
122
+ ctx.ui.notify(`Recall: failure stored — ${label}`, 'info');
123
+ }
124
+ catch { /* non-critical */ }
125
+ }
99
126
  });
100
127
  // --- Event: detect corrections from user input ---
101
128
  pi.on('input', (event, _ctx) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "claude-recall",
3
- "version": "0.20.1",
3
+ "version": "0.20.3",
4
4
  "description": "Persistent memory for Claude Code and Pi with native Skills integration, automatic capture, failure learning, and project scoping",
5
5
  "main": "dist/index.js",
6
6
  "bin": {