[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill-vercel-workflow":3,"mdc--cysb6g-key":34,"related-org-vercel-workflow":16200,"related-repo-vercel-workflow":16377},{"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":29,"sourceUrl":32,"mdContent":33},"workflow","build durable workflows with Vercel","Creates durable, resumable workflows using Vercel's Workflow SDK. Use when building workflows that need to survive restarts, pause for external events, retry on failure, or coordinate multi-step operations over time. Triggers on mentions of \"workflow\", \"durable functions\", \"resumable\", \"workflow sdk\", \"queue\", \"event\", \"push\", \"subscribe\", or step-based orchestration.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},"vercel","Vercel","https:\u002F\u002Fpexgzepcugksgbtrxkhf.supabase.co\u002Fstorage\u002Fv1\u002Fobject\u002Fpublic\u002Forg-logos\u002Fvercel.png",[12,14,17,20],{"name":9,"slug":8,"type":13},"tag",{"name":15,"slug":16,"type":13},"Backend","backend",{"name":18,"slug":19,"type":13},"SDK","sdk",{"name":21,"slug":22,"type":13},"Workflow Automation","workflow-automation",2228,"https:\u002F\u002Fgithub.com\u002Fvercel\u002Fworkflow","2026-04-06T18:55:58.915052",null,307,[],{"repoUrl":24,"stars":23,"forks":27,"topics":30,"description":31},[],"Workflow SDK: Build durable, reliable, and observable apps and AI Agents in TypeScript","https:\u002F\u002Fgithub.com\u002Fvercel\u002Fworkflow\u002Ftree\u002FHEAD\u002Fskills\u002Fworkflow","---\nname: workflow\ndescription: Creates durable, resumable workflows using Vercel's Workflow SDK. Use when building workflows that need to survive restarts, pause for external events, retry on failure, or coordinate multi-step operations over time. Triggers on mentions of \"workflow\", \"durable functions\", \"resumable\", \"workflow sdk\", \"queue\", \"event\", \"push\", \"subscribe\", or step-based orchestration.\nmetadata:\n  author: Vercel Inc.\n  version: '1.10'\n---\n\n## *CRITICAL*: Always Use Correct `workflow` Documentation\n\nYour knowledge of `workflow` is outdated.\n\nThe `workflow` documentation outlined below matches the installed version of the Workflow SDK.\nFollow these instructions before starting on any `workflow`-related tasks:\n\nSearch the bundled documentation in `node_modules\u002Fworkflow\u002Fdocs\u002F`:\n\n1. **Find docs**: `glob \"node_modules\u002Fworkflow\u002Fdocs\u002F**\u002F*.mdx\"`\n2. **Search content**: `grep \"your query\" node_modules\u002Fworkflow\u002Fdocs\u002F`\n\nDocumentation structure in `node_modules\u002Fworkflow\u002Fdocs\u002F`:\n\n- `getting-started\u002F` - Framework setup (next.mdx, express.mdx, hono.mdx, etc.)\n- `foundations\u002F` - Core concepts (workflows-and-steps.mdx, hooks.mdx, streaming.mdx, etc.)\n- `api-reference\u002Fworkflow\u002F` - API docs (sleep.mdx, create-hook.mdx, fatal-error.mdx, etc.)\n- `api-reference\u002Fworkflow-api\u002F` - Client API (start.mdx, get-run.mdx, resume-hook.mdx, etc.)\n- `api-reference\u002Fworkflow-runtime\u002F` - Runtime API (get-world.mdx) and `world\u002F` World SDK (storage.mdx, streams.mdx, queue.mdx)\n- `api-reference\u002Fworkflow-observability\u002F` - Hydration and name parsing utilities (hydrate-resource-io.mdx, parse-workflow-name.mdx, etc.)\n- `ai\u002F` - AI SDK integration docs\n- `errors\u002F` - Error code documentation\n\nRelated packages also include bundled docs:\n\n- `@workflow\u002Fai`: `node_modules\u002F@workflow\u002Fai\u002Fdocs\u002F` - DurableAgent and AI integration\n- `@workflow\u002Fcore`: `node_modules\u002F@workflow\u002Fcore\u002Fdocs\u002F` - Core runtime (foundations, how-it-works)\n- `@workflow\u002Fnext`: `node_modules\u002F@workflow\u002Fnext\u002Fdocs\u002F` - Next.js integration\n\n**When in doubt, update to the latest version of the Workflow SDK.**\n\n### Official Resources\n\n- **Website**: https:\u002F\u002Fworkflow-sdk.dev\n- **GitHub**: https:\u002F\u002Fgithub.com\u002Fvercel\u002Fworkflow\n\n### Quick Reference\n\n**Directives:**\n\n```typescript\n\"use workflow\";  \u002F\u002F First line - makes async function durable\n\"use step\";      \u002F\u002F First line - makes function a cached, retryable unit\n```\n\n**Essential imports:**\n\n```typescript\n\u002F\u002F Workflow primitives\nimport { sleep, fetch, createHook, createWebhook, getWritable } from \"workflow\";\nimport { FatalError, RetryableError } from \"workflow\";\nimport { getWorkflowMetadata, getStepMetadata } from \"workflow\";\n\n\u002F\u002F API operations\nimport { start, getRun, resumeHook, resumeWebhook } from \"workflow\u002Fapi\";\n\n\u002F\u002F Observability & data hydration\nimport { hydrateResourceIO, observabilityRevivers, parseStepName, parseWorkflowName } from \"workflow\u002Fobservability\";\n\n\u002F\u002F Framework integrations\nimport { withWorkflow } from \"workflow\u002Fnext\";\nimport { workflow } from \"workflow\u002Fvite\";\nimport { workflow } from \"workflow\u002Fastro\";\n\u002F\u002F Or use modules: [\"workflow\u002Fnitro\"] for Nitro\u002FNuxt\n\n\u002F\u002F AI agent\nimport { DurableAgent } from \"@workflow\u002Fai\u002Fagent\";\n```\n\n## Prefer Step Functions to Avoid Sandbox Errors\n\n`\"use workflow\"` functions run in a sandboxed VM. `\"use step\"` functions have **full Node.js access**. Put your logic in steps and use the workflow function purely for orchestration.\n\n```typescript\n\u002F\u002F Steps have full Node.js and npm access\nasync function fetchUserData(userId: string) {\n  \"use step\";\n  const response = await fetch(`https:\u002F\u002Fapi.example.com\u002Fusers\u002F${userId}`);\n  return response.json();\n}\n\nasync function processWithAI(data: any) {\n  \"use step\";\n  \u002F\u002F AI SDK works in steps without workarounds\n  return await generateText({\n    model: openai(\"gpt-4\"),\n    prompt: `Process: ${JSON.stringify(data)}`,\n  });\n}\n\n\u002F\u002F Workflow orchestrates steps - no sandbox issues\nexport async function dataProcessingWorkflow(userId: string) {\n  \"use workflow\";\n  const data = await fetchUserData(userId);\n  const processed = await processWithAI(data);\n  return { success: true, processed };\n}\n```\n\n**Benefits:** Steps have automatic retry, results are persisted for replay, and no sandbox restrictions.\n\n## Workflow Sandbox Limitations\n\nWhen you need logic directly in a workflow function (not in a step), these restrictions apply:\n\n| Limitation | Workaround |\n|------------|------------|\n| No `fetch()` | `import { fetch } from \"workflow\"` then `globalThis.fetch = fetch` |\n| No `setTimeout`\u002F`setInterval` | Use `sleep(\"5s\")` from `\"workflow\"` |\n| No Node.js modules (fs, crypto, etc.) | Move to a step function |\n\n**Example - Using fetch in workflow context:**\n\n```typescript\nimport { fetch } from \"workflow\";\n\nexport async function myWorkflow() {\n  \"use workflow\";\n  globalThis.fetch = fetch;  \u002F\u002F Required for AI SDK and HTTP libraries\n  \u002F\u002F Now generateText() and other libraries work\n}\n```\n\n**Note:** `DurableAgent` from `@workflow\u002Fai` handles the fetch assignment automatically.\n\n## DurableAgent — AI Agents in Workflows\n\nUse `DurableAgent` to build AI agents that maintain state and survive interruptions. It handles the workflow sandbox automatically (no manual `globalThis.fetch` needed).\n\n```typescript\nimport { DurableAgent } from \"@workflow\u002Fai\u002Fagent\";\nimport { getWritable } from \"workflow\";\nimport { z } from \"zod\";\nimport type { UIMessageChunk } from \"ai\";\n\nasync function lookupData({ query }: { query: string }) {\n  \"use step\";\n  \u002F\u002F Step functions have full Node.js access\n  return `Results for \"${query}\"`;\n}\n\nexport async function myAgentWorkflow(userMessage: string) {\n  \"use workflow\";\n\n  const agent = new DurableAgent({\n    model: \"anthropic\u002Fclaude-sonnet-4-5\",\n    system: \"You are a helpful assistant.\",\n    tools: {\n      lookupData: {\n        description: \"Search for information\",\n        inputSchema: z.object({ query: z.string() }),\n        execute: lookupData,\n      },\n    },\n  });\n\n  const result = await agent.stream({\n    messages: [{ role: \"user\", content: userMessage }],\n    writable: getWritable\u003CUIMessageChunk>(),\n    maxSteps: 10,\n  });\n\n  return result.messages;\n}\n```\n\n**Key points:**\n- `getWritable\u003CUIMessageChunk>()` streams output to the workflow run's default stream\n- Tool `execute` functions that need Node.js\u002Fnpm access should use `\"use step\"`\n- Tool `execute` functions that use workflow primitives (`sleep()`, `createHook()`) should **NOT** use `\"use step\"` — they run at the workflow level\n- `maxSteps` limits the number of LLM calls (default is unlimited)\n- Multi-turn: pass `result.messages` plus new user messages to subsequent `agent.stream()` calls\n\n**For more details on `DurableAgent`, check the AI docs in `node_modules\u002F@workflow\u002Fai\u002Fdocs\u002F`.**\n\n## Starting Workflows & Child Workflows\n\nUse `start()` to launch workflows from API routes. **`start()` cannot be called directly in workflow context** — wrap it in a step function.\n\n```typescript\nimport { start } from \"workflow\u002Fapi\";\n\n\u002F\u002F From an API route — works directly\nexport async function POST() {\n  const run = await start(myWorkflow, [arg1, arg2]);\n  return Response.json({ runId: run.runId });\n}\n\n\u002F\u002F No-args workflow\nconst run = await start(noArgWorkflow);\n```\n\n**Starting child workflows from inside a workflow — must use a step:**\n\n```typescript\nimport { start } from \"workflow\u002Fapi\";\n\n\u002F\u002F Wrap start() in a step function\nasync function triggerChild(data: string) {\n  \"use step\";\n  const run = await start(childWorkflow, [data]);\n  return run.runId;\n}\n\nexport async function parentWorkflow() {\n  \"use workflow\";\n  const childRunId = await triggerChild(\"some data\");  \u002F\u002F Fire-and-forget via step\n  await sleep(\"1h\");\n}\n```\n\n`start()` returns immediately — it doesn't wait for the workflow to complete. Use `run.returnValue` to await completion.\n\n## Hooks — Pause & Resume with External Events\n\nHooks let workflows wait for external data. Use `createHook()` inside a workflow and `resumeHook()` from API routes. Deterministic tokens are for `createHook()` + `resumeHook()` (server-side) only. `createWebhook()` always generates random tokens — do not pass a `token` option to `createWebhook()`.\n\n### Single event\n\n```typescript\nimport { createHook } from \"workflow\";\n\nexport async function approvalWorkflow() {\n  \"use workflow\";\n\n  const hook = createHook\u003C{ approved: boolean }>({\n    token: \"approval-123\",  \u002F\u002F deterministic token for external systems\n  });\n\n  const result = await hook;  \u002F\u002F Workflow suspends here\n  return result.approved;\n}\n```\n\n### Multiple events (iterable hooks)\n\nHooks implement `AsyncIterable` — use `for await...of` to receive multiple events:\n\n```typescript\nimport { createHook } from \"workflow\";\n\nexport async function chatWorkflow(channelId: string) {\n  \"use workflow\";\n\n  const hook = createHook\u003C{ text: string; done?: boolean }>({\n    token: `chat-${channelId}`,\n  });\n\n  for await (const event of hook) {\n    await processMessage(event.text);\n    if (event.done) break;\n  }\n}\n```\n\nEach `resumeHook(token, payload)` call delivers the next value to the loop.\n\n### Resuming from API routes\n\n```typescript\nimport { resumeHook } from \"workflow\u002Fapi\";\n\nexport async function POST(req: Request) {\n  const { token, data } = await req.json();\n  await resumeHook(token, data);\n  return new Response(\"ok\");\n}\n```\n\n## Error Handling\n\nUse `FatalError` for permanent failures (no retry), `RetryableError` for transient failures:\n\n```typescript\nimport { FatalError, RetryableError } from \"workflow\";\n\nif (res.status >= 400 && res.status \u003C 500) {\n  throw new FatalError(`Client error: ${res.status}`);\n}\nif (res.status === 429) {\n  throw new RetryableError(\"Rate limited\", { retryAfter: \"5m\" });\n}\n```\n\n## Serialization\n\nAll data passed to\u002Ffrom workflows and steps must be serializable.\n\n**Supported built-in types:** string, number, boolean, null, undefined, bigint, plain objects, arrays, Date, RegExp, URL, URLSearchParams, Map, Set, Headers, ArrayBuffer, typed arrays, Request, Response, ReadableStream, WritableStream.\n\n**Not supported:** Functions, Symbols, WeakMap\u002FWeakSet. Pass data, not callbacks.\n\n### Custom Class Serialization\n\nClass instances **can** be serialized across workflow\u002Fstep boundaries by implementing the `@workflow\u002Fserde` protocol. This is essential when a class has instance methods with `\"use step\"` or when you want to pass class instances between steps.\n\n**Install:** `@workflow\u002Fserde` must be a dependency of the package containing the class.\n\n**Pattern:** Add two static methods inside the class body using computed property syntax:\n\n```typescript\nimport { WORKFLOW_SERIALIZE, WORKFLOW_DESERIALIZE } from \"@workflow\u002Fserde\";\n\nexport class Point {\n  x: number;\n  y: number;\n\n  constructor(x: number, y: number) {\n    this.x = x;\n    this.y = y;\n  }\n\n  \u002F\u002F Serialize: return plain data (must be devalue-compatible types only)\n  static [WORKFLOW_SERIALIZE](instance: Point) {\n    return { x: instance.x, y: instance.y };\n  }\n\n  \u002F\u002F Deserialize: reconstruct from plain data\n  static [WORKFLOW_DESERIALIZE](data: { x: number; y: number }) {\n    return new Point(data.x, data.y);\n  }\n\n  async computeDistance(other: Point) {\n    \"use step\";\n    return Math.sqrt((this.x - other.x) ** 2 + (this.y - other.y) ** 2);\n  }\n}\n```\n\n**Critical rules:**\n1. **Define serde methods INSIDE the class body** as static methods with computed property syntax (`static [WORKFLOW_SERIALIZE](...)`). The SWC plugin detects them by scanning the class. Do NOT assign them externally (e.g., `(MyClass as any)[WORKFLOW_SERIALIZE] = ...`) -- the compiler will not detect this.\n2. **Serde methods must return only devalue-compatible types** (plain objects, arrays, primitives, Date, Map, Set, Uint8Array, etc.). No functions, no class instances, no Node.js-specific objects.\n3. **Add `\"use step\"` to Node.js-dependent instance methods.** The SWC plugin strips `\"use step\"` method bodies from the workflow bundle. This is how you keep Node.js imports (fs, crypto, child_process, etc.) out of the workflow sandbox. The class shell with its serde methods remains in the workflow bundle; only the step method bodies are removed.\n4. **Do NOT manually register classes.** The SWC plugin automatically generates registration code (an IIFE that sets `classId` and adds the class to the global registry). Manual calls to `registerSerializationClass()` are unnecessary and error-prone.\n5. **Do NOT use dynamic imports to work around sandbox restrictions.** If a class method needs Node.js APIs, the correct solution is `\"use step\"`, not `\u002F* @vite-ignore *\u002F import(...)`.\n\n**When serde works well:** Pure data classes, domain models, configuration objects, and classes where Node.js-dependent methods can be marked with `\"use step\"`.\n\n**When to avoid serde:** If a class is fundamentally inseparable from Node.js APIs (every method needs `fs`, `net`, etc.) and cannot meaningfully exist as a shell in the workflow sandbox, keep it entirely in step functions and pass plain data objects across boundaries instead.\n\n### Validating Serde Compliance\n\nUse these tools to verify classes are correctly set up:\n\n- **`workflow transform \u003Cfile> --check-serde`** -- Shows the SWC transform output for a file and checks if serde classes are compliant (no Node.js imports remaining in the workflow bundle).\n- **`workflow validate`** -- Scans all workflow files and reports serde compliance issues. Use `--json` for machine-readable output.\n- **SWC Playground** -- The web playground at `workbench\u002Fswc-playground` shows a Serde Analysis panel when serde patterns are detected.\n- **Build-time warnings** -- The builder automatically warns when serde classes have Node.js built-in imports remaining in the workflow bundle.\n\n## Streaming\n\nUse `getWritable()` to stream data from workflows. `getWritable()` can be called in **both** workflow and step contexts, but you **cannot interact with the stream** (call `getWriter()`, `write()`, `close()`) directly in a workflow function. The stream must be passed to step functions for actual I\u002FO, or steps can call `getWritable()` themselves.\n\n**Get the stream in a workflow, pass it to a step:**\n```typescript\nimport { getWritable } from \"workflow\";\n\nexport async function myWorkflow() {\n  \"use workflow\";\n  const writable = getWritable();\n  await writeData(writable, \"hello world\");\n}\n\nasync function writeData(writable: WritableStream, chunk: string) {\n  \"use step\";\n  const writer = writable.getWriter();\n  try {\n    await writer.write(chunk);\n  } finally {\n    writer.releaseLock();\n  }\n}\n```\n\n**Call `getWritable()` directly inside a step (no need to pass it):**\n```typescript\nimport { getWritable } from \"workflow\";\n\nasync function streamData(chunk: string) {\n  \"use step\";\n  const writer = getWritable().getWriter();\n  try {\n    await writer.write(chunk);\n  } finally {\n    writer.releaseLock();\n  }\n}\n```\n\n### Namespaced Streams\n\nUse `getWritable({ namespace: 'name' })` to create multiple independent streams for different types of data. This is useful for separating logs from primary output, different log levels, agent outputs, metrics, or any distinct data channels. Long-running workflows benefit from namespaced streams because you can replay only the important events (e.g., final results) while keeping verbose logs in a separate stream.\n\n**Example: Log levels and agent output separation:**\n```typescript\nimport { getWritable } from \"workflow\";\n\ntype LogEntry = { level: \"debug\" | \"info\" | \"warn\" | \"error\"; message: string; timestamp: number };\ntype AgentOutput = { type: \"thought\" | \"action\" | \"result\"; content: string };\n\nasync function logDebug(message: string) {\n  \"use step\";\n  const writer = getWritable\u003CLogEntry>({ namespace: \"logs:debug\" }).getWriter();\n  try {\n    await writer.write({ level: \"debug\", message, timestamp: Date.now() });\n  } finally {\n    writer.releaseLock();\n  }\n}\n\nasync function logInfo(message: string) {\n  \"use step\";\n  const writer = getWritable\u003CLogEntry>({ namespace: \"logs:info\" }).getWriter();\n  try {\n    await writer.write({ level: \"info\", message, timestamp: Date.now() });\n  } finally {\n    writer.releaseLock();\n  }\n}\n\nasync function emitAgentThought(thought: string) {\n  \"use step\";\n  const writer = getWritable\u003CAgentOutput>({ namespace: \"agent:thoughts\" }).getWriter();\n  try {\n    await writer.write({ type: \"thought\", content: thought });\n  } finally {\n    writer.releaseLock();\n  }\n}\n\nasync function emitAgentResult(result: string) {\n  \"use step\";\n  \u002F\u002F Important results go to the default stream for easy replay\n  const writer = getWritable\u003CAgentOutput>().getWriter();\n  try {\n    await writer.write({ type: \"result\", content: result });\n  } finally {\n    writer.releaseLock();\n  }\n}\n\nexport async function agentWorkflow(task: string) {\n  \"use workflow\";\n  \n  await logInfo(`Starting task: ${task}`);\n  await logDebug(\"Initializing agent context\");\n  await emitAgentThought(\"Analyzing the task requirements...\");\n  \n  \u002F\u002F ... agent processing ...\n  \n  await emitAgentResult(\"Task completed successfully\");\n  await logInfo(\"Workflow finished\");\n}\n```\n\n**Consuming namespaced streams:**\n```typescript\nimport { start, getRun } from \"workflow\u002Fapi\";\nimport { agentWorkflow } from \".\u002Fworkflows\u002Fagent\";\n\nexport async function POST(request: Request) {\n  const run = await start(agentWorkflow, [\"process data\"]);\n\n  \u002F\u002F Access specific streams by namespace\n  const results = run.getReadable({ namespace: undefined }); \u002F\u002F Default stream (important results)\n  const infoLogs = run.getReadable({ namespace: \"logs:info\" });\n  const debugLogs = run.getReadable({ namespace: \"logs:debug\" });\n  const thoughts = run.getReadable({ namespace: \"agent:thoughts\" });\n\n  \u002F\u002F Return only important results for most clients\n  return new Response(results, { headers: { \"Content-Type\": \"application\u002Fjson\" } });\n}\n\n\u002F\u002F Resume from a specific point (useful for long sessions)\nexport async function GET(request: Request) {\n  const { searchParams } = new URL(request.url);\n  const runId = searchParams.get(\"runId\")!;\n  const startIndex = parseInt(searchParams.get(\"startIndex\") || \"0\", 10);\n  \n  const run = getRun(runId);\n  \u002F\u002F Resume only the important stream, skip verbose debug logs\n  const stream = run.getReadable({ startIndex });\n  \n  return new Response(stream);\n}\n```\n\n**Pro tip:** For very long-running sessions (50+ minutes), namespaced streams help manage replay performance. Put verbose\u002Fdebug output in separate namespaces so you can replay just the important events quickly.\n\n## Debugging\n\n```bash\n# Check workflow endpoints are reachable\nnpx workflow health\nnpx workflow health --port 3001  # Non-default port\n\n# Visual dashboard for runs\nnpx workflow web\nnpx workflow web \u003Crun_id>\n\n# CLI inspection (use --json for machine-readable output, --help for full usage)\nnpx workflow inspect runs\nnpx workflow inspect run \u003Crun_id>\n\n# For Vercel-deployed projects, specify backend and project\nnpx workflow inspect runs --backend vercel --project \u003Cproject-name> --team \u003Cteam-slug>\nnpx workflow inspect run \u003Crun_id> --backend vercel --project \u003Cproject-name> --team \u003Cteam-slug>\n\n# Open Vercel dashboard in browser for a specific run\nnpx workflow inspect run \u003Crun_id> --web\nnpx workflow web \u003Crun_id> --backend vercel --project \u003Cproject-name> --team \u003Cteam-slug>\n\n# Cancel a running workflow\nnpx workflow cancel \u003Crun_id>\nnpx workflow cancel \u003Crun_id> --backend vercel --project \u003Cproject-name> --team \u003Cteam-slug>\n# --env defaults to \"production\"; use --env preview for preview deployments\n```\n\n### Deep-linking to a run (share a URL, no browser)\n\nUse `--url` to **print** the dashboard deep link and exit — no browser opens and\nno local server starts. This is the right tool when you need to hand a user a\nclickable link (PR comment, Slack message, debugging summary) rather than open a\nUI. (`--web` opens the dashboard; `--url` only prints the link.)\n\n```bash\n# Vercel run — prints the Vercel dashboard URL for the run\nnpx workflow inspect run \u003Crun_id> --backend vercel --project \u003Cproject> --team \u003Cteam> --url\nnpx workflow web \u003Crun_id> --backend vercel --project \u003Cproject> --team \u003Cteam> --env preview --url\n\n# Local run — prints the local web UI deep link\nnpx workflow inspect run \u003Crun_id> --url\n\n# Machine-readable: --url --json prints { \"url\": \"...\" } to stdout\nnpx workflow inspect run \u003Crun_id> --backend vercel --url --json\n```\n\nURL formats produced:\n\n- **Vercel:** `https:\u002F\u002Fvercel.com\u002F\u003Cteam-slug>\u002F\u003Cproject-slug>\u002Fworkflows\u002Fruns\u002F\u003Crun_id>?environment=\u003Cproduction|preview>`\n  (`--env` selects the environment; defaults to `production`. Resolving the team\n  slug requires being logged in via `vercel login` with the project linked.)\n- **Local:** `http:\u002F\u002Flocalhost:\u003Cport>?resource=run&id=\u003Crun_id>` (port defaults\n  to `3456`; the link works while the `npx workflow web` server is running).\n\nstdout contains **only** the URL (or the JSON object) — all other output goes to\nstderr — so you can capture it directly, e.g. `URL=$(npx workflow web \u003Crun_id> --backend vercel --url)`.\n\n**Debugging tips:**\n- Use `--json` (`-j`) on any command for machine-readable output\n- Use `--web` to open the Vercel Observability dashboard in your browser, or `--url` to just print the deep link\n- Use `--help` on any command for full usage details\n- Only import workflow APIs you actually use. Unused imports can cause 500 errors.\n\n## Testing Workflows\n\nWorkflow SDK provides a Vitest plugin for testing workflows in-process — no running server required.\n\n**Unit testing steps:** Steps are just functions; without the compiler, `\"use step\"` is a no-op. Test them directly:\n\n```typescript\nimport { describe, it, expect } from \"vitest\";\nimport { createUser } from \".\u002Fuser-signup\";\n\ndescribe(\"createUser step\", () => {\n  it(\"should create a user\", async () => {\n    const user = await createUser(\"test@example.com\");\n    expect(user.email).toBe(\"test@example.com\");\n  });\n});\n```\n\n**Integration testing:** Use `@workflow\u002Fvitest` for workflows using `sleep()`, hooks, webhooks, or retries:\n\n```typescript\n\u002F\u002F vitest.integration.config.ts\nimport { defineConfig } from \"vitest\u002Fconfig\";\nimport { workflow } from \"@workflow\u002Fvitest\";\n\nexport default defineConfig({\n  plugins: [workflow()],\n  test: {\n    include: [\"**\u002F*.integration.test.ts\"],\n    testTimeout: 60_000,\n  },\n});\n```\n\n```typescript\n\u002F\u002F approval.integration.test.ts\nimport { describe, it, expect } from \"vitest\";\nimport { start, getRun, resumeHook } from \"workflow\u002Fapi\";\nimport { waitForHook, waitForSleep } from \"@workflow\u002Fvitest\";\nimport { approvalWorkflow } from \".\u002Fapproval\";\n\ndescribe(\"approvalWorkflow\", () => {\n  it(\"should publish when approved\", async () => {\n    const run = await start(approvalWorkflow, [\"doc-123\"]);\n\n    \u002F\u002F Wait for the hook, then resume it\n    await waitForHook(run, { token: \"approval:doc-123\" });\n    await resumeHook(\"approval:doc-123\", { approved: true, reviewer: \"alice\" });\n\n    \u002F\u002F Wait for sleep, then wake it up\n    const sleepId = await waitForSleep(run);\n    await getRun(run.runId).wakeUp({ correlationIds: [sleepId] });\n\n    const result = await run.returnValue;\n    expect(result).toEqual({ status: \"published\", reviewer: \"alice\" });\n  });\n});\n```\n\n**Testing webhooks:** Use `resumeWebhook()` with a `Request` object — no HTTP server needed:\n\n```typescript\nimport { start, resumeWebhook } from \"workflow\u002Fapi\";\nimport { waitForHook } from \"@workflow\u002Fvitest\";\n\nconst run = await start(ingestWorkflow, [\"ep-1\"]);\nconst hook = await waitForHook(run);  \u002F\u002F Discovers the random webhook token\nawait resumeWebhook(hook.token, new Request(\"https:\u002F\u002Fexample.com\u002Fwebhook\", {\n  method: \"POST\",\n  body: JSON.stringify({ event: \"order.created\" }),\n}));\n```\n\n**Key APIs:**\n- `start()` — trigger a workflow\n- `run.returnValue` — await workflow completion\n- `waitForHook(run, { token? })` \u002F `waitForSleep(run)` — wait for workflow to reach a pause point\n- `resumeHook(token, data)` \u002F `resumeWebhook(token, request)` — resume paused workflows\n- `getRun(runId).wakeUp({ correlationIds })` — skip `sleep()` calls\n\n**Best practices:**\n- Keep unit tests (no plugin) and integration tests (`workflow()` plugin) in separate configs\n- Use deterministic hook tokens based on test data for easier resumption\n- Set generous `testTimeout` — workflows may run longer than typical unit tests\n- `vi.mock()` does **not** work in integration tests — step dependencies are bundled by esbuild\n\n## Observability & World SDK\n\nUse `await getWorld()` to build observability dashboards, admin panels, and inspect workflow state. `getWorld()` is asynchronous and returns `Promise\u003CWorld>` (dynamic import \u002F env-based setup).\n\n**Key imports:**\n```typescript\nimport { getWorld } from \"workflow\u002Fruntime\";\nimport { hydrateResourceIO, observabilityRevivers, parseStepName, parseWorkflowName } from \"workflow\u002Fobservability\";\n```\n\n**Key docs** (grep `node_modules\u002Fworkflow\u002Fdocs\u002F` for full details):\n- `api-reference\u002Fworkflow-runtime\u002Fworld\u002Fstorage.mdx` — events, runs, steps, hooks (events are source of truth; others are materialized views)\n- `api-reference\u002Fworkflow-observability\u002F` — hydration and name parsing\n\n### World SDK Method Signatures\n\n⚠️ Pagination is nested: `{ pagination: { cursor } }` — NOT `{ cursor }` directly.\n\n```typescript\nconst world = await getWorld();\n\n\u002F\u002F Runs\nconst { data, cursor } = await world.runs.list({ pagination: { cursor }, resolveData: 'all' | 'none' });\nconst run = await world.runs.get(runId, { resolveData: 'all' | 'none' });\n\u002F\u002F Cancel via event creation (no cancel() method on runs)\nawait world.events.create(runId, { eventType: 'run_cancelled' });\n\n\u002F\u002F Steps — runId is top-level, NOT inside pagination\nconst { data, cursor } = await world.steps.list({ runId, pagination: { cursor }, resolveData: 'all' | 'none' });\nconst step = await world.steps.get(runId, stepId, { resolveData: 'all' | 'none' });\n\n\u002F\u002F Events\nconst { data, cursor } = await world.events.list({ runId, pagination: { cursor } });\nawait world.events.create(runId, { eventType: 'run_cancelled' });\n\n\u002F\u002F Hooks\nconst hook = await world.hooks.get(hookId);\nconst hook = await world.hooks.getByToken(token);\n\n\u002F\u002F Streams (methods on world.streams)\nawait world.streams.write(runId, name, chunk);\nawait world.streams.writeMulti?.(runId, name, chunks);\nconst readable = await world.streams.get(runId, name, startIndex);\nawait world.streams.close(runId, name);\nconst streamNames = await world.streams.list(runId);\nconst chunks = await world.streams.getChunks(runId, name, { limit, cursor });\nconst info = await world.streams.getInfo(runId, name);\n\n\u002F\u002F Queue (methods live directly on world — internal SDK infrastructure)\nawait world.queue(queueName, payload, opts);\nconst deploymentId = await world.getDeploymentId();\n```\n\n### `resolveData` Parameter\n\nControls whether input\u002Foutput data is **included** in the response. Accepts `'all'` (default) or `'none'`.\n\n**IMPORTANT**: Even with `'all'`, data is still devalue-serialized. You MUST call `hydrateResourceIO()` to get usable JS values.\n\n- **Use `'none'`** for status polling, progress dashboards, run listings\n- **Use `'all'`** (or omit) when you need to inspect actual step I\u002FO data — then **always hydrate**\n\n```typescript\n\u002F\u002F Lightweight status check — no I\u002FO loaded\nconst run = await world.runs.get(runId, { resolveData: 'none' });\nconsole.log(run.status); \u002F\u002F 'running' | 'completed' | 'failed' | 'cancelled'\n\n\u002F\u002F Full inspection — resolveData includes data, hydrateResourceIO deserializes it\nconst step = await world.steps.get(runId, stepId); \u002F\u002F defaults to 'all'\nconst hydrated = hydrateResourceIO(step, observabilityRevivers);\n```\n\n> **Common mistake**: Checking `step.input !== undefined` after `resolveData: 'all'` and assuming\n> the data is ready to use. The data exists but is serialized — always hydrate first.\n\n### Data Hydration (Devalue Format)\n\nStep I\u002FO is serialized via [devalue](https:\u002F\u002Fgithub.com\u002FRich-Harris\u002Fdevalue) with a 4-byte format prefix (`devl`). Without hydration, `input`\u002F`output` are Uint8Array-like objects with numeric keys:\n`{\"0\":100,\"1\":101,\"2\":118,\"3\":108,...}` — these are NOT usable values.\n\n**Always hydrate before using I\u002FO data:**\n\n```typescript\nimport { hydrateResourceIO, observabilityRevivers } from \"workflow\u002Fobservability\";\n\nconst { data: steps } = await world.steps.list({ runId, resolveData: 'all' });\nconst hydrated = steps.map(s => hydrateResourceIO(s, observabilityRevivers));\n\u002F\u002F hydrated[0].input → [123, 2] (actual function arguments)\n\u002F\u002F hydrated[0].output → 125 (actual return value)\n```\n\n`hydrateResourceIO` works on both `Step` and `WorkflowRun` objects. For encrypted workflows, use `getEncryptionKeyForRun()` + `hydrateResourceIOWithKey()`.\n\n### Name Parsing\n\n`parseWorkflowName()`, `parseStepName()`, and `parseClassName()` return `{ shortName: string, moduleSpecifier: string } | null`. Always use optional chaining:\n\n```typescript\nconst parsed = parseWorkflowName(\"workflow\u002F\u002F.\u002Fsrc\u002Fworkflows\u002Forder\u002F\u002FprocessOrder\");\n\u002F\u002F parsed?.shortName → \"processOrder\"\n\u002F\u002F parsed?.moduleSpecifier → \".\u002Fsrc\u002Fworkflows\u002Forder\"\n\u002F\u002F ⚠️ Returns null if format doesn't match\n```\n\n### Event Types\n\nEvents are the append-only source of truth. Runs\u002FSteps\u002FHooks are materialized views.\n\n| Category | Types |\n|----------|-------|\n| Run | `run_created`, `run_started`, `run_completed`, `run_failed`, `run_cancelled` |\n| Step | `step_created`, `step_started`, `step_completed`, `step_failed`, `step_retrying` |\n| Hook | `hook_created`, `hook_received`, `hook_disposed`, `hook_conflict` |\n| Wait | `wait_created`, `wait_completed` |\n\n## Error Handling Patterns\n\nThree error strategies for different failure modes:\n\n| Error Type | Use When | Behavior |\n|------------|----------|----------|\n| `FatalError` | Permanent failure (bad input, auth denied) | Terminates workflow immediately, no retry |\n| `RetryableError` | Transient failure (rate limit, timeout) | Retries with optional `retryAfter` delay |\n| `Promise.allSettled` | Parallel steps with mixed criticality | Continues even if some steps fail |\n\n```typescript\nimport { FatalError, RetryableError } from \"workflow\";\n\n\u002F\u002F Permanent failure — workflow terminates\nthrow new FatalError(\"Invalid input: missing required field\");\n\n\u002F\u002F Transient failure — will retry\nthrow new RetryableError(\"API rate limited\", { retryAfter: \"5m\" });\n\n\u002F\u002F Mixed criticality parallel execution\nconst results = await Promise.allSettled([\n  criticalStep(data),    \u002F\u002F Must succeed\n  optionalStep(data),    \u002F\u002F OK to fail\n  enrichmentStep(data),  \u002F\u002F OK to fail\n]);\nconst [critical, optional, enrichment] = results;\nif (critical.status === \"rejected\") throw new FatalError(critical.reason);\n```\n",{"data":35,"body":39},{"name":4,"description":6,"metadata":36},{"author":37,"version":38},"Vercel Inc.","1.10",{"type":40,"children":41},"root",[42,65,78,97,110,147,158,258,263,320,328,335,369,375,383,453,461,1045,1051,1077,1696,1706,1712,1717,1829,1837,1986,2010,2016,2035,2945,2953,3058,3079,3085,3109,3381,3389,3743,3761,3767,3823,3829,4107,4113,4134,4517,4530,4536,4773,4779,4799,5111,5117,5122,5132,5142,5148,5175,5191,5201,5900,5908,6021,6037,6062,6068,6073,6140,6146,6208,6216,6620,6635,6884,6890,6902,6910,8685,8693,9708,9718,9724,10369,10375,10409,10731,10736,10813,10832,10840,10896,10902,10907,10924,11268,11293,11545,12376,12401,12769,12777,12854,12862,12914,12920,12948,12956,13067,13084,13108,13114,13135,14612,14624,14651,14676,14712,14964,14994,15000,15045,15053,15298,15339,15345,15379,15455,15461,15466,15638,15644,15649,15748,16194],{"type":43,"tag":44,"props":45,"children":47},"element","h2",{"id":46},"critical-always-use-correct-workflow-documentation",[48,55,57,63],{"type":43,"tag":49,"props":50,"children":51},"em",{},[52],{"type":53,"value":54},"text","CRITICAL",{"type":53,"value":56},": Always Use Correct ",{"type":43,"tag":58,"props":59,"children":61},"code",{"className":60},[],[62],{"type":53,"value":4},{"type":53,"value":64}," Documentation",{"type":43,"tag":66,"props":67,"children":68},"p",{},[69,71,76],{"type":53,"value":70},"Your knowledge of ",{"type":43,"tag":58,"props":72,"children":74},{"className":73},[],[75],{"type":53,"value":4},{"type":53,"value":77}," is outdated.",{"type":43,"tag":66,"props":79,"children":80},{},[81,83,88,90,95],{"type":53,"value":82},"The ",{"type":43,"tag":58,"props":84,"children":86},{"className":85},[],[87],{"type":53,"value":4},{"type":53,"value":89}," documentation outlined below matches the installed version of the Workflow SDK.\nFollow these instructions before starting on any ",{"type":43,"tag":58,"props":91,"children":93},{"className":92},[],[94],{"type":53,"value":4},{"type":53,"value":96},"-related tasks:",{"type":43,"tag":66,"props":98,"children":99},{},[100,102,108],{"type":53,"value":101},"Search the bundled documentation in ",{"type":43,"tag":58,"props":103,"children":105},{"className":104},[],[106],{"type":53,"value":107},"node_modules\u002Fworkflow\u002Fdocs\u002F",{"type":53,"value":109},":",{"type":43,"tag":111,"props":112,"children":113},"ol",{},[114,132],{"type":43,"tag":115,"props":116,"children":117},"li",{},[118,124,126],{"type":43,"tag":119,"props":120,"children":121},"strong",{},[122],{"type":53,"value":123},"Find docs",{"type":53,"value":125},": ",{"type":43,"tag":58,"props":127,"children":129},{"className":128},[],[130],{"type":53,"value":131},"glob \"node_modules\u002Fworkflow\u002Fdocs\u002F**\u002F*.mdx\"",{"type":43,"tag":115,"props":133,"children":134},{},[135,140,141],{"type":43,"tag":119,"props":136,"children":137},{},[138],{"type":53,"value":139},"Search content",{"type":53,"value":125},{"type":43,"tag":58,"props":142,"children":144},{"className":143},[],[145],{"type":53,"value":146},"grep \"your query\" node_modules\u002Fworkflow\u002Fdocs\u002F",{"type":43,"tag":66,"props":148,"children":149},{},[150,152,157],{"type":53,"value":151},"Documentation structure in ",{"type":43,"tag":58,"props":153,"children":155},{"className":154},[],[156],{"type":53,"value":107},{"type":53,"value":109},{"type":43,"tag":159,"props":160,"children":161},"ul",{},[162,173,184,195,206,225,236,247],{"type":43,"tag":115,"props":163,"children":164},{},[165,171],{"type":43,"tag":58,"props":166,"children":168},{"className":167},[],[169],{"type":53,"value":170},"getting-started\u002F",{"type":53,"value":172}," - Framework setup (next.mdx, express.mdx, hono.mdx, etc.)",{"type":43,"tag":115,"props":174,"children":175},{},[176,182],{"type":43,"tag":58,"props":177,"children":179},{"className":178},[],[180],{"type":53,"value":181},"foundations\u002F",{"type":53,"value":183}," - Core concepts (workflows-and-steps.mdx, hooks.mdx, streaming.mdx, etc.)",{"type":43,"tag":115,"props":185,"children":186},{},[187,193],{"type":43,"tag":58,"props":188,"children":190},{"className":189},[],[191],{"type":53,"value":192},"api-reference\u002Fworkflow\u002F",{"type":53,"value":194}," - API docs (sleep.mdx, create-hook.mdx, fatal-error.mdx, etc.)",{"type":43,"tag":115,"props":196,"children":197},{},[198,204],{"type":43,"tag":58,"props":199,"children":201},{"className":200},[],[202],{"type":53,"value":203},"api-reference\u002Fworkflow-api\u002F",{"type":53,"value":205}," - Client API (start.mdx, get-run.mdx, resume-hook.mdx, etc.)",{"type":43,"tag":115,"props":207,"children":208},{},[209,215,217,223],{"type":43,"tag":58,"props":210,"children":212},{"className":211},[],[213],{"type":53,"value":214},"api-reference\u002Fworkflow-runtime\u002F",{"type":53,"value":216}," - Runtime API (get-world.mdx) and ",{"type":43,"tag":58,"props":218,"children":220},{"className":219},[],[221],{"type":53,"value":222},"world\u002F",{"type":53,"value":224}," World SDK (storage.mdx, streams.mdx, queue.mdx)",{"type":43,"tag":115,"props":226,"children":227},{},[228,234],{"type":43,"tag":58,"props":229,"children":231},{"className":230},[],[232],{"type":53,"value":233},"api-reference\u002Fworkflow-observability\u002F",{"type":53,"value":235}," - Hydration and name parsing utilities (hydrate-resource-io.mdx, parse-workflow-name.mdx, etc.)",{"type":43,"tag":115,"props":237,"children":238},{},[239,245],{"type":43,"tag":58,"props":240,"children":242},{"className":241},[],[243],{"type":53,"value":244},"ai\u002F",{"type":53,"value":246}," - AI SDK integration docs",{"type":43,"tag":115,"props":248,"children":249},{},[250,256],{"type":43,"tag":58,"props":251,"children":253},{"className":252},[],[254],{"type":53,"value":255},"errors\u002F",{"type":53,"value":257}," - Error code documentation",{"type":43,"tag":66,"props":259,"children":260},{},[261],{"type":53,"value":262},"Related packages also include bundled docs:",{"type":43,"tag":159,"props":264,"children":265},{},[266,284,302],{"type":43,"tag":115,"props":267,"children":268},{},[269,275,276,282],{"type":43,"tag":58,"props":270,"children":272},{"className":271},[],[273],{"type":53,"value":274},"@workflow\u002Fai",{"type":53,"value":125},{"type":43,"tag":58,"props":277,"children":279},{"className":278},[],[280],{"type":53,"value":281},"node_modules\u002F@workflow\u002Fai\u002Fdocs\u002F",{"type":53,"value":283}," - DurableAgent and AI integration",{"type":43,"tag":115,"props":285,"children":286},{},[287,293,294,300],{"type":43,"tag":58,"props":288,"children":290},{"className":289},[],[291],{"type":53,"value":292},"@workflow\u002Fcore",{"type":53,"value":125},{"type":43,"tag":58,"props":295,"children":297},{"className":296},[],[298],{"type":53,"value":299},"node_modules\u002F@workflow\u002Fcore\u002Fdocs\u002F",{"type":53,"value":301}," - Core runtime (foundations, how-it-works)",{"type":43,"tag":115,"props":303,"children":304},{},[305,311,312,318],{"type":43,"tag":58,"props":306,"children":308},{"className":307},[],[309],{"type":53,"value":310},"@workflow\u002Fnext",{"type":53,"value":125},{"type":43,"tag":58,"props":313,"children":315},{"className":314},[],[316],{"type":53,"value":317},"node_modules\u002F@workflow\u002Fnext\u002Fdocs\u002F",{"type":53,"value":319}," - Next.js integration",{"type":43,"tag":66,"props":321,"children":322},{},[323],{"type":43,"tag":119,"props":324,"children":325},{},[326],{"type":53,"value":327},"When in doubt, update to the latest version of the Workflow SDK.",{"type":43,"tag":329,"props":330,"children":332},"h3",{"id":331},"official-resources",[333],{"type":53,"value":334},"Official Resources",{"type":43,"tag":159,"props":336,"children":337},{},[338,355],{"type":43,"tag":115,"props":339,"children":340},{},[341,346,347],{"type":43,"tag":119,"props":342,"children":343},{},[344],{"type":53,"value":345},"Website",{"type":53,"value":125},{"type":43,"tag":348,"props":349,"children":353},"a",{"href":350,"rel":351},"https:\u002F\u002Fworkflow-sdk.dev",[352],"nofollow",[354],{"type":53,"value":350},{"type":43,"tag":115,"props":356,"children":357},{},[358,363,364],{"type":43,"tag":119,"props":359,"children":360},{},[361],{"type":53,"value":362},"GitHub",{"type":53,"value":125},{"type":43,"tag":348,"props":365,"children":367},{"href":24,"rel":366},[352],[368],{"type":53,"value":24},{"type":43,"tag":329,"props":370,"children":372},{"id":371},"quick-reference",[373],{"type":53,"value":374},"Quick Reference",{"type":43,"tag":66,"props":376,"children":377},{},[378],{"type":43,"tag":119,"props":379,"children":380},{},[381],{"type":53,"value":382},"Directives:",{"type":43,"tag":384,"props":385,"children":390},"pre",{"className":386,"code":387,"language":388,"meta":389,"style":389},"language-typescript shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","\"use workflow\";  \u002F\u002F First line - makes async function durable\n\"use step\";      \u002F\u002F First line - makes function a cached, retryable unit\n","typescript","",[391],{"type":43,"tag":58,"props":392,"children":393},{"__ignoreMap":389},[394,427],{"type":43,"tag":395,"props":396,"children":399},"span",{"class":397,"line":398},"line",1,[400,406,412,416,421],{"type":43,"tag":395,"props":401,"children":403},{"style":402},"--shiki-light:#39ADB5;--shiki-default:#89DDFF;--shiki-dark:#89DDFF",[404],{"type":53,"value":405},"\"",{"type":43,"tag":395,"props":407,"children":409},{"style":408},"--shiki-light:#91B859;--shiki-default:#C3E88D;--shiki-dark:#C3E88D",[410],{"type":53,"value":411},"use workflow",{"type":43,"tag":395,"props":413,"children":414},{"style":402},[415],{"type":53,"value":405},{"type":43,"tag":395,"props":417,"children":418},{"style":402},[419],{"type":53,"value":420},";",{"type":43,"tag":395,"props":422,"children":424},{"style":423},"--shiki-light:#90A4AE;--shiki-light-font-style:italic;--shiki-default:#546E7A;--shiki-default-font-style:italic;--shiki-dark:#676E95;--shiki-dark-font-style:italic",[425],{"type":53,"value":426},"  \u002F\u002F First line - makes async function durable\n",{"type":43,"tag":395,"props":428,"children":430},{"class":397,"line":429},2,[431,435,440,444,448],{"type":43,"tag":395,"props":432,"children":433},{"style":402},[434],{"type":53,"value":405},{"type":43,"tag":395,"props":436,"children":437},{"style":408},[438],{"type":53,"value":439},"use step",{"type":43,"tag":395,"props":441,"children":442},{"style":402},[443],{"type":53,"value":405},{"type":43,"tag":395,"props":445,"children":446},{"style":402},[447],{"type":53,"value":420},{"type":43,"tag":395,"props":449,"children":450},{"style":423},[451],{"type":53,"value":452},"      \u002F\u002F First line - makes function a cached, retryable unit\n",{"type":43,"tag":66,"props":454,"children":455},{},[456],{"type":43,"tag":119,"props":457,"children":458},{},[459],{"type":53,"value":460},"Essential imports:",{"type":43,"tag":384,"props":462,"children":464},{"className":386,"code":463,"language":388,"meta":389,"style":389},"\u002F\u002F Workflow primitives\nimport { sleep, fetch, createHook, createWebhook, getWritable } from \"workflow\";\nimport { FatalError, RetryableError } from \"workflow\";\nimport { getWorkflowMetadata, getStepMetadata } from \"workflow\";\n\n\u002F\u002F API operations\nimport { start, getRun, resumeHook, resumeWebhook } from \"workflow\u002Fapi\";\n\n\u002F\u002F Observability & data hydration\nimport { hydrateResourceIO, observabilityRevivers, parseStepName, parseWorkflowName } from \"workflow\u002Fobservability\";\n\n\u002F\u002F Framework integrations\nimport { withWorkflow } from \"workflow\u002Fnext\";\nimport { workflow } from \"workflow\u002Fvite\";\nimport { workflow } from \"workflow\u002Fastro\";\n\u002F\u002F Or use modules: [\"workflow\u002Fnitro\"] for Nitro\u002FNuxt\n\n\u002F\u002F AI agent\nimport { DurableAgent } from \"@workflow\u002Fai\u002Fagent\";\n",[465],{"type":43,"tag":58,"props":466,"children":467},{"__ignoreMap":389},[468,476,561,611,661,671,680,749,757,766,835,843,852,894,936,977,986,994,1003],{"type":43,"tag":395,"props":469,"children":470},{"class":397,"line":398},[471],{"type":43,"tag":395,"props":472,"children":473},{"style":423},[474],{"type":53,"value":475},"\u002F\u002F Workflow primitives\n",{"type":43,"tag":395,"props":477,"children":478},{"class":397,"line":429},[479,485,490,496,501,506,510,515,519,524,528,533,538,543,548,552,556],{"type":43,"tag":395,"props":480,"children":482},{"style":481},"--shiki-light:#39ADB5;--shiki-light-font-style:italic;--shiki-default:#89DDFF;--shiki-default-font-style:italic;--shiki-dark:#89DDFF;--shiki-dark-font-style:italic",[483],{"type":53,"value":484},"import",{"type":43,"tag":395,"props":486,"children":487},{"style":402},[488],{"type":53,"value":489}," {",{"type":43,"tag":395,"props":491,"children":493},{"style":492},"--shiki-light:#90A4AE;--shiki-default:#EEFFFF;--shiki-dark:#BABED8",[494],{"type":53,"value":495}," sleep",{"type":43,"tag":395,"props":497,"children":498},{"style":402},[499],{"type":53,"value":500},",",{"type":43,"tag":395,"props":502,"children":503},{"style":492},[504],{"type":53,"value":505}," fetch",{"type":43,"tag":395,"props":507,"children":508},{"style":402},[509],{"type":53,"value":500},{"type":43,"tag":395,"props":511,"children":512},{"style":492},[513],{"type":53,"value":514}," createHook",{"type":43,"tag":395,"props":516,"children":517},{"style":402},[518],{"type":53,"value":500},{"type":43,"tag":395,"props":520,"children":521},{"style":492},[522],{"type":53,"value":523}," createWebhook",{"type":43,"tag":395,"props":525,"children":526},{"style":402},[527],{"type":53,"value":500},{"type":43,"tag":395,"props":529,"children":530},{"style":492},[531],{"type":53,"value":532}," getWritable",{"type":43,"tag":395,"props":534,"children":535},{"style":402},[536],{"type":53,"value":537}," }",{"type":43,"tag":395,"props":539,"children":540},{"style":481},[541],{"type":53,"value":542}," from",{"type":43,"tag":395,"props":544,"children":545},{"style":402},[546],{"type":53,"value":547}," \"",{"type":43,"tag":395,"props":549,"children":550},{"style":408},[551],{"type":53,"value":4},{"type":43,"tag":395,"props":553,"children":554},{"style":402},[555],{"type":53,"value":405},{"type":43,"tag":395,"props":557,"children":558},{"style":402},[559],{"type":53,"value":560},";\n",{"type":43,"tag":395,"props":562,"children":564},{"class":397,"line":563},3,[565,569,573,578,582,587,591,595,599,603,607],{"type":43,"tag":395,"props":566,"children":567},{"style":481},[568],{"type":53,"value":484},{"type":43,"tag":395,"props":570,"children":571},{"style":402},[572],{"type":53,"value":489},{"type":43,"tag":395,"props":574,"children":575},{"style":492},[576],{"type":53,"value":577}," FatalError",{"type":43,"tag":395,"props":579,"children":580},{"style":402},[581],{"type":53,"value":500},{"type":43,"tag":395,"props":583,"children":584},{"style":492},[585],{"type":53,"value":586}," RetryableError",{"type":43,"tag":395,"props":588,"children":589},{"style":402},[590],{"type":53,"value":537},{"type":43,"tag":395,"props":592,"children":593},{"style":481},[594],{"type":53,"value":542},{"type":43,"tag":395,"props":596,"children":597},{"style":402},[598],{"type":53,"value":547},{"type":43,"tag":395,"props":600,"children":601},{"style":408},[602],{"type":53,"value":4},{"type":43,"tag":395,"props":604,"children":605},{"style":402},[606],{"type":53,"value":405},{"type":43,"tag":395,"props":608,"children":609},{"style":402},[610],{"type":53,"value":560},{"type":43,"tag":395,"props":612,"children":614},{"class":397,"line":613},4,[615,619,623,628,632,637,641,645,649,653,657],{"type":43,"tag":395,"props":616,"children":617},{"style":481},[618],{"type":53,"value":484},{"type":43,"tag":395,"props":620,"children":621},{"style":402},[622],{"type":53,"value":489},{"type":43,"tag":395,"props":624,"children":625},{"style":492},[626],{"type":53,"value":627}," getWorkflowMetadata",{"type":43,"tag":395,"props":629,"children":630},{"style":402},[631],{"type":53,"value":500},{"type":43,"tag":395,"props":633,"children":634},{"style":492},[635],{"type":53,"value":636}," getStepMetadata",{"type":43,"tag":395,"props":638,"children":639},{"style":402},[640],{"type":53,"value":537},{"type":43,"tag":395,"props":642,"children":643},{"style":481},[644],{"type":53,"value":542},{"type":43,"tag":395,"props":646,"children":647},{"style":402},[648],{"type":53,"value":547},{"type":43,"tag":395,"props":650,"children":651},{"style":408},[652],{"type":53,"value":4},{"type":43,"tag":395,"props":654,"children":655},{"style":402},[656],{"type":53,"value":405},{"type":43,"tag":395,"props":658,"children":659},{"style":402},[660],{"type":53,"value":560},{"type":43,"tag":395,"props":662,"children":664},{"class":397,"line":663},5,[665],{"type":43,"tag":395,"props":666,"children":668},{"emptyLinePlaceholder":667},true,[669],{"type":53,"value":670},"\n",{"type":43,"tag":395,"props":672,"children":674},{"class":397,"line":673},6,[675],{"type":43,"tag":395,"props":676,"children":677},{"style":423},[678],{"type":53,"value":679},"\u002F\u002F API operations\n",{"type":43,"tag":395,"props":681,"children":683},{"class":397,"line":682},7,[684,688,692,697,701,706,710,715,719,724,728,732,736,741,745],{"type":43,"tag":395,"props":685,"children":686},{"style":481},[687],{"type":53,"value":484},{"type":43,"tag":395,"props":689,"children":690},{"style":402},[691],{"type":53,"value":489},{"type":43,"tag":395,"props":693,"children":694},{"style":492},[695],{"type":53,"value":696}," start",{"type":43,"tag":395,"props":698,"children":699},{"style":402},[700],{"type":53,"value":500},{"type":43,"tag":395,"props":702,"children":703},{"style":492},[704],{"type":53,"value":705}," getRun",{"type":43,"tag":395,"props":707,"children":708},{"style":402},[709],{"type":53,"value":500},{"type":43,"tag":395,"props":711,"children":712},{"style":492},[713],{"type":53,"value":714}," resumeHook",{"type":43,"tag":395,"props":716,"children":717},{"style":402},[718],{"type":53,"value":500},{"type":43,"tag":395,"props":720,"children":721},{"style":492},[722],{"type":53,"value":723}," resumeWebhook",{"type":43,"tag":395,"props":725,"children":726},{"style":402},[727],{"type":53,"value":537},{"type":43,"tag":395,"props":729,"children":730},{"style":481},[731],{"type":53,"value":542},{"type":43,"tag":395,"props":733,"children":734},{"style":402},[735],{"type":53,"value":547},{"type":43,"tag":395,"props":737,"children":738},{"style":408},[739],{"type":53,"value":740},"workflow\u002Fapi",{"type":43,"tag":395,"props":742,"children":743},{"style":402},[744],{"type":53,"value":405},{"type":43,"tag":395,"props":746,"children":747},{"style":402},[748],{"type":53,"value":560},{"type":43,"tag":395,"props":750,"children":752},{"class":397,"line":751},8,[753],{"type":43,"tag":395,"props":754,"children":755},{"emptyLinePlaceholder":667},[756],{"type":53,"value":670},{"type":43,"tag":395,"props":758,"children":760},{"class":397,"line":759},9,[761],{"type":43,"tag":395,"props":762,"children":763},{"style":423},[764],{"type":53,"value":765},"\u002F\u002F Observability & data hydration\n",{"type":43,"tag":395,"props":767,"children":769},{"class":397,"line":768},10,[770,774,778,783,787,792,796,801,805,810,814,818,822,827,831],{"type":43,"tag":395,"props":771,"children":772},{"style":481},[773],{"type":53,"value":484},{"type":43,"tag":395,"props":775,"children":776},{"style":402},[777],{"type":53,"value":489},{"type":43,"tag":395,"props":779,"children":780},{"style":492},[781],{"type":53,"value":782}," hydrateResourceIO",{"type":43,"tag":395,"props":784,"children":785},{"style":402},[786],{"type":53,"value":500},{"type":43,"tag":395,"props":788,"children":789},{"style":492},[790],{"type":53,"value":791}," observabilityRevivers",{"type":43,"tag":395,"props":793,"children":794},{"style":402},[795],{"type":53,"value":500},{"type":43,"tag":395,"props":797,"children":798},{"style":492},[799],{"type":53,"value":800}," parseStepName",{"type":43,"tag":395,"props":802,"children":803},{"style":402},[804],{"type":53,"value":500},{"type":43,"tag":395,"props":806,"children":807},{"style":492},[808],{"type":53,"value":809}," parseWorkflowName",{"type":43,"tag":395,"props":811,"children":812},{"style":402},[813],{"type":53,"value":537},{"type":43,"tag":395,"props":815,"children":816},{"style":481},[817],{"type":53,"value":542},{"type":43,"tag":395,"props":819,"children":820},{"style":402},[821],{"type":53,"value":547},{"type":43,"tag":395,"props":823,"children":824},{"style":408},[825],{"type":53,"value":826},"workflow\u002Fobservability",{"type":43,"tag":395,"props":828,"children":829},{"style":402},[830],{"type":53,"value":405},{"type":43,"tag":395,"props":832,"children":833},{"style":402},[834],{"type":53,"value":560},{"type":43,"tag":395,"props":836,"children":838},{"class":397,"line":837},11,[839],{"type":43,"tag":395,"props":840,"children":841},{"emptyLinePlaceholder":667},[842],{"type":53,"value":670},{"type":43,"tag":395,"props":844,"children":846},{"class":397,"line":845},12,[847],{"type":43,"tag":395,"props":848,"children":849},{"style":423},[850],{"type":53,"value":851},"\u002F\u002F Framework integrations\n",{"type":43,"tag":395,"props":853,"children":855},{"class":397,"line":854},13,[856,860,864,869,873,877,881,886,890],{"type":43,"tag":395,"props":857,"children":858},{"style":481},[859],{"type":53,"value":484},{"type":43,"tag":395,"props":861,"children":862},{"style":402},[863],{"type":53,"value":489},{"type":43,"tag":395,"props":865,"children":866},{"style":492},[867],{"type":53,"value":868}," withWorkflow",{"type":43,"tag":395,"props":870,"children":871},{"style":402},[872],{"type":53,"value":537},{"type":43,"tag":395,"props":874,"children":875},{"style":481},[876],{"type":53,"value":542},{"type":43,"tag":395,"props":878,"children":879},{"style":402},[880],{"type":53,"value":547},{"type":43,"tag":395,"props":882,"children":883},{"style":408},[884],{"type":53,"value":885},"workflow\u002Fnext",{"type":43,"tag":395,"props":887,"children":888},{"style":402},[889],{"type":53,"value":405},{"type":43,"tag":395,"props":891,"children":892},{"style":402},[893],{"type":53,"value":560},{"type":43,"tag":395,"props":895,"children":897},{"class":397,"line":896},14,[898,902,906,911,915,919,923,928,932],{"type":43,"tag":395,"props":899,"children":900},{"style":481},[901],{"type":53,"value":484},{"type":43,"tag":395,"props":903,"children":904},{"style":402},[905],{"type":53,"value":489},{"type":43,"tag":395,"props":907,"children":908},{"style":492},[909],{"type":53,"value":910}," workflow",{"type":43,"tag":395,"props":912,"children":913},{"style":402},[914],{"type":53,"value":537},{"type":43,"tag":395,"props":916,"children":917},{"style":481},[918],{"type":53,"value":542},{"type":43,"tag":395,"props":920,"children":921},{"style":402},[922],{"type":53,"value":547},{"type":43,"tag":395,"props":924,"children":925},{"style":408},[926],{"type":53,"value":927},"workflow\u002Fvite",{"type":43,"tag":395,"props":929,"children":930},{"style":402},[931],{"type":53,"value":405},{"type":43,"tag":395,"props":933,"children":934},{"style":402},[935],{"type":53,"value":560},{"type":43,"tag":395,"props":937,"children":939},{"class":397,"line":938},15,[940,944,948,952,956,960,964,969,973],{"type":43,"tag":395,"props":941,"children":942},{"style":481},[943],{"type":53,"value":484},{"type":43,"tag":395,"props":945,"children":946},{"style":402},[947],{"type":53,"value":489},{"type":43,"tag":395,"props":949,"children":950},{"style":492},[951],{"type":53,"value":910},{"type":43,"tag":395,"props":953,"children":954},{"style":402},[955],{"type":53,"value":537},{"type":43,"tag":395,"props":957,"children":958},{"style":481},[959],{"type":53,"value":542},{"type":43,"tag":395,"props":961,"children":962},{"style":402},[963],{"type":53,"value":547},{"type":43,"tag":395,"props":965,"children":966},{"style":408},[967],{"type":53,"value":968},"workflow\u002Fastro",{"type":43,"tag":395,"props":970,"children":971},{"style":402},[972],{"type":53,"value":405},{"type":43,"tag":395,"props":974,"children":975},{"style":402},[976],{"type":53,"value":560},{"type":43,"tag":395,"props":978,"children":980},{"class":397,"line":979},16,[981],{"type":43,"tag":395,"props":982,"children":983},{"style":423},[984],{"type":53,"value":985},"\u002F\u002F Or use modules: [\"workflow\u002Fnitro\"] for Nitro\u002FNuxt\n",{"type":43,"tag":395,"props":987,"children":989},{"class":397,"line":988},17,[990],{"type":43,"tag":395,"props":991,"children":992},{"emptyLinePlaceholder":667},[993],{"type":53,"value":670},{"type":43,"tag":395,"props":995,"children":997},{"class":397,"line":996},18,[998],{"type":43,"tag":395,"props":999,"children":1000},{"style":423},[1001],{"type":53,"value":1002},"\u002F\u002F AI agent\n",{"type":43,"tag":395,"props":1004,"children":1006},{"class":397,"line":1005},19,[1007,1011,1015,1020,1024,1028,1032,1037,1041],{"type":43,"tag":395,"props":1008,"children":1009},{"style":481},[1010],{"type":53,"value":484},{"type":43,"tag":395,"props":1012,"children":1013},{"style":402},[1014],{"type":53,"value":489},{"type":43,"tag":395,"props":1016,"children":1017},{"style":492},[1018],{"type":53,"value":1019}," DurableAgent",{"type":43,"tag":395,"props":1021,"children":1022},{"style":402},[1023],{"type":53,"value":537},{"type":43,"tag":395,"props":1025,"children":1026},{"style":481},[1027],{"type":53,"value":542},{"type":43,"tag":395,"props":1029,"children":1030},{"style":402},[1031],{"type":53,"value":547},{"type":43,"tag":395,"props":1033,"children":1034},{"style":408},[1035],{"type":53,"value":1036},"@workflow\u002Fai\u002Fagent",{"type":43,"tag":395,"props":1038,"children":1039},{"style":402},[1040],{"type":53,"value":405},{"type":43,"tag":395,"props":1042,"children":1043},{"style":402},[1044],{"type":53,"value":560},{"type":43,"tag":44,"props":1046,"children":1048},{"id":1047},"prefer-step-functions-to-avoid-sandbox-errors",[1049],{"type":53,"value":1050},"Prefer Step Functions to Avoid Sandbox Errors",{"type":43,"tag":66,"props":1052,"children":1053},{},[1054,1060,1062,1068,1070,1075],{"type":43,"tag":58,"props":1055,"children":1057},{"className":1056},[],[1058],{"type":53,"value":1059},"\"use workflow\"",{"type":53,"value":1061}," functions run in a sandboxed VM. ",{"type":43,"tag":58,"props":1063,"children":1065},{"className":1064},[],[1066],{"type":53,"value":1067},"\"use step\"",{"type":53,"value":1069}," functions have ",{"type":43,"tag":119,"props":1071,"children":1072},{},[1073],{"type":53,"value":1074},"full Node.js access",{"type":53,"value":1076},". Put your logic in steps and use the workflow function purely for orchestration.",{"type":43,"tag":384,"props":1078,"children":1080},{"className":386,"code":1079,"language":388,"meta":389,"style":389},"\u002F\u002F Steps have full Node.js and npm access\nasync function fetchUserData(userId: string) {\n  \"use step\";\n  const response = await fetch(`https:\u002F\u002Fapi.example.com\u002Fusers\u002F${userId}`);\n  return response.json();\n}\n\nasync function processWithAI(data: any) {\n  \"use step\";\n  \u002F\u002F AI SDK works in steps without workarounds\n  return await generateText({\n    model: openai(\"gpt-4\"),\n    prompt: `Process: ${JSON.stringify(data)}`,\n  });\n}\n\n\u002F\u002F Workflow orchestrates steps - no sandbox issues\nexport async function dataProcessingWorkflow(userId: string) {\n  \"use workflow\";\n  const data = await fetchUserData(userId);\n  const processed = await processWithAI(data);\n  return { success: true, processed };\n}\n",[1081],{"type":43,"tag":58,"props":1082,"children":1083},{"__ignoreMap":389},[1084,1092,1143,1163,1227,1258,1266,1273,1315,1334,1342,1367,1410,1463,1479,1486,1493,1501,1547,1566,1607,1648,1688],{"type":43,"tag":395,"props":1085,"children":1086},{"class":397,"line":398},[1087],{"type":43,"tag":395,"props":1088,"children":1089},{"style":423},[1090],{"type":53,"value":1091},"\u002F\u002F Steps have full Node.js and npm access\n",{"type":43,"tag":395,"props":1093,"children":1094},{"class":397,"line":429},[1095,1101,1106,1112,1117,1123,1127,1133,1138],{"type":43,"tag":395,"props":1096,"children":1098},{"style":1097},"--shiki-light:#9C3EDA;--shiki-default:#C792EA;--shiki-dark:#C792EA",[1099],{"type":53,"value":1100},"async",{"type":43,"tag":395,"props":1102,"children":1103},{"style":1097},[1104],{"type":53,"value":1105}," function",{"type":43,"tag":395,"props":1107,"children":1109},{"style":1108},"--shiki-light:#6182B8;--shiki-default:#82AAFF;--shiki-dark:#82AAFF",[1110],{"type":53,"value":1111}," fetchUserData",{"type":43,"tag":395,"props":1113,"children":1114},{"style":402},[1115],{"type":53,"value":1116},"(",{"type":43,"tag":395,"props":1118,"children":1120},{"style":1119},"--shiki-light:#90A4AE;--shiki-light-font-style:italic;--shiki-default:#EEFFFF;--shiki-default-font-style:italic;--shiki-dark:#BABED8;--shiki-dark-font-style:italic",[1121],{"type":53,"value":1122},"userId",{"type":43,"tag":395,"props":1124,"children":1125},{"style":402},[1126],{"type":53,"value":109},{"type":43,"tag":395,"props":1128,"children":1130},{"style":1129},"--shiki-light:#E2931D;--shiki-default:#FFCB6B;--shiki-dark:#FFCB6B",[1131],{"type":53,"value":1132}," string",{"type":43,"tag":395,"props":1134,"children":1135},{"style":402},[1136],{"type":53,"value":1137},")",{"type":43,"tag":395,"props":1139,"children":1140},{"style":402},[1141],{"type":53,"value":1142}," {\n",{"type":43,"tag":395,"props":1144,"children":1145},{"class":397,"line":563},[1146,1151,1155,1159],{"type":43,"tag":395,"props":1147,"children":1148},{"style":402},[1149],{"type":53,"value":1150},"  \"",{"type":43,"tag":395,"props":1152,"children":1153},{"style":408},[1154],{"type":53,"value":439},{"type":43,"tag":395,"props":1156,"children":1157},{"style":402},[1158],{"type":53,"value":405},{"type":43,"tag":395,"props":1160,"children":1161},{"style":402},[1162],{"type":53,"value":560},{"type":43,"tag":395,"props":1164,"children":1165},{"class":397,"line":613},[1166,1171,1176,1181,1186,1190,1195,1200,1205,1210,1214,1219,1223],{"type":43,"tag":395,"props":1167,"children":1168},{"style":1097},[1169],{"type":53,"value":1170},"  const",{"type":43,"tag":395,"props":1172,"children":1173},{"style":492},[1174],{"type":53,"value":1175}," response",{"type":43,"tag":395,"props":1177,"children":1178},{"style":402},[1179],{"type":53,"value":1180}," =",{"type":43,"tag":395,"props":1182,"children":1183},{"style":481},[1184],{"type":53,"value":1185}," await",{"type":43,"tag":395,"props":1187,"children":1188},{"style":1108},[1189],{"type":53,"value":505},{"type":43,"tag":395,"props":1191,"children":1193},{"style":1192},"--shiki-light:#E53935;--shiki-default:#F07178;--shiki-dark:#F07178",[1194],{"type":53,"value":1116},{"type":43,"tag":395,"props":1196,"children":1197},{"style":402},[1198],{"type":53,"value":1199},"`",{"type":43,"tag":395,"props":1201,"children":1202},{"style":408},[1203],{"type":53,"value":1204},"https:\u002F\u002Fapi.example.com\u002Fusers\u002F",{"type":43,"tag":395,"props":1206,"children":1207},{"style":402},[1208],{"type":53,"value":1209},"${",{"type":43,"tag":395,"props":1211,"children":1212},{"style":492},[1213],{"type":53,"value":1122},{"type":43,"tag":395,"props":1215,"children":1216},{"style":402},[1217],{"type":53,"value":1218},"}`",{"type":43,"tag":395,"props":1220,"children":1221},{"style":1192},[1222],{"type":53,"value":1137},{"type":43,"tag":395,"props":1224,"children":1225},{"style":402},[1226],{"type":53,"value":560},{"type":43,"tag":395,"props":1228,"children":1229},{"class":397,"line":663},[1230,1235,1239,1244,1249,1254],{"type":43,"tag":395,"props":1231,"children":1232},{"style":481},[1233],{"type":53,"value":1234},"  return",{"type":43,"tag":395,"props":1236,"children":1237},{"style":492},[1238],{"type":53,"value":1175},{"type":43,"tag":395,"props":1240,"children":1241},{"style":402},[1242],{"type":53,"value":1243},".",{"type":43,"tag":395,"props":1245,"children":1246},{"style":1108},[1247],{"type":53,"value":1248},"json",{"type":43,"tag":395,"props":1250,"children":1251},{"style":1192},[1252],{"type":53,"value":1253},"()",{"type":43,"tag":395,"props":1255,"children":1256},{"style":402},[1257],{"type":53,"value":560},{"type":43,"tag":395,"props":1259,"children":1260},{"class":397,"line":673},[1261],{"type":43,"tag":395,"props":1262,"children":1263},{"style":402},[1264],{"type":53,"value":1265},"}\n",{"type":43,"tag":395,"props":1267,"children":1268},{"class":397,"line":682},[1269],{"type":43,"tag":395,"props":1270,"children":1271},{"emptyLinePlaceholder":667},[1272],{"type":53,"value":670},{"type":43,"tag":395,"props":1274,"children":1275},{"class":397,"line":751},[1276,1280,1284,1289,1293,1298,1302,1307,1311],{"type":43,"tag":395,"props":1277,"children":1278},{"style":1097},[1279],{"type":53,"value":1100},{"type":43,"tag":395,"props":1281,"children":1282},{"style":1097},[1283],{"type":53,"value":1105},{"type":43,"tag":395,"props":1285,"children":1286},{"style":1108},[1287],{"type":53,"value":1288}," processWithAI",{"type":43,"tag":395,"props":1290,"children":1291},{"style":402},[1292],{"type":53,"value":1116},{"type":43,"tag":395,"props":1294,"children":1295},{"style":1119},[1296],{"type":53,"value":1297},"data",{"type":43,"tag":395,"props":1299,"children":1300},{"style":402},[1301],{"type":53,"value":109},{"type":43,"tag":395,"props":1303,"children":1304},{"style":1129},[1305],{"type":53,"value":1306}," any",{"type":43,"tag":395,"props":1308,"children":1309},{"style":402},[1310],{"type":53,"value":1137},{"type":43,"tag":395,"props":1312,"children":1313},{"style":402},[1314],{"type":53,"value":1142},{"type":43,"tag":395,"props":1316,"children":1317},{"class":397,"line":759},[1318,1322,1326,1330],{"type":43,"tag":395,"props":1319,"children":1320},{"style":402},[1321],{"type":53,"value":1150},{"type":43,"tag":395,"props":1323,"children":1324},{"style":408},[1325],{"type":53,"value":439},{"type":43,"tag":395,"props":1327,"children":1328},{"style":402},[1329],{"type":53,"value":405},{"type":43,"tag":395,"props":1331,"children":1332},{"style":402},[1333],{"type":53,"value":560},{"type":43,"tag":395,"props":1335,"children":1336},{"class":397,"line":768},[1337],{"type":43,"tag":395,"props":1338,"children":1339},{"style":423},[1340],{"type":53,"value":1341},"  \u002F\u002F AI SDK works in steps without workarounds\n",{"type":43,"tag":395,"props":1343,"children":1344},{"class":397,"line":837},[1345,1349,1353,1358,1362],{"type":43,"tag":395,"props":1346,"children":1347},{"style":481},[1348],{"type":53,"value":1234},{"type":43,"tag":395,"props":1350,"children":1351},{"style":481},[1352],{"type":53,"value":1185},{"type":43,"tag":395,"props":1354,"children":1355},{"style":1108},[1356],{"type":53,"value":1357}," generateText",{"type":43,"tag":395,"props":1359,"children":1360},{"style":1192},[1361],{"type":53,"value":1116},{"type":43,"tag":395,"props":1363,"children":1364},{"style":402},[1365],{"type":53,"value":1366},"{\n",{"type":43,"tag":395,"props":1368,"children":1369},{"class":397,"line":845},[1370,1375,1379,1384,1388,1392,1397,1401,1405],{"type":43,"tag":395,"props":1371,"children":1372},{"style":1192},[1373],{"type":53,"value":1374},"    model",{"type":43,"tag":395,"props":1376,"children":1377},{"style":402},[1378],{"type":53,"value":109},{"type":43,"tag":395,"props":1380,"children":1381},{"style":1108},[1382],{"type":53,"value":1383}," openai",{"type":43,"tag":395,"props":1385,"children":1386},{"style":1192},[1387],{"type":53,"value":1116},{"type":43,"tag":395,"props":1389,"children":1390},{"style":402},[1391],{"type":53,"value":405},{"type":43,"tag":395,"props":1393,"children":1394},{"style":408},[1395],{"type":53,"value":1396},"gpt-4",{"type":43,"tag":395,"props":1398,"children":1399},{"style":402},[1400],{"type":53,"value":405},{"type":43,"tag":395,"props":1402,"children":1403},{"style":1192},[1404],{"type":53,"value":1137},{"type":43,"tag":395,"props":1406,"children":1407},{"style":402},[1408],{"type":53,"value":1409},",\n",{"type":43,"tag":395,"props":1411,"children":1412},{"class":397,"line":854},[1413,1418,1422,1427,1432,1436,1441,1445,1450,1455,1459],{"type":43,"tag":395,"props":1414,"children":1415},{"style":1192},[1416],{"type":53,"value":1417},"    prompt",{"type":43,"tag":395,"props":1419,"children":1420},{"style":402},[1421],{"type":53,"value":109},{"type":43,"tag":395,"props":1423,"children":1424},{"style":402},[1425],{"type":53,"value":1426}," `",{"type":43,"tag":395,"props":1428,"children":1429},{"style":408},[1430],{"type":53,"value":1431},"Process: ",{"type":43,"tag":395,"props":1433,"children":1434},{"style":402},[1435],{"type":53,"value":1209},{"type":43,"tag":395,"props":1437,"children":1438},{"style":492},[1439],{"type":53,"value":1440},"JSON",{"type":43,"tag":395,"props":1442,"children":1443},{"style":402},[1444],{"type":53,"value":1243},{"type":43,"tag":395,"props":1446,"children":1447},{"style":1108},[1448],{"type":53,"value":1449},"stringify",{"type":43,"tag":395,"props":1451,"children":1452},{"style":492},[1453],{"type":53,"value":1454},"(data)",{"type":43,"tag":395,"props":1456,"children":1457},{"style":402},[1458],{"type":53,"value":1218},{"type":43,"tag":395,"props":1460,"children":1461},{"style":402},[1462],{"type":53,"value":1409},{"type":43,"tag":395,"props":1464,"children":1465},{"class":397,"line":896},[1466,1471,1475],{"type":43,"tag":395,"props":1467,"children":1468},{"style":402},[1469],{"type":53,"value":1470},"  }",{"type":43,"tag":395,"props":1472,"children":1473},{"style":1192},[1474],{"type":53,"value":1137},{"type":43,"tag":395,"props":1476,"children":1477},{"style":402},[1478],{"type":53,"value":560},{"type":43,"tag":395,"props":1480,"children":1481},{"class":397,"line":938},[1482],{"type":43,"tag":395,"props":1483,"children":1484},{"style":402},[1485],{"type":53,"value":1265},{"type":43,"tag":395,"props":1487,"children":1488},{"class":397,"line":979},[1489],{"type":43,"tag":395,"props":1490,"children":1491},{"emptyLinePlaceholder":667},[1492],{"type":53,"value":670},{"type":43,"tag":395,"props":1494,"children":1495},{"class":397,"line":988},[1496],{"type":43,"tag":395,"props":1497,"children":1498},{"style":423},[1499],{"type":53,"value":1500},"\u002F\u002F Workflow orchestrates steps - no sandbox issues\n",{"type":43,"tag":395,"props":1502,"children":1503},{"class":397,"line":996},[1504,1509,1514,1518,1523,1527,1531,1535,1539,1543],{"type":43,"tag":395,"props":1505,"children":1506},{"style":481},[1507],{"type":53,"value":1508},"export",{"type":43,"tag":395,"props":1510,"children":1511},{"style":1097},[1512],{"type":53,"value":1513}," async",{"type":43,"tag":395,"props":1515,"children":1516},{"style":1097},[1517],{"type":53,"value":1105},{"type":43,"tag":395,"props":1519,"children":1520},{"style":1108},[1521],{"type":53,"value":1522}," dataProcessingWorkflow",{"type":43,"tag":395,"props":1524,"children":1525},{"style":402},[1526],{"type":53,"value":1116},{"type":43,"tag":395,"props":1528,"children":1529},{"style":1119},[1530],{"type":53,"value":1122},{"type":43,"tag":395,"props":1532,"children":1533},{"style":402},[1534],{"type":53,"value":109},{"type":43,"tag":395,"props":1536,"children":1537},{"style":1129},[1538],{"type":53,"value":1132},{"type":43,"tag":395,"props":1540,"children":1541},{"style":402},[1542],{"type":53,"value":1137},{"type":43,"tag":395,"props":1544,"children":1545},{"style":402},[1546],{"type":53,"value":1142},{"type":43,"tag":395,"props":1548,"children":1549},{"class":397,"line":1005},[1550,1554,1558,1562],{"type":43,"tag":395,"props":1551,"children":1552},{"style":402},[1553],{"type":53,"value":1150},{"type":43,"tag":395,"props":1555,"children":1556},{"style":408},[1557],{"type":53,"value":411},{"type":43,"tag":395,"props":1559,"children":1560},{"style":402},[1561],{"type":53,"value":405},{"type":43,"tag":395,"props":1563,"children":1564},{"style":402},[1565],{"type":53,"value":560},{"type":43,"tag":395,"props":1567,"children":1569},{"class":397,"line":1568},20,[1570,1574,1579,1583,1587,1591,1595,1599,1603],{"type":43,"tag":395,"props":1571,"children":1572},{"style":1097},[1573],{"type":53,"value":1170},{"type":43,"tag":395,"props":1575,"children":1576},{"style":492},[1577],{"type":53,"value":1578}," data",{"type":43,"tag":395,"props":1580,"children":1581},{"style":402},[1582],{"type":53,"value":1180},{"type":43,"tag":395,"props":1584,"children":1585},{"style":481},[1586],{"type":53,"value":1185},{"type":43,"tag":395,"props":1588,"children":1589},{"style":1108},[1590],{"type":53,"value":1111},{"type":43,"tag":395,"props":1592,"children":1593},{"style":1192},[1594],{"type":53,"value":1116},{"type":43,"tag":395,"props":1596,"children":1597},{"style":492},[1598],{"type":53,"value":1122},{"type":43,"tag":395,"props":1600,"children":1601},{"style":1192},[1602],{"type":53,"value":1137},{"type":43,"tag":395,"props":1604,"children":1605},{"style":402},[1606],{"type":53,"value":560},{"type":43,"tag":395,"props":1608,"children":1610},{"class":397,"line":1609},21,[1611,1615,1620,1624,1628,1632,1636,1640,1644],{"type":43,"tag":395,"props":1612,"children":1613},{"style":1097},[1614],{"type":53,"value":1170},{"type":43,"tag":395,"props":1616,"children":1617},{"style":492},[1618],{"type":53,"value":1619}," processed",{"type":43,"tag":395,"props":1621,"children":1622},{"style":402},[1623],{"type":53,"value":1180},{"type":43,"tag":395,"props":1625,"children":1626},{"style":481},[1627],{"type":53,"value":1185},{"type":43,"tag":395,"props":1629,"children":1630},{"style":1108},[1631],{"type":53,"value":1288},{"type":43,"tag":395,"props":1633,"children":1634},{"style":1192},[1635],{"type":53,"value":1116},{"type":43,"tag":395,"props":1637,"children":1638},{"style":492},[1639],{"type":53,"value":1297},{"type":43,"tag":395,"props":1641,"children":1642},{"style":1192},[1643],{"type":53,"value":1137},{"type":43,"tag":395,"props":1645,"children":1646},{"style":402},[1647],{"type":53,"value":560},{"type":43,"tag":395,"props":1649,"children":1651},{"class":397,"line":1650},22,[1652,1656,1660,1665,1669,1675,1679,1683],{"type":43,"tag":395,"props":1653,"children":1654},{"style":481},[1655],{"type":53,"value":1234},{"type":43,"tag":395,"props":1657,"children":1658},{"style":402},[1659],{"type":53,"value":489},{"type":43,"tag":395,"props":1661,"children":1662},{"style":1192},[1663],{"type":53,"value":1664}," success",{"type":43,"tag":395,"props":1666,"children":1667},{"style":402},[1668],{"type":53,"value":109},{"type":43,"tag":395,"props":1670,"children":1672},{"style":1671},"--shiki-light:#FF5370;--shiki-default:#FF9CAC;--shiki-dark:#FF9CAC",[1673],{"type":53,"value":1674}," true",{"type":43,"tag":395,"props":1676,"children":1677},{"style":402},[1678],{"type":53,"value":500},{"type":43,"tag":395,"props":1680,"children":1681},{"style":492},[1682],{"type":53,"value":1619},{"type":43,"tag":395,"props":1684,"children":1685},{"style":402},[1686],{"type":53,"value":1687}," };\n",{"type":43,"tag":395,"props":1689,"children":1691},{"class":397,"line":1690},23,[1692],{"type":43,"tag":395,"props":1693,"children":1694},{"style":402},[1695],{"type":53,"value":1265},{"type":43,"tag":66,"props":1697,"children":1698},{},[1699,1704],{"type":43,"tag":119,"props":1700,"children":1701},{},[1702],{"type":53,"value":1703},"Benefits:",{"type":53,"value":1705}," Steps have automatic retry, results are persisted for replay, and no sandbox restrictions.",{"type":43,"tag":44,"props":1707,"children":1709},{"id":1708},"workflow-sandbox-limitations",[1710],{"type":53,"value":1711},"Workflow Sandbox Limitations",{"type":43,"tag":66,"props":1713,"children":1714},{},[1715],{"type":53,"value":1716},"When you need logic directly in a workflow function (not in a step), these restrictions apply:",{"type":43,"tag":1718,"props":1719,"children":1720},"table",{},[1721,1740],{"type":43,"tag":1722,"props":1723,"children":1724},"thead",{},[1725],{"type":43,"tag":1726,"props":1727,"children":1728},"tr",{},[1729,1735],{"type":43,"tag":1730,"props":1731,"children":1732},"th",{},[1733],{"type":53,"value":1734},"Limitation",{"type":43,"tag":1730,"props":1736,"children":1737},{},[1738],{"type":53,"value":1739},"Workaround",{"type":43,"tag":1741,"props":1742,"children":1743},"tbody",{},[1744,1776,1816],{"type":43,"tag":1726,"props":1745,"children":1746},{},[1747,1759],{"type":43,"tag":1748,"props":1749,"children":1750},"td",{},[1751,1753],{"type":53,"value":1752},"No ",{"type":43,"tag":58,"props":1754,"children":1756},{"className":1755},[],[1757],{"type":53,"value":1758},"fetch()",{"type":43,"tag":1748,"props":1760,"children":1761},{},[1762,1768,1770],{"type":43,"tag":58,"props":1763,"children":1765},{"className":1764},[],[1766],{"type":53,"value":1767},"import { fetch } from \"workflow\"",{"type":53,"value":1769}," then ",{"type":43,"tag":58,"props":1771,"children":1773},{"className":1772},[],[1774],{"type":53,"value":1775},"globalThis.fetch = fetch",{"type":43,"tag":1726,"props":1777,"children":1778},{},[1779,1797],{"type":43,"tag":1748,"props":1780,"children":1781},{},[1782,1783,1789,1791],{"type":53,"value":1752},{"type":43,"tag":58,"props":1784,"children":1786},{"className":1785},[],[1787],{"type":53,"value":1788},"setTimeout",{"type":53,"value":1790},"\u002F",{"type":43,"tag":58,"props":1792,"children":1794},{"className":1793},[],[1795],{"type":53,"value":1796},"setInterval",{"type":43,"tag":1748,"props":1798,"children":1799},{},[1800,1802,1808,1810],{"type":53,"value":1801},"Use ",{"type":43,"tag":58,"props":1803,"children":1805},{"className":1804},[],[1806],{"type":53,"value":1807},"sleep(\"5s\")",{"type":53,"value":1809}," from ",{"type":43,"tag":58,"props":1811,"children":1813},{"className":1812},[],[1814],{"type":53,"value":1815},"\"workflow\"",{"type":43,"tag":1726,"props":1817,"children":1818},{},[1819,1824],{"type":43,"tag":1748,"props":1820,"children":1821},{},[1822],{"type":53,"value":1823},"No Node.js modules (fs, crypto, etc.)",{"type":43,"tag":1748,"props":1825,"children":1826},{},[1827],{"type":53,"value":1828},"Move to a step function",{"type":43,"tag":66,"props":1830,"children":1831},{},[1832],{"type":43,"tag":119,"props":1833,"children":1834},{},[1835],{"type":53,"value":1836},"Example - Using fetch in workflow context:",{"type":43,"tag":384,"props":1838,"children":1840},{"className":386,"code":1839,"language":388,"meta":389,"style":389},"import { fetch } from \"workflow\";\n\nexport async function myWorkflow() {\n  \"use workflow\";\n  globalThis.fetch = fetch;  \u002F\u002F Required for AI SDK and HTTP libraries\n  \u002F\u002F Now generateText() and other libraries work\n}\n",[1841],{"type":43,"tag":58,"props":1842,"children":1843},{"__ignoreMap":389},[1844,1883,1890,1918,1937,1971,1979],{"type":43,"tag":395,"props":1845,"children":1846},{"class":397,"line":398},[1847,1851,1855,1859,1863,1867,1871,1875,1879],{"type":43,"tag":395,"props":1848,"children":1849},{"style":481},[1850],{"type":53,"value":484},{"type":43,"tag":395,"props":1852,"children":1853},{"style":402},[1854],{"type":53,"value":489},{"type":43,"tag":395,"props":1856,"children":1857},{"style":492},[1858],{"type":53,"value":505},{"type":43,"tag":395,"props":1860,"children":1861},{"style":402},[1862],{"type":53,"value":537},{"type":43,"tag":395,"props":1864,"children":1865},{"style":481},[1866],{"type":53,"value":542},{"type":43,"tag":395,"props":1868,"children":1869},{"style":402},[1870],{"type":53,"value":547},{"type":43,"tag":395,"props":1872,"children":1873},{"style":408},[1874],{"type":53,"value":4},{"type":43,"tag":395,"props":1876,"children":1877},{"style":402},[1878],{"type":53,"value":405},{"type":43,"tag":395,"props":1880,"children":1881},{"style":402},[1882],{"type":53,"value":560},{"type":43,"tag":395,"props":1884,"children":1885},{"class":397,"line":429},[1886],{"type":43,"tag":395,"props":1887,"children":1888},{"emptyLinePlaceholder":667},[1889],{"type":53,"value":670},{"type":43,"tag":395,"props":1891,"children":1892},{"class":397,"line":563},[1893,1897,1901,1905,1910,1914],{"type":43,"tag":395,"props":1894,"children":1895},{"style":481},[1896],{"type":53,"value":1508},{"type":43,"tag":395,"props":1898,"children":1899},{"style":1097},[1900],{"type":53,"value":1513},{"type":43,"tag":395,"props":1902,"children":1903},{"style":1097},[1904],{"type":53,"value":1105},{"type":43,"tag":395,"props":1906,"children":1907},{"style":1108},[1908],{"type":53,"value":1909}," myWorkflow",{"type":43,"tag":395,"props":1911,"children":1912},{"style":402},[1913],{"type":53,"value":1253},{"type":43,"tag":395,"props":1915,"children":1916},{"style":402},[1917],{"type":53,"value":1142},{"type":43,"tag":395,"props":1919,"children":1920},{"class":397,"line":613},[1921,1925,1929,1933],{"type":43,"tag":395,"props":1922,"children":1923},{"style":402},[1924],{"type":53,"value":1150},{"type":43,"tag":395,"props":1926,"children":1927},{"style":408},[1928],{"type":53,"value":411},{"type":43,"tag":395,"props":1930,"children":1931},{"style":402},[1932],{"type":53,"value":405},{"type":43,"tag":395,"props":1934,"children":1935},{"style":402},[1936],{"type":53,"value":560},{"type":43,"tag":395,"props":1938,"children":1939},{"class":397,"line":663},[1940,1945,1949,1954,1958,1962,1966],{"type":43,"tag":395,"props":1941,"children":1942},{"style":492},[1943],{"type":53,"value":1944},"  globalThis",{"type":43,"tag":395,"props":1946,"children":1947},{"style":402},[1948],{"type":53,"value":1243},{"type":43,"tag":395,"props":1950,"children":1951},{"style":492},[1952],{"type":53,"value":1953},"fetch",{"type":43,"tag":395,"props":1955,"children":1956},{"style":402},[1957],{"type":53,"value":1180},{"type":43,"tag":395,"props":1959,"children":1960},{"style":492},[1961],{"type":53,"value":505},{"type":43,"tag":395,"props":1963,"children":1964},{"style":402},[1965],{"type":53,"value":420},{"type":43,"tag":395,"props":1967,"children":1968},{"style":423},[1969],{"type":53,"value":1970},"  \u002F\u002F Required for AI SDK and HTTP libraries\n",{"type":43,"tag":395,"props":1972,"children":1973},{"class":397,"line":673},[1974],{"type":43,"tag":395,"props":1975,"children":1976},{"style":423},[1977],{"type":53,"value":1978},"  \u002F\u002F Now generateText() and other libraries work\n",{"type":43,"tag":395,"props":1980,"children":1981},{"class":397,"line":682},[1982],{"type":43,"tag":395,"props":1983,"children":1984},{"style":402},[1985],{"type":53,"value":1265},{"type":43,"tag":66,"props":1987,"children":1988},{},[1989,1994,1996,2002,2003,2008],{"type":43,"tag":119,"props":1990,"children":1991},{},[1992],{"type":53,"value":1993},"Note:",{"type":53,"value":1995}," ",{"type":43,"tag":58,"props":1997,"children":1999},{"className":1998},[],[2000],{"type":53,"value":2001},"DurableAgent",{"type":53,"value":1809},{"type":43,"tag":58,"props":2004,"children":2006},{"className":2005},[],[2007],{"type":53,"value":274},{"type":53,"value":2009}," handles the fetch assignment automatically.",{"type":43,"tag":44,"props":2011,"children":2013},{"id":2012},"durableagent-ai-agents-in-workflows",[2014],{"type":53,"value":2015},"DurableAgent — AI Agents in Workflows",{"type":43,"tag":66,"props":2017,"children":2018},{},[2019,2020,2025,2027,2033],{"type":53,"value":1801},{"type":43,"tag":58,"props":2021,"children":2023},{"className":2022},[],[2024],{"type":53,"value":2001},{"type":53,"value":2026}," to build AI agents that maintain state and survive interruptions. It handles the workflow sandbox automatically (no manual ",{"type":43,"tag":58,"props":2028,"children":2030},{"className":2029},[],[2031],{"type":53,"value":2032},"globalThis.fetch",{"type":53,"value":2034}," needed).",{"type":43,"tag":384,"props":2036,"children":2038},{"className":386,"code":2037,"language":388,"meta":389,"style":389},"import { DurableAgent } from \"@workflow\u002Fai\u002Fagent\";\nimport { getWritable } from \"workflow\";\nimport { z } from \"zod\";\nimport type { UIMessageChunk } from \"ai\";\n\nasync function lookupData({ query }: { query: string }) {\n  \"use step\";\n  \u002F\u002F Step functions have full Node.js access\n  return `Results for \"${query}\"`;\n}\n\nexport async function myAgentWorkflow(userMessage: string) {\n  \"use workflow\";\n\n  const agent = new DurableAgent({\n    model: \"anthropic\u002Fclaude-sonnet-4-5\",\n    system: \"You are a helpful assistant.\",\n    tools: {\n      lookupData: {\n        description: \"Search for information\",\n        inputSchema: z.object({ query: z.string() }),\n        execute: lookupData,\n      },\n    },\n  });\n\n  const result = await agent.stream({\n    messages: [{ role: \"user\", content: userMessage }],\n    writable: getWritable\u003CUIMessageChunk>(),\n    maxSteps: 10,\n  });\n\n  return result.messages;\n}\n",[2039],{"type":43,"tag":58,"props":2040,"children":2041},{"__ignoreMap":389},[2042,2081,2120,2161,2207,2214,2270,2289,2297,2339,2346,2353,2398,2417,2424,2457,2485,2514,2530,2546,2575,2647,2667,2675,2684,2700,2708,2750,2825,2865,2888,2904,2912,2937],{"type":43,"tag":395,"props":2043,"children":2044},{"class":397,"line":398},[2045,2049,2053,2057,2061,2065,2069,2073,2077],{"type":43,"tag":395,"props":2046,"children":2047},{"style":481},[2048],{"type":53,"value":484},{"type":43,"tag":395,"props":2050,"children":2051},{"style":402},[2052],{"type":53,"value":489},{"type":43,"tag":395,"props":2054,"children":2055},{"style":492},[2056],{"type":53,"value":1019},{"type":43,"tag":395,"props":2058,"children":2059},{"style":402},[2060],{"type":53,"value":537},{"type":43,"tag":395,"props":2062,"children":2063},{"style":481},[2064],{"type":53,"value":542},{"type":43,"tag":395,"props":2066,"children":2067},{"style":402},[2068],{"type":53,"value":547},{"type":43,"tag":395,"props":2070,"children":2071},{"style":408},[2072],{"type":53,"value":1036},{"type":43,"tag":395,"props":2074,"children":2075},{"style":402},[2076],{"type":53,"value":405},{"type":43,"tag":395,"props":2078,"children":2079},{"style":402},[2080],{"type":53,"value":560},{"type":43,"tag":395,"props":2082,"children":2083},{"class":397,"line":429},[2084,2088,2092,2096,2100,2104,2108,2112,2116],{"type":43,"tag":395,"props":2085,"children":2086},{"style":481},[2087],{"type":53,"value":484},{"type":43,"tag":395,"props":2089,"children":2090},{"style":402},[2091],{"type":53,"value":489},{"type":43,"tag":395,"props":2093,"children":2094},{"style":492},[2095],{"type":53,"value":532},{"type":43,"tag":395,"props":2097,"children":2098},{"style":402},[2099],{"type":53,"value":537},{"type":43,"tag":395,"props":2101,"children":2102},{"style":481},[2103],{"type":53,"value":542},{"type":43,"tag":395,"props":2105,"children":2106},{"style":402},[2107],{"type":53,"value":547},{"type":43,"tag":395,"props":2109,"children":2110},{"style":408},[2111],{"type":53,"value":4},{"type":43,"tag":395,"props":2113,"children":2114},{"style":402},[2115],{"type":53,"value":405},{"type":43,"tag":395,"props":2117,"children":2118},{"style":402},[2119],{"type":53,"value":560},{"type":43,"tag":395,"props":2121,"children":2122},{"class":397,"line":563},[2123,2127,2131,2136,2140,2144,2148,2153,2157],{"type":43,"tag":395,"props":2124,"children":2125},{"style":481},[2126],{"type":53,"value":484},{"type":43,"tag":395,"props":2128,"children":2129},{"style":402},[2130],{"type":53,"value":489},{"type":43,"tag":395,"props":2132,"children":2133},{"style":492},[2134],{"type":53,"value":2135}," z",{"type":43,"tag":395,"props":2137,"children":2138},{"style":402},[2139],{"type":53,"value":537},{"type":43,"tag":395,"props":2141,"children":2142},{"style":481},[2143],{"type":53,"value":542},{"type":43,"tag":395,"props":2145,"children":2146},{"style":402},[2147],{"type":53,"value":547},{"type":43,"tag":395,"props":2149,"children":2150},{"style":408},[2151],{"type":53,"value":2152},"zod",{"type":43,"tag":395,"props":2154,"children":2155},{"style":402},[2156],{"type":53,"value":405},{"type":43,"tag":395,"props":2158,"children":2159},{"style":402},[2160],{"type":53,"value":560},{"type":43,"tag":395,"props":2162,"children":2163},{"class":397,"line":613},[2164,2168,2173,2177,2182,2186,2190,2194,2199,2203],{"type":43,"tag":395,"props":2165,"children":2166},{"style":481},[2167],{"type":53,"value":484},{"type":43,"tag":395,"props":2169,"children":2170},{"style":481},[2171],{"type":53,"value":2172}," type",{"type":43,"tag":395,"props":2174,"children":2175},{"style":402},[2176],{"type":53,"value":489},{"type":43,"tag":395,"props":2178,"children":2179},{"style":492},[2180],{"type":53,"value":2181}," UIMessageChunk",{"type":43,"tag":395,"props":2183,"children":2184},{"style":402},[2185],{"type":53,"value":537},{"type":43,"tag":395,"props":2187,"children":2188},{"style":481},[2189],{"type":53,"value":542},{"type":43,"tag":395,"props":2191,"children":2192},{"style":402},[2193],{"type":53,"value":547},{"type":43,"tag":395,"props":2195,"children":2196},{"style":408},[2197],{"type":53,"value":2198},"ai",{"type":43,"tag":395,"props":2200,"children":2201},{"style":402},[2202],{"type":53,"value":405},{"type":43,"tag":395,"props":2204,"children":2205},{"style":402},[2206],{"type":53,"value":560},{"type":43,"tag":395,"props":2208,"children":2209},{"class":397,"line":663},[2210],{"type":43,"tag":395,"props":2211,"children":2212},{"emptyLinePlaceholder":667},[2213],{"type":53,"value":670},{"type":43,"tag":395,"props":2215,"children":2216},{"class":397,"line":673},[2217,2221,2225,2230,2235,2240,2245,2249,2253,2257,2261,2266],{"type":43,"tag":395,"props":2218,"children":2219},{"style":1097},[2220],{"type":53,"value":1100},{"type":43,"tag":395,"props":2222,"children":2223},{"style":1097},[2224],{"type":53,"value":1105},{"type":43,"tag":395,"props":2226,"children":2227},{"style":1108},[2228],{"type":53,"value":2229}," lookupData",{"type":43,"tag":395,"props":2231,"children":2232},{"style":402},[2233],{"type":53,"value":2234},"({",{"type":43,"tag":395,"props":2236,"children":2237},{"style":1119},[2238],{"type":53,"value":2239}," query",{"type":43,"tag":395,"props":2241,"children":2242},{"style":402},[2243],{"type":53,"value":2244}," }:",{"type":43,"tag":395,"props":2246,"children":2247},{"style":402},[2248],{"type":53,"value":489},{"type":43,"tag":395,"props":2250,"children":2251},{"style":1192},[2252],{"type":53,"value":2239},{"type":43,"tag":395,"props":2254,"children":2255},{"style":402},[2256],{"type":53,"value":109},{"type":43,"tag":395,"props":2258,"children":2259},{"style":1129},[2260],{"type":53,"value":1132},{"type":43,"tag":395,"props":2262,"children":2263},{"style":402},[2264],{"type":53,"value":2265}," })",{"type":43,"tag":395,"props":2267,"children":2268},{"style":402},[2269],{"type":53,"value":1142},{"type":43,"tag":395,"props":2271,"children":2272},{"class":397,"line":682},[2273,2277,2281,2285],{"type":43,"tag":395,"props":2274,"children":2275},{"style":402},[2276],{"type":53,"value":1150},{"type":43,"tag":395,"props":2278,"children":2279},{"style":408},[2280],{"type":53,"value":439},{"type":43,"tag":395,"props":2282,"children":2283},{"style":402},[2284],{"type":53,"value":405},{"type":43,"tag":395,"props":2286,"children":2287},{"style":402},[2288],{"type":53,"value":560},{"type":43,"tag":395,"props":2290,"children":2291},{"class":397,"line":751},[2292],{"type":43,"tag":395,"props":2293,"children":2294},{"style":423},[2295],{"type":53,"value":2296},"  \u002F\u002F Step functions have full Node.js access\n",{"type":43,"tag":395,"props":2298,"children":2299},{"class":397,"line":759},[2300,2304,2308,2313,2317,2322,2327,2331,2335],{"type":43,"tag":395,"props":2301,"children":2302},{"style":481},[2303],{"type":53,"value":1234},{"type":43,"tag":395,"props":2305,"children":2306},{"style":402},[2307],{"type":53,"value":1426},{"type":43,"tag":395,"props":2309,"children":2310},{"style":408},[2311],{"type":53,"value":2312},"Results for \"",{"type":43,"tag":395,"props":2314,"children":2315},{"style":402},[2316],{"type":53,"value":1209},{"type":43,"tag":395,"props":2318,"children":2319},{"style":492},[2320],{"type":53,"value":2321},"query",{"type":43,"tag":395,"props":2323,"children":2324},{"style":402},[2325],{"type":53,"value":2326},"}",{"type":43,"tag":395,"props":2328,"children":2329},{"style":408},[2330],{"type":53,"value":405},{"type":43,"tag":395,"props":2332,"children":2333},{"style":402},[2334],{"type":53,"value":1199},{"type":43,"tag":395,"props":2336,"children":2337},{"style":402},[2338],{"type":53,"value":560},{"type":43,"tag":395,"props":2340,"children":2341},{"class":397,"line":768},[2342],{"type":43,"tag":395,"props":2343,"children":2344},{"style":402},[2345],{"type":53,"value":1265},{"type":43,"tag":395,"props":2347,"children":2348},{"class":397,"line":837},[2349],{"type":43,"tag":395,"props":2350,"children":2351},{"emptyLinePlaceholder":667},[2352],{"type":53,"value":670},{"type":43,"tag":395,"props":2354,"children":2355},{"class":397,"line":845},[2356,2360,2364,2368,2373,2377,2382,2386,2390,2394],{"type":43,"tag":395,"props":2357,"children":2358},{"style":481},[2359],{"type":53,"value":1508},{"type":43,"tag":395,"props":2361,"children":2362},{"style":1097},[2363],{"type":53,"value":1513},{"type":43,"tag":395,"props":2365,"children":2366},{"style":1097},[2367],{"type":53,"value":1105},{"type":43,"tag":395,"props":2369,"children":2370},{"style":1108},[2371],{"type":53,"value":2372}," myAgentWorkflow",{"type":43,"tag":395,"props":2374,"children":2375},{"style":402},[2376],{"type":53,"value":1116},{"type":43,"tag":395,"props":2378,"children":2379},{"style":1119},[2380],{"type":53,"value":2381},"userMessage",{"type":43,"tag":395,"props":2383,"children":2384},{"style":402},[2385],{"type":53,"value":109},{"type":43,"tag":395,"props":2387,"children":2388},{"style":1129},[2389],{"type":53,"value":1132},{"type":43,"tag":395,"props":2391,"children":2392},{"style":402},[2393],{"type":53,"value":1137},{"type":43,"tag":395,"props":2395,"children":2396},{"style":402},[2397],{"type":53,"value":1142},{"type":43,"tag":395,"props":2399,"children":2400},{"class":397,"line":854},[2401,2405,2409,2413],{"type":43,"tag":395,"props":2402,"children":2403},{"style":402},[2404],{"type":53,"value":1150},{"type":43,"tag":395,"props":2406,"children":2407},{"style":408},[2408],{"type":53,"value":411},{"type":43,"tag":395,"props":2410,"children":2411},{"style":402},[2412],{"type":53,"value":405},{"type":43,"tag":395,"props":2414,"children":2415},{"style":402},[2416],{"type":53,"value":560},{"type":43,"tag":395,"props":2418,"children":2419},{"class":397,"line":896},[2420],{"type":43,"tag":395,"props":2421,"children":2422},{"emptyLinePlaceholder":667},[2423],{"type":53,"value":670},{"type":43,"tag":395,"props":2425,"children":2426},{"class":397,"line":938},[2427,2431,2436,2440,2445,2449,2453],{"type":43,"tag":395,"props":2428,"children":2429},{"style":1097},[2430],{"type":53,"value":1170},{"type":43,"tag":395,"props":2432,"children":2433},{"style":492},[2434],{"type":53,"value":2435}," agent",{"type":43,"tag":395,"props":2437,"children":2438},{"style":402},[2439],{"type":53,"value":1180},{"type":43,"tag":395,"props":2441,"children":2442},{"style":402},[2443],{"type":53,"value":2444}," new",{"type":43,"tag":395,"props":2446,"children":2447},{"style":1108},[2448],{"type":53,"value":1019},{"type":43,"tag":395,"props":2450,"children":2451},{"style":1192},[2452],{"type":53,"value":1116},{"type":43,"tag":395,"props":2454,"children":2455},{"style":402},[2456],{"type":53,"value":1366},{"type":43,"tag":395,"props":2458,"children":2459},{"class":397,"line":979},[2460,2464,2468,2472,2477,2481],{"type":43,"tag":395,"props":2461,"children":2462},{"style":1192},[2463],{"type":53,"value":1374},{"type":43,"tag":395,"props":2465,"children":2466},{"style":402},[2467],{"type":53,"value":109},{"type":43,"tag":395,"props":2469,"children":2470},{"style":402},[2471],{"type":53,"value":547},{"type":43,"tag":395,"props":2473,"children":2474},{"style":408},[2475],{"type":53,"value":2476},"anthropic\u002Fclaude-sonnet-4-5",{"type":43,"tag":395,"props":2478,"children":2479},{"style":402},[2480],{"type":53,"value":405},{"type":43,"tag":395,"props":2482,"children":2483},{"style":402},[2484],{"type":53,"value":1409},{"type":43,"tag":395,"props":2486,"children":2487},{"class":397,"line":988},[2488,2493,2497,2501,2506,2510],{"type":43,"tag":395,"props":2489,"children":2490},{"style":1192},[2491],{"type":53,"value":2492},"    system",{"type":43,"tag":395,"props":2494,"children":2495},{"style":402},[2496],{"type":53,"value":109},{"type":43,"tag":395,"props":2498,"children":2499},{"style":402},[2500],{"type":53,"value":547},{"type":43,"tag":395,"props":2502,"children":2503},{"style":408},[2504],{"type":53,"value":2505},"You are a helpful assistant.",{"type":43,"tag":395,"props":2507,"children":2508},{"style":402},[2509],{"type":53,"value":405},{"type":43,"tag":395,"props":2511,"children":2512},{"style":402},[2513],{"type":53,"value":1409},{"type":43,"tag":395,"props":2515,"children":2516},{"class":397,"line":996},[2517,2522,2526],{"type":43,"tag":395,"props":2518,"children":2519},{"style":1192},[2520],{"type":53,"value":2521},"    tools",{"type":43,"tag":395,"props":2523,"children":2524},{"style":402},[2525],{"type":53,"value":109},{"type":43,"tag":395,"props":2527,"children":2528},{"style":402},[2529],{"type":53,"value":1142},{"type":43,"tag":395,"props":2531,"children":2532},{"class":397,"line":1005},[2533,2538,2542],{"type":43,"tag":395,"props":2534,"children":2535},{"style":1192},[2536],{"type":53,"value":2537},"      lookupData",{"type":43,"tag":395,"props":2539,"children":2540},{"style":402},[2541],{"type":53,"value":109},{"type":43,"tag":395,"props":2543,"children":2544},{"style":402},[2545],{"type":53,"value":1142},{"type":43,"tag":395,"props":2547,"children":2548},{"class":397,"line":1568},[2549,2554,2558,2562,2567,2571],{"type":43,"tag":395,"props":2550,"children":2551},{"style":1192},[2552],{"type":53,"value":2553},"        description",{"type":43,"tag":395,"props":2555,"children":2556},{"style":402},[2557],{"type":53,"value":109},{"type":43,"tag":395,"props":2559,"children":2560},{"style":402},[2561],{"type":53,"value":547},{"type":43,"tag":395,"props":2563,"children":2564},{"style":408},[2565],{"type":53,"value":2566},"Search for information",{"type":43,"tag":395,"props":2568,"children":2569},{"style":402},[2570],{"type":53,"value":405},{"type":43,"tag":395,"props":2572,"children":2573},{"style":402},[2574],{"type":53,"value":1409},{"type":43,"tag":395,"props":2576,"children":2577},{"class":397,"line":1609},[2578,2583,2587,2591,2595,2600,2604,2609,2613,2617,2621,2625,2630,2635,2639,2643],{"type":43,"tag":395,"props":2579,"children":2580},{"style":1192},[2581],{"type":53,"value":2582},"        inputSchema",{"type":43,"tag":395,"props":2584,"children":2585},{"style":402},[2586],{"type":53,"value":109},{"type":43,"tag":395,"props":2588,"children":2589},{"style":492},[2590],{"type":53,"value":2135},{"type":43,"tag":395,"props":2592,"children":2593},{"style":402},[2594],{"type":53,"value":1243},{"type":43,"tag":395,"props":2596,"children":2597},{"style":1108},[2598],{"type":53,"value":2599},"object",{"type":43,"tag":395,"props":2601,"children":2602},{"style":1192},[2603],{"type":53,"value":1116},{"type":43,"tag":395,"props":2605,"children":2606},{"style":402},[2607],{"type":53,"value":2608},"{",{"type":43,"tag":395,"props":2610,"children":2611},{"style":1192},[2612],{"type":53,"value":2239},{"type":43,"tag":395,"props":2614,"children":2615},{"style":402},[2616],{"type":53,"value":109},{"type":43,"tag":395,"props":2618,"children":2619},{"style":492},[2620],{"type":53,"value":2135},{"type":43,"tag":395,"props":2622,"children":2623},{"style":402},[2624],{"type":53,"value":1243},{"type":43,"tag":395,"props":2626,"children":2627},{"style":1108},[2628],{"type":53,"value":2629},"string",{"type":43,"tag":395,"props":2631,"children":2632},{"style":1192},[2633],{"type":53,"value":2634},"() ",{"type":43,"tag":395,"props":2636,"children":2637},{"style":402},[2638],{"type":53,"value":2326},{"type":43,"tag":395,"props":2640,"children":2641},{"style":1192},[2642],{"type":53,"value":1137},{"type":43,"tag":395,"props":2644,"children":2645},{"style":402},[2646],{"type":53,"value":1409},{"type":43,"tag":395,"props":2648,"children":2649},{"class":397,"line":1650},[2650,2655,2659,2663],{"type":43,"tag":395,"props":2651,"children":2652},{"style":1192},[2653],{"type":53,"value":2654},"        execute",{"type":43,"tag":395,"props":2656,"children":2657},{"style":402},[2658],{"type":53,"value":109},{"type":43,"tag":395,"props":2660,"children":2661},{"style":492},[2662],{"type":53,"value":2229},{"type":43,"tag":395,"props":2664,"children":2665},{"style":402},[2666],{"type":53,"value":1409},{"type":43,"tag":395,"props":2668,"children":2669},{"class":397,"line":1690},[2670],{"type":43,"tag":395,"props":2671,"children":2672},{"style":402},[2673],{"type":53,"value":2674},"      },\n",{"type":43,"tag":395,"props":2676,"children":2678},{"class":397,"line":2677},24,[2679],{"type":43,"tag":395,"props":2680,"children":2681},{"style":402},[2682],{"type":53,"value":2683},"    },\n",{"type":43,"tag":395,"props":2685,"children":2687},{"class":397,"line":2686},25,[2688,2692,2696],{"type":43,"tag":395,"props":2689,"children":2690},{"style":402},[2691],{"type":53,"value":1470},{"type":43,"tag":395,"props":2693,"children":2694},{"style":1192},[2695],{"type":53,"value":1137},{"type":43,"tag":395,"props":2697,"children":2698},{"style":402},[2699],{"type":53,"value":560},{"type":43,"tag":395,"props":2701,"children":2703},{"class":397,"line":2702},26,[2704],{"type":43,"tag":395,"props":2705,"children":2706},{"emptyLinePlaceholder":667},[2707],{"type":53,"value":670},{"type":43,"tag":395,"props":2709,"children":2711},{"class":397,"line":2710},27,[2712,2716,2721,2725,2729,2733,2737,2742,2746],{"type":43,"tag":395,"props":2713,"children":2714},{"style":1097},[2715],{"type":53,"value":1170},{"type":43,"tag":395,"props":2717,"children":2718},{"style":492},[2719],{"type":53,"value":2720}," result",{"type":43,"tag":395,"props":2722,"children":2723},{"style":402},[2724],{"type":53,"value":1180},{"type":43,"tag":395,"props":2726,"children":2727},{"style":481},[2728],{"type":53,"value":1185},{"type":43,"tag":395,"props":2730,"children":2731},{"style":492},[2732],{"type":53,"value":2435},{"type":43,"tag":395,"props":2734,"children":2735},{"style":402},[2736],{"type":53,"value":1243},{"type":43,"tag":395,"props":2738,"children":2739},{"style":1108},[2740],{"type":53,"value":2741},"stream",{"type":43,"tag":395,"props":2743,"children":2744},{"style":1192},[2745],{"type":53,"value":1116},{"type":43,"tag":395,"props":2747,"children":2748},{"style":402},[2749],{"type":53,"value":1366},{"type":43,"tag":395,"props":2751,"children":2753},{"class":397,"line":2752},28,[2754,2759,2763,2768,2772,2777,2781,2785,2790,2794,2798,2803,2807,2812,2816,2821],{"type":43,"tag":395,"props":2755,"children":2756},{"style":1192},[2757],{"type":53,"value":2758},"    messages",{"type":43,"tag":395,"props":2760,"children":2761},{"style":402},[2762],{"type":53,"value":109},{"type":43,"tag":395,"props":2764,"children":2765},{"style":1192},[2766],{"type":53,"value":2767}," [",{"type":43,"tag":395,"props":2769,"children":2770},{"style":402},[2771],{"type":53,"value":2608},{"type":43,"tag":395,"props":2773,"children":2774},{"style":1192},[2775],{"type":53,"value":2776}," role",{"type":43,"tag":395,"props":2778,"children":2779},{"style":402},[2780],{"type":53,"value":109},{"type":43,"tag":395,"props":2782,"children":2783},{"style":402},[2784],{"type":53,"value":547},{"type":43,"tag":395,"props":2786,"children":2787},{"style":408},[2788],{"type":53,"value":2789},"user",{"type":43,"tag":395,"props":2791,"children":2792},{"style":402},[2793],{"type":53,"value":405},{"type":43,"tag":395,"props":2795,"children":2796},{"style":402},[2797],{"type":53,"value":500},{"type":43,"tag":395,"props":2799,"children":2800},{"style":1192},[2801],{"type":53,"value":2802}," content",{"type":43,"tag":395,"props":2804,"children":2805},{"style":402},[2806],{"type":53,"value":109},{"type":43,"tag":395,"props":2808,"children":2809},{"style":492},[2810],{"type":53,"value":2811}," userMessage",{"type":43,"tag":395,"props":2813,"children":2814},{"style":402},[2815],{"type":53,"value":537},{"type":43,"tag":395,"props":2817,"children":2818},{"style":1192},[2819],{"type":53,"value":2820},"]",{"type":43,"tag":395,"props":2822,"children":2823},{"style":402},[2824],{"type":53,"value":1409},{"type":43,"tag":395,"props":2826,"children":2828},{"class":397,"line":2827},29,[2829,2834,2838,2842,2847,2852,2857,2861],{"type":43,"tag":395,"props":2830,"children":2831},{"style":1192},[2832],{"type":53,"value":2833},"    writable",{"type":43,"tag":395,"props":2835,"children":2836},{"style":402},[2837],{"type":53,"value":109},{"type":43,"tag":395,"props":2839,"children":2840},{"style":1108},[2841],{"type":53,"value":532},{"type":43,"tag":395,"props":2843,"children":2844},{"style":402},[2845],{"type":53,"value":2846},"\u003C",{"type":43,"tag":395,"props":2848,"children":2849},{"style":1129},[2850],{"type":53,"value":2851},"UIMessageChunk",{"type":43,"tag":395,"props":2853,"children":2854},{"style":402},[2855],{"type":53,"value":2856},">",{"type":43,"tag":395,"props":2858,"children":2859},{"style":1192},[2860],{"type":53,"value":1253},{"type":43,"tag":395,"props":2862,"children":2863},{"style":402},[2864],{"type":53,"value":1409},{"type":43,"tag":395,"props":2866,"children":2868},{"class":397,"line":2867},30,[2869,2874,2878,2884],{"type":43,"tag":395,"props":2870,"children":2871},{"style":1192},[2872],{"type":53,"value":2873},"    maxSteps",{"type":43,"tag":395,"props":2875,"children":2876},{"style":402},[2877],{"type":53,"value":109},{"type":43,"tag":395,"props":2879,"children":2881},{"style":2880},"--shiki-light:#F76D47;--shiki-default:#F78C6C;--shiki-dark:#F78C6C",[2882],{"type":53,"value":2883}," 10",{"type":43,"tag":395,"props":2885,"children":2886},{"style":402},[2887],{"type":53,"value":1409},{"type":43,"tag":395,"props":2889,"children":2891},{"class":397,"line":2890},31,[2892,2896,2900],{"type":43,"tag":395,"props":2893,"children":2894},{"style":402},[2895],{"type":53,"value":1470},{"type":43,"tag":395,"props":2897,"children":2898},{"style":1192},[2899],{"type":53,"value":1137},{"type":43,"tag":395,"props":2901,"children":2902},{"style":402},[2903],{"type":53,"value":560},{"type":43,"tag":395,"props":2905,"children":2907},{"class":397,"line":2906},32,[2908],{"type":43,"tag":395,"props":2909,"children":2910},{"emptyLinePlaceholder":667},[2911],{"type":53,"value":670},{"type":43,"tag":395,"props":2913,"children":2915},{"class":397,"line":2914},33,[2916,2920,2924,2928,2933],{"type":43,"tag":395,"props":2917,"children":2918},{"style":481},[2919],{"type":53,"value":1234},{"type":43,"tag":395,"props":2921,"children":2922},{"style":492},[2923],{"type":53,"value":2720},{"type":43,"tag":395,"props":2925,"children":2926},{"style":402},[2927],{"type":53,"value":1243},{"type":43,"tag":395,"props":2929,"children":2930},{"style":492},[2931],{"type":53,"value":2932},"messages",{"type":43,"tag":395,"props":2934,"children":2935},{"style":402},[2936],{"type":53,"value":560},{"type":43,"tag":395,"props":2938,"children":2940},{"class":397,"line":2939},34,[2941],{"type":43,"tag":395,"props":2942,"children":2943},{"style":402},[2944],{"type":53,"value":1265},{"type":43,"tag":66,"props":2946,"children":2947},{},[2948],{"type":43,"tag":119,"props":2949,"children":2950},{},[2951],{"type":53,"value":2952},"Key points:",{"type":43,"tag":159,"props":2954,"children":2955},{},[2956,2967,2985,3026,3037],{"type":43,"tag":115,"props":2957,"children":2958},{},[2959,2965],{"type":43,"tag":58,"props":2960,"children":2962},{"className":2961},[],[2963],{"type":53,"value":2964},"getWritable\u003CUIMessageChunk>()",{"type":53,"value":2966}," streams output to the workflow run's default stream",{"type":43,"tag":115,"props":2968,"children":2969},{},[2970,2972,2978,2980],{"type":53,"value":2971},"Tool ",{"type":43,"tag":58,"props":2973,"children":2975},{"className":2974},[],[2976],{"type":53,"value":2977},"execute",{"type":53,"value":2979}," functions that need Node.js\u002Fnpm access should use ",{"type":43,"tag":58,"props":2981,"children":2983},{"className":2982},[],[2984],{"type":53,"value":1067},{"type":43,"tag":115,"props":2986,"children":2987},{},[2988,2989,2994,2996,3002,3004,3010,3012,3017,3019,3024],{"type":53,"value":2971},{"type":43,"tag":58,"props":2990,"children":2992},{"className":2991},[],[2993],{"type":53,"value":2977},{"type":53,"value":2995}," functions that use workflow primitives (",{"type":43,"tag":58,"props":2997,"children":2999},{"className":2998},[],[3000],{"type":53,"value":3001},"sleep()",{"type":53,"value":3003},", ",{"type":43,"tag":58,"props":3005,"children":3007},{"className":3006},[],[3008],{"type":53,"value":3009},"createHook()",{"type":53,"value":3011},") should ",{"type":43,"tag":119,"props":3013,"children":3014},{},[3015],{"type":53,"value":3016},"NOT",{"type":53,"value":3018}," use ",{"type":43,"tag":58,"props":3020,"children":3022},{"className":3021},[],[3023],{"type":53,"value":1067},{"type":53,"value":3025}," — they run at the workflow level",{"type":43,"tag":115,"props":3027,"children":3028},{},[3029,3035],{"type":43,"tag":58,"props":3030,"children":3032},{"className":3031},[],[3033],{"type":53,"value":3034},"maxSteps",{"type":53,"value":3036}," limits the number of LLM calls (default is unlimited)",{"type":43,"tag":115,"props":3038,"children":3039},{},[3040,3042,3048,3050,3056],{"type":53,"value":3041},"Multi-turn: pass ",{"type":43,"tag":58,"props":3043,"children":3045},{"className":3044},[],[3046],{"type":53,"value":3047},"result.messages",{"type":53,"value":3049}," plus new user messages to subsequent ",{"type":43,"tag":58,"props":3051,"children":3053},{"className":3052},[],[3054],{"type":53,"value":3055},"agent.stream()",{"type":53,"value":3057}," calls",{"type":43,"tag":66,"props":3059,"children":3060},{},[3061],{"type":43,"tag":119,"props":3062,"children":3063},{},[3064,3066,3071,3073,3078],{"type":53,"value":3065},"For more details on ",{"type":43,"tag":58,"props":3067,"children":3069},{"className":3068},[],[3070],{"type":53,"value":2001},{"type":53,"value":3072},", check the AI docs in ",{"type":43,"tag":58,"props":3074,"children":3076},{"className":3075},[],[3077],{"type":53,"value":281},{"type":53,"value":1243},{"type":43,"tag":44,"props":3080,"children":3082},{"id":3081},"starting-workflows-child-workflows",[3083],{"type":53,"value":3084},"Starting Workflows & Child Workflows",{"type":43,"tag":66,"props":3086,"children":3087},{},[3088,3089,3095,3097,3107],{"type":53,"value":1801},{"type":43,"tag":58,"props":3090,"children":3092},{"className":3091},[],[3093],{"type":53,"value":3094},"start()",{"type":53,"value":3096}," to launch workflows from API routes. ",{"type":43,"tag":119,"props":3098,"children":3099},{},[3100,3105],{"type":43,"tag":58,"props":3101,"children":3103},{"className":3102},[],[3104],{"type":53,"value":3094},{"type":53,"value":3106}," cannot be called directly in workflow context",{"type":53,"value":3108}," — wrap it in a step function.",{"type":43,"tag":384,"props":3110,"children":3112},{"className":386,"code":3111,"language":388,"meta":389,"style":389},"import { start } from \"workflow\u002Fapi\";\n\n\u002F\u002F From an API route — works directly\nexport async function POST() {\n  const run = await start(myWorkflow, [arg1, arg2]);\n  return Response.json({ runId: run.runId });\n}\n\n\u002F\u002F No-args workflow\nconst run = await start(noArgWorkflow);\n",[3113],{"type":43,"tag":58,"props":3114,"children":3115},{"__ignoreMap":389},[3116,3155,3162,3170,3198,3262,3324,3331,3338,3346],{"type":43,"tag":395,"props":3117,"children":3118},{"class":397,"line":398},[3119,3123,3127,3131,3135,3139,3143,3147,3151],{"type":43,"tag":395,"props":3120,"children":3121},{"style":481},[3122],{"type":53,"value":484},{"type":43,"tag":395,"props":3124,"children":3125},{"style":402},[3126],{"type":53,"value":489},{"type":43,"tag":395,"props":3128,"children":3129},{"style":492},[3130],{"type":53,"value":696},{"type":43,"tag":395,"props":3132,"children":3133},{"style":402},[3134],{"type":53,"value":537},{"type":43,"tag":395,"props":3136,"children":3137},{"style":481},[3138],{"type":53,"value":542},{"type":43,"tag":395,"props":3140,"children":3141},{"style":402},[3142],{"type":53,"value":547},{"type":43,"tag":395,"props":3144,"children":3145},{"style":408},[3146],{"type":53,"value":740},{"type":43,"tag":395,"props":3148,"children":3149},{"style":402},[3150],{"type":53,"value":405},{"type":43,"tag":395,"props":3152,"children":3153},{"style":402},[3154],{"type":53,"value":560},{"type":43,"tag":395,"props":3156,"children":3157},{"class":397,"line":429},[3158],{"type":43,"tag":395,"props":3159,"children":3160},{"emptyLinePlaceholder":667},[3161],{"type":53,"value":670},{"type":43,"tag":395,"props":3163,"children":3164},{"class":397,"line":563},[3165],{"type":43,"tag":395,"props":3166,"children":3167},{"style":423},[3168],{"type":53,"value":3169},"\u002F\u002F From an API route — works directly\n",{"type":43,"tag":395,"props":3171,"children":3172},{"class":397,"line":613},[3173,3177,3181,3185,3190,3194],{"type":43,"tag":395,"props":3174,"children":3175},{"style":481},[3176],{"type":53,"value":1508},{"type":43,"tag":395,"props":3178,"children":3179},{"style":1097},[3180],{"type":53,"value":1513},{"type":43,"tag":395,"props":3182,"children":3183},{"style":1097},[3184],{"type":53,"value":1105},{"type":43,"tag":395,"props":3186,"children":3187},{"style":1108},[3188],{"type":53,"value":3189}," POST",{"type":43,"tag":395,"props":3191,"children":3192},{"style":402},[3193],{"type":53,"value":1253},{"type":43,"tag":395,"props":3195,"children":3196},{"style":402},[3197],{"type":53,"value":1142},{"type":43,"tag":395,"props":3199,"children":3200},{"class":397,"line":663},[3201,3205,3210,3214,3218,3222,3226,3231,3235,3239,3244,3248,3253,3258],{"type":43,"tag":395,"props":3202,"children":3203},{"style":1097},[3204],{"type":53,"value":1170},{"type":43,"tag":395,"props":3206,"children":3207},{"style":492},[3208],{"type":53,"value":3209}," run",{"type":43,"tag":395,"props":3211,"children":3212},{"style":402},[3213],{"type":53,"value":1180},{"type":43,"tag":395,"props":3215,"children":3216},{"style":481},[3217],{"type":53,"value":1185},{"type":43,"tag":395,"props":3219,"children":3220},{"style":1108},[3221],{"type":53,"value":696},{"type":43,"tag":395,"props":3223,"children":3224},{"style":1192},[3225],{"type":53,"value":1116},{"type":43,"tag":395,"props":3227,"children":3228},{"style":492},[3229],{"type":53,"value":3230},"myWorkflow",{"type":43,"tag":395,"props":3232,"children":3233},{"style":402},[3234],{"type":53,"value":500},{"type":43,"tag":395,"props":3236,"children":3237},{"style":1192},[3238],{"type":53,"value":2767},{"type":43,"tag":395,"props":3240,"children":3241},{"style":492},[3242],{"type":53,"value":3243},"arg1",{"type":43,"tag":395,"props":3245,"children":3246},{"style":402},[3247],{"type":53,"value":500},{"type":43,"tag":395,"props":3249,"children":3250},{"style":492},[3251],{"type":53,"value":3252}," arg2",{"type":43,"tag":395,"props":3254,"children":3255},{"style":1192},[3256],{"type":53,"value":3257},"])",{"type":43,"tag":395,"props":3259,"children":3260},{"style":402},[3261],{"type":53,"value":560},{"type":43,"tag":395,"props":3263,"children":3264},{"class":397,"line":673},[3265,3269,3274,3278,3282,3286,3290,3295,3299,3303,3307,3312,3316,3320],{"type":43,"tag":395,"props":3266,"children":3267},{"style":481},[3268],{"type":53,"value":1234},{"type":43,"tag":395,"props":3270,"children":3271},{"style":492},[3272],{"type":53,"value":3273}," Response",{"type":43,"tag":395,"props":3275,"children":3276},{"style":402},[3277],{"type":53,"value":1243},{"type":43,"tag":395,"props":3279,"children":3280},{"style":1108},[3281],{"type":53,"value":1248},{"type":43,"tag":395,"props":3283,"children":3284},{"style":1192},[3285],{"type":53,"value":1116},{"type":43,"tag":395,"props":3287,"children":3288},{"style":402},[3289],{"type":53,"value":2608},{"type":43,"tag":395,"props":3291,"children":3292},{"style":1192},[3293],{"type":53,"value":3294}," runId",{"type":43,"tag":395,"props":3296,"children":3297},{"style":402},[3298],{"type":53,"value":109},{"type":43,"tag":395,"props":3300,"children":3301},{"style":492},[3302],{"type":53,"value":3209},{"type":43,"tag":395,"props":3304,"children":3305},{"style":402},[3306],{"type":53,"value":1243},{"type":43,"tag":395,"props":3308,"children":3309},{"style":492},[3310],{"type":53,"value":3311},"runId",{"type":43,"tag":395,"props":3313,"children":3314},{"style":402},[3315],{"type":53,"value":537},{"type":43,"tag":395,"props":3317,"children":3318},{"style":1192},[3319],{"type":53,"value":1137},{"type":43,"tag":395,"props":3321,"children":3322},{"style":402},[3323],{"type":53,"value":560},{"type":43,"tag":395,"props":3325,"children":3326},{"class":397,"line":682},[3327],{"type":43,"tag":395,"props":3328,"children":3329},{"style":402},[3330],{"type":53,"value":1265},{"type":43,"tag":395,"props":3332,"children":3333},{"class":397,"line":751},[3334],{"type":43,"tag":395,"props":3335,"children":3336},{"emptyLinePlaceholder":667},[3337],{"type":53,"value":670},{"type":43,"tag":395,"props":3339,"children":3340},{"class":397,"line":759},[3341],{"type":43,"tag":395,"props":3342,"children":3343},{"style":423},[3344],{"type":53,"value":3345},"\u002F\u002F No-args workflow\n",{"type":43,"tag":395,"props":3347,"children":3348},{"class":397,"line":768},[3349,3354,3359,3364,3368,3372,3377],{"type":43,"tag":395,"props":3350,"children":3351},{"style":1097},[3352],{"type":53,"value":3353},"const",{"type":43,"tag":395,"props":3355,"children":3356},{"style":492},[3357],{"type":53,"value":3358}," run ",{"type":43,"tag":395,"props":3360,"children":3361},{"style":402},[3362],{"type":53,"value":3363},"=",{"type":43,"tag":395,"props":3365,"children":3366},{"style":481},[3367],{"type":53,"value":1185},{"type":43,"tag":395,"props":3369,"children":3370},{"style":1108},[3371],{"type":53,"value":696},{"type":43,"tag":395,"props":3373,"children":3374},{"style":492},[3375],{"type":53,"value":3376},"(noArgWorkflow)",{"type":43,"tag":395,"props":3378,"children":3379},{"style":402},[3380],{"type":53,"value":560},{"type":43,"tag":66,"props":3382,"children":3383},{},[3384],{"type":43,"tag":119,"props":3385,"children":3386},{},[3387],{"type":53,"value":3388},"Starting child workflows from inside a workflow — must use a step:",{"type":43,"tag":384,"props":3390,"children":3392},{"className":386,"code":3391,"language":388,"meta":389,"style":389},"import { start } from \"workflow\u002Fapi\";\n\n\u002F\u002F Wrap start() in a step function\nasync function triggerChild(data: string) {\n  \"use step\";\n  const run = await start(childWorkflow, [data]);\n  return run.runId;\n}\n\nexport async function parentWorkflow() {\n  \"use workflow\";\n  const childRunId = await triggerChild(\"some data\");  \u002F\u002F Fire-and-forget via step\n  await sleep(\"1h\");\n}\n",[3393],{"type":43,"tag":58,"props":3394,"children":3395},{"__ignoreMap":389},[3396,3435,3442,3450,3490,3509,3561,3584,3591,3598,3626,3645,3699,3736],{"type":43,"tag":395,"props":3397,"children":3398},{"class":397,"line":398},[3399,3403,3407,3411,3415,3419,3423,3427,3431],{"type":43,"tag":395,"props":3400,"children":3401},{"style":481},[3402],{"type":53,"value":484},{"type":43,"tag":395,"props":3404,"children":3405},{"style":402},[3406],{"type":53,"value":489},{"type":43,"tag":395,"props":3408,"children":3409},{"style":492},[3410],{"type":53,"value":696},{"type":43,"tag":395,"props":3412,"children":3413},{"style":402},[3414],{"type":53,"value":537},{"type":43,"tag":395,"props":3416,"children":3417},{"style":481},[3418],{"type":53,"value":542},{"type":43,"tag":395,"props":3420,"children":3421},{"style":402},[3422],{"type":53,"value":547},{"type":43,"tag":395,"props":3424,"children":3425},{"style":408},[3426],{"type":53,"value":740},{"type":43,"tag":395,"props":3428,"children":3429},{"style":402},[3430],{"type":53,"value":405},{"type":43,"tag":395,"props":3432,"children":3433},{"style":402},[3434],{"type":53,"value":560},{"type":43,"tag":395,"props":3436,"children":3437},{"class":397,"line":429},[3438],{"type":43,"tag":395,"props":3439,"children":3440},{"emptyLinePlaceholder":667},[3441],{"type":53,"value":670},{"type":43,"tag":395,"props":3443,"children":3444},{"class":397,"line":563},[3445],{"type":43,"tag":395,"props":3446,"children":3447},{"style":423},[3448],{"type":53,"value":3449},"\u002F\u002F Wrap start() in a step function\n",{"type":43,"tag":395,"props":3451,"children":3452},{"class":397,"line":613},[3453,3457,3461,3466,3470,3474,3478,3482,3486],{"type":43,"tag":395,"props":3454,"children":3455},{"style":1097},[3456],{"type":53,"value":1100},{"type":43,"tag":395,"props":3458,"children":3459},{"style":1097},[3460],{"type":53,"value":1105},{"type":43,"tag":395,"props":3462,"children":3463},{"style":1108},[3464],{"type":53,"value":3465}," triggerChild",{"type":43,"tag":395,"props":3467,"children":3468},{"style":402},[3469],{"type":53,"value":1116},{"type":43,"tag":395,"props":3471,"children":3472},{"style":1119},[3473],{"type":53,"value":1297},{"type":43,"tag":395,"props":3475,"children":3476},{"style":402},[3477],{"type":53,"value":109},{"type":43,"tag":395,"props":3479,"children":3480},{"style":1129},[3481],{"type":53,"value":1132},{"type":43,"tag":395,"props":3483,"children":3484},{"style":402},[3485],{"type":53,"value":1137},{"type":43,"tag":395,"props":3487,"children":3488},{"style":402},[3489],{"type":53,"value":1142},{"type":43,"tag":395,"props":3491,"children":3492},{"class":397,"line":663},[3493,3497,3501,3505],{"type":43,"tag":395,"props":3494,"children":3495},{"style":402},[3496],{"type":53,"value":1150},{"type":43,"tag":395,"props":3498,"children":3499},{"style":408},[3500],{"type":53,"value":439},{"type":43,"tag":395,"props":3502,"children":3503},{"style":402},[3504],{"type":53,"value":405},{"type":43,"tag":395,"props":3506,"children":3507},{"style":402},[3508],{"type":53,"value":560},{"type":43,"tag":395,"props":3510,"children":3511},{"class":397,"line":673},[3512,3516,3520,3524,3528,3532,3536,3541,3545,3549,3553,3557],{"type":43,"tag":395,"props":3513,"children":3514},{"style":1097},[3515],{"type":53,"value":1170},{"type":43,"tag":395,"props":3517,"children":3518},{"style":492},[3519],{"type":53,"value":3209},{"type":43,"tag":395,"props":3521,"children":3522},{"style":402},[3523],{"type":53,"value":1180},{"type":43,"tag":395,"props":3525,"children":3526},{"style":481},[3527],{"type":53,"value":1185},{"type":43,"tag":395,"props":3529,"children":3530},{"style":1108},[3531],{"type":53,"value":696},{"type":43,"tag":395,"props":3533,"children":3534},{"style":1192},[3535],{"type":53,"value":1116},{"type":43,"tag":395,"props":3537,"children":3538},{"style":492},[3539],{"type":53,"value":3540},"childWorkflow",{"type":43,"tag":395,"props":3542,"children":3543},{"style":402},[3544],{"type":53,"value":500},{"type":43,"tag":395,"props":3546,"children":3547},{"style":1192},[3548],{"type":53,"value":2767},{"type":43,"tag":395,"props":3550,"children":3551},{"style":492},[3552],{"type":53,"value":1297},{"type":43,"tag":395,"props":3554,"children":3555},{"style":1192},[3556],{"type":53,"value":3257},{"type":43,"tag":395,"props":3558,"children":3559},{"style":402},[3560],{"type":53,"value":560},{"type":43,"tag":395,"props":3562,"children":3563},{"class":397,"line":682},[3564,3568,3572,3576,3580],{"type":43,"tag":395,"props":3565,"children":3566},{"style":481},[3567],{"type":53,"value":1234},{"type":43,"tag":395,"props":3569,"children":3570},{"style":492},[3571],{"type":53,"value":3209},{"type":43,"tag":395,"props":3573,"children":3574},{"style":402},[3575],{"type":53,"value":1243},{"type":43,"tag":395,"props":3577,"children":3578},{"style":492},[3579],{"type":53,"value":3311},{"type":43,"tag":395,"props":3581,"children":3582},{"style":402},[3583],{"type":53,"value":560},{"type":43,"tag":395,"props":3585,"children":3586},{"class":397,"line":751},[3587],{"type":43,"tag":395,"props":3588,"children":3589},{"style":402},[3590],{"type":53,"value":1265},{"type":43,"tag":395,"props":3592,"children":3593},{"class":397,"line":759},[3594],{"type":43,"tag":395,"props":3595,"children":3596},{"emptyLinePlaceholder":667},[3597],{"type":53,"value":670},{"type":43,"tag":395,"props":3599,"children":3600},{"class":397,"line":768},[3601,3605,3609,3613,3618,3622],{"type":43,"tag":395,"props":3602,"children":3603},{"style":481},[3604],{"type":53,"value":1508},{"type":43,"tag":395,"props":3606,"children":3607},{"style":1097},[3608],{"type":53,"value":1513},{"type":43,"tag":395,"props":3610,"children":3611},{"style":1097},[3612],{"type":53,"value":1105},{"type":43,"tag":395,"props":3614,"children":3615},{"style":1108},[3616],{"type":53,"value":3617}," parentWorkflow",{"type":43,"tag":395,"props":3619,"children":3620},{"style":402},[3621],{"type":53,"value":1253},{"type":43,"tag":395,"props":3623,"children":3624},{"style":402},[3625],{"type":53,"value":1142},{"type":43,"tag":395,"props":3627,"children":3628},{"class":397,"line":837},[3629,3633,3637,3641],{"type":43,"tag":395,"props":3630,"children":3631},{"style":402},[3632],{"type":53,"value":1150},{"type":43,"tag":395,"props":3634,"children":3635},{"style":408},[3636],{"type":53,"value":411},{"type":43,"tag":395,"props":3638,"children":3639},{"style":402},[3640],{"type":53,"value":405},{"type":43,"tag":395,"props":3642,"children":3643},{"style":402},[3644],{"type":53,"value":560},{"type":43,"tag":395,"props":3646,"children":3647},{"class":397,"line":845},[3648,3652,3657,3661,3665,3669,3673,3677,3682,3686,3690,3694],{"type":43,"tag":395,"props":3649,"children":3650},{"style":1097},[3651],{"type":53,"value":1170},{"type":43,"tag":395,"props":3653,"children":3654},{"style":492},[3655],{"type":53,"value":3656}," childRunId",{"type":43,"tag":395,"props":3658,"children":3659},{"style":402},[3660],{"type":53,"value":1180},{"type":43,"tag":395,"props":3662,"children":3663},{"style":481},[3664],{"type":53,"value":1185},{"type":43,"tag":395,"props":3666,"children":3667},{"style":1108},[3668],{"type":53,"value":3465},{"type":43,"tag":395,"props":3670,"children":3671},{"style":1192},[3672],{"type":53,"value":1116},{"type":43,"tag":395,"props":3674,"children":3675},{"style":402},[3676],{"type":53,"value":405},{"type":43,"tag":395,"props":3678,"children":3679},{"style":408},[3680],{"type":53,"value":3681},"some data",{"type":43,"tag":395,"props":3683,"children":3684},{"style":402},[3685],{"type":53,"value":405},{"type":43,"tag":395,"props":3687,"children":3688},{"style":1192},[3689],{"type":53,"value":1137},{"type":43,"tag":395,"props":3691,"children":3692},{"style":402},[3693],{"type":53,"value":420},{"type":43,"tag":395,"props":3695,"children":3696},{"style":423},[3697],{"type":53,"value":3698},"  \u002F\u002F Fire-and-forget via step\n",{"type":43,"tag":395,"props":3700,"children":3701},{"class":397,"line":854},[3702,3707,3711,3715,3719,3724,3728,3732],{"type":43,"tag":395,"props":3703,"children":3704},{"style":481},[3705],{"type":53,"value":3706},"  await",{"type":43,"tag":395,"props":3708,"children":3709},{"style":1108},[3710],{"type":53,"value":495},{"type":43,"tag":395,"props":3712,"children":3713},{"style":1192},[3714],{"type":53,"value":1116},{"type":43,"tag":395,"props":3716,"children":3717},{"style":402},[3718],{"type":53,"value":405},{"type":43,"tag":395,"props":3720,"children":3721},{"style":408},[3722],{"type":53,"value":3723},"1h",{"type":43,"tag":395,"props":3725,"children":3726},{"style":402},[3727],{"type":53,"value":405},{"type":43,"tag":395,"props":3729,"children":3730},{"style":1192},[3731],{"type":53,"value":1137},{"type":43,"tag":395,"props":3733,"children":3734},{"style":402},[3735],{"type":53,"value":560},{"type":43,"tag":395,"props":3737,"children":3738},{"class":397,"line":896},[3739],{"type":43,"tag":395,"props":3740,"children":3741},{"style":402},[3742],{"type":53,"value":1265},{"type":43,"tag":66,"props":3744,"children":3745},{},[3746,3751,3753,3759],{"type":43,"tag":58,"props":3747,"children":3749},{"className":3748},[],[3750],{"type":53,"value":3094},{"type":53,"value":3752}," returns immediately — it doesn't wait for the workflow to complete. Use ",{"type":43,"tag":58,"props":3754,"children":3756},{"className":3755},[],[3757],{"type":53,"value":3758},"run.returnValue",{"type":53,"value":3760}," to await completion.",{"type":43,"tag":44,"props":3762,"children":3764},{"id":3763},"hooks-pause-resume-with-external-events",[3765],{"type":53,"value":3766},"Hooks — Pause & Resume with External Events",{"type":43,"tag":66,"props":3768,"children":3769},{},[3770,3772,3777,3779,3785,3787,3792,3794,3799,3801,3807,3809,3815,3817,3822],{"type":53,"value":3771},"Hooks let workflows wait for external data. Use ",{"type":43,"tag":58,"props":3773,"children":3775},{"className":3774},[],[3776],{"type":53,"value":3009},{"type":53,"value":3778}," inside a workflow and ",{"type":43,"tag":58,"props":3780,"children":3782},{"className":3781},[],[3783],{"type":53,"value":3784},"resumeHook()",{"type":53,"value":3786}," from API routes. Deterministic tokens are for ",{"type":43,"tag":58,"props":3788,"children":3790},{"className":3789},[],[3791],{"type":53,"value":3009},{"type":53,"value":3793}," + ",{"type":43,"tag":58,"props":3795,"children":3797},{"className":3796},[],[3798],{"type":53,"value":3784},{"type":53,"value":3800}," (server-side) only. ",{"type":43,"tag":58,"props":3802,"children":3804},{"className":3803},[],[3805],{"type":53,"value":3806},"createWebhook()",{"type":53,"value":3808}," always generates random tokens — do not pass a ",{"type":43,"tag":58,"props":3810,"children":3812},{"className":3811},[],[3813],{"type":53,"value":3814},"token",{"type":53,"value":3816}," option to ",{"type":43,"tag":58,"props":3818,"children":3820},{"className":3819},[],[3821],{"type":53,"value":3806},{"type":53,"value":1243},{"type":43,"tag":329,"props":3824,"children":3826},{"id":3825},"single-event",[3827],{"type":53,"value":3828},"Single event",{"type":43,"tag":384,"props":3830,"children":3832},{"className":386,"code":3831,"language":388,"meta":389,"style":389},"import { createHook } from \"workflow\";\n\nexport async function approvalWorkflow() {\n  \"use workflow\";\n\n  const hook = createHook\u003C{ approved: boolean }>({\n    token: \"approval-123\",  \u002F\u002F deterministic token for external systems\n  });\n\n  const result = await hook;  \u002F\u002F Workflow suspends here\n  return result.approved;\n}\n",[3833],{"type":43,"tag":58,"props":3834,"children":3835},{"__ignoreMap":389},[3836,3875,3882,3910,3929,3936,3988,4022,4037,4044,4076,4100],{"type":43,"tag":395,"props":3837,"children":3838},{"class":397,"line":398},[3839,3843,3847,3851,3855,3859,3863,3867,3871],{"type":43,"tag":395,"props":3840,"children":3841},{"style":481},[3842],{"type":53,"value":484},{"type":43,"tag":395,"props":3844,"children":3845},{"style":402},[3846],{"type":53,"value":489},{"type":43,"tag":395,"props":3848,"children":3849},{"style":492},[3850],{"type":53,"value":514},{"type":43,"tag":395,"props":3852,"children":3853},{"style":402},[3854],{"type":53,"value":537},{"type":43,"tag":395,"props":3856,"children":3857},{"style":481},[3858],{"type":53,"value":542},{"type":43,"tag":395,"props":3860,"children":3861},{"style":402},[3862],{"type":53,"value":547},{"type":43,"tag":395,"props":3864,"children":3865},{"style":408},[3866],{"type":53,"value":4},{"type":43,"tag":395,"props":3868,"children":3869},{"style":402},[3870],{"type":53,"value":405},{"type":43,"tag":395,"props":3872,"children":3873},{"style":402},[3874],{"type":53,"value":560},{"type":43,"tag":395,"props":3876,"children":3877},{"class":397,"line":429},[3878],{"type":43,"tag":395,"props":3879,"children":3880},{"emptyLinePlaceholder":667},[3881],{"type":53,"value":670},{"type":43,"tag":395,"props":3883,"children":3884},{"class":397,"line":563},[3885,3889,3893,3897,3902,3906],{"type":43,"tag":395,"props":3886,"children":3887},{"style":481},[3888],{"type":53,"value":1508},{"type":43,"tag":395,"props":3890,"children":3891},{"style":1097},[3892],{"type":53,"value":1513},{"type":43,"tag":395,"props":3894,"children":3895},{"style":1097},[3896],{"type":53,"value":1105},{"type":43,"tag":395,"props":3898,"children":3899},{"style":1108},[3900],{"type":53,"value":3901}," approvalWorkflow",{"type":43,"tag":395,"props":3903,"children":3904},{"style":402},[3905],{"type":53,"value":1253},{"type":43,"tag":395,"props":3907,"children":3908},{"style":402},[3909],{"type":53,"value":1142},{"type":43,"tag":395,"props":3911,"children":3912},{"class":397,"line":613},[3913,3917,3921,3925],{"type":43,"tag":395,"props":3914,"children":3915},{"style":402},[3916],{"type":53,"value":1150},{"type":43,"tag":395,"props":3918,"children":3919},{"style":408},[3920],{"type":53,"value":411},{"type":43,"tag":395,"props":3922,"children":3923},{"style":402},[3924],{"type":53,"value":405},{"type":43,"tag":395,"props":3926,"children":3927},{"style":402},[3928],{"type":53,"value":560},{"type":43,"tag":395,"props":3930,"children":3931},{"class":397,"line":663},[3932],{"type":43,"tag":395,"props":3933,"children":3934},{"emptyLinePlaceholder":667},[3935],{"type":53,"value":670},{"type":43,"tag":395,"props":3937,"children":3938},{"class":397,"line":673},[3939,3943,3948,3952,3956,3961,3966,3970,3975,3980,3984],{"type":43,"tag":395,"props":3940,"children":3941},{"style":1097},[3942],{"type":53,"value":1170},{"type":43,"tag":395,"props":3944,"children":3945},{"style":492},[3946],{"type":53,"value":3947}," hook",{"type":43,"tag":395,"props":3949,"children":3950},{"style":402},[3951],{"type":53,"value":1180},{"type":43,"tag":395,"props":3953,"children":3954},{"style":1108},[3955],{"type":53,"value":514},{"type":43,"tag":395,"props":3957,"children":3958},{"style":402},[3959],{"type":53,"value":3960},"\u003C{",{"type":43,"tag":395,"props":3962,"children":3963},{"style":1192},[3964],{"type":53,"value":3965}," approved",{"type":43,"tag":395,"props":3967,"children":3968},{"style":402},[3969],{"type":53,"value":109},{"type":43,"tag":395,"props":3971,"children":3972},{"style":1129},[3973],{"type":53,"value":3974}," boolean",{"type":43,"tag":395,"props":3976,"children":3977},{"style":402},[3978],{"type":53,"value":3979}," }>",{"type":43,"tag":395,"props":3981,"children":3982},{"style":1192},[3983],{"type":53,"value":1116},{"type":43,"tag":395,"props":3985,"children":3986},{"style":402},[3987],{"type":53,"value":1366},{"type":43,"tag":395,"props":3989,"children":3990},{"class":397,"line":682},[3991,3996,4000,4004,4009,4013,4017],{"type":43,"tag":395,"props":3992,"children":3993},{"style":1192},[3994],{"type":53,"value":3995},"    token",{"type":43,"tag":395,"props":3997,"children":3998},{"style":402},[3999],{"type":53,"value":109},{"type":43,"tag":395,"props":4001,"children":4002},{"style":402},[4003],{"type":53,"value":547},{"type":43,"tag":395,"props":4005,"children":4006},{"style":408},[4007],{"type":53,"value":4008},"approval-123",{"type":43,"tag":395,"props":4010,"children":4011},{"style":402},[4012],{"type":53,"value":405},{"type":43,"tag":395,"props":4014,"children":4015},{"style":402},[4016],{"type":53,"value":500},{"type":43,"tag":395,"props":4018,"children":4019},{"style":423},[4020],{"type":53,"value":4021},"  \u002F\u002F deterministic token for external systems\n",{"type":43,"tag":395,"props":4023,"children":4024},{"class":397,"line":751},[4025,4029,4033],{"type":43,"tag":395,"props":4026,"children":4027},{"style":402},[4028],{"type":53,"value":1470},{"type":43,"tag":395,"props":4030,"children":4031},{"style":1192},[4032],{"type":53,"value":1137},{"type":43,"tag":395,"props":4034,"children":4035},{"style":402},[4036],{"type":53,"value":560},{"type":43,"tag":395,"props":4038,"children":4039},{"class":397,"line":759},[4040],{"type":43,"tag":395,"props":4041,"children":4042},{"emptyLinePlaceholder":667},[4043],{"type":53,"value":670},{"type":43,"tag":395,"props":4045,"children":4046},{"class":397,"line":768},[4047,4051,4055,4059,4063,4067,4071],{"type":43,"tag":395,"props":4048,"children":4049},{"style":1097},[4050],{"type":53,"value":1170},{"type":43,"tag":395,"props":4052,"children":4053},{"style":492},[4054],{"type":53,"value":2720},{"type":43,"tag":395,"props":4056,"children":4057},{"style":402},[4058],{"type":53,"value":1180},{"type":43,"tag":395,"props":4060,"children":4061},{"style":481},[4062],{"type":53,"value":1185},{"type":43,"tag":395,"props":4064,"children":4065},{"style":492},[4066],{"type":53,"value":3947},{"type":43,"tag":395,"props":4068,"children":4069},{"style":402},[4070],{"type":53,"value":420},{"type":43,"tag":395,"props":4072,"children":4073},{"style":423},[4074],{"type":53,"value":4075},"  \u002F\u002F Workflow suspends here\n",{"type":43,"tag":395,"props":4077,"children":4078},{"class":397,"line":837},[4079,4083,4087,4091,4096],{"type":43,"tag":395,"props":4080,"children":4081},{"style":481},[4082],{"type":53,"value":1234},{"type":43,"tag":395,"props":4084,"children":4085},{"style":492},[4086],{"type":53,"value":2720},{"type":43,"tag":395,"props":4088,"children":4089},{"style":402},[4090],{"type":53,"value":1243},{"type":43,"tag":395,"props":4092,"children":4093},{"style":492},[4094],{"type":53,"value":4095},"approved",{"type":43,"tag":395,"props":4097,"children":4098},{"style":402},[4099],{"type":53,"value":560},{"type":43,"tag":395,"props":4101,"children":4102},{"class":397,"line":845},[4103],{"type":43,"tag":395,"props":4104,"children":4105},{"style":402},[4106],{"type":53,"value":1265},{"type":43,"tag":329,"props":4108,"children":4110},{"id":4109},"multiple-events-iterable-hooks",[4111],{"type":53,"value":4112},"Multiple events (iterable hooks)",{"type":43,"tag":66,"props":4114,"children":4115},{},[4116,4118,4124,4126,4132],{"type":53,"value":4117},"Hooks implement ",{"type":43,"tag":58,"props":4119,"children":4121},{"className":4120},[],[4122],{"type":53,"value":4123},"AsyncIterable",{"type":53,"value":4125}," — use ",{"type":43,"tag":58,"props":4127,"children":4129},{"className":4128},[],[4130],{"type":53,"value":4131},"for await...of",{"type":53,"value":4133}," to receive multiple events:",{"type":43,"tag":384,"props":4135,"children":4137},{"className":386,"code":4136,"language":388,"meta":389,"style":389},"import { createHook } from \"workflow\";\n\nexport async function chatWorkflow(channelId: string) {\n  \"use workflow\";\n\n  const hook = createHook\u003C{ text: string; done?: boolean }>({\n    token: `chat-${channelId}`,\n  });\n\n  for await (const event of hook) {\n    await processMessage(event.text);\n    if (event.done) break;\n  }\n}\n",[4138],{"type":43,"tag":58,"props":4139,"children":4140},{"__ignoreMap":389},[4141,4180,4187,4232,4251,4258,4324,4360,4375,4382,4426,4464,4502,4510],{"type":43,"tag":395,"props":4142,"children":4143},{"class":397,"line":398},[4144,4148,4152,4156,4160,4164,4168,4172,4176],{"type":43,"tag":395,"props":4145,"children":4146},{"style":481},[4147],{"type":53,"value":484},{"type":43,"tag":395,"props":4149,"children":4150},{"style":402},[4151],{"type":53,"value":489},{"type":43,"tag":395,"props":4153,"children":4154},{"style":492},[4155],{"type":53,"value":514},{"type":43,"tag":395,"props":4157,"children":4158},{"style":402},[4159],{"type":53,"value":537},{"type":43,"tag":395,"props":4161,"children":4162},{"style":481},[4163],{"type":53,"value":542},{"type":43,"tag":395,"props":4165,"children":4166},{"style":402},[4167],{"type":53,"value":547},{"type":43,"tag":395,"props":4169,"children":4170},{"style":408},[4171],{"type":53,"value":4},{"type":43,"tag":395,"props":4173,"children":4174},{"style":402},[4175],{"type":53,"value":405},{"type":43,"tag":395,"props":4177,"children":4178},{"style":402},[4179],{"type":53,"value":560},{"type":43,"tag":395,"props":4181,"children":4182},{"class":397,"line":429},[4183],{"type":43,"tag":395,"props":4184,"children":4185},{"emptyLinePlaceholder":667},[4186],{"type":53,"value":670},{"type":43,"tag":395,"props":4188,"children":4189},{"class":397,"line":563},[4190,4194,4198,4202,4207,4211,4216,4220,4224,4228],{"type":43,"tag":395,"props":4191,"children":4192},{"style":481},[4193],{"type":53,"value":1508},{"type":43,"tag":395,"props":4195,"children":4196},{"style":1097},[4197],{"type":53,"value":1513},{"type":43,"tag":395,"props":4199,"children":4200},{"style":1097},[4201],{"type":53,"value":1105},{"type":43,"tag":395,"props":4203,"children":4204},{"style":1108},[4205],{"type":53,"value":4206}," chatWorkflow",{"type":43,"tag":395,"props":4208,"children":4209},{"style":402},[4210],{"type":53,"value":1116},{"type":43,"tag":395,"props":4212,"children":4213},{"style":1119},[4214],{"type":53,"value":4215},"channelId",{"type":43,"tag":395,"props":4217,"children":4218},{"style":402},[4219],{"type":53,"value":109},{"type":43,"tag":395,"props":4221,"children":4222},{"style":1129},[4223],{"type":53,"value":1132},{"type":43,"tag":395,"props":4225,"children":4226},{"style":402},[4227],{"type":53,"value":1137},{"type":43,"tag":395,"props":4229,"children":4230},{"style":402},[4231],{"type":53,"value":1142},{"type":43,"tag":395,"props":4233,"children":4234},{"class":397,"line":613},[4235,4239,4243,4247],{"type":43,"tag":395,"props":4236,"children":4237},{"style":402},[4238],{"type":53,"value":1150},{"type":43,"tag":395,"props":4240,"children":4241},{"style":408},[4242],{"type":53,"value":411},{"type":43,"tag":395,"props":4244,"children":4245},{"style":402},[4246],{"type":53,"value":405},{"type":43,"tag":395,"props":4248,"children":4249},{"style":402},[4250],{"type":53,"value":560},{"type":43,"tag":395,"props":4252,"children":4253},{"class":397,"line":663},[4254],{"type":43,"tag":395,"props":4255,"children":4256},{"emptyLinePlaceholder":667},[4257],{"type":53,"value":670},{"type":43,"tag":395,"props":4259,"children":4260},{"class":397,"line":673},[4261,4265,4269,4273,4277,4281,4286,4290,4294,4298,4303,4308,4312,4316,4320],{"type":43,"tag":395,"props":4262,"children":4263},{"style":1097},[4264],{"type":53,"value":1170},{"type":43,"tag":395,"props":4266,"children":4267},{"style":492},[4268],{"type":53,"value":3947},{"type":43,"tag":395,"props":4270,"children":4271},{"style":402},[4272],{"type":53,"value":1180},{"type":43,"tag":395,"props":4274,"children":4275},{"style":1108},[4276],{"type":53,"value":514},{"type":43,"tag":395,"props":4278,"children":4279},{"style":402},[4280],{"type":53,"value":3960},{"type":43,"tag":395,"props":4282,"children":4283},{"style":1192},[4284],{"type":53,"value":4285}," text",{"type":43,"tag":395,"props":4287,"children":4288},{"style":402},[4289],{"type":53,"value":109},{"type":43,"tag":395,"props":4291,"children":4292},{"style":1129},[4293],{"type":53,"value":1132},{"type":43,"tag":395,"props":4295,"children":4296},{"style":402},[4297],{"type":53,"value":420},{"type":43,"tag":395,"props":4299,"children":4300},{"style":1192},[4301],{"type":53,"value":4302}," done",{"type":43,"tag":395,"props":4304,"children":4305},{"style":402},[4306],{"type":53,"value":4307},"?:",{"type":43,"tag":395,"props":4309,"children":4310},{"style":1129},[4311],{"type":53,"value":3974},{"type":43,"tag":395,"props":4313,"children":4314},{"style":402},[4315],{"type":53,"value":3979},{"type":43,"tag":395,"props":4317,"children":4318},{"style":1192},[4319],{"type":53,"value":1116},{"type":43,"tag":395,"props":4321,"children":4322},{"style":402},[4323],{"type":53,"value":1366},{"type":43,"tag":395,"props":4325,"children":4326},{"class":397,"line":682},[4327,4331,4335,4339,4344,4348,4352,4356],{"type":43,"tag":395,"props":4328,"children":4329},{"style":1192},[4330],{"type":53,"value":3995},{"type":43,"tag":395,"props":4332,"children":4333},{"style":402},[4334],{"type":53,"value":109},{"type":43,"tag":395,"props":4336,"children":4337},{"style":402},[4338],{"type":53,"value":1426},{"type":43,"tag":395,"props":4340,"children":4341},{"style":408},[4342],{"type":53,"value":4343},"chat-",{"type":43,"tag":395,"props":4345,"children":4346},{"style":402},[4347],{"type":53,"value":1209},{"type":43,"tag":395,"props":4349,"children":4350},{"style":492},[4351],{"type":53,"value":4215},{"type":43,"tag":395,"props":4353,"children":4354},{"style":402},[4355],{"type":53,"value":1218},{"type":43,"tag":395,"props":4357,"children":4358},{"style":402},[4359],{"type":53,"value":1409},{"type":43,"tag":395,"props":4361,"children":4362},{"class":397,"line":751},[4363,4367,4371],{"type":43,"tag":395,"props":4364,"children":4365},{"style":402},[4366],{"type":53,"value":1470},{"type":43,"tag":395,"props":4368,"children":4369},{"style":1192},[4370],{"type":53,"value":1137},{"type":43,"tag":395,"props":4372,"children":4373},{"style":402},[4374],{"type":53,"value":560},{"type":43,"tag":395,"props":4376,"children":4377},{"class":397,"line":759},[4378],{"type":43,"tag":395,"props":4379,"children":4380},{"emptyLinePlaceholder":667},[4381],{"type":53,"value":670},{"type":43,"tag":395,"props":4383,"children":4384},{"class":397,"line":768},[4385,4390,4394,4399,4403,4408,4413,4417,4422],{"type":43,"tag":395,"props":4386,"children":4387},{"style":481},[4388],{"type":53,"value":4389},"  for",{"type":43,"tag":395,"props":4391,"children":4392},{"style":481},[4393],{"type":53,"value":1185},{"type":43,"tag":395,"props":4395,"children":4396},{"style":1192},[4397],{"type":53,"value":4398}," (",{"type":43,"tag":395,"props":4400,"children":4401},{"style":1097},[4402],{"type":53,"value":3353},{"type":43,"tag":395,"props":4404,"children":4405},{"style":492},[4406],{"type":53,"value":4407}," event",{"type":43,"tag":395,"props":4409,"children":4410},{"style":402},[4411],{"type":53,"value":4412}," of",{"type":43,"tag":395,"props":4414,"children":4415},{"style":492},[4416],{"type":53,"value":3947},{"type":43,"tag":395,"props":4418,"children":4419},{"style":1192},[4420],{"type":53,"value":4421},") ",{"type":43,"tag":395,"props":4423,"children":4424},{"style":402},[4425],{"type":53,"value":1366},{"type":43,"tag":395,"props":4427,"children":4428},{"class":397,"line":837},[4429,4434,4439,4443,4448,4452,4456,4460],{"type":43,"tag":395,"props":4430,"children":4431},{"style":481},[4432],{"type":53,"value":4433},"    await",{"type":43,"tag":395,"props":4435,"children":4436},{"style":1108},[4437],{"type":53,"value":4438}," processMessage",{"type":43,"tag":395,"props":4440,"children":4441},{"style":1192},[4442],{"type":53,"value":1116},{"type":43,"tag":395,"props":4444,"children":4445},{"style":492},[4446],{"type":53,"value":4447},"event",{"type":43,"tag":395,"props":4449,"children":4450},{"style":402},[4451],{"type":53,"value":1243},{"type":43,"tag":395,"props":4453,"children":4454},{"style":492},[4455],{"type":53,"value":53},{"type":43,"tag":395,"props":4457,"children":4458},{"style":1192},[4459],{"type":53,"value":1137},{"type":43,"tag":395,"props":4461,"children":4462},{"style":402},[4463],{"type":53,"value":560},{"type":43,"tag":395,"props":4465,"children":4466},{"class":397,"line":845},[4467,4472,4476,4480,4484,4489,4493,4498],{"type":43,"tag":395,"props":4468,"children":4469},{"style":481},[4470],{"type":53,"value":4471},"    if",{"type":43,"tag":395,"props":4473,"children":4474},{"style":1192},[4475],{"type":53,"value":4398},{"type":43,"tag":395,"props":4477,"children":4478},{"style":492},[4479],{"type":53,"value":4447},{"type":43,"tag":395,"props":4481,"children":4482},{"style":402},[4483],{"type":53,"value":1243},{"type":43,"tag":395,"props":4485,"children":4486},{"style":492},[4487],{"type":53,"value":4488},"done",{"type":43,"tag":395,"props":4490,"children":4491},{"style":1192},[4492],{"type":53,"value":4421},{"type":43,"tag":395,"props":4494,"children":4495},{"style":481},[4496],{"type":53,"value":4497},"break",{"type":43,"tag":395,"props":4499,"children":4500},{"style":402},[4501],{"type":53,"value":560},{"type":43,"tag":395,"props":4503,"children":4504},{"class":397,"line":854},[4505],{"type":43,"tag":395,"props":4506,"children":4507},{"style":402},[4508],{"type":53,"value":4509},"  }\n",{"type":43,"tag":395,"props":4511,"children":4512},{"class":397,"line":896},[4513],{"type":43,"tag":395,"props":4514,"children":4515},{"style":402},[4516],{"type":53,"value":1265},{"type":43,"tag":66,"props":4518,"children":4519},{},[4520,4522,4528],{"type":53,"value":4521},"Each ",{"type":43,"tag":58,"props":4523,"children":4525},{"className":4524},[],[4526],{"type":53,"value":4527},"resumeHook(token, payload)",{"type":53,"value":4529}," call delivers the next value to the loop.",{"type":43,"tag":329,"props":4531,"children":4533},{"id":4532},"resuming-from-api-routes",[4534],{"type":53,"value":4535},"Resuming from API routes",{"type":43,"tag":384,"props":4537,"children":4539},{"className":386,"code":4538,"language":388,"meta":389,"style":389},"import { resumeHook } from \"workflow\u002Fapi\";\n\nexport async function POST(req: Request) {\n  const { token, data } = await req.json();\n  await resumeHook(token, data);\n  return new Response(\"ok\");\n}\n",[4540],{"type":43,"tag":58,"props":4541,"children":4542},{"__ignoreMap":389},[4543,4582,4589,4634,4691,4726,4766],{"type":43,"tag":395,"props":4544,"children":4545},{"class":397,"line":398},[4546,4550,4554,4558,4562,4566,4570,4574,4578],{"type":43,"tag":395,"props":4547,"children":4548},{"style":481},[4549],{"type":53,"value":484},{"type":43,"tag":395,"props":4551,"children":4552},{"style":402},[4553],{"type":53,"value":489},{"type":43,"tag":395,"props":4555,"children":4556},{"style":492},[4557],{"type":53,"value":714},{"type":43,"tag":395,"props":4559,"children":4560},{"style":402},[4561],{"type":53,"value":537},{"type":43,"tag":395,"props":4563,"children":4564},{"style":481},[4565],{"type":53,"value":542},{"type":43,"tag":395,"props":4567,"children":4568},{"style":402},[4569],{"type":53,"value":547},{"type":43,"tag":395,"props":4571,"children":4572},{"style":408},[4573],{"type":53,"value":740},{"type":43,"tag":395,"props":4575,"children":4576},{"style":402},[4577],{"type":53,"value":405},{"type":43,"tag":395,"props":4579,"children":4580},{"style":402},[4581],{"type":53,"value":560},{"type":43,"tag":395,"props":4583,"children":4584},{"class":397,"line":429},[4585],{"type":43,"tag":395,"props":4586,"children":4587},{"emptyLinePlaceholder":667},[4588],{"type":53,"value":670},{"type":43,"tag":395,"props":4590,"children":4591},{"class":397,"line":563},[4592,4596,4600,4604,4608,4612,4617,4621,4626,4630],{"type":43,"tag":395,"props":4593,"children":4594},{"style":481},[4595],{"type":53,"value":1508},{"type":43,"tag":395,"props":4597,"children":4598},{"style":1097},[4599],{"type":53,"value":1513},{"type":43,"tag":395,"props":4601,"children":4602},{"style":1097},[4603],{"type":53,"value":1105},{"type":43,"tag":395,"props":4605,"children":4606},{"style":1108},[4607],{"type":53,"value":3189},{"type":43,"tag":395,"props":4609,"children":4610},{"style":402},[4611],{"type":53,"value":1116},{"type":43,"tag":395,"props":4613,"children":4614},{"style":1119},[4615],{"type":53,"value":4616},"req",{"type":43,"tag":395,"props":4618,"children":4619},{"style":402},[4620],{"type":53,"value":109},{"type":43,"tag":395,"props":4622,"children":4623},{"style":1129},[4624],{"type":53,"value":4625}," Request",{"type":43,"tag":395,"props":4627,"children":4628},{"style":402},[4629],{"type":53,"value":1137},{"type":43,"tag":395,"props":4631,"children":4632},{"style":402},[4633],{"type":53,"value":1142},{"type":43,"tag":395,"props":4635,"children":4636},{"class":397,"line":613},[4637,4641,4645,4650,4654,4658,4662,4666,4670,4675,4679,4683,4687],{"type":43,"tag":395,"props":4638,"children":4639},{"style":1097},[4640],{"type":53,"value":1170},{"type":43,"tag":395,"props":4642,"children":4643},{"style":402},[4644],{"type":53,"value":489},{"type":43,"tag":395,"props":4646,"children":4647},{"style":492},[4648],{"type":53,"value":4649}," token",{"type":43,"tag":395,"props":4651,"children":4652},{"style":402},[4653],{"type":53,"value":500},{"type":43,"tag":395,"props":4655,"children":4656},{"style":492},[4657],{"type":53,"value":1578},{"type":43,"tag":395,"props":4659,"children":4660},{"style":402},[4661],{"type":53,"value":537},{"type":43,"tag":395,"props":4663,"children":4664},{"style":402},[4665],{"type":53,"value":1180},{"type":43,"tag":395,"props":4667,"children":4668},{"style":481},[4669],{"type":53,"value":1185},{"type":43,"tag":395,"props":4671,"children":4672},{"style":492},[4673],{"type":53,"value":4674}," req",{"type":43,"tag":395,"props":4676,"children":4677},{"style":402},[4678],{"type":53,"value":1243},{"type":43,"tag":395,"props":4680,"children":4681},{"style":1108},[4682],{"type":53,"value":1248},{"type":43,"tag":395,"props":4684,"children":4685},{"style":1192},[4686],{"type":53,"value":1253},{"type":43,"tag":395,"props":4688,"children":4689},{"style":402},[4690],{"type":53,"value":560},{"type":43,"tag":395,"props":4692,"children":4693},{"class":397,"line":663},[4694,4698,4702,4706,4710,4714,4718,4722],{"type":43,"tag":395,"props":4695,"children":4696},{"style":481},[4697],{"type":53,"value":3706},{"type":43,"tag":395,"props":4699,"children":4700},{"style":1108},[4701],{"type":53,"value":714},{"type":43,"tag":395,"props":4703,"children":4704},{"style":1192},[4705],{"type":53,"value":1116},{"type":43,"tag":395,"props":4707,"children":4708},{"style":492},[4709],{"type":53,"value":3814},{"type":43,"tag":395,"props":4711,"children":4712},{"style":402},[4713],{"type":53,"value":500},{"type":43,"tag":395,"props":4715,"children":4716},{"style":492},[4717],{"type":53,"value":1578},{"type":43,"tag":395,"props":4719,"children":4720},{"style":1192},[4721],{"type":53,"value":1137},{"type":43,"tag":395,"props":4723,"children":4724},{"style":402},[4725],{"type":53,"value":560},{"type":43,"tag":395,"props":4727,"children":4728},{"class":397,"line":673},[4729,4733,4737,4741,4745,4749,4754,4758,4762],{"type":43,"tag":395,"props":4730,"children":4731},{"style":481},[4732],{"type":53,"value":1234},{"type":43,"tag":395,"props":4734,"children":4735},{"style":402},[4736],{"type":53,"value":2444},{"type":43,"tag":395,"props":4738,"children":4739},{"style":1108},[4740],{"type":53,"value":3273},{"type":43,"tag":395,"props":4742,"children":4743},{"style":1192},[4744],{"type":53,"value":1116},{"type":43,"tag":395,"props":4746,"children":4747},{"style":402},[4748],{"type":53,"value":405},{"type":43,"tag":395,"props":4750,"children":4751},{"style":408},[4752],{"type":53,"value":4753},"ok",{"type":43,"tag":395,"props":4755,"children":4756},{"style":402},[4757],{"type":53,"value":405},{"type":43,"tag":395,"props":4759,"children":4760},{"style":1192},[4761],{"type":53,"value":1137},{"type":43,"tag":395,"props":4763,"children":4764},{"style":402},[4765],{"type":53,"value":560},{"type":43,"tag":395,"props":4767,"children":4768},{"class":397,"line":682},[4769],{"type":43,"tag":395,"props":4770,"children":4771},{"style":402},[4772],{"type":53,"value":1265},{"type":43,"tag":44,"props":4774,"children":4776},{"id":4775},"error-handling",[4777],{"type":53,"value":4778},"Error Handling",{"type":43,"tag":66,"props":4780,"children":4781},{},[4782,4783,4789,4791,4797],{"type":53,"value":1801},{"type":43,"tag":58,"props":4784,"children":4786},{"className":4785},[],[4787],{"type":53,"value":4788},"FatalError",{"type":53,"value":4790}," for permanent failures (no retry), ",{"type":43,"tag":58,"props":4792,"children":4794},{"className":4793},[],[4795],{"type":53,"value":4796},"RetryableError",{"type":53,"value":4798}," for transient failures:",{"type":43,"tag":384,"props":4800,"children":4802},{"className":386,"code":4801,"language":388,"meta":389,"style":389},"import { FatalError, RetryableError } from \"workflow\";\n\nif (res.status >= 400 && res.status \u003C 500) {\n  throw new FatalError(`Client error: ${res.status}`);\n}\nif (res.status === 429) {\n  throw new RetryableError(\"Rate limited\", { retryAfter: \"5m\" });\n}\n",[4803],{"type":43,"tag":58,"props":4804,"children":4805},{"__ignoreMap":389},[4806,4853,4860,4927,4986,4993,5030,5104],{"type":43,"tag":395,"props":4807,"children":4808},{"class":397,"line":398},[4809,4813,4817,4821,4825,4829,4833,4837,4841,4845,4849],{"type":43,"tag":395,"props":4810,"children":4811},{"style":481},[4812],{"type":53,"value":484},{"type":43,"tag":395,"props":4814,"children":4815},{"style":402},[4816],{"type":53,"value":489},{"type":43,"tag":395,"props":4818,"children":4819},{"style":492},[4820],{"type":53,"value":577},{"type":43,"tag":395,"props":4822,"children":4823},{"style":402},[4824],{"type":53,"value":500},{"type":43,"tag":395,"props":4826,"children":4827},{"style":492},[4828],{"type":53,"value":586},{"type":43,"tag":395,"props":4830,"children":4831},{"style":402},[4832],{"type":53,"value":537},{"type":43,"tag":395,"props":4834,"children":4835},{"style":481},[4836],{"type":53,"value":542},{"type":43,"tag":395,"props":4838,"children":4839},{"style":402},[4840],{"type":53,"value":547},{"type":43,"tag":395,"props":4842,"children":4843},{"style":408},[4844],{"type":53,"value":4},{"type":43,"tag":395,"props":4846,"children":4847},{"style":402},[4848],{"type":53,"value":405},{"type":43,"tag":395,"props":4850,"children":4851},{"style":402},[4852],{"type":53,"value":560},{"type":43,"tag":395,"props":4854,"children":4855},{"class":397,"line":429},[4856],{"type":43,"tag":395,"props":4857,"children":4858},{"emptyLinePlaceholder":667},[4859],{"type":53,"value":670},{"type":43,"tag":395,"props":4861,"children":4862},{"class":397,"line":563},[4863,4868,4873,4877,4882,4887,4892,4897,4902,4906,4910,4914,4919,4923],{"type":43,"tag":395,"props":4864,"children":4865},{"style":481},[4866],{"type":53,"value":4867},"if",{"type":43,"tag":395,"props":4869,"children":4870},{"style":492},[4871],{"type":53,"value":4872}," (res",{"type":43,"tag":395,"props":4874,"children":4875},{"style":402},[4876],{"type":53,"value":1243},{"type":43,"tag":395,"props":4878,"children":4879},{"style":492},[4880],{"type":53,"value":4881},"status ",{"type":43,"tag":395,"props":4883,"children":4884},{"style":402},[4885],{"type":53,"value":4886},">=",{"type":43,"tag":395,"props":4888,"children":4889},{"style":2880},[4890],{"type":53,"value":4891}," 400",{"type":43,"tag":395,"props":4893,"children":4894},{"style":402},[4895],{"type":53,"value":4896}," &&",{"type":43,"tag":395,"props":4898,"children":4899},{"style":492},[4900],{"type":53,"value":4901}," res",{"type":43,"tag":395,"props":4903,"children":4904},{"style":402},[4905],{"type":53,"value":1243},{"type":43,"tag":395,"props":4907,"children":4908},{"style":492},[4909],{"type":53,"value":4881},{"type":43,"tag":395,"props":4911,"children":4912},{"style":402},[4913],{"type":53,"value":2846},{"type":43,"tag":395,"props":4915,"children":4916},{"style":2880},[4917],{"type":53,"value":4918}," 500",{"type":43,"tag":395,"props":4920,"children":4921},{"style":492},[4922],{"type":53,"value":4421},{"type":43,"tag":395,"props":4924,"children":4925},{"style":402},[4926],{"type":53,"value":1366},{"type":43,"tag":395,"props":4928,"children":4929},{"class":397,"line":613},[4930,4935,4939,4943,4947,4951,4956,4960,4965,4969,4974,4978,4982],{"type":43,"tag":395,"props":4931,"children":4932},{"style":481},[4933],{"type":53,"value":4934},"  throw",{"type":43,"tag":395,"props":4936,"children":4937},{"style":402},[4938],{"type":53,"value":2444},{"type":43,"tag":395,"props":4940,"children":4941},{"style":1108},[4942],{"type":53,"value":577},{"type":43,"tag":395,"props":4944,"children":4945},{"style":1192},[4946],{"type":53,"value":1116},{"type":43,"tag":395,"props":4948,"children":4949},{"style":402},[4950],{"type":53,"value":1199},{"type":43,"tag":395,"props":4952,"children":4953},{"style":408},[4954],{"type":53,"value":4955},"Client error: ",{"type":43,"tag":395,"props":4957,"children":4958},{"style":402},[4959],{"type":53,"value":1209},{"type":43,"tag":395,"props":4961,"children":4962},{"style":492},[4963],{"type":53,"value":4964},"res",{"type":43,"tag":395,"props":4966,"children":4967},{"style":402},[4968],{"type":53,"value":1243},{"type":43,"tag":395,"props":4970,"children":4971},{"style":492},[4972],{"type":53,"value":4973},"status",{"type":43,"tag":395,"props":4975,"children":4976},{"style":402},[4977],{"type":53,"value":1218},{"type":43,"tag":395,"props":4979,"children":4980},{"style":1192},[4981],{"type":53,"value":1137},{"type":43,"tag":395,"props":4983,"children":4984},{"style":402},[4985],{"type":53,"value":560},{"type":43,"tag":395,"props":4987,"children":4988},{"class":397,"line":663},[4989],{"type":43,"tag":395,"props":4990,"children":4991},{"style":402},[4992],{"type":53,"value":1265},{"type":43,"tag":395,"props":4994,"children":4995},{"class":397,"line":673},[4996,5000,5004,5008,5012,5017,5022,5026],{"type":43,"tag":395,"props":4997,"children":4998},{"style":481},[4999],{"type":53,"value":4867},{"type":43,"tag":395,"props":5001,"children":5002},{"style":492},[5003],{"type":53,"value":4872},{"type":43,"tag":395,"props":5005,"children":5006},{"style":402},[5007],{"type":53,"value":1243},{"type":43,"tag":395,"props":5009,"children":5010},{"style":492},[5011],{"type":53,"value":4881},{"type":43,"tag":395,"props":5013,"children":5014},{"style":402},[5015],{"type":53,"value":5016},"===",{"type":43,"tag":395,"props":5018,"children":5019},{"style":2880},[5020],{"type":53,"value":5021}," 429",{"type":43,"tag":395,"props":5023,"children":5024},{"style":492},[5025],{"type":53,"value":4421},{"type":43,"tag":395,"props":5027,"children":5028},{"style":402},[5029],{"type":53,"value":1366},{"type":43,"tag":395,"props":5031,"children":5032},{"class":397,"line":682},[5033,5037,5041,5045,5049,5053,5058,5062,5066,5070,5075,5079,5083,5088,5092,5096,5100],{"type":43,"tag":395,"props":5034,"children":5035},{"style":481},[5036],{"type":53,"value":4934},{"type":43,"tag":395,"props":5038,"children":5039},{"style":402},[5040],{"type":53,"value":2444},{"type":43,"tag":395,"props":5042,"children":5043},{"style":1108},[5044],{"type":53,"value":586},{"type":43,"tag":395,"props":5046,"children":5047},{"style":1192},[5048],{"type":53,"value":1116},{"type":43,"tag":395,"props":5050,"children":5051},{"style":402},[5052],{"type":53,"value":405},{"type":43,"tag":395,"props":5054,"children":5055},{"style":408},[5056],{"type":53,"value":5057},"Rate limited",{"type":43,"tag":395,"props":5059,"children":5060},{"style":402},[5061],{"type":53,"value":405},{"type":43,"tag":395,"props":5063,"children":5064},{"style":402},[5065],{"type":53,"value":500},{"type":43,"tag":395,"props":5067,"children":5068},{"style":402},[5069],{"type":53,"value":489},{"type":43,"tag":395,"props":5071,"children":5072},{"style":1192},[5073],{"type":53,"value":5074}," retryAfter",{"type":43,"tag":395,"props":5076,"children":5077},{"style":402},[5078],{"type":53,"value":109},{"type":43,"tag":395,"props":5080,"children":5081},{"style":402},[5082],{"type":53,"value":547},{"type":43,"tag":395,"props":5084,"children":5085},{"style":408},[5086],{"type":53,"value":5087},"5m",{"type":43,"tag":395,"props":5089,"children":5090},{"style":402},[5091],{"type":53,"value":405},{"type":43,"tag":395,"props":5093,"children":5094},{"style":402},[5095],{"type":53,"value":537},{"type":43,"tag":395,"props":5097,"children":5098},{"style":1192},[5099],{"type":53,"value":1137},{"type":43,"tag":395,"props":5101,"children":5102},{"style":402},[5103],{"type":53,"value":560},{"type":43,"tag":395,"props":5105,"children":5106},{"class":397,"line":751},[5107],{"type":43,"tag":395,"props":5108,"children":5109},{"style":402},[5110],{"type":53,"value":1265},{"type":43,"tag":44,"props":5112,"children":5114},{"id":5113},"serialization",[5115],{"type":53,"value":5116},"Serialization",{"type":43,"tag":66,"props":5118,"children":5119},{},[5120],{"type":53,"value":5121},"All data passed to\u002Ffrom workflows and steps must be serializable.",{"type":43,"tag":66,"props":5123,"children":5124},{},[5125,5130],{"type":43,"tag":119,"props":5126,"children":5127},{},[5128],{"type":53,"value":5129},"Supported built-in types:",{"type":53,"value":5131}," string, number, boolean, null, undefined, bigint, plain objects, arrays, Date, RegExp, URL, URLSearchParams, Map, Set, Headers, ArrayBuffer, typed arrays, Request, Response, ReadableStream, WritableStream.",{"type":43,"tag":66,"props":5133,"children":5134},{},[5135,5140],{"type":43,"tag":119,"props":5136,"children":5137},{},[5138],{"type":53,"value":5139},"Not supported:",{"type":53,"value":5141}," Functions, Symbols, WeakMap\u002FWeakSet. Pass data, not callbacks.",{"type":43,"tag":329,"props":5143,"children":5145},{"id":5144},"custom-class-serialization",[5146],{"type":53,"value":5147},"Custom Class Serialization",{"type":43,"tag":66,"props":5149,"children":5150},{},[5151,5153,5158,5160,5166,5168,5173],{"type":53,"value":5152},"Class instances ",{"type":43,"tag":119,"props":5154,"children":5155},{},[5156],{"type":53,"value":5157},"can",{"type":53,"value":5159}," be serialized across workflow\u002Fstep boundaries by implementing the ",{"type":43,"tag":58,"props":5161,"children":5163},{"className":5162},[],[5164],{"type":53,"value":5165},"@workflow\u002Fserde",{"type":53,"value":5167}," protocol. This is essential when a class has instance methods with ",{"type":43,"tag":58,"props":5169,"children":5171},{"className":5170},[],[5172],{"type":53,"value":1067},{"type":53,"value":5174}," or when you want to pass class instances between steps.",{"type":43,"tag":66,"props":5176,"children":5177},{},[5178,5183,5184,5189],{"type":43,"tag":119,"props":5179,"children":5180},{},[5181],{"type":53,"value":5182},"Install:",{"type":53,"value":1995},{"type":43,"tag":58,"props":5185,"children":5187},{"className":5186},[],[5188],{"type":53,"value":5165},{"type":53,"value":5190}," must be a dependency of the package containing the class.",{"type":43,"tag":66,"props":5192,"children":5193},{},[5194,5199],{"type":43,"tag":119,"props":5195,"children":5196},{},[5197],{"type":53,"value":5198},"Pattern:",{"type":53,"value":5200}," Add two static methods inside the class body using computed property syntax:",{"type":43,"tag":384,"props":5202,"children":5204},{"className":386,"code":5203,"language":388,"meta":389,"style":389},"import { WORKFLOW_SERIALIZE, WORKFLOW_DESERIALIZE } from \"@workflow\u002Fserde\";\n\nexport class Point {\n  x: number;\n  y: number;\n\n  constructor(x: number, y: number) {\n    this.x = x;\n    this.y = y;\n  }\n\n  \u002F\u002F Serialize: return plain data (must be devalue-compatible types only)\n  static [WORKFLOW_SERIALIZE](instance: Point) {\n    return { x: instance.x, y: instance.y };\n  }\n\n  \u002F\u002F Deserialize: reconstruct from plain data\n  static [WORKFLOW_DESERIALIZE](data: { x: number; y: number }) {\n    return new Point(data.x, data.y);\n  }\n\n  async computeDistance(other: Point) {\n    \"use step\";\n    return Math.sqrt((this.x - other.x) ** 2 + (this.y - other.y) ** 2);\n  }\n}\n",[5205],{"type":43,"tag":58,"props":5206,"children":5207},{"__ignoreMap":389},[5208,5257,5264,5285,5306,5326,5333,5383,5408,5432,5439,5446,5454,5492,5553,5560,5567,5575,5639,5694,5701,5708,5746,5766,5886,5893],{"type":43,"tag":395,"props":5209,"children":5210},{"class":397,"line":398},[5211,5215,5219,5224,5228,5233,5237,5241,5245,5249,5253],{"type":43,"tag":395,"props":5212,"children":5213},{"style":481},[5214],{"type":53,"value":484},{"type":43,"tag":395,"props":5216,"children":5217},{"style":402},[5218],{"type":53,"value":489},{"type":43,"tag":395,"props":5220,"children":5221},{"style":492},[5222],{"type":53,"value":5223}," WORKFLOW_SERIALIZE",{"type":43,"tag":395,"props":5225,"children":5226},{"style":402},[5227],{"type":53,"value":500},{"type":43,"tag":395,"props":5229,"children":5230},{"style":492},[5231],{"type":53,"value":5232}," WORKFLOW_DESERIALIZE",{"type":43,"tag":395,"props":5234,"children":5235},{"style":402},[5236],{"type":53,"value":537},{"type":43,"tag":395,"props":5238,"children":5239},{"style":481},[5240],{"type":53,"value":542},{"type":43,"tag":395,"props":5242,"children":5243},{"style":402},[5244],{"type":53,"value":547},{"type":43,"tag":395,"props":5246,"children":5247},{"style":408},[5248],{"type":53,"value":5165},{"type":43,"tag":395,"props":5250,"children":5251},{"style":402},[5252],{"type":53,"value":405},{"type":43,"tag":395,"props":5254,"children":5255},{"style":402},[5256],{"type":53,"value":560},{"type":43,"tag":395,"props":5258,"children":5259},{"class":397,"line":429},[5260],{"type":43,"tag":395,"props":5261,"children":5262},{"emptyLinePlaceholder":667},[5263],{"type":53,"value":670},{"type":43,"tag":395,"props":5265,"children":5266},{"class":397,"line":563},[5267,5271,5276,5281],{"type":43,"tag":395,"props":5268,"children":5269},{"style":481},[5270],{"type":53,"value":1508},{"type":43,"tag":395,"props":5272,"children":5273},{"style":1097},[5274],{"type":53,"value":5275}," class",{"type":43,"tag":395,"props":5277,"children":5278},{"style":1129},[5279],{"type":53,"value":5280}," Point",{"type":43,"tag":395,"props":5282,"children":5283},{"style":402},[5284],{"type":53,"value":1142},{"type":43,"tag":395,"props":5286,"children":5287},{"class":397,"line":613},[5288,5293,5297,5302],{"type":43,"tag":395,"props":5289,"children":5290},{"style":1192},[5291],{"type":53,"value":5292},"  x",{"type":43,"tag":395,"props":5294,"children":5295},{"style":402},[5296],{"type":53,"value":109},{"type":43,"tag":395,"props":5298,"children":5299},{"style":1129},[5300],{"type":53,"value":5301}," number",{"type":43,"tag":395,"props":5303,"children":5304},{"style":402},[5305],{"type":53,"value":560},{"type":43,"tag":395,"props":5307,"children":5308},{"class":397,"line":663},[5309,5314,5318,5322],{"type":43,"tag":395,"props":5310,"children":5311},{"style":1192},[5312],{"type":53,"value":5313},"  y",{"type":43,"tag":395,"props":5315,"children":5316},{"style":402},[5317],{"type":53,"value":109},{"type":43,"tag":395,"props":5319,"children":5320},{"style":1129},[5321],{"type":53,"value":5301},{"type":43,"tag":395,"props":5323,"children":5324},{"style":402},[5325],{"type":53,"value":560},{"type":43,"tag":395,"props":5327,"children":5328},{"class":397,"line":673},[5329],{"type":43,"tag":395,"props":5330,"children":5331},{"emptyLinePlaceholder":667},[5332],{"type":53,"value":670},{"type":43,"tag":395,"props":5334,"children":5335},{"class":397,"line":682},[5336,5341,5345,5350,5354,5358,5362,5367,5371,5375,5379],{"type":43,"tag":395,"props":5337,"children":5338},{"style":1097},[5339],{"type":53,"value":5340},"  constructor",{"type":43,"tag":395,"props":5342,"children":5343},{"style":402},[5344],{"type":53,"value":1116},{"type":43,"tag":395,"props":5346,"children":5347},{"style":1119},[5348],{"type":53,"value":5349},"x",{"type":43,"tag":395,"props":5351,"children":5352},{"style":402},[5353],{"type":53,"value":109},{"type":43,"tag":395,"props":5355,"children":5356},{"style":1129},[5357],{"type":53,"value":5301},{"type":43,"tag":395,"props":5359,"children":5360},{"style":402},[5361],{"type":53,"value":500},{"type":43,"tag":395,"props":5363,"children":5364},{"style":1119},[5365],{"type":53,"value":5366}," y",{"type":43,"tag":395,"props":5368,"children":5369},{"style":402},[5370],{"type":53,"value":109},{"type":43,"tag":395,"props":5372,"children":5373},{"style":1129},[5374],{"type":53,"value":5301},{"type":43,"tag":395,"props":5376,"children":5377},{"style":402},[5378],{"type":53,"value":1137},{"type":43,"tag":395,"props":5380,"children":5381},{"style":402},[5382],{"type":53,"value":1142},{"type":43,"tag":395,"props":5384,"children":5385},{"class":397,"line":751},[5386,5391,5395,5399,5404],{"type":43,"tag":395,"props":5387,"children":5388},{"style":402},[5389],{"type":53,"value":5390},"    this.",{"type":43,"tag":395,"props":5392,"children":5393},{"style":492},[5394],{"type":53,"value":5349},{"type":43,"tag":395,"props":5396,"children":5397},{"style":402},[5398],{"type":53,"value":1180},{"type":43,"tag":395,"props":5400,"children":5401},{"style":492},[5402],{"type":53,"value":5403}," x",{"type":43,"tag":395,"props":5405,"children":5406},{"style":402},[5407],{"type":53,"value":560},{"type":43,"tag":395,"props":5409,"children":5410},{"class":397,"line":759},[5411,5415,5420,5424,5428],{"type":43,"tag":395,"props":5412,"children":5413},{"style":402},[5414],{"type":53,"value":5390},{"type":43,"tag":395,"props":5416,"children":5417},{"style":492},[5418],{"type":53,"value":5419},"y",{"type":43,"tag":395,"props":5421,"children":5422},{"style":402},[5423],{"type":53,"value":1180},{"type":43,"tag":395,"props":5425,"children":5426},{"style":492},[5427],{"type":53,"value":5366},{"type":43,"tag":395,"props":5429,"children":5430},{"style":402},[5431],{"type":53,"value":560},{"type":43,"tag":395,"props":5433,"children":5434},{"class":397,"line":768},[5435],{"type":43,"tag":395,"props":5436,"children":5437},{"style":402},[5438],{"type":53,"value":4509},{"type":43,"tag":395,"props":5440,"children":5441},{"class":397,"line":837},[5442],{"type":43,"tag":395,"props":5443,"children":5444},{"emptyLinePlaceholder":667},[5445],{"type":53,"value":670},{"type":43,"tag":395,"props":5447,"children":5448},{"class":397,"line":845},[5449],{"type":43,"tag":395,"props":5450,"children":5451},{"style":423},[5452],{"type":53,"value":5453},"  \u002F\u002F Serialize: return plain data (must be devalue-compatible types only)\n",{"type":43,"tag":395,"props":5455,"children":5456},{"class":397,"line":854},[5457,5462,5467,5471,5476,5480,5484,5488],{"type":43,"tag":395,"props":5458,"children":5459},{"style":1097},[5460],{"type":53,"value":5461},"  static",{"type":43,"tag":395,"props":5463,"children":5464},{"style":492},[5465],{"type":53,"value":5466}," [WORKFLOW_SERIALIZE]",{"type":43,"tag":395,"props":5468,"children":5469},{"style":402},[5470],{"type":53,"value":1116},{"type":43,"tag":395,"props":5472,"children":5473},{"style":1119},[5474],{"type":53,"value":5475},"instance",{"type":43,"tag":395,"props":5477,"children":5478},{"style":402},[5479],{"type":53,"value":109},{"type":43,"tag":395,"props":5481,"children":5482},{"style":1129},[5483],{"type":53,"value":5280},{"type":43,"tag":395,"props":5485,"children":5486},{"style":402},[5487],{"type":53,"value":1137},{"type":43,"tag":395,"props":5489,"children":5490},{"style":402},[5491],{"type":53,"value":1142},{"type":43,"tag":395,"props":5493,"children":5494},{"class":397,"line":896},[5495,5500,5504,5508,5512,5517,5521,5525,5529,5533,5537,5541,5545,5549],{"type":43,"tag":395,"props":5496,"children":5497},{"style":481},[5498],{"type":53,"value":5499},"    return",{"type":43,"tag":395,"props":5501,"children":5502},{"style":402},[5503],{"type":53,"value":489},{"type":43,"tag":395,"props":5505,"children":5506},{"style":1192},[5507],{"type":53,"value":5403},{"type":43,"tag":395,"props":5509,"children":5510},{"style":402},[5511],{"type":53,"value":109},{"type":43,"tag":395,"props":5513,"children":5514},{"style":492},[5515],{"type":53,"value":5516}," instance",{"type":43,"tag":395,"props":5518,"children":5519},{"style":402},[5520],{"type":53,"value":1243},{"type":43,"tag":395,"props":5522,"children":5523},{"style":492},[5524],{"type":53,"value":5349},{"type":43,"tag":395,"props":5526,"children":5527},{"style":402},[5528],{"type":53,"value":500},{"type":43,"tag":395,"props":5530,"children":5531},{"style":1192},[5532],{"type":53,"value":5366},{"type":43,"tag":395,"props":5534,"children":5535},{"style":402},[5536],{"type":53,"value":109},{"type":43,"tag":395,"props":5538,"children":5539},{"style":492},[5540],{"type":53,"value":5516},{"type":43,"tag":395,"props":5542,"children":5543},{"style":402},[5544],{"type":53,"value":1243},{"type":43,"tag":395,"props":5546,"children":5547},{"style":492},[5548],{"type":53,"value":5419},{"type":43,"tag":395,"props":5550,"children":5551},{"style":402},[5552],{"type":53,"value":1687},{"type":43,"tag":395,"props":5554,"children":5555},{"class":397,"line":938},[5556],{"type":43,"tag":395,"props":5557,"children":5558},{"style":402},[5559],{"type":53,"value":4509},{"type":43,"tag":395,"props":5561,"children":5562},{"class":397,"line":979},[5563],{"type":43,"tag":395,"props":5564,"children":5565},{"emptyLinePlaceholder":667},[5566],{"type":53,"value":670},{"type":43,"tag":395,"props":5568,"children":5569},{"class":397,"line":988},[5570],{"type":43,"tag":395,"props":5571,"children":5572},{"style":423},[5573],{"type":53,"value":5574},"  \u002F\u002F Deserialize: reconstruct from plain data\n",{"type":43,"tag":395,"props":5576,"children":5577},{"class":397,"line":996},[5578,5582,5587,5591,5595,5599,5603,5607,5611,5615,5619,5623,5627,5631,5635],{"type":43,"tag":395,"props":5579,"children":5580},{"style":1097},[5581],{"type":53,"value":5461},{"type":43,"tag":395,"props":5583,"children":5584},{"style":492},[5585],{"type":53,"value":5586}," [WORKFLOW_DESERIALIZE]",{"type":43,"tag":395,"props":5588,"children":5589},{"style":402},[5590],{"type":53,"value":1116},{"type":43,"tag":395,"props":5592,"children":5593},{"style":1119},[5594],{"type":53,"value":1297},{"type":43,"tag":395,"props":5596,"children":5597},{"style":402},[5598],{"type":53,"value":109},{"type":43,"tag":395,"props":5600,"children":5601},{"style":402},[5602],{"type":53,"value":489},{"type":43,"tag":395,"props":5604,"children":5605},{"style":1192},[5606],{"type":53,"value":5403},{"type":43,"tag":395,"props":5608,"children":5609},{"style":402},[5610],{"type":53,"value":109},{"type":43,"tag":395,"props":5612,"children":5613},{"style":1129},[5614],{"type":53,"value":5301},{"type":43,"tag":395,"props":5616,"children":5617},{"style":402},[5618],{"type":53,"value":420},{"type":43,"tag":395,"props":5620,"children":5621},{"style":1192},[5622],{"type":53,"value":5366},{"type":43,"tag":395,"props":5624,"children":5625},{"style":402},[5626],{"type":53,"value":109},{"type":43,"tag":395,"props":5628,"children":5629},{"style":1129},[5630],{"type":53,"value":5301},{"type":43,"tag":395,"props":5632,"children":5633},{"style":402},[5634],{"type":53,"value":2265},{"type":43,"tag":395,"props":5636,"children":5637},{"style":402},[5638],{"type":53,"value":1142},{"type":43,"tag":395,"props":5640,"children":5641},{"class":397,"line":1005},[5642,5646,5650,5654,5658,5662,5666,5670,5674,5678,5682,5686,5690],{"type":43,"tag":395,"props":5643,"children":5644},{"style":481},[5645],{"type":53,"value":5499},{"type":43,"tag":395,"props":5647,"children":5648},{"style":402},[5649],{"type":53,"value":2444},{"type":43,"tag":395,"props":5651,"children":5652},{"style":1108},[5653],{"type":53,"value":5280},{"type":43,"tag":395,"props":5655,"children":5656},{"style":1192},[5657],{"type":53,"value":1116},{"type":43,"tag":395,"props":5659,"children":5660},{"style":492},[5661],{"type":53,"value":1297},{"type":43,"tag":395,"props":5663,"children":5664},{"style":402},[5665],{"type":53,"value":1243},{"type":43,"tag":395,"props":5667,"children":5668},{"style":492},[5669],{"type":53,"value":5349},{"type":43,"tag":395,"props":5671,"children":5672},{"style":402},[5673],{"type":53,"value":500},{"type":43,"tag":395,"props":5675,"children":5676},{"style":492},[5677],{"type":53,"value":1578},{"type":43,"tag":395,"props":5679,"children":5680},{"style":402},[5681],{"type":53,"value":1243},{"type":43,"tag":395,"props":5683,"children":5684},{"style":492},[5685],{"type":53,"value":5419},{"type":43,"tag":395,"props":5687,"children":5688},{"style":1192},[5689],{"type":53,"value":1137},{"type":43,"tag":395,"props":5691,"children":5692},{"style":402},[5693],{"type":53,"value":560},{"type":43,"tag":395,"props":5695,"children":5696},{"class":397,"line":1568},[5697],{"type":43,"tag":395,"props":5698,"children":5699},{"style":402},[5700],{"type":53,"value":4509},{"type":43,"tag":395,"props":5702,"children":5703},{"class":397,"line":1609},[5704],{"type":43,"tag":395,"props":5705,"children":5706},{"emptyLinePlaceholder":667},[5707],{"type":53,"value":670},{"type":43,"tag":395,"props":5709,"children":5710},{"class":397,"line":1650},[5711,5716,5721,5725,5730,5734,5738,5742],{"type":43,"tag":395,"props":5712,"children":5713},{"style":1097},[5714],{"type":53,"value":5715},"  async",{"type":43,"tag":395,"props":5717,"children":5718},{"style":1192},[5719],{"type":53,"value":5720}," computeDistance",{"type":43,"tag":395,"props":5722,"children":5723},{"style":402},[5724],{"type":53,"value":1116},{"type":43,"tag":395,"props":5726,"children":5727},{"style":1119},[5728],{"type":53,"value":5729},"other",{"type":43,"tag":395,"props":5731,"children":5732},{"style":402},[5733],{"type":53,"value":109},{"type":43,"tag":395,"props":5735,"children":5736},{"style":1129},[5737],{"type":53,"value":5280},{"type":43,"tag":395,"props":5739,"children":5740},{"style":402},[5741],{"type":53,"value":1137},{"type":43,"tag":395,"props":5743,"children":5744},{"style":402},[5745],{"type":53,"value":1142},{"type":43,"tag":395,"props":5747,"children":5748},{"class":397,"line":1690},[5749,5754,5758,5762],{"type":43,"tag":395,"props":5750,"children":5751},{"style":402},[5752],{"type":53,"value":5753},"    \"",{"type":43,"tag":395,"props":5755,"children":5756},{"style":408},[5757],{"type":53,"value":439},{"type":43,"tag":395,"props":5759,"children":5760},{"style":402},[5761],{"type":53,"value":405},{"type":43,"tag":395,"props":5763,"children":5764},{"style":402},[5765],{"type":53,"value":560},{"type":43,"tag":395,"props":5767,"children":5768},{"class":397,"line":2677},[5769,5773,5778,5782,5787,5792,5797,5801,5806,5811,5815,5819,5823,5828,5833,5838,5842,5846,5850,5854,5858,5862,5866,5870,5874,5878,5882],{"type":43,"tag":395,"props":5770,"children":5771},{"style":481},[5772],{"type":53,"value":5499},{"type":43,"tag":395,"props":5774,"children":5775},{"style":492},[5776],{"type":53,"value":5777}," Math",{"type":43,"tag":395,"props":5779,"children":5780},{"style":402},[5781],{"type":53,"value":1243},{"type":43,"tag":395,"props":5783,"children":5784},{"style":1108},[5785],{"type":53,"value":5786},"sqrt",{"type":43,"tag":395,"props":5788,"children":5789},{"style":1192},[5790],{"type":53,"value":5791},"((",{"type":43,"tag":395,"props":5793,"children":5794},{"style":402},[5795],{"type":53,"value":5796},"this.",{"type":43,"tag":395,"props":5798,"children":5799},{"style":492},[5800],{"type":53,"value":5349},{"type":43,"tag":395,"props":5802,"children":5803},{"style":402},[5804],{"type":53,"value":5805}," -",{"type":43,"tag":395,"props":5807,"children":5808},{"style":492},[5809],{"type":53,"value":5810}," other",{"type":43,"tag":395,"props":5812,"children":5813},{"style":402},[5814],{"type":53,"value":1243},{"type":43,"tag":395,"props":5816,"children":5817},{"style":492},[5818],{"type":53,"value":5349},{"type":43,"tag":395,"props":5820,"children":5821},{"style":1192},[5822],{"type":53,"value":4421},{"type":43,"tag":395,"props":5824,"children":5825},{"style":402},[5826],{"type":53,"value":5827},"**",{"type":43,"tag":395,"props":5829,"children":5830},{"style":2880},[5831],{"type":53,"value":5832}," 2",{"type":43,"tag":395,"props":5834,"children":5835},{"style":402},[5836],{"type":53,"value":5837}," +",{"type":43,"tag":395,"props":5839,"children":5840},{"style":1192},[5841],{"type":53,"value":4398},{"type":43,"tag":395,"props":5843,"children":5844},{"style":402},[5845],{"type":53,"value":5796},{"type":43,"tag":395,"props":5847,"children":5848},{"style":492},[5849],{"type":53,"value":5419},{"type":43,"tag":395,"props":5851,"children":5852},{"style":402},[5853],{"type":53,"value":5805},{"type":43,"tag":395,"props":5855,"children":5856},{"style":492},[5857],{"type":53,"value":5810},{"type":43,"tag":395,"props":5859,"children":5860},{"style":402},[5861],{"type":53,"value":1243},{"type":43,"tag":395,"props":5863,"children":5864},{"style":492},[5865],{"type":53,"value":5419},{"type":43,"tag":395,"props":5867,"children":5868},{"style":1192},[5869],{"type":53,"value":4421},{"type":43,"tag":395,"props":5871,"children":5872},{"style":402},[5873],{"type":53,"value":5827},{"type":43,"tag":395,"props":5875,"children":5876},{"style":2880},[5877],{"type":53,"value":5832},{"type":43,"tag":395,"props":5879,"children":5880},{"style":1192},[5881],{"type":53,"value":1137},{"type":43,"tag":395,"props":5883,"children":5884},{"style":402},[5885],{"type":53,"value":560},{"type":43,"tag":395,"props":5887,"children":5888},{"class":397,"line":2686},[5889],{"type":43,"tag":395,"props":5890,"children":5891},{"style":402},[5892],{"type":53,"value":4509},{"type":43,"tag":395,"props":5894,"children":5895},{"class":397,"line":2702},[5896],{"type":43,"tag":395,"props":5897,"children":5898},{"style":402},[5899],{"type":53,"value":1265},{"type":43,"tag":66,"props":5901,"children":5902},{},[5903],{"type":43,"tag":119,"props":5904,"children":5905},{},[5906],{"type":53,"value":5907},"Critical rules:",{"type":43,"tag":111,"props":5909,"children":5910},{},[5911,5937,5947,5971,5997],{"type":43,"tag":115,"props":5912,"children":5913},{},[5914,5919,5921,5927,5929,5935],{"type":43,"tag":119,"props":5915,"children":5916},{},[5917],{"type":53,"value":5918},"Define serde methods INSIDE the class body",{"type":53,"value":5920}," as static methods with computed property syntax (",{"type":43,"tag":58,"props":5922,"children":5924},{"className":5923},[],[5925],{"type":53,"value":5926},"static [WORKFLOW_SERIALIZE](...)",{"type":53,"value":5928},"). The SWC plugin detects them by scanning the class. Do NOT assign them externally (e.g., ",{"type":43,"tag":58,"props":5930,"children":5932},{"className":5931},[],[5933],{"type":53,"value":5934},"(MyClass as any)[WORKFLOW_SERIALIZE] = ...",{"type":53,"value":5936},") -- the compiler will not detect this.",{"type":43,"tag":115,"props":5938,"children":5939},{},[5940,5945],{"type":43,"tag":119,"props":5941,"children":5942},{},[5943],{"type":53,"value":5944},"Serde methods must return only devalue-compatible types",{"type":53,"value":5946}," (plain objects, arrays, primitives, Date, Map, Set, Uint8Array, etc.). No functions, no class instances, no Node.js-specific objects.",{"type":43,"tag":115,"props":5948,"children":5949},{},[5950,5962,5964,5969],{"type":43,"tag":119,"props":5951,"children":5952},{},[5953,5955,5960],{"type":53,"value":5954},"Add ",{"type":43,"tag":58,"props":5956,"children":5958},{"className":5957},[],[5959],{"type":53,"value":1067},{"type":53,"value":5961}," to Node.js-dependent instance methods.",{"type":53,"value":5963}," The SWC plugin strips ",{"type":43,"tag":58,"props":5965,"children":5967},{"className":5966},[],[5968],{"type":53,"value":1067},{"type":53,"value":5970}," method bodies from the workflow bundle. This is how you keep Node.js imports (fs, crypto, child_process, etc.) out of the workflow sandbox. The class shell with its serde methods remains in the workflow bundle; only the step method bodies are removed.",{"type":43,"tag":115,"props":5972,"children":5973},{},[5974,5979,5981,5987,5989,5995],{"type":43,"tag":119,"props":5975,"children":5976},{},[5977],{"type":53,"value":5978},"Do NOT manually register classes.",{"type":53,"value":5980}," The SWC plugin automatically generates registration code (an IIFE that sets ",{"type":43,"tag":58,"props":5982,"children":5984},{"className":5983},[],[5985],{"type":53,"value":5986},"classId",{"type":53,"value":5988}," and adds the class to the global registry). Manual calls to ",{"type":43,"tag":58,"props":5990,"children":5992},{"className":5991},[],[5993],{"type":53,"value":5994},"registerSerializationClass()",{"type":53,"value":5996}," are unnecessary and error-prone.",{"type":43,"tag":115,"props":5998,"children":5999},{},[6000,6005,6007,6012,6014,6020],{"type":43,"tag":119,"props":6001,"children":6002},{},[6003],{"type":53,"value":6004},"Do NOT use dynamic imports to work around sandbox restrictions.",{"type":53,"value":6006}," If a class method needs Node.js APIs, the correct solution is ",{"type":43,"tag":58,"props":6008,"children":6010},{"className":6009},[],[6011],{"type":53,"value":1067},{"type":53,"value":6013},", not ",{"type":43,"tag":58,"props":6015,"children":6017},{"className":6016},[],[6018],{"type":53,"value":6019},"\u002F* @vite-ignore *\u002F import(...)",{"type":53,"value":1243},{"type":43,"tag":66,"props":6022,"children":6023},{},[6024,6029,6031,6036],{"type":43,"tag":119,"props":6025,"children":6026},{},[6027],{"type":53,"value":6028},"When serde works well:",{"type":53,"value":6030}," Pure data classes, domain models, configuration objects, and classes where Node.js-dependent methods can be marked with ",{"type":43,"tag":58,"props":6032,"children":6034},{"className":6033},[],[6035],{"type":53,"value":1067},{"type":53,"value":1243},{"type":43,"tag":66,"props":6038,"children":6039},{},[6040,6045,6047,6053,6054,6060],{"type":43,"tag":119,"props":6041,"children":6042},{},[6043],{"type":53,"value":6044},"When to avoid serde:",{"type":53,"value":6046}," If a class is fundamentally inseparable from Node.js APIs (every method needs ",{"type":43,"tag":58,"props":6048,"children":6050},{"className":6049},[],[6051],{"type":53,"value":6052},"fs",{"type":53,"value":3003},{"type":43,"tag":58,"props":6055,"children":6057},{"className":6056},[],[6058],{"type":53,"value":6059},"net",{"type":53,"value":6061},", etc.) and cannot meaningfully exist as a shell in the workflow sandbox, keep it entirely in step functions and pass plain data objects across boundaries instead.",{"type":43,"tag":329,"props":6063,"children":6065},{"id":6064},"validating-serde-compliance",[6066],{"type":53,"value":6067},"Validating Serde Compliance",{"type":43,"tag":66,"props":6069,"children":6070},{},[6071],{"type":53,"value":6072},"Use these tools to verify classes are correctly set up:",{"type":43,"tag":159,"props":6074,"children":6075},{},[6076,6090,6112,6130],{"type":43,"tag":115,"props":6077,"children":6078},{},[6079,6088],{"type":43,"tag":119,"props":6080,"children":6081},{},[6082],{"type":43,"tag":58,"props":6083,"children":6085},{"className":6084},[],[6086],{"type":53,"value":6087},"workflow transform \u003Cfile> --check-serde",{"type":53,"value":6089}," -- Shows the SWC transform output for a file and checks if serde classes are compliant (no Node.js imports remaining in the workflow bundle).",{"type":43,"tag":115,"props":6091,"children":6092},{},[6093,6102,6104,6110],{"type":43,"tag":119,"props":6094,"children":6095},{},[6096],{"type":43,"tag":58,"props":6097,"children":6099},{"className":6098},[],[6100],{"type":53,"value":6101},"workflow validate",{"type":53,"value":6103}," -- Scans all workflow files and reports serde compliance issues. Use ",{"type":43,"tag":58,"props":6105,"children":6107},{"className":6106},[],[6108],{"type":53,"value":6109},"--json",{"type":53,"value":6111}," for machine-readable output.",{"type":43,"tag":115,"props":6113,"children":6114},{},[6115,6120,6122,6128],{"type":43,"tag":119,"props":6116,"children":6117},{},[6118],{"type":53,"value":6119},"SWC Playground",{"type":53,"value":6121}," -- The web playground at ",{"type":43,"tag":58,"props":6123,"children":6125},{"className":6124},[],[6126],{"type":53,"value":6127},"workbench\u002Fswc-playground",{"type":53,"value":6129}," shows a Serde Analysis panel when serde patterns are detected.",{"type":43,"tag":115,"props":6131,"children":6132},{},[6133,6138],{"type":43,"tag":119,"props":6134,"children":6135},{},[6136],{"type":53,"value":6137},"Build-time warnings",{"type":53,"value":6139}," -- The builder automatically warns when serde classes have Node.js built-in imports remaining in the workflow bundle.",{"type":43,"tag":44,"props":6141,"children":6143},{"id":6142},"streaming",[6144],{"type":53,"value":6145},"Streaming",{"type":43,"tag":66,"props":6147,"children":6148},{},[6149,6150,6156,6158,6163,6165,6170,6172,6177,6179,6185,6186,6192,6193,6199,6201,6206],{"type":53,"value":1801},{"type":43,"tag":58,"props":6151,"children":6153},{"className":6152},[],[6154],{"type":53,"value":6155},"getWritable()",{"type":53,"value":6157}," to stream data from workflows. ",{"type":43,"tag":58,"props":6159,"children":6161},{"className":6160},[],[6162],{"type":53,"value":6155},{"type":53,"value":6164}," can be called in ",{"type":43,"tag":119,"props":6166,"children":6167},{},[6168],{"type":53,"value":6169},"both",{"type":53,"value":6171}," workflow and step contexts, but you ",{"type":43,"tag":119,"props":6173,"children":6174},{},[6175],{"type":53,"value":6176},"cannot interact with the stream",{"type":53,"value":6178}," (call ",{"type":43,"tag":58,"props":6180,"children":6182},{"className":6181},[],[6183],{"type":53,"value":6184},"getWriter()",{"type":53,"value":3003},{"type":43,"tag":58,"props":6187,"children":6189},{"className":6188},[],[6190],{"type":53,"value":6191},"write()",{"type":53,"value":3003},{"type":43,"tag":58,"props":6194,"children":6196},{"className":6195},[],[6197],{"type":53,"value":6198},"close()",{"type":53,"value":6200},") directly in a workflow function. The stream must be passed to step functions for actual I\u002FO, or steps can call ",{"type":43,"tag":58,"props":6202,"children":6204},{"className":6203},[],[6205],{"type":53,"value":6155},{"type":53,"value":6207}," themselves.",{"type":43,"tag":66,"props":6209,"children":6210},{},[6211],{"type":43,"tag":119,"props":6212,"children":6213},{},[6214],{"type":53,"value":6215},"Get the stream in a workflow, pass it to a step:",{"type":43,"tag":384,"props":6217,"children":6219},{"className":386,"code":6218,"language":388,"meta":389,"style":389},"import { getWritable } from \"workflow\";\n\nexport async function myWorkflow() {\n  \"use workflow\";\n  const writable = getWritable();\n  await writeData(writable, \"hello world\");\n}\n\nasync function writeData(writable: WritableStream, chunk: string) {\n  \"use step\";\n  const writer = writable.getWriter();\n  try {\n    await writer.write(chunk);\n  } finally {\n    writer.releaseLock();\n  }\n}\n",[6220],{"type":43,"tag":58,"props":6221,"children":6222},{"__ignoreMap":389},[6223,6262,6269,6296,6315,6343,6389,6396,6403,6460,6479,6516,6528,6565,6581,6606,6613],{"type":43,"tag":395,"props":6224,"children":6225},{"class":397,"line":398},[6226,6230,6234,6238,6242,6246,6250,6254,6258],{"type":43,"tag":395,"props":6227,"children":6228},{"style":481},[6229],{"type":53,"value":484},{"type":43,"tag":395,"props":6231,"children":6232},{"style":402},[6233],{"type":53,"value":489},{"type":43,"tag":395,"props":6235,"children":6236},{"style":492},[6237],{"type":53,"value":532},{"type":43,"tag":395,"props":6239,"children":6240},{"style":402},[6241],{"type":53,"value":537},{"type":43,"tag":395,"props":6243,"children":6244},{"style":481},[6245],{"type":53,"value":542},{"type":43,"tag":395,"props":6247,"children":6248},{"style":402},[6249],{"type":53,"value":547},{"type":43,"tag":395,"props":6251,"children":6252},{"style":408},[6253],{"type":53,"value":4},{"type":43,"tag":395,"props":6255,"children":6256},{"style":402},[6257],{"type":53,"value":405},{"type":43,"tag":395,"props":6259,"children":6260},{"style":402},[6261],{"type":53,"value":560},{"type":43,"tag":395,"props":6263,"children":6264},{"class":397,"line":429},[6265],{"type":43,"tag":395,"props":6266,"children":6267},{"emptyLinePlaceholder":667},[6268],{"type":53,"value":670},{"type":43,"tag":395,"props":6270,"children":6271},{"class":397,"line":563},[6272,6276,6280,6284,6288,6292],{"type":43,"tag":395,"props":6273,"children":6274},{"style":481},[6275],{"type":53,"value":1508},{"type":43,"tag":395,"props":6277,"children":6278},{"style":1097},[6279],{"type":53,"value":1513},{"type":43,"tag":395,"props":6281,"children":6282},{"style":1097},[6283],{"type":53,"value":1105},{"type":43,"tag":395,"props":6285,"children":6286},{"style":1108},[6287],{"type":53,"value":1909},{"type":43,"tag":395,"props":6289,"children":6290},{"style":402},[6291],{"type":53,"value":1253},{"type":43,"tag":395,"props":6293,"children":6294},{"style":402},[6295],{"type":53,"value":1142},{"type":43,"tag":395,"props":6297,"children":6298},{"class":397,"line":613},[6299,6303,6307,6311],{"type":43,"tag":395,"props":6300,"children":6301},{"style":402},[6302],{"type":53,"value":1150},{"type":43,"tag":395,"props":6304,"children":6305},{"style":408},[6306],{"type":53,"value":411},{"type":43,"tag":395,"props":6308,"children":6309},{"style":402},[6310],{"type":53,"value":405},{"type":43,"tag":395,"props":6312,"children":6313},{"style":402},[6314],{"type":53,"value":560},{"type":43,"tag":395,"props":6316,"children":6317},{"class":397,"line":663},[6318,6322,6327,6331,6335,6339],{"type":43,"tag":395,"props":6319,"children":6320},{"style":1097},[6321],{"type":53,"value":1170},{"type":43,"tag":395,"props":6323,"children":6324},{"style":492},[6325],{"type":53,"value":6326}," writable",{"type":43,"tag":395,"props":6328,"children":6329},{"style":402},[6330],{"type":53,"value":1180},{"type":43,"tag":395,"props":6332,"children":6333},{"style":1108},[6334],{"type":53,"value":532},{"type":43,"tag":395,"props":6336,"children":6337},{"style":1192},[6338],{"type":53,"value":1253},{"type":43,"tag":395,"props":6340,"children":6341},{"style":402},[6342],{"type":53,"value":560},{"type":43,"tag":395,"props":6344,"children":6345},{"class":397,"line":673},[6346,6350,6355,6359,6364,6368,6372,6377,6381,6385],{"type":43,"tag":395,"props":6347,"children":6348},{"style":481},[6349],{"type":53,"value":3706},{"type":43,"tag":395,"props":6351,"children":6352},{"style":1108},[6353],{"type":53,"value":6354}," writeData",{"type":43,"tag":395,"props":6356,"children":6357},{"style":1192},[6358],{"type":53,"value":1116},{"type":43,"tag":395,"props":6360,"children":6361},{"style":492},[6362],{"type":53,"value":6363},"writable",{"type":43,"tag":395,"props":6365,"children":6366},{"style":402},[6367],{"type":53,"value":500},{"type":43,"tag":395,"props":6369,"children":6370},{"style":402},[6371],{"type":53,"value":547},{"type":43,"tag":395,"props":6373,"children":6374},{"style":408},[6375],{"type":53,"value":6376},"hello world",{"type":43,"tag":395,"props":6378,"children":6379},{"style":402},[6380],{"type":53,"value":405},{"type":43,"tag":395,"props":6382,"children":6383},{"style":1192},[6384],{"type":53,"value":1137},{"type":43,"tag":395,"props":6386,"children":6387},{"style":402},[6388],{"type":53,"value":560},{"type":43,"tag":395,"props":6390,"children":6391},{"class":397,"line":682},[6392],{"type":43,"tag":395,"props":6393,"children":6394},{"style":402},[6395],{"type":53,"value":1265},{"type":43,"tag":395,"props":6397,"children":6398},{"class":397,"line":751},[6399],{"type":43,"tag":395,"props":6400,"children":6401},{"emptyLinePlaceholder":667},[6402],{"type":53,"value":670},{"type":43,"tag":395,"props":6404,"children":6405},{"class":397,"line":759},[6406,6410,6414,6418,6422,6426,6430,6435,6439,6444,6448,6452,6456],{"type":43,"tag":395,"props":6407,"children":6408},{"style":1097},[6409],{"type":53,"value":1100},{"type":43,"tag":395,"props":6411,"children":6412},{"style":1097},[6413],{"type":53,"value":1105},{"type":43,"tag":395,"props":6415,"children":6416},{"style":1108},[6417],{"type":53,"value":6354},{"type":43,"tag":395,"props":6419,"children":6420},{"style":402},[6421],{"type":53,"value":1116},{"type":43,"tag":395,"props":6423,"children":6424},{"style":1119},[6425],{"type":53,"value":6363},{"type":43,"tag":395,"props":6427,"children":6428},{"style":402},[6429],{"type":53,"value":109},{"type":43,"tag":395,"props":6431,"children":6432},{"style":1129},[6433],{"type":53,"value":6434}," WritableStream",{"type":43,"tag":395,"props":6436,"children":6437},{"style":402},[6438],{"type":53,"value":500},{"type":43,"tag":395,"props":6440,"children":6441},{"style":1119},[6442],{"type":53,"value":6443}," chunk",{"type":43,"tag":395,"props":6445,"children":6446},{"style":402},[6447],{"type":53,"value":109},{"type":43,"tag":395,"props":6449,"children":6450},{"style":1129},[6451],{"type":53,"value":1132},{"type":43,"tag":395,"props":6453,"children":6454},{"style":402},[6455],{"type":53,"value":1137},{"type":43,"tag":395,"props":6457,"children":6458},{"style":402},[6459],{"type":53,"value":1142},{"type":43,"tag":395,"props":6461,"children":6462},{"class":397,"line":768},[6463,6467,6471,6475],{"type":43,"tag":395,"props":6464,"children":6465},{"style":402},[6466],{"type":53,"value":1150},{"type":43,"tag":395,"props":6468,"children":6469},{"style":408},[6470],{"type":53,"value":439},{"type":43,"tag":395,"props":6472,"children":6473},{"style":402},[6474],{"type":53,"value":405},{"type":43,"tag":395,"props":6476,"children":6477},{"style":402},[6478],{"type":53,"value":560},{"type":43,"tag":395,"props":6480,"children":6481},{"class":397,"line":837},[6482,6486,6491,6495,6499,6503,6508,6512],{"type":43,"tag":395,"props":6483,"children":6484},{"style":1097},[6485],{"type":53,"value":1170},{"type":43,"tag":395,"props":6487,"children":6488},{"style":492},[6489],{"type":53,"value":6490}," writer",{"type":43,"tag":395,"props":6492,"children":6493},{"style":402},[6494],{"type":53,"value":1180},{"type":43,"tag":395,"props":6496,"children":6497},{"style":492},[6498],{"type":53,"value":6326},{"type":43,"tag":395,"props":6500,"children":6501},{"style":402},[6502],{"type":53,"value":1243},{"type":43,"tag":395,"props":6504,"children":6505},{"style":1108},[6506],{"type":53,"value":6507},"getWriter",{"type":43,"tag":395,"props":6509,"children":6510},{"style":1192},[6511],{"type":53,"value":1253},{"type":43,"tag":395,"props":6513,"children":6514},{"style":402},[6515],{"type":53,"value":560},{"type":43,"tag":395,"props":6517,"children":6518},{"class":397,"line":845},[6519,6524],{"type":43,"tag":395,"props":6520,"children":6521},{"style":481},[6522],{"type":53,"value":6523},"  try",{"type":43,"tag":395,"props":6525,"children":6526},{"style":402},[6527],{"type":53,"value":1142},{"type":43,"tag":395,"props":6529,"children":6530},{"class":397,"line":854},[6531,6535,6539,6543,6548,6552,6557,6561],{"type":43,"tag":395,"props":6532,"children":6533},{"style":481},[6534],{"type":53,"value":4433},{"type":43,"tag":395,"props":6536,"children":6537},{"style":492},[6538],{"type":53,"value":6490},{"type":43,"tag":395,"props":6540,"children":6541},{"style":402},[6542],{"type":53,"value":1243},{"type":43,"tag":395,"props":6544,"children":6545},{"style":1108},[6546],{"type":53,"value":6547},"write",{"type":43,"tag":395,"props":6549,"children":6550},{"style":1192},[6551],{"type":53,"value":1116},{"type":43,"tag":395,"props":6553,"children":6554},{"style":492},[6555],{"type":53,"value":6556},"chunk",{"type":43,"tag":395,"props":6558,"children":6559},{"style":1192},[6560],{"type":53,"value":1137},{"type":43,"tag":395,"props":6562,"children":6563},{"style":402},[6564],{"type":53,"value":560},{"type":43,"tag":395,"props":6566,"children":6567},{"class":397,"line":896},[6568,6572,6577],{"type":43,"tag":395,"props":6569,"children":6570},{"style":402},[6571],{"type":53,"value":1470},{"type":43,"tag":395,"props":6573,"children":6574},{"style":481},[6575],{"type":53,"value":6576}," finally",{"type":43,"tag":395,"props":6578,"children":6579},{"style":402},[6580],{"type":53,"value":1142},{"type":43,"tag":395,"props":6582,"children":6583},{"class":397,"line":938},[6584,6589,6593,6598,6602],{"type":43,"tag":395,"props":6585,"children":6586},{"style":492},[6587],{"type":53,"value":6588},"    writer",{"type":43,"tag":395,"props":6590,"children":6591},{"style":402},[6592],{"type":53,"value":1243},{"type":43,"tag":395,"props":6594,"children":6595},{"style":1108},[6596],{"type":53,"value":6597},"releaseLock",{"type":43,"tag":395,"props":6599,"children":6600},{"style":1192},[6601],{"type":53,"value":1253},{"type":43,"tag":395,"props":6603,"children":6604},{"style":402},[6605],{"type":53,"value":560},{"type":43,"tag":395,"props":6607,"children":6608},{"class":397,"line":979},[6609],{"type":43,"tag":395,"props":6610,"children":6611},{"style":402},[6612],{"type":53,"value":4509},{"type":43,"tag":395,"props":6614,"children":6615},{"class":397,"line":988},[6616],{"type":43,"tag":395,"props":6617,"children":6618},{"style":402},[6619],{"type":53,"value":1265},{"type":43,"tag":66,"props":6621,"children":6622},{},[6623],{"type":43,"tag":119,"props":6624,"children":6625},{},[6626,6628,6633],{"type":53,"value":6627},"Call ",{"type":43,"tag":58,"props":6629,"children":6631},{"className":6630},[],[6632],{"type":53,"value":6155},{"type":53,"value":6634}," directly inside a step (no need to pass it):",{"type":43,"tag":384,"props":6636,"children":6638},{"className":386,"code":6637,"language":388,"meta":389,"style":389},"import { getWritable } from \"workflow\";\n\nasync function streamData(chunk: string) {\n  \"use step\";\n  const writer = getWritable().getWriter();\n  try {\n    await writer.write(chunk);\n  } finally {\n    writer.releaseLock();\n  }\n}\n",[6639],{"type":43,"tag":58,"props":6640,"children":6641},{"__ignoreMap":389},[6642,6681,6688,6728,6747,6786,6797,6832,6847,6870,6877],{"type":43,"tag":395,"props":6643,"children":6644},{"class":397,"line":398},[6645,6649,6653,6657,6661,6665,6669,6673,6677],{"type":43,"tag":395,"props":6646,"children":6647},{"style":481},[6648],{"type":53,"value":484},{"type":43,"tag":395,"props":6650,"children":6651},{"style":402},[6652],{"type":53,"value":489},{"type":43,"tag":395,"props":6654,"children":6655},{"style":492},[6656],{"type":53,"value":532},{"type":43,"tag":395,"props":6658,"children":6659},{"style":402},[6660],{"type":53,"value":537},{"type":43,"tag":395,"props":6662,"children":6663},{"style":481},[6664],{"type":53,"value":542},{"type":43,"tag":395,"props":6666,"children":6667},{"style":402},[6668],{"type":53,"value":547},{"type":43,"tag":395,"props":6670,"children":6671},{"style":408},[6672],{"type":53,"value":4},{"type":43,"tag":395,"props":6674,"children":6675},{"style":402},[6676],{"type":53,"value":405},{"type":43,"tag":395,"props":6678,"children":6679},{"style":402},[6680],{"type":53,"value":560},{"type":43,"tag":395,"props":6682,"children":6683},{"class":397,"line":429},[6684],{"type":43,"tag":395,"props":6685,"children":6686},{"emptyLinePlaceholder":667},[6687],{"type":53,"value":670},{"type":43,"tag":395,"props":6689,"children":6690},{"class":397,"line":563},[6691,6695,6699,6704,6708,6712,6716,6720,6724],{"type":43,"tag":395,"props":6692,"children":6693},{"style":1097},[6694],{"type":53,"value":1100},{"type":43,"tag":395,"props":6696,"children":6697},{"style":1097},[6698],{"type":53,"value":1105},{"type":43,"tag":395,"props":6700,"children":6701},{"style":1108},[6702],{"type":53,"value":6703}," streamData",{"type":43,"tag":395,"props":6705,"children":6706},{"style":402},[6707],{"type":53,"value":1116},{"type":43,"tag":395,"props":6709,"children":6710},{"style":1119},[6711],{"type":53,"value":6556},{"type":43,"tag":395,"props":6713,"children":6714},{"style":402},[6715],{"type":53,"value":109},{"type":43,"tag":395,"props":6717,"children":6718},{"style":1129},[6719],{"type":53,"value":1132},{"type":43,"tag":395,"props":6721,"children":6722},{"style":402},[6723],{"type":53,"value":1137},{"type":43,"tag":395,"props":6725,"children":6726},{"style":402},[6727],{"type":53,"value":1142},{"type":43,"tag":395,"props":6729,"children":6730},{"class":397,"line":613},[6731,6735,6739,6743],{"type":43,"tag":395,"props":6732,"children":6733},{"style":402},[6734],{"type":53,"value":1150},{"type":43,"tag":395,"props":6736,"children":6737},{"style":408},[6738],{"type":53,"value":439},{"type":43,"tag":395,"props":6740,"children":6741},{"style":402},[6742],{"type":53,"value":405},{"type":43,"tag":395,"props":6744,"children":6745},{"style":402},[6746],{"type":53,"value":560},{"type":43,"tag":395,"props":6748,"children":6749},{"class":397,"line":663},[6750,6754,6758,6762,6766,6770,6774,6778,6782],{"type":43,"tag":395,"props":6751,"children":6752},{"style":1097},[6753],{"type":53,"value":1170},{"type":43,"tag":395,"props":6755,"children":6756},{"style":492},[6757],{"type":53,"value":6490},{"type":43,"tag":395,"props":6759,"children":6760},{"style":402},[6761],{"type":53,"value":1180},{"type":43,"tag":395,"props":6763,"children":6764},{"style":1108},[6765],{"type":53,"value":532},{"type":43,"tag":395,"props":6767,"children":6768},{"style":1192},[6769],{"type":53,"value":1253},{"type":43,"tag":395,"props":6771,"children":6772},{"style":402},[6773],{"type":53,"value":1243},{"type":43,"tag":395,"props":6775,"children":6776},{"style":1108},[6777],{"type":53,"value":6507},{"type":43,"tag":395,"props":6779,"children":6780},{"style":1192},[6781],{"type":53,"value":1253},{"type":43,"tag":395,"props":6783,"children":6784},{"style":402},[6785],{"type":53,"value":560},{"type":43,"tag":395,"props":6787,"children":6788},{"class":397,"line":673},[6789,6793],{"type":43,"tag":395,"props":6790,"children":6791},{"style":481},[6792],{"type":53,"value":6523},{"type":43,"tag":395,"props":6794,"children":6795},{"style":402},[6796],{"type":53,"value":1142},{"type":43,"tag":395,"props":6798,"children":6799},{"class":397,"line":682},[6800,6804,6808,6812,6816,6820,6824,6828],{"type":43,"tag":395,"props":6801,"children":6802},{"style":481},[6803],{"type":53,"value":4433},{"type":43,"tag":395,"props":6805,"children":6806},{"style":492},[6807],{"type":53,"value":6490},{"type":43,"tag":395,"props":6809,"children":6810},{"style":402},[6811],{"type":53,"value":1243},{"type":43,"tag":395,"props":6813,"children":6814},{"style":1108},[6815],{"type":53,"value":6547},{"type":43,"tag":395,"props":6817,"children":6818},{"style":1192},[6819],{"type":53,"value":1116},{"type":43,"tag":395,"props":6821,"children":6822},{"style":492},[6823],{"type":53,"value":6556},{"type":43,"tag":395,"props":6825,"children":6826},{"style":1192},[6827],{"type":53,"value":1137},{"type":43,"tag":395,"props":6829,"children":6830},{"style":402},[6831],{"type":53,"value":560},{"type":43,"tag":395,"props":6833,"children":6834},{"class":397,"line":751},[6835,6839,6843],{"type":43,"tag":395,"props":6836,"children":6837},{"style":402},[6838],{"type":53,"value":1470},{"type":43,"tag":395,"props":6840,"children":6841},{"style":481},[6842],{"type":53,"value":6576},{"type":43,"tag":395,"props":6844,"children":6845},{"style":402},[6846],{"type":53,"value":1142},{"type":43,"tag":395,"props":6848,"children":6849},{"class":397,"line":759},[6850,6854,6858,6862,6866],{"type":43,"tag":395,"props":6851,"children":6852},{"style":492},[6853],{"type":53,"value":6588},{"type":43,"tag":395,"props":6855,"children":6856},{"style":402},[6857],{"type":53,"value":1243},{"type":43,"tag":395,"props":6859,"children":6860},{"style":1108},[6861],{"type":53,"value":6597},{"type":43,"tag":395,"props":6863,"children":6864},{"style":1192},[6865],{"type":53,"value":1253},{"type":43,"tag":395,"props":6867,"children":6868},{"style":402},[6869],{"type":53,"value":560},{"type":43,"tag":395,"props":6871,"children":6872},{"class":397,"line":768},[6873],{"type":43,"tag":395,"props":6874,"children":6875},{"style":402},[6876],{"type":53,"value":4509},{"type":43,"tag":395,"props":6878,"children":6879},{"class":397,"line":837},[6880],{"type":43,"tag":395,"props":6881,"children":6882},{"style":402},[6883],{"type":53,"value":1265},{"type":43,"tag":329,"props":6885,"children":6887},{"id":6886},"namespaced-streams",[6888],{"type":53,"value":6889},"Namespaced Streams",{"type":43,"tag":66,"props":6891,"children":6892},{},[6893,6894,6900],{"type":53,"value":1801},{"type":43,"tag":58,"props":6895,"children":6897},{"className":6896},[],[6898],{"type":53,"value":6899},"getWritable({ namespace: 'name' })",{"type":53,"value":6901}," to create multiple independent streams for different types of data. This is useful for separating logs from primary output, different log levels, agent outputs, metrics, or any distinct data channels. Long-running workflows benefit from namespaced streams because you can replay only the important events (e.g., final results) while keeping verbose logs in a separate stream.",{"type":43,"tag":66,"props":6903,"children":6904},{},[6905],{"type":43,"tag":119,"props":6906,"children":6907},{},[6908],{"type":53,"value":6909},"Example: Log levels and agent output separation:",{"type":43,"tag":384,"props":6911,"children":6913},{"className":386,"code":6912,"language":388,"meta":389,"style":389},"import { getWritable } from \"workflow\";\n\ntype LogEntry = { level: \"debug\" | \"info\" | \"warn\" | \"error\"; message: string; timestamp: number };\ntype AgentOutput = { type: \"thought\" | \"action\" | \"result\"; content: string };\n\nasync function logDebug(message: string) {\n  \"use step\";\n  const writer = getWritable\u003CLogEntry>({ namespace: \"logs:debug\" }).getWriter();\n  try {\n    await writer.write({ level: \"debug\", message, timestamp: Date.now() });\n  } finally {\n    writer.releaseLock();\n  }\n}\n\nasync function logInfo(message: string) {\n  \"use step\";\n  const writer = getWritable\u003CLogEntry>({ namespace: \"logs:info\" }).getWriter();\n  try {\n    await writer.write({ level: \"info\", message, timestamp: Date.now() });\n  } finally {\n    writer.releaseLock();\n  }\n}\n\nasync function emitAgentThought(thought: string) {\n  \"use step\";\n  const writer = getWritable\u003CAgentOutput>({ namespace: \"agent:thoughts\" }).getWriter();\n  try {\n    await writer.write({ type: \"thought\", content: thought });\n  } finally {\n    writer.releaseLock();\n  }\n}\n\nasync function emitAgentResult(result: string) {\n  \"use step\";\n  \u002F\u002F Important results go to the default stream for easy replay\n  const writer = getWritable\u003CAgentOutput>().getWriter();\n  try {\n    await writer.write({ type: \"result\", content: result });\n  } finally {\n    writer.releaseLock();\n  }\n}\n\nexport async function agentWorkflow(task: string) {\n  \"use workflow\";\n  \n  await logInfo(`Starting task: ${task}`);\n  await logDebug(\"Initializing agent context\");\n  await emitAgentThought(\"Analyzing the task requirements...\");\n  \n  \u002F\u002F ... agent processing ...\n  \n  await emitAgentResult(\"Task completed successfully\");\n  await logInfo(\"Workflow finished\");\n}\n",[6914],{"type":43,"tag":58,"props":6915,"children":6916},{"__ignoreMap":389},[6917,6956,6963,7096,7191,7198,7239,7258,7344,7355,7452,7467,7490,7497,7504,7511,7551,7570,7654,7665,7760,7775,7798,7805,7812,7819,7859,7878,7963,7974,8050,8065,8088,8095,8102,8110,8151,8171,8180,8232,8244,8320,8336,8360,8368,8376,8384,8430,8450,8459,8504,8541,8578,8586,8595,8603,8640,8677],{"type":43,"tag":395,"props":6918,"children":6919},{"class":397,"line":398},[6920,6924,6928,6932,6936,6940,6944,6948,6952],{"type":43,"tag":395,"props":6921,"children":6922},{"style":481},[6923],{"type":53,"value":484},{"type":43,"tag":395,"props":6925,"children":6926},{"style":402},[6927],{"type":53,"value":489},{"type":43,"tag":395,"props":6929,"children":6930},{"style":492},[6931],{"type":53,"value":532},{"type":43,"tag":395,"props":6933,"children":6934},{"style":402},[6935],{"type":53,"value":537},{"type":43,"tag":395,"props":6937,"children":6938},{"style":481},[6939],{"type":53,"value":542},{"type":43,"tag":395,"props":6941,"children":6942},{"style":402},[6943],{"type":53,"value":547},{"type":43,"tag":395,"props":6945,"children":6946},{"style":408},[6947],{"type":53,"value":4},{"type":43,"tag":395,"props":6949,"children":6950},{"style":402},[6951],{"type":53,"value":405},{"type":43,"tag":395,"props":6953,"children":6954},{"style":402},[6955],{"type":53,"value":560},{"type":43,"tag":395,"props":6957,"children":6958},{"class":397,"line":429},[6959],{"type":43,"tag":395,"props":6960,"children":6961},{"emptyLinePlaceholder":667},[6962],{"type":53,"value":670},{"type":43,"tag":395,"props":6964,"children":6965},{"class":397,"line":563},[6966,6971,6976,6980,6984,6989,6993,6997,7002,7006,7011,7015,7020,7024,7028,7032,7037,7041,7045,7049,7054,7058,7062,7067,7071,7075,7079,7084,7088,7092],{"type":43,"tag":395,"props":6967,"children":6968},{"style":1097},[6969],{"type":53,"value":6970},"type",{"type":43,"tag":395,"props":6972,"children":6973},{"style":1129},[6974],{"type":53,"value":6975}," LogEntry",{"type":43,"tag":395,"props":6977,"children":6978},{"style":402},[6979],{"type":53,"value":1180},{"type":43,"tag":395,"props":6981,"children":6982},{"style":402},[6983],{"type":53,"value":489},{"type":43,"tag":395,"props":6985,"children":6986},{"style":1192},[6987],{"type":53,"value":6988}," level",{"type":43,"tag":395,"props":6990,"children":6991},{"style":402},[6992],{"type":53,"value":109},{"type":43,"tag":395,"props":6994,"children":6995},{"style":402},[6996],{"type":53,"value":547},{"type":43,"tag":395,"props":6998,"children":6999},{"style":408},[7000],{"type":53,"value":7001},"debug",{"type":43,"tag":395,"props":7003,"children":7004},{"style":402},[7005],{"type":53,"value":405},{"type":43,"tag":395,"props":7007,"children":7008},{"style":402},[7009],{"type":53,"value":7010}," |",{"type":43,"tag":395,"props":7012,"children":7013},{"style":402},[7014],{"type":53,"value":547},{"type":43,"tag":395,"props":7016,"children":7017},{"style":408},[7018],{"type":53,"value":7019},"info",{"type":43,"tag":395,"props":7021,"children":7022},{"style":402},[7023],{"type":53,"value":405},{"type":43,"tag":395,"props":7025,"children":7026},{"style":402},[7027],{"type":53,"value":7010},{"type":43,"tag":395,"props":7029,"children":7030},{"style":402},[7031],{"type":53,"value":547},{"type":43,"tag":395,"props":7033,"children":7034},{"style":408},[7035],{"type":53,"value":7036},"warn",{"type":43,"tag":395,"props":7038,"children":7039},{"style":402},[7040],{"type":53,"value":405},{"type":43,"tag":395,"props":7042,"children":7043},{"style":402},[7044],{"type":53,"value":7010},{"type":43,"tag":395,"props":7046,"children":7047},{"style":402},[7048],{"type":53,"value":547},{"type":43,"tag":395,"props":7050,"children":7051},{"style":408},[7052],{"type":53,"value":7053},"error",{"type":43,"tag":395,"props":7055,"children":7056},{"style":402},[7057],{"type":53,"value":405},{"type":43,"tag":395,"props":7059,"children":7060},{"style":402},[7061],{"type":53,"value":420},{"type":43,"tag":395,"props":7063,"children":7064},{"style":1192},[7065],{"type":53,"value":7066}," message",{"type":43,"tag":395,"props":7068,"children":7069},{"style":402},[7070],{"type":53,"value":109},{"type":43,"tag":395,"props":7072,"children":7073},{"style":1129},[7074],{"type":53,"value":1132},{"type":43,"tag":395,"props":7076,"children":7077},{"style":402},[7078],{"type":53,"value":420},{"type":43,"tag":395,"props":7080,"children":7081},{"style":1192},[7082],{"type":53,"value":7083}," timestamp",{"type":43,"tag":395,"props":7085,"children":7086},{"style":402},[7087],{"type":53,"value":109},{"type":43,"tag":395,"props":7089,"children":7090},{"style":1129},[7091],{"type":53,"value":5301},{"type":43,"tag":395,"props":7093,"children":7094},{"style":402},[7095],{"type":53,"value":1687},{"type":43,"tag":395,"props":7097,"children":7098},{"class":397,"line":613},[7099,7103,7108,7112,7116,7120,7124,7128,7133,7137,7141,7145,7150,7154,7158,7162,7167,7171,7175,7179,7183,7187],{"type":43,"tag":395,"props":7100,"children":7101},{"style":1097},[7102],{"type":53,"value":6970},{"type":43,"tag":395,"props":7104,"children":7105},{"style":1129},[7106],{"type":53,"value":7107}," AgentOutput",{"type":43,"tag":395,"props":7109,"children":7110},{"style":402},[7111],{"type":53,"value":1180},{"type":43,"tag":395,"props":7113,"children":7114},{"style":402},[7115],{"type":53,"value":489},{"type":43,"tag":395,"props":7117,"children":7118},{"style":1192},[7119],{"type":53,"value":2172},{"type":43,"tag":395,"props":7121,"children":7122},{"style":402},[7123],{"type":53,"value":109},{"type":43,"tag":395,"props":7125,"children":7126},{"style":402},[7127],{"type":53,"value":547},{"type":43,"tag":395,"props":7129,"children":7130},{"style":408},[7131],{"type":53,"value":7132},"thought",{"type":43,"tag":395,"props":7134,"children":7135},{"style":402},[7136],{"type":53,"value":405},{"type":43,"tag":395,"props":7138,"children":7139},{"style":402},[7140],{"type":53,"value":7010},{"type":43,"tag":395,"props":7142,"children":7143},{"style":402},[7144],{"type":53,"value":547},{"type":43,"tag":395,"props":7146,"children":7147},{"style":408},[7148],{"type":53,"value":7149},"action",{"type":43,"tag":395,"props":7151,"children":7152},{"style":402},[7153],{"type":53,"value":405},{"type":43,"tag":395,"props":7155,"children":7156},{"style":402},[7157],{"type":53,"value":7010},{"type":43,"tag":395,"props":7159,"children":7160},{"style":402},[7161],{"type":53,"value":547},{"type":43,"tag":395,"props":7163,"children":7164},{"style":408},[7165],{"type":53,"value":7166},"result",{"type":43,"tag":395,"props":7168,"children":7169},{"style":402},[7170],{"type":53,"value":405},{"type":43,"tag":395,"props":7172,"children":7173},{"style":402},[7174],{"type":53,"value":420},{"type":43,"tag":395,"props":7176,"children":7177},{"style":1192},[7178],{"type":53,"value":2802},{"type":43,"tag":395,"props":7180,"children":7181},{"style":402},[7182],{"type":53,"value":109},{"type":43,"tag":395,"props":7184,"children":7185},{"style":1129},[7186],{"type":53,"value":1132},{"type":43,"tag":395,"props":7188,"children":7189},{"style":402},[7190],{"type":53,"value":1687},{"type":43,"tag":395,"props":7192,"children":7193},{"class":397,"line":663},[7194],{"type":43,"tag":395,"props":7195,"children":7196},{"emptyLinePlaceholder":667},[7197],{"type":53,"value":670},{"type":43,"tag":395,"props":7199,"children":7200},{"class":397,"line":673},[7201,7205,7209,7214,7218,7223,7227,7231,7235],{"type":43,"tag":395,"props":7202,"children":7203},{"style":1097},[7204],{"type":53,"value":1100},{"type":43,"tag":395,"props":7206,"children":7207},{"style":1097},[7208],{"type":53,"value":1105},{"type":43,"tag":395,"props":7210,"children":7211},{"style":1108},[7212],{"type":53,"value":7213}," logDebug",{"type":43,"tag":395,"props":7215,"children":7216},{"style":402},[7217],{"type":53,"value":1116},{"type":43,"tag":395,"props":7219,"children":7220},{"style":1119},[7221],{"type":53,"value":7222},"message",{"type":43,"tag":395,"props":7224,"children":7225},{"style":402},[7226],{"type":53,"value":109},{"type":43,"tag":395,"props":7228,"children":7229},{"style":1129},[7230],{"type":53,"value":1132},{"type":43,"tag":395,"props":7232,"children":7233},{"style":402},[7234],{"type":53,"value":1137},{"type":43,"tag":395,"props":7236,"children":7237},{"style":402},[7238],{"type":53,"value":1142},{"type":43,"tag":395,"props":7240,"children":7241},{"class":397,"line":682},[7242,7246,7250,7254],{"type":43,"tag":395,"props":7243,"children":7244},{"style":402},[7245],{"type":53,"value":1150},{"type":43,"tag":395,"props":7247,"children":7248},{"style":408},[7249],{"type":53,"value":439},{"type":43,"tag":395,"props":7251,"children":7252},{"style":402},[7253],{"type":53,"value":405},{"type":43,"tag":395,"props":7255,"children":7256},{"style":402},[7257],{"type":53,"value":560},{"type":43,"tag":395,"props":7259,"children":7260},{"class":397,"line":751},[7261,7265,7269,7273,7277,7281,7286,7290,7294,7298,7303,7307,7311,7316,7320,7324,7328,7332,7336,7340],{"type":43,"tag":395,"props":7262,"children":7263},{"style":1097},[7264],{"type":53,"value":1170},{"type":43,"tag":395,"props":7266,"children":7267},{"style":492},[7268],{"type":53,"value":6490},{"type":43,"tag":395,"props":7270,"children":7271},{"style":402},[7272],{"type":53,"value":1180},{"type":43,"tag":395,"props":7274,"children":7275},{"style":1108},[7276],{"type":53,"value":532},{"type":43,"tag":395,"props":7278,"children":7279},{"style":402},[7280],{"type":53,"value":2846},{"type":43,"tag":395,"props":7282,"children":7283},{"style":1129},[7284],{"type":53,"value":7285},"LogEntry",{"type":43,"tag":395,"props":7287,"children":7288},{"style":402},[7289],{"type":53,"value":2856},{"type":43,"tag":395,"props":7291,"children":7292},{"style":1192},[7293],{"type":53,"value":1116},{"type":43,"tag":395,"props":7295,"children":7296},{"style":402},[7297],{"type":53,"value":2608},{"type":43,"tag":395,"props":7299,"children":7300},{"style":1192},[7301],{"type":53,"value":7302}," namespace",{"type":43,"tag":395,"props":7304,"children":7305},{"style":402},[7306],{"type":53,"value":109},{"type":43,"tag":395,"props":7308,"children":7309},{"style":402},[7310],{"type":53,"value":547},{"type":43,"tag":395,"props":7312,"children":7313},{"style":408},[7314],{"type":53,"value":7315},"logs:debug",{"type":43,"tag":395,"props":7317,"children":7318},{"style":402},[7319],{"type":53,"value":405},{"type":43,"tag":395,"props":7321,"children":7322},{"style":402},[7323],{"type":53,"value":537},{"type":43,"tag":395,"props":7325,"children":7326},{"style":1192},[7327],{"type":53,"value":1137},{"type":43,"tag":395,"props":7329,"children":7330},{"style":402},[7331],{"type":53,"value":1243},{"type":43,"tag":395,"props":7333,"children":7334},{"style":1108},[7335],{"type":53,"value":6507},{"type":43,"tag":395,"props":7337,"children":7338},{"style":1192},[7339],{"type":53,"value":1253},{"type":43,"tag":395,"props":7341,"children":7342},{"style":402},[7343],{"type":53,"value":560},{"type":43,"tag":395,"props":7345,"children":7346},{"class":397,"line":759},[7347,7351],{"type":43,"tag":395,"props":7348,"children":7349},{"style":481},[7350],{"type":53,"value":6523},{"type":43,"tag":395,"props":7352,"children":7353},{"style":402},[7354],{"type":53,"value":1142},{"type":43,"tag":395,"props":7356,"children":7357},{"class":397,"line":768},[7358,7362,7366,7370,7374,7378,7382,7386,7390,7394,7398,7402,7406,7410,7414,7418,7422,7427,7431,7436,7440,7444,7448],{"type":43,"tag":395,"props":7359,"children":7360},{"style":481},[7361],{"type":53,"value":4433},{"type":43,"tag":395,"props":7363,"children":7364},{"style":492},[7365],{"type":53,"value":6490},{"type":43,"tag":395,"props":7367,"children":7368},{"style":402},[7369],{"type":53,"value":1243},{"type":43,"tag":395,"props":7371,"children":7372},{"style":1108},[7373],{"type":53,"value":6547},{"type":43,"tag":395,"props":7375,"children":7376},{"style":1192},[7377],{"type":53,"value":1116},{"type":43,"tag":395,"props":7379,"children":7380},{"style":402},[7381],{"type":53,"value":2608},{"type":43,"tag":395,"props":7383,"children":7384},{"style":1192},[7385],{"type":53,"value":6988},{"type":43,"tag":395,"props":7387,"children":7388},{"style":402},[7389],{"type":53,"value":109},{"type":43,"tag":395,"props":7391,"children":7392},{"style":402},[7393],{"type":53,"value":547},{"type":43,"tag":395,"props":7395,"children":7396},{"style":408},[7397],{"type":53,"value":7001},{"type":43,"tag":395,"props":7399,"children":7400},{"style":402},[7401],{"type":53,"value":405},{"type":43,"tag":395,"props":7403,"children":7404},{"style":402},[7405],{"type":53,"value":500},{"type":43,"tag":395,"props":7407,"children":7408},{"style":492},[7409],{"type":53,"value":7066},{"type":43,"tag":395,"props":7411,"children":7412},{"style":402},[7413],{"type":53,"value":500},{"type":43,"tag":395,"props":7415,"children":7416},{"style":1192},[7417],{"type":53,"value":7083},{"type":43,"tag":395,"props":7419,"children":7420},{"style":402},[7421],{"type":53,"value":109},{"type":43,"tag":395,"props":7423,"children":7424},{"style":492},[7425],{"type":53,"value":7426}," Date",{"type":43,"tag":395,"props":7428,"children":7429},{"style":402},[7430],{"type":53,"value":1243},{"type":43,"tag":395,"props":7432,"children":7433},{"style":1108},[7434],{"type":53,"value":7435},"now",{"type":43,"tag":395,"props":7437,"children":7438},{"style":1192},[7439],{"type":53,"value":2634},{"type":43,"tag":395,"props":7441,"children":7442},{"style":402},[7443],{"type":53,"value":2326},{"type":43,"tag":395,"props":7445,"children":7446},{"style":1192},[7447],{"type":53,"value":1137},{"type":43,"tag":395,"props":7449,"children":7450},{"style":402},[7451],{"type":53,"value":560},{"type":43,"tag":395,"props":7453,"children":7454},{"class":397,"line":837},[7455,7459,7463],{"type":43,"tag":395,"props":7456,"children":7457},{"style":402},[7458],{"type":53,"value":1470},{"type":43,"tag":395,"props":7460,"children":7461},{"style":481},[7462],{"type":53,"value":6576},{"type":43,"tag":395,"props":7464,"children":7465},{"style":402},[7466],{"type":53,"value":1142},{"type":43,"tag":395,"props":7468,"children":7469},{"class":397,"line":845},[7470,7474,7478,7482,7486],{"type":43,"tag":395,"props":7471,"children":7472},{"style":492},[7473],{"type":53,"value":6588},{"type":43,"tag":395,"props":7475,"children":7476},{"style":402},[7477],{"type":53,"value":1243},{"type":43,"tag":395,"props":7479,"children":7480},{"style":1108},[7481],{"type":53,"value":6597},{"type":43,"tag":395,"props":7483,"children":7484},{"style":1192},[7485],{"type":53,"value":1253},{"type":43,"tag":395,"props":7487,"children":7488},{"style":402},[7489],{"type":53,"value":560},{"type":43,"tag":395,"props":7491,"children":7492},{"class":397,"line":854},[7493],{"type":43,"tag":395,"props":7494,"children":7495},{"style":402},[7496],{"type":53,"value":4509},{"type":43,"tag":395,"props":7498,"children":7499},{"class":397,"line":896},[7500],{"type":43,"tag":395,"props":7501,"children":7502},{"style":402},[7503],{"type":53,"value":1265},{"type":43,"tag":395,"props":7505,"children":7506},{"class":397,"line":938},[7507],{"type":43,"tag":395,"props":7508,"children":7509},{"emptyLinePlaceholder":667},[7510],{"type":53,"value":670},{"type":43,"tag":395,"props":7512,"children":7513},{"class":397,"line":979},[7514,7518,7522,7527,7531,7535,7539,7543,7547],{"type":43,"tag":395,"props":7515,"children":7516},{"style":1097},[7517],{"type":53,"value":1100},{"type":43,"tag":395,"props":7519,"children":7520},{"style":1097},[7521],{"type":53,"value":1105},{"type":43,"tag":395,"props":7523,"children":7524},{"style":1108},[7525],{"type":53,"value":7526}," logInfo",{"type":43,"tag":395,"props":7528,"children":7529},{"style":402},[7530],{"type":53,"value":1116},{"type":43,"tag":395,"props":7532,"children":7533},{"style":1119},[7534],{"type":53,"value":7222},{"type":43,"tag":395,"props":7536,"children":7537},{"style":402},[7538],{"type":53,"value":109},{"type":43,"tag":395,"props":7540,"children":7541},{"style":1129},[7542],{"type":53,"value":1132},{"type":43,"tag":395,"props":7544,"children":7545},{"style":402},[7546],{"type":53,"value":1137},{"type":43,"tag":395,"props":7548,"children":7549},{"style":402},[7550],{"type":53,"value":1142},{"type":43,"tag":395,"props":7552,"children":7553},{"class":397,"line":988},[7554,7558,7562,7566],{"type":43,"tag":395,"props":7555,"children":7556},{"style":402},[7557],{"type":53,"value":1150},{"type":43,"tag":395,"props":7559,"children":7560},{"style":408},[7561],{"type":53,"value":439},{"type":43,"tag":395,"props":7563,"children":7564},{"style":402},[7565],{"type":53,"value":405},{"type":43,"tag":395,"props":7567,"children":7568},{"style":402},[7569],{"type":53,"value":560},{"type":43,"tag":395,"props":7571,"children":7572},{"class":397,"line":996},[7573,7577,7581,7585,7589,7593,7597,7601,7605,7609,7613,7617,7621,7626,7630,7634,7638,7642,7646,7650],{"type":43,"tag":395,"props":7574,"children":7575},{"style":1097},[7576],{"type":53,"value":1170},{"type":43,"tag":395,"props":7578,"children":7579},{"style":492},[7580],{"type":53,"value":6490},{"type":43,"tag":395,"props":7582,"children":7583},{"style":402},[7584],{"type":53,"value":1180},{"type":43,"tag":395,"props":7586,"children":7587},{"style":1108},[7588],{"type":53,"value":532},{"type":43,"tag":395,"props":7590,"children":7591},{"style":402},[7592],{"type":53,"value":2846},{"type":43,"tag":395,"props":7594,"children":7595},{"style":1129},[7596],{"type":53,"value":7285},{"type":43,"tag":395,"props":7598,"children":7599},{"style":402},[7600],{"type":53,"value":2856},{"type":43,"tag":395,"props":7602,"children":7603},{"style":1192},[7604],{"type":53,"value":1116},{"type":43,"tag":395,"props":7606,"children":7607},{"style":402},[7608],{"type":53,"value":2608},{"type":43,"tag":395,"props":7610,"children":7611},{"style":1192},[7612],{"type":53,"value":7302},{"type":43,"tag":395,"props":7614,"children":7615},{"style":402},[7616],{"type":53,"value":109},{"type":43,"tag":395,"props":7618,"children":7619},{"style":402},[7620],{"type":53,"value":547},{"type":43,"tag":395,"props":7622,"children":7623},{"style":408},[7624],{"type":53,"value":7625},"logs:info",{"type":43,"tag":395,"props":7627,"children":7628},{"style":402},[7629],{"type":53,"value":405},{"type":43,"tag":395,"props":7631,"children":7632},{"style":402},[7633],{"type":53,"value":537},{"type":43,"tag":395,"props":7635,"children":7636},{"style":1192},[7637],{"type":53,"value":1137},{"type":43,"tag":395,"props":7639,"children":7640},{"style":402},[7641],{"type":53,"value":1243},{"type":43,"tag":395,"props":7643,"children":7644},{"style":1108},[7645],{"type":53,"value":6507},{"type":43,"tag":395,"props":7647,"children":7648},{"style":1192},[7649],{"type":53,"value":1253},{"type":43,"tag":395,"props":7651,"children":7652},{"style":402},[7653],{"type":53,"value":560},{"type":43,"tag":395,"props":7655,"children":7656},{"class":397,"line":1005},[7657,7661],{"type":43,"tag":395,"props":7658,"children":7659},{"style":481},[7660],{"type":53,"value":6523},{"type":43,"tag":395,"props":7662,"children":7663},{"style":402},[7664],{"type":53,"value":1142},{"type":43,"tag":395,"props":7666,"children":7667},{"class":397,"line":1568},[7668,7672,7676,7680,7684,7688,7692,7696,7700,7704,7708,7712,7716,7720,7724,7728,7732,7736,7740,7744,7748,7752,7756],{"type":43,"tag":395,"props":7669,"children":7670},{"style":481},[7671],{"type":53,"value":4433},{"type":43,"tag":395,"props":7673,"children":7674},{"style":492},[7675],{"type":53,"value":6490},{"type":43,"tag":395,"props":7677,"children":7678},{"style":402},[7679],{"type":53,"value":1243},{"type":43,"tag":395,"props":7681,"children":7682},{"style":1108},[7683],{"type":53,"value":6547},{"type":43,"tag":395,"props":7685,"children":7686},{"style":1192},[7687],{"type":53,"value":1116},{"type":43,"tag":395,"props":7689,"children":7690},{"style":402},[7691],{"type":53,"value":2608},{"type":43,"tag":395,"props":7693,"children":7694},{"style":1192},[7695],{"type":53,"value":6988},{"type":43,"tag":395,"props":7697,"children":7698},{"style":402},[7699],{"type":53,"value":109},{"type":43,"tag":395,"props":7701,"children":7702},{"style":402},[7703],{"type":53,"value":547},{"type":43,"tag":395,"props":7705,"children":7706},{"style":408},[7707],{"type":53,"value":7019},{"type":43,"tag":395,"props":7709,"children":7710},{"style":402},[7711],{"type":53,"value":405},{"type":43,"tag":395,"props":7713,"children":7714},{"style":402},[7715],{"type":53,"value":500},{"type":43,"tag":395,"props":7717,"children":7718},{"style":492},[7719],{"type":53,"value":7066},{"type":43,"tag":395,"props":7721,"children":7722},{"style":402},[7723],{"type":53,"value":500},{"type":43,"tag":395,"props":7725,"children":7726},{"style":1192},[7727],{"type":53,"value":7083},{"type":43,"tag":395,"props":7729,"children":7730},{"style":402},[7731],{"type":53,"value":109},{"type":43,"tag":395,"props":7733,"children":7734},{"style":492},[7735],{"type":53,"value":7426},{"type":43,"tag":395,"props":7737,"children":7738},{"style":402},[7739],{"type":53,"value":1243},{"type":43,"tag":395,"props":7741,"children":7742},{"style":1108},[7743],{"type":53,"value":7435},{"type":43,"tag":395,"props":7745,"children":7746},{"style":1192},[7747],{"type":53,"value":2634},{"type":43,"tag":395,"props":7749,"children":7750},{"style":402},[7751],{"type":53,"value":2326},{"type":43,"tag":395,"props":7753,"children":7754},{"style":1192},[7755],{"type":53,"value":1137},{"type":43,"tag":395,"props":7757,"children":7758},{"style":402},[7759],{"type":53,"value":560},{"type":43,"tag":395,"props":7761,"children":7762},{"class":397,"line":1609},[7763,7767,7771],{"type":43,"tag":395,"props":7764,"children":7765},{"style":402},[7766],{"type":53,"value":1470},{"type":43,"tag":395,"props":7768,"children":7769},{"style":481},[7770],{"type":53,"value":6576},{"type":43,"tag":395,"props":7772,"children":7773},{"style":402},[7774],{"type":53,"value":1142},{"type":43,"tag":395,"props":7776,"children":7777},{"class":397,"line":1650},[7778,7782,7786,7790,7794],{"type":43,"tag":395,"props":7779,"children":7780},{"style":492},[7781],{"type":53,"value":6588},{"type":43,"tag":395,"props":7783,"children":7784},{"style":402},[7785],{"type":53,"value":1243},{"type":43,"tag":395,"props":7787,"children":7788},{"style":1108},[7789],{"type":53,"value":6597},{"type":43,"tag":395,"props":7791,"children":7792},{"style":1192},[7793],{"type":53,"value":1253},{"type":43,"tag":395,"props":7795,"children":7796},{"style":402},[7797],{"type":53,"value":560},{"type":43,"tag":395,"props":7799,"children":7800},{"class":397,"line":1690},[7801],{"type":43,"tag":395,"props":7802,"children":7803},{"style":402},[7804],{"type":53,"value":4509},{"type":43,"tag":395,"props":7806,"children":7807},{"class":397,"line":2677},[7808],{"type":43,"tag":395,"props":7809,"children":7810},{"style":402},[7811],{"type":53,"value":1265},{"type":43,"tag":395,"props":7813,"children":7814},{"class":397,"line":2686},[7815],{"type":43,"tag":395,"props":7816,"children":7817},{"emptyLinePlaceholder":667},[7818],{"type":53,"value":670},{"type":43,"tag":395,"props":7820,"children":7821},{"class":397,"line":2702},[7822,7826,7830,7835,7839,7843,7847,7851,7855],{"type":43,"tag":395,"props":7823,"children":7824},{"style":1097},[7825],{"type":53,"value":1100},{"type":43,"tag":395,"props":7827,"children":7828},{"style":1097},[7829],{"type":53,"value":1105},{"type":43,"tag":395,"props":7831,"children":7832},{"style":1108},[7833],{"type":53,"value":7834}," emitAgentThought",{"type":43,"tag":395,"props":7836,"children":7837},{"style":402},[7838],{"type":53,"value":1116},{"type":43,"tag":395,"props":7840,"children":7841},{"style":1119},[7842],{"type":53,"value":7132},{"type":43,"tag":395,"props":7844,"children":7845},{"style":402},[7846],{"type":53,"value":109},{"type":43,"tag":395,"props":7848,"children":7849},{"style":1129},[7850],{"type":53,"value":1132},{"type":43,"tag":395,"props":7852,"children":7853},{"style":402},[7854],{"type":53,"value":1137},{"type":43,"tag":395,"props":7856,"children":7857},{"style":402},[7858],{"type":53,"value":1142},{"type":43,"tag":395,"props":7860,"children":7861},{"class":397,"line":2710},[7862,7866,7870,7874],{"type":43,"tag":395,"props":7863,"children":7864},{"style":402},[7865],{"type":53,"value":1150},{"type":43,"tag":395,"props":7867,"children":7868},{"style":408},[7869],{"type":53,"value":439},{"type":43,"tag":395,"props":7871,"children":7872},{"style":402},[7873],{"type":53,"value":405},{"type":43,"tag":395,"props":7875,"children":7876},{"style":402},[7877],{"type":53,"value":560},{"type":43,"tag":395,"props":7879,"children":7880},{"class":397,"line":2752},[7881,7885,7889,7893,7897,7901,7906,7910,7914,7918,7922,7926,7930,7935,7939,7943,7947,7951,7955,7959],{"type":43,"tag":395,"props":7882,"children":7883},{"style":1097},[7884],{"type":53,"value":1170},{"type":43,"tag":395,"props":7886,"children":7887},{"style":492},[7888],{"type":53,"value":6490},{"type":43,"tag":395,"props":7890,"children":7891},{"style":402},[7892],{"type":53,"value":1180},{"type":43,"tag":395,"props":7894,"children":7895},{"style":1108},[7896],{"type":53,"value":532},{"type":43,"tag":395,"props":7898,"children":7899},{"style":402},[7900],{"type":53,"value":2846},{"type":43,"tag":395,"props":7902,"children":7903},{"style":1129},[7904],{"type":53,"value":7905},"AgentOutput",{"type":43,"tag":395,"props":7907,"children":7908},{"style":402},[7909],{"type":53,"value":2856},{"type":43,"tag":395,"props":7911,"children":7912},{"style":1192},[7913],{"type":53,"value":1116},{"type":43,"tag":395,"props":7915,"children":7916},{"style":402},[7917],{"type":53,"value":2608},{"type":43,"tag":395,"props":7919,"children":7920},{"style":1192},[7921],{"type":53,"value":7302},{"type":43,"tag":395,"props":7923,"children":7924},{"style":402},[7925],{"type":53,"value":109},{"type":43,"tag":395,"props":7927,"children":7928},{"style":402},[7929],{"type":53,"value":547},{"type":43,"tag":395,"props":7931,"children":7932},{"style":408},[7933],{"type":53,"value":7934},"agent:thoughts",{"type":43,"tag":395,"props":7936,"children":7937},{"style":402},[7938],{"type":53,"value":405},{"type":43,"tag":395,"props":7940,"children":7941},{"style":402},[7942],{"type":53,"value":537},{"type":43,"tag":395,"props":7944,"children":7945},{"style":1192},[7946],{"type":53,"value":1137},{"type":43,"tag":395,"props":7948,"children":7949},{"style":402},[7950],{"type":53,"value":1243},{"type":43,"tag":395,"props":7952,"children":7953},{"style":1108},[7954],{"type":53,"value":6507},{"type":43,"tag":395,"props":7956,"children":7957},{"style":1192},[7958],{"type":53,"value":1253},{"type":43,"tag":395,"props":7960,"children":7961},{"style":402},[7962],{"type":53,"value":560},{"type":43,"tag":395,"props":7964,"children":7965},{"class":397,"line":2827},[7966,7970],{"type":43,"tag":395,"props":7967,"children":7968},{"style":481},[7969],{"type":53,"value":6523},{"type":43,"tag":395,"props":7971,"children":7972},{"style":402},[7973],{"type":53,"value":1142},{"type":43,"tag":395,"props":7975,"children":7976},{"class":397,"line":2867},[7977,7981,7985,7989,7993,7997,8001,8005,8009,8013,8017,8021,8025,8029,8033,8038,8042,8046],{"type":43,"tag":395,"props":7978,"children":7979},{"style":481},[7980],{"type":53,"value":4433},{"type":43,"tag":395,"props":7982,"children":7983},{"style":492},[7984],{"type":53,"value":6490},{"type":43,"tag":395,"props":7986,"children":7987},{"style":402},[7988],{"type":53,"value":1243},{"type":43,"tag":395,"props":7990,"children":7991},{"style":1108},[7992],{"type":53,"value":6547},{"type":43,"tag":395,"props":7994,"children":7995},{"style":1192},[7996],{"type":53,"value":1116},{"type":43,"tag":395,"props":7998,"children":7999},{"style":402},[8000],{"type":53,"value":2608},{"type":43,"tag":395,"props":8002,"children":8003},{"style":1192},[8004],{"type":53,"value":2172},{"type":43,"tag":395,"props":8006,"children":8007},{"style":402},[8008],{"type":53,"value":109},{"type":43,"tag":395,"props":8010,"children":8011},{"style":402},[8012],{"type":53,"value":547},{"type":43,"tag":395,"props":8014,"children":8015},{"style":408},[8016],{"type":53,"value":7132},{"type":43,"tag":395,"props":8018,"children":8019},{"style":402},[8020],{"type":53,"value":405},{"type":43,"tag":395,"props":8022,"children":8023},{"style":402},[8024],{"type":53,"value":500},{"type":43,"tag":395,"props":8026,"children":8027},{"style":1192},[8028],{"type":53,"value":2802},{"type":43,"tag":395,"props":8030,"children":8031},{"style":402},[8032],{"type":53,"value":109},{"type":43,"tag":395,"props":8034,"children":8035},{"style":492},[8036],{"type":53,"value":8037}," thought",{"type":43,"tag":395,"props":8039,"children":8040},{"style":402},[8041],{"type":53,"value":537},{"type":43,"tag":395,"props":8043,"children":8044},{"style":1192},[8045],{"type":53,"value":1137},{"type":43,"tag":395,"props":8047,"children":8048},{"style":402},[8049],{"type":53,"value":560},{"type":43,"tag":395,"props":8051,"children":8052},{"class":397,"line":2890},[8053,8057,8061],{"type":43,"tag":395,"props":8054,"children":8055},{"style":402},[8056],{"type":53,"value":1470},{"type":43,"tag":395,"props":8058,"children":8059},{"style":481},[8060],{"type":53,"value":6576},{"type":43,"tag":395,"props":8062,"children":8063},{"style":402},[8064],{"type":53,"value":1142},{"type":43,"tag":395,"props":8066,"children":8067},{"class":397,"line":2906},[8068,8072,8076,8080,8084],{"type":43,"tag":395,"props":8069,"children":8070},{"style":492},[8071],{"type":53,"value":6588},{"type":43,"tag":395,"props":8073,"children":8074},{"style":402},[8075],{"type":53,"value":1243},{"type":43,"tag":395,"props":8077,"children":8078},{"style":1108},[8079],{"type":53,"value":6597},{"type":43,"tag":395,"props":8081,"children":8082},{"style":1192},[8083],{"type":53,"value":1253},{"type":43,"tag":395,"props":8085,"children":8086},{"style":402},[8087],{"type":53,"value":560},{"type":43,"tag":395,"props":8089,"children":8090},{"class":397,"line":2914},[8091],{"type":43,"tag":395,"props":8092,"children":8093},{"style":402},[8094],{"type":53,"value":4509},{"type":43,"tag":395,"props":8096,"children":8097},{"class":397,"line":2939},[8098],{"type":43,"tag":395,"props":8099,"children":8100},{"style":402},[8101],{"type":53,"value":1265},{"type":43,"tag":395,"props":8103,"children":8105},{"class":397,"line":8104},35,[8106],{"type":43,"tag":395,"props":8107,"children":8108},{"emptyLinePlaceholder":667},[8109],{"type":53,"value":670},{"type":43,"tag":395,"props":8111,"children":8113},{"class":397,"line":8112},36,[8114,8118,8122,8127,8131,8135,8139,8143,8147],{"type":43,"tag":395,"props":8115,"children":8116},{"style":1097},[8117],{"type":53,"value":1100},{"type":43,"tag":395,"props":8119,"children":8120},{"style":1097},[8121],{"type":53,"value":1105},{"type":43,"tag":395,"props":8123,"children":8124},{"style":1108},[8125],{"type":53,"value":8126}," emitAgentResult",{"type":43,"tag":395,"props":8128,"children":8129},{"style":402},[8130],{"type":53,"value":1116},{"type":43,"tag":395,"props":8132,"children":8133},{"style":1119},[8134],{"type":53,"value":7166},{"type":43,"tag":395,"props":8136,"children":8137},{"style":402},[8138],{"type":53,"value":109},{"type":43,"tag":395,"props":8140,"children":8141},{"style":1129},[8142],{"type":53,"value":1132},{"type":43,"tag":395,"props":8144,"children":8145},{"style":402},[8146],{"type":53,"value":1137},{"type":43,"tag":395,"props":8148,"children":8149},{"style":402},[8150],{"type":53,"value":1142},{"type":43,"tag":395,"props":8152,"children":8154},{"class":397,"line":8153},37,[8155,8159,8163,8167],{"type":43,"tag":395,"props":8156,"children":8157},{"style":402},[8158],{"type":53,"value":1150},{"type":43,"tag":395,"props":8160,"children":8161},{"style":408},[8162],{"type":53,"value":439},{"type":43,"tag":395,"props":8164,"children":8165},{"style":402},[8166],{"type":53,"value":405},{"type":43,"tag":395,"props":8168,"children":8169},{"style":402},[8170],{"type":53,"value":560},{"type":43,"tag":395,"props":8172,"children":8174},{"class":397,"line":8173},38,[8175],{"type":43,"tag":395,"props":8176,"children":8177},{"style":423},[8178],{"type":53,"value":8179},"  \u002F\u002F Important results go to the default stream for easy replay\n",{"type":43,"tag":395,"props":8181,"children":8183},{"class":397,"line":8182},39,[8184,8188,8192,8196,8200,8204,8208,8212,8216,8220,8224,8228],{"type":43,"tag":395,"props":8185,"children":8186},{"style":1097},[8187],{"type":53,"value":1170},{"type":43,"tag":395,"props":8189,"children":8190},{"style":492},[8191],{"type":53,"value":6490},{"type":43,"tag":395,"props":8193,"children":8194},{"style":402},[8195],{"type":53,"value":1180},{"type":43,"tag":395,"props":8197,"children":8198},{"style":1108},[8199],{"type":53,"value":532},{"type":43,"tag":395,"props":8201,"children":8202},{"style":402},[8203],{"type":53,"value":2846},{"type":43,"tag":395,"props":8205,"children":8206},{"style":1129},[8207],{"type":53,"value":7905},{"type":43,"tag":395,"props":8209,"children":8210},{"style":402},[8211],{"type":53,"value":2856},{"type":43,"tag":395,"props":8213,"children":8214},{"style":1192},[8215],{"type":53,"value":1253},{"type":43,"tag":395,"props":8217,"children":8218},{"style":402},[8219],{"type":53,"value":1243},{"type":43,"tag":395,"props":8221,"children":8222},{"style":1108},[8223],{"type":53,"value":6507},{"type":43,"tag":395,"props":8225,"children":8226},{"style":1192},[8227],{"type":53,"value":1253},{"type":43,"tag":395,"props":8229,"children":8230},{"style":402},[8231],{"type":53,"value":560},{"type":43,"tag":395,"props":8233,"children":8235},{"class":397,"line":8234},40,[8236,8240],{"type":43,"tag":395,"props":8237,"children":8238},{"style":481},[8239],{"type":53,"value":6523},{"type":43,"tag":395,"props":8241,"children":8242},{"style":402},[8243],{"type":53,"value":1142},{"type":43,"tag":395,"props":8245,"children":8247},{"class":397,"line":8246},41,[8248,8252,8256,8260,8264,8268,8272,8276,8280,8284,8288,8292,8296,8300,8304,8308,8312,8316],{"type":43,"tag":395,"props":8249,"children":8250},{"style":481},[8251],{"type":53,"value":4433},{"type":43,"tag":395,"props":8253,"children":8254},{"style":492},[8255],{"type":53,"value":6490},{"type":43,"tag":395,"props":8257,"children":8258},{"style":402},[8259],{"type":53,"value":1243},{"type":43,"tag":395,"props":8261,"children":8262},{"style":1108},[8263],{"type":53,"value":6547},{"type":43,"tag":395,"props":8265,"children":8266},{"style":1192},[8267],{"type":53,"value":1116},{"type":43,"tag":395,"props":8269,"children":8270},{"style":402},[8271],{"type":53,"value":2608},{"type":43,"tag":395,"props":8273,"children":8274},{"style":1192},[8275],{"type":53,"value":2172},{"type":43,"tag":395,"props":8277,"children":8278},{"style":402},[8279],{"type":53,"value":109},{"type":43,"tag":395,"props":8281,"children":8282},{"style":402},[8283],{"type":53,"value":547},{"type":43,"tag":395,"props":8285,"children":8286},{"style":408},[8287],{"type":53,"value":7166},{"type":43,"tag":395,"props":8289,"children":8290},{"style":402},[8291],{"type":53,"value":405},{"type":43,"tag":395,"props":8293,"children":8294},{"style":402},[8295],{"type":53,"value":500},{"type":43,"tag":395,"props":8297,"children":8298},{"style":1192},[8299],{"type":53,"value":2802},{"type":43,"tag":395,"props":8301,"children":8302},{"style":402},[8303],{"type":53,"value":109},{"type":43,"tag":395,"props":8305,"children":8306},{"style":492},[8307],{"type":53,"value":2720},{"type":43,"tag":395,"props":8309,"children":8310},{"style":402},[8311],{"type":53,"value":537},{"type":43,"tag":395,"props":8313,"children":8314},{"style":1192},[8315],{"type":53,"value":1137},{"type":43,"tag":395,"props":8317,"children":8318},{"style":402},[8319],{"type":53,"value":560},{"type":43,"tag":395,"props":8321,"children":8323},{"class":397,"line":8322},42,[8324,8328,8332],{"type":43,"tag":395,"props":8325,"children":8326},{"style":402},[8327],{"type":53,"value":1470},{"type":43,"tag":395,"props":8329,"children":8330},{"style":481},[8331],{"type":53,"value":6576},{"type":43,"tag":395,"props":8333,"children":8334},{"style":402},[8335],{"type":53,"value":1142},{"type":43,"tag":395,"props":8337,"children":8339},{"class":397,"line":8338},43,[8340,8344,8348,8352,8356],{"type":43,"tag":395,"props":8341,"children":8342},{"style":492},[8343],{"type":53,"value":6588},{"type":43,"tag":395,"props":8345,"children":8346},{"style":402},[8347],{"type":53,"value":1243},{"type":43,"tag":395,"props":8349,"children":8350},{"style":1108},[8351],{"type":53,"value":6597},{"type":43,"tag":395,"props":8353,"children":8354},{"style":1192},[8355],{"type":53,"value":1253},{"type":43,"tag":395,"props":8357,"children":8358},{"style":402},[8359],{"type":53,"value":560},{"type":43,"tag":395,"props":8361,"children":8363},{"class":397,"line":8362},44,[8364],{"type":43,"tag":395,"props":8365,"children":8366},{"style":402},[8367],{"type":53,"value":4509},{"type":43,"tag":395,"props":8369,"children":8371},{"class":397,"line":8370},45,[8372],{"type":43,"tag":395,"props":8373,"children":8374},{"style":402},[8375],{"type":53,"value":1265},{"type":43,"tag":395,"props":8377,"children":8379},{"class":397,"line":8378},46,[8380],{"type":43,"tag":395,"props":8381,"children":8382},{"emptyLinePlaceholder":667},[8383],{"type":53,"value":670},{"type":43,"tag":395,"props":8385,"children":8387},{"class":397,"line":8386},47,[8388,8392,8396,8400,8405,8409,8414,8418,8422,8426],{"type":43,"tag":395,"props":8389,"children":8390},{"style":481},[8391],{"type":53,"value":1508},{"type":43,"tag":395,"props":8393,"children":8394},{"style":1097},[8395],{"type":53,"value":1513},{"type":43,"tag":395,"props":8397,"children":8398},{"style":1097},[8399],{"type":53,"value":1105},{"type":43,"tag":395,"props":8401,"children":8402},{"style":1108},[8403],{"type":53,"value":8404}," agentWorkflow",{"type":43,"tag":395,"props":8406,"children":8407},{"style":402},[8408],{"type":53,"value":1116},{"type":43,"tag":395,"props":8410,"children":8411},{"style":1119},[8412],{"type":53,"value":8413},"task",{"type":43,"tag":395,"props":8415,"children":8416},{"style":402},[8417],{"type":53,"value":109},{"type":43,"tag":395,"props":8419,"children":8420},{"style":1129},[8421],{"type":53,"value":1132},{"type":43,"tag":395,"props":8423,"children":8424},{"style":402},[8425],{"type":53,"value":1137},{"type":43,"tag":395,"props":8427,"children":8428},{"style":402},[8429],{"type":53,"value":1142},{"type":43,"tag":395,"props":8431,"children":8433},{"class":397,"line":8432},48,[8434,8438,8442,8446],{"type":43,"tag":395,"props":8435,"children":8436},{"style":402},[8437],{"type":53,"value":1150},{"type":43,"tag":395,"props":8439,"children":8440},{"style":408},[8441],{"type":53,"value":411},{"type":43,"tag":395,"props":8443,"children":8444},{"style":402},[8445],{"type":53,"value":405},{"type":43,"tag":395,"props":8447,"children":8448},{"style":402},[8449],{"type":53,"value":560},{"type":43,"tag":395,"props":8451,"children":8453},{"class":397,"line":8452},49,[8454],{"type":43,"tag":395,"props":8455,"children":8456},{"style":1192},[8457],{"type":53,"value":8458},"  \n",{"type":43,"tag":395,"props":8460,"children":8462},{"class":397,"line":8461},50,[8463,8467,8471,8475,8479,8484,8488,8492,8496,8500],{"type":43,"tag":395,"props":8464,"children":8465},{"style":481},[8466],{"type":53,"value":3706},{"type":43,"tag":395,"props":8468,"children":8469},{"style":1108},[8470],{"type":53,"value":7526},{"type":43,"tag":395,"props":8472,"children":8473},{"style":1192},[8474],{"type":53,"value":1116},{"type":43,"tag":395,"props":8476,"children":8477},{"style":402},[8478],{"type":53,"value":1199},{"type":43,"tag":395,"props":8480,"children":8481},{"style":408},[8482],{"type":53,"value":8483},"Starting task: ",{"type":43,"tag":395,"props":8485,"children":8486},{"style":402},[8487],{"type":53,"value":1209},{"type":43,"tag":395,"props":8489,"children":8490},{"style":492},[8491],{"type":53,"value":8413},{"type":43,"tag":395,"props":8493,"children":8494},{"style":402},[8495],{"type":53,"value":1218},{"type":43,"tag":395,"props":8497,"children":8498},{"style":1192},[8499],{"type":53,"value":1137},{"type":43,"tag":395,"props":8501,"children":8502},{"style":402},[8503],{"type":53,"value":560},{"type":43,"tag":395,"props":8505,"children":8507},{"class":397,"line":8506},51,[8508,8512,8516,8520,8524,8529,8533,8537],{"type":43,"tag":395,"props":8509,"children":8510},{"style":481},[8511],{"type":53,"value":3706},{"type":43,"tag":395,"props":8513,"children":8514},{"style":1108},[8515],{"type":53,"value":7213},{"type":43,"tag":395,"props":8517,"children":8518},{"style":1192},[8519],{"type":53,"value":1116},{"type":43,"tag":395,"props":8521,"children":8522},{"style":402},[8523],{"type":53,"value":405},{"type":43,"tag":395,"props":8525,"children":8526},{"style":408},[8527],{"type":53,"value":8528},"Initializing agent context",{"type":43,"tag":395,"props":8530,"children":8531},{"style":402},[8532],{"type":53,"value":405},{"type":43,"tag":395,"props":8534,"children":8535},{"style":1192},[8536],{"type":53,"value":1137},{"type":43,"tag":395,"props":8538,"children":8539},{"style":402},[8540],{"type":53,"value":560},{"type":43,"tag":395,"props":8542,"children":8544},{"class":397,"line":8543},52,[8545,8549,8553,8557,8561,8566,8570,8574],{"type":43,"tag":395,"props":8546,"children":8547},{"style":481},[8548],{"type":53,"value":3706},{"type":43,"tag":395,"props":8550,"children":8551},{"style":1108},[8552],{"type":53,"value":7834},{"type":43,"tag":395,"props":8554,"children":8555},{"style":1192},[8556],{"type":53,"value":1116},{"type":43,"tag":395,"props":8558,"children":8559},{"style":402},[8560],{"type":53,"value":405},{"type":43,"tag":395,"props":8562,"children":8563},{"style":408},[8564],{"type":53,"value":8565},"Analyzing the task requirements...",{"type":43,"tag":395,"props":8567,"children":8568},{"style":402},[8569],{"type":53,"value":405},{"type":43,"tag":395,"props":8571,"children":8572},{"style":1192},[8573],{"type":53,"value":1137},{"type":43,"tag":395,"props":8575,"children":8576},{"style":402},[8577],{"type":53,"value":560},{"type":43,"tag":395,"props":8579,"children":8581},{"class":397,"line":8580},53,[8582],{"type":43,"tag":395,"props":8583,"children":8584},{"style":1192},[8585],{"type":53,"value":8458},{"type":43,"tag":395,"props":8587,"children":8589},{"class":397,"line":8588},54,[8590],{"type":43,"tag":395,"props":8591,"children":8592},{"style":423},[8593],{"type":53,"value":8594},"  \u002F\u002F ... agent processing ...\n",{"type":43,"tag":395,"props":8596,"children":8598},{"class":397,"line":8597},55,[8599],{"type":43,"tag":395,"props":8600,"children":8601},{"style":1192},[8602],{"type":53,"value":8458},{"type":43,"tag":395,"props":8604,"children":8606},{"class":397,"line":8605},56,[8607,8611,8615,8619,8623,8628,8632,8636],{"type":43,"tag":395,"props":8608,"children":8609},{"style":481},[8610],{"type":53,"value":3706},{"type":43,"tag":395,"props":8612,"children":8613},{"style":1108},[8614],{"type":53,"value":8126},{"type":43,"tag":395,"props":8616,"children":8617},{"style":1192},[8618],{"type":53,"value":1116},{"type":43,"tag":395,"props":8620,"children":8621},{"style":402},[8622],{"type":53,"value":405},{"type":43,"tag":395,"props":8624,"children":8625},{"style":408},[8626],{"type":53,"value":8627},"Task completed successfully",{"type":43,"tag":395,"props":8629,"children":8630},{"style":402},[8631],{"type":53,"value":405},{"type":43,"tag":395,"props":8633,"children":8634},{"style":1192},[8635],{"type":53,"value":1137},{"type":43,"tag":395,"props":8637,"children":8638},{"style":402},[8639],{"type":53,"value":560},{"type":43,"tag":395,"props":8641,"children":8643},{"class":397,"line":8642},57,[8644,8648,8652,8656,8660,8665,8669,8673],{"type":43,"tag":395,"props":8645,"children":8646},{"style":481},[8647],{"type":53,"value":3706},{"type":43,"tag":395,"props":8649,"children":8650},{"style":1108},[8651],{"type":53,"value":7526},{"type":43,"tag":395,"props":8653,"children":8654},{"style":1192},[8655],{"type":53,"value":1116},{"type":43,"tag":395,"props":8657,"children":8658},{"style":402},[8659],{"type":53,"value":405},{"type":43,"tag":395,"props":8661,"children":8662},{"style":408},[8663],{"type":53,"value":8664},"Workflow finished",{"type":43,"tag":395,"props":8666,"children":8667},{"style":402},[8668],{"type":53,"value":405},{"type":43,"tag":395,"props":8670,"children":8671},{"style":1192},[8672],{"type":53,"value":1137},{"type":43,"tag":395,"props":8674,"children":8675},{"style":402},[8676],{"type":53,"value":560},{"type":43,"tag":395,"props":8678,"children":8680},{"class":397,"line":8679},58,[8681],{"type":43,"tag":395,"props":8682,"children":8683},{"style":402},[8684],{"type":53,"value":1265},{"type":43,"tag":66,"props":8686,"children":8687},{},[8688],{"type":43,"tag":119,"props":8689,"children":8690},{},[8691],{"type":53,"value":8692},"Consuming namespaced streams:",{"type":43,"tag":384,"props":8694,"children":8696},{"className":386,"code":8695,"language":388,"meta":389,"style":389},"import { start, getRun } from \"workflow\u002Fapi\";\nimport { agentWorkflow } from \".\u002Fworkflows\u002Fagent\";\n\nexport async function POST(request: Request) {\n  const run = await start(agentWorkflow, [\"process data\"]);\n\n  \u002F\u002F Access specific streams by namespace\n  const results = run.getReadable({ namespace: undefined }); \u002F\u002F Default stream (important results)\n  const infoLogs = run.getReadable({ namespace: \"logs:info\" });\n  const debugLogs = run.getReadable({ namespace: \"logs:debug\" });\n  const thoughts = run.getReadable({ namespace: \"agent:thoughts\" });\n\n  \u002F\u002F Return only important results for most clients\n  return new Response(results, { headers: { \"Content-Type\": \"application\u002Fjson\" } });\n}\n\n\u002F\u002F Resume from a specific point (useful for long sessions)\nexport async function GET(request: Request) {\n  const { searchParams } = new URL(request.url);\n  const runId = searchParams.get(\"runId\")!;\n  const startIndex = parseInt(searchParams.get(\"startIndex\") || \"0\", 10);\n  \n  const run = getRun(runId);\n  \u002F\u002F Resume only the important stream, skip verbose debug logs\n  const stream = run.getReadable({ startIndex });\n  \n  return new Response(stream);\n}\n",[8697],{"type":43,"tag":58,"props":8698,"children":8699},{"__ignoreMap":389},[8700,8747,8787,8794,8838,8899,8906,8914,8981,9049,9117,9185,9192,9200,9291,9298,9305,9313,9357,9415,9468,9561,9568,9603,9611,9663,9670,9701],{"type":43,"tag":395,"props":8701,"children":8702},{"class":397,"line":398},[8703,8707,8711,8715,8719,8723,8727,8731,8735,8739,8743],{"type":43,"tag":395,"props":8704,"children":8705},{"style":481},[8706],{"type":53,"value":484},{"type":43,"tag":395,"props":8708,"children":8709},{"style":402},[8710],{"type":53,"value":489},{"type":43,"tag":395,"props":8712,"children":8713},{"style":492},[8714],{"type":53,"value":696},{"type":43,"tag":395,"props":8716,"children":8717},{"style":402},[8718],{"type":53,"value":500},{"type":43,"tag":395,"props":8720,"children":8721},{"style":492},[8722],{"type":53,"value":705},{"type":43,"tag":395,"props":8724,"children":8725},{"style":402},[8726],{"type":53,"value":537},{"type":43,"tag":395,"props":8728,"children":8729},{"style":481},[8730],{"type":53,"value":542},{"type":43,"tag":395,"props":8732,"children":8733},{"style":402},[8734],{"type":53,"value":547},{"type":43,"tag":395,"props":8736,"children":8737},{"style":408},[8738],{"type":53,"value":740},{"type":43,"tag":395,"props":8740,"children":8741},{"style":402},[8742],{"type":53,"value":405},{"type":43,"tag":395,"props":8744,"children":8745},{"style":402},[8746],{"type":53,"value":560},{"type":43,"tag":395,"props":8748,"children":8749},{"class":397,"line":429},[8750,8754,8758,8762,8766,8770,8774,8779,8783],{"type":43,"tag":395,"props":8751,"children":8752},{"style":481},[8753],{"type":53,"value":484},{"type":43,"tag":395,"props":8755,"children":8756},{"style":402},[8757],{"type":53,"value":489},{"type":43,"tag":395,"props":8759,"children":8760},{"style":492},[8761],{"type":53,"value":8404},{"type":43,"tag":395,"props":8763,"children":8764},{"style":402},[8765],{"type":53,"value":537},{"type":43,"tag":395,"props":8767,"children":8768},{"style":481},[8769],{"type":53,"value":542},{"type":43,"tag":395,"props":8771,"children":8772},{"style":402},[8773],{"type":53,"value":547},{"type":43,"tag":395,"props":8775,"children":8776},{"style":408},[8777],{"type":53,"value":8778},".\u002Fworkflows\u002Fagent",{"type":43,"tag":395,"props":8780,"children":8781},{"style":402},[8782],{"type":53,"value":405},{"type":43,"tag":395,"props":8784,"children":8785},{"style":402},[8786],{"type":53,"value":560},{"type":43,"tag":395,"props":8788,"children":8789},{"class":397,"line":563},[8790],{"type":43,"tag":395,"props":8791,"children":8792},{"emptyLinePlaceholder":667},[8793],{"type":53,"value":670},{"type":43,"tag":395,"props":8795,"children":8796},{"class":397,"line":613},[8797,8801,8805,8809,8813,8817,8822,8826,8830,8834],{"type":43,"tag":395,"props":8798,"children":8799},{"style":481},[8800],{"type":53,"value":1508},{"type":43,"tag":395,"props":8802,"children":8803},{"style":1097},[8804],{"type":53,"value":1513},{"type":43,"tag":395,"props":8806,"children":8807},{"style":1097},[8808],{"type":53,"value":1105},{"type":43,"tag":395,"props":8810,"children":8811},{"style":1108},[8812],{"type":53,"value":3189},{"type":43,"tag":395,"props":8814,"children":8815},{"style":402},[8816],{"type":53,"value":1116},{"type":43,"tag":395,"props":8818,"children":8819},{"style":1119},[8820],{"type":53,"value":8821},"request",{"type":43,"tag":395,"props":8823,"children":8824},{"style":402},[8825],{"type":53,"value":109},{"type":43,"tag":395,"props":8827,"children":8828},{"style":1129},[8829],{"type":53,"value":4625},{"type":43,"tag":395,"props":8831,"children":8832},{"style":402},[8833],{"type":53,"value":1137},{"type":43,"tag":395,"props":8835,"children":8836},{"style":402},[8837],{"type":53,"value":1142},{"type":43,"tag":395,"props":8839,"children":8840},{"class":397,"line":663},[8841,8845,8849,8853,8857,8861,8865,8870,8874,8878,8882,8887,8891,8895],{"type":43,"tag":395,"props":8842,"children":8843},{"style":1097},[8844],{"type":53,"value":1170},{"type":43,"tag":395,"props":8846,"children":8847},{"style":492},[8848],{"type":53,"value":3209},{"type":43,"tag":395,"props":8850,"children":8851},{"style":402},[8852],{"type":53,"value":1180},{"type":43,"tag":395,"props":8854,"children":8855},{"style":481},[8856],{"type":53,"value":1185},{"type":43,"tag":395,"props":8858,"children":8859},{"style":1108},[8860],{"type":53,"value":696},{"type":43,"tag":395,"props":8862,"children":8863},{"style":1192},[8864],{"type":53,"value":1116},{"type":43,"tag":395,"props":8866,"children":8867},{"style":492},[8868],{"type":53,"value":8869},"agentWorkflow",{"type":43,"tag":395,"props":8871,"children":8872},{"style":402},[8873],{"type":53,"value":500},{"type":43,"tag":395,"props":8875,"children":8876},{"style":1192},[8877],{"type":53,"value":2767},{"type":43,"tag":395,"props":8879,"children":8880},{"style":402},[8881],{"type":53,"value":405},{"type":43,"tag":395,"props":8883,"children":8884},{"style":408},[8885],{"type":53,"value":8886},"process data",{"type":43,"tag":395,"props":8888,"children":8889},{"style":402},[8890],{"type":53,"value":405},{"type":43,"tag":395,"props":8892,"children":8893},{"style":1192},[8894],{"type":53,"value":3257},{"type":43,"tag":395,"props":8896,"children":8897},{"style":402},[8898],{"type":53,"value":560},{"type":43,"tag":395,"props":8900,"children":8901},{"class":397,"line":673},[8902],{"type":43,"tag":395,"props":8903,"children":8904},{"emptyLinePlaceholder":667},[8905],{"type":53,"value":670},{"type":43,"tag":395,"props":8907,"children":8908},{"class":397,"line":682},[8909],{"type":43,"tag":395,"props":8910,"children":8911},{"style":423},[8912],{"type":53,"value":8913},"  \u002F\u002F Access specific streams by namespace\n",{"type":43,"tag":395,"props":8915,"children":8916},{"class":397,"line":751},[8917,8921,8926,8930,8934,8938,8943,8947,8951,8955,8959,8964,8968,8972,8976],{"type":43,"tag":395,"props":8918,"children":8919},{"style":1097},[8920],{"type":53,"value":1170},{"type":43,"tag":395,"props":8922,"children":8923},{"style":492},[8924],{"type":53,"value":8925}," results",{"type":43,"tag":395,"props":8927,"children":8928},{"style":402},[8929],{"type":53,"value":1180},{"type":43,"tag":395,"props":8931,"children":8932},{"style":492},[8933],{"type":53,"value":3209},{"type":43,"tag":395,"props":8935,"children":8936},{"style":402},[8937],{"type":53,"value":1243},{"type":43,"tag":395,"props":8939,"children":8940},{"style":1108},[8941],{"type":53,"value":8942},"getReadable",{"type":43,"tag":395,"props":8944,"children":8945},{"style":1192},[8946],{"type":53,"value":1116},{"type":43,"tag":395,"props":8948,"children":8949},{"style":402},[8950],{"type":53,"value":2608},{"type":43,"tag":395,"props":8952,"children":8953},{"style":1192},[8954],{"type":53,"value":7302},{"type":43,"tag":395,"props":8956,"children":8957},{"style":402},[8958],{"type":53,"value":109},{"type":43,"tag":395,"props":8960,"children":8961},{"style":402},[8962],{"type":53,"value":8963}," undefined",{"type":43,"tag":395,"props":8965,"children":8966},{"style":402},[8967],{"type":53,"value":537},{"type":43,"tag":395,"props":8969,"children":8970},{"style":1192},[8971],{"type":53,"value":1137},{"type":43,"tag":395,"props":8973,"children":8974},{"style":402},[8975],{"type":53,"value":420},{"type":43,"tag":395,"props":8977,"children":8978},{"style":423},[8979],{"type":53,"value":8980}," \u002F\u002F Default stream (important results)\n",{"type":43,"tag":395,"props":8982,"children":8983},{"class":397,"line":759},[8984,8988,8993,8997,9001,9005,9009,9013,9017,9021,9025,9029,9033,9037,9041,9045],{"type":43,"tag":395,"props":8985,"children":8986},{"style":1097},[8987],{"type":53,"value":1170},{"type":43,"tag":395,"props":8989,"children":8990},{"style":492},[8991],{"type":53,"value":8992}," infoLogs",{"type":43,"tag":395,"props":8994,"children":8995},{"style":402},[8996],{"type":53,"value":1180},{"type":43,"tag":395,"props":8998,"children":8999},{"style":492},[9000],{"type":53,"value":3209},{"type":43,"tag":395,"props":9002,"children":9003},{"style":402},[9004],{"type":53,"value":1243},{"type":43,"tag":395,"props":9006,"children":9007},{"style":1108},[9008],{"type":53,"value":8942},{"type":43,"tag":395,"props":9010,"children":9011},{"style":1192},[9012],{"type":53,"value":1116},{"type":43,"tag":395,"props":9014,"children":9015},{"style":402},[9016],{"type":53,"value":2608},{"type":43,"tag":395,"props":9018,"children":9019},{"style":1192},[9020],{"type":53,"value":7302},{"type":43,"tag":395,"props":9022,"children":9023},{"style":402},[9024],{"type":53,"value":109},{"type":43,"tag":395,"props":9026,"children":9027},{"style":402},[9028],{"type":53,"value":547},{"type":43,"tag":395,"props":9030,"children":9031},{"style":408},[9032],{"type":53,"value":7625},{"type":43,"tag":395,"props":9034,"children":9035},{"style":402},[9036],{"type":53,"value":405},{"type":43,"tag":395,"props":9038,"children":9039},{"style":402},[9040],{"type":53,"value":537},{"type":43,"tag":395,"props":9042,"children":9043},{"style":1192},[9044],{"type":53,"value":1137},{"type":43,"tag":395,"props":9046,"children":9047},{"style":402},[9048],{"type":53,"value":560},{"type":43,"tag":395,"props":9050,"children":9051},{"class":397,"line":768},[9052,9056,9061,9065,9069,9073,9077,9081,9085,9089,9093,9097,9101,9105,9109,9113],{"type":43,"tag":395,"props":9053,"children":9054},{"style":1097},[9055],{"type":53,"value":1170},{"type":43,"tag":395,"props":9057,"children":9058},{"style":492},[9059],{"type":53,"value":9060}," debugLogs",{"type":43,"tag":395,"props":9062,"children":9063},{"style":402},[9064],{"type":53,"value":1180},{"type":43,"tag":395,"props":9066,"children":9067},{"style":492},[9068],{"type":53,"value":3209},{"type":43,"tag":395,"props":9070,"children":9071},{"style":402},[9072],{"type":53,"value":1243},{"type":43,"tag":395,"props":9074,"children":9075},{"style":1108},[9076],{"type":53,"value":8942},{"type":43,"tag":395,"props":9078,"children":9079},{"style":1192},[9080],{"type":53,"value":1116},{"type":43,"tag":395,"props":9082,"children":9083},{"style":402},[9084],{"type":53,"value":2608},{"type":43,"tag":395,"props":9086,"children":9087},{"style":1192},[9088],{"type":53,"value":7302},{"type":43,"tag":395,"props":9090,"children":9091},{"style":402},[9092],{"type":53,"value":109},{"type":43,"tag":395,"props":9094,"children":9095},{"style":402},[9096],{"type":53,"value":547},{"type":43,"tag":395,"props":9098,"children":9099},{"style":408},[9100],{"type":53,"value":7315},{"type":43,"tag":395,"props":9102,"children":9103},{"style":402},[9104],{"type":53,"value":405},{"type":43,"tag":395,"props":9106,"children":9107},{"style":402},[9108],{"type":53,"value":537},{"type":43,"tag":395,"props":9110,"children":9111},{"style":1192},[9112],{"type":53,"value":1137},{"type":43,"tag":395,"props":9114,"children":9115},{"style":402},[9116],{"type":53,"value":560},{"type":43,"tag":395,"props":9118,"children":9119},{"class":397,"line":837},[9120,9124,9129,9133,9137,9141,9145,9149,9153,9157,9161,9165,9169,9173,9177,9181],{"type":43,"tag":395,"props":9121,"children":9122},{"style":1097},[9123],{"type":53,"value":1170},{"type":43,"tag":395,"props":9125,"children":9126},{"style":492},[9127],{"type":53,"value":9128}," thoughts",{"type":43,"tag":395,"props":9130,"children":9131},{"style":402},[9132],{"type":53,"value":1180},{"type":43,"tag":395,"props":9134,"children":9135},{"style":492},[9136],{"type":53,"value":3209},{"type":43,"tag":395,"props":9138,"children":9139},{"style":402},[9140],{"type":53,"value":1243},{"type":43,"tag":395,"props":9142,"children":9143},{"style":1108},[9144],{"type":53,"value":8942},{"type":43,"tag":395,"props":9146,"children":9147},{"style":1192},[9148],{"type":53,"value":1116},{"type":43,"tag":395,"props":9150,"children":9151},{"style":402},[9152],{"type":53,"value":2608},{"type":43,"tag":395,"props":9154,"children":9155},{"style":1192},[9156],{"type":53,"value":7302},{"type":43,"tag":395,"props":9158,"children":9159},{"style":402},[9160],{"type":53,"value":109},{"type":43,"tag":395,"props":9162,"children":9163},{"style":402},[9164],{"type":53,"value":547},{"type":43,"tag":395,"props":9166,"children":9167},{"style":408},[9168],{"type":53,"value":7934},{"type":43,"tag":395,"props":9170,"children":9171},{"style":402},[9172],{"type":53,"value":405},{"type":43,"tag":395,"props":9174,"children":9175},{"style":402},[9176],{"type":53,"value":537},{"type":43,"tag":395,"props":9178,"children":9179},{"style":1192},[9180],{"type":53,"value":1137},{"type":43,"tag":395,"props":9182,"children":9183},{"style":402},[9184],{"type":53,"value":560},{"type":43,"tag":395,"props":9186,"children":9187},{"class":397,"line":845},[9188],{"type":43,"tag":395,"props":9189,"children":9190},{"emptyLinePlaceholder":667},[9191],{"type":53,"value":670},{"type":43,"tag":395,"props":9193,"children":9194},{"class":397,"line":854},[9195],{"type":43,"tag":395,"props":9196,"children":9197},{"style":423},[9198],{"type":53,"value":9199},"  \u002F\u002F Return only important results for most clients\n",{"type":43,"tag":395,"props":9201,"children":9202},{"class":397,"line":896},[9203,9207,9211,9215,9219,9224,9228,9232,9237,9241,9245,9249,9254,9258,9262,9266,9271,9275,9279,9283,9287],{"type":43,"tag":395,"props":9204,"children":9205},{"style":481},[9206],{"type":53,"value":1234},{"type":43,"tag":395,"props":9208,"children":9209},{"style":402},[9210],{"type":53,"value":2444},{"type":43,"tag":395,"props":9212,"children":9213},{"style":1108},[9214],{"type":53,"value":3273},{"type":43,"tag":395,"props":9216,"children":9217},{"style":1192},[9218],{"type":53,"value":1116},{"type":43,"tag":395,"props":9220,"children":9221},{"style":492},[9222],{"type":53,"value":9223},"results",{"type":43,"tag":395,"props":9225,"children":9226},{"style":402},[9227],{"type":53,"value":500},{"type":43,"tag":395,"props":9229,"children":9230},{"style":402},[9231],{"type":53,"value":489},{"type":43,"tag":395,"props":9233,"children":9234},{"style":1192},[9235],{"type":53,"value":9236}," headers",{"type":43,"tag":395,"props":9238,"children":9239},{"style":402},[9240],{"type":53,"value":109},{"type":43,"tag":395,"props":9242,"children":9243},{"style":402},[9244],{"type":53,"value":489},{"type":43,"tag":395,"props":9246,"children":9247},{"style":402},[9248],{"type":53,"value":547},{"type":43,"tag":395,"props":9250,"children":9251},{"style":1192},[9252],{"type":53,"value":9253},"Content-Type",{"type":43,"tag":395,"props":9255,"children":9256},{"style":402},[9257],{"type":53,"value":405},{"type":43,"tag":395,"props":9259,"children":9260},{"style":402},[9261],{"type":53,"value":109},{"type":43,"tag":395,"props":9263,"children":9264},{"style":402},[9265],{"type":53,"value":547},{"type":43,"tag":395,"props":9267,"children":9268},{"style":408},[9269],{"type":53,"value":9270},"application\u002Fjson",{"type":43,"tag":395,"props":9272,"children":9273},{"style":402},[9274],{"type":53,"value":405},{"type":43,"tag":395,"props":9276,"children":9277},{"style":402},[9278],{"type":53,"value":537},{"type":43,"tag":395,"props":9280,"children":9281},{"style":402},[9282],{"type":53,"value":537},{"type":43,"tag":395,"props":9284,"children":9285},{"style":1192},[9286],{"type":53,"value":1137},{"type":43,"tag":395,"props":9288,"children":9289},{"style":402},[9290],{"type":53,"value":560},{"type":43,"tag":395,"props":9292,"children":9293},{"class":397,"line":938},[9294],{"type":43,"tag":395,"props":9295,"children":9296},{"style":402},[9297],{"type":53,"value":1265},{"type":43,"tag":395,"props":9299,"children":9300},{"class":397,"line":979},[9301],{"type":43,"tag":395,"props":9302,"children":9303},{"emptyLinePlaceholder":667},[9304],{"type":53,"value":670},{"type":43,"tag":395,"props":9306,"children":9307},{"class":397,"line":988},[9308],{"type":43,"tag":395,"props":9309,"children":9310},{"style":423},[9311],{"type":53,"value":9312},"\u002F\u002F Resume from a specific point (useful for long sessions)\n",{"type":43,"tag":395,"props":9314,"children":9315},{"class":397,"line":996},[9316,9320,9324,9328,9333,9337,9341,9345,9349,9353],{"type":43,"tag":395,"props":9317,"children":9318},{"style":481},[9319],{"type":53,"value":1508},{"type":43,"tag":395,"props":9321,"children":9322},{"style":1097},[9323],{"type":53,"value":1513},{"type":43,"tag":395,"props":9325,"children":9326},{"style":1097},[9327],{"type":53,"value":1105},{"type":43,"tag":395,"props":9329,"children":9330},{"style":1108},[9331],{"type":53,"value":9332}," GET",{"type":43,"tag":395,"props":9334,"children":9335},{"style":402},[9336],{"type":53,"value":1116},{"type":43,"tag":395,"props":9338,"children":9339},{"style":1119},[9340],{"type":53,"value":8821},{"type":43,"tag":395,"props":9342,"children":9343},{"style":402},[9344],{"type":53,"value":109},{"type":43,"tag":395,"props":9346,"children":9347},{"style":1129},[9348],{"type":53,"value":4625},{"type":43,"tag":395,"props":9350,"children":9351},{"style":402},[9352],{"type":53,"value":1137},{"type":43,"tag":395,"props":9354,"children":9355},{"style":402},[9356],{"type":53,"value":1142},{"type":43,"tag":395,"props":9358,"children":9359},{"class":397,"line":1005},[9360,9364,9368,9373,9377,9381,9385,9390,9394,9398,9402,9407,9411],{"type":43,"tag":395,"props":9361,"children":9362},{"style":1097},[9363],{"type":53,"value":1170},{"type":43,"tag":395,"props":9365,"children":9366},{"style":402},[9367],{"type":53,"value":489},{"type":43,"tag":395,"props":9369,"children":9370},{"style":492},[9371],{"type":53,"value":9372}," searchParams",{"type":43,"tag":395,"props":9374,"children":9375},{"style":402},[9376],{"type":53,"value":537},{"type":43,"tag":395,"props":9378,"children":9379},{"style":402},[9380],{"type":53,"value":1180},{"type":43,"tag":395,"props":9382,"children":9383},{"style":402},[9384],{"type":53,"value":2444},{"type":43,"tag":395,"props":9386,"children":9387},{"style":1108},[9388],{"type":53,"value":9389}," URL",{"type":43,"tag":395,"props":9391,"children":9392},{"style":1192},[9393],{"type":53,"value":1116},{"type":43,"tag":395,"props":9395,"children":9396},{"style":492},[9397],{"type":53,"value":8821},{"type":43,"tag":395,"props":9399,"children":9400},{"style":402},[9401],{"type":53,"value":1243},{"type":43,"tag":395,"props":9403,"children":9404},{"style":492},[9405],{"type":53,"value":9406},"url",{"type":43,"tag":395,"props":9408,"children":9409},{"style":1192},[9410],{"type":53,"value":1137},{"type":43,"tag":395,"props":9412,"children":9413},{"style":402},[9414],{"type":53,"value":560},{"type":43,"tag":395,"props":9416,"children":9417},{"class":397,"line":1568},[9418,9422,9426,9430,9434,9438,9443,9447,9451,9455,9459,9463],{"type":43,"tag":395,"props":9419,"children":9420},{"style":1097},[9421],{"type":53,"value":1170},{"type":43,"tag":395,"props":9423,"children":9424},{"style":492},[9425],{"type":53,"value":3294},{"type":43,"tag":395,"props":9427,"children":9428},{"style":402},[9429],{"type":53,"value":1180},{"type":43,"tag":395,"props":9431,"children":9432},{"style":492},[9433],{"type":53,"value":9372},{"type":43,"tag":395,"props":9435,"children":9436},{"style":402},[9437],{"type":53,"value":1243},{"type":43,"tag":395,"props":9439,"children":9440},{"style":1108},[9441],{"type":53,"value":9442},"get",{"type":43,"tag":395,"props":9444,"children":9445},{"style":1192},[9446],{"type":53,"value":1116},{"type":43,"tag":395,"props":9448,"children":9449},{"style":402},[9450],{"type":53,"value":405},{"type":43,"tag":395,"props":9452,"children":9453},{"style":408},[9454],{"type":53,"value":3311},{"type":43,"tag":395,"props":9456,"children":9457},{"style":402},[9458],{"type":53,"value":405},{"type":43,"tag":395,"props":9460,"children":9461},{"style":1192},[9462],{"type":53,"value":1137},{"type":43,"tag":395,"props":9464,"children":9465},{"style":402},[9466],{"type":53,"value":9467},"!;\n",{"type":43,"tag":395,"props":9469,"children":9470},{"class":397,"line":1609},[9471,9475,9480,9484,9489,9493,9498,9502,9506,9510,9514,9519,9523,9527,9532,9536,9541,9545,9549,9553,9557],{"type":43,"tag":395,"props":9472,"children":9473},{"style":1097},[9474],{"type":53,"value":1170},{"type":43,"tag":395,"props":9476,"children":9477},{"style":492},[9478],{"type":53,"value":9479}," startIndex",{"type":43,"tag":395,"props":9481,"children":9482},{"style":402},[9483],{"type":53,"value":1180},{"type":43,"tag":395,"props":9485,"children":9486},{"style":1108},[9487],{"type":53,"value":9488}," parseInt",{"type":43,"tag":395,"props":9490,"children":9491},{"style":1192},[9492],{"type":53,"value":1116},{"type":43,"tag":395,"props":9494,"children":9495},{"style":492},[9496],{"type":53,"value":9497},"searchParams",{"type":43,"tag":395,"props":9499,"children":9500},{"style":402},[9501],{"type":53,"value":1243},{"type":43,"tag":395,"props":9503,"children":9504},{"style":1108},[9505],{"type":53,"value":9442},{"type":43,"tag":395,"props":9507,"children":9508},{"style":1192},[9509],{"type":53,"value":1116},{"type":43,"tag":395,"props":9511,"children":9512},{"style":402},[9513],{"type":53,"value":405},{"type":43,"tag":395,"props":9515,"children":9516},{"style":408},[9517],{"type":53,"value":9518},"startIndex",{"type":43,"tag":395,"props":9520,"children":9521},{"style":402},[9522],{"type":53,"value":405},{"type":43,"tag":395,"props":9524,"children":9525},{"style":1192},[9526],{"type":53,"value":4421},{"type":43,"tag":395,"props":9528,"children":9529},{"style":402},[9530],{"type":53,"value":9531},"||",{"type":43,"tag":395,"props":9533,"children":9534},{"style":402},[9535],{"type":53,"value":547},{"type":43,"tag":395,"props":9537,"children":9538},{"style":408},[9539],{"type":53,"value":9540},"0",{"type":43,"tag":395,"props":9542,"children":9543},{"style":402},[9544],{"type":53,"value":405},{"type":43,"tag":395,"props":9546,"children":9547},{"style":402},[9548],{"type":53,"value":500},{"type":43,"tag":395,"props":9550,"children":9551},{"style":2880},[9552],{"type":53,"value":2883},{"type":43,"tag":395,"props":9554,"children":9555},{"style":1192},[9556],{"type":53,"value":1137},{"type":43,"tag":395,"props":9558,"children":9559},{"style":402},[9560],{"type":53,"value":560},{"type":43,"tag":395,"props":9562,"children":9563},{"class":397,"line":1650},[9564],{"type":43,"tag":395,"props":9565,"children":9566},{"style":1192},[9567],{"type":53,"value":8458},{"type":43,"tag":395,"props":9569,"children":9570},{"class":397,"line":1690},[9571,9575,9579,9583,9587,9591,9595,9599],{"type":43,"tag":395,"props":9572,"children":9573},{"style":1097},[9574],{"type":53,"value":1170},{"type":43,"tag":395,"props":9576,"children":9577},{"style":492},[9578],{"type":53,"value":3209},{"type":43,"tag":395,"props":9580,"children":9581},{"style":402},[9582],{"type":53,"value":1180},{"type":43,"tag":395,"props":9584,"children":9585},{"style":1108},[9586],{"type":53,"value":705},{"type":43,"tag":395,"props":9588,"children":9589},{"style":1192},[9590],{"type":53,"value":1116},{"type":43,"tag":395,"props":9592,"children":9593},{"style":492},[9594],{"type":53,"value":3311},{"type":43,"tag":395,"props":9596,"children":9597},{"style":1192},[9598],{"type":53,"value":1137},{"type":43,"tag":395,"props":9600,"children":9601},{"style":402},[9602],{"type":53,"value":560},{"type":43,"tag":395,"props":9604,"children":9605},{"class":397,"line":2677},[9606],{"type":43,"tag":395,"props":9607,"children":9608},{"style":423},[9609],{"type":53,"value":9610},"  \u002F\u002F Resume only the important stream, skip verbose debug logs\n",{"type":43,"tag":395,"props":9612,"children":9613},{"class":397,"line":2686},[9614,9618,9623,9627,9631,9635,9639,9643,9647,9651,9655,9659],{"type":43,"tag":395,"props":9615,"children":9616},{"style":1097},[9617],{"type":53,"value":1170},{"type":43,"tag":395,"props":9619,"children":9620},{"style":492},[9621],{"type":53,"value":9622}," stream",{"type":43,"tag":395,"props":9624,"children":9625},{"style":402},[9626],{"type":53,"value":1180},{"type":43,"tag":395,"props":9628,"children":9629},{"style":492},[9630],{"type":53,"value":3209},{"type":43,"tag":395,"props":9632,"children":9633},{"style":402},[9634],{"type":53,"value":1243},{"type":43,"tag":395,"props":9636,"children":9637},{"style":1108},[9638],{"type":53,"value":8942},{"type":43,"tag":395,"props":9640,"children":9641},{"style":1192},[9642],{"type":53,"value":1116},{"type":43,"tag":395,"props":9644,"children":9645},{"style":402},[9646],{"type":53,"value":2608},{"type":43,"tag":395,"props":9648,"children":9649},{"style":492},[9650],{"type":53,"value":9479},{"type":43,"tag":395,"props":9652,"children":9653},{"style":402},[9654],{"type":53,"value":537},{"type":43,"tag":395,"props":9656,"children":9657},{"style":1192},[9658],{"type":53,"value":1137},{"type":43,"tag":395,"props":9660,"children":9661},{"style":402},[9662],{"type":53,"value":560},{"type":43,"tag":395,"props":9664,"children":9665},{"class":397,"line":2702},[9666],{"type":43,"tag":395,"props":9667,"children":9668},{"style":1192},[9669],{"type":53,"value":8458},{"type":43,"tag":395,"props":9671,"children":9672},{"class":397,"line":2710},[9673,9677,9681,9685,9689,9693,9697],{"type":43,"tag":395,"props":9674,"children":9675},{"style":481},[9676],{"type":53,"value":1234},{"type":43,"tag":395,"props":9678,"children":9679},{"style":402},[9680],{"type":53,"value":2444},{"type":43,"tag":395,"props":9682,"children":9683},{"style":1108},[9684],{"type":53,"value":3273},{"type":43,"tag":395,"props":9686,"children":9687},{"style":1192},[9688],{"type":53,"value":1116},{"type":43,"tag":395,"props":9690,"children":9691},{"style":492},[9692],{"type":53,"value":2741},{"type":43,"tag":395,"props":9694,"children":9695},{"style":1192},[9696],{"type":53,"value":1137},{"type":43,"tag":395,"props":9698,"children":9699},{"style":402},[9700],{"type":53,"value":560},{"type":43,"tag":395,"props":9702,"children":9703},{"class":397,"line":2752},[9704],{"type":43,"tag":395,"props":9705,"children":9706},{"style":402},[9707],{"type":53,"value":1265},{"type":43,"tag":66,"props":9709,"children":9710},{},[9711,9716],{"type":43,"tag":119,"props":9712,"children":9713},{},[9714],{"type":53,"value":9715},"Pro tip:",{"type":53,"value":9717}," For very long-running sessions (50+ minutes), namespaced streams help manage replay performance. Put verbose\u002Fdebug output in separate namespaces so you can replay just the important events quickly.",{"type":43,"tag":44,"props":9719,"children":9721},{"id":9720},"debugging",[9722],{"type":53,"value":9723},"Debugging",{"type":43,"tag":384,"props":9725,"children":9729},{"className":9726,"code":9727,"language":9728,"meta":389,"style":389},"language-bash shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","# Check workflow endpoints are reachable\nnpx workflow health\nnpx workflow health --port 3001  # Non-default port\n\n# Visual dashboard for runs\nnpx workflow web\nnpx workflow web \u003Crun_id>\n\n# CLI inspection (use --json for machine-readable output, --help for full usage)\nnpx workflow inspect runs\nnpx workflow inspect run \u003Crun_id>\n\n# For Vercel-deployed projects, specify backend and project\nnpx workflow inspect runs --backend vercel --project \u003Cproject-name> --team \u003Cteam-slug>\nnpx workflow inspect run \u003Crun_id> --backend vercel --project \u003Cproject-name> --team \u003Cteam-slug>\n\n# Open Vercel dashboard in browser for a specific run\nnpx workflow inspect run \u003Crun_id> --web\nnpx workflow web \u003Crun_id> --backend vercel --project \u003Cproject-name> --team \u003Cteam-slug>\n\n# Cancel a running workflow\nnpx workflow cancel \u003Crun_id>\nnpx workflow cancel \u003Crun_id> --backend vercel --project \u003Cproject-name> --team \u003Cteam-slug>\n# --env defaults to \"production\"; use --env preview for preview deployments\n","bash",[9730],{"type":43,"tag":58,"props":9731,"children":9732},{"__ignoreMap":389},[9733,9741,9758,9789,9796,9804,9820,9856,9863,9871,9892,9927,9934,9942,10018,10101,10108,10116,10156,10235,10242,10250,10282,10361],{"type":43,"tag":395,"props":9734,"children":9735},{"class":397,"line":398},[9736],{"type":43,"tag":395,"props":9737,"children":9738},{"style":423},[9739],{"type":53,"value":9740},"# Check workflow endpoints are reachable\n",{"type":43,"tag":395,"props":9742,"children":9743},{"class":397,"line":429},[9744,9749,9753],{"type":43,"tag":395,"props":9745,"children":9746},{"style":1129},[9747],{"type":53,"value":9748},"npx",{"type":43,"tag":395,"props":9750,"children":9751},{"style":408},[9752],{"type":53,"value":910},{"type":43,"tag":395,"props":9754,"children":9755},{"style":408},[9756],{"type":53,"value":9757}," health\n",{"type":43,"tag":395,"props":9759,"children":9760},{"class":397,"line":563},[9761,9765,9769,9774,9779,9784],{"type":43,"tag":395,"props":9762,"children":9763},{"style":1129},[9764],{"type":53,"value":9748},{"type":43,"tag":395,"props":9766,"children":9767},{"style":408},[9768],{"type":53,"value":910},{"type":43,"tag":395,"props":9770,"children":9771},{"style":408},[9772],{"type":53,"value":9773}," health",{"type":43,"tag":395,"props":9775,"children":9776},{"style":408},[9777],{"type":53,"value":9778}," --port",{"type":43,"tag":395,"props":9780,"children":9781},{"style":2880},[9782],{"type":53,"value":9783}," 3001",{"type":43,"tag":395,"props":9785,"children":9786},{"style":423},[9787],{"type":53,"value":9788},"  # Non-default port\n",{"type":43,"tag":395,"props":9790,"children":9791},{"class":397,"line":613},[9792],{"type":43,"tag":395,"props":9793,"children":9794},{"emptyLinePlaceholder":667},[9795],{"type":53,"value":670},{"type":43,"tag":395,"props":9797,"children":9798},{"class":397,"line":663},[9799],{"type":43,"tag":395,"props":9800,"children":9801},{"style":423},[9802],{"type":53,"value":9803},"# Visual dashboard for runs\n",{"type":43,"tag":395,"props":9805,"children":9806},{"class":397,"line":673},[9807,9811,9815],{"type":43,"tag":395,"props":9808,"children":9809},{"style":1129},[9810],{"type":53,"value":9748},{"type":43,"tag":395,"props":9812,"children":9813},{"style":408},[9814],{"type":53,"value":910},{"type":43,"tag":395,"props":9816,"children":9817},{"style":408},[9818],{"type":53,"value":9819}," web\n",{"type":43,"tag":395,"props":9821,"children":9822},{"class":397,"line":682},[9823,9827,9831,9836,9841,9846,9851],{"type":43,"tag":395,"props":9824,"children":9825},{"style":1129},[9826],{"type":53,"value":9748},{"type":43,"tag":395,"props":9828,"children":9829},{"style":408},[9830],{"type":53,"value":910},{"type":43,"tag":395,"props":9832,"children":9833},{"style":408},[9834],{"type":53,"value":9835}," web",{"type":43,"tag":395,"props":9837,"children":9838},{"style":402},[9839],{"type":53,"value":9840}," \u003C",{"type":43,"tag":395,"props":9842,"children":9843},{"style":408},[9844],{"type":53,"value":9845},"run_i",{"type":43,"tag":395,"props":9847,"children":9848},{"style":492},[9849],{"type":53,"value":9850},"d",{"type":43,"tag":395,"props":9852,"children":9853},{"style":402},[9854],{"type":53,"value":9855},">\n",{"type":43,"tag":395,"props":9857,"children":9858},{"class":397,"line":751},[9859],{"type":43,"tag":395,"props":9860,"children":9861},{"emptyLinePlaceholder":667},[9862],{"type":53,"value":670},{"type":43,"tag":395,"props":9864,"children":9865},{"class":397,"line":759},[9866],{"type":43,"tag":395,"props":9867,"children":9868},{"style":423},[9869],{"type":53,"value":9870},"# CLI inspection (use --json for machine-readable output, --help for full usage)\n",{"type":43,"tag":395,"props":9872,"children":9873},{"class":397,"line":768},[9874,9878,9882,9887],{"type":43,"tag":395,"props":9875,"children":9876},{"style":1129},[9877],{"type":53,"value":9748},{"type":43,"tag":395,"props":9879,"children":9880},{"style":408},[9881],{"type":53,"value":910},{"type":43,"tag":395,"props":9883,"children":9884},{"style":408},[9885],{"type":53,"value":9886}," inspect",{"type":43,"tag":395,"props":9888,"children":9889},{"style":408},[9890],{"type":53,"value":9891}," runs\n",{"type":43,"tag":395,"props":9893,"children":9894},{"class":397,"line":837},[9895,9899,9903,9907,9911,9915,9919,9923],{"type":43,"tag":395,"props":9896,"children":9897},{"style":1129},[9898],{"type":53,"value":9748},{"type":43,"tag":395,"props":9900,"children":9901},{"style":408},[9902],{"type":53,"value":910},{"type":43,"tag":395,"props":9904,"children":9905},{"style":408},[9906],{"type":53,"value":9886},{"type":43,"tag":395,"props":9908,"children":9909},{"style":408},[9910],{"type":53,"value":3209},{"type":43,"tag":395,"props":9912,"children":9913},{"style":402},[9914],{"type":53,"value":9840},{"type":43,"tag":395,"props":9916,"children":9917},{"style":408},[9918],{"type":53,"value":9845},{"type":43,"tag":395,"props":9920,"children":9921},{"style":492},[9922],{"type":53,"value":9850},{"type":43,"tag":395,"props":9924,"children":9925},{"style":402},[9926],{"type":53,"value":9855},{"type":43,"tag":395,"props":9928,"children":9929},{"class":397,"line":845},[9930],{"type":43,"tag":395,"props":9931,"children":9932},{"emptyLinePlaceholder":667},[9933],{"type":53,"value":670},{"type":43,"tag":395,"props":9935,"children":9936},{"class":397,"line":854},[9937],{"type":43,"tag":395,"props":9938,"children":9939},{"style":423},[9940],{"type":53,"value":9941},"# For Vercel-deployed projects, specify backend and project\n",{"type":43,"tag":395,"props":9943,"children":9944},{"class":397,"line":896},[9945,9949,9953,9957,9962,9967,9972,9977,9981,9986,9991,9995,10000,10004,10009,10014],{"type":43,"tag":395,"props":9946,"children":9947},{"style":1129},[9948],{"type":53,"value":9748},{"type":43,"tag":395,"props":9950,"children":9951},{"style":408},[9952],{"type":53,"value":910},{"type":43,"tag":395,"props":9954,"children":9955},{"style":408},[9956],{"type":53,"value":9886},{"type":43,"tag":395,"props":9958,"children":9959},{"style":408},[9960],{"type":53,"value":9961}," runs",{"type":43,"tag":395,"props":9963,"children":9964},{"style":408},[9965],{"type":53,"value":9966}," --backend",{"type":43,"tag":395,"props":9968,"children":9969},{"style":408},[9970],{"type":53,"value":9971}," vercel",{"type":43,"tag":395,"props":9973,"children":9974},{"style":408},[9975],{"type":53,"value":9976}," --project",{"type":43,"tag":395,"props":9978,"children":9979},{"style":402},[9980],{"type":53,"value":9840},{"type":43,"tag":395,"props":9982,"children":9983},{"style":408},[9984],{"type":53,"value":9985},"project-nam",{"type":43,"tag":395,"props":9987,"children":9988},{"style":492},[9989],{"type":53,"value":9990},"e",{"type":43,"tag":395,"props":9992,"children":9993},{"style":402},[9994],{"type":53,"value":2856},{"type":43,"tag":395,"props":9996,"children":9997},{"style":408},[9998],{"type":53,"value":9999}," --team",{"type":43,"tag":395,"props":10001,"children":10002},{"style":402},[10003],{"type":53,"value":9840},{"type":43,"tag":395,"props":10005,"children":10006},{"style":408},[10007],{"type":53,"value":10008},"team-slu",{"type":43,"tag":395,"props":10010,"children":10011},{"style":492},[10012],{"type":53,"value":10013},"g",{"type":43,"tag":395,"props":10015,"children":10016},{"style":402},[10017],{"type":53,"value":9855},{"type":43,"tag":395,"props":10019,"children":10020},{"class":397,"line":938},[10021,10025,10029,10033,10037,10041,10045,10049,10053,10057,10061,10065,10069,10073,10077,10081,10085,10089,10093,10097],{"type":43,"tag":395,"props":10022,"children":10023},{"style":1129},[10024],{"type":53,"value":9748},{"type":43,"tag":395,"props":10026,"children":10027},{"style":408},[10028],{"type":53,"value":910},{"type":43,"tag":395,"props":10030,"children":10031},{"style":408},[10032],{"type":53,"value":9886},{"type":43,"tag":395,"props":10034,"children":10035},{"style":408},[10036],{"type":53,"value":3209},{"type":43,"tag":395,"props":10038,"children":10039},{"style":402},[10040],{"type":53,"value":9840},{"type":43,"tag":395,"props":10042,"children":10043},{"style":408},[10044],{"type":53,"value":9845},{"type":43,"tag":395,"props":10046,"children":10047},{"style":492},[10048],{"type":53,"value":9850},{"type":43,"tag":395,"props":10050,"children":10051},{"style":402},[10052],{"type":53,"value":2856},{"type":43,"tag":395,"props":10054,"children":10055},{"style":408},[10056],{"type":53,"value":9966},{"type":43,"tag":395,"props":10058,"children":10059},{"style":408},[10060],{"type":53,"value":9971},{"type":43,"tag":395,"props":10062,"children":10063},{"style":408},[10064],{"type":53,"value":9976},{"type":43,"tag":395,"props":10066,"children":10067},{"style":402},[10068],{"type":53,"value":9840},{"type":43,"tag":395,"props":10070,"children":10071},{"style":408},[10072],{"type":53,"value":9985},{"type":43,"tag":395,"props":10074,"children":10075},{"style":492},[10076],{"type":53,"value":9990},{"type":43,"tag":395,"props":10078,"children":10079},{"style":402},[10080],{"type":53,"value":2856},{"type":43,"tag":395,"props":10082,"children":10083},{"style":408},[10084],{"type":53,"value":9999},{"type":43,"tag":395,"props":10086,"children":10087},{"style":402},[10088],{"type":53,"value":9840},{"type":43,"tag":395,"props":10090,"children":10091},{"style":408},[10092],{"type":53,"value":10008},{"type":43,"tag":395,"props":10094,"children":10095},{"style":492},[10096],{"type":53,"value":10013},{"type":43,"tag":395,"props":10098,"children":10099},{"style":402},[10100],{"type":53,"value":9855},{"type":43,"tag":395,"props":10102,"children":10103},{"class":397,"line":979},[10104],{"type":43,"tag":395,"props":10105,"children":10106},{"emptyLinePlaceholder":667},[10107],{"type":53,"value":670},{"type":43,"tag":395,"props":10109,"children":10110},{"class":397,"line":988},[10111],{"type":43,"tag":395,"props":10112,"children":10113},{"style":423},[10114],{"type":53,"value":10115},"# Open Vercel dashboard in browser for a specific run\n",{"type":43,"tag":395,"props":10117,"children":10118},{"class":397,"line":996},[10119,10123,10127,10131,10135,10139,10143,10147,10151],{"type":43,"tag":395,"props":10120,"children":10121},{"style":1129},[10122],{"type":53,"value":9748},{"type":43,"tag":395,"props":10124,"children":10125},{"style":408},[10126],{"type":53,"value":910},{"type":43,"tag":395,"props":10128,"children":10129},{"style":408},[10130],{"type":53,"value":9886},{"type":43,"tag":395,"props":10132,"children":10133},{"style":408},[10134],{"type":53,"value":3209},{"type":43,"tag":395,"props":10136,"children":10137},{"style":402},[10138],{"type":53,"value":9840},{"type":43,"tag":395,"props":10140,"children":10141},{"style":408},[10142],{"type":53,"value":9845},{"type":43,"tag":395,"props":10144,"children":10145},{"style":492},[10146],{"type":53,"value":9850},{"type":43,"tag":395,"props":10148,"children":10149},{"style":402},[10150],{"type":53,"value":2856},{"type":43,"tag":395,"props":10152,"children":10153},{"style":408},[10154],{"type":53,"value":10155}," --web\n",{"type":43,"tag":395,"props":10157,"children":10158},{"class":397,"line":1005},[10159,10163,10167,10171,10175,10179,10183,10187,10191,10195,10199,10203,10207,10211,10215,10219,10223,10227,10231],{"type":43,"tag":395,"props":10160,"children":10161},{"style":1129},[10162],{"type":53,"value":9748},{"type":43,"tag":395,"props":10164,"children":10165},{"style":408},[10166],{"type":53,"value":910},{"type":43,"tag":395,"props":10168,"children":10169},{"style":408},[10170],{"type":53,"value":9835},{"type":43,"tag":395,"props":10172,"children":10173},{"style":402},[10174],{"type":53,"value":9840},{"type":43,"tag":395,"props":10176,"children":10177},{"style":408},[10178],{"type":53,"value":9845},{"type":43,"tag":395,"props":10180,"children":10181},{"style":492},[10182],{"type":53,"value":9850},{"type":43,"tag":395,"props":10184,"children":10185},{"style":402},[10186],{"type":53,"value":2856},{"type":43,"tag":395,"props":10188,"children":10189},{"style":408},[10190],{"type":53,"value":9966},{"type":43,"tag":395,"props":10192,"children":10193},{"style":408},[10194],{"type":53,"value":9971},{"type":43,"tag":395,"props":10196,"children":10197},{"style":408},[10198],{"type":53,"value":9976},{"type":43,"tag":395,"props":10200,"children":10201},{"style":402},[10202],{"type":53,"value":9840},{"type":43,"tag":395,"props":10204,"children":10205},{"style":408},[10206],{"type":53,"value":9985},{"type":43,"tag":395,"props":10208,"children":10209},{"style":492},[10210],{"type":53,"value":9990},{"type":43,"tag":395,"props":10212,"children":10213},{"style":402},[10214],{"type":53,"value":2856},{"type":43,"tag":395,"props":10216,"children":10217},{"style":408},[10218],{"type":53,"value":9999},{"type":43,"tag":395,"props":10220,"children":10221},{"style":402},[10222],{"type":53,"value":9840},{"type":43,"tag":395,"props":10224,"children":10225},{"style":408},[10226],{"type":53,"value":10008},{"type":43,"tag":395,"props":10228,"children":10229},{"style":492},[10230],{"type":53,"value":10013},{"type":43,"tag":395,"props":10232,"children":10233},{"style":402},[10234],{"type":53,"value":9855},{"type":43,"tag":395,"props":10236,"children":10237},{"class":397,"line":1568},[10238],{"type":43,"tag":395,"props":10239,"children":10240},{"emptyLinePlaceholder":667},[10241],{"type":53,"value":670},{"type":43,"tag":395,"props":10243,"children":10244},{"class":397,"line":1609},[10245],{"type":43,"tag":395,"props":10246,"children":10247},{"style":423},[10248],{"type":53,"value":10249},"# Cancel a running workflow\n",{"type":43,"tag":395,"props":10251,"children":10252},{"class":397,"line":1650},[10253,10257,10261,10266,10270,10274,10278],{"type":43,"tag":395,"props":10254,"children":10255},{"style":1129},[10256],{"type":53,"value":9748},{"type":43,"tag":395,"props":10258,"children":10259},{"style":408},[10260],{"type":53,"value":910},{"type":43,"tag":395,"props":10262,"children":10263},{"style":408},[10264],{"type":53,"value":10265}," cancel",{"type":43,"tag":395,"props":10267,"children":10268},{"style":402},[10269],{"type":53,"value":9840},{"type":43,"tag":395,"props":10271,"children":10272},{"style":408},[10273],{"type":53,"value":9845},{"type":43,"tag":395,"props":10275,"children":10276},{"style":492},[10277],{"type":53,"value":9850},{"type":43,"tag":395,"props":10279,"children":10280},{"style":402},[10281],{"type":53,"value":9855},{"type":43,"tag":395,"props":10283,"children":10284},{"class":397,"line":1690},[10285,10289,10293,10297,10301,10305,10309,10313,10317,10321,10325,10329,10333,10337,10341,10345,10349,10353,10357],{"type":43,"tag":395,"props":10286,"children":10287},{"style":1129},[10288],{"type":53,"value":9748},{"type":43,"tag":395,"props":10290,"children":10291},{"style":408},[10292],{"type":53,"value":910},{"type":43,"tag":395,"props":10294,"children":10295},{"style":408},[10296],{"type":53,"value":10265},{"type":43,"tag":395,"props":10298,"children":10299},{"style":402},[10300],{"type":53,"value":9840},{"type":43,"tag":395,"props":10302,"children":10303},{"style":408},[10304],{"type":53,"value":9845},{"type":43,"tag":395,"props":10306,"children":10307},{"style":492},[10308],{"type":53,"value":9850},{"type":43,"tag":395,"props":10310,"children":10311},{"style":402},[10312],{"type":53,"value":2856},{"type":43,"tag":395,"props":10314,"children":10315},{"style":408},[10316],{"type":53,"value":9966},{"type":43,"tag":395,"props":10318,"children":10319},{"style":408},[10320],{"type":53,"value":9971},{"type":43,"tag":395,"props":10322,"children":10323},{"style":408},[10324],{"type":53,"value":9976},{"type":43,"tag":395,"props":10326,"children":10327},{"style":402},[10328],{"type":53,"value":9840},{"type":43,"tag":395,"props":10330,"children":10331},{"style":408},[10332],{"type":53,"value":9985},{"type":43,"tag":395,"props":10334,"children":10335},{"style":492},[10336],{"type":53,"value":9990},{"type":43,"tag":395,"props":10338,"children":10339},{"style":402},[10340],{"type":53,"value":2856},{"type":43,"tag":395,"props":10342,"children":10343},{"style":408},[10344],{"type":53,"value":9999},{"type":43,"tag":395,"props":10346,"children":10347},{"style":402},[10348],{"type":53,"value":9840},{"type":43,"tag":395,"props":10350,"children":10351},{"style":408},[10352],{"type":53,"value":10008},{"type":43,"tag":395,"props":10354,"children":10355},{"style":492},[10356],{"type":53,"value":10013},{"type":43,"tag":395,"props":10358,"children":10359},{"style":402},[10360],{"type":53,"value":9855},{"type":43,"tag":395,"props":10362,"children":10363},{"class":397,"line":2677},[10364],{"type":43,"tag":395,"props":10365,"children":10366},{"style":423},[10367],{"type":53,"value":10368},"# --env defaults to \"production\"; use --env preview for preview deployments\n",{"type":43,"tag":329,"props":10370,"children":10372},{"id":10371},"deep-linking-to-a-run-share-a-url-no-browser",[10373],{"type":53,"value":10374},"Deep-linking to a run (share a URL, no browser)",{"type":43,"tag":66,"props":10376,"children":10377},{},[10378,10379,10385,10387,10392,10394,10400,10402,10407],{"type":53,"value":1801},{"type":43,"tag":58,"props":10380,"children":10382},{"className":10381},[],[10383],{"type":53,"value":10384},"--url",{"type":53,"value":10386}," to ",{"type":43,"tag":119,"props":10388,"children":10389},{},[10390],{"type":53,"value":10391},"print",{"type":53,"value":10393}," the dashboard deep link and exit — no browser opens and\nno local server starts. This is the right tool when you need to hand a user a\nclickable link (PR comment, Slack message, debugging summary) rather than open a\nUI. (",{"type":43,"tag":58,"props":10395,"children":10397},{"className":10396},[],[10398],{"type":53,"value":10399},"--web",{"type":53,"value":10401}," opens the dashboard; ",{"type":43,"tag":58,"props":10403,"children":10405},{"className":10404},[],[10406],{"type":53,"value":10384},{"type":53,"value":10408}," only prints the link.)",{"type":43,"tag":384,"props":10410,"children":10412},{"className":9726,"code":10411,"language":9728,"meta":389,"style":389},"# Vercel run — prints the Vercel dashboard URL for the run\nnpx workflow inspect run \u003Crun_id> --backend vercel --project \u003Cproject> --team \u003Cteam> --url\nnpx workflow web \u003Crun_id> --backend vercel --project \u003Cproject> --team \u003Cteam> --env preview --url\n\n# Local run — prints the local web UI deep link\nnpx workflow inspect run \u003Crun_id> --url\n\n# Machine-readable: --url --json prints { \"url\": \"...\" } to stdout\nnpx workflow inspect run \u003Crun_id> --backend vercel --url --json\n",[10413],{"type":43,"tag":58,"props":10414,"children":10415},{"__ignoreMap":389},[10416,10424,10516,10609,10616,10624,10663,10670,10678],{"type":43,"tag":395,"props":10417,"children":10418},{"class":397,"line":398},[10419],{"type":43,"tag":395,"props":10420,"children":10421},{"style":423},[10422],{"type":53,"value":10423},"# Vercel run — prints the Vercel dashboard URL for the run\n",{"type":43,"tag":395,"props":10425,"children":10426},{"class":397,"line":429},[10427,10431,10435,10439,10443,10447,10451,10455,10459,10463,10467,10471,10475,10480,10485,10489,10493,10497,10502,10507,10511],{"type":43,"tag":395,"props":10428,"children":10429},{"style":1129},[10430],{"type":53,"value":9748},{"type":43,"tag":395,"props":10432,"children":10433},{"style":408},[10434],{"type":53,"value":910},{"type":43,"tag":395,"props":10436,"children":10437},{"style":408},[10438],{"type":53,"value":9886},{"type":43,"tag":395,"props":10440,"children":10441},{"style":408},[10442],{"type":53,"value":3209},{"type":43,"tag":395,"props":10444,"children":10445},{"style":402},[10446],{"type":53,"value":9840},{"type":43,"tag":395,"props":10448,"children":10449},{"style":408},[10450],{"type":53,"value":9845},{"type":43,"tag":395,"props":10452,"children":10453},{"style":492},[10454],{"type":53,"value":9850},{"type":43,"tag":395,"props":10456,"children":10457},{"style":402},[10458],{"type":53,"value":2856},{"type":43,"tag":395,"props":10460,"children":10461},{"style":408},[10462],{"type":53,"value":9966},{"type":43,"tag":395,"props":10464,"children":10465},{"style":408},[10466],{"type":53,"value":9971},{"type":43,"tag":395,"props":10468,"children":10469},{"style":408},[10470],{"type":53,"value":9976},{"type":43,"tag":395,"props":10472,"children":10473},{"style":402},[10474],{"type":53,"value":9840},{"type":43,"tag":395,"props":10476,"children":10477},{"style":408},[10478],{"type":53,"value":10479},"projec",{"type":43,"tag":395,"props":10481,"children":10482},{"style":492},[10483],{"type":53,"value":10484},"t",{"type":43,"tag":395,"props":10486,"children":10487},{"style":402},[10488],{"type":53,"value":2856},{"type":43,"tag":395,"props":10490,"children":10491},{"style":408},[10492],{"type":53,"value":9999},{"type":43,"tag":395,"props":10494,"children":10495},{"style":402},[10496],{"type":53,"value":9840},{"type":43,"tag":395,"props":10498,"children":10499},{"style":408},[10500],{"type":53,"value":10501},"tea",{"type":43,"tag":395,"props":10503,"children":10504},{"style":492},[10505],{"type":53,"value":10506},"m",{"type":43,"tag":395,"props":10508,"children":10509},{"style":402},[10510],{"type":53,"value":2856},{"type":43,"tag":395,"props":10512,"children":10513},{"style":408},[10514],{"type":53,"value":10515}," --url\n",{"type":43,"tag":395,"props":10517,"children":10518},{"class":397,"line":563},[10519,10523,10527,10531,10535,10539,10543,10547,10551,10555,10559,10563,10567,10571,10575,10579,10583,10587,10591,10595,10600,10605],{"type":43,"tag":395,"props":10520,"children":10521},{"style":1129},[10522],{"type":53,"value":9748},{"type":43,"tag":395,"props":10524,"children":10525},{"style":408},[10526],{"type":53,"value":910},{"type":43,"tag":395,"props":10528,"children":10529},{"style":408},[10530],{"type":53,"value":9835},{"type":43,"tag":395,"props":10532,"children":10533},{"style":402},[10534],{"type":53,"value":9840},{"type":43,"tag":395,"props":10536,"children":10537},{"style":408},[10538],{"type":53,"value":9845},{"type":43,"tag":395,"props":10540,"children":10541},{"style":492},[10542],{"type":53,"value":9850},{"type":43,"tag":395,"props":10544,"children":10545},{"style":402},[10546],{"type":53,"value":2856},{"type":43,"tag":395,"props":10548,"children":10549},{"style":408},[10550],{"type":53,"value":9966},{"type":43,"tag":395,"props":10552,"children":10553},{"style":408},[10554],{"type":53,"value":9971},{"type":43,"tag":395,"props":10556,"children":10557},{"style":408},[10558],{"type":53,"value":9976},{"type":43,"tag":395,"props":10560,"children":10561},{"style":402},[10562],{"type":53,"value":9840},{"type":43,"tag":395,"props":10564,"children":10565},{"style":408},[10566],{"type":53,"value":10479},{"type":43,"tag":395,"props":10568,"children":10569},{"style":492},[10570],{"type":53,"value":10484},{"type":43,"tag":395,"props":10572,"children":10573},{"style":402},[10574],{"type":53,"value":2856},{"type":43,"tag":395,"props":10576,"children":10577},{"style":408},[10578],{"type":53,"value":9999},{"type":43,"tag":395,"props":10580,"children":10581},{"style":402},[10582],{"type":53,"value":9840},{"type":43,"tag":395,"props":10584,"children":10585},{"style":408},[10586],{"type":53,"value":10501},{"type":43,"tag":395,"props":10588,"children":10589},{"style":492},[10590],{"type":53,"value":10506},{"type":43,"tag":395,"props":10592,"children":10593},{"style":402},[10594],{"type":53,"value":2856},{"type":43,"tag":395,"props":10596,"children":10597},{"style":408},[10598],{"type":53,"value":10599}," --env",{"type":43,"tag":395,"props":10601,"children":10602},{"style":408},[10603],{"type":53,"value":10604}," preview",{"type":43,"tag":395,"props":10606,"children":10607},{"style":408},[10608],{"type":53,"value":10515},{"type":43,"tag":395,"props":10610,"children":10611},{"class":397,"line":613},[10612],{"type":43,"tag":395,"props":10613,"children":10614},{"emptyLinePlaceholder":667},[10615],{"type":53,"value":670},{"type":43,"tag":395,"props":10617,"children":10618},{"class":397,"line":663},[10619],{"type":43,"tag":395,"props":10620,"children":10621},{"style":423},[10622],{"type":53,"value":10623},"# Local run — prints the local web UI deep link\n",{"type":43,"tag":395,"props":10625,"children":10626},{"class":397,"line":673},[10627,10631,10635,10639,10643,10647,10651,10655,10659],{"type":43,"tag":395,"props":10628,"children":10629},{"style":1129},[10630],{"type":53,"value":9748},{"type":43,"tag":395,"props":10632,"children":10633},{"style":408},[10634],{"type":53,"value":910},{"type":43,"tag":395,"props":10636,"children":10637},{"style":408},[10638],{"type":53,"value":9886},{"type":43,"tag":395,"props":10640,"children":10641},{"style":408},[10642],{"type":53,"value":3209},{"type":43,"tag":395,"props":10644,"children":10645},{"style":402},[10646],{"type":53,"value":9840},{"type":43,"tag":395,"props":10648,"children":10649},{"style":408},[10650],{"type":53,"value":9845},{"type":43,"tag":395,"props":10652,"children":10653},{"style":492},[10654],{"type":53,"value":9850},{"type":43,"tag":395,"props":10656,"children":10657},{"style":402},[10658],{"type":53,"value":2856},{"type":43,"tag":395,"props":10660,"children":10661},{"style":408},[10662],{"type":53,"value":10515},{"type":43,"tag":395,"props":10664,"children":10665},{"class":397,"line":682},[10666],{"type":43,"tag":395,"props":10667,"children":10668},{"emptyLinePlaceholder":667},[10669],{"type":53,"value":670},{"type":43,"tag":395,"props":10671,"children":10672},{"class":397,"line":751},[10673],{"type":43,"tag":395,"props":10674,"children":10675},{"style":423},[10676],{"type":53,"value":10677},"# Machine-readable: --url --json prints { \"url\": \"...\" } to stdout\n",{"type":43,"tag":395,"props":10679,"children":10680},{"class":397,"line":759},[10681,10685,10689,10693,10697,10701,10705,10709,10713,10717,10721,10726],{"type":43,"tag":395,"props":10682,"children":10683},{"style":1129},[10684],{"type":53,"value":9748},{"type":43,"tag":395,"props":10686,"children":10687},{"style":408},[10688],{"type":53,"value":910},{"type":43,"tag":395,"props":10690,"children":10691},{"style":408},[10692],{"type":53,"value":9886},{"type":43,"tag":395,"props":10694,"children":10695},{"style":408},[10696],{"type":53,"value":3209},{"type":43,"tag":395,"props":10698,"children":10699},{"style":402},[10700],{"type":53,"value":9840},{"type":43,"tag":395,"props":10702,"children":10703},{"style":408},[10704],{"type":53,"value":9845},{"type":43,"tag":395,"props":10706,"children":10707},{"style":492},[10708],{"type":53,"value":9850},{"type":43,"tag":395,"props":10710,"children":10711},{"style":402},[10712],{"type":53,"value":2856},{"type":43,"tag":395,"props":10714,"children":10715},{"style":408},[10716],{"type":53,"value":9966},{"type":43,"tag":395,"props":10718,"children":10719},{"style":408},[10720],{"type":53,"value":9971},{"type":43,"tag":395,"props":10722,"children":10723},{"style":408},[10724],{"type":53,"value":10725}," --url",{"type":43,"tag":395,"props":10727,"children":10728},{"style":408},[10729],{"type":53,"value":10730}," --json\n",{"type":43,"tag":66,"props":10732,"children":10733},{},[10734],{"type":53,"value":10735},"URL formats produced:",{"type":43,"tag":159,"props":10737,"children":10738},{},[10739,10780],{"type":43,"tag":115,"props":10740,"children":10741},{},[10742,10747,10748,10754,10756,10762,10764,10770,10772,10778],{"type":43,"tag":119,"props":10743,"children":10744},{},[10745],{"type":53,"value":10746},"Vercel:",{"type":53,"value":1995},{"type":43,"tag":58,"props":10749,"children":10751},{"className":10750},[],[10752],{"type":53,"value":10753},"https:\u002F\u002Fvercel.com\u002F\u003Cteam-slug>\u002F\u003Cproject-slug>\u002Fworkflows\u002Fruns\u002F\u003Crun_id>?environment=\u003Cproduction|preview>",{"type":53,"value":10755},"\n(",{"type":43,"tag":58,"props":10757,"children":10759},{"className":10758},[],[10760],{"type":53,"value":10761},"--env",{"type":53,"value":10763}," selects the environment; defaults to ",{"type":43,"tag":58,"props":10765,"children":10767},{"className":10766},[],[10768],{"type":53,"value":10769},"production",{"type":53,"value":10771},". Resolving the team\nslug requires being logged in via ",{"type":43,"tag":58,"props":10773,"children":10775},{"className":10774},[],[10776],{"type":53,"value":10777},"vercel login",{"type":53,"value":10779}," with the project linked.)",{"type":43,"tag":115,"props":10781,"children":10782},{},[10783,10788,10789,10795,10797,10803,10805,10811],{"type":43,"tag":119,"props":10784,"children":10785},{},[10786],{"type":53,"value":10787},"Local:",{"type":53,"value":1995},{"type":43,"tag":58,"props":10790,"children":10792},{"className":10791},[],[10793],{"type":53,"value":10794},"http:\u002F\u002Flocalhost:\u003Cport>?resource=run&id=\u003Crun_id>",{"type":53,"value":10796}," (port defaults\nto ",{"type":43,"tag":58,"props":10798,"children":10800},{"className":10799},[],[10801],{"type":53,"value":10802},"3456",{"type":53,"value":10804},"; the link works while the ",{"type":43,"tag":58,"props":10806,"children":10808},{"className":10807},[],[10809],{"type":53,"value":10810},"npx workflow web",{"type":53,"value":10812}," server is running).",{"type":43,"tag":66,"props":10814,"children":10815},{},[10816,10818,10823,10825,10831],{"type":53,"value":10817},"stdout contains ",{"type":43,"tag":119,"props":10819,"children":10820},{},[10821],{"type":53,"value":10822},"only",{"type":53,"value":10824}," the URL (or the JSON object) — all other output goes to\nstderr — so you can capture it directly, e.g. ",{"type":43,"tag":58,"props":10826,"children":10828},{"className":10827},[],[10829],{"type":53,"value":10830},"URL=$(npx workflow web \u003Crun_id> --backend vercel --url)",{"type":53,"value":1243},{"type":43,"tag":66,"props":10833,"children":10834},{},[10835],{"type":43,"tag":119,"props":10836,"children":10837},{},[10838],{"type":53,"value":10839},"Debugging tips:",{"type":43,"tag":159,"props":10841,"children":10842},{},[10843,10861,10879,10891],{"type":43,"tag":115,"props":10844,"children":10845},{},[10846,10847,10852,10853,10859],{"type":53,"value":1801},{"type":43,"tag":58,"props":10848,"children":10850},{"className":10849},[],[10851],{"type":53,"value":6109},{"type":53,"value":4398},{"type":43,"tag":58,"props":10854,"children":10856},{"className":10855},[],[10857],{"type":53,"value":10858},"-j",{"type":53,"value":10860},") on any command for machine-readable output",{"type":43,"tag":115,"props":10862,"children":10863},{},[10864,10865,10870,10872,10877],{"type":53,"value":1801},{"type":43,"tag":58,"props":10866,"children":10868},{"className":10867},[],[10869],{"type":53,"value":10399},{"type":53,"value":10871}," to open the Vercel Observability dashboard in your browser, or ",{"type":43,"tag":58,"props":10873,"children":10875},{"className":10874},[],[10876],{"type":53,"value":10384},{"type":53,"value":10878}," to just print the deep link",{"type":43,"tag":115,"props":10880,"children":10881},{},[10882,10883,10889],{"type":53,"value":1801},{"type":43,"tag":58,"props":10884,"children":10886},{"className":10885},[],[10887],{"type":53,"value":10888},"--help",{"type":53,"value":10890}," on any command for full usage details",{"type":43,"tag":115,"props":10892,"children":10893},{},[10894],{"type":53,"value":10895},"Only import workflow APIs you actually use. Unused imports can cause 500 errors.",{"type":43,"tag":44,"props":10897,"children":10899},{"id":10898},"testing-workflows",[10900],{"type":53,"value":10901},"Testing Workflows",{"type":43,"tag":66,"props":10903,"children":10904},{},[10905],{"type":53,"value":10906},"Workflow SDK provides a Vitest plugin for testing workflows in-process — no running server required.",{"type":43,"tag":66,"props":10908,"children":10909},{},[10910,10915,10917,10922],{"type":43,"tag":119,"props":10911,"children":10912},{},[10913],{"type":53,"value":10914},"Unit testing steps:",{"type":53,"value":10916}," Steps are just functions; without the compiler, ",{"type":43,"tag":58,"props":10918,"children":10920},{"className":10919},[],[10921],{"type":53,"value":1067},{"type":53,"value":10923}," is a no-op. Test them directly:",{"type":43,"tag":384,"props":10925,"children":10927},{"className":386,"code":10926,"language":388,"meta":389,"style":389},"import { describe, it, expect } from \"vitest\";\nimport { createUser } from \".\u002Fuser-signup\";\n\ndescribe(\"createUser step\", () => {\n  it(\"should create a user\", async () => {\n    const user = await createUser(\"test@example.com\");\n    expect(user.email).toBe(\"test@example.com\");\n  });\n});\n",[10928],{"type":43,"tag":58,"props":10929,"children":10930},{"__ignoreMap":389},[10931,10990,11031,11038,11081,11126,11176,11238,11253],{"type":43,"tag":395,"props":10932,"children":10933},{"class":397,"line":398},[10934,10938,10942,10947,10951,10956,10960,10965,10969,10973,10977,10982,10986],{"type":43,"tag":395,"props":10935,"children":10936},{"style":481},[10937],{"type":53,"value":484},{"type":43,"tag":395,"props":10939,"children":10940},{"style":402},[10941],{"type":53,"value":489},{"type":43,"tag":395,"props":10943,"children":10944},{"style":492},[10945],{"type":53,"value":10946}," describe",{"type":43,"tag":395,"props":10948,"children":10949},{"style":402},[10950],{"type":53,"value":500},{"type":43,"tag":395,"props":10952,"children":10953},{"style":492},[10954],{"type":53,"value":10955}," it",{"type":43,"tag":395,"props":10957,"children":10958},{"style":402},[10959],{"type":53,"value":500},{"type":43,"tag":395,"props":10961,"children":10962},{"style":492},[10963],{"type":53,"value":10964}," expect",{"type":43,"tag":395,"props":10966,"children":10967},{"style":402},[10968],{"type":53,"value":537},{"type":43,"tag":395,"props":10970,"children":10971},{"style":481},[10972],{"type":53,"value":542},{"type":43,"tag":395,"props":10974,"children":10975},{"style":402},[10976],{"type":53,"value":547},{"type":43,"tag":395,"props":10978,"children":10979},{"style":408},[10980],{"type":53,"value":10981},"vitest",{"type":43,"tag":395,"props":10983,"children":10984},{"style":402},[10985],{"type":53,"value":405},{"type":43,"tag":395,"props":10987,"children":10988},{"style":402},[10989],{"type":53,"value":560},{"type":43,"tag":395,"props":10991,"children":10992},{"class":397,"line":429},[10993,10997,11001,11006,11010,11014,11018,11023,11027],{"type":43,"tag":395,"props":10994,"children":10995},{"style":481},[10996],{"type":53,"value":484},{"type":43,"tag":395,"props":10998,"children":10999},{"style":402},[11000],{"type":53,"value":489},{"type":43,"tag":395,"props":11002,"children":11003},{"style":492},[11004],{"type":53,"value":11005}," createUser",{"type":43,"tag":395,"props":11007,"children":11008},{"style":402},[11009],{"type":53,"value":537},{"type":43,"tag":395,"props":11011,"children":11012},{"style":481},[11013],{"type":53,"value":542},{"type":43,"tag":395,"props":11015,"children":11016},{"style":402},[11017],{"type":53,"value":547},{"type":43,"tag":395,"props":11019,"children":11020},{"style":408},[11021],{"type":53,"value":11022},".\u002Fuser-signup",{"type":43,"tag":395,"props":11024,"children":11025},{"style":402},[11026],{"type":53,"value":405},{"type":43,"tag":395,"props":11028,"children":11029},{"style":402},[11030],{"type":53,"value":560},{"type":43,"tag":395,"props":11032,"children":11033},{"class":397,"line":563},[11034],{"type":43,"tag":395,"props":11035,"children":11036},{"emptyLinePlaceholder":667},[11037],{"type":53,"value":670},{"type":43,"tag":395,"props":11039,"children":11040},{"class":397,"line":613},[11041,11046,11050,11054,11059,11063,11067,11072,11077],{"type":43,"tag":395,"props":11042,"children":11043},{"style":1108},[11044],{"type":53,"value":11045},"describe",{"type":43,"tag":395,"props":11047,"children":11048},{"style":492},[11049],{"type":53,"value":1116},{"type":43,"tag":395,"props":11051,"children":11052},{"style":402},[11053],{"type":53,"value":405},{"type":43,"tag":395,"props":11055,"children":11056},{"style":408},[11057],{"type":53,"value":11058},"createUser step",{"type":43,"tag":395,"props":11060,"children":11061},{"style":402},[11062],{"type":53,"value":405},{"type":43,"tag":395,"props":11064,"children":11065},{"style":402},[11066],{"type":53,"value":500},{"type":43,"tag":395,"props":11068,"children":11069},{"style":402},[11070],{"type":53,"value":11071}," ()",{"type":43,"tag":395,"props":11073,"children":11074},{"style":1097},[11075],{"type":53,"value":11076}," =>",{"type":43,"tag":395,"props":11078,"children":11079},{"style":402},[11080],{"type":53,"value":1142},{"type":43,"tag":395,"props":11082,"children":11083},{"class":397,"line":663},[11084,11089,11093,11097,11102,11106,11110,11114,11118,11122],{"type":43,"tag":395,"props":11085,"children":11086},{"style":1108},[11087],{"type":53,"value":11088},"  it",{"type":43,"tag":395,"props":11090,"children":11091},{"style":1192},[11092],{"type":53,"value":1116},{"type":43,"tag":395,"props":11094,"children":11095},{"style":402},[11096],{"type":53,"value":405},{"type":43,"tag":395,"props":11098,"children":11099},{"style":408},[11100],{"type":53,"value":11101},"should create a user",{"type":43,"tag":395,"props":11103,"children":11104},{"style":402},[11105],{"type":53,"value":405},{"type":43,"tag":395,"props":11107,"children":11108},{"style":402},[11109],{"type":53,"value":500},{"type":43,"tag":395,"props":11111,"children":11112},{"style":1097},[11113],{"type":53,"value":1513},{"type":43,"tag":395,"props":11115,"children":11116},{"style":402},[11117],{"type":53,"value":11071},{"type":43,"tag":395,"props":11119,"children":11120},{"style":1097},[11121],{"type":53,"value":11076},{"type":43,"tag":395,"props":11123,"children":11124},{"style":402},[11125],{"type":53,"value":1142},{"type":43,"tag":395,"props":11127,"children":11128},{"class":397,"line":673},[11129,11134,11139,11143,11147,11151,11155,11159,11164,11168,11172],{"type":43,"tag":395,"props":11130,"children":11131},{"style":1097},[11132],{"type":53,"value":11133},"    const",{"type":43,"tag":395,"props":11135,"children":11136},{"style":492},[11137],{"type":53,"value":11138}," user",{"type":43,"tag":395,"props":11140,"children":11141},{"style":402},[11142],{"type":53,"value":1180},{"type":43,"tag":395,"props":11144,"children":11145},{"style":481},[11146],{"type":53,"value":1185},{"type":43,"tag":395,"props":11148,"children":11149},{"style":1108},[11150],{"type":53,"value":11005},{"type":43,"tag":395,"props":11152,"children":11153},{"style":1192},[11154],{"type":53,"value":1116},{"type":43,"tag":395,"props":11156,"children":11157},{"style":402},[11158],{"type":53,"value":405},{"type":43,"tag":395,"props":11160,"children":11161},{"style":408},[11162],{"type":53,"value":11163},"test@example.com",{"type":43,"tag":395,"props":11165,"children":11166},{"style":402},[11167],{"type":53,"value":405},{"type":43,"tag":395,"props":11169,"children":11170},{"style":1192},[11171],{"type":53,"value":1137},{"type":43,"tag":395,"props":11173,"children":11174},{"style":402},[11175],{"type":53,"value":560},{"type":43,"tag":395,"props":11177,"children":11178},{"class":397,"line":682},[11179,11184,11188,11192,11196,11201,11205,11209,11214,11218,11222,11226,11230,11234],{"type":43,"tag":395,"props":11180,"children":11181},{"style":1108},[11182],{"type":53,"value":11183},"    expect",{"type":43,"tag":395,"props":11185,"children":11186},{"style":1192},[11187],{"type":53,"value":1116},{"type":43,"tag":395,"props":11189,"children":11190},{"style":492},[11191],{"type":53,"value":2789},{"type":43,"tag":395,"props":11193,"children":11194},{"style":402},[11195],{"type":53,"value":1243},{"type":43,"tag":395,"props":11197,"children":11198},{"style":492},[11199],{"type":53,"value":11200},"email",{"type":43,"tag":395,"props":11202,"children":11203},{"style":1192},[11204],{"type":53,"value":1137},{"type":43,"tag":395,"props":11206,"children":11207},{"style":402},[11208],{"type":53,"value":1243},{"type":43,"tag":395,"props":11210,"children":11211},{"style":1108},[11212],{"type":53,"value":11213},"toBe",{"type":43,"tag":395,"props":11215,"children":11216},{"style":1192},[11217],{"type":53,"value":1116},{"type":43,"tag":395,"props":11219,"children":11220},{"style":402},[11221],{"type":53,"value":405},{"type":43,"tag":395,"props":11223,"children":11224},{"style":408},[11225],{"type":53,"value":11163},{"type":43,"tag":395,"props":11227,"children":11228},{"style":402},[11229],{"type":53,"value":405},{"type":43,"tag":395,"props":11231,"children":11232},{"style":1192},[11233],{"type":53,"value":1137},{"type":43,"tag":395,"props":11235,"children":11236},{"style":402},[11237],{"type":53,"value":560},{"type":43,"tag":395,"props":11239,"children":11240},{"class":397,"line":751},[11241,11245,11249],{"type":43,"tag":395,"props":11242,"children":11243},{"style":402},[11244],{"type":53,"value":1470},{"type":43,"tag":395,"props":11246,"children":11247},{"style":1192},[11248],{"type":53,"value":1137},{"type":43,"tag":395,"props":11250,"children":11251},{"style":402},[11252],{"type":53,"value":560},{"type":43,"tag":395,"props":11254,"children":11255},{"class":397,"line":759},[11256,11260,11264],{"type":43,"tag":395,"props":11257,"children":11258},{"style":402},[11259],{"type":53,"value":2326},{"type":43,"tag":395,"props":11261,"children":11262},{"style":492},[11263],{"type":53,"value":1137},{"type":43,"tag":395,"props":11265,"children":11266},{"style":402},[11267],{"type":53,"value":560},{"type":43,"tag":66,"props":11269,"children":11270},{},[11271,11276,11278,11284,11286,11291],{"type":43,"tag":119,"props":11272,"children":11273},{},[11274],{"type":53,"value":11275},"Integration testing:",{"type":53,"value":11277}," Use ",{"type":43,"tag":58,"props":11279,"children":11281},{"className":11280},[],[11282],{"type":53,"value":11283},"@workflow\u002Fvitest",{"type":53,"value":11285}," for workflows using ",{"type":43,"tag":58,"props":11287,"children":11289},{"className":11288},[],[11290],{"type":53,"value":3001},{"type":53,"value":11292},", hooks, webhooks, or retries:",{"type":43,"tag":384,"props":11294,"children":11296},{"className":386,"code":11295,"language":388,"meta":389,"style":389},"\u002F\u002F vitest.integration.config.ts\nimport { defineConfig } from \"vitest\u002Fconfig\";\nimport { workflow } from \"@workflow\u002Fvitest\";\n\nexport default defineConfig({\n  plugins: [workflow()],\n  test: {\n    include: [\"**\u002F*.integration.test.ts\"],\n    testTimeout: 60_000,\n  },\n});\n",[11297],{"type":43,"tag":58,"props":11298,"children":11299},{"__ignoreMap":389},[11300,11308,11349,11388,11395,11419,11448,11464,11501,11522,11530],{"type":43,"tag":395,"props":11301,"children":11302},{"class":397,"line":398},[11303],{"type":43,"tag":395,"props":11304,"children":11305},{"style":423},[11306],{"type":53,"value":11307},"\u002F\u002F vitest.integration.config.ts\n",{"type":43,"tag":395,"props":11309,"children":11310},{"class":397,"line":429},[11311,11315,11319,11324,11328,11332,11336,11341,11345],{"type":43,"tag":395,"props":11312,"children":11313},{"style":481},[11314],{"type":53,"value":484},{"type":43,"tag":395,"props":11316,"children":11317},{"style":402},[11318],{"type":53,"value":489},{"type":43,"tag":395,"props":11320,"children":11321},{"style":492},[11322],{"type":53,"value":11323}," defineConfig",{"type":43,"tag":395,"props":11325,"children":11326},{"style":402},[11327],{"type":53,"value":537},{"type":43,"tag":395,"props":11329,"children":11330},{"style":481},[11331],{"type":53,"value":542},{"type":43,"tag":395,"props":11333,"children":11334},{"style":402},[11335],{"type":53,"value":547},{"type":43,"tag":395,"props":11337,"children":11338},{"style":408},[11339],{"type":53,"value":11340},"vitest\u002Fconfig",{"type":43,"tag":395,"props":11342,"children":11343},{"style":402},[11344],{"type":53,"value":405},{"type":43,"tag":395,"props":11346,"children":11347},{"style":402},[11348],{"type":53,"value":560},{"type":43,"tag":395,"props":11350,"children":11351},{"class":397,"line":563},[11352,11356,11360,11364,11368,11372,11376,11380,11384],{"type":43,"tag":395,"props":11353,"children":11354},{"style":481},[11355],{"type":53,"value":484},{"type":43,"tag":395,"props":11357,"children":11358},{"style":402},[11359],{"type":53,"value":489},{"type":43,"tag":395,"props":11361,"children":11362},{"style":492},[11363],{"type":53,"value":910},{"type":43,"tag":395,"props":11365,"children":11366},{"style":402},[11367],{"type":53,"value":537},{"type":43,"tag":395,"props":11369,"children":11370},{"style":481},[11371],{"type":53,"value":542},{"type":43,"tag":395,"props":11373,"children":11374},{"style":402},[11375],{"type":53,"value":547},{"type":43,"tag":395,"props":11377,"children":11378},{"style":408},[11379],{"type":53,"value":11283},{"type":43,"tag":395,"props":11381,"children":11382},{"style":402},[11383],{"type":53,"value":405},{"type":43,"tag":395,"props":11385,"children":11386},{"style":402},[11387],{"type":53,"value":560},{"type":43,"tag":395,"props":11389,"children":11390},{"class":397,"line":613},[11391],{"type":43,"tag":395,"props":11392,"children":11393},{"emptyLinePlaceholder":667},[11394],{"type":53,"value":670},{"type":43,"tag":395,"props":11396,"children":11397},{"class":397,"line":663},[11398,11402,11407,11411,11415],{"type":43,"tag":395,"props":11399,"children":11400},{"style":481},[11401],{"type":53,"value":1508},{"type":43,"tag":395,"props":11403,"children":11404},{"style":481},[11405],{"type":53,"value":11406}," default",{"type":43,"tag":395,"props":11408,"children":11409},{"style":1108},[11410],{"type":53,"value":11323},{"type":43,"tag":395,"props":11412,"children":11413},{"style":492},[11414],{"type":53,"value":1116},{"type":43,"tag":395,"props":11416,"children":11417},{"style":402},[11418],{"type":53,"value":1366},{"type":43,"tag":395,"props":11420,"children":11421},{"class":397,"line":673},[11422,11427,11431,11435,11439,11444],{"type":43,"tag":395,"props":11423,"children":11424},{"style":1192},[11425],{"type":53,"value":11426},"  plugins",{"type":43,"tag":395,"props":11428,"children":11429},{"style":402},[11430],{"type":53,"value":109},{"type":43,"tag":395,"props":11432,"children":11433},{"style":492},[11434],{"type":53,"value":2767},{"type":43,"tag":395,"props":11436,"children":11437},{"style":1108},[11438],{"type":53,"value":4},{"type":43,"tag":395,"props":11440,"children":11441},{"style":492},[11442],{"type":53,"value":11443},"()]",{"type":43,"tag":395,"props":11445,"children":11446},{"style":402},[11447],{"type":53,"value":1409},{"type":43,"tag":395,"props":11449,"children":11450},{"class":397,"line":682},[11451,11456,11460],{"type":43,"tag":395,"props":11452,"children":11453},{"style":1192},[11454],{"type":53,"value":11455},"  test",{"type":43,"tag":395,"props":11457,"children":11458},{"style":402},[11459],{"type":53,"value":109},{"type":43,"tag":395,"props":11461,"children":11462},{"style":402},[11463],{"type":53,"value":1142},{"type":43,"tag":395,"props":11465,"children":11466},{"class":397,"line":751},[11467,11472,11476,11480,11484,11489,11493,11497],{"type":43,"tag":395,"props":11468,"children":11469},{"style":1192},[11470],{"type":53,"value":11471},"    include",{"type":43,"tag":395,"props":11473,"children":11474},{"style":402},[11475],{"type":53,"value":109},{"type":43,"tag":395,"props":11477,"children":11478},{"style":492},[11479],{"type":53,"value":2767},{"type":43,"tag":395,"props":11481,"children":11482},{"style":402},[11483],{"type":53,"value":405},{"type":43,"tag":395,"props":11485,"children":11486},{"style":408},[11487],{"type":53,"value":11488},"**\u002F*.integration.test.ts",{"type":43,"tag":395,"props":11490,"children":11491},{"style":402},[11492],{"type":53,"value":405},{"type":43,"tag":395,"props":11494,"children":11495},{"style":492},[11496],{"type":53,"value":2820},{"type":43,"tag":395,"props":11498,"children":11499},{"style":402},[11500],{"type":53,"value":1409},{"type":43,"tag":395,"props":11502,"children":11503},{"class":397,"line":759},[11504,11509,11513,11518],{"type":43,"tag":395,"props":11505,"children":11506},{"style":1192},[11507],{"type":53,"value":11508},"    testTimeout",{"type":43,"tag":395,"props":11510,"children":11511},{"style":402},[11512],{"type":53,"value":109},{"type":43,"tag":395,"props":11514,"children":11515},{"style":2880},[11516],{"type":53,"value":11517}," 60_000",{"type":43,"tag":395,"props":11519,"children":11520},{"style":402},[11521],{"type":53,"value":1409},{"type":43,"tag":395,"props":11523,"children":11524},{"class":397,"line":768},[11525],{"type":43,"tag":395,"props":11526,"children":11527},{"style":402},[11528],{"type":53,"value":11529},"  },\n",{"type":43,"tag":395,"props":11531,"children":11532},{"class":397,"line":837},[11533,11537,11541],{"type":43,"tag":395,"props":11534,"children":11535},{"style":402},[11536],{"type":53,"value":2326},{"type":43,"tag":395,"props":11538,"children":11539},{"style":492},[11540],{"type":53,"value":1137},{"type":43,"tag":395,"props":11542,"children":11543},{"style":402},[11544],{"type":53,"value":560},{"type":43,"tag":384,"props":11546,"children":11548},{"className":386,"code":11547,"language":388,"meta":389,"style":389},"\u002F\u002F approval.integration.test.ts\nimport { describe, it, expect } from \"vitest\";\nimport { start, getRun, resumeHook } from \"workflow\u002Fapi\";\nimport { waitForHook, waitForSleep } from \"@workflow\u002Fvitest\";\nimport { approvalWorkflow } from \".\u002Fapproval\";\n\ndescribe(\"approvalWorkflow\", () => {\n  it(\"should publish when approved\", async () => {\n    const run = await start(approvalWorkflow, [\"doc-123\"]);\n\n    \u002F\u002F Wait for the hook, then resume it\n    await waitForHook(run, { token: \"approval:doc-123\" });\n    await resumeHook(\"approval:doc-123\", { approved: true, reviewer: \"alice\" });\n\n    \u002F\u002F Wait for sleep, then wake it up\n    const sleepId = await waitForSleep(run);\n    await getRun(run.runId).wakeUp({ correlationIds: [sleepId] });\n\n    const result = await run.returnValue;\n    expect(result).toEqual({ status: \"published\", reviewer: \"alice\" });\n  });\n});\n",[11549],{"type":43,"tag":58,"props":11550,"children":11551},{"__ignoreMap":389},[11552,11560,11615,11670,11719,11759,11766,11806,11850,11910,11917,11925,11986,12071,12078,12086,12126,12209,12216,12252,12346,12361],{"type":43,"tag":395,"props":11553,"children":11554},{"class":397,"line":398},[11555],{"type":43,"tag":395,"props":11556,"children":11557},{"style":423},[11558],{"type":53,"value":11559},"\u002F\u002F approval.integration.test.ts\n",{"type":43,"tag":395,"props":11561,"children":11562},{"class":397,"line":429},[11563,11567,11571,11575,11579,11583,11587,11591,11595,11599,11603,11607,11611],{"type":43,"tag":395,"props":11564,"children":11565},{"style":481},[11566],{"type":53,"value":484},{"type":43,"tag":395,"props":11568,"children":11569},{"style":402},[11570],{"type":53,"value":489},{"type":43,"tag":395,"props":11572,"children":11573},{"style":492},[11574],{"type":53,"value":10946},{"type":43,"tag":395,"props":11576,"children":11577},{"style":402},[11578],{"type":53,"value":500},{"type":43,"tag":395,"props":11580,"children":11581},{"style":492},[11582],{"type":53,"value":10955},{"type":43,"tag":395,"props":11584,"children":11585},{"style":402},[11586],{"type":53,"value":500},{"type":43,"tag":395,"props":11588,"children":11589},{"style":492},[11590],{"type":53,"value":10964},{"type":43,"tag":395,"props":11592,"children":11593},{"style":402},[11594],{"type":53,"value":537},{"type":43,"tag":395,"props":11596,"children":11597},{"style":481},[11598],{"type":53,"value":542},{"type":43,"tag":395,"props":11600,"children":11601},{"style":402},[11602],{"type":53,"value":547},{"type":43,"tag":395,"props":11604,"children":11605},{"style":408},[11606],{"type":53,"value":10981},{"type":43,"tag":395,"props":11608,"children":11609},{"style":402},[11610],{"type":53,"value":405},{"type":43,"tag":395,"props":11612,"children":11613},{"style":402},[11614],{"type":53,"value":560},{"type":43,"tag":395,"props":11616,"children":11617},{"class":397,"line":563},[11618,11622,11626,11630,11634,11638,11642,11646,11650,11654,11658,11662,11666],{"type":43,"tag":395,"props":11619,"children":11620},{"style":481},[11621],{"type":53,"value":484},{"type":43,"tag":395,"props":11623,"children":11624},{"style":402},[11625],{"type":53,"value":489},{"type":43,"tag":395,"props":11627,"children":11628},{"style":492},[11629],{"type":53,"value":696},{"type":43,"tag":395,"props":11631,"children":11632},{"style":402},[11633],{"type":53,"value":500},{"type":43,"tag":395,"props":11635,"children":11636},{"style":492},[11637],{"type":53,"value":705},{"type":43,"tag":395,"props":11639,"children":11640},{"style":402},[11641],{"type":53,"value":500},{"type":43,"tag":395,"props":11643,"children":11644},{"style":492},[11645],{"type":53,"value":714},{"type":43,"tag":395,"props":11647,"children":11648},{"style":402},[11649],{"type":53,"value":537},{"type":43,"tag":395,"props":11651,"children":11652},{"style":481},[11653],{"type":53,"value":542},{"type":43,"tag":395,"props":11655,"children":11656},{"style":402},[11657],{"type":53,"value":547},{"type":43,"tag":395,"props":11659,"children":11660},{"style":408},[11661],{"type":53,"value":740},{"type":43,"tag":395,"props":11663,"children":11664},{"style":402},[11665],{"type":53,"value":405},{"type":43,"tag":395,"props":11667,"children":11668},{"style":402},[11669],{"type":53,"value":560},{"type":43,"tag":395,"props":11671,"children":11672},{"class":397,"line":613},[11673,11677,11681,11686,11690,11695,11699,11703,11707,11711,11715],{"type":43,"tag":395,"props":11674,"children":11675},{"style":481},[11676],{"type":53,"value":484},{"type":43,"tag":395,"props":11678,"children":11679},{"style":402},[11680],{"type":53,"value":489},{"type":43,"tag":395,"props":11682,"children":11683},{"style":492},[11684],{"type":53,"value":11685}," waitForHook",{"type":43,"tag":395,"props":11687,"children":11688},{"style":402},[11689],{"type":53,"value":500},{"type":43,"tag":395,"props":11691,"children":11692},{"style":492},[11693],{"type":53,"value":11694}," waitForSleep",{"type":43,"tag":395,"props":11696,"children":11697},{"style":402},[11698],{"type":53,"value":537},{"type":43,"tag":395,"props":11700,"children":11701},{"style":481},[11702],{"type":53,"value":542},{"type":43,"tag":395,"props":11704,"children":11705},{"style":402},[11706],{"type":53,"value":547},{"type":43,"tag":395,"props":11708,"children":11709},{"style":408},[11710],{"type":53,"value":11283},{"type":43,"tag":395,"props":11712,"children":11713},{"style":402},[11714],{"type":53,"value":405},{"type":43,"tag":395,"props":11716,"children":11717},{"style":402},[11718],{"type":53,"value":560},{"type":43,"tag":395,"props":11720,"children":11721},{"class":397,"line":663},[11722,11726,11730,11734,11738,11742,11746,11751,11755],{"type":43,"tag":395,"props":11723,"children":11724},{"style":481},[11725],{"type":53,"value":484},{"type":43,"tag":395,"props":11727,"children":11728},{"style":402},[11729],{"type":53,"value":489},{"type":43,"tag":395,"props":11731,"children":11732},{"style":492},[11733],{"type":53,"value":3901},{"type":43,"tag":395,"props":11735,"children":11736},{"style":402},[11737],{"type":53,"value":537},{"type":43,"tag":395,"props":11739,"children":11740},{"style":481},[11741],{"type":53,"value":542},{"type":43,"tag":395,"props":11743,"children":11744},{"style":402},[11745],{"type":53,"value":547},{"type":43,"tag":395,"props":11747,"children":11748},{"style":408},[11749],{"type":53,"value":11750},".\u002Fapproval",{"type":43,"tag":395,"props":11752,"children":11753},{"style":402},[11754],{"type":53,"value":405},{"type":43,"tag":395,"props":11756,"children":11757},{"style":402},[11758],{"type":53,"value":560},{"type":43,"tag":395,"props":11760,"children":11761},{"class":397,"line":673},[11762],{"type":43,"tag":395,"props":11763,"children":11764},{"emptyLinePlaceholder":667},[11765],{"type":53,"value":670},{"type":43,"tag":395,"props":11767,"children":11768},{"class":397,"line":682},[11769,11773,11777,11781,11786,11790,11794,11798,11802],{"type":43,"tag":395,"props":11770,"children":11771},{"style":1108},[11772],{"type":53,"value":11045},{"type":43,"tag":395,"props":11774,"children":11775},{"style":492},[11776],{"type":53,"value":1116},{"type":43,"tag":395,"props":11778,"children":11779},{"style":402},[11780],{"type":53,"value":405},{"type":43,"tag":395,"props":11782,"children":11783},{"style":408},[11784],{"type":53,"value":11785},"approvalWorkflow",{"type":43,"tag":395,"props":11787,"children":11788},{"style":402},[11789],{"type":53,"value":405},{"type":43,"tag":395,"props":11791,"children":11792},{"style":402},[11793],{"type":53,"value":500},{"type":43,"tag":395,"props":11795,"children":11796},{"style":402},[11797],{"type":53,"value":11071},{"type":43,"tag":395,"props":11799,"children":11800},{"style":1097},[11801],{"type":53,"value":11076},{"type":43,"tag":395,"props":11803,"children":11804},{"style":402},[11805],{"type":53,"value":1142},{"type":43,"tag":395,"props":11807,"children":11808},{"class":397,"line":751},[11809,11813,11817,11821,11826,11830,11834,11838,11842,11846],{"type":43,"tag":395,"props":11810,"children":11811},{"style":1108},[11812],{"type":53,"value":11088},{"type":43,"tag":395,"props":11814,"children":11815},{"style":1192},[11816],{"type":53,"value":1116},{"type":43,"tag":395,"props":11818,"children":11819},{"style":402},[11820],{"type":53,"value":405},{"type":43,"tag":395,"props":11822,"children":11823},{"style":408},[11824],{"type":53,"value":11825},"should publish when approved",{"type":43,"tag":395,"props":11827,"children":11828},{"style":402},[11829],{"type":53,"value":405},{"type":43,"tag":395,"props":11831,"children":11832},{"style":402},[11833],{"type":53,"value":500},{"type":43,"tag":395,"props":11835,"children":11836},{"style":1097},[11837],{"type":53,"value":1513},{"type":43,"tag":395,"props":11839,"children":11840},{"style":402},[11841],{"type":53,"value":11071},{"type":43,"tag":395,"props":11843,"children":11844},{"style":1097},[11845],{"type":53,"value":11076},{"type":43,"tag":395,"props":11847,"children":11848},{"style":402},[11849],{"type":53,"value":1142},{"type":43,"tag":395,"props":11851,"children":11852},{"class":397,"line":759},[11853,11857,11861,11865,11869,11873,11877,11881,11885,11889,11893,11898,11902,11906],{"type":43,"tag":395,"props":11854,"children":11855},{"style":1097},[11856],{"type":53,"value":11133},{"type":43,"tag":395,"props":11858,"children":11859},{"style":492},[11860],{"type":53,"value":3209},{"type":43,"tag":395,"props":11862,"children":11863},{"style":402},[11864],{"type":53,"value":1180},{"type":43,"tag":395,"props":11866,"children":11867},{"style":481},[11868],{"type":53,"value":1185},{"type":43,"tag":395,"props":11870,"children":11871},{"style":1108},[11872],{"type":53,"value":696},{"type":43,"tag":395,"props":11874,"children":11875},{"style":1192},[11876],{"type":53,"value":1116},{"type":43,"tag":395,"props":11878,"children":11879},{"style":492},[11880],{"type":53,"value":11785},{"type":43,"tag":395,"props":11882,"children":11883},{"style":402},[11884],{"type":53,"value":500},{"type":43,"tag":395,"props":11886,"children":11887},{"style":1192},[11888],{"type":53,"value":2767},{"type":43,"tag":395,"props":11890,"children":11891},{"style":402},[11892],{"type":53,"value":405},{"type":43,"tag":395,"props":11894,"children":11895},{"style":408},[11896],{"type":53,"value":11897},"doc-123",{"type":43,"tag":395,"props":11899,"children":11900},{"style":402},[11901],{"type":53,"value":405},{"type":43,"tag":395,"props":11903,"children":11904},{"style":1192},[11905],{"type":53,"value":3257},{"type":43,"tag":395,"props":11907,"children":11908},{"style":402},[11909],{"type":53,"value":560},{"type":43,"tag":395,"props":11911,"children":11912},{"class":397,"line":768},[11913],{"type":43,"tag":395,"props":11914,"children":11915},{"emptyLinePlaceholder":667},[11916],{"type":53,"value":670},{"type":43,"tag":395,"props":11918,"children":11919},{"class":397,"line":837},[11920],{"type":43,"tag":395,"props":11921,"children":11922},{"style":423},[11923],{"type":53,"value":11924},"    \u002F\u002F Wait for the hook, then resume it\n",{"type":43,"tag":395,"props":11926,"children":11927},{"class":397,"line":845},[11928,11932,11936,11940,11945,11949,11953,11957,11961,11965,11970,11974,11978,11982],{"type":43,"tag":395,"props":11929,"children":11930},{"style":481},[11931],{"type":53,"value":4433},{"type":43,"tag":395,"props":11933,"children":11934},{"style":1108},[11935],{"type":53,"value":11685},{"type":43,"tag":395,"props":11937,"children":11938},{"style":1192},[11939],{"type":53,"value":1116},{"type":43,"tag":395,"props":11941,"children":11942},{"style":492},[11943],{"type":53,"value":11944},"run",{"type":43,"tag":395,"props":11946,"children":11947},{"style":402},[11948],{"type":53,"value":500},{"type":43,"tag":395,"props":11950,"children":11951},{"style":402},[11952],{"type":53,"value":489},{"type":43,"tag":395,"props":11954,"children":11955},{"style":1192},[11956],{"type":53,"value":4649},{"type":43,"tag":395,"props":11958,"children":11959},{"style":402},[11960],{"type":53,"value":109},{"type":43,"tag":395,"props":11962,"children":11963},{"style":402},[11964],{"type":53,"value":547},{"type":43,"tag":395,"props":11966,"children":11967},{"style":408},[11968],{"type":53,"value":11969},"approval:doc-123",{"type":43,"tag":395,"props":11971,"children":11972},{"style":402},[11973],{"type":53,"value":405},{"type":43,"tag":395,"props":11975,"children":11976},{"style":402},[11977],{"type":53,"value":537},{"type":43,"tag":395,"props":11979,"children":11980},{"style":1192},[11981],{"type":53,"value":1137},{"type":43,"tag":395,"props":11983,"children":11984},{"style":402},[11985],{"type":53,"value":560},{"type":43,"tag":395,"props":11987,"children":11988},{"class":397,"line":854},[11989,11993,11997,12001,12005,12009,12013,12017,12021,12025,12029,12033,12037,12042,12046,12050,12055,12059,12063,12067],{"type":43,"tag":395,"props":11990,"children":11991},{"style":481},[11992],{"type":53,"value":4433},{"type":43,"tag":395,"props":11994,"children":11995},{"style":1108},[11996],{"type":53,"value":714},{"type":43,"tag":395,"props":11998,"children":11999},{"style":1192},[12000],{"type":53,"value":1116},{"type":43,"tag":395,"props":12002,"children":12003},{"style":402},[12004],{"type":53,"value":405},{"type":43,"tag":395,"props":12006,"children":12007},{"style":408},[12008],{"type":53,"value":11969},{"type":43,"tag":395,"props":12010,"children":12011},{"style":402},[12012],{"type":53,"value":405},{"type":43,"tag":395,"props":12014,"children":12015},{"style":402},[12016],{"type":53,"value":500},{"type":43,"tag":395,"props":12018,"children":12019},{"style":402},[12020],{"type":53,"value":489},{"type":43,"tag":395,"props":12022,"children":12023},{"style":1192},[12024],{"type":53,"value":3965},{"type":43,"tag":395,"props":12026,"children":12027},{"style":402},[12028],{"type":53,"value":109},{"type":43,"tag":395,"props":12030,"children":12031},{"style":1671},[12032],{"type":53,"value":1674},{"type":43,"tag":395,"props":12034,"children":12035},{"style":402},[12036],{"type":53,"value":500},{"type":43,"tag":395,"props":12038,"children":12039},{"style":1192},[12040],{"type":53,"value":12041}," reviewer",{"type":43,"tag":395,"props":12043,"children":12044},{"style":402},[12045],{"type":53,"value":109},{"type":43,"tag":395,"props":12047,"children":12048},{"style":402},[12049],{"type":53,"value":547},{"type":43,"tag":395,"props":12051,"children":12052},{"style":408},[12053],{"type":53,"value":12054},"alice",{"type":43,"tag":395,"props":12056,"children":12057},{"style":402},[12058],{"type":53,"value":405},{"type":43,"tag":395,"props":12060,"children":12061},{"style":402},[12062],{"type":53,"value":537},{"type":43,"tag":395,"props":12064,"children":12065},{"style":1192},[12066],{"type":53,"value":1137},{"type":43,"tag":395,"props":12068,"children":12069},{"style":402},[12070],{"type":53,"value":560},{"type":43,"tag":395,"props":12072,"children":12073},{"class":397,"line":896},[12074],{"type":43,"tag":395,"props":12075,"children":12076},{"emptyLinePlaceholder":667},[12077],{"type":53,"value":670},{"type":43,"tag":395,"props":12079,"children":12080},{"class":397,"line":938},[12081],{"type":43,"tag":395,"props":12082,"children":12083},{"style":423},[12084],{"type":53,"value":12085},"    \u002F\u002F Wait for sleep, then wake it up\n",{"type":43,"tag":395,"props":12087,"children":12088},{"class":397,"line":979},[12089,12093,12098,12102,12106,12110,12114,12118,12122],{"type":43,"tag":395,"props":12090,"children":12091},{"style":1097},[12092],{"type":53,"value":11133},{"type":43,"tag":395,"props":12094,"children":12095},{"style":492},[12096],{"type":53,"value":12097}," sleepId",{"type":43,"tag":395,"props":12099,"children":12100},{"style":402},[12101],{"type":53,"value":1180},{"type":43,"tag":395,"props":12103,"children":12104},{"style":481},[12105],{"type":53,"value":1185},{"type":43,"tag":395,"props":12107,"children":12108},{"style":1108},[12109],{"type":53,"value":11694},{"type":43,"tag":395,"props":12111,"children":12112},{"style":1192},[12113],{"type":53,"value":1116},{"type":43,"tag":395,"props":12115,"children":12116},{"style":492},[12117],{"type":53,"value":11944},{"type":43,"tag":395,"props":12119,"children":12120},{"style":1192},[12121],{"type":53,"value":1137},{"type":43,"tag":395,"props":12123,"children":12124},{"style":402},[12125],{"type":53,"value":560},{"type":43,"tag":395,"props":12127,"children":12128},{"class":397,"line":988},[12129,12133,12137,12141,12145,12149,12153,12157,12161,12166,12170,12174,12179,12183,12187,12192,12197,12201,12205],{"type":43,"tag":395,"props":12130,"children":12131},{"style":481},[12132],{"type":53,"value":4433},{"type":43,"tag":395,"props":12134,"children":12135},{"style":1108},[12136],{"type":53,"value":705},{"type":43,"tag":395,"props":12138,"children":12139},{"style":1192},[12140],{"type":53,"value":1116},{"type":43,"tag":395,"props":12142,"children":12143},{"style":492},[12144],{"type":53,"value":11944},{"type":43,"tag":395,"props":12146,"children":12147},{"style":402},[12148],{"type":53,"value":1243},{"type":43,"tag":395,"props":12150,"children":12151},{"style":492},[12152],{"type":53,"value":3311},{"type":43,"tag":395,"props":12154,"children":12155},{"style":1192},[12156],{"type":53,"value":1137},{"type":43,"tag":395,"props":12158,"children":12159},{"style":402},[12160],{"type":53,"value":1243},{"type":43,"tag":395,"props":12162,"children":12163},{"style":1108},[12164],{"type":53,"value":12165},"wakeUp",{"type":43,"tag":395,"props":12167,"children":12168},{"style":1192},[12169],{"type":53,"value":1116},{"type":43,"tag":395,"props":12171,"children":12172},{"style":402},[12173],{"type":53,"value":2608},{"type":43,"tag":395,"props":12175,"children":12176},{"style":1192},[12177],{"type":53,"value":12178}," correlationIds",{"type":43,"tag":395,"props":12180,"children":12181},{"style":402},[12182],{"type":53,"value":109},{"type":43,"tag":395,"props":12184,"children":12185},{"style":1192},[12186],{"type":53,"value":2767},{"type":43,"tag":395,"props":12188,"children":12189},{"style":492},[12190],{"type":53,"value":12191},"sleepId",{"type":43,"tag":395,"props":12193,"children":12194},{"style":1192},[12195],{"type":53,"value":12196},"] ",{"type":43,"tag":395,"props":12198,"children":12199},{"style":402},[12200],{"type":53,"value":2326},{"type":43,"tag":395,"props":12202,"children":12203},{"style":1192},[12204],{"type":53,"value":1137},{"type":43,"tag":395,"props":12206,"children":12207},{"style":402},[12208],{"type":53,"value":560},{"type":43,"tag":395,"props":12210,"children":12211},{"class":397,"line":996},[12212],{"type":43,"tag":395,"props":12213,"children":12214},{"emptyLinePlaceholder":667},[12215],{"type":53,"value":670},{"type":43,"tag":395,"props":12217,"children":12218},{"class":397,"line":1005},[12219,12223,12227,12231,12235,12239,12243,12248],{"type":43,"tag":395,"props":12220,"children":12221},{"style":1097},[12222],{"type":53,"value":11133},{"type":43,"tag":395,"props":12224,"children":12225},{"style":492},[12226],{"type":53,"value":2720},{"type":43,"tag":395,"props":12228,"children":12229},{"style":402},[12230],{"type":53,"value":1180},{"type":43,"tag":395,"props":12232,"children":12233},{"style":481},[12234],{"type":53,"value":1185},{"type":43,"tag":395,"props":12236,"children":12237},{"style":492},[12238],{"type":53,"value":3209},{"type":43,"tag":395,"props":12240,"children":12241},{"style":402},[12242],{"type":53,"value":1243},{"type":43,"tag":395,"props":12244,"children":12245},{"style":492},[12246],{"type":53,"value":12247},"returnValue",{"type":43,"tag":395,"props":12249,"children":12250},{"style":402},[12251],{"type":53,"value":560},{"type":43,"tag":395,"props":12253,"children":12254},{"class":397,"line":1568},[12255,12259,12263,12267,12271,12275,12280,12284,12288,12293,12297,12301,12306,12310,12314,12318,12322,12326,12330,12334,12338,12342],{"type":43,"tag":395,"props":12256,"children":12257},{"style":1108},[12258],{"type":53,"value":11183},{"type":43,"tag":395,"props":12260,"children":12261},{"style":1192},[12262],{"type":53,"value":1116},{"type":43,"tag":395,"props":12264,"children":12265},{"style":492},[12266],{"type":53,"value":7166},{"type":43,"tag":395,"props":12268,"children":12269},{"style":1192},[12270],{"type":53,"value":1137},{"type":43,"tag":395,"props":12272,"children":12273},{"style":402},[12274],{"type":53,"value":1243},{"type":43,"tag":395,"props":12276,"children":12277},{"style":1108},[12278],{"type":53,"value":12279},"toEqual",{"type":43,"tag":395,"props":12281,"children":12282},{"style":1192},[12283],{"type":53,"value":1116},{"type":43,"tag":395,"props":12285,"children":12286},{"style":402},[12287],{"type":53,"value":2608},{"type":43,"tag":395,"props":12289,"children":12290},{"style":1192},[12291],{"type":53,"value":12292}," status",{"type":43,"tag":395,"props":12294,"children":12295},{"style":402},[12296],{"type":53,"value":109},{"type":43,"tag":395,"props":12298,"children":12299},{"style":402},[12300],{"type":53,"value":547},{"type":43,"tag":395,"props":12302,"children":12303},{"style":408},[12304],{"type":53,"value":12305},"published",{"type":43,"tag":395,"props":12307,"children":12308},{"style":402},[12309],{"type":53,"value":405},{"type":43,"tag":395,"props":12311,"children":12312},{"style":402},[12313],{"type":53,"value":500},{"type":43,"tag":395,"props":12315,"children":12316},{"style":1192},[12317],{"type":53,"value":12041},{"type":43,"tag":395,"props":12319,"children":12320},{"style":402},[12321],{"type":53,"value":109},{"type":43,"tag":395,"props":12323,"children":12324},{"style":402},[12325],{"type":53,"value":547},{"type":43,"tag":395,"props":12327,"children":12328},{"style":408},[12329],{"type":53,"value":12054},{"type":43,"tag":395,"props":12331,"children":12332},{"style":402},[12333],{"type":53,"value":405},{"type":43,"tag":395,"props":12335,"children":12336},{"style":402},[12337],{"type":53,"value":537},{"type":43,"tag":395,"props":12339,"children":12340},{"style":1192},[12341],{"type":53,"value":1137},{"type":43,"tag":395,"props":12343,"children":12344},{"style":402},[12345],{"type":53,"value":560},{"type":43,"tag":395,"props":12347,"children":12348},{"class":397,"line":1609},[12349,12353,12357],{"type":43,"tag":395,"props":12350,"children":12351},{"style":402},[12352],{"type":53,"value":1470},{"type":43,"tag":395,"props":12354,"children":12355},{"style":1192},[12356],{"type":53,"value":1137},{"type":43,"tag":395,"props":12358,"children":12359},{"style":402},[12360],{"type":53,"value":560},{"type":43,"tag":395,"props":12362,"children":12363},{"class":397,"line":1650},[12364,12368,12372],{"type":43,"tag":395,"props":12365,"children":12366},{"style":402},[12367],{"type":53,"value":2326},{"type":43,"tag":395,"props":12369,"children":12370},{"style":492},[12371],{"type":53,"value":1137},{"type":43,"tag":395,"props":12373,"children":12374},{"style":402},[12375],{"type":53,"value":560},{"type":43,"tag":66,"props":12377,"children":12378},{},[12379,12384,12385,12391,12393,12399],{"type":43,"tag":119,"props":12380,"children":12381},{},[12382],{"type":53,"value":12383},"Testing webhooks:",{"type":53,"value":11277},{"type":43,"tag":58,"props":12386,"children":12388},{"className":12387},[],[12389],{"type":53,"value":12390},"resumeWebhook()",{"type":53,"value":12392}," with a ",{"type":43,"tag":58,"props":12394,"children":12396},{"className":12395},[],[12397],{"type":53,"value":12398},"Request",{"type":53,"value":12400}," object — no HTTP server needed:",{"type":43,"tag":384,"props":12402,"children":12404},{"className":386,"code":12403,"language":388,"meta":389,"style":389},"import { start, resumeWebhook } from \"workflow\u002Fapi\";\nimport { waitForHook } from \"@workflow\u002Fvitest\";\n\nconst run = await start(ingestWorkflow, [\"ep-1\"]);\nconst hook = await waitForHook(run);  \u002F\u002F Discovers the random webhook token\nawait resumeWebhook(hook.token, new Request(\"https:\u002F\u002Fexample.com\u002Fwebhook\", {\n  method: \"POST\",\n  body: JSON.stringify({ event: \"order.created\" }),\n}));\n",[12405],{"type":43,"tag":58,"props":12406,"children":12407},{"__ignoreMap":389},[12408,12455,12494,12501,12558,12596,12658,12687,12753],{"type":43,"tag":395,"props":12409,"children":12410},{"class":397,"line":398},[12411,12415,12419,12423,12427,12431,12435,12439,12443,12447,12451],{"type":43,"tag":395,"props":12412,"children":12413},{"style":481},[12414],{"type":53,"value":484},{"type":43,"tag":395,"props":12416,"children":12417},{"style":402},[12418],{"type":53,"value":489},{"type":43,"tag":395,"props":12420,"children":12421},{"style":492},[12422],{"type":53,"value":696},{"type":43,"tag":395,"props":12424,"children":12425},{"style":402},[12426],{"type":53,"value":500},{"type":43,"tag":395,"props":12428,"children":12429},{"style":492},[12430],{"type":53,"value":723},{"type":43,"tag":395,"props":12432,"children":12433},{"style":402},[12434],{"type":53,"value":537},{"type":43,"tag":395,"props":12436,"children":12437},{"style":481},[12438],{"type":53,"value":542},{"type":43,"tag":395,"props":12440,"children":12441},{"style":402},[12442],{"type":53,"value":547},{"type":43,"tag":395,"props":12444,"children":12445},{"style":408},[12446],{"type":53,"value":740},{"type":43,"tag":395,"props":12448,"children":12449},{"style":402},[12450],{"type":53,"value":405},{"type":43,"tag":395,"props":12452,"children":12453},{"style":402},[12454],{"type":53,"value":560},{"type":43,"tag":395,"props":12456,"children":12457},{"class":397,"line":429},[12458,12462,12466,12470,12474,12478,12482,12486,12490],{"type":43,"tag":395,"props":12459,"children":12460},{"style":481},[12461],{"type":53,"value":484},{"type":43,"tag":395,"props":12463,"children":12464},{"style":402},[12465],{"type":53,"value":489},{"type":43,"tag":395,"props":12467,"children":12468},{"style":492},[12469],{"type":53,"value":11685},{"type":43,"tag":395,"props":12471,"children":12472},{"style":402},[12473],{"type":53,"value":537},{"type":43,"tag":395,"props":12475,"children":12476},{"style":481},[12477],{"type":53,"value":542},{"type":43,"tag":395,"props":12479,"children":12480},{"style":402},[12481],{"type":53,"value":547},{"type":43,"tag":395,"props":12483,"children":12484},{"style":408},[12485],{"type":53,"value":11283},{"type":43,"tag":395,"props":12487,"children":12488},{"style":402},[12489],{"type":53,"value":405},{"type":43,"tag":395,"props":12491,"children":12492},{"style":402},[12493],{"type":53,"value":560},{"type":43,"tag":395,"props":12495,"children":12496},{"class":397,"line":563},[12497],{"type":43,"tag":395,"props":12498,"children":12499},{"emptyLinePlaceholder":667},[12500],{"type":53,"value":670},{"type":43,"tag":395,"props":12502,"children":12503},{"class":397,"line":613},[12504,12508,12512,12516,12520,12524,12529,12533,12537,12541,12546,12550,12554],{"type":43,"tag":395,"props":12505,"children":12506},{"style":1097},[12507],{"type":53,"value":3353},{"type":43,"tag":395,"props":12509,"children":12510},{"style":492},[12511],{"type":53,"value":3358},{"type":43,"tag":395,"props":12513,"children":12514},{"style":402},[12515],{"type":53,"value":3363},{"type":43,"tag":395,"props":12517,"children":12518},{"style":481},[12519],{"type":53,"value":1185},{"type":43,"tag":395,"props":12521,"children":12522},{"style":1108},[12523],{"type":53,"value":696},{"type":43,"tag":395,"props":12525,"children":12526},{"style":492},[12527],{"type":53,"value":12528},"(ingestWorkflow",{"type":43,"tag":395,"props":12530,"children":12531},{"style":402},[12532],{"type":53,"value":500},{"type":43,"tag":395,"props":12534,"children":12535},{"style":492},[12536],{"type":53,"value":2767},{"type":43,"tag":395,"props":12538,"children":12539},{"style":402},[12540],{"type":53,"value":405},{"type":43,"tag":395,"props":12542,"children":12543},{"style":408},[12544],{"type":53,"value":12545},"ep-1",{"type":43,"tag":395,"props":12547,"children":12548},{"style":402},[12549],{"type":53,"value":405},{"type":43,"tag":395,"props":12551,"children":12552},{"style":492},[12553],{"type":53,"value":3257},{"type":43,"tag":395,"props":12555,"children":12556},{"style":402},[12557],{"type":53,"value":560},{"type":43,"tag":395,"props":12559,"children":12560},{"class":397,"line":663},[12561,12565,12570,12574,12578,12582,12587,12591],{"type":43,"tag":395,"props":12562,"children":12563},{"style":1097},[12564],{"type":53,"value":3353},{"type":43,"tag":395,"props":12566,"children":12567},{"style":492},[12568],{"type":53,"value":12569}," hook ",{"type":43,"tag":395,"props":12571,"children":12572},{"style":402},[12573],{"type":53,"value":3363},{"type":43,"tag":395,"props":12575,"children":12576},{"style":481},[12577],{"type":53,"value":1185},{"type":43,"tag":395,"props":12579,"children":12580},{"style":1108},[12581],{"type":53,"value":11685},{"type":43,"tag":395,"props":12583,"children":12584},{"style":492},[12585],{"type":53,"value":12586},"(run)",{"type":43,"tag":395,"props":12588,"children":12589},{"style":402},[12590],{"type":53,"value":420},{"type":43,"tag":395,"props":12592,"children":12593},{"style":423},[12594],{"type":53,"value":12595},"  \u002F\u002F Discovers the random webhook token\n",{"type":43,"tag":395,"props":12597,"children":12598},{"class":397,"line":673},[12599,12604,12608,12613,12617,12621,12625,12629,12633,12637,12641,12646,12650,12654],{"type":43,"tag":395,"props":12600,"children":12601},{"style":481},[12602],{"type":53,"value":12603},"await",{"type":43,"tag":395,"props":12605,"children":12606},{"style":1108},[12607],{"type":53,"value":723},{"type":43,"tag":395,"props":12609,"children":12610},{"style":492},[12611],{"type":53,"value":12612},"(hook",{"type":43,"tag":395,"props":12614,"children":12615},{"style":402},[12616],{"type":53,"value":1243},{"type":43,"tag":395,"props":12618,"children":12619},{"style":492},[12620],{"type":53,"value":3814},{"type":43,"tag":395,"props":12622,"children":12623},{"style":402},[12624],{"type":53,"value":500},{"type":43,"tag":395,"props":12626,"children":12627},{"style":402},[12628],{"type":53,"value":2444},{"type":43,"tag":395,"props":12630,"children":12631},{"style":1108},[12632],{"type":53,"value":4625},{"type":43,"tag":395,"props":12634,"children":12635},{"style":492},[12636],{"type":53,"value":1116},{"type":43,"tag":395,"props":12638,"children":12639},{"style":402},[12640],{"type":53,"value":405},{"type":43,"tag":395,"props":12642,"children":12643},{"style":408},[12644],{"type":53,"value":12645},"https:\u002F\u002Fexample.com\u002Fwebhook",{"type":43,"tag":395,"props":12647,"children":12648},{"style":402},[12649],{"type":53,"value":405},{"type":43,"tag":395,"props":12651,"children":12652},{"style":402},[12653],{"type":53,"value":500},{"type":43,"tag":395,"props":12655,"children":12656},{"style":402},[12657],{"type":53,"value":1142},{"type":43,"tag":395,"props":12659,"children":12660},{"class":397,"line":682},[12661,12666,12670,12674,12679,12683],{"type":43,"tag":395,"props":12662,"children":12663},{"style":1192},[12664],{"type":53,"value":12665},"  method",{"type":43,"tag":395,"props":12667,"children":12668},{"style":402},[12669],{"type":53,"value":109},{"type":43,"tag":395,"props":12671,"children":12672},{"style":402},[12673],{"type":53,"value":547},{"type":43,"tag":395,"props":12675,"children":12676},{"style":408},[12677],{"type":53,"value":12678},"POST",{"type":43,"tag":395,"props":12680,"children":12681},{"style":402},[12682],{"type":53,"value":405},{"type":43,"tag":395,"props":12684,"children":12685},{"style":402},[12686],{"type":53,"value":1409},{"type":43,"tag":395,"props":12688,"children":12689},{"class":397,"line":751},[12690,12695,12699,12704,12708,12712,12716,12720,12724,12728,12732,12737,12741,12745,12749],{"type":43,"tag":395,"props":12691,"children":12692},{"style":1192},[12693],{"type":53,"value":12694},"  body",{"type":43,"tag":395,"props":12696,"children":12697},{"style":402},[12698],{"type":53,"value":109},{"type":43,"tag":395,"props":12700,"children":12701},{"style":492},[12702],{"type":53,"value":12703}," JSON",{"type":43,"tag":395,"props":12705,"children":12706},{"style":402},[12707],{"type":53,"value":1243},{"type":43,"tag":395,"props":12709,"children":12710},{"style":1108},[12711],{"type":53,"value":1449},{"type":43,"tag":395,"props":12713,"children":12714},{"style":492},[12715],{"type":53,"value":1116},{"type":43,"tag":395,"props":12717,"children":12718},{"style":402},[12719],{"type":53,"value":2608},{"type":43,"tag":395,"props":12721,"children":12722},{"style":1192},[12723],{"type":53,"value":4407},{"type":43,"tag":395,"props":12725,"children":12726},{"style":402},[12727],{"type":53,"value":109},{"type":43,"tag":395,"props":12729,"children":12730},{"style":402},[12731],{"type":53,"value":547},{"type":43,"tag":395,"props":12733,"children":12734},{"style":408},[12735],{"type":53,"value":12736},"order.created",{"type":43,"tag":395,"props":12738,"children":12739},{"style":402},[12740],{"type":53,"value":405},{"type":43,"tag":395,"props":12742,"children":12743},{"style":402},[12744],{"type":53,"value":537},{"type":43,"tag":395,"props":12746,"children":12747},{"style":492},[12748],{"type":53,"value":1137},{"type":43,"tag":395,"props":12750,"children":12751},{"style":402},[12752],{"type":53,"value":1409},{"type":43,"tag":395,"props":12754,"children":12755},{"class":397,"line":759},[12756,12760,12765],{"type":43,"tag":395,"props":12757,"children":12758},{"style":402},[12759],{"type":53,"value":2326},{"type":43,"tag":395,"props":12761,"children":12762},{"style":492},[12763],{"type":53,"value":12764},"))",{"type":43,"tag":395,"props":12766,"children":12767},{"style":402},[12768],{"type":53,"value":560},{"type":43,"tag":66,"props":12770,"children":12771},{},[12772],{"type":43,"tag":119,"props":12773,"children":12774},{},[12775],{"type":53,"value":12776},"Key APIs:",{"type":43,"tag":159,"props":12778,"children":12779},{},[12780,12790,12800,12819,12837],{"type":43,"tag":115,"props":12781,"children":12782},{},[12783,12788],{"type":43,"tag":58,"props":12784,"children":12786},{"className":12785},[],[12787],{"type":53,"value":3094},{"type":53,"value":12789}," — trigger a workflow",{"type":43,"tag":115,"props":12791,"children":12792},{},[12793,12798],{"type":43,"tag":58,"props":12794,"children":12796},{"className":12795},[],[12797],{"type":53,"value":3758},{"type":53,"value":12799}," — await workflow completion",{"type":43,"tag":115,"props":12801,"children":12802},{},[12803,12809,12811,12817],{"type":43,"tag":58,"props":12804,"children":12806},{"className":12805},[],[12807],{"type":53,"value":12808},"waitForHook(run, { token? })",{"type":53,"value":12810}," \u002F ",{"type":43,"tag":58,"props":12812,"children":12814},{"className":12813},[],[12815],{"type":53,"value":12816},"waitForSleep(run)",{"type":53,"value":12818}," — wait for workflow to reach a pause point",{"type":43,"tag":115,"props":12820,"children":12821},{},[12822,12828,12829,12835],{"type":43,"tag":58,"props":12823,"children":12825},{"className":12824},[],[12826],{"type":53,"value":12827},"resumeHook(token, data)",{"type":53,"value":12810},{"type":43,"tag":58,"props":12830,"children":12832},{"className":12831},[],[12833],{"type":53,"value":12834},"resumeWebhook(token, request)",{"type":53,"value":12836}," — resume paused workflows",{"type":43,"tag":115,"props":12838,"children":12839},{},[12840,12846,12848,12853],{"type":43,"tag":58,"props":12841,"children":12843},{"className":12842},[],[12844],{"type":53,"value":12845},"getRun(runId).wakeUp({ correlationIds })",{"type":53,"value":12847}," — skip ",{"type":43,"tag":58,"props":12849,"children":12851},{"className":12850},[],[12852],{"type":53,"value":3001},{"type":53,"value":3057},{"type":43,"tag":66,"props":12855,"children":12856},{},[12857],{"type":43,"tag":119,"props":12858,"children":12859},{},[12860],{"type":53,"value":12861},"Best practices:",{"type":43,"tag":159,"props":12863,"children":12864},{},[12865,12878,12883,12896],{"type":43,"tag":115,"props":12866,"children":12867},{},[12868,12870,12876],{"type":53,"value":12869},"Keep unit tests (no plugin) and integration tests (",{"type":43,"tag":58,"props":12871,"children":12873},{"className":12872},[],[12874],{"type":53,"value":12875},"workflow()",{"type":53,"value":12877}," plugin) in separate configs",{"type":43,"tag":115,"props":12879,"children":12880},{},[12881],{"type":53,"value":12882},"Use deterministic hook tokens based on test data for easier resumption",{"type":43,"tag":115,"props":12884,"children":12885},{},[12886,12888,12894],{"type":53,"value":12887},"Set generous ",{"type":43,"tag":58,"props":12889,"children":12891},{"className":12890},[],[12892],{"type":53,"value":12893},"testTimeout",{"type":53,"value":12895}," — workflows may run longer than typical unit tests",{"type":43,"tag":115,"props":12897,"children":12898},{},[12899,12905,12907,12912],{"type":43,"tag":58,"props":12900,"children":12902},{"className":12901},[],[12903],{"type":53,"value":12904},"vi.mock()",{"type":53,"value":12906}," does ",{"type":43,"tag":119,"props":12908,"children":12909},{},[12910],{"type":53,"value":12911},"not",{"type":53,"value":12913}," work in integration tests — step dependencies are bundled by esbuild",{"type":43,"tag":44,"props":12915,"children":12917},{"id":12916},"observability-world-sdk",[12918],{"type":53,"value":12919},"Observability & World SDK",{"type":43,"tag":66,"props":12921,"children":12922},{},[12923,12924,12930,12932,12938,12940,12946],{"type":53,"value":1801},{"type":43,"tag":58,"props":12925,"children":12927},{"className":12926},[],[12928],{"type":53,"value":12929},"await getWorld()",{"type":53,"value":12931}," to build observability dashboards, admin panels, and inspect workflow state. ",{"type":43,"tag":58,"props":12933,"children":12935},{"className":12934},[],[12936],{"type":53,"value":12937},"getWorld()",{"type":53,"value":12939}," is asynchronous and returns ",{"type":43,"tag":58,"props":12941,"children":12943},{"className":12942},[],[12944],{"type":53,"value":12945},"Promise\u003CWorld>",{"type":53,"value":12947}," (dynamic import \u002F env-based setup).",{"type":43,"tag":66,"props":12949,"children":12950},{},[12951],{"type":43,"tag":119,"props":12952,"children":12953},{},[12954],{"type":53,"value":12955},"Key imports:",{"type":43,"tag":384,"props":12957,"children":12959},{"className":386,"code":12958,"language":388,"meta":389,"style":389},"import { getWorld } from \"workflow\u002Fruntime\";\nimport { hydrateResourceIO, observabilityRevivers, parseStepName, parseWorkflowName } from \"workflow\u002Fobservability\";\n",[12960],{"type":43,"tag":58,"props":12961,"children":12962},{"__ignoreMap":389},[12963,13004],{"type":43,"tag":395,"props":12964,"children":12965},{"class":397,"line":398},[12966,12970,12974,12979,12983,12987,12991,12996,13000],{"type":43,"tag":395,"props":12967,"children":12968},{"style":481},[12969],{"type":53,"value":484},{"type":43,"tag":395,"props":12971,"children":12972},{"style":402},[12973],{"type":53,"value":489},{"type":43,"tag":395,"props":12975,"children":12976},{"style":492},[12977],{"type":53,"value":12978}," getWorld",{"type":43,"tag":395,"props":12980,"children":12981},{"style":402},[12982],{"type":53,"value":537},{"type":43,"tag":395,"props":12984,"children":12985},{"style":481},[12986],{"type":53,"value":542},{"type":43,"tag":395,"props":12988,"children":12989},{"style":402},[12990],{"type":53,"value":547},{"type":43,"tag":395,"props":12992,"children":12993},{"style":408},[12994],{"type":53,"value":12995},"workflow\u002Fruntime",{"type":43,"tag":395,"props":12997,"children":12998},{"style":402},[12999],{"type":53,"value":405},{"type":43,"tag":395,"props":13001,"children":13002},{"style":402},[13003],{"type":53,"value":560},{"type":43,"tag":395,"props":13005,"children":13006},{"class":397,"line":429},[13007,13011,13015,13019,13023,13027,13031,13035,13039,13043,13047,13051,13055,13059,13063],{"type":43,"tag":395,"props":13008,"children":13009},{"style":481},[13010],{"type":53,"value":484},{"type":43,"tag":395,"props":13012,"children":13013},{"style":402},[13014],{"type":53,"value":489},{"type":43,"tag":395,"props":13016,"children":13017},{"style":492},[13018],{"type":53,"value":782},{"type":43,"tag":395,"props":13020,"children":13021},{"style":402},[13022],{"type":53,"value":500},{"type":43,"tag":395,"props":13024,"children":13025},{"style":492},[13026],{"type":53,"value":791},{"type":43,"tag":395,"props":13028,"children":13029},{"style":402},[13030],{"type":53,"value":500},{"type":43,"tag":395,"props":13032,"children":13033},{"style":492},[13034],{"type":53,"value":800},{"type":43,"tag":395,"props":13036,"children":13037},{"style":402},[13038],{"type":53,"value":500},{"type":43,"tag":395,"props":13040,"children":13041},{"style":492},[13042],{"type":53,"value":809},{"type":43,"tag":395,"props":13044,"children":13045},{"style":402},[13046],{"type":53,"value":537},{"type":43,"tag":395,"props":13048,"children":13049},{"style":481},[13050],{"type":53,"value":542},{"type":43,"tag":395,"props":13052,"children":13053},{"style":402},[13054],{"type":53,"value":547},{"type":43,"tag":395,"props":13056,"children":13057},{"style":408},[13058],{"type":53,"value":826},{"type":43,"tag":395,"props":13060,"children":13061},{"style":402},[13062],{"type":53,"value":405},{"type":43,"tag":395,"props":13064,"children":13065},{"style":402},[13066],{"type":53,"value":560},{"type":43,"tag":66,"props":13068,"children":13069},{},[13070,13075,13077,13082],{"type":43,"tag":119,"props":13071,"children":13072},{},[13073],{"type":53,"value":13074},"Key docs",{"type":53,"value":13076}," (grep ",{"type":43,"tag":58,"props":13078,"children":13080},{"className":13079},[],[13081],{"type":53,"value":107},{"type":53,"value":13083}," for full details):",{"type":43,"tag":159,"props":13085,"children":13086},{},[13087,13098],{"type":43,"tag":115,"props":13088,"children":13089},{},[13090,13096],{"type":43,"tag":58,"props":13091,"children":13093},{"className":13092},[],[13094],{"type":53,"value":13095},"api-reference\u002Fworkflow-runtime\u002Fworld\u002Fstorage.mdx",{"type":53,"value":13097}," — events, runs, steps, hooks (events are source of truth; others are materialized views)",{"type":43,"tag":115,"props":13099,"children":13100},{},[13101,13106],{"type":43,"tag":58,"props":13102,"children":13104},{"className":13103},[],[13105],{"type":53,"value":233},{"type":53,"value":13107}," — hydration and name parsing",{"type":43,"tag":329,"props":13109,"children":13111},{"id":13110},"world-sdk-method-signatures",[13112],{"type":53,"value":13113},"World SDK Method Signatures",{"type":43,"tag":66,"props":13115,"children":13116},{},[13117,13119,13125,13127,13133],{"type":53,"value":13118},"⚠️ Pagination is nested: ",{"type":43,"tag":58,"props":13120,"children":13122},{"className":13121},[],[13123],{"type":53,"value":13124},"{ pagination: { cursor } }",{"type":53,"value":13126}," — NOT ",{"type":43,"tag":58,"props":13128,"children":13130},{"className":13129},[],[13131],{"type":53,"value":13132},"{ cursor }",{"type":53,"value":13134}," directly.",{"type":43,"tag":384,"props":13136,"children":13138},{"className":386,"code":13137,"language":388,"meta":389,"style":389},"const world = await getWorld();\n\n\u002F\u002F Runs\nconst { data, cursor } = await world.runs.list({ pagination: { cursor }, resolveData: 'all' | 'none' });\nconst run = await world.runs.get(runId, { resolveData: 'all' | 'none' });\n\u002F\u002F Cancel via event creation (no cancel() method on runs)\nawait world.events.create(runId, { eventType: 'run_cancelled' });\n\n\u002F\u002F Steps — runId is top-level, NOT inside pagination\nconst { data, cursor } = await world.steps.list({ runId, pagination: { cursor }, resolveData: 'all' | 'none' });\nconst step = await world.steps.get(runId, stepId, { resolveData: 'all' | 'none' });\n\n\u002F\u002F Events\nconst { data, cursor } = await world.events.list({ runId, pagination: { cursor } });\nawait world.events.create(runId, { eventType: 'run_cancelled' });\n\n\u002F\u002F Hooks\nconst hook = await world.hooks.get(hookId);\nconst hook = await world.hooks.getByToken(token);\n\n\u002F\u002F Streams (methods on world.streams)\nawait world.streams.write(runId, name, chunk);\nawait world.streams.writeMulti?.(runId, name, chunks);\nconst readable = await world.streams.get(runId, name, startIndex);\nawait world.streams.close(runId, name);\nconst streamNames = await world.streams.list(runId);\nconst chunks = await world.streams.getChunks(runId, name, { limit, cursor });\nconst info = await world.streams.getInfo(runId, name);\n\n\u002F\u002F Queue (methods live directly on world — internal SDK infrastructure)\nawait world.queue(queueName, payload, opts);\nconst deploymentId = await world.getDeploymentId();\n",[13139],{"type":43,"tag":58,"props":13140,"children":13141},{"__ignoreMap":389},[13142,13174,13181,13189,13331,13431,13439,13514,13521,13529,13669,13778,13785,13793,13896,13967,13974,13982,14031,14080,14087,14095,14149,14207,14272,14317,14366,14452,14509,14516,14524,14571],{"type":43,"tag":395,"props":13143,"children":13144},{"class":397,"line":398},[13145,13149,13154,13158,13162,13166,13170],{"type":43,"tag":395,"props":13146,"children":13147},{"style":1097},[13148],{"type":53,"value":3353},{"type":43,"tag":395,"props":13150,"children":13151},{"style":492},[13152],{"type":53,"value":13153}," world ",{"type":43,"tag":395,"props":13155,"children":13156},{"style":402},[13157],{"type":53,"value":3363},{"type":43,"tag":395,"props":13159,"children":13160},{"style":481},[13161],{"type":53,"value":1185},{"type":43,"tag":395,"props":13163,"children":13164},{"style":1108},[13165],{"type":53,"value":12978},{"type":43,"tag":395,"props":13167,"children":13168},{"style":492},[13169],{"type":53,"value":1253},{"type":43,"tag":395,"props":13171,"children":13172},{"style":402},[13173],{"type":53,"value":560},{"type":43,"tag":395,"props":13175,"children":13176},{"class":397,"line":429},[13177],{"type":43,"tag":395,"props":13178,"children":13179},{"emptyLinePlaceholder":667},[13180],{"type":53,"value":670},{"type":43,"tag":395,"props":13182,"children":13183},{"class":397,"line":563},[13184],{"type":43,"tag":395,"props":13185,"children":13186},{"style":423},[13187],{"type":53,"value":13188},"\u002F\u002F Runs\n",{"type":43,"tag":395,"props":13190,"children":13191},{"class":397,"line":613},[13192,13196,13200,13204,13208,13213,13217,13221,13225,13230,13234,13239,13243,13248,13252,13256,13261,13265,13269,13273,13278,13283,13287,13292,13297,13302,13306,13310,13315,13319,13323,13327],{"type":43,"tag":395,"props":13193,"children":13194},{"style":1097},[13195],{"type":53,"value":3353},{"type":43,"tag":395,"props":13197,"children":13198},{"style":402},[13199],{"type":53,"value":489},{"type":43,"tag":395,"props":13201,"children":13202},{"style":492},[13203],{"type":53,"value":1578},{"type":43,"tag":395,"props":13205,"children":13206},{"style":402},[13207],{"type":53,"value":500},{"type":43,"tag":395,"props":13209,"children":13210},{"style":492},[13211],{"type":53,"value":13212}," cursor ",{"type":43,"tag":395,"props":13214,"children":13215},{"style":402},[13216],{"type":53,"value":2326},{"type":43,"tag":395,"props":13218,"children":13219},{"style":402},[13220],{"type":53,"value":1180},{"type":43,"tag":395,"props":13222,"children":13223},{"style":481},[13224],{"type":53,"value":1185},{"type":43,"tag":395,"props":13226,"children":13227},{"style":492},[13228],{"type":53,"value":13229}," world",{"type":43,"tag":395,"props":13231,"children":13232},{"style":402},[13233],{"type":53,"value":1243},{"type":43,"tag":395,"props":13235,"children":13236},{"style":492},[13237],{"type":53,"value":13238},"runs",{"type":43,"tag":395,"props":13240,"children":13241},{"style":402},[13242],{"type":53,"value":1243},{"type":43,"tag":395,"props":13244,"children":13245},{"style":1108},[13246],{"type":53,"value":13247},"list",{"type":43,"tag":395,"props":13249,"children":13250},{"style":492},[13251],{"type":53,"value":1116},{"type":43,"tag":395,"props":13253,"children":13254},{"style":402},[13255],{"type":53,"value":2608},{"type":43,"tag":395,"props":13257,"children":13258},{"style":1192},[13259],{"type":53,"value":13260}," pagination",{"type":43,"tag":395,"props":13262,"children":13263},{"style":402},[13264],{"type":53,"value":109},{"type":43,"tag":395,"props":13266,"children":13267},{"style":402},[13268],{"type":53,"value":489},{"type":43,"tag":395,"props":13270,"children":13271},{"style":492},[13272],{"type":53,"value":13212},{"type":43,"tag":395,"props":13274,"children":13275},{"style":402},[13276],{"type":53,"value":13277},"},",{"type":43,"tag":395,"props":13279,"children":13280},{"style":1192},[13281],{"type":53,"value":13282}," resolveData",{"type":43,"tag":395,"props":13284,"children":13285},{"style":402},[13286],{"type":53,"value":109},{"type":43,"tag":395,"props":13288,"children":13289},{"style":402},[13290],{"type":53,"value":13291}," '",{"type":43,"tag":395,"props":13293,"children":13294},{"style":408},[13295],{"type":53,"value":13296},"all",{"type":43,"tag":395,"props":13298,"children":13299},{"style":402},[13300],{"type":53,"value":13301},"'",{"type":43,"tag":395,"props":13303,"children":13304},{"style":402},[13305],{"type":53,"value":7010},{"type":43,"tag":395,"props":13307,"children":13308},{"style":402},[13309],{"type":53,"value":13291},{"type":43,"tag":395,"props":13311,"children":13312},{"style":408},[13313],{"type":53,"value":13314},"none",{"type":43,"tag":395,"props":13316,"children":13317},{"style":402},[13318],{"type":53,"value":13301},{"type":43,"tag":395,"props":13320,"children":13321},{"style":402},[13322],{"type":53,"value":537},{"type":43,"tag":395,"props":13324,"children":13325},{"style":492},[13326],{"type":53,"value":1137},{"type":43,"tag":395,"props":13328,"children":13329},{"style":402},[13330],{"type":53,"value":560},{"type":43,"tag":395,"props":13332,"children":13333},{"class":397,"line":663},[13334,13338,13342,13346,13350,13354,13358,13362,13366,13370,13375,13379,13383,13387,13391,13395,13399,13403,13407,13411,13415,13419,13423,13427],{"type":43,"tag":395,"props":13335,"children":13336},{"style":1097},[13337],{"type":53,"value":3353},{"type":43,"tag":395,"props":13339,"children":13340},{"style":492},[13341],{"type":53,"value":3358},{"type":43,"tag":395,"props":13343,"children":13344},{"style":402},[13345],{"type":53,"value":3363},{"type":43,"tag":395,"props":13347,"children":13348},{"style":481},[13349],{"type":53,"value":1185},{"type":43,"tag":395,"props":13351,"children":13352},{"style":492},[13353],{"type":53,"value":13229},{"type":43,"tag":395,"props":13355,"children":13356},{"style":402},[13357],{"type":53,"value":1243},{"type":43,"tag":395,"props":13359,"children":13360},{"style":492},[13361],{"type":53,"value":13238},{"type":43,"tag":395,"props":13363,"children":13364},{"style":402},[13365],{"type":53,"value":1243},{"type":43,"tag":395,"props":13367,"children":13368},{"style":1108},[13369],{"type":53,"value":9442},{"type":43,"tag":395,"props":13371,"children":13372},{"style":492},[13373],{"type":53,"value":13374},"(runId",{"type":43,"tag":395,"props":13376,"children":13377},{"style":402},[13378],{"type":53,"value":500},{"type":43,"tag":395,"props":13380,"children":13381},{"style":402},[13382],{"type":53,"value":489},{"type":43,"tag":395,"props":13384,"children":13385},{"style":1192},[13386],{"type":53,"value":13282},{"type":43,"tag":395,"props":13388,"children":13389},{"style":402},[13390],{"type":53,"value":109},{"type":43,"tag":395,"props":13392,"children":13393},{"style":402},[13394],{"type":53,"value":13291},{"type":43,"tag":395,"props":13396,"children":13397},{"style":408},[13398],{"type":53,"value":13296},{"type":43,"tag":395,"props":13400,"children":13401},{"style":402},[13402],{"type":53,"value":13301},{"type":43,"tag":395,"props":13404,"children":13405},{"style":402},[13406],{"type":53,"value":7010},{"type":43,"tag":395,"props":13408,"children":13409},{"style":402},[13410],{"type":53,"value":13291},{"type":43,"tag":395,"props":13412,"children":13413},{"style":408},[13414],{"type":53,"value":13314},{"type":43,"tag":395,"props":13416,"children":13417},{"style":402},[13418],{"type":53,"value":13301},{"type":43,"tag":395,"props":13420,"children":13421},{"style":402},[13422],{"type":53,"value":537},{"type":43,"tag":395,"props":13424,"children":13425},{"style":492},[13426],{"type":53,"value":1137},{"type":43,"tag":395,"props":13428,"children":13429},{"style":402},[13430],{"type":53,"value":560},{"type":43,"tag":395,"props":13432,"children":13433},{"class":397,"line":673},[13434],{"type":43,"tag":395,"props":13435,"children":13436},{"style":423},[13437],{"type":53,"value":13438},"\u002F\u002F Cancel via event creation (no cancel() method on runs)\n",{"type":43,"tag":395,"props":13440,"children":13441},{"class":397,"line":682},[13442,13446,13450,13454,13459,13463,13468,13472,13476,13480,13485,13489,13493,13498,13502,13506,13510],{"type":43,"tag":395,"props":13443,"children":13444},{"style":481},[13445],{"type":53,"value":12603},{"type":43,"tag":395,"props":13447,"children":13448},{"style":492},[13449],{"type":53,"value":13229},{"type":43,"tag":395,"props":13451,"children":13452},{"style":402},[13453],{"type":53,"value":1243},{"type":43,"tag":395,"props":13455,"children":13456},{"style":492},[13457],{"type":53,"value":13458},"events",{"type":43,"tag":395,"props":13460,"children":13461},{"style":402},[13462],{"type":53,"value":1243},{"type":43,"tag":395,"props":13464,"children":13465},{"style":1108},[13466],{"type":53,"value":13467},"create",{"type":43,"tag":395,"props":13469,"children":13470},{"style":492},[13471],{"type":53,"value":13374},{"type":43,"tag":395,"props":13473,"children":13474},{"style":402},[13475],{"type":53,"value":500},{"type":43,"tag":395,"props":13477,"children":13478},{"style":402},[13479],{"type":53,"value":489},{"type":43,"tag":395,"props":13481,"children":13482},{"style":1192},[13483],{"type":53,"value":13484}," eventType",{"type":43,"tag":395,"props":13486,"children":13487},{"style":402},[13488],{"type":53,"value":109},{"type":43,"tag":395,"props":13490,"children":13491},{"style":402},[13492],{"type":53,"value":13291},{"type":43,"tag":395,"props":13494,"children":13495},{"style":408},[13496],{"type":53,"value":13497},"run_cancelled",{"type":43,"tag":395,"props":13499,"children":13500},{"style":402},[13501],{"type":53,"value":13301},{"type":43,"tag":395,"props":13503,"children":13504},{"style":402},[13505],{"type":53,"value":537},{"type":43,"tag":395,"props":13507,"children":13508},{"style":492},[13509],{"type":53,"value":1137},{"type":43,"tag":395,"props":13511,"children":13512},{"style":402},[13513],{"type":53,"value":560},{"type":43,"tag":395,"props":13515,"children":13516},{"class":397,"line":751},[13517],{"type":43,"tag":395,"props":13518,"children":13519},{"emptyLinePlaceholder":667},[13520],{"type":53,"value":670},{"type":43,"tag":395,"props":13522,"children":13523},{"class":397,"line":759},[13524],{"type":43,"tag":395,"props":13525,"children":13526},{"style":423},[13527],{"type":53,"value":13528},"\u002F\u002F Steps — runId is top-level, NOT inside pagination\n",{"type":43,"tag":395,"props":13530,"children":13531},{"class":397,"line":768},[13532,13536,13540,13544,13548,13552,13556,13560,13564,13568,13572,13577,13581,13585,13589,13593,13597,13601,13605,13609,13613,13617,13621,13625,13629,13633,13637,13641,13645,13649,13653,13657,13661,13665],{"type":43,"tag":395,"props":13533,"children":13534},{"style":1097},[13535],{"type":53,"value":3353},{"type":43,"tag":395,"props":13537,"children":13538},{"style":402},[13539],{"type":53,"value":489},{"type":43,"tag":395,"props":13541,"children":13542},{"style":492},[13543],{"type":53,"value":1578},{"type":43,"tag":395,"props":13545,"children":13546},{"style":402},[13547],{"type":53,"value":500},{"type":43,"tag":395,"props":13549,"children":13550},{"style":492},[13551],{"type":53,"value":13212},{"type":43,"tag":395,"props":13553,"children":13554},{"style":402},[13555],{"type":53,"value":2326},{"type":43,"tag":395,"props":13557,"children":13558},{"style":402},[13559],{"type":53,"value":1180},{"type":43,"tag":395,"props":13561,"children":13562},{"style":481},[13563],{"type":53,"value":1185},{"type":43,"tag":395,"props":13565,"children":13566},{"style":492},[13567],{"type":53,"value":13229},{"type":43,"tag":395,"props":13569,"children":13570},{"style":402},[13571],{"type":53,"value":1243},{"type":43,"tag":395,"props":13573,"children":13574},{"style":492},[13575],{"type":53,"value":13576},"steps",{"type":43,"tag":395,"props":13578,"children":13579},{"style":402},[13580],{"type":53,"value":1243},{"type":43,"tag":395,"props":13582,"children":13583},{"style":1108},[13584],{"type":53,"value":13247},{"type":43,"tag":395,"props":13586,"children":13587},{"style":492},[13588],{"type":53,"value":1116},{"type":43,"tag":395,"props":13590,"children":13591},{"style":402},[13592],{"type":53,"value":2608},{"type":43,"tag":395,"props":13594,"children":13595},{"style":492},[13596],{"type":53,"value":3294},{"type":43,"tag":395,"props":13598,"children":13599},{"style":402},[13600],{"type":53,"value":500},{"type":43,"tag":395,"props":13602,"children":13603},{"style":1192},[13604],{"type":53,"value":13260},{"type":43,"tag":395,"props":13606,"children":13607},{"style":402},[13608],{"type":53,"value":109},{"type":43,"tag":395,"props":13610,"children":13611},{"style":402},[13612],{"type":53,"value":489},{"type":43,"tag":395,"props":13614,"children":13615},{"style":492},[13616],{"type":53,"value":13212},{"type":43,"tag":395,"props":13618,"children":13619},{"style":402},[13620],{"type":53,"value":13277},{"type":43,"tag":395,"props":13622,"children":13623},{"style":1192},[13624],{"type":53,"value":13282},{"type":43,"tag":395,"props":13626,"children":13627},{"style":402},[13628],{"type":53,"value":109},{"type":43,"tag":395,"props":13630,"children":13631},{"style":402},[13632],{"type":53,"value":13291},{"type":43,"tag":395,"props":13634,"children":13635},{"style":408},[13636],{"type":53,"value":13296},{"type":43,"tag":395,"props":13638,"children":13639},{"style":402},[13640],{"type":53,"value":13301},{"type":43,"tag":395,"props":13642,"children":13643},{"style":402},[13644],{"type":53,"value":7010},{"type":43,"tag":395,"props":13646,"children":13647},{"style":402},[13648],{"type":53,"value":13291},{"type":43,"tag":395,"props":13650,"children":13651},{"style":408},[13652],{"type":53,"value":13314},{"type":43,"tag":395,"props":13654,"children":13655},{"style":402},[13656],{"type":53,"value":13301},{"type":43,"tag":395,"props":13658,"children":13659},{"style":402},[13660],{"type":53,"value":537},{"type":43,"tag":395,"props":13662,"children":13663},{"style":492},[13664],{"type":53,"value":1137},{"type":43,"tag":395,"props":13666,"children":13667},{"style":402},[13668],{"type":53,"value":560},{"type":43,"tag":395,"props":13670,"children":13671},{"class":397,"line":837},[13672,13676,13681,13685,13689,13693,13697,13701,13705,13709,13713,13717,13722,13726,13730,13734,13738,13742,13746,13750,13754,13758,13762,13766,13770,13774],{"type":43,"tag":395,"props":13673,"children":13674},{"style":1097},[13675],{"type":53,"value":3353},{"type":43,"tag":395,"props":13677,"children":13678},{"style":492},[13679],{"type":53,"value":13680}," step ",{"type":43,"tag":395,"props":13682,"children":13683},{"style":402},[13684],{"type":53,"value":3363},{"type":43,"tag":395,"props":13686,"children":13687},{"style":481},[13688],{"type":53,"value":1185},{"type":43,"tag":395,"props":13690,"children":13691},{"style":492},[13692],{"type":53,"value":13229},{"type":43,"tag":395,"props":13694,"children":13695},{"style":402},[13696],{"type":53,"value":1243},{"type":43,"tag":395,"props":13698,"children":13699},{"style":492},[13700],{"type":53,"value":13576},{"type":43,"tag":395,"props":13702,"children":13703},{"style":402},[13704],{"type":53,"value":1243},{"type":43,"tag":395,"props":13706,"children":13707},{"style":1108},[13708],{"type":53,"value":9442},{"type":43,"tag":395,"props":13710,"children":13711},{"style":492},[13712],{"type":53,"value":13374},{"type":43,"tag":395,"props":13714,"children":13715},{"style":402},[13716],{"type":53,"value":500},{"type":43,"tag":395,"props":13718,"children":13719},{"style":492},[13720],{"type":53,"value":13721}," stepId",{"type":43,"tag":395,"props":13723,"children":13724},{"style":402},[13725],{"type":53,"value":500},{"type":43,"tag":395,"props":13727,"children":13728},{"style":402},[13729],{"type":53,"value":489},{"type":43,"tag":395,"props":13731,"children":13732},{"style":1192},[13733],{"type":53,"value":13282},{"type":43,"tag":395,"props":13735,"children":13736},{"style":402},[13737],{"type":53,"value":109},{"type":43,"tag":395,"props":13739,"children":13740},{"style":402},[13741],{"type":53,"value":13291},{"type":43,"tag":395,"props":13743,"children":13744},{"style":408},[13745],{"type":53,"value":13296},{"type":43,"tag":395,"props":13747,"children":13748},{"style":402},[13749],{"type":53,"value":13301},{"type":43,"tag":395,"props":13751,"children":13752},{"style":402},[13753],{"type":53,"value":7010},{"type":43,"tag":395,"props":13755,"children":13756},{"style":402},[13757],{"type":53,"value":13291},{"type":43,"tag":395,"props":13759,"children":13760},{"style":408},[13761],{"type":53,"value":13314},{"type":43,"tag":395,"props":13763,"children":13764},{"style":402},[13765],{"type":53,"value":13301},{"type":43,"tag":395,"props":13767,"children":13768},{"style":402},[13769],{"type":53,"value":537},{"type":43,"tag":395,"props":13771,"children":13772},{"style":492},[13773],{"type":53,"value":1137},{"type":43,"tag":395,"props":13775,"children":13776},{"style":402},[13777],{"type":53,"value":560},{"type":43,"tag":395,"props":13779,"children":13780},{"class":397,"line":845},[13781],{"type":43,"tag":395,"props":13782,"children":13783},{"emptyLinePlaceholder":667},[13784],{"type":53,"value":670},{"type":43,"tag":395,"props":13786,"children":13787},{"class":397,"line":854},[13788],{"type":43,"tag":395,"props":13789,"children":13790},{"style":423},[13791],{"type":53,"value":13792},"\u002F\u002F Events\n",{"type":43,"tag":395,"props":13794,"children":13795},{"class":397,"line":896},[13796,13800,13804,13808,13812,13816,13820,13824,13828,13832,13836,13840,13844,13848,13852,13856,13860,13864,13868,13872,13876,13880,13884,13888,13892],{"type":43,"tag":395,"props":13797,"children":13798},{"style":1097},[13799],{"type":53,"value":3353},{"type":43,"tag":395,"props":13801,"children":13802},{"style":402},[13803],{"type":53,"value":489},{"type":43,"tag":395,"props":13805,"children":13806},{"style":492},[13807],{"type":53,"value":1578},{"type":43,"tag":395,"props":13809,"children":13810},{"style":402},[13811],{"type":53,"value":500},{"type":43,"tag":395,"props":13813,"children":13814},{"style":492},[13815],{"type":53,"value":13212},{"type":43,"tag":395,"props":13817,"children":13818},{"style":402},[13819],{"type":53,"value":2326},{"type":43,"tag":395,"props":13821,"children":13822},{"style":402},[13823],{"type":53,"value":1180},{"type":43,"tag":395,"props":13825,"children":13826},{"style":481},[13827],{"type":53,"value":1185},{"type":43,"tag":395,"props":13829,"children":13830},{"style":492},[13831],{"type":53,"value":13229},{"type":43,"tag":395,"props":13833,"children":13834},{"style":402},[13835],{"type":53,"value":1243},{"type":43,"tag":395,"props":13837,"children":13838},{"style":492},[13839],{"type":53,"value":13458},{"type":43,"tag":395,"props":13841,"children":13842},{"style":402},[13843],{"type":53,"value":1243},{"type":43,"tag":395,"props":13845,"children":13846},{"style":1108},[13847],{"type":53,"value":13247},{"type":43,"tag":395,"props":13849,"children":13850},{"style":492},[13851],{"type":53,"value":1116},{"type":43,"tag":395,"props":13853,"children":13854},{"style":402},[13855],{"type":53,"value":2608},{"type":43,"tag":395,"props":13857,"children":13858},{"style":492},[13859],{"type":53,"value":3294},{"type":43,"tag":395,"props":13861,"children":13862},{"style":402},[13863],{"type":53,"value":500},{"type":43,"tag":395,"props":13865,"children":13866},{"style":1192},[13867],{"type":53,"value":13260},{"type":43,"tag":395,"props":13869,"children":13870},{"style":402},[13871],{"type":53,"value":109},{"type":43,"tag":395,"props":13873,"children":13874},{"style":402},[13875],{"type":53,"value":489},{"type":43,"tag":395,"props":13877,"children":13878},{"style":492},[13879],{"type":53,"value":13212},{"type":43,"tag":395,"props":13881,"children":13882},{"style":402},[13883],{"type":53,"value":2326},{"type":43,"tag":395,"props":13885,"children":13886},{"style":402},[13887],{"type":53,"value":537},{"type":43,"tag":395,"props":13889,"children":13890},{"style":492},[13891],{"type":53,"value":1137},{"type":43,"tag":395,"props":13893,"children":13894},{"style":402},[13895],{"type":53,"value":560},{"type":43,"tag":395,"props":13897,"children":13898},{"class":397,"line":938},[13899,13903,13907,13911,13915,13919,13923,13927,13931,13935,13939,13943,13947,13951,13955,13959,13963],{"type":43,"tag":395,"props":13900,"children":13901},{"style":481},[13902],{"type":53,"value":12603},{"type":43,"tag":395,"props":13904,"children":13905},{"style":492},[13906],{"type":53,"value":13229},{"type":43,"tag":395,"props":13908,"children":13909},{"style":402},[13910],{"type":53,"value":1243},{"type":43,"tag":395,"props":13912,"children":13913},{"style":492},[13914],{"type":53,"value":13458},{"type":43,"tag":395,"props":13916,"children":13917},{"style":402},[13918],{"type":53,"value":1243},{"type":43,"tag":395,"props":13920,"children":13921},{"style":1108},[13922],{"type":53,"value":13467},{"type":43,"tag":395,"props":13924,"children":13925},{"style":492},[13926],{"type":53,"value":13374},{"type":43,"tag":395,"props":13928,"children":13929},{"style":402},[13930],{"type":53,"value":500},{"type":43,"tag":395,"props":13932,"children":13933},{"style":402},[13934],{"type":53,"value":489},{"type":43,"tag":395,"props":13936,"children":13937},{"style":1192},[13938],{"type":53,"value":13484},{"type":43,"tag":395,"props":13940,"children":13941},{"style":402},[13942],{"type":53,"value":109},{"type":43,"tag":395,"props":13944,"children":13945},{"style":402},[13946],{"type":53,"value":13291},{"type":43,"tag":395,"props":13948,"children":13949},{"style":408},[13950],{"type":53,"value":13497},{"type":43,"tag":395,"props":13952,"children":13953},{"style":402},[13954],{"type":53,"value":13301},{"type":43,"tag":395,"props":13956,"children":13957},{"style":402},[13958],{"type":53,"value":537},{"type":43,"tag":395,"props":13960,"children":13961},{"style":492},[13962],{"type":53,"value":1137},{"type":43,"tag":395,"props":13964,"children":13965},{"style":402},[13966],{"type":53,"value":560},{"type":43,"tag":395,"props":13968,"children":13969},{"class":397,"line":979},[13970],{"type":43,"tag":395,"props":13971,"children":13972},{"emptyLinePlaceholder":667},[13973],{"type":53,"value":670},{"type":43,"tag":395,"props":13975,"children":13976},{"class":397,"line":988},[13977],{"type":43,"tag":395,"props":13978,"children":13979},{"style":423},[13980],{"type":53,"value":13981},"\u002F\u002F Hooks\n",{"type":43,"tag":395,"props":13983,"children":13984},{"class":397,"line":996},[13985,13989,13993,13997,14001,14005,14009,14014,14018,14022,14027],{"type":43,"tag":395,"props":13986,"children":13987},{"style":1097},[13988],{"type":53,"value":3353},{"type":43,"tag":395,"props":13990,"children":13991},{"style":492},[13992],{"type":53,"value":12569},{"type":43,"tag":395,"props":13994,"children":13995},{"style":402},[13996],{"type":53,"value":3363},{"type":43,"tag":395,"props":13998,"children":13999},{"style":481},[14000],{"type":53,"value":1185},{"type":43,"tag":395,"props":14002,"children":14003},{"style":492},[14004],{"type":53,"value":13229},{"type":43,"tag":395,"props":14006,"children":14007},{"style":402},[14008],{"type":53,"value":1243},{"type":43,"tag":395,"props":14010,"children":14011},{"style":492},[14012],{"type":53,"value":14013},"hooks",{"type":43,"tag":395,"props":14015,"children":14016},{"style":402},[14017],{"type":53,"value":1243},{"type":43,"tag":395,"props":14019,"children":14020},{"style":1108},[14021],{"type":53,"value":9442},{"type":43,"tag":395,"props":14023,"children":14024},{"style":492},[14025],{"type":53,"value":14026},"(hookId)",{"type":43,"tag":395,"props":14028,"children":14029},{"style":402},[14030],{"type":53,"value":560},{"type":43,"tag":395,"props":14032,"children":14033},{"class":397,"line":1005},[14034,14038,14042,14046,14050,14054,14058,14062,14066,14071,14076],{"type":43,"tag":395,"props":14035,"children":14036},{"style":1097},[14037],{"type":53,"value":3353},{"type":43,"tag":395,"props":14039,"children":14040},{"style":492},[14041],{"type":53,"value":12569},{"type":43,"tag":395,"props":14043,"children":14044},{"style":402},[14045],{"type":53,"value":3363},{"type":43,"tag":395,"props":14047,"children":14048},{"style":481},[14049],{"type":53,"value":1185},{"type":43,"tag":395,"props":14051,"children":14052},{"style":492},[14053],{"type":53,"value":13229},{"type":43,"tag":395,"props":14055,"children":14056},{"style":402},[14057],{"type":53,"value":1243},{"type":43,"tag":395,"props":14059,"children":14060},{"style":492},[14061],{"type":53,"value":14013},{"type":43,"tag":395,"props":14063,"children":14064},{"style":402},[14065],{"type":53,"value":1243},{"type":43,"tag":395,"props":14067,"children":14068},{"style":1108},[14069],{"type":53,"value":14070},"getByToken",{"type":43,"tag":395,"props":14072,"children":14073},{"style":492},[14074],{"type":53,"value":14075},"(token)",{"type":43,"tag":395,"props":14077,"children":14078},{"style":402},[14079],{"type":53,"value":560},{"type":43,"tag":395,"props":14081,"children":14082},{"class":397,"line":1568},[14083],{"type":43,"tag":395,"props":14084,"children":14085},{"emptyLinePlaceholder":667},[14086],{"type":53,"value":670},{"type":43,"tag":395,"props":14088,"children":14089},{"class":397,"line":1609},[14090],{"type":43,"tag":395,"props":14091,"children":14092},{"style":423},[14093],{"type":53,"value":14094},"\u002F\u002F Streams (methods on world.streams)\n",{"type":43,"tag":395,"props":14096,"children":14097},{"class":397,"line":1650},[14098,14102,14106,14110,14115,14119,14123,14127,14131,14136,14140,14145],{"type":43,"tag":395,"props":14099,"children":14100},{"style":481},[14101],{"type":53,"value":12603},{"type":43,"tag":395,"props":14103,"children":14104},{"style":492},[14105],{"type":53,"value":13229},{"type":43,"tag":395,"props":14107,"children":14108},{"style":402},[14109],{"type":53,"value":1243},{"type":43,"tag":395,"props":14111,"children":14112},{"style":492},[14113],{"type":53,"value":14114},"streams",{"type":43,"tag":395,"props":14116,"children":14117},{"style":402},[14118],{"type":53,"value":1243},{"type":43,"tag":395,"props":14120,"children":14121},{"style":1108},[14122],{"type":53,"value":6547},{"type":43,"tag":395,"props":14124,"children":14125},{"style":492},[14126],{"type":53,"value":13374},{"type":43,"tag":395,"props":14128,"children":14129},{"style":402},[14130],{"type":53,"value":500},{"type":43,"tag":395,"props":14132,"children":14133},{"style":492},[14134],{"type":53,"value":14135}," name",{"type":43,"tag":395,"props":14137,"children":14138},{"style":402},[14139],{"type":53,"value":500},{"type":43,"tag":395,"props":14141,"children":14142},{"style":492},[14143],{"type":53,"value":14144}," chunk)",{"type":43,"tag":395,"props":14146,"children":14147},{"style":402},[14148],{"type":53,"value":560},{"type":43,"tag":395,"props":14150,"children":14151},{"class":397,"line":1690},[14152,14156,14160,14164,14168,14172,14177,14182,14186,14190,14194,14198,14203],{"type":43,"tag":395,"props":14153,"children":14154},{"style":481},[14155],{"type":53,"value":12603},{"type":43,"tag":395,"props":14157,"children":14158},{"style":492},[14159],{"type":53,"value":13229},{"type":43,"tag":395,"props":14161,"children":14162},{"style":402},[14163],{"type":53,"value":1243},{"type":43,"tag":395,"props":14165,"children":14166},{"style":492},[14167],{"type":53,"value":14114},{"type":43,"tag":395,"props":14169,"children":14170},{"style":402},[14171],{"type":53,"value":1243},{"type":43,"tag":395,"props":14173,"children":14174},{"style":1108},[14175],{"type":53,"value":14176},"writeMulti",{"type":43,"tag":395,"props":14178,"children":14179},{"style":402},[14180],{"type":53,"value":14181},"?.",{"type":43,"tag":395,"props":14183,"children":14184},{"style":492},[14185],{"type":53,"value":13374},{"type":43,"tag":395,"props":14187,"children":14188},{"style":402},[14189],{"type":53,"value":500},{"type":43,"tag":395,"props":14191,"children":14192},{"style":492},[14193],{"type":53,"value":14135},{"type":43,"tag":395,"props":14195,"children":14196},{"style":402},[14197],{"type":53,"value":500},{"type":43,"tag":395,"props":14199,"children":14200},{"style":492},[14201],{"type":53,"value":14202}," chunks)",{"type":43,"tag":395,"props":14204,"children":14205},{"style":402},[14206],{"type":53,"value":560},{"type":43,"tag":395,"props":14208,"children":14209},{"class":397,"line":2677},[14210,14214,14219,14223,14227,14231,14235,14239,14243,14247,14251,14255,14259,14263,14268],{"type":43,"tag":395,"props":14211,"children":14212},{"style":1097},[14213],{"type":53,"value":3353},{"type":43,"tag":395,"props":14215,"children":14216},{"style":492},[14217],{"type":53,"value":14218}," readable ",{"type":43,"tag":395,"props":14220,"children":14221},{"style":402},[14222],{"type":53,"value":3363},{"type":43,"tag":395,"props":14224,"children":14225},{"style":481},[14226],{"type":53,"value":1185},{"type":43,"tag":395,"props":14228,"children":14229},{"style":492},[14230],{"type":53,"value":13229},{"type":43,"tag":395,"props":14232,"children":14233},{"style":402},[14234],{"type":53,"value":1243},{"type":43,"tag":395,"props":14236,"children":14237},{"style":492},[14238],{"type":53,"value":14114},{"type":43,"tag":395,"props":14240,"children":14241},{"style":402},[14242],{"type":53,"value":1243},{"type":43,"tag":395,"props":14244,"children":14245},{"style":1108},[14246],{"type":53,"value":9442},{"type":43,"tag":395,"props":14248,"children":14249},{"style":492},[14250],{"type":53,"value":13374},{"type":43,"tag":395,"props":14252,"children":14253},{"style":402},[14254],{"type":53,"value":500},{"type":43,"tag":395,"props":14256,"children":14257},{"style":492},[14258],{"type":53,"value":14135},{"type":43,"tag":395,"props":14260,"children":14261},{"style":402},[14262],{"type":53,"value":500},{"type":43,"tag":395,"props":14264,"children":14265},{"style":492},[14266],{"type":53,"value":14267}," startIndex)",{"type":43,"tag":395,"props":14269,"children":14270},{"style":402},[14271],{"type":53,"value":560},{"type":43,"tag":395,"props":14273,"children":14274},{"class":397,"line":2686},[14275,14279,14283,14287,14291,14295,14300,14304,14308,14313],{"type":43,"tag":395,"props":14276,"children":14277},{"style":481},[14278],{"type":53,"value":12603},{"type":43,"tag":395,"props":14280,"children":14281},{"style":492},[14282],{"type":53,"value":13229},{"type":43,"tag":395,"props":14284,"children":14285},{"style":402},[14286],{"type":53,"value":1243},{"type":43,"tag":395,"props":14288,"children":14289},{"style":492},[14290],{"type":53,"value":14114},{"type":43,"tag":395,"props":14292,"children":14293},{"style":402},[14294],{"type":53,"value":1243},{"type":43,"tag":395,"props":14296,"children":14297},{"style":1108},[14298],{"type":53,"value":14299},"close",{"type":43,"tag":395,"props":14301,"children":14302},{"style":492},[14303],{"type":53,"value":13374},{"type":43,"tag":395,"props":14305,"children":14306},{"style":402},[14307],{"type":53,"value":500},{"type":43,"tag":395,"props":14309,"children":14310},{"style":492},[14311],{"type":53,"value":14312}," name)",{"type":43,"tag":395,"props":14314,"children":14315},{"style":402},[14316],{"type":53,"value":560},{"type":43,"tag":395,"props":14318,"children":14319},{"class":397,"line":2702},[14320,14324,14329,14333,14337,14341,14345,14349,14353,14357,14362],{"type":43,"tag":395,"props":14321,"children":14322},{"style":1097},[14323],{"type":53,"value":3353},{"type":43,"tag":395,"props":14325,"children":14326},{"style":492},[14327],{"type":53,"value":14328}," streamNames ",{"type":43,"tag":395,"props":14330,"children":14331},{"style":402},[14332],{"type":53,"value":3363},{"type":43,"tag":395,"props":14334,"children":14335},{"style":481},[14336],{"type":53,"value":1185},{"type":43,"tag":395,"props":14338,"children":14339},{"style":492},[14340],{"type":53,"value":13229},{"type":43,"tag":395,"props":14342,"children":14343},{"style":402},[14344],{"type":53,"value":1243},{"type":43,"tag":395,"props":14346,"children":14347},{"style":492},[14348],{"type":53,"value":14114},{"type":43,"tag":395,"props":14350,"children":14351},{"style":402},[14352],{"type":53,"value":1243},{"type":43,"tag":395,"props":14354,"children":14355},{"style":1108},[14356],{"type":53,"value":13247},{"type":43,"tag":395,"props":14358,"children":14359},{"style":492},[14360],{"type":53,"value":14361},"(runId)",{"type":43,"tag":395,"props":14363,"children":14364},{"style":402},[14365],{"type":53,"value":560},{"type":43,"tag":395,"props":14367,"children":14368},{"class":397,"line":2710},[14369,14373,14378,14382,14386,14390,14394,14398,14402,14407,14411,14415,14419,14423,14427,14432,14436,14440,14444,14448],{"type":43,"tag":395,"props":14370,"children":14371},{"style":1097},[14372],{"type":53,"value":3353},{"type":43,"tag":395,"props":14374,"children":14375},{"style":492},[14376],{"type":53,"value":14377}," chunks ",{"type":43,"tag":395,"props":14379,"children":14380},{"style":402},[14381],{"type":53,"value":3363},{"type":43,"tag":395,"props":14383,"children":14384},{"style":481},[14385],{"type":53,"value":1185},{"type":43,"tag":395,"props":14387,"children":14388},{"style":492},[14389],{"type":53,"value":13229},{"type":43,"tag":395,"props":14391,"children":14392},{"style":402},[14393],{"type":53,"value":1243},{"type":43,"tag":395,"props":14395,"children":14396},{"style":492},[14397],{"type":53,"value":14114},{"type":43,"tag":395,"props":14399,"children":14400},{"style":402},[14401],{"type":53,"value":1243},{"type":43,"tag":395,"props":14403,"children":14404},{"style":1108},[14405],{"type":53,"value":14406},"getChunks",{"type":43,"tag":395,"props":14408,"children":14409},{"style":492},[14410],{"type":53,"value":13374},{"type":43,"tag":395,"props":14412,"children":14413},{"style":402},[14414],{"type":53,"value":500},{"type":43,"tag":395,"props":14416,"children":14417},{"style":492},[14418],{"type":53,"value":14135},{"type":43,"tag":395,"props":14420,"children":14421},{"style":402},[14422],{"type":53,"value":500},{"type":43,"tag":395,"props":14424,"children":14425},{"style":402},[14426],{"type":53,"value":489},{"type":43,"tag":395,"props":14428,"children":14429},{"style":492},[14430],{"type":53,"value":14431}," limit",{"type":43,"tag":395,"props":14433,"children":14434},{"style":402},[14435],{"type":53,"value":500},{"type":43,"tag":395,"props":14437,"children":14438},{"style":492},[14439],{"type":53,"value":13212},{"type":43,"tag":395,"props":14441,"children":14442},{"style":402},[14443],{"type":53,"value":2326},{"type":43,"tag":395,"props":14445,"children":14446},{"style":492},[14447],{"type":53,"value":1137},{"type":43,"tag":395,"props":14449,"children":14450},{"style":402},[14451],{"type":53,"value":560},{"type":43,"tag":395,"props":14453,"children":14454},{"class":397,"line":2752},[14455,14459,14464,14468,14472,14476,14480,14484,14488,14493,14497,14501,14505],{"type":43,"tag":395,"props":14456,"children":14457},{"style":1097},[14458],{"type":53,"value":3353},{"type":43,"tag":395,"props":14460,"children":14461},{"style":492},[14462],{"type":53,"value":14463}," info ",{"type":43,"tag":395,"props":14465,"children":14466},{"style":402},[14467],{"type":53,"value":3363},{"type":43,"tag":395,"props":14469,"children":14470},{"style":481},[14471],{"type":53,"value":1185},{"type":43,"tag":395,"props":14473,"children":14474},{"style":492},[14475],{"type":53,"value":13229},{"type":43,"tag":395,"props":14477,"children":14478},{"style":402},[14479],{"type":53,"value":1243},{"type":43,"tag":395,"props":14481,"children":14482},{"style":492},[14483],{"type":53,"value":14114},{"type":43,"tag":395,"props":14485,"children":14486},{"style":402},[14487],{"type":53,"value":1243},{"type":43,"tag":395,"props":14489,"children":14490},{"style":1108},[14491],{"type":53,"value":14492},"getInfo",{"type":43,"tag":395,"props":14494,"children":14495},{"style":492},[14496],{"type":53,"value":13374},{"type":43,"tag":395,"props":14498,"children":14499},{"style":402},[14500],{"type":53,"value":500},{"type":43,"tag":395,"props":14502,"children":14503},{"style":492},[14504],{"type":53,"value":14312},{"type":43,"tag":395,"props":14506,"children":14507},{"style":402},[14508],{"type":53,"value":560},{"type":43,"tag":395,"props":14510,"children":14511},{"class":397,"line":2827},[14512],{"type":43,"tag":395,"props":14513,"children":14514},{"emptyLinePlaceholder":667},[14515],{"type":53,"value":670},{"type":43,"tag":395,"props":14517,"children":14518},{"class":397,"line":2867},[14519],{"type":43,"tag":395,"props":14520,"children":14521},{"style":423},[14522],{"type":53,"value":14523},"\u002F\u002F Queue (methods live directly on world — internal SDK infrastructure)\n",{"type":43,"tag":395,"props":14525,"children":14526},{"class":397,"line":2890},[14527,14531,14535,14539,14544,14549,14553,14558,14562,14567],{"type":43,"tag":395,"props":14528,"children":14529},{"style":481},[14530],{"type":53,"value":12603},{"type":43,"tag":395,"props":14532,"children":14533},{"style":492},[14534],{"type":53,"value":13229},{"type":43,"tag":395,"props":14536,"children":14537},{"style":402},[14538],{"type":53,"value":1243},{"type":43,"tag":395,"props":14540,"children":14541},{"style":1108},[14542],{"type":53,"value":14543},"queue",{"type":43,"tag":395,"props":14545,"children":14546},{"style":492},[14547],{"type":53,"value":14548},"(queueName",{"type":43,"tag":395,"props":14550,"children":14551},{"style":402},[14552],{"type":53,"value":500},{"type":43,"tag":395,"props":14554,"children":14555},{"style":492},[14556],{"type":53,"value":14557}," payload",{"type":43,"tag":395,"props":14559,"children":14560},{"style":402},[14561],{"type":53,"value":500},{"type":43,"tag":395,"props":14563,"children":14564},{"style":492},[14565],{"type":53,"value":14566}," opts)",{"type":43,"tag":395,"props":14568,"children":14569},{"style":402},[14570],{"type":53,"value":560},{"type":43,"tag":395,"props":14572,"children":14573},{"class":397,"line":2906},[14574,14578,14583,14587,14591,14595,14599,14604,14608],{"type":43,"tag":395,"props":14575,"children":14576},{"style":1097},[14577],{"type":53,"value":3353},{"type":43,"tag":395,"props":14579,"children":14580},{"style":492},[14581],{"type":53,"value":14582}," deploymentId ",{"type":43,"tag":395,"props":14584,"children":14585},{"style":402},[14586],{"type":53,"value":3363},{"type":43,"tag":395,"props":14588,"children":14589},{"style":481},[14590],{"type":53,"value":1185},{"type":43,"tag":395,"props":14592,"children":14593},{"style":492},[14594],{"type":53,"value":13229},{"type":43,"tag":395,"props":14596,"children":14597},{"style":402},[14598],{"type":53,"value":1243},{"type":43,"tag":395,"props":14600,"children":14601},{"style":1108},[14602],{"type":53,"value":14603},"getDeploymentId",{"type":43,"tag":395,"props":14605,"children":14606},{"style":492},[14607],{"type":53,"value":1253},{"type":43,"tag":395,"props":14609,"children":14610},{"style":402},[14611],{"type":53,"value":560},{"type":43,"tag":329,"props":14613,"children":14615},{"id":14614},"resolvedata-parameter",[14616,14622],{"type":43,"tag":58,"props":14617,"children":14619},{"className":14618},[],[14620],{"type":53,"value":14621},"resolveData",{"type":53,"value":14623}," Parameter",{"type":43,"tag":66,"props":14625,"children":14626},{},[14627,14629,14634,14636,14642,14644,14650],{"type":53,"value":14628},"Controls whether input\u002Foutput data is ",{"type":43,"tag":119,"props":14630,"children":14631},{},[14632],{"type":53,"value":14633},"included",{"type":53,"value":14635}," in the response. Accepts ",{"type":43,"tag":58,"props":14637,"children":14639},{"className":14638},[],[14640],{"type":53,"value":14641},"'all'",{"type":53,"value":14643}," (default) or ",{"type":43,"tag":58,"props":14645,"children":14647},{"className":14646},[],[14648],{"type":53,"value":14649},"'none'",{"type":53,"value":1243},{"type":43,"tag":66,"props":14652,"children":14653},{},[14654,14659,14661,14666,14668,14674],{"type":43,"tag":119,"props":14655,"children":14656},{},[14657],{"type":53,"value":14658},"IMPORTANT",{"type":53,"value":14660},": Even with ",{"type":43,"tag":58,"props":14662,"children":14664},{"className":14663},[],[14665],{"type":53,"value":14641},{"type":53,"value":14667},", data is still devalue-serialized. You MUST call ",{"type":43,"tag":58,"props":14669,"children":14671},{"className":14670},[],[14672],{"type":53,"value":14673},"hydrateResourceIO()",{"type":53,"value":14675}," to get usable JS values.",{"type":43,"tag":159,"props":14677,"children":14678},{},[14679,14693],{"type":43,"tag":115,"props":14680,"children":14681},{},[14682,14691],{"type":43,"tag":119,"props":14683,"children":14684},{},[14685,14686],{"type":53,"value":1801},{"type":43,"tag":58,"props":14687,"children":14689},{"className":14688},[],[14690],{"type":53,"value":14649},{"type":53,"value":14692}," for status polling, progress dashboards, run listings",{"type":43,"tag":115,"props":14694,"children":14695},{},[14696,14705,14707],{"type":43,"tag":119,"props":14697,"children":14698},{},[14699,14700],{"type":53,"value":1801},{"type":43,"tag":58,"props":14701,"children":14703},{"className":14702},[],[14704],{"type":53,"value":14641},{"type":53,"value":14706}," (or omit) when you need to inspect actual step I\u002FO data — then ",{"type":43,"tag":119,"props":14708,"children":14709},{},[14710],{"type":53,"value":14711},"always hydrate",{"type":43,"tag":384,"props":14713,"children":14715},{"className":386,"code":14714,"language":388,"meta":389,"style":389},"\u002F\u002F Lightweight status check — no I\u002FO loaded\nconst run = await world.runs.get(runId, { resolveData: 'none' });\nconsole.log(run.status); \u002F\u002F 'running' | 'completed' | 'failed' | 'cancelled'\n\n\u002F\u002F Full inspection — resolveData includes data, hydrateResourceIO deserializes it\nconst step = await world.steps.get(runId, stepId); \u002F\u002F defaults to 'all'\nconst hydrated = hydrateResourceIO(step, observabilityRevivers);\n",[14716],{"type":43,"tag":58,"props":14717,"children":14718},{"__ignoreMap":389},[14719,14727,14810,14850,14857,14865,14926],{"type":43,"tag":395,"props":14720,"children":14721},{"class":397,"line":398},[14722],{"type":43,"tag":395,"props":14723,"children":14724},{"style":423},[14725],{"type":53,"value":14726},"\u002F\u002F Lightweight status check — no I\u002FO loaded\n",{"type":43,"tag":395,"props":14728,"children":14729},{"class":397,"line":429},[14730,14734,14738,14742,14746,14750,14754,14758,14762,14766,14770,14774,14778,14782,14786,14790,14794,14798,14802,14806],{"type":43,"tag":395,"props":14731,"children":14732},{"style":1097},[14733],{"type":53,"value":3353},{"type":43,"tag":395,"props":14735,"children":14736},{"style":492},[14737],{"type":53,"value":3358},{"type":43,"tag":395,"props":14739,"children":14740},{"style":402},[14741],{"type":53,"value":3363},{"type":43,"tag":395,"props":14743,"children":14744},{"style":481},[14745],{"type":53,"value":1185},{"type":43,"tag":395,"props":14747,"children":14748},{"style":492},[14749],{"type":53,"value":13229},{"type":43,"tag":395,"props":14751,"children":14752},{"style":402},[14753],{"type":53,"value":1243},{"type":43,"tag":395,"props":14755,"children":14756},{"style":492},[14757],{"type":53,"value":13238},{"type":43,"tag":395,"props":14759,"children":14760},{"style":402},[14761],{"type":53,"value":1243},{"type":43,"tag":395,"props":14763,"children":14764},{"style":1108},[14765],{"type":53,"value":9442},{"type":43,"tag":395,"props":14767,"children":14768},{"style":492},[14769],{"type":53,"value":13374},{"type":43,"tag":395,"props":14771,"children":14772},{"style":402},[14773],{"type":53,"value":500},{"type":43,"tag":395,"props":14775,"children":14776},{"style":402},[14777],{"type":53,"value":489},{"type":43,"tag":395,"props":14779,"children":14780},{"style":1192},[14781],{"type":53,"value":13282},{"type":43,"tag":395,"props":14783,"children":14784},{"style":402},[14785],{"type":53,"value":109},{"type":43,"tag":395,"props":14787,"children":14788},{"style":402},[14789],{"type":53,"value":13291},{"type":43,"tag":395,"props":14791,"children":14792},{"style":408},[14793],{"type":53,"value":13314},{"type":43,"tag":395,"props":14795,"children":14796},{"style":402},[14797],{"type":53,"value":13301},{"type":43,"tag":395,"props":14799,"children":14800},{"style":402},[14801],{"type":53,"value":537},{"type":43,"tag":395,"props":14803,"children":14804},{"style":492},[14805],{"type":53,"value":1137},{"type":43,"tag":395,"props":14807,"children":14808},{"style":402},[14809],{"type":53,"value":560},{"type":43,"tag":395,"props":14811,"children":14812},{"class":397,"line":563},[14813,14818,14822,14827,14832,14836,14841,14845],{"type":43,"tag":395,"props":14814,"children":14815},{"style":492},[14816],{"type":53,"value":14817},"console",{"type":43,"tag":395,"props":14819,"children":14820},{"style":402},[14821],{"type":53,"value":1243},{"type":43,"tag":395,"props":14823,"children":14824},{"style":1108},[14825],{"type":53,"value":14826},"log",{"type":43,"tag":395,"props":14828,"children":14829},{"style":492},[14830],{"type":53,"value":14831},"(run",{"type":43,"tag":395,"props":14833,"children":14834},{"style":402},[14835],{"type":53,"value":1243},{"type":43,"tag":395,"props":14837,"children":14838},{"style":492},[14839],{"type":53,"value":14840},"status)",{"type":43,"tag":395,"props":14842,"children":14843},{"style":402},[14844],{"type":53,"value":420},{"type":43,"tag":395,"props":14846,"children":14847},{"style":423},[14848],{"type":53,"value":14849}," \u002F\u002F 'running' | 'completed' | 'failed' | 'cancelled'\n",{"type":43,"tag":395,"props":14851,"children":14852},{"class":397,"line":613},[14853],{"type":43,"tag":395,"props":14854,"children":14855},{"emptyLinePlaceholder":667},[14856],{"type":53,"value":670},{"type":43,"tag":395,"props":14858,"children":14859},{"class":397,"line":663},[14860],{"type":43,"tag":395,"props":14861,"children":14862},{"style":423},[14863],{"type":53,"value":14864},"\u002F\u002F Full inspection — resolveData includes data, hydrateResourceIO deserializes it\n",{"type":43,"tag":395,"props":14866,"children":14867},{"class":397,"line":673},[14868,14872,14876,14880,14884,14888,14892,14896,14900,14904,14908,14912,14917,14921],{"type":43,"tag":395,"props":14869,"children":14870},{"style":1097},[14871],{"type":53,"value":3353},{"type":43,"tag":395,"props":14873,"children":14874},{"style":492},[14875],{"type":53,"value":13680},{"type":43,"tag":395,"props":14877,"children":14878},{"style":402},[14879],{"type":53,"value":3363},{"type":43,"tag":395,"props":14881,"children":14882},{"style":481},[14883],{"type":53,"value":1185},{"type":43,"tag":395,"props":14885,"children":14886},{"style":492},[14887],{"type":53,"value":13229},{"type":43,"tag":395,"props":14889,"children":14890},{"style":402},[14891],{"type":53,"value":1243},{"type":43,"tag":395,"props":14893,"children":14894},{"style":492},[14895],{"type":53,"value":13576},{"type":43,"tag":395,"props":14897,"children":14898},{"style":402},[14899],{"type":53,"value":1243},{"type":43,"tag":395,"props":14901,"children":14902},{"style":1108},[14903],{"type":53,"value":9442},{"type":43,"tag":395,"props":14905,"children":14906},{"style":492},[14907],{"type":53,"value":13374},{"type":43,"tag":395,"props":14909,"children":14910},{"style":402},[14911],{"type":53,"value":500},{"type":43,"tag":395,"props":14913,"children":14914},{"style":492},[14915],{"type":53,"value":14916}," stepId)",{"type":43,"tag":395,"props":14918,"children":14919},{"style":402},[14920],{"type":53,"value":420},{"type":43,"tag":395,"props":14922,"children":14923},{"style":423},[14924],{"type":53,"value":14925}," \u002F\u002F defaults to 'all'\n",{"type":43,"tag":395,"props":14927,"children":14928},{"class":397,"line":682},[14929,14933,14938,14942,14946,14951,14955,14960],{"type":43,"tag":395,"props":14930,"children":14931},{"style":1097},[14932],{"type":53,"value":3353},{"type":43,"tag":395,"props":14934,"children":14935},{"style":492},[14936],{"type":53,"value":14937}," hydrated ",{"type":43,"tag":395,"props":14939,"children":14940},{"style":402},[14941],{"type":53,"value":3363},{"type":43,"tag":395,"props":14943,"children":14944},{"style":1108},[14945],{"type":53,"value":782},{"type":43,"tag":395,"props":14947,"children":14948},{"style":492},[14949],{"type":53,"value":14950},"(step",{"type":43,"tag":395,"props":14952,"children":14953},{"style":402},[14954],{"type":53,"value":500},{"type":43,"tag":395,"props":14956,"children":14957},{"style":492},[14958],{"type":53,"value":14959}," observabilityRevivers)",{"type":43,"tag":395,"props":14961,"children":14962},{"style":402},[14963],{"type":53,"value":560},{"type":43,"tag":14965,"props":14966,"children":14967},"blockquote",{},[14968],{"type":43,"tag":66,"props":14969,"children":14970},{},[14971,14976,14978,14984,14986,14992],{"type":43,"tag":119,"props":14972,"children":14973},{},[14974],{"type":53,"value":14975},"Common mistake",{"type":53,"value":14977},": Checking ",{"type":43,"tag":58,"props":14979,"children":14981},{"className":14980},[],[14982],{"type":53,"value":14983},"step.input !== undefined",{"type":53,"value":14985}," after ",{"type":43,"tag":58,"props":14987,"children":14989},{"className":14988},[],[14990],{"type":53,"value":14991},"resolveData: 'all'",{"type":53,"value":14993}," and assuming\nthe data is ready to use. The data exists but is serialized — always hydrate first.",{"type":43,"tag":329,"props":14995,"children":14997},{"id":14996},"data-hydration-devalue-format",[14998],{"type":53,"value":14999},"Data Hydration (Devalue Format)",{"type":43,"tag":66,"props":15001,"children":15002},{},[15003,15005,15012,15014,15020,15022,15028,15029,15035,15037,15043],{"type":53,"value":15004},"Step I\u002FO is serialized via ",{"type":43,"tag":348,"props":15006,"children":15009},{"href":15007,"rel":15008},"https:\u002F\u002Fgithub.com\u002FRich-Harris\u002Fdevalue",[352],[15010],{"type":53,"value":15011},"devalue",{"type":53,"value":15013}," with a 4-byte format prefix (",{"type":43,"tag":58,"props":15015,"children":15017},{"className":15016},[],[15018],{"type":53,"value":15019},"devl",{"type":53,"value":15021},"). Without hydration, ",{"type":43,"tag":58,"props":15023,"children":15025},{"className":15024},[],[15026],{"type":53,"value":15027},"input",{"type":53,"value":1790},{"type":43,"tag":58,"props":15030,"children":15032},{"className":15031},[],[15033],{"type":53,"value":15034},"output",{"type":53,"value":15036}," are Uint8Array-like objects with numeric keys:\n",{"type":43,"tag":58,"props":15038,"children":15040},{"className":15039},[],[15041],{"type":53,"value":15042},"{\"0\":100,\"1\":101,\"2\":118,\"3\":108,...}",{"type":53,"value":15044}," — these are NOT usable values.",{"type":43,"tag":66,"props":15046,"children":15047},{},[15048],{"type":43,"tag":119,"props":15049,"children":15050},{},[15051],{"type":53,"value":15052},"Always hydrate before using I\u002FO data:",{"type":43,"tag":384,"props":15054,"children":15056},{"className":386,"code":15055,"language":388,"meta":389,"style":389},"import { hydrateResourceIO, observabilityRevivers } from \"workflow\u002Fobservability\";\n\nconst { data: steps } = await world.steps.list({ runId, resolveData: 'all' });\nconst hydrated = steps.map(s => hydrateResourceIO(s, observabilityRevivers));\n\u002F\u002F hydrated[0].input → [123, 2] (actual function arguments)\n\u002F\u002F hydrated[0].output → 125 (actual return value)\n",[15057],{"type":43,"tag":58,"props":15058,"children":15059},{"__ignoreMap":389},[15060,15107,15114,15218,15282,15290],{"type":43,"tag":395,"props":15061,"children":15062},{"class":397,"line":398},[15063,15067,15071,15075,15079,15083,15087,15091,15095,15099,15103],{"type":43,"tag":395,"props":15064,"children":15065},{"style":481},[15066],{"type":53,"value":484},{"type":43,"tag":395,"props":15068,"children":15069},{"style":402},[15070],{"type":53,"value":489},{"type":43,"tag":395,"props":15072,"children":15073},{"style":492},[15074],{"type":53,"value":782},{"type":43,"tag":395,"props":15076,"children":15077},{"style":402},[15078],{"type":53,"value":500},{"type":43,"tag":395,"props":15080,"children":15081},{"style":492},[15082],{"type":53,"value":791},{"type":43,"tag":395,"props":15084,"children":15085},{"style":402},[15086],{"type":53,"value":537},{"type":43,"tag":395,"props":15088,"children":15089},{"style":481},[15090],{"type":53,"value":542},{"type":43,"tag":395,"props":15092,"children":15093},{"style":402},[15094],{"type":53,"value":547},{"type":43,"tag":395,"props":15096,"children":15097},{"style":408},[15098],{"type":53,"value":826},{"type":43,"tag":395,"props":15100,"children":15101},{"style":402},[15102],{"type":53,"value":405},{"type":43,"tag":395,"props":15104,"children":15105},{"style":402},[15106],{"type":53,"value":560},{"type":43,"tag":395,"props":15108,"children":15109},{"class":397,"line":429},[15110],{"type":43,"tag":395,"props":15111,"children":15112},{"emptyLinePlaceholder":667},[15113],{"type":53,"value":670},{"type":43,"tag":395,"props":15115,"children":15116},{"class":397,"line":563},[15117,15121,15125,15129,15133,15138,15142,15146,15150,15154,15158,15162,15166,15170,15174,15178,15182,15186,15190,15194,15198,15202,15206,15210,15214],{"type":43,"tag":395,"props":15118,"children":15119},{"style":1097},[15120],{"type":53,"value":3353},{"type":43,"tag":395,"props":15122,"children":15123},{"style":402},[15124],{"type":53,"value":489},{"type":43,"tag":395,"props":15126,"children":15127},{"style":1192},[15128],{"type":53,"value":1578},{"type":43,"tag":395,"props":15130,"children":15131},{"style":402},[15132],{"type":53,"value":109},{"type":43,"tag":395,"props":15134,"children":15135},{"style":492},[15136],{"type":53,"value":15137}," steps ",{"type":43,"tag":395,"props":15139,"children":15140},{"style":402},[15141],{"type":53,"value":2326},{"type":43,"tag":395,"props":15143,"children":15144},{"style":402},[15145],{"type":53,"value":1180},{"type":43,"tag":395,"props":15147,"children":15148},{"style":481},[15149],{"type":53,"value":1185},{"type":43,"tag":395,"props":15151,"children":15152},{"style":492},[15153],{"type":53,"value":13229},{"type":43,"tag":395,"props":15155,"children":15156},{"style":402},[15157],{"type":53,"value":1243},{"type":43,"tag":395,"props":15159,"children":15160},{"style":492},[15161],{"type":53,"value":13576},{"type":43,"tag":395,"props":15163,"children":15164},{"style":402},[15165],{"type":53,"value":1243},{"type":43,"tag":395,"props":15167,"children":15168},{"style":1108},[15169],{"type":53,"value":13247},{"type":43,"tag":395,"props":15171,"children":15172},{"style":492},[15173],{"type":53,"value":1116},{"type":43,"tag":395,"props":15175,"children":15176},{"style":402},[15177],{"type":53,"value":2608},{"type":43,"tag":395,"props":15179,"children":15180},{"style":492},[15181],{"type":53,"value":3294},{"type":43,"tag":395,"props":15183,"children":15184},{"style":402},[15185],{"type":53,"value":500},{"type":43,"tag":395,"props":15187,"children":15188},{"style":1192},[15189],{"type":53,"value":13282},{"type":43,"tag":395,"props":15191,"children":15192},{"style":402},[15193],{"type":53,"value":109},{"type":43,"tag":395,"props":15195,"children":15196},{"style":402},[15197],{"type":53,"value":13291},{"type":43,"tag":395,"props":15199,"children":15200},{"style":408},[15201],{"type":53,"value":13296},{"type":43,"tag":395,"props":15203,"children":15204},{"style":402},[15205],{"type":53,"value":13301},{"type":43,"tag":395,"props":15207,"children":15208},{"style":402},[15209],{"type":53,"value":537},{"type":43,"tag":395,"props":15211,"children":15212},{"style":492},[15213],{"type":53,"value":1137},{"type":43,"tag":395,"props":15215,"children":15216},{"style":402},[15217],{"type":53,"value":560},{"type":43,"tag":395,"props":15219,"children":15220},{"class":397,"line":613},[15221,15225,15229,15233,15238,15242,15247,15251,15256,15260,15264,15269,15273,15278],{"type":43,"tag":395,"props":15222,"children":15223},{"style":1097},[15224],{"type":53,"value":3353},{"type":43,"tag":395,"props":15226,"children":15227},{"style":492},[15228],{"type":53,"value":14937},{"type":43,"tag":395,"props":15230,"children":15231},{"style":402},[15232],{"type":53,"value":3363},{"type":43,"tag":395,"props":15234,"children":15235},{"style":492},[15236],{"type":53,"value":15237}," steps",{"type":43,"tag":395,"props":15239,"children":15240},{"style":402},[15241],{"type":53,"value":1243},{"type":43,"tag":395,"props":15243,"children":15244},{"style":1108},[15245],{"type":53,"value":15246},"map",{"type":43,"tag":395,"props":15248,"children":15249},{"style":492},[15250],{"type":53,"value":1116},{"type":43,"tag":395,"props":15252,"children":15253},{"style":1119},[15254],{"type":53,"value":15255},"s",{"type":43,"tag":395,"props":15257,"children":15258},{"style":1097},[15259],{"type":53,"value":11076},{"type":43,"tag":395,"props":15261,"children":15262},{"style":1108},[15263],{"type":53,"value":782},{"type":43,"tag":395,"props":15265,"children":15266},{"style":492},[15267],{"type":53,"value":15268},"(s",{"type":43,"tag":395,"props":15270,"children":15271},{"style":402},[15272],{"type":53,"value":500},{"type":43,"tag":395,"props":15274,"children":15275},{"style":492},[15276],{"type":53,"value":15277}," observabilityRevivers))",{"type":43,"tag":395,"props":15279,"children":15280},{"style":402},[15281],{"type":53,"value":560},{"type":43,"tag":395,"props":15283,"children":15284},{"class":397,"line":663},[15285],{"type":43,"tag":395,"props":15286,"children":15287},{"style":423},[15288],{"type":53,"value":15289},"\u002F\u002F hydrated[0].input → [123, 2] (actual function arguments)\n",{"type":43,"tag":395,"props":15291,"children":15292},{"class":397,"line":673},[15293],{"type":43,"tag":395,"props":15294,"children":15295},{"style":423},[15296],{"type":53,"value":15297},"\u002F\u002F hydrated[0].output → 125 (actual return value)\n",{"type":43,"tag":66,"props":15299,"children":15300},{},[15301,15307,15309,15315,15317,15323,15325,15331,15332,15338],{"type":43,"tag":58,"props":15302,"children":15304},{"className":15303},[],[15305],{"type":53,"value":15306},"hydrateResourceIO",{"type":53,"value":15308}," works on both ",{"type":43,"tag":58,"props":15310,"children":15312},{"className":15311},[],[15313],{"type":53,"value":15314},"Step",{"type":53,"value":15316}," and ",{"type":43,"tag":58,"props":15318,"children":15320},{"className":15319},[],[15321],{"type":53,"value":15322},"WorkflowRun",{"type":53,"value":15324}," objects. For encrypted workflows, use ",{"type":43,"tag":58,"props":15326,"children":15328},{"className":15327},[],[15329],{"type":53,"value":15330},"getEncryptionKeyForRun()",{"type":53,"value":3793},{"type":43,"tag":58,"props":15333,"children":15335},{"className":15334},[],[15336],{"type":53,"value":15337},"hydrateResourceIOWithKey()",{"type":53,"value":1243},{"type":43,"tag":329,"props":15340,"children":15342},{"id":15341},"name-parsing",[15343],{"type":53,"value":15344},"Name Parsing",{"type":43,"tag":66,"props":15346,"children":15347},{},[15348,15354,15355,15361,15363,15369,15371,15377],{"type":43,"tag":58,"props":15349,"children":15351},{"className":15350},[],[15352],{"type":53,"value":15353},"parseWorkflowName()",{"type":53,"value":3003},{"type":43,"tag":58,"props":15356,"children":15358},{"className":15357},[],[15359],{"type":53,"value":15360},"parseStepName()",{"type":53,"value":15362},", and ",{"type":43,"tag":58,"props":15364,"children":15366},{"className":15365},[],[15367],{"type":53,"value":15368},"parseClassName()",{"type":53,"value":15370}," return ",{"type":43,"tag":58,"props":15372,"children":15374},{"className":15373},[],[15375],{"type":53,"value":15376},"{ shortName: string, moduleSpecifier: string } | null",{"type":53,"value":15378},". Always use optional chaining:",{"type":43,"tag":384,"props":15380,"children":15382},{"className":386,"code":15381,"language":388,"meta":389,"style":389},"const parsed = parseWorkflowName(\"workflow\u002F\u002F.\u002Fsrc\u002Fworkflows\u002Forder\u002F\u002FprocessOrder\");\n\u002F\u002F parsed?.shortName → \"processOrder\"\n\u002F\u002F parsed?.moduleSpecifier → \".\u002Fsrc\u002Fworkflows\u002Forder\"\n\u002F\u002F ⚠️ Returns null if format doesn't match\n",[15383],{"type":43,"tag":58,"props":15384,"children":15385},{"__ignoreMap":389},[15386,15431,15439,15447],{"type":43,"tag":395,"props":15387,"children":15388},{"class":397,"line":398},[15389,15393,15398,15402,15406,15410,15414,15419,15423,15427],{"type":43,"tag":395,"props":15390,"children":15391},{"style":1097},[15392],{"type":53,"value":3353},{"type":43,"tag":395,"props":15394,"children":15395},{"style":492},[15396],{"type":53,"value":15397}," parsed ",{"type":43,"tag":395,"props":15399,"children":15400},{"style":402},[15401],{"type":53,"value":3363},{"type":43,"tag":395,"props":15403,"children":15404},{"style":1108},[15405],{"type":53,"value":809},{"type":43,"tag":395,"props":15407,"children":15408},{"style":492},[15409],{"type":53,"value":1116},{"type":43,"tag":395,"props":15411,"children":15412},{"style":402},[15413],{"type":53,"value":405},{"type":43,"tag":395,"props":15415,"children":15416},{"style":408},[15417],{"type":53,"value":15418},"workflow\u002F\u002F.\u002Fsrc\u002Fworkflows\u002Forder\u002F\u002FprocessOrder",{"type":43,"tag":395,"props":15420,"children":15421},{"style":402},[15422],{"type":53,"value":405},{"type":43,"tag":395,"props":15424,"children":15425},{"style":492},[15426],{"type":53,"value":1137},{"type":43,"tag":395,"props":15428,"children":15429},{"style":402},[15430],{"type":53,"value":560},{"type":43,"tag":395,"props":15432,"children":15433},{"class":397,"line":429},[15434],{"type":43,"tag":395,"props":15435,"children":15436},{"style":423},[15437],{"type":53,"value":15438},"\u002F\u002F parsed?.shortName → \"processOrder\"\n",{"type":43,"tag":395,"props":15440,"children":15441},{"class":397,"line":563},[15442],{"type":43,"tag":395,"props":15443,"children":15444},{"style":423},[15445],{"type":53,"value":15446},"\u002F\u002F parsed?.moduleSpecifier → \".\u002Fsrc\u002Fworkflows\u002Forder\"\n",{"type":43,"tag":395,"props":15448,"children":15449},{"class":397,"line":613},[15450],{"type":43,"tag":395,"props":15451,"children":15452},{"style":423},[15453],{"type":53,"value":15454},"\u002F\u002F ⚠️ Returns null if format doesn't match\n",{"type":43,"tag":329,"props":15456,"children":15458},{"id":15457},"event-types",[15459],{"type":53,"value":15460},"Event Types",{"type":43,"tag":66,"props":15462,"children":15463},{},[15464],{"type":53,"value":15465},"Events are the append-only source of truth. Runs\u002FSteps\u002FHooks are materialized views.",{"type":43,"tag":1718,"props":15467,"children":15468},{},[15469,15485],{"type":43,"tag":1722,"props":15470,"children":15471},{},[15472],{"type":43,"tag":1726,"props":15473,"children":15474},{},[15475,15480],{"type":43,"tag":1730,"props":15476,"children":15477},{},[15478],{"type":53,"value":15479},"Category",{"type":43,"tag":1730,"props":15481,"children":15482},{},[15483],{"type":53,"value":15484},"Types",{"type":43,"tag":1741,"props":15486,"children":15487},{},[15488,15532,15576,15614],{"type":43,"tag":1726,"props":15489,"children":15490},{},[15491,15496],{"type":43,"tag":1748,"props":15492,"children":15493},{},[15494],{"type":53,"value":15495},"Run",{"type":43,"tag":1748,"props":15497,"children":15498},{},[15499,15505,15506,15512,15513,15519,15520,15526,15527],{"type":43,"tag":58,"props":15500,"children":15502},{"className":15501},[],[15503],{"type":53,"value":15504},"run_created",{"type":53,"value":3003},{"type":43,"tag":58,"props":15507,"children":15509},{"className":15508},[],[15510],{"type":53,"value":15511},"run_started",{"type":53,"value":3003},{"type":43,"tag":58,"props":15514,"children":15516},{"className":15515},[],[15517],{"type":53,"value":15518},"run_completed",{"type":53,"value":3003},{"type":43,"tag":58,"props":15521,"children":15523},{"className":15522},[],[15524],{"type":53,"value":15525},"run_failed",{"type":53,"value":3003},{"type":43,"tag":58,"props":15528,"children":15530},{"className":15529},[],[15531],{"type":53,"value":13497},{"type":43,"tag":1726,"props":15533,"children":15534},{},[15535,15539],{"type":43,"tag":1748,"props":15536,"children":15537},{},[15538],{"type":53,"value":15314},{"type":43,"tag":1748,"props":15540,"children":15541},{},[15542,15548,15549,15555,15556,15562,15563,15569,15570],{"type":43,"tag":58,"props":15543,"children":15545},{"className":15544},[],[15546],{"type":53,"value":15547},"step_created",{"type":53,"value":3003},{"type":43,"tag":58,"props":15550,"children":15552},{"className":15551},[],[15553],{"type":53,"value":15554},"step_started",{"type":53,"value":3003},{"type":43,"tag":58,"props":15557,"children":15559},{"className":15558},[],[15560],{"type":53,"value":15561},"step_completed",{"type":53,"value":3003},{"type":43,"tag":58,"props":15564,"children":15566},{"className":15565},[],[15567],{"type":53,"value":15568},"step_failed",{"type":53,"value":3003},{"type":43,"tag":58,"props":15571,"children":15573},{"className":15572},[],[15574],{"type":53,"value":15575},"step_retrying",{"type":43,"tag":1726,"props":15577,"children":15578},{},[15579,15584],{"type":43,"tag":1748,"props":15580,"children":15581},{},[15582],{"type":53,"value":15583},"Hook",{"type":43,"tag":1748,"props":15585,"children":15586},{},[15587,15593,15594,15600,15601,15607,15608],{"type":43,"tag":58,"props":15588,"children":15590},{"className":15589},[],[15591],{"type":53,"value":15592},"hook_created",{"type":53,"value":3003},{"type":43,"tag":58,"props":15595,"children":15597},{"className":15596},[],[15598],{"type":53,"value":15599},"hook_received",{"type":53,"value":3003},{"type":43,"tag":58,"props":15602,"children":15604},{"className":15603},[],[15605],{"type":53,"value":15606},"hook_disposed",{"type":53,"value":3003},{"type":43,"tag":58,"props":15609,"children":15611},{"className":15610},[],[15612],{"type":53,"value":15613},"hook_conflict",{"type":43,"tag":1726,"props":15615,"children":15616},{},[15617,15622],{"type":43,"tag":1748,"props":15618,"children":15619},{},[15620],{"type":53,"value":15621},"Wait",{"type":43,"tag":1748,"props":15623,"children":15624},{},[15625,15631,15632],{"type":43,"tag":58,"props":15626,"children":15628},{"className":15627},[],[15629],{"type":53,"value":15630},"wait_created",{"type":53,"value":3003},{"type":43,"tag":58,"props":15633,"children":15635},{"className":15634},[],[15636],{"type":53,"value":15637},"wait_completed",{"type":43,"tag":44,"props":15639,"children":15641},{"id":15640},"error-handling-patterns",[15642],{"type":53,"value":15643},"Error Handling Patterns",{"type":43,"tag":66,"props":15645,"children":15646},{},[15647],{"type":53,"value":15648},"Three error strategies for different failure modes:",{"type":43,"tag":1718,"props":15650,"children":15651},{},[15652,15673],{"type":43,"tag":1722,"props":15653,"children":15654},{},[15655],{"type":43,"tag":1726,"props":15656,"children":15657},{},[15658,15663,15668],{"type":43,"tag":1730,"props":15659,"children":15660},{},[15661],{"type":53,"value":15662},"Error Type",{"type":43,"tag":1730,"props":15664,"children":15665},{},[15666],{"type":53,"value":15667},"Use When",{"type":43,"tag":1730,"props":15669,"children":15670},{},[15671],{"type":53,"value":15672},"Behavior",{"type":43,"tag":1741,"props":15674,"children":15675},{},[15676,15697,15726],{"type":43,"tag":1726,"props":15677,"children":15678},{},[15679,15687,15692],{"type":43,"tag":1748,"props":15680,"children":15681},{},[15682],{"type":43,"tag":58,"props":15683,"children":15685},{"className":15684},[],[15686],{"type":53,"value":4788},{"type":43,"tag":1748,"props":15688,"children":15689},{},[15690],{"type":53,"value":15691},"Permanent failure (bad input, auth denied)",{"type":43,"tag":1748,"props":15693,"children":15694},{},[15695],{"type":53,"value":15696},"Terminates workflow immediately, no retry",{"type":43,"tag":1726,"props":15698,"children":15699},{},[15700,15708,15713],{"type":43,"tag":1748,"props":15701,"children":15702},{},[15703],{"type":43,"tag":58,"props":15704,"children":15706},{"className":15705},[],[15707],{"type":53,"value":4796},{"type":43,"tag":1748,"props":15709,"children":15710},{},[15711],{"type":53,"value":15712},"Transient failure (rate limit, timeout)",{"type":43,"tag":1748,"props":15714,"children":15715},{},[15716,15718,15724],{"type":53,"value":15717},"Retries with optional ",{"type":43,"tag":58,"props":15719,"children":15721},{"className":15720},[],[15722],{"type":53,"value":15723},"retryAfter",{"type":53,"value":15725}," delay",{"type":43,"tag":1726,"props":15727,"children":15728},{},[15729,15738,15743],{"type":43,"tag":1748,"props":15730,"children":15731},{},[15732],{"type":43,"tag":58,"props":15733,"children":15735},{"className":15734},[],[15736],{"type":53,"value":15737},"Promise.allSettled",{"type":43,"tag":1748,"props":15739,"children":15740},{},[15741],{"type":53,"value":15742},"Parallel steps with mixed criticality",{"type":43,"tag":1748,"props":15744,"children":15745},{},[15746],{"type":53,"value":15747},"Continues even if some steps fail",{"type":43,"tag":384,"props":15749,"children":15751},{"className":386,"code":15750,"language":388,"meta":389,"style":389},"import { FatalError, RetryableError } from \"workflow\";\n\n\u002F\u002F Permanent failure — workflow terminates\nthrow new FatalError(\"Invalid input: missing required field\");\n\n\u002F\u002F Transient failure — will retry\nthrow new RetryableError(\"API rate limited\", { retryAfter: \"5m\" });\n\n\u002F\u002F Mixed criticality parallel execution\nconst results = await Promise.allSettled([\n  criticalStep(data),    \u002F\u002F Must succeed\n  optionalStep(data),    \u002F\u002F OK to fail\n  enrichmentStep(data),  \u002F\u002F OK to fail\n]);\nconst [critical, optional, enrichment] = results;\nif (critical.status === \"rejected\") throw new FatalError(critical.reason);\n",[15752],{"type":43,"tag":58,"props":15753,"children":15754},{"__ignoreMap":389},[15755,15802,15809,15817,15858,15865,15873,15945,15952,15960,15999,16020,16041,16062,16073,16123],{"type":43,"tag":395,"props":15756,"children":15757},{"class":397,"line":398},[15758,15762,15766,15770,15774,15778,15782,15786,15790,15794,15798],{"type":43,"tag":395,"props":15759,"children":15760},{"style":481},[15761],{"type":53,"value":484},{"type":43,"tag":395,"props":15763,"children":15764},{"style":402},[15765],{"type":53,"value":489},{"type":43,"tag":395,"props":15767,"children":15768},{"style":492},[15769],{"type":53,"value":577},{"type":43,"tag":395,"props":15771,"children":15772},{"style":402},[15773],{"type":53,"value":500},{"type":43,"tag":395,"props":15775,"children":15776},{"style":492},[15777],{"type":53,"value":586},{"type":43,"tag":395,"props":15779,"children":15780},{"style":402},[15781],{"type":53,"value":537},{"type":43,"tag":395,"props":15783,"children":15784},{"style":481},[15785],{"type":53,"value":542},{"type":43,"tag":395,"props":15787,"children":15788},{"style":402},[15789],{"type":53,"value":547},{"type":43,"tag":395,"props":15791,"children":15792},{"style":408},[15793],{"type":53,"value":4},{"type":43,"tag":395,"props":15795,"children":15796},{"style":402},[15797],{"type":53,"value":405},{"type":43,"tag":395,"props":15799,"children":15800},{"style":402},[15801],{"type":53,"value":560},{"type":43,"tag":395,"props":15803,"children":15804},{"class":397,"line":429},[15805],{"type":43,"tag":395,"props":15806,"children":15807},{"emptyLinePlaceholder":667},[15808],{"type":53,"value":670},{"type":43,"tag":395,"props":15810,"children":15811},{"class":397,"line":563},[15812],{"type":43,"tag":395,"props":15813,"children":15814},{"style":423},[15815],{"type":53,"value":15816},"\u002F\u002F Permanent failure — workflow terminates\n",{"type":43,"tag":395,"props":15818,"children":15819},{"class":397,"line":613},[15820,15825,15829,15833,15837,15841,15846,15850,15854],{"type":43,"tag":395,"props":15821,"children":15822},{"style":481},[15823],{"type":53,"value":15824},"throw",{"type":43,"tag":395,"props":15826,"children":15827},{"style":402},[15828],{"type":53,"value":2444},{"type":43,"tag":395,"props":15830,"children":15831},{"style":1108},[15832],{"type":53,"value":577},{"type":43,"tag":395,"props":15834,"children":15835},{"style":492},[15836],{"type":53,"value":1116},{"type":43,"tag":395,"props":15838,"children":15839},{"style":402},[15840],{"type":53,"value":405},{"type":43,"tag":395,"props":15842,"children":15843},{"style":408},[15844],{"type":53,"value":15845},"Invalid input: missing required field",{"type":43,"tag":395,"props":15847,"children":15848},{"style":402},[15849],{"type":53,"value":405},{"type":43,"tag":395,"props":15851,"children":15852},{"style":492},[15853],{"type":53,"value":1137},{"type":43,"tag":395,"props":15855,"children":15856},{"style":402},[15857],{"type":53,"value":560},{"type":43,"tag":395,"props":15859,"children":15860},{"class":397,"line":663},[15861],{"type":43,"tag":395,"props":15862,"children":15863},{"emptyLinePlaceholder":667},[15864],{"type":53,"value":670},{"type":43,"tag":395,"props":15866,"children":15867},{"class":397,"line":673},[15868],{"type":43,"tag":395,"props":15869,"children":15870},{"style":423},[15871],{"type":53,"value":15872},"\u002F\u002F Transient failure — will retry\n",{"type":43,"tag":395,"props":15874,"children":15875},{"class":397,"line":682},[15876,15880,15884,15888,15892,15896,15901,15905,15909,15913,15917,15921,15925,15929,15933,15937,15941],{"type":43,"tag":395,"props":15877,"children":15878},{"style":481},[15879],{"type":53,"value":15824},{"type":43,"tag":395,"props":15881,"children":15882},{"style":402},[15883],{"type":53,"value":2444},{"type":43,"tag":395,"props":15885,"children":15886},{"style":1108},[15887],{"type":53,"value":586},{"type":43,"tag":395,"props":15889,"children":15890},{"style":492},[15891],{"type":53,"value":1116},{"type":43,"tag":395,"props":15893,"children":15894},{"style":402},[15895],{"type":53,"value":405},{"type":43,"tag":395,"props":15897,"children":15898},{"style":408},[15899],{"type":53,"value":15900},"API rate limited",{"type":43,"tag":395,"props":15902,"children":15903},{"style":402},[15904],{"type":53,"value":405},{"type":43,"tag":395,"props":15906,"children":15907},{"style":402},[15908],{"type":53,"value":500},{"type":43,"tag":395,"props":15910,"children":15911},{"style":402},[15912],{"type":53,"value":489},{"type":43,"tag":395,"props":15914,"children":15915},{"style":1192},[15916],{"type":53,"value":5074},{"type":43,"tag":395,"props":15918,"children":15919},{"style":402},[15920],{"type":53,"value":109},{"type":43,"tag":395,"props":15922,"children":15923},{"style":402},[15924],{"type":53,"value":547},{"type":43,"tag":395,"props":15926,"children":15927},{"style":408},[15928],{"type":53,"value":5087},{"type":43,"tag":395,"props":15930,"children":15931},{"style":402},[15932],{"type":53,"value":405},{"type":43,"tag":395,"props":15934,"children":15935},{"style":402},[15936],{"type":53,"value":537},{"type":43,"tag":395,"props":15938,"children":15939},{"style":492},[15940],{"type":53,"value":1137},{"type":43,"tag":395,"props":15942,"children":15943},{"style":402},[15944],{"type":53,"value":560},{"type":43,"tag":395,"props":15946,"children":15947},{"class":397,"line":751},[15948],{"type":43,"tag":395,"props":15949,"children":15950},{"emptyLinePlaceholder":667},[15951],{"type":53,"value":670},{"type":43,"tag":395,"props":15953,"children":15954},{"class":397,"line":759},[15955],{"type":43,"tag":395,"props":15956,"children":15957},{"style":423},[15958],{"type":53,"value":15959},"\u002F\u002F Mixed criticality parallel execution\n",{"type":43,"tag":395,"props":15961,"children":15962},{"class":397,"line":768},[15963,15967,15972,15976,15980,15985,15989,15994],{"type":43,"tag":395,"props":15964,"children":15965},{"style":1097},[15966],{"type":53,"value":3353},{"type":43,"tag":395,"props":15968,"children":15969},{"style":492},[15970],{"type":53,"value":15971}," results ",{"type":43,"tag":395,"props":15973,"children":15974},{"style":402},[15975],{"type":53,"value":3363},{"type":43,"tag":395,"props":15977,"children":15978},{"style":481},[15979],{"type":53,"value":1185},{"type":43,"tag":395,"props":15981,"children":15982},{"style":1129},[15983],{"type":53,"value":15984}," Promise",{"type":43,"tag":395,"props":15986,"children":15987},{"style":402},[15988],{"type":53,"value":1243},{"type":43,"tag":395,"props":15990,"children":15991},{"style":1108},[15992],{"type":53,"value":15993},"allSettled",{"type":43,"tag":395,"props":15995,"children":15996},{"style":492},[15997],{"type":53,"value":15998},"([\n",{"type":43,"tag":395,"props":16000,"children":16001},{"class":397,"line":837},[16002,16007,16011,16015],{"type":43,"tag":395,"props":16003,"children":16004},{"style":1108},[16005],{"type":53,"value":16006},"  criticalStep",{"type":43,"tag":395,"props":16008,"children":16009},{"style":492},[16010],{"type":53,"value":1454},{"type":43,"tag":395,"props":16012,"children":16013},{"style":402},[16014],{"type":53,"value":500},{"type":43,"tag":395,"props":16016,"children":16017},{"style":423},[16018],{"type":53,"value":16019},"    \u002F\u002F Must succeed\n",{"type":43,"tag":395,"props":16021,"children":16022},{"class":397,"line":845},[16023,16028,16032,16036],{"type":43,"tag":395,"props":16024,"children":16025},{"style":1108},[16026],{"type":53,"value":16027},"  optionalStep",{"type":43,"tag":395,"props":16029,"children":16030},{"style":492},[16031],{"type":53,"value":1454},{"type":43,"tag":395,"props":16033,"children":16034},{"style":402},[16035],{"type":53,"value":500},{"type":43,"tag":395,"props":16037,"children":16038},{"style":423},[16039],{"type":53,"value":16040},"    \u002F\u002F OK to fail\n",{"type":43,"tag":395,"props":16042,"children":16043},{"class":397,"line":854},[16044,16049,16053,16057],{"type":43,"tag":395,"props":16045,"children":16046},{"style":1108},[16047],{"type":53,"value":16048},"  enrichmentStep",{"type":43,"tag":395,"props":16050,"children":16051},{"style":492},[16052],{"type":53,"value":1454},{"type":43,"tag":395,"props":16054,"children":16055},{"style":402},[16056],{"type":53,"value":500},{"type":43,"tag":395,"props":16058,"children":16059},{"style":423},[16060],{"type":53,"value":16061},"  \u002F\u002F OK to fail\n",{"type":43,"tag":395,"props":16063,"children":16064},{"class":397,"line":896},[16065,16069],{"type":43,"tag":395,"props":16066,"children":16067},{"style":492},[16068],{"type":53,"value":3257},{"type":43,"tag":395,"props":16070,"children":16071},{"style":402},[16072],{"type":53,"value":560},{"type":43,"tag":395,"props":16074,"children":16075},{"class":397,"line":938},[16076,16080,16084,16089,16093,16098,16102,16107,16111,16115,16119],{"type":43,"tag":395,"props":16077,"children":16078},{"style":1097},[16079],{"type":53,"value":3353},{"type":43,"tag":395,"props":16081,"children":16082},{"style":402},[16083],{"type":53,"value":2767},{"type":43,"tag":395,"props":16085,"children":16086},{"style":492},[16087],{"type":53,"value":16088},"critical",{"type":43,"tag":395,"props":16090,"children":16091},{"style":402},[16092],{"type":53,"value":500},{"type":43,"tag":395,"props":16094,"children":16095},{"style":492},[16096],{"type":53,"value":16097}," optional",{"type":43,"tag":395,"props":16099,"children":16100},{"style":402},[16101],{"type":53,"value":500},{"type":43,"tag":395,"props":16103,"children":16104},{"style":492},[16105],{"type":53,"value":16106}," enrichment",{"type":43,"tag":395,"props":16108,"children":16109},{"style":402},[16110],{"type":53,"value":2820},{"type":43,"tag":395,"props":16112,"children":16113},{"style":402},[16114],{"type":53,"value":1180},{"type":43,"tag":395,"props":16116,"children":16117},{"style":492},[16118],{"type":53,"value":8925},{"type":43,"tag":395,"props":16120,"children":16121},{"style":402},[16122],{"type":53,"value":560},{"type":43,"tag":395,"props":16124,"children":16125},{"class":397,"line":979},[16126,16130,16135,16139,16143,16147,16151,16156,16160,16164,16168,16172,16176,16181,16185,16190],{"type":43,"tag":395,"props":16127,"children":16128},{"style":481},[16129],{"type":53,"value":4867},{"type":43,"tag":395,"props":16131,"children":16132},{"style":492},[16133],{"type":53,"value":16134}," (critical",{"type":43,"tag":395,"props":16136,"children":16137},{"style":402},[16138],{"type":53,"value":1243},{"type":43,"tag":395,"props":16140,"children":16141},{"style":492},[16142],{"type":53,"value":4881},{"type":43,"tag":395,"props":16144,"children":16145},{"style":402},[16146],{"type":53,"value":5016},{"type":43,"tag":395,"props":16148,"children":16149},{"style":402},[16150],{"type":53,"value":547},{"type":43,"tag":395,"props":16152,"children":16153},{"style":408},[16154],{"type":53,"value":16155},"rejected",{"type":43,"tag":395,"props":16157,"children":16158},{"style":402},[16159],{"type":53,"value":405},{"type":43,"tag":395,"props":16161,"children":16162},{"style":492},[16163],{"type":53,"value":4421},{"type":43,"tag":395,"props":16165,"children":16166},{"style":481},[16167],{"type":53,"value":15824},{"type":43,"tag":395,"props":16169,"children":16170},{"style":402},[16171],{"type":53,"value":2444},{"type":43,"tag":395,"props":16173,"children":16174},{"style":1108},[16175],{"type":53,"value":577},{"type":43,"tag":395,"props":16177,"children":16178},{"style":492},[16179],{"type":53,"value":16180},"(critical",{"type":43,"tag":395,"props":16182,"children":16183},{"style":402},[16184],{"type":53,"value":1243},{"type":43,"tag":395,"props":16186,"children":16187},{"style":492},[16188],{"type":53,"value":16189},"reason)",{"type":43,"tag":395,"props":16191,"children":16192},{"style":402},[16193],{"type":53,"value":560},{"type":43,"tag":16195,"props":16196,"children":16197},"style",{},[16198],{"type":53,"value":16199},"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":16201,"total":16376},[16202,16224,16238,16255,16266,16281,16297,16313,16325,16344,16356,16366],{"slug":16203,"name":16203,"fn":16204,"description":16205,"org":16206,"tags":16207,"stars":16221,"repoUrl":16222,"updatedAt":16223},"next-cache-components-adoption","enable and migrate to Next.js Cache Components","Turn on Cache Components in a Next.js app and resolve the blocking routes it surfaces. Use when the user wants to enable, adopt, or migrate to Cache Components, flip the `cacheComponents` flag, work through a flood of blocking-prerender \u002F instant validation errors, run the `cache-components-instant-false` codemod, or decide between opting routes out with `export const instant = false` and fixing them in place.\n",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[16208,16211,16214,16217,16220],{"name":16209,"slug":16210,"type":13},"Caching","caching",{"name":16212,"slug":16213,"type":13},"Frontend","frontend",{"name":16215,"slug":16216,"type":13},"Migration","migration",{"name":16218,"slug":16219,"type":13},"Next.js","next-js",{"name":9,"slug":8,"type":13},141208,"https:\u002F\u002Fgithub.com\u002Fvercel\u002Fnext.js","2026-07-24T05:38:30.118542",{"slug":16225,"name":16225,"fn":16226,"description":16227,"org":16228,"tags":16229,"stars":16221,"repoUrl":16222,"updatedAt":16237},"next-cache-components-optimizer","optimize Next.js cache components","Drive a Next.js route to instant navigation by setting up an agentic loop, under Cache Components \u002F PPR, on initial load (hard navigation) and client-side navigation (soft navigation). Encode the goal as a failing @next\u002Fplaywright instant() e2e and work it to green, one verified route at a time; the shipped test then guards against regression. Use when asked to make a route's navigation instant (its static shell commits immediately), fix a route whose static shell isn't prerendered\u002Fserved\u002Fprefetched, grow a route's static shell or fix its slow first paint, diagnose which Suspense boundary keeps a route out of its static shell, or write the instant() e2e guard for one. Requires Next.js 16.3+ with cacheComponents; directs an upgrade if older.\n",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[16230,16231,16232,16233,16236],{"name":16209,"slug":16210,"type":13},{"name":16212,"slug":16213,"type":13},{"name":16218,"slug":16219,"type":13},{"name":16234,"slug":16235,"type":13},"Performance","performance",{"name":9,"slug":8,"type":13},"2026-07-30T05:31:10.674078",{"slug":16239,"name":16239,"fn":16240,"description":16241,"org":16242,"tags":16243,"stars":16221,"repoUrl":16222,"updatedAt":16254},"next-dev-loop","verify Next.js runtime behavior","Verify Next.js runtime behavior after editing app code. Use this skill to confirm a change actually works in a running app — not just that it compiles or type-checks. Combines \u002F_next\u002Fmcp (Next.js's view) with agent-browser (the browser's view). Requires a running `next dev`.\n",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[16244,16245,16246,16249,16250,16251],{"name":9723,"slug":9720,"type":13},{"name":16212,"slug":16213,"type":13},{"name":16247,"slug":16248,"type":13},"Local Development","local-development",{"name":16218,"slug":16219,"type":13},{"name":9,"slug":8,"type":13},{"name":16252,"slug":16253,"type":13},"Web Development","web-development","2026-05-22T06:45:28.627735",{"slug":16256,"name":16256,"fn":16257,"description":16258,"org":16259,"tags":16260,"stars":16221,"repoUrl":16222,"updatedAt":16265},"next-partial-prefetching-adoption","adopt Partial Prefetching in Next.js apps","Turn on Partial Prefetching in a Next.js app and work through the insights it surfaces. Use when the user wants to enable or adopt Partial Prefetching, flip the `partialPrefetching` flag, opt routes in with `export const prefetch = 'partial'`, audit `\u003CLink prefetch={true}>` calls, or resolve the link-prefetch-partial and instant-shell-url-data insights.\n",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[16261,16262,16263,16264],{"name":16212,"slug":16213,"type":13},{"name":16218,"slug":16219,"type":13},{"name":16234,"slug":16235,"type":13},{"name":9,"slug":8,"type":13},"2026-07-30T05:31:11.591864",{"slug":16267,"name":16267,"fn":16268,"description":16269,"org":16270,"tags":16271,"stars":16278,"repoUrl":16279,"updatedAt":16280},"turborepo","manage monorepos with Turborepo","Turborepo monorepo build system guidance. Triggers on: turbo.json, task pipelines,\ndependsOn, caching, remote cache, the \"turbo\" CLI, --filter, --affected, CI optimization, environment\nvariables, internal packages, monorepo structure\u002Fbest practices, and boundaries.\n\nUse when user: configures tasks\u002Fworkflows\u002Fpipelines, creates packages, sets up\nmonorepo, shares code between apps, runs changed\u002Faffected packages, debugs cache,\nor has apps\u002Fpackages directories.\n",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[16272,16275,16276],{"name":16273,"slug":16274,"type":13},"CI\u002FCD","ci-cd",{"name":16234,"slug":16235,"type":13},{"name":16277,"slug":16267,"type":13},"Turborepo",30809,"https:\u002F\u002Fgithub.com\u002Fvercel\u002Fturborepo","2026-07-30T05:32:14.920116",{"slug":16282,"name":16282,"fn":16283,"description":16284,"org":16285,"tags":16286,"stars":16294,"repoUrl":16295,"updatedAt":16296},"add-function-examples","add AI function examples for testing","Guide for adding new AI function examples, for testing specific features against the actual provider APIs.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[16287,16290,16293],{"name":16288,"slug":16289,"type":13},"AI SDK","ai-sdk",{"name":16291,"slug":16292,"type":13},"Testing","testing",{"name":9,"slug":8,"type":13},25670,"https:\u002F\u002Fgithub.com\u002Fvercel\u002Fai","2026-04-06T18:55:51.318866",{"slug":16298,"name":16298,"fn":16299,"description":16300,"org":16301,"tags":16302,"stars":16294,"repoUrl":16295,"updatedAt":16312},"add-harness-package","add AI SDK harness packages","Guide for adding new AI SDK harness packages. Use when creating a new @ai-sdk\u002Fharness-\u003Cname> package that adapts a coding-agent runtime to HarnessV1.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[16303,16306,16307,16310,16311],{"name":16304,"slug":16305,"type":13},"Agents","agents",{"name":16288,"slug":16289,"type":13},{"name":16308,"slug":16309,"type":13},"Harness","harness",{"name":18,"slug":19,"type":13},{"name":9,"slug":8,"type":13},"2026-06-18T08:29:19.858737",{"slug":16314,"name":16314,"fn":16315,"description":16316,"org":16317,"tags":16318,"stars":16294,"repoUrl":16295,"updatedAt":16324},"add-provider-package","add new provider packages to AI SDK","Guide for adding new AI provider packages to the AI SDK. Use when creating a new @ai-sdk\u002F\u003Cprovider> package to integrate an AI service into the SDK.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[16319,16320,16323],{"name":16288,"slug":16289,"type":13},{"name":16321,"slug":16322,"type":13},"API Development","api-development",{"name":9,"slug":8,"type":13},"2026-04-06T18:55:47.45549",{"slug":16326,"name":16326,"fn":16327,"description":16328,"org":16329,"tags":16330,"stars":16294,"repoUrl":16295,"updatedAt":16343},"adr-skill","create and maintain architecture decision records","Create and maintain Architecture Decision Records (ADRs) optimized for agentic coding workflows. Use when you need to propose, write, update, accept\u002Freject, deprecate, or supersede an ADR; bootstrap an adr folder and index; consult existing ADRs before implementing changes; or enforce ADR conventions. This skill uses Socratic questioning to capture intent before drafting, and validates output against an agent-readiness checklist.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[16331,16334,16337,16340],{"name":16332,"slug":16333,"type":13},"ADR","adr",{"name":16335,"slug":16336,"type":13},"Architecture","architecture",{"name":16338,"slug":16339,"type":13},"Documentation","documentation",{"name":16341,"slug":16342,"type":13},"Engineering","engineering","2026-04-06T18:55:50.043694",{"slug":16289,"name":16289,"fn":16345,"description":16346,"org":16347,"tags":16348,"stars":16294,"repoUrl":16295,"updatedAt":16355},"build AI features with Vercel AI SDK","Answer questions about the AI SDK and help build AI-powered features. Use when developers: (1) Ask about AI SDK functions like generateText, streamText, ToolLoopAgent, embed, or tools, (2) Want to build AI agents, chatbots, RAG systems, or text generation features, (3) Have questions about AI providers (OpenAI, Anthropic, Google, etc.), streaming, tool calling, structured output, or embeddings, (4) Use React hooks like useChat or useCompletion. Triggers on: \"AI SDK\", \"Vercel AI SDK\", \"generateText\", \"streamText\", \"add AI to my app\", \"build an agent\", \"tool calling\", \"structured output\", \"useChat\".",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[16349,16350,16351,16354],{"name":16304,"slug":16305,"type":13},{"name":16288,"slug":16289,"type":13},{"name":16352,"slug":16353,"type":13},"LLM","llm",{"name":9,"slug":8,"type":13},"2026-04-06T18:55:48.739463",{"slug":16357,"name":16357,"fn":16358,"description":16359,"org":16360,"tags":16361,"stars":16294,"repoUrl":16295,"updatedAt":16365},"capture-api-response-test-fixture","capture API response test fixtures","Capture API response test fixture.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[16362,16363,16364],{"name":16321,"slug":16322,"type":13},{"name":16291,"slug":16292,"type":13},{"name":9,"slug":8,"type":13},"2026-04-06T18:55:56.374433",{"slug":16367,"name":16367,"fn":16368,"description":16369,"org":16370,"tags":16371,"stars":16294,"repoUrl":16295,"updatedAt":16375},"develop-ai-functions-example","develop AI SDK function examples","Develop examples for AI SDK functions. Use when creating, running, or modifying examples under examples\u002Fai-functions\u002Fsrc to validate provider support, demonstrate features, or create test fixtures.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[16372,16373,16374],{"name":16288,"slug":16289,"type":13},{"name":16291,"slug":16292,"type":13},{"name":9,"slug":8,"type":13},"2026-04-06T18:55:55.088956",68,{"items":16378,"total":613},[16379,16392,16402,16409],{"slug":16380,"name":16380,"fn":16381,"description":16382,"org":16383,"tags":16384,"stars":23,"repoUrl":24,"updatedAt":16391},"internal-dev-workbench","set up isolated development workbenches","Spin up a portless + tmux dev session for the Workflow SDK that gives each git worktree isolated `\u003Cbranch>.\u003Cname>.localhost` URLs for the Next.js workbench and the observability UI, plus a Claude statusline that surfaces those URLs. Use only when the user asks for a \"portless dev session\", a \"tmux dev layout for workflow\", \"worktree-isolated dev URLs\", or wants to wire workflow dev URLs into the Claude statusline. Do not activate for the generic \"start the dev server\" \u002F \"run pnpm dev\" task.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[16385,16386,16387,16390],{"name":16341,"slug":16342,"type":13},{"name":16247,"slug":16248,"type":13},{"name":16388,"slug":16389,"type":13},"Observability","observability",{"name":9,"slug":8,"type":13},"2026-05-05T05:21:00.024468",{"slug":16393,"name":16393,"fn":16394,"description":16395,"org":16396,"tags":16397,"stars":23,"repoUrl":24,"updatedAt":16401},"migrating-to-workflow-sdk","migrate workflows to Vercel Workflow SDK","Migrates Temporal, Inngest, Trigger.dev, and AWS Step Functions workflows to the Workflow SDK. Use when porting Activities, Workers, Signals, step.run(), step.waitForEvent(), Trigger.dev tasks \u002F wait.forToken \u002F triggerAndWait, ASL JSON state machines, Task\u002FChoice\u002FWait\u002FParallel states, task tokens, or child workflows.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[16398,16399,16400],{"name":16215,"slug":16216,"type":13},{"name":9,"slug":8,"type":13},{"name":21,"slug":22,"type":13},"2026-04-13T05:21:00.819323",{"slug":4,"name":4,"fn":5,"description":6,"org":16403,"tags":16404,"stars":23,"repoUrl":24,"updatedAt":25},{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[16405,16406,16407,16408],{"name":15,"slug":16,"type":13},{"name":18,"slug":19,"type":13},{"name":9,"slug":8,"type":13},{"name":21,"slug":22,"type":13},{"slug":16410,"name":16410,"fn":16411,"description":16412,"org":16413,"tags":16414,"stars":23,"repoUrl":24,"updatedAt":16421},"workflow-init","initialize Vercel Workflow SDK","Install and configure Vercel Workflow SDK before it exists in node_modules. Use when the user asks to \"install workflow\", \"set up workflow\", \"add durable workflows\", \"configure workflow sdk\", or \"init workflow\" for Next.js, Express, Hono, Fastify, NestJS, Nitro, Nuxt, Astro, SvelteKit, or Vite.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[16415,16418,16419,16420],{"name":16416,"slug":16417,"type":13},"Node.js","node-js",{"name":18,"slug":19,"type":13},{"name":9,"slug":8,"type":13},{"name":21,"slug":22,"type":13},"2026-04-06T18:56:00.193699"]