workflow 5.0.0-beta.5 → 5.0.0-beta.51
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.
- package/README.md +68 -23
- package/dist/api-workflow.d.ts +1 -1
- package/dist/api-workflow.d.ts.map +1 -1
- package/dist/api-workflow.js +1 -1
- package/dist/api.d.ts +3 -3
- package/dist/api.d.ts.map +1 -1
- package/dist/api.js +5 -7
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +6 -1
- package/dist/internal/builtins.d.ts +20 -3
- package/dist/internal/builtins.d.ts.map +1 -1
- package/dist/internal/builtins.js +68 -4
- package/dist/internal/errors.d.ts +1 -1
- package/dist/internal/errors.d.ts.map +1 -1
- package/dist/internal/errors.js +2 -2
- package/dist/nest-builder.d.ts +2 -0
- package/dist/nest-builder.d.ts.map +1 -0
- package/dist/nest-builder.js +2 -0
- package/dist/nest-vercel-builder.d.ts +2 -0
- package/dist/nest-vercel-builder.d.ts.map +1 -0
- package/dist/nest-vercel-builder.js +2 -0
- package/dist/observability.d.ts +1 -1
- package/dist/observability.js +2 -2
- package/dist/runtime.d.ts +2 -1
- package/dist/runtime.d.ts.map +1 -1
- package/dist/runtime.js +4 -1
- package/docs/ai/chat-session-modeling.mdx +176 -422
- package/docs/ai/defining-tools.mdx +6 -7
- package/docs/ai/human-in-the-loop.mdx +11 -11
- package/docs/ai/index.mdx +71 -75
- package/docs/ai/message-queueing.mdx +71 -110
- package/docs/ai/meta.json +1 -0
- package/docs/ai/resumable-streams.mdx +40 -28
- package/docs/ai/sleep-and-delays.mdx +10 -10
- package/docs/ai/streaming-updates-from-tools.mdx +6 -6
- package/docs/api-reference/index.mdx +25 -1
- package/docs/api-reference/meta.json +8 -0
- package/docs/api-reference/vitest/index.mdx +9 -15
- package/docs/api-reference/workflow/create-hook.mdx +89 -10
- package/docs/api-reference/workflow/create-webhook.mdx +16 -15
- package/docs/api-reference/workflow/define-hook.mdx +35 -33
- package/docs/api-reference/workflow/fatal-error.mdx +30 -8
- package/docs/api-reference/workflow/fetch.mdx +14 -10
- package/docs/api-reference/workflow/get-step-metadata.mdx +2 -2
- package/docs/api-reference/workflow/get-workflow-metadata.mdx +3 -3
- package/docs/api-reference/workflow/get-writable.mdx +7 -7
- package/docs/api-reference/workflow/index.mdx +4 -1
- package/docs/api-reference/workflow/retryable-error.mdx +1 -1
- package/docs/api-reference/workflow/set-attributes.mdx +61 -0
- package/docs/api-reference/workflow/sleep.mdx +4 -4
- package/docs/api-reference/workflow-ai/durable-agent.mdx +63 -101
- package/docs/api-reference/workflow-ai/index.mdx +5 -5
- package/docs/api-reference/workflow-ai/workflow-chat-transport.mdx +67 -24
- package/docs/api-reference/workflow-api/get-hook-by-token.mdx +26 -12
- package/docs/api-reference/workflow-api/get-run.mdx +43 -8
- package/docs/api-reference/workflow-api/index.mdx +6 -10
- package/docs/api-reference/workflow-api/resume-hook.mdx +73 -12
- package/docs/api-reference/workflow-api/resume-webhook.mdx +11 -9
- package/docs/api-reference/workflow-api/start.mdx +60 -13
- package/docs/api-reference/workflow-astro/index.mdx +18 -0
- package/docs/api-reference/workflow-astro/meta.json +4 -0
- package/docs/api-reference/workflow-astro/workflow.mdx +45 -0
- package/docs/api-reference/workflow-errors/entity-conflict-error.mdx +4 -4
- package/docs/api-reference/workflow-errors/hook-conflict-error.mdx +60 -0
- package/docs/api-reference/workflow-errors/hook-not-found-error.mdx +8 -8
- package/docs/api-reference/workflow-errors/index.mdx +88 -0
- package/docs/api-reference/workflow-errors/meta.json +6 -0
- package/docs/api-reference/workflow-errors/precondition-failed-error.mdx +68 -0
- package/docs/api-reference/workflow-errors/run-expired-error.mdx +2 -2
- package/docs/api-reference/workflow-errors/run-not-supported-error.mdx +58 -0
- package/docs/api-reference/workflow-errors/step-not-registered-error.mdx +5 -5
- package/docs/api-reference/workflow-errors/throttle-error.mdx +2 -2
- package/docs/api-reference/workflow-errors/too-early-error.mdx +2 -2
- package/docs/api-reference/workflow-errors/workflow-error.mdx +52 -0
- package/docs/api-reference/workflow-errors/workflow-not-registered-error.mdx +5 -6
- package/docs/api-reference/workflow-errors/workflow-run-cancelled-error.mdx +6 -6
- package/docs/api-reference/workflow-errors/workflow-run-failed-error.mdx +5 -5
- package/docs/api-reference/workflow-errors/workflow-run-not-completed-error.mdx +58 -0
- package/docs/api-reference/workflow-errors/workflow-run-not-found-error.mdx +4 -4
- package/docs/api-reference/workflow-errors/workflow-runtime-error.mdx +58 -0
- package/docs/api-reference/workflow-errors/workflow-world-error.mdx +8 -8
- package/docs/api-reference/workflow-globals.mdx +14 -10
- package/docs/api-reference/workflow-nest/configure-workflow-controller.mdx +33 -0
- package/docs/api-reference/workflow-nest/index.mdx +31 -0
- package/docs/api-reference/workflow-nest/meta.json +9 -0
- package/docs/api-reference/workflow-nest/nest-local-builder.mdx +64 -0
- package/docs/api-reference/workflow-nest/workflow-controller.mdx +40 -0
- package/docs/api-reference/workflow-nest/workflow-module.mdx +74 -0
- package/docs/api-reference/workflow-next/with-workflow.mdx +39 -17
- package/docs/api-reference/workflow-nitro/index.mdx +60 -0
- package/docs/api-reference/workflow-nuxt/index.mdx +48 -0
- package/docs/api-reference/workflow-observability/hydrate-data.mdx +35 -0
- package/docs/api-reference/workflow-observability/hydrate-resource-io.mdx +62 -0
- package/docs/api-reference/workflow-observability/index.mdx +62 -0
- package/docs/api-reference/workflow-observability/meta.json +11 -0
- package/docs/api-reference/workflow-observability/observability-revivers.mdx +50 -0
- package/docs/api-reference/workflow-observability/parse-class-name.mdx +41 -0
- package/docs/api-reference/workflow-observability/parse-step-name.mdx +40 -0
- package/docs/api-reference/workflow-observability/parse-workflow-name.mdx +55 -0
- package/docs/api-reference/workflow-runtime/create-world.mdx +39 -0
- package/docs/api-reference/workflow-runtime/get-world-handlers.mdx +44 -0
- package/docs/api-reference/{workflow-api → workflow-runtime}/get-world.mdx +11 -14
- package/docs/api-reference/workflow-runtime/health-check.mdx +50 -0
- package/docs/api-reference/workflow-runtime/index.mdx +41 -0
- package/docs/api-reference/workflow-runtime/meta.json +12 -0
- package/docs/api-reference/workflow-runtime/set-world.mdx +51 -0
- package/docs/api-reference/workflow-runtime/workflow-entrypoint.mdx +43 -0
- package/docs/api-reference/workflow-runtime/world/analytics.mdx +315 -0
- package/docs/api-reference/workflow-runtime/world/index.mdx +60 -0
- package/docs/api-reference/workflow-runtime/world/meta.json +4 -0
- package/docs/api-reference/workflow-runtime/world/queue.mdx +88 -0
- package/docs/api-reference/{workflow-api → workflow-runtime}/world/storage.mdx +98 -34
- package/docs/api-reference/{workflow-api → workflow-runtime}/world/streams.mdx +8 -8
- package/docs/api-reference/workflow-serde/index.mdx +1 -2
- package/docs/api-reference/workflow-serde/workflow-deserialize.mdx +3 -4
- package/docs/api-reference/workflow-serde/workflow-serialize.mdx +8 -8
- package/docs/api-reference/workflow-sveltekit/index.mdx +18 -0
- package/docs/api-reference/workflow-sveltekit/meta.json +4 -0
- package/docs/api-reference/workflow-sveltekit/workflow-plugin.mdx +42 -0
- package/docs/api-reference/workflow-vite/index.mdx +18 -0
- package/docs/api-reference/workflow-vite/meta.json +4 -0
- package/docs/api-reference/workflow-vite/workflow.mdx +48 -0
- package/docs/changelog/attributes-mvp.mdx +380 -0
- package/docs/changelog/batched-event-writes.mdx +79 -0
- package/docs/changelog/eager-processing.mdx +110 -436
- package/docs/changelog/index.mdx +4 -2
- package/docs/changelog/lazy-event-creation.md +127 -0
- package/docs/changelog/lazy-hook-resume.mdx +78 -0
- package/docs/changelog/meta.json +11 -1
- package/docs/changelog/resilient-resume.mdx +32 -0
- package/docs/changelog/resilient-start.mdx +33 -285
- package/docs/changelog/step-message-ownership.mdx +360 -0
- package/docs/changelog/turbo-mode.md +87 -0
- package/docs/comparisons/index.mdx +66 -0
- package/docs/comparisons/meta.json +11 -0
- package/docs/comparisons/workflow-sdk-vs-aws-agentcore.mdx +55 -0
- package/docs/comparisons/workflow-sdk-vs-aws-step-functions.mdx +111 -0
- package/docs/comparisons/workflow-sdk-vs-cloudflare-workflows.mdx +71 -0
- package/docs/comparisons/workflow-sdk-vs-inngest.mdx +102 -0
- package/docs/comparisons/workflow-sdk-vs-temporal.mdx +123 -0
- package/docs/comparisons/workflow-sdk-vs-trigger-dev.mdx +104 -0
- package/docs/configuration/build-and-diagnostics.mdx +70 -0
- package/docs/configuration/cli-and-web-ui.mdx +241 -0
- package/docs/configuration/framework-options.mdx +165 -0
- package/docs/configuration/index.mdx +32 -0
- package/docs/configuration/meta.json +12 -0
- package/docs/configuration/runtime-tuning.mdx +381 -0
- package/docs/configuration/worlds.mdx +313 -0
- package/docs/cookbook/advanced/child-workflows.mdx +211 -264
- package/docs/cookbook/advanced/meta.json +6 -1
- package/docs/cookbook/advanced/publishing-libraries.mdx +65 -56
- package/docs/cookbook/advanced/serializable-steps.mdx +48 -68
- package/docs/cookbook/advanced/upgrading-workflows.mdx +199 -0
- package/docs/cookbook/agent-patterns/agent-cancellation.mdx +78 -60
- package/docs/cookbook/agent-patterns/durable-agent.mdx +23 -131
- package/docs/cookbook/agent-patterns/human-in-the-loop.mdx +180 -195
- package/docs/cookbook/common-patterns/batching.mdx +18 -14
- package/docs/cookbook/common-patterns/idempotency.mdx +41 -53
- package/docs/cookbook/common-patterns/rate-limiting.mdx +8 -4
- package/docs/cookbook/common-patterns/saga.mdx +23 -19
- package/docs/cookbook/common-patterns/scheduling.mdx +34 -22
- package/docs/cookbook/common-patterns/sequential-and-parallel.mdx +29 -25
- package/docs/cookbook/common-patterns/timeouts.mdx +26 -21
- package/docs/cookbook/common-patterns/webhooks.mdx +10 -6
- package/docs/cookbook/common-patterns/workflow-composition.mdx +30 -27
- package/docs/cookbook/index.mdx +22 -21
- package/docs/cookbook/integrations/ai-sdk.mdx +86 -48
- package/docs/cookbook/integrations/chat-sdk.mdx +50 -33
- package/docs/cookbook/integrations/sandbox.mdx +62 -45
- package/docs/deploying.mdx +95 -0
- package/docs/errors/abort-signal-timeout-in-workflow.mdx +16 -12
- package/docs/errors/corrupted-event-log.mdx +39 -18
- package/docs/errors/deployment-mismatch.mdx +71 -0
- package/docs/errors/fetch-in-workflow.mdx +15 -14
- package/docs/errors/hook-conflict.mdx +69 -13
- package/docs/errors/index.mdx +2 -36
- package/docs/errors/node-js-module-in-workflow.mdx +9 -5
- package/docs/errors/replay-divergence.mdx +27 -0
- package/docs/errors/run-expired.mdx +85 -0
- package/docs/errors/runtime-decryption-failed.mdx +77 -0
- package/docs/errors/serialization-failed.mdx +44 -12
- package/docs/errors/start-invalid-workflow-function.mdx +9 -5
- package/docs/errors/step-executed-multiple-times.mdx +23 -0
- package/docs/errors/step-not-registered.mdx +6 -6
- package/docs/errors/timeout-in-workflow.mdx +12 -8
- package/docs/errors/webhook-invalid-respond-with-value.mdx +18 -18
- package/docs/errors/webhook-response-not-sent.mdx +20 -16
- package/docs/errors/workflow-not-registered.mdx +5 -5
- package/docs/foundations/cancellation.mdx +31 -32
- package/docs/foundations/errors-and-retries.mdx +42 -11
- package/docs/foundations/hooks.mdx +64 -35
- package/docs/foundations/idempotency.mdx +244 -12
- package/docs/foundations/index.mdx +1 -23
- package/docs/foundations/meta.json +2 -1
- package/docs/foundations/serialization.mdx +21 -22
- package/docs/foundations/starting-workflows.mdx +106 -30
- package/docs/foundations/streaming.mdx +108 -60
- package/docs/foundations/versioning.mdx +263 -0
- package/docs/foundations/workflows-and-steps.mdx +9 -9
- package/docs/getting-started/astro.mdx +22 -18
- package/docs/getting-started/express.mdx +15 -11
- package/docs/getting-started/fastify.mdx +15 -11
- package/docs/getting-started/hono.mdx +15 -11
- package/docs/getting-started/index.mdx +10 -3
- package/docs/getting-started/meta.json +3 -1
- package/docs/getting-started/nestjs.mdx +87 -20
- package/docs/getting-started/next.mdx +22 -16
- package/docs/getting-started/nitro.mdx +22 -18
- package/docs/getting-started/nuxt.mdx +15 -11
- package/docs/getting-started/python.mdx +190 -41
- package/docs/getting-started/react-router/index.mdx +33 -0
- package/docs/getting-started/react-router/meta.json +5 -0
- package/docs/getting-started/react-router/v7.mdx +237 -0
- package/docs/getting-started/react-router/v8.mdx +232 -0
- package/docs/getting-started/sveltekit.mdx +20 -16
- package/docs/getting-started/tanstack-start.mdx +17 -13
- package/docs/getting-started/vite.mdx +15 -11
- package/docs/how-it-works/cancellation.mdx +63 -63
- package/docs/how-it-works/code-transform.mdx +83 -67
- package/docs/how-it-works/encryption.mdx +30 -26
- package/docs/how-it-works/event-sourcing.mdx +125 -34
- package/docs/how-it-works/framework-integrations.mdx +96 -337
- package/docs/how-it-works/understanding-directives.mdx +22 -22
- package/docs/internal/index.mdx +6 -4
- package/docs/internal/meta.json +6 -1
- package/docs/internal/nitro-native-build.mdx +38 -0
- package/docs/internal/nitro-web-ui.mdx +24 -0
- package/docs/internal/serializable-abort-controller.mdx +7 -7
- package/docs/meta.json +3 -2
- package/docs/observability/attributes.mdx +134 -0
- package/docs/observability/index.mdx +32 -10
- package/docs/observability/meta.json +1 -1
- package/docs/observability/retention.mdx +95 -0
- package/docs/observability/tracing.mdx +124 -0
- package/docs/testing/index.mdx +36 -36
- package/docs/testing/server-based.mdx +10 -10
- package/docs/whats-new.mdx +186 -0
- package/package.json +17 -14
- package/docs/api-reference/workflow-api/world/index.mdx +0 -58
- package/docs/api-reference/workflow-api/world/meta.json +0 -4
- package/docs/api-reference/workflow-api/world/observability.mdx +0 -164
- package/docs/api-reference/workflow-api/world/queue.mdx +0 -86
- package/docs/deploying/building-a-world.mdx +0 -251
- package/docs/deploying/index.mdx +0 -95
- package/docs/deploying/meta.json +0 -4
- package/docs/deploying/world/local-world.mdx +0 -84
- package/docs/deploying/world/meta.json +0 -4
- package/docs/deploying/world/postgres-world.mdx +0 -224
- package/docs/deploying/world/vercel-world.mdx +0 -179
- package/docs/migration-guides/index.mdx +0 -34
- package/docs/migration-guides/meta.json +0 -9
- package/docs/migration-guides/migrating-from-aws-step-functions.mdx +0 -363
- package/docs/migration-guides/migrating-from-inngest.mdx +0 -314
- package/docs/migration-guides/migrating-from-temporal.mdx +0 -318
- package/docs/migration-guides/migrating-from-trigger-dev.mdx +0 -337
package/docs/deploying/index.mdx
DELETED
|
@@ -1,95 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
title: Deploying
|
|
3
|
-
icon: Rocket
|
|
4
|
-
description: Deploy workflows locally, on Vercel, or anywhere using pluggable World adapters.
|
|
5
|
-
type: overview
|
|
6
|
-
summary: Learn how to deploy workflows to different environments using World adapters.
|
|
7
|
-
related:
|
|
8
|
-
- /docs/deploying/world/local-world
|
|
9
|
-
- /docs/deploying/world/postgres-world
|
|
10
|
-
- /docs/deploying/world/vercel-world
|
|
11
|
-
- /docs/deploying/building-a-world
|
|
12
|
-
---
|
|
13
|
-
|
|
14
|
-
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.
|
|
15
|
-
|
|
16
|
-
## Local Development
|
|
17
|
-
|
|
18
|
-
During local development, workflows automatically use the **Local World** — no configuration required. The Local World stores workflow data in a `.workflow-data/` directory and processes steps synchronously, making it perfect for development and testing.
|
|
19
|
-
|
|
20
|
-
```bash
|
|
21
|
-
# Just run your dev server - workflows work out of the box
|
|
22
|
-
npm run dev
|
|
23
|
-
```
|
|
24
|
-
|
|
25
|
-
You can inspect local workflow data using the CLI:
|
|
26
|
-
|
|
27
|
-
```bash
|
|
28
|
-
npx workflow inspect runs
|
|
29
|
-
```
|
|
30
|
-
|
|
31
|
-
<Callout>
|
|
32
|
-
Learn more about the [Local World](/worlds/local) configuration and internals.
|
|
33
|
-
</Callout>
|
|
34
|
-
|
|
35
|
-
## Deploying to Vercel
|
|
36
|
-
|
|
37
|
-
The easiest way to deploy workflows to production is on Vercel. When you deploy to Vercel, workflows automatically use the **Vercel World** — again, with zero configuration.
|
|
38
|
-
|
|
39
|
-
The Vercel World provides:
|
|
40
|
-
|
|
41
|
-
- **Durable storage** - Workflow state persists across function invocations
|
|
42
|
-
- **Managed queuing** - Steps are processed reliably with automatic retries
|
|
43
|
-
- **Automatic scaling** - Workflows scale with your application
|
|
44
|
-
- **Built-in observability** - View workflow runs in the Vercel dashboard
|
|
45
|
-
|
|
46
|
-
Simply deploy your application:
|
|
47
|
-
|
|
48
|
-
```bash
|
|
49
|
-
vercel deploy
|
|
50
|
-
```
|
|
51
|
-
|
|
52
|
-
<FluidComputeCallout />
|
|
53
|
-
|
|
54
|
-
<Callout>
|
|
55
|
-
Learn more about the [Vercel World](/worlds/vercel) and its capabilities.
|
|
56
|
-
</Callout>
|
|
57
|
-
|
|
58
|
-
## Self-Hosting & Other Providers
|
|
59
|
-
|
|
60
|
-
For self-hosting or deploying to other cloud providers, you can use community-maintained Worlds or build your own.
|
|
61
|
-
|
|
62
|
-
<Cards>
|
|
63
|
-
<Card title="Explore Worlds" href="/worlds">
|
|
64
|
-
Browse official and community World implementations with compatibility status and performance benchmarks.
|
|
65
|
-
</Card>
|
|
66
|
-
<Card title="Build Your Own" href="/docs/deploying/building-a-world">
|
|
67
|
-
Learn how to implement a custom World for your infrastructure.
|
|
68
|
-
</Card>
|
|
69
|
-
</Cards>
|
|
70
|
-
|
|
71
|
-
### Using a Third-Party World
|
|
72
|
-
|
|
73
|
-
To use a different World implementation, set the `WORKFLOW_TARGET_WORLD` environment variable:
|
|
74
|
-
|
|
75
|
-
```bash
|
|
76
|
-
export WORKFLOW_TARGET_WORLD=@workflow/world-postgres
|
|
77
|
-
# Plus any world-specific configuration
|
|
78
|
-
export DATABASE_URL=postgres://...
|
|
79
|
-
```
|
|
80
|
-
|
|
81
|
-
Each World may have its own configuration requirements — refer to the specific World's documentation for details.
|
|
82
|
-
|
|
83
|
-
## Observability
|
|
84
|
-
|
|
85
|
-
The [Observability tools](/docs/observability) work with any World backend. By default they connect to your local environment, but can be configured to inspect remote deployments:
|
|
86
|
-
|
|
87
|
-
```bash
|
|
88
|
-
# Inspect local workflows
|
|
89
|
-
npx workflow inspect runs
|
|
90
|
-
|
|
91
|
-
# Inspect remote workflows
|
|
92
|
-
npx workflow inspect runs --backend @workflow/world-postgres
|
|
93
|
-
```
|
|
94
|
-
|
|
95
|
-
Learn more about [Observability](/docs/observability) tools.
|
package/docs/deploying/meta.json
DELETED
|
@@ -1,84 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
title: Local World
|
|
3
|
-
description: Zero-config world bundled with Workflow for local development. No external services required.
|
|
4
|
-
type: integration
|
|
5
|
-
summary: Set up the Local World for zero-config workflow development on your machine.
|
|
6
|
-
prerequisites:
|
|
7
|
-
- /docs/deploying
|
|
8
|
-
related:
|
|
9
|
-
- /docs/deploying/world/postgres-world
|
|
10
|
-
- /docs/deploying/world/vercel-world
|
|
11
|
-
---
|
|
12
|
-
|
|
13
|
-
The Local World is bundled with `workflow` and used automatically during local development. No installation or configuration required.
|
|
14
|
-
|
|
15
|
-
To explicitly use the local world in any environment, set the environment variable:
|
|
16
|
-
|
|
17
|
-
```bash
|
|
18
|
-
WORKFLOW_TARGET_WORLD=local
|
|
19
|
-
```
|
|
20
|
-
|
|
21
|
-
## Observability
|
|
22
|
-
|
|
23
|
-
The `workflow` CLI uses the local world by default. Running these commands inside your workflow project will show your local development workflows:
|
|
24
|
-
|
|
25
|
-
```bash
|
|
26
|
-
# List recent workflow runs
|
|
27
|
-
npx workflow inspect runs
|
|
28
|
-
|
|
29
|
-
# Launch the web UI
|
|
30
|
-
npx workflow web
|
|
31
|
-
```
|
|
32
|
-
|
|
33
|
-
Learn more in the [Observability](/docs/observability) documentation.
|
|
34
|
-
|
|
35
|
-
## Testing & Compatibility
|
|
36
|
-
|
|
37
|
-
<WorldTestingPerformance />
|
|
38
|
-
|
|
39
|
-
## Configuration
|
|
40
|
-
|
|
41
|
-
The local world works with zero configuration, but you can customize behavior through environment variables or programmatically via `createLocalWorld()`.
|
|
42
|
-
|
|
43
|
-
### `WORKFLOW_LOCAL_DATA_DIR`
|
|
44
|
-
|
|
45
|
-
Directory for storing workflow data as JSON files. Default: `.workflow-data/`
|
|
46
|
-
|
|
47
|
-
### `PORT`
|
|
48
|
-
|
|
49
|
-
The application dev server port. Used to enqueue steps and workflows. Default: auto-detected
|
|
50
|
-
|
|
51
|
-
### `WORKFLOW_LOCAL_BASE_URL`
|
|
52
|
-
|
|
53
|
-
Full base URL override for HTTPS or custom hostnames. Default: `http://localhost:{port}`
|
|
54
|
-
|
|
55
|
-
Port resolution priority: `baseUrl` > `port` > `PORT` > auto-detected
|
|
56
|
-
|
|
57
|
-
### `WORKFLOW_LOCAL_QUEUE_CONCURRENCY`
|
|
58
|
-
|
|
59
|
-
Maximum number of concurrent queue workers. Default: `100`
|
|
60
|
-
|
|
61
|
-
### Programmatic configuration
|
|
62
|
-
|
|
63
|
-
{/* @skip-typecheck: incomplete code sample */}
|
|
64
|
-
```typescript title="workflow.config.ts" lineNumbers
|
|
65
|
-
import { createLocalWorld } from "@workflow/world-local";
|
|
66
|
-
|
|
67
|
-
const world = createLocalWorld({
|
|
68
|
-
dataDir: "./custom-workflow-data",
|
|
69
|
-
port: 5173,
|
|
70
|
-
// baseUrl overrides port if set
|
|
71
|
-
baseUrl: "https://local.example.com:3000",
|
|
72
|
-
});
|
|
73
|
-
```
|
|
74
|
-
|
|
75
|
-
## Limitations
|
|
76
|
-
|
|
77
|
-
The local world is designed for development, not production:
|
|
78
|
-
|
|
79
|
-
- **In-memory queue** - Steps are queued in memory and do not persist across server restarts
|
|
80
|
-
- **Filesystem storage** - Data is stored in local JSON files
|
|
81
|
-
- **Single instance** - Cannot handle distributed deployments
|
|
82
|
-
- **No authentication** - Suitable only for local development
|
|
83
|
-
|
|
84
|
-
For production deployments, use the [Vercel World](/worlds/vercel) or [Postgres World](/worlds/postgres).
|
|
@@ -1,224 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
title: Postgres World
|
|
3
|
-
description: Production-ready, self-hosted world using PostgreSQL for storage and graphile-worker for job processing.
|
|
4
|
-
type: integration
|
|
5
|
-
summary: Deploy workflows to your own infrastructure using PostgreSQL and graphile-worker.
|
|
6
|
-
prerequisites:
|
|
7
|
-
- /docs/deploying
|
|
8
|
-
related:
|
|
9
|
-
- /docs/deploying/world/local-world
|
|
10
|
-
- /docs/deploying/world/vercel-world
|
|
11
|
-
---
|
|
12
|
-
|
|
13
|
-
The Postgres World is a production-ready backend for self-hosted deployments. It uses PostgreSQL for durable storage and [graphile-worker](https://github.com/graphile/worker) for reliable job processing.
|
|
14
|
-
|
|
15
|
-
Use the Postgres World when you need to deploy workflows on your own infrastructure outside of Vercel - such as a Docker container, Kubernetes cluster, or any cloud that supports long-running servers.
|
|
16
|
-
|
|
17
|
-
## Installation
|
|
18
|
-
|
|
19
|
-
Install the Postgres World package in your workflow project:
|
|
20
|
-
|
|
21
|
-
```package-install
|
|
22
|
-
@workflow/world-postgres
|
|
23
|
-
```
|
|
24
|
-
|
|
25
|
-
Configure the required environment variables to use the world and point it to your PostgreSQL database:
|
|
26
|
-
|
|
27
|
-
```bash title=".env"
|
|
28
|
-
WORKFLOW_TARGET_WORLD="@workflow/world-postgres"
|
|
29
|
-
WORKFLOW_POSTGRES_URL="postgres://user:password@host:5432/database"
|
|
30
|
-
```
|
|
31
|
-
|
|
32
|
-
Run the migration script to create the necessary tables in your database. Ensure `WORKFLOW_POSTGRES_URL` is set when running this command:
|
|
33
|
-
|
|
34
|
-
```bash
|
|
35
|
-
npx workflow-postgres-setup
|
|
36
|
-
```
|
|
37
|
-
|
|
38
|
-
<Callout type="info">
|
|
39
|
-
The migration is idempotent and can safely be run as a post-deployment lifecycle script.
|
|
40
|
-
</Callout>
|
|
41
|
-
|
|
42
|
-
## Starting the World
|
|
43
|
-
|
|
44
|
-
To subscribe to the graphile-worker queue, your workflow app needs to start the world on server start. Here are examples for a few frameworks:
|
|
45
|
-
|
|
46
|
-
<Tabs items={["Next.js", "SvelteKit", "Nitro"]}>
|
|
47
|
-
|
|
48
|
-
<Tab value="Next.js">
|
|
49
|
-
|
|
50
|
-
Create an `instrumentation.ts` file in your project root:
|
|
51
|
-
|
|
52
|
-
```ts title="instrumentation.ts" lineNumbers
|
|
53
|
-
export async function register() {
|
|
54
|
-
if (process.env.NEXT_RUNTIME !== "edge") {
|
|
55
|
-
const { getWorld } = await import("workflow/runtime");
|
|
56
|
-
const world = await getWorld();
|
|
57
|
-
await world.start?.();
|
|
58
|
-
}
|
|
59
|
-
}
|
|
60
|
-
```
|
|
61
|
-
|
|
62
|
-
<Callout type="info">
|
|
63
|
-
Learn more about [Next.js Instrumentation](https://nextjs.org/docs/app/guides/instrumentation).
|
|
64
|
-
</Callout>
|
|
65
|
-
|
|
66
|
-
</Tab>
|
|
67
|
-
|
|
68
|
-
<Tab value="SvelteKit">
|
|
69
|
-
|
|
70
|
-
Create a `src/hooks.server.ts` file:
|
|
71
|
-
|
|
72
|
-
```ts title="src/hooks.server.ts" lineNumbers
|
|
73
|
-
import type { ServerInit } from "@sveltejs/kit";
|
|
74
|
-
|
|
75
|
-
export const init: ServerInit = async () => {
|
|
76
|
-
const { getWorld } = await import("workflow/runtime");
|
|
77
|
-
const world = await getWorld();
|
|
78
|
-
await world.start?.();
|
|
79
|
-
};
|
|
80
|
-
```
|
|
81
|
-
|
|
82
|
-
<Callout type="info">
|
|
83
|
-
Learn more about [SvelteKit Hooks](https://svelte.dev/docs/kit/hooks).
|
|
84
|
-
</Callout>
|
|
85
|
-
|
|
86
|
-
</Tab>
|
|
87
|
-
|
|
88
|
-
<Tab value="Nitro">
|
|
89
|
-
|
|
90
|
-
Create a plugin to start the world on server initialization:
|
|
91
|
-
|
|
92
|
-
```ts title="plugins/start-pg-world.ts" lineNumbers
|
|
93
|
-
import { defineNitroPlugin } from "nitro/~internal/runtime/plugin";
|
|
94
|
-
|
|
95
|
-
export default defineNitroPlugin(async () => {
|
|
96
|
-
const { getWorld } = await import("workflow/runtime");
|
|
97
|
-
const world = await getWorld();
|
|
98
|
-
await world.start?.();
|
|
99
|
-
});
|
|
100
|
-
```
|
|
101
|
-
|
|
102
|
-
Register the plugin in your config:
|
|
103
|
-
|
|
104
|
-
```ts title="nitro.config.ts"
|
|
105
|
-
import { defineNitroConfig } from "nitropack";
|
|
106
|
-
|
|
107
|
-
export default defineNitroConfig({
|
|
108
|
-
modules: ["workflow/nitro"],
|
|
109
|
-
plugins: ["plugins/start-pg-world.ts"],
|
|
110
|
-
});
|
|
111
|
-
```
|
|
112
|
-
|
|
113
|
-
<Callout type="info">
|
|
114
|
-
Learn more about [Nitro Plugins](https://v3.nitro.build/docs/plugins).
|
|
115
|
-
</Callout>
|
|
116
|
-
|
|
117
|
-
</Tab>
|
|
118
|
-
|
|
119
|
-
</Tabs>
|
|
120
|
-
|
|
121
|
-
<Callout type="info">
|
|
122
|
-
The Postgres World requires a long-lived worker process that polls the database for jobs. This does not work on serverless environments. For Vercel deployments, use the [Vercel World](/worlds/vercel) instead.
|
|
123
|
-
</Callout>
|
|
124
|
-
|
|
125
|
-
## Observability
|
|
126
|
-
|
|
127
|
-
Use the `workflow` CLI to inspect workflows stored in PostgreSQL:
|
|
128
|
-
|
|
129
|
-
```bash
|
|
130
|
-
# Set your database URL
|
|
131
|
-
export WORKFLOW_POSTGRES_URL="postgres://user:password@host:5432/database"
|
|
132
|
-
|
|
133
|
-
# List workflow runs
|
|
134
|
-
npx workflow inspect runs --backend @workflow/world-postgres
|
|
135
|
-
|
|
136
|
-
# Launch the web UI
|
|
137
|
-
npx workflow web --backend @workflow/world-postgres
|
|
138
|
-
```
|
|
139
|
-
|
|
140
|
-
If `WORKFLOW_POSTGRES_URL` is not set, the CLI defaults to `postgres://world:world@localhost:5432/world`.
|
|
141
|
-
|
|
142
|
-
Learn more in the [Observability](/docs/observability) documentation.
|
|
143
|
-
|
|
144
|
-
## Testing & Compatibility
|
|
145
|
-
|
|
146
|
-
<WorldTestingPerformance />
|
|
147
|
-
|
|
148
|
-
## Configuration
|
|
149
|
-
|
|
150
|
-
All configuration options can be set via environment variables or programmatically via `createWorld()`.
|
|
151
|
-
|
|
152
|
-
### `WORKFLOW_POSTGRES_URL` (required)
|
|
153
|
-
|
|
154
|
-
PostgreSQL connection string. Falls back to `DATABASE_URL` if not set.
|
|
155
|
-
|
|
156
|
-
Default: `postgres://world:world@localhost:5432/world`
|
|
157
|
-
|
|
158
|
-
### `WORKFLOW_POSTGRES_JOB_PREFIX`
|
|
159
|
-
|
|
160
|
-
Prefix for graphile-worker queue job names. Useful when sharing a database between multiple applications.
|
|
161
|
-
|
|
162
|
-
### `WORKFLOW_POSTGRES_WORKER_CONCURRENCY`
|
|
163
|
-
|
|
164
|
-
Number of concurrent workers polling for jobs. Default: `50`.
|
|
165
|
-
|
|
166
|
-
This value also bounds how many parent→child workflow polls can be in flight simultaneously. Every `await childRun.returnValue` inside a workflow holds a worker slot until the child run terminates — if you expect recursive or highly-fanned-out parent/child workflows, raise this ceiling above the peak number of concurrent polls. With the default of 50, the included `fibonacciWorkflow` e2e test (fib(6), ~24 concurrent polls at peak) passes; deeper recursion or larger fanouts need a correspondingly larger setting.
|
|
167
|
-
|
|
168
|
-
### `WORKFLOW_POSTGRES_MAX_POOL_SIZE`
|
|
169
|
-
|
|
170
|
-
Maximum size of the internal `pg.Pool` used when `createWorld()` constructs the pool. Default: `10`
|
|
171
|
-
|
|
172
|
-
For higher worker concurrency, Graphile Worker recommends setting `maxPoolSize` to `10` or `queueConcurrency + 2`, whichever is larger.
|
|
173
|
-
|
|
174
|
-
### Programmatic configuration
|
|
175
|
-
|
|
176
|
-
{/*@skip-typecheck: incomplete code sample*/}
|
|
177
|
-
|
|
178
|
-
```typescript title="workflow.config.ts" lineNumbers
|
|
179
|
-
import { createWorld } from "@workflow/world-postgres";
|
|
180
|
-
|
|
181
|
-
const world = createWorld({
|
|
182
|
-
connectionString: "postgres://user:password@host:5432/database",
|
|
183
|
-
jobPrefix: "myapp_",
|
|
184
|
-
queueConcurrency: 50,
|
|
185
|
-
maxPoolSize: 52, // overrides WORKFLOW_POSTGRES_MAX_POOL_SIZE
|
|
186
|
-
});
|
|
187
|
-
```
|
|
188
|
-
|
|
189
|
-
## How It Works
|
|
190
|
-
|
|
191
|
-
The Postgres World uses PostgreSQL as a durable backend:
|
|
192
|
-
|
|
193
|
-
- **Storage** - Workflow runs, events, steps, and hooks are stored in PostgreSQL tables
|
|
194
|
-
- **Job Queue** - [graphile-worker](https://github.com/graphile/worker) handles reliable job processing with retries
|
|
195
|
-
- **Streaming** - PostgreSQL NOTIFY/LISTEN enables real-time event distribution
|
|
196
|
-
|
|
197
|
-
This architecture ensures workflows survive application restarts with all state reliably persisted. For implementation details, see the [source code](https://github.com/vercel/workflow/tree/main/packages/world-postgres).
|
|
198
|
-
|
|
199
|
-
## Deployment
|
|
200
|
-
|
|
201
|
-
Deploy your application to any cloud that supports long-running servers:
|
|
202
|
-
|
|
203
|
-
- Docker containers
|
|
204
|
-
- Kubernetes clusters
|
|
205
|
-
- Virtual machines
|
|
206
|
-
- Platform-as-a-Service providers (Railway, Render, Fly.io, etc.)
|
|
207
|
-
|
|
208
|
-
Ensure your deployment has:
|
|
209
|
-
|
|
210
|
-
1. Network access to your PostgreSQL database
|
|
211
|
-
2. Environment variables configured correctly
|
|
212
|
-
3. The `start()` function called on server initialization
|
|
213
|
-
|
|
214
|
-
<Callout type="info">
|
|
215
|
-
The Postgres World is not compatible with Vercel deployments. On Vercel, workflows automatically use the [Vercel World](/worlds/vercel) with zero configuration.
|
|
216
|
-
</Callout>
|
|
217
|
-
|
|
218
|
-
## Limitations
|
|
219
|
-
|
|
220
|
-
- **Requires long-running process** - Must call `start()` on server initialization; not compatible with serverless platforms
|
|
221
|
-
- **PostgreSQL infrastructure** - Requires a PostgreSQL database (self-hosted or managed)
|
|
222
|
-
- **Not compatible with Vercel** - Use the [Vercel World](/worlds/vercel) for Vercel deployments
|
|
223
|
-
|
|
224
|
-
For local development, use the [Local World](/worlds/local) which requires no external services.
|
|
@@ -1,179 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
title: Vercel World
|
|
3
|
-
description: Fully-managed world for Vercel deployments with automatic storage, queuing, and authentication.
|
|
4
|
-
type: integration
|
|
5
|
-
summary: Deploy workflows to Vercel with fully-managed storage, queuing, and authentication.
|
|
6
|
-
prerequisites:
|
|
7
|
-
- /docs/deploying
|
|
8
|
-
related:
|
|
9
|
-
- /docs/how-it-works/encryption
|
|
10
|
-
- /docs/deploying/world/local-world
|
|
11
|
-
- /docs/deploying/world/postgres-world
|
|
12
|
-
---
|
|
13
|
-
|
|
14
|
-
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.
|
|
15
|
-
|
|
16
|
-
When you deploy to Vercel, workflows automatically use the Vercel World - no setup required.
|
|
17
|
-
|
|
18
|
-
## Usage
|
|
19
|
-
|
|
20
|
-
Deploy your application to Vercel:
|
|
21
|
-
|
|
22
|
-
```bash
|
|
23
|
-
vercel deploy
|
|
24
|
-
```
|
|
25
|
-
|
|
26
|
-
That's it. Vercel automatically:
|
|
27
|
-
|
|
28
|
-
- Selects the Vercel World backend
|
|
29
|
-
- Configures authentication using OIDC tokens
|
|
30
|
-
- Provisions storage and queuing infrastructure
|
|
31
|
-
- Isolates data per environment (production, preview, development)
|
|
32
|
-
|
|
33
|
-
<FluidComputeCallout />
|
|
34
|
-
|
|
35
|
-
## Vercel platform documentation
|
|
36
|
-
|
|
37
|
-
For complete details on pricing, usage limits, and included allotments on Vercel, see the official Vercel documentation:
|
|
38
|
-
|
|
39
|
-
- **[Vercel Workflow](https://vercel.com/docs/workflow)** — Pricing details, concepts, and observability for Workflow on Vercel
|
|
40
|
-
- **[Vercel limits](https://vercel.com/docs/limits)** — Platform-wide limits including Workflow-specific constraints
|
|
41
|
-
- **[Vercel Hobby plan](https://vercel.com/docs/plans/hobby)** — Free tier included usage for Workflow and other resources
|
|
42
|
-
|
|
43
|
-
For self-hosted deployments, use the [Postgres World](/worlds/postgres). For local development, use the [Local World](/worlds/local).
|
|
44
|
-
|
|
45
|
-
## Limitations
|
|
46
|
-
|
|
47
|
-
- **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.
|
|
48
|
-
|
|
49
|
-
- **Data residency** - The Vercel World is currently deployed in the `iad1` region. This means independently of the deployment location of your application, the data for your workflows will be stored in the `iad1` region.
|
|
50
|
-
|
|
51
|
-
## Observability
|
|
52
|
-
|
|
53
|
-
Workflow observability is built into the Vercel dashboard on your project page. It respects your existing authentication and project permission settings.
|
|
54
|
-
|
|
55
|
-
The `workflow` CLI commands open a browser window deeplinked to the Vercel dashboard:
|
|
56
|
-
|
|
57
|
-
```bash
|
|
58
|
-
# List workflow runs (opens Vercel dashboard)
|
|
59
|
-
npx workflow inspect runs --backend vercel
|
|
60
|
-
|
|
61
|
-
# Launch the web UI (opens Vercel dashboard)
|
|
62
|
-
npx workflow web --backend vercel
|
|
63
|
-
```
|
|
64
|
-
|
|
65
|
-
The CLI automatically retrieves authentication from the Vercel CLI (`vercel login`) and infers project/team IDs from your local Vercel project linking.
|
|
66
|
-
|
|
67
|
-
To use the local observability UI instead of the Vercel dashboard:
|
|
68
|
-
|
|
69
|
-
```bash
|
|
70
|
-
npx workflow web --backend vercel --localUi
|
|
71
|
-
```
|
|
72
|
-
|
|
73
|
-
To override the automatic configuration:
|
|
74
|
-
|
|
75
|
-
```bash
|
|
76
|
-
npx workflow inspect runs \
|
|
77
|
-
--backend vercel \
|
|
78
|
-
--env production \
|
|
79
|
-
--project my-project \
|
|
80
|
-
--team my-team \
|
|
81
|
-
--authToken <your-token>
|
|
82
|
-
```
|
|
83
|
-
|
|
84
|
-
Learn more in the [Observability](/docs/observability) documentation.
|
|
85
|
-
|
|
86
|
-
## Testing & Compatibility
|
|
87
|
-
|
|
88
|
-
<WorldTestingPerformance />
|
|
89
|
-
|
|
90
|
-
## Configuration
|
|
91
|
-
|
|
92
|
-
The Vercel World requires no configuration when deployed to Vercel. For advanced use cases, you can override settings programmatically via `createVercelWorld()`.
|
|
93
|
-
|
|
94
|
-
### `WORKFLOW_VERCEL_ENV`
|
|
95
|
-
|
|
96
|
-
The Vercel environment to use. Options: `production`, `preview`, `development`. Automatically detected.
|
|
97
|
-
|
|
98
|
-
### `WORKFLOW_VERCEL_AUTH_TOKEN`
|
|
99
|
-
|
|
100
|
-
Authentication token for API requests. Automatically detected.
|
|
101
|
-
|
|
102
|
-
### `WORKFLOW_VERCEL_PROJECT`
|
|
103
|
-
|
|
104
|
-
Vercel project ID for API requests. Automatically detected.
|
|
105
|
-
|
|
106
|
-
### `WORKFLOW_VERCEL_TEAM`
|
|
107
|
-
|
|
108
|
-
Vercel team ID for API requests. Automatically detected.
|
|
109
|
-
|
|
110
|
-
### `WORKFLOW_VERCEL_BACKEND_URL`
|
|
111
|
-
|
|
112
|
-
Custom base URL for the Vercel workflow API. Automatically detected.
|
|
113
|
-
|
|
114
|
-
### Programmatic configuration
|
|
115
|
-
|
|
116
|
-
{/*@skip-typecheck: incomplete code sample*/}
|
|
117
|
-
|
|
118
|
-
```typescript title="workflow.config.ts" lineNumbers
|
|
119
|
-
import { createVercelWorld } from "@workflow/world-vercel";
|
|
120
|
-
|
|
121
|
-
const world = createVercelWorld({
|
|
122
|
-
token: process.env.WORKFLOW_VERCEL_AUTH_TOKEN,
|
|
123
|
-
baseUrl: "https://api.vercel.com/v1/workflow",
|
|
124
|
-
projectConfig: {
|
|
125
|
-
projectId: "my-project",
|
|
126
|
-
teamId: "my-team",
|
|
127
|
-
environment: "production",
|
|
128
|
-
},
|
|
129
|
-
});
|
|
130
|
-
```
|
|
131
|
-
|
|
132
|
-
## Versioning
|
|
133
|
-
|
|
134
|
-
On Vercel, workflow runs are pegged to the deployment that started them. This means:
|
|
135
|
-
|
|
136
|
-
- Existing workflow runs continue executing on their original deployment, even as new code is deployed
|
|
137
|
-
- New workflow runs start on the latest deployment
|
|
138
|
-
- Code changes won't break in-flight workflows
|
|
139
|
-
|
|
140
|
-
This ensures long-running workflows complete reliably without being affected by subsequent deployments.
|
|
141
|
-
|
|
142
|
-
## Security
|
|
143
|
-
|
|
144
|
-
### Consumer function security
|
|
145
|
-
|
|
146
|
-
Workflow handler functions on Vercel are not accessible through public endpoints. During the build step, the Workflow SDK registers each handler as only reachable by [Vercel Queue](https://vercel.com/docs/queues), by using the `experimentalTriggers` configuration in `.vc-config.json`:
|
|
147
|
-
|
|
148
|
-
```json title=".vc-config.json (step handler)"
|
|
149
|
-
{
|
|
150
|
-
"experimentalTriggers": [
|
|
151
|
-
{
|
|
152
|
-
"type": "queue/v2beta",
|
|
153
|
-
"topic": "__wkf_step_*",
|
|
154
|
-
"consumer": "default",
|
|
155
|
-
}
|
|
156
|
-
]
|
|
157
|
-
}
|
|
158
|
-
```
|
|
159
|
-
|
|
160
|
-
Practically, this means:
|
|
161
|
-
|
|
162
|
-
- You don't need to add authentication or authorization logic to workflow handlers
|
|
163
|
-
- Unauthorized requests can never reach the step or workflow functions
|
|
164
|
-
- Only messages delivered through Vercel Queues can trigger execution
|
|
165
|
-
- Handlers receive only a message ID that must be retrieved from Vercel's backend, making it impossible to craft custom payloads
|
|
166
|
-
|
|
167
|
-
<Callout>
|
|
168
|
-
This configuration is managed entirely by the Workflow SDK build step. You should not need to write this yourself. If you are writing a custom integration, see [Framework Integrations — Security](/docs/how-it-works/framework-integrations#security) for more details.
|
|
169
|
-
</Callout>
|
|
170
|
-
|
|
171
|
-
## How It Works
|
|
172
|
-
|
|
173
|
-
The Vercel World uses Vercel's infrastructure for workflow execution:
|
|
174
|
-
|
|
175
|
-
- **Storage** - Workflow data is stored in Vercel's cloud with automatic replication and [end-to-end encryption](/docs/how-it-works/encryption)
|
|
176
|
-
- **Queuing** - Steps are distributed across serverless functions via [Vercel Queues](https://vercel.com/docs/queues) with automatic retries and [consumer function security](#consumer-function-security)
|
|
177
|
-
- **Authentication** - OIDC tokens provide secure, automatic authentication
|
|
178
|
-
|
|
179
|
-
For more details, see the [Vercel Workflow documentation](https://vercel.com/docs/workflow).
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
title: Migration Guides
|
|
3
|
-
description: Move your existing durable workflow system to the Workflow SDK with side-by-side code comparisons and a realistic migration example.
|
|
4
|
-
type: overview
|
|
5
|
-
summary: Migrate from Temporal, Inngest, AWS Step Functions, or trigger.dev to the Workflow SDK.
|
|
6
|
-
related:
|
|
7
|
-
- /docs/foundations/workflows-and-steps
|
|
8
|
-
- /docs/getting-started
|
|
9
|
-
---
|
|
10
|
-
|
|
11
|
-
<Callout type="info">
|
|
12
|
-
Install the Workflow SDK migration skill:
|
|
13
|
-
|
|
14
|
-
```bash
|
|
15
|
-
npx skills add https://github.com/vercel/workflow --skill migrating-to-workflow-sdk
|
|
16
|
-
```
|
|
17
|
-
</Callout>
|
|
18
|
-
|
|
19
|
-
Move an existing orchestration system to the Workflow SDK. Each guide pairs a concept-mapping table with side-by-side code, so you can translate one piece of your codebase at a time.
|
|
20
|
-
|
|
21
|
-
<Cards>
|
|
22
|
-
<Card href="/docs/migration-guides/migrating-from-temporal" title="Migrating from Temporal">
|
|
23
|
-
Map Activities, Workers, Signals, and Child Workflows onto workflows, steps, hooks, and `start()` / `getRun()`.
|
|
24
|
-
</Card>
|
|
25
|
-
<Card href="/docs/migration-guides/migrating-from-inngest" title="Migrating from Inngest">
|
|
26
|
-
Map `createFunction`, `step.run`, `step.sleep`, `step.waitForEvent`, and `step.invoke` onto workflows, steps, and hooks.
|
|
27
|
-
</Card>
|
|
28
|
-
<Card href="/docs/migration-guides/migrating-from-aws-step-functions" title="Migrating from AWS Step Functions">
|
|
29
|
-
Replace ASL JSON states, Task / Choice / Wait / Parallel states, and `.waitForTaskToken` callbacks with TypeScript.
|
|
30
|
-
</Card>
|
|
31
|
-
<Card href="/docs/migration-guides/migrating-from-trigger-dev" title="Migrating from trigger.dev">
|
|
32
|
-
Map `task()`, `schemaTask()`, `wait.for` / `wait.forToken`, `triggerAndWait`, and `metadata.stream` onto workflows, steps, hooks, and `start()` / `getRun()`.
|
|
33
|
-
</Card>
|
|
34
|
-
</Cards>
|