workflow 4.1.0-beta.51 → 4.1.0-beta.53

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (67) hide show
  1. package/docs/ai/chat-session-modeling.mdx +1 -0
  2. package/docs/ai/defining-tools.mdx +1 -0
  3. package/docs/ai/human-in-the-loop.mdx +1 -0
  4. package/docs/ai/index.mdx +1 -0
  5. package/docs/ai/message-queueing.mdx +1 -0
  6. package/docs/ai/resumable-streams.mdx +1 -0
  7. package/docs/ai/sleep-and-delays.mdx +1 -0
  8. package/docs/ai/streaming-updates-from-tools.mdx +1 -0
  9. package/docs/api-reference/index.mdx +1 -0
  10. package/docs/api-reference/workflow/create-hook.mdx +1 -0
  11. package/docs/api-reference/workflow/create-webhook.mdx +1 -0
  12. package/docs/api-reference/workflow/define-hook.mdx +1 -0
  13. package/docs/api-reference/workflow/fatal-error.mdx +1 -0
  14. package/docs/api-reference/workflow/fetch.mdx +1 -0
  15. package/docs/api-reference/workflow/get-step-metadata.mdx +1 -0
  16. package/docs/api-reference/workflow/get-workflow-metadata.mdx +1 -0
  17. package/docs/api-reference/workflow/index.mdx +1 -0
  18. package/docs/api-reference/workflow/retryable-error.mdx +1 -0
  19. package/docs/api-reference/workflow/sleep.mdx +1 -0
  20. package/docs/api-reference/workflow-ai/durable-agent.mdx +1 -0
  21. package/docs/api-reference/workflow-ai/index.mdx +1 -0
  22. package/docs/api-reference/workflow-ai/workflow-chat-transport.mdx +1 -0
  23. package/docs/api-reference/workflow-api/get-hook-by-token.mdx +1 -0
  24. package/docs/api-reference/workflow-api/get-run.mdx +1 -0
  25. package/docs/api-reference/workflow-api/get-world.mdx +1 -0
  26. package/docs/api-reference/workflow-api/index.mdx +1 -0
  27. package/docs/api-reference/workflow-api/resume-hook.mdx +1 -0
  28. package/docs/api-reference/workflow-api/resume-webhook.mdx +1 -0
  29. package/docs/api-reference/workflow-api/start.mdx +1 -0
  30. package/docs/api-reference/workflow-next/index.mdx +1 -0
  31. package/docs/api-reference/workflow-next/with-workflow.mdx +2 -39
  32. package/docs/deploying/building-a-world.mdx +1 -0
  33. package/docs/deploying/index.mdx +1 -0
  34. package/docs/deploying/world/local-world.mdx +1 -0
  35. package/docs/deploying/world/postgres-world.mdx +1 -0
  36. package/docs/deploying/world/vercel-world.mdx +5 -0
  37. package/docs/errors/fetch-in-workflow.mdx +1 -0
  38. package/docs/errors/hook-conflict.mdx +1 -0
  39. package/docs/errors/index.mdx +1 -0
  40. package/docs/errors/node-js-module-in-workflow.mdx +1 -0
  41. package/docs/errors/serialization-failed.mdx +1 -0
  42. package/docs/errors/start-invalid-workflow-function.mdx +1 -0
  43. package/docs/errors/timeout-in-workflow.mdx +1 -0
  44. package/docs/errors/webhook-invalid-respond-with-value.mdx +1 -0
  45. package/docs/errors/webhook-response-not-sent.mdx +1 -0
  46. package/docs/foundations/common-patterns.mdx +1 -0
  47. package/docs/foundations/errors-and-retries.mdx +1 -0
  48. package/docs/foundations/hooks.mdx +1 -0
  49. package/docs/foundations/idempotency.mdx +1 -0
  50. package/docs/foundations/index.mdx +1 -0
  51. package/docs/foundations/serialization.mdx +1 -0
  52. package/docs/foundations/starting-workflows.mdx +1 -0
  53. package/docs/foundations/streaming.mdx +1 -0
  54. package/docs/foundations/workflows-and-steps.mdx +1 -0
  55. package/docs/getting-started/astro.mdx +1 -0
  56. package/docs/getting-started/express.mdx +1 -0
  57. package/docs/getting-started/fastify.mdx +1 -0
  58. package/docs/getting-started/index.mdx +1 -0
  59. package/docs/getting-started/nestjs.mdx +6 -3
  60. package/docs/getting-started/next.mdx +0 -39
  61. package/docs/getting-started/vite.mdx +1 -0
  62. package/docs/how-it-works/code-transform.mdx +1 -0
  63. package/docs/how-it-works/event-sourcing.mdx +1 -0
  64. package/docs/how-it-works/framework-integrations.mdx +1 -0
  65. package/docs/how-it-works/understanding-directives.mdx +1 -0
  66. package/docs/observability/index.mdx +1 -0
  67. package/package.json +10 -10
