workflow 5.0.0-beta.33 → 5.0.0-beta.34

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/docs/ai/index.mdx CHANGED
@@ -64,7 +64,7 @@ In order to connect to an LLM, we'll need to set up an API key. The easiest way
64
64
 
65
65
  <Tab value="Gateway">
66
66
 
67
- Get a Gateway API key from the [Vercel Gateway](https://vercel.com/docs/gateway/api-reference/overview) page.
67
+ Get a Gateway API key from the [Vercel Gateway](https://vercel.com/docs/ai-gateway/authentication) page.
68
68
 
69
69
  Then add it to your `.env.local` file:
70
70
 
@@ -22,11 +22,10 @@ keywords:
22
22
 
23
23
  `world.analytics` is an optional, read-only namespace for observability surfaces — dashboards, CLIs, and admin tools that list large numbers of runs without touching payload data.
24
24
 
25
- It differs from [Storage](/docs/api-reference/workflow-runtime/world/storage) in three ways:
25
+ It differs from [Storage](/docs/api-reference/workflow-runtime/world/storage) in two ways:
26
26
 
27
27
  - **Metadata only.** Results never include run input/output, step data, or hook tokens. There is no `resolveData` option.
28
- - **Served from the observability pipeline.** On Vercel, queries hit a ClickHouse-backed analytics store instead of the runtime database, so large listings do not compete with workflow execution. Data is ingested asynchronously and may trail the live state by a few seconds.
29
- - **Plan-bounded lookback.** Listings only cover the observability retention window for your plan (up to 30 days). Every page includes a `pageInfo` block describing the current window, and requesting an older window fails with an `observability-upgrade-required` error.
28
+ - **Served from the observability pipeline.** On Vercel, queries are served from the Vercel observability data pipeline, so large listings do not compete with workflow execution. Data is ingested asynchronously and may trail the live state by a few seconds.
30
29
 
31
30
  The namespace is optional — worlds that don't implement it (such as the local development world) leave it `undefined`, so feature-detect before use:
32
31
 
@@ -129,10 +128,10 @@ Every paginated response carries `pageInfo` describing the window the query was
129
128
  ```typescript
130
129
  {
131
130
  currentLookbackDays: 2, // what your plan allows today
132
- maxLookbackDays: 30, // ceiling with Observability Plus
131
+ maxLookbackDays: 30, // ceiling with Observability Plus on Vercel
133
132
  currentWindowStart: Date,
134
133
  maxWindowStart: Date,
135
- upgradeAvailable: true, // more history exists behind the plan gate
134
+ upgradeAvailable: true, // for Vercel deployed workflows
136
135
  }
137
136
  ```
138
137
 
@@ -36,7 +36,7 @@ That's it. Vercel automatically:
36
36
 
37
37
  For complete details on pricing, usage limits, and included allotments on Vercel, see the official Vercel documentation:
38
38
 
39
- - **[Vercel Workflow](https://vercel.com/docs/workflow)** — Pricing details, concepts, and observability for Workflow on Vercel
39
+ - **[Vercel Workflow](https://vercel.com/docs/workflows)** — Pricing details, concepts, and observability for Workflow on Vercel
40
40
  - **[Vercel limits](https://vercel.com/docs/limits)** — Platform-wide limits including Workflow-specific constraints
41
41
  - **[Vercel Hobby plan](https://vercel.com/docs/plans/hobby)** — Free tier included usage for Workflow and other resources
42
42
 
@@ -56,7 +56,7 @@ The Vercel World runs in every [Vercel Function region](https://vercel.com/docs/
56
56
 
57
57
  No configuration is needed. A run is pinned to the region of the function that creates it:
58
58
 
59
- - Deploy your app to a single region (via [`regions`](https://vercel.com/docs/project-configuration#regions) in `vercel.json` or the project settings), and every run lives there.
59
+ - Deploy your app to a single region (via [`regions`](https://vercel.com/docs/project-configuration/vercel-json#regions) in `vercel.json` or the project settings), and every run lives there.
60
60
  - Deploy to multiple regions for a globally distributed audience, and each run is pinned to the region that served the user who triggered it — workflow data and streaming stay close to that user.
61
61
 
62
62
  ### Explicit region selection
@@ -76,7 +76,7 @@ const run = await start(myWorkflow, [input], { region: "sfo1" });
76
76
  there. Your workflow and step functions execute in the regions your
77
77
  application is deployed to. For execution to actually happen in the
78
78
  specified region, your app must be deployed there — via
79
- [`regions`](https://vercel.com/docs/project-configuration#regions) in
79
+ [`regions`](https://vercel.com/docs/project-configuration/vercel-json#regions) in
80
80
  `vercel.json` or the Function Regions setting in your project settings.
81
81
  If it isn't, the run's data lives in the requested region but its steps
82
82
  execute in the nearest region your app is deployed to.
@@ -272,4 +272,4 @@ The Vercel World uses Vercel's infrastructure for workflow execution:
272
272
  - **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)
273
273
  - **Authentication** - OIDC tokens provide secure, automatic authentication
274
274
 
275
- For more details, see the [Vercel Workflow documentation](https://vercel.com/docs/workflow).
275
+ For more details, see the [Vercel Workflow documentation](https://vercel.com/docs/workflows).
@@ -15,7 +15,7 @@ related:
15
15
  />
16
16
 
17
17
  <Callout type="warn">
18
- The Python SDK is currently in **beta**. APIs and behavior may change. For the latest documentation and updates, see the [official Vercel Workflow Python documentation](https://vercel.com/docs/workflow/python?language=py).
18
+ The Python SDK is currently in **beta**. APIs and behavior may change. For the latest documentation and updates, see the [official Vercel Workflow Python documentation](https://vercel.com/docs/workflows/python).
19
19
  </Callout>
20
20
 
21
21
  You can build durable workflows in Python using the [`vercel` Python SDK](https://pypi.org/project/vercel/). Your workflow code can pause, resume, and maintain state, just like the JavaScript and TypeScript Workflow SDK.
@@ -160,7 +160,7 @@ When a hook receives data, the workflow resumes automatically. You don&apos;t ne
160
160
 
161
161
  ## Learn More
162
162
 
163
- For comprehensive documentation, examples, and the latest updates, visit the [official Vercel Workflow Python documentation](https://vercel.com/docs/workflow/python).
163
+ For comprehensive documentation, examples, and the latest updates, visit the [official Vercel Workflow Python documentation](https://vercel.com/docs/workflows/python).
164
164
 
165
165
  ## Next Steps
166
166
 
@@ -17,7 +17,7 @@ The SDK only depends on the OpenTelemetry **API**, never on an SDK or exporter.
17
17
 
18
18
  ## Enabling tracing
19
19
 
20
- Register any OpenTelemetry Node SDK in your application. On Vercel with Next.js, the simplest setup is [`@vercel/otel`](https://vercel.com/docs/observability/otel-overview) in `instrumentation.ts`:
20
+ Register any OpenTelemetry Node SDK in your application. On Vercel with Next.js, the simplest setup is [`@vercel/otel`](https://vercel.com/docs/tracing/instrumentation) in `instrumentation.ts`:
21
21
 
22
22
  ```typescript title="instrumentation.ts" lineNumbers
23
23
  import { registerOTel } from "@vercel/otel"
@@ -43,6 +43,8 @@ No workflow-specific configuration is required. As soon as a tracer provider and
43
43
  | `http <method>` | client | the SDK calls the workflow backend (event reads/writes) |
44
44
  | `workflow.stream.write` | client | a stream chunk (or the stream close) is flushed to the backend |
45
45
  | `workflow.stream.flush` | client | a buffered batch of stream writes settles; back-dated to the batch's first `write()`, so its duration is the app-perceived batch latency (buffer dwell + RPC) |
46
+ | `workflow.stream.close` | client | the stream-close RPC; its duration is the close round trip |
47
+ | `workflow.stream.read.complete` | client | a stream read drains; back-dated to the read dispatch, so its duration is the total read (`workflow.stream.read.chunks` / `.bytes` carry throughput counts) |
46
48
  | `workflow.stream.read.connect` | client | a live stream read opens; the span covers dispatch → response headers (network connect) |
47
49
  | `workflow.stream.read` | client | a live stream read receives its first chunk; the span's duration is the end-to-end time-to-first-chunk (see `workflow.stream.read.ttfc_ms`) |
48
50
 
@@ -61,9 +63,10 @@ Stream spans are emitted by the SDK's world backend on the client that writes or
61
63
  | `workflow.queue.overhead_ms` | Time between the message being enqueued and the handler starting — queue dwell plus any cold start. |
62
64
  | `workflow.stream.name` | The stream name, on stream write/read spans. |
63
65
  | `workflow.stream.operation` | The stream operation: `write`, `write_multi`, `close`, `read`, or `flush`. |
64
- | `workflow.stream.write.chunk_rtt` | Time between emissions of a chunk to the wire, and receiving the `ack` message for that chunk. |
66
+ | `workflow.stream.write.chunk_rtt` | Time between emissions of a chunk to the wire, and receiving the `ack` message for that chunk. Also stamped on `workflow.stream.flush` (the batch's write RPC duration, network included). |
65
67
  | `workflow.stream.flush.buffer_dwell_ms` | On `workflow.stream.flush`: time the batch's first chunk waited in the client-side write buffer (flush timer, run-ready barrier) before the request was dispatched. `workflow.stream.flush.chunks` / `.bytes` carry the batch shape. |
66
68
  | `workflow.stream.read.ttfc_ms` | Time between opening a read connection and observing and receiving the first chunk back. |
69
+ | `workflow.stream.read.connect_ms` | On `workflow.stream.read`: the connect portion (read dispatch → stream handle/response headers), network included. |
67
70
 
68
71
  ## Trace shape: one trace per invocation
69
72
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "workflow",
3
- "version": "5.0.0-beta.33",
3
+ "version": "5.0.0-beta.34",
4
4
  "description": "Workflow SDK - Build durable, resilient, and observable workflows",
5
5
  "main": "dist/typescript-plugin.cjs",
6
6
  "type": "module",
@@ -57,18 +57,18 @@
57
57
  },
58
58
  "dependencies": {
59
59
  "ms": "2.1.3",
60
- "@workflow/astro": "5.0.0-beta.33",
61
- "@workflow/cli": "5.0.0-beta.33",
62
- "@workflow/core": "5.0.0-beta.33",
60
+ "@workflow/astro": "5.0.0-beta.34",
61
+ "@workflow/cli": "5.0.0-beta.34",
62
+ "@workflow/core": "5.0.0-beta.34",
63
63
  "@workflow/errors": "5.0.0-beta.10",
64
64
  "@workflow/typescript-plugin": "5.0.0-beta.5",
65
65
  "@workflow/utils": "5.0.0-beta.6",
66
- "@workflow/next": "5.0.0-beta.33",
67
- "@workflow/nest": "5.0.0-beta.33",
68
- "@workflow/nitro": "5.0.0-beta.33",
69
- "@workflow/nuxt": "5.0.0-beta.33",
70
- "@workflow/sveltekit": "5.0.0-beta.33",
71
- "@workflow/rollup": "5.0.0-beta.33"
66
+ "@workflow/next": "5.0.0-beta.34",
67
+ "@workflow/nest": "5.0.0-beta.34",
68
+ "@workflow/nitro": "5.0.0-beta.34",
69
+ "@workflow/nuxt": "5.0.0-beta.34",
70
+ "@workflow/sveltekit": "5.0.0-beta.34",
71
+ "@workflow/rollup": "5.0.0-beta.34"
72
72
  },
73
73
  "devDependencies": {
74
74
  "@types/ms": "2.1.0",