the universal sandbox runtime for agents and humans. pocketenv.io
sandbox openclaw agent claude-code vercel-sandbox deno-sandbox cloudflare-sandbox atproto sprites daytona
7
fork

Configure Feed

Select the types of activity you want to include in your feed.

Delete sandbox copy records on download

Move deletion of the sandbox copy DB row into the /cp/:uuid download
handler and
remove the duplicate deletion from the pull-directory endpoint. Also
delete the
corresponding entry from env.POCKETENV_COPY when serving the file.

+8 -5
+8 -5
apps/cf-sandbox/src/index.ts
··· 128 128 if (!file) { 129 129 return c.json({ error: "File not found" }, 404); 130 130 } 131 + 132 + await c.var.db 133 + .delete(sandboxCp) 134 + .where(eq(sandboxCp.copyUuid, uuid)) 135 + .execute(); 136 + 137 + await env.POCKETENV_COPY.delete(uuid); 138 + 131 139 return c.body(file.body, 200, { 132 140 "Content-Type": "application/gzip", 133 141 "Content-Disposition": `attachment; filename="${uuid}.tar.gz"`, ··· 1012 1020 await sandbox.sh`mkdir -p /tmp/${outdir} && cd /tmp/${outdir} && curl https://sandbox.pocketenv.io/cp/${params.uuid} -H "Authorization: ${token}" --output - | tar xvf -`; 1013 1021 await sandbox.sh`mkdir -p ${params.directoryPath} || sudo mkdir -p ${params.directoryPath}`; 1014 1022 await sandbox.sh`cp -r /tmp/${outdir}/* ${params.directoryPath} || sudo cp -r /tmp/${outdir}/* ${params.directoryPath}`; 1015 - 1016 - await c.var.db 1017 - .delete(sandboxCp) 1018 - .where(eq(sandboxCp.copyUuid, params.uuid)) 1019 - .execute(); 1020 1023 1021 1024 return c.json({ success: true }); 1022 1025 });