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.
- package/.claude-plugin/marketplace.json +1 -1
- package/.claude-plugin/plugin.json +1 -1
- package/.mcp.json +0 -0
- package/LICENSE +0 -0
- package/README.md +0 -0
- package/README.zh-CN.md +0 -0
- package/bash-utils.mjs +0 -0
- package/commands/mem.md +0 -0
- package/commands/memory.md +0 -0
- package/commands/recall.md +0 -0
- package/commands/recent.md +0 -0
- package/commands/search.md +0 -0
- package/commands/timeline.md +0 -0
- package/commands/tools.md +0 -0
- package/commands/update.md +0 -0
- package/format-utils.mjs +0 -0
- package/haiku-client.mjs +0 -0
- package/hash-utils.mjs +0 -0
- package/hook-context.mjs +0 -0
- package/hook-episode.mjs +0 -0
- package/hook-handoff.mjs +1 -2
- package/hook-llm.mjs +4 -4
- package/hook-memory.mjs +0 -0
- package/hook-semaphore.mjs +0 -0
- package/hook-shared.mjs +0 -0
- package/hook-update.mjs +0 -0
- package/hook.mjs +0 -0
- package/hooks/hooks.json +0 -0
- package/install-metadata.mjs +0 -0
- package/install.mjs +0 -0
- package/mem-cli.mjs +0 -0
- package/nlp.mjs +0 -0
- package/package.json +1 -1
- package/project-utils.mjs +0 -0
- package/registry/preinstalled.json +0 -0
- package/registry-indexer.mjs +0 -0
- package/registry-retriever.mjs +0 -0
- package/registry-scanner.mjs +0 -0
- package/registry.mjs +0 -0
- package/resource-discovery.mjs +0 -0
- package/schema.mjs +0 -0
- package/scoring-sql.mjs +0 -0
- package/scripts/launch.mjs +0 -0
- package/scripts/pre-tool-recall.js +0 -0
- package/scripts/prompt-search-utils.mjs +0 -0
- package/scripts/user-prompt-search.js +0 -0
- package/secret-scrub.mjs +0 -0
- package/server-internals.mjs +0 -0
- package/server.mjs +0 -0
- package/skill.md +0 -0
- package/skip-tools.mjs +0 -0
- package/stop-words.mjs +0 -0
- package/synonyms.mjs +0 -0
- package/tfidf.mjs +0 -0
- package/tier.mjs +0 -0
- package/tool-schemas.mjs +0 -0
- package/utils.mjs +3 -0
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
|
package/commands/memory.md
CHANGED
|
File without changes
|
package/commands/recall.md
CHANGED
|
File without changes
|
package/commands/recent.md
CHANGED
|
File without changes
|
package/commands/search.md
CHANGED
|
File without changes
|
package/commands/timeline.md
CHANGED
|
File without changes
|
package/commands/tools.md
CHANGED
|
File without changes
|
package/commands/update.md
CHANGED
|
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 =
|
|
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: )?[
|
|
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 =
|
|
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
|
package/hook-semaphore.mjs
CHANGED
|
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
|
package/install-metadata.mjs
CHANGED
|
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
package/project-utils.mjs
CHANGED
|
File without changes
|
|
File without changes
|
package/registry-indexer.mjs
CHANGED
|
File without changes
|
package/registry-retriever.mjs
CHANGED
|
File without changes
|
package/registry-scanner.mjs
CHANGED
|
File without changes
|
package/registry.mjs
CHANGED
|
File without changes
|
package/resource-discovery.mjs
CHANGED
|
File without changes
|
package/schema.mjs
CHANGED
|
File without changes
|
package/scoring-sql.mjs
CHANGED
|
File without changes
|
package/scripts/launch.mjs
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
package/secret-scrub.mjs
CHANGED
|
File without changes
|
package/server-internals.mjs
CHANGED
|
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();
|