workflow 5.0.0-beta.48 → 5.0.0-beta.49

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.
@@ -1,4 +1,4 @@
1
- export type { CancelRunOptions, Event, StartOptions, StopSleepOptions, StopSleepResult, WorkflowReadableStreamOptions, WorkflowRun, } from '@workflow/core/runtime';
1
+ export type { CancelRunOptions, Event, StartOptions, StopSleepOptions, StopSleepResult, WorkflowReadableStreamOptions, WorkflowRun, WorkflowRunWritableStreamOptions, } from '@workflow/core/runtime';
2
2
  export { Run } from '@workflow/core/runtime/run';
3
3
  export { start } from '@workflow/core/runtime/start';
4
4
  export declare const getRun: () => never;
@@ -1 +1 @@
1
- {"version":3,"file":"api-workflow.d.ts","sourceRoot":"","sources":["../src/api-workflow.ts"],"names":[],"mappings":"AAAA,YAAY,EACV,gBAAgB,EAChB,KAAK,EACL,YAAY,EACZ,gBAAgB,EAChB,eAAe,EACf,6BAA6B,EAC7B,WAAW,GACZ,MAAM,wBAAwB,CAAC;AAEhC,OAAO,EAAE,GAAG,EAAE,MAAM,4BAA4B,CAAC;AACjD,OAAO,EAAE,KAAK,EAAE,MAAM,8BAA8B,CAAC;AAQrD,eAAO,MAAM,MAAM,aAA+B,CAAC;AACnD,eAAO,MAAM,cAAc,aAAuC,CAAC;AACnE,eAAO,MAAM,UAAU,aAAmC,CAAC;AAC3D,eAAO,MAAM,aAAa,aAAsC,CAAC;AACjE,eAAO,MAAM,OAAO,aAAgC,CAAC"}
1
+ {"version":3,"file":"api-workflow.d.ts","sourceRoot":"","sources":["../src/api-workflow.ts"],"names":[],"mappings":"AAAA,YAAY,EACV,gBAAgB,EAChB,KAAK,EACL,YAAY,EACZ,gBAAgB,EAChB,eAAe,EACf,6BAA6B,EAC7B,WAAW,EACX,gCAAgC,GACjC,MAAM,wBAAwB,CAAC;AAEhC,OAAO,EAAE,GAAG,EAAE,MAAM,4BAA4B,CAAC;AACjD,OAAO,EAAE,KAAK,EAAE,MAAM,8BAA8B,CAAC;AAQrD,eAAO,MAAM,MAAM,aAA+B,CAAC;AACnD,eAAO,MAAM,cAAc,aAAuC,CAAC;AACnE,eAAO,MAAM,UAAU,aAAmC,CAAC;AAC3D,eAAO,MAAM,aAAa,aAAsC,CAAC;AACjE,eAAO,MAAM,OAAO,aAAgC,CAAC"}
@@ -8,4 +8,4 @@ export const getHookByToken = () => workflowStub('getHookByToken');
8
8
  export const resumeHook = () => workflowStub('resumeHook');
9
9
  export const resumeWebhook = () => workflowStub('resumeWebhook');
10
10
  export const runStep = () => workflowStub('runStep');
11
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYXBpLXdvcmtmbG93LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vc3JjL2FwaS13b3JrZmxvdy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFVQSxPQUFPLEVBQUUsR0FBRyxFQUFFLE1BQU0sNEJBQTRCLENBQUM7QUFDakQsT0FBTyxFQUFFLEtBQUssRUFBRSxNQUFNLDhCQUE4QixDQUFDO0FBRXJELE1BQU0sWUFBWSxHQUFHLENBQUMsSUFBWSxFQUFFLEVBQUU7SUFDcEMsTUFBTSxJQUFJLEtBQUssQ0FDYixnRUFBZ0UsSUFBSSwyRkFBMkYsQ0FDaEssQ0FBQztBQUNKLENBQUMsQ0FBQztBQUVGLE1BQU0sQ0FBQyxNQUFNLE1BQU0sR0FBRyxHQUFHLEVBQUUsQ0FBQyxZQUFZLENBQUMsUUFBUSxDQUFDLENBQUM7QUFDbkQsTUFBTSxDQUFDLE1BQU0sY0FBYyxHQUFHLEdBQUcsRUFBRSxDQUFDLFlBQVksQ0FBQyxnQkFBZ0IsQ0FBQyxDQUFDO0FBQ25FLE1BQU0sQ0FBQyxNQUFNLFVBQVUsR0FBRyxHQUFHLEVBQUUsQ0FBQyxZQUFZLENBQUMsWUFBWSxDQUFDLENBQUM7QUFDM0Qs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hvb2tCeVRva2VuJyk7XG5leHBvcnQgY29uc3QgcmVzdW1lSG9vayA9ICgpID0+IHdvcmtmbG93U3R1YigncmVzdW1lSG9vaycpO1xuZXhwb3J0IGNvbnN0IHJlc3VtZVdlYmhvb2sgPSAoKSA9PiB3b3JrZmxvd1N0dWIoJ3Jlc3VtZVdlYmhvb2snKTtcbmV4cG9ydCBjb25zdCBydW5TdGVwID0gKCkgPT4gd29ya2Zsb3dTdHViKCdydW5TdGVwJyk7XG4iXX0=
package/dist/api.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import '@workflow/core/runtime/world-init';
2
2
  export type { CancelRunOptions, Event, StopSleepOptions, StopSleepResult, WorkflowRun, } from '@workflow/core/runtime';
