[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill-deno-deno-sandbox":3,"mdc--hyh962-key":32,"related-org-deno-deno-sandbox":7049,"related-repo-deno-deno-sandbox":7122},{"slug":4,"name":4,"fn":5,"description":6,"org":7,"tags":12,"stars":21,"repoUrl":22,"updatedAt":23,"license":24,"forks":25,"topics":26,"repo":27,"sourceUrl":30,"mdContent":31},"deno-sandbox","sandbox untrusted code with Deno","Use when building features that execute untrusted user code, AI-generated code, or need isolated code execution environments. Covers the @deno\u002Fsandbox SDK.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},"deno","Deno","https:\u002F\u002Fpexgzepcugksgbtrxkhf.supabase.co\u002Fstorage\u002Fv1\u002Fobject\u002Fpublic\u002Forg-logos\u002Fdeno.png","denoland",[13,15,18],{"name":9,"slug":8,"type":14},"tag",{"name":16,"slug":17,"type":14},"Sandboxing","sandboxing",{"name":19,"slug":20,"type":14},"Code Execution","code-execution",89,"https:\u002F\u002Fgithub.com\u002Fdenoland\u002Fskills","2026-07-31T05:52:42.5755","MIT",8,[],{"repoUrl":22,"stars":21,"forks":25,"topics":28,"description":29},[],"Modern Deno skills for AI coding assistants. Covers Deno, JSR imports, Fresh, Deno Deploy, and best practices.","https:\u002F\u002Fgithub.com\u002Fdenoland\u002Fskills\u002Ftree\u002FHEAD\u002Fskills\u002Fdeno-sandbox","---\nname: deno-sandbox\ndescription: Use when building features that execute untrusted user code, AI-generated code, or need isolated code execution environments. Covers the @deno\u002Fsandbox SDK.\nlicense: MIT\nmetadata:\n  author: denoland\n  version: \"1.1\"\n---\n\n# Deno Sandboxes\n\n## Overview\n\nDeno Sandboxes provide secure, isolated environments for running untrusted code.\nEach sandbox runs in its own Linux microVM (using Firecracker, the same\ntechnology as AWS Lambda) with a separate filesystem, network, and process\nspace. This makes them ideal for code playgrounds, AI agent tool execution, and\nmulti-tenant applications.\n\nReference: https:\u002F\u002Fdeno.com\u002Fdeploy\u002Fsandboxes\n\n## When to Use Sandboxes\n\nUse Deno Sandboxes when you need to:\n\n- Run user-submitted code safely\n- Execute AI-generated code\n- Build code playground platforms\n- Create multi-tenant code execution environments\n- Run automated tests in isolation\n\n## Scope Boundaries\n\nThis skill applies **only** to Deno Sandbox (`@deno\u002Fsandbox`) questions. Follow\nthese rules:\n\n- If the user asks about **Docker containers, Node.js vm2\u002Fvm, Web Workers, AWS\n  Lambda isolation, or any other isolation technology**, answer using that\n  technology directly. Do not suggest Deno Sandboxes as an alternative.\n- Do not include `@deno\u002Fsandbox` imports, `Sandbox.create()`, or\n  `sandbox.spawn()` in responses about other isolation technologies.\n- Only recommend Deno Sandboxes when the user explicitly asks about them or is\n  building code execution features in a Deno project.\n\n## Getting Started\n\n### Installation\n\n```bash\ndeno add jsr:@deno\u002Fsandbox\n```\n\n### Basic Usage\n\n```typescript\nimport { Sandbox } from \"@deno\u002Fsandbox\";\n\n\u002F\u002F Create a sandbox (auto-disposed when scope ends)\nawait using sandbox = await Sandbox.create();\n\n\u002F\u002F Run a command\nconst child = await sandbox.spawn(\"echo\", { args: [\"Hello from sandbox!\"] });\nconst output = await child.output();\n\nconsole.log(new TextDecoder().decode(output.stdout));\n\u002F\u002F Output: Hello from sandbox!\n```\n\n## Core Concepts\n\n### Sandbox Lifecycle\n\nSandboxes are resources that must be disposed when done. **Always** use\n`await using` for automatic cleanup:\n\n```typescript\nawait using sandbox = await Sandbox.create();\n\u002F\u002F Sandbox is automatically destroyed when this scope ends\n```\n\nCRITICAL: Never show `const sandbox = await Sandbox.create()` without\n`await using`. Always use the `await using` pattern for sandbox creation. Do not\nshow manual disposal alternatives.\n\n### Running Processes\n\nThe `spawn` method runs commands inside the sandbox:\n\n```typescript\nconst child = await sandbox.spawn(\"deno\", {\n  args: [\"run\", \"script.ts\"],\n  stdin: \"piped\", \u002F\u002F Enable stdin\n  stdout: \"piped\", \u002F\u002F Capture stdout\n  stderr: \"piped\", \u002F\u002F Capture stderr\n});\n\n\u002F\u002F Wait for completion and get output\nconst output = await child.output();\nconsole.log(\"Exit code:\", output.code);\nconsole.log(\"Stdout:\", new TextDecoder().decode(output.stdout));\nconsole.log(\"Stderr:\", new TextDecoder().decode(output.stderr));\n```\n\n### Streaming I\u002FO\n\nFor interactive processes or long-running commands:\n\n```typescript\nconst child = await sandbox.spawn(\"deno\", {\n  args: [\"repl\"],\n  stdin: \"piped\",\n  stdout: \"piped\",\n});\n\n\u002F\u002F Write to stdin\nconst writer = child.stdin!.getWriter();\nawait writer.write(new TextEncoder().encode(\"console.log('Hello')\\n\"));\nawait writer.close();\n\n\u002F\u002F Read from stdout\nconst reader = child.stdout!.getReader();\nwhile (true) {\n  const { done, value } = await reader.read();\n  if (done) break;\n  console.log(new TextDecoder().decode(value));\n}\n```\n\n### Killing Processes\n\n```typescript\nconst child = await sandbox.spawn(\"sleep\", { args: [\"60\"] });\n\n\u002F\u002F Kill with SIGTERM (default)\nawait child.kill();\n\n\u002F\u002F Or with specific signal\nawait child.kill(\"SIGKILL\");\n\n\u002F\u002F Wait for exit\nconst status = await child.status;\nconsole.log(\"Exited with signal:\", status.signal);\n```\n\n## Common Patterns\n\n### Running User Code Safely\n\n```typescript\nimport { Sandbox } from \"@deno\u002Fsandbox\";\n\nasync function runUserCode(code: string): Promise\u003Cstring> {\n  await using sandbox = await Sandbox.create();\n\n  \u002F\u002F Write user code to a file in the sandbox\n  await sandbox.fs.writeFile(\"\u002Ftmp\u002Fuser_code.ts\", code);\n\n  \u002F\u002F Run with restricted permissions\n  const child = await sandbox.spawn(\"deno\", {\n    args: [\n      \"run\",\n      \"--allow-none\", \u002F\u002F No permissions\n      \"\u002Ftmp\u002Fuser_code.ts\",\n    ],\n    stdout: \"piped\",\n    stderr: \"piped\",\n  });\n\n  const output = await child.output();\n\n  if (output.code !== 0) {\n    throw new Error(new TextDecoder().decode(output.stderr));\n  }\n\n  return new TextDecoder().decode(output.stdout);\n}\n```\n\n### Code Playground\n\n```typescript\nimport { Sandbox } from \"@deno\u002Fsandbox\";\n\ninterface ExecutionResult {\n  success: boolean;\n  output: string;\n  error?: string;\n  executionTime: number;\n}\n\nasync function executePlayground(code: string): Promise\u003CExecutionResult> {\n  const start = performance.now();\n\n  await using sandbox = await Sandbox.create();\n\n  await sandbox.fs.writeFile(\"\u002Fplayground\u002Fmain.ts\", code);\n\n  const child = await sandbox.spawn(\"deno\", {\n    args: [\"run\", \"--allow-net\", \"\u002Fplayground\u002Fmain.ts\"],\n    stdout: \"piped\",\n    stderr: \"piped\",\n  });\n\n  const output = await child.output();\n  const executionTime = performance.now() - start;\n\n  return {\n    success: output.code === 0,\n    output: new TextDecoder().decode(output.stdout),\n    error: output.code !== 0\n      ? new TextDecoder().decode(output.stderr)\n      : undefined,\n    executionTime,\n  };\n}\n```\n\n### AI Agent Tool Execution\n\n```typescript\nimport { Sandbox } from \"@deno\u002Fsandbox\";\n\nasync function executeAgentTool(\n  toolCode: string,\n  input: unknown,\n): Promise\u003Cunknown> {\n  await using sandbox = await Sandbox.create();\n\n  \u002F\u002F Create a wrapper that handles input\u002Foutput\n  const wrapper = `\n    const input = ${JSON.stringify(input)};\n    const tool = await import(\"\u002Ftool.ts\");\n    const result = await tool.default(input);\n    console.log(JSON.stringify(result));\n  `;\n\n  await sandbox.fs.writeFile(\"\u002Ftool.ts\", toolCode);\n  await sandbox.fs.writeFile(\"\u002Frun.ts\", wrapper);\n\n  const child = await sandbox.spawn(\"deno\", {\n    args: [\"run\", \"--allow-net\", \"\u002Frun.ts\"],\n    stdout: \"piped\",\n    stderr: \"piped\",\n  });\n\n  const output = await child.output();\n\n  if (output.code !== 0) {\n    throw new Error(new TextDecoder().decode(output.stderr));\n  }\n\n  return JSON.parse(new TextDecoder().decode(output.stdout));\n}\n```\n\n## Sandbox Features\n\n### Resource Configuration\n\nSandboxes have configurable resources:\n\n- **Default:** 2 vCPUs, 512MB memory, 10GB disk\n- Startup time: Under 200ms\n\n### What's Included\n\nEach sandbox comes with:\n\n- TypeScript\u002FJavaScript runtime (Deno)\n- Full Linux environment\n- Network access (can be restricted)\n- Temporary filesystem\n\n### Security Features\n\n- **Firecracker microVMs** - Same technology as AWS Lambda\n- **Full isolation** - Separate kernel, filesystem, network\n- **No data leakage** - Sandboxes can't access host system\n- **Enforced policies** - Control outbound connections\n\n## Deploying Sandboxes\n\nSandboxes can be deployed directly to Deno Deploy:\n\n```bash\ndeno deploy --prod\n```\n\nThe sandbox SDK works seamlessly in the Deno Deploy environment.\n\n## API Reference\n\nFor the complete API, run:\n\n```bash\ndeno doc jsr:@deno\u002Fsandbox\n```\n\nKey classes:\n\n- `Sandbox` - Main class for creating\u002Fmanaging sandboxes\n- `ChildProcess` - Represents a running process\n- `Client` - For managing Deploy resources (apps, volumes)\n\n## Quick Reference\n\n| Task           | Code                                           |\n| -------------- | ---------------------------------------------- |\n| Create sandbox | `await using sandbox = await Sandbox.create()` |\n| Run command    | `sandbox.spawn(\"cmd\", { args: [...] })`        |\n| Get output     | `const output = await child.output()`          |\n| Write file     | `await sandbox.fs.writeFile(path, content)`    |\n| Read file      | `await sandbox.fs.readFile(path)`              |\n| Kill process   | `await child.kill()`                           |\n| Check status   | `const status = await child.status`            |\n\n## Common Mistakes\n\n**Forgetting automatic disposal**\n\n```typescript\n\u002F\u002F ❌ Wrong - always use \"await using\" for sandbox creation\n\u002F\u002F Never write: const sandbox = await Sandbox.create() without \"await using\"\n\n\u002F\u002F ✅ Correct - use \"await using\" for automatic cleanup\nawait using sandbox = await Sandbox.create();\nawait sandbox.spawn(\"echo\", { args: [\"hello\"] });\n\u002F\u002F sandbox automatically disposed when scope ends\n```\n\n**Giving user code too many permissions**\n\n```typescript\n\u002F\u002F ❌ Wrong - gives untrusted code full access\nconst child = await sandbox.spawn(\"deno\", {\n  args: [\"run\", \"--allow-all\", \"\u002Ftmp\u002Fuser_code.ts\"],\n});\n\n\u002F\u002F ✅ Correct - restrict permissions to what's needed\nconst child = await sandbox.spawn(\"deno\", {\n  args: [\"run\", \"--allow-none\", \"\u002Ftmp\u002Fuser_code.ts\"], \u002F\u002F No permissions\n});\n\n\u002F\u002F Or if network is truly needed:\nconst child = await sandbox.spawn(\"deno\", {\n  args: [\"run\", \"--allow-net\", \"\u002Ftmp\u002Fuser_code.ts\"], \u002F\u002F Only network\n});\n```\n\n**Not handling process output properly**\n\n```typescript\n\u002F\u002F ❌ Wrong - forgetting to pipe stdout\u002Fstderr\nconst child = await sandbox.spawn(\"deno\", { args: [\"run\", \"script.ts\"] });\nconst output = await child.output();\n\u002F\u002F output.stdout is empty because we didn't pipe it!\n\n\u002F\u002F ✅ Correct - pipe the streams you need\nconst child = await sandbox.spawn(\"deno\", {\n  args: [\"run\", \"script.ts\"],\n  stdout: \"piped\",\n  stderr: \"piped\",\n});\nconst output = await child.output();\nconsole.log(new TextDecoder().decode(output.stdout));\n```\n\n**Not setting timeouts for user code execution**\n\n```typescript\n\u002F\u002F ❌ Wrong - user code could run forever\nconst child = await sandbox.spawn(\"deno\", {\n  args: [\"run\", \"\u002Ftmp\u002Fuser_code.ts\"],\n});\nawait child.output(); \u002F\u002F Could hang indefinitely\n\n\u002F\u002F ✅ Correct - implement timeout handling\nconst child = await sandbox.spawn(\"deno\", {\n  args: [\"run\", \"\u002Ftmp\u002Fuser_code.ts\"],\n  stdout: \"piped\",\n  stderr: \"piped\",\n});\n\n\u002F\u002F Set a timeout to kill the process\nconst timeoutId = setTimeout(() => child.kill(), 5000); \u002F\u002F 5 second limit\n\ntry {\n  const output = await child.output();\n  return output;\n} finally {\n  clearTimeout(timeoutId);\n}\n```\n\n**Trusting sandbox output without validation**\n\n```typescript\n\u002F\u002F ❌ Wrong - directly using untrusted output as code\nconst result = await runUserCode(code);\n\u002F\u002F Never execute or inject untrusted output!\n\n\u002F\u002F ✅ Correct - validate and sanitize output\nconst result = await runUserCode(code);\ntry {\n  const parsed = JSON.parse(result); \u002F\u002F Parse as data, not code\n  if (isValidResponse(parsed)) {\n    return parsed;\n  }\n} catch {\n  throw new Error(\"Invalid response from sandbox\");\n}\n```\n",{"data":33,"body":36},{"name":4,"description":6,"license":24,"metadata":34},{"author":11,"version":35},"1.1",{"type":37,"children":38},"root",[39,48,55,61,74,80,85,115,121,143,191,197,204,237,243,621,627,633,652,706,733,739,751,1240,1246,1251,1839,1845,2157,2163,2169,2885,2891,3797,3803,4668,4674,4680,4685,4703,4709,4714,4737,4743,4786,4792,4797,4821,4826,4832,4837,4860,4865,4901,4907,5054,5060,5068,5237,5245,5711,5719,6176,6184,6751,6759,7043],{"type":40,"tag":41,"props":42,"children":44},"element","h1",{"id":43},"deno-sandboxes",[45],{"type":46,"value":47},"text","Deno Sandboxes",{"type":40,"tag":49,"props":50,"children":52},"h2",{"id":51},"overview",[53],{"type":46,"value":54},"Overview",{"type":40,"tag":56,"props":57,"children":58},"p",{},[59],{"type":46,"value":60},"Deno Sandboxes provide secure, isolated environments for running untrusted code.\nEach sandbox runs in its own Linux microVM (using Firecracker, the same\ntechnology as AWS Lambda) with a separate filesystem, network, and process\nspace. This makes them ideal for code playgrounds, AI agent tool execution, and\nmulti-tenant applications.",{"type":40,"tag":56,"props":62,"children":63},{},[64,66],{"type":46,"value":65},"Reference: ",{"type":40,"tag":67,"props":68,"children":72},"a",{"href":69,"rel":70},"https:\u002F\u002Fdeno.com\u002Fdeploy\u002Fsandboxes",[71],"nofollow",[73],{"type":46,"value":69},{"type":40,"tag":49,"props":75,"children":77},{"id":76},"when-to-use-sandboxes",[78],{"type":46,"value":79},"When to Use Sandboxes",{"type":40,"tag":56,"props":81,"children":82},{},[83],{"type":46,"value":84},"Use Deno Sandboxes when you need to:",{"type":40,"tag":86,"props":87,"children":88},"ul",{},[89,95,100,105,110],{"type":40,"tag":90,"props":91,"children":92},"li",{},[93],{"type":46,"value":94},"Run user-submitted code safely",{"type":40,"tag":90,"props":96,"children":97},{},[98],{"type":46,"value":99},"Execute AI-generated code",{"type":40,"tag":90,"props":101,"children":102},{},[103],{"type":46,"value":104},"Build code playground platforms",{"type":40,"tag":90,"props":106,"children":107},{},[108],{"type":46,"value":109},"Create multi-tenant code execution environments",{"type":40,"tag":90,"props":111,"children":112},{},[113],{"type":46,"value":114},"Run automated tests in isolation",{"type":40,"tag":49,"props":116,"children":118},{"id":117},"scope-boundaries",[119],{"type":46,"value":120},"Scope Boundaries",{"type":40,"tag":56,"props":122,"children":123},{},[124,126,132,134,141],{"type":46,"value":125},"This skill applies ",{"type":40,"tag":127,"props":128,"children":129},"strong",{},[130],{"type":46,"value":131},"only",{"type":46,"value":133}," to Deno Sandbox (",{"type":40,"tag":135,"props":136,"children":138},"code",{"className":137},[],[139],{"type":46,"value":140},"@deno\u002Fsandbox",{"type":46,"value":142},") questions. Follow\nthese rules:",{"type":40,"tag":86,"props":144,"children":145},{},[146,158,186],{"type":40,"tag":90,"props":147,"children":148},{},[149,151,156],{"type":46,"value":150},"If the user asks about ",{"type":40,"tag":127,"props":152,"children":153},{},[154],{"type":46,"value":155},"Docker containers, Node.js vm2\u002Fvm, Web Workers, AWS\nLambda isolation, or any other isolation technology",{"type":46,"value":157},", answer using that\ntechnology directly. Do not suggest Deno Sandboxes as an alternative.",{"type":40,"tag":90,"props":159,"children":160},{},[161,163,168,170,176,178,184],{"type":46,"value":162},"Do not include ",{"type":40,"tag":135,"props":164,"children":166},{"className":165},[],[167],{"type":46,"value":140},{"type":46,"value":169}," imports, ",{"type":40,"tag":135,"props":171,"children":173},{"className":172},[],[174],{"type":46,"value":175},"Sandbox.create()",{"type":46,"value":177},", or\n",{"type":40,"tag":135,"props":179,"children":181},{"className":180},[],[182],{"type":46,"value":183},"sandbox.spawn()",{"type":46,"value":185}," in responses about other isolation technologies.",{"type":40,"tag":90,"props":187,"children":188},{},[189],{"type":46,"value":190},"Only recommend Deno Sandboxes when the user explicitly asks about them or is\nbuilding code execution features in a Deno project.",{"type":40,"tag":49,"props":192,"children":194},{"id":193},"getting-started",[195],{"type":46,"value":196},"Getting Started",{"type":40,"tag":198,"props":199,"children":201},"h3",{"id":200},"installation",[202],{"type":46,"value":203},"Installation",{"type":40,"tag":205,"props":206,"children":211},"pre",{"className":207,"code":208,"language":209,"meta":210,"style":210},"language-bash shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","deno add jsr:@deno\u002Fsandbox\n","bash","",[212],{"type":40,"tag":135,"props":213,"children":214},{"__ignoreMap":210},[215],{"type":40,"tag":216,"props":217,"children":220},"span",{"class":218,"line":219},"line",1,[221,226,232],{"type":40,"tag":216,"props":222,"children":224},{"style":223},"--shiki-light:#E2931D;--shiki-default:#FFCB6B;--shiki-dark:#FFCB6B",[225],{"type":46,"value":8},{"type":40,"tag":216,"props":227,"children":229},{"style":228},"--shiki-light:#91B859;--shiki-default:#C3E88D;--shiki-dark:#C3E88D",[230],{"type":46,"value":231}," add",{"type":40,"tag":216,"props":233,"children":234},{"style":228},[235],{"type":46,"value":236}," jsr:@deno\u002Fsandbox\n",{"type":40,"tag":198,"props":238,"children":240},{"id":239},"basic-usage",[241],{"type":46,"value":242},"Basic Usage",{"type":40,"tag":205,"props":244,"children":248},{"className":245,"code":246,"language":247,"meta":210,"style":210},"language-typescript shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","import { Sandbox } from \"@deno\u002Fsandbox\";\n\n\u002F\u002F Create a sandbox (auto-disposed when scope ends)\nawait using sandbox = await Sandbox.create();\n\n\u002F\u002F Run a command\nconst child = await sandbox.spawn(\"echo\", { args: [\"Hello from sandbox!\"] });\nconst output = await child.output();\n\nconsole.log(new TextDecoder().decode(output.stdout));\n\u002F\u002F Output: Hello from sandbox!\n","typescript",[249],{"type":40,"tag":135,"props":250,"children":251},{"__ignoreMap":210},[252,302,312,322,371,379,388,499,541,549,612],{"type":40,"tag":216,"props":253,"children":254},{"class":218,"line":219},[255,261,267,273,278,283,288,292,297],{"type":40,"tag":216,"props":256,"children":258},{"style":257},"--shiki-light:#39ADB5;--shiki-light-font-style:italic;--shiki-default:#89DDFF;--shiki-default-font-style:italic;--shiki-dark:#89DDFF;--shiki-dark-font-style:italic",[259],{"type":46,"value":260},"import",{"type":40,"tag":216,"props":262,"children":264},{"style":263},"--shiki-light:#39ADB5;--shiki-default:#89DDFF;--shiki-dark:#89DDFF",[265],{"type":46,"value":266}," {",{"type":40,"tag":216,"props":268,"children":270},{"style":269},"--shiki-light:#90A4AE;--shiki-default:#EEFFFF;--shiki-dark:#BABED8",[271],{"type":46,"value":272}," Sandbox",{"type":40,"tag":216,"props":274,"children":275},{"style":263},[276],{"type":46,"value":277}," }",{"type":40,"tag":216,"props":279,"children":280},{"style":257},[281],{"type":46,"value":282}," from",{"type":40,"tag":216,"props":284,"children":285},{"style":263},[286],{"type":46,"value":287}," \"",{"type":40,"tag":216,"props":289,"children":290},{"style":228},[291],{"type":46,"value":140},{"type":40,"tag":216,"props":293,"children":294},{"style":263},[295],{"type":46,"value":296},"\"",{"type":40,"tag":216,"props":298,"children":299},{"style":263},[300],{"type":46,"value":301},";\n",{"type":40,"tag":216,"props":303,"children":305},{"class":218,"line":304},2,[306],{"type":40,"tag":216,"props":307,"children":309},{"emptyLinePlaceholder":308},true,[310],{"type":46,"value":311},"\n",{"type":40,"tag":216,"props":313,"children":315},{"class":218,"line":314},3,[316],{"type":40,"tag":216,"props":317,"children":319},{"style":318},"--shiki-light:#90A4AE;--shiki-light-font-style:italic;--shiki-default:#546E7A;--shiki-default-font-style:italic;--shiki-dark:#676E95;--shiki-dark-font-style:italic",[320],{"type":46,"value":321},"\u002F\u002F Create a sandbox (auto-disposed when scope ends)\n",{"type":40,"tag":216,"props":323,"children":325},{"class":218,"line":324},4,[326,332,337,342,347,351,356,362,367],{"type":40,"tag":216,"props":327,"children":329},{"style":328},"--shiki-light:#9C3EDA;--shiki-default:#C792EA;--shiki-dark:#C792EA",[330],{"type":46,"value":331},"await using",{"type":40,"tag":216,"props":333,"children":334},{"style":269},[335],{"type":46,"value":336}," sandbox ",{"type":40,"tag":216,"props":338,"children":339},{"style":263},[340],{"type":46,"value":341},"=",{"type":40,"tag":216,"props":343,"children":344},{"style":257},[345],{"type":46,"value":346}," await",{"type":40,"tag":216,"props":348,"children":349},{"style":269},[350],{"type":46,"value":272},{"type":40,"tag":216,"props":352,"children":353},{"style":263},[354],{"type":46,"value":355},".",{"type":40,"tag":216,"props":357,"children":359},{"style":358},"--shiki-light:#6182B8;--shiki-default:#82AAFF;--shiki-dark:#82AAFF",[360],{"type":46,"value":361},"create",{"type":40,"tag":216,"props":363,"children":364},{"style":269},[365],{"type":46,"value":366},"()",{"type":40,"tag":216,"props":368,"children":369},{"style":263},[370],{"type":46,"value":301},{"type":40,"tag":216,"props":372,"children":374},{"class":218,"line":373},5,[375],{"type":40,"tag":216,"props":376,"children":377},{"emptyLinePlaceholder":308},[378],{"type":46,"value":311},{"type":40,"tag":216,"props":380,"children":382},{"class":218,"line":381},6,[383],{"type":40,"tag":216,"props":384,"children":385},{"style":318},[386],{"type":46,"value":387},"\u002F\u002F Run a command\n",{"type":40,"tag":216,"props":389,"children":391},{"class":218,"line":390},7,[392,397,402,406,410,415,419,424,429,433,438,442,447,451,457,462,467,471,476,480,485,490,495],{"type":40,"tag":216,"props":393,"children":394},{"style":328},[395],{"type":46,"value":396},"const",{"type":40,"tag":216,"props":398,"children":399},{"style":269},[400],{"type":46,"value":401}," child ",{"type":40,"tag":216,"props":403,"children":404},{"style":263},[405],{"type":46,"value":341},{"type":40,"tag":216,"props":407,"children":408},{"style":257},[409],{"type":46,"value":346},{"type":40,"tag":216,"props":411,"children":412},{"style":269},[413],{"type":46,"value":414}," sandbox",{"type":40,"tag":216,"props":416,"children":417},{"style":263},[418],{"type":46,"value":355},{"type":40,"tag":216,"props":420,"children":421},{"style":358},[422],{"type":46,"value":423},"spawn",{"type":40,"tag":216,"props":425,"children":426},{"style":269},[427],{"type":46,"value":428},"(",{"type":40,"tag":216,"props":430,"children":431},{"style":263},[432],{"type":46,"value":296},{"type":40,"tag":216,"props":434,"children":435},{"style":228},[436],{"type":46,"value":437},"echo",{"type":40,"tag":216,"props":439,"children":440},{"style":263},[441],{"type":46,"value":296},{"type":40,"tag":216,"props":443,"children":444},{"style":263},[445],{"type":46,"value":446},",",{"type":40,"tag":216,"props":448,"children":449},{"style":263},[450],{"type":46,"value":266},{"type":40,"tag":216,"props":452,"children":454},{"style":453},"--shiki-light:#E53935;--shiki-default:#F07178;--shiki-dark:#F07178",[455],{"type":46,"value":456}," args",{"type":40,"tag":216,"props":458,"children":459},{"style":263},[460],{"type":46,"value":461},":",{"type":40,"tag":216,"props":463,"children":464},{"style":269},[465],{"type":46,"value":466}," [",{"type":40,"tag":216,"props":468,"children":469},{"style":263},[470],{"type":46,"value":296},{"type":40,"tag":216,"props":472,"children":473},{"style":228},[474],{"type":46,"value":475},"Hello from sandbox!",{"type":40,"tag":216,"props":477,"children":478},{"style":263},[479],{"type":46,"value":296},{"type":40,"tag":216,"props":481,"children":482},{"style":269},[483],{"type":46,"value":484},"] ",{"type":40,"tag":216,"props":486,"children":487},{"style":263},[488],{"type":46,"value":489},"}",{"type":40,"tag":216,"props":491,"children":492},{"style":269},[493],{"type":46,"value":494},")",{"type":40,"tag":216,"props":496,"children":497},{"style":263},[498],{"type":46,"value":301},{"type":40,"tag":216,"props":500,"children":501},{"class":218,"line":25},[502,506,511,515,519,524,528,533,537],{"type":40,"tag":216,"props":503,"children":504},{"style":328},[505],{"type":46,"value":396},{"type":40,"tag":216,"props":507,"children":508},{"style":269},[509],{"type":46,"value":510}," output ",{"type":40,"tag":216,"props":512,"children":513},{"style":263},[514],{"type":46,"value":341},{"type":40,"tag":216,"props":516,"children":517},{"style":257},[518],{"type":46,"value":346},{"type":40,"tag":216,"props":520,"children":521},{"style":269},[522],{"type":46,"value":523}," child",{"type":40,"tag":216,"props":525,"children":526},{"style":263},[527],{"type":46,"value":355},{"type":40,"tag":216,"props":529,"children":530},{"style":358},[531],{"type":46,"value":532},"output",{"type":40,"tag":216,"props":534,"children":535},{"style":269},[536],{"type":46,"value":366},{"type":40,"tag":216,"props":538,"children":539},{"style":263},[540],{"type":46,"value":301},{"type":40,"tag":216,"props":542,"children":544},{"class":218,"line":543},9,[545],{"type":40,"tag":216,"props":546,"children":547},{"emptyLinePlaceholder":308},[548],{"type":46,"value":311},{"type":40,"tag":216,"props":550,"children":552},{"class":218,"line":551},10,[553,558,562,567,571,576,581,585,589,594,599,603,608],{"type":40,"tag":216,"props":554,"children":555},{"style":269},[556],{"type":46,"value":557},"console",{"type":40,"tag":216,"props":559,"children":560},{"style":263},[561],{"type":46,"value":355},{"type":40,"tag":216,"props":563,"children":564},{"style":358},[565],{"type":46,"value":566},"log",{"type":40,"tag":216,"props":568,"children":569},{"style":269},[570],{"type":46,"value":428},{"type":40,"tag":216,"props":572,"children":573},{"style":263},[574],{"type":46,"value":575},"new",{"type":40,"tag":216,"props":577,"children":578},{"style":358},[579],{"type":46,"value":580}," TextDecoder",{"type":40,"tag":216,"props":582,"children":583},{"style":269},[584],{"type":46,"value":366},{"type":40,"tag":216,"props":586,"children":587},{"style":263},[588],{"type":46,"value":355},{"type":40,"tag":216,"props":590,"children":591},{"style":358},[592],{"type":46,"value":593},"decode",{"type":40,"tag":216,"props":595,"children":596},{"style":269},[597],{"type":46,"value":598},"(output",{"type":40,"tag":216,"props":600,"children":601},{"style":263},[602],{"type":46,"value":355},{"type":40,"tag":216,"props":604,"children":605},{"style":269},[606],{"type":46,"value":607},"stdout))",{"type":40,"tag":216,"props":609,"children":610},{"style":263},[611],{"type":46,"value":301},{"type":40,"tag":216,"props":613,"children":615},{"class":218,"line":614},11,[616],{"type":40,"tag":216,"props":617,"children":618},{"style":318},[619],{"type":46,"value":620},"\u002F\u002F Output: Hello from sandbox!\n",{"type":40,"tag":49,"props":622,"children":624},{"id":623},"core-concepts",[625],{"type":46,"value":626},"Core Concepts",{"type":40,"tag":198,"props":628,"children":630},{"id":629},"sandbox-lifecycle",[631],{"type":46,"value":632},"Sandbox Lifecycle",{"type":40,"tag":56,"props":634,"children":635},{},[636,638,643,645,650],{"type":46,"value":637},"Sandboxes are resources that must be disposed when done. ",{"type":40,"tag":127,"props":639,"children":640},{},[641],{"type":46,"value":642},"Always",{"type":46,"value":644}," use\n",{"type":40,"tag":135,"props":646,"children":648},{"className":647},[],[649],{"type":46,"value":331},{"type":46,"value":651}," for automatic cleanup:",{"type":40,"tag":205,"props":653,"children":655},{"className":245,"code":654,"language":247,"meta":210,"style":210},"await using sandbox = await Sandbox.create();\n\u002F\u002F Sandbox is automatically destroyed when this scope ends\n",[656],{"type":40,"tag":135,"props":657,"children":658},{"__ignoreMap":210},[659,698],{"type":40,"tag":216,"props":660,"children":661},{"class":218,"line":219},[662,666,670,674,678,682,686,690,694],{"type":40,"tag":216,"props":663,"children":664},{"style":328},[665],{"type":46,"value":331},{"type":40,"tag":216,"props":667,"children":668},{"style":269},[669],{"type":46,"value":336},{"type":40,"tag":216,"props":671,"children":672},{"style":263},[673],{"type":46,"value":341},{"type":40,"tag":216,"props":675,"children":676},{"style":257},[677],{"type":46,"value":346},{"type":40,"tag":216,"props":679,"children":680},{"style":269},[681],{"type":46,"value":272},{"type":40,"tag":216,"props":683,"children":684},{"style":263},[685],{"type":46,"value":355},{"type":40,"tag":216,"props":687,"children":688},{"style":358},[689],{"type":46,"value":361},{"type":40,"tag":216,"props":691,"children":692},{"style":269},[693],{"type":46,"value":366},{"type":40,"tag":216,"props":695,"children":696},{"style":263},[697],{"type":46,"value":301},{"type":40,"tag":216,"props":699,"children":700},{"class":218,"line":304},[701],{"type":40,"tag":216,"props":702,"children":703},{"style":318},[704],{"type":46,"value":705},"\u002F\u002F Sandbox is automatically destroyed when this scope ends\n",{"type":40,"tag":56,"props":707,"children":708},{},[709,711,717,719,724,726,731],{"type":46,"value":710},"CRITICAL: Never show ",{"type":40,"tag":135,"props":712,"children":714},{"className":713},[],[715],{"type":46,"value":716},"const sandbox = await Sandbox.create()",{"type":46,"value":718}," without\n",{"type":40,"tag":135,"props":720,"children":722},{"className":721},[],[723],{"type":46,"value":331},{"type":46,"value":725},". Always use the ",{"type":40,"tag":135,"props":727,"children":729},{"className":728},[],[730],{"type":46,"value":331},{"type":46,"value":732}," pattern for sandbox creation. Do not\nshow manual disposal alternatives.",{"type":40,"tag":198,"props":734,"children":736},{"id":735},"running-processes",[737],{"type":46,"value":738},"Running Processes",{"type":40,"tag":56,"props":740,"children":741},{},[742,744,749],{"type":46,"value":743},"The ",{"type":40,"tag":135,"props":745,"children":747},{"className":746},[],[748],{"type":46,"value":423},{"type":46,"value":750}," method runs commands inside the sandbox:",{"type":40,"tag":205,"props":752,"children":754},{"className":245,"code":753,"language":247,"meta":210,"style":210},"const child = await sandbox.spawn(\"deno\", {\n  args: [\"run\", \"script.ts\"],\n  stdin: \"piped\", \u002F\u002F Enable stdin\n  stdout: \"piped\", \u002F\u002F Capture stdout\n  stderr: \"piped\", \u002F\u002F Capture stderr\n});\n\n\u002F\u002F Wait for completion and get output\nconst output = await child.output();\nconsole.log(\"Exit code:\", output.code);\nconsole.log(\"Stdout:\", new TextDecoder().decode(output.stdout));\nconsole.log(\"Stderr:\", new TextDecoder().decode(output.stderr));\n",[755],{"type":40,"tag":135,"props":756,"children":757},{"__ignoreMap":210},[758,814,870,904,937,970,985,992,1000,1039,1093,1166],{"type":40,"tag":216,"props":759,"children":760},{"class":218,"line":219},[761,765,769,773,777,781,785,789,793,797,801,805,809],{"type":40,"tag":216,"props":762,"children":763},{"style":328},[764],{"type":46,"value":396},{"type":40,"tag":216,"props":766,"children":767},{"style":269},[768],{"type":46,"value":401},{"type":40,"tag":216,"props":770,"children":771},{"style":263},[772],{"type":46,"value":341},{"type":40,"tag":216,"props":774,"children":775},{"style":257},[776],{"type":46,"value":346},{"type":40,"tag":216,"props":778,"children":779},{"style":269},[780],{"type":46,"value":414},{"type":40,"tag":216,"props":782,"children":783},{"style":263},[784],{"type":46,"value":355},{"type":40,"tag":216,"props":786,"children":787},{"style":358},[788],{"type":46,"value":423},{"type":40,"tag":216,"props":790,"children":791},{"style":269},[792],{"type":46,"value":428},{"type":40,"tag":216,"props":794,"children":795},{"style":263},[796],{"type":46,"value":296},{"type":40,"tag":216,"props":798,"children":799},{"style":228},[800],{"type":46,"value":8},{"type":40,"tag":216,"props":802,"children":803},{"style":263},[804],{"type":46,"value":296},{"type":40,"tag":216,"props":806,"children":807},{"style":263},[808],{"type":46,"value":446},{"type":40,"tag":216,"props":810,"children":811},{"style":263},[812],{"type":46,"value":813}," {\n",{"type":40,"tag":216,"props":815,"children":816},{"class":218,"line":304},[817,822,826,830,834,839,843,847,851,856,860,865],{"type":40,"tag":216,"props":818,"children":819},{"style":453},[820],{"type":46,"value":821},"  args",{"type":40,"tag":216,"props":823,"children":824},{"style":263},[825],{"type":46,"value":461},{"type":40,"tag":216,"props":827,"children":828},{"style":269},[829],{"type":46,"value":466},{"type":40,"tag":216,"props":831,"children":832},{"style":263},[833],{"type":46,"value":296},{"type":40,"tag":216,"props":835,"children":836},{"style":228},[837],{"type":46,"value":838},"run",{"type":40,"tag":216,"props":840,"children":841},{"style":263},[842],{"type":46,"value":296},{"type":40,"tag":216,"props":844,"children":845},{"style":263},[846],{"type":46,"value":446},{"type":40,"tag":216,"props":848,"children":849},{"style":263},[850],{"type":46,"value":287},{"type":40,"tag":216,"props":852,"children":853},{"style":228},[854],{"type":46,"value":855},"script.ts",{"type":40,"tag":216,"props":857,"children":858},{"style":263},[859],{"type":46,"value":296},{"type":40,"tag":216,"props":861,"children":862},{"style":269},[863],{"type":46,"value":864},"]",{"type":40,"tag":216,"props":866,"children":867},{"style":263},[868],{"type":46,"value":869},",\n",{"type":40,"tag":216,"props":871,"children":872},{"class":218,"line":314},[873,878,882,886,891,895,899],{"type":40,"tag":216,"props":874,"children":875},{"style":453},[876],{"type":46,"value":877},"  stdin",{"type":40,"tag":216,"props":879,"children":880},{"style":263},[881],{"type":46,"value":461},{"type":40,"tag":216,"props":883,"children":884},{"style":263},[885],{"type":46,"value":287},{"type":40,"tag":216,"props":887,"children":888},{"style":228},[889],{"type":46,"value":890},"piped",{"type":40,"tag":216,"props":892,"children":893},{"style":263},[894],{"type":46,"value":296},{"type":40,"tag":216,"props":896,"children":897},{"style":263},[898],{"type":46,"value":446},{"type":40,"tag":216,"props":900,"children":901},{"style":318},[902],{"type":46,"value":903}," \u002F\u002F Enable stdin\n",{"type":40,"tag":216,"props":905,"children":906},{"class":218,"line":324},[907,912,916,920,924,928,932],{"type":40,"tag":216,"props":908,"children":909},{"style":453},[910],{"type":46,"value":911},"  stdout",{"type":40,"tag":216,"props":913,"children":914},{"style":263},[915],{"type":46,"value":461},{"type":40,"tag":216,"props":917,"children":918},{"style":263},[919],{"type":46,"value":287},{"type":40,"tag":216,"props":921,"children":922},{"style":228},[923],{"type":46,"value":890},{"type":40,"tag":216,"props":925,"children":926},{"style":263},[927],{"type":46,"value":296},{"type":40,"tag":216,"props":929,"children":930},{"style":263},[931],{"type":46,"value":446},{"type":40,"tag":216,"props":933,"children":934},{"style":318},[935],{"type":46,"value":936}," \u002F\u002F Capture stdout\n",{"type":40,"tag":216,"props":938,"children":939},{"class":218,"line":373},[940,945,949,953,957,961,965],{"type":40,"tag":216,"props":941,"children":942},{"style":453},[943],{"type":46,"value":944},"  stderr",{"type":40,"tag":216,"props":946,"children":947},{"style":263},[948],{"type":46,"value":461},{"type":40,"tag":216,"props":950,"children":951},{"style":263},[952],{"type":46,"value":287},{"type":40,"tag":216,"props":954,"children":955},{"style":228},[956],{"type":46,"value":890},{"type":40,"tag":216,"props":958,"children":959},{"style":263},[960],{"type":46,"value":296},{"type":40,"tag":216,"props":962,"children":963},{"style":263},[964],{"type":46,"value":446},{"type":40,"tag":216,"props":966,"children":967},{"style":318},[968],{"type":46,"value":969}," \u002F\u002F Capture stderr\n",{"type":40,"tag":216,"props":971,"children":972},{"class":218,"line":381},[973,977,981],{"type":40,"tag":216,"props":974,"children":975},{"style":263},[976],{"type":46,"value":489},{"type":40,"tag":216,"props":978,"children":979},{"style":269},[980],{"type":46,"value":494},{"type":40,"tag":216,"props":982,"children":983},{"style":263},[984],{"type":46,"value":301},{"type":40,"tag":216,"props":986,"children":987},{"class":218,"line":390},[988],{"type":40,"tag":216,"props":989,"children":990},{"emptyLinePlaceholder":308},[991],{"type":46,"value":311},{"type":40,"tag":216,"props":993,"children":994},{"class":218,"line":25},[995],{"type":40,"tag":216,"props":996,"children":997},{"style":318},[998],{"type":46,"value":999},"\u002F\u002F Wait for completion and get output\n",{"type":40,"tag":216,"props":1001,"children":1002},{"class":218,"line":543},[1003,1007,1011,1015,1019,1023,1027,1031,1035],{"type":40,"tag":216,"props":1004,"children":1005},{"style":328},[1006],{"type":46,"value":396},{"type":40,"tag":216,"props":1008,"children":1009},{"style":269},[1010],{"type":46,"value":510},{"type":40,"tag":216,"props":1012,"children":1013},{"style":263},[1014],{"type":46,"value":341},{"type":40,"tag":216,"props":1016,"children":1017},{"style":257},[1018],{"type":46,"value":346},{"type":40,"tag":216,"props":1020,"children":1021},{"style":269},[1022],{"type":46,"value":523},{"type":40,"tag":216,"props":1024,"children":1025},{"style":263},[1026],{"type":46,"value":355},{"type":40,"tag":216,"props":1028,"children":1029},{"style":358},[1030],{"type":46,"value":532},{"type":40,"tag":216,"props":1032,"children":1033},{"style":269},[1034],{"type":46,"value":366},{"type":40,"tag":216,"props":1036,"children":1037},{"style":263},[1038],{"type":46,"value":301},{"type":40,"tag":216,"props":1040,"children":1041},{"class":218,"line":551},[1042,1046,1050,1054,1058,1062,1067,1071,1075,1080,1084,1089],{"type":40,"tag":216,"props":1043,"children":1044},{"style":269},[1045],{"type":46,"value":557},{"type":40,"tag":216,"props":1047,"children":1048},{"style":263},[1049],{"type":46,"value":355},{"type":40,"tag":216,"props":1051,"children":1052},{"style":358},[1053],{"type":46,"value":566},{"type":40,"tag":216,"props":1055,"children":1056},{"style":269},[1057],{"type":46,"value":428},{"type":40,"tag":216,"props":1059,"children":1060},{"style":263},[1061],{"type":46,"value":296},{"type":40,"tag":216,"props":1063,"children":1064},{"style":228},[1065],{"type":46,"value":1066},"Exit code:",{"type":40,"tag":216,"props":1068,"children":1069},{"style":263},[1070],{"type":46,"value":296},{"type":40,"tag":216,"props":1072,"children":1073},{"style":263},[1074],{"type":46,"value":446},{"type":40,"tag":216,"props":1076,"children":1077},{"style":269},[1078],{"type":46,"value":1079}," output",{"type":40,"tag":216,"props":1081,"children":1082},{"style":263},[1083],{"type":46,"value":355},{"type":40,"tag":216,"props":1085,"children":1086},{"style":269},[1087],{"type":46,"value":1088},"code)",{"type":40,"tag":216,"props":1090,"children":1091},{"style":263},[1092],{"type":46,"value":301},{"type":40,"tag":216,"props":1094,"children":1095},{"class":218,"line":614},[1096,1100,1104,1108,1112,1116,1121,1125,1129,1134,1138,1142,1146,1150,1154,1158,1162],{"type":40,"tag":216,"props":1097,"children":1098},{"style":269},[1099],{"type":46,"value":557},{"type":40,"tag":216,"props":1101,"children":1102},{"style":263},[1103],{"type":46,"value":355},{"type":40,"tag":216,"props":1105,"children":1106},{"style":358},[1107],{"type":46,"value":566},{"type":40,"tag":216,"props":1109,"children":1110},{"style":269},[1111],{"type":46,"value":428},{"type":40,"tag":216,"props":1113,"children":1114},{"style":263},[1115],{"type":46,"value":296},{"type":40,"tag":216,"props":1117,"children":1118},{"style":228},[1119],{"type":46,"value":1120},"Stdout:",{"type":40,"tag":216,"props":1122,"children":1123},{"style":263},[1124],{"type":46,"value":296},{"type":40,"tag":216,"props":1126,"children":1127},{"style":263},[1128],{"type":46,"value":446},{"type":40,"tag":216,"props":1130,"children":1131},{"style":263},[1132],{"type":46,"value":1133}," new",{"type":40,"tag":216,"props":1135,"children":1136},{"style":358},[1137],{"type":46,"value":580},{"type":40,"tag":216,"props":1139,"children":1140},{"style":269},[1141],{"type":46,"value":366},{"type":40,"tag":216,"props":1143,"children":1144},{"style":263},[1145],{"type":46,"value":355},{"type":40,"tag":216,"props":1147,"children":1148},{"style":358},[1149],{"type":46,"value":593},{"type":40,"tag":216,"props":1151,"children":1152},{"style":269},[1153],{"type":46,"value":598},{"type":40,"tag":216,"props":1155,"children":1156},{"style":263},[1157],{"type":46,"value":355},{"type":40,"tag":216,"props":1159,"children":1160},{"style":269},[1161],{"type":46,"value":607},{"type":40,"tag":216,"props":1163,"children":1164},{"style":263},[1165],{"type":46,"value":301},{"type":40,"tag":216,"props":1167,"children":1169},{"class":218,"line":1168},12,[1170,1174,1178,1182,1186,1190,1195,1199,1203,1207,1211,1215,1219,1223,1227,1231,1236],{"type":40,"tag":216,"props":1171,"children":1172},{"style":269},[1173],{"type":46,"value":557},{"type":40,"tag":216,"props":1175,"children":1176},{"style":263},[1177],{"type":46,"value":355},{"type":40,"tag":216,"props":1179,"children":1180},{"style":358},[1181],{"type":46,"value":566},{"type":40,"tag":216,"props":1183,"children":1184},{"style":269},[1185],{"type":46,"value":428},{"type":40,"tag":216,"props":1187,"children":1188},{"style":263},[1189],{"type":46,"value":296},{"type":40,"tag":216,"props":1191,"children":1192},{"style":228},[1193],{"type":46,"value":1194},"Stderr:",{"type":40,"tag":216,"props":1196,"children":1197},{"style":263},[1198],{"type":46,"value":296},{"type":40,"tag":216,"props":1200,"children":1201},{"style":263},[1202],{"type":46,"value":446},{"type":40,"tag":216,"props":1204,"children":1205},{"style":263},[1206],{"type":46,"value":1133},{"type":40,"tag":216,"props":1208,"children":1209},{"style":358},[1210],{"type":46,"value":580},{"type":40,"tag":216,"props":1212,"children":1213},{"style":269},[1214],{"type":46,"value":366},{"type":40,"tag":216,"props":1216,"children":1217},{"style":263},[1218],{"type":46,"value":355},{"type":40,"tag":216,"props":1220,"children":1221},{"style":358},[1222],{"type":46,"value":593},{"type":40,"tag":216,"props":1224,"children":1225},{"style":269},[1226],{"type":46,"value":598},{"type":40,"tag":216,"props":1228,"children":1229},{"style":263},[1230],{"type":46,"value":355},{"type":40,"tag":216,"props":1232,"children":1233},{"style":269},[1234],{"type":46,"value":1235},"stderr))",{"type":40,"tag":216,"props":1237,"children":1238},{"style":263},[1239],{"type":46,"value":301},{"type":40,"tag":198,"props":1241,"children":1243},{"id":1242},"streaming-io",[1244],{"type":46,"value":1245},"Streaming I\u002FO",{"type":40,"tag":56,"props":1247,"children":1248},{},[1249],{"type":46,"value":1250},"For interactive processes or long-running commands:",{"type":40,"tag":205,"props":1252,"children":1254},{"className":245,"code":1253,"language":247,"meta":210,"style":210},"const child = await sandbox.spawn(\"deno\", {\n  args: [\"repl\"],\n  stdin: \"piped\",\n  stdout: \"piped\",\n});\n\n\u002F\u002F Write to stdin\nconst writer = child.stdin!.getWriter();\nawait writer.write(new TextEncoder().encode(\"console.log('Hello')\\n\"));\nawait writer.close();\n\n\u002F\u002F Read from stdout\nconst reader = child.stdout!.getReader();\nwhile (true) {\n  const { done, value } = await reader.read();\n  if (done) break;\n  console.log(new TextDecoder().decode(value));\n}\n",[1255],{"type":40,"tag":135,"props":1256,"children":1257},{"__ignoreMap":210},[1258,1313,1349,1376,1403,1418,1425,1433,1480,1559,1587,1594,1602,1649,1679,1741,1772,1830],{"type":40,"tag":216,"props":1259,"children":1260},{"class":218,"line":219},[1261,1265,1269,1273,1277,1281,1285,1289,1293,1297,1301,1305,1309],{"type":40,"tag":216,"props":1262,"children":1263},{"style":328},[1264],{"type":46,"value":396},{"type":40,"tag":216,"props":1266,"children":1267},{"style":269},[1268],{"type":46,"value":401},{"type":40,"tag":216,"props":1270,"children":1271},{"style":263},[1272],{"type":46,"value":341},{"type":40,"tag":216,"props":1274,"children":1275},{"style":257},[1276],{"type":46,"value":346},{"type":40,"tag":216,"props":1278,"children":1279},{"style":269},[1280],{"type":46,"value":414},{"type":40,"tag":216,"props":1282,"children":1283},{"style":263},[1284],{"type":46,"value":355},{"type":40,"tag":216,"props":1286,"children":1287},{"style":358},[1288],{"type":46,"value":423},{"type":40,"tag":216,"props":1290,"children":1291},{"style":269},[1292],{"type":46,"value":428},{"type":40,"tag":216,"props":1294,"children":1295},{"style":263},[1296],{"type":46,"value":296},{"type":40,"tag":216,"props":1298,"children":1299},{"style":228},[1300],{"type":46,"value":8},{"type":40,"tag":216,"props":1302,"children":1303},{"style":263},[1304],{"type":46,"value":296},{"type":40,"tag":216,"props":1306,"children":1307},{"style":263},[1308],{"type":46,"value":446},{"type":40,"tag":216,"props":1310,"children":1311},{"style":263},[1312],{"type":46,"value":813},{"type":40,"tag":216,"props":1314,"children":1315},{"class":218,"line":304},[1316,1320,1324,1328,1332,1337,1341,1345],{"type":40,"tag":216,"props":1317,"children":1318},{"style":453},[1319],{"type":46,"value":821},{"type":40,"tag":216,"props":1321,"children":1322},{"style":263},[1323],{"type":46,"value":461},{"type":40,"tag":216,"props":1325,"children":1326},{"style":269},[1327],{"type":46,"value":466},{"type":40,"tag":216,"props":1329,"children":1330},{"style":263},[1331],{"type":46,"value":296},{"type":40,"tag":216,"props":1333,"children":1334},{"style":228},[1335],{"type":46,"value":1336},"repl",{"type":40,"tag":216,"props":1338,"children":1339},{"style":263},[1340],{"type":46,"value":296},{"type":40,"tag":216,"props":1342,"children":1343},{"style":269},[1344],{"type":46,"value":864},{"type":40,"tag":216,"props":1346,"children":1347},{"style":263},[1348],{"type":46,"value":869},{"type":40,"tag":216,"props":1350,"children":1351},{"class":218,"line":314},[1352,1356,1360,1364,1368,1372],{"type":40,"tag":216,"props":1353,"children":1354},{"style":453},[1355],{"type":46,"value":877},{"type":40,"tag":216,"props":1357,"children":1358},{"style":263},[1359],{"type":46,"value":461},{"type":40,"tag":216,"props":1361,"children":1362},{"style":263},[1363],{"type":46,"value":287},{"type":40,"tag":216,"props":1365,"children":1366},{"style":228},[1367],{"type":46,"value":890},{"type":40,"tag":216,"props":1369,"children":1370},{"style":263},[1371],{"type":46,"value":296},{"type":40,"tag":216,"props":1373,"children":1374},{"style":263},[1375],{"type":46,"value":869},{"type":40,"tag":216,"props":1377,"children":1378},{"class":218,"line":324},[1379,1383,1387,1391,1395,1399],{"type":40,"tag":216,"props":1380,"children":1381},{"style":453},[1382],{"type":46,"value":911},{"type":40,"tag":216,"props":1384,"children":1385},{"style":263},[1386],{"type":46,"value":461},{"type":40,"tag":216,"props":1388,"children":1389},{"style":263},[1390],{"type":46,"value":287},{"type":40,"tag":216,"props":1392,"children":1393},{"style":228},[1394],{"type":46,"value":890},{"type":40,"tag":216,"props":1396,"children":1397},{"style":263},[1398],{"type":46,"value":296},{"type":40,"tag":216,"props":1400,"children":1401},{"style":263},[1402],{"type":46,"value":869},{"type":40,"tag":216,"props":1404,"children":1405},{"class":218,"line":373},[1406,1410,1414],{"type":40,"tag":216,"props":1407,"children":1408},{"style":263},[1409],{"type":46,"value":489},{"type":40,"tag":216,"props":1411,"children":1412},{"style":269},[1413],{"type":46,"value":494},{"type":40,"tag":216,"props":1415,"children":1416},{"style":263},[1417],{"type":46,"value":301},{"type":40,"tag":216,"props":1419,"children":1420},{"class":218,"line":381},[1421],{"type":40,"tag":216,"props":1422,"children":1423},{"emptyLinePlaceholder":308},[1424],{"type":46,"value":311},{"type":40,"tag":216,"props":1426,"children":1427},{"class":218,"line":390},[1428],{"type":40,"tag":216,"props":1429,"children":1430},{"style":318},[1431],{"type":46,"value":1432},"\u002F\u002F Write to stdin\n",{"type":40,"tag":216,"props":1434,"children":1435},{"class":218,"line":25},[1436,1440,1445,1449,1453,1457,1462,1467,1472,1476],{"type":40,"tag":216,"props":1437,"children":1438},{"style":328},[1439],{"type":46,"value":396},{"type":40,"tag":216,"props":1441,"children":1442},{"style":269},[1443],{"type":46,"value":1444}," writer ",{"type":40,"tag":216,"props":1446,"children":1447},{"style":263},[1448],{"type":46,"value":341},{"type":40,"tag":216,"props":1450,"children":1451},{"style":269},[1452],{"type":46,"value":523},{"type":40,"tag":216,"props":1454,"children":1455},{"style":263},[1456],{"type":46,"value":355},{"type":40,"tag":216,"props":1458,"children":1459},{"style":269},[1460],{"type":46,"value":1461},"stdin",{"type":40,"tag":216,"props":1463,"children":1464},{"style":263},[1465],{"type":46,"value":1466},"!.",{"type":40,"tag":216,"props":1468,"children":1469},{"style":358},[1470],{"type":46,"value":1471},"getWriter",{"type":40,"tag":216,"props":1473,"children":1474},{"style":269},[1475],{"type":46,"value":366},{"type":40,"tag":216,"props":1477,"children":1478},{"style":263},[1479],{"type":46,"value":301},{"type":40,"tag":216,"props":1481,"children":1482},{"class":218,"line":543},[1483,1488,1493,1497,1502,1506,1510,1515,1519,1523,1528,1532,1536,1541,1546,1550,1555],{"type":40,"tag":216,"props":1484,"children":1485},{"style":257},[1486],{"type":46,"value":1487},"await",{"type":40,"tag":216,"props":1489,"children":1490},{"style":269},[1491],{"type":46,"value":1492}," writer",{"type":40,"tag":216,"props":1494,"children":1495},{"style":263},[1496],{"type":46,"value":355},{"type":40,"tag":216,"props":1498,"children":1499},{"style":358},[1500],{"type":46,"value":1501},"write",{"type":40,"tag":216,"props":1503,"children":1504},{"style":269},[1505],{"type":46,"value":428},{"type":40,"tag":216,"props":1507,"children":1508},{"style":263},[1509],{"type":46,"value":575},{"type":40,"tag":216,"props":1511,"children":1512},{"style":358},[1513],{"type":46,"value":1514}," TextEncoder",{"type":40,"tag":216,"props":1516,"children":1517},{"style":269},[1518],{"type":46,"value":366},{"type":40,"tag":216,"props":1520,"children":1521},{"style":263},[1522],{"type":46,"value":355},{"type":40,"tag":216,"props":1524,"children":1525},{"style":358},[1526],{"type":46,"value":1527},"encode",{"type":40,"tag":216,"props":1529,"children":1530},{"style":269},[1531],{"type":46,"value":428},{"type":40,"tag":216,"props":1533,"children":1534},{"style":263},[1535],{"type":46,"value":296},{"type":40,"tag":216,"props":1537,"children":1538},{"style":228},[1539],{"type":46,"value":1540},"console.log('Hello')",{"type":40,"tag":216,"props":1542,"children":1543},{"style":269},[1544],{"type":46,"value":1545},"\\n",{"type":40,"tag":216,"props":1547,"children":1548},{"style":263},[1549],{"type":46,"value":296},{"type":40,"tag":216,"props":1551,"children":1552},{"style":269},[1553],{"type":46,"value":1554},"))",{"type":40,"tag":216,"props":1556,"children":1557},{"style":263},[1558],{"type":46,"value":301},{"type":40,"tag":216,"props":1560,"children":1561},{"class":218,"line":551},[1562,1566,1570,1574,1579,1583],{"type":40,"tag":216,"props":1563,"children":1564},{"style":257},[1565],{"type":46,"value":1487},{"type":40,"tag":216,"props":1567,"children":1568},{"style":269},[1569],{"type":46,"value":1492},{"type":40,"tag":216,"props":1571,"children":1572},{"style":263},[1573],{"type":46,"value":355},{"type":40,"tag":216,"props":1575,"children":1576},{"style":358},[1577],{"type":46,"value":1578},"close",{"type":40,"tag":216,"props":1580,"children":1581},{"style":269},[1582],{"type":46,"value":366},{"type":40,"tag":216,"props":1584,"children":1585},{"style":263},[1586],{"type":46,"value":301},{"type":40,"tag":216,"props":1588,"children":1589},{"class":218,"line":614},[1590],{"type":40,"tag":216,"props":1591,"children":1592},{"emptyLinePlaceholder":308},[1593],{"type":46,"value":311},{"type":40,"tag":216,"props":1595,"children":1596},{"class":218,"line":1168},[1597],{"type":40,"tag":216,"props":1598,"children":1599},{"style":318},[1600],{"type":46,"value":1601},"\u002F\u002F Read from stdout\n",{"type":40,"tag":216,"props":1603,"children":1605},{"class":218,"line":1604},13,[1606,1610,1615,1619,1623,1627,1632,1636,1641,1645],{"type":40,"tag":216,"props":1607,"children":1608},{"style":328},[1609],{"type":46,"value":396},{"type":40,"tag":216,"props":1611,"children":1612},{"style":269},[1613],{"type":46,"value":1614}," reader ",{"type":40,"tag":216,"props":1616,"children":1617},{"style":263},[1618],{"type":46,"value":341},{"type":40,"tag":216,"props":1620,"children":1621},{"style":269},[1622],{"type":46,"value":523},{"type":40,"tag":216,"props":1624,"children":1625},{"style":263},[1626],{"type":46,"value":355},{"type":40,"tag":216,"props":1628,"children":1629},{"style":269},[1630],{"type":46,"value":1631},"stdout",{"type":40,"tag":216,"props":1633,"children":1634},{"style":263},[1635],{"type":46,"value":1466},{"type":40,"tag":216,"props":1637,"children":1638},{"style":358},[1639],{"type":46,"value":1640},"getReader",{"type":40,"tag":216,"props":1642,"children":1643},{"style":269},[1644],{"type":46,"value":366},{"type":40,"tag":216,"props":1646,"children":1647},{"style":263},[1648],{"type":46,"value":301},{"type":40,"tag":216,"props":1650,"children":1652},{"class":218,"line":1651},14,[1653,1658,1663,1669,1674],{"type":40,"tag":216,"props":1654,"children":1655},{"style":257},[1656],{"type":46,"value":1657},"while",{"type":40,"tag":216,"props":1659,"children":1660},{"style":269},[1661],{"type":46,"value":1662}," (",{"type":40,"tag":216,"props":1664,"children":1666},{"style":1665},"--shiki-light:#FF5370;--shiki-default:#FF9CAC;--shiki-dark:#FF9CAC",[1667],{"type":46,"value":1668},"true",{"type":40,"tag":216,"props":1670,"children":1671},{"style":269},[1672],{"type":46,"value":1673},") ",{"type":40,"tag":216,"props":1675,"children":1676},{"style":263},[1677],{"type":46,"value":1678},"{\n",{"type":40,"tag":216,"props":1680,"children":1682},{"class":218,"line":1681},15,[1683,1688,1692,1697,1701,1706,1710,1715,1719,1724,1728,1733,1737],{"type":40,"tag":216,"props":1684,"children":1685},{"style":328},[1686],{"type":46,"value":1687},"  const",{"type":40,"tag":216,"props":1689,"children":1690},{"style":263},[1691],{"type":46,"value":266},{"type":40,"tag":216,"props":1693,"children":1694},{"style":269},[1695],{"type":46,"value":1696}," done",{"type":40,"tag":216,"props":1698,"children":1699},{"style":263},[1700],{"type":46,"value":446},{"type":40,"tag":216,"props":1702,"children":1703},{"style":269},[1704],{"type":46,"value":1705}," value",{"type":40,"tag":216,"props":1707,"children":1708},{"style":263},[1709],{"type":46,"value":277},{"type":40,"tag":216,"props":1711,"children":1712},{"style":263},[1713],{"type":46,"value":1714}," =",{"type":40,"tag":216,"props":1716,"children":1717},{"style":257},[1718],{"type":46,"value":346},{"type":40,"tag":216,"props":1720,"children":1721},{"style":269},[1722],{"type":46,"value":1723}," reader",{"type":40,"tag":216,"props":1725,"children":1726},{"style":263},[1727],{"type":46,"value":355},{"type":40,"tag":216,"props":1729,"children":1730},{"style":358},[1731],{"type":46,"value":1732},"read",{"type":40,"tag":216,"props":1734,"children":1735},{"style":453},[1736],{"type":46,"value":366},{"type":40,"tag":216,"props":1738,"children":1739},{"style":263},[1740],{"type":46,"value":301},{"type":40,"tag":216,"props":1742,"children":1744},{"class":218,"line":1743},16,[1745,1750,1754,1759,1763,1768],{"type":40,"tag":216,"props":1746,"children":1747},{"style":257},[1748],{"type":46,"value":1749},"  if",{"type":40,"tag":216,"props":1751,"children":1752},{"style":453},[1753],{"type":46,"value":1662},{"type":40,"tag":216,"props":1755,"children":1756},{"style":269},[1757],{"type":46,"value":1758},"done",{"type":40,"tag":216,"props":1760,"children":1761},{"style":453},[1762],{"type":46,"value":1673},{"type":40,"tag":216,"props":1764,"children":1765},{"style":257},[1766],{"type":46,"value":1767},"break",{"type":40,"tag":216,"props":1769,"children":1770},{"style":263},[1771],{"type":46,"value":301},{"type":40,"tag":216,"props":1773,"children":1775},{"class":218,"line":1774},17,[1776,1781,1785,1789,1793,1797,1801,1805,1809,1813,1817,1822,1826],{"type":40,"tag":216,"props":1777,"children":1778},{"style":269},[1779],{"type":46,"value":1780},"  console",{"type":40,"tag":216,"props":1782,"children":1783},{"style":263},[1784],{"type":46,"value":355},{"type":40,"tag":216,"props":1786,"children":1787},{"style":358},[1788],{"type":46,"value":566},{"type":40,"tag":216,"props":1790,"children":1791},{"style":453},[1792],{"type":46,"value":428},{"type":40,"tag":216,"props":1794,"children":1795},{"style":263},[1796],{"type":46,"value":575},{"type":40,"tag":216,"props":1798,"children":1799},{"style":358},[1800],{"type":46,"value":580},{"type":40,"tag":216,"props":1802,"children":1803},{"style":453},[1804],{"type":46,"value":366},{"type":40,"tag":216,"props":1806,"children":1807},{"style":263},[1808],{"type":46,"value":355},{"type":40,"tag":216,"props":1810,"children":1811},{"style":358},[1812],{"type":46,"value":593},{"type":40,"tag":216,"props":1814,"children":1815},{"style":453},[1816],{"type":46,"value":428},{"type":40,"tag":216,"props":1818,"children":1819},{"style":269},[1820],{"type":46,"value":1821},"value",{"type":40,"tag":216,"props":1823,"children":1824},{"style":453},[1825],{"type":46,"value":1554},{"type":40,"tag":216,"props":1827,"children":1828},{"style":263},[1829],{"type":46,"value":301},{"type":40,"tag":216,"props":1831,"children":1833},{"class":218,"line":1832},18,[1834],{"type":40,"tag":216,"props":1835,"children":1836},{"style":263},[1837],{"type":46,"value":1838},"}\n",{"type":40,"tag":198,"props":1840,"children":1842},{"id":1841},"killing-processes",[1843],{"type":46,"value":1844},"Killing Processes",{"type":40,"tag":205,"props":1846,"children":1848},{"className":245,"code":1847,"language":247,"meta":210,"style":210},"const child = await sandbox.spawn(\"sleep\", { args: [\"60\"] });\n\n\u002F\u002F Kill with SIGTERM (default)\nawait child.kill();\n\n\u002F\u002F Or with specific signal\nawait child.kill(\"SIGKILL\");\n\n\u002F\u002F Wait for exit\nconst status = await child.status;\nconsole.log(\"Exited with signal:\", status.signal);\n",[1849],{"type":40,"tag":135,"props":1850,"children":1851},{"__ignoreMap":210},[1852,1949,1956,1964,1992,1999,2007,2051,2058,2066,2103],{"type":40,"tag":216,"props":1853,"children":1854},{"class":218,"line":219},[1855,1859,1863,1867,1871,1875,1879,1883,1887,1891,1896,1900,1904,1908,1912,1916,1920,1924,1929,1933,1937,1941,1945],{"type":40,"tag":216,"props":1856,"children":1857},{"style":328},[1858],{"type":46,"value":396},{"type":40,"tag":216,"props":1860,"children":1861},{"style":269},[1862],{"type":46,"value":401},{"type":40,"tag":216,"props":1864,"children":1865},{"style":263},[1866],{"type":46,"value":341},{"type":40,"tag":216,"props":1868,"children":1869},{"style":257},[1870],{"type":46,"value":346},{"type":40,"tag":216,"props":1872,"children":1873},{"style":269},[1874],{"type":46,"value":414},{"type":40,"tag":216,"props":1876,"children":1877},{"style":263},[1878],{"type":46,"value":355},{"type":40,"tag":216,"props":1880,"children":1881},{"style":358},[1882],{"type":46,"value":423},{"type":40,"tag":216,"props":1884,"children":1885},{"style":269},[1886],{"type":46,"value":428},{"type":40,"tag":216,"props":1888,"children":1889},{"style":263},[1890],{"type":46,"value":296},{"type":40,"tag":216,"props":1892,"children":1893},{"style":228},[1894],{"type":46,"value":1895},"sleep",{"type":40,"tag":216,"props":1897,"children":1898},{"style":263},[1899],{"type":46,"value":296},{"type":40,"tag":216,"props":1901,"children":1902},{"style":263},[1903],{"type":46,"value":446},{"type":40,"tag":216,"props":1905,"children":1906},{"style":263},[1907],{"type":46,"value":266},{"type":40,"tag":216,"props":1909,"children":1910},{"style":453},[1911],{"type":46,"value":456},{"type":40,"tag":216,"props":1913,"children":1914},{"style":263},[1915],{"type":46,"value":461},{"type":40,"tag":216,"props":1917,"children":1918},{"style":269},[1919],{"type":46,"value":466},{"type":40,"tag":216,"props":1921,"children":1922},{"style":263},[1923],{"type":46,"value":296},{"type":40,"tag":216,"props":1925,"children":1926},{"style":228},[1927],{"type":46,"value":1928},"60",{"type":40,"tag":216,"props":1930,"children":1931},{"style":263},[1932],{"type":46,"value":296},{"type":40,"tag":216,"props":1934,"children":1935},{"style":269},[1936],{"type":46,"value":484},{"type":40,"tag":216,"props":1938,"children":1939},{"style":263},[1940],{"type":46,"value":489},{"type":40,"tag":216,"props":1942,"children":1943},{"style":269},[1944],{"type":46,"value":494},{"type":40,"tag":216,"props":1946,"children":1947},{"style":263},[1948],{"type":46,"value":301},{"type":40,"tag":216,"props":1950,"children":1951},{"class":218,"line":304},[1952],{"type":40,"tag":216,"props":1953,"children":1954},{"emptyLinePlaceholder":308},[1955],{"type":46,"value":311},{"type":40,"tag":216,"props":1957,"children":1958},{"class":218,"line":314},[1959],{"type":40,"tag":216,"props":1960,"children":1961},{"style":318},[1962],{"type":46,"value":1963},"\u002F\u002F Kill with SIGTERM (default)\n",{"type":40,"tag":216,"props":1965,"children":1966},{"class":218,"line":324},[1967,1971,1975,1979,1984,1988],{"type":40,"tag":216,"props":1968,"children":1969},{"style":257},[1970],{"type":46,"value":1487},{"type":40,"tag":216,"props":1972,"children":1973},{"style":269},[1974],{"type":46,"value":523},{"type":40,"tag":216,"props":1976,"children":1977},{"style":263},[1978],{"type":46,"value":355},{"type":40,"tag":216,"props":1980,"children":1981},{"style":358},[1982],{"type":46,"value":1983},"kill",{"type":40,"tag":216,"props":1985,"children":1986},{"style":269},[1987],{"type":46,"value":366},{"type":40,"tag":216,"props":1989,"children":1990},{"style":263},[1991],{"type":46,"value":301},{"type":40,"tag":216,"props":1993,"children":1994},{"class":218,"line":373},[1995],{"type":40,"tag":216,"props":1996,"children":1997},{"emptyLinePlaceholder":308},[1998],{"type":46,"value":311},{"type":40,"tag":216,"props":2000,"children":2001},{"class":218,"line":381},[2002],{"type":40,"tag":216,"props":2003,"children":2004},{"style":318},[2005],{"type":46,"value":2006},"\u002F\u002F Or with specific signal\n",{"type":40,"tag":216,"props":2008,"children":2009},{"class":218,"line":390},[2010,2014,2018,2022,2026,2030,2034,2039,2043,2047],{"type":40,"tag":216,"props":2011,"children":2012},{"style":257},[2013],{"type":46,"value":1487},{"type":40,"tag":216,"props":2015,"children":2016},{"style":269},[2017],{"type":46,"value":523},{"type":40,"tag":216,"props":2019,"children":2020},{"style":263},[2021],{"type":46,"value":355},{"type":40,"tag":216,"props":2023,"children":2024},{"style":358},[2025],{"type":46,"value":1983},{"type":40,"tag":216,"props":2027,"children":2028},{"style":269},[2029],{"type":46,"value":428},{"type":40,"tag":216,"props":2031,"children":2032},{"style":263},[2033],{"type":46,"value":296},{"type":40,"tag":216,"props":2035,"children":2036},{"style":228},[2037],{"type":46,"value":2038},"SIGKILL",{"type":40,"tag":216,"props":2040,"children":2041},{"style":263},[2042],{"type":46,"value":296},{"type":40,"tag":216,"props":2044,"children":2045},{"style":269},[2046],{"type":46,"value":494},{"type":40,"tag":216,"props":2048,"children":2049},{"style":263},[2050],{"type":46,"value":301},{"type":40,"tag":216,"props":2052,"children":2053},{"class":218,"line":25},[2054],{"type":40,"tag":216,"props":2055,"children":2056},{"emptyLinePlaceholder":308},[2057],{"type":46,"value":311},{"type":40,"tag":216,"props":2059,"children":2060},{"class":218,"line":543},[2061],{"type":40,"tag":216,"props":2062,"children":2063},{"style":318},[2064],{"type":46,"value":2065},"\u002F\u002F Wait for exit\n",{"type":40,"tag":216,"props":2067,"children":2068},{"class":218,"line":551},[2069,2073,2078,2082,2086,2090,2094,2099],{"type":40,"tag":216,"props":2070,"children":2071},{"style":328},[2072],{"type":46,"value":396},{"type":40,"tag":216,"props":2074,"children":2075},{"style":269},[2076],{"type":46,"value":2077}," status ",{"type":40,"tag":216,"props":2079,"children":2080},{"style":263},[2081],{"type":46,"value":341},{"type":40,"tag":216,"props":2083,"children":2084},{"style":257},[2085],{"type":46,"value":346},{"type":40,"tag":216,"props":2087,"children":2088},{"style":269},[2089],{"type":46,"value":523},{"type":40,"tag":216,"props":2091,"children":2092},{"style":263},[2093],{"type":46,"value":355},{"type":40,"tag":216,"props":2095,"children":2096},{"style":269},[2097],{"type":46,"value":2098},"status",{"type":40,"tag":216,"props":2100,"children":2101},{"style":263},[2102],{"type":46,"value":301},{"type":40,"tag":216,"props":2104,"children":2105},{"class":218,"line":614},[2106,2110,2114,2118,2122,2126,2131,2135,2139,2144,2148,2153],{"type":40,"tag":216,"props":2107,"children":2108},{"style":269},[2109],{"type":46,"value":557},{"type":40,"tag":216,"props":2111,"children":2112},{"style":263},[2113],{"type":46,"value":355},{"type":40,"tag":216,"props":2115,"children":2116},{"style":358},[2117],{"type":46,"value":566},{"type":40,"tag":216,"props":2119,"children":2120},{"style":269},[2121],{"type":46,"value":428},{"type":40,"tag":216,"props":2123,"children":2124},{"style":263},[2125],{"type":46,"value":296},{"type":40,"tag":216,"props":2127,"children":2128},{"style":228},[2129],{"type":46,"value":2130},"Exited with signal:",{"type":40,"tag":216,"props":2132,"children":2133},{"style":263},[2134],{"type":46,"value":296},{"type":40,"tag":216,"props":2136,"children":2137},{"style":263},[2138],{"type":46,"value":446},{"type":40,"tag":216,"props":2140,"children":2141},{"style":269},[2142],{"type":46,"value":2143}," status",{"type":40,"tag":216,"props":2145,"children":2146},{"style":263},[2147],{"type":46,"value":355},{"type":40,"tag":216,"props":2149,"children":2150},{"style":269},[2151],{"type":46,"value":2152},"signal)",{"type":40,"tag":216,"props":2154,"children":2155},{"style":263},[2156],{"type":46,"value":301},{"type":40,"tag":49,"props":2158,"children":2160},{"id":2159},"common-patterns",[2161],{"type":46,"value":2162},"Common Patterns",{"type":40,"tag":198,"props":2164,"children":2166},{"id":2165},"running-user-code-safely",[2167],{"type":46,"value":2168},"Running User Code Safely",{"type":40,"tag":205,"props":2170,"children":2172},{"className":245,"code":2171,"language":247,"meta":210,"style":210},"import { Sandbox } from \"@deno\u002Fsandbox\";\n\nasync function runUserCode(code: string): Promise\u003Cstring> {\n  await using sandbox = await Sandbox.create();\n\n  \u002F\u002F Write user code to a file in the sandbox\n  await sandbox.fs.writeFile(\"\u002Ftmp\u002Fuser_code.ts\", code);\n\n  \u002F\u002F Run with restricted permissions\n  const child = await sandbox.spawn(\"deno\", {\n    args: [\n      \"run\",\n      \"--allow-none\", \u002F\u002F No permissions\n      \"\u002Ftmp\u002Fuser_code.ts\",\n    ],\n    stdout: \"piped\",\n    stderr: \"piped\",\n  });\n\n  const output = await child.output();\n\n  if (output.code !== 0) {\n    throw new Error(new TextDecoder().decode(output.stderr));\n  }\n\n  return new TextDecoder().decode(output.stdout);\n}\n",[2173],{"type":40,"tag":135,"props":2174,"children":2175},{"__ignoreMap":210},[2176,2215,2222,2287,2327,2334,2342,2406,2413,2421,2476,2493,2513,2538,2557,2569,2597,2625,2641,2649,2689,2697,2740,2807,2816,2824,2877],{"type":40,"tag":216,"props":2177,"children":2178},{"class":218,"line":219},[2179,2183,2187,2191,2195,2199,2203,2207,2211],{"type":40,"tag":216,"props":2180,"children":2181},{"style":257},[2182],{"type":46,"value":260},{"type":40,"tag":216,"props":2184,"children":2185},{"style":263},[2186],{"type":46,"value":266},{"type":40,"tag":216,"props":2188,"children":2189},{"style":269},[2190],{"type":46,"value":272},{"type":40,"tag":216,"props":2192,"children":2193},{"style":263},[2194],{"type":46,"value":277},{"type":40,"tag":216,"props":2196,"children":2197},{"style":257},[2198],{"type":46,"value":282},{"type":40,"tag":216,"props":2200,"children":2201},{"style":263},[2202],{"type":46,"value":287},{"type":40,"tag":216,"props":2204,"children":2205},{"style":228},[2206],{"type":46,"value":140},{"type":40,"tag":216,"props":2208,"children":2209},{"style":263},[2210],{"type":46,"value":296},{"type":40,"tag":216,"props":2212,"children":2213},{"style":263},[2214],{"type":46,"value":301},{"type":40,"tag":216,"props":2216,"children":2217},{"class":218,"line":304},[2218],{"type":40,"tag":216,"props":2219,"children":2220},{"emptyLinePlaceholder":308},[2221],{"type":46,"value":311},{"type":40,"tag":216,"props":2223,"children":2224},{"class":218,"line":314},[2225,2230,2235,2240,2244,2249,2253,2258,2263,2268,2273,2278,2283],{"type":40,"tag":216,"props":2226,"children":2227},{"style":328},[2228],{"type":46,"value":2229},"async",{"type":40,"tag":216,"props":2231,"children":2232},{"style":328},[2233],{"type":46,"value":2234}," function",{"type":40,"tag":216,"props":2236,"children":2237},{"style":358},[2238],{"type":46,"value":2239}," runUserCode",{"type":40,"tag":216,"props":2241,"children":2242},{"style":263},[2243],{"type":46,"value":428},{"type":40,"tag":216,"props":2245,"children":2247},{"style":2246},"--shiki-light:#90A4AE;--shiki-light-font-style:italic;--shiki-default:#EEFFFF;--shiki-default-font-style:italic;--shiki-dark:#BABED8;--shiki-dark-font-style:italic",[2248],{"type":46,"value":135},{"type":40,"tag":216,"props":2250,"children":2251},{"style":263},[2252],{"type":46,"value":461},{"type":40,"tag":216,"props":2254,"children":2255},{"style":223},[2256],{"type":46,"value":2257}," string",{"type":40,"tag":216,"props":2259,"children":2260},{"style":263},[2261],{"type":46,"value":2262},"):",{"type":40,"tag":216,"props":2264,"children":2265},{"style":223},[2266],{"type":46,"value":2267}," Promise",{"type":40,"tag":216,"props":2269,"children":2270},{"style":263},[2271],{"type":46,"value":2272},"\u003C",{"type":40,"tag":216,"props":2274,"children":2275},{"style":223},[2276],{"type":46,"value":2277},"string",{"type":40,"tag":216,"props":2279,"children":2280},{"style":263},[2281],{"type":46,"value":2282},">",{"type":40,"tag":216,"props":2284,"children":2285},{"style":263},[2286],{"type":46,"value":813},{"type":40,"tag":216,"props":2288,"children":2289},{"class":218,"line":324},[2290,2295,2299,2303,2307,2311,2315,2319,2323],{"type":40,"tag":216,"props":2291,"children":2292},{"style":328},[2293],{"type":46,"value":2294},"  await using",{"type":40,"tag":216,"props":2296,"children":2297},{"style":269},[2298],{"type":46,"value":414},{"type":40,"tag":216,"props":2300,"children":2301},{"style":263},[2302],{"type":46,"value":1714},{"type":40,"tag":216,"props":2304,"children":2305},{"style":257},[2306],{"type":46,"value":346},{"type":40,"tag":216,"props":2308,"children":2309},{"style":269},[2310],{"type":46,"value":272},{"type":40,"tag":216,"props":2312,"children":2313},{"style":263},[2314],{"type":46,"value":355},{"type":40,"tag":216,"props":2316,"children":2317},{"style":358},[2318],{"type":46,"value":361},{"type":40,"tag":216,"props":2320,"children":2321},{"style":453},[2322],{"type":46,"value":366},{"type":40,"tag":216,"props":2324,"children":2325},{"style":263},[2326],{"type":46,"value":301},{"type":40,"tag":216,"props":2328,"children":2329},{"class":218,"line":373},[2330],{"type":40,"tag":216,"props":2331,"children":2332},{"emptyLinePlaceholder":308},[2333],{"type":46,"value":311},{"type":40,"tag":216,"props":2335,"children":2336},{"class":218,"line":381},[2337],{"type":40,"tag":216,"props":2338,"children":2339},{"style":318},[2340],{"type":46,"value":2341},"  \u002F\u002F Write user code to a file in the sandbox\n",{"type":40,"tag":216,"props":2343,"children":2344},{"class":218,"line":390},[2345,2350,2354,2358,2363,2367,2372,2376,2380,2385,2389,2393,2398,2402],{"type":40,"tag":216,"props":2346,"children":2347},{"style":257},[2348],{"type":46,"value":2349},"  await",{"type":40,"tag":216,"props":2351,"children":2352},{"style":269},[2353],{"type":46,"value":414},{"type":40,"tag":216,"props":2355,"children":2356},{"style":263},[2357],{"type":46,"value":355},{"type":40,"tag":216,"props":2359,"children":2360},{"style":269},[2361],{"type":46,"value":2362},"fs",{"type":40,"tag":216,"props":2364,"children":2365},{"style":263},[2366],{"type":46,"value":355},{"type":40,"tag":216,"props":2368,"children":2369},{"style":358},[2370],{"type":46,"value":2371},"writeFile",{"type":40,"tag":216,"props":2373,"children":2374},{"style":453},[2375],{"type":46,"value":428},{"type":40,"tag":216,"props":2377,"children":2378},{"style":263},[2379],{"type":46,"value":296},{"type":40,"tag":216,"props":2381,"children":2382},{"style":228},[2383],{"type":46,"value":2384},"\u002Ftmp\u002Fuser_code.ts",{"type":40,"tag":216,"props":2386,"children":2387},{"style":263},[2388],{"type":46,"value":296},{"type":40,"tag":216,"props":2390,"children":2391},{"style":263},[2392],{"type":46,"value":446},{"type":40,"tag":216,"props":2394,"children":2395},{"style":269},[2396],{"type":46,"value":2397}," code",{"type":40,"tag":216,"props":2399,"children":2400},{"style":453},[2401],{"type":46,"value":494},{"type":40,"tag":216,"props":2403,"children":2404},{"style":263},[2405],{"type":46,"value":301},{"type":40,"tag":216,"props":2407,"children":2408},{"class":218,"line":25},[2409],{"type":40,"tag":216,"props":2410,"children":2411},{"emptyLinePlaceholder":308},[2412],{"type":46,"value":311},{"type":40,"tag":216,"props":2414,"children":2415},{"class":218,"line":543},[2416],{"type":40,"tag":216,"props":2417,"children":2418},{"style":318},[2419],{"type":46,"value":2420},"  \u002F\u002F Run with restricted permissions\n",{"type":40,"tag":216,"props":2422,"children":2423},{"class":218,"line":551},[2424,2428,2432,2436,2440,2444,2448,2452,2456,2460,2464,2468,2472],{"type":40,"tag":216,"props":2425,"children":2426},{"style":328},[2427],{"type":46,"value":1687},{"type":40,"tag":216,"props":2429,"children":2430},{"style":269},[2431],{"type":46,"value":523},{"type":40,"tag":216,"props":2433,"children":2434},{"style":263},[2435],{"type":46,"value":1714},{"type":40,"tag":216,"props":2437,"children":2438},{"style":257},[2439],{"type":46,"value":346},{"type":40,"tag":216,"props":2441,"children":2442},{"style":269},[2443],{"type":46,"value":414},{"type":40,"tag":216,"props":2445,"children":2446},{"style":263},[2447],{"type":46,"value":355},{"type":40,"tag":216,"props":2449,"children":2450},{"style":358},[2451],{"type":46,"value":423},{"type":40,"tag":216,"props":2453,"children":2454},{"style":453},[2455],{"type":46,"value":428},{"type":40,"tag":216,"props":2457,"children":2458},{"style":263},[2459],{"type":46,"value":296},{"type":40,"tag":216,"props":2461,"children":2462},{"style":228},[2463],{"type":46,"value":8},{"type":40,"tag":216,"props":2465,"children":2466},{"style":263},[2467],{"type":46,"value":296},{"type":40,"tag":216,"props":2469,"children":2470},{"style":263},[2471],{"type":46,"value":446},{"type":40,"tag":216,"props":2473,"children":2474},{"style":263},[2475],{"type":46,"value":813},{"type":40,"tag":216,"props":2477,"children":2478},{"class":218,"line":614},[2479,2484,2488],{"type":40,"tag":216,"props":2480,"children":2481},{"style":453},[2482],{"type":46,"value":2483},"    args",{"type":40,"tag":216,"props":2485,"children":2486},{"style":263},[2487],{"type":46,"value":461},{"type":40,"tag":216,"props":2489,"children":2490},{"style":453},[2491],{"type":46,"value":2492}," [\n",{"type":40,"tag":216,"props":2494,"children":2495},{"class":218,"line":1168},[2496,2501,2505,2509],{"type":40,"tag":216,"props":2497,"children":2498},{"style":263},[2499],{"type":46,"value":2500},"      \"",{"type":40,"tag":216,"props":2502,"children":2503},{"style":228},[2504],{"type":46,"value":838},{"type":40,"tag":216,"props":2506,"children":2507},{"style":263},[2508],{"type":46,"value":296},{"type":40,"tag":216,"props":2510,"children":2511},{"style":263},[2512],{"type":46,"value":869},{"type":40,"tag":216,"props":2514,"children":2515},{"class":218,"line":1604},[2516,2520,2525,2529,2533],{"type":40,"tag":216,"props":2517,"children":2518},{"style":263},[2519],{"type":46,"value":2500},{"type":40,"tag":216,"props":2521,"children":2522},{"style":228},[2523],{"type":46,"value":2524},"--allow-none",{"type":40,"tag":216,"props":2526,"children":2527},{"style":263},[2528],{"type":46,"value":296},{"type":40,"tag":216,"props":2530,"children":2531},{"style":263},[2532],{"type":46,"value":446},{"type":40,"tag":216,"props":2534,"children":2535},{"style":318},[2536],{"type":46,"value":2537}," \u002F\u002F No permissions\n",{"type":40,"tag":216,"props":2539,"children":2540},{"class":218,"line":1651},[2541,2545,2549,2553],{"type":40,"tag":216,"props":2542,"children":2543},{"style":263},[2544],{"type":46,"value":2500},{"type":40,"tag":216,"props":2546,"children":2547},{"style":228},[2548],{"type":46,"value":2384},{"type":40,"tag":216,"props":2550,"children":2551},{"style":263},[2552],{"type":46,"value":296},{"type":40,"tag":216,"props":2554,"children":2555},{"style":263},[2556],{"type":46,"value":869},{"type":40,"tag":216,"props":2558,"children":2559},{"class":218,"line":1681},[2560,2565],{"type":40,"tag":216,"props":2561,"children":2562},{"style":453},[2563],{"type":46,"value":2564},"    ]",{"type":40,"tag":216,"props":2566,"children":2567},{"style":263},[2568],{"type":46,"value":869},{"type":40,"tag":216,"props":2570,"children":2571},{"class":218,"line":1743},[2572,2577,2581,2585,2589,2593],{"type":40,"tag":216,"props":2573,"children":2574},{"style":453},[2575],{"type":46,"value":2576},"    stdout",{"type":40,"tag":216,"props":2578,"children":2579},{"style":263},[2580],{"type":46,"value":461},{"type":40,"tag":216,"props":2582,"children":2583},{"style":263},[2584],{"type":46,"value":287},{"type":40,"tag":216,"props":2586,"children":2587},{"style":228},[2588],{"type":46,"value":890},{"type":40,"tag":216,"props":2590,"children":2591},{"style":263},[2592],{"type":46,"value":296},{"type":40,"tag":216,"props":2594,"children":2595},{"style":263},[2596],{"type":46,"value":869},{"type":40,"tag":216,"props":2598,"children":2599},{"class":218,"line":1774},[2600,2605,2609,2613,2617,2621],{"type":40,"tag":216,"props":2601,"children":2602},{"style":453},[2603],{"type":46,"value":2604},"    stderr",{"type":40,"tag":216,"props":2606,"children":2607},{"style":263},[2608],{"type":46,"value":461},{"type":40,"tag":216,"props":2610,"children":2611},{"style":263},[2612],{"type":46,"value":287},{"type":40,"tag":216,"props":2614,"children":2615},{"style":228},[2616],{"type":46,"value":890},{"type":40,"tag":216,"props":2618,"children":2619},{"style":263},[2620],{"type":46,"value":296},{"type":40,"tag":216,"props":2622,"children":2623},{"style":263},[2624],{"type":46,"value":869},{"type":40,"tag":216,"props":2626,"children":2627},{"class":218,"line":1832},[2628,2633,2637],{"type":40,"tag":216,"props":2629,"children":2630},{"style":263},[2631],{"type":46,"value":2632},"  }",{"type":40,"tag":216,"props":2634,"children":2635},{"style":453},[2636],{"type":46,"value":494},{"type":40,"tag":216,"props":2638,"children":2639},{"style":263},[2640],{"type":46,"value":301},{"type":40,"tag":216,"props":2642,"children":2644},{"class":218,"line":2643},19,[2645],{"type":40,"tag":216,"props":2646,"children":2647},{"emptyLinePlaceholder":308},[2648],{"type":46,"value":311},{"type":40,"tag":216,"props":2650,"children":2652},{"class":218,"line":2651},20,[2653,2657,2661,2665,2669,2673,2677,2681,2685],{"type":40,"tag":216,"props":2654,"children":2655},{"style":328},[2656],{"type":46,"value":1687},{"type":40,"tag":216,"props":2658,"children":2659},{"style":269},[2660],{"type":46,"value":1079},{"type":40,"tag":216,"props":2662,"children":2663},{"style":263},[2664],{"type":46,"value":1714},{"type":40,"tag":216,"props":2666,"children":2667},{"style":257},[2668],{"type":46,"value":346},{"type":40,"tag":216,"props":2670,"children":2671},{"style":269},[2672],{"type":46,"value":523},{"type":40,"tag":216,"props":2674,"children":2675},{"style":263},[2676],{"type":46,"value":355},{"type":40,"tag":216,"props":2678,"children":2679},{"style":358},[2680],{"type":46,"value":532},{"type":40,"tag":216,"props":2682,"children":2683},{"style":453},[2684],{"type":46,"value":366},{"type":40,"tag":216,"props":2686,"children":2687},{"style":263},[2688],{"type":46,"value":301},{"type":40,"tag":216,"props":2690,"children":2692},{"class":218,"line":2691},21,[2693],{"type":40,"tag":216,"props":2694,"children":2695},{"emptyLinePlaceholder":308},[2696],{"type":46,"value":311},{"type":40,"tag":216,"props":2698,"children":2700},{"class":218,"line":2699},22,[2701,2705,2709,2713,2717,2721,2726,2732,2736],{"type":40,"tag":216,"props":2702,"children":2703},{"style":257},[2704],{"type":46,"value":1749},{"type":40,"tag":216,"props":2706,"children":2707},{"style":453},[2708],{"type":46,"value":1662},{"type":40,"tag":216,"props":2710,"children":2711},{"style":269},[2712],{"type":46,"value":532},{"type":40,"tag":216,"props":2714,"children":2715},{"style":263},[2716],{"type":46,"value":355},{"type":40,"tag":216,"props":2718,"children":2719},{"style":269},[2720],{"type":46,"value":135},{"type":40,"tag":216,"props":2722,"children":2723},{"style":263},[2724],{"type":46,"value":2725}," !==",{"type":40,"tag":216,"props":2727,"children":2729},{"style":2728},"--shiki-light:#F76D47;--shiki-default:#F78C6C;--shiki-dark:#F78C6C",[2730],{"type":46,"value":2731}," 0",{"type":40,"tag":216,"props":2733,"children":2734},{"style":453},[2735],{"type":46,"value":1673},{"type":40,"tag":216,"props":2737,"children":2738},{"style":263},[2739],{"type":46,"value":1678},{"type":40,"tag":216,"props":2741,"children":2743},{"class":218,"line":2742},23,[2744,2749,2753,2758,2762,2766,2770,2774,2778,2782,2786,2790,2794,2799,2803],{"type":40,"tag":216,"props":2745,"children":2746},{"style":257},[2747],{"type":46,"value":2748},"    throw",{"type":40,"tag":216,"props":2750,"children":2751},{"style":263},[2752],{"type":46,"value":1133},{"type":40,"tag":216,"props":2754,"children":2755},{"style":358},[2756],{"type":46,"value":2757}," Error",{"type":40,"tag":216,"props":2759,"children":2760},{"style":453},[2761],{"type":46,"value":428},{"type":40,"tag":216,"props":2763,"children":2764},{"style":263},[2765],{"type":46,"value":575},{"type":40,"tag":216,"props":2767,"children":2768},{"style":358},[2769],{"type":46,"value":580},{"type":40,"tag":216,"props":2771,"children":2772},{"style":453},[2773],{"type":46,"value":366},{"type":40,"tag":216,"props":2775,"children":2776},{"style":263},[2777],{"type":46,"value":355},{"type":40,"tag":216,"props":2779,"children":2780},{"style":358},[2781],{"type":46,"value":593},{"type":40,"tag":216,"props":2783,"children":2784},{"style":453},[2785],{"type":46,"value":428},{"type":40,"tag":216,"props":2787,"children":2788},{"style":269},[2789],{"type":46,"value":532},{"type":40,"tag":216,"props":2791,"children":2792},{"style":263},[2793],{"type":46,"value":355},{"type":40,"tag":216,"props":2795,"children":2796},{"style":269},[2797],{"type":46,"value":2798},"stderr",{"type":40,"tag":216,"props":2800,"children":2801},{"style":453},[2802],{"type":46,"value":1554},{"type":40,"tag":216,"props":2804,"children":2805},{"style":263},[2806],{"type":46,"value":301},{"type":40,"tag":216,"props":2808,"children":2810},{"class":218,"line":2809},24,[2811],{"type":40,"tag":216,"props":2812,"children":2813},{"style":263},[2814],{"type":46,"value":2815},"  }\n",{"type":40,"tag":216,"props":2817,"children":2819},{"class":218,"line":2818},25,[2820],{"type":40,"tag":216,"props":2821,"children":2822},{"emptyLinePlaceholder":308},[2823],{"type":46,"value":311},{"type":40,"tag":216,"props":2825,"children":2827},{"class":218,"line":2826},26,[2828,2833,2837,2841,2845,2849,2853,2857,2861,2865,2869,2873],{"type":40,"tag":216,"props":2829,"children":2830},{"style":257},[2831],{"type":46,"value":2832},"  return",{"type":40,"tag":216,"props":2834,"children":2835},{"style":263},[2836],{"type":46,"value":1133},{"type":40,"tag":216,"props":2838,"children":2839},{"style":358},[2840],{"type":46,"value":580},{"type":40,"tag":216,"props":2842,"children":2843},{"style":453},[2844],{"type":46,"value":366},{"type":40,"tag":216,"props":2846,"children":2847},{"style":263},[2848],{"type":46,"value":355},{"type":40,"tag":216,"props":2850,"children":2851},{"style":358},[2852],{"type":46,"value":593},{"type":40,"tag":216,"props":2854,"children":2855},{"style":453},[2856],{"type":46,"value":428},{"type":40,"tag":216,"props":2858,"children":2859},{"style":269},[2860],{"type":46,"value":532},{"type":40,"tag":216,"props":2862,"children":2863},{"style":263},[2864],{"type":46,"value":355},{"type":40,"tag":216,"props":2866,"children":2867},{"style":269},[2868],{"type":46,"value":1631},{"type":40,"tag":216,"props":2870,"children":2871},{"style":453},[2872],{"type":46,"value":494},{"type":40,"tag":216,"props":2874,"children":2875},{"style":263},[2876],{"type":46,"value":301},{"type":40,"tag":216,"props":2878,"children":2880},{"class":218,"line":2879},27,[2881],{"type":40,"tag":216,"props":2882,"children":2883},{"style":263},[2884],{"type":46,"value":1838},{"type":40,"tag":198,"props":2886,"children":2888},{"id":2887},"code-playground",[2889],{"type":46,"value":2890},"Code Playground",{"type":40,"tag":205,"props":2892,"children":2894},{"className":245,"code":2893,"language":247,"meta":210,"style":210},"import { Sandbox } from \"@deno\u002Fsandbox\";\n\ninterface ExecutionResult {\n  success: boolean;\n  output: string;\n  error?: string;\n  executionTime: number;\n}\n\nasync function executePlayground(code: string): Promise\u003CExecutionResult> {\n  const start = performance.now();\n\n  await using sandbox = await Sandbox.create();\n\n  await sandbox.fs.writeFile(\"\u002Fplayground\u002Fmain.ts\", code);\n\n  const child = await sandbox.spawn(\"deno\", {\n    args: [\"run\", \"--allow-net\", \"\u002Fplayground\u002Fmain.ts\"],\n    stdout: \"piped\",\n    stderr: \"piped\",\n  });\n\n  const output = await child.output();\n  const executionTime = performance.now() - start;\n\n  return {\n    success: output.code === 0,\n    output: new TextDecoder().decode(output.stdout),\n    error: output.code !== 0\n      ? new TextDecoder().decode(output.stderr)\n      : undefined,\n    executionTime,\n  };\n}\n",[2895],{"type":40,"tag":135,"props":2896,"children":2897},{"__ignoreMap":210},[2898,2937,2944,2961,2982,3002,3023,3044,3051,3058,3115,3153,3160,3199,3206,3266,3273,3328,3396,3423,3450,3465,3472,3511,3557,3564,3575,3612,3669,3703,3753,3767,3780,3789],{"type":40,"tag":216,"props":2899,"children":2900},{"class":218,"line":219},[2901,2905,2909,2913,2917,2921,2925,2929,2933],{"type":40,"tag":216,"props":2902,"children":2903},{"style":257},[2904],{"type":46,"value":260},{"type":40,"tag":216,"props":2906,"children":2907},{"style":263},[2908],{"type":46,"value":266},{"type":40,"tag":216,"props":2910,"children":2911},{"style":269},[2912],{"type":46,"value":272},{"type":40,"tag":216,"props":2914,"children":2915},{"style":263},[2916],{"type":46,"value":277},{"type":40,"tag":216,"props":2918,"children":2919},{"style":257},[2920],{"type":46,"value":282},{"type":40,"tag":216,"props":2922,"children":2923},{"style":263},[2924],{"type":46,"value":287},{"type":40,"tag":216,"props":2926,"children":2927},{"style":228},[2928],{"type":46,"value":140},{"type":40,"tag":216,"props":2930,"children":2931},{"style":263},[2932],{"type":46,"value":296},{"type":40,"tag":216,"props":2934,"children":2935},{"style":263},[2936],{"type":46,"value":301},{"type":40,"tag":216,"props":2938,"children":2939},{"class":218,"line":304},[2940],{"type":40,"tag":216,"props":2941,"children":2942},{"emptyLinePlaceholder":308},[2943],{"type":46,"value":311},{"type":40,"tag":216,"props":2945,"children":2946},{"class":218,"line":314},[2947,2952,2957],{"type":40,"tag":216,"props":2948,"children":2949},{"style":328},[2950],{"type":46,"value":2951},"interface",{"type":40,"tag":216,"props":2953,"children":2954},{"style":223},[2955],{"type":46,"value":2956}," ExecutionResult",{"type":40,"tag":216,"props":2958,"children":2959},{"style":263},[2960],{"type":46,"value":813},{"type":40,"tag":216,"props":2962,"children":2963},{"class":218,"line":324},[2964,2969,2973,2978],{"type":40,"tag":216,"props":2965,"children":2966},{"style":453},[2967],{"type":46,"value":2968},"  success",{"type":40,"tag":216,"props":2970,"children":2971},{"style":263},[2972],{"type":46,"value":461},{"type":40,"tag":216,"props":2974,"children":2975},{"style":223},[2976],{"type":46,"value":2977}," boolean",{"type":40,"tag":216,"props":2979,"children":2980},{"style":263},[2981],{"type":46,"value":301},{"type":40,"tag":216,"props":2983,"children":2984},{"class":218,"line":373},[2985,2990,2994,2998],{"type":40,"tag":216,"props":2986,"children":2987},{"style":453},[2988],{"type":46,"value":2989},"  output",{"type":40,"tag":216,"props":2991,"children":2992},{"style":263},[2993],{"type":46,"value":461},{"type":40,"tag":216,"props":2995,"children":2996},{"style":223},[2997],{"type":46,"value":2257},{"type":40,"tag":216,"props":2999,"children":3000},{"style":263},[3001],{"type":46,"value":301},{"type":40,"tag":216,"props":3003,"children":3004},{"class":218,"line":381},[3005,3010,3015,3019],{"type":40,"tag":216,"props":3006,"children":3007},{"style":453},[3008],{"type":46,"value":3009},"  error",{"type":40,"tag":216,"props":3011,"children":3012},{"style":263},[3013],{"type":46,"value":3014},"?:",{"type":40,"tag":216,"props":3016,"children":3017},{"style":223},[3018],{"type":46,"value":2257},{"type":40,"tag":216,"props":3020,"children":3021},{"style":263},[3022],{"type":46,"value":301},{"type":40,"tag":216,"props":3024,"children":3025},{"class":218,"line":390},[3026,3031,3035,3040],{"type":40,"tag":216,"props":3027,"children":3028},{"style":453},[3029],{"type":46,"value":3030},"  executionTime",{"type":40,"tag":216,"props":3032,"children":3033},{"style":263},[3034],{"type":46,"value":461},{"type":40,"tag":216,"props":3036,"children":3037},{"style":223},[3038],{"type":46,"value":3039}," number",{"type":40,"tag":216,"props":3041,"children":3042},{"style":263},[3043],{"type":46,"value":301},{"type":40,"tag":216,"props":3045,"children":3046},{"class":218,"line":25},[3047],{"type":40,"tag":216,"props":3048,"children":3049},{"style":263},[3050],{"type":46,"value":1838},{"type":40,"tag":216,"props":3052,"children":3053},{"class":218,"line":543},[3054],{"type":40,"tag":216,"props":3055,"children":3056},{"emptyLinePlaceholder":308},[3057],{"type":46,"value":311},{"type":40,"tag":216,"props":3059,"children":3060},{"class":218,"line":551},[3061,3065,3069,3074,3078,3082,3086,3090,3094,3098,3102,3107,3111],{"type":40,"tag":216,"props":3062,"children":3063},{"style":328},[3064],{"type":46,"value":2229},{"type":40,"tag":216,"props":3066,"children":3067},{"style":328},[3068],{"type":46,"value":2234},{"type":40,"tag":216,"props":3070,"children":3071},{"style":358},[3072],{"type":46,"value":3073}," executePlayground",{"type":40,"tag":216,"props":3075,"children":3076},{"style":263},[3077],{"type":46,"value":428},{"type":40,"tag":216,"props":3079,"children":3080},{"style":2246},[3081],{"type":46,"value":135},{"type":40,"tag":216,"props":3083,"children":3084},{"style":263},[3085],{"type":46,"value":461},{"type":40,"tag":216,"props":3087,"children":3088},{"style":223},[3089],{"type":46,"value":2257},{"type":40,"tag":216,"props":3091,"children":3092},{"style":263},[3093],{"type":46,"value":2262},{"type":40,"tag":216,"props":3095,"children":3096},{"style":223},[3097],{"type":46,"value":2267},{"type":40,"tag":216,"props":3099,"children":3100},{"style":263},[3101],{"type":46,"value":2272},{"type":40,"tag":216,"props":3103,"children":3104},{"style":223},[3105],{"type":46,"value":3106},"ExecutionResult",{"type":40,"tag":216,"props":3108,"children":3109},{"style":263},[3110],{"type":46,"value":2282},{"type":40,"tag":216,"props":3112,"children":3113},{"style":263},[3114],{"type":46,"value":813},{"type":40,"tag":216,"props":3116,"children":3117},{"class":218,"line":614},[3118,3122,3127,3131,3136,3140,3145,3149],{"type":40,"tag":216,"props":3119,"children":3120},{"style":328},[3121],{"type":46,"value":1687},{"type":40,"tag":216,"props":3123,"children":3124},{"style":269},[3125],{"type":46,"value":3126}," start",{"type":40,"tag":216,"props":3128,"children":3129},{"style":263},[3130],{"type":46,"value":1714},{"type":40,"tag":216,"props":3132,"children":3133},{"style":269},[3134],{"type":46,"value":3135}," performance",{"type":40,"tag":216,"props":3137,"children":3138},{"style":263},[3139],{"type":46,"value":355},{"type":40,"tag":216,"props":3141,"children":3142},{"style":358},[3143],{"type":46,"value":3144},"now",{"type":40,"tag":216,"props":3146,"children":3147},{"style":453},[3148],{"type":46,"value":366},{"type":40,"tag":216,"props":3150,"children":3151},{"style":263},[3152],{"type":46,"value":301},{"type":40,"tag":216,"props":3154,"children":3155},{"class":218,"line":1168},[3156],{"type":40,"tag":216,"props":3157,"children":3158},{"emptyLinePlaceholder":308},[3159],{"type":46,"value":311},{"type":40,"tag":216,"props":3161,"children":3162},{"class":218,"line":1604},[3163,3167,3171,3175,3179,3183,3187,3191,3195],{"type":40,"tag":216,"props":3164,"children":3165},{"style":328},[3166],{"type":46,"value":2294},{"type":40,"tag":216,"props":3168,"children":3169},{"style":269},[3170],{"type":46,"value":414},{"type":40,"tag":216,"props":3172,"children":3173},{"style":263},[3174],{"type":46,"value":1714},{"type":40,"tag":216,"props":3176,"children":3177},{"style":257},[3178],{"type":46,"value":346},{"type":40,"tag":216,"props":3180,"children":3181},{"style":269},[3182],{"type":46,"value":272},{"type":40,"tag":216,"props":3184,"children":3185},{"style":263},[3186],{"type":46,"value":355},{"type":40,"tag":216,"props":3188,"children":3189},{"style":358},[3190],{"type":46,"value":361},{"type":40,"tag":216,"props":3192,"children":3193},{"style":453},[3194],{"type":46,"value":366},{"type":40,"tag":216,"props":3196,"children":3197},{"style":263},[3198],{"type":46,"value":301},{"type":40,"tag":216,"props":3200,"children":3201},{"class":218,"line":1651},[3202],{"type":40,"tag":216,"props":3203,"children":3204},{"emptyLinePlaceholder":308},[3205],{"type":46,"value":311},{"type":40,"tag":216,"props":3207,"children":3208},{"class":218,"line":1681},[3209,3213,3217,3221,3225,3229,3233,3237,3241,3246,3250,3254,3258,3262],{"type":40,"tag":216,"props":3210,"children":3211},{"style":257},[3212],{"type":46,"value":2349},{"type":40,"tag":216,"props":3214,"children":3215},{"style":269},[3216],{"type":46,"value":414},{"type":40,"tag":216,"props":3218,"children":3219},{"style":263},[3220],{"type":46,"value":355},{"type":40,"tag":216,"props":3222,"children":3223},{"style":269},[3224],{"type":46,"value":2362},{"type":40,"tag":216,"props":3226,"children":3227},{"style":263},[3228],{"type":46,"value":355},{"type":40,"tag":216,"props":3230,"children":3231},{"style":358},[3232],{"type":46,"value":2371},{"type":40,"tag":216,"props":3234,"children":3235},{"style":453},[3236],{"type":46,"value":428},{"type":40,"tag":216,"props":3238,"children":3239},{"style":263},[3240],{"type":46,"value":296},{"type":40,"tag":216,"props":3242,"children":3243},{"style":228},[3244],{"type":46,"value":3245},"\u002Fplayground\u002Fmain.ts",{"type":40,"tag":216,"props":3247,"children":3248},{"style":263},[3249],{"type":46,"value":296},{"type":40,"tag":216,"props":3251,"children":3252},{"style":263},[3253],{"type":46,"value":446},{"type":40,"tag":216,"props":3255,"children":3256},{"style":269},[3257],{"type":46,"value":2397},{"type":40,"tag":216,"props":3259,"children":3260},{"style":453},[3261],{"type":46,"value":494},{"type":40,"tag":216,"props":3263,"children":3264},{"style":263},[3265],{"type":46,"value":301},{"type":40,"tag":216,"props":3267,"children":3268},{"class":218,"line":1743},[3269],{"type":40,"tag":216,"props":3270,"children":3271},{"emptyLinePlaceholder":308},[3272],{"type":46,"value":311},{"type":40,"tag":216,"props":3274,"children":3275},{"class":218,"line":1774},[3276,3280,3284,3288,3292,3296,3300,3304,3308,3312,3316,3320,3324],{"type":40,"tag":216,"props":3277,"children":3278},{"style":328},[3279],{"type":46,"value":1687},{"type":40,"tag":216,"props":3281,"children":3282},{"style":269},[3283],{"type":46,"value":523},{"type":40,"tag":216,"props":3285,"children":3286},{"style":263},[3287],{"type":46,"value":1714},{"type":40,"tag":216,"props":3289,"children":3290},{"style":257},[3291],{"type":46,"value":346},{"type":40,"tag":216,"props":3293,"children":3294},{"style":269},[3295],{"type":46,"value":414},{"type":40,"tag":216,"props":3297,"children":3298},{"style":263},[3299],{"type":46,"value":355},{"type":40,"tag":216,"props":3301,"children":3302},{"style":358},[3303],{"type":46,"value":423},{"type":40,"tag":216,"props":3305,"children":3306},{"style":453},[3307],{"type":46,"value":428},{"type":40,"tag":216,"props":3309,"children":3310},{"style":263},[3311],{"type":46,"value":296},{"type":40,"tag":216,"props":3313,"children":3314},{"style":228},[3315],{"type":46,"value":8},{"type":40,"tag":216,"props":3317,"children":3318},{"style":263},[3319],{"type":46,"value":296},{"type":40,"tag":216,"props":3321,"children":3322},{"style":263},[3323],{"type":46,"value":446},{"type":40,"tag":216,"props":3325,"children":3326},{"style":263},[3327],{"type":46,"value":813},{"type":40,"tag":216,"props":3329,"children":3330},{"class":218,"line":1832},[3331,3335,3339,3343,3347,3351,3355,3359,3363,3368,3372,3376,3380,3384,3388,3392],{"type":40,"tag":216,"props":3332,"children":3333},{"style":453},[3334],{"type":46,"value":2483},{"type":40,"tag":216,"props":3336,"children":3337},{"style":263},[3338],{"type":46,"value":461},{"type":40,"tag":216,"props":3340,"children":3341},{"style":453},[3342],{"type":46,"value":466},{"type":40,"tag":216,"props":3344,"children":3345},{"style":263},[3346],{"type":46,"value":296},{"type":40,"tag":216,"props":3348,"children":3349},{"style":228},[3350],{"type":46,"value":838},{"type":40,"tag":216,"props":3352,"children":3353},{"style":263},[3354],{"type":46,"value":296},{"type":40,"tag":216,"props":3356,"children":3357},{"style":263},[3358],{"type":46,"value":446},{"type":40,"tag":216,"props":3360,"children":3361},{"style":263},[3362],{"type":46,"value":287},{"type":40,"tag":216,"props":3364,"children":3365},{"style":228},[3366],{"type":46,"value":3367},"--allow-net",{"type":40,"tag":216,"props":3369,"children":3370},{"style":263},[3371],{"type":46,"value":296},{"type":40,"tag":216,"props":3373,"children":3374},{"style":263},[3375],{"type":46,"value":446},{"type":40,"tag":216,"props":3377,"children":3378},{"style":263},[3379],{"type":46,"value":287},{"type":40,"tag":216,"props":3381,"children":3382},{"style":228},[3383],{"type":46,"value":3245},{"type":40,"tag":216,"props":3385,"children":3386},{"style":263},[3387],{"type":46,"value":296},{"type":40,"tag":216,"props":3389,"children":3390},{"style":453},[3391],{"type":46,"value":864},{"type":40,"tag":216,"props":3393,"children":3394},{"style":263},[3395],{"type":46,"value":869},{"type":40,"tag":216,"props":3397,"children":3398},{"class":218,"line":2643},[3399,3403,3407,3411,3415,3419],{"type":40,"tag":216,"props":3400,"children":3401},{"style":453},[3402],{"type":46,"value":2576},{"type":40,"tag":216,"props":3404,"children":3405},{"style":263},[3406],{"type":46,"value":461},{"type":40,"tag":216,"props":3408,"children":3409},{"style":263},[3410],{"type":46,"value":287},{"type":40,"tag":216,"props":3412,"children":3413},{"style":228},[3414],{"type":46,"value":890},{"type":40,"tag":216,"props":3416,"children":3417},{"style":263},[3418],{"type":46,"value":296},{"type":40,"tag":216,"props":3420,"children":3421},{"style":263},[3422],{"type":46,"value":869},{"type":40,"tag":216,"props":3424,"children":3425},{"class":218,"line":2651},[3426,3430,3434,3438,3442,3446],{"type":40,"tag":216,"props":3427,"children":3428},{"style":453},[3429],{"type":46,"value":2604},{"type":40,"tag":216,"props":3431,"children":3432},{"style":263},[3433],{"type":46,"value":461},{"type":40,"tag":216,"props":3435,"children":3436},{"style":263},[3437],{"type":46,"value":287},{"type":40,"tag":216,"props":3439,"children":3440},{"style":228},[3441],{"type":46,"value":890},{"type":40,"tag":216,"props":3443,"children":3444},{"style":263},[3445],{"type":46,"value":296},{"type":40,"tag":216,"props":3447,"children":3448},{"style":263},[3449],{"type":46,"value":869},{"type":40,"tag":216,"props":3451,"children":3452},{"class":218,"line":2691},[3453,3457,3461],{"type":40,"tag":216,"props":3454,"children":3455},{"style":263},[3456],{"type":46,"value":2632},{"type":40,"tag":216,"props":3458,"children":3459},{"style":453},[3460],{"type":46,"value":494},{"type":40,"tag":216,"props":3462,"children":3463},{"style":263},[3464],{"type":46,"value":301},{"type":40,"tag":216,"props":3466,"children":3467},{"class":218,"line":2699},[3468],{"type":40,"tag":216,"props":3469,"children":3470},{"emptyLinePlaceholder":308},[3471],{"type":46,"value":311},{"type":40,"tag":216,"props":3473,"children":3474},{"class":218,"line":2742},[3475,3479,3483,3487,3491,3495,3499,3503,3507],{"type":40,"tag":216,"props":3476,"children":3477},{"style":328},[3478],{"type":46,"value":1687},{"type":40,"tag":216,"props":3480,"children":3481},{"style":269},[3482],{"type":46,"value":1079},{"type":40,"tag":216,"props":3484,"children":3485},{"style":263},[3486],{"type":46,"value":1714},{"type":40,"tag":216,"props":3488,"children":3489},{"style":257},[3490],{"type":46,"value":346},{"type":40,"tag":216,"props":3492,"children":3493},{"style":269},[3494],{"type":46,"value":523},{"type":40,"tag":216,"props":3496,"children":3497},{"style":263},[3498],{"type":46,"value":355},{"type":40,"tag":216,"props":3500,"children":3501},{"style":358},[3502],{"type":46,"value":532},{"type":40,"tag":216,"props":3504,"children":3505},{"style":453},[3506],{"type":46,"value":366},{"type":40,"tag":216,"props":3508,"children":3509},{"style":263},[3510],{"type":46,"value":301},{"type":40,"tag":216,"props":3512,"children":3513},{"class":218,"line":2809},[3514,3518,3523,3527,3531,3535,3539,3544,3549,3553],{"type":40,"tag":216,"props":3515,"children":3516},{"style":328},[3517],{"type":46,"value":1687},{"type":40,"tag":216,"props":3519,"children":3520},{"style":269},[3521],{"type":46,"value":3522}," executionTime",{"type":40,"tag":216,"props":3524,"children":3525},{"style":263},[3526],{"type":46,"value":1714},{"type":40,"tag":216,"props":3528,"children":3529},{"style":269},[3530],{"type":46,"value":3135},{"type":40,"tag":216,"props":3532,"children":3533},{"style":263},[3534],{"type":46,"value":355},{"type":40,"tag":216,"props":3536,"children":3537},{"style":358},[3538],{"type":46,"value":3144},{"type":40,"tag":216,"props":3540,"children":3541},{"style":453},[3542],{"type":46,"value":3543},"() ",{"type":40,"tag":216,"props":3545,"children":3546},{"style":263},[3547],{"type":46,"value":3548},"-",{"type":40,"tag":216,"props":3550,"children":3551},{"style":269},[3552],{"type":46,"value":3126},{"type":40,"tag":216,"props":3554,"children":3555},{"style":263},[3556],{"type":46,"value":301},{"type":40,"tag":216,"props":3558,"children":3559},{"class":218,"line":2818},[3560],{"type":40,"tag":216,"props":3561,"children":3562},{"emptyLinePlaceholder":308},[3563],{"type":46,"value":311},{"type":40,"tag":216,"props":3565,"children":3566},{"class":218,"line":2826},[3567,3571],{"type":40,"tag":216,"props":3568,"children":3569},{"style":257},[3570],{"type":46,"value":2832},{"type":40,"tag":216,"props":3572,"children":3573},{"style":263},[3574],{"type":46,"value":813},{"type":40,"tag":216,"props":3576,"children":3577},{"class":218,"line":2879},[3578,3583,3587,3591,3595,3599,3604,3608],{"type":40,"tag":216,"props":3579,"children":3580},{"style":453},[3581],{"type":46,"value":3582},"    success",{"type":40,"tag":216,"props":3584,"children":3585},{"style":263},[3586],{"type":46,"value":461},{"type":40,"tag":216,"props":3588,"children":3589},{"style":269},[3590],{"type":46,"value":1079},{"type":40,"tag":216,"props":3592,"children":3593},{"style":263},[3594],{"type":46,"value":355},{"type":40,"tag":216,"props":3596,"children":3597},{"style":269},[3598],{"type":46,"value":135},{"type":40,"tag":216,"props":3600,"children":3601},{"style":263},[3602],{"type":46,"value":3603}," ===",{"type":40,"tag":216,"props":3605,"children":3606},{"style":2728},[3607],{"type":46,"value":2731},{"type":40,"tag":216,"props":3609,"children":3610},{"style":263},[3611],{"type":46,"value":869},{"type":40,"tag":216,"props":3613,"children":3615},{"class":218,"line":3614},28,[3616,3621,3625,3629,3633,3637,3641,3645,3649,3653,3657,3661,3665],{"type":40,"tag":216,"props":3617,"children":3618},{"style":453},[3619],{"type":46,"value":3620},"    output",{"type":40,"tag":216,"props":3622,"children":3623},{"style":263},[3624],{"type":46,"value":461},{"type":40,"tag":216,"props":3626,"children":3627},{"style":263},[3628],{"type":46,"value":1133},{"type":40,"tag":216,"props":3630,"children":3631},{"style":358},[3632],{"type":46,"value":580},{"type":40,"tag":216,"props":3634,"children":3635},{"style":453},[3636],{"type":46,"value":366},{"type":40,"tag":216,"props":3638,"children":3639},{"style":263},[3640],{"type":46,"value":355},{"type":40,"tag":216,"props":3642,"children":3643},{"style":358},[3644],{"type":46,"value":593},{"type":40,"tag":216,"props":3646,"children":3647},{"style":453},[3648],{"type":46,"value":428},{"type":40,"tag":216,"props":3650,"children":3651},{"style":269},[3652],{"type":46,"value":532},{"type":40,"tag":216,"props":3654,"children":3655},{"style":263},[3656],{"type":46,"value":355},{"type":40,"tag":216,"props":3658,"children":3659},{"style":269},[3660],{"type":46,"value":1631},{"type":40,"tag":216,"props":3662,"children":3663},{"style":453},[3664],{"type":46,"value":494},{"type":40,"tag":216,"props":3666,"children":3667},{"style":263},[3668],{"type":46,"value":869},{"type":40,"tag":216,"props":3670,"children":3672},{"class":218,"line":3671},29,[3673,3678,3682,3686,3690,3694,3698],{"type":40,"tag":216,"props":3674,"children":3675},{"style":453},[3676],{"type":46,"value":3677},"    error",{"type":40,"tag":216,"props":3679,"children":3680},{"style":263},[3681],{"type":46,"value":461},{"type":40,"tag":216,"props":3683,"children":3684},{"style":269},[3685],{"type":46,"value":1079},{"type":40,"tag":216,"props":3687,"children":3688},{"style":263},[3689],{"type":46,"value":355},{"type":40,"tag":216,"props":3691,"children":3692},{"style":269},[3693],{"type":46,"value":135},{"type":40,"tag":216,"props":3695,"children":3696},{"style":263},[3697],{"type":46,"value":2725},{"type":40,"tag":216,"props":3699,"children":3700},{"style":2728},[3701],{"type":46,"value":3702}," 0\n",{"type":40,"tag":216,"props":3704,"children":3706},{"class":218,"line":3705},30,[3707,3712,3716,3720,3724,3728,3732,3736,3740,3744,3748],{"type":40,"tag":216,"props":3708,"children":3709},{"style":263},[3710],{"type":46,"value":3711},"      ?",{"type":40,"tag":216,"props":3713,"children":3714},{"style":263},[3715],{"type":46,"value":1133},{"type":40,"tag":216,"props":3717,"children":3718},{"style":358},[3719],{"type":46,"value":580},{"type":40,"tag":216,"props":3721,"children":3722},{"style":453},[3723],{"type":46,"value":366},{"type":40,"tag":216,"props":3725,"children":3726},{"style":263},[3727],{"type":46,"value":355},{"type":40,"tag":216,"props":3729,"children":3730},{"style":358},[3731],{"type":46,"value":593},{"type":40,"tag":216,"props":3733,"children":3734},{"style":453},[3735],{"type":46,"value":428},{"type":40,"tag":216,"props":3737,"children":3738},{"style":269},[3739],{"type":46,"value":532},{"type":40,"tag":216,"props":3741,"children":3742},{"style":263},[3743],{"type":46,"value":355},{"type":40,"tag":216,"props":3745,"children":3746},{"style":269},[3747],{"type":46,"value":2798},{"type":40,"tag":216,"props":3749,"children":3750},{"style":453},[3751],{"type":46,"value":3752},")\n",{"type":40,"tag":216,"props":3754,"children":3756},{"class":218,"line":3755},31,[3757,3762],{"type":40,"tag":216,"props":3758,"children":3759},{"style":263},[3760],{"type":46,"value":3761},"      :",{"type":40,"tag":216,"props":3763,"children":3764},{"style":263},[3765],{"type":46,"value":3766}," undefined,\n",{"type":40,"tag":216,"props":3768,"children":3770},{"class":218,"line":3769},32,[3771,3776],{"type":40,"tag":216,"props":3772,"children":3773},{"style":269},[3774],{"type":46,"value":3775},"    executionTime",{"type":40,"tag":216,"props":3777,"children":3778},{"style":263},[3779],{"type":46,"value":869},{"type":40,"tag":216,"props":3781,"children":3783},{"class":218,"line":3782},33,[3784],{"type":40,"tag":216,"props":3785,"children":3786},{"style":263},[3787],{"type":46,"value":3788},"  };\n",{"type":40,"tag":216,"props":3790,"children":3792},{"class":218,"line":3791},34,[3793],{"type":40,"tag":216,"props":3794,"children":3795},{"style":263},[3796],{"type":46,"value":1838},{"type":40,"tag":198,"props":3798,"children":3800},{"id":3799},"ai-agent-tool-execution",[3801],{"type":46,"value":3802},"AI Agent Tool Execution",{"type":40,"tag":205,"props":3804,"children":3806},{"className":245,"code":3805,"language":247,"meta":210,"style":210},"import { Sandbox } from \"@deno\u002Fsandbox\";\n\nasync function executeAgentTool(\n  toolCode: string,\n  input: unknown,\n): Promise\u003Cunknown> {\n  await using sandbox = await Sandbox.create();\n\n  \u002F\u002F Create a wrapper that handles input\u002Foutput\n  const wrapper = `\n    const input = ${JSON.stringify(input)};\n    const tool = await import(\"\u002Ftool.ts\");\n    const result = await tool.default(input);\n    console.log(JSON.stringify(result));\n  `;\n\n  await sandbox.fs.writeFile(\"\u002Ftool.ts\", toolCode);\n  await sandbox.fs.writeFile(\"\u002Frun.ts\", wrapper);\n\n  const child = await sandbox.spawn(\"deno\", {\n    args: [\"run\", \"--allow-net\", \"\u002Frun.ts\"],\n    stdout: \"piped\",\n    stderr: \"piped\",\n  });\n\n  const output = await child.output();\n\n  if (output.code !== 0) {\n    throw new Error(new TextDecoder().decode(output.stderr));\n  }\n\n  return JSON.parse(new TextDecoder().decode(output.stdout));\n}\n",[3807],{"type":40,"tag":135,"props":3808,"children":3809},{"__ignoreMap":210},[3810,3849,3856,3877,3897,3918,3946,3985,3992,4000,4021,4061,4069,4077,4085,4097,4104,4165,4225,4232,4287,4354,4381,4408,4423,4430,4469,4476,4515,4578,4585,4592,4661],{"type":40,"tag":216,"props":3811,"children":3812},{"class":218,"line":219},[3813,3817,3821,3825,3829,3833,3837,3841,3845],{"type":40,"tag":216,"props":3814,"children":3815},{"style":257},[3816],{"type":46,"value":260},{"type":40,"tag":216,"props":3818,"children":3819},{"style":263},[3820],{"type":46,"value":266},{"type":40,"tag":216,"props":3822,"children":3823},{"style":269},[3824],{"type":46,"value":272},{"type":40,"tag":216,"props":3826,"children":3827},{"style":263},[3828],{"type":46,"value":277},{"type":40,"tag":216,"props":3830,"children":3831},{"style":257},[3832],{"type":46,"value":282},{"type":40,"tag":216,"props":3834,"children":3835},{"style":263},[3836],{"type":46,"value":287},{"type":40,"tag":216,"props":3838,"children":3839},{"style":228},[3840],{"type":46,"value":140},{"type":40,"tag":216,"props":3842,"children":3843},{"style":263},[3844],{"type":46,"value":296},{"type":40,"tag":216,"props":3846,"children":3847},{"style":263},[3848],{"type":46,"value":301},{"type":40,"tag":216,"props":3850,"children":3851},{"class":218,"line":304},[3852],{"type":40,"tag":216,"props":3853,"children":3854},{"emptyLinePlaceholder":308},[3855],{"type":46,"value":311},{"type":40,"tag":216,"props":3857,"children":3858},{"class":218,"line":314},[3859,3863,3867,3872],{"type":40,"tag":216,"props":3860,"children":3861},{"style":328},[3862],{"type":46,"value":2229},{"type":40,"tag":216,"props":3864,"children":3865},{"style":328},[3866],{"type":46,"value":2234},{"type":40,"tag":216,"props":3868,"children":3869},{"style":358},[3870],{"type":46,"value":3871}," executeAgentTool",{"type":40,"tag":216,"props":3873,"children":3874},{"style":263},[3875],{"type":46,"value":3876},"(\n",{"type":40,"tag":216,"props":3878,"children":3879},{"class":218,"line":324},[3880,3885,3889,3893],{"type":40,"tag":216,"props":3881,"children":3882},{"style":2246},[3883],{"type":46,"value":3884},"  toolCode",{"type":40,"tag":216,"props":3886,"children":3887},{"style":263},[3888],{"type":46,"value":461},{"type":40,"tag":216,"props":3890,"children":3891},{"style":223},[3892],{"type":46,"value":2257},{"type":40,"tag":216,"props":3894,"children":3895},{"style":263},[3896],{"type":46,"value":869},{"type":40,"tag":216,"props":3898,"children":3899},{"class":218,"line":373},[3900,3905,3909,3914],{"type":40,"tag":216,"props":3901,"children":3902},{"style":2246},[3903],{"type":46,"value":3904},"  input",{"type":40,"tag":216,"props":3906,"children":3907},{"style":263},[3908],{"type":46,"value":461},{"type":40,"tag":216,"props":3910,"children":3911},{"style":223},[3912],{"type":46,"value":3913}," unknown",{"type":40,"tag":216,"props":3915,"children":3916},{"style":263},[3917],{"type":46,"value":869},{"type":40,"tag":216,"props":3919,"children":3920},{"class":218,"line":381},[3921,3925,3929,3933,3938,3942],{"type":40,"tag":216,"props":3922,"children":3923},{"style":263},[3924],{"type":46,"value":2262},{"type":40,"tag":216,"props":3926,"children":3927},{"style":223},[3928],{"type":46,"value":2267},{"type":40,"tag":216,"props":3930,"children":3931},{"style":263},[3932],{"type":46,"value":2272},{"type":40,"tag":216,"props":3934,"children":3935},{"style":223},[3936],{"type":46,"value":3937},"unknown",{"type":40,"tag":216,"props":3939,"children":3940},{"style":263},[3941],{"type":46,"value":2282},{"type":40,"tag":216,"props":3943,"children":3944},{"style":263},[3945],{"type":46,"value":813},{"type":40,"tag":216,"props":3947,"children":3948},{"class":218,"line":390},[3949,3953,3957,3961,3965,3969,3973,3977,3981],{"type":40,"tag":216,"props":3950,"children":3951},{"style":328},[3952],{"type":46,"value":2294},{"type":40,"tag":216,"props":3954,"children":3955},{"style":269},[3956],{"type":46,"value":414},{"type":40,"tag":216,"props":3958,"children":3959},{"style":263},[3960],{"type":46,"value":1714},{"type":40,"tag":216,"props":3962,"children":3963},{"style":257},[3964],{"type":46,"value":346},{"type":40,"tag":216,"props":3966,"children":3967},{"style":269},[3968],{"type":46,"value":272},{"type":40,"tag":216,"props":3970,"children":3971},{"style":263},[3972],{"type":46,"value":355},{"type":40,"tag":216,"props":3974,"children":3975},{"style":358},[3976],{"type":46,"value":361},{"type":40,"tag":216,"props":3978,"children":3979},{"style":453},[3980],{"type":46,"value":366},{"type":40,"tag":216,"props":3982,"children":3983},{"style":263},[3984],{"type":46,"value":301},{"type":40,"tag":216,"props":3986,"children":3987},{"class":218,"line":25},[3988],{"type":40,"tag":216,"props":3989,"children":3990},{"emptyLinePlaceholder":308},[3991],{"type":46,"value":311},{"type":40,"tag":216,"props":3993,"children":3994},{"class":218,"line":543},[3995],{"type":40,"tag":216,"props":3996,"children":3997},{"style":318},[3998],{"type":46,"value":3999},"  \u002F\u002F Create a wrapper that handles input\u002Foutput\n",{"type":40,"tag":216,"props":4001,"children":4002},{"class":218,"line":551},[4003,4007,4012,4016],{"type":40,"tag":216,"props":4004,"children":4005},{"style":328},[4006],{"type":46,"value":1687},{"type":40,"tag":216,"props":4008,"children":4009},{"style":269},[4010],{"type":46,"value":4011}," wrapper",{"type":40,"tag":216,"props":4013,"children":4014},{"style":263},[4015],{"type":46,"value":1714},{"type":40,"tag":216,"props":4017,"children":4018},{"style":263},[4019],{"type":46,"value":4020}," `\n",{"type":40,"tag":216,"props":4022,"children":4023},{"class":218,"line":614},[4024,4029,4034,4039,4043,4048,4053,4057],{"type":40,"tag":216,"props":4025,"children":4026},{"style":228},[4027],{"type":46,"value":4028},"    const input = ",{"type":40,"tag":216,"props":4030,"children":4031},{"style":263},[4032],{"type":46,"value":4033},"${",{"type":40,"tag":216,"props":4035,"children":4036},{"style":269},[4037],{"type":46,"value":4038},"JSON",{"type":40,"tag":216,"props":4040,"children":4041},{"style":263},[4042],{"type":46,"value":355},{"type":40,"tag":216,"props":4044,"children":4045},{"style":358},[4046],{"type":46,"value":4047},"stringify",{"type":40,"tag":216,"props":4049,"children":4050},{"style":269},[4051],{"type":46,"value":4052},"(input)",{"type":40,"tag":216,"props":4054,"children":4055},{"style":263},[4056],{"type":46,"value":489},{"type":40,"tag":216,"props":4058,"children":4059},{"style":228},[4060],{"type":46,"value":301},{"type":40,"tag":216,"props":4062,"children":4063},{"class":218,"line":1168},[4064],{"type":40,"tag":216,"props":4065,"children":4066},{"style":228},[4067],{"type":46,"value":4068},"    const tool = await import(\"\u002Ftool.ts\");\n",{"type":40,"tag":216,"props":4070,"children":4071},{"class":218,"line":1604},[4072],{"type":40,"tag":216,"props":4073,"children":4074},{"style":228},[4075],{"type":46,"value":4076},"    const result = await tool.default(input);\n",{"type":40,"tag":216,"props":4078,"children":4079},{"class":218,"line":1651},[4080],{"type":40,"tag":216,"props":4081,"children":4082},{"style":228},[4083],{"type":46,"value":4084},"    console.log(JSON.stringify(result));\n",{"type":40,"tag":216,"props":4086,"children":4087},{"class":218,"line":1681},[4088,4093],{"type":40,"tag":216,"props":4089,"children":4090},{"style":263},[4091],{"type":46,"value":4092},"  `",{"type":40,"tag":216,"props":4094,"children":4095},{"style":263},[4096],{"type":46,"value":301},{"type":40,"tag":216,"props":4098,"children":4099},{"class":218,"line":1743},[4100],{"type":40,"tag":216,"props":4101,"children":4102},{"emptyLinePlaceholder":308},[4103],{"type":46,"value":311},{"type":40,"tag":216,"props":4105,"children":4106},{"class":218,"line":1774},[4107,4111,4115,4119,4123,4127,4131,4135,4139,4144,4148,4152,4157,4161],{"type":40,"tag":216,"props":4108,"children":4109},{"style":257},[4110],{"type":46,"value":2349},{"type":40,"tag":216,"props":4112,"children":4113},{"style":269},[4114],{"type":46,"value":414},{"type":40,"tag":216,"props":4116,"children":4117},{"style":263},[4118],{"type":46,"value":355},{"type":40,"tag":216,"props":4120,"children":4121},{"style":269},[4122],{"type":46,"value":2362},{"type":40,"tag":216,"props":4124,"children":4125},{"style":263},[4126],{"type":46,"value":355},{"type":40,"tag":216,"props":4128,"children":4129},{"style":358},[4130],{"type":46,"value":2371},{"type":40,"tag":216,"props":4132,"children":4133},{"style":453},[4134],{"type":46,"value":428},{"type":40,"tag":216,"props":4136,"children":4137},{"style":263},[4138],{"type":46,"value":296},{"type":40,"tag":216,"props":4140,"children":4141},{"style":228},[4142],{"type":46,"value":4143},"\u002Ftool.ts",{"type":40,"tag":216,"props":4145,"children":4146},{"style":263},[4147],{"type":46,"value":296},{"type":40,"tag":216,"props":4149,"children":4150},{"style":263},[4151],{"type":46,"value":446},{"type":40,"tag":216,"props":4153,"children":4154},{"style":269},[4155],{"type":46,"value":4156}," toolCode",{"type":40,"tag":216,"props":4158,"children":4159},{"style":453},[4160],{"type":46,"value":494},{"type":40,"tag":216,"props":4162,"children":4163},{"style":263},[4164],{"type":46,"value":301},{"type":40,"tag":216,"props":4166,"children":4167},{"class":218,"line":1832},[4168,4172,4176,4180,4184,4188,4192,4196,4200,4205,4209,4213,4217,4221],{"type":40,"tag":216,"props":4169,"children":4170},{"style":257},[4171],{"type":46,"value":2349},{"type":40,"tag":216,"props":4173,"children":4174},{"style":269},[4175],{"type":46,"value":414},{"type":40,"tag":216,"props":4177,"children":4178},{"style":263},[4179],{"type":46,"value":355},{"type":40,"tag":216,"props":4181,"children":4182},{"style":269},[4183],{"type":46,"value":2362},{"type":40,"tag":216,"props":4185,"children":4186},{"style":263},[4187],{"type":46,"value":355},{"type":40,"tag":216,"props":4189,"children":4190},{"style":358},[4191],{"type":46,"value":2371},{"type":40,"tag":216,"props":4193,"children":4194},{"style":453},[4195],{"type":46,"value":428},{"type":40,"tag":216,"props":4197,"children":4198},{"style":263},[4199],{"type":46,"value":296},{"type":40,"tag":216,"props":4201,"children":4202},{"style":228},[4203],{"type":46,"value":4204},"\u002Frun.ts",{"type":40,"tag":216,"props":4206,"children":4207},{"style":263},[4208],{"type":46,"value":296},{"type":40,"tag":216,"props":4210,"children":4211},{"style":263},[4212],{"type":46,"value":446},{"type":40,"tag":216,"props":4214,"children":4215},{"style":269},[4216],{"type":46,"value":4011},{"type":40,"tag":216,"props":4218,"children":4219},{"style":453},[4220],{"type":46,"value":494},{"type":40,"tag":216,"props":4222,"children":4223},{"style":263},[4224],{"type":46,"value":301},{"type":40,"tag":216,"props":4226,"children":4227},{"class":218,"line":2643},[4228],{"type":40,"tag":216,"props":4229,"children":4230},{"emptyLinePlaceholder":308},[4231],{"type":46,"value":311},{"type":40,"tag":216,"props":4233,"children":4234},{"class":218,"line":2651},[4235,4239,4243,4247,4251,4255,4259,4263,4267,4271,4275,4279,4283],{"type":40,"tag":216,"props":4236,"children":4237},{"style":328},[4238],{"type":46,"value":1687},{"type":40,"tag":216,"props":4240,"children":4241},{"style":269},[4242],{"type":46,"value":523},{"type":40,"tag":216,"props":4244,"children":4245},{"style":263},[4246],{"type":46,"value":1714},{"type":40,"tag":216,"props":4248,"children":4249},{"style":257},[4250],{"type":46,"value":346},{"type":40,"tag":216,"props":4252,"children":4253},{"style":269},[4254],{"type":46,"value":414},{"type":40,"tag":216,"props":4256,"children":4257},{"style":263},[4258],{"type":46,"value":355},{"type":40,"tag":216,"props":4260,"children":4261},{"style":358},[4262],{"type":46,"value":423},{"type":40,"tag":216,"props":4264,"children":4265},{"style":453},[4266],{"type":46,"value":428},{"type":40,"tag":216,"props":4268,"children":4269},{"style":263},[4270],{"type":46,"value":296},{"type":40,"tag":216,"props":4272,"children":4273},{"style":228},[4274],{"type":46,"value":8},{"type":40,"tag":216,"props":4276,"children":4277},{"style":263},[4278],{"type":46,"value":296},{"type":40,"tag":216,"props":4280,"children":4281},{"style":263},[4282],{"type":46,"value":446},{"type":40,"tag":216,"props":4284,"children":4285},{"style":263},[4286],{"type":46,"value":813},{"type":40,"tag":216,"props":4288,"children":4289},{"class":218,"line":2691},[4290,4294,4298,4302,4306,4310,4314,4318,4322,4326,4330,4334,4338,4342,4346,4350],{"type":40,"tag":216,"props":4291,"children":4292},{"style":453},[4293],{"type":46,"value":2483},{"type":40,"tag":216,"props":4295,"children":4296},{"style":263},[4297],{"type":46,"value":461},{"type":40,"tag":216,"props":4299,"children":4300},{"style":453},[4301],{"type":46,"value":466},{"type":40,"tag":216,"props":4303,"children":4304},{"style":263},[4305],{"type":46,"value":296},{"type":40,"tag":216,"props":4307,"children":4308},{"style":228},[4309],{"type":46,"value":838},{"type":40,"tag":216,"props":4311,"children":4312},{"style":263},[4313],{"type":46,"value":296},{"type":40,"tag":216,"props":4315,"children":4316},{"style":263},[4317],{"type":46,"value":446},{"type":40,"tag":216,"props":4319,"children":4320},{"style":263},[4321],{"type":46,"value":287},{"type":40,"tag":216,"props":4323,"children":4324},{"style":228},[4325],{"type":46,"value":3367},{"type":40,"tag":216,"props":4327,"children":4328},{"style":263},[4329],{"type":46,"value":296},{"type":40,"tag":216,"props":4331,"children":4332},{"style":263},[4333],{"type":46,"value":446},{"type":40,"tag":216,"props":4335,"children":4336},{"style":263},[4337],{"type":46,"value":287},{"type":40,"tag":216,"props":4339,"children":4340},{"style":228},[4341],{"type":46,"value":4204},{"type":40,"tag":216,"props":4343,"children":4344},{"style":263},[4345],{"type":46,"value":296},{"type":40,"tag":216,"props":4347,"children":4348},{"style":453},[4349],{"type":46,"value":864},{"type":40,"tag":216,"props":4351,"children":4352},{"style":263},[4353],{"type":46,"value":869},{"type":40,"tag":216,"props":4355,"children":4356},{"class":218,"line":2699},[4357,4361,4365,4369,4373,4377],{"type":40,"tag":216,"props":4358,"children":4359},{"style":453},[4360],{"type":46,"value":2576},{"type":40,"tag":216,"props":4362,"children":4363},{"style":263},[4364],{"type":46,"value":461},{"type":40,"tag":216,"props":4366,"children":4367},{"style":263},[4368],{"type":46,"value":287},{"type":40,"tag":216,"props":4370,"children":4371},{"style":228},[4372],{"type":46,"value":890},{"type":40,"tag":216,"props":4374,"children":4375},{"style":263},[4376],{"type":46,"value":296},{"type":40,"tag":216,"props":4378,"children":4379},{"style":263},[4380],{"type":46,"value":869},{"type":40,"tag":216,"props":4382,"children":4383},{"class":218,"line":2742},[4384,4388,4392,4396,4400,4404],{"type":40,"tag":216,"props":4385,"children":4386},{"style":453},[4387],{"type":46,"value":2604},{"type":40,"tag":216,"props":4389,"children":4390},{"style":263},[4391],{"type":46,"value":461},{"type":40,"tag":216,"props":4393,"children":4394},{"style":263},[4395],{"type":46,"value":287},{"type":40,"tag":216,"props":4397,"children":4398},{"style":228},[4399],{"type":46,"value":890},{"type":40,"tag":216,"props":4401,"children":4402},{"style":263},[4403],{"type":46,"value":296},{"type":40,"tag":216,"props":4405,"children":4406},{"style":263},[4407],{"type":46,"value":869},{"type":40,"tag":216,"props":4409,"children":4410},{"class":218,"line":2809},[4411,4415,4419],{"type":40,"tag":216,"props":4412,"children":4413},{"style":263},[4414],{"type":46,"value":2632},{"type":40,"tag":216,"props":4416,"children":4417},{"style":453},[4418],{"type":46,"value":494},{"type":40,"tag":216,"props":4420,"children":4421},{"style":263},[4422],{"type":46,"value":301},{"type":40,"tag":216,"props":4424,"children":4425},{"class":218,"line":2818},[4426],{"type":40,"tag":216,"props":4427,"children":4428},{"emptyLinePlaceholder":308},[4429],{"type":46,"value":311},{"type":40,"tag":216,"props":4431,"children":4432},{"class":218,"line":2826},[4433,4437,4441,4445,4449,4453,4457,4461,4465],{"type":40,"tag":216,"props":4434,"children":4435},{"style":328},[4436],{"type":46,"value":1687},{"type":40,"tag":216,"props":4438,"children":4439},{"style":269},[4440],{"type":46,"value":1079},{"type":40,"tag":216,"props":4442,"children":4443},{"style":263},[4444],{"type":46,"value":1714},{"type":40,"tag":216,"props":4446,"children":4447},{"style":257},[4448],{"type":46,"value":346},{"type":40,"tag":216,"props":4450,"children":4451},{"style":269},[4452],{"type":46,"value":523},{"type":40,"tag":216,"props":4454,"children":4455},{"style":263},[4456],{"type":46,"value":355},{"type":40,"tag":216,"props":4458,"children":4459},{"style":358},[4460],{"type":46,"value":532},{"type":40,"tag":216,"props":4462,"children":4463},{"style":453},[4464],{"type":46,"value":366},{"type":40,"tag":216,"props":4466,"children":4467},{"style":263},[4468],{"type":46,"value":301},{"type":40,"tag":216,"props":4470,"children":4471},{"class":218,"line":2879},[4472],{"type":40,"tag":216,"props":4473,"children":4474},{"emptyLinePlaceholder":308},[4475],{"type":46,"value":311},{"type":40,"tag":216,"props":4477,"children":4478},{"class":218,"line":3614},[4479,4483,4487,4491,4495,4499,4503,4507,4511],{"type":40,"tag":216,"props":4480,"children":4481},{"style":257},[4482],{"type":46,"value":1749},{"type":40,"tag":216,"props":4484,"children":4485},{"style":453},[4486],{"type":46,"value":1662},{"type":40,"tag":216,"props":4488,"children":4489},{"style":269},[4490],{"type":46,"value":532},{"type":40,"tag":216,"props":4492,"children":4493},{"style":263},[4494],{"type":46,"value":355},{"type":40,"tag":216,"props":4496,"children":4497},{"style":269},[4498],{"type":46,"value":135},{"type":40,"tag":216,"props":4500,"children":4501},{"style":263},[4502],{"type":46,"value":2725},{"type":40,"tag":216,"props":4504,"children":4505},{"style":2728},[4506],{"type":46,"value":2731},{"type":40,"tag":216,"props":4508,"children":4509},{"style":453},[4510],{"type":46,"value":1673},{"type":40,"tag":216,"props":4512,"children":4513},{"style":263},[4514],{"type":46,"value":1678},{"type":40,"tag":216,"props":4516,"children":4517},{"class":218,"line":3671},[4518,4522,4526,4530,4534,4538,4542,4546,4550,4554,4558,4562,4566,4570,4574],{"type":40,"tag":216,"props":4519,"children":4520},{"style":257},[4521],{"type":46,"value":2748},{"type":40,"tag":216,"props":4523,"children":4524},{"style":263},[4525],{"type":46,"value":1133},{"type":40,"tag":216,"props":4527,"children":4528},{"style":358},[4529],{"type":46,"value":2757},{"type":40,"tag":216,"props":4531,"children":4532},{"style":453},[4533],{"type":46,"value":428},{"type":40,"tag":216,"props":4535,"children":4536},{"style":263},[4537],{"type":46,"value":575},{"type":40,"tag":216,"props":4539,"children":4540},{"style":358},[4541],{"type":46,"value":580},{"type":40,"tag":216,"props":4543,"children":4544},{"style":453},[4545],{"type":46,"value":366},{"type":40,"tag":216,"props":4547,"children":4548},{"style":263},[4549],{"type":46,"value":355},{"type":40,"tag":216,"props":4551,"children":4552},{"style":358},[4553],{"type":46,"value":593},{"type":40,"tag":216,"props":4555,"children":4556},{"style":453},[4557],{"type":46,"value":428},{"type":40,"tag":216,"props":4559,"children":4560},{"style":269},[4561],{"type":46,"value":532},{"type":40,"tag":216,"props":4563,"children":4564},{"style":263},[4565],{"type":46,"value":355},{"type":40,"tag":216,"props":4567,"children":4568},{"style":269},[4569],{"type":46,"value":2798},{"type":40,"tag":216,"props":4571,"children":4572},{"style":453},[4573],{"type":46,"value":1554},{"type":40,"tag":216,"props":4575,"children":4576},{"style":263},[4577],{"type":46,"value":301},{"type":40,"tag":216,"props":4579,"children":4580},{"class":218,"line":3705},[4581],{"type":40,"tag":216,"props":4582,"children":4583},{"style":263},[4584],{"type":46,"value":2815},{"type":40,"tag":216,"props":4586,"children":4587},{"class":218,"line":3755},[4588],{"type":40,"tag":216,"props":4589,"children":4590},{"emptyLinePlaceholder":308},[4591],{"type":46,"value":311},{"type":40,"tag":216,"props":4593,"children":4594},{"class":218,"line":3769},[4595,4599,4604,4608,4613,4617,4621,4625,4629,4633,4637,4641,4645,4649,4653,4657],{"type":40,"tag":216,"props":4596,"children":4597},{"style":257},[4598],{"type":46,"value":2832},{"type":40,"tag":216,"props":4600,"children":4601},{"style":269},[4602],{"type":46,"value":4603}," JSON",{"type":40,"tag":216,"props":4605,"children":4606},{"style":263},[4607],{"type":46,"value":355},{"type":40,"tag":216,"props":4609,"children":4610},{"style":358},[4611],{"type":46,"value":4612},"parse",{"type":40,"tag":216,"props":4614,"children":4615},{"style":453},[4616],{"type":46,"value":428},{"type":40,"tag":216,"props":4618,"children":4619},{"style":263},[4620],{"type":46,"value":575},{"type":40,"tag":216,"props":4622,"children":4623},{"style":358},[4624],{"type":46,"value":580},{"type":40,"tag":216,"props":4626,"children":4627},{"style":453},[4628],{"type":46,"value":366},{"type":40,"tag":216,"props":4630,"children":4631},{"style":263},[4632],{"type":46,"value":355},{"type":40,"tag":216,"props":4634,"children":4635},{"style":358},[4636],{"type":46,"value":593},{"type":40,"tag":216,"props":4638,"children":4639},{"style":453},[4640],{"type":46,"value":428},{"type":40,"tag":216,"props":4642,"children":4643},{"style":269},[4644],{"type":46,"value":532},{"type":40,"tag":216,"props":4646,"children":4647},{"style":263},[4648],{"type":46,"value":355},{"type":40,"tag":216,"props":4650,"children":4651},{"style":269},[4652],{"type":46,"value":1631},{"type":40,"tag":216,"props":4654,"children":4655},{"style":453},[4656],{"type":46,"value":1554},{"type":40,"tag":216,"props":4658,"children":4659},{"style":263},[4660],{"type":46,"value":301},{"type":40,"tag":216,"props":4662,"children":4663},{"class":218,"line":3782},[4664],{"type":40,"tag":216,"props":4665,"children":4666},{"style":263},[4667],{"type":46,"value":1838},{"type":40,"tag":49,"props":4669,"children":4671},{"id":4670},"sandbox-features",[4672],{"type":46,"value":4673},"Sandbox Features",{"type":40,"tag":198,"props":4675,"children":4677},{"id":4676},"resource-configuration",[4678],{"type":46,"value":4679},"Resource Configuration",{"type":40,"tag":56,"props":4681,"children":4682},{},[4683],{"type":46,"value":4684},"Sandboxes have configurable resources:",{"type":40,"tag":86,"props":4686,"children":4687},{},[4688,4698],{"type":40,"tag":90,"props":4689,"children":4690},{},[4691,4696],{"type":40,"tag":127,"props":4692,"children":4693},{},[4694],{"type":46,"value":4695},"Default:",{"type":46,"value":4697}," 2 vCPUs, 512MB memory, 10GB disk",{"type":40,"tag":90,"props":4699,"children":4700},{},[4701],{"type":46,"value":4702},"Startup time: Under 200ms",{"type":40,"tag":198,"props":4704,"children":4706},{"id":4705},"whats-included",[4707],{"type":46,"value":4708},"What's Included",{"type":40,"tag":56,"props":4710,"children":4711},{},[4712],{"type":46,"value":4713},"Each sandbox comes with:",{"type":40,"tag":86,"props":4715,"children":4716},{},[4717,4722,4727,4732],{"type":40,"tag":90,"props":4718,"children":4719},{},[4720],{"type":46,"value":4721},"TypeScript\u002FJavaScript runtime (Deno)",{"type":40,"tag":90,"props":4723,"children":4724},{},[4725],{"type":46,"value":4726},"Full Linux environment",{"type":40,"tag":90,"props":4728,"children":4729},{},[4730],{"type":46,"value":4731},"Network access (can be restricted)",{"type":40,"tag":90,"props":4733,"children":4734},{},[4735],{"type":46,"value":4736},"Temporary filesystem",{"type":40,"tag":198,"props":4738,"children":4740},{"id":4739},"security-features",[4741],{"type":46,"value":4742},"Security Features",{"type":40,"tag":86,"props":4744,"children":4745},{},[4746,4756,4766,4776],{"type":40,"tag":90,"props":4747,"children":4748},{},[4749,4754],{"type":40,"tag":127,"props":4750,"children":4751},{},[4752],{"type":46,"value":4753},"Firecracker microVMs",{"type":46,"value":4755}," - Same technology as AWS Lambda",{"type":40,"tag":90,"props":4757,"children":4758},{},[4759,4764],{"type":40,"tag":127,"props":4760,"children":4761},{},[4762],{"type":46,"value":4763},"Full isolation",{"type":46,"value":4765}," - Separate kernel, filesystem, network",{"type":40,"tag":90,"props":4767,"children":4768},{},[4769,4774],{"type":40,"tag":127,"props":4770,"children":4771},{},[4772],{"type":46,"value":4773},"No data leakage",{"type":46,"value":4775}," - Sandboxes can't access host system",{"type":40,"tag":90,"props":4777,"children":4778},{},[4779,4784],{"type":40,"tag":127,"props":4780,"children":4781},{},[4782],{"type":46,"value":4783},"Enforced policies",{"type":46,"value":4785}," - Control outbound connections",{"type":40,"tag":49,"props":4787,"children":4789},{"id":4788},"deploying-sandboxes",[4790],{"type":46,"value":4791},"Deploying Sandboxes",{"type":40,"tag":56,"props":4793,"children":4794},{},[4795],{"type":46,"value":4796},"Sandboxes can be deployed directly to Deno Deploy:",{"type":40,"tag":205,"props":4798,"children":4800},{"className":207,"code":4799,"language":209,"meta":210,"style":210},"deno deploy --prod\n",[4801],{"type":40,"tag":135,"props":4802,"children":4803},{"__ignoreMap":210},[4804],{"type":40,"tag":216,"props":4805,"children":4806},{"class":218,"line":219},[4807,4811,4816],{"type":40,"tag":216,"props":4808,"children":4809},{"style":223},[4810],{"type":46,"value":8},{"type":40,"tag":216,"props":4812,"children":4813},{"style":228},[4814],{"type":46,"value":4815}," deploy",{"type":40,"tag":216,"props":4817,"children":4818},{"style":228},[4819],{"type":46,"value":4820}," --prod\n",{"type":40,"tag":56,"props":4822,"children":4823},{},[4824],{"type":46,"value":4825},"The sandbox SDK works seamlessly in the Deno Deploy environment.",{"type":40,"tag":49,"props":4827,"children":4829},{"id":4828},"api-reference",[4830],{"type":46,"value":4831},"API Reference",{"type":40,"tag":56,"props":4833,"children":4834},{},[4835],{"type":46,"value":4836},"For the complete API, run:",{"type":40,"tag":205,"props":4838,"children":4840},{"className":207,"code":4839,"language":209,"meta":210,"style":210},"deno doc jsr:@deno\u002Fsandbox\n",[4841],{"type":40,"tag":135,"props":4842,"children":4843},{"__ignoreMap":210},[4844],{"type":40,"tag":216,"props":4845,"children":4846},{"class":218,"line":219},[4847,4851,4856],{"type":40,"tag":216,"props":4848,"children":4849},{"style":223},[4850],{"type":46,"value":8},{"type":40,"tag":216,"props":4852,"children":4853},{"style":228},[4854],{"type":46,"value":4855}," doc",{"type":40,"tag":216,"props":4857,"children":4858},{"style":228},[4859],{"type":46,"value":236},{"type":40,"tag":56,"props":4861,"children":4862},{},[4863],{"type":46,"value":4864},"Key classes:",{"type":40,"tag":86,"props":4866,"children":4867},{},[4868,4879,4890],{"type":40,"tag":90,"props":4869,"children":4870},{},[4871,4877],{"type":40,"tag":135,"props":4872,"children":4874},{"className":4873},[],[4875],{"type":46,"value":4876},"Sandbox",{"type":46,"value":4878}," - Main class for creating\u002Fmanaging sandboxes",{"type":40,"tag":90,"props":4880,"children":4881},{},[4882,4888],{"type":40,"tag":135,"props":4883,"children":4885},{"className":4884},[],[4886],{"type":46,"value":4887},"ChildProcess",{"type":46,"value":4889}," - Represents a running process",{"type":40,"tag":90,"props":4891,"children":4892},{},[4893,4899],{"type":40,"tag":135,"props":4894,"children":4896},{"className":4895},[],[4897],{"type":46,"value":4898},"Client",{"type":46,"value":4900}," - For managing Deploy resources (apps, volumes)",{"type":40,"tag":49,"props":4902,"children":4904},{"id":4903},"quick-reference",[4905],{"type":46,"value":4906},"Quick Reference",{"type":40,"tag":4908,"props":4909,"children":4910},"table",{},[4911,4930],{"type":40,"tag":4912,"props":4913,"children":4914},"thead",{},[4915],{"type":40,"tag":4916,"props":4917,"children":4918},"tr",{},[4919,4925],{"type":40,"tag":4920,"props":4921,"children":4922},"th",{},[4923],{"type":46,"value":4924},"Task",{"type":40,"tag":4920,"props":4926,"children":4927},{},[4928],{"type":46,"value":4929},"Code",{"type":40,"tag":4931,"props":4932,"children":4933},"tbody",{},[4934,4952,4969,4986,5003,5020,5037],{"type":40,"tag":4916,"props":4935,"children":4936},{},[4937,4943],{"type":40,"tag":4938,"props":4939,"children":4940},"td",{},[4941],{"type":46,"value":4942},"Create sandbox",{"type":40,"tag":4938,"props":4944,"children":4945},{},[4946],{"type":40,"tag":135,"props":4947,"children":4949},{"className":4948},[],[4950],{"type":46,"value":4951},"await using sandbox = await Sandbox.create()",{"type":40,"tag":4916,"props":4953,"children":4954},{},[4955,4960],{"type":40,"tag":4938,"props":4956,"children":4957},{},[4958],{"type":46,"value":4959},"Run command",{"type":40,"tag":4938,"props":4961,"children":4962},{},[4963],{"type":40,"tag":135,"props":4964,"children":4966},{"className":4965},[],[4967],{"type":46,"value":4968},"sandbox.spawn(\"cmd\", { args: [...] })",{"type":40,"tag":4916,"props":4970,"children":4971},{},[4972,4977],{"type":40,"tag":4938,"props":4973,"children":4974},{},[4975],{"type":46,"value":4976},"Get output",{"type":40,"tag":4938,"props":4978,"children":4979},{},[4980],{"type":40,"tag":135,"props":4981,"children":4983},{"className":4982},[],[4984],{"type":46,"value":4985},"const output = await child.output()",{"type":40,"tag":4916,"props":4987,"children":4988},{},[4989,4994],{"type":40,"tag":4938,"props":4990,"children":4991},{},[4992],{"type":46,"value":4993},"Write file",{"type":40,"tag":4938,"props":4995,"children":4996},{},[4997],{"type":40,"tag":135,"props":4998,"children":5000},{"className":4999},[],[5001],{"type":46,"value":5002},"await sandbox.fs.writeFile(path, content)",{"type":40,"tag":4916,"props":5004,"children":5005},{},[5006,5011],{"type":40,"tag":4938,"props":5007,"children":5008},{},[5009],{"type":46,"value":5010},"Read file",{"type":40,"tag":4938,"props":5012,"children":5013},{},[5014],{"type":40,"tag":135,"props":5015,"children":5017},{"className":5016},[],[5018],{"type":46,"value":5019},"await sandbox.fs.readFile(path)",{"type":40,"tag":4916,"props":5021,"children":5022},{},[5023,5028],{"type":40,"tag":4938,"props":5024,"children":5025},{},[5026],{"type":46,"value":5027},"Kill process",{"type":40,"tag":4938,"props":5029,"children":5030},{},[5031],{"type":40,"tag":135,"props":5032,"children":5034},{"className":5033},[],[5035],{"type":46,"value":5036},"await child.kill()",{"type":40,"tag":4916,"props":5038,"children":5039},{},[5040,5045],{"type":40,"tag":4938,"props":5041,"children":5042},{},[5043],{"type":46,"value":5044},"Check status",{"type":40,"tag":4938,"props":5046,"children":5047},{},[5048],{"type":40,"tag":135,"props":5049,"children":5051},{"className":5050},[],[5052],{"type":46,"value":5053},"const status = await child.status",{"type":40,"tag":49,"props":5055,"children":5057},{"id":5056},"common-mistakes",[5058],{"type":46,"value":5059},"Common Mistakes",{"type":40,"tag":56,"props":5061,"children":5062},{},[5063],{"type":40,"tag":127,"props":5064,"children":5065},{},[5066],{"type":46,"value":5067},"Forgetting automatic disposal",{"type":40,"tag":205,"props":5069,"children":5071},{"className":245,"code":5070,"language":247,"meta":210,"style":210},"\u002F\u002F ❌ Wrong - always use \"await using\" for sandbox creation\n\u002F\u002F Never write: const sandbox = await Sandbox.create() without \"await using\"\n\n\u002F\u002F ✅ Correct - use \"await using\" for automatic cleanup\nawait using sandbox = await Sandbox.create();\nawait sandbox.spawn(\"echo\", { args: [\"hello\"] });\n\u002F\u002F sandbox automatically disposed when scope ends\n",[5072],{"type":40,"tag":135,"props":5073,"children":5074},{"__ignoreMap":210},[5075,5083,5091,5098,5106,5145,5229],{"type":40,"tag":216,"props":5076,"children":5077},{"class":218,"line":219},[5078],{"type":40,"tag":216,"props":5079,"children":5080},{"style":318},[5081],{"type":46,"value":5082},"\u002F\u002F ❌ Wrong - always use \"await using\" for sandbox creation\n",{"type":40,"tag":216,"props":5084,"children":5085},{"class":218,"line":304},[5086],{"type":40,"tag":216,"props":5087,"children":5088},{"style":318},[5089],{"type":46,"value":5090},"\u002F\u002F Never write: const sandbox = await Sandbox.create() without \"await using\"\n",{"type":40,"tag":216,"props":5092,"children":5093},{"class":218,"line":314},[5094],{"type":40,"tag":216,"props":5095,"children":5096},{"emptyLinePlaceholder":308},[5097],{"type":46,"value":311},{"type":40,"tag":216,"props":5099,"children":5100},{"class":218,"line":324},[5101],{"type":40,"tag":216,"props":5102,"children":5103},{"style":318},[5104],{"type":46,"value":5105},"\u002F\u002F ✅ Correct - use \"await using\" for automatic cleanup\n",{"type":40,"tag":216,"props":5107,"children":5108},{"class":218,"line":373},[5109,5113,5117,5121,5125,5129,5133,5137,5141],{"type":40,"tag":216,"props":5110,"children":5111},{"style":328},[5112],{"type":46,"value":331},{"type":40,"tag":216,"props":5114,"children":5115},{"style":269},[5116],{"type":46,"value":336},{"type":40,"tag":216,"props":5118,"children":5119},{"style":263},[5120],{"type":46,"value":341},{"type":40,"tag":216,"props":5122,"children":5123},{"style":257},[5124],{"type":46,"value":346},{"type":40,"tag":216,"props":5126,"children":5127},{"style":269},[5128],{"type":46,"value":272},{"type":40,"tag":216,"props":5130,"children":5131},{"style":263},[5132],{"type":46,"value":355},{"type":40,"tag":216,"props":5134,"children":5135},{"style":358},[5136],{"type":46,"value":361},{"type":40,"tag":216,"props":5138,"children":5139},{"style":269},[5140],{"type":46,"value":366},{"type":40,"tag":216,"props":5142,"children":5143},{"style":263},[5144],{"type":46,"value":301},{"type":40,"tag":216,"props":5146,"children":5147},{"class":218,"line":381},[5148,5152,5156,5160,5164,5168,5172,5176,5180,5184,5188,5192,5196,5200,5204,5209,5213,5217,5221,5225],{"type":40,"tag":216,"props":5149,"children":5150},{"style":257},[5151],{"type":46,"value":1487},{"type":40,"tag":216,"props":5153,"children":5154},{"style":269},[5155],{"type":46,"value":414},{"type":40,"tag":216,"props":5157,"children":5158},{"style":263},[5159],{"type":46,"value":355},{"type":40,"tag":216,"props":5161,"children":5162},{"style":358},[5163],{"type":46,"value":423},{"type":40,"tag":216,"props":5165,"children":5166},{"style":269},[5167],{"type":46,"value":428},{"type":40,"tag":216,"props":5169,"children":5170},{"style":263},[5171],{"type":46,"value":296},{"type":40,"tag":216,"props":5173,"children":5174},{"style":228},[5175],{"type":46,"value":437},{"type":40,"tag":216,"props":5177,"children":5178},{"style":263},[5179],{"type":46,"value":296},{"type":40,"tag":216,"props":5181,"children":5182},{"style":263},[5183],{"type":46,"value":446},{"type":40,"tag":216,"props":5185,"children":5186},{"style":263},[5187],{"type":46,"value":266},{"type":40,"tag":216,"props":5189,"children":5190},{"style":453},[5191],{"type":46,"value":456},{"type":40,"tag":216,"props":5193,"children":5194},{"style":263},[5195],{"type":46,"value":461},{"type":40,"tag":216,"props":5197,"children":5198},{"style":269},[5199],{"type":46,"value":466},{"type":40,"tag":216,"props":5201,"children":5202},{"style":263},[5203],{"type":46,"value":296},{"type":40,"tag":216,"props":5205,"children":5206},{"style":228},[5207],{"type":46,"value":5208},"hello",{"type":40,"tag":216,"props":5210,"children":5211},{"style":263},[5212],{"type":46,"value":296},{"type":40,"tag":216,"props":5214,"children":5215},{"style":269},[5216],{"type":46,"value":484},{"type":40,"tag":216,"props":5218,"children":5219},{"style":263},[5220],{"type":46,"value":489},{"type":40,"tag":216,"props":5222,"children":5223},{"style":269},[5224],{"type":46,"value":494},{"type":40,"tag":216,"props":5226,"children":5227},{"style":263},[5228],{"type":46,"value":301},{"type":40,"tag":216,"props":5230,"children":5231},{"class":218,"line":390},[5232],{"type":40,"tag":216,"props":5233,"children":5234},{"style":318},[5235],{"type":46,"value":5236},"\u002F\u002F sandbox automatically disposed when scope ends\n",{"type":40,"tag":56,"props":5238,"children":5239},{},[5240],{"type":40,"tag":127,"props":5241,"children":5242},{},[5243],{"type":46,"value":5244},"Giving user code too many permissions",{"type":40,"tag":205,"props":5246,"children":5248},{"className":245,"code":5247,"language":247,"meta":210,"style":210},"\u002F\u002F ❌ Wrong - gives untrusted code full access\nconst child = await sandbox.spawn(\"deno\", {\n  args: [\"run\", \"--allow-all\", \"\u002Ftmp\u002Fuser_code.ts\"],\n});\n\n\u002F\u002F ✅ Correct - restrict permissions to what's needed\nconst child = await sandbox.spawn(\"deno\", {\n  args: [\"run\", \"--allow-none\", \"\u002Ftmp\u002Fuser_code.ts\"], \u002F\u002F No permissions\n});\n\n\u002F\u002F Or if network is truly needed:\nconst child = await sandbox.spawn(\"deno\", {\n  args: [\"run\", \"--allow-net\", \"\u002Ftmp\u002Fuser_code.ts\"], \u002F\u002F Only network\n});\n",[5249],{"type":40,"tag":135,"props":5250,"children":5251},{"__ignoreMap":210},[5252,5260,5315,5383,5398,5405,5413,5468,5539,5554,5561,5569,5624,5696],{"type":40,"tag":216,"props":5253,"children":5254},{"class":218,"line":219},[5255],{"type":40,"tag":216,"props":5256,"children":5257},{"style":318},[5258],{"type":46,"value":5259},"\u002F\u002F ❌ Wrong - gives untrusted code full access\n",{"type":40,"tag":216,"props":5261,"children":5262},{"class":218,"line":304},[5263,5267,5271,5275,5279,5283,5287,5291,5295,5299,5303,5307,5311],{"type":40,"tag":216,"props":5264,"children":5265},{"style":328},[5266],{"type":46,"value":396},{"type":40,"tag":216,"props":5268,"children":5269},{"style":269},[5270],{"type":46,"value":401},{"type":40,"tag":216,"props":5272,"children":5273},{"style":263},[5274],{"type":46,"value":341},{"type":40,"tag":216,"props":5276,"children":5277},{"style":257},[5278],{"type":46,"value":346},{"type":40,"tag":216,"props":5280,"children":5281},{"style":269},[5282],{"type":46,"value":414},{"type":40,"tag":216,"props":5284,"children":5285},{"style":263},[5286],{"type":46,"value":355},{"type":40,"tag":216,"props":5288,"children":5289},{"style":358},[5290],{"type":46,"value":423},{"type":40,"tag":216,"props":5292,"children":5293},{"style":269},[5294],{"type":46,"value":428},{"type":40,"tag":216,"props":5296,"children":5297},{"style":263},[5298],{"type":46,"value":296},{"type":40,"tag":216,"props":5300,"children":5301},{"style":228},[5302],{"type":46,"value":8},{"type":40,"tag":216,"props":5304,"children":5305},{"style":263},[5306],{"type":46,"value":296},{"type":40,"tag":216,"props":5308,"children":5309},{"style":263},[5310],{"type":46,"value":446},{"type":40,"tag":216,"props":5312,"children":5313},{"style":263},[5314],{"type":46,"value":813},{"type":40,"tag":216,"props":5316,"children":5317},{"class":218,"line":314},[5318,5322,5326,5330,5334,5338,5342,5346,5350,5355,5359,5363,5367,5371,5375,5379],{"type":40,"tag":216,"props":5319,"children":5320},{"style":453},[5321],{"type":46,"value":821},{"type":40,"tag":216,"props":5323,"children":5324},{"style":263},[5325],{"type":46,"value":461},{"type":40,"tag":216,"props":5327,"children":5328},{"style":269},[5329],{"type":46,"value":466},{"type":40,"tag":216,"props":5331,"children":5332},{"style":263},[5333],{"type":46,"value":296},{"type":40,"tag":216,"props":5335,"children":5336},{"style":228},[5337],{"type":46,"value":838},{"type":40,"tag":216,"props":5339,"children":5340},{"style":263},[5341],{"type":46,"value":296},{"type":40,"tag":216,"props":5343,"children":5344},{"style":263},[5345],{"type":46,"value":446},{"type":40,"tag":216,"props":5347,"children":5348},{"style":263},[5349],{"type":46,"value":287},{"type":40,"tag":216,"props":5351,"children":5352},{"style":228},[5353],{"type":46,"value":5354},"--allow-all",{"type":40,"tag":216,"props":5356,"children":5357},{"style":263},[5358],{"type":46,"value":296},{"type":40,"tag":216,"props":5360,"children":5361},{"style":263},[5362],{"type":46,"value":446},{"type":40,"tag":216,"props":5364,"children":5365},{"style":263},[5366],{"type":46,"value":287},{"type":40,"tag":216,"props":5368,"children":5369},{"style":228},[5370],{"type":46,"value":2384},{"type":40,"tag":216,"props":5372,"children":5373},{"style":263},[5374],{"type":46,"value":296},{"type":40,"tag":216,"props":5376,"children":5377},{"style":269},[5378],{"type":46,"value":864},{"type":40,"tag":216,"props":5380,"children":5381},{"style":263},[5382],{"type":46,"value":869},{"type":40,"tag":216,"props":5384,"children":5385},{"class":218,"line":324},[5386,5390,5394],{"type":40,"tag":216,"props":5387,"children":5388},{"style":263},[5389],{"type":46,"value":489},{"type":40,"tag":216,"props":5391,"children":5392},{"style":269},[5393],{"type":46,"value":494},{"type":40,"tag":216,"props":5395,"children":5396},{"style":263},[5397],{"type":46,"value":301},{"type":40,"tag":216,"props":5399,"children":5400},{"class":218,"line":373},[5401],{"type":40,"tag":216,"props":5402,"children":5403},{"emptyLinePlaceholder":308},[5404],{"type":46,"value":311},{"type":40,"tag":216,"props":5406,"children":5407},{"class":218,"line":381},[5408],{"type":40,"tag":216,"props":5409,"children":5410},{"style":318},[5411],{"type":46,"value":5412},"\u002F\u002F ✅ Correct - restrict permissions to what's needed\n",{"type":40,"tag":216,"props":5414,"children":5415},{"class":218,"line":390},[5416,5420,5424,5428,5432,5436,5440,5444,5448,5452,5456,5460,5464],{"type":40,"tag":216,"props":5417,"children":5418},{"style":328},[5419],{"type":46,"value":396},{"type":40,"tag":216,"props":5421,"children":5422},{"style":269},[5423],{"type":46,"value":401},{"type":40,"tag":216,"props":5425,"children":5426},{"style":263},[5427],{"type":46,"value":341},{"type":40,"tag":216,"props":5429,"children":5430},{"style":257},[5431],{"type":46,"value":346},{"type":40,"tag":216,"props":5433,"children":5434},{"style":269},[5435],{"type":46,"value":414},{"type":40,"tag":216,"props":5437,"children":5438},{"style":263},[5439],{"type":46,"value":355},{"type":40,"tag":216,"props":5441,"children":5442},{"style":358},[5443],{"type":46,"value":423},{"type":40,"tag":216,"props":5445,"children":5446},{"style":269},[5447],{"type":46,"value":428},{"type":40,"tag":216,"props":5449,"children":5450},{"style":263},[5451],{"type":46,"value":296},{"type":40,"tag":216,"props":5453,"children":5454},{"style":228},[5455],{"type":46,"value":8},{"type":40,"tag":216,"props":5457,"children":5458},{"style":263},[5459],{"type":46,"value":296},{"type":40,"tag":216,"props":5461,"children":5462},{"style":263},[5463],{"type":46,"value":446},{"type":40,"tag":216,"props":5465,"children":5466},{"style":263},[5467],{"type":46,"value":813},{"type":40,"tag":216,"props":5469,"children":5470},{"class":218,"line":25},[5471,5475,5479,5483,5487,5491,5495,5499,5503,5507,5511,5515,5519,5523,5527,5531,5535],{"type":40,"tag":216,"props":5472,"children":5473},{"style":453},[5474],{"type":46,"value":821},{"type":40,"tag":216,"props":5476,"children":5477},{"style":263},[5478],{"type":46,"value":461},{"type":40,"tag":216,"props":5480,"children":5481},{"style":269},[5482],{"type":46,"value":466},{"type":40,"tag":216,"props":5484,"children":5485},{"style":263},[5486],{"type":46,"value":296},{"type":40,"tag":216,"props":5488,"children":5489},{"style":228},[5490],{"type":46,"value":838},{"type":40,"tag":216,"props":5492,"children":5493},{"style":263},[5494],{"type":46,"value":296},{"type":40,"tag":216,"props":5496,"children":5497},{"style":263},[5498],{"type":46,"value":446},{"type":40,"tag":216,"props":5500,"children":5501},{"style":263},[5502],{"type":46,"value":287},{"type":40,"tag":216,"props":5504,"children":5505},{"style":228},[5506],{"type":46,"value":2524},{"type":40,"tag":216,"props":5508,"children":5509},{"style":263},[5510],{"type":46,"value":296},{"type":40,"tag":216,"props":5512,"children":5513},{"style":263},[5514],{"type":46,"value":446},{"type":40,"tag":216,"props":5516,"children":5517},{"style":263},[5518],{"type":46,"value":287},{"type":40,"tag":216,"props":5520,"children":5521},{"style":228},[5522],{"type":46,"value":2384},{"type":40,"tag":216,"props":5524,"children":5525},{"style":263},[5526],{"type":46,"value":296},{"type":40,"tag":216,"props":5528,"children":5529},{"style":269},[5530],{"type":46,"value":864},{"type":40,"tag":216,"props":5532,"children":5533},{"style":263},[5534],{"type":46,"value":446},{"type":40,"tag":216,"props":5536,"children":5537},{"style":318},[5538],{"type":46,"value":2537},{"type":40,"tag":216,"props":5540,"children":5541},{"class":218,"line":543},[5542,5546,5550],{"type":40,"tag":216,"props":5543,"children":5544},{"style":263},[5545],{"type":46,"value":489},{"type":40,"tag":216,"props":5547,"children":5548},{"style":269},[5549],{"type":46,"value":494},{"type":40,"tag":216,"props":5551,"children":5552},{"style":263},[5553],{"type":46,"value":301},{"type":40,"tag":216,"props":5555,"children":5556},{"class":218,"line":551},[5557],{"type":40,"tag":216,"props":5558,"children":5559},{"emptyLinePlaceholder":308},[5560],{"type":46,"value":311},{"type":40,"tag":216,"props":5562,"children":5563},{"class":218,"line":614},[5564],{"type":40,"tag":216,"props":5565,"children":5566},{"style":318},[5567],{"type":46,"value":5568},"\u002F\u002F Or if network is truly needed:\n",{"type":40,"tag":216,"props":5570,"children":5571},{"class":218,"line":1168},[5572,5576,5580,5584,5588,5592,5596,5600,5604,5608,5612,5616,5620],{"type":40,"tag":216,"props":5573,"children":5574},{"style":328},[5575],{"type":46,"value":396},{"type":40,"tag":216,"props":5577,"children":5578},{"style":269},[5579],{"type":46,"value":401},{"type":40,"tag":216,"props":5581,"children":5582},{"style":263},[5583],{"type":46,"value":341},{"type":40,"tag":216,"props":5585,"children":5586},{"style":257},[5587],{"type":46,"value":346},{"type":40,"tag":216,"props":5589,"children":5590},{"style":269},[5591],{"type":46,"value":414},{"type":40,"tag":216,"props":5593,"children":5594},{"style":263},[5595],{"type":46,"value":355},{"type":40,"tag":216,"props":5597,"children":5598},{"style":358},[5599],{"type":46,"value":423},{"type":40,"tag":216,"props":5601,"children":5602},{"style":269},[5603],{"type":46,"value":428},{"type":40,"tag":216,"props":5605,"children":5606},{"style":263},[5607],{"type":46,"value":296},{"type":40,"tag":216,"props":5609,"children":5610},{"style":228},[5611],{"type":46,"value":8},{"type":40,"tag":216,"props":5613,"children":5614},{"style":263},[5615],{"type":46,"value":296},{"type":40,"tag":216,"props":5617,"children":5618},{"style":263},[5619],{"type":46,"value":446},{"type":40,"tag":216,"props":5621,"children":5622},{"style":263},[5623],{"type":46,"value":813},{"type":40,"tag":216,"props":5625,"children":5626},{"class":218,"line":1604},[5627,5631,5635,5639,5643,5647,5651,5655,5659,5663,5667,5671,5675,5679,5683,5687,5691],{"type":40,"tag":216,"props":5628,"children":5629},{"style":453},[5630],{"type":46,"value":821},{"type":40,"tag":216,"props":5632,"children":5633},{"style":263},[5634],{"type":46,"value":461},{"type":40,"tag":216,"props":5636,"children":5637},{"style":269},[5638],{"type":46,"value":466},{"type":40,"tag":216,"props":5640,"children":5641},{"style":263},[5642],{"type":46,"value":296},{"type":40,"tag":216,"props":5644,"children":5645},{"style":228},[5646],{"type":46,"value":838},{"type":40,"tag":216,"props":5648,"children":5649},{"style":263},[5650],{"type":46,"value":296},{"type":40,"tag":216,"props":5652,"children":5653},{"style":263},[5654],{"type":46,"value":446},{"type":40,"tag":216,"props":5656,"children":5657},{"style":263},[5658],{"type":46,"value":287},{"type":40,"tag":216,"props":5660,"children":5661},{"style":228},[5662],{"type":46,"value":3367},{"type":40,"tag":216,"props":5664,"children":5665},{"style":263},[5666],{"type":46,"value":296},{"type":40,"tag":216,"props":5668,"children":5669},{"style":263},[5670],{"type":46,"value":446},{"type":40,"tag":216,"props":5672,"children":5673},{"style":263},[5674],{"type":46,"value":287},{"type":40,"tag":216,"props":5676,"children":5677},{"style":228},[5678],{"type":46,"value":2384},{"type":40,"tag":216,"props":5680,"children":5681},{"style":263},[5682],{"type":46,"value":296},{"type":40,"tag":216,"props":5684,"children":5685},{"style":269},[5686],{"type":46,"value":864},{"type":40,"tag":216,"props":5688,"children":5689},{"style":263},[5690],{"type":46,"value":446},{"type":40,"tag":216,"props":5692,"children":5693},{"style":318},[5694],{"type":46,"value":5695}," \u002F\u002F Only network\n",{"type":40,"tag":216,"props":5697,"children":5698},{"class":218,"line":1651},[5699,5703,5707],{"type":40,"tag":216,"props":5700,"children":5701},{"style":263},[5702],{"type":46,"value":489},{"type":40,"tag":216,"props":5704,"children":5705},{"style":269},[5706],{"type":46,"value":494},{"type":40,"tag":216,"props":5708,"children":5709},{"style":263},[5710],{"type":46,"value":301},{"type":40,"tag":56,"props":5712,"children":5713},{},[5714],{"type":40,"tag":127,"props":5715,"children":5716},{},[5717],{"type":46,"value":5718},"Not handling process output properly",{"type":40,"tag":205,"props":5720,"children":5722},{"className":245,"code":5721,"language":247,"meta":210,"style":210},"\u002F\u002F ❌ Wrong - forgetting to pipe stdout\u002Fstderr\nconst child = await sandbox.spawn(\"deno\", { args: [\"run\", \"script.ts\"] });\nconst output = await child.output();\n\u002F\u002F output.stdout is empty because we didn't pipe it!\n\n\u002F\u002F ✅ Correct - pipe the streams you need\nconst child = await sandbox.spawn(\"deno\", {\n  args: [\"run\", \"script.ts\"],\n  stdout: \"piped\",\n  stderr: \"piped\",\n});\nconst output = await child.output();\nconsole.log(new TextDecoder().decode(output.stdout));\n",[5723],{"type":40,"tag":135,"props":5724,"children":5725},{"__ignoreMap":210},[5726,5734,5845,5884,5892,5899,5907,5962,6013,6040,6067,6082,6121],{"type":40,"tag":216,"props":5727,"children":5728},{"class":218,"line":219},[5729],{"type":40,"tag":216,"props":5730,"children":5731},{"style":318},[5732],{"type":46,"value":5733},"\u002F\u002F ❌ Wrong - forgetting to pipe stdout\u002Fstderr\n",{"type":40,"tag":216,"props":5735,"children":5736},{"class":218,"line":304},[5737,5741,5745,5749,5753,5757,5761,5765,5769,5773,5777,5781,5785,5789,5793,5797,5801,5805,5809,5813,5817,5821,5825,5829,5833,5837,5841],{"type":40,"tag":216,"props":5738,"children":5739},{"style":328},[5740],{"type":46,"value":396},{"type":40,"tag":216,"props":5742,"children":5743},{"style":269},[5744],{"type":46,"value":401},{"type":40,"tag":216,"props":5746,"children":5747},{"style":263},[5748],{"type":46,"value":341},{"type":40,"tag":216,"props":5750,"children":5751},{"style":257},[5752],{"type":46,"value":346},{"type":40,"tag":216,"props":5754,"children":5755},{"style":269},[5756],{"type":46,"value":414},{"type":40,"tag":216,"props":5758,"children":5759},{"style":263},[5760],{"type":46,"value":355},{"type":40,"tag":216,"props":5762,"children":5763},{"style":358},[5764],{"type":46,"value":423},{"type":40,"tag":216,"props":5766,"children":5767},{"style":269},[5768],{"type":46,"value":428},{"type":40,"tag":216,"props":5770,"children":5771},{"style":263},[5772],{"type":46,"value":296},{"type":40,"tag":216,"props":5774,"children":5775},{"style":228},[5776],{"type":46,"value":8},{"type":40,"tag":216,"props":5778,"children":5779},{"style":263},[5780],{"type":46,"value":296},{"type":40,"tag":216,"props":5782,"children":5783},{"style":263},[5784],{"type":46,"value":446},{"type":40,"tag":216,"props":5786,"children":5787},{"style":263},[5788],{"type":46,"value":266},{"type":40,"tag":216,"props":5790,"children":5791},{"style":453},[5792],{"type":46,"value":456},{"type":40,"tag":216,"props":5794,"children":5795},{"style":263},[5796],{"type":46,"value":461},{"type":40,"tag":216,"props":5798,"children":5799},{"style":269},[5800],{"type":46,"value":466},{"type":40,"tag":216,"props":5802,"children":5803},{"style":263},[5804],{"type":46,"value":296},{"type":40,"tag":216,"props":5806,"children":5807},{"style":228},[5808],{"type":46,"value":838},{"type":40,"tag":216,"props":5810,"children":5811},{"style":263},[5812],{"type":46,"value":296},{"type":40,"tag":216,"props":5814,"children":5815},{"style":263},[5816],{"type":46,"value":446},{"type":40,"tag":216,"props":5818,"children":5819},{"style":263},[5820],{"type":46,"value":287},{"type":40,"tag":216,"props":5822,"children":5823},{"style":228},[5824],{"type":46,"value":855},{"type":40,"tag":216,"props":5826,"children":5827},{"style":263},[5828],{"type":46,"value":296},{"type":40,"tag":216,"props":5830,"children":5831},{"style":269},[5832],{"type":46,"value":484},{"type":40,"tag":216,"props":5834,"children":5835},{"style":263},[5836],{"type":46,"value":489},{"type":40,"tag":216,"props":5838,"children":5839},{"style":269},[5840],{"type":46,"value":494},{"type":40,"tag":216,"props":5842,"children":5843},{"style":263},[5844],{"type":46,"value":301},{"type":40,"tag":216,"props":5846,"children":5847},{"class":218,"line":314},[5848,5852,5856,5860,5864,5868,5872,5876,5880],{"type":40,"tag":216,"props":5849,"children":5850},{"style":328},[5851],{"type":46,"value":396},{"type":40,"tag":216,"props":5853,"children":5854},{"style":269},[5855],{"type":46,"value":510},{"type":40,"tag":216,"props":5857,"children":5858},{"style":263},[5859],{"type":46,"value":341},{"type":40,"tag":216,"props":5861,"children":5862},{"style":257},[5863],{"type":46,"value":346},{"type":40,"tag":216,"props":5865,"children":5866},{"style":269},[5867],{"type":46,"value":523},{"type":40,"tag":216,"props":5869,"children":5870},{"style":263},[5871],{"type":46,"value":355},{"type":40,"tag":216,"props":5873,"children":5874},{"style":358},[5875],{"type":46,"value":532},{"type":40,"tag":216,"props":5877,"children":5878},{"style":269},[5879],{"type":46,"value":366},{"type":40,"tag":216,"props":5881,"children":5882},{"style":263},[5883],{"type":46,"value":301},{"type":40,"tag":216,"props":5885,"children":5886},{"class":218,"line":324},[5887],{"type":40,"tag":216,"props":5888,"children":5889},{"style":318},[5890],{"type":46,"value":5891},"\u002F\u002F output.stdout is empty because we didn't pipe it!\n",{"type":40,"tag":216,"props":5893,"children":5894},{"class":218,"line":373},[5895],{"type":40,"tag":216,"props":5896,"children":5897},{"emptyLinePlaceholder":308},[5898],{"type":46,"value":311},{"type":40,"tag":216,"props":5900,"children":5901},{"class":218,"line":381},[5902],{"type":40,"tag":216,"props":5903,"children":5904},{"style":318},[5905],{"type":46,"value":5906},"\u002F\u002F ✅ Correct - pipe the streams you need\n",{"type":40,"tag":216,"props":5908,"children":5909},{"class":218,"line":390},[5910,5914,5918,5922,5926,5930,5934,5938,5942,5946,5950,5954,5958],{"type":40,"tag":216,"props":5911,"children":5912},{"style":328},[5913],{"type":46,"value":396},{"type":40,"tag":216,"props":5915,"children":5916},{"style":269},[5917],{"type":46,"value":401},{"type":40,"tag":216,"props":5919,"children":5920},{"style":263},[5921],{"type":46,"value":341},{"type":40,"tag":216,"props":5923,"children":5924},{"style":257},[5925],{"type":46,"value":346},{"type":40,"tag":216,"props":5927,"children":5928},{"style":269},[5929],{"type":46,"value":414},{"type":40,"tag":216,"props":5931,"children":5932},{"style":263},[5933],{"type":46,"value":355},{"type":40,"tag":216,"props":5935,"children":5936},{"style":358},[5937],{"type":46,"value":423},{"type":40,"tag":216,"props":5939,"children":5940},{"style":269},[5941],{"type":46,"value":428},{"type":40,"tag":216,"props":5943,"children":5944},{"style":263},[5945],{"type":46,"value":296},{"type":40,"tag":216,"props":5947,"children":5948},{"style":228},[5949],{"type":46,"value":8},{"type":40,"tag":216,"props":5951,"children":5952},{"style":263},[5953],{"type":46,"value":296},{"type":40,"tag":216,"props":5955,"children":5956},{"style":263},[5957],{"type":46,"value":446},{"type":40,"tag":216,"props":5959,"children":5960},{"style":263},[5961],{"type":46,"value":813},{"type":40,"tag":216,"props":5963,"children":5964},{"class":218,"line":25},[5965,5969,5973,5977,5981,5985,5989,5993,5997,6001,6005,6009],{"type":40,"tag":216,"props":5966,"children":5967},{"style":453},[5968],{"type":46,"value":821},{"type":40,"tag":216,"props":5970,"children":5971},{"style":263},[5972],{"type":46,"value":461},{"type":40,"tag":216,"props":5974,"children":5975},{"style":269},[5976],{"type":46,"value":466},{"type":40,"tag":216,"props":5978,"children":5979},{"style":263},[5980],{"type":46,"value":296},{"type":40,"tag":216,"props":5982,"children":5983},{"style":228},[5984],{"type":46,"value":838},{"type":40,"tag":216,"props":5986,"children":5987},{"style":263},[5988],{"type":46,"value":296},{"type":40,"tag":216,"props":5990,"children":5991},{"style":263},[5992],{"type":46,"value":446},{"type":40,"tag":216,"props":5994,"children":5995},{"style":263},[5996],{"type":46,"value":287},{"type":40,"tag":216,"props":5998,"children":5999},{"style":228},[6000],{"type":46,"value":855},{"type":40,"tag":216,"props":6002,"children":6003},{"style":263},[6004],{"type":46,"value":296},{"type":40,"tag":216,"props":6006,"children":6007},{"style":269},[6008],{"type":46,"value":864},{"type":40,"tag":216,"props":6010,"children":6011},{"style":263},[6012],{"type":46,"value":869},{"type":40,"tag":216,"props":6014,"children":6015},{"class":218,"line":543},[6016,6020,6024,6028,6032,6036],{"type":40,"tag":216,"props":6017,"children":6018},{"style":453},[6019],{"type":46,"value":911},{"type":40,"tag":216,"props":6021,"children":6022},{"style":263},[6023],{"type":46,"value":461},{"type":40,"tag":216,"props":6025,"children":6026},{"style":263},[6027],{"type":46,"value":287},{"type":40,"tag":216,"props":6029,"children":6030},{"style":228},[6031],{"type":46,"value":890},{"type":40,"tag":216,"props":6033,"children":6034},{"style":263},[6035],{"type":46,"value":296},{"type":40,"tag":216,"props":6037,"children":6038},{"style":263},[6039],{"type":46,"value":869},{"type":40,"tag":216,"props":6041,"children":6042},{"class":218,"line":551},[6043,6047,6051,6055,6059,6063],{"type":40,"tag":216,"props":6044,"children":6045},{"style":453},[6046],{"type":46,"value":944},{"type":40,"tag":216,"props":6048,"children":6049},{"style":263},[6050],{"type":46,"value":461},{"type":40,"tag":216,"props":6052,"children":6053},{"style":263},[6054],{"type":46,"value":287},{"type":40,"tag":216,"props":6056,"children":6057},{"style":228},[6058],{"type":46,"value":890},{"type":40,"tag":216,"props":6060,"children":6061},{"style":263},[6062],{"type":46,"value":296},{"type":40,"tag":216,"props":6064,"children":6065},{"style":263},[6066],{"type":46,"value":869},{"type":40,"tag":216,"props":6068,"children":6069},{"class":218,"line":614},[6070,6074,6078],{"type":40,"tag":216,"props":6071,"children":6072},{"style":263},[6073],{"type":46,"value":489},{"type":40,"tag":216,"props":6075,"children":6076},{"style":269},[6077],{"type":46,"value":494},{"type":40,"tag":216,"props":6079,"children":6080},{"style":263},[6081],{"type":46,"value":301},{"type":40,"tag":216,"props":6083,"children":6084},{"class":218,"line":1168},[6085,6089,6093,6097,6101,6105,6109,6113,6117],{"type":40,"tag":216,"props":6086,"children":6087},{"style":328},[6088],{"type":46,"value":396},{"type":40,"tag":216,"props":6090,"children":6091},{"style":269},[6092],{"type":46,"value":510},{"type":40,"tag":216,"props":6094,"children":6095},{"style":263},[6096],{"type":46,"value":341},{"type":40,"tag":216,"props":6098,"children":6099},{"style":257},[6100],{"type":46,"value":346},{"type":40,"tag":216,"props":6102,"children":6103},{"style":269},[6104],{"type":46,"value":523},{"type":40,"tag":216,"props":6106,"children":6107},{"style":263},[6108],{"type":46,"value":355},{"type":40,"tag":216,"props":6110,"children":6111},{"style":358},[6112],{"type":46,"value":532},{"type":40,"tag":216,"props":6114,"children":6115},{"style":269},[6116],{"type":46,"value":366},{"type":40,"tag":216,"props":6118,"children":6119},{"style":263},[6120],{"type":46,"value":301},{"type":40,"tag":216,"props":6122,"children":6123},{"class":218,"line":1604},[6124,6128,6132,6136,6140,6144,6148,6152,6156,6160,6164,6168,6172],{"type":40,"tag":216,"props":6125,"children":6126},{"style":269},[6127],{"type":46,"value":557},{"type":40,"tag":216,"props":6129,"children":6130},{"style":263},[6131],{"type":46,"value":355},{"type":40,"tag":216,"props":6133,"children":6134},{"style":358},[6135],{"type":46,"value":566},{"type":40,"tag":216,"props":6137,"children":6138},{"style":269},[6139],{"type":46,"value":428},{"type":40,"tag":216,"props":6141,"children":6142},{"style":263},[6143],{"type":46,"value":575},{"type":40,"tag":216,"props":6145,"children":6146},{"style":358},[6147],{"type":46,"value":580},{"type":40,"tag":216,"props":6149,"children":6150},{"style":269},[6151],{"type":46,"value":366},{"type":40,"tag":216,"props":6153,"children":6154},{"style":263},[6155],{"type":46,"value":355},{"type":40,"tag":216,"props":6157,"children":6158},{"style":358},[6159],{"type":46,"value":593},{"type":40,"tag":216,"props":6161,"children":6162},{"style":269},[6163],{"type":46,"value":598},{"type":40,"tag":216,"props":6165,"children":6166},{"style":263},[6167],{"type":46,"value":355},{"type":40,"tag":216,"props":6169,"children":6170},{"style":269},[6171],{"type":46,"value":607},{"type":40,"tag":216,"props":6173,"children":6174},{"style":263},[6175],{"type":46,"value":301},{"type":40,"tag":56,"props":6177,"children":6178},{},[6179],{"type":40,"tag":127,"props":6180,"children":6181},{},[6182],{"type":46,"value":6183},"Not setting timeouts for user code execution",{"type":40,"tag":205,"props":6185,"children":6187},{"className":245,"code":6186,"language":247,"meta":210,"style":210},"\u002F\u002F ❌ Wrong - user code could run forever\nconst child = await sandbox.spawn(\"deno\", {\n  args: [\"run\", \"\u002Ftmp\u002Fuser_code.ts\"],\n});\nawait child.output(); \u002F\u002F Could hang indefinitely\n\n\u002F\u002F ✅ Correct - implement timeout handling\nconst child = await sandbox.spawn(\"deno\", {\n  args: [\"run\", \"\u002Ftmp\u002Fuser_code.ts\"],\n  stdout: \"piped\",\n  stderr: \"piped\",\n});\n\n\u002F\u002F Set a timeout to kill the process\nconst timeoutId = setTimeout(() => child.kill(), 5000); \u002F\u002F 5 second limit\n\ntry {\n  const output = await child.output();\n  return output;\n} finally {\n  clearTimeout(timeoutId);\n}\n",[6188],{"type":40,"tag":135,"props":6189,"children":6190},{"__ignoreMap":210},[6191,6199,6254,6305,6320,6353,6360,6368,6423,6474,6501,6528,6543,6550,6558,6630,6637,6649,6688,6703,6719,6744],{"type":40,"tag":216,"props":6192,"children":6193},{"class":218,"line":219},[6194],{"type":40,"tag":216,"props":6195,"children":6196},{"style":318},[6197],{"type":46,"value":6198},"\u002F\u002F ❌ Wrong - user code could run forever\n",{"type":40,"tag":216,"props":6200,"children":6201},{"class":218,"line":304},[6202,6206,6210,6214,6218,6222,6226,6230,6234,6238,6242,6246,6250],{"type":40,"tag":216,"props":6203,"children":6204},{"style":328},[6205],{"type":46,"value":396},{"type":40,"tag":216,"props":6207,"children":6208},{"style":269},[6209],{"type":46,"value":401},{"type":40,"tag":216,"props":6211,"children":6212},{"style":263},[6213],{"type":46,"value":341},{"type":40,"tag":216,"props":6215,"children":6216},{"style":257},[6217],{"type":46,"value":346},{"type":40,"tag":216,"props":6219,"children":6220},{"style":269},[6221],{"type":46,"value":414},{"type":40,"tag":216,"props":6223,"children":6224},{"style":263},[6225],{"type":46,"value":355},{"type":40,"tag":216,"props":6227,"children":6228},{"style":358},[6229],{"type":46,"value":423},{"type":40,"tag":216,"props":6231,"children":6232},{"style":269},[6233],{"type":46,"value":428},{"type":40,"tag":216,"props":6235,"children":6236},{"style":263},[6237],{"type":46,"value":296},{"type":40,"tag":216,"props":6239,"children":6240},{"style":228},[6241],{"type":46,"value":8},{"type":40,"tag":216,"props":6243,"children":6244},{"style":263},[6245],{"type":46,"value":296},{"type":40,"tag":216,"props":6247,"children":6248},{"style":263},[6249],{"type":46,"value":446},{"type":40,"tag":216,"props":6251,"children":6252},{"style":263},[6253],{"type":46,"value":813},{"type":40,"tag":216,"props":6255,"children":6256},{"class":218,"line":314},[6257,6261,6265,6269,6273,6277,6281,6285,6289,6293,6297,6301],{"type":40,"tag":216,"props":6258,"children":6259},{"style":453},[6260],{"type":46,"value":821},{"type":40,"tag":216,"props":6262,"children":6263},{"style":263},[6264],{"type":46,"value":461},{"type":40,"tag":216,"props":6266,"children":6267},{"style":269},[6268],{"type":46,"value":466},{"type":40,"tag":216,"props":6270,"children":6271},{"style":263},[6272],{"type":46,"value":296},{"type":40,"tag":216,"props":6274,"children":6275},{"style":228},[6276],{"type":46,"value":838},{"type":40,"tag":216,"props":6278,"children":6279},{"style":263},[6280],{"type":46,"value":296},{"type":40,"tag":216,"props":6282,"children":6283},{"style":263},[6284],{"type":46,"value":446},{"type":40,"tag":216,"props":6286,"children":6287},{"style":263},[6288],{"type":46,"value":287},{"type":40,"tag":216,"props":6290,"children":6291},{"style":228},[6292],{"type":46,"value":2384},{"type":40,"tag":216,"props":6294,"children":6295},{"style":263},[6296],{"type":46,"value":296},{"type":40,"tag":216,"props":6298,"children":6299},{"style":269},[6300],{"type":46,"value":864},{"type":40,"tag":216,"props":6302,"children":6303},{"style":263},[6304],{"type":46,"value":869},{"type":40,"tag":216,"props":6306,"children":6307},{"class":218,"line":324},[6308,6312,6316],{"type":40,"tag":216,"props":6309,"children":6310},{"style":263},[6311],{"type":46,"value":489},{"type":40,"tag":216,"props":6313,"children":6314},{"style":269},[6315],{"type":46,"value":494},{"type":40,"tag":216,"props":6317,"children":6318},{"style":263},[6319],{"type":46,"value":301},{"type":40,"tag":216,"props":6321,"children":6322},{"class":218,"line":373},[6323,6327,6331,6335,6339,6343,6348],{"type":40,"tag":216,"props":6324,"children":6325},{"style":257},[6326],{"type":46,"value":1487},{"type":40,"tag":216,"props":6328,"children":6329},{"style":269},[6330],{"type":46,"value":523},{"type":40,"tag":216,"props":6332,"children":6333},{"style":263},[6334],{"type":46,"value":355},{"type":40,"tag":216,"props":6336,"children":6337},{"style":358},[6338],{"type":46,"value":532},{"type":40,"tag":216,"props":6340,"children":6341},{"style":269},[6342],{"type":46,"value":366},{"type":40,"tag":216,"props":6344,"children":6345},{"style":263},[6346],{"type":46,"value":6347},";",{"type":40,"tag":216,"props":6349,"children":6350},{"style":318},[6351],{"type":46,"value":6352}," \u002F\u002F Could hang indefinitely\n",{"type":40,"tag":216,"props":6354,"children":6355},{"class":218,"line":381},[6356],{"type":40,"tag":216,"props":6357,"children":6358},{"emptyLinePlaceholder":308},[6359],{"type":46,"value":311},{"type":40,"tag":216,"props":6361,"children":6362},{"class":218,"line":390},[6363],{"type":40,"tag":216,"props":6364,"children":6365},{"style":318},[6366],{"type":46,"value":6367},"\u002F\u002F ✅ Correct - implement timeout handling\n",{"type":40,"tag":216,"props":6369,"children":6370},{"class":218,"line":25},[6371,6375,6379,6383,6387,6391,6395,6399,6403,6407,6411,6415,6419],{"type":40,"tag":216,"props":6372,"children":6373},{"style":328},[6374],{"type":46,"value":396},{"type":40,"tag":216,"props":6376,"children":6377},{"style":269},[6378],{"type":46,"value":401},{"type":40,"tag":216,"props":6380,"children":6381},{"style":263},[6382],{"type":46,"value":341},{"type":40,"tag":216,"props":6384,"children":6385},{"style":257},[6386],{"type":46,"value":346},{"type":40,"tag":216,"props":6388,"children":6389},{"style":269},[6390],{"type":46,"value":414},{"type":40,"tag":216,"props":6392,"children":6393},{"style":263},[6394],{"type":46,"value":355},{"type":40,"tag":216,"props":6396,"children":6397},{"style":358},[6398],{"type":46,"value":423},{"type":40,"tag":216,"props":6400,"children":6401},{"style":269},[6402],{"type":46,"value":428},{"type":40,"tag":216,"props":6404,"children":6405},{"style":263},[6406],{"type":46,"value":296},{"type":40,"tag":216,"props":6408,"children":6409},{"style":228},[6410],{"type":46,"value":8},{"type":40,"tag":216,"props":6412,"children":6413},{"style":263},[6414],{"type":46,"value":296},{"type":40,"tag":216,"props":6416,"children":6417},{"style":263},[6418],{"type":46,"value":446},{"type":40,"tag":216,"props":6420,"children":6421},{"style":263},[6422],{"type":46,"value":813},{"type":40,"tag":216,"props":6424,"children":6425},{"class":218,"line":543},[6426,6430,6434,6438,6442,6446,6450,6454,6458,6462,6466,6470],{"type":40,"tag":216,"props":6427,"children":6428},{"style":453},[6429],{"type":46,"value":821},{"type":40,"tag":216,"props":6431,"children":6432},{"style":263},[6433],{"type":46,"value":461},{"type":40,"tag":216,"props":6435,"children":6436},{"style":269},[6437],{"type":46,"value":466},{"type":40,"tag":216,"props":6439,"children":6440},{"style":263},[6441],{"type":46,"value":296},{"type":40,"tag":216,"props":6443,"children":6444},{"style":228},[6445],{"type":46,"value":838},{"type":40,"tag":216,"props":6447,"children":6448},{"style":263},[6449],{"type":46,"value":296},{"type":40,"tag":216,"props":6451,"children":6452},{"style":263},[6453],{"type":46,"value":446},{"type":40,"tag":216,"props":6455,"children":6456},{"style":263},[6457],{"type":46,"value":287},{"type":40,"tag":216,"props":6459,"children":6460},{"style":228},[6461],{"type":46,"value":2384},{"type":40,"tag":216,"props":6463,"children":6464},{"style":263},[6465],{"type":46,"value":296},{"type":40,"tag":216,"props":6467,"children":6468},{"style":269},[6469],{"type":46,"value":864},{"type":40,"tag":216,"props":6471,"children":6472},{"style":263},[6473],{"type":46,"value":869},{"type":40,"tag":216,"props":6475,"children":6476},{"class":218,"line":551},[6477,6481,6485,6489,6493,6497],{"type":40,"tag":216,"props":6478,"children":6479},{"style":453},[6480],{"type":46,"value":911},{"type":40,"tag":216,"props":6482,"children":6483},{"style":263},[6484],{"type":46,"value":461},{"type":40,"tag":216,"props":6486,"children":6487},{"style":263},[6488],{"type":46,"value":287},{"type":40,"tag":216,"props":6490,"children":6491},{"style":228},[6492],{"type":46,"value":890},{"type":40,"tag":216,"props":6494,"children":6495},{"style":263},[6496],{"type":46,"value":296},{"type":40,"tag":216,"props":6498,"children":6499},{"style":263},[6500],{"type":46,"value":869},{"type":40,"tag":216,"props":6502,"children":6503},{"class":218,"line":614},[6504,6508,6512,6516,6520,6524],{"type":40,"tag":216,"props":6505,"children":6506},{"style":453},[6507],{"type":46,"value":944},{"type":40,"tag":216,"props":6509,"children":6510},{"style":263},[6511],{"type":46,"value":461},{"type":40,"tag":216,"props":6513,"children":6514},{"style":263},[6515],{"type":46,"value":287},{"type":40,"tag":216,"props":6517,"children":6518},{"style":228},[6519],{"type":46,"value":890},{"type":40,"tag":216,"props":6521,"children":6522},{"style":263},[6523],{"type":46,"value":296},{"type":40,"tag":216,"props":6525,"children":6526},{"style":263},[6527],{"type":46,"value":869},{"type":40,"tag":216,"props":6529,"children":6530},{"class":218,"line":1168},[6531,6535,6539],{"type":40,"tag":216,"props":6532,"children":6533},{"style":263},[6534],{"type":46,"value":489},{"type":40,"tag":216,"props":6536,"children":6537},{"style":269},[6538],{"type":46,"value":494},{"type":40,"tag":216,"props":6540,"children":6541},{"style":263},[6542],{"type":46,"value":301},{"type":40,"tag":216,"props":6544,"children":6545},{"class":218,"line":1604},[6546],{"type":40,"tag":216,"props":6547,"children":6548},{"emptyLinePlaceholder":308},[6549],{"type":46,"value":311},{"type":40,"tag":216,"props":6551,"children":6552},{"class":218,"line":1651},[6553],{"type":40,"tag":216,"props":6554,"children":6555},{"style":318},[6556],{"type":46,"value":6557},"\u002F\u002F Set a timeout to kill the process\n",{"type":40,"tag":216,"props":6559,"children":6560},{"class":218,"line":1681},[6561,6565,6570,6574,6579,6583,6587,6592,6596,6600,6604,6608,6612,6617,6621,6625],{"type":40,"tag":216,"props":6562,"children":6563},{"style":328},[6564],{"type":46,"value":396},{"type":40,"tag":216,"props":6566,"children":6567},{"style":269},[6568],{"type":46,"value":6569}," timeoutId ",{"type":40,"tag":216,"props":6571,"children":6572},{"style":263},[6573],{"type":46,"value":341},{"type":40,"tag":216,"props":6575,"children":6576},{"style":358},[6577],{"type":46,"value":6578}," setTimeout",{"type":40,"tag":216,"props":6580,"children":6581},{"style":269},[6582],{"type":46,"value":428},{"type":40,"tag":216,"props":6584,"children":6585},{"style":263},[6586],{"type":46,"value":366},{"type":40,"tag":216,"props":6588,"children":6589},{"style":328},[6590],{"type":46,"value":6591}," =>",{"type":40,"tag":216,"props":6593,"children":6594},{"style":269},[6595],{"type":46,"value":523},{"type":40,"tag":216,"props":6597,"children":6598},{"style":263},[6599],{"type":46,"value":355},{"type":40,"tag":216,"props":6601,"children":6602},{"style":358},[6603],{"type":46,"value":1983},{"type":40,"tag":216,"props":6605,"children":6606},{"style":269},[6607],{"type":46,"value":366},{"type":40,"tag":216,"props":6609,"children":6610},{"style":263},[6611],{"type":46,"value":446},{"type":40,"tag":216,"props":6613,"children":6614},{"style":2728},[6615],{"type":46,"value":6616}," 5000",{"type":40,"tag":216,"props":6618,"children":6619},{"style":269},[6620],{"type":46,"value":494},{"type":40,"tag":216,"props":6622,"children":6623},{"style":263},[6624],{"type":46,"value":6347},{"type":40,"tag":216,"props":6626,"children":6627},{"style":318},[6628],{"type":46,"value":6629}," \u002F\u002F 5 second limit\n",{"type":40,"tag":216,"props":6631,"children":6632},{"class":218,"line":1743},[6633],{"type":40,"tag":216,"props":6634,"children":6635},{"emptyLinePlaceholder":308},[6636],{"type":46,"value":311},{"type":40,"tag":216,"props":6638,"children":6639},{"class":218,"line":1774},[6640,6645],{"type":40,"tag":216,"props":6641,"children":6642},{"style":257},[6643],{"type":46,"value":6644},"try",{"type":40,"tag":216,"props":6646,"children":6647},{"style":263},[6648],{"type":46,"value":813},{"type":40,"tag":216,"props":6650,"children":6651},{"class":218,"line":1832},[6652,6656,6660,6664,6668,6672,6676,6680,6684],{"type":40,"tag":216,"props":6653,"children":6654},{"style":328},[6655],{"type":46,"value":1687},{"type":40,"tag":216,"props":6657,"children":6658},{"style":269},[6659],{"type":46,"value":1079},{"type":40,"tag":216,"props":6661,"children":6662},{"style":263},[6663],{"type":46,"value":1714},{"type":40,"tag":216,"props":6665,"children":6666},{"style":257},[6667],{"type":46,"value":346},{"type":40,"tag":216,"props":6669,"children":6670},{"style":269},[6671],{"type":46,"value":523},{"type":40,"tag":216,"props":6673,"children":6674},{"style":263},[6675],{"type":46,"value":355},{"type":40,"tag":216,"props":6677,"children":6678},{"style":358},[6679],{"type":46,"value":532},{"type":40,"tag":216,"props":6681,"children":6682},{"style":453},[6683],{"type":46,"value":366},{"type":40,"tag":216,"props":6685,"children":6686},{"style":263},[6687],{"type":46,"value":301},{"type":40,"tag":216,"props":6689,"children":6690},{"class":218,"line":2643},[6691,6695,6699],{"type":40,"tag":216,"props":6692,"children":6693},{"style":257},[6694],{"type":46,"value":2832},{"type":40,"tag":216,"props":6696,"children":6697},{"style":269},[6698],{"type":46,"value":1079},{"type":40,"tag":216,"props":6700,"children":6701},{"style":263},[6702],{"type":46,"value":301},{"type":40,"tag":216,"props":6704,"children":6705},{"class":218,"line":2651},[6706,6710,6715],{"type":40,"tag":216,"props":6707,"children":6708},{"style":263},[6709],{"type":46,"value":489},{"type":40,"tag":216,"props":6711,"children":6712},{"style":257},[6713],{"type":46,"value":6714}," finally",{"type":40,"tag":216,"props":6716,"children":6717},{"style":263},[6718],{"type":46,"value":813},{"type":40,"tag":216,"props":6720,"children":6721},{"class":218,"line":2691},[6722,6727,6731,6736,6740],{"type":40,"tag":216,"props":6723,"children":6724},{"style":358},[6725],{"type":46,"value":6726},"  clearTimeout",{"type":40,"tag":216,"props":6728,"children":6729},{"style":453},[6730],{"type":46,"value":428},{"type":40,"tag":216,"props":6732,"children":6733},{"style":269},[6734],{"type":46,"value":6735},"timeoutId",{"type":40,"tag":216,"props":6737,"children":6738},{"style":453},[6739],{"type":46,"value":494},{"type":40,"tag":216,"props":6741,"children":6742},{"style":263},[6743],{"type":46,"value":301},{"type":40,"tag":216,"props":6745,"children":6746},{"class":218,"line":2699},[6747],{"type":40,"tag":216,"props":6748,"children":6749},{"style":263},[6750],{"type":46,"value":1838},{"type":40,"tag":56,"props":6752,"children":6753},{},[6754],{"type":40,"tag":127,"props":6755,"children":6756},{},[6757],{"type":46,"value":6758},"Trusting sandbox output without validation",{"type":40,"tag":205,"props":6760,"children":6762},{"className":245,"code":6761,"language":247,"meta":210,"style":210},"\u002F\u002F ❌ Wrong - directly using untrusted output as code\nconst result = await runUserCode(code);\n\u002F\u002F Never execute or inject untrusted output!\n\n\u002F\u002F ✅ Correct - validate and sanitize output\nconst result = await runUserCode(code);\ntry {\n  const parsed = JSON.parse(result); \u002F\u002F Parse as data, not code\n  if (isValidResponse(parsed)) {\n    return parsed;\n  }\n} catch {\n  throw new Error(\"Invalid response from sandbox\");\n}\n",[6763],{"type":40,"tag":135,"props":6764,"children":6765},{"__ignoreMap":210},[6766,6774,6807,6815,6822,6830,6861,6872,6922,6956,6972,6979,6995,7036],{"type":40,"tag":216,"props":6767,"children":6768},{"class":218,"line":219},[6769],{"type":40,"tag":216,"props":6770,"children":6771},{"style":318},[6772],{"type":46,"value":6773},"\u002F\u002F ❌ Wrong - directly using untrusted output as code\n",{"type":40,"tag":216,"props":6775,"children":6776},{"class":218,"line":304},[6777,6781,6786,6790,6794,6798,6803],{"type":40,"tag":216,"props":6778,"children":6779},{"style":328},[6780],{"type":46,"value":396},{"type":40,"tag":216,"props":6782,"children":6783},{"style":269},[6784],{"type":46,"value":6785}," result ",{"type":40,"tag":216,"props":6787,"children":6788},{"style":263},[6789],{"type":46,"value":341},{"type":40,"tag":216,"props":6791,"children":6792},{"style":257},[6793],{"type":46,"value":346},{"type":40,"tag":216,"props":6795,"children":6796},{"style":358},[6797],{"type":46,"value":2239},{"type":40,"tag":216,"props":6799,"children":6800},{"style":269},[6801],{"type":46,"value":6802},"(code)",{"type":40,"tag":216,"props":6804,"children":6805},{"style":263},[6806],{"type":46,"value":301},{"type":40,"tag":216,"props":6808,"children":6809},{"class":218,"line":314},[6810],{"type":40,"tag":216,"props":6811,"children":6812},{"style":318},[6813],{"type":46,"value":6814},"\u002F\u002F Never execute or inject untrusted output!\n",{"type":40,"tag":216,"props":6816,"children":6817},{"class":218,"line":324},[6818],{"type":40,"tag":216,"props":6819,"children":6820},{"emptyLinePlaceholder":308},[6821],{"type":46,"value":311},{"type":40,"tag":216,"props":6823,"children":6824},{"class":218,"line":373},[6825],{"type":40,"tag":216,"props":6826,"children":6827},{"style":318},[6828],{"type":46,"value":6829},"\u002F\u002F ✅ Correct - validate and sanitize output\n",{"type":40,"tag":216,"props":6831,"children":6832},{"class":218,"line":381},[6833,6837,6841,6845,6849,6853,6857],{"type":40,"tag":216,"props":6834,"children":6835},{"style":328},[6836],{"type":46,"value":396},{"type":40,"tag":216,"props":6838,"children":6839},{"style":269},[6840],{"type":46,"value":6785},{"type":40,"tag":216,"props":6842,"children":6843},{"style":263},[6844],{"type":46,"value":341},{"type":40,"tag":216,"props":6846,"children":6847},{"style":257},[6848],{"type":46,"value":346},{"type":40,"tag":216,"props":6850,"children":6851},{"style":358},[6852],{"type":46,"value":2239},{"type":40,"tag":216,"props":6854,"children":6855},{"style":269},[6856],{"type":46,"value":6802},{"type":40,"tag":216,"props":6858,"children":6859},{"style":263},[6860],{"type":46,"value":301},{"type":40,"tag":216,"props":6862,"children":6863},{"class":218,"line":390},[6864,6868],{"type":40,"tag":216,"props":6865,"children":6866},{"style":257},[6867],{"type":46,"value":6644},{"type":40,"tag":216,"props":6869,"children":6870},{"style":263},[6871],{"type":46,"value":813},{"type":40,"tag":216,"props":6873,"children":6874},{"class":218,"line":25},[6875,6879,6884,6888,6892,6896,6900,6904,6909,6913,6917],{"type":40,"tag":216,"props":6876,"children":6877},{"style":328},[6878],{"type":46,"value":1687},{"type":40,"tag":216,"props":6880,"children":6881},{"style":269},[6882],{"type":46,"value":6883}," parsed",{"type":40,"tag":216,"props":6885,"children":6886},{"style":263},[6887],{"type":46,"value":1714},{"type":40,"tag":216,"props":6889,"children":6890},{"style":269},[6891],{"type":46,"value":4603},{"type":40,"tag":216,"props":6893,"children":6894},{"style":263},[6895],{"type":46,"value":355},{"type":40,"tag":216,"props":6897,"children":6898},{"style":358},[6899],{"type":46,"value":4612},{"type":40,"tag":216,"props":6901,"children":6902},{"style":453},[6903],{"type":46,"value":428},{"type":40,"tag":216,"props":6905,"children":6906},{"style":269},[6907],{"type":46,"value":6908},"result",{"type":40,"tag":216,"props":6910,"children":6911},{"style":453},[6912],{"type":46,"value":494},{"type":40,"tag":216,"props":6914,"children":6915},{"style":263},[6916],{"type":46,"value":6347},{"type":40,"tag":216,"props":6918,"children":6919},{"style":318},[6920],{"type":46,"value":6921}," \u002F\u002F Parse as data, not code\n",{"type":40,"tag":216,"props":6923,"children":6924},{"class":218,"line":543},[6925,6929,6933,6938,6942,6947,6952],{"type":40,"tag":216,"props":6926,"children":6927},{"style":257},[6928],{"type":46,"value":1749},{"type":40,"tag":216,"props":6930,"children":6931},{"style":453},[6932],{"type":46,"value":1662},{"type":40,"tag":216,"props":6934,"children":6935},{"style":358},[6936],{"type":46,"value":6937},"isValidResponse",{"type":40,"tag":216,"props":6939,"children":6940},{"style":453},[6941],{"type":46,"value":428},{"type":40,"tag":216,"props":6943,"children":6944},{"style":269},[6945],{"type":46,"value":6946},"parsed",{"type":40,"tag":216,"props":6948,"children":6949},{"style":453},[6950],{"type":46,"value":6951},")) ",{"type":40,"tag":216,"props":6953,"children":6954},{"style":263},[6955],{"type":46,"value":1678},{"type":40,"tag":216,"props":6957,"children":6958},{"class":218,"line":551},[6959,6964,6968],{"type":40,"tag":216,"props":6960,"children":6961},{"style":257},[6962],{"type":46,"value":6963},"    return",{"type":40,"tag":216,"props":6965,"children":6966},{"style":269},[6967],{"type":46,"value":6883},{"type":40,"tag":216,"props":6969,"children":6970},{"style":263},[6971],{"type":46,"value":301},{"type":40,"tag":216,"props":6973,"children":6974},{"class":218,"line":614},[6975],{"type":40,"tag":216,"props":6976,"children":6977},{"style":263},[6978],{"type":46,"value":2815},{"type":40,"tag":216,"props":6980,"children":6981},{"class":218,"line":1168},[6982,6986,6991],{"type":40,"tag":216,"props":6983,"children":6984},{"style":263},[6985],{"type":46,"value":489},{"type":40,"tag":216,"props":6987,"children":6988},{"style":257},[6989],{"type":46,"value":6990}," catch",{"type":40,"tag":216,"props":6992,"children":6993},{"style":263},[6994],{"type":46,"value":813},{"type":40,"tag":216,"props":6996,"children":6997},{"class":218,"line":1604},[6998,7003,7007,7011,7015,7019,7024,7028,7032],{"type":40,"tag":216,"props":6999,"children":7000},{"style":257},[7001],{"type":46,"value":7002},"  throw",{"type":40,"tag":216,"props":7004,"children":7005},{"style":263},[7006],{"type":46,"value":1133},{"type":40,"tag":216,"props":7008,"children":7009},{"style":358},[7010],{"type":46,"value":2757},{"type":40,"tag":216,"props":7012,"children":7013},{"style":453},[7014],{"type":46,"value":428},{"type":40,"tag":216,"props":7016,"children":7017},{"style":263},[7018],{"type":46,"value":296},{"type":40,"tag":216,"props":7020,"children":7021},{"style":228},[7022],{"type":46,"value":7023},"Invalid response from sandbox",{"type":40,"tag":216,"props":7025,"children":7026},{"style":263},[7027],{"type":46,"value":296},{"type":40,"tag":216,"props":7029,"children":7030},{"style":453},[7031],{"type":46,"value":494},{"type":40,"tag":216,"props":7033,"children":7034},{"style":263},[7035],{"type":46,"value":301},{"type":40,"tag":216,"props":7037,"children":7038},{"class":218,"line":1651},[7039],{"type":40,"tag":216,"props":7040,"children":7041},{"style":263},[7042],{"type":46,"value":1838},{"type":40,"tag":7044,"props":7045,"children":7046},"style",{},[7047],{"type":46,"value":7048},"html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}",{"items":7050,"total":373},[7051,7066,7080,7100,7106],{"slug":8,"name":8,"fn":7052,"description":7053,"org":7054,"tags":7055,"stars":21,"repoUrl":22,"updatedAt":7065},"build and manage Deno applications","Use when writing, running, configuring, reviewing, or debugging code in a Deno project, or when scaffolding a new one. Covers dependency management with deno install and deno add, package.json and node_modules support, npm and JSR packages, permissions, where configuration belongs across package.json, tsconfig.json and deno.json, workspaces, the built-in toolchain (fmt, lint, test, check, bench, compile), and publishing.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[7056,7059,7060,7063],{"name":7057,"slug":7058,"type":14},"CLI","cli",{"name":9,"slug":8,"type":14},{"name":7061,"slug":7062,"type":14},"JavaScript","javascript",{"name":7064,"slug":247,"type":14},"TypeScript","2026-07-31T06:23:32.095122",{"slug":7067,"name":7067,"fn":7068,"description":7069,"org":7070,"tags":7071,"stars":21,"repoUrl":22,"updatedAt":7079},"deno-deploy","deploy apps to Deno Deploy","Use when deploying Deno apps to production, asking about Deno Deploy, or working with `deno deploy` CLI commands. Covers deployment workflows, environment variables, KV database access, custom domains, the --tunnel flag for local development, and the `deno deploy` command reference.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[7072,7073,7076],{"name":9,"slug":8,"type":14},{"name":7074,"slug":7075,"type":14},"Deployment","deployment",{"name":7077,"slug":7078,"type":14},"Serverless","serverless","2026-07-31T05:52:43.564231",{"slug":7081,"name":7081,"fn":7082,"description":7083,"org":7084,"tags":7085,"stars":21,"repoUrl":22,"updatedAt":7099},"deno-frontend","build Deno frontend apps with Fresh","Use when building a web frontend with Deno — running React, Vite, Astro, SvelteKit, Next.js, Nuxt or other npm frameworks under Deno, or working with Fresh, Deno's own island-architecture framework. Covers which path to pick, Fresh 2.x routes, handlers, islands, Preact signals, Tailwind, and Fresh 1.x to 2.x migration.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[7086,7087,7090,7093,7096],{"name":9,"slug":8,"type":14},{"name":7088,"slug":7089,"type":14},"Fresh","fresh",{"name":7091,"slug":7092,"type":14},"Frontend","frontend",{"name":7094,"slug":7095,"type":14},"Preact","preact",{"name":7097,"slug":7098,"type":14},"Tailwind CSS","tailwind-css","2026-07-31T05:52:44.546078",{"slug":4,"name":4,"fn":5,"description":6,"org":7101,"tags":7102,"stars":21,"repoUrl":22,"updatedAt":23},{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[7103,7104,7105],{"name":19,"slug":20,"type":14},{"name":9,"slug":8,"type":14},{"name":16,"slug":17,"type":14},{"slug":7107,"name":7107,"fn":7108,"description":7109,"org":7110,"tags":7111,"stars":21,"repoUrl":22,"updatedAt":7121},"migrate-to-deno","migrate Node.js projects to Deno","Use when moving a Node.js, npm, Yarn, pnpm, or Bun project to Deno, or when adopting Deno incrementally in an existing JavaScript or TypeScript codebase. Covers using Deno as a drop-in package manager, running existing package.json scripts, CommonJS versus ESM, node_modules layout, lockfile migration, permissions, whether to adopt the built-in toolchain, and per-tool command equivalents.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[7112,7113,7114,7117,7120],{"name":9,"slug":8,"type":14},{"name":7061,"slug":7062,"type":14},{"name":7115,"slug":7116,"type":14},"Migration","migration",{"name":7118,"slug":7119,"type":14},"Node.js","node-js",{"name":7064,"slug":247,"type":14},"2026-07-31T06:23:32.78688",{"items":7123,"total":373},[7124,7131,7137,7145,7151],{"slug":8,"name":8,"fn":7052,"description":7053,"org":7125,"tags":7126,"stars":21,"repoUrl":22,"updatedAt":7065},{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[7127,7128,7129,7130],{"name":7057,"slug":7058,"type":14},{"name":9,"slug":8,"type":14},{"name":7061,"slug":7062,"type":14},{"name":7064,"slug":247,"type":14},{"slug":7067,"name":7067,"fn":7068,"description":7069,"org":7132,"tags":7133,"stars":21,"repoUrl":22,"updatedAt":7079},{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[7134,7135,7136],{"name":9,"slug":8,"type":14},{"name":7074,"slug":7075,"type":14},{"name":7077,"slug":7078,"type":14},{"slug":7081,"name":7081,"fn":7082,"description":7083,"org":7138,"tags":7139,"stars":21,"repoUrl":22,"updatedAt":7099},{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[7140,7141,7142,7143,7144],{"name":9,"slug":8,"type":14},{"name":7088,"slug":7089,"type":14},{"name":7091,"slug":7092,"type":14},{"name":7094,"slug":7095,"type":14},{"name":7097,"slug":7098,"type":14},{"slug":4,"name":4,"fn":5,"description":6,"org":7146,"tags":7147,"stars":21,"repoUrl":22,"updatedAt":23},{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[7148,7149,7150],{"name":19,"slug":20,"type":14},{"name":9,"slug":8,"type":14},{"name":16,"slug":17,"type":14},{"slug":7107,"name":7107,"fn":7108,"description":7109,"org":7152,"tags":7153,"stars":21,"repoUrl":22,"updatedAt":7121},{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[7154,7155,7156,7157,7158],{"name":9,"slug":8,"type":14},{"name":7061,"slug":7062,"type":14},{"name":7115,"slug":7116,"type":14},{"name":7118,"slug":7119,"type":14},{"name":7064,"slug":247,"type":14}]