claude-mem-lite 2.26.0 → 2.26.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.
Files changed (57) hide show
  1. package/.claude-plugin/marketplace.json +1 -1
  2. package/.claude-plugin/plugin.json +1 -1
  3. package/.mcp.json +0 -0
  4. package/LICENSE +0 -0
  5. package/README.md +0 -0
  6. package/README.zh-CN.md +0 -0
  7. package/bash-utils.mjs +0 -0
  8. package/commands/mem.md +0 -0
  9. package/commands/memory.md +0 -0
  10. package/commands/recall.md +0 -0
  11. package/commands/recent.md +0 -0
  12. package/commands/search.md +0 -0
  13. package/commands/timeline.md +0 -0
  14. package/commands/tools.md +0 -0
  15. package/commands/update.md +0 -0
  16. package/format-utils.mjs +0 -0
  17. package/haiku-client.mjs +0 -0
  18. package/hash-utils.mjs +0 -0
  19. package/hook-context.mjs +0 -0
  20. package/hook-episode.mjs +0 -0
  21. package/hook-handoff.mjs +1 -2
  22. package/hook-llm.mjs +4 -4
  23. package/hook-memory.mjs +0 -0
  24. package/hook-semaphore.mjs +0 -0
  25. package/hook-shared.mjs +0 -0
  26. package/hook-update.mjs +0 -0
  27. package/hook.mjs +0 -0
  28. package/hooks/hooks.json +0 -0
  29. package/install-metadata.mjs +0 -0
  30. package/install.mjs +0 -0
  31. package/mem-cli.mjs +0 -0
  32. package/nlp.mjs +0 -0
  33. package/package.json +1 -1
  34. package/project-utils.mjs +0 -0
  35. package/registry/preinstalled.json +0 -0
  36. package/registry-indexer.mjs +0 -0
  37. package/registry-retriever.mjs +0 -0
  38. package/registry-scanner.mjs +0 -0
  39. package/registry.mjs +0 -0
  40. package/resource-discovery.mjs +0 -0
  41. package/schema.mjs +0 -0
  42. package/scoring-sql.mjs +0 -0
  43. package/scripts/launch.mjs +0 -0
  44. package/scripts/pre-tool-recall.js +0 -0
  45. package/scripts/prompt-search-utils.mjs +0 -0
  46. package/scripts/user-prompt-search.js +0 -0
  47. package/secret-scrub.mjs +0 -0
  48. package/server-internals.mjs +0 -0
  49. package/server.mjs +0 -0
  50. package/skill.md +0 -0
  51. package/skip-tools.mjs +0 -0
  52. package/stop-words.mjs +0 -0
  53. package/synonyms.mjs +0 -0
  54. package/tfidf.mjs +0 -0
  55. package/tier.mjs +0 -0
  56. package/tool-schemas.mjs +0 -0
  57. package/utils.mjs +3 -0