3
3
  export { getHookByToken, type ResumedHook, resumeHook, resumeWebhook, } from '@workflow/core/runtime/resume-hook';
4
- export { getRun, Run, type WorkflowReadableStream, type WorkflowReadableStreamOptions, } from '@workflow/core/runtime/run';
4
+ export { getRun, Run, type WorkflowReadableStream, type WorkflowReadableStreamOptions, type WorkflowRunWritableStreamOptions, } from '@workflow/core/runtime/run';
5
5
  export { type StartOptions, start, } from '@workflow/core/runtime/start';
6
6
  //# sourceMappingURL=api.d.ts.map
package/dist/api.d.ts.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"api.d.ts","sourceRoot":"","sources":["../src/api.ts"],"names":[],"mappings":"AAOA,OAAO,mCAAmC,CAAC;AAE3C,YAAY,EACV,gBAAgB,EAChB,KAAK,EACL,gBAAgB,EAChB,eAAe,EACf,WAAW,GACZ,MAAM,wBAAwB,CAAC;AAChC,OAAO,EACL,cAAc,EACd,KAAK,WAAW,EAChB,UAAU,EACV,aAAa,GACd,MAAM,oCAAoC,CAAC;AAC5C,OAAO,EACL,MAAM,EACN,GAAG,EACH,KAAK,sBAAsB,EAC3B,KAAK,6BAA6B,GACnC,MAAM,4BAA4B,CAAC;AACpC,OAAO,EACL,KAAK,YAAY,EACjB,KAAK,GACN,MAAM,8BAA8B,CAAC"}
1
+ {"version":3,"file":"api.d.ts","sourceRoot":"","sources":["../src/api.ts"],"names":[],"mappings":"AAOA,OAAO,mCAAmC,CAAC;AAE3C,YAAY,EACV,gBAAgB,EAChB,KAAK,EACL,gBAAgB,EAChB,eAAe,EACf,WAAW,GACZ,MAAM,wBAAwB,CAAC;AAChC,OAAO,EACL,cAAc,EACd,KAAK,WAAW,EAChB,UAAU,EACV,aAAa,GACd,MAAM,oCAAoC,CAAC;AAC5C,OAAO,EACL,MAAM,EACN,GAAG,EACH,KAAK,sBAAsB,EAC3B,KAAK,6BAA6B,EAClC,KAAK,gCAAgC,GACtC,MAAM,4BAA4B,CAAC;AACpC,OAAO,EACL,KAAK,YAAY,EACjB,KAAK,GACN,MAAM,8BAA8B,CAAC"}
package/dist/api.js CHANGED
@@ -9,4 +9,4 @@ import '@workflow/core/runtime/world-init';
9
9
  export { getHookByToken, resumeHook, resumeWebhook, } from '@workflow/core/runtime/resume-hook';
10
10
  export { getRun, Run, } from '@workflow/core/runtime/run';
11
11
  export { start, } from '@workflow/core/runtime/start';
12
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYXBpLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vc3JjL2FwaS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxxRUFBcUU7QUFDckUseUVBQXlFO0FBQ3pFLDJFQUEyRTtBQUMzRSw0RUFBNEU7QUFDNUUsNkVBQTZFO0FBQzdFLG1CQUFtQjtBQUNuQix5RUFBeUU7QUFDekUsT0FBTyxtQ0FBbUMsQ0FBQztBQVMzQyxPQUFPLEVBQ0wsY0FBYyxFQUVkLFVBQVUsRUFDVixhQUFhLEdBQ2QsTUFBTSxvQ0FBb0MsQ0FBQztBQUM1QyxPQUFPLEVBQ0wsTUFBTSxFQUNOLEdBQUcsR0FHSixNQUFNLDRCQUE0QixDQUFDO0FBQ3BDLE9BQU8sRUFFTCxLQ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lL3J1bnRpbWUvcnVuJztcbmV4cG9ydCB7XG4gIHR5cGUgU3RhcnRPcHRpb25zLFxuICBzdGFydCxcbn0gZnJvbSAnQHdvcmtmbG93L2NvcmUvcnVudGltZS9zdGFydCc7XG4iXX0=
@@ -20,7 +20,7 @@ Using WorkflowAgent, we model most tools as steps. These can range from a single
20
20
 
