-
#1853 303b6da Thanks @TooTallNate! - Add opt-in wire-level framing for byte streams (type: 'bytes') so consumers can identify chunk boundaries — a prerequisite for transparent auto-reconnect. The framing decision is gated on a new framedByteStreams capability and recorded per-stream in the serialized ref (framing: 'framed-v1'); legacy raw streams continue to work unchanged.
-
#1981 9da2d76 Thanks @TooTallNate! - start() now delegates run ID generation to world.createRunId(options) when the world provides it, falling back to a monotonic ULID otherwise. The full options bag is passed through so worlds can read whichever fields they recognise. Adds a new region option that worlds may consume — when set, it is also forwarded onto the queue options so the initial workflow message is routed to the matching region.
-
#2062 20e8440 Thanks @pranaygp! - Add experimental dynamic workflows: start() accepts workflow source as a string, compiles and stores it with the run through the run-payload serialization pipeline, and replays from that stored code. Steps are exposed to the source through an explicit experimental_dynamic.steps map, which is not a security boundary: dynamic source runs with the deployment's full privileges. Off by default; a deployment opts in with WORKFLOW_EXPERIMENTAL_DYNAMIC_WORKFLOWS=1, and dynamic runs can only start on the current deployment.
-
#3145 1471f25 Thanks @VaguelySerious! - Strengthen the event-creation precondition guard: replay-context writes now also send the number of loaded events, so a snapshot that is missing an event is rejected instead of committing a divergent event log, and a rejection restarts the replay in-process (consuming the events a world may attach to the rejection) rather than re-committing the rejected payload or re-invoking over the queue. @workflow/world-local and @workflow/world-postgres do not implement the check.
-
#2266 a00d169 Thanks @VaguelySerious! - Add an opt-in optimistic-concurrency guard for event creation (WORKFLOW_PRECONDITION_GUARD=1): replay-context event creations send a stateUpdatedAt snapshot timestamp, and the runtime reloads the event log and retries (then falls back to a queue re-invocation) when the backend reports a newer out-of-band event with a 412 PreconditionFailedError.
-
#1854 8d75491 Thanks @TooTallNate! - Surface workflowCoreVersion from the responding deployment in healthCheck() results.
-
#2373 01c8c08 Thanks @pranaygp! - Replace hook.hasConflict (a Promise<boolean> property) with hook.getConflict(), a method returning a promise that suspends the workflow to commit hook registration and resolves with the conflicting Run when another active hook owns the token (or null once the hook is registered), without waiting for hook payload data. Code using await hook.hasConflict should migrate to const conflict = await hook.getConflict() and branch on conflict !== null.
-
#3230 31f92df Thanks @karthikscale3! - Lazy hook resumption: on a fast path, resumeHook() writes the hook_received event and dispatches the workflow queue message concurrently instead of sequentially, cutting a round trip off resume latency. A (runId, resumeId) dedup constraint keeps the two writers converging on exactly one event; the runtime falls back to the sequential path when dedup support is unavailable or when WORKFLOW_DISABLE_LAZY_HOOK_RESUME=1. resumeHook() resolves to a ResumedHook (a Hook plus an optional resilientResume: true flag, set only when the direct write failed transiently and the resume was recovered via the queue consumer's re-ensure) — preserving the contract introduced alongside the resilient-resume work.
-
#3700 9b1b8c7 Thanks @VaguelySerious! - Pin correlation-ID draw order to event-log order (Node.js VM engine), so two concurrent replays of the same run assign the same IDs even when one loaded a shorter event-log prefix. Set WORKFLOW_LOG_ORDER_DRAWS=0 to opt back into arrival-order delivery resolution.
-
#2226 ae8d6fe Thanks @pranaygp! - Allow passing initial run attributes through start(), and speed up workflow-level setAttribute calls by using native events for recording attributes.
-
#1616 71d39d2 Thanks @TooTallNate! - Use custom class serialization for Run across runtime and workflow VM contexts, and add e2e coverage for Run instance boundary roundtrips
-
#2363 926a5e7 Thanks @karthikscale3! - Add WORKFLOW_TRACE_MODE with a new linked default: each workflow/step invocation span is now its own trace root with span links to the delivery and run-origin contexts, instead of one trace spanning the entire run. world-vercel now explicitly injects W3C traceparent/tracestate/baggage headers on outgoing workflow-server requests.
Span names are also friendlier: workflow and step spans now use the short function name (e.g. workflow.execute processOrder, step.execute chargeCard, workflow.start processOrder) instead of the uppercase prefixes and full machine names (WORKFLOW_V2 workflow//./src/jobs/order//processOrder). The full name remains available in the workflow.name / step.name span attributes, and new workflowDisplayName / stepDisplayName helpers are exported from @workflow/utils.
Behavioral changes to telemetry under the new default (set WORKFLOW_TRACE_MODE=continuous to restore the previous trace shape exactly; the span-name change applies in both modes):
- A run no longer shares one trace ID: the trace of the request that called
start() no longer contains the workflow's execution spans — navigate via span links or the workflow.run.id attribute instead.
- Sampling decisions are made independently per invocation root (previously one parent-based decision covered the whole run), and the number of root spans/traces increases to one per invocation.
workflow.execute/step.execute invocation spans (formerly WORKFLOW_V2/STEP) become parentless roots, which changes parent/child-based queries and service-map edges.
- Re-enqueued queue messages forward the original run-origin trace carrier unchanged, rather than each invocation's current context.
- Queries or dashboards matching the old
WORKFLOW_V2 .../STEP ... span names must switch to the new names.
- The queue-delivered
workflow.execute span kind changed from internal to consumer, matching the queue-delivered step.execute span (this applies in both modes).
Existing attributes and baggage keys are unchanged, and everything remains a no-op when no OpenTelemetry SDK is registered.
-
#2516 84ccd40 Thanks @VaguelySerious! - Inline execution now runs up to WORKFLOW_MAX_INLINE_STEPS (default 3) steps in parallel per suspension, each lazily created. An opt-in WORKFLOW_OPTIMISTIC_INLINE_START (default off) additionally starts step bodies before step_started is confirmed, reconciling the in-flight start before the terminal write so a lost create-claim is discarded; it is off by default because under contention a step body can run more than once (e.g. two runs writing to the workflow stream can corrupt it), so only enable it for idempotent steps.
-
#2946 eb8fdb9 Thanks @VaguelySerious! - The WORKFLOW_PRECONDITION_GUARD event-creation guard is now on by default; opt out with WORKFLOW_PRECONDITION_GUARD=0.
-
#3048 f8f6e17 Thanks @TooTallNate! - Add an experimental QuickJS WASM VM engine for workflow execution, opt-in via WORKFLOW_VM=quickjs (or per-run executionContext.workflowVm). The engine performs the same full event replay as the default node:vm engine but runs workflow code in a QuickJS VM compiled to WebAssembly, enabling platforms without node:vm support and laying the groundwork for VM-memory snapshotting.
-
#2882 0b956f6 Thanks @VaguelySerious! - Rename experimental_setAttributes to setAttributes — the attributes feature is no longer experimental. The old name remains available as a deprecated alias.
-
#1834 438eaa6 Thanks @TooTallNate! - Make resumeHook() resilient to transient hook_received event write failures (429/5xx) by carrying the payload on the queue message for the runtime to materialize. Returned Hook gets a new resilientResume: true flag when this fallback path is taken.
-
#3046 5d591d2 Thanks @NathanColosimo! - Retain workflow execution across inline steps within one invocation; WORKFLOW_RETAINED_VM=0 disables retention. Boundaries whose step arguments are not primitive values fall back to ordinary replay.
-
#3047 89ede82 Thanks @NathanColosimo! - Retained workflow VMs now keep the fast path when step arguments are plain data or standard built-ins (Map, Set, Date, typed arrays, URL, Headers, …), not just primitives. A boundary falls back to a normal replay only when serializing its arguments ran code the workflow controls — a getter, a proxy, a custom serializer — or computed an Error's stack trace.
-
#3972 c340820 Thanks @alangenfeld! - Add Run#getWritable() and run.writable to append to an existing run's stream.
-
#2385 628795a Thanks @pranaygp! - Add an allowReservedAttributes option to start() so framework-level callers can seed reserved $-prefixed run attributes at creation, matching the existing experimental_setAttributes option. The flag is carried through the resilient-start queue input so lazy run creation validates identically.
-
#1491 e295bae Thanks @pranaygp! - Allow start() to be called directly inside workflow functions
-
#3850 fe2fd8c Thanks @alangenfeld! - Add a catchable StreamError and classify Workflow stream infrastructure failures as STREAM_ERROR instead of USER_ERROR.
-
#2059 49da6c5 Thanks @TooTallNate! - A WritableStream from a workflow's getWritable() can now be passed as an argument to a child workflow via start(); the child's writes land on the parent run's stream directly for the full lifetime of the child run.
-
#2526 3e82a12 Thanks @VaguelySerious! - Add turbo mode (on by default, disable with WORKFLOW_TURBO=0): on the first delivery of a run's first invocation the runtime backgrounds run_started, skips the initial event-log load, and forces optimistic inline start so the run reaches its first steps with no preceding network round-trips. It is safe there because the first delivery has no concurrent handler to race; turbo mode deactivates once a hook or sleep is encountered.
-
#3678 20ad2b3 Thanks @TooTallNate! - Add registerLifecycleHooks from workflow/api for best-effort completion and failure reporting with a read-free workflow name, lazy Run instance, and failure cause hydrated from the persisted payload. Run metadata getters avoid resolving input/output payloads.
-
#2134 1e6b1fd Thanks @VaguelySerious! - Add experimental_setAttributes() workflow-level helper for attaching string key/value metadata to a workflow run, surfaced as run.attributes
-
#3497 1321570 Thanks @VaguelySerious! - Log ignored duplicate events at debug instead of info/error, so a straggler no longer prints on every replay of the run.
-
#2678 f6772d9 Thanks @ijjk! - Speed up Next.js workflow dev rebuilds, ignore commented imports during HMR discovery, and avoid Turbopack resolving custom-world dynamic imports.
-
#1769 5a42964 Thanks @tomdale! - Embed source content in published sourcemaps.
-
#2056 9454151 Thanks @VaguelySerious! - Fix spurious "Event cursor missing after initial load" warning
-
#1653 c6b630f Thanks @TooTallNate! - Fix workflow/next ESM compatibility for next.config.mjs files
-
#3891 c29200f Thanks @NathanColosimo! - Route Workflow AI examples through AI Gateway and recommend WorkflowAgent for Workflow 5.
-
#2086 2050656 Thanks @VaguelySerious! - Fix getWritable() returning a new TransformStream per call, which caused racing pipes to reorder chunks when callers acquired a writer per write. Repeat calls within the same step now share a single pipe per (runId, namespace).
-
#3288 679dfa9 Thanks @NathanColosimo! - Simplify hardened serialization: intrinsic captures assert at import instead of degrading per use, URLSearchParams now serializes natively on Node 18, and bound-function getters are reported as guest code (previously a getter defined via fn.bind() executed with an empty report).
-
#3257 b732e91 Thanks @TooTallNate! - Serializing values built inside the node:vm workflow VM no longer executes workflow code, using engine brand checks and host intrinsics captured at boot.
-
#2475 2074f91 Thanks @pranaygp! - Skip the per-step incremental events.list round-trip in the inline sequential loop by consuming an event-log delta returned from the step's terminal write (gated to the single-step case with no open hooks or waits).
Add the opt-in CreateEventParams.sinceCursor contract so a step-terminal events.create can return the event-log delta since that cursor (via EventResult.events/cursor/hasMore).
Return the inline delta from a step-terminal write when sinceCursor is supplied, computed identically to events.list so the consumed prefix cannot skew from the server log.
Forward sinceCursor over the v4 wire in @workflow/world-vercel so the server can return the delta on a step-terminal response; older servers ignore it and the runtime falls back to events.list.
-
#2478 e7ef9d8 Thanks @pranaygp! - Lazy inline step start: the owned-inline runtime path now sends a single step_started carrying the step input, letting the world create the step on the fly and saving one round-trip per inline step.
@workflow/world: step_started event data accepts an optional input, and EventResult gains a stepCreated ownership signal.
@workflow/world-local: step_started with input atomically creates the step plus a synthetic step_created event; a lazy step_started for an already-existing step throws EntityConflictError so concurrent losers skip (exactly-once).
@workflow/world-postgres: same lazy-create + exactly-once create-claim for the Postgres backend.
@workflow/world-vercel: sends the step input on step_started over the v4 wire and threads the server's stepCreated signal into EventResult.
-
#1979 62ec537 Thanks @adamiBs! - Make run.input and step.input .optional() on the World snapshot schemas so consumers no longer fail validation when the service externalizes payloads as RemoteRef blobs.
-
#3554 707dfe6 Thanks @VaguelySerious! - Fix a replay-determinism gap where branch wake order — and therefore step correlation ids — could depend on how much of the event log an invocation had loaded, corrupting runs under concurrent replays (CORRUPTED_EVENT_LOG).
-
#2472 66ca0dc Thanks @pranaygp! - Memoize hydrated step return values across inline replay iterations, turning the per-invocation step-result decrypt+parse cost from O(N²) to O(N) for sequential workflows. Only primitive results are cached, so deterministic replay is preserved.
-
#2980 268fede Thanks @NathanColosimo! - Prepare encrypted replay payloads concurrently and cache the decrypted, decompressed representation for reuse across inline replay iterations.
-
#3048 f8f6e17 Thanks @TooTallNate! - QuickJS engine performance: cache compiled WebAssembly modules process-wide, and execute steps inline in a live-VM continuation loop (no queue round-trip per step, cheap events fed before step bodies, delayed wait-continuation dispatch for racing timers).
-
#1759 173756d Thanks @TooTallNate! - Rename useworkflow.dev URLs to workflow-sdk.dev
-
#2752 0f557d5 Thanks @ijjk! - Revert the static workflow world target injection: the world package is again resolved at runtime from WORKFLOW_TARGET_WORLD instead of being aliased into host bundles at build time.
-
#1301 aee5699 Thanks @pranaygp! - Add serializable AbortController and AbortSignal support across workflow and step boundaries. Workflow code can now construct an AbortController, pass signal to steps, and call abort().
Behavior change: AbortError thrown from inside a step is now wrapped as FatalError and skips retry semantics. As a result, custom timeouts on fetch inside steps are no longer re-tried by default, and now need to be wrapped in RetryableError to preserve the old behavior.
-
#3301 cb77725 Thanks @VaguelySerious! - Fix stream IDs minted while serializing a step's arguments latching the host wall clock into a run's ID sequence, which gave every entity created afterwards a different correlation ID on each replay
-
#2157 409b103 Thanks @VaguelySerious! - Allow experimental_setAttributes() to be called from step functions.
-
#2292 aa628b7 Thanks @pranaygp! - Bump devalue to 5.8.1 to address published security advisories.
-
#1338 8ea1532 Thanks @VaguelySerious! - Merge flow and step routes into a single combined handler that executes steps inline when possible, reducing function invocations and queue overhead.
-
#1799 503a929 Thanks @TooTallNate! - Use inline sourcemaps for all workspace packages; published packages no longer ship external .js.map files.
-
#2468 49a50e8 Thanks @NathanColosimo! - Standardize first-party World packages on createWorld(), support relative target World modules consistently, and align the Postgres World DATABASE_URL fallback with bootstrap.
-
#1951 72911f7 Thanks @VaguelySerious! - Fix world.ts being tree-shaken out of the bundle and unavailable at runtime
-
#3902 7a46a81 Thanks @NathanColosimo! - Upgrade runtime validation to Zod 4.5 and enable compilation on SDK-owned Zod schemas.
-
Updated dependencies [4b5f017, 6de5ea5, bf44d4d, d040182, fbfb9fe, 35b539b, 3f69666, 855e479, 1e6b1fd, 6d1d700, fb9e275, b0adb50, 37e1d9e, 9add9d7, 8c12358, 9d2a926, 66d49c0, f28150c, dc0be50, 2150798, 8d47928, b92dfbb, 011d482, 303b6da, d8071bb, 74dbf81, 1ee63b8, 564ad39, 5b5a926, 145835b, 923ddd9, 1946718, 17d4ce2, f9073d0, 25715d4, 54f46f9, fe327e6, ad0fcc7, cb18139, df115fd, 5f0b845, 4a9d26b, 65139ac, ee944d2, 9da2d76, ad71b58, c0aad6d, 8f68d35, 0810b75, 1a64f68, 7aee0d4, 9242ddb, d3ea4a6, 4b7a720, 532b0e1, ae16375, 916fcf0, c29200f, 788d4fb, ec57aff, 16b3670, aee5699, 6cc851c, dc85865, 101d347, efbc408, 1321570, 2668e33, 9d72807, 20e8440, c041d3d, 234d3dd, 60dd206, 5a23159, 8a95d36, e8bc7d6, 7a65030, 0b1ca15, b4ba79e, 4ba223a, a86035f, b8bcded, a4d8de0, e7ea068, 540a2ef, e436242, 1471f25, fe12b84, a00d169, a8db185, 9958424, 9cc11f5, 79e4c04, f6772d9, 5291f15, 4bb86d3, 74b13cd, ec517fa, 5a42964, e084e08, a5c90ce, 3c79c56, aee5699, ea97bd6, b7d6595, 9454151, 2552d8b, 7440244, fe13110, b3279f8, 3535caf, 2ca34ac, a51910b, f6772d9, 2bf5257, c29200f, ff80d62, 938c7ff, 56322af, 6f4dd0e, 1203dae, 00a011d, 29bc3e0, 2050656, f771585, 0750fe8, b124365, 5f0b845, 679dfa9, b732e91, 8d75491, f11e9fe, 7cc5c88, 4f52438, 01c8c08, a5e6f11, 20aa656, d24c91c, a0ccfe0, 0fd0891, 7637196, 35ebeb4, b92c23c, 0d0bb01, b180270, bb773e9, 2074f91, fd05393, 6603628, c31e30c, 1e6b1fd, 07ec212, f75b184, 32a17b4, 070bd0c, d4dd6f9, efbdc21, 9c1b3c8, d9e0777, 31f92df, e7ef9d8, 0b8b077, d9e0777, 439a495, ccd37e9, 0b2797b, fc81f45, 25ec4ba, 4174a6e, 722bb7c, 9b1b8c7, 61fb1f9, a38f140, eba7df3, 6ac572c, f771585, ae8d6fe, 71d39d2, d674d6f, 93e76fc, de91f20, 5a05f40, 426bdb6, 542138d, 0b1216e, 0547d9d, 239031a, f20be08, 3069b49, baba580, a3da6b7, f5f6d0e, 7eabc1f, 873b4e2, a651052, 25715d4, cbecbaa, a1cbc8b, 3077b8a, c1242e8, 7d07fab, 48fcc4e, ac09f40, e55c636, 3f69666, f2daf40, 3560218, 707dfe6, 25b1509, 926a5e7, ab2e9b8, ee6f917, 84ccd40, 939890d, 66ca0dc, 268fede, 49276f2, eb8fdb9, e9d5c56, 1203dae, d7553c4, 22b2728, d62b444, e00b1a5, 4670c4b, eb9e13f, 939ffb4, 27cab14, 27a3f15, 19b5b85, f8f6e17, 357aa7c, 6ac572c, f8f6e17, 6c0d510, 3fd4cc5, fbebf71, 5d17c60, ffc5807, a074259, 24f3707, 3aa4c16, eb7f60c, 3589958, de2a86c, eb976db, a92c16d, 417c493, 7959acc, 57cccaf, 4ada27d, 0a86de3, 89d242f, 906f7c1, 173756d, 0b956f6, 52d63d1, f7fb012, 2a3b11b, 36c63af, 2a446af, 4017597, dc85865, 438eaa6, dc85865, 7683130, 82e2678, 556f3f0, 3c08778, 5d591d2, 89ede82, 62d570e, 62d570e, f771585, 0f557d5, e7e5a0e, 1933e29, 712ed61, 37f1011, c340820, 9454d51, 5f22832, 8d0928b, 1d3959e, a813382, 7b79ba3, bb6ff9a, aee5699, 5bf2c16, 9f3516e, c44b4f8, 8a2648e, 6786db9, b589460, 644d6b8, 4cde3b9, 6dd5c72, 37312ed, 97dccc9, cb77725, 4753abb, 628795a, 6b8efd5, bc18326, e295bae, 409b103, d0e3f27, 2941b1c, 03455a2, ac51658, 9177ba8, 66d49c0, c09c1bb, 22349e9, c5f9177, fe2fd8c, c1a5c74, ae37315, 2c6ee61, 31dabce, 4a43e39, 6353c8c, aa628b7, aae47b9, a1cbc8b, 37ed049, 880801b, f1f5b7d, 2694663, 12c35b5, cc7f076, 548147a, 332c63c, 69c30ff, ee1a09b, 49da6c5, 1c28eec, 603ad97, 5dbbcf9, fd107b9, 2477ad8, 3e82a12, 1ea2b4e, d108ba3, 65139ac, f771585, 8ea1532, d813fb8, bf9de1c, 873b70b, 0c997ce, 0d6ec43, 503a929, 5841558, 9513a81, 20ad2b3, d427c47, 49a50e8, 72911f7, 72efc90, b610c46, 264ddff, 4547e1a, 7a46a81]:
- @workflow/core@5.0.0
- @workflow/typescript-plugin@5.0.0
- @workflow/errors@5.0.0
- @workflow/next@5.0.0
- @workflow/cli@5.0.0
- @workflow/astro@5.0.0
- @workflow/nitro@5.0.0
- @workflow/sveltekit@5.0.0
- @workflow/rollup@5.0.0
- @workflow/nuxt@5.0.0
- @workflow/utils@5.0.0
- @workflow/nest@5.0.0