@@ -1,5 +1,6 @@
1
1
  ---
2
2
  title: Chat Session Modeling
3
+ description: Model chat sessions at different architectural layers to control state ownership and handle interruptions.
3
4
  ---
4
5
 
5
6
  Chat sessions in AI agents can be modeled at different layers of your architecture. The choice affects state ownership and how you handle interruptions and reconnections.
@@ -1,5 +1,6 @@
1
1
  ---
2
2
  title: Patterns for Defining Tools
3
+ description: Common patterns for defining tools in durable AI agents using Workflow DevKit.
3
4
  ---
4
5
 
5
6
  This page covers the details for some common patterns when defining tools for AI agents using Workflow DevKit.
@@ -1,5 +1,6 @@
1
1
  ---
2
2
  title: Human-in-the-Loop
3
+ description: Wait for human input or external events before proceeding in your AI agent workflows.
3
4
  ---
4
5
 
5
6
  A common pre-requisite for running AI agents in production is the ability to wait for human input or external events before proceeding.
package/docs/ai/index.mdx CHANGED
@@ -1,5 +1,6 @@
1
1
  ---
2
2
  title: Building Durable AI Agents
3
+ description: Build AI agents that survive crashes, scale across requests, and maintain state with durable LLM tool-call loops.
3
4
  ---
4
5
 
5
6
  AI agents are built on the primitive of LLM and tool-call loops, often with additional processes for data fetching, resource provisioning, or reacting to external events.
@@ -1,5 +1,6 @@
1
1
  ---
2
2
  title: Queueing User Messages
3
+ description: Inject messages during an agent's turn, before tool calls complete or while the model is reasoning.
3
4
  ---
4
5
 
