workflow 5.0.0-beta.5 → 5.0.0-beta.50
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 +29 -26
- package/docs/ai/defining-tools.mdx +6 -7
- package/docs/ai/human-in-the-loop.mdx +11 -11
- package/docs/ai/index.mdx +50 -45
- package/docs/ai/message-queueing.mdx +16 -16
- 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 +24 -0
- 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 +48 -86
- package/docs/api-reference/workflow-ai/index.mdx +3 -3
- 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 +376 -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 +28 -20
- package/docs/cookbook/advanced/upgrading-workflows.mdx +199 -0
- package/docs/cookbook/agent-patterns/agent-cancellation.mdx +27 -19
- package/docs/cookbook/agent-patterns/durable-agent.mdx +14 -142
- package/docs/cookbook/agent-patterns/human-in-the-loop.mdx +30 -22
- 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 +85 -47
- 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 +29 -18
- package/docs/errors/deployment-mismatch.mdx +71 -0
- package/docs/errors/fetch-in-workflow.mdx +11 -7
- 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 +107 -59
- 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 +135 -40
- 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 +98 -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 +93 -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
|
@@ -0,0 +1,241 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: CLI and Web UI
|
|
3
|
+
description: CLI flags and environment variables for inspecting local, Postgres, and Vercel Workflow runs.
|
|
4
|
+
type: reference
|
|
5
|
+
summary: Configure workflow inspect, workflow cancel, workflow web, workflow health, and observability tooling.
|
|
6
|
+
related:
|
|
7
|
+
- /docs/observability
|
|
8
|
+
- /docs/configuration/worlds
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
The Workflow CLI uses flags first, then environment variables, then defaults or local inference.
|
|
12
|
+
|
|
13
|
+
Vercel project and auth settings can often be inferred from `.vercel/project.json` and your Vercel CLI login.
|
|
14
|
+
|
|
15
|
+
## Target backend
|
|
16
|
+
|
|
17
|
+
### `--backend` / `-b`
|
|
18
|
+
|
|
19
|
+
- Environment variable: `WORKFLOW_TARGET_WORLD`
|
|
20
|
+
- Default: `local`
|
|
21
|
+
- Backend to inspect: `local`, `vercel`, or a World package.
|
|
22
|
+
|
|
23
|
+
### `--authToken` / `-a`
|
|
24
|
+
|
|
25
|
+
- Environment variable: `WORKFLOW_VERCEL_AUTH_TOKEN`
|
|
26
|
+
- Default: Vercel CLI login
|
|
27
|
+
- Vercel token for `--backend vercel`.
|
|
28
|
+
|
|
29
|
+
### `--project`
|
|
30
|
+
|
|
31
|
+
- Environment variable: `WORKFLOW_VERCEL_PROJECT`
|
|
32
|
+
- Default: inferred when possible
|
|
33
|
+
- Vercel project ID for `--backend vercel`.
|
|
34
|
+
|
|
35
|
+
### `--team`
|
|
36
|
+
|
|
37
|
+
- Environment variable: `WORKFLOW_VERCEL_TEAM`
|
|
38
|
+
- Default: inferred when possible
|
|
39
|
+
- Vercel team ID for `--backend vercel`.
|
|
40
|
+
|
|
41
|
+
### `WORKFLOW_VERCEL_PROJECT_NAME`
|
|
42
|
+
|
|
43
|
+
- CLI flag: none
|
|
44
|
+
- Default: inferred when possible
|
|
45
|
+
- Vercel project slug used for dashboard links.
|
|
46
|
+
|
|
47
|
+
### `--env` / `-e`
|
|
48
|
+
|
|
49
|
+
- Environment variable: `WORKFLOW_VERCEL_ENV`
|
|
50
|
+
- Default: `production`
|
|
51
|
+
- Vercel environment for `--backend vercel`.
|
|
52
|
+
- Accepts `production` or `preview`.
|
|
53
|
+
|
|
54
|
+
## Web UI
|
|
55
|
+
|
|
56
|
+
### `--web` / `-w`
|
|
57
|
+
|
|
58
|
+
- Environment variable: none
|
|
59
|
+
- Default: disabled
|
|
60
|
+
- Opens the relevant dashboard or web user interface (UI) instead of printing terminal output.
|
|
61
|
+
|
|
62
|
+
### `--webPort`
|
|
63
|
+
|
|
64
|
+
- Environment variable: `WORKFLOW_WEB_PORT`
|
|
65
|
+
- Default: `3456`
|
|
66
|
+
- Port for the local web UI server.
|
|
67
|
+
|
|
68
|
+
### `--noBrowser`
|
|
69
|
+
|
|
70
|
+
- Environment variable: `WORKFLOW_DISABLE_BROWSER_OPEN`
|
|
71
|
+
- Default: browser opens
|
|
72
|
+
- Prevents the CLI from opening a browser for web UI commands.
|
|
73
|
+
|
|
74
|
+
### `--localUi`
|
|
75
|
+
|
|
76
|
+
- Environment variable: `WORKFLOW_LOCAL_UI`
|
|
77
|
+
- Default: disabled
|
|
78
|
+
- Uses the local web UI instead of the Vercel dashboard when inspecting Vercel.
|
|
79
|
+
|
|
80
|
+
### `--url`
|
|
81
|
+
|
|
82
|
+
- Environment variable: none
|
|
83
|
+
- Default: disabled
|
|
84
|
+
- Prints the dashboard or run deep-link URL instead of opening a browser or starting a local server.
|
|
85
|
+
|
|
86
|
+
## Output and filtering
|
|
87
|
+
|
|
88
|
+
### `--json` / `-j`
|
|
89
|
+
|
|
90
|
+
- Environment variable: none
|
|
91
|
+
- Default: disabled
|
|
92
|
+
- Prints machine-readable JSON where the command supports it.
|
|
93
|
+
|
|
94
|
+
### `--sort`
|
|
95
|
+
|
|
96
|
+
- Environment variable: none
|
|
97
|
+
- Default: `desc` for time-ordered listings; `workflow inspect attributes` orders keys alphabetically unless you pass this flag
|
|
98
|
+
- Sort order for list commands. Accepts `asc` or `desc`.
|
|
99
|
+
|
|
100
|
+
### `--limit`
|
|
101
|
+
|
|
102
|
+
- Environment variable: none
|
|
103
|
+
- Default: `20`
|
|
104
|
+
- Number of items returned per page for list commands. `workflow cancel` bounds it separately; see [`--limit` (cancel)](#--limit-cancel).
|
|
105
|
+
|
|
106
|
+
### `--cursor`
|
|
107
|
+
|
|
108
|
+
- Environment variable: none
|
|
109
|
+
- Default: unset
|
|
110
|
+
- Pagination cursor for list commands.
|
|
111
|
+
|
|
112
|
+
### `--interactive` / `-i`
|
|
113
|
+
|
|
114
|
+
- Environment variable: none
|
|
115
|
+
- Default: disabled
|
|
116
|
+
- Enables keyboard-controlled pagination for supported list commands.
|
|
117
|
+
|
|
118
|
+
## Inspect filtering
|
|
119
|
+
|
|
120
|
+
Flags for `workflow inspect`. Each list view accepts a different subset, noted
|
|
121
|
+
per flag.
|
|
122
|
+
|
|
123
|
+
### `--runId` / `-r`
|
|
124
|
+
|
|
125
|
+
- Command: `workflow inspect`
|
|
126
|
+
- Default: unset
|
|
127
|
+
- Scopes the listing to one run. Required for `steps`, `events`, and `sleeps`; optional for `hooks`. Must be a run ID: `wrun_` followed by a 26-character ULID.
|
|
128
|
+
|
|
129
|
+
### `--limit` (inspect)
|
|
130
|
+
|
|
131
|
+
- Command: `workflow inspect`
|
|
132
|
+
- Default: `20`
|
|
133
|
+
- Must be an integer between 1 and 100, the smallest page any inspect listing accepts. Larger pages are reachable by paging: pass `--cursor`, or `--interactive` to walk them.
|
|
134
|
+
|
|
135
|
+
### `--stepId` / `-s`
|
|
136
|
+
|
|
137
|
+
- Command: `workflow inspect events`
|
|
138
|
+
- Default: unset
|
|
139
|
+
- Filters events to one step.
|
|
140
|
+
|
|
141
|
+
### `--hookId`
|
|
142
|
+
|
|
143
|
+
- Command: `workflow inspect events`
|
|
144
|
+
- Default: unset
|
|
145
|
+
- Filters events to one hook.
|
|
146
|
+
|
|
147
|
+
### `--attribute`
|
|
148
|
+
|
|
149
|
+
- Command: `workflow inspect runs`
|
|
150
|
+
- Default: unset
|
|
151
|
+
- Filters runs to those whose [attributes](/docs/observability/attributes) match every `key=value` pair given. Repeatable up to 8 times, and splits on the first `=` so a value may contain one.
|
|
152
|
+
- Requires a backend with the analytics read path; ignored with a warning otherwise.
|
|
153
|
+
- Cannot be combined with `--url` or `--web`, which hand off to the dashboard, or with `--withData`, which reads payloads from storage. Storage carries no attribute index.
|
|
154
|
+
- Use `workflow inspect attributes` to discover which keys exist.
|
|
155
|
+
|
|
156
|
+
### `--since` / `--until`
|
|
157
|
+
|
|
158
|
+
- Command: `workflow inspect runs`, `workflow inspect attributes`
|
|
159
|
+
- Default: the backend's own window
|
|
160
|
+
- Bounds the listing to a window. `--since` opens the window and accepts a relative duration (`30m`, `12h`, `7d`, `2w`) or a timestamp. `--until` is optional and defaults to now, so `--until` on its own is rejected.
|
|
161
|
+
- Requires a backend with the analytics read path; ignored with a warning otherwise.
|
|
162
|
+
|
|
163
|
+
### `--withData` / `-d`
|
|
164
|
+
|
|
165
|
+
- Command: `workflow inspect`
|
|
166
|
+
- Default: disabled
|
|
167
|
+
- Includes full input and output payloads in list views. Deprecated for list views — use `workflow inspect <resource> <id>` to read one item's payloads. Setting it also moves the read off the analytics path, which carries metadata only.
|
|
168
|
+
|
|
169
|
+
### `--decrypt`
|
|
170
|
+
|
|
171
|
+
- Command: `workflow inspect`
|
|
172
|
+
- Default: disabled
|
|
173
|
+
- Decrypts encrypted values. Triggers an audit-logged key retrieval.
|
|
174
|
+
|
|
175
|
+
## Bulk cancel
|
|
176
|
+
|
|
177
|
+
`workflow cancel <run-id>` cancels one run. Given a filter instead, it bulk-cancels a batch; bulk mode requires `--status` or `--workflowName`.
|
|
178
|
+
|
|
179
|
+
### `--status`
|
|
180
|
+
|
|
181
|
+
- Command: `workflow cancel`
|
|
182
|
+
- Default: unset
|
|
183
|
+
- Restricts the batch to this status. Only `pending` and `running` are accepted; terminal runs cannot be canceled.
|
|
184
|
+
- Also filters `workflow inspect runs`, which accepts any run status. It does not narrow `workflow inspect attributes`, which indexes keys per tenant rather than per run; passing it there warns and lists every key.
|
|
185
|
+
|
|
186
|
+
### `--workflowName` / `-n`
|
|
187
|
+
|
|
188
|
+
- Command: `workflow cancel`
|
|
189
|
+
- Default: unset
|
|
190
|
+
- Restricts the batch to one workflow. Expects the generated workflow ID from `workflow inspect runs`, not the short function name.
|
|
191
|
+
- Also filters `workflow inspect runs` and `workflow inspect attributes`.
|
|
192
|
+
|
|
193
|
+
### `--limit` (cancel)
|
|
194
|
+
|
|
195
|
+
- Command: `workflow cancel`
|
|
196
|
+
- Default: `50`
|
|
197
|
+
- Maximum runs to cancel in one batch (1–100), the largest page the run listing serves. Only one batch is canceled per invocation; run the command again to cancel the next batch.
|
|
198
|
+
|
|
199
|
+
### `--confirm` / `-y`
|
|
200
|
+
|
|
201
|
+
- Command: `workflow cancel`
|
|
202
|
+
- Default: disabled
|
|
203
|
+
- Skips the interactive confirmation prompt.
|
|
204
|
+
|
|
205
|
+
## Health checks
|
|
206
|
+
|
|
207
|
+
### `--port` / `-p`
|
|
208
|
+
|
|
209
|
+
- Command: `workflow health`
|
|
210
|
+
- Environment variable: `WORKFLOW_LOCAL_BASE_URL`, then `PORT`
|
|
211
|
+
- Default: `3000` when neither env var is set
|
|
212
|
+
- Local server port for health checks.
|
|
213
|
+
- The flag writes `WORKFLOW_LOCAL_BASE_URL`.
|
|
214
|
+
|
|
215
|
+
## Verbose logging and updates
|
|
216
|
+
|
|
217
|
+
### `--verbose` / `-v`
|
|
218
|
+
|
|
219
|
+
- Environment variable: `DEBUG`
|
|
220
|
+
- Default: disabled
|
|
221
|
+
- Enables verbose CLI output.
|
|
222
|
+
|
|
223
|
+
### `WORKFLOW_NO_UPDATE_CHECK`
|
|
224
|
+
|
|
225
|
+
- CLI flag: none
|
|
226
|
+
- Default: update check enabled
|
|
227
|
+
- Set `1` to disable the CLI update check.
|
|
228
|
+
|
|
229
|
+
## Observability paths
|
|
230
|
+
|
|
231
|
+
### `WORKFLOW_OBSERVABILITY_CWD`
|
|
232
|
+
|
|
233
|
+
- CLI flag: none
|
|
234
|
+
- Default: `process.cwd()`
|
|
235
|
+
- Working directory used by observability tooling to find `.vercel`, `.workflow-data`, and manifests.
|
|
236
|
+
|
|
237
|
+
### `WORKFLOW_MANIFEST_PATH`
|
|
238
|
+
|
|
239
|
+
- CLI flag: none
|
|
240
|
+
- Default: inferred
|
|
241
|
+
- Explicit path to the workflow manifest for the web UI.
|
|
@@ -0,0 +1,165 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Framework Options
|
|
3
|
+
description: Build-time and dev-server configuration for Workflow framework integrations.
|
|
4
|
+
type: reference
|
|
5
|
+
summary: Configure Workflow through framework plugins and module options.
|
|
6
|
+
related:
|
|
7
|
+
- /docs/api-reference/workflow-next/with-workflow
|
|
8
|
+
- /docs/configuration/build-and-diagnostics
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
Framework options are read at build or dev-server startup. Use them for settings that belong in source control, such as source-map behavior or framework-specific output paths.
|
|
12
|
+
|
|
13
|
+
## Next.js
|
|
14
|
+
|
|
15
|
+
`withWorkflow()` accepts an optional second argument.
|
|
16
|
+
|
|
17
|
+
### `workflows.local.port`
|
|
18
|
+
|
|
19
|
+
- Environment override: `PORT`
|
|
20
|
+
- Default: auto-detected
|
|
21
|
+
- Local-only. Sets the application port used by the Local World when queue messages call back into the app.
|
|
22
|
+
- The option writes `PORT` for non-Vercel builds.
|
|
23
|
+
|
|
24
|
+
### `workflows.sourcemap`
|
|
25
|
+
|
|
26
|
+
- Environment override: `WORKFLOW_SOURCEMAP`
|
|
27
|
+
- Default: `inline` in development, `false` in production
|
|
28
|
+
- Controls source maps for generated workflow bundles.
|
|
29
|
+
- Explicit config wins over `WORKFLOW_SOURCEMAP`.
|
|
30
|
+
|
|
31
|
+
```typescript title="next.config.ts" lineNumbers
|
|
32
|
+
import { withWorkflow } from "workflow/next";
|
|
33
|
+
|
|
34
|
+
export default withWorkflow(
|
|
35
|
+
{},
|
|
36
|
+
{
|
|
37
|
+
workflows: {
|
|
38
|
+
local: {
|
|
39
|
+
port: 4000,
|
|
40
|
+
},
|
|
41
|
+
sourcemap: false,
|
|
42
|
+
},
|
|
43
|
+
}
|
|
44
|
+
);
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
## Nitro and Nuxt
|
|
48
|
+
|
|
49
|
+
Configure Workflow through the Nitro `workflow` module options.
|
|
50
|
+
|
|
51
|
+
### `workflow.dirs`
|
|
52
|
+
|
|
53
|
+
- Environment override: none
|
|
54
|
+
- Default: `["workflows"]`
|
|
55
|
+
- Directories scanned for workflow files.
|
|
56
|
+
|
|
57
|
+
### `workflow.typescriptPlugin`
|
|
58
|
+
|
|
59
|
+
- Environment override: none
|
|
60
|
+
- Default: `false` for raw Nitro, `true` through the Nuxt module
|
|
61
|
+
- Enables the Workflow TypeScript language-service plugin in generated `tsconfig.json`.
|
|
62
|
+
- This affects editor diagnostics and completions. Workflow builds do not require it.
|
|
63
|
+
- Raw Nitro leaves it opt-in because it changes TypeScript editor behavior. Nuxt enables it by default because the Nuxt module owns the generated `tsconfig.json` flow.
|
|
64
|
+
|
|
65
|
+
### `workflow.runtime`
|
|
66
|
+
|
|
67
|
+
- Environment override: none
|
|
68
|
+
- Default: framework default
|
|
69
|
+
- Node.js runtime emitted for Vercel Functions, such as `nodejs22.x` or `nodejs24.x`.
|
|
70
|
+
|
|
71
|
+
### `workflow.sourcemap`
|
|
72
|
+
|
|
73
|
+
- Environment override: `WORKFLOW_SOURCEMAP`
|
|
74
|
+
- Default: `inline` in development, `false` in production
|
|
75
|
+
- Controls source maps for generated workflow bundles.
|
|
76
|
+
|
|
77
|
+
## NestJS
|
|
78
|
+
|
|
79
|
+
Configure Workflow through `WorkflowModule.forRoot()`.
|
|
80
|
+
|
|
81
|
+
### `workingDir`
|
|
82
|
+
|
|
83
|
+
- Environment override: none
|
|
84
|
+
- Default: `process.cwd()`
|
|
85
|
+
- Application root used for workflow discovery and bundling.
|
|
86
|
+
|
|
87
|
+
### `dirs`
|
|
88
|
+
|
|
89
|
+
- Environment override: none
|
|
90
|
+
- Default: `["src"]`
|
|
91
|
+
- Directories scanned for workflow files.
|
|
92
|
+
|
|
93
|
+
### `outDir`
|
|
94
|
+
|
|
95
|
+
- Environment override: none
|
|
96
|
+
- Default: `.nestjs/workflow`
|
|
97
|
+
- Directory for generated workflow bundles.
|
|
98
|
+
|
|
99
|
+
### `watch`
|
|
100
|
+
|
|
101
|
+
- Environment override: none
|
|
102
|
+
- Default: `false`
|
|
103
|
+
- Rebuilds workflow bundles during development.
|
|
104
|
+
|
|
105
|
+
### `moduleType`
|
|
106
|
+
|
|
107
|
+
- Environment override: none
|
|
108
|
+
- Default: `es6`
|
|
109
|
+
- Set to `commonjs` when the Nest app compiles TypeScript to CJS through SWC.
|
|
110
|
+
|
|
111
|
+
### `distDir`
|
|
112
|
+
|
|
113
|
+
- Environment override: none
|
|
114
|
+
- Default: `dist`
|
|
115
|
+
- Compiled JavaScript output directory used by the CJS import rewrite.
|
|
116
|
+
|
|
117
|
+
### `sourcemap`
|
|
118
|
+
|
|
119
|
+
- Environment override: `WORKFLOW_SOURCEMAP`
|
|
120
|
+
- Default: `inline` in development, `false` in production
|
|
121
|
+
- Controls source maps for generated workflow bundles.
|
|
122
|
+
|
|
123
|
+
### `skipBuild`
|
|
124
|
+
|
|
125
|
+
- Environment override: none
|
|
126
|
+
- Default: `false`
|
|
127
|
+
- Skips bundle generation when bundles are already pre-built.
|
|
128
|
+
|
|
129
|
+
## Astro
|
|
130
|
+
|
|
131
|
+
### `sourcemap`
|
|
132
|
+
|
|
133
|
+
- Environment override: `WORKFLOW_SOURCEMAP`
|
|
134
|
+
- Default: `inline` in development, `false` in production
|
|
135
|
+
- Controls source maps for generated workflow bundles.
|
|
136
|
+
|
|
137
|
+
## SvelteKit
|
|
138
|
+
|
|
139
|
+
### `sourcemap`
|
|
140
|
+
|
|
141
|
+
- Environment override: `WORKFLOW_SOURCEMAP`
|
|
142
|
+
- Default: `inline` in development, `false` in production
|
|
143
|
+
- Controls source maps for generated workflow bundles.
|
|
144
|
+
|
|
145
|
+
## Rollup
|
|
146
|
+
|
|
147
|
+
### `exclude`
|
|
148
|
+
|
|
149
|
+
- Environment override: none
|
|
150
|
+
- Default: `[]`
|
|
151
|
+
- Path prefixes skipped by the directive transform.
|
|
152
|
+
|
|
153
|
+
## Source-map values
|
|
154
|
+
|
|
155
|
+
`WORKFLOW_SOURCEMAP` accepts these values:
|
|
156
|
+
|
|
157
|
+
- `true`, `inline`, or `1` - append an inline base64 source map to each generated bundle.
|
|
158
|
+
- `linked` - write a `.map` file and add a `sourceMappingURL` comment.
|
|
159
|
+
- `external` - write a `.map` file without adding the comment.
|
|
160
|
+
- `both` - emit inline and external source maps.
|
|
161
|
+
- `false` or `0` - omit source maps.
|
|
162
|
+
|
|
163
|
+
<Callout type="info">
|
|
164
|
+
The legacy `WORKFLOW_EMIT_SOURCEMAPS_FOR_DEBUGGING=1` variable still works, but it only affects the final workflow wrapper and webhook bundle. Prefer `WORKFLOW_SOURCEMAP` or a framework `sourcemap` option.
|
|
165
|
+
</Callout>
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Configuration
|
|
3
|
+
description: Reference for Workflow SDK configuration options, environment variables, and CLI overrides.
|
|
4
|
+
type: conceptual
|
|
5
|
+
summary: Configure framework integrations, Worlds, runtime tuning, builds, and CLI observability.
|
|
6
|
+
prerequisites:
|
|
7
|
+
- /docs/foundations/workflows-and-steps
|
|
8
|
+
related:
|
|
9
|
+
- /docs/configuration/framework-options
|
|
10
|
+
- /docs/configuration/worlds
|
|
11
|
+
- /docs/configuration/runtime-tuning
|
|
12
|
+
- /docs/configuration/build-and-diagnostics
|
|
13
|
+
- /docs/configuration/cli-and-web-ui
|
|
14
|
+
---
|
|
15
|
+
|
|
16
|
+
Workflow SDK is configured through typed framework options, World factory options, environment variables, and CLI flags.
|
|
17
|
+
|
|
18
|
+
When more than one surface controls the same setting, the usual precedence is:
|
|
19
|
+
|
|
20
|
+
```txt
|
|
21
|
+
explicit option or CLI flag > environment variable > built-in default
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
Invalid environment variable values do not crash the app. They log a warning and fall back to the default, or to the documented clamp range.
|
|
25
|
+
|
|
26
|
+
## Configuration areas
|
|
27
|
+
|
|
28
|
+
- [Framework options](/docs/configuration/framework-options) - build-time and dev-server options for Next.js, Nitro, NestJS, Astro, SvelteKit, and Rollup.
|
|
29
|
+
- [Worlds](/docs/configuration/worlds) - `WORKFLOW_TARGET_WORLD`, Local World, Postgres World, and Vercel World configuration.
|
|
30
|
+
- [Runtime tuning](/docs/configuration/runtime-tuning) - replay budgets, inline execution, queue delivery limits, compression, tracing, and advanced runtime escape hatches.
|
|
31
|
+
- [Build and diagnostics](/docs/configuration/build-and-diagnostics) - public manifests, HMR logs, and source-map controls.
|
|
32
|
+
- [CLI and web UI](/docs/configuration/cli-and-web-ui) - `workflow inspect`, `workflow web`, `workflow health`, and observability environment overrides.
|