claude-memory-layer 1.0.14 → 1.0.16
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/.npm-cache/_cacache/content-v2/sha512/04/76/c098f88dfe584a2b80870bff7421b05d17d3d9ee1027f77772332a22d3f93a9a57101a2855107f6ad82077a818bba912b2bc317f2361b5ddb09ad284d9ce +0 -0
- package/.npm-cache/_cacache/content-v2/sha512/60/25/d2ecd39cfc7cab58351162814be77f935c6d6491c10c3745d456da7ddb2117ffd90c10e53fe3c0f1ed16b403307841543634504398b16ee4e6b6dd8e0c45 +0 -0
- package/.npm-cache/_cacache/index-v5/2b/9a/7f8f40206ed8a2e0a84efaa953ccaed1f5d001e14b931083f2e7a0738007 +2 -0
- package/.npm-cache/_cacache/index-v5/2e/d9/fcfa5c6a6abdc2a3644ab84a95936047298c465a2f47ee03db8f7fe1e946 +3 -0
- package/.npm-cache/_cacache/index-v5/a9/42/e519633356d12d3d2f19da66a8301016d496c8f5c3e0554124aaa62dc043 +2 -0
- package/.npm-cache/_logs/2026-02-26T12_04_52_729Z-debug-0.log +256 -0
- package/.npm-cache/_logs/2026-02-26T12_05_36_835Z-debug-0.log +18 -0
- package/.npm-cache/_logs/2026-02-26T12_05_45_982Z-debug-0.log +32 -0
- package/.npm-cache/_logs/2026-02-26T12_05_48_515Z-debug-0.log +260 -0
- package/.npm-cache/_logs/2026-02-26T12_05_53_567Z-debug-0.log +69 -0
- package/.npm-cache/_update-notifier-last-checked +0 -0
- package/README.md +3 -0
- package/claude-memory-layer-1.0.14.tgz +0 -0
- package/dist/cli/index.js +63 -48
- package/dist/cli/index.js.map +2 -2
- package/dist/core/index.js +53 -40
- package/dist/core/index.js.map +2 -2
- package/dist/hooks/post-tool-use.js +53 -40
- package/dist/hooks/post-tool-use.js.map +2 -2
- package/dist/hooks/session-end.js +53 -40
- package/dist/hooks/session-end.js.map +2 -2
- package/dist/hooks/session-start.js +53 -40
- package/dist/hooks/session-start.js.map +2 -2
- package/dist/hooks/stop.js +53 -40
- package/dist/hooks/stop.js.map +2 -2
- package/dist/hooks/user-prompt-submit.js +72 -43
- package/dist/hooks/user-prompt-submit.js.map +2 -2
- package/dist/server/api/index.js +53 -40
- package/dist/server/api/index.js.map +2 -2
- package/dist/server/index.js +53 -40
- package/dist/server/index.js.map +2 -2
- package/dist/services/memory-service.js +53 -40
- package/dist/services/memory-service.js.map +2 -2
- package/memory/_index.md +2 -0
- package/memory/tool_observation/uncategorized/2026-02-26.md +201 -0
- package/memory/user_prompt/uncategorized/2026-02-26.md +10 -0
- package/package.json +1 -1
- package/src/core/sqlite-event-store.ts +52 -40
- package/src/hooks/user-prompt-submit.ts +22 -3
- package/src/services/session-history-importer.ts +15 -7
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
0 verbose cli /home/walter/.nvm/versions/node/v20.18.3/bin/node /home/walter/.nvm/versions/node/v20.18.3/bin/npm
|
|
2
|
+
1 info using npm@10.8.2
|
|
3
|
+
2 info using node@v20.18.3
|
|
4
|
+
3 silly config load:file:/home/walter/.nvm/versions/node/v20.18.3/lib/node_modules/npm/npmrc
|
|
5
|
+
4 silly config load:file:/home/walter/.npmrc
|
|
6
|
+
5 silly config load:file:/tmp/tmp.NQjGxz5gur/prefix/etc/npmrc
|
|
7
|
+
6 verbose title npm install ./claude-memory-layer-1.0.14.tgz
|
|
8
|
+
7 verbose argv "install" "--global" "./claude-memory-layer-1.0.14.tgz" "--prefix" "/tmp/tmp.NQjGxz5gur/prefix"
|
|
9
|
+
8 verbose logfile logs-max:10 dir:/home/walter/workspace/opensource/claude-memory-layer/.npm-cache/_logs/2026-02-26T12_05_53_567Z-
|
|
10
|
+
9 verbose logfile /home/walter/workspace/opensource/claude-memory-layer/.npm-cache/_logs/2026-02-26T12_05_53_567Z-debug-0.log
|
|
11
|
+
10 silly packumentCache heap:4345298944 maxSize:1086324736 maxEntrySize:543162368
|
|
12
|
+
11 silly logfile done cleaning log files
|
|
13
|
+
12 silly idealTree buildDeps
|
|
14
|
+
13 silly fetch manifest claude-memory-layer@file:../../../../home/walter/workspace/opensource/claude-memory-layer/claude-memory-layer-1.0.14.tgz
|
|
15
|
+
14 silly placeDep ROOT claude-memory-layer@1.0.14 OK for: want: file:../../../../home/walter/workspace/opensource/claude-memory-layer/claude-memory-layer-1.0.14.tgz
|
|
16
|
+
15 silly fetch manifest @hono/node-server@^1.13.0
|
|
17
|
+
16 silly packumentCache full:https://registry.npmjs.org/@hono%2fnode-server cache-miss
|
|
18
|
+
17 silly fetch manifest @lancedb/lancedb@^0.5.0
|
|
19
|
+
18 silly packumentCache full:https://registry.npmjs.org/@lancedb%2flancedb cache-miss
|
|
20
|
+
19 silly fetch manifest @xenova/transformers@^2.17.0
|
|
21
|
+
20 silly packumentCache full:https://registry.npmjs.org/@xenova%2ftransformers cache-miss
|
|
22
|
+
21 silly fetch manifest better-sqlite3@^12.6.2
|
|
23
|
+
22 silly packumentCache full:https://registry.npmjs.org/better-sqlite3 cache-miss
|
|
24
|
+
23 silly fetch manifest commander@^12.0.0
|
|
25
|
+
24 silly packumentCache full:https://registry.npmjs.org/commander cache-miss
|
|
26
|
+
25 silly fetch manifest duckdb@^0.10.0
|
|
27
|
+
26 silly packumentCache full:https://registry.npmjs.org/duckdb cache-miss
|
|
28
|
+
27 silly fetch manifest hono@^4.0.0
|
|
29
|
+
28 silly packumentCache full:https://registry.npmjs.org/hono cache-miss
|
|
30
|
+
29 silly fetch manifest mongodb@^6.14.0
|
|
31
|
+
30 silly packumentCache full:https://registry.npmjs.org/mongodb cache-miss
|
|
32
|
+
31 silly fetch manifest zod@^3.22.0
|
|
33
|
+
32 silly packumentCache full:https://registry.npmjs.org/zod cache-miss
|
|
34
|
+
33 http fetch GET https://registry.npmjs.org/@hono%2fnode-server attempt 1 failed with EAI_AGAIN
|
|
35
|
+
34 http fetch GET https://registry.npmjs.org/@lancedb%2flancedb attempt 1 failed with EAI_AGAIN
|
|
36
|
+
35 http fetch GET https://registry.npmjs.org/@xenova%2ftransformers attempt 1 failed with EAI_AGAIN
|
|
37
|
+
36 http fetch GET https://registry.npmjs.org/better-sqlite3 attempt 1 failed with EAI_AGAIN
|
|
38
|
+
37 http fetch GET https://registry.npmjs.org/commander attempt 1 failed with EAI_AGAIN
|
|
39
|
+
38 http fetch GET https://registry.npmjs.org/duckdb attempt 1 failed with EAI_AGAIN
|
|
40
|
+
39 http fetch GET https://registry.npmjs.org/hono attempt 1 failed with EAI_AGAIN
|
|
41
|
+
40 http fetch GET https://registry.npmjs.org/mongodb attempt 1 failed with EAI_AGAIN
|
|
42
|
+
41 http fetch GET https://registry.npmjs.org/zod attempt 1 failed with EAI_AGAIN
|
|
43
|
+
42 http fetch GET https://registry.npmjs.org/@hono%2fnode-server attempt 2 failed with EAI_AGAIN
|
|
44
|
+
43 http fetch GET https://registry.npmjs.org/@lancedb%2flancedb attempt 2 failed with EAI_AGAIN
|
|
45
|
+
44 http fetch GET https://registry.npmjs.org/@xenova%2ftransformers attempt 2 failed with EAI_AGAIN
|
|
46
|
+
45 http fetch GET https://registry.npmjs.org/better-sqlite3 attempt 2 failed with EAI_AGAIN
|
|
47
|
+
46 http fetch GET https://registry.npmjs.org/commander attempt 2 failed with EAI_AGAIN
|
|
48
|
+
47 http fetch GET https://registry.npmjs.org/duckdb attempt 2 failed with EAI_AGAIN
|
|
49
|
+
48 http fetch GET https://registry.npmjs.org/hono attempt 2 failed with EAI_AGAIN
|
|
50
|
+
49 http fetch GET https://registry.npmjs.org/mongodb attempt 2 failed with EAI_AGAIN
|
|
51
|
+
50 http fetch GET https://registry.npmjs.org/zod attempt 2 failed with EAI_AGAIN
|
|
52
|
+
51 http fetch GET https://registry.npmjs.org/@hono%2fnode-server attempt 3 failed with EAI_AGAIN
|
|
53
|
+
52 http fetch GET https://registry.npmjs.org/@lancedb%2flancedb attempt 3 failed with EAI_AGAIN
|
|
54
|
+
53 http fetch GET https://registry.npmjs.org/@xenova%2ftransformers attempt 3 failed with EAI_AGAIN
|
|
55
|
+
54 http fetch GET https://registry.npmjs.org/better-sqlite3 attempt 3 failed with EAI_AGAIN
|
|
56
|
+
55 http fetch GET https://registry.npmjs.org/commander attempt 3 failed with EAI_AGAIN
|
|
57
|
+
56 http fetch GET https://registry.npmjs.org/duckdb attempt 3 failed with EAI_AGAIN
|
|
58
|
+
57 http fetch GET https://registry.npmjs.org/hono attempt 3 failed with EAI_AGAIN
|
|
59
|
+
58 http fetch GET https://registry.npmjs.org/mongodb attempt 3 failed with EAI_AGAIN
|
|
60
|
+
59 http fetch GET https://registry.npmjs.org/zod attempt 3 failed with EAI_AGAIN
|
|
61
|
+
60 silly fetch manifest @hono/node-server@^1.13.0
|
|
62
|
+
61 silly packumentCache full:https://registry.npmjs.org/@hono%2fnode-server cache-miss
|
|
63
|
+
62 http fetch GET https://registry.npmjs.org/@hono%2fnode-server attempt 1 failed with EAI_AGAIN
|
|
64
|
+
63 http fetch GET https://registry.npmjs.org/@hono%2fnode-server attempt 2 failed with EAI_AGAIN
|
|
65
|
+
64 http fetch GET https://registry.npmjs.org/@hono%2fnode-server attempt 3 failed with EAI_AGAIN
|
|
66
|
+
65 silly fetch manifest @lancedb/lancedb@^0.5.0
|
|
67
|
+
66 silly packumentCache full:https://registry.npmjs.org/@lancedb%2flancedb cache-miss
|
|
68
|
+
67 http fetch GET https://registry.npmjs.org/@lancedb%2flancedb attempt 1 failed with EAI_AGAIN
|
|
69
|
+
68 http fetch GET https://registry.npmjs.org/@lancedb%2flancedb attempt 2 failed with EAI_AGAIN
|
|
File without changes
|
package/README.md
CHANGED
|
@@ -71,6 +71,9 @@ npx claude-memory-layer search "배포 이슈"
|
|
|
71
71
|
- `GET /health` (서버 헬스)
|
|
72
72
|
- `GET /api/health` (outbox pending/failed 포함 상세 헬스)
|
|
73
73
|
- `GET /api/stats/retrieval-traces` (검색→컨텍스트 채택 추적)
|
|
74
|
+
- 주입 임계값 튜닝(환경변수):
|
|
75
|
+
- `CLAUDE_MEMORY_MIN_SCORE` (기본 0.4)
|
|
76
|
+
- `CLAUDE_MEMORY_FALLBACK_MIN_SCORE` (기본 0.3, 결과 0건일 때 재시도)
|
|
74
77
|
|
|
75
78
|
---
|
|
76
79
|
|
|
Binary file
|
package/dist/cli/index.js
CHANGED
|
@@ -2046,49 +2046,62 @@ var SQLiteEventStore = class {
|
|
|
2046
2046
|
}
|
|
2047
2047
|
async getRecentRetrievalTraces(limit = 50) {
|
|
2048
2048
|
await this.initialize();
|
|
2049
|
-
|
|
2050
|
-
|
|
2051
|
-
|
|
2052
|
-
|
|
2053
|
-
|
|
2054
|
-
|
|
2055
|
-
|
|
2056
|
-
|
|
2057
|
-
|
|
2058
|
-
|
|
2059
|
-
|
|
2060
|
-
|
|
2061
|
-
|
|
2062
|
-
|
|
2063
|
-
|
|
2064
|
-
|
|
2065
|
-
|
|
2066
|
-
|
|
2067
|
-
|
|
2068
|
-
|
|
2069
|
-
|
|
2049
|
+
try {
|
|
2050
|
+
const rows = sqliteAll(
|
|
2051
|
+
this.db,
|
|
2052
|
+
`SELECT * FROM retrieval_traces ORDER BY created_at DESC LIMIT ?`,
|
|
2053
|
+
[limit]
|
|
2054
|
+
);
|
|
2055
|
+
return rows.map((row) => ({
|
|
2056
|
+
traceId: row.trace_id,
|
|
2057
|
+
sessionId: row.session_id || void 0,
|
|
2058
|
+
projectHash: row.project_hash || void 0,
|
|
2059
|
+
queryText: row.query_text,
|
|
2060
|
+
strategy: row.strategy || void 0,
|
|
2061
|
+
candidateEventIds: row.candidate_event_ids ? JSON.parse(row.candidate_event_ids) : [],
|
|
2062
|
+
selectedEventIds: row.selected_event_ids ? JSON.parse(row.selected_event_ids) : [],
|
|
2063
|
+
candidateDetails: row.candidate_details_json ? JSON.parse(row.candidate_details_json) : [],
|
|
2064
|
+
selectedDetails: row.selected_details_json ? JSON.parse(row.selected_details_json) : [],
|
|
2065
|
+
candidateCount: Number(row.candidate_count || 0),
|
|
2066
|
+
selectedCount: Number(row.selected_count || 0),
|
|
2067
|
+
confidence: row.confidence || void 0,
|
|
2068
|
+
fallbackTrace: row.fallback_trace ? JSON.parse(row.fallback_trace) : [],
|
|
2069
|
+
createdAt: toDateFromSQLite(row.created_at)
|
|
2070
|
+
}));
|
|
2071
|
+
} catch (err) {
|
|
2072
|
+
if (err?.message?.includes("no such table"))
|
|
2073
|
+
return [];
|
|
2074
|
+
throw err;
|
|
2075
|
+
}
|
|
2070
2076
|
}
|
|
2071
2077
|
async getRetrievalTraceStats() {
|
|
2072
2078
|
await this.initialize();
|
|
2073
|
-
|
|
2074
|
-
|
|
2075
|
-
|
|
2076
|
-
|
|
2077
|
-
|
|
2078
|
-
|
|
2079
|
-
|
|
2080
|
-
|
|
2081
|
-
|
|
2082
|
-
|
|
2083
|
-
|
|
2084
|
-
|
|
2085
|
-
|
|
2086
|
-
|
|
2087
|
-
|
|
2088
|
-
|
|
2089
|
-
|
|
2090
|
-
|
|
2091
|
-
|
|
2079
|
+
try {
|
|
2080
|
+
const row = sqliteGet(
|
|
2081
|
+
this.db,
|
|
2082
|
+
`SELECT
|
|
2083
|
+
COUNT(*) as total_queries,
|
|
2084
|
+
AVG(candidate_count) as avg_candidate_count,
|
|
2085
|
+
AVG(selected_count) as avg_selected_count,
|
|
2086
|
+
CASE
|
|
2087
|
+
WHEN SUM(candidate_count) > 0 THEN (SUM(selected_count) * 1.0 / SUM(candidate_count))
|
|
2088
|
+
ELSE 0
|
|
2089
|
+
END as selection_rate
|
|
2090
|
+
FROM retrieval_traces`,
|
|
2091
|
+
[]
|
|
2092
|
+
);
|
|
2093
|
+
return {
|
|
2094
|
+
totalQueries: Number(row?.total_queries || 0),
|
|
2095
|
+
avgCandidateCount: Number(row?.avg_candidate_count || 0),
|
|
2096
|
+
avgSelectedCount: Number(row?.avg_selected_count || 0),
|
|
2097
|
+
selectionRate: Number(row?.selection_rate || 0)
|
|
2098
|
+
};
|
|
2099
|
+
} catch (err) {
|
|
2100
|
+
if (err?.message?.includes("no such table")) {
|
|
2101
|
+
return { totalQueries: 0, avgCandidateCount: 0, avgSelectedCount: 0, selectionRate: 0 };
|
|
2102
|
+
}
|
|
2103
|
+
throw err;
|
|
2104
|
+
}
|
|
2092
2105
|
}
|
|
2093
2106
|
/**
|
|
2094
2107
|
* Close database connection
|
|
@@ -7267,20 +7280,22 @@ var SessionHistoryImporter = class {
|
|
|
7267
7280
|
return [];
|
|
7268
7281
|
}
|
|
7269
7282
|
const projectDirs = fs5.readdirSync(projectsDir).map((name) => path4.join(projectsDir, name)).filter((p) => fs5.statSync(p).isDirectory());
|
|
7270
|
-
const normalizedPath = projectPath.replace(
|
|
7271
|
-
const
|
|
7272
|
-
const
|
|
7283
|
+
const normalizedPath = projectPath.replace(/\+/g, "/").replace(/\/$/, "");
|
|
7284
|
+
const normalizeToken = (value) => value.toLowerCase().replace(/[\s_]+/g, "-").replace(/\/+/g, "-").replace(/-+/g, "-").replace(/^-|-$/g, "");
|
|
7285
|
+
const normalizedDashed = normalizeToken(normalizedPath);
|
|
7286
|
+
const baseName = normalizeToken(path4.basename(normalizedPath));
|
|
7273
7287
|
const scored = projectDirs.map((dir) => {
|
|
7274
7288
|
const dirName = path4.basename(dir);
|
|
7289
|
+
const normalizedDirName = dirName.toLowerCase().replace(/[\s_]+/g, "-");
|
|
7275
7290
|
let score = 0;
|
|
7276
|
-
if (
|
|
7291
|
+
if (normalizedDirName.includes(normalizedDashed))
|
|
7277
7292
|
score += 100;
|
|
7278
|
-
if (normalizedDashed.includes(
|
|
7293
|
+
if (normalizedDashed.includes(normalizedDirName))
|
|
7279
7294
|
score += 80;
|
|
7280
|
-
if (baseName &&
|
|
7295
|
+
if (baseName && normalizedDirName.includes(baseName))
|
|
7281
7296
|
score += 30;
|
|
7282
7297
|
const pathTokens = normalizedDashed.split("-").filter(Boolean);
|
|
7283
|
-
const tokenHits = pathTokens.filter((t) => t.length >= 3 &&
|
|
7298
|
+
const tokenHits = pathTokens.filter((t) => t.length >= 3 && normalizedDirName.includes(t)).length;
|
|
7284
7299
|
score += Math.min(tokenHits, 20);
|
|
7285
7300
|
return { dir, score, dirName };
|
|
7286
7301
|
}).filter((x) => x.score > 0).sort((a, b) => b.score - a.score);
|
|
@@ -9239,7 +9254,7 @@ function getHooksConfig(pluginPath) {
|
|
|
9239
9254
|
};
|
|
9240
9255
|
}
|
|
9241
9256
|
var program = new Command();
|
|
9242
|
-
program.name("claude-memory-layer").description("Claude Code Memory Plugin CLI").version("1.0.
|
|
9257
|
+
program.name("claude-memory-layer").description("Claude Code Memory Plugin CLI").version("1.0.16");
|
|
9243
9258
|
program.command("install").description("Install hooks into Claude Code settings").option("--path <path>", "Custom plugin path (defaults to auto-detect)").action(async (options) => {
|
|
9244
9259
|
try {
|
|
9245
9260
|
const pluginPath = options.path || getPluginPath();
|