21
21
  As with regular AI SDK tool definitions, tools in WorkflowAgent receive the tool's input parameters as the first argument and the tool call context as the second.
22
22
 
23
- When you tool needs access to the full message history, you can access it via the `messages` property of the tool call context:
23
+ When your tool needs access to the full message history, you can access it via the `messages` property of the tool call context:
24
24
 
25
25
  ```typescript title="tools.ts" lineNumbers
26
26
  import type { ModelMessage } from "ai";
package/docs/ai/index.mdx CHANGED
@@ -403,7 +403,7 @@ This opens a local dashboard showing all workflow runs and their status, as well
403
403
 
404
404
  ## Next steps
405
405
 
406
- Now that you have a basic durable agent, it's a only a short step to add these additional features:
406
+ Now that you have a basic durable agent, it's only a short step to add these additional features:
407
407
 
408
408
  <Cards>
409
409
  <Card title="Streaming Updates from Tools" href="/docs/ai/streaming-updates-from-tools">
@@ -14,7 +14,7 @@ related:
14
14
 
15
15
  AI agents sometimes need to pause execution to schedule recurring or future actions, wait before retrying an operation (e.g. for rate limiting), or wait for external state to be available.
16
16
 
17
- Workflow SDK's `sleep` function enables Agents to pause execution without consuming resources, and resume at a specified time, after a specified duration, or in response to an external event. Workflow operation that suspend will survive restarts, new deploys, and infrastructure changes, independent of whether the suspense takes seconds or months.
17
+ Workflow SDK's `sleep` function enables Agents to pause execution without consuming resources, and resume at a specified time, after a specified duration, or in response to an external event. Workflow operations that suspend will survive restarts, new deploys, and infrastructure changes, independent of whether the suspense takes seconds or months.
18
18
 
19
19
  <Callout type="info">
20
20
  See the [`sleep()` API Reference](/docs/api-reference/workflow/sleep) for the full list of supported duration formats and detailed API documentation, and see the [hooks](/docs/foundations/hooks) documentation for more information on how to resume in response to external events.
@@ -16,7 +16,7 @@ After [building a durable AI agent](/docs/ai), we already get UI message chunks
16
16
 
17
17
  Workflow SDK enables this by letting step functions write custom chunks to the same stream the agent uses. These chunks appear as data parts in your messages, which you can render however you like.
18
18
 
19
- As an example, we'll extend out Flight Booking Agent to use emit more granular progress updates while searching for flights.
19
+ As an example, we'll extend our Flight Booking Agent to emit more granular progress updates while searching for flights.
20
20
 
21
21
  <Steps>
22
22
 
@@ -46,7 +46,7 @@ The `type` field must be a string starting with `data-` followed by your custom
46
46
 
47
47
  ### Emit updates from your tool
48
48
 
49
- Use [`getWritable()`](/docs/api-reference/workflow/get-writable) inside a step function to get a handle to the stream. This is the same stream that the LLM and other tools calls are writing to, so we can inject out own data packets directly.
49
+ Use [`getWritable()`](/docs/api-reference/workflow/get-writable) inside a step function to get a handle to the stream. This is the same stream that the LLM and other tool calls are writing to, so we can inject our own data packets directly.
50
50
 
51
51
  {/* @skip-typecheck: incomplete code sample */}
52
52
  ```typescript title="workflows/chat/steps/tools.ts" lineNumbers
