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.

Add PREVIEW_TOKEN and pass to exposePort

+26 -3
+1
apps/cf-sandbox/deploy/amp/wrangler.jsonc
··· 34 34 "vars": { 35 35 "SANDBOX_TRANSPORT": "websocket", 36 36 "VOLUME_BUCKET": "pocketenv-volumes", 37 + "PREVIEW_TOKEN": "amp", 37 38 }, 38 39 /** 39 40 * Note: Use secrets to store sensitive data.
+1
apps/cf-sandbox/deploy/claude/wrangler.jsonc
··· 34 34 "vars": { 35 35 "SANDBOX_TRANSPORT": "websocket", 36 36 "VOLUME_BUCKET": "pocketenv-volumes", 37 + "PREVIEW_TOKEN": "claude", 37 38 }, 38 39 /** 39 40 * Note: Use secrets to store sensitive data.
+1
apps/cf-sandbox/deploy/codex/wrangler.jsonc
··· 34 34 "vars": { 35 35 "SANDBOX_TRANSPORT": "websocket", 36 36 "VOLUME_BUCKET": "pocketenv-volumes", 37 + "PREVIEW_TOKEN": "codex", 37 38 }, 38 39 /** 39 40 * Note: Use secrets to store sensitive data.
+1
apps/cf-sandbox/deploy/copilot/wrangler.jsonc
··· 34 34 "vars": { 35 35 "SANDBOX_TRANSPORT": "websocket", 36 36 "VOLUME_BUCKET": "pocketenv-volumes", 37 + "PREVIEW_TOKEN": "copilot", 37 38 }, 38 39 /** 39 40 * Note: Use secrets to store sensitive data.
+1
apps/cf-sandbox/deploy/crush/wrangler.jsonc
··· 34 34 "vars": { 35 35 "SANDBOX_TRANSPORT": "websocket", 36 36 "VOLUME_BUCKET": "pocketenv-volumes", 37 + "PREVIEW_TOKEN": "crush", 37 38 }, 38 39 /** 39 40 * Note: Use secrets to store sensitive data.
+1
apps/cf-sandbox/deploy/docker/wrangler.jsonc
··· 34 34 "vars": { 35 35 "SANDBOX_TRANSPORT": "websocket", 36 36 "VOLUME_BUCKET": "pocketenv-volumes", 37 + "PREVIEW_TOKEN": "docker", 37 38 }, 38 39 /** 39 40 * Note: Use secrets to store sensitive data.
+1
apps/cf-sandbox/deploy/gemini/wrangler.jsonc
··· 34 34 "vars": { 35 35 "SANDBOX_TRANSPORT": "websocket", 36 36 "VOLUME_BUCKET": "pocketenv-volumes", 37 + "PREVIEW_TOKEN": "gemini", 37 38 }, 38 39 /** 39 40 * Note: Use secrets to store sensitive data.
+1
apps/cf-sandbox/deploy/kilo/wrangler.jsonc
··· 34 34 "vars": { 35 35 "SANDBOX_TRANSPORT": "websocket", 36 36 "VOLUME_BUCKET": "pocketenv-volumes", 37 + "PREVIEW_TOKEN": "kilo", 37 38 }, 38 39 /** 39 40 * Note: Use secrets to store sensitive data.
+1
apps/cf-sandbox/deploy/kiro/wrangler.jsonc
··· 34 34 "vars": { 35 35 "SANDBOX_TRANSPORT": "websocket", 36 36 "VOLUME_BUCKET": "pocketenv-volumes", 37 + "PREVIEW_TOKEN": "kiro", 37 38 }, 38 39 /** 39 40 * Note: Use secrets to store sensitive data.
+1
apps/cf-sandbox/deploy/mise/wrangler.jsonc
··· 34 34 "vars": { 35 35 "SANDBOX_TRANSPORT": "websocket", 36 36 "VOLUME_BUCKET": "pocketenv-volumes", 37 + "PREVIEW_TOKEN": "mise", 37 38 }, 38 39 /** 39 40 * Note: Use secrets to store sensitive data.
+1
apps/cf-sandbox/deploy/nix/wrangler.jsonc
··· 34 34 "vars": { 35 35 "SANDBOX_TRANSPORT": "websocket", 36 36 "VOLUME_BUCKET": "pocketenv-volumes", 37 + "PREVIEW_TOKEN": "nix", 37 38 }, 38 39 /** 39 40 * Note: Use secrets to store sensitive data.
+1
apps/cf-sandbox/deploy/nullclaw/wrangler.jsonc
··· 34 34 "vars": { 35 35 "SANDBOX_TRANSPORT": "websocket", 36 36 "VOLUME_BUCKET": "pocketenv-volumes", 37 + "PREVIEW_TOKEN": "nullclaw", 37 38 }, 38 39 /** 39 40 * Note: Use secrets to store sensitive data.
+1
apps/cf-sandbox/deploy/openclaw/wrangler.jsonc
··· 34 34 "vars": { 35 35 "SANDBOX_TRANSPORT": "websocket", 36 36 "VOLUME_BUCKET": "pocketenv-volumes", 37 + "PREVIEW_TOKEN": "openclaw", 37 38 }, 38 39 /** 39 40 * Note: Use secrets to store sensitive data.
+1
apps/cf-sandbox/deploy/opencode/wrangler.jsonc
··· 34 34 "vars": { 35 35 "SANDBOX_TRANSPORT": "websocket", 36 36 "VOLUME_BUCKET": "pocketenv-volumes", 37 + "PREVIEW_TOKEN": "opencode", 37 38 }, 38 39 /** 39 40 * Note: Use secrets to store sensitive data.
+1
apps/cf-sandbox/deploy/opencrust/wrangler.jsonc
··· 34 34 "vars": { 35 35 "SANDBOX_TRANSPORT": "websocket", 36 36 "VOLUME_BUCKET": "pocketenv-volumes", 37 + "PREVIEW_TOKEN": "opencrust", 37 38 }, 38 39 /** 39 40 * Note: Use secrets to store sensitive data.
+1
apps/cf-sandbox/deploy/picoclaw/wrangler.jsonc
··· 34 34 "vars": { 35 35 "SANDBOX_TRANSPORT": "websocket", 36 36 "VOLUME_BUCKET": "pocketenv-volumes", 37 + "PREVIEW_TOKEN": "picoclaw", 37 38 }, 38 39 /** 39 40 * Note: Use secrets to store sensitive data.
+1
apps/cf-sandbox/deploy/pkgx/wrangler.jsonc
··· 34 34 "vars": { 35 35 "SANDBOX_TRANSPORT": "websocket", 36 36 "VOLUME_BUCKET": "pocketenv-volumes", 37 + "PREVIEW_TOKEN": "pkgx", 37 38 }, 38 39 /** 39 40 * Note: Use secrets to store sensitive data.
+1
apps/cf-sandbox/deploy/zeroclaw/wrangler.jsonc
··· 34 34 "vars": { 35 35 "SANDBOX_TRANSPORT": "websocket", 36 36 "VOLUME_BUCKET": "pocketenv-volumes", 37 + "PREVIEW_TOKEN": "zeroclaw", 37 38 }, 38 39 /** 39 40 * Note: Use secrets to store sensitive data.
+4 -1
apps/cf-sandbox/src/providers/cloudflare/index.ts
··· 122 122 123 123 async expose(port: number, hostname: string): Promise<string | null> { 124 124 try { 125 - const { url } = await this.sandbox.exposePort(port, { hostname }); 125 + const { url } = await this.sandbox.exposePort(port, { 126 + hostname, 127 + token: env.PREVIEW_TOKEN, 128 + }); 126 129 return url; 127 130 } catch (e) { 128 131 console.log("Failed to expose port", e);
+3 -2
apps/cf-sandbox/worker-configuration.d.ts
··· 1 1 /* eslint-disable */ 2 - // Generated by Wrangler by running `wrangler types` (hash: 209f0bba762d65df0a0eb80f96ad226b) 2 + // Generated by Wrangler by running `wrangler types` (hash: 7da929d784342c6091ea91869c487296) 3 3 // Runtime types generated with workerd@1.20260205.0 2025-05-06 nodejs_compat 4 4 declare namespace Cloudflare { 5 5 interface GlobalProps { ··· 9 9 interface Env { 10 10 HYPERDRIVE: Hyperdrive; 11 11 SANDBOX_TRANSPORT: "websocket"; 12 + PREVIEW_TOKEN: "sandbox"; 12 13 CLOUDFLARE_HYPERDRIVE_LOCAL_CONNECTION_STRING_HYPERDRIVE: string; 13 14 PUBLIC_KEY: string; 14 15 PRIVATE_KEY: string; ··· 25 26 [Binding in keyof EnvType]: EnvType[Binding] extends string ? EnvType[Binding] : string; 26 27 }; 27 28 declare namespace NodeJS { 28 - interface ProcessEnv extends StringifyValues<Pick<Cloudflare.Env, "SANDBOX_TRANSPORT" | "CLOUDFLARE_HYPERDRIVE_LOCAL_CONNECTION_STRING_HYPERDRIVE" | "PUBLIC_KEY" | "PRIVATE_KEY" | "JWT_SECRET" | "VOLUME_BUCKET" | "ACCOUNT_ID" | "R2_ACCESS_KEY_ID" | "R2_SECRET_ACCESS_KEY">> {} 29 + interface ProcessEnv extends StringifyValues<Pick<Cloudflare.Env, "SANDBOX_TRANSPORT" | "PREVIEW_TOKEN" | "CLOUDFLARE_HYPERDRIVE_LOCAL_CONNECTION_STRING_HYPERDRIVE" | "PUBLIC_KEY" | "PRIVATE_KEY" | "JWT_SECRET" | "VOLUME_BUCKET" | "ACCOUNT_ID" | "R2_ACCESS_KEY_ID" | "R2_SECRET_ACCESS_KEY">> {} 29 30 } 30 31 31 32 // Begin runtime types
+1
apps/cf-sandbox/wrangler.jsonc
··· 34 34 "vars": { 35 35 "SANDBOX_TRANSPORT": "websocket", 36 36 "VOLUME_BUCKET": "pocketenv-volumes", 37 + "PREVIEW_TOKEN": "sandbox", 37 38 }, 38 39 /** 39 40 * Note: Use secrets to store sensitive data.