[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill-tanstack-ai-sandbox":3,"mdc-g4z72o-key":53,"related-org-tanstack-ai-sandbox":6368,"related-repo-tanstack-ai-sandbox":6512},{"slug":4,"name":4,"fn":5,"description":6,"org":7,"tags":11,"stars":23,"repoUrl":24,"updatedAt":25,"license":26,"forks":27,"topics":28,"repo":48,"sourceUrl":51,"mdContent":52},"ai-sandbox","run AI agents in isolated sandboxes","Run harness adapters (Claude Code, Codex, OpenCode) INSIDE isolated sandboxes via defineSandbox + withSandbox + a provider (localProcessSandbox \u002F dockerSandbox). Covers declarative provisioning: createSecrets + secret\u002Fbearer, skills (agentSkill\u002FgitSkill\u002FmcpSkill\u002F fileSkill), plugins, instructions → canonical AGENTS.md + symlinks projected per harness; shallow-clone default with depth opt-out; serial\u002Fparallel setup callback over a persistent shell; snapshot-after-setup default with snapshotMaxAge TTL; defineWorkspace (git\u002Fsetup\u002Fscripts\u002Fskills\u002Fsecrets\u002F instructions\u002Fplugins), defineSandboxPolicy (allow\u002Fask\u002Fdeny), lifecycle\u002Fresume, the SandboxHandle (fs\u002Fgit\u002Fprocess\u002Fports), capability tokens, defineSandbox hooks (onFile\u002FonFileCreate\u002FonFileChange\u002FonFileDelete\u002FonReady\u002FonError\u002F onDestroy) + fileEvents flag, chat middleware sandbox group (defineChatMiddleware sandbox hooks), the sandbox debug category, watchWorkspace as a low-level building block, and the file.changed \u002F sandbox.file \u002F claude-code.session-id events. Use whenever a harness adapter needs a sandbox or when building sandbox providers.\n",{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},"tanstack","TanStack","https:\u002F\u002Fpexgzepcugksgbtrxkhf.supabase.co\u002Fstorage\u002Fv1\u002Fobject\u002Fpublic\u002Forg-logos\u002Ftanstack.png",[12,16,19,22],{"name":13,"slug":14,"type":15},"Sandboxing","sandboxing","tag",{"name":17,"slug":18,"type":15},"Agents","agents",{"name":20,"slug":21,"type":15},"Docker","docker",{"name":9,"slug":8,"type":15},2884,"https:\u002F\u002Fgithub.com\u002FTanStack\u002Fai","2026-07-16T06:02:33.818289",null,269,[29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,8,44,45,46,47],"ai","ai-agents","ai-sdk","anthropic","chatbot","function-calling","gemini","generative-ai","llm","multimodal","openai","react","solidjs","streaming","svelte","tool-calling","typescript","typescript-sdk","vue",{"repoUrl":24,"stars":23,"forks":27,"topics":49,"description":50},[29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,8,44,45,46,47],"🤖 Type-safe, provider-agnostic TypeScript AI SDK for streaming chat, tool calling, agents, and multimodal apps across OpenAI, Anthropic, Gemini, React, Vue, Svelte, and Solid.","https:\u002F\u002Fgithub.com\u002FTanStack\u002Fai\u002Ftree\u002FHEAD\u002Fpackages\u002Fai-sandbox\u002Fskills\u002Fai-sandbox","---\nname: ai-sandbox\ndescription: >\n  Run harness adapters (Claude Code, Codex, OpenCode) INSIDE\n  isolated sandboxes via defineSandbox + withSandbox + a provider\n  (localProcessSandbox \u002F dockerSandbox). Covers declarative provisioning:\n  createSecrets + secret\u002Fbearer, skills (agentSkill\u002FgitSkill\u002FmcpSkill\u002F\n  fileSkill), plugins, instructions → canonical AGENTS.md + symlinks projected\n  per harness; shallow-clone default with depth opt-out; serial\u002Fparallel setup\n  callback over a persistent shell; snapshot-after-setup default with\n  snapshotMaxAge TTL; defineWorkspace (git\u002Fsetup\u002Fscripts\u002Fskills\u002Fsecrets\u002F\n  instructions\u002Fplugins), defineSandboxPolicy (allow\u002Fask\u002Fdeny), lifecycle\u002Fresume,\n  the SandboxHandle (fs\u002Fgit\u002Fprocess\u002Fports), capability tokens, defineSandbox\n  hooks (onFile\u002FonFileCreate\u002FonFileChange\u002FonFileDelete\u002FonReady\u002FonError\u002F\n  onDestroy) + fileEvents flag, chat middleware sandbox group\n  (defineChatMiddleware sandbox hooks), the sandbox debug category,\n  watchWorkspace as a low-level building block, and the file.changed \u002F\n  sandbox.file \u002F claude-code.session-id events. Use whenever a harness adapter\n  needs a sandbox or when building sandbox providers.\ntype: sub-skill\nlibrary: tanstack-ai\nlibrary_version: '0.1.0'\nsources:\n  - 'TanStack\u002Fai:docs\u002Fsandbox\u002Foverview.md'\n---\n\n# Sandboxes\n\nHarness adapters declare `requires: [SandboxCapability]`. `chat()` errors unless\nsome middleware provides it — `withSandbox(...)` does. The adapter then runs the\nagent CLI **inside** the sandbox and streams its events back.\n\n## Setup — Claude Code in a Docker sandbox\n\n```typescript\nimport { chat } from '@tanstack\u002Fai'\nimport { claudeCodeText } from '@tanstack\u002Fai-claude-code'\nimport {\n  defineSandbox,\n  defineWorkspace,\n  withSandbox,\n} from '@tanstack\u002Fai-sandbox'\nimport { dockerSandbox } from '@tanstack\u002Fai-sandbox-docker'\n\nconst sandbox = defineSandbox({\n  id: 'repo-agent',\n  provider: dockerSandbox({ image: 'node:22' }),\n  workspace: defineWorkspace({\n    source: { type: 'git', url: 'https:\u002F\u002Fgithub.com\u002Fowner\u002Frepo', ref: 'main' },\n    packageManager: 'pnpm',\n    setup: ['corepack enable', 'pnpm install'],\n    scripts: { test: 'pnpm test' },\n    secrets: { ANTHROPIC_API_KEY: process.env.ANTHROPIC_API_KEY ?? '' },\n  }),\n  lifecycle: { reuse: 'thread', snapshot: 'after-setup', keepAlive: '30m' },\n})\n\nconst stream = chat({\n  threadId,\n  adapter: claudeCodeText('sonnet'),\n  messages,\n  middleware: [withSandbox(sandbox)],\n})\n```\n\n## Type-safe secrets\n\n```typescript\nimport { createSecrets, bearer } from '@tanstack\u002Fai-sandbox'\n\nconst secrets = createSecrets({\n  GH: process.env.GH_TOKEN ?? '',\n  SENTRY: process.env.SENTRY_TOKEN ?? '',\n})\n\u002F\u002F secrets.GH is a SecretRef — the underlying string is stored in a\n\u002F\u002F non-enumerable symbol-keyed registry and never logged, snapshotted,\n\u002F\u002F or written to the sandbox store.\n```\n\nPass `secrets` to `defineWorkspace({ secrets })` so skill and MCP projectors\ncan resolve them. Use `secret: secrets.GH` in `gitSkill` for private-repo auth\nand `secrets.GH` \u002F `bearer(secrets.GH)` in MCP header values:\n\n- `secrets.GH` — resolves to the raw token value.\n- `bearer(secrets.GH)` — resolves to `\"Bearer \u003Cvalue>\"`.\n\n## Declarative provisioning (skills, plugins, MCP, instructions)\n\n```typescript\nimport {\n  agentSkill,\n  gitSkill,\n  mcpSkill,\n  fileSkill,\n  bearer,\n  createSecrets,\n  defineWorkspace,\n} from '@tanstack\u002Fai-sandbox'\n\nconst secrets = createSecrets({ GH: process.env.GH_TOKEN ?? '' })\n\ndefineWorkspace({\n  source: { type: 'git', url: 'https:\u002F\u002Fgithub.com\u002Fowner\u002Frepo' },\n  secrets,\n  skills: [\n    agentSkill('tanstack'), \u002F\u002F named skill (no-op with warning on CLIs that lack the concept)\n    gitSkill({\n      repo: 'owner\u002Fprivate-skills',\n      secret: secrets.GH, \u002F\u002F resolved at bootstrap time, never stored\n      \u002F\u002F into: '\u002Fabs\u002Fpath\u002Finside\u002Fsandbox'  \u002F\u002F optional; defaults to .tanstack-skills\u002F\u003Crepo>\n    }),\n    mcpSkill('my-mcp', {\n      url: 'https:\u002F\u002Fmcp.example.com',\n      headers: { Authorization: bearer(secrets.GH) },\n    }),\n    fileSkill({ path: '.hints.md', content: 'Prefer pnpm.' }),\n  ],\n  plugins: ['@anthropic\u002Fplugin-foo'], \u002F\u002F no-op with warning on CLIs without a plugin concept\n  instructions: 'Always run `pnpm test` before proposing a change.',\n})\n```\n\nEach skill type is projected per harness (Claude Code → `.mcp.json`; Codex →\n`.codex\u002Fconfig.toml`; OpenCode → `opencode.json`).\n`instructions` is written as `AGENTS.md` at the workspace root; `CLAUDE.md` and\n`GEMINI.md` are created as symlinks (falling back to copies on symlink failure).\nSkills\u002Fplugins that a CLI lacks emit a `console.warn` and are skipped.\n\n**`gitSkill` `into` field:** an **absolute path inside the sandbox** where the\nrepo is cloned. Defaults to `\u003Croot>\u002F.tanstack-skills\u002F\u003Crepo-basename>`.\n\n## Fast init\n\n### Shallow clone (`depth`)\n\n`githubRepo` \u002F `gitSource` default to `--depth 1 --single-branch`. Override:\n\n```typescript\nimport { githubRepo, defineWorkspace } from '@tanstack\u002Fai-sandbox'\n\ndefineWorkspace({ source: githubRepo({ repo: 'owner\u002Fapp' }) }) \u002F\u002F depth 1 (default)\ndefineWorkspace({ source: githubRepo({ repo: 'owner\u002Fapp', depth: 10 }) }) \u002F\u002F 10 commits\ndefineWorkspace({ source: githubRepo({ repo: 'owner\u002Fapp', depth: 'full' }) }) \u002F\u002F full history\n```\n\n### Serial \u002F parallel `setup` callback\n\n`setup` accepts a plain `Array\u003Cstring>` (all serial) or a callback that records\nserial and parallel groups over a **persistent shell** whose cwd\u002Fenv carry over\nbetween serial steps:\n\n```typescript\ndefineWorkspace({\n  source: githubRepo({ repo: 'owner\u002Fapp' }),\n  setup: ({ serial, parallel }) => {\n    serial('corepack enable')\n    serial('pnpm install')\n    parallel(['pnpm build', 'pnpm typecheck']) \u002F\u002F concurrent; inherit cwd+env from shell\n    serial('echo done')\n  },\n})\n```\n\n### Snapshot-after-setup and `snapshotMaxAge`\n\nWhen the provider supports snapshots, bootstrap takes one automatically after\n`setup` completes. Subsequent runs resume from the snapshot (skipping setup).\nOverride or add a TTL:\n\n```typescript\nlifecycle: {\n  snapshot: 'after-setup', \u002F\u002F default when provider.capabilities().snapshots\n  snapshotMaxAge: '24h',   \u002F\u002F re-create when the snapshot is older than this\n}\n```\n\nProviders without snapshot support skip the step silently.\n\n## Providers\n\n- `localProcessSandbox()` — runs on the host (no isolation; dev loop only).\n- `dockerSandbox({ image })` — isolated container; snapshots, fork, resume-by-id.\n\nBoth implement the same `SandboxHandle`: `fs` (read\u002Fwrite\u002Flist\u002Fmkdir\u002Fremove\u002F\nrename\u002Fexists), `git` (clone\u002Fstatus\u002Fadd\u002Fcommit\u002Fpush\u002Fpull\u002Fbranch), `process`\n(`exec` + duplex `spawn`), `ports.connect(port)`, `env.set`, optional\n`snapshot()`\u002F`fork()`, `destroy()`. Providers advertise support via\n`capabilities()`; calling an unsupported optional method throws\n`UnsupportedCapabilityError`.\n\n## Policy\n\n```typescript\nimport { defineSandboxPolicy } from '@tanstack\u002Fai-sandbox'\n\nconst policy = defineSandboxPolicy({\n  commands: {\n    allow: ['pnpm test'],\n    ask: ['curl *'],\n    deny: ['sudo *', 'rm -rf *'],\n  },\n  capabilities: { fileWrite: 'allow', network: 'ask' },\n  default: 'ask', \u002F\u002F deny > ask > allow\n})\n\u002F\u002F pass to defineSandbox({ policy }); harness adapters map it to native permissions\n```\n\n## Lifecycle &amp; resume\n\n`reuse: 'thread'` resumes one sandbox per `threadId`; the compound key folds in\nprovider + workspace hash + tenant so changing the repo\u002Fsetup\u002Fimage starts\nfresh. Ensure order: resume running → restore snapshot → create + bootstrap.\n\n## File-event hooks\n\nWatch the workspace for create\u002Fchange\u002Fdelete events. Provider-agnostic: native\n`fs.watch` on local-process, a portable `find` poll on Docker\u002Fexec-only\nproviders (no extra deps or image changes).\n\nDeclare hooks on `defineSandbox({ hooks })` (sandbox-scoped) or on any chat\nmiddleware via the `sandbox` group (run-scoped):\n\n```typescript\nimport {\n  defineSandbox,\n  defineChatMiddleware,\n  withSandbox,\n} from '@tanstack\u002Fai-sandbox'\nimport { dockerSandbox } from '@tanstack\u002Fai-sandbox-docker'\n\n\u002F\u002F Sandbox-scoped hooks (all optional):\nconst sandbox = defineSandbox({\n  id: 'repo-agent',\n  provider: dockerSandbox({ image: 'node:22' }),\n  hooks: {\n    onFile: (e) => console.log(e.type, e.path), \u002F\u002F catch-all\n    onFileCreate: (e) => console.log('created', e.path),\n    onFileChange: (e) => console.log('changed', e.path),\n    onFileDelete: (e) => console.log('deleted', e.path),\n    onReady: (handle) => console.log('ready', handle.id),\n    onError: (err) => console.error(err),\n    onDestroy: () => console.log('destroyed'),\n  },\n  fileEvents: true, \u002F\u002F default; set false to disable watching entirely\n})\n\n\u002F\u002F Run-scoped hooks via chat middleware (ctx is ChatMiddlewareContext):\nconst auditMiddleware = defineChatMiddleware({\n  name: 'audit',\n  sandbox: {\n    onFile: (ctx, e) => console.log(ctx.runId, e.type, e.path),\n    onFileCreate: (ctx, e) => db.log({ run: ctx.runId, event: e }),\n    onFileChange: (ctx, e) => metrics.increment('file.change'),\n    onFileDelete: (ctx, e) => console.warn('deleted', e.path),\n  },\n})\n\n\u002F\u002F No extra middleware needed — sandbox.file CUSTOM events are emitted\n\u002F\u002F automatically. Read them from the stream:\nfor await (const chunk of stream) {\n  if (chunk.type === 'CUSTOM' && chunk.name === 'sandbox.file') {\n    const value = chunk.value\n    if (\n      value !== null &&\n      typeof value === 'object' &&\n      'type' in value &&\n      'path' in value\n    ) {\n      console.log('file event', value) \u002F\u002F { type, path, timestamp }\n    }\n  }\n}\n```\n\n`watchWorkspace()` is available as a low-level building block for watching\noutside a `chat()` run:\n\n```typescript\nimport { watchWorkspace } from '@tanstack\u002Fai-sandbox'\n\nconst watcher = await watchWorkspace(handle, {\n  onEvent: (e) => console.log(e.type, e.path),\n  ignore: ['.git', 'node_modules'], \u002F\u002F default\n})\nawait watcher.stop()\n```\n\nEnable the `sandbox` debug category to log watcher start\u002Fstop, event dispatch,\nand lifecycle transitions:\n\n```typescript\nchat({ threadId, adapter, messages, debug: { sandbox: true } })\n\u002F\u002F or debug: true to enable all categories\n```\n\n## Edge \u002F serverless execution\n\nA request-scoped Worker can't hold a multi-minute agent run open. The\nserverless\u002Fedge model splits this: a **trigger** starts the run and returns\nimmediately, a **durable orchestrator** drives it, and clients **tail from a\nresumable cursor**.\n\nCore primitives (`@tanstack\u002Fai-sandbox`, transport- and runtime-agnostic):\n\n- **`RunEventLog` \u002F `InMemoryRunEventLog`** — append-only, `seq`-indexed log of a\n  run's `StreamChunk`s with replay-then-tail reads. A dropped connection \u002F new\n  tab \u002F hibernated orchestrator reconnect by passing their last-seen `seq`\n  (`read({ fromSeq })`). `TerminalRunStatus` = `done | error | aborted`.\n- **`pipeToRunLog` \u002F `RunController`** — the run driver. `pipeToRunLog` pumps a\n  `chat()` stream into a log and **never rejects**: a thrown stream error becomes\n  a terminal `RUN_ERROR` event, so detached clients always observe failures.\n  `RunController.start` is fire-and-track; `attach(runId, { fromSeq })` tails;\n  `drain()` awaits in-flight runs (e.g. in a `waitUntil`).\n- **Transport-agnostic tool-bridge** — `createToolBridgeCore` +\n  `handleBridgeJsonRpc` are the portable core; `startHostToolBridge` is the\n  `node:http` host transport. The `ToolBridgeProvisioner` capability injects the\n  transport, so an edge orchestrator serves the same core from its own `fetch`\n  handler (no raw TCP listener). Default = host transport.\n- **Co-located host-tool seam** — `toolDescriptors` \u002F `remoteToolStubs` \u002F\n  `httpRemoteToolExecutor` (container side) + `executeHostTool` (orchestrator\n  side): only chat()-tool EXECUTION crosses the container→orchestrator boundary,\n  not the whole MCP protocol.\n- **`SandboxCapabilities.writableStdin`** — `false` for providers (e.g.\n  Cloudflare) with no writable host→process stdin; stdin-fed harnesses then\n  deliver the prompt via a file + in-shell redirection (`claude -p … \u003C file`).\n\nCloudflare runtime (`@tanstack\u002Fai-sandbox-cloudflare`):\n\n- `createCloudflareSandboxAgent(config)` → `{ Coordinator, Sandbox, worker }` —\n  an app's `worker.ts` is one configured call plus the wrangler-required DO\n  re-exports. Two models via `mode`: `do-drives` (the DO runs `chat()`) and\n  `colocated` (harness + bridge run in-container; the DO is a thin coordinator,\n  pair with `runInContainerHarness` from `\u002Frunner`).\n- `DurableObjectRunEventLog` mirrors `InMemoryRunEventLog` over DO storage;\n  `timingSafeBearerEqualWeb` is the Web-Crypto constant-time bearer check.\n\n## Events\n\n- `claude-code.session-id` (CUSTOM) — resumable session id → pass back via\n  `modelOptions.sessionId`.\n- `file.changed` (CUSTOM) — `{ path, diff }` working-tree diff after the run.\n- `sandbox.file` (CUSTOM) — `{ type, path, timestamp }` per file create\u002Fchange\u002F\n  delete, emitted automatically when a sandbox is active.\n\n## Critical rules\n\n- **Harness adapters require a sandbox.** Always include `withSandbox(...)` in\n  `middleware` — without it `chat()` throws a missing-capability error.\n- **Secrets** (`workspace.secrets`) are injected into the sandbox env and never\n  persisted (no snapshots, no sandbox store, no event log). Always create them\n  with `createSecrets(...)` so the values stay hidden behind `SecretRef` tokens.\n  The agent binary (`claude`) must exist in the sandbox image (install it in\n  `setup` or bake it into the image).\n- **Secret-bearing projected files** (e.g. MCP config with resolved header\n  values) are re-written on every projection call so rotated secrets re-apply;\n  they are never included in a snapshot.\n- **chat()-provided `tools` are bridged** into the in-sandbox agent over a\n  host-side MCP tool-proxy: the agent calls them as `mcp__tanstack__\u003Ctool>` and\n  each call is proxied back to the host where the tool's `execute()` runs (with\n  its closures \u002F DB \u002F secrets). The agent also has its own native tools\n  (Bash\u002FEdit\u002FRead\u002F…). The host bridge binds on the host; the sandbox reaches it\n  (localhost, or `host.docker.internal` for Docker), gated by a per-run bearer\n  token.\n- Use `localProcessSandbox()` only in trusted\u002Fdev contexts (no isolation).\n- Skills\u002Fplugins that a CLI lacks (e.g. `agentSkill` on Codex, `plugins` on\n  Codex) warn and skip — they do not throw.\n",{"data":54,"body":60},{"name":4,"description":6,"type":55,"library":56,"library_version":57,"sources":58},"sub-skill","tanstack-ai","0.1.0",[59],"TanStack\u002Fai:docs\u002Fsandbox\u002Foverview.md",{"type":61,"children":62},"root",[63,72,111,118,1063,1069,1282,1335,1367,1373,2136,2205,2242,2248,2262,2288,2622,2636,2661,2939,2951,2963,3062,3067,3073,3098,3204,3210,3558,3564,3583,3589,3610,3631,5309,5327,5583,5595,5691,5697,5722,5734,6011,6024,6125,6131,6188,6194,6362],{"type":64,"tag":65,"props":66,"children":68},"element","h1",{"id":67},"sandboxes",[69],{"type":70,"value":71},"text","Sandboxes",{"type":64,"tag":73,"props":74,"children":75},"p",{},[76,78,85,87,93,95,101,103,109],{"type":70,"value":77},"Harness adapters declare ",{"type":64,"tag":79,"props":80,"children":82},"code",{"className":81},[],[83],{"type":70,"value":84},"requires: [SandboxCapability]",{"type":70,"value":86},". ",{"type":64,"tag":79,"props":88,"children":90},{"className":89},[],[91],{"type":70,"value":92},"chat()",{"type":70,"value":94}," errors unless\nsome middleware provides it — ",{"type":64,"tag":79,"props":96,"children":98},{"className":97},[],[99],{"type":70,"value":100},"withSandbox(...)",{"type":70,"value":102}," does. The adapter then runs the\nagent CLI ",{"type":64,"tag":104,"props":105,"children":106},"strong",{},[107],{"type":70,"value":108},"inside",{"type":70,"value":110}," the sandbox and streams its events back.",{"type":64,"tag":112,"props":113,"children":115},"h2",{"id":114},"setup-claude-code-in-a-docker-sandbox",[116],{"type":70,"value":117},"Setup — Claude Code in a Docker sandbox",{"type":64,"tag":119,"props":120,"children":124},"pre",{"className":121,"code":122,"language":45,"meta":123,"style":123},"language-typescript shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","import { chat } from '@tanstack\u002Fai'\nimport { claudeCodeText } from '@tanstack\u002Fai-claude-code'\nimport {\n  defineSandbox,\n  defineWorkspace,\n  withSandbox,\n} from '@tanstack\u002Fai-sandbox'\nimport { dockerSandbox } from '@tanstack\u002Fai-sandbox-docker'\n\nconst sandbox = defineSandbox({\n  id: 'repo-agent',\n  provider: dockerSandbox({ image: 'node:22' }),\n  workspace: defineWorkspace({\n    source: { type: 'git', url: 'https:\u002F\u002Fgithub.com\u002Fowner\u002Frepo', ref: 'main' },\n    packageManager: 'pnpm',\n    setup: ['corepack enable', 'pnpm install'],\n    scripts: { test: 'pnpm test' },\n    secrets: { ANTHROPIC_API_KEY: process.env.ANTHROPIC_API_KEY ?? '' },\n  }),\n  lifecycle: { reuse: 'thread', snapshot: 'after-setup', keepAlive: '30m' },\n})\n\nconst stream = chat({\n  threadId,\n  adapter: claudeCodeText('sonnet'),\n  messages,\n  middleware: [withSandbox(sandbox)],\n})\n","",[125],{"type":64,"tag":79,"props":126,"children":127},{"__ignoreMap":123},[128,178,216,229,243,256,269,295,333,343,379,412,473,499,596,626,683,726,790,807,902,915,923,952,965,1007,1020,1051],{"type":64,"tag":129,"props":130,"children":133},"span",{"class":131,"line":132},"line",1,[134,140,146,152,157,162,167,173],{"type":64,"tag":129,"props":135,"children":137},{"style":136},"--shiki-light:#39ADB5;--shiki-light-font-style:italic;--shiki-default:#89DDFF;--shiki-default-font-style:italic;--shiki-dark:#89DDFF;--shiki-dark-font-style:italic",[138],{"type":70,"value":139},"import",{"type":64,"tag":129,"props":141,"children":143},{"style":142},"--shiki-light:#39ADB5;--shiki-default:#89DDFF;--shiki-dark:#89DDFF",[144],{"type":70,"value":145}," {",{"type":64,"tag":129,"props":147,"children":149},{"style":148},"--shiki-light:#90A4AE;--shiki-default:#EEFFFF;--shiki-dark:#BABED8",[150],{"type":70,"value":151}," chat",{"type":64,"tag":129,"props":153,"children":154},{"style":142},[155],{"type":70,"value":156}," }",{"type":64,"tag":129,"props":158,"children":159},{"style":136},[160],{"type":70,"value":161}," from",{"type":64,"tag":129,"props":163,"children":164},{"style":142},[165],{"type":70,"value":166}," '",{"type":64,"tag":129,"props":168,"children":170},{"style":169},"--shiki-light:#91B859;--shiki-default:#C3E88D;--shiki-dark:#C3E88D",[171],{"type":70,"value":172},"@tanstack\u002Fai",{"type":64,"tag":129,"props":174,"children":175},{"style":142},[176],{"type":70,"value":177},"'\n",{"type":64,"tag":129,"props":179,"children":181},{"class":131,"line":180},2,[182,186,190,195,199,203,207,212],{"type":64,"tag":129,"props":183,"children":184},{"style":136},[185],{"type":70,"value":139},{"type":64,"tag":129,"props":187,"children":188},{"style":142},[189],{"type":70,"value":145},{"type":64,"tag":129,"props":191,"children":192},{"style":148},[193],{"type":70,"value":194}," claudeCodeText",{"type":64,"tag":129,"props":196,"children":197},{"style":142},[198],{"type":70,"value":156},{"type":64,"tag":129,"props":200,"children":201},{"style":136},[202],{"type":70,"value":161},{"type":64,"tag":129,"props":204,"children":205},{"style":142},[206],{"type":70,"value":166},{"type":64,"tag":129,"props":208,"children":209},{"style":169},[210],{"type":70,"value":211},"@tanstack\u002Fai-claude-code",{"type":64,"tag":129,"props":213,"children":214},{"style":142},[215],{"type":70,"value":177},{"type":64,"tag":129,"props":217,"children":219},{"class":131,"line":218},3,[220,224],{"type":64,"tag":129,"props":221,"children":222},{"style":136},[223],{"type":70,"value":139},{"type":64,"tag":129,"props":225,"children":226},{"style":142},[227],{"type":70,"value":228}," {\n",{"type":64,"tag":129,"props":230,"children":232},{"class":131,"line":231},4,[233,238],{"type":64,"tag":129,"props":234,"children":235},{"style":148},[236],{"type":70,"value":237},"  defineSandbox",{"type":64,"tag":129,"props":239,"children":240},{"style":142},[241],{"type":70,"value":242},",\n",{"type":64,"tag":129,"props":244,"children":246},{"class":131,"line":245},5,[247,252],{"type":64,"tag":129,"props":248,"children":249},{"style":148},[250],{"type":70,"value":251},"  defineWorkspace",{"type":64,"tag":129,"props":253,"children":254},{"style":142},[255],{"type":70,"value":242},{"type":64,"tag":129,"props":257,"children":259},{"class":131,"line":258},6,[260,265],{"type":64,"tag":129,"props":261,"children":262},{"style":148},[263],{"type":70,"value":264},"  withSandbox",{"type":64,"tag":129,"props":266,"children":267},{"style":142},[268],{"type":70,"value":242},{"type":64,"tag":129,"props":270,"children":272},{"class":131,"line":271},7,[273,278,282,286,291],{"type":64,"tag":129,"props":274,"children":275},{"style":142},[276],{"type":70,"value":277},"}",{"type":64,"tag":129,"props":279,"children":280},{"style":136},[281],{"type":70,"value":161},{"type":64,"tag":129,"props":283,"children":284},{"style":142},[285],{"type":70,"value":166},{"type":64,"tag":129,"props":287,"children":288},{"style":169},[289],{"type":70,"value":290},"@tanstack\u002Fai-sandbox",{"type":64,"tag":129,"props":292,"children":293},{"style":142},[294],{"type":70,"value":177},{"type":64,"tag":129,"props":296,"children":298},{"class":131,"line":297},8,[299,303,307,312,316,320,324,329],{"type":64,"tag":129,"props":300,"children":301},{"style":136},[302],{"type":70,"value":139},{"type":64,"tag":129,"props":304,"children":305},{"style":142},[306],{"type":70,"value":145},{"type":64,"tag":129,"props":308,"children":309},{"style":148},[310],{"type":70,"value":311}," dockerSandbox",{"type":64,"tag":129,"props":313,"children":314},{"style":142},[315],{"type":70,"value":156},{"type":64,"tag":129,"props":317,"children":318},{"style":136},[319],{"type":70,"value":161},{"type":64,"tag":129,"props":321,"children":322},{"style":142},[323],{"type":70,"value":166},{"type":64,"tag":129,"props":325,"children":326},{"style":169},[327],{"type":70,"value":328},"@tanstack\u002Fai-sandbox-docker",{"type":64,"tag":129,"props":330,"children":331},{"style":142},[332],{"type":70,"value":177},{"type":64,"tag":129,"props":334,"children":336},{"class":131,"line":335},9,[337],{"type":64,"tag":129,"props":338,"children":340},{"emptyLinePlaceholder":339},true,[341],{"type":70,"value":342},"\n",{"type":64,"tag":129,"props":344,"children":346},{"class":131,"line":345},10,[347,353,358,363,369,374],{"type":64,"tag":129,"props":348,"children":350},{"style":349},"--shiki-light:#9C3EDA;--shiki-default:#C792EA;--shiki-dark:#C792EA",[351],{"type":70,"value":352},"const",{"type":64,"tag":129,"props":354,"children":355},{"style":148},[356],{"type":70,"value":357}," sandbox ",{"type":64,"tag":129,"props":359,"children":360},{"style":142},[361],{"type":70,"value":362},"=",{"type":64,"tag":129,"props":364,"children":366},{"style":365},"--shiki-light:#6182B8;--shiki-default:#82AAFF;--shiki-dark:#82AAFF",[367],{"type":70,"value":368}," defineSandbox",{"type":64,"tag":129,"props":370,"children":371},{"style":148},[372],{"type":70,"value":373},"(",{"type":64,"tag":129,"props":375,"children":376},{"style":142},[377],{"type":70,"value":378},"{\n",{"type":64,"tag":129,"props":380,"children":382},{"class":131,"line":381},11,[383,389,394,398,403,408],{"type":64,"tag":129,"props":384,"children":386},{"style":385},"--shiki-light:#E53935;--shiki-default:#F07178;--shiki-dark:#F07178",[387],{"type":70,"value":388},"  id",{"type":64,"tag":129,"props":390,"children":391},{"style":142},[392],{"type":70,"value":393},":",{"type":64,"tag":129,"props":395,"children":396},{"style":142},[397],{"type":70,"value":166},{"type":64,"tag":129,"props":399,"children":400},{"style":169},[401],{"type":70,"value":402},"repo-agent",{"type":64,"tag":129,"props":404,"children":405},{"style":142},[406],{"type":70,"value":407},"'",{"type":64,"tag":129,"props":409,"children":410},{"style":142},[411],{"type":70,"value":242},{"type":64,"tag":129,"props":413,"children":415},{"class":131,"line":414},12,[416,421,425,429,433,438,443,447,451,456,460,464,469],{"type":64,"tag":129,"props":417,"children":418},{"style":385},[419],{"type":70,"value":420},"  provider",{"type":64,"tag":129,"props":422,"children":423},{"style":142},[424],{"type":70,"value":393},{"type":64,"tag":129,"props":426,"children":427},{"style":365},[428],{"type":70,"value":311},{"type":64,"tag":129,"props":430,"children":431},{"style":148},[432],{"type":70,"value":373},{"type":64,"tag":129,"props":434,"children":435},{"style":142},[436],{"type":70,"value":437},"{",{"type":64,"tag":129,"props":439,"children":440},{"style":385},[441],{"type":70,"value":442}," image",{"type":64,"tag":129,"props":444,"children":445},{"style":142},[446],{"type":70,"value":393},{"type":64,"tag":129,"props":448,"children":449},{"style":142},[450],{"type":70,"value":166},{"type":64,"tag":129,"props":452,"children":453},{"style":169},[454],{"type":70,"value":455},"node:22",{"type":64,"tag":129,"props":457,"children":458},{"style":142},[459],{"type":70,"value":407},{"type":64,"tag":129,"props":461,"children":462},{"style":142},[463],{"type":70,"value":156},{"type":64,"tag":129,"props":465,"children":466},{"style":148},[467],{"type":70,"value":468},")",{"type":64,"tag":129,"props":470,"children":471},{"style":142},[472],{"type":70,"value":242},{"type":64,"tag":129,"props":474,"children":476},{"class":131,"line":475},13,[477,482,486,491,495],{"type":64,"tag":129,"props":478,"children":479},{"style":385},[480],{"type":70,"value":481},"  workspace",{"type":64,"tag":129,"props":483,"children":484},{"style":142},[485],{"type":70,"value":393},{"type":64,"tag":129,"props":487,"children":488},{"style":365},[489],{"type":70,"value":490}," defineWorkspace",{"type":64,"tag":129,"props":492,"children":493},{"style":148},[494],{"type":70,"value":373},{"type":64,"tag":129,"props":496,"children":497},{"style":142},[498],{"type":70,"value":378},{"type":64,"tag":129,"props":500,"children":502},{"class":131,"line":501},14,[503,508,512,516,521,525,529,534,538,543,548,552,556,561,565,569,574,578,582,587,591],{"type":64,"tag":129,"props":504,"children":505},{"style":385},[506],{"type":70,"value":507},"    source",{"type":64,"tag":129,"props":509,"children":510},{"style":142},[511],{"type":70,"value":393},{"type":64,"tag":129,"props":513,"children":514},{"style":142},[515],{"type":70,"value":145},{"type":64,"tag":129,"props":517,"children":518},{"style":385},[519],{"type":70,"value":520}," type",{"type":64,"tag":129,"props":522,"children":523},{"style":142},[524],{"type":70,"value":393},{"type":64,"tag":129,"props":526,"children":527},{"style":142},[528],{"type":70,"value":166},{"type":64,"tag":129,"props":530,"children":531},{"style":169},[532],{"type":70,"value":533},"git",{"type":64,"tag":129,"props":535,"children":536},{"style":142},[537],{"type":70,"value":407},{"type":64,"tag":129,"props":539,"children":540},{"style":142},[541],{"type":70,"value":542},",",{"type":64,"tag":129,"props":544,"children":545},{"style":385},[546],{"type":70,"value":547}," url",{"type":64,"tag":129,"props":549,"children":550},{"style":142},[551],{"type":70,"value":393},{"type":64,"tag":129,"props":553,"children":554},{"style":142},[555],{"type":70,"value":166},{"type":64,"tag":129,"props":557,"children":558},{"style":169},[559],{"type":70,"value":560},"https:\u002F\u002Fgithub.com\u002Fowner\u002Frepo",{"type":64,"tag":129,"props":562,"children":563},{"style":142},[564],{"type":70,"value":407},{"type":64,"tag":129,"props":566,"children":567},{"style":142},[568],{"type":70,"value":542},{"type":64,"tag":129,"props":570,"children":571},{"style":385},[572],{"type":70,"value":573}," ref",{"type":64,"tag":129,"props":575,"children":576},{"style":142},[577],{"type":70,"value":393},{"type":64,"tag":129,"props":579,"children":580},{"style":142},[581],{"type":70,"value":166},{"type":64,"tag":129,"props":583,"children":584},{"style":169},[585],{"type":70,"value":586},"main",{"type":64,"tag":129,"props":588,"children":589},{"style":142},[590],{"type":70,"value":407},{"type":64,"tag":129,"props":592,"children":593},{"style":142},[594],{"type":70,"value":595}," },\n",{"type":64,"tag":129,"props":597,"children":599},{"class":131,"line":598},15,[600,605,609,613,618,622],{"type":64,"tag":129,"props":601,"children":602},{"style":385},[603],{"type":70,"value":604},"    packageManager",{"type":64,"tag":129,"props":606,"children":607},{"style":142},[608],{"type":70,"value":393},{"type":64,"tag":129,"props":610,"children":611},{"style":142},[612],{"type":70,"value":166},{"type":64,"tag":129,"props":614,"children":615},{"style":169},[616],{"type":70,"value":617},"pnpm",{"type":64,"tag":129,"props":619,"children":620},{"style":142},[621],{"type":70,"value":407},{"type":64,"tag":129,"props":623,"children":624},{"style":142},[625],{"type":70,"value":242},{"type":64,"tag":129,"props":627,"children":629},{"class":131,"line":628},16,[630,635,639,644,648,653,657,661,665,670,674,679],{"type":64,"tag":129,"props":631,"children":632},{"style":385},[633],{"type":70,"value":634},"    setup",{"type":64,"tag":129,"props":636,"children":637},{"style":142},[638],{"type":70,"value":393},{"type":64,"tag":129,"props":640,"children":641},{"style":148},[642],{"type":70,"value":643}," [",{"type":64,"tag":129,"props":645,"children":646},{"style":142},[647],{"type":70,"value":407},{"type":64,"tag":129,"props":649,"children":650},{"style":169},[651],{"type":70,"value":652},"corepack enable",{"type":64,"tag":129,"props":654,"children":655},{"style":142},[656],{"type":70,"value":407},{"type":64,"tag":129,"props":658,"children":659},{"style":142},[660],{"type":70,"value":542},{"type":64,"tag":129,"props":662,"children":663},{"style":142},[664],{"type":70,"value":166},{"type":64,"tag":129,"props":666,"children":667},{"style":169},[668],{"type":70,"value":669},"pnpm install",{"type":64,"tag":129,"props":671,"children":672},{"style":142},[673],{"type":70,"value":407},{"type":64,"tag":129,"props":675,"children":676},{"style":148},[677],{"type":70,"value":678},"]",{"type":64,"tag":129,"props":680,"children":681},{"style":142},[682],{"type":70,"value":242},{"type":64,"tag":129,"props":684,"children":686},{"class":131,"line":685},17,[687,692,696,700,705,709,713,718,722],{"type":64,"tag":129,"props":688,"children":689},{"style":385},[690],{"type":70,"value":691},"    scripts",{"type":64,"tag":129,"props":693,"children":694},{"style":142},[695],{"type":70,"value":393},{"type":64,"tag":129,"props":697,"children":698},{"style":142},[699],{"type":70,"value":145},{"type":64,"tag":129,"props":701,"children":702},{"style":385},[703],{"type":70,"value":704}," test",{"type":64,"tag":129,"props":706,"children":707},{"style":142},[708],{"type":70,"value":393},{"type":64,"tag":129,"props":710,"children":711},{"style":142},[712],{"type":70,"value":166},{"type":64,"tag":129,"props":714,"children":715},{"style":169},[716],{"type":70,"value":717},"pnpm test",{"type":64,"tag":129,"props":719,"children":720},{"style":142},[721],{"type":70,"value":407},{"type":64,"tag":129,"props":723,"children":724},{"style":142},[725],{"type":70,"value":595},{"type":64,"tag":129,"props":727,"children":729},{"class":131,"line":728},18,[730,735,739,743,748,752,757,762,767,771,776,781,786],{"type":64,"tag":129,"props":731,"children":732},{"style":385},[733],{"type":70,"value":734},"    secrets",{"type":64,"tag":129,"props":736,"children":737},{"style":142},[738],{"type":70,"value":393},{"type":64,"tag":129,"props":740,"children":741},{"style":142},[742],{"type":70,"value":145},{"type":64,"tag":129,"props":744,"children":745},{"style":385},[746],{"type":70,"value":747}," ANTHROPIC_API_KEY",{"type":64,"tag":129,"props":749,"children":750},{"style":142},[751],{"type":70,"value":393},{"type":64,"tag":129,"props":753,"children":754},{"style":148},[755],{"type":70,"value":756}," process",{"type":64,"tag":129,"props":758,"children":759},{"style":142},[760],{"type":70,"value":761},".",{"type":64,"tag":129,"props":763,"children":764},{"style":148},[765],{"type":70,"value":766},"env",{"type":64,"tag":129,"props":768,"children":769},{"style":142},[770],{"type":70,"value":761},{"type":64,"tag":129,"props":772,"children":773},{"style":148},[774],{"type":70,"value":775},"ANTHROPIC_API_KEY ",{"type":64,"tag":129,"props":777,"children":778},{"style":142},[779],{"type":70,"value":780},"??",{"type":64,"tag":129,"props":782,"children":783},{"style":142},[784],{"type":70,"value":785}," ''",{"type":64,"tag":129,"props":787,"children":788},{"style":142},[789],{"type":70,"value":595},{"type":64,"tag":129,"props":791,"children":793},{"class":131,"line":792},19,[794,799,803],{"type":64,"tag":129,"props":795,"children":796},{"style":142},[797],{"type":70,"value":798},"  }",{"type":64,"tag":129,"props":800,"children":801},{"style":148},[802],{"type":70,"value":468},{"type":64,"tag":129,"props":804,"children":805},{"style":142},[806],{"type":70,"value":242},{"type":64,"tag":129,"props":808,"children":810},{"class":131,"line":809},20,[811,816,820,824,829,833,837,842,846,850,855,859,863,868,872,876,881,885,889,894,898],{"type":64,"tag":129,"props":812,"children":813},{"style":385},[814],{"type":70,"value":815},"  lifecycle",{"type":64,"tag":129,"props":817,"children":818},{"style":142},[819],{"type":70,"value":393},{"type":64,"tag":129,"props":821,"children":822},{"style":142},[823],{"type":70,"value":145},{"type":64,"tag":129,"props":825,"children":826},{"style":385},[827],{"type":70,"value":828}," reuse",{"type":64,"tag":129,"props":830,"children":831},{"style":142},[832],{"type":70,"value":393},{"type":64,"tag":129,"props":834,"children":835},{"style":142},[836],{"type":70,"value":166},{"type":64,"tag":129,"props":838,"children":839},{"style":169},[840],{"type":70,"value":841},"thread",{"type":64,"tag":129,"props":843,"children":844},{"style":142},[845],{"type":70,"value":407},{"type":64,"tag":129,"props":847,"children":848},{"style":142},[849],{"type":70,"value":542},{"type":64,"tag":129,"props":851,"children":852},{"style":385},[853],{"type":70,"value":854}," snapshot",{"type":64,"tag":129,"props":856,"children":857},{"style":142},[858],{"type":70,"value":393},{"type":64,"tag":129,"props":860,"children":861},{"style":142},[862],{"type":70,"value":166},{"type":64,"tag":129,"props":864,"children":865},{"style":169},[866],{"type":70,"value":867},"after-setup",{"type":64,"tag":129,"props":869,"children":870},{"style":142},[871],{"type":70,"value":407},{"type":64,"tag":129,"props":873,"children":874},{"style":142},[875],{"type":70,"value":542},{"type":64,"tag":129,"props":877,"children":878},{"style":385},[879],{"type":70,"value":880}," keepAlive",{"type":64,"tag":129,"props":882,"children":883},{"style":142},[884],{"type":70,"value":393},{"type":64,"tag":129,"props":886,"children":887},{"style":142},[888],{"type":70,"value":166},{"type":64,"tag":129,"props":890,"children":891},{"style":169},[892],{"type":70,"value":893},"30m",{"type":64,"tag":129,"props":895,"children":896},{"style":142},[897],{"type":70,"value":407},{"type":64,"tag":129,"props":899,"children":900},{"style":142},[901],{"type":70,"value":595},{"type":64,"tag":129,"props":903,"children":905},{"class":131,"line":904},21,[906,910],{"type":64,"tag":129,"props":907,"children":908},{"style":142},[909],{"type":70,"value":277},{"type":64,"tag":129,"props":911,"children":912},{"style":148},[913],{"type":70,"value":914},")\n",{"type":64,"tag":129,"props":916,"children":918},{"class":131,"line":917},22,[919],{"type":64,"tag":129,"props":920,"children":921},{"emptyLinePlaceholder":339},[922],{"type":70,"value":342},{"type":64,"tag":129,"props":924,"children":926},{"class":131,"line":925},23,[927,931,936,940,944,948],{"type":64,"tag":129,"props":928,"children":929},{"style":349},[930],{"type":70,"value":352},{"type":64,"tag":129,"props":932,"children":933},{"style":148},[934],{"type":70,"value":935}," stream ",{"type":64,"tag":129,"props":937,"children":938},{"style":142},[939],{"type":70,"value":362},{"type":64,"tag":129,"props":941,"children":942},{"style":365},[943],{"type":70,"value":151},{"type":64,"tag":129,"props":945,"children":946},{"style":148},[947],{"type":70,"value":373},{"type":64,"tag":129,"props":949,"children":950},{"style":142},[951],{"type":70,"value":378},{"type":64,"tag":129,"props":953,"children":955},{"class":131,"line":954},24,[956,961],{"type":64,"tag":129,"props":957,"children":958},{"style":148},[959],{"type":70,"value":960},"  threadId",{"type":64,"tag":129,"props":962,"children":963},{"style":142},[964],{"type":70,"value":242},{"type":64,"tag":129,"props":966,"children":968},{"class":131,"line":967},25,[969,974,978,982,986,990,995,999,1003],{"type":64,"tag":129,"props":970,"children":971},{"style":385},[972],{"type":70,"value":973},"  adapter",{"type":64,"tag":129,"props":975,"children":976},{"style":142},[977],{"type":70,"value":393},{"type":64,"tag":129,"props":979,"children":980},{"style":365},[981],{"type":70,"value":194},{"type":64,"tag":129,"props":983,"children":984},{"style":148},[985],{"type":70,"value":373},{"type":64,"tag":129,"props":987,"children":988},{"style":142},[989],{"type":70,"value":407},{"type":64,"tag":129,"props":991,"children":992},{"style":169},[993],{"type":70,"value":994},"sonnet",{"type":64,"tag":129,"props":996,"children":997},{"style":142},[998],{"type":70,"value":407},{"type":64,"tag":129,"props":1000,"children":1001},{"style":148},[1002],{"type":70,"value":468},{"type":64,"tag":129,"props":1004,"children":1005},{"style":142},[1006],{"type":70,"value":242},{"type":64,"tag":129,"props":1008,"children":1010},{"class":131,"line":1009},26,[1011,1016],{"type":64,"tag":129,"props":1012,"children":1013},{"style":148},[1014],{"type":70,"value":1015},"  messages",{"type":64,"tag":129,"props":1017,"children":1018},{"style":142},[1019],{"type":70,"value":242},{"type":64,"tag":129,"props":1021,"children":1023},{"class":131,"line":1022},27,[1024,1029,1033,1037,1042,1047],{"type":64,"tag":129,"props":1025,"children":1026},{"style":385},[1027],{"type":70,"value":1028},"  middleware",{"type":64,"tag":129,"props":1030,"children":1031},{"style":142},[1032],{"type":70,"value":393},{"type":64,"tag":129,"props":1034,"children":1035},{"style":148},[1036],{"type":70,"value":643},{"type":64,"tag":129,"props":1038,"children":1039},{"style":365},[1040],{"type":70,"value":1041},"withSandbox",{"type":64,"tag":129,"props":1043,"children":1044},{"style":148},[1045],{"type":70,"value":1046},"(sandbox)]",{"type":64,"tag":129,"props":1048,"children":1049},{"style":142},[1050],{"type":70,"value":242},{"type":64,"tag":129,"props":1052,"children":1054},{"class":131,"line":1053},28,[1055,1059],{"type":64,"tag":129,"props":1056,"children":1057},{"style":142},[1058],{"type":70,"value":277},{"type":64,"tag":129,"props":1060,"children":1061},{"style":148},[1062],{"type":70,"value":914},{"type":64,"tag":112,"props":1064,"children":1066},{"id":1065},"type-safe-secrets",[1067],{"type":70,"value":1068},"Type-safe secrets",{"type":64,"tag":119,"props":1070,"children":1072},{"className":121,"code":1071,"language":45,"meta":123,"style":123},"import { createSecrets, bearer } from '@tanstack\u002Fai-sandbox'\n\nconst secrets = createSecrets({\n  GH: process.env.GH_TOKEN ?? '',\n  SENTRY: process.env.SENTRY_TOKEN ?? '',\n})\n\u002F\u002F secrets.GH is a SecretRef — the underlying string is stored in a\n\u002F\u002F non-enumerable symbol-keyed registry and never logged, snapshotted,\n\u002F\u002F or written to the sandbox store.\n",[1073],{"type":64,"tag":79,"props":1074,"children":1075},{"__ignoreMap":123},[1076,1121,1128,1156,1201,1246,1257,1266,1274],{"type":64,"tag":129,"props":1077,"children":1078},{"class":131,"line":132},[1079,1083,1087,1092,1096,1101,1105,1109,1113,1117],{"type":64,"tag":129,"props":1080,"children":1081},{"style":136},[1082],{"type":70,"value":139},{"type":64,"tag":129,"props":1084,"children":1085},{"style":142},[1086],{"type":70,"value":145},{"type":64,"tag":129,"props":1088,"children":1089},{"style":148},[1090],{"type":70,"value":1091}," createSecrets",{"type":64,"tag":129,"props":1093,"children":1094},{"style":142},[1095],{"type":70,"value":542},{"type":64,"tag":129,"props":1097,"children":1098},{"style":148},[1099],{"type":70,"value":1100}," bearer",{"type":64,"tag":129,"props":1102,"children":1103},{"style":142},[1104],{"type":70,"value":156},{"type":64,"tag":129,"props":1106,"children":1107},{"style":136},[1108],{"type":70,"value":161},{"type":64,"tag":129,"props":1110,"children":1111},{"style":142},[1112],{"type":70,"value":166},{"type":64,"tag":129,"props":1114,"children":1115},{"style":169},[1116],{"type":70,"value":290},{"type":64,"tag":129,"props":1118,"children":1119},{"style":142},[1120],{"type":70,"value":177},{"type":64,"tag":129,"props":1122,"children":1123},{"class":131,"line":180},[1124],{"type":64,"tag":129,"props":1125,"children":1126},{"emptyLinePlaceholder":339},[1127],{"type":70,"value":342},{"type":64,"tag":129,"props":1129,"children":1130},{"class":131,"line":218},[1131,1135,1140,1144,1148,1152],{"type":64,"tag":129,"props":1132,"children":1133},{"style":349},[1134],{"type":70,"value":352},{"type":64,"tag":129,"props":1136,"children":1137},{"style":148},[1138],{"type":70,"value":1139}," secrets ",{"type":64,"tag":129,"props":1141,"children":1142},{"style":142},[1143],{"type":70,"value":362},{"type":64,"tag":129,"props":1145,"children":1146},{"style":365},[1147],{"type":70,"value":1091},{"type":64,"tag":129,"props":1149,"children":1150},{"style":148},[1151],{"type":70,"value":373},{"type":64,"tag":129,"props":1153,"children":1154},{"style":142},[1155],{"type":70,"value":378},{"type":64,"tag":129,"props":1157,"children":1158},{"class":131,"line":231},[1159,1164,1168,1172,1176,1180,1184,1189,1193,1197],{"type":64,"tag":129,"props":1160,"children":1161},{"style":385},[1162],{"type":70,"value":1163},"  GH",{"type":64,"tag":129,"props":1165,"children":1166},{"style":142},[1167],{"type":70,"value":393},{"type":64,"tag":129,"props":1169,"children":1170},{"style":148},[1171],{"type":70,"value":756},{"type":64,"tag":129,"props":1173,"children":1174},{"style":142},[1175],{"type":70,"value":761},{"type":64,"tag":129,"props":1177,"children":1178},{"style":148},[1179],{"type":70,"value":766},{"type":64,"tag":129,"props":1181,"children":1182},{"style":142},[1183],{"type":70,"value":761},{"type":64,"tag":129,"props":1185,"children":1186},{"style":148},[1187],{"type":70,"value":1188},"GH_TOKEN ",{"type":64,"tag":129,"props":1190,"children":1191},{"style":142},[1192],{"type":70,"value":780},{"type":64,"tag":129,"props":1194,"children":1195},{"style":142},[1196],{"type":70,"value":785},{"type":64,"tag":129,"props":1198,"children":1199},{"style":142},[1200],{"type":70,"value":242},{"type":64,"tag":129,"props":1202,"children":1203},{"class":131,"line":245},[1204,1209,1213,1217,1221,1225,1229,1234,1238,1242],{"type":64,"tag":129,"props":1205,"children":1206},{"style":385},[1207],{"type":70,"value":1208},"  SENTRY",{"type":64,"tag":129,"props":1210,"children":1211},{"style":142},[1212],{"type":70,"value":393},{"type":64,"tag":129,"props":1214,"children":1215},{"style":148},[1216],{"type":70,"value":756},{"type":64,"tag":129,"props":1218,"children":1219},{"style":142},[1220],{"type":70,"value":761},{"type":64,"tag":129,"props":1222,"children":1223},{"style":148},[1224],{"type":70,"value":766},{"type":64,"tag":129,"props":1226,"children":1227},{"style":142},[1228],{"type":70,"value":761},{"type":64,"tag":129,"props":1230,"children":1231},{"style":148},[1232],{"type":70,"value":1233},"SENTRY_TOKEN ",{"type":64,"tag":129,"props":1235,"children":1236},{"style":142},[1237],{"type":70,"value":780},{"type":64,"tag":129,"props":1239,"children":1240},{"style":142},[1241],{"type":70,"value":785},{"type":64,"tag":129,"props":1243,"children":1244},{"style":142},[1245],{"type":70,"value":242},{"type":64,"tag":129,"props":1247,"children":1248},{"class":131,"line":258},[1249,1253],{"type":64,"tag":129,"props":1250,"children":1251},{"style":142},[1252],{"type":70,"value":277},{"type":64,"tag":129,"props":1254,"children":1255},{"style":148},[1256],{"type":70,"value":914},{"type":64,"tag":129,"props":1258,"children":1259},{"class":131,"line":271},[1260],{"type":64,"tag":129,"props":1261,"children":1263},{"style":1262},"--shiki-light:#90A4AE;--shiki-light-font-style:italic;--shiki-default:#546E7A;--shiki-default-font-style:italic;--shiki-dark:#676E95;--shiki-dark-font-style:italic",[1264],{"type":70,"value":1265},"\u002F\u002F secrets.GH is a SecretRef — the underlying string is stored in a\n",{"type":64,"tag":129,"props":1267,"children":1268},{"class":131,"line":297},[1269],{"type":64,"tag":129,"props":1270,"children":1271},{"style":1262},[1272],{"type":70,"value":1273},"\u002F\u002F non-enumerable symbol-keyed registry and never logged, snapshotted,\n",{"type":64,"tag":129,"props":1275,"children":1276},{"class":131,"line":335},[1277],{"type":64,"tag":129,"props":1278,"children":1279},{"style":1262},[1280],{"type":70,"value":1281},"\u002F\u002F or written to the sandbox store.\n",{"type":64,"tag":73,"props":1283,"children":1284},{},[1285,1287,1293,1295,1301,1303,1309,1311,1317,1319,1325,1327,1333],{"type":70,"value":1286},"Pass ",{"type":64,"tag":79,"props":1288,"children":1290},{"className":1289},[],[1291],{"type":70,"value":1292},"secrets",{"type":70,"value":1294}," to ",{"type":64,"tag":79,"props":1296,"children":1298},{"className":1297},[],[1299],{"type":70,"value":1300},"defineWorkspace({ secrets })",{"type":70,"value":1302}," so skill and MCP projectors\ncan resolve them. Use ",{"type":64,"tag":79,"props":1304,"children":1306},{"className":1305},[],[1307],{"type":70,"value":1308},"secret: secrets.GH",{"type":70,"value":1310}," in ",{"type":64,"tag":79,"props":1312,"children":1314},{"className":1313},[],[1315],{"type":70,"value":1316},"gitSkill",{"type":70,"value":1318}," for private-repo auth\nand ",{"type":64,"tag":79,"props":1320,"children":1322},{"className":1321},[],[1323],{"type":70,"value":1324},"secrets.GH",{"type":70,"value":1326}," \u002F ",{"type":64,"tag":79,"props":1328,"children":1330},{"className":1329},[],[1331],{"type":70,"value":1332},"bearer(secrets.GH)",{"type":70,"value":1334}," in MCP header values:",{"type":64,"tag":1336,"props":1337,"children":1338},"ul",{},[1339,1350],{"type":64,"tag":1340,"props":1341,"children":1342},"li",{},[1343,1348],{"type":64,"tag":79,"props":1344,"children":1346},{"className":1345},[],[1347],{"type":70,"value":1324},{"type":70,"value":1349}," — resolves to the raw token value.",{"type":64,"tag":1340,"props":1351,"children":1352},{},[1353,1358,1360,1366],{"type":64,"tag":79,"props":1354,"children":1356},{"className":1355},[],[1357],{"type":70,"value":1332},{"type":70,"value":1359}," — resolves to ",{"type":64,"tag":79,"props":1361,"children":1363},{"className":1362},[],[1364],{"type":70,"value":1365},"\"Bearer \u003Cvalue>\"",{"type":70,"value":761},{"type":64,"tag":112,"props":1368,"children":1370},{"id":1369},"declarative-provisioning-skills-plugins-mcp-instructions",[1371],{"type":70,"value":1372},"Declarative provisioning (skills, plugins, MCP, instructions)",{"type":64,"tag":119,"props":1374,"children":1376},{"className":121,"code":1375,"language":45,"meta":123,"style":123},"import {\n  agentSkill,\n  gitSkill,\n  mcpSkill,\n  fileSkill,\n  bearer,\n  createSecrets,\n  defineWorkspace,\n} from '@tanstack\u002Fai-sandbox'\n\nconst secrets = createSecrets({ GH: process.env.GH_TOKEN ?? '' })\n\ndefineWorkspace({\n  source: { type: 'git', url: 'https:\u002F\u002Fgithub.com\u002Fowner\u002Frepo' },\n  secrets,\n  skills: [\n    agentSkill('tanstack'), \u002F\u002F named skill (no-op with warning on CLIs that lack the concept)\n    gitSkill({\n      repo: 'owner\u002Fprivate-skills',\n      secret: secrets.GH, \u002F\u002F resolved at bootstrap time, never stored\n      \u002F\u002F into: '\u002Fabs\u002Fpath\u002Finside\u002Fsandbox'  \u002F\u002F optional; defaults to .tanstack-skills\u002F\u003Crepo>\n    }),\n    mcpSkill('my-mcp', {\n      url: 'https:\u002F\u002Fmcp.example.com',\n      headers: { Authorization: bearer(secrets.GH) },\n    }),\n    fileSkill({ path: '.hints.md', content: 'Prefer pnpm.' }),\n  ],\n  plugins: ['@anthropic\u002Fplugin-foo'], \u002F\u002F no-op with warning on CLIs without a plugin concept\n  instructions: 'Always run `pnpm test` before proposing a change.',\n})\n",[1377],{"type":64,"tag":79,"props":1378,"children":1379},{"__ignoreMap":123},[1380,1391,1403,1415,1427,1439,1451,1463,1474,1497,1504,1576,1583,1599,1663,1675,1692,1729,1745,1774,1809,1822,1838,1871,1900,1948,1963,2039,2051,2094,2124],{"type":64,"tag":129,"props":1381,"children":1382},{"class":131,"line":132},[1383,1387],{"type":64,"tag":129,"props":1384,"children":1385},{"style":136},[1386],{"type":70,"value":139},{"type":64,"tag":129,"props":1388,"children":1389},{"style":142},[1390],{"type":70,"value":228},{"type":64,"tag":129,"props":1392,"children":1393},{"class":131,"line":180},[1394,1399],{"type":64,"tag":129,"props":1395,"children":1396},{"style":148},[1397],{"type":70,"value":1398},"  agentSkill",{"type":64,"tag":129,"props":1400,"children":1401},{"style":142},[1402],{"type":70,"value":242},{"type":64,"tag":129,"props":1404,"children":1405},{"class":131,"line":218},[1406,1411],{"type":64,"tag":129,"props":1407,"children":1408},{"style":148},[1409],{"type":70,"value":1410},"  gitSkill",{"type":64,"tag":129,"props":1412,"children":1413},{"style":142},[1414],{"type":70,"value":242},{"type":64,"tag":129,"props":1416,"children":1417},{"class":131,"line":231},[1418,1423],{"type":64,"tag":129,"props":1419,"children":1420},{"style":148},[1421],{"type":70,"value":1422},"  mcpSkill",{"type":64,"tag":129,"props":1424,"children":1425},{"style":142},[1426],{"type":70,"value":242},{"type":64,"tag":129,"props":1428,"children":1429},{"class":131,"line":245},[1430,1435],{"type":64,"tag":129,"props":1431,"children":1432},{"style":148},[1433],{"type":70,"value":1434},"  fileSkill",{"type":64,"tag":129,"props":1436,"children":1437},{"style":142},[1438],{"type":70,"value":242},{"type":64,"tag":129,"props":1440,"children":1441},{"class":131,"line":258},[1442,1447],{"type":64,"tag":129,"props":1443,"children":1444},{"style":148},[1445],{"type":70,"value":1446},"  bearer",{"type":64,"tag":129,"props":1448,"children":1449},{"style":142},[1450],{"type":70,"value":242},{"type":64,"tag":129,"props":1452,"children":1453},{"class":131,"line":271},[1454,1459],{"type":64,"tag":129,"props":1455,"children":1456},{"style":148},[1457],{"type":70,"value":1458},"  createSecrets",{"type":64,"tag":129,"props":1460,"children":1461},{"style":142},[1462],{"type":70,"value":242},{"type":64,"tag":129,"props":1464,"children":1465},{"class":131,"line":297},[1466,1470],{"type":64,"tag":129,"props":1467,"children":1468},{"style":148},[1469],{"type":70,"value":251},{"type":64,"tag":129,"props":1471,"children":1472},{"style":142},[1473],{"type":70,"value":242},{"type":64,"tag":129,"props":1475,"children":1476},{"class":131,"line":335},[1477,1481,1485,1489,1493],{"type":64,"tag":129,"props":1478,"children":1479},{"style":142},[1480],{"type":70,"value":277},{"type":64,"tag":129,"props":1482,"children":1483},{"style":136},[1484],{"type":70,"value":161},{"type":64,"tag":129,"props":1486,"children":1487},{"style":142},[1488],{"type":70,"value":166},{"type":64,"tag":129,"props":1490,"children":1491},{"style":169},[1492],{"type":70,"value":290},{"type":64,"tag":129,"props":1494,"children":1495},{"style":142},[1496],{"type":70,"value":177},{"type":64,"tag":129,"props":1498,"children":1499},{"class":131,"line":345},[1500],{"type":64,"tag":129,"props":1501,"children":1502},{"emptyLinePlaceholder":339},[1503],{"type":70,"value":342},{"type":64,"tag":129,"props":1505,"children":1506},{"class":131,"line":381},[1507,1511,1515,1519,1523,1527,1531,1536,1540,1544,1548,1552,1556,1560,1564,1568,1572],{"type":64,"tag":129,"props":1508,"children":1509},{"style":349},[1510],{"type":70,"value":352},{"type":64,"tag":129,"props":1512,"children":1513},{"style":148},[1514],{"type":70,"value":1139},{"type":64,"tag":129,"props":1516,"children":1517},{"style":142},[1518],{"type":70,"value":362},{"type":64,"tag":129,"props":1520,"children":1521},{"style":365},[1522],{"type":70,"value":1091},{"type":64,"tag":129,"props":1524,"children":1525},{"style":148},[1526],{"type":70,"value":373},{"type":64,"tag":129,"props":1528,"children":1529},{"style":142},[1530],{"type":70,"value":437},{"type":64,"tag":129,"props":1532,"children":1533},{"style":385},[1534],{"type":70,"value":1535}," GH",{"type":64,"tag":129,"props":1537,"children":1538},{"style":142},[1539],{"type":70,"value":393},{"type":64,"tag":129,"props":1541,"children":1542},{"style":148},[1543],{"type":70,"value":756},{"type":64,"tag":129,"props":1545,"children":1546},{"style":142},[1547],{"type":70,"value":761},{"type":64,"tag":129,"props":1549,"children":1550},{"style":148},[1551],{"type":70,"value":766},{"type":64,"tag":129,"props":1553,"children":1554},{"style":142},[1555],{"type":70,"value":761},{"type":64,"tag":129,"props":1557,"children":1558},{"style":148},[1559],{"type":70,"value":1188},{"type":64,"tag":129,"props":1561,"children":1562},{"style":142},[1563],{"type":70,"value":780},{"type":64,"tag":129,"props":1565,"children":1566},{"style":142},[1567],{"type":70,"value":785},{"type":64,"tag":129,"props":1569,"children":1570},{"style":142},[1571],{"type":70,"value":156},{"type":64,"tag":129,"props":1573,"children":1574},{"style":148},[1575],{"type":70,"value":914},{"type":64,"tag":129,"props":1577,"children":1578},{"class":131,"line":414},[1579],{"type":64,"tag":129,"props":1580,"children":1581},{"emptyLinePlaceholder":339},[1582],{"type":70,"value":342},{"type":64,"tag":129,"props":1584,"children":1585},{"class":131,"line":475},[1586,1591,1595],{"type":64,"tag":129,"props":1587,"children":1588},{"style":365},[1589],{"type":70,"value":1590},"defineWorkspace",{"type":64,"tag":129,"props":1592,"children":1593},{"style":148},[1594],{"type":70,"value":373},{"type":64,"tag":129,"props":1596,"children":1597},{"style":142},[1598],{"type":70,"value":378},{"type":64,"tag":129,"props":1600,"children":1601},{"class":131,"line":501},[1602,1607,1611,1615,1619,1623,1627,1631,1635,1639,1643,1647,1651,1655,1659],{"type":64,"tag":129,"props":1603,"children":1604},{"style":385},[1605],{"type":70,"value":1606},"  source",{"type":64,"tag":129,"props":1608,"children":1609},{"style":142},[1610],{"type":70,"value":393},{"type":64,"tag":129,"props":1612,"children":1613},{"style":142},[1614],{"type":70,"value":145},{"type":64,"tag":129,"props":1616,"children":1617},{"style":385},[1618],{"type":70,"value":520},{"type":64,"tag":129,"props":1620,"children":1621},{"style":142},[1622],{"type":70,"value":393},{"type":64,"tag":129,"props":1624,"children":1625},{"style":142},[1626],{"type":70,"value":166},{"type":64,"tag":129,"props":1628,"children":1629},{"style":169},[1630],{"type":70,"value":533},{"type":64,"tag":129,"props":1632,"children":1633},{"style":142},[1634],{"type":70,"value":407},{"type":64,"tag":129,"props":1636,"children":1637},{"style":142},[1638],{"type":70,"value":542},{"type":64,"tag":129,"props":1640,"children":1641},{"style":385},[1642],{"type":70,"value":547},{"type":64,"tag":129,"props":1644,"children":1645},{"style":142},[1646],{"type":70,"value":393},{"type":64,"tag":129,"props":1648,"children":1649},{"style":142},[1650],{"type":70,"value":166},{"type":64,"tag":129,"props":1652,"children":1653},{"style":169},[1654],{"type":70,"value":560},{"type":64,"tag":129,"props":1656,"children":1657},{"style":142},[1658],{"type":70,"value":407},{"type":64,"tag":129,"props":1660,"children":1661},{"style":142},[1662],{"type":70,"value":595},{"type":64,"tag":129,"props":1664,"children":1665},{"class":131,"line":598},[1666,1671],{"type":64,"tag":129,"props":1667,"children":1668},{"style":148},[1669],{"type":70,"value":1670},"  secrets",{"type":64,"tag":129,"props":1672,"children":1673},{"style":142},[1674],{"type":70,"value":242},{"type":64,"tag":129,"props":1676,"children":1677},{"class":131,"line":628},[1678,1683,1687],{"type":64,"tag":129,"props":1679,"children":1680},{"style":385},[1681],{"type":70,"value":1682},"  skills",{"type":64,"tag":129,"props":1684,"children":1685},{"style":142},[1686],{"type":70,"value":393},{"type":64,"tag":129,"props":1688,"children":1689},{"style":148},[1690],{"type":70,"value":1691}," [\n",{"type":64,"tag":129,"props":1693,"children":1694},{"class":131,"line":685},[1695,1700,1704,1708,1712,1716,1720,1724],{"type":64,"tag":129,"props":1696,"children":1697},{"style":365},[1698],{"type":70,"value":1699},"    agentSkill",{"type":64,"tag":129,"props":1701,"children":1702},{"style":148},[1703],{"type":70,"value":373},{"type":64,"tag":129,"props":1705,"children":1706},{"style":142},[1707],{"type":70,"value":407},{"type":64,"tag":129,"props":1709,"children":1710},{"style":169},[1711],{"type":70,"value":8},{"type":64,"tag":129,"props":1713,"children":1714},{"style":142},[1715],{"type":70,"value":407},{"type":64,"tag":129,"props":1717,"children":1718},{"style":148},[1719],{"type":70,"value":468},{"type":64,"tag":129,"props":1721,"children":1722},{"style":142},[1723],{"type":70,"value":542},{"type":64,"tag":129,"props":1725,"children":1726},{"style":1262},[1727],{"type":70,"value":1728}," \u002F\u002F named skill (no-op with warning on CLIs that lack the concept)\n",{"type":64,"tag":129,"props":1730,"children":1731},{"class":131,"line":728},[1732,1737,1741],{"type":64,"tag":129,"props":1733,"children":1734},{"style":365},[1735],{"type":70,"value":1736},"    gitSkill",{"type":64,"tag":129,"props":1738,"children":1739},{"style":148},[1740],{"type":70,"value":373},{"type":64,"tag":129,"props":1742,"children":1743},{"style":142},[1744],{"type":70,"value":378},{"type":64,"tag":129,"props":1746,"children":1747},{"class":131,"line":792},[1748,1753,1757,1761,1766,1770],{"type":64,"tag":129,"props":1749,"children":1750},{"style":385},[1751],{"type":70,"value":1752},"      repo",{"type":64,"tag":129,"props":1754,"children":1755},{"style":142},[1756],{"type":70,"value":393},{"type":64,"tag":129,"props":1758,"children":1759},{"style":142},[1760],{"type":70,"value":166},{"type":64,"tag":129,"props":1762,"children":1763},{"style":169},[1764],{"type":70,"value":1765},"owner\u002Fprivate-skills",{"type":64,"tag":129,"props":1767,"children":1768},{"style":142},[1769],{"type":70,"value":407},{"type":64,"tag":129,"props":1771,"children":1772},{"style":142},[1773],{"type":70,"value":242},{"type":64,"tag":129,"props":1775,"children":1776},{"class":131,"line":809},[1777,1782,1786,1791,1795,1800,1804],{"type":64,"tag":129,"props":1778,"children":1779},{"style":385},[1780],{"type":70,"value":1781},"      secret",{"type":64,"tag":129,"props":1783,"children":1784},{"style":142},[1785],{"type":70,"value":393},{"type":64,"tag":129,"props":1787,"children":1788},{"style":148},[1789],{"type":70,"value":1790}," secrets",{"type":64,"tag":129,"props":1792,"children":1793},{"style":142},[1794],{"type":70,"value":761},{"type":64,"tag":129,"props":1796,"children":1797},{"style":148},[1798],{"type":70,"value":1799},"GH",{"type":64,"tag":129,"props":1801,"children":1802},{"style":142},[1803],{"type":70,"value":542},{"type":64,"tag":129,"props":1805,"children":1806},{"style":1262},[1807],{"type":70,"value":1808}," \u002F\u002F resolved at bootstrap time, never stored\n",{"type":64,"tag":129,"props":1810,"children":1811},{"class":131,"line":904},[1812,1817],{"type":64,"tag":129,"props":1813,"children":1814},{"style":1262},[1815],{"type":70,"value":1816},"      \u002F\u002F into: '\u002Fabs\u002Fpath\u002Finside\u002Fsandbox'",{"type":64,"tag":129,"props":1818,"children":1819},{"style":1262},[1820],{"type":70,"value":1821},"  \u002F\u002F optional; defaults to .tanstack-skills\u002F\u003Crepo>\n",{"type":64,"tag":129,"props":1823,"children":1824},{"class":131,"line":917},[1825,1830,1834],{"type":64,"tag":129,"props":1826,"children":1827},{"style":142},[1828],{"type":70,"value":1829},"    }",{"type":64,"tag":129,"props":1831,"children":1832},{"style":148},[1833],{"type":70,"value":468},{"type":64,"tag":129,"props":1835,"children":1836},{"style":142},[1837],{"type":70,"value":242},{"type":64,"tag":129,"props":1839,"children":1840},{"class":131,"line":925},[1841,1846,1850,1854,1859,1863,1867],{"type":64,"tag":129,"props":1842,"children":1843},{"style":365},[1844],{"type":70,"value":1845},"    mcpSkill",{"type":64,"tag":129,"props":1847,"children":1848},{"style":148},[1849],{"type":70,"value":373},{"type":64,"tag":129,"props":1851,"children":1852},{"style":142},[1853],{"type":70,"value":407},{"type":64,"tag":129,"props":1855,"children":1856},{"style":169},[1857],{"type":70,"value":1858},"my-mcp",{"type":64,"tag":129,"props":1860,"children":1861},{"style":142},[1862],{"type":70,"value":407},{"type":64,"tag":129,"props":1864,"children":1865},{"style":142},[1866],{"type":70,"value":542},{"type":64,"tag":129,"props":1868,"children":1869},{"style":142},[1870],{"type":70,"value":228},{"type":64,"tag":129,"props":1872,"children":1873},{"class":131,"line":954},[1874,1879,1883,1887,1892,1896],{"type":64,"tag":129,"props":1875,"children":1876},{"style":385},[1877],{"type":70,"value":1878},"      url",{"type":64,"tag":129,"props":1880,"children":1881},{"style":142},[1882],{"type":70,"value":393},{"type":64,"tag":129,"props":1884,"children":1885},{"style":142},[1886],{"type":70,"value":166},{"type":64,"tag":129,"props":1888,"children":1889},{"style":169},[1890],{"type":70,"value":1891},"https:\u002F\u002Fmcp.example.com",{"type":64,"tag":129,"props":1893,"children":1894},{"style":142},[1895],{"type":70,"value":407},{"type":64,"tag":129,"props":1897,"children":1898},{"style":142},[1899],{"type":70,"value":242},{"type":64,"tag":129,"props":1901,"children":1902},{"class":131,"line":967},[1903,1908,1912,1916,1921,1925,1929,1934,1938,1943],{"type":64,"tag":129,"props":1904,"children":1905},{"style":385},[1906],{"type":70,"value":1907},"      headers",{"type":64,"tag":129,"props":1909,"children":1910},{"style":142},[1911],{"type":70,"value":393},{"type":64,"tag":129,"props":1913,"children":1914},{"style":142},[1915],{"type":70,"value":145},{"type":64,"tag":129,"props":1917,"children":1918},{"style":385},[1919],{"type":70,"value":1920}," Authorization",{"type":64,"tag":129,"props":1922,"children":1923},{"style":142},[1924],{"type":70,"value":393},{"type":64,"tag":129,"props":1926,"children":1927},{"style":365},[1928],{"type":70,"value":1100},{"type":64,"tag":129,"props":1930,"children":1931},{"style":148},[1932],{"type":70,"value":1933},"(secrets",{"type":64,"tag":129,"props":1935,"children":1936},{"style":142},[1937],{"type":70,"value":761},{"type":64,"tag":129,"props":1939,"children":1940},{"style":148},[1941],{"type":70,"value":1942},"GH) ",{"type":64,"tag":129,"props":1944,"children":1945},{"style":142},[1946],{"type":70,"value":1947},"},\n",{"type":64,"tag":129,"props":1949,"children":1950},{"class":131,"line":1009},[1951,1955,1959],{"type":64,"tag":129,"props":1952,"children":1953},{"style":142},[1954],{"type":70,"value":1829},{"type":64,"tag":129,"props":1956,"children":1957},{"style":148},[1958],{"type":70,"value":468},{"type":64,"tag":129,"props":1960,"children":1961},{"style":142},[1962],{"type":70,"value":242},{"type":64,"tag":129,"props":1964,"children":1965},{"class":131,"line":1022},[1966,1971,1975,1979,1984,1988,1992,1997,2001,2005,2010,2014,2018,2023,2027,2031,2035],{"type":64,"tag":129,"props":1967,"children":1968},{"style":365},[1969],{"type":70,"value":1970},"    fileSkill",{"type":64,"tag":129,"props":1972,"children":1973},{"style":148},[1974],{"type":70,"value":373},{"type":64,"tag":129,"props":1976,"children":1977},{"style":142},[1978],{"type":70,"value":437},{"type":64,"tag":129,"props":1980,"children":1981},{"style":385},[1982],{"type":70,"value":1983}," path",{"type":64,"tag":129,"props":1985,"children":1986},{"style":142},[1987],{"type":70,"value":393},{"type":64,"tag":129,"props":1989,"children":1990},{"style":142},[1991],{"type":70,"value":166},{"type":64,"tag":129,"props":1993,"children":1994},{"style":169},[1995],{"type":70,"value":1996},".hints.md",{"type":64,"tag":129,"props":1998,"children":1999},{"style":142},[2000],{"type":70,"value":407},{"type":64,"tag":129,"props":2002,"children":2003},{"style":142},[2004],{"type":70,"value":542},{"type":64,"tag":129,"props":2006,"children":2007},{"style":385},[2008],{"type":70,"value":2009}," content",{"type":64,"tag":129,"props":2011,"children":2012},{"style":142},[2013],{"type":70,"value":393},{"type":64,"tag":129,"props":2015,"children":2016},{"style":142},[2017],{"type":70,"value":166},{"type":64,"tag":129,"props":2019,"children":2020},{"style":169},[2021],{"type":70,"value":2022},"Prefer pnpm.",{"type":64,"tag":129,"props":2024,"children":2025},{"style":142},[2026],{"type":70,"value":407},{"type":64,"tag":129,"props":2028,"children":2029},{"style":142},[2030],{"type":70,"value":156},{"type":64,"tag":129,"props":2032,"children":2033},{"style":148},[2034],{"type":70,"value":468},{"type":64,"tag":129,"props":2036,"children":2037},{"style":142},[2038],{"type":70,"value":242},{"type":64,"tag":129,"props":2040,"children":2041},{"class":131,"line":1053},[2042,2047],{"type":64,"tag":129,"props":2043,"children":2044},{"style":148},[2045],{"type":70,"value":2046},"  ]",{"type":64,"tag":129,"props":2048,"children":2049},{"style":142},[2050],{"type":70,"value":242},{"type":64,"tag":129,"props":2052,"children":2054},{"class":131,"line":2053},29,[2055,2060,2064,2068,2072,2077,2081,2085,2089],{"type":64,"tag":129,"props":2056,"children":2057},{"style":385},[2058],{"type":70,"value":2059},"  plugins",{"type":64,"tag":129,"props":2061,"children":2062},{"style":142},[2063],{"type":70,"value":393},{"type":64,"tag":129,"props":2065,"children":2066},{"style":148},[2067],{"type":70,"value":643},{"type":64,"tag":129,"props":2069,"children":2070},{"style":142},[2071],{"type":70,"value":407},{"type":64,"tag":129,"props":2073,"children":2074},{"style":169},[2075],{"type":70,"value":2076},"@anthropic\u002Fplugin-foo",{"type":64,"tag":129,"props":2078,"children":2079},{"style":142},[2080],{"type":70,"value":407},{"type":64,"tag":129,"props":2082,"children":2083},{"style":148},[2084],{"type":70,"value":678},{"type":64,"tag":129,"props":2086,"children":2087},{"style":142},[2088],{"type":70,"value":542},{"type":64,"tag":129,"props":2090,"children":2091},{"style":1262},[2092],{"type":70,"value":2093}," \u002F\u002F no-op with warning on CLIs without a plugin concept\n",{"type":64,"tag":129,"props":2095,"children":2097},{"class":131,"line":2096},30,[2098,2103,2107,2111,2116,2120],{"type":64,"tag":129,"props":2099,"children":2100},{"style":385},[2101],{"type":70,"value":2102},"  instructions",{"type":64,"tag":129,"props":2104,"children":2105},{"style":142},[2106],{"type":70,"value":393},{"type":64,"tag":129,"props":2108,"children":2109},{"style":142},[2110],{"type":70,"value":166},{"type":64,"tag":129,"props":2112,"children":2113},{"style":169},[2114],{"type":70,"value":2115},"Always run `pnpm test` before proposing a change.",{"type":64,"tag":129,"props":2117,"children":2118},{"style":142},[2119],{"type":70,"value":407},{"type":64,"tag":129,"props":2121,"children":2122},{"style":142},[2123],{"type":70,"value":242},{"type":64,"tag":129,"props":2125,"children":2127},{"class":131,"line":2126},31,[2128,2132],{"type":64,"tag":129,"props":2129,"children":2130},{"style":142},[2131],{"type":70,"value":277},{"type":64,"tag":129,"props":2133,"children":2134},{"style":148},[2135],{"type":70,"value":914},{"type":64,"tag":73,"props":2137,"children":2138},{},[2139,2141,2147,2149,2155,2157,2163,2165,2171,2173,2179,2181,2187,2189,2195,2197,2203],{"type":70,"value":2140},"Each skill type is projected per harness (Claude Code → ",{"type":64,"tag":79,"props":2142,"children":2144},{"className":2143},[],[2145],{"type":70,"value":2146},".mcp.json",{"type":70,"value":2148},"; Codex →\n",{"type":64,"tag":79,"props":2150,"children":2152},{"className":2151},[],[2153],{"type":70,"value":2154},".codex\u002Fconfig.toml",{"type":70,"value":2156},"; OpenCode → ",{"type":64,"tag":79,"props":2158,"children":2160},{"className":2159},[],[2161],{"type":70,"value":2162},"opencode.json",{"type":70,"value":2164},").\n",{"type":64,"tag":79,"props":2166,"children":2168},{"className":2167},[],[2169],{"type":70,"value":2170},"instructions",{"type":70,"value":2172}," is written as ",{"type":64,"tag":79,"props":2174,"children":2176},{"className":2175},[],[2177],{"type":70,"value":2178},"AGENTS.md",{"type":70,"value":2180}," at the workspace root; ",{"type":64,"tag":79,"props":2182,"children":2184},{"className":2183},[],[2185],{"type":70,"value":2186},"CLAUDE.md",{"type":70,"value":2188}," and\n",{"type":64,"tag":79,"props":2190,"children":2192},{"className":2191},[],[2193],{"type":70,"value":2194},"GEMINI.md",{"type":70,"value":2196}," are created as symlinks (falling back to copies on symlink failure).\nSkills\u002Fplugins that a CLI lacks emit a ",{"type":64,"tag":79,"props":2198,"children":2200},{"className":2199},[],[2201],{"type":70,"value":2202},"console.warn",{"type":70,"value":2204}," and are skipped.",{"type":64,"tag":73,"props":2206,"children":2207},{},[2208,2226,2228,2233,2235,2241],{"type":64,"tag":104,"props":2209,"children":2210},{},[2211,2216,2218,2224],{"type":64,"tag":79,"props":2212,"children":2214},{"className":2213},[],[2215],{"type":70,"value":1316},{"type":70,"value":2217}," ",{"type":64,"tag":79,"props":2219,"children":2221},{"className":2220},[],[2222],{"type":70,"value":2223},"into",{"type":70,"value":2225}," field:",{"type":70,"value":2227}," an ",{"type":64,"tag":104,"props":2229,"children":2230},{},[2231],{"type":70,"value":2232},"absolute path inside the sandbox",{"type":70,"value":2234}," where the\nrepo is cloned. Defaults to ",{"type":64,"tag":79,"props":2236,"children":2238},{"className":2237},[],[2239],{"type":70,"value":2240},"\u003Croot>\u002F.tanstack-skills\u002F\u003Crepo-basename>",{"type":70,"value":761},{"type":64,"tag":112,"props":2243,"children":2245},{"id":2244},"fast-init",[2246],{"type":70,"value":2247},"Fast init",{"type":64,"tag":2249,"props":2250,"children":2252},"h3",{"id":2251},"shallow-clone-depth",[2253,2255,2261],{"type":70,"value":2254},"Shallow clone (",{"type":64,"tag":79,"props":2256,"children":2258},{"className":2257},[],[2259],{"type":70,"value":2260},"depth",{"type":70,"value":468},{"type":64,"tag":73,"props":2263,"children":2264},{},[2265,2271,2272,2278,2280,2286],{"type":64,"tag":79,"props":2266,"children":2268},{"className":2267},[],[2269],{"type":70,"value":2270},"githubRepo",{"type":70,"value":1326},{"type":64,"tag":79,"props":2273,"children":2275},{"className":2274},[],[2276],{"type":70,"value":2277},"gitSource",{"type":70,"value":2279}," default to ",{"type":64,"tag":79,"props":2281,"children":2283},{"className":2282},[],[2284],{"type":70,"value":2285},"--depth 1 --single-branch",{"type":70,"value":2287},". Override:",{"type":64,"tag":119,"props":2289,"children":2291},{"className":121,"code":2290,"language":45,"meta":123,"style":123},"import { githubRepo, defineWorkspace } from '@tanstack\u002Fai-sandbox'\n\ndefineWorkspace({ source: githubRepo({ repo: 'owner\u002Fapp' }) }) \u002F\u002F depth 1 (default)\ndefineWorkspace({ source: githubRepo({ repo: 'owner\u002Fapp', depth: 10 }) }) \u002F\u002F 10 commits\ndefineWorkspace({ source: githubRepo({ repo: 'owner\u002Fapp', depth: 'full' }) }) \u002F\u002F full history\n",[2292],{"type":64,"tag":79,"props":2293,"children":2294},{"__ignoreMap":123},[2295,2339,2346,2426,2521],{"type":64,"tag":129,"props":2296,"children":2297},{"class":131,"line":132},[2298,2302,2306,2311,2315,2319,2323,2327,2331,2335],{"type":64,"tag":129,"props":2299,"children":2300},{"style":136},[2301],{"type":70,"value":139},{"type":64,"tag":129,"props":2303,"children":2304},{"style":142},[2305],{"type":70,"value":145},{"type":64,"tag":129,"props":2307,"children":2308},{"style":148},[2309],{"type":70,"value":2310}," githubRepo",{"type":64,"tag":129,"props":2312,"children":2313},{"style":142},[2314],{"type":70,"value":542},{"type":64,"tag":129,"props":2316,"children":2317},{"style":148},[2318],{"type":70,"value":490},{"type":64,"tag":129,"props":2320,"children":2321},{"style":142},[2322],{"type":70,"value":156},{"type":64,"tag":129,"props":2324,"children":2325},{"style":136},[2326],{"type":70,"value":161},{"type":64,"tag":129,"props":2328,"children":2329},{"style":142},[2330],{"type":70,"value":166},{"type":64,"tag":129,"props":2332,"children":2333},{"style":169},[2334],{"type":70,"value":290},{"type":64,"tag":129,"props":2336,"children":2337},{"style":142},[2338],{"type":70,"value":177},{"type":64,"tag":129,"props":2340,"children":2341},{"class":131,"line":180},[2342],{"type":64,"tag":129,"props":2343,"children":2344},{"emptyLinePlaceholder":339},[2345],{"type":70,"value":342},{"type":64,"tag":129,"props":2347,"children":2348},{"class":131,"line":218},[2349,2353,2357,2361,2366,2370,2374,2378,2382,2387,2391,2395,2400,2404,2408,2413,2417,2421],{"type":64,"tag":129,"props":2350,"children":2351},{"style":365},[2352],{"type":70,"value":1590},{"type":64,"tag":129,"props":2354,"children":2355},{"style":148},[2356],{"type":70,"value":373},{"type":64,"tag":129,"props":2358,"children":2359},{"style":142},[2360],{"type":70,"value":437},{"type":64,"tag":129,"props":2362,"children":2363},{"style":385},[2364],{"type":70,"value":2365}," source",{"type":64,"tag":129,"props":2367,"children":2368},{"style":142},[2369],{"type":70,"value":393},{"type":64,"tag":129,"props":2371,"children":2372},{"style":365},[2373],{"type":70,"value":2310},{"type":64,"tag":129,"props":2375,"children":2376},{"style":148},[2377],{"type":70,"value":373},{"type":64,"tag":129,"props":2379,"children":2380},{"style":142},[2381],{"type":70,"value":437},{"type":64,"tag":129,"props":2383,"children":2384},{"style":385},[2385],{"type":70,"value":2386}," repo",{"type":64,"tag":129,"props":2388,"children":2389},{"style":142},[2390],{"type":70,"value":393},{"type":64,"tag":129,"props":2392,"children":2393},{"style":142},[2394],{"type":70,"value":166},{"type":64,"tag":129,"props":2396,"children":2397},{"style":169},[2398],{"type":70,"value":2399},"owner\u002Fapp",{"type":64,"tag":129,"props":2401,"children":2402},{"style":142},[2403],{"type":70,"value":407},{"type":64,"tag":129,"props":2405,"children":2406},{"style":142},[2407],{"type":70,"value":156},{"type":64,"tag":129,"props":2409,"children":2410},{"style":148},[2411],{"type":70,"value":2412},") ",{"type":64,"tag":129,"props":2414,"children":2415},{"style":142},[2416],{"type":70,"value":277},{"type":64,"tag":129,"props":2418,"children":2419},{"style":148},[2420],{"type":70,"value":2412},{"type":64,"tag":129,"props":2422,"children":2423},{"style":1262},[2424],{"type":70,"value":2425},"\u002F\u002F depth 1 (default)\n",{"type":64,"tag":129,"props":2427,"children":2428},{"class":131,"line":231},[2429,2433,2437,2441,2445,2449,2453,2457,2461,2465,2469,2473,2477,2481,2485,2490,2494,2500,2504,2508,2512,2516],{"type":64,"tag":129,"props":2430,"children":2431},{"style":365},[2432],{"type":70,"value":1590},{"type":64,"tag":129,"props":2434,"children":2435},{"style":148},[2436],{"type":70,"value":373},{"type":64,"tag":129,"props":2438,"children":2439},{"style":142},[2440],{"type":70,"value":437},{"type":64,"tag":129,"props":2442,"children":2443},{"style":385},[2444],{"type":70,"value":2365},{"type":64,"tag":129,"props":2446,"children":2447},{"style":142},[2448],{"type":70,"value":393},{"type":64,"tag":129,"props":2450,"children":2451},{"style":365},[2452],{"type":70,"value":2310},{"type":64,"tag":129,"props":2454,"children":2455},{"style":148},[2456],{"type":70,"value":373},{"type":64,"tag":129,"props":2458,"children":2459},{"style":142},[2460],{"type":70,"value":437},{"type":64,"tag":129,"props":2462,"children":2463},{"style":385},[2464],{"type":70,"value":2386},{"type":64,"tag":129,"props":2466,"children":2467},{"style":142},[2468],{"type":70,"value":393},{"type":64,"tag":129,"props":2470,"children":2471},{"style":142},[2472],{"type":70,"value":166},{"type":64,"tag":129,"props":2474,"children":2475},{"style":169},[2476],{"type":70,"value":2399},{"type":64,"tag":129,"props":2478,"children":2479},{"style":142},[2480],{"type":70,"value":407},{"type":64,"tag":129,"props":2482,"children":2483},{"style":142},[2484],{"type":70,"value":542},{"type":64,"tag":129,"props":2486,"children":2487},{"style":385},[2488],{"type":70,"value":2489}," depth",{"type":64,"tag":129,"props":2491,"children":2492},{"style":142},[2493],{"type":70,"value":393},{"type":64,"tag":129,"props":2495,"children":2497},{"style":2496},"--shiki-light:#F76D47;--shiki-default:#F78C6C;--shiki-dark:#F78C6C",[2498],{"type":70,"value":2499}," 10",{"type":64,"tag":129,"props":2501,"children":2502},{"style":142},[2503],{"type":70,"value":156},{"type":64,"tag":129,"props":2505,"children":2506},{"style":148},[2507],{"type":70,"value":2412},{"type":64,"tag":129,"props":2509,"children":2510},{"style":142},[2511],{"type":70,"value":277},{"type":64,"tag":129,"props":2513,"children":2514},{"style":148},[2515],{"type":70,"value":2412},{"type":64,"tag":129,"props":2517,"children":2518},{"style":1262},[2519],{"type":70,"value":2520},"\u002F\u002F 10 commits\n",{"type":64,"tag":129,"props":2522,"children":2523},{"class":131,"line":245},[2524,2528,2532,2536,2540,2544,2548,2552,2556,2560,2564,2568,2572,2576,2580,2584,2588,2592,2597,2601,2605,2609,2613,2617],{"type":64,"tag":129,"props":2525,"children":2526},{"style":365},[2527],{"type":70,"value":1590},{"type":64,"tag":129,"props":2529,"children":2530},{"style":148},[2531],{"type":70,"value":373},{"type":64,"tag":129,"props":2533,"children":2534},{"style":142},[2535],{"type":70,"value":437},{"type":64,"tag":129,"props":2537,"children":2538},{"style":385},[2539],{"type":70,"value":2365},{"type":64,"tag":129,"props":2541,"children":2542},{"style":142},[2543],{"type":70,"value":393},{"type":64,"tag":129,"props":2545,"children":2546},{"style":365},[2547],{"type":70,"value":2310},{"type":64,"tag":129,"props":2549,"children":2550},{"style":148},[2551],{"type":70,"value":373},{"type":64,"tag":129,"props":2553,"children":2554},{"style":142},[2555],{"type":70,"value":437},{"type":64,"tag":129,"props":2557,"children":2558},{"style":385},[2559],{"type":70,"value":2386},{"type":64,"tag":129,"props":2561,"children":2562},{"style":142},[2563],{"type":70,"value":393},{"type":64,"tag":129,"props":2565,"children":2566},{"style":142},[2567],{"type":70,"value":166},{"type":64,"tag":129,"props":2569,"children":2570},{"style":169},[2571],{"type":70,"value":2399},{"type":64,"tag":129,"props":2573,"children":2574},{"style":142},[2575],{"type":70,"value":407},{"type":64,"tag":129,"props":2577,"children":2578},{"style":142},[2579],{"type":70,"value":542},{"type":64,"tag":129,"props":2581,"children":2582},{"style":385},[2583],{"type":70,"value":2489},{"type":64,"tag":129,"props":2585,"children":2586},{"style":142},[2587],{"type":70,"value":393},{"type":64,"tag":129,"props":2589,"children":2590},{"style":142},[2591],{"type":70,"value":166},{"type":64,"tag":129,"props":2593,"children":2594},{"style":169},[2595],{"type":70,"value":2596},"full",{"type":64,"tag":129,"props":2598,"children":2599},{"style":142},[2600],{"type":70,"value":407},{"type":64,"tag":129,"props":2602,"children":2603},{"style":142},[2604],{"type":70,"value":156},{"type":64,"tag":129,"props":2606,"children":2607},{"style":148},[2608],{"type":70,"value":2412},{"type":64,"tag":129,"props":2610,"children":2611},{"style":142},[2612],{"type":70,"value":277},{"type":64,"tag":129,"props":2614,"children":2615},{"style":148},[2616],{"type":70,"value":2412},{"type":64,"tag":129,"props":2618,"children":2619},{"style":1262},[2620],{"type":70,"value":2621},"\u002F\u002F full history\n",{"type":64,"tag":2249,"props":2623,"children":2625},{"id":2624},"serial-parallel-setup-callback",[2626,2628,2634],{"type":70,"value":2627},"Serial \u002F parallel ",{"type":64,"tag":79,"props":2629,"children":2631},{"className":2630},[],[2632],{"type":70,"value":2633},"setup",{"type":70,"value":2635}," callback",{"type":64,"tag":73,"props":2637,"children":2638},{},[2639,2644,2646,2652,2654,2659],{"type":64,"tag":79,"props":2640,"children":2642},{"className":2641},[],[2643],{"type":70,"value":2633},{"type":70,"value":2645}," accepts a plain ",{"type":64,"tag":79,"props":2647,"children":2649},{"className":2648},[],[2650],{"type":70,"value":2651},"Array\u003Cstring>",{"type":70,"value":2653}," (all serial) or a callback that records\nserial and parallel groups over a ",{"type":64,"tag":104,"props":2655,"children":2656},{},[2657],{"type":70,"value":2658},"persistent shell",{"type":70,"value":2660}," whose cwd\u002Fenv carry over\nbetween serial steps:",{"type":64,"tag":119,"props":2662,"children":2664},{"className":121,"code":2663,"language":45,"meta":123,"style":123},"defineWorkspace({\n  source: githubRepo({ repo: 'owner\u002Fapp' }),\n  setup: ({ serial, parallel }) => {\n    serial('corepack enable')\n    serial('pnpm install')\n    parallel(['pnpm build', 'pnpm typecheck']) \u002F\u002F concurrent; inherit cwd+env from shell\n    serial('echo done')\n  },\n})\n",[2665],{"type":64,"tag":79,"props":2666,"children":2667},{"__ignoreMap":123},[2668,2683,2738,2784,2812,2839,2892,2920,2928],{"type":64,"tag":129,"props":2669,"children":2670},{"class":131,"line":132},[2671,2675,2679],{"type":64,"tag":129,"props":2672,"children":2673},{"style":365},[2674],{"type":70,"value":1590},{"type":64,"tag":129,"props":2676,"children":2677},{"style":148},[2678],{"type":70,"value":373},{"type":64,"tag":129,"props":2680,"children":2681},{"style":142},[2682],{"type":70,"value":378},{"type":64,"tag":129,"props":2684,"children":2685},{"class":131,"line":180},[2686,2690,2694,2698,2702,2706,2710,2714,2718,2722,2726,2730,2734],{"type":64,"tag":129,"props":2687,"children":2688},{"style":385},[2689],{"type":70,"value":1606},{"type":64,"tag":129,"props":2691,"children":2692},{"style":142},[2693],{"type":70,"value":393},{"type":64,"tag":129,"props":2695,"children":2696},{"style":365},[2697],{"type":70,"value":2310},{"type":64,"tag":129,"props":2699,"children":2700},{"style":148},[2701],{"type":70,"value":373},{"type":64,"tag":129,"props":2703,"children":2704},{"style":142},[2705],{"type":70,"value":437},{"type":64,"tag":129,"props":2707,"children":2708},{"style":385},[2709],{"type":70,"value":2386},{"type":64,"tag":129,"props":2711,"children":2712},{"style":142},[2713],{"type":70,"value":393},{"type":64,"tag":129,"props":2715,"children":2716},{"style":142},[2717],{"type":70,"value":166},{"type":64,"tag":129,"props":2719,"children":2720},{"style":169},[2721],{"type":70,"value":2399},{"type":64,"tag":129,"props":2723,"children":2724},{"style":142},[2725],{"type":70,"value":407},{"type":64,"tag":129,"props":2727,"children":2728},{"style":142},[2729],{"type":70,"value":156},{"type":64,"tag":129,"props":2731,"children":2732},{"style":148},[2733],{"type":70,"value":468},{"type":64,"tag":129,"props":2735,"children":2736},{"style":142},[2737],{"type":70,"value":242},{"type":64,"tag":129,"props":2739,"children":2740},{"class":131,"line":218},[2741,2746,2750,2755,2761,2765,2770,2775,2780],{"type":64,"tag":129,"props":2742,"children":2743},{"style":365},[2744],{"type":70,"value":2745},"  setup",{"type":64,"tag":129,"props":2747,"children":2748},{"style":142},[2749],{"type":70,"value":393},{"type":64,"tag":129,"props":2751,"children":2752},{"style":142},[2753],{"type":70,"value":2754}," ({",{"type":64,"tag":129,"props":2756,"children":2758},{"style":2757},"--shiki-light:#90A4AE;--shiki-light-font-style:italic;--shiki-default:#EEFFFF;--shiki-default-font-style:italic;--shiki-dark:#BABED8;--shiki-dark-font-style:italic",[2759],{"type":70,"value":2760}," serial",{"type":64,"tag":129,"props":2762,"children":2763},{"style":142},[2764],{"type":70,"value":542},{"type":64,"tag":129,"props":2766,"children":2767},{"style":2757},[2768],{"type":70,"value":2769}," parallel",{"type":64,"tag":129,"props":2771,"children":2772},{"style":142},[2773],{"type":70,"value":2774}," })",{"type":64,"tag":129,"props":2776,"children":2777},{"style":349},[2778],{"type":70,"value":2779}," =>",{"type":64,"tag":129,"props":2781,"children":2782},{"style":142},[2783],{"type":70,"value":228},{"type":64,"tag":129,"props":2785,"children":2786},{"class":131,"line":231},[2787,2792,2796,2800,2804,2808],{"type":64,"tag":129,"props":2788,"children":2789},{"style":365},[2790],{"type":70,"value":2791},"    serial",{"type":64,"tag":129,"props":2793,"children":2794},{"style":385},[2795],{"type":70,"value":373},{"type":64,"tag":129,"props":2797,"children":2798},{"style":142},[2799],{"type":70,"value":407},{"type":64,"tag":129,"props":2801,"children":2802},{"style":169},[2803],{"type":70,"value":652},{"type":64,"tag":129,"props":2805,"children":2806},{"style":142},[2807],{"type":70,"value":407},{"type":64,"tag":129,"props":2809,"children":2810},{"style":385},[2811],{"type":70,"value":914},{"type":64,"tag":129,"props":2813,"children":2814},{"class":131,"line":245},[2815,2819,2823,2827,2831,2835],{"type":64,"tag":129,"props":2816,"children":2817},{"style":365},[2818],{"type":70,"value":2791},{"type":64,"tag":129,"props":2820,"children":2821},{"style":385},[2822],{"type":70,"value":373},{"type":64,"tag":129,"props":2824,"children":2825},{"style":142},[2826],{"type":70,"value":407},{"type":64,"tag":129,"props":2828,"children":2829},{"style":169},[2830],{"type":70,"value":669},{"type":64,"tag":129,"props":2832,"children":2833},{"style":142},[2834],{"type":70,"value":407},{"type":64,"tag":129,"props":2836,"children":2837},{"style":385},[2838],{"type":70,"value":914},{"type":64,"tag":129,"props":2840,"children":2841},{"class":131,"line":258},[2842,2847,2852,2856,2861,2865,2869,2873,2878,2882,2887],{"type":64,"tag":129,"props":2843,"children":2844},{"style":365},[2845],{"type":70,"value":2846},"    parallel",{"type":64,"tag":129,"props":2848,"children":2849},{"style":385},[2850],{"type":70,"value":2851},"([",{"type":64,"tag":129,"props":2853,"children":2854},{"style":142},[2855],{"type":70,"value":407},{"type":64,"tag":129,"props":2857,"children":2858},{"style":169},[2859],{"type":70,"value":2860},"pnpm build",{"type":64,"tag":129,"props":2862,"children":2863},{"style":142},[2864],{"type":70,"value":407},{"type":64,"tag":129,"props":2866,"children":2867},{"style":142},[2868],{"type":70,"value":542},{"type":64,"tag":129,"props":2870,"children":2871},{"style":142},[2872],{"type":70,"value":166},{"type":64,"tag":129,"props":2874,"children":2875},{"style":169},[2876],{"type":70,"value":2877},"pnpm typecheck",{"type":64,"tag":129,"props":2879,"children":2880},{"style":142},[2881],{"type":70,"value":407},{"type":64,"tag":129,"props":2883,"children":2884},{"style":385},[2885],{"type":70,"value":2886},"]) ",{"type":64,"tag":129,"props":2888,"children":2889},{"style":1262},[2890],{"type":70,"value":2891},"\u002F\u002F concurrent; inherit cwd+env from shell\n",{"type":64,"tag":129,"props":2893,"children":2894},{"class":131,"line":271},[2895,2899,2903,2907,2912,2916],{"type":64,"tag":129,"props":2896,"children":2897},{"style":365},[2898],{"type":70,"value":2791},{"type":64,"tag":129,"props":2900,"children":2901},{"style":385},[2902],{"type":70,"value":373},{"type":64,"tag":129,"props":2904,"children":2905},{"style":142},[2906],{"type":70,"value":407},{"type":64,"tag":129,"props":2908,"children":2909},{"style":169},[2910],{"type":70,"value":2911},"echo done",{"type":64,"tag":129,"props":2913,"children":2914},{"style":142},[2915],{"type":70,"value":407},{"type":64,"tag":129,"props":2917,"children":2918},{"style":385},[2919],{"type":70,"value":914},{"type":64,"tag":129,"props":2921,"children":2922},{"class":131,"line":297},[2923],{"type":64,"tag":129,"props":2924,"children":2925},{"style":142},[2926],{"type":70,"value":2927},"  },\n",{"type":64,"tag":129,"props":2929,"children":2930},{"class":131,"line":335},[2931,2935],{"type":64,"tag":129,"props":2932,"children":2933},{"style":142},[2934],{"type":70,"value":277},{"type":64,"tag":129,"props":2936,"children":2937},{"style":148},[2938],{"type":70,"value":914},{"type":64,"tag":2249,"props":2940,"children":2942},{"id":2941},"snapshot-after-setup-and-snapshotmaxage",[2943,2945],{"type":70,"value":2944},"Snapshot-after-setup and ",{"type":64,"tag":79,"props":2946,"children":2948},{"className":2947},[],[2949],{"type":70,"value":2950},"snapshotMaxAge",{"type":64,"tag":73,"props":2952,"children":2953},{},[2954,2956,2961],{"type":70,"value":2955},"When the provider supports snapshots, bootstrap takes one automatically after\n",{"type":64,"tag":79,"props":2957,"children":2959},{"className":2958},[],[2960],{"type":70,"value":2633},{"type":70,"value":2962}," completes. Subsequent runs resume from the snapshot (skipping setup).\nOverride or add a TTL:",{"type":64,"tag":119,"props":2964,"children":2966},{"className":121,"code":2965,"language":45,"meta":123,"style":123},"lifecycle: {\n  snapshot: 'after-setup', \u002F\u002F default when provider.capabilities().snapshots\n  snapshotMaxAge: '24h',   \u002F\u002F re-create when the snapshot is older than this\n}\n",[2967],{"type":64,"tag":79,"props":2968,"children":2969},{"__ignoreMap":123},[2970,2987,3020,3054],{"type":64,"tag":129,"props":2971,"children":2972},{"class":131,"line":132},[2973,2979,2983],{"type":64,"tag":129,"props":2974,"children":2976},{"style":2975},"--shiki-light:#E2931D;--shiki-default:#FFCB6B;--shiki-dark:#FFCB6B",[2977],{"type":70,"value":2978},"lifecycle",{"type":64,"tag":129,"props":2980,"children":2981},{"style":142},[2982],{"type":70,"value":393},{"type":64,"tag":129,"props":2984,"children":2985},{"style":142},[2986],{"type":70,"value":228},{"type":64,"tag":129,"props":2988,"children":2989},{"class":131,"line":180},[2990,2995,2999,3003,3007,3011,3015],{"type":64,"tag":129,"props":2991,"children":2992},{"style":2975},[2993],{"type":70,"value":2994},"  snapshot",{"type":64,"tag":129,"props":2996,"children":2997},{"style":142},[2998],{"type":70,"value":393},{"type":64,"tag":129,"props":3000,"children":3001},{"style":142},[3002],{"type":70,"value":166},{"type":64,"tag":129,"props":3004,"children":3005},{"style":169},[3006],{"type":70,"value":867},{"type":64,"tag":129,"props":3008,"children":3009},{"style":142},[3010],{"type":70,"value":407},{"type":64,"tag":129,"props":3012,"children":3013},{"style":142},[3014],{"type":70,"value":542},{"type":64,"tag":129,"props":3016,"children":3017},{"style":1262},[3018],{"type":70,"value":3019}," \u002F\u002F default when provider.capabilities().snapshots\n",{"type":64,"tag":129,"props":3021,"children":3022},{"class":131,"line":218},[3023,3028,3032,3036,3041,3045,3049],{"type":64,"tag":129,"props":3024,"children":3025},{"style":2975},[3026],{"type":70,"value":3027},"  snapshotMaxAge",{"type":64,"tag":129,"props":3029,"children":3030},{"style":142},[3031],{"type":70,"value":393},{"type":64,"tag":129,"props":3033,"children":3034},{"style":142},[3035],{"type":70,"value":166},{"type":64,"tag":129,"props":3037,"children":3038},{"style":169},[3039],{"type":70,"value":3040},"24h",{"type":64,"tag":129,"props":3042,"children":3043},{"style":142},[3044],{"type":70,"value":407},{"type":64,"tag":129,"props":3046,"children":3047},{"style":142},[3048],{"type":70,"value":542},{"type":64,"tag":129,"props":3050,"children":3051},{"style":1262},[3052],{"type":70,"value":3053},"   \u002F\u002F re-create when the snapshot is older than this\n",{"type":64,"tag":129,"props":3055,"children":3056},{"class":131,"line":231},[3057],{"type":64,"tag":129,"props":3058,"children":3059},{"style":142},[3060],{"type":70,"value":3061},"}\n",{"type":64,"tag":73,"props":3063,"children":3064},{},[3065],{"type":70,"value":3066},"Providers without snapshot support skip the step silently.",{"type":64,"tag":112,"props":3068,"children":3070},{"id":3069},"providers",[3071],{"type":70,"value":3072},"Providers",{"type":64,"tag":1336,"props":3074,"children":3075},{},[3076,3087],{"type":64,"tag":1340,"props":3077,"children":3078},{},[3079,3085],{"type":64,"tag":79,"props":3080,"children":3082},{"className":3081},[],[3083],{"type":70,"value":3084},"localProcessSandbox()",{"type":70,"value":3086}," — runs on the host (no isolation; dev loop only).",{"type":64,"tag":1340,"props":3088,"children":3089},{},[3090,3096],{"type":64,"tag":79,"props":3091,"children":3093},{"className":3092},[],[3094],{"type":70,"value":3095},"dockerSandbox({ image })",{"type":70,"value":3097}," — isolated container; snapshots, fork, resume-by-id.",{"type":64,"tag":73,"props":3099,"children":3100},{},[3101,3103,3109,3111,3117,3119,3124,3126,3132,3134,3140,3142,3148,3150,3156,3158,3164,3166,3172,3174,3180,3181,3187,3189,3195,3197,3203],{"type":70,"value":3102},"Both implement the same ",{"type":64,"tag":79,"props":3104,"children":3106},{"className":3105},[],[3107],{"type":70,"value":3108},"SandboxHandle",{"type":70,"value":3110},": ",{"type":64,"tag":79,"props":3112,"children":3114},{"className":3113},[],[3115],{"type":70,"value":3116},"fs",{"type":70,"value":3118}," (read\u002Fwrite\u002Flist\u002Fmkdir\u002Fremove\u002F\nrename\u002Fexists), ",{"type":64,"tag":79,"props":3120,"children":3122},{"className":3121},[],[3123],{"type":70,"value":533},{"type":70,"value":3125}," (clone\u002Fstatus\u002Fadd\u002Fcommit\u002Fpush\u002Fpull\u002Fbranch), ",{"type":64,"tag":79,"props":3127,"children":3129},{"className":3128},[],[3130],{"type":70,"value":3131},"process",{"type":70,"value":3133},"\n(",{"type":64,"tag":79,"props":3135,"children":3137},{"className":3136},[],[3138],{"type":70,"value":3139},"exec",{"type":70,"value":3141}," + duplex ",{"type":64,"tag":79,"props":3143,"children":3145},{"className":3144},[],[3146],{"type":70,"value":3147},"spawn",{"type":70,"value":3149},"), ",{"type":64,"tag":79,"props":3151,"children":3153},{"className":3152},[],[3154],{"type":70,"value":3155},"ports.connect(port)",{"type":70,"value":3157},", ",{"type":64,"tag":79,"props":3159,"children":3161},{"className":3160},[],[3162],{"type":70,"value":3163},"env.set",{"type":70,"value":3165},", optional\n",{"type":64,"tag":79,"props":3167,"children":3169},{"className":3168},[],[3170],{"type":70,"value":3171},"snapshot()",{"type":70,"value":3173},"\u002F",{"type":64,"tag":79,"props":3175,"children":3177},{"className":3176},[],[3178],{"type":70,"value":3179},"fork()",{"type":70,"value":3157},{"type":64,"tag":79,"props":3182,"children":3184},{"className":3183},[],[3185],{"type":70,"value":3186},"destroy()",{"type":70,"value":3188},". Providers advertise support via\n",{"type":64,"tag":79,"props":3190,"children":3192},{"className":3191},[],[3193],{"type":70,"value":3194},"capabilities()",{"type":70,"value":3196},"; calling an unsupported optional method throws\n",{"type":64,"tag":79,"props":3198,"children":3200},{"className":3199},[],[3201],{"type":70,"value":3202},"UnsupportedCapabilityError",{"type":70,"value":761},{"type":64,"tag":112,"props":3205,"children":3207},{"id":3206},"policy",[3208],{"type":70,"value":3209},"Policy",{"type":64,"tag":119,"props":3211,"children":3213},{"className":121,"code":3212,"language":45,"meta":123,"style":123},"import { defineSandboxPolicy } from '@tanstack\u002Fai-sandbox'\n\nconst policy = defineSandboxPolicy({\n  commands: {\n    allow: ['pnpm test'],\n    ask: ['curl *'],\n    deny: ['sudo *', 'rm -rf *'],\n  },\n  capabilities: { fileWrite: 'allow', network: 'ask' },\n  default: 'ask', \u002F\u002F deny > ask > allow\n})\n\u002F\u002F pass to defineSandbox({ policy }); harness adapters map it to native permissions\n",[3214],{"type":64,"tag":79,"props":3215,"children":3216},{"__ignoreMap":123},[3217,3253,3260,3288,3304,3340,3377,3431,3438,3506,3539,3550],{"type":64,"tag":129,"props":3218,"children":3219},{"class":131,"line":132},[3220,3224,3228,3233,3237,3241,3245,3249],{"type":64,"tag":129,"props":3221,"children":3222},{"style":136},[3223],{"type":70,"value":139},{"type":64,"tag":129,"props":3225,"children":3226},{"style":142},[3227],{"type":70,"value":145},{"type":64,"tag":129,"props":3229,"children":3230},{"style":148},[3231],{"type":70,"value":3232}," defineSandboxPolicy",{"type":64,"tag":129,"props":3234,"children":3235},{"style":142},[3236],{"type":70,"value":156},{"type":64,"tag":129,"props":3238,"children":3239},{"style":136},[3240],{"type":70,"value":161},{"type":64,"tag":129,"props":3242,"children":3243},{"style":142},[3244],{"type":70,"value":166},{"type":64,"tag":129,"props":3246,"children":3247},{"style":169},[3248],{"type":70,"value":290},{"type":64,"tag":129,"props":3250,"children":3251},{"style":142},[3252],{"type":70,"value":177},{"type":64,"tag":129,"props":3254,"children":3255},{"class":131,"line":180},[3256],{"type":64,"tag":129,"props":3257,"children":3258},{"emptyLinePlaceholder":339},[3259],{"type":70,"value":342},{"type":64,"tag":129,"props":3261,"children":3262},{"class":131,"line":218},[3263,3267,3272,3276,3280,3284],{"type":64,"tag":129,"props":3264,"children":3265},{"style":349},[3266],{"type":70,"value":352},{"type":64,"tag":129,"props":3268,"children":3269},{"style":148},[3270],{"type":70,"value":3271}," policy ",{"type":64,"tag":129,"props":3273,"children":3274},{"style":142},[3275],{"type":70,"value":362},{"type":64,"tag":129,"props":3277,"children":3278},{"style":365},[3279],{"type":70,"value":3232},{"type":64,"tag":129,"props":3281,"children":3282},{"style":148},[3283],{"type":70,"value":373},{"type":64,"tag":129,"props":3285,"children":3286},{"style":142},[3287],{"type":70,"value":378},{"type":64,"tag":129,"props":3289,"children":3290},{"class":131,"line":231},[3291,3296,3300],{"type":64,"tag":129,"props":3292,"children":3293},{"style":385},[3294],{"type":70,"value":3295},"  commands",{"type":64,"tag":129,"props":3297,"children":3298},{"style":142},[3299],{"type":70,"value":393},{"type":64,"tag":129,"props":3301,"children":3302},{"style":142},[3303],{"type":70,"value":228},{"type":64,"tag":129,"props":3305,"children":3306},{"class":131,"line":245},[3307,3312,3316,3320,3324,3328,3332,3336],{"type":64,"tag":129,"props":3308,"children":3309},{"style":385},[3310],{"type":70,"value":3311},"    allow",{"type":64,"tag":129,"props":3313,"children":3314},{"style":142},[3315],{"type":70,"value":393},{"type":64,"tag":129,"props":3317,"children":3318},{"style":148},[3319],{"type":70,"value":643},{"type":64,"tag":129,"props":3321,"children":3322},{"style":142},[3323],{"type":70,"value":407},{"type":64,"tag":129,"props":3325,"children":3326},{"style":169},[3327],{"type":70,"value":717},{"type":64,"tag":129,"props":3329,"children":3330},{"style":142},[3331],{"type":70,"value":407},{"type":64,"tag":129,"props":3333,"children":3334},{"style":148},[3335],{"type":70,"value":678},{"type":64,"tag":129,"props":3337,"children":3338},{"style":142},[3339],{"type":70,"value":242},{"type":64,"tag":129,"props":3341,"children":3342},{"class":131,"line":258},[3343,3348,3352,3356,3360,3365,3369,3373],{"type":64,"tag":129,"props":3344,"children":3345},{"style":385},[3346],{"type":70,"value":3347},"    ask",{"type":64,"tag":129,"props":3349,"children":3350},{"style":142},[3351],{"type":70,"value":393},{"type":64,"tag":129,"props":3353,"children":3354},{"style":148},[3355],{"type":70,"value":643},{"type":64,"tag":129,"props":3357,"children":3358},{"style":142},[3359],{"type":70,"value":407},{"type":64,"tag":129,"props":3361,"children":3362},{"style":169},[3363],{"type":70,"value":3364},"curl *",{"type":64,"tag":129,"props":3366,"children":3367},{"style":142},[3368],{"type":70,"value":407},{"type":64,"tag":129,"props":3370,"children":3371},{"style":148},[3372],{"type":70,"value":678},{"type":64,"tag":129,"props":3374,"children":3375},{"style":142},[3376],{"type":70,"value":242},{"type":64,"tag":129,"props":3378,"children":3379},{"class":131,"line":271},[3380,3385,3389,3393,3397,3402,3406,3410,3414,3419,3423,3427],{"type":64,"tag":129,"props":3381,"children":3382},{"style":385},[3383],{"type":70,"value":3384},"    deny",{"type":64,"tag":129,"props":3386,"children":3387},{"style":142},[3388],{"type":70,"value":393},{"type":64,"tag":129,"props":3390,"children":3391},{"style":148},[3392],{"type":70,"value":643},{"type":64,"tag":129,"props":3394,"children":3395},{"style":142},[3396],{"type":70,"value":407},{"type":64,"tag":129,"props":3398,"children":3399},{"style":169},[3400],{"type":70,"value":3401},"sudo *",{"type":64,"tag":129,"props":3403,"children":3404},{"style":142},[3405],{"type":70,"value":407},{"type":64,"tag":129,"props":3407,"children":3408},{"style":142},[3409],{"type":70,"value":542},{"type":64,"tag":129,"props":3411,"children":3412},{"style":142},[3413],{"type":70,"value":166},{"type":64,"tag":129,"props":3415,"children":3416},{"style":169},[3417],{"type":70,"value":3418},"rm -rf *",{"type":64,"tag":129,"props":3420,"children":3421},{"style":142},[3422],{"type":70,"value":407},{"type":64,"tag":129,"props":3424,"children":3425},{"style":148},[3426],{"type":70,"value":678},{"type":64,"tag":129,"props":3428,"children":3429},{"style":142},[3430],{"type":70,"value":242},{"type":64,"tag":129,"props":3432,"children":3433},{"class":131,"line":297},[3434],{"type":64,"tag":129,"props":3435,"children":3436},{"style":142},[3437],{"type":70,"value":2927},{"type":64,"tag":129,"props":3439,"children":3440},{"class":131,"line":335},[3441,3446,3450,3454,3459,3463,3467,3472,3476,3480,3485,3489,3493,3498,3502],{"type":64,"tag":129,"props":3442,"children":3443},{"style":385},[3444],{"type":70,"value":3445},"  capabilities",{"type":64,"tag":129,"props":3447,"children":3448},{"style":142},[3449],{"type":70,"value":393},{"type":64,"tag":129,"props":3451,"children":3452},{"style":142},[3453],{"type":70,"value":145},{"type":64,"tag":129,"props":3455,"children":3456},{"style":385},[3457],{"type":70,"value":3458}," fileWrite",{"type":64,"tag":129,"props":3460,"children":3461},{"style":142},[3462],{"type":70,"value":393},{"type":64,"tag":129,"props":3464,"children":3465},{"style":142},[3466],{"type":70,"value":166},{"type":64,"tag":129,"props":3468,"children":3469},{"style":169},[3470],{"type":70,"value":3471},"allow",{"type":64,"tag":129,"props":3473,"children":3474},{"style":142},[3475],{"type":70,"value":407},{"type":64,"tag":129,"props":3477,"children":3478},{"style":142},[3479],{"type":70,"value":542},{"type":64,"tag":129,"props":3481,"children":3482},{"style":385},[3483],{"type":70,"value":3484}," network",{"type":64,"tag":129,"props":3486,"children":3487},{"style":142},[3488],{"type":70,"value":393},{"type":64,"tag":129,"props":3490,"children":3491},{"style":142},[3492],{"type":70,"value":166},{"type":64,"tag":129,"props":3494,"children":3495},{"style":169},[3496],{"type":70,"value":3497},"ask",{"type":64,"tag":129,"props":3499,"children":3500},{"style":142},[3501],{"type":70,"value":407},{"type":64,"tag":129,"props":3503,"children":3504},{"style":142},[3505],{"type":70,"value":595},{"type":64,"tag":129,"props":3507,"children":3508},{"class":131,"line":345},[3509,3514,3518,3522,3526,3530,3534],{"type":64,"tag":129,"props":3510,"children":3511},{"style":385},[3512],{"type":70,"value":3513},"  default",{"type":64,"tag":129,"props":3515,"children":3516},{"style":142},[3517],{"type":70,"value":393},{"type":64,"tag":129,"props":3519,"children":3520},{"style":142},[3521],{"type":70,"value":166},{"type":64,"tag":129,"props":3523,"children":3524},{"style":169},[3525],{"type":70,"value":3497},{"type":64,"tag":129,"props":3527,"children":3528},{"style":142},[3529],{"type":70,"value":407},{"type":64,"tag":129,"props":3531,"children":3532},{"style":142},[3533],{"type":70,"value":542},{"type":64,"tag":129,"props":3535,"children":3536},{"style":1262},[3537],{"type":70,"value":3538}," \u002F\u002F deny > ask > allow\n",{"type":64,"tag":129,"props":3540,"children":3541},{"class":131,"line":381},[3542,3546],{"type":64,"tag":129,"props":3543,"children":3544},{"style":142},[3545],{"type":70,"value":277},{"type":64,"tag":129,"props":3547,"children":3548},{"style":148},[3549],{"type":70,"value":914},{"type":64,"tag":129,"props":3551,"children":3552},{"class":131,"line":414},[3553],{"type":64,"tag":129,"props":3554,"children":3555},{"style":1262},[3556],{"type":70,"value":3557},"\u002F\u002F pass to defineSandbox({ policy }); harness adapters map it to native permissions\n",{"type":64,"tag":112,"props":3559,"children":3561},{"id":3560},"lifecycle-resume",[3562],{"type":70,"value":3563},"Lifecycle & resume",{"type":64,"tag":73,"props":3565,"children":3566},{},[3567,3573,3575,3581],{"type":64,"tag":79,"props":3568,"children":3570},{"className":3569},[],[3571],{"type":70,"value":3572},"reuse: 'thread'",{"type":70,"value":3574}," resumes one sandbox per ",{"type":64,"tag":79,"props":3576,"children":3578},{"className":3577},[],[3579],{"type":70,"value":3580},"threadId",{"type":70,"value":3582},"; the compound key folds in\nprovider + workspace hash + tenant so changing the repo\u002Fsetup\u002Fimage starts\nfresh. Ensure order: resume running → restore snapshot → create + bootstrap.",{"type":64,"tag":112,"props":3584,"children":3586},{"id":3585},"file-event-hooks",[3587],{"type":70,"value":3588},"File-event hooks",{"type":64,"tag":73,"props":3590,"children":3591},{},[3592,3594,3600,3602,3608],{"type":70,"value":3593},"Watch the workspace for create\u002Fchange\u002Fdelete events. Provider-agnostic: native\n",{"type":64,"tag":79,"props":3595,"children":3597},{"className":3596},[],[3598],{"type":70,"value":3599},"fs.watch",{"type":70,"value":3601}," on local-process, a portable ",{"type":64,"tag":79,"props":3603,"children":3605},{"className":3604},[],[3606],{"type":70,"value":3607},"find",{"type":70,"value":3609}," poll on Docker\u002Fexec-only\nproviders (no extra deps or image changes).",{"type":64,"tag":73,"props":3611,"children":3612},{},[3613,3615,3621,3623,3629],{"type":70,"value":3614},"Declare hooks on ",{"type":64,"tag":79,"props":3616,"children":3618},{"className":3617},[],[3619],{"type":70,"value":3620},"defineSandbox({ hooks })",{"type":70,"value":3622}," (sandbox-scoped) or on any chat\nmiddleware via the ",{"type":64,"tag":79,"props":3624,"children":3626},{"className":3625},[],[3627],{"type":70,"value":3628},"sandbox",{"type":70,"value":3630}," group (run-scoped):",{"type":64,"tag":119,"props":3632,"children":3634},{"className":121,"code":3633,"language":45,"meta":123,"style":123},"import {\n  defineSandbox,\n  defineChatMiddleware,\n  withSandbox,\n} from '@tanstack\u002Fai-sandbox'\nimport { dockerSandbox } from '@tanstack\u002Fai-sandbox-docker'\n\n\u002F\u002F Sandbox-scoped hooks (all optional):\nconst sandbox = defineSandbox({\n  id: 'repo-agent',\n  provider: dockerSandbox({ image: 'node:22' }),\n  hooks: {\n    onFile: (e) => console.log(e.type, e.path), \u002F\u002F catch-all\n    onFileCreate: (e) => console.log('created', e.path),\n    onFileChange: (e) => console.log('changed', e.path),\n    onFileDelete: (e) => console.log('deleted', e.path),\n    onReady: (handle) => console.log('ready', handle.id),\n    onError: (err) => console.error(err),\n    onDestroy: () => console.log('destroyed'),\n  },\n  fileEvents: true, \u002F\u002F default; set false to disable watching entirely\n})\n\n\u002F\u002F Run-scoped hooks via chat middleware (ctx is ChatMiddlewareContext):\nconst auditMiddleware = defineChatMiddleware({\n  name: 'audit',\n  sandbox: {\n    onFile: (ctx, e) => console.log(ctx.runId, e.type, e.path),\n    onFileCreate: (ctx, e) => db.log({ run: ctx.runId, event: e }),\n    onFileChange: (ctx, e) => metrics.increment('file.change'),\n    onFileDelete: (ctx, e) => console.warn('deleted', e.path),\n  },\n})\n\n\u002F\u002F No extra middleware needed — sandbox.file CUSTOM events are emitted\n\u002F\u002F automatically. Read them from the stream:\nfor await (const chunk of stream) {\n  if (chunk.type === 'CUSTOM' && chunk.name === 'sandbox.file') {\n    const value = chunk.value\n    if (\n      value !== null &&\n      typeof value === 'object' &&\n      'type' in value &&\n      'path' in value\n    ) {\n      console.log('file event', value) \u002F\u002F { type, path, timestamp }\n    }\n  }\n}\n",[3635],{"type":64,"tag":79,"props":3636,"children":3637},{"__ignoreMap":123},[3638,3649,3660,3672,3683,3706,3741,3748,3756,3783,3810,3865,3881,3966,4043,4120,4197,4277,4328,4386,4393,4420,4431,4438,4446,4475,4504,4520,4618,4726,4800,4884,4892,4904,4912,4921,4930,4971,5059,5091,5105,5129,5163,5193,5219,5232,5283,5292,5301],{"type":64,"tag":129,"props":3639,"children":3640},{"class":131,"line":132},[3641,3645],{"type":64,"tag":129,"props":3642,"children":3643},{"style":136},[3644],{"type":70,"value":139},{"type":64,"tag":129,"props":3646,"children":3647},{"style":142},[3648],{"type":70,"value":228},{"type":64,"tag":129,"props":3650,"children":3651},{"class":131,"line":180},[3652,3656],{"type":64,"tag":129,"props":3653,"children":3654},{"style":148},[3655],{"type":70,"value":237},{"type":64,"tag":129,"props":3657,"children":3658},{"style":142},[3659],{"type":70,"value":242},{"type":64,"tag":129,"props":3661,"children":3662},{"class":131,"line":218},[3663,3668],{"type":64,"tag":129,"props":3664,"children":3665},{"style":148},[3666],{"type":70,"value":3667},"  defineChatMiddleware",{"type":64,"tag":129,"props":3669,"children":3670},{"style":142},[3671],{"type":70,"value":242},{"type":64,"tag":129,"props":3673,"children":3674},{"class":131,"line":231},[3675,3679],{"type":64,"tag":129,"props":3676,"children":3677},{"style":148},[3678],{"type":70,"value":264},{"type":64,"tag":129,"props":3680,"children":3681},{"style":142},[3682],{"type":70,"value":242},{"type":64,"tag":129,"props":3684,"children":3685},{"class":131,"line":245},[3686,3690,3694,3698,3702],{"type":64,"tag":129,"props":3687,"children":3688},{"style":142},[3689],{"type":70,"value":277},{"type":64,"tag":129,"props":3691,"children":3692},{"style":136},[3693],{"type":70,"value":161},{"type":64,"tag":129,"props":3695,"children":3696},{"style":142},[3697],{"type":70,"value":166},{"type":64,"tag":129,"props":3699,"children":3700},{"style":169},[3701],{"type":70,"value":290},{"type":64,"tag":129,"props":3703,"children":3704},{"style":142},[3705],{"type":70,"value":177},{"type":64,"tag":129,"props":3707,"children":3708},{"class":131,"line":258},[3709,3713,3717,3721,3725,3729,3733,3737],{"type":64,"tag":129,"props":3710,"children":3711},{"style":136},[3712],{"type":70,"value":139},{"type":64,"tag":129,"props":3714,"children":3715},{"style":142},[3716],{"type":70,"value":145},{"type":64,"tag":129,"props":3718,"children":3719},{"style":148},[3720],{"type":70,"value":311},{"type":64,"tag":129,"props":3722,"children":3723},{"style":142},[3724],{"type":70,"value":156},{"type":64,"tag":129,"props":3726,"children":3727},{"style":136},[3728],{"type":70,"value":161},{"type":64,"tag":129,"props":3730,"children":3731},{"style":142},[3732],{"type":70,"value":166},{"type":64,"tag":129,"props":3734,"children":3735},{"style":169},[3736],{"type":70,"value":328},{"type":64,"tag":129,"props":3738,"children":3739},{"style":142},[3740],{"type":70,"value":177},{"type":64,"tag":129,"props":3742,"children":3743},{"class":131,"line":271},[3744],{"type":64,"tag":129,"props":3745,"children":3746},{"emptyLinePlaceholder":339},[3747],{"type":70,"value":342},{"type":64,"tag":129,"props":3749,"children":3750},{"class":131,"line":297},[3751],{"type":64,"tag":129,"props":3752,"children":3753},{"style":1262},[3754],{"type":70,"value":3755},"\u002F\u002F Sandbox-scoped hooks (all optional):\n",{"type":64,"tag":129,"props":3757,"children":3758},{"class":131,"line":335},[3759,3763,3767,3771,3775,3779],{"type":64,"tag":129,"props":3760,"children":3761},{"style":349},[3762],{"type":70,"value":352},{"type":64,"tag":129,"props":3764,"children":3765},{"style":148},[3766],{"type":70,"value":357},{"type":64,"tag":129,"props":3768,"children":3769},{"style":142},[3770],{"type":70,"value":362},{"type":64,"tag":129,"props":3772,"children":3773},{"style":365},[3774],{"type":70,"value":368},{"type":64,"tag":129,"props":3776,"children":3777},{"style":148},[3778],{"type":70,"value":373},{"type":64,"tag":129,"props":3780,"children":3781},{"style":142},[3782],{"type":70,"value":378},{"type":64,"tag":129,"props":3784,"children":3785},{"class":131,"line":345},[3786,3790,3794,3798,3802,3806],{"type":64,"tag":129,"props":3787,"children":3788},{"style":385},[3789],{"type":70,"value":388},{"type":64,"tag":129,"props":3791,"children":3792},{"style":142},[3793],{"type":70,"value":393},{"type":64,"tag":129,"props":3795,"children":3796},{"style":142},[3797],{"type":70,"value":166},{"type":64,"tag":129,"props":3799,"children":3800},{"style":169},[3801],{"type":70,"value":402},{"type":64,"tag":129,"props":3803,"children":3804},{"style":142},[3805],{"type":70,"value":407},{"type":64,"tag":129,"props":3807,"children":3808},{"style":142},[3809],{"type":70,"value":242},{"type":64,"tag":129,"props":3811,"children":3812},{"class":131,"line":381},[3813,3817,3821,3825,3829,3833,3837,3841,3845,3849,3853,3857,3861],{"type":64,"tag":129,"props":3814,"children":3815},{"style":385},[3816],{"type":70,"value":420},{"type":64,"tag":129,"props":3818,"children":3819},{"style":142},[3820],{"type":70,"value":393},{"type":64,"tag":129,"props":3822,"children":3823},{"style":365},[3824],{"type":70,"value":311},{"type":64,"tag":129,"props":3826,"children":3827},{"style":148},[3828],{"type":70,"value":373},{"type":64,"tag":129,"props":3830,"children":3831},{"style":142},[3832],{"type":70,"value":437},{"type":64,"tag":129,"props":3834,"children":3835},{"style":385},[3836],{"type":70,"value":442},{"type":64,"tag":129,"props":3838,"children":3839},{"style":142},[3840],{"type":70,"value":393},{"type":64,"tag":129,"props":3842,"children":3843},{"style":142},[3844],{"type":70,"value":166},{"type":64,"tag":129,"props":3846,"children":3847},{"style":169},[3848],{"type":70,"value":455},{"type":64,"tag":129,"props":3850,"children":3851},{"style":142},[3852],{"type":70,"value":407},{"type":64,"tag":129,"props":3854,"children":3855},{"style":142},[3856],{"type":70,"value":156},{"type":64,"tag":129,"props":3858,"children":3859},{"style":148},[3860],{"type":70,"value":468},{"type":64,"tag":129,"props":3862,"children":3863},{"style":142},[3864],{"type":70,"value":242},{"type":64,"tag":129,"props":3866,"children":3867},{"class":131,"line":414},[3868,3873,3877],{"type":64,"tag":129,"props":3869,"children":3870},{"style":385},[3871],{"type":70,"value":3872},"  hooks",{"type":64,"tag":129,"props":3874,"children":3875},{"style":142},[3876],{"type":70,"value":393},{"type":64,"tag":129,"props":3878,"children":3879},{"style":142},[3880],{"type":70,"value":228},{"type":64,"tag":129,"props":3882,"children":3883},{"class":131,"line":475},[3884,3889,3893,3898,3903,3907,3911,3916,3920,3925,3930,3934,3939,3943,3948,3952,3957,3961],{"type":64,"tag":129,"props":3885,"children":3886},{"style":365},[3887],{"type":70,"value":3888},"    onFile",{"type":64,"tag":129,"props":3890,"children":3891},{"style":142},[3892],{"type":70,"value":393},{"type":64,"tag":129,"props":3894,"children":3895},{"style":142},[3896],{"type":70,"value":3897}," (",{"type":64,"tag":129,"props":3899,"children":3900},{"style":2757},[3901],{"type":70,"value":3902},"e",{"type":64,"tag":129,"props":3904,"children":3905},{"style":142},[3906],{"type":70,"value":468},{"type":64,"tag":129,"props":3908,"children":3909},{"style":349},[3910],{"type":70,"value":2779},{"type":64,"tag":129,"props":3912,"children":3913},{"style":148},[3914],{"type":70,"value":3915}," console",{"type":64,"tag":129,"props":3917,"children":3918},{"style":142},[3919],{"type":70,"value":761},{"type":64,"tag":129,"props":3921,"children":3922},{"style":365},[3923],{"type":70,"value":3924},"log",{"type":64,"tag":129,"props":3926,"children":3927},{"style":148},[3928],{"type":70,"value":3929},"(e",{"type":64,"tag":129,"props":3931,"children":3932},{"style":142},[3933],{"type":70,"value":761},{"type":64,"tag":129,"props":3935,"children":3936},{"style":148},[3937],{"type":70,"value":3938},"type",{"type":64,"tag":129,"props":3940,"children":3941},{"style":142},[3942],{"type":70,"value":542},{"type":64,"tag":129,"props":3944,"children":3945},{"style":148},[3946],{"type":70,"value":3947}," e",{"type":64,"tag":129,"props":3949,"children":3950},{"style":142},[3951],{"type":70,"value":761},{"type":64,"tag":129,"props":3953,"children":3954},{"style":148},[3955],{"type":70,"value":3956},"path)",{"type":64,"tag":129,"props":3958,"children":3959},{"style":142},[3960],{"type":70,"value":542},{"type":64,"tag":129,"props":3962,"children":3963},{"style":1262},[3964],{"type":70,"value":3965}," \u002F\u002F catch-all\n",{"type":64,"tag":129,"props":3967,"children":3968},{"class":131,"line":501},[3969,3974,3978,3982,3986,3990,3994,3998,4002,4006,4010,4014,4019,4023,4027,4031,4035,4039],{"type":64,"tag":129,"props":3970,"children":3971},{"style":365},[3972],{"type":70,"value":3973},"    onFileCreate",{"type":64,"tag":129,"props":3975,"children":3976},{"style":142},[3977],{"type":70,"value":393},{"type":64,"tag":129,"props":3979,"children":3980},{"style":142},[3981],{"type":70,"value":3897},{"type":64,"tag":129,"props":3983,"children":3984},{"style":2757},[3985],{"type":70,"value":3902},{"type":64,"tag":129,"props":3987,"children":3988},{"style":142},[3989],{"type":70,"value":468},{"type":64,"tag":129,"props":3991,"children":3992},{"style":349},[3993],{"type":70,"value":2779},{"type":64,"tag":129,"props":3995,"children":3996},{"style":148},[3997],{"type":70,"value":3915},{"type":64,"tag":129,"props":3999,"children":4000},{"style":142},[4001],{"type":70,"value":761},{"type":64,"tag":129,"props":4003,"children":4004},{"style":365},[4005],{"type":70,"value":3924},{"type":64,"tag":129,"props":4007,"children":4008},{"style":148},[4009],{"type":70,"value":373},{"type":64,"tag":129,"props":4011,"children":4012},{"style":142},[4013],{"type":70,"value":407},{"type":64,"tag":129,"props":4015,"children":4016},{"style":169},[4017],{"type":70,"value":4018},"created",{"type":64,"tag":129,"props":4020,"children":4021},{"style":142},[4022],{"type":70,"value":407},{"type":64,"tag":129,"props":4024,"children":4025},{"style":142},[4026],{"type":70,"value":542},{"type":64,"tag":129,"props":4028,"children":4029},{"style":148},[4030],{"type":70,"value":3947},{"type":64,"tag":129,"props":4032,"children":4033},{"style":142},[4034],{"type":70,"value":761},{"type":64,"tag":129,"props":4036,"children":4037},{"style":148},[4038],{"type":70,"value":3956},{"type":64,"tag":129,"props":4040,"children":4041},{"style":142},[4042],{"type":70,"value":242},{"type":64,"tag":129,"props":4044,"children":4045},{"class":131,"line":598},[4046,4051,4055,4059,4063,4067,4071,4075,4079,4083,4087,4091,4096,4100,4104,4108,4112,4116],{"type":64,"tag":129,"props":4047,"children":4048},{"style":365},[4049],{"type":70,"value":4050},"    onFileChange",{"type":64,"tag":129,"props":4052,"children":4053},{"style":142},[4054],{"type":70,"value":393},{"type":64,"tag":129,"props":4056,"children":4057},{"style":142},[4058],{"type":70,"value":3897},{"type":64,"tag":129,"props":4060,"children":4061},{"style":2757},[4062],{"type":70,"value":3902},{"type":64,"tag":129,"props":4064,"children":4065},{"style":142},[4066],{"type":70,"value":468},{"type":64,"tag":129,"props":4068,"children":4069},{"style":349},[4070],{"type":70,"value":2779},{"type":64,"tag":129,"props":4072,"children":4073},{"style":148},[4074],{"type":70,"value":3915},{"type":64,"tag":129,"props":4076,"children":4077},{"style":142},[4078],{"type":70,"value":761},{"type":64,"tag":129,"props":4080,"children":4081},{"style":365},[4082],{"type":70,"value":3924},{"type":64,"tag":129,"props":4084,"children":4085},{"style":148},[4086],{"type":70,"value":373},{"type":64,"tag":129,"props":4088,"children":4089},{"style":142},[4090],{"type":70,"value":407},{"type":64,"tag":129,"props":4092,"children":4093},{"style":169},[4094],{"type":70,"value":4095},"changed",{"type":64,"tag":129,"props":4097,"children":4098},{"style":142},[4099],{"type":70,"value":407},{"type":64,"tag":129,"props":4101,"children":4102},{"style":142},[4103],{"type":70,"value":542},{"type":64,"tag":129,"props":4105,"children":4106},{"style":148},[4107],{"type":70,"value":3947},{"type":64,"tag":129,"props":4109,"children":4110},{"style":142},[4111],{"type":70,"value":761},{"type":64,"tag":129,"props":4113,"children":4114},{"style":148},[4115],{"type":70,"value":3956},{"type":64,"tag":129,"props":4117,"children":4118},{"style":142},[4119],{"type":70,"value":242},{"type":64,"tag":129,"props":4121,"children":4122},{"class":131,"line":628},[4123,4128,4132,4136,4140,4144,4148,4152,4156,4160,4164,4168,4173,4177,4181,4185,4189,4193],{"type":64,"tag":129,"props":4124,"children":4125},{"style":365},[4126],{"type":70,"value":4127},"    onFileDelete",{"type":64,"tag":129,"props":4129,"children":4130},{"style":142},[4131],{"type":70,"value":393},{"type":64,"tag":129,"props":4133,"children":4134},{"style":142},[4135],{"type":70,"value":3897},{"type":64,"tag":129,"props":4137,"children":4138},{"style":2757},[4139],{"type":70,"value":3902},{"type":64,"tag":129,"props":4141,"children":4142},{"style":142},[4143],{"type":70,"value":468},{"type":64,"tag":129,"props":4145,"children":4146},{"style":349},[4147],{"type":70,"value":2779},{"type":64,"tag":129,"props":4149,"children":4150},{"style":148},[4151],{"type":70,"value":3915},{"type":64,"tag":129,"props":4153,"children":4154},{"style":142},[4155],{"type":70,"value":761},{"type":64,"tag":129,"props":4157,"children":4158},{"style":365},[4159],{"type":70,"value":3924},{"type":64,"tag":129,"props":4161,"children":4162},{"style":148},[4163],{"type":70,"value":373},{"type":64,"tag":129,"props":4165,"children":4166},{"style":142},[4167],{"type":70,"value":407},{"type":64,"tag":129,"props":4169,"children":4170},{"style":169},[4171],{"type":70,"value":4172},"deleted",{"type":64,"tag":129,"props":4174,"children":4175},{"style":142},[4176],{"type":70,"value":407},{"type":64,"tag":129,"props":4178,"children":4179},{"style":142},[4180],{"type":70,"value":542},{"type":64,"tag":129,"props":4182,"children":4183},{"style":148},[4184],{"type":70,"value":3947},{"type":64,"tag":129,"props":4186,"children":4187},{"style":142},[4188],{"type":70,"value":761},{"type":64,"tag":129,"props":4190,"children":4191},{"style":148},[4192],{"type":70,"value":3956},{"type":64,"tag":129,"props":4194,"children":4195},{"style":142},[4196],{"type":70,"value":242},{"type":64,"tag":129,"props":4198,"children":4199},{"class":131,"line":685},[4200,4205,4209,4213,4218,4222,4226,4230,4234,4238,4242,4246,4251,4255,4259,4264,4268,4273],{"type":64,"tag":129,"props":4201,"children":4202},{"style":365},[4203],{"type":70,"value":4204},"    onReady",{"type":64,"tag":129,"props":4206,"children":4207},{"style":142},[4208],{"type":70,"value":393},{"type":64,"tag":129,"props":4210,"children":4211},{"style":142},[4212],{"type":70,"value":3897},{"type":64,"tag":129,"props":4214,"children":4215},{"style":2757},[4216],{"type":70,"value":4217},"handle",{"type":64,"tag":129,"props":4219,"children":4220},{"style":142},[4221],{"type":70,"value":468},{"type":64,"tag":129,"props":4223,"children":4224},{"style":349},[4225],{"type":70,"value":2779},{"type":64,"tag":129,"props":4227,"children":4228},{"style":148},[4229],{"type":70,"value":3915},{"type":64,"tag":129,"props":4231,"children":4232},{"style":142},[4233],{"type":70,"value":761},{"type":64,"tag":129,"props":4235,"children":4236},{"style":365},[4237],{"type":70,"value":3924},{"type":64,"tag":129,"props":4239,"children":4240},{"style":148},[4241],{"type":70,"value":373},{"type":64,"tag":129,"props":4243,"children":4244},{"style":142},[4245],{"type":70,"value":407},{"type":64,"tag":129,"props":4247,"children":4248},{"style":169},[4249],{"type":70,"value":4250},"ready",{"type":64,"tag":129,"props":4252,"children":4253},{"style":142},[4254],{"type":70,"value":407},{"type":64,"tag":129,"props":4256,"children":4257},{"style":142},[4258],{"type":70,"value":542},{"type":64,"tag":129,"props":4260,"children":4261},{"style":148},[4262],{"type":70,"value":4263}," handle",{"type":64,"tag":129,"props":4265,"children":4266},{"style":142},[4267],{"type":70,"value":761},{"type":64,"tag":129,"props":4269,"children":4270},{"style":148},[4271],{"type":70,"value":4272},"id)",{"type":64,"tag":129,"props":4274,"children":4275},{"style":142},[4276],{"type":70,"value":242},{"type":64,"tag":129,"props":4278,"children":4279},{"class":131,"line":728},[4280,4285,4289,4293,4298,4302,4306,4310,4314,4319,4324],{"type":64,"tag":129,"props":4281,"children":4282},{"style":365},[4283],{"type":70,"value":4284},"    onError",{"type":64,"tag":129,"props":4286,"children":4287},{"style":142},[4288],{"type":70,"value":393},{"type":64,"tag":129,"props":4290,"children":4291},{"style":142},[4292],{"type":70,"value":3897},{"type":64,"tag":129,"props":4294,"children":4295},{"style":2757},[4296],{"type":70,"value":4297},"err",{"type":64,"tag":129,"props":4299,"children":4300},{"style":142},[4301],{"type":70,"value":468},{"type":64,"tag":129,"props":4303,"children":4304},{"style":349},[4305],{"type":70,"value":2779},{"type":64,"tag":129,"props":4307,"children":4308},{"style":148},[4309],{"type":70,"value":3915},{"type":64,"tag":129,"props":4311,"children":4312},{"style":142},[4313],{"type":70,"value":761},{"type":64,"tag":129,"props":4315,"children":4316},{"style":365},[4317],{"type":70,"value":4318},"error",{"type":64,"tag":129,"props":4320,"children":4321},{"style":148},[4322],{"type":70,"value":4323},"(err)",{"type":64,"tag":129,"props":4325,"children":4326},{"style":142},[4327],{"type":70,"value":242},{"type":64,"tag":129,"props":4329,"children":4330},{"class":131,"line":792},[4331,4336,4340,4345,4349,4353,4357,4361,4365,4369,4374,4378,4382],{"type":64,"tag":129,"props":4332,"children":4333},{"style":365},[4334],{"type":70,"value":4335},"    onDestroy",{"type":64,"tag":129,"props":4337,"children":4338},{"style":142},[4339],{"type":70,"value":393},{"type":64,"tag":129,"props":4341,"children":4342},{"style":142},[4343],{"type":70,"value":4344}," ()",{"type":64,"tag":129,"props":4346,"children":4347},{"style":349},[4348],{"type":70,"value":2779},{"type":64,"tag":129,"props":4350,"children":4351},{"style":148},[4352],{"type":70,"value":3915},{"type":64,"tag":129,"props":4354,"children":4355},{"style":142},[4356],{"type":70,"value":761},{"type":64,"tag":129,"props":4358,"children":4359},{"style":365},[4360],{"type":70,"value":3924},{"type":64,"tag":129,"props":4362,"children":4363},{"style":148},[4364],{"type":70,"value":373},{"type":64,"tag":129,"props":4366,"children":4367},{"style":142},[4368],{"type":70,"value":407},{"type":64,"tag":129,"props":4370,"children":4371},{"style":169},[4372],{"type":70,"value":4373},"destroyed",{"type":64,"tag":129,"props":4375,"children":4376},{"style":142},[4377],{"type":70,"value":407},{"type":64,"tag":129,"props":4379,"children":4380},{"style":148},[4381],{"type":70,"value":468},{"type":64,"tag":129,"props":4383,"children":4384},{"style":142},[4385],{"type":70,"value":242},{"type":64,"tag":129,"props":4387,"children":4388},{"class":131,"line":809},[4389],{"type":64,"tag":129,"props":4390,"children":4391},{"style":142},[4392],{"type":70,"value":2927},{"type":64,"tag":129,"props":4394,"children":4395},{"class":131,"line":904},[4396,4401,4405,4411,4415],{"type":64,"tag":129,"props":4397,"children":4398},{"style":385},[4399],{"type":70,"value":4400},"  fileEvents",{"type":64,"tag":129,"props":4402,"children":4403},{"style":142},[4404],{"type":70,"value":393},{"type":64,"tag":129,"props":4406,"children":4408},{"style":4407},"--shiki-light:#FF5370;--shiki-default:#FF9CAC;--shiki-dark:#FF9CAC",[4409],{"type":70,"value":4410}," true",{"type":64,"tag":129,"props":4412,"children":4413},{"style":142},[4414],{"type":70,"value":542},{"type":64,"tag":129,"props":4416,"children":4417},{"style":1262},[4418],{"type":70,"value":4419}," \u002F\u002F default; set false to disable watching entirely\n",{"type":64,"tag":129,"props":4421,"children":4422},{"class":131,"line":917},[4423,4427],{"type":64,"tag":129,"props":4424,"children":4425},{"style":142},[4426],{"type":70,"value":277},{"type":64,"tag":129,"props":4428,"children":4429},{"style":148},[4430],{"type":70,"value":914},{"type":64,"tag":129,"props":4432,"children":4433},{"class":131,"line":925},[4434],{"type":64,"tag":129,"props":4435,"children":4436},{"emptyLinePlaceholder":339},[4437],{"type":70,"value":342},{"type":64,"tag":129,"props":4439,"children":4440},{"class":131,"line":954},[4441],{"type":64,"tag":129,"props":4442,"children":4443},{"style":1262},[4444],{"type":70,"value":4445},"\u002F\u002F Run-scoped hooks via chat middleware (ctx is ChatMiddlewareContext):\n",{"type":64,"tag":129,"props":4447,"children":4448},{"class":131,"line":967},[4449,4453,4458,4462,4467,4471],{"type":64,"tag":129,"props":4450,"children":4451},{"style":349},[4452],{"type":70,"value":352},{"type":64,"tag":129,"props":4454,"children":4455},{"style":148},[4456],{"type":70,"value":4457}," auditMiddleware ",{"type":64,"tag":129,"props":4459,"children":4460},{"style":142},[4461],{"type":70,"value":362},{"type":64,"tag":129,"props":4463,"children":4464},{"style":365},[4465],{"type":70,"value":4466}," defineChatMiddleware",{"type":64,"tag":129,"props":4468,"children":4469},{"style":148},[4470],{"type":70,"value":373},{"type":64,"tag":129,"props":4472,"children":4473},{"style":142},[4474],{"type":70,"value":378},{"type":64,"tag":129,"props":4476,"children":4477},{"class":131,"line":1009},[4478,4483,4487,4491,4496,4500],{"type":64,"tag":129,"props":4479,"children":4480},{"style":385},[4481],{"type":70,"value":4482},"  name",{"type":64,"tag":129,"props":4484,"children":4485},{"style":142},[4486],{"type":70,"value":393},{"type":64,"tag":129,"props":4488,"children":4489},{"style":142},[4490],{"type":70,"value":166},{"type":64,"tag":129,"props":4492,"children":4493},{"style":169},[4494],{"type":70,"value":4495},"audit",{"type":64,"tag":129,"props":4497,"children":4498},{"style":142},[4499],{"type":70,"value":407},{"type":64,"tag":129,"props":4501,"children":4502},{"style":142},[4503],{"type":70,"value":242},{"type":64,"tag":129,"props":4505,"children":4506},{"class":131,"line":1022},[4507,4512,4516],{"type":64,"tag":129,"props":4508,"children":4509},{"style":385},[4510],{"type":70,"value":4511},"  sandbox",{"type":64,"tag":129,"props":4513,"children":4514},{"style":142},[4515],{"type":70,"value":393},{"type":64,"tag":129,"props":4517,"children":4518},{"style":142},[4519],{"type":70,"value":228},{"type":64,"tag":129,"props":4521,"children":4522},{"class":131,"line":1053},[4523,4527,4531,4535,4540,4544,4548,4552,4556,4560,4564,4568,4573,4577,4582,4586,4590,4594,4598,4602,4606,4610,4614],{"type":64,"tag":129,"props":4524,"children":4525},{"style":365},[4526],{"type":70,"value":3888},{"type":64,"tag":129,"props":4528,"children":4529},{"style":142},[4530],{"type":70,"value":393},{"type":64,"tag":129,"props":4532,"children":4533},{"style":142},[4534],{"type":70,"value":3897},{"type":64,"tag":129,"props":4536,"children":4537},{"style":2757},[4538],{"type":70,"value":4539},"ctx",{"type":64,"tag":129,"props":4541,"children":4542},{"style":142},[4543],{"type":70,"value":542},{"type":64,"tag":129,"props":4545,"children":4546},{"style":2757},[4547],{"type":70,"value":3947},{"type":64,"tag":129,"props":4549,"children":4550},{"style":142},[4551],{"type":70,"value":468},{"type":64,"tag":129,"props":4553,"children":4554},{"style":349},[4555],{"type":70,"value":2779},{"type":64,"tag":129,"props":4557,"children":4558},{"style":148},[4559],{"type":70,"value":3915},{"type":64,"tag":129,"props":4561,"children":4562},{"style":142},[4563],{"type":70,"value":761},{"type":64,"tag":129,"props":4565,"children":4566},{"style":365},[4567],{"type":70,"value":3924},{"type":64,"tag":129,"props":4569,"children":4570},{"style":148},[4571],{"type":70,"value":4572},"(ctx",{"type":64,"tag":129,"props":4574,"children":4575},{"style":142},[4576],{"type":70,"value":761},{"type":64,"tag":129,"props":4578,"children":4579},{"style":148},[4580],{"type":70,"value":4581},"runId",{"type":64,"tag":129,"props":4583,"children":4584},{"style":142},[4585],{"type":70,"value":542},{"type":64,"tag":129,"props":4587,"children":4588},{"style":148},[4589],{"type":70,"value":3947},{"type":64,"tag":129,"props":4591,"children":4592},{"style":142},[4593],{"type":70,"value":761},{"type":64,"tag":129,"props":4595,"children":4596},{"style":148},[4597],{"type":70,"value":3938},{"type":64,"tag":129,"props":4599,"children":4600},{"style":142},[4601],{"type":70,"value":542},{"type":64,"tag":129,"props":4603,"children":4604},{"style":148},[4605],{"type":70,"value":3947},{"type":64,"tag":129,"props":4607,"children":4608},{"style":142},[4609],{"type":70,"value":761},{"type":64,"tag":129,"props":4611,"children":4612},{"style":148},[4613],{"type":70,"value":3956},{"type":64,"tag":129,"props":4615,"children":4616},{"style":142},[4617],{"type":70,"value":242},{"type":64,"tag":129,"props":4619,"children":4620},{"class":131,"line":2053},[4621,4625,4629,4633,4637,4641,4645,4649,4653,4658,4662,4666,4670,4674,4679,4683,4688,4692,4696,4700,4705,4709,4714,4718,4722],{"type":64,"tag":129,"props":4622,"children":4623},{"style":365},[4624],{"type":70,"value":3973},{"type":64,"tag":129,"props":4626,"children":4627},{"style":142},[4628],{"type":70,"value":393},{"type":64,"tag":129,"props":4630,"children":4631},{"style":142},[4632],{"type":70,"value":3897},{"type":64,"tag":129,"props":4634,"children":4635},{"style":2757},[4636],{"type":70,"value":4539},{"type":64,"tag":129,"props":4638,"children":4639},{"style":142},[4640],{"type":70,"value":542},{"type":64,"tag":129,"props":4642,"children":4643},{"style":2757},[4644],{"type":70,"value":3947},{"type":64,"tag":129,"props":4646,"children":4647},{"style":142},[4648],{"type":70,"value":468},{"type":64,"tag":129,"props":4650,"children":4651},{"style":349},[4652],{"type":70,"value":2779},{"type":64,"tag":129,"props":4654,"children":4655},{"style":148},[4656],{"type":70,"value":4657}," db",{"type":64,"tag":129,"props":4659,"children":4660},{"style":142},[4661],{"type":70,"value":761},{"type":64,"tag":129,"props":4663,"children":4664},{"style":365},[4665],{"type":70,"value":3924},{"type":64,"tag":129,"props":4667,"children":4668},{"style":148},[4669],{"type":70,"value":373},{"type":64,"tag":129,"props":4671,"children":4672},{"style":142},[4673],{"type":70,"value":437},{"type":64,"tag":129,"props":4675,"children":4676},{"style":385},[4677],{"type":70,"value":4678}," run",{"type":64,"tag":129,"props":4680,"children":4681},{"style":142},[4682],{"type":70,"value":393},{"type":64,"tag":129,"props":4684,"children":4685},{"style":148},[4686],{"type":70,"value":4687}," ctx",{"type":64,"tag":129,"props":4689,"children":4690},{"style":142},[4691],{"type":70,"value":761},{"type":64,"tag":129,"props":4693,"children":4694},{"style":148},[4695],{"type":70,"value":4581},{"type":64,"tag":129,"props":4697,"children":4698},{"style":142},[4699],{"type":70,"value":542},{"type":64,"tag":129,"props":4701,"children":4702},{"style":385},[4703],{"type":70,"value":4704}," event",{"type":64,"tag":129,"props":4706,"children":4707},{"style":142},[4708],{"type":70,"value":393},{"type":64,"tag":129,"props":4710,"children":4711},{"style":148},[4712],{"type":70,"value":4713}," e ",{"type":64,"tag":129,"props":4715,"children":4716},{"style":142},[4717],{"type":70,"value":277},{"type":64,"tag":129,"props":4719,"children":4720},{"style":148},[4721],{"type":70,"value":468},{"type":64,"tag":129,"props":4723,"children":4724},{"style":142},[4725],{"type":70,"value":242},{"type":64,"tag":129,"props":4727,"children":4728},{"class":131,"line":2096},[4729,4733,4737,4741,4745,4749,4753,4757,4761,4766,4770,4775,4779,4783,4788,4792,4796],{"type":64,"tag":129,"props":4730,"children":4731},{"style":365},[4732],{"type":70,"value":4050},{"type":64,"tag":129,"props":4734,"children":4735},{"style":142},[4736],{"type":70,"value":393},{"type":64,"tag":129,"props":4738,"children":4739},{"style":142},[4740],{"type":70,"value":3897},{"type":64,"tag":129,"props":4742,"children":4743},{"style":2757},[4744],{"type":70,"value":4539},{"type":64,"tag":129,"props":4746,"children":4747},{"style":142},[4748],{"type":70,"value":542},{"type":64,"tag":129,"props":4750,"children":4751},{"style":2757},[4752],{"type":70,"value":3947},{"type":64,"tag":129,"props":4754,"children":4755},{"style":142},[4756],{"type":70,"value":468},{"type":64,"tag":129,"props":4758,"children":4759},{"style":349},[4760],{"type":70,"value":2779},{"type":64,"tag":129,"props":4762,"children":4763},{"style":148},[4764],{"type":70,"value":4765}," metrics",{"type":64,"tag":129,"props":4767,"children":4768},{"style":142},[4769],{"type":70,"value":761},{"type":64,"tag":129,"props":4771,"children":4772},{"style":365},[4773],{"type":70,"value":4774},"increment",{"type":64,"tag":129,"props":4776,"children":4777},{"style":148},[4778],{"type":70,"value":373},{"type":64,"tag":129,"props":4780,"children":4781},{"style":142},[4782],{"type":70,"value":407},{"type":64,"tag":129,"props":4784,"children":4785},{"style":169},[4786],{"type":70,"value":4787},"file.change",{"type":64,"tag":129,"props":4789,"children":4790},{"style":142},[4791],{"type":70,"value":407},{"type":64,"tag":129,"props":4793,"children":4794},{"style":148},[4795],{"type":70,"value":468},{"type":64,"tag":129,"props":4797,"children":4798},{"style":142},[4799],{"type":70,"value":242},{"type":64,"tag":129,"props":4801,"children":4802},{"class":131,"line":2126},[4803,4807,4811,4815,4819,4823,4827,4831,4835,4839,4843,4848,4852,4856,4860,4864,4868,4872,4876,4880],{"type":64,"tag":129,"props":4804,"children":4805},{"style":365},[4806],{"type":70,"value":4127},{"type":64,"tag":129,"props":4808,"children":4809},{"style":142},[4810],{"type":70,"value":393},{"type":64,"tag":129,"props":4812,"children":4813},{"style":142},[4814],{"type":70,"value":3897},{"type":64,"tag":129,"props":4816,"children":4817},{"style":2757},[4818],{"type":70,"value":4539},{"type":64,"tag":129,"props":4820,"children":4821},{"style":142},[4822],{"type":70,"value":542},{"type":64,"tag":129,"props":4824,"children":4825},{"style":2757},[4826],{"type":70,"value":3947},{"type":64,"tag":129,"props":4828,"children":4829},{"style":142},[4830],{"type":70,"value":468},{"type":64,"tag":129,"props":4832,"children":4833},{"style":349},[4834],{"type":70,"value":2779},{"type":64,"tag":129,"props":4836,"children":4837},{"style":148},[4838],{"type":70,"value":3915},{"type":64,"tag":129,"props":4840,"children":4841},{"style":142},[4842],{"type":70,"value":761},{"type":64,"tag":129,"props":4844,"children":4845},{"style":365},[4846],{"type":70,"value":4847},"warn",{"type":64,"tag":129,"props":4849,"children":4850},{"style":148},[4851],{"type":70,"value":373},{"type":64,"tag":129,"props":4853,"children":4854},{"style":142},[4855],{"type":70,"value":407},{"type":64,"tag":129,"props":4857,"children":4858},{"style":169},[4859],{"type":70,"value":4172},{"type":64,"tag":129,"props":4861,"children":4862},{"style":142},[4863],{"type":70,"value":407},{"type":64,"tag":129,"props":4865,"children":4866},{"style":142},[4867],{"type":70,"value":542},{"type":64,"tag":129,"props":4869,"children":4870},{"style":148},[4871],{"type":70,"value":3947},{"type":64,"tag":129,"props":4873,"children":4874},{"style":142},[4875],{"type":70,"value":761},{"type":64,"tag":129,"props":4877,"children":4878},{"style":148},[4879],{"type":70,"value":3956},{"type":64,"tag":129,"props":4881,"children":4882},{"style":142},[4883],{"type":70,"value":242},{"type":64,"tag":129,"props":4885,"children":4887},{"class":131,"line":4886},32,[4888],{"type":64,"tag":129,"props":4889,"children":4890},{"style":142},[4891],{"type":70,"value":2927},{"type":64,"tag":129,"props":4893,"children":4895},{"class":131,"line":4894},33,[4896,4900],{"type":64,"tag":129,"props":4897,"children":4898},{"style":142},[4899],{"type":70,"value":277},{"type":64,"tag":129,"props":4901,"children":4902},{"style":148},[4903],{"type":70,"value":914},{"type":64,"tag":129,"props":4905,"children":4907},{"class":131,"line":4906},34,[4908],{"type":64,"tag":129,"props":4909,"children":4910},{"emptyLinePlaceholder":339},[4911],{"type":70,"value":342},{"type":64,"tag":129,"props":4913,"children":4915},{"class":131,"line":4914},35,[4916],{"type":64,"tag":129,"props":4917,"children":4918},{"style":1262},[4919],{"type":70,"value":4920},"\u002F\u002F No extra middleware needed — sandbox.file CUSTOM events are emitted\n",{"type":64,"tag":129,"props":4922,"children":4924},{"class":131,"line":4923},36,[4925],{"type":64,"tag":129,"props":4926,"children":4927},{"style":1262},[4928],{"type":70,"value":4929},"\u002F\u002F automatically. Read them from the stream:\n",{"type":64,"tag":129,"props":4931,"children":4933},{"class":131,"line":4932},37,[4934,4939,4944,4948,4952,4957,4962,4967],{"type":64,"tag":129,"props":4935,"children":4936},{"style":136},[4937],{"type":70,"value":4938},"for",{"type":64,"tag":129,"props":4940,"children":4941},{"style":136},[4942],{"type":70,"value":4943}," await",{"type":64,"tag":129,"props":4945,"children":4946},{"style":148},[4947],{"type":70,"value":3897},{"type":64,"tag":129,"props":4949,"children":4950},{"style":349},[4951],{"type":70,"value":352},{"type":64,"tag":129,"props":4953,"children":4954},{"style":148},[4955],{"type":70,"value":4956}," chunk ",{"type":64,"tag":129,"props":4958,"children":4959},{"style":142},[4960],{"type":70,"value":4961},"of",{"type":64,"tag":129,"props":4963,"children":4964},{"style":148},[4965],{"type":70,"value":4966}," stream) ",{"type":64,"tag":129,"props":4968,"children":4969},{"style":142},[4970],{"type":70,"value":378},{"type":64,"tag":129,"props":4972,"children":4974},{"class":131,"line":4973},38,[4975,4980,4984,4989,4993,4997,5002,5006,5011,5015,5020,5025,5029,5034,5038,5042,5047,5051,5055],{"type":64,"tag":129,"props":4976,"children":4977},{"style":136},[4978],{"type":70,"value":4979},"  if",{"type":64,"tag":129,"props":4981,"children":4982},{"style":385},[4983],{"type":70,"value":3897},{"type":64,"tag":129,"props":4985,"children":4986},{"style":148},[4987],{"type":70,"value":4988},"chunk",{"type":64,"tag":129,"props":4990,"children":4991},{"style":142},[4992],{"type":70,"value":761},{"type":64,"tag":129,"props":4994,"children":4995},{"style":148},[4996],{"type":70,"value":3938},{"type":64,"tag":129,"props":4998,"children":4999},{"style":142},[5000],{"type":70,"value":5001}," ===",{"type":64,"tag":129,"props":5003,"children":5004},{"style":142},[5005],{"type":70,"value":166},{"type":64,"tag":129,"props":5007,"children":5008},{"style":169},[5009],{"type":70,"value":5010},"CUSTOM",{"type":64,"tag":129,"props":5012,"children":5013},{"style":142},[5014],{"type":70,"value":407},{"type":64,"tag":129,"props":5016,"children":5017},{"style":142},[5018],{"type":70,"value":5019}," &&",{"type":64,"tag":129,"props":5021,"children":5022},{"style":148},[5023],{"type":70,"value":5024}," chunk",{"type":64,"tag":129,"props":5026,"children":5027},{"style":142},[5028],{"type":70,"value":761},{"type":64,"tag":129,"props":5030,"children":5031},{"style":148},[5032],{"type":70,"value":5033},"name",{"type":64,"tag":129,"props":5035,"children":5036},{"style":142},[5037],{"type":70,"value":5001},{"type":64,"tag":129,"props":5039,"children":5040},{"style":142},[5041],{"type":70,"value":166},{"type":64,"tag":129,"props":5043,"children":5044},{"style":169},[5045],{"type":70,"value":5046},"sandbox.file",{"type":64,"tag":129,"props":5048,"children":5049},{"style":142},[5050],{"type":70,"value":407},{"type":64,"tag":129,"props":5052,"children":5053},{"style":385},[5054],{"type":70,"value":2412},{"type":64,"tag":129,"props":5056,"children":5057},{"style":142},[5058],{"type":70,"value":378},{"type":64,"tag":129,"props":5060,"children":5062},{"class":131,"line":5061},39,[5063,5068,5073,5078,5082,5086],{"type":64,"tag":129,"props":5064,"children":5065},{"style":349},[5066],{"type":70,"value":5067},"    const",{"type":64,"tag":129,"props":5069,"children":5070},{"style":148},[5071],{"type":70,"value":5072}," value",{"type":64,"tag":129,"props":5074,"children":5075},{"style":142},[5076],{"type":70,"value":5077}," =",{"type":64,"tag":129,"props":5079,"children":5080},{"style":148},[5081],{"type":70,"value":5024},{"type":64,"tag":129,"props":5083,"children":5084},{"style":142},[5085],{"type":70,"value":761},{"type":64,"tag":129,"props":5087,"children":5088},{"style":148},[5089],{"type":70,"value":5090},"value\n",{"type":64,"tag":129,"props":5092,"children":5094},{"class":131,"line":5093},40,[5095,5100],{"type":64,"tag":129,"props":5096,"children":5097},{"style":136},[5098],{"type":70,"value":5099},"    if",{"type":64,"tag":129,"props":5101,"children":5102},{"style":385},[5103],{"type":70,"value":5104}," (\n",{"type":64,"tag":129,"props":5106,"children":5108},{"class":131,"line":5107},41,[5109,5114,5119,5124],{"type":64,"tag":129,"props":5110,"children":5111},{"style":148},[5112],{"type":70,"value":5113},"      value",{"type":64,"tag":129,"props":5115,"children":5116},{"style":142},[5117],{"type":70,"value":5118}," !==",{"type":64,"tag":129,"props":5120,"children":5121},{"style":142},[5122],{"type":70,"value":5123}," null",{"type":64,"tag":129,"props":5125,"children":5126},{"style":142},[5127],{"type":70,"value":5128}," &&\n",{"type":64,"tag":129,"props":5130,"children":5132},{"class":131,"line":5131},42,[5133,5138,5142,5146,5150,5155,5159],{"type":64,"tag":129,"props":5134,"children":5135},{"style":142},[5136],{"type":70,"value":5137},"      typeof",{"type":64,"tag":129,"props":5139,"children":5140},{"style":148},[5141],{"type":70,"value":5072},{"type":64,"tag":129,"props":5143,"children":5144},{"style":142},[5145],{"type":70,"value":5001},{"type":64,"tag":129,"props":5147,"children":5148},{"style":142},[5149],{"type":70,"value":166},{"type":64,"tag":129,"props":5151,"children":5152},{"style":169},[5153],{"type":70,"value":5154},"object",{"type":64,"tag":129,"props":5156,"children":5157},{"style":142},[5158],{"type":70,"value":407},{"type":64,"tag":129,"props":5160,"children":5161},{"style":142},[5162],{"type":70,"value":5128},{"type":64,"tag":129,"props":5164,"children":5166},{"class":131,"line":5165},43,[5167,5172,5176,5180,5185,5189],{"type":64,"tag":129,"props":5168,"children":5169},{"style":142},[5170],{"type":70,"value":5171},"      '",{"type":64,"tag":129,"props":5173,"children":5174},{"style":169},[5175],{"type":70,"value":3938},{"type":64,"tag":129,"props":5177,"children":5178},{"style":142},[5179],{"type":70,"value":407},{"type":64,"tag":129,"props":5181,"children":5182},{"style":142},[5183],{"type":70,"value":5184}," in",{"type":64,"tag":129,"props":5186,"children":5187},{"style":148},[5188],{"type":70,"value":5072},{"type":64,"tag":129,"props":5190,"children":5191},{"style":142},[5192],{"type":70,"value":5128},{"type":64,"tag":129,"props":5194,"children":5196},{"class":131,"line":5195},44,[5197,5201,5206,5210,5214],{"type":64,"tag":129,"props":5198,"children":5199},{"style":142},[5200],{"type":70,"value":5171},{"type":64,"tag":129,"props":5202,"children":5203},{"style":169},[5204],{"type":70,"value":5205},"path",{"type":64,"tag":129,"props":5207,"children":5208},{"style":142},[5209],{"type":70,"value":407},{"type":64,"tag":129,"props":5211,"children":5212},{"style":142},[5213],{"type":70,"value":5184},{"type":64,"tag":129,"props":5215,"children":5216},{"style":148},[5217],{"type":70,"value":5218}," value\n",{"type":64,"tag":129,"props":5220,"children":5222},{"class":131,"line":5221},45,[5223,5228],{"type":64,"tag":129,"props":5224,"children":5225},{"style":385},[5226],{"type":70,"value":5227},"    ) ",{"type":64,"tag":129,"props":5229,"children":5230},{"style":142},[5231],{"type":70,"value":378},{"type":64,"tag":129,"props":5233,"children":5235},{"class":131,"line":5234},46,[5236,5241,5245,5249,5253,5257,5262,5266,5270,5274,5278],{"type":64,"tag":129,"props":5237,"children":5238},{"style":148},[5239],{"type":70,"value":5240},"      console",{"type":64,"tag":129,"props":5242,"children":5243},{"style":142},[5244],{"type":70,"value":761},{"type":64,"tag":129,"props":5246,"children":5247},{"style":365},[5248],{"type":70,"value":3924},{"type":64,"tag":129,"props":5250,"children":5251},{"style":385},[5252],{"type":70,"value":373},{"type":64,"tag":129,"props":5254,"children":5255},{"style":142},[5256],{"type":70,"value":407},{"type":64,"tag":129,"props":5258,"children":5259},{"style":169},[5260],{"type":70,"value":5261},"file event",{"type":64,"tag":129,"props":5263,"children":5264},{"style":142},[5265],{"type":70,"value":407},{"type":64,"tag":129,"props":5267,"children":5268},{"style":142},[5269],{"type":70,"value":542},{"type":64,"tag":129,"props":5271,"children":5272},{"style":148},[5273],{"type":70,"value":5072},{"type":64,"tag":129,"props":5275,"children":5276},{"style":385},[5277],{"type":70,"value":2412},{"type":64,"tag":129,"props":5279,"children":5280},{"style":1262},[5281],{"type":70,"value":5282},"\u002F\u002F { type, path, timestamp }\n",{"type":64,"tag":129,"props":5284,"children":5286},{"class":131,"line":5285},47,[5287],{"type":64,"tag":129,"props":5288,"children":5289},{"style":142},[5290],{"type":70,"value":5291},"    }\n",{"type":64,"tag":129,"props":5293,"children":5295},{"class":131,"line":5294},48,[5296],{"type":64,"tag":129,"props":5297,"children":5298},{"style":142},[5299],{"type":70,"value":5300},"  }\n",{"type":64,"tag":129,"props":5302,"children":5304},{"class":131,"line":5303},49,[5305],{"type":64,"tag":129,"props":5306,"children":5307},{"style":142},[5308],{"type":70,"value":3061},{"type":64,"tag":73,"props":5310,"children":5311},{},[5312,5318,5320,5325],{"type":64,"tag":79,"props":5313,"children":5315},{"className":5314},[],[5316],{"type":70,"value":5317},"watchWorkspace()",{"type":70,"value":5319}," is available as a low-level building block for watching\noutside a ",{"type":64,"tag":79,"props":5321,"children":5323},{"className":5322},[],[5324],{"type":70,"value":92},{"type":70,"value":5326}," run:",{"type":64,"tag":119,"props":5328,"children":5330},{"className":121,"code":5329,"language":45,"meta":123,"style":123},"import { watchWorkspace } from '@tanstack\u002Fai-sandbox'\n\nconst watcher = await watchWorkspace(handle, {\n  onEvent: (e) => console.log(e.type, e.path),\n  ignore: ['.git', 'node_modules'], \u002F\u002F default\n})\nawait watcher.stop()\n",[5331],{"type":64,"tag":79,"props":5332,"children":5333},{"__ignoreMap":123},[5334,5370,5377,5414,5486,5545,5556],{"type":64,"tag":129,"props":5335,"children":5336},{"class":131,"line":132},[5337,5341,5345,5350,5354,5358,5362,5366],{"type":64,"tag":129,"props":5338,"children":5339},{"style":136},[5340],{"type":70,"value":139},{"type":64,"tag":129,"props":5342,"children":5343},{"style":142},[5344],{"type":70,"value":145},{"type":64,"tag":129,"props":5346,"children":5347},{"style":148},[5348],{"type":70,"value":5349}," watchWorkspace",{"type":64,"tag":129,"props":5351,"children":5352},{"style":142},[5353],{"type":70,"value":156},{"type":64,"tag":129,"props":5355,"children":5356},{"style":136},[5357],{"type":70,"value":161},{"type":64,"tag":129,"props":5359,"children":5360},{"style":142},[5361],{"type":70,"value":166},{"type":64,"tag":129,"props":5363,"children":5364},{"style":169},[5365],{"type":70,"value":290},{"type":64,"tag":129,"props":5367,"children":5368},{"style":142},[5369],{"type":70,"value":177},{"type":64,"tag":129,"props":5371,"children":5372},{"class":131,"line":180},[5373],{"type":64,"tag":129,"props":5374,"children":5375},{"emptyLinePlaceholder":339},[5376],{"type":70,"value":342},{"type":64,"tag":129,"props":5378,"children":5379},{"class":131,"line":218},[5380,5384,5389,5393,5397,5401,5406,5410],{"type":64,"tag":129,"props":5381,"children":5382},{"style":349},[5383],{"type":70,"value":352},{"type":64,"tag":129,"props":5385,"children":5386},{"style":148},[5387],{"type":70,"value":5388}," watcher ",{"type":64,"tag":129,"props":5390,"children":5391},{"style":142},[5392],{"type":70,"value":362},{"type":64,"tag":129,"props":5394,"children":5395},{"style":136},[5396],{"type":70,"value":4943},{"type":64,"tag":129,"props":5398,"children":5399},{"style":365},[5400],{"type":70,"value":5349},{"type":64,"tag":129,"props":5402,"children":5403},{"style":148},[5404],{"type":70,"value":5405},"(handle",{"type":64,"tag":129,"props":5407,"children":5408},{"style":142},[5409],{"type":70,"value":542},{"type":64,"tag":129,"props":5411,"children":5412},{"style":142},[5413],{"type":70,"value":228},{"type":64,"tag":129,"props":5415,"children":5416},{"class":131,"line":231},[5417,5422,5426,5430,5434,5438,5442,5446,5450,5454,5458,5462,5466,5470,5474,5478,5482],{"type":64,"tag":129,"props":5418,"children":5419},{"style":365},[5420],{"type":70,"value":5421},"  onEvent",{"type":64,"tag":129,"props":5423,"children":5424},{"style":142},[5425],{"type":70,"value":393},{"type":64,"tag":129,"props":5427,"children":5428},{"style":142},[5429],{"type":70,"value":3897},{"type":64,"tag":129,"props":5431,"children":5432},{"style":2757},[5433],{"type":70,"value":3902},{"type":64,"tag":129,"props":5435,"children":5436},{"style":142},[5437],{"type":70,"value":468},{"type":64,"tag":129,"props":5439,"children":5440},{"style":349},[5441],{"type":70,"value":2779},{"type":64,"tag":129,"props":5443,"children":5444},{"style":148},[5445],{"type":70,"value":3915},{"type":64,"tag":129,"props":5447,"children":5448},{"style":142},[5449],{"type":70,"value":761},{"type":64,"tag":129,"props":5451,"children":5452},{"style":365},[5453],{"type":70,"value":3924},{"type":64,"tag":129,"props":5455,"children":5456},{"style":148},[5457],{"type":70,"value":3929},{"type":64,"tag":129,"props":5459,"children":5460},{"style":142},[5461],{"type":70,"value":761},{"type":64,"tag":129,"props":5463,"children":5464},{"style":148},[5465],{"type":70,"value":3938},{"type":64,"tag":129,"props":5467,"children":5468},{"style":142},[5469],{"type":70,"value":542},{"type":64,"tag":129,"props":5471,"children":5472},{"style":148},[5473],{"type":70,"value":3947},{"type":64,"tag":129,"props":5475,"children":5476},{"style":142},[5477],{"type":70,"value":761},{"type":64,"tag":129,"props":5479,"children":5480},{"style":148},[5481],{"type":70,"value":3956},{"type":64,"tag":129,"props":5483,"children":5484},{"style":142},[5485],{"type":70,"value":242},{"type":64,"tag":129,"props":5487,"children":5488},{"class":131,"line":245},[5489,5494,5498,5502,5506,5511,5515,5519,5523,5528,5532,5536,5540],{"type":64,"tag":129,"props":5490,"children":5491},{"style":385},[5492],{"type":70,"value":5493},"  ignore",{"type":64,"tag":129,"props":5495,"children":5496},{"style":142},[5497],{"type":70,"value":393},{"type":64,"tag":129,"props":5499,"children":5500},{"style":148},[5501],{"type":70,"value":643},{"type":64,"tag":129,"props":5503,"children":5504},{"style":142},[5505],{"type":70,"value":407},{"type":64,"tag":129,"props":5507,"children":5508},{"style":169},[5509],{"type":70,"value":5510},".git",{"type":64,"tag":129,"props":5512,"children":5513},{"style":142},[5514],{"type":70,"value":407},{"type":64,"tag":129,"props":5516,"children":5517},{"style":142},[5518],{"type":70,"value":542},{"type":64,"tag":129,"props":5520,"children":5521},{"style":142},[5522],{"type":70,"value":166},{"type":64,"tag":129,"props":5524,"children":5525},{"style":169},[5526],{"type":70,"value":5527},"node_modules",{"type":64,"tag":129,"props":5529,"children":5530},{"style":142},[5531],{"type":70,"value":407},{"type":64,"tag":129,"props":5533,"children":5534},{"style":148},[5535],{"type":70,"value":678},{"type":64,"tag":129,"props":5537,"children":5538},{"style":142},[5539],{"type":70,"value":542},{"type":64,"tag":129,"props":5541,"children":5542},{"style":1262},[5543],{"type":70,"value":5544}," \u002F\u002F default\n",{"type":64,"tag":129,"props":5546,"children":5547},{"class":131,"line":258},[5548,5552],{"type":64,"tag":129,"props":5549,"children":5550},{"style":142},[5551],{"type":70,"value":277},{"type":64,"tag":129,"props":5553,"children":5554},{"style":148},[5555],{"type":70,"value":914},{"type":64,"tag":129,"props":5557,"children":5558},{"class":131,"line":271},[5559,5564,5569,5573,5578],{"type":64,"tag":129,"props":5560,"children":5561},{"style":136},[5562],{"type":70,"value":5563},"await",{"type":64,"tag":129,"props":5565,"children":5566},{"style":148},[5567],{"type":70,"value":5568}," watcher",{"type":64,"tag":129,"props":5570,"children":5571},{"style":142},[5572],{"type":70,"value":761},{"type":64,"tag":129,"props":5574,"children":5575},{"style":365},[5576],{"type":70,"value":5577},"stop",{"type":64,"tag":129,"props":5579,"children":5580},{"style":148},[5581],{"type":70,"value":5582},"()\n",{"type":64,"tag":73,"props":5584,"children":5585},{},[5586,5588,5593],{"type":70,"value":5587},"Enable the ",{"type":64,"tag":79,"props":5589,"children":5591},{"className":5590},[],[5592],{"type":70,"value":3628},{"type":70,"value":5594}," debug category to log watcher start\u002Fstop, event dispatch,\nand lifecycle transitions:",{"type":64,"tag":119,"props":5596,"children":5598},{"className":121,"code":5597,"language":45,"meta":123,"style":123},"chat({ threadId, adapter, messages, debug: { sandbox: true } })\n\u002F\u002F or debug: true to enable all categories\n",[5599],{"type":64,"tag":79,"props":5600,"children":5601},{"__ignoreMap":123},[5602,5683],{"type":64,"tag":129,"props":5603,"children":5604},{"class":131,"line":132},[5605,5610,5614,5618,5623,5627,5632,5636,5641,5645,5650,5654,5658,5663,5667,5671,5675,5679],{"type":64,"tag":129,"props":5606,"children":5607},{"style":365},[5608],{"type":70,"value":5609},"chat",{"type":64,"tag":129,"props":5611,"children":5612},{"style":148},[5613],{"type":70,"value":373},{"type":64,"tag":129,"props":5615,"children":5616},{"style":142},[5617],{"type":70,"value":437},{"type":64,"tag":129,"props":5619,"children":5620},{"style":148},[5621],{"type":70,"value":5622}," threadId",{"type":64,"tag":129,"props":5624,"children":5625},{"style":142},[5626],{"type":70,"value":542},{"type":64,"tag":129,"props":5628,"children":5629},{"style":148},[5630],{"type":70,"value":5631}," adapter",{"type":64,"tag":129,"props":5633,"children":5634},{"style":142},[5635],{"type":70,"value":542},{"type":64,"tag":129,"props":5637,"children":5638},{"style":148},[5639],{"type":70,"value":5640}," messages",{"type":64,"tag":129,"props":5642,"children":5643},{"style":142},[5644],{"type":70,"value":542},{"type":64,"tag":129,"props":5646,"children":5647},{"style":385},[5648],{"type":70,"value":5649}," debug",{"type":64,"tag":129,"props":5651,"children":5652},{"style":142},[5653],{"type":70,"value":393},{"type":64,"tag":129,"props":5655,"children":5656},{"style":142},[5657],{"type":70,"value":145},{"type":64,"tag":129,"props":5659,"children":5660},{"style":385},[5661],{"type":70,"value":5662}," sandbox",{"type":64,"tag":129,"props":5664,"children":5665},{"style":142},[5666],{"type":70,"value":393},{"type":64,"tag":129,"props":5668,"children":5669},{"style":4407},[5670],{"type":70,"value":4410},{"type":64,"tag":129,"props":5672,"children":5673},{"style":142},[5674],{"type":70,"value":156},{"type":64,"tag":129,"props":5676,"children":5677},{"style":142},[5678],{"type":70,"value":156},{"type":64,"tag":129,"props":5680,"children":5681},{"style":148},[5682],{"type":70,"value":914},{"type":64,"tag":129,"props":5684,"children":5685},{"class":131,"line":180},[5686],{"type":64,"tag":129,"props":5687,"children":5688},{"style":1262},[5689],{"type":70,"value":5690},"\u002F\u002F or debug: true to enable all categories\n",{"type":64,"tag":112,"props":5692,"children":5694},{"id":5693},"edge-serverless-execution",[5695],{"type":70,"value":5696},"Edge \u002F serverless execution",{"type":64,"tag":73,"props":5698,"children":5699},{},[5700,5702,5707,5709,5714,5716,5721],{"type":70,"value":5701},"A request-scoped Worker can't hold a multi-minute agent run open. The\nserverless\u002Fedge model splits this: a ",{"type":64,"tag":104,"props":5703,"children":5704},{},[5705],{"type":70,"value":5706},"trigger",{"type":70,"value":5708}," starts the run and returns\nimmediately, a ",{"type":64,"tag":104,"props":5710,"children":5711},{},[5712],{"type":70,"value":5713},"durable orchestrator",{"type":70,"value":5715}," drives it, and clients ",{"type":64,"tag":104,"props":5717,"children":5718},{},[5719],{"type":70,"value":5720},"tail from a\nresumable cursor",{"type":70,"value":761},{"type":64,"tag":73,"props":5723,"children":5724},{},[5725,5727,5732],{"type":70,"value":5726},"Core primitives (",{"type":64,"tag":79,"props":5728,"children":5730},{"className":5729},[],[5731],{"type":70,"value":290},{"type":70,"value":5733},", transport- and runtime-agnostic):",{"type":64,"tag":1336,"props":5735,"children":5736},{},[5737,5803,5885,5943,5983],{"type":64,"tag":1340,"props":5738,"children":5739},{},[5740,5756,5758,5764,5766,5772,5774,5779,5780,5786,5788,5794,5796,5802],{"type":64,"tag":104,"props":5741,"children":5742},{},[5743,5749,5750],{"type":64,"tag":79,"props":5744,"children":5746},{"className":5745},[],[5747],{"type":70,"value":5748},"RunEventLog",{"type":70,"value":1326},{"type":64,"tag":79,"props":5751,"children":5753},{"className":5752},[],[5754],{"type":70,"value":5755},"InMemoryRunEventLog",{"type":70,"value":5757}," — append-only, ",{"type":64,"tag":79,"props":5759,"children":5761},{"className":5760},[],[5762],{"type":70,"value":5763},"seq",{"type":70,"value":5765},"-indexed log of a\nrun's ",{"type":64,"tag":79,"props":5767,"children":5769},{"className":5768},[],[5770],{"type":70,"value":5771},"StreamChunk",{"type":70,"value":5773},"s with replay-then-tail reads. A dropped connection \u002F new\ntab \u002F hibernated orchestrator reconnect by passing their last-seen ",{"type":64,"tag":79,"props":5775,"children":5777},{"className":5776},[],[5778],{"type":70,"value":5763},{"type":70,"value":3133},{"type":64,"tag":79,"props":5781,"children":5783},{"className":5782},[],[5784],{"type":70,"value":5785},"read({ fromSeq })",{"type":70,"value":5787},"). ",{"type":64,"tag":79,"props":5789,"children":5791},{"className":5790},[],[5792],{"type":70,"value":5793},"TerminalRunStatus",{"type":70,"value":5795}," = ",{"type":64,"tag":79,"props":5797,"children":5799},{"className":5798},[],[5800],{"type":70,"value":5801},"done | error | aborted",{"type":70,"value":761},{"type":64,"tag":1340,"props":5804,"children":5805},{},[5806,5822,5824,5829,5831,5836,5838,5843,5845,5851,5853,5859,5861,5867,5869,5875,5877,5883],{"type":64,"tag":104,"props":5807,"children":5808},{},[5809,5815,5816],{"type":64,"tag":79,"props":5810,"children":5812},{"className":5811},[],[5813],{"type":70,"value":5814},"pipeToRunLog",{"type":70,"value":1326},{"type":64,"tag":79,"props":5817,"children":5819},{"className":5818},[],[5820],{"type":70,"value":5821},"RunController",{"type":70,"value":5823}," — the run driver. ",{"type":64,"tag":79,"props":5825,"children":5827},{"className":5826},[],[5828],{"type":70,"value":5814},{"type":70,"value":5830}," pumps a\n",{"type":64,"tag":79,"props":5832,"children":5834},{"className":5833},[],[5835],{"type":70,"value":92},{"type":70,"value":5837}," stream into a log and ",{"type":64,"tag":104,"props":5839,"children":5840},{},[5841],{"type":70,"value":5842},"never rejects",{"type":70,"value":5844},": a thrown stream error becomes\na terminal ",{"type":64,"tag":79,"props":5846,"children":5848},{"className":5847},[],[5849],{"type":70,"value":5850},"RUN_ERROR",{"type":70,"value":5852}," event, so detached clients always observe failures.\n",{"type":64,"tag":79,"props":5854,"children":5856},{"className":5855},[],[5857],{"type":70,"value":5858},"RunController.start",{"type":70,"value":5860}," is fire-and-track; ",{"type":64,"tag":79,"props":5862,"children":5864},{"className":5863},[],[5865],{"type":70,"value":5866},"attach(runId, { fromSeq })",{"type":70,"value":5868}," tails;\n",{"type":64,"tag":79,"props":5870,"children":5872},{"className":5871},[],[5873],{"type":70,"value":5874},"drain()",{"type":70,"value":5876}," awaits in-flight runs (e.g. in a ",{"type":64,"tag":79,"props":5878,"children":5880},{"className":5879},[],[5881],{"type":70,"value":5882},"waitUntil",{"type":70,"value":5884},").",{"type":64,"tag":1340,"props":5886,"children":5887},{},[5888,5893,5895,5901,5903,5909,5911,5917,5919,5925,5927,5933,5935,5941],{"type":64,"tag":104,"props":5889,"children":5890},{},[5891],{"type":70,"value":5892},"Transport-agnostic tool-bridge",{"type":70,"value":5894}," — ",{"type":64,"tag":79,"props":5896,"children":5898},{"className":5897},[],[5899],{"type":70,"value":5900},"createToolBridgeCore",{"type":70,"value":5902}," +\n",{"type":64,"tag":79,"props":5904,"children":5906},{"className":5905},[],[5907],{"type":70,"value":5908},"handleBridgeJsonRpc",{"type":70,"value":5910}," are the portable core; ",{"type":64,"tag":79,"props":5912,"children":5914},{"className":5913},[],[5915],{"type":70,"value":5916},"startHostToolBridge",{"type":70,"value":5918}," is the\n",{"type":64,"tag":79,"props":5920,"children":5922},{"className":5921},[],[5923],{"type":70,"value":5924},"node:http",{"type":70,"value":5926}," host transport. The ",{"type":64,"tag":79,"props":5928,"children":5930},{"className":5929},[],[5931],{"type":70,"value":5932},"ToolBridgeProvisioner",{"type":70,"value":5934}," capability injects the\ntransport, so an edge orchestrator serves the same core from its own ",{"type":64,"tag":79,"props":5936,"children":5938},{"className":5937},[],[5939],{"type":70,"value":5940},"fetch",{"type":70,"value":5942},"\nhandler (no raw TCP listener). Default = host transport.",{"type":64,"tag":1340,"props":5944,"children":5945},{},[5946,5951,5952,5958,5959,5965,5967,5973,5975,5981],{"type":64,"tag":104,"props":5947,"children":5948},{},[5949],{"type":70,"value":5950},"Co-located host-tool seam",{"type":70,"value":5894},{"type":64,"tag":79,"props":5953,"children":5955},{"className":5954},[],[5956],{"type":70,"value":5957},"toolDescriptors",{"type":70,"value":1326},{"type":64,"tag":79,"props":5960,"children":5962},{"className":5961},[],[5963],{"type":70,"value":5964},"remoteToolStubs",{"type":70,"value":5966}," \u002F\n",{"type":64,"tag":79,"props":5968,"children":5970},{"className":5969},[],[5971],{"type":70,"value":5972},"httpRemoteToolExecutor",{"type":70,"value":5974}," (container side) + ",{"type":64,"tag":79,"props":5976,"children":5978},{"className":5977},[],[5979],{"type":70,"value":5980},"executeHostTool",{"type":70,"value":5982}," (orchestrator\nside): only chat()-tool EXECUTION crosses the container→orchestrator boundary,\nnot the whole MCP protocol.",{"type":64,"tag":1340,"props":5984,"children":5985},{},[5986,5995,5996,6002,6004,6010],{"type":64,"tag":104,"props":5987,"children":5988},{},[5989],{"type":64,"tag":79,"props":5990,"children":5992},{"className":5991},[],[5993],{"type":70,"value":5994},"SandboxCapabilities.writableStdin",{"type":70,"value":5894},{"type":64,"tag":79,"props":5997,"children":5999},{"className":5998},[],[6000],{"type":70,"value":6001},"false",{"type":70,"value":6003}," for providers (e.g.\nCloudflare) with no writable host→process stdin; stdin-fed harnesses then\ndeliver the prompt via a file + in-shell redirection (",{"type":64,"tag":79,"props":6005,"children":6007},{"className":6006},[],[6008],{"type":70,"value":6009},"claude -p … \u003C file",{"type":70,"value":5884},{"type":64,"tag":73,"props":6012,"children":6013},{},[6014,6016,6022],{"type":70,"value":6015},"Cloudflare runtime (",{"type":64,"tag":79,"props":6017,"children":6019},{"className":6018},[],[6020],{"type":70,"value":6021},"@tanstack\u002Fai-sandbox-cloudflare",{"type":70,"value":6023},"):",{"type":64,"tag":1336,"props":6025,"children":6026},{},[6027,6099],{"type":64,"tag":1340,"props":6028,"children":6029},{},[6030,6036,6038,6044,6046,6052,6054,6060,6061,6067,6069,6074,6076,6082,6084,6090,6092,6098],{"type":64,"tag":79,"props":6031,"children":6033},{"className":6032},[],[6034],{"type":70,"value":6035},"createCloudflareSandboxAgent(config)",{"type":70,"value":6037}," → ",{"type":64,"tag":79,"props":6039,"children":6041},{"className":6040},[],[6042],{"type":70,"value":6043},"{ Coordinator, Sandbox, worker }",{"type":70,"value":6045}," —\nan app's ",{"type":64,"tag":79,"props":6047,"children":6049},{"className":6048},[],[6050],{"type":70,"value":6051},"worker.ts",{"type":70,"value":6053}," is one configured call plus the wrangler-required DO\nre-exports. Two models via ",{"type":64,"tag":79,"props":6055,"children":6057},{"className":6056},[],[6058],{"type":70,"value":6059},"mode",{"type":70,"value":3110},{"type":64,"tag":79,"props":6062,"children":6064},{"className":6063},[],[6065],{"type":70,"value":6066},"do-drives",{"type":70,"value":6068}," (the DO runs ",{"type":64,"tag":79,"props":6070,"children":6072},{"className":6071},[],[6073],{"type":70,"value":92},{"type":70,"value":6075},") and\n",{"type":64,"tag":79,"props":6077,"children":6079},{"className":6078},[],[6080],{"type":70,"value":6081},"colocated",{"type":70,"value":6083}," (harness + bridge run in-container; the DO is a thin coordinator,\npair with ",{"type":64,"tag":79,"props":6085,"children":6087},{"className":6086},[],[6088],{"type":70,"value":6089},"runInContainerHarness",{"type":70,"value":6091}," from ",{"type":64,"tag":79,"props":6093,"children":6095},{"className":6094},[],[6096],{"type":70,"value":6097},"\u002Frunner",{"type":70,"value":5884},{"type":64,"tag":1340,"props":6100,"children":6101},{},[6102,6108,6110,6115,6117,6123],{"type":64,"tag":79,"props":6103,"children":6105},{"className":6104},[],[6106],{"type":70,"value":6107},"DurableObjectRunEventLog",{"type":70,"value":6109}," mirrors ",{"type":64,"tag":79,"props":6111,"children":6113},{"className":6112},[],[6114],{"type":70,"value":5755},{"type":70,"value":6116}," over DO storage;\n",{"type":64,"tag":79,"props":6118,"children":6120},{"className":6119},[],[6121],{"type":70,"value":6122},"timingSafeBearerEqualWeb",{"type":70,"value":6124}," is the Web-Crypto constant-time bearer check.",{"type":64,"tag":112,"props":6126,"children":6128},{"id":6127},"events",[6129],{"type":70,"value":6130},"Events",{"type":64,"tag":1336,"props":6132,"children":6133},{},[6134,6152,6171],{"type":64,"tag":1340,"props":6135,"children":6136},{},[6137,6143,6145,6151],{"type":64,"tag":79,"props":6138,"children":6140},{"className":6139},[],[6141],{"type":70,"value":6142},"claude-code.session-id",{"type":70,"value":6144}," (CUSTOM) — resumable session id → pass back via\n",{"type":64,"tag":79,"props":6146,"children":6148},{"className":6147},[],[6149],{"type":70,"value":6150},"modelOptions.sessionId",{"type":70,"value":761},{"type":64,"tag":1340,"props":6153,"children":6154},{},[6155,6161,6163,6169],{"type":64,"tag":79,"props":6156,"children":6158},{"className":6157},[],[6159],{"type":70,"value":6160},"file.changed",{"type":70,"value":6162}," (CUSTOM) — ",{"type":64,"tag":79,"props":6164,"children":6166},{"className":6165},[],[6167],{"type":70,"value":6168},"{ path, diff }",{"type":70,"value":6170}," working-tree diff after the run.",{"type":64,"tag":1340,"props":6172,"children":6173},{},[6174,6179,6180,6186],{"type":64,"tag":79,"props":6175,"children":6177},{"className":6176},[],[6178],{"type":70,"value":5046},{"type":70,"value":6162},{"type":64,"tag":79,"props":6181,"children":6183},{"className":6182},[],[6184],{"type":70,"value":6185},"{ type, path, timestamp }",{"type":70,"value":6187}," per file create\u002Fchange\u002F\ndelete, emitted automatically when a sandbox is active.",{"type":64,"tag":112,"props":6189,"children":6191},{"id":6190},"critical-rules",[6192],{"type":70,"value":6193},"Critical rules",{"type":64,"tag":1336,"props":6195,"children":6196},{},[6197,6229,6277,6287,6329,6341],{"type":64,"tag":1340,"props":6198,"children":6199},{},[6200,6205,6207,6212,6214,6220,6222,6227],{"type":64,"tag":104,"props":6201,"children":6202},{},[6203],{"type":70,"value":6204},"Harness adapters require a sandbox.",{"type":70,"value":6206}," Always include ",{"type":64,"tag":79,"props":6208,"children":6210},{"className":6209},[],[6211],{"type":70,"value":100},{"type":70,"value":6213}," in\n",{"type":64,"tag":79,"props":6215,"children":6217},{"className":6216},[],[6218],{"type":70,"value":6219},"middleware",{"type":70,"value":6221}," — without it ",{"type":64,"tag":79,"props":6223,"children":6225},{"className":6224},[],[6226],{"type":70,"value":92},{"type":70,"value":6228}," throws a missing-capability error.",{"type":64,"tag":1340,"props":6230,"children":6231},{},[6232,6237,6238,6244,6246,6252,6254,6260,6262,6268,6270,6275],{"type":64,"tag":104,"props":6233,"children":6234},{},[6235],{"type":70,"value":6236},"Secrets",{"type":70,"value":3897},{"type":64,"tag":79,"props":6239,"children":6241},{"className":6240},[],[6242],{"type":70,"value":6243},"workspace.secrets",{"type":70,"value":6245},") are injected into the sandbox env and never\npersisted (no snapshots, no sandbox store, no event log). Always create them\nwith ",{"type":64,"tag":79,"props":6247,"children":6249},{"className":6248},[],[6250],{"type":70,"value":6251},"createSecrets(...)",{"type":70,"value":6253}," so the values stay hidden behind ",{"type":64,"tag":79,"props":6255,"children":6257},{"className":6256},[],[6258],{"type":70,"value":6259},"SecretRef",{"type":70,"value":6261}," tokens.\nThe agent binary (",{"type":64,"tag":79,"props":6263,"children":6265},{"className":6264},[],[6266],{"type":70,"value":6267},"claude",{"type":70,"value":6269},") must exist in the sandbox image (install it in\n",{"type":64,"tag":79,"props":6271,"children":6273},{"className":6272},[],[6274],{"type":70,"value":2633},{"type":70,"value":6276}," or bake it into the image).",{"type":64,"tag":1340,"props":6278,"children":6279},{},[6280,6285],{"type":64,"tag":104,"props":6281,"children":6282},{},[6283],{"type":70,"value":6284},"Secret-bearing projected files",{"type":70,"value":6286}," (e.g. MCP config with resolved header\nvalues) are re-written on every projection call so rotated secrets re-apply;\nthey are never included in a snapshot.",{"type":64,"tag":1340,"props":6288,"children":6289},{},[6290,6303,6305,6311,6313,6319,6321,6327],{"type":64,"tag":104,"props":6291,"children":6292},{},[6293,6295,6301],{"type":70,"value":6294},"chat()-provided ",{"type":64,"tag":79,"props":6296,"children":6298},{"className":6297},[],[6299],{"type":70,"value":6300},"tools",{"type":70,"value":6302}," are bridged",{"type":70,"value":6304}," into the in-sandbox agent over a\nhost-side MCP tool-proxy: the agent calls them as ",{"type":64,"tag":79,"props":6306,"children":6308},{"className":6307},[],[6309],{"type":70,"value":6310},"mcp__tanstack__\u003Ctool>",{"type":70,"value":6312}," and\neach call is proxied back to the host where the tool's ",{"type":64,"tag":79,"props":6314,"children":6316},{"className":6315},[],[6317],{"type":70,"value":6318},"execute()",{"type":70,"value":6320}," runs (with\nits closures \u002F DB \u002F secrets). The agent also has its own native tools\n(Bash\u002FEdit\u002FRead\u002F…). The host bridge binds on the host; the sandbox reaches it\n(localhost, or ",{"type":64,"tag":79,"props":6322,"children":6324},{"className":6323},[],[6325],{"type":70,"value":6326},"host.docker.internal",{"type":70,"value":6328}," for Docker), gated by a per-run bearer\ntoken.",{"type":64,"tag":1340,"props":6330,"children":6331},{},[6332,6334,6339],{"type":70,"value":6333},"Use ",{"type":64,"tag":79,"props":6335,"children":6337},{"className":6336},[],[6338],{"type":70,"value":3084},{"type":70,"value":6340}," only in trusted\u002Fdev contexts (no isolation).",{"type":64,"tag":1340,"props":6342,"children":6343},{},[6344,6346,6352,6354,6360],{"type":70,"value":6345},"Skills\u002Fplugins that a CLI lacks (e.g. ",{"type":64,"tag":79,"props":6347,"children":6349},{"className":6348},[],[6350],{"type":70,"value":6351},"agentSkill",{"type":70,"value":6353}," on Codex, ",{"type":64,"tag":79,"props":6355,"children":6357},{"className":6356},[],[6358],{"type":70,"value":6359},"plugins",{"type":70,"value":6361}," on\nCodex) warn and skip — they do not throw.",{"type":64,"tag":6363,"props":6364,"children":6365},"style",{},[6366],{"type":70,"value":6367},"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":6369,"total":6511},[6370,6386,6398,6410,6425,6437,6447,6457,6470,6480,6491,6501],{"slug":6371,"name":6371,"fn":6372,"description":6373,"org":6374,"tags":6375,"stars":6383,"repoUrl":6384,"updatedAt":6385},"aggregation","perform data aggregation in TanStack Table","Aggregate TanStack Table columns independently of grouping, including grand totals, caller-selected row totals, multiple keyed aggregations, custom context-based definitions, grouped merges, manual values, and worker constraints.\n",{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},[6376,6379,6382],{"name":6377,"slug":6378,"type":15},"Data Analysis","data-analysis",{"name":6380,"slug":6381,"type":15},"Frontend","frontend",{"name":9,"slug":8,"type":15},28175,"https:\u002F\u002Fgithub.com\u002FTanStack\u002Ftable","2026-07-30T05:25:59.429787",{"slug":6387,"name":6387,"fn":6388,"description":6389,"org":6390,"tags":6391,"stars":6383,"repoUrl":6384,"updatedAt":6397},"api-not-found","diagnose TanStack Table API errors","Diagnose missing TanStack Table v9 exports, options, state slices, and instance methods. Load before inventing an API when code sees a type error, undefined feature method, absent object key, adapter mismatch, or v8-shaped example.\n",{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},[6392,6395,6396],{"name":6393,"slug":6394,"type":15},"Debugging","debugging",{"name":6380,"slug":6381,"type":15},{"name":9,"slug":8,"type":15},"2026-07-30T05:26:05.418735",{"slug":6399,"name":6399,"fn":6400,"description":6401,"org":6402,"tags":6403,"stars":6383,"repoUrl":6384,"updatedAt":6409},"cell-selection","select rectangular cell ranges in tables","Select rectangular cell ranges with cellSelectionFeature: two-corner range state keyed by row and column id, mousedown\u002Fmouseenter handlers, selection edges, render-order resolution under pinning, and autoResetCellSelection. Load when ranges widen unexpectedly after sorting or column reordering, when a drag re-renders the whole table, or when building copy-to-clipboard from a selection.\n",{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},[6404,6405,6406],{"name":6377,"slug":6378,"type":15},{"name":9,"slug":8,"type":15},{"name":6407,"slug":6408,"type":15},"UI Components","ui-components","2026-07-30T05:25:38.403427",{"slug":6411,"name":6411,"fn":6412,"description":6413,"org":6414,"tags":6415,"stars":6383,"repoUrl":6384,"updatedAt":6424},"client-vs-server","manage TanStack Table data pipelines","Choose client or server ownership for filtering, grouping, sorting, expanding, and pagination in TanStack Table v9. Load for manual* flags, mixed pipelines, server counts, or deciding which dataset each row-model stage receives.\n",{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},[6416,6419,6420,6423],{"name":6417,"slug":6418,"type":15},"Data Pipeline","data-pipeline",{"name":6380,"slug":6381,"type":15},{"name":6421,"slug":6422,"type":15},"Performance","performance",{"name":9,"slug":8,"type":15},"2026-07-30T05:25:45.400104",{"slug":6426,"name":6426,"fn":6427,"description":6428,"org":6429,"tags":6430,"stars":6383,"repoUrl":6384,"updatedAt":6436},"column-faceting","build faceted filter UIs","Build faceted filter UIs with columnFacetingFeature, facetedRowModel, facetedUniqueValues, and facetedMinMaxValues. Load for facet counts, numeric ranges, own-filter exclusion, or server-page facet completeness.\n",{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},[6431,6434,6435],{"name":6432,"slug":6433,"type":15},"Data Visualization","data-visualization",{"name":6380,"slug":6381,"type":15},{"name":9,"slug":8,"type":15},"2026-07-30T05:25:41.397257",{"slug":6438,"name":6438,"fn":6439,"description":6440,"org":6441,"tags":6442,"stars":6383,"repoUrl":6384,"updatedAt":6446},"column-filtering","implement column filtering in TanStack Table","Filter columns with columnFilteringFeature, filteredRowModel, filterFns, filterMeta, nested-row direction, and manualFiltering. Load for accessor compatibility, controlled filter updaters, fuzzy metadata, or client\u002Fserver ownership.\n",{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},[6443,6444,6445],{"name":6377,"slug":6378,"type":15},{"name":6380,"slug":6381,"type":15},{"name":9,"slug":8,"type":15},"2026-07-30T05:25:53.391632",{"slug":6448,"name":6448,"fn":6449,"description":6450,"org":6451,"tags":6452,"stars":6383,"repoUrl":6384,"updatedAt":6456},"column-ordering","manage TanStack Table column ordering","Control TanStack Table v9 leaf columnOrder with stable IDs while accounting for pinning regions, visibility, and groupedColumnMode precedence. Load for drag-and-drop columns or rendered order that differs from state.\n",{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},[6453,6454,6455],{"name":6380,"slug":6381,"type":15},{"name":9,"slug":8,"type":15},{"name":6407,"slug":6408,"type":15},"2026-07-30T05:26:03.37801",{"slug":6458,"name":6458,"fn":6459,"description":6460,"org":6461,"tags":6462,"stars":6383,"repoUrl":6384,"updatedAt":6469},"column-pinning","configure column pinning in TanStack Table","Pin columns into logical start, center, and end regions with columnPinningFeature and renderer-owned sticky CSS. Load for RTL offsets, z-index, backgrounds, overflow, widths, gaps, or overlaps.\n",{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},[6463,6466,6467,6468],{"name":6464,"slug":6465,"type":15},"CSS","css",{"name":6380,"slug":6381,"type":15},{"name":9,"slug":8,"type":15},{"name":6407,"slug":6408,"type":15},"2026-07-30T05:25:55.377366",{"slug":6471,"name":6471,"fn":6472,"description":6473,"org":6474,"tags":6475,"stars":6383,"repoUrl":6384,"updatedAt":6479},"column-resizing","implement column resizing in TanStack Table","Wire columnResizingFeature, header.getResizeHandler, resize mode and direction, pointer or touch events, and performant CSS-variable updates. Load when resize state changes but widths do not, or large tables resize slowly.\n",{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},[6476,6477,6478],{"name":6380,"slug":6381,"type":15},{"name":9,"slug":8,"type":15},{"name":6407,"slug":6408,"type":15},"2026-07-30T05:25:51.400011",{"slug":6481,"name":6481,"fn":6482,"description":6483,"org":6484,"tags":6485,"stars":6383,"repoUrl":6384,"updatedAt":6490},"column-sizing","configure column sizing in TanStack Table","Use columnSizingFeature numeric size, minSize, maxSize, getSize, getStart, getAfter, and total-size APIs in table, grid, or flex CSS. Load for auto or percentage misconceptions and sizing\u002Fpinning layout mismatch.\n",{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},[6486,6487,6488,6489],{"name":6464,"slug":6465,"type":15},{"name":6380,"slug":6381,"type":15},{"name":9,"slug":8,"type":15},{"name":6407,"slug":6408,"type":15},"2026-07-30T05:25:48.703799",{"slug":6492,"name":6492,"fn":6493,"description":6494,"org":6495,"tags":6496,"stars":6383,"repoUrl":6384,"updatedAt":6500},"column-visibility","manage column visibility in TanStack Table","Hide columns with columnVisibilityFeature while rendering visibility-aware header, column, and cell collections. Load when hidden columns remain in the DOM, false-versus-absent state is confused, or enableHiding is misunderstood.\n",{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},[6497,6498,6499],{"name":6380,"slug":6381,"type":15},{"name":9,"slug":8,"type":15},{"name":6407,"slug":6408,"type":15},"2026-07-30T05:25:47.367943",{"slug":6502,"name":6502,"fn":6503,"description":6504,"org":6505,"tags":6506,"stars":6383,"repoUrl":6384,"updatedAt":6510},"core","build data grids with TanStack Table","Use TanStack Table v9 as a headless data-grid state and row-processing engine. Load for first-table architecture, stable data and columns, row numbering with getDisplayIndex, semantic rendering, framework adapter choice, or deciding what Table owns versus the renderer.\n",{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},[6507,6508,6509],{"name":6377,"slug":6378,"type":15},{"name":6380,"slug":6381,"type":15},{"name":6407,"slug":6408,"type":15},"2026-07-30T05:25:52.366295",125,{"items":6513,"total":1022},[6514,6530,6542,6557,6570,6582,6596],{"slug":6515,"name":6515,"fn":6516,"description":6517,"org":6518,"tags":6519,"stars":23,"repoUrl":24,"updatedAt":6529},"ai-code-mode","execute sandboxed TypeScript code with LLMs","LLM-generated TypeScript execution in sandboxed environments: createCodeModeTool() with isolate drivers (createNodeIsolateDriver, createQuickJSIsolateDriver, createCloudflareIsolateDriver), codeModeWithSkills() for persistent skill libraries, trust strategies, skill storage (FileSystem, LocalStorage, InMemory, Mongo), client-side execution progress via code_mode:* custom events in useChat.\n",{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},[6520,6522,6525,6526,6527],{"name":6521,"slug":31,"type":15},"AI SDK",{"name":6523,"slug":6524,"type":15},"Code Execution","code-execution",{"name":13,"slug":14,"type":15},{"name":9,"slug":8,"type":15},{"name":6528,"slug":45,"type":15},"TypeScript","2026-07-16T06:04:13.597905",{"slug":6531,"name":6531,"fn":6532,"description":6533,"org":6534,"tags":6535,"stars":23,"repoUrl":24,"updatedAt":6541},"ai-core","configure TanStack AI agent features","Entry point for TanStack AI skills. Routes to chat-experience, tool-calling, media-generation, structured-outputs, adapter-configuration, ag-ui-protocol, middleware, locks, custom-backend-integration, and debug-logging, plus the skills shipped by companion packages (@tanstack\u002Fai-persistence, @tanstack\u002Fai-code-mode). Use chat() not streamText(), openaiText() not createOpenAI(), toServerSentEventsResponse() not manual SSE, middleware hooks not onEnd callbacks.\n",{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},[6536,6537,6539],{"name":17,"slug":18,"type":15},{"name":6538,"slug":29,"type":15},"AI",{"name":6540,"slug":6219,"type":15},"Middleware","2026-07-30T05:26:10.404565",{"slug":6543,"name":6544,"fn":6545,"description":6546,"org":6547,"tags":6548,"stars":23,"repoUrl":24,"updatedAt":6556},"ai-coreadapter-configuration","ai-core\u002Fadapter-configuration","configure AI provider adapters","Provider adapter selection and configuration: openaiText, anthropicText, geminiText, ollamaText, grokText, groqText, openRouterText, bedrockText, openaiCompatible. Per-model type safety with modelOptions, reasoning\u002Fthinking configuration, runtime adapter switching, extendAdapter() for custom models, createModel(). Generic OpenAI-compatible providers (DeepSeek, Together, Fireworks, etc.) via openaiCompatible({ baseURL, apiKey, models }) from @tanstack\u002Fai-openai\u002Fcompatible. API key env vars: OPENAI_API_KEY, ANTHROPIC_API_KEY, GOOGLE_API_KEY\u002FGEMINI_API_KEY, XAI_API_KEY, GROQ_API_KEY, OPENROUTER_API_KEY, OLLAMA_HOST, BEDROCK_API_KEY (or AWS_BEARER_TOKEN_BEDROCK).\n",{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},[6549,6550,6553,6555],{"name":6521,"slug":31,"type":15},{"name":6551,"slug":6552,"type":15},"Configuration","configuration",{"name":6554,"slug":37,"type":15},"LLM",{"name":9,"slug":8,"type":15},"2026-07-16T06:04:17.82075",{"slug":6558,"name":6559,"fn":6560,"description":6561,"org":6562,"tags":6563,"stars":23,"repoUrl":24,"updatedAt":6569},"ai-coreag-ui-protocol","ai-core\u002Fag-ui-protocol","implement TanStack AI streaming protocol","Server-side AG-UI streaming protocol implementation: StreamChunk event types (RUN_STARTED, TEXT_MESSAGE_START\u002FCONTENT\u002FEND, TOOL_CALL_START\u002FARGS\u002FEND, RUN_FINISHED, RUN_ERROR, STEP_STARTED\u002FSTEP_FINISHED, STATE_SNAPSHOT\u002FDELTA, CUSTOM), toServerSentEventsStream() for SSE format, toHttpStream() for NDJSON format. For backends serving AG-UI events without client packages.\n",{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},[6564,6567,6568],{"name":6565,"slug":6566,"type":15},"API Development","api-development",{"name":6554,"slug":37,"type":15},{"name":9,"slug":8,"type":15},"2026-07-16T06:04:10.093367",{"slug":6571,"name":6572,"fn":6573,"description":6574,"org":6575,"tags":6576,"stars":23,"repoUrl":24,"updatedAt":6581},"ai-corechat-experience","ai-core\u002Fchat-experience","implement chat experiences with TanStack AI","End-to-end chat implementation: server endpoint with chat() and toServerSentEventsResponse(), client-side useChat hook with fetchServerSentEvents(), message rendering with UIMessage parts, multimodal content, thinking\u002Freasoning display. Covers streaming states, connection adapters, and message format conversions. NOT Vercel AI SDK — uses chat() not streamText().\n",{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},[6577,6578,6579,6580],{"name":6565,"slug":6566,"type":15},{"name":6380,"slug":6381,"type":15},{"name":6554,"slug":37,"type":15},{"name":9,"slug":8,"type":15},"2026-07-30T05:26:11.505241",{"slug":6583,"name":6584,"fn":6585,"description":6586,"org":6587,"tags":6588,"stars":23,"repoUrl":24,"updatedAt":6595},"ai-coreclient-persistence","ai-core\u002Fclient-persistence","implement browser chat persistence for TanStack AI","Browser chat persistence on useChat \u002F ChatClient: localStoragePersistence, sessionStoragePersistence, indexedDBPersistence. Client-authoritative (adapter, full transcript) vs server-authoritative (persistence: true, no client cache). Reload restore, pending interrupts, mid-stream rejoin with delivery durability. Use for SPA reload durability — NOT server history alone. No extra package: the adapters ship in the framework packages.\n",{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},[6589,6590,6591,6594],{"name":6538,"slug":29,"type":15},{"name":6380,"slug":6381,"type":15},{"name":6592,"slug":6593,"type":15},"Persistence","persistence",{"name":9,"slug":8,"type":15},"2026-07-30T05:53:35.503176",{"slug":6597,"name":6598,"fn":6599,"description":6600,"org":6601,"tags":6602,"stars":23,"repoUrl":24,"updatedAt":6609},"ai-corecustom-backend-integration","ai-core\u002Fcustom-backend-integration","integrate custom backends with TanStack AI","Connect useChat to a non-TanStack-AI backend through custom connection adapters. ConnectConnectionAdapter (single async iterable) vs SubscribeConnectionAdapter (separate subscribe\u002Fsend). Customize fetchServerSentEvents() and fetchHttpStream() with auth headers, custom URLs, and request options. Import from framework package, not @tanstack\u002Fai-client.\n",{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},[6603,6604,6605,6608],{"name":6538,"slug":29,"type":15},{"name":6565,"slug":6566,"type":15},{"name":6606,"slug":6607,"type":15},"Backend","backend",{"name":9,"slug":8,"type":15},"2026-07-17T06:06:39.855351"]