@@ -10,7 +10,7 @@
10
10
  "plugins": [
11
11
  {
12
12
  "name": "claude-mem-lite",
13
- "version": "2.26.0",
13
+ "version": "2.26.1",
14
14
  "source": "./",
15
15
  "description": "Lightweight persistent memory system for Claude Code — FTS5 search, episode batching, error-triggered recall"
16
16
  }
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "claude-mem-lite",
3
- "version": "2.26.0",
3
+ "version": "2.26.1",
4
4
  "description": "Lightweight persistent memory system for Claude Code — FTS5 search, episode batching, error-triggered recall",
5
5
  "author": {
6
6
  "name": "sdsrss"
package/.mcp.json CHANGED
File without changes
package/LICENSE CHANGED
File without changes
package/README.md CHANGED
File without changes
package/README.zh-CN.md CHANGED
File without changes
package/bash-utils.mjs CHANGED
File without changes
package/commands/mem.md CHANGED
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
package/commands/tools.md CHANGED
File without changes
File without changes
package/format-utils.mjs CHANGED
File without changes
package/haiku-client.mjs CHANGED
File without changes
package/hash-utils.mjs CHANGED
File without changes
package/hook-context.mjs CHANGED
File without changes
package/hook-episode.mjs CHANGED
File without changes
package/hook-handoff.mjs CHANGED
@@ -2,7 +2,7 @@
2
2
  // Extracted for testability — hook.mjs has module-level side effects
3
3
 
4
4
  import { basename } from 'path';
5
- import { truncate, extractMatchKeywords, tokenizeHandoff, isSpecificTerm } from './utils.mjs';
5
+ import { truncate, extractMatchKeywords, tokenizeHandoff, isSpecificTerm, LOW_SIGNAL_TITLE } from './utils.mjs';
6
6
  import {
7
7
  HANDOFF_EXPIRY_CLEAR, HANDOFF_EXPIRY_EXIT, HANDOFF_MATCH_THRESHOLD, CONTINUE_KEYWORDS,
8
8
  } from './hook-shared.mjs';
@@ -78,7 +78,6 @@ export function buildAndSaveHandoff(db, sessionId, project, type, episodeSnapsho
78
78
  }
79
79
 
80
80
  // 5. Key decisions — high importance observations (skip low-signal degraded titles)
81
- const LOW_SIGNAL_TITLE = /^(Error (while working|in)|Modified |Worked on |Reviewed \d+ files:)/;
82
81
  const decisions = db.prepare(`
83
82
  SELECT title FROM observations
84
83
  WHERE memory_session_id = ? AND COALESCE(importance, 1) >= 2
package/hook-llm.mjs CHANGED
@@ -6,7 +6,7 @@ import { existsSync, readFileSync, unlinkSync, readdirSync } from 'fs';
6
6
  import {
7
7
  jaccardSimilarity, truncate, clampImportance, computeRuleImportance,
8
8
  inferProject, parseJsonFromLLM,
9
- computeMinHash, estimateJaccardFromMinHash, cjkBigrams, EDIT_TOOLS, debugCatch, debugLog, OBS_BM25,
9
+ computeMinHash, estimateJaccardFromMinHash, cjkBigrams, EDIT_TOOLS, LOW_SIGNAL_TITLE, debugCatch, debugLog, OBS_BM25,
10
10
  getCurrentBranch,
11
11
  } from './utils.mjs';
12
12
  import { acquireLLMSlot, releaseLLMSlot } from './hook-semaphore.mjs';
@@ -63,7 +63,7 @@ export function saveObservation(obs, projectOverride, sessionIdOverride, externa
63
63
  // "Error in X", "Modified X" titles are low-specificity → use longer dedup window
64
64
  // 7-day exact match prevents cross-day accumulation of "Modified package.json" noise;
65
65
  // 3-day Jaccard catches near-duplicates without blocking legitimately new observations
66
- const LOW_SIGNAL = /^(Error (while working|in)|Error: |Modified |Worked on |Reviewed \d+ files:|# |node |npm |npx |\(no description\)|\(error\)$)/;
66
+ const LOW_SIGNAL = LOW_SIGNAL_TITLE;
67
67
  if (obs.title && LOW_SIGNAL.test(obs.title)) {
68
68
  const sevenDaysAgo = now.getTime() - 7 * 86400000;
69
69
  const threeDaysAgo = now.getTime() - 3 * 86400000;
@@ -266,7 +266,7 @@ export function buildDegradedTitle(episode) {
266
266
  }
267
267
  // No files: strip raw output (JSON, arrays, long tails) from Bash descriptions
268
268
  const desc = episode.entries[0]?.desc || '(no description)';
269
- return desc.replace(/ → (?:ERROR: )?[\[{].*$/, hasError ? ' (error)' : '')
269
+ return desc.replace(/ → (?:ERROR: )?[[{].*$/, hasError ? ' (error)' : '')
270
270
  .replace(/ → .*---EXIT:\d+$/, hasError ? ' (error)' : '');
271
271
  }
272
272
 
@@ -301,7 +301,7 @@ export function buildImmediateObservation(episode) {
301
301
  const ruleImportance = computeRuleImportance(episode);
302
302
  // Low-signal degraded titles ("Error in...", "Modified...") should not inflate importance.
303
303
  // Cap at 1 unless rule-based signals indicate genuine importance (error-in-test → 3, config → 2).
304
- const LOW_SIGNAL = /^(Error (while working|in)|Error: |Modified |Worked on |Reviewed \d+ files:|# |node |npm |npx |\(no description\)|\(error\)$)/;
304
+ const LOW_SIGNAL = LOW_SIGNAL_TITLE;
305
305
  const isLowSignal = LOW_SIGNAL.test(title);
306
306
  let importance;
307
307
  if (isReviewPattern) {
package/hook-memory.mjs CHANGED
File without changes
File without changes
package/hook-shared.mjs CHANGED
File without changes
package/hook-update.mjs CHANGED
File without changes
package/hook.mjs CHANGED
File without changes
package/hooks/hooks.json CHANGED
File without changes
File without changes
package/install.mjs CHANGED
File without changes
package/mem-cli.mjs CHANGED
File without changes
package/nlp.mjs CHANGED
File without changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "claude-mem-lite",
3
- "version": "2.26.0",
3
+ "version": "2.26.1",
4
4
  "description": "Lightweight persistent memory system for Claude Code",
5
5
  "type": "module",
6
6
  "engines": {
package/project-utils.mjs CHANGED
File without changes
File without changes
File without changes
File without changes
File without changes
package/registry.mjs CHANGED
File without changes
File without changes
package/schema.mjs CHANGED
File without changes
package/scoring-sql.mjs CHANGED
File without changes
File without changes
File without changes
File without changes
File without changes
package/secret-scrub.mjs CHANGED
File without changes
File without changes
package/server.mjs CHANGED
File without changes
package/skill.md CHANGED
File without changes
package/skip-tools.mjs CHANGED
File without changes
package/stop-words.mjs CHANGED
File without changes
package/synonyms.mjs CHANGED
File without changes
package/tfidf.mjs CHANGED
File without changes
package/tier.mjs CHANGED
File without changes
package/tool-schemas.mjs CHANGED
File without changes
package/utils.mjs CHANGED
@@ -73,6 +73,9 @@ export function clampImportance(val) {
73
73
  // Tools that produce file edits (used for significance detection, feedback, importance)
74
74
  export const EDIT_TOOLS = new Set(['Edit', 'Write', 'NotebookEdit']);
75
75
 
76
+ // Low-signal degraded title patterns — shared by hook-llm.mjs (dedup + importance cap) and hook-handoff.mjs (decision filter)
77
+ export const LOW_SIGNAL_TITLE = /^(Error (while working|in)|Error: |Modified |Worked on |Reviewed \d+ files:|# |node |npm |npx |\(no description\)|\(error\)$)/;
78
+
76
79
  export function computeRuleImportance(episode) {
77
80
  let importance = 1;
78
81
  const toolTypes = new Set();