@@ -65,6 +65,16 @@ import type { WorkflowReadableStreamOptions } from "workflow/api";
65
65
  export default WorkflowReadableStreamOptions;`}
66
66
  />
67
67
 
68
+ #### WorkflowRunWritableStreamOptions
69
+
70
+ <TSDoc
71
+ definition={`
72
+ import type { WorkflowRunWritableStreamOptions } from "workflow/api";
73
+ export default WorkflowRunWritableStreamOptions;`}
74
+ />
75
+
76
+ Use `run.writable` for the default stream or `run.getWritable(options)` to configure it. See [Writing to another run's stream](/docs/foundations/streaming#writing-to-another-runs-stream) for lifecycle details.
77
+
68
78
  #### StopSleepOptions
69
79
 
70
80
  <TSDoc
@@ -61,6 +61,7 @@ Learn more about [`WorkflowReadableStreamOptions`](/docs/api-reference/workflow-
61
61
  * When you provide `deploymentId`, the argument types and return type become `unknown` because the workflow function's types may differ across deployments.
62
62
  * `attributes` seeds plaintext run metadata as part of creation and requires a World implementing spec version 4 or later. Keys that start with `$` are reserved for framework and library code; framework-level callers can pass `allowReservedAttributes: true` to seed reserved keys, with the same semantics as the [`setAttributes`](/docs/api-reference/workflow/set-attributes) option of the same name.
63
63
  * `region` pins the new run to a specific region on Worlds with a regional dimension. The [Vercel World](/worlds/vercel#explicit-region-selection) then serves the run's storage, queue dispatch, and streams from that region. When you omit `region`, the run is pinned to the region where it was created. Worlds without regions ignore the option.
64
+ * `experimental_retention` asks the World to delete the run's user data as soon as the run completes or fails, instead of keeping it for the World's default window. `0` requests immediate deletion; `'default'` is identical to omitting the option. These are the only two values accepted — the value is a duration and zero is the only one implemented, and its unit is not yet decided. Recorded as the reserved `$retention` attribute, so it needs a World implementing spec version 4 or later. Retention is enforced by the World, not the SDK: the first-party Worlds implement it and a World that does not keeps the data. Note that `await run.returnValue` on a run started with `experimental_retention: 0` usually throws [`RunExpiredError`](/docs/errors/run-expired) rather than resolving, because the deletion races the read. See [Data retention](/docs/observability/retention).
64
65
 
65
66
  <Callout type="info">
66
67
  If `start()` throws `'start' received an invalid workflow function. Ensure the Workflow SDK is configured correctly and the function includes a 'use workflow' directive.`, the compiler did not transform the passed function as a workflow. The two most common causes are a missing `"use workflow"` directive or missing framework integration. See [start-invalid-workflow-function](/docs/errors/start-invalid-workflow-function).
@@ -276,10 +276,25 @@ Node's own modules do less than the client they replace, so enabling this drops
276
276
  - Requests lose their transport-level retry. Failures still surface to the layers above, which retry event writes and redeliver queue messages, so nothing is silently dropped, but a failure that a same-connection retry would have hidden now costs a full redelivery.
277
277
  - Stream close loses its retry of retriable server errors. A transient failure at close can leave a stream marked closing until the run expires, where it would previously have resolved on the retry.
278
278
 
279
- Connection pooling, keep-alive, and the request, header, and body deadlines are preserved. Node's agents configure pooling and keep-alive, and each request receives the deadlines from the Local World's two queue timeouts or the same defaults that the Vercel World's HTTP client currently applies. Queue sends are the exception in the other direction: that client takes no transport override, so its requests keep using the library either way.
279
+ Connection pooling, keep-alive, and the request, header, and body deadlines are preserved. Node's agents configure pooling and keep-alive, and each request receives the deadlines from the Local World's two queue timeouts or the same defaults that the Vercel World's HTTP client currently applies. Queue sends are the partial exception: that client takes no transport override, so it cannot move to Node's modules. It does honor this variable, by dispatching through the runtime's own copy of the library rather than the copy the World bundles, which is the distinction that matters when the bundled copy is the thing that does not work.
280
280
 
281
281
  A `dispatcher` passed to `createVercelWorld()` still wins over this variable. The variable chooses which transport the World builds when you have not supplied one.
282
282
 
283
+ ### `WORKFLOW_VERCEL_QUEUE_TIMEOUT_MS`
284
+
285
+ - Default: `30000`
286
+ - Total deadline for one request the Vercel World's queue client makes, measured from the moment it is handed to the transport, so it also covers time the request spends waiting for a free connection.
287
+ - Clamped to `[5000, 120000]`.
288
+ - This is the only request path the World cannot bound with `WORKFLOW_REQUEST_TIMEOUT_MS`, because the queue client makes its own calls and accepts no override for them. Without a deadline here, a queue acknowledgement that never completes holds the invocation until the platform kills it, and a killed invocation never acknowledges, so the message is redelivered.
289
+ - Keep it below the queue's visibility-renewal interval (60 seconds) so a failed call has room to surface and be retried before the message lease lapses.
290
+
291
+ ### `WORKFLOW_VERCEL_QUEUE_CONNECTIONS`
292
+
293
+ - Default: `64`
294
+ - Connections the Vercel World's queue client may open to the queue service.
295
+ - Clamped to `[1, 1024]`.
296
+ - Sized much higher than the World's other connection pools on purpose. The queue client makes roughly two small requests per invocation, so its concurrency tracks how many invocations a compute instance is serving at once rather than any per-request fan-out. Lower it only if you have a reason to cap sockets; too low turns invocation concurrency into the limit on how fast messages can be acknowledged.
297
+
283
298
  ## Queue namespace
284
299
 
285
300
  ### `WORKFLOW_QUEUE_NAMESPACE`
@@ -281,6 +281,14 @@ Platform-provided values such as `VERCEL_DEPLOYMENT_ID`, `VERCEL_PROJECT_ID`, an
281
281
  - Default: `1000`
282
282
  - Maximum stream chunks written in one Vercel World request. Larger batches are split.
283
283
 
284
+ ### `WORKFLOW_STREAMS_TRANSPORT`
285
+
286
+ - Factory option: none
287
+ - CLI flag: none
288
+ - Default: `http`
289
+ - Experimental stream-write transport capability. Set to exactly `ws` to advertise support for `workflow-stream-ws/v1` when it becomes available. The server authoritatively accepts or declines an upgrade; a decline uses HTTP directly. Stream reads remain HTTP and demand-driven.
290
+ - This is not tenant rollout policy or a package-version check. HTTP remains the compatibility path. `/websockets/v1` is independent of REST v2/v4 and persisted workflow `specVersion` values.
291
+
284
292
  ### `WORKFLOW_DISABLE_ANALYTICS_READS`
285
293
 
286
294
  - Factory option: none
@@ -0,0 +1,85 @@
1
+ ---
2
+ title: run-expired
3
+ description: A run's data passed its retention boundary, so its result can no longer be read.
4
+ type: troubleshooting
5
+ summary: Read a run's result before it expires, or return it through a channel you control.
6
+ prerequisites:
7
+ - /docs/foundations/workflows-and-steps
8
+ related:
9
+ - /docs/observability/retention
10
+ - /docs/api-reference/workflow-api/start
11
+ - /docs/foundations/hooks
12
+ ---
13
+
14
+ ## Error
15
+
16
+ ```text
17
+ Run "wrun_..." completed, but its data expired at 2026-08-28T05:02:35.009Z
18
+ and is no longer readable.
19
+ ```
20
+
21
+ Thrown as a `RunExpiredError` from `await run.returnValue`.
22
+
23
+ ## Why this happens
24
+
25
+ A run's payloads — its input, output and error, and those of its steps — are
26
+ kept only for as long as the World's retention policy says. Its *metadata* —
27
+ id, status, timestamps — usually outlives them. So a run can be readable as a
28
+ record while its result is already gone.
29
+
30
+ Rather than hand back a placeholder that is indistinguishable from a value the
31
+ workflow genuinely returned, `returnValue` throws.
32
+
33
+ Two ways to reach it:
34
+
35
+ - **The run was started with `experimental_retention: 0`.** Its data is
36
+ deleted the moment it reaches a terminal state, and that deletion races your
37
+ own read of the result — and generally wins. On these runs, expect this
38
+ error rather than treating it as an edge case. See
39
+ [Data retention](/docs/observability/retention).
40
+ - **The run simply aged out.** It finished long enough ago that the World's
41
+ default retention window has passed.
42
+
43
+ ## How to respond
44
+
45
+ `RunExpiredError` is terminal. Retrying will not bring the data back, so catch
46
+ Catch the error and use the run's metadata to decide what you want to do.
47
+
48
+ ```typescript lineNumbers
49
+ import { getRun } from "workflow/api"
50
+ import { RunExpiredError } from "workflow/errors"
51
+
52
+ export async function readResult(runId: string) {
53
+ try {
54
+ return await getRun(runId).returnValue
55
+ } catch (error) {
56
+ if (RunExpiredError.is(error)) { // [!code highlight]
57
+ // `runStatus` is the run's terminal status when the World still has
58
+ // it, so you can tell a successful run whose result is gone from a
59
+ // failed one whose error is gone.
60
+ if (error.runStatus === "completed") {
61
+ // The run succeeded; its result is simply no longer stored.
62
+ }
63
+ return null
64
+ }
65
+ throw error
66
+ }
67
+ }
68
+ ```
69
+
70
+ The error carries `runId`, `runStatus` and `expiredAt` when the World reports
71
+ them.
72
+
73
+ ### If you need the result of a zero-retention run
74
+
75
+ Do not read it back off the run. Send it somewhere you control while the run
76
+ is still executing — a step that writes it to your own store. That is the intended pattern
77
+ for `experimental_retention: 0`: the point of the option is that the platform
78
+ does not keep your data, so the platform cannot also be where you fetch it
79
+ from afterwards.
80
+
81
+ ## Related
82
+
83
+ If the run is gone entirely — metadata included — the World reports it as
84
+ missing and you get a `WorkflowRunNotFoundError` instead. That means the
85
+ record itself has been cleaned up, not just its payloads.
@@ -314,6 +314,34 @@ export async function POST(request: Request) {
314
314
  }
315
315
  ```
