claude-memory-layer 2.2.6 → 2.2.8
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/README.md +4 -3
- package/dist/cli/index.js +23 -4
- package/dist/cli/index.js.map +2 -2
- package/dist/hooks/codex-session-start.js +307 -14
- package/dist/hooks/codex-session-start.js.map +4 -4
- package/dist/hooks/codex-user-prompt-submit.js +17667 -0
- package/dist/hooks/codex-user-prompt-submit.js.map +7 -0
- package/dist/hooks/session-start.js +306 -13
- package/dist/hooks/session-start.js.map +4 -4
- package/dist/hooks/user-prompt-submit.js +162 -24
- package/dist/hooks/user-prompt-submit.js.map +4 -4
- package/dist/mcp/index.js +17 -2
- package/dist/mcp/index.js.map +3 -3
- package/package.json +1 -1
package/dist/mcp/index.js
CHANGED
|
@@ -34383,8 +34383,11 @@ function eventBelongsToDifferentProject(event, projectPath) {
|
|
|
34383
34383
|
if (!projectPath) return false;
|
|
34384
34384
|
const metadata = event.metadata || {};
|
|
34385
34385
|
const metadataProjectRefs = metadataProjectReferenceValues(metadata);
|
|
34386
|
-
|
|
34387
|
-
|
|
34386
|
+
const metadataProjectHash2 = metadataProjectHashValue(metadata);
|
|
34387
|
+
if (metadataProjectRefs.length > 0 || metadataProjectHash2) {
|
|
34388
|
+
const pathMatches = metadataProjectRefs.some((value) => projectReferenceMatches(value, projectPath));
|
|
34389
|
+
const hashMatches = metadataProjectHash2 === hashProjectPath(projectPath);
|
|
34390
|
+
return !pathMatches && !hashMatches;
|
|
34388
34391
|
}
|
|
34389
34392
|
if (isUnscopedImportedHistory(metadata)) return true;
|
|
34390
34393
|
return mentionsDifferentWorkspaceProject(event.content || "", projectPath);
|
|
@@ -34404,6 +34407,14 @@ var PROJECT_METADATA_KEYS = /* @__PURE__ */ new Set([
|
|
|
34404
34407
|
"repoPath",
|
|
34405
34408
|
"repositoryPath"
|
|
34406
34409
|
]);
|
|
34410
|
+
function metadataProjectScope(metadata) {
|
|
34411
|
+
if (!isPlainRecord(metadata.scope)) return void 0;
|
|
34412
|
+
return isPlainRecord(metadata.scope.project) ? metadata.scope.project : void 0;
|
|
34413
|
+
}
|
|
34414
|
+
function metadataProjectHashValue(metadata) {
|
|
34415
|
+
const value = metadataProjectScope(metadata)?.hash;
|
|
34416
|
+
return typeof value === "string" && value.trim().length > 0 ? value.trim().toLowerCase() : void 0;
|
|
34417
|
+
}
|
|
34407
34418
|
function metadataProjectReferenceValues(metadata) {
|
|
34408
34419
|
const values = [];
|
|
34409
34420
|
for (const [key, value] of Object.entries(metadata)) {
|
|
@@ -34412,6 +34423,10 @@ function metadataProjectReferenceValues(metadata) {
|
|
|
34412
34423
|
values.push(value.trim());
|
|
34413
34424
|
}
|
|
34414
34425
|
}
|
|
34426
|
+
const scopedPath = metadataProjectScope(metadata)?.path;
|
|
34427
|
+
if (typeof scopedPath === "string" && scopedPath.trim().length > 0) {
|
|
34428
|
+
values.push(scopedPath.trim());
|
|
34429
|
+
}
|
|
34415
34430
|
return values;
|
|
34416
34431
|
}
|
|
34417
34432
|
function projectReferenceMatches(reference, projectPath) {
|