claude-memory-layer 1.0.13 → 1.0.15
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/claude-memory-layer-1.0.14.tgz +0 -0
- package/dist/cli/index.js +46 -20
- package/dist/cli/index.js.map +2 -2
- package/package.json +1 -1
- package/src/services/session-history-importer.ts +15 -7
package/package.json
CHANGED
|
@@ -426,24 +426,32 @@ export class SessionHistoryImporter {
|
|
|
426
426
|
.map(name => path.join(projectsDir, name))
|
|
427
427
|
.filter(p => fs.statSync(p).isDirectory());
|
|
428
428
|
|
|
429
|
-
const normalizedPath = projectPath.replace(
|
|
430
|
-
const
|
|
431
|
-
|
|
429
|
+
const normalizedPath = projectPath.replace(/\+/g, '/').replace(/\/$/, '');
|
|
430
|
+
const normalizeToken = (value: string) => value
|
|
431
|
+
.toLowerCase()
|
|
432
|
+
.replace(/[\s_]+/g, '-')
|
|
433
|
+
.replace(/\/+/g, '-')
|
|
434
|
+
.replace(/-+/g, '-')
|
|
435
|
+
.replace(/^-|-$/g, '');
|
|
436
|
+
|
|
437
|
+
const normalizedDashed = normalizeToken(normalizedPath);
|
|
438
|
+
const baseName = normalizeToken(path.basename(normalizedPath));
|
|
432
439
|
|
|
433
440
|
const scored = projectDirs.map((dir) => {
|
|
434
441
|
const dirName = path.basename(dir);
|
|
442
|
+
const normalizedDirName = dirName.toLowerCase().replace(/[\s_]+/g, '-');
|
|
435
443
|
let score = 0;
|
|
436
444
|
|
|
437
445
|
// strong matches
|
|
438
|
-
if (
|
|
439
|
-
if (normalizedDashed.includes(
|
|
446
|
+
if (normalizedDirName.includes(normalizedDashed)) score += 100;
|
|
447
|
+
if (normalizedDashed.includes(normalizedDirName)) score += 80;
|
|
440
448
|
|
|
441
449
|
// basename signal (handles wrappers adding extra suffix)
|
|
442
|
-
if (baseName &&
|
|
450
|
+
if (baseName && normalizedDirName.includes(baseName)) score += 30;
|
|
443
451
|
|
|
444
452
|
// token overlap signal
|
|
445
453
|
const pathTokens = normalizedDashed.split('-').filter(Boolean);
|
|
446
|
-
const tokenHits = pathTokens.filter(t => t.length >= 3 &&
|
|
454
|
+
const tokenHits = pathTokens.filter(t => t.length >= 3 && normalizedDirName.includes(t)).length;
|
|
447
455
|
score += Math.min(tokenHits, 20);
|
|
448
456
|
|
|
449
457
|
return { dir, score, dirName };
|