fix: make agent snapshots writable

This commit is contained in:
lezi-fun committed 2026-08-14 11:15:56 +08:00
1 parent 087b19e705
commit b6239fc458
4 files changed
+30

No files matched your search

+2
View File
@@ -38,7 +38,9 @@ export async function writeKnowledgeScratch(snapshot: string, content: string):
validateRepositoryKnowledge(content);
const target = path.join(snapshot, REPOSITORY_KNOWLEDGE_SCRATCH_PATH);
await fs.mkdir(path.dirname(target), { recursive: true });
await fs.chmod(path.dirname(target), 0o777);
await fs.writeFile(target, normalizeKnowledge(content), "utf8");
await fs.chmod(target, 0o666);
}
export async function readKnowledgeScratch(snapshot: string): Promise<string> {