惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

S
SegmentFault 最新的问题
Google DeepMind News
Google DeepMind News
G
Google Developers Blog
Martin Fowler
Martin Fowler
MongoDB | Blog
MongoDB | Blog
月光博客
月光博客
Jina AI
Jina AI
宝玉的分享
宝玉的分享
人人都是产品经理
人人都是产品经理
D
DataBreaches.Net
V
V2EX
WordPress大学
WordPress大学
T
The Blog of Author Tim Ferriss
Last Week in AI
Last Week in AI
B
Blog
博客园 - 叶小钗
小众软件
小众软件
Stack Overflow Blog
Stack Overflow Blog
P
Proofpoint News Feed
A
About on SuperTechFans
J
Java Code Geeks
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
Y
Y Combinator Blog
Microsoft Security Blog
Microsoft Security Blog

Workflow SDK Documentation

Patterns for Defining Tools Human-in-the-Loop Building Durable AI Agents Queueing User Messages Resumable Streams Sleep, Suspense, and Scheduling Streaming Updates from Tools API Reference Workflow Globals Changelog Resilient run start Cookbook Building a World Deploying Astro Express Fastify Hono Getting Started NestJS Next.js Nitro Nuxt Python SvelteKit Vite corrupted-event-log fetch-in-workflow hook-conflict Errors
workflow/nitro
2026-06-12 · via Workflow SDK Documentation

Nitro module for automatic workflow bundling and route registration.

Nitro integration for Workflow SDK. The workflow/nitro entry point's default export is a Nitro module — it has no callable API. You enable it by adding it to the modules array of your Nitro config and configure it via the workflow key.

import { defineConfig } from "nitro";

export default defineConfig({
  serverDir: "./server",
  modules: ["workflow/nitro"], 
});

When enabled, the module:

  • Transforms "use workflow" and "use step" directives during bundling.
  • Builds the workflow, step, and webhook bundles, and rebuilds them on file changes in development.
  • Registers the workflow runtime routes under /.well-known/workflow/v1/.
  • Serves a redirect to the local observability dashboard at /_workflow in development.
  • Configures Vercel function rules (queue triggers and maxDuration) for the workflow routes when deploying to Vercel.

Options are read from the workflow key of your Nitro config. The option type is exported as ModuleOptions:

import { defineConfig } from "nitro";
import type { ModuleOptions } from "workflow/nitro"; 

const workflow: ModuleOptions = {
  runtime: "nodejs22.x",
};

export default defineConfig({
  modules: ["workflow/nitro"],
  workflow, 
});
OptionTypeDefaultDescription
dirsstring[]Directories to scan for workflows and steps. By default, the workflows/ directory is scanned from the project root and all layer source directories.
typescriptPluginbooleanfalseAdds the workflow TypeScript plugin to the generated tsconfig.json for IDE IntelliSense.
runtimestringNode.js runtime version for Vercel Functions (e.g. 'nodejs22.x', 'nodejs24.x'). Only applies when deploying to Vercel.

If you use Nitro through its Vite plugin (nitro/vite) instead of a standalone nitro.config.ts, use the workflow/vite entry point, which wraps this module as a Vite plugin and accepts the same ModuleOptions.