fix(FN-2078): adopt canonical .fusion/memory paths
- Update core and engine prompt text to reference .fusion/memory/ with MEMORY.md and daily-note guidance - Allow worktree tool boundary access to .fusion/memory/ files while preserving legacy .fusion/memory.md compatibility - Revise memory compaction/insight extraction messaging and related type/docs comments to use canonical memory paths - Refresh dashboard and test expectations across core/engine/dashboard/docs for the new memory path wording
This commit is contained in:
@@ -559,7 +559,7 @@ async function assertValidWorktreeSession(cwd: string, projectRoot: string): Pro
|
||||
* Check if a path is allowed to be accessed from a worktree session.
|
||||
* Rules:
|
||||
* - Paths inside the worktree are always allowed
|
||||
* - Project root .fusion/memory.md is allowed (for durable project learnings)
|
||||
* - Project root .fusion/memory/ directory is allowed (MEMORY.md, YYYY-MM-DD.md, DREAMS.md)
|
||||
* - Task attachments under .fusion/tasks/N/attachments/ are allowed (for reading context files)
|
||||
* - All other paths outside the worktree are rejected
|
||||
*
|
||||
@@ -580,9 +580,9 @@ function isWorktreeAllowedPath(worktreePath: string, projectRoot: string, reques
|
||||
return true; // Path is inside the worktree
|
||||
}
|
||||
|
||||
// Exception: project root `.fusion/memory.md` for durable project learnings
|
||||
// Exception: project root `.fusion/memory/` directory for durable project learnings
|
||||
const relToProjectRoot = relative(projectRootResolved, requestedResolved);
|
||||
if (relToProjectRoot === ".fusion/memory.md") {
|
||||
if (relToProjectRoot === ".fusion/memory.md" || relToProjectRoot.startsWith(".fusion/memory/")) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -640,7 +640,7 @@ export function wrapToolsWithBoundary(
|
||||
ok: false,
|
||||
error: `Path "${relToProject}" is outside the worktree boundary. ` +
|
||||
`Coding agents can only modify files inside the current worktree. ` +
|
||||
`Exception: .fusion/memory.md (project root) and .fusion/tasks/*/attachments/* are permitted for reading.`,
|
||||
`Exception: .fusion/memory/ directory (project root) and .fusion/tasks/*/attachments/* are permitted for reading.`,
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user