[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7BYBZ0CD4CBCPZHRZ551BNK":3,"skill-same:01M7BYBZ0CD4CBCPZHRZ551BNK":50},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":27,"commitSha":28,"skillDirectory":29,"forksCount":30,"repositoryHtmlUrl":31,"repositoryHomepageUrl":6,"ownerHtmlUrl":32,"ownerBlogUrl":33,"ownerDescription":34,"updatedAt":35,"install":36,"resources":49},"01M7BYBZ0CD4CBCPZHRZ551BNK","workflow",null,"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.","CognitionAI\u002Fdevin-marketplace","CognitionAI","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F163493330?v=4","01M7BVSRD98NC4FG8T3EZS6V5M","Cognition","01M7BVSRDX111C2XPWJ0E6MY26",29,"MIT","https:\u002F\u002Fgithub.com\u002FCognitionAI\u002Fdevin-marketplace\u002Fblob\u002Fmain\u002Fplugins\u002Fvercel\u002Fskills\u002Fworkflow\u002Fupstream\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\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 Analytics API\nimport { getWorld } from \"workflow\u002Fruntime\";\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","## *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 Analytics API\nimport { getWorld } from \"workflow\u002Fruntime\";\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",{"name":5,"metadata":24,"description":7},{"author":25,"version":26},"Vercel Inc.","1.10","main","9836d94e88404aabb682086405c2aa9cba7657ac","plugins\u002Fvercel\u002Fskills\u002Fworkflow\u002Fupstream",156,"https:\u002F\u002Fgithub.com\u002FCognitionAI\u002Fdevin-marketplace","https:\u002F\u002Fgithub.com\u002FCognitionAI","https:\u002F\u002Fcognition.ai\u002F","Makers of Devin, the AI software engineer.","2026-11-13 07:08:23",{"source":8,"skillName":5,"commands":37,"prompt":47,"zipAvailable":48},[38,41,44],{"tool":39,"command":40},"npx","npx skills add CognitionAI\u002Fdevin-marketplace --skill workflow",{"tool":42,"command":43},"bunx","bunx skills add CognitionAI\u002Fdevin-marketplace --skill workflow",{"tool":45,"command":46},"pnpm","pnpm dlx skills add CognitionAI\u002Fdevin-marketplace --skill workflow","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FCognitionAI\u002Fdevin-marketplace\u002Fblob\u002Fmain\u002Fplugins\u002Fvercel\u002Fskills\u002Fworkflow\u002Fupstream\u002FSKILL.md",true,[],[51,57,63,70,77,84],{"skillNo":52,"name":53,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":54,"categories":55,"keywords":56,"publishedAt":19},"01M7BYC4AJGM98P2G9JH7QS24Z","business-data","https:\u002F\u002Fgithub.com\u002FCognitionAI\u002Fdevin-marketplace\u002Fblob\u002Fmain\u002Fplugins\u002Fwindsor-ai\u002Fskills\u002Fbusiness-data\u002FSKILL.md",[],[],{"skillNo":58,"name":5,"nameZh":6,"description":59,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":60,"categories":61,"keywords":62,"publishedAt":19},"01M7BYB1XSZHKHD8JZTQJ62JN0","Vercel Workflow SDK expert guidance. Use when building durable workflows, long-running tasks, API routes or agents that need pause\u002Fresume, retries, step-based execution, or crash-safe orchestration with Vercel Workflow.","https:\u002F\u002Fgithub.com\u002FCognitionAI\u002Fdevin-marketplace\u002Fblob\u002Fmain\u002Fplugins\u002Fvercel\u002Fskills\u002Fworkflow\u002FSKILL.md",[],[],{"skillNo":64,"name":65,"nameZh":6,"description":66,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":67,"categories":68,"keywords":69,"publishedAt":19},"01M7BYASGMK935J33E21N5WTW0","verification","Full-story verification — infers what the user is building, then verifies the complete flow end-to-end: browser → API → data → response. Triggers on dev server start and 'why isn't this working' signals.","https:\u002F\u002Fgithub.com\u002FCognitionAI\u002Fdevin-marketplace\u002Fblob\u002Fmain\u002Fplugins\u002Fvercel\u002Fskills\u002Fverification\u002FSKILL.md",[],[],{"skillNo":71,"name":72,"nameZh":6,"description":73,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":74,"categories":75,"keywords":76,"publishedAt":19},"01M7BY9WJERKSKEH9HK6E71GW2","vercel-storage","Vercel storage expert guidance — Blob, Global Config (formerly Edge Config), and Marketplace storage (Neon Postgres, Upstash Redis). Use when choosing, configuring, or using data storage with Vercel applications.","https:\u002F\u002Fgithub.com\u002FCognitionAI\u002Fdevin-marketplace\u002Fblob\u002Fmain\u002Fplugins\u002Fvercel\u002Fskills\u002Fvercel-storage\u002FSKILL.md",[],[],{"skillNo":78,"name":79,"nameZh":6,"description":80,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":81,"categories":82,"keywords":83,"publishedAt":19},"01M7BY9N034894YV2J9DCRZHYS","vercel-services","Configure and troubleshoot Vercel Services for multiple frontends and backends in one project. Use when composing a polyglot or multi-service application on one Vercel deployment; defining the `services` key, service-targeted rewrites, or service bindings in `vercel.json`; or running all services with `vercel dev`.","https:\u002F\u002Fgithub.com\u002FCognitionAI\u002Fdevin-marketplace\u002Fblob\u002Fmain\u002Fplugins\u002Fvercel\u002Fskills\u002Fvercel-services\u002FSKILL.md",[],[],{"skillNo":85,"name":86,"nameZh":6,"description":87,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":88,"categories":89,"keywords":90,"publishedAt":19},"01M7BY9GCNS6RNABNNBVQNXYH7","vercel-sandbox","Run agent-browser + Chrome inside Vercel Sandbox microVMs for browser automation from any Vercel-deployed app. Use when the user needs browser automation in a Vercel app (Next.js, SvelteKit, Nuxt, Remix, Astro, etc.), wants to run headless Chrome without binary size limits, needs persistent browser sessions across commands, or wants ephemeral isolated browser environments. Triggers include \"Vercel Sandbox browser\", \"microVM Chrome\", \"agent-browser in sandbox\", \"browser automation on Vercel\", or any task requiring Chrome in a Vercel Sandbox.","https:\u002F\u002Fgithub.com\u002FCognitionAI\u002Fdevin-marketplace\u002Fblob\u002Fmain\u002Fplugins\u002Fvercel\u002Fskills\u002Fvercel-sandbox\u002Fupstream\u002FSKILL.md",[],[]]