fix(e2b): harden remote adapter boundaries

This commit is contained in:
Tianyi Cui
2026-07-28 18:31:37 +08:00
parent dc44f93c39
commit 3e343b4477
33 changed files with 939 additions and 146 deletions
+1 -5
View File
@@ -412,11 +412,7 @@ export class E2BFileSystem extends FileSystem {
signalOpts(signal),
)
assertNotAborted(signal, 'write')
await sandbox.commands.run(
`mv -f -- ${quoteE2BShellArg(temporary)} ${quoteE2BShellArg(targetPath)}`,
signalOpts(signal),
)
const committed = await sandbox.files.getInfo(targetPath)
const committed = await sandbox.files.rename(temporary, targetPath, signalOpts(signal))
return entryVersion(committed)
} catch (error: unknown) {
try {