fix(memory-core): preserve dated DREAMS trail

This commit is contained in:
Vincent Koc
2026-04-05 23:32:13 +01:00
parent 3584d28141
commit b371af76a3
7 changed files with 178 additions and 27 deletions

View File

@@ -159,7 +159,11 @@ describe("listMemoryFiles", () => {
});
describe("isMemoryPath", () => {
it("allows explicit access to top-level dreams.md", () => {
it("allows explicit access to top-level DREAMS.md", () => {
expect(isMemoryPath("DREAMS.md")).toBe(true);
});
it("keeps explicit access compatible with legacy dreams.md", () => {
expect(isMemoryPath("dreams.md")).toBe(true);
});
});

View File

@@ -77,7 +77,12 @@ export function isMemoryPath(relPath: string): boolean {
if (!normalized) {
return false;
}
if (normalized === "MEMORY.md" || normalized === "memory.md" || normalized === "dreams.md") {
if (
normalized === "MEMORY.md" ||
normalized === "memory.md" ||
normalized === "DREAMS.md" ||
normalized === "dreams.md"
) {
return true;
}
return normalized.startsWith("memory/");