5
6
  When using [multi-turn workflows](/docs/ai/chat-session-modeling#multi-turn-workflows), messages typically arrive between agent turns. The workflow waits at a hook, receives a message, then starts a new turn. But sometimes you need to inject messages *during* an agent's turn, before tool calls complete or while the model is reasoning.
@@ -1,5 +1,6 @@
1
1
  ---
2
2
  title: Resumable Streams
3
+ description: Handle network interruptions, page refreshes, and timeouts without losing agent progress.
3
4
  ---
4
5
 
5
6
  When building chat interfaces, it's common to run into network interruptions, page refreshes, or serverless function timeouts, which can break the connection to an in-progress agent.
@@ -1,5 +1,6 @@
1
1
  ---
2
2
  title: Sleep, Suspense, and Scheduling
3
+ description: Schedule recurring actions, handle rate limiting, and wait for external state in AI agents.
3
4
  ---
4
5
 
5
6
  AI agents sometimes need to pause execution in order to schedule recurring or future actions, wait before retrying an operation (e.g. for rate limiting), or wait for external state to be available.
@@ -1,5 +1,6 @@
1
1
  ---
2
2
  title: Streaming Updates from Tools
3
+ description: Show progress updates and stream step output to users during long-running tool executions.
3
4
  ---
4
5
 
5
6
  After [building a durable AI agent](/docs/ai), we already get UI message chunks for displaying tool invocations and return values. However, for long-running steps, we may want to show progress updates, or stream step output to the user while it's being generated.
@@ -1,5 +1,6 @@
1
1
  ---
2
2
  title: API Reference
3
+ description: Complete reference for all Workflow DevKit functions and primitives by package.
3
4
  ---
4
5
 
5
6
  All the functions and primitives that come with Workflow DevKit by package.
@@ -1,5 +1,6 @@
1
1
  ---
2
2
  title: createHook
3
+ description: Create a low-level hook to resume workflows with arbitrary payloads.
3
4
  ---
4
5
 
5
6
  Creates a low-level hook primitive that can be used to resume a workflow run with arbitrary payloads.
@@ -1,5 +1,6 @@
1
1
  ---
2
2
  title: createWebhook
3
+ description: Create webhooks to suspend and resume workflows via HTTP requests.
3
4
  ---
4
5
 
5
6
  Creates a webhook that can be used to suspend and resume a workflow run upon receiving an HTTP request.
@@ -1,5 +1,6 @@
1
1
  ---
2
2
  title: defineHook
3
+ description: Create type-safe hooks with consistent payload types and optional validation.
3
4
  ---
4
5
 
5
6
  Creates a type-safe hook helper that ensures the payload type is consistent between hook creation and resumption.
@@ -1,5 +1,6 @@
1
1
  ---
2
2
  title: FatalError
3
+ description: Throw to mark a step as permanently failed without retrying.
3
4
  ---
4
5
 
5
6
  When a `FatalError` is thrown in a step, it indicates that the workflow should not retry a step, marking it as failure.
@@ -1,5 +1,6 @@
1
1
  ---
2
2
  title: fetch
3
+ description: Make HTTP requests from workflows with automatic serialization and retry semantics.
3
4
  ---
4
5
 
5
6
  Makes HTTP requests from within a workflow. This is a special step function that wraps the standard `fetch` API, automatically handling serialization and providing retry semantics.
@@ -1,5 +1,6 @@
1
1
  ---
2
2
  title: getStepMetadata
3
+ description: Access retry attempts and timing information within step functions.
3
4
  ---
4
5
 
5
6
  Returns metadata available in the current step function.
@@ -1,5 +1,6 @@
1
1
  ---
2
2
  title: getWorkflowMetadata
3
+ description: Access run IDs and timing information within workflow functions.
3
4
  ---
4
5
 
5
6
  Returns additional metadata available in the current workflow function.
@@ -1,5 +1,6 @@
1
1
  ---
2
2
  title: "workflow"
3
+ description: Core workflow primitives for steps, streaming, webhooks, and error handling.
3
4
  ---
4
5
 
5
6
  Core workflow primitives including steps, context management, streaming, webhooks, and error handling.
@@ -1,5 +1,6 @@
1
1
  ---
2
2
  title: RetryableError
3
+ description: Throw to retry a step, optionally after a specified duration.
3
4
  ---
4
5
 
5
6
  When a `RetryableError` is thrown in a step, it indicates that the workflow should retry a step. Additionally, it contains a parameter `retryAfter` indicating when the step should be retried after.
@@ -1,5 +1,6 @@
1
1
  ---
2
2
  title: sleep
3
+ description: Suspend a workflow for a duration or until a date without consuming resources.
3
4
  ---
4
5
 
5
6
  Suspends a workflow for a specified duration or until an end date without consuming any resources. Once the duration or end date passes, the workflow will resume execution.
@@ -1,5 +1,6 @@
1
1
  ---
2
2
  title: DurableAgent
3
+ description: Create AI agents that maintain state, call tools, and handle interruptions gracefully.
3
4
  ---
4
5
 
5
6
  <Callout type="warn">
@@ -1,6 +1,7 @@
1
1
  ---
2
2
  title: "@workflow/ai"
3
3
  icon: FlaskConical
4
+ description: Helpers for building AI-powered workflows with the AI SDK.
4
5
  ---
5
6
 
6
7
  <Callout type="warn">
@@ -1,5 +1,6 @@
1
1
  ---
2
2
  title: WorkflowChatTransport
3
+ description: Chat transport with automatic reconnection and recovery from interrupted streams.
3
4
  ---
4
5
 
5
6
  <Callout type="warn">
@@ -1,5 +1,6 @@
1
1
  ---
2
2
  title: getHookByToken
3
+ description: Retrieve hook details and workflow run information by token.
3
4
  ---
4
5
 
5
6
  Retrieves a hook by its unique token, returning the associated workflow run information and any metadata that was set when the hook was created. This function is useful for inspecting hook details before deciding whether to resume a workflow.
@@ -1,5 +1,6 @@
1
1
  ---
2
2
  title: getRun
3
+ description: Retrieve workflow run metadata and status without waiting for completion.
3
4
  ---
4
5
 
5
6
  Retrieves the workflow run metadata and status information for a given run ID. This function provides immediate access to workflow run details without waiting for completion, making it ideal for status checking and monitoring.
@@ -1,5 +1,6 @@
1
1
  ---
2
2
  title: getWorld
3
+ description: Access the World instance for low-level storage, queuing, and streaming operations.
3
4
  ---
4
5
 
5
6
  Retrieves the World instance for direct access to workflow storage, queuing, and streaming backends. This function returns a `World` which provides low-level access to manage workflow runs, steps, events, and hooks.
@@ -1,5 +1,6 @@
1
1
  ---
2
2
  title: "workflow/api"
3
+ description: Runtime functions to inspect runs, start workflows, and access world data.
3
4
  ---
4
5
 
5
6
  API reference for runtime functions from the `workflow/api` package.
@@ -1,5 +1,6 @@
1
1
  ---
2
2
  title: resumeHook
3
+ description: Resume a paused workflow by sending a payload to a hook token.
3
4
  ---
4
5
 
5
6
  Resumes a workflow run by sending a payload to a hook identified by its token.
@@ -1,5 +1,6 @@
1
1
  ---
2
2
  title: resumeWebhook
3
+ description: Resume a paused workflow by sending an HTTP request to a webhook token.
3
4
  ---
4
5
 
5
6
  Resumes a workflow run by sending an HTTP `Request` to a webhook identified by its token.
@@ -1,5 +1,6 @@
1
1
  ---
2
2
  title: start
3
+ description: Start and enqueue a new workflow run.
3
4
  ---
4
5
 
5
6
  Start/enqueue a new workflow run.
@@ -1,5 +1,6 @@
1
1
  ---
2
2
  title: "workflow/next"
3
+ description: Next.js integration for automatic bundling and runtime configuration.
3
4
  ---
4
5
 
5
6
  Next.js integration for Workflow DevKit that automatically configures bundling and runtime support.
@@ -1,5 +1,6 @@
1
1
  ---
2
2
  title: withWorkflow
3
+ description: Configure webpack/turbopack to transform workflow directives in Next.js.
3
4
  ---
4
5
 
5
6
  Configures webpack/turbopack loaders to transform workflow code (`"use step"`/`"use workflow"` directives)
@@ -48,42 +49,4 @@ export default async function config(
48
49
  }
49
50
  return nextConfig;
50
51
  }