316
316
 
317
+ ## Writing to another run's stream
318
+
319
+ `getRun(runId).getWritable()` appends to a stream owned by another run. This lets short-lived runs contribute to a long-lived holder run's stream using only its ID.
320
+
321
+ ```typescript title="workflows/turn.ts" lineNumbers
322
+ import { getRun } from "workflow/api";
323
+
324
+ type SessionEvent = { turn: number; text: string };
325
+
326
+ async function runTurn(holderRunId: string, turn: number) {
327
+ "use step";
328
+
329
+ const writable = getRun(holderRunId).getWritable<SessionEvent>(); // [!code highlight]
330
+ const writer = writable.getWriter();
331
+
332
+ await writer.write({ turn, text: "done" });
333
+ writer.releaseLock(); // [!code highlight]
334
+ }
335
+ ```
336
+
337
+ Pass `{ namespace: "name" }` to target a [namespaced stream](#namespaced-streams). The writable can also be forwarded through `start()` and into steps.
338
+
339
+ <Callout type="warn">
340
+ Contributors should call `releaseLock()`, which flushes pending writes. Calling `close()` closes the shared stream for every writer.
341
+ </Callout>
342
+
343
+ The API grants append access, not read access or additional authorization. The owning run controls the stream's lifecycle, and writes to an unknown run fail.
344
+
317
345
  ## Common patterns
318
346
 
319
347
  ### Progress updates for long-running tasks
@@ -260,7 +260,7 @@ npx workflow inspect runs
260
260
 
261
261
  ## Deploying to production
262
262
 
263
- Workflow SDK apps currently work best when deployed to [Vercel](https://vercel.com/home) and needs no special configuration.
263
+ Workflow SDK apps currently work best when deployed to [Vercel](https://vercel.com/home) and need no special configuration.
264
264
 
265
265
  <FluidComputeCallout />
266
266
 
@@ -247,7 +247,7 @@ npx workflow inspect runs # add '--web' for an interactive Web based UI
247
247
 
248
248
  ## Deploying to production
249
249
 
250
- Workflow SDK apps currently work best when deployed to [Vercel](https://vercel.com/home) and needs no special configuration.
250
+ Workflow SDK apps currently work best when deployed to [Vercel](https://vercel.com/home) and need no special configuration.
251
251
 
252
252
  <FluidComputeCallout />
253
253
 
@@ -242,7 +242,7 @@ npx workflow inspect runs
242
242
 
243
243
  ## Deploying to production
244
244
 
245
- Workflow SDK apps currently work best when deployed to [Vercel](https://vercel.com/home) and needs no special configuration.
245
+ Workflow SDK apps currently work best when deployed to [Vercel](https://vercel.com/home) and need no special configuration.
246
246
 
247
247
  <FluidComputeCallout />
248
248
 
@@ -227,7 +227,7 @@ npx workflow inspect runs
227
227
 
228
228
  ## Deploying to production
229
229
 
230
- Workflow SDK apps currently work best when deployed to [Vercel](https://vercel.com/home) and needs no special configuration.
230
+ Workflow SDK apps currently work best when deployed to [Vercel](https://vercel.com/home) and need no special configuration.
231
231
 
232
232
  <FluidComputeCallout />
233
233
 
@@ -232,7 +232,7 @@ npx workflow inspect runs
232
232
 
233
233
  ## Deploying to production
234
234
 
235
- Workflow SDK apps currently work best when deployed to [Vercel](https://vercel.com/home) and needs no special configuration.
235
+ Workflow SDK apps currently work best when deployed to [Vercel](https://vercel.com/home) and need no special configuration.
236
236
 
237
237
  <FluidComputeCallout />
238
238
 
@@ -310,7 +310,7 @@ The directive approach solved all these issues: it works in any project structur
310
310
 
311
311
  We considered decorators, but they presented technical and ergonomic challenges.
312
312
 
313
- **Decorators are non-yet-standard and class-focused**
313
+ **Decorators are not-yet-standard and class-focused**
314
314
 
315
315
  Decorators are not yet a standard syntax ([TC39 proposal](https://github.com/tc39/proposal-decorators)) and they currently only work with classes. A class decorator approach could look like this:
316
316
 
@@ -18,7 +18,7 @@ Workflow SDK provides a Workflow CLI and web UI to inspect, monitor, and debug w
18
18
  npx workflow
19
19
  ```
20
20
 
21
- The CLI comes pre-installed with the Workflow SDK and registers the `workflow` command. If the `workflow` package is not already installed, `npx workflow` will download and run the CLI temporarily, or use the local installed version if available.
21
+ The CLI comes pre-installed with the Workflow SDK and registers the `workflow` command. If the `workflow` package is not already installed, `npx workflow` will download and run the CLI temporarily, or use the locally installed version if available.
22
22
 
23
23
  Get started inspecting your local workflows:
24
24
 
@@ -44,7 +44,6 @@ npx workflow inspect runs --web
44
44
 
45
45
  On [Nitro](/docs/getting-started/nitro), the dev server has the web UI built
46
46
  in: open `/_workflow` while `nitro dev` is running. No separate command is required.
47
- needed.
48
47
 
49
48
  In the runs table, select one or more runs and choose **Cancel** to cancel the batch in a single request. Runs that fail with a retryable error stay selected so you can retry them.
50
49
 
@@ -1,4 +1,4 @@
1
1
  {
2
2
  "title": "Observability",
3
- "pages": ["tracing", "attributes"]
3
+ "pages": ["tracing", "attributes", "retention"]
4
4
  }
@@ -0,0 +1,93 @@
1
+ ---
2
+ title: Data retention
3
+ description: Control how long a run's data is kept after it finishes.
4
+ type: reference
5
+ summary: Control how long a run's data is kept after the run ends.
6
+ prerequisites:
7
+ - /docs/foundations/workflows-and-steps
8
+ related:
9
+ - /docs/observability
10
+ - /docs/api-reference/workflow-api/start
11
+ ---
12
+
13
+ A finished run leaves data behind: the inputs and outputs of the workflow and
14
+ each of its steps, the payloads on its event log, and anything written to its
15
+ streams. How long that data is kept is decided by the World you are running
16
+ on, not by the SDK.
17
+
18
+ `experimental_retention` on [`start()`](/docs/api-reference/workflow-api/start)
19
+ lets a run ask for a specific retention period, rather than the World's default.
20
+
21
+ ## Deleting a run's data as soon as it ends
22
+
23
+ {/* @skip-typecheck: abbreviated usage; processDocumentWorkflow is the reader's own workflow */}
24
+ ```typescript lineNumbers
25
+ const run = await start(processDocumentWorkflow, [documentId], {
26
+ experimental_retention: 0, // [!code highlight]
27
+ })
28
+ ```
29
+
30
+ `0` asks the World to delete the run's **user data** the moment the run
31
+ completes or fails, rather than keeping it for the World's default window.
32
+
33
+ Two values are accepted today:
34
+
35
+ | Value | Meaning |
36
+ | --- | --- |
37
+ | `0` | Delete user data as soon as the run reaches a terminal state. |
38
+ | `'default'` | Use the World's default. Identical to omitting the option. |
39
+
40
+ <Callout type="warn">
41
+ The option is prefixed `experimental_` because both its name and the set of
42
+ values it accepts are expected to change.
43
+ </Callout>
44
+
45
+ ## What is deleted, and what is not
46
+
47
+ **Deleted:** the run's input, output and error; every step's input, output and
48
+ error; the payloads on the event log; and stream contents.
49
+
50
+ **Kept:** the run, step and event records themselves — their ids, timestamps,
51
+ status, step names, and any [attributes](/docs/observability/attributes) you
52
+ set. They are kept for the World's default period so the run stays visible in
53
+ the CLI and web UI. A purged run is still listed and still traceable; its
54
+ payloads simply read back as expired.
55
+
56
+ Inspecting a purged run shows it as expired rather than failing. The Workflow
57
+ CLI renders the run's own input, output and error as `<data expired>`:
58
+
59
+ ```bash
60
+ workflow inspect runs wrun_...
61
+ ```
62
+
63
+ Step, hook and event payloads read back empty. On the Vercel World they also
64
+ render as `<data expired>`; on Worlds that clear the stored value outright
65
+ they simply show as empty. Either way the data is gone — the difference is
66
+ only in how the absence is labelled.
67
+
68
+ <Callout type="warn">
69
+ **You cannot read the return value of a run started with
70
+ `experimental_retention: 0`.** The deletion races your own read of the
71
+ result and generally wins, so `await run.returnValue` throws
72
+ [`RunExpiredError`](/docs/errors/run-expired) instead of resolving.
73
+
74
+ This is a known limitation. If you need the result, send it somewhere you
75
+ control, e.g. a step that writes it to your own store, rather than reading it back off the run.
76
+ </Callout>
77
+
78
+ `RunExpiredError` is not specific to `experimental_retention: 0`. Any run read
79
+ after its retention window has passed throws it, and the error carries
80
+ `runId`, `runStatus` and `expiredAt` when the World still has them — so a
81
+ caller can tell a successful run whose result is gone from a failed one whose
82
+ error is gone. If the run's metadata is gone too, the World reports the run as
83
+ missing and you get `WorkflowRunNotFoundError` instead.
84
+
85
+ ## Retention is implemented by the World
86
+
87
+ The SDK records your preference; it does not enforce it. `start()` writes the
88
+ value onto the run as the reserved `$retention` attribute, and the World
89
+ decides what to do when the run ends.
90
+ A World that does not implement retention
91
+ **keeps the data**. If you need certainty that a specific World deletes your data,
92
+ confirm it against that World's own documentation rather than the presence of this
93
+ option.
@@ -63,7 +63,7 @@ Stream spans are emitted by the SDK's world backend on the client that writes or
63
63
  | `workflow.queue.overhead_ms` | Time between the message being enqueued and the handler starting: queue dwell plus any cold start. |
64
64
  | `workflow.stream.name` | The stream name, on stream write/read spans. |
65
65
  | `workflow.stream.operation` | The stream operation: `write`, `write_multi`, `close`, `read`, or `flush`. |
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). |
66
+ | `workflow.stream.write.chunk_rtt` | Time between emission 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). |
67
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. |
68
68
  | `workflow.stream.read.ttfc_ms` | Time between opening a read connection and observing and receiving the first chunk back. |
69
69
  | `workflow.stream.read.connect_ms` | On `workflow.stream.read`: the connect portion (read dispatch → stream handle/response headers), network included. |
@@ -31,7 +31,7 @@ The largest change in v5 has no API surface: the runtime does far less work per
31
31
 
32
32
  **A workflow invocation now does as much as it can in a single pass.** In 4.x, progress was largely deferred to the queue: an invocation would execute a step, hand back to the queue, and let a fresh invocation pick up the next one. v5 creates and executes several steps inline per suspension, in parallel, and only uses the queue for a wait, a hook, or when the function approaches its timeout.
33
33
 
34
- **The runtime avoids waiting on the persistence layer where it can determine that is safe for your workload.** The runtime skips many API calls when they aren't needed, such as requesting the event log on a run's first invocation. Step creation is folded into step execution rather than being its own round trip. The inline loop consumes the event-log delta from the previous step's write instead of re-listing events. Each optimization is gated on specific runtime conditions and can be turned off individually. See [Runtime tuning](/docs/configuration/runtime-tuning).
34
+ **The runtime avoids waiting on the persistence layer where it can determine that it is safe for your workload.** The runtime skips many API calls when they aren't needed, such as requesting the event log on a run's first invocation. Step creation is folded into step execution rather than being its own round trip. The inline loop consumes the event-log delta from the previous step's write instead of re-listing events. Each optimization is gated on specific runtime conditions and can be turned off individually. See [Runtime tuning](/docs/configuration/runtime-tuning).
35
35
 
36
36
  **The workflow VM is kept alive across inline steps.** Within one invocation, a step- or attribute-driven suspension keeps the live VM and hydrated state, including when hooks or waits are open or created at the same boundary, so the next iteration appends only the newly written events instead of rebuilding the sandbox and replaying the whole log. Step inputs made of plain data or standard built-ins keep this fast path; see [`WORKFLOW_RETAINED_VM`](/docs/configuration/runtime-tuning#workflow_retained_vm).
37
37
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "workflow",
3
- "version": "5.0.0-beta.48",
3
+ "version": "5.0.0-beta.49",
4
4
  "description": "Workflow SDK - Build durable, resilient, and observable workflows",
5
5
  "main": "dist/typescript-plugin.cjs",
6
6
  "type": "module",
@@ -58,19 +58,19 @@
58
58
  }
59
59
  },
60
60
  "dependencies": {
61
- "@workflow/astro": "5.0.0-beta.48",
62
- "@workflow/cli": "5.0.0-beta.48",
63
- "@workflow/core": "5.0.0-beta.48",
64
- "@workflow/errors": "5.0.0-beta.20",
61
+ "@workflow/astro": "5.0.0-beta.49",
62
+ "@workflow/cli": "5.0.0-beta.49",
63
+ "@workflow/core": "5.0.0-beta.49",
64
+ "@workflow/errors": "5.0.0-beta.21",
65
65
  "@workflow/typescript-plugin": "5.0.0-beta.5",
66
66
  "@workflow/utils": "5.0.0-beta.10",
67
67
  "ms": "2.1.3",
68
- "@workflow/next": "5.0.0-beta.48",
69
- "@workflow/nest": "5.0.0-beta.48",
70
- "@workflow/nitro": "5.0.0-beta.48",
71
- "@workflow/nuxt": "5.0.0-beta.48",
72
- "@workflow/sveltekit": "5.0.0-beta.48",
73
- "@workflow/rollup": "5.0.0-beta.48"
68
+ "@workflow/next": "5.0.0-beta.49",
69
+ "@workflow/nest": "5.0.0-beta.49",
70
+ "@workflow/nitro": "5.0.0-beta.49",
71
+ "@workflow/nuxt": "5.0.0-beta.49",
72
+ "@workflow/sveltekit": "5.0.0-beta.49",
73
+ "@workflow/rollup": "5.0.0-beta.49"
74
74
  },
75
75
  "devDependencies": {
76
76
  "@types/ms": "2.1.0",