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.

Simplify push-directory tar logic

Remove the runtime directory check and always create the tar by
changing to the parent directory and tarring the basename. This makes
the
command uniform for files and directories.

+2 -2
+1 -1
apps/cf-sandbox/src/index.ts
··· 1050 1050 sandbox = await createSandbox("cloudflare", { 1051 1051 id: record.sandboxId!, 1052 1052 }); 1053 - await sandbox.sh`cd /tmp && if [ -d ${params.directoryPath} ]; then tar czvf ${uuid}.tar.gz -C ${params.directoryPath} .; else tar czvf ${uuid}.tar.gz -C $(dirname ${params.directoryPath}) $(basename ${params.directoryPath}); fi && curl -X POST "https://sandbox.pocketenv.io/cp?uuid=${uuid}" -H "Authorization: ${token}" -F "file=@${uuid}.tar.gz" && rm ${uuid}.tar.gz`; 1053 + await sandbox.sh`cd /tmp && tar czvf ${uuid}.tar.gz -C $(dirname ${params.directoryPath}) $(basename ${params.directoryPath}) && curl -X POST "https://sandbox.pocketenv.io/cp?uuid=${uuid}" -H "Authorization: ${token}" -F "file=@${uuid}.tar.gz" && rm ${uuid}.tar.gz`; 1054 1054 1055 1055 return c.json({ uuid }); 1056 1056 });
+1 -1
apps/sandbox/src/index.ts
··· 1006 1006 const params = await c.req.json<PushDirectoryParams>(); 1007 1007 await pushSchema.parseAsync(params); 1008 1008 const uuid = crypto.randomUUID(); 1009 - await sandbox.sh`cd /tmp && if [ -d ${params.directoryPath} ]; then tar czvf ${uuid}.tar.gz -C ${params.directoryPath} .; else tar czvf ${uuid}.tar.gz -C $(dirname ${params.directoryPath}) $(basename ${params.directoryPath}); fi && curl -X POST "https://sandbox.pocketenv.io/cp?uuid=${uuid}" -H "Authorization: ${token}" -F "file=@${uuid}.tar.gz" && rm ${uuid}.tar.gz`; 1009 + await sandbox.sh`cd /tmp && tar czvf ${uuid}.tar.gz -C $(dirname ${params.directoryPath}) $(basename ${params.directoryPath}) && curl -X POST "https://sandbox.pocketenv.io/cp?uuid=${uuid}" -H "Authorization: ${token}" -F "file=@${uuid}.tar.gz" && rm ${uuid}.tar.gz`; 1010 1010 return c.json({ success: true, uuid: uuid.toString() }); 1011 1011 }); 1012 1012