51
- ```
52
-
53
- ## Configuration
54
-
55
- The second argument to `withWorkflow` accepts the following options:
56
-
57
- ### `workflows.dirs`
58
-
59
- Directories to scan for workflows and steps. If provided, this completely overrides the defaults.
60
-
61
- - **Type:** `string[]`
62
- - **Default:** `['pages', 'app', 'src/pages', 'src/app']`
63
-
64
- ```typescript title="next.config.ts" lineNumbers
65
- import { withWorkflow } from "workflow/next";
66
- import type { NextConfig } from "next";
67
-
68
- const nextConfig: NextConfig = {};
69
-
70
- export default withWorkflow(nextConfig, {
71
- workflows: {
72
- dirs: ['workflows', 'src/workflows'], // [!code highlight]
73
- },
74
- });
75
- ```
76
-
77
- ### `workflows.local.port`
78
-
79
- Port for the local workflow server during development.
80
-
81
- - **Type:** `number`
82
- - **Default:** Uses the `PORT` environment variable
83
-
84
- ### `workflows.local.dataDir`
85
-
86
- Directory for storing local workflow data during development.
87
-
88
- - **Type:** `string`
89
- - **Default:** `'.next/workflow-data'`
52
+ ```
@@ -1,5 +1,6 @@
1
1
  ---
2
2
  title: Building a World
3
+ description: Implement the World interface to run workflows on any custom infrastructure.
3
4
  ---
4
5
 
5
6
  A **World** is the abstraction that allows workflows to run on any infrastructure. It handles workflow storage, step execution queuing, and data streaming. This guide explains the World interface and how to implement your own.
@@ -1,6 +1,7 @@
1
1
  ---
2
2
  title: Deploying
3
3
  icon: Rocket
4
+ description: Deploy workflows locally, on Vercel, or anywhere using pluggable World adapters.
4
5
  ---
5
6
 
6
7
  Workflows are designed to be highly portable. The same workflow code can run locally during development, on Vercel with zero configuration, or on any infrastructure using **Worlds** — pluggable adapters that handle storage, queuing, and communication.
@@ -1,5 +1,6 @@
1
1
  ---
