fix(computers): delete large agent files without downloading

Hash remote files through confined descriptors in bounded chunks before editor mutations. Preserve the remote compare-and-swap removal check and read-size cap; cover a real 17 MiB file, stale deletion, and path confinement.

Co-Authored-By: Paperclip <noreply@paperclip.ing>
This commit is contained in:
DottaandPaperclip committed 2026-10-10 10:16:15 -05:00
1 parent 03542b0845
commit ec80163f2f
6 files changed
+73 -4

No files matched your search

@@ -702,6 +702,9 @@ finally:
async stat(path: string): Promise<{ name: string; kind: "file" | "directory"; size: number; mtimeMs: number }> {
return remote({ action: "stat", path });
},
async hash(path: string): Promise<{ sha256: string; size: number }> {
return remote({ action: "hash", path });
},
async remove(path: string, expectedSha256: string) {
await remote({ action: "remove", path, expectedSha256 });
},