2
2
  title: Local World
3
+ description: Zero-config world bundled with Workflow for local development. No external services required.
3
4
  ---
4
5
 
5
6
  The Local World is bundled with `workflow` and used automatically during local development. No installation or configuration required.
@@ -1,5 +1,6 @@
1
1
  ---
2
2
  title: Postgres World
3
+ description: Production-ready, self-hosted world using PostgreSQL for storage and pg-boss for job processing.
3
4
  ---
4
5
 
5
6
  The Postgres World is a production-ready backend for self-hosted deployments. It uses PostgreSQL for durable storage and [pg-boss](https://github.com/timgit/pg-boss) for reliable job processing.
@@ -1,5 +1,6 @@
1
1
  ---
2
2
  title: Vercel World
3
+ description: Fully-managed world for Vercel deployments with automatic storage, queuing, and authentication.
3
4
  ---
4
5
 
5
6
  The Vercel World is a fully-managed workflow backend for applications deployed on Vercel. It provides scalable storage, distributed queuing, and automatic authentication with zero configuration.
@@ -126,3 +127,7 @@ For more details, see the [Vercel Workflow documentation](https://vercel.com/doc
126
127
  See the [Vercel Workflow documentation](https://vercel.com/docs/workflow) for current pricing and to learn more.
127
128
 
128
129
  For self-hosted deployments, use the [Postgres World](/worlds/postgres). For local development, use the [Local World](/worlds/local).
130
+
131
+ ## Limitations
132
+
133
+ - **Single-region deployment** - The backend infrastructure is currently deployed only in `iad1`. Applications in other regions will route workflow requests to `iad1`, which may result in higher latency. For best performance, deploy your Vercel apps using Workflow to `iad1`. Global deployment is planned to colocate the backend closer to your applications.
@@ -1,5 +1,6 @@
1
1
  ---
2
2
  title: fetch-in-workflow
3
+ description: Use the workflow fetch step function instead of global fetch in workflows.
3
4
  ---
4
5
 
5
6
  This error occurs when you try to use `fetch()` directly in a workflow function, or when a library (like the AI SDK) tries to call `fetch()` under the hood.
@@ -1,5 +1,6 @@
1
1
  ---
2
2
  title: hook-conflict
3
+ description: Hook tokens must be unique across all running workflows in your project.
3
4
  ---
4
5
 
5
6
  This error occurs when you try to create a hook with a token that is already in use by another active workflow run. Hook tokens must be unique across all running workflows in your project.
@@ -1,5 +1,6 @@
1
1
  ---
2
2
  title: Errors
3
+ description: Fix common mistakes when creating and executing workflows.
3
4
  ---
4
5
 
5
6
  Fix common mistakes when creating and executing workflows in the **Workflow DevKit**.
@@ -1,5 +1,6 @@
1
1
  ---
2
2
  title: node-js-module-in-workflow
3
+ description: Move Node.js core module usage to step functions instead of workflows.
3
4
  ---
4
5
 
5
6
  This error occurs when you try to import or use Node.js core modules (like `fs`, `http`, `crypto`, `path`, etc.) directly inside a workflow function.
@@ -1,5 +1,6 @@
1
1
  ---
2
2
  title: serialization-failed
3
+ description: Ensure all data passed between workflow and step functions is serializable.
3
4
  ---
4
5
 
5
6
  This error occurs when you try to pass non-serializable data between execution boundaries in your workflow. All data passed between workflow functions, step functions, and the workflow runtime must be serializable to persist in the event log.
@@ -1,5 +1,6 @@
1
1
  ---
2
2
  title: start-invalid-workflow-function
3
+ description: Ensure you pass a valid workflow function to start() with proper configuration.
3
4
  ---
4
5
 
5
6
  This error occurs when you try to call `start()` with a function that is not a valid workflow function or when the Workflow DevKit is not configured correctly.
@@ -1,5 +1,6 @@
1
1
  ---
2
2
  title: timeout-in-workflow
3
+ description: Use the sleep function instead of setTimeout or setInterval in workflows.
3
4
  ---
4
5
 
5
6
  This error occurs when you try to use `setTimeout()`, `setInterval()`, or related timing functions directly inside a workflow function.
@@ -1,5 +1,6 @@
1
1
  ---
2
2
  title: webhook-invalid-respond-with-value
3
+ description: The respondWith option must be "manual" or a Response object.
3
4
  ---
4
5
 
5
6
  This error occurs when you provide an invalid value for the `respondWith` option when creating a webhook. The `respondWith` option must be either `"manual"` or a `Response` object.
@@ -1,5 +1,6 @@
1
1
  ---
2
2
  title: webhook-response-not-sent
3
+ description: Manual webhooks must send a response before execution completes.
3
4
  ---
4
5
 
5
6
  This error occurs when a webhook is configured with `respondWith: "manual"` but the workflow does not send a response using `request.respondWith()` before the webhook execution completes.
@@ -1,5 +1,6 @@
1
1
  ---
2
2
  title: Common Patterns
3
+ description: Implement distributed patterns using familiar async/await syntax with no new APIs to learn.
3
4
  ---
4
5
 
5
6
  Common distributed patterns are simple to implement in workflows and require learning no new syntax. You can just use familiar async/await patterns.
@@ -1,5 +1,6 @@
1
1
  ---
2
2
  title: Errors & Retrying
3
+ description: Customize retry behavior with FatalError and RetryableError for robust error handling.
3
4
  ---
4
5
 
5
6
  By default, errors thrown inside steps are retried. Additionally, Workflow DevKit provides two new types of errors you can use to customize retries.
@@ -1,5 +1,6 @@
1
1
  ---
2
2
  title: Hooks & Webhooks
3
+ description: Pause workflows and resume them later with external data, user interactions, or HTTP requests.
3
4
  ---
4
5
 
5
6
  Hooks provide a powerful mechanism for pausing workflow execution and resuming it later with external data. They enable workflows to wait for external events, user interactions (also known as "human in the loop"), or HTTP requests. This guide will teach you the core concepts, starting with the low-level Hook primitive and building up to the higher-level Webhook abstraction.
@@ -1,5 +1,6 @@
1
1
  ---
2
2
  title: Idempotency
3
+ description: Ensure operations can be safely retried without producing duplicate side effects.
3
4
  ---
4
5
 
5
6
  Idempotency is a property of an operation that ensures it can be safely retried without producing duplicate side effects.
@@ -1,5 +1,6 @@
1
1
  ---
2
2
  title: Foundations
3
+ description: Learn the core concepts of workflow programming to build durable, long-running applications.
3
4
  ---
4
5
 
5
6
  Workflow programming can be a slight shift from how you traditionally write real-world applications. Learning the foundations now will go a long way toward helping you use workflows effectively.
@@ -1,5 +1,6 @@
1
1
  ---
2
2
  title: Serialization
3
+ description: Understand how workflow data is serialized and persisted across suspensions and resumptions.
3
4
  ---
4
5
 
5
6
  All function arguments and return values passed between workflow and step functions must be serializable. Workflow DevKit uses a custom serialization system built on top of [devalue](https://github.com/sveltejs/devalue). This system supports standard JSON types, as well as a few additional popular Web API types.
@@ -1,5 +1,6 @@
1
1
  ---
2
2
  title: Starting Workflows
3
+ description: Trigger workflow execution with the start() function and track progress with Run objects.
3
4
  ---
4
5
 
5
6
  Once you've defined your workflow functions, you need to trigger them to begin execution. This is done using the `start()` function from `workflow/api`, which enqueues a new workflow run and returns a `Run` object that you can use to track its progress.
@@ -1,5 +1,6 @@
1
1
  ---
2
2
  title: Streaming
3
+ description: Stream data in real-time to clients for progress updates and incremental content delivery.
3
4
  ---
4
5
 
5
6
  Workflows can stream data in real-time to clients without waiting for the entire workflow to complete. This enables progress updates, AI-generated content, log messages, and other incremental data to be delivered as workflows execute.
@@ -1,5 +1,6 @@
1
1
  ---
2
2
  title: Workflows and Steps
3
+ description: Build long-running, stateful application logic that persists progress and resumes after failures.
3
4
  ---
4
5
 
5
6
  import { File, Folder, Files } from "fumadocs-ui/components/files";
@@ -1,5 +1,6 @@
1
1
  ---
2
2
  title: Astro
3
+ description: Set up your first durable workflow in an Astro application.
3
4
  ---
4
5
 
5
6
  This guide will walk through setting up your first workflow in an Astro app. Along the way, you'll learn more about the concepts that are fundamental to using the development kit in your own projects.
@@ -1,5 +1,6 @@
1
1
  ---
2
2
  title: Express
3
+ description: Set up your first durable workflow in an Express application.
3
4
  ---
4
5
 
5
6
  This guide will walk through setting up your first workflow in a Express app. Along the way, you'll learn more about the concepts that are fundamental to using the development kit in your own projects.
@@ -1,5 +1,6 @@
1
1
  ---
2
2
  title: Fastify
3
+ description: Set up your first durable workflow in a Fastify application.
3
4
  ---
4
5
 
5
6
  This guide will walk through setting up your first workflow in a Fastify app. Along the way, you'll learn more about the concepts that are fundamental to using the development kit in your own projects.
@@ -62,6 +62,7 @@ import { Next, Nitro, SvelteKit, Nuxt, Hono, Bun, AstroDark, AstroLight, TanStac
62
62
  <div className="flex flex-col items-center justify-center gap-2">
63
63
  <Nest className="size-16" />
64
64
  <span className="font-medium">NestJS</span>
65
+ <Badge variant="secondary">Experimental</Badge>
65
66
  </div>
66
67
  </Card>
67
68
  <Card className="opacity-50">
@@ -1,5 +1,6 @@
1
1
  ---
2
2
  title: NestJS
3
+ description: Set up your first durable workflow in a NestJS application.
3
4
  ---
4
5
 
5
6
  This guide will walk through setting up your first workflow in a NestJS app. Along the way, you'll learn more about the concepts that are fundamental to using the development kit in your own projects.
@@ -241,7 +242,8 @@ Taking a look at this code:
241
242
 
242
243
  To invoke your new workflow, update your controller with a new endpoint:
243
244
 
244
- {/* @skip-typecheck - NestJS decorators require special TypeScript config */}
245
+ {/*@skip-typecheck - NestJS decorators require special TypeScript config*/}
246
+
245
247
  ```typescript title="src/app.controller.ts" lineNumbers
246
248
  import { Body, Controller, Post } from '@nestjs/common';
247
249
  import { start } from 'workflow/api';
@@ -288,7 +290,7 @@ npx workflow web
288
290
  npx workflow inspect runs
289
291
  ```
290
292
 
291
- <img src="/o11y-ui.png" alt="Workflow DevKit Web UI" />
293
+ ![Workflow DevKit Web UI](/o11y-ui.png)
292
294
 
293
295
  </Step>
294
296
 
@@ -300,7 +302,8 @@ npx workflow inspect runs
300
302
 
301
303
  The `WorkflowModule.forRoot()` method accepts optional configuration:
302
304
 
303
- {/* @skip-typecheck - Configuration snippet, WorkflowModule not imported */}
305
+ {/*@skip-typecheck - Configuration snippet, WorkflowModule not imported*/}
306
+
304
307
  ```typescript
305
308
  WorkflowModule.forRoot({
306
309
  // Directory to scan for workflow files (default: ['src'])
@@ -257,45 +257,6 @@ Check the [Deploying](/docs/deploying) section to learn how your workflows can b
257
257
 
258
258
  ## Troubleshooting
259
259
 
260
- ### Out of Memory (OOM) during build
261
-
262
- When using `withWorkflow()` in a large Next.js application, the "Discovering workflow directives" phase may consume excessive memory, causing builds to fail with OOM errors on standard build machines (e.g., 16 GB RAM).
263
-
264
- **Solution:** Use the `workflows.dirs` option to limit the directories scanned for workflow directives. By default, `withWorkflow` scans `['pages', 'app', 'src/pages', 'src/app']`, which in large applications can include thousands of files.
265
-
266
- If your workflows are located in a specific directory, configure `dirs` to only scan that directory:
267
-
268
- ```typescript title="next.config.ts" lineNumbers
269
- import { withWorkflow } from "workflow/next";
270
- import type { NextConfig } from "next";
271
-
272
- const nextConfig: NextConfig = {};
273
-
274
- export default withWorkflow(nextConfig, {
275
- workflows: {
276
- // Only scan the workflows directory instead of the entire app
277
- dirs: ['workflows'], // [!code highlight]
278
- },
279
- });
280
- ```
281
-
282
- If you need workflows in both app routes and a dedicated directory:
283
-
284
- ```typescript title="next.config.ts" lineNumbers
285
- import { withWorkflow } from "workflow/next";
286
- import type { NextConfig } from "next";
287
-
288
- const nextConfig: NextConfig = {};
289
-
290
- export default withWorkflow(nextConfig, {
291
- workflows: {
292
- dirs: ['app/api', 'workflows'], // [!code highlight]
293
- },
294
- });
295
- ```
296
-
297
- This significantly reduces memory usage and build times by avoiding scanning unrelated application code.
298
-
299
260
  ### Next.js 16.1+ compatibility
300
261
 
301
262
  If you see this error when upgrading to Next.js 16.1 or later:
@@ -1,5 +1,6 @@
1
1
  ---
2
2
  title: Vite
3
+ description: Set up your first durable workflow in a Vite application.
3
4
  ---
4
5
 
5
6
  This guide will walk through setting up your first workflow in a Vite app. Along the way, you'll learn more about the concepts that are fundamental to using the development kit in your own projects.
@@ -1,5 +1,6 @@
1
1
  ---
2
2
  title: How the Directives Work
3
+ description: Deep dive into the internals of how Workflow DevKit directives transform your code.
3
4
  ---
4
5
 
5
6
  <Callout>
@@ -1,5 +1,6 @@
1
1
  ---
2
2
  title: Event Sourcing
3
+ description: Learn how Workflow DevKit uses event sourcing internally for debugging and observability.
3
4
  ---
4
5
 
5
6
  <Callout>
@@ -1,5 +1,6 @@
1
1
  ---
2
2
  title: Framework Integrations
3
+ description: Guide for framework authors to integrate Workflow DevKit with custom frameworks or runtimes.
3
4
  ---
4
5
 
5
6
  <Callout>
@@ -1,5 +1,6 @@
1
1
  ---
2
2
  title: Understanding Directives
3
+ description: Explore how JavaScript directives enable the Workflow DevKit's durable execution model.
3
4
  ---
4
5
 
5
6
  import { File, Folder, Files } from "fumadocs-ui/components/files";
@@ -1,5 +1,6 @@
1
1
  ---
2
2
  title: Observability
3
+ description: Inspect, monitor, and debug workflows through the CLI and Web UI with powerful observability tools.
3
4
  ---
4
5
 
5
6
  Workflow DevKit provides powerful tools to inspect, monitor, and debug your workflows through the CLI and Web UI. These tools allow you to inspect workflow runs, steps, webhooks, [events](/docs/how-it-works/event-sourcing), and stream output.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "workflow",
3
- "version": "4.1.0-beta.51",
3
+ "version": "4.1.0-beta.53",
4
4
  "description": "Workflow DevKit - Build durable, resilient, and observable workflows",
5
5
  "main": "dist/typescript-plugin.cjs",
6
6
  "type": "module",
@@ -53,17 +53,17 @@
53
53
  },
54
54
  "dependencies": {
55
55
  "ms": "2.1.3",
56
- "@workflow/astro": "4.0.0-beta.25",
57
- "@workflow/cli": "4.1.0-beta.51",
58
- "@workflow/core": "4.1.0-beta.51",
56
+ "@workflow/astro": "4.0.0-beta.27",
57
+ "@workflow/cli": "4.1.0-beta.53",
58
+ "@workflow/core": "4.1.0-beta.53",
59
59
  "@workflow/errors": "4.1.0-beta.14",
60
60
  "@workflow/typescript-plugin": "4.0.1-beta.4",
61
- "@workflow/next": "4.0.1-beta.47",
62
- "@workflow/nest": "0.0.0-beta.0",
63
- "@workflow/nitro": "4.0.1-beta.46",
64
- "@workflow/nuxt": "4.0.1-beta.35",
65
- "@workflow/sveltekit": "4.0.0-beta.40",
66
- "@workflow/rollup": "4.0.0-beta.9"
61
+ "@workflow/next": "4.0.1-beta.49",
62
+ "@workflow/nest": "0.0.0-beta.2",
63
+ "@workflow/nitro": "4.0.1-beta.48",
64
+ "@workflow/nuxt": "4.0.1-beta.37",
65
+ "@workflow/sveltekit": "4.0.0-beta.42",
66
+ "@workflow/rollup": "4.0.0-beta.10"
67
67
  },
68
68
  "devDependencies": {
69
69
  "@types/ms": "2.1.0",