60 KiB
@workflow/world
5.0.0-beta.34
Minor Changes
-
#3787
61fb1f9Thanks @VaguelySerious! - Add anexperimental_retentionoption tostart():experimental_retention: 0asks the World to delete the run's user data as soon as the run completes or fails, while keeping the run itself listable. Implemented on the Vercel, Postgres and Local Worlds. Reading a run whose data has expired now throwsRunExpiredErrorinstead of resolving to a placeholder. -
#3832
4547e1aThanks @alangenfeld! - Add an optional stateful stream writer-session seam with stable writer identity and sequence tracking.
5.0.0-beta.33
Minor Changes
-
#3943
fbfb9feThanks @karthikscale3! - Validateworld.analyticsarguments up front: an invalid id, an out-of-range page limit, an oversized attribute filter, or a half-openstartTime/endTimewindow now throws aWorkflowWorldErrorwithcode: 'INVALID_ARGUMENT'andfieldset to the offending parameter, instead of failing the request. The message names the method, the parameter, and what it received. AddsANALYTICS_RUN_SCOPED_PAGE_LIMIT,ANALYTICS_PAGE_LIMITandANALYTICS_MAX_ATTRIBUTE_FILTERS.Deprecate
analytics.events.listByCorrelationId()in favour ofanalytics.events.list({ runId, correlationId }).Fix
analytics.attributes.list()timestamps being shifted by the local UTC offset.
Patch Changes
-
#3938
7cc5c88Thanks @pranaygp! - Answer thesinceCursorevent-log delta on ahook_conflictwrite the same way as onhook_created. -
#3914
4a18b01Thanks @shalabhc! - Accept lazy completed and failed runs whose payload is represented by a remote reference. -
#3901
5c4eef0Thanks @NathanColosimo! - Upgrade repository tooling and CI from pnpm 10 to pnpm 11.
5.0.0-beta.32
Patch Changes
-
#3849
855e479Thanks @VaguelySerious! - Fix runs failing withCORRUPTED_EVENT_LOGafter every step had already succeeded, when the event log held two attribute writes under one id. -
#3841
2668e33Thanks @karthikscale3! - MakeresumeHook()durable before it resolves: thehook_receivedevent is written durably first, and the workflow wake is published only after the write is acknowledged. A disposal racing the queue delivery can no longer lose a resume the caller was told succeeded. The wake message is unchanged, so no consumer or backend coordination is needed;WORKFLOW_DISABLE_LAZY_HOOK_RESUMEis now a no-op and the internalresumeHookDurable()alias is removed.Behavior changes: a resume against an ended run now throws
HookNotFoundErrorinstead of resolving (the lazy path never observed the server's rejection, so a late webhook delivery to a finished run answered 202 where it now answers 404). A transient write conflict (HTTP 409, e.g. an event-slot conflict under contention) is no longer re-keyed toHookNotFoundError: it surfaces as a retryable error, since its transaction committed nothing. -
#3548
e9d5c56Thanks @NathanColosimo! - Prepare replay payloads as validated event frames arrive, reuse primitive step results across fresh VMs, and preserve replay startup overlap. -
#3878
ffc5807Thanks @pranaygp! - Stop logging on healthy workflow execution: the breadcrumbs that only described the runtime working correctly now print underDEBUG=workflow:*. Warnings and errors are unchanged.
5.0.0-beta.31
Patch Changes
- #3794
d9e0777Thanks @VaguelySerious! - Document thathookInputand the(runId, resumeId)dedup contract now cover repeated deliveries of one resume rather than a producer/consumer race, and acceptlazyas a hook-resume strategy.
5.0.0-beta.30
Major Changes
- #3550
d62b444Thanks @NathanColosimo! - Keep schema-only World modules out of workflow VM bundles, prevent unknown attribute deletions from offsetting new keys, and safely ignore prototype-like event type names.
5.0.0-beta.29
Minor Changes
-
#3570
9454d51Thanks @pranaygp! - Addworld.runs.waitForTerminalStatus(runId, { timeoutMs, signal, resolveData })method, which long-polls until the run reaches a terminal status.await run.returnValuenow internally uses this, if the World supports it, instead of using a polling interval. -
#3634
7b79ba3Thanks @pranaygp! - New runs are created with the sealed-log event identity (specVersion 7). A sealed-log run's event positions are assigned by the backend before each write commits, so concurrent writers never contend for a position. A position whose writer dies is closed by the backend with anoopevent; replay steps over those without delivering them or advancing the deterministic clock. SetWORKFLOW_SEALED_LOG=0to put a deployment back on the previous scheme. Every runtime reads sealed logs either way, and a run's version is fixed at creation, so the setting only affects new runs.
Patch Changes
-
#3728
f771585Thanks @pranaygp! - Hold process-wide state onglobalThisrather than at module scope in the packages that get bundled into the host application's server build, where a bundler compiles one copy of each module per layer. Covers warn-once latches, lazy caches, the VM script and QuickJS asset caches, the dev-server port cache, and step single-flight, whose per-copy map was not actually single-flight. State that is deliberately per-copy is annotated with the reason. -
#3743
bf9de1cThanks @VaguelySerious! - A wait-continuation delivered before its wait elapses now re-arms under a fresh idempotency key instead of losing the wait's timer. Previously the re-enqueue reused a key the early delivery had already spent, so the world's dedupe window dropped it and the run slept indefinitely with nothing scheduled to wake it.
5.0.0-beta.28
Minor Changes
- #3461
04e060aThanks @VaguelySerious! - AddWORKFLOW_NODE_HTTPto run the Vercel and Local World HTTP layers on Node's built-innode:httpandnode:httpsmodules instead of their usual HTTP client library.
Patch Changes
-
#3025
b0adb50Thanks @pranaygp! - Addworld.events.createBatchWorld API method, which allows writing ordered events in one durable write, returning per-event outcomes. Optional. On by default if implemented by the World. Disable withWORKFLOW_BATCH_TRANSITIONS=0. -
#3568
37e1d9eThanks @pranaygp! - Pre-claim inline steps inside the suspension batch, so a fan-out's inline step bodies start off the batch commit with no per-step claim request -
#3497
1321570Thanks @VaguelySerious! - Log ignored duplicate events atdebuginstead ofinfo/error, so a straggler no longer prints on every replay of the run.
5.0.0-beta.27
Minor Changes
-
#3390
600b096Thanks @alangenfeld! - Add a bounded batch analytics event lookup for enriching canonical event pages. -
#3365
7683130Thanks @TooTallNate! - Resilient step dispatch: newly created steps are published to the queue in parallel with theirstep_createdevent write, with the serialized input carried on the message (stepInput) so the consumer re-ensures the event if the direct write failed transiently — mirroring resilient start (runInput) and resilient hook resume (hookInput). Worlds that enforce the precondition guard keep the sequential create-then-publish dispatch (only sequencing gives the message a happens-after edge over the create's guard verdict); step-dispatch idempotency keys are now step-identity-scoped. Disable viaWORKFLOW_RESILIENT_STEP_DISPATCH=0.
Patch Changes
-
#3519
dc85865Thanks @VaguelySerious! - Remove thepreconditionGuardWorld capability. A stale replay-context write no longer needs to be rejected: a reader holds a prefix of the log, replay is deterministic on a prefix, and the writer's next write reports the events it was pushed past. -
#3381
efbc408Thanks @VaguelySerious! - Ignore duplicate events that a concurrent replay wrote for an entity the event log already records, instead of failing the run with a corrupted event log -
#3437
a0ccfe0Thanks @karthikscale3! - Add OTEL telemetry for hook-triggered time-to-resume:workflow.resume.total_msplus a non-overlapping phase breakdown, on the first durable step after a resume. -
#3542
de2a86cThanks @VaguelySerious! - Breaking: New runs are created at spec version 6, and a World that declares an older spec version is now rejected before the first run rather than failing partway through one. -
#3519
dc85865Thanks @VaguelySerious! - Require every event id the runtime reads to be a log position.requireEventSlotreplaces the lenient decode that returned "no position" for an id that is not a slot. -
#3519
dc85865Thanks @VaguelySerious! - Slot-numbered event ids are a requirement of the World contract, not a capability. TheslotEventIdsflag is gone, and the conformance suite now fails a World whose event ids are not positions. -
#3479
b589460Thanks @VaguelySerious! - Replay-context event writes now always report the log position they replayed from, and theWORKFLOW_PRECONDITION_GUARDflag is removed.
5.0.0-beta.26
Minor Changes
- #3374
439a495Thanks @karthikscale3! - Carry the run's pinned deployment on lazy resume messages so misrouted deliveries re-route before thehook_receivedwrite.
Patch Changes
-
#3385
74dbf81Thanks @NathanColosimo! - Retry replay timeouts through normal queue redelivery instead of exiting the process, and keep Postgres jobs retryable through Core's terminal delivery limit. -
#3382
a8db185Thanks @VaguelySerious! - Fold new events returned byevents.createinto the replay log so a completed wait no longer needs a follow-upevents.listround trip -
#3389
6786db9Thanks @VaguelySerious! - Breaking: SpecVersion 6: Event IDs are now a dense per-run slot number, allocated by the world at publish time so a rejected write leaves no gap in the event log. A replay tells the world how many events it had read and gets back the ones it did not see, so an event that arrives from outside the replay and lands ahead of an event the replay wrote no longer fails the run withCORRUPTED_EVENT_LOG: it is held for whichever part of the workflow awaits it. A gap in the numbering fails the run instead of being replayed over. -
#3205
22349e9Thanks @NathanColosimo! - Load replay-event suffixes through one World request. -
#3124
65139acThanks @NathanColosimo! - Infer required run and step entities, including their start times, fromevents.createrequest types.
5.0.0-beta.25
Major Changes
- #3280
de1905fThanks @VaguelySerious! - Breaking:events.listByCorrelationIdandanalytics.events.listByCorrelationIdnow require arunId. A correlation id is unique within its run, not across runs, so an unscoped lookup answered with one event per run that numbered a step or wait the same.
Minor Changes
-
#3347
8d47928Thanks @karthikscale3! - Add a bulk run cancellation primitive.@workflow/worlddefines theBulkCancelWorkflowRuns*contract and an optionalruns.cancelMany;@workflow/world-vercelimplements it via a singlePOST /v4/runs/cancel;@workflow/coreadds acancelRunshelper that usescancelManywhen available and falls back to bounded-concurrency single-run cancellation. -
#2960
79e4c04Thanks @alangenfeld! - Re-route a queue delivery that reaches a deployment other than the one its run is pinned to, retry transient publishing failures through normal queue redelivery, and fail the run with the newDEPLOYMENT_MISMATCHerror code once the recovery budget is spent. -
#3345
9c1b3c8Thanks @karthikscale3! - Initialize lazy hook resume replay from thehook_receivedwrite via the new advisorypreloadEventsparam, skippingrun_startedand the initialevents.list; safe fallback otherwise. -
#2866
e6f1b6fThanks @NathanColosimo! - Keep Hook tokens reserved through their configured minimum retention.
Patch Changes
- #3360
72efc90Thanks @elliotdauber! - Derive inline-execution duration limits fromWorld.getRuntimeDeadline()(implemented on Vercel World via@vercel/functions).
5.0.0-beta.24
Minor Changes
-
#3186
4a9d26bThanks @alangenfeld! - Record the compute instance that ran each step attempt:CreateEventParams.computeInstanceIdis stamped onstep_startedwrites, forwarded in the world-vercel v4 frame meta alongsidevercelId, read back onAnalyticsEvent/AnalyticsStep, and surfaced as "Compute Instance ID" in the observability attribute panel. -
#3145
1471f25Thanks @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-localand@workflow/world-postgresdo not implement the check. -
#3230
31f92dfThanks @karthikscale3! - Lazy hook resumption: on a fast path,resumeHook()writes thehook_receivedevent 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 whenWORKFLOW_DISABLE_LAZY_HOOK_RESUME=1.resumeHook()resolves to aResumedHook(aHookplus an optionalresilientResume: trueflag, 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. -
#1834
438eaa6Thanks @TooTallNate! - MakeresumeHook()resilient to transienthook_receivedevent write failures (429/5xx) by carrying the payload on the queue message for the runtime to materialize. ReturnedHookgets a newresilientResume: trueflag when this fallback path is taken. -
#3244
ee944d2Thanks @pranaygp! - Add an optionalWorld.getEnvironment()hook and an optionalenvironmentfield onRunInputSchema, so the environment a run was created in can travel with its queue message.
Patch Changes
- #3208
4017597Thanks @alangenfeld! - Report replay-divergence counts on event writes that recover or exhaust replay retries.
5.0.0-beta.23
Major Changes
- #3061
62d570eThanks @NathanColosimo! - Remove legacy step queue topics and payloads now that queued steps use the workflow topic and combined flow handler.
Minor Changes
-
#3095
b4ba79eThanks @TooTallNate! - Persist and transport the new optionalencryptionPublicKeyfield on workflow runs, carried onrun_created(andrun_startedfor resilient start). -
#3099
a86035fThanks @TooTallNate! - The cross-deployment capability probe now returns the target run's public key, lettingstart()seal workflow arguments without a separate key-lookup request.
Patch Changes
-
#3111
8c12358Thanks @NathanColosimo! - Clarify runtime invariants and compression behavior. -
#3125
d24c91cThanks @karthikscale3! - Hooks can carry an optionalresumeContext; when present,resumeHook/resumeWebhookresume from it directly instead of fetching the full run, saving a round trip per resume. When the context also carries the run'sencryptionPublicKey, the resume seals its payload (encp) directly to that key, so a default webhook resume needs neither a run read nor a run-key lookup. These two optimizations fall back independently: it fetches the full run when the context is absent, and uses symmetric encryption when no usable public key is available. -
#3088
fc81f45Thanks @karthikscale3! - Stream writes dispatch the first chunk of an idle stream immediately (flush window default 0 instead of 10ms). Fast producers keep full batching via in-flight accumulation; setstreamFlushIntervalMs(World option) orWORKFLOW_STREAM_FLUSH_INTERVAL_MS(env, takes precedence) above 0 to opt into a windowed leading edge.
5.0.0-beta.22
Minor Changes
-
#2915
7d29babThanks @joeyhotz! - Addruns.getMany()for retrieving ordered workflow run snapshots in one storage operation. -
#2865
a5e6f11Thanks @NathanColosimo! - Addexperimental_minRetentionfor keeping a Hook token unavailable after its run ends, and require supporting Worlds to advertise thehookRetentioncapability. -
#2970
bb773e9Thanks @VaguelySerious! - Add an optionalcapabilities?: WorldCapabilitiesfield to the World interface so implementations can declare backend feature support (preconditionGuard,maxConcurrency) instead of the runtime inferring it from environment variables; the Vercel World declares both.
Patch Changes
-
#2986
fe12b84Thanks @shalabhc! - Enforce a server-supplied per-run event limit (default 25K) -
#2946
eb8fdb9Thanks @VaguelySerious! - TheWORKFLOW_PRECONDITION_GUARDevent-creation guard is now on by default; opt out withWORKFLOW_PRECONDITION_GUARD=0.
5.0.0-beta.21
Minor Changes
-
#2266
a00d169Thanks @VaguelySerious! - Add an opt-in optimistic-concurrency guard for event creation (WORKFLOW_PRECONDITION_GUARD=1): replay-context event creations send astateUpdatedAtsnapshot 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 412PreconditionFailedError. -
#2929
1933e29Thanks @VaguelySerious! - Report run-started-to-first-step (rsfs) and final-scheduling-replay (finalSchedulingReplay) latency telemetry on step completion events.
Patch Changes
- #2153
6b8efd5Thanks @rchasman! - Record cross-run lineage whenstart()is called from inside a workflow or step: the new run is tagged with$parentRunId(its direct parent) and inherits the parent's$rootRunId, so a daisy chain or fan-out of any depth groups under one root id.
5.0.0-beta.20
Minor Changes
-
#2903
f2be954Thanks @karthikscale3! - Addanalytics.attributes.list()for attribute key discovery, and anattributeskey=value filter toanalytics.runs.list(). -
#1981
9da2d76Thanks @TooTallNate! - Add optionalcreateRunId(options?)to theWorldinterface andregiontoQueueOptions. Worlds can now mint custom run IDs (reading whichever start-option fields they recognise) and route messages to a specific region.
Patch Changes
-
#2899
ac41e7dThanks @TooTallNate! - Parse timezone-naive analytics timestamps as UTC so CLI and local web output shows correct times in any timezone. -
#2896
c31e30cThanks @TooTallNate! - Show world-specific run fields (e.g. region on Vercel) inworkflow inspectoutput via the new optionalWorld.describeRunhook.
5.0.0-beta.19
Patch Changes
-
#2888
7a1ea5aThanks @ctgowrie! - Use the active queue namespace when re-enqueuing workflow runs during world startup recovery. -
#2882
0b956f6Thanks @VaguelySerious! - Update doc comments to referencesetAttributes(renamed fromexperimental_setAttributes).
5.0.0-beta.18
Minor Changes
-
#2850
f28150cThanks @karthikscale3! - Report step progress alongside step-to-step overhead latency telemetry. -
#2790
145835bThanks @NathanColosimo! - Centralize workflow event type classifiers and event-data payload field helpers.
Patch Changes
- #2848
6603628Thanks @VaguelySerious! - Fix duplicate inline step execution when a hook or wait wakes a run while the step is still running (#2780). The lazystep_startednow records the owning queue message ID, and wake replays schedule a delayed backstop for in-flight inline steps instead of immediately re-dispatching them. Disable withWORKFLOW_INLINE_OWNERSHIP=0.
5.0.0-beta.17
Minor Changes
- #2833
3f69666Thanks @VaguelySerious! - Report time-to-first-step and step-to-step overhead latency telemetry on step completion events.
Patch Changes
- #2840
712ed61Thanks @VaguelySerious! - Add an optional reason to run cancellation (run.cancel({ cancelReason })), recorded on the cancellation event and shown in the run detail view.
5.0.0-beta.16
Patch Changes
- #2812
fe327e6Thanks @karthikscale3! - SupportstartTime/endTimeonworld.analytics.runs.listto bound the listing window.
5.0.0-beta.15
Minor Changes
-
#2234
f76377bThanks @karthikscale3! - Add an optional metadata-onlyworld.analyticsnamespace for observability reads (runs, steps, events, hooks, waits). Implemented by@workflow/world-vercel; payload-bearing fields remain on the canonical runtime storage APIs. -
#2718
cc7f076Thanks @VaguelySerious! - Make runtime tuning constants (timeouts, retry counts, stream buffering/reconnect) configurable viaWORKFLOW_*environment variables, and forwardWORKFLOW_TEST_LIMIT_OVERRIDESto the backend as a request header so a deployment can tighten server-side limits for testing.
Patch Changes
- #2747
2ab7057Thanks @NathanColosimo! - Keep local hooks reachable after a crash or restart by rebuilding lost hook cache files from committed hook creation events, preventing active hook tokens from being reused.
5.0.0-beta.14
Patch Changes
- #2622
48e6bbfThanks @karthikscale3! - Declare Zod as a runtime dependency so exported schemas are built with the package's own Zod version instead of the consuming application's peer.
5.0.0-beta.13
Patch Changes
-
#2580
25c3df7Thanks @karthikscale3! - Send optional client-side event occurrence timestamps through world event creation. -
#2569
d108ba3Thanks @VaguelySerious! - Turbo mode now tells world-vercel to skip the run_started event-log preload it never reads, reducing request time.
5.0.0-beta.12
Patch Changes
-
#2475
2074f91Thanks @pranaygp! - Skip the per-step incrementalevents.listround-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.sinceCursorcontract so a step-terminalevents.createcan return the event-log delta since that cursor (viaEventResult.events/cursor/hasMore).Return the inline delta from a step-terminal write when
sinceCursoris supplied, computed identically toevents.listso the consumed prefix cannot skew from the server log.Forward
sinceCursorover the v4 wire in@workflow/world-vercelso the server can return the delta on a step-terminal response; older servers ignore it and the runtime falls back toevents.list. -
#2478
e7ef9d8Thanks @pranaygp! - Lazy inline step start: the owned-inline runtime path now sends a singlestep_startedcarrying the step input, letting the world create the step on the fly and saving one round-trip per inline step.@workflow/world:step_startedevent data accepts an optionalinput, andEventResultgains astepCreatedownership signal.@workflow/world-local:step_startedwith input atomically creates the step plus a syntheticstep_createdevent; a lazystep_startedfor an already-existing step throwsEntityConflictErrorso 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 onstep_startedover the v4 wire and threads the server'sstepCreatedsignal intoEventResult. -
#2511
ab2e9b8Thanks @VaguelySerious! - EmitworkflowNameon per-step events (step_created,step_completed, and lazy-startstep_started) so Worlds can access it without additional queries
5.0.0-beta.11
Minor Changes
- #2394
5f0b845Thanks @pranaygp! - BumpSPEC_VERSION_CURRENTto 5 (SPEC_VERSION_SUPPORTS_COMPRESSION): runs at spec 5+ may contain gzip-compressed payloads, and older SDKs reject them viarequiresNewerWorld()instead of failing on individual payloads.
5.0.0-beta.10
Minor Changes
- #2385
628795aThanks @pranaygp! - Add anallowReservedAttributesoption tostart()so framework-level callers can seed reserved$-prefixed run attributes at creation, matching the existingexperimental_setAttributesoption. The flag is carried through the resilient-start queue input so lazy run creation validates identically.
5.0.0-beta.9
Minor Changes
- #2226
ae8d6feThanks @pranaygp! - Allow passing initial run attributes throughstart(), and speed up workflow-levelsetAttributecalls by using native events for recording attributes.
5.0.0-beta.8
Minor Changes
- #2305
4670c4bThanks @willsather! - Add an optionalnamespaceparameter that scopes queue topic prefixes to__{namespace}_wkf_workflow_*. This allows configuring multiple frameworks in the same deployment without queue topic collision.
5.0.0-beta.7
Patch Changes
- #2212
2a3b11bThanks @pranaygp! - Retry transient workflow replay divergence before classifying repeated divergence as a corrupted event log.
5.0.0-beta.6
Patch Changes
- #2191
8f68d35Thanks @pranaygp! - Fix forwarded writable stream encryption when child workflows execute on a newer deployment than their parent.
5.0.0-beta.5
Patch Changes
-
#2134
1e6b1fdThanks @VaguelySerious! - Addexperimental_setAttributes()workflow-level helper for attaching string key/value metadata to a workflow run, surfaced asrun.attributes -
#1979
62ec537Thanks @adamiBs! - Makerun.inputandstep.input.optional()on the World snapshot schemas so consumers no longer fail validation when the service externalizes payloads asRemoteRefblobs. -
#1799
503a929Thanks @TooTallNate! - Use inline sourcemaps for all workspace packages; published packages no longer ship external.js.mapfiles.
5.0.0-beta.4
Patch Changes
-
#2038
dc0be50Thanks @pranaygp! - Refresh workflow events after completing elapsed waits so concurrent hook events preserve deterministic replay order. -
#2046
ad71b58Thanks @pranaygp! - Report corrupted event logs with a distinctCorruptedEventLogErrortype andCORRUPTED_EVENT_LOGrun error code. -
#2030
b124365Thanks @pranaygp! - Validate step, wait, and hook lifecycle events against replay ownership metadata. -
#2013
2a446afThanks @TooTallNate! - Exclude inline step execution from the workflow replay timeout. Long-running steps no longer hitREPLAY_TIMEOUT(fixes #2009). Adds aWORKFLOW_REPLAY_TIMEOUT_MSenv var override and a new optionalWorld.processExitTriggersQueueRedeliverycapability used to gate the runtime'sprocess.exit(1)failure path.
5.0.0-beta.3
Patch Changes
5.0.0-beta.2
Major Changes
- #1851
5f22832Thanks @TooTallNate! - BREAKING CHANGE: Run and step errors are now serialized through the workflow serialization pipeline, preserving original class identity and cause chains onWorkflowRunFailedError.cause. Pre-upgrade failed runs in theworld-postgreslegacyerrortext column surface aserror: undefinedon read; the original payload is still readable directly from theerrorJsoncolumn for manual inspection.
Patch Changes
-
#1939
5374148Thanks @TooTallNate! - Fix compatibility with Zod 4.4.x inWorkflowRunSchemaby markingoutput,error, andcompletedAtas.optional()on non-final / cancelled / completed / failed run states. -
#1338
8ea1532Thanks @VaguelySerious! - Merge flow and step routes into a single combined handler that executes steps inline when possible, reducing function invocations and queue overhead.
5.0.0-beta.1
Major Changes
-
#1293
66d49c0Thanks @VaguelySerious! - BREAKING CHANGE: Restructure stream methods on World interface to useworld.streams.*namespace withrunIdas the first parameter.writeToStream(name, runId, chunk)→streams.write(runId, name, chunk),writeToStreamMulti→streams.writeMulti,closeStream→streams.close,readFromStream→streams.get(runId, name, startIndex?),listStreamsByRunId→streams.list(runId). -
#1293
66d49c0Thanks @VaguelySerious! - RequirerunIdargument forworld.steps.get.
Patch Changes
- #1658
a5c90ceThanks @VaguelySerious! - Fix community world E2E tests by addingspecVersionto the World interface sostart()uses the safe baseline (v2) for worlds that don't declare their supported version
5.0.0-beta.0
Major Changes
- #1642
c5cdfc0Thanks @VaguelySerious! - Initial v5 beta release
4.1.0-beta.17
Patch Changes
-
#1627
5f138f2Thanks @VaguelySerious! - Bump specVersion to 3 and gate CBOR queue transport on spec version. Old deployments (specVersion < 3) receive JSON queue messages; new deployments receive CBOR. Handler uses dual transport to deserialize both formats. Fixes replay/reenqueue from dashboard to older deployments. -
#1533
7e70d18Thanks @VaguelySerious! - AddstreamFlushIntervalMsoption toStreamerinterface, optional for worlds to allow overwriting the default of 10ms in low-latency environments. -
#1537
c8dce52Thanks @VaguelySerious! - Allow workflow invocation to create run if initial storage call instartdid not succeed. Send run input through queue to enable this. Allow creating run_created and run_started events together in World, and skip first event list call by returning events directly.
4.1.0-beta.16
Patch Changes
- #1605
b30b0dcThanks @VaguelySerious! - Use asymmetric ULID timestamp validation thresholds: 24h past, 5min future.
4.1.0-beta.15
Patch Changes
-
#1569
a98f8deThanks @VaguelySerious! - Combine initial run fetch, event fetch, and run_started event creation -
#1534
329cdb3Thanks @VaguelySerious! - Re-enqueue active runs on world restart so inflight runs resume instead of getting stuck
4.1.0-beta.14
Patch Changes
-
#1460
78f1b0eThanks @VaguelySerious! - Support negativestartIndexfor streaming (e.g.-3reads last 3 chunks) -
#1470
01bbe66Thanks @VaguelySerious! - AddgetStreamChunks()andgetStreamInfo()to the Streamer interface, andgetTailIndex()to the readable stream returned byrun.getReadable().WorkflowChatTransportnow reads thex-workflow-stream-tail-indexresponse header to resolve negativeinitialStartIndexvalues into absolute positions, fixing reconnection retries after a disconnect.
4.1.0-beta.13
Patch Changes
-
#1396
2f0772dThanks @karthikscale3! - Track Vercel request IDs (x-vercel-id) on all workflow events for correlating request logs with workflow executions -
#1364
94c14c7Thanks @karthikscale3! - Strip only ref/payload fields from eventData when resolveData is 'none', preserving all other metadata
4.1.0-beta.12
Patch Changes
- #1317
825417aThanks @TooTallNate! - Add optionalresolveLatestDeploymentId()method to theWorldinterface for resolving the most recent deployment ID for the current deployment's environment
4.1.0-beta.11
Patch Changes
- #1287
d8daa2aThanks @VaguelySerious! - Addworld.events.get(runId, eventId)to the Storage interface for fetching a single event by ID.
4.1.0-beta.10
Patch Changes
- #1273
11dcb64Thanks @VaguelySerious! - Locally validate run ID to be ULID when passed by user
4.1.0-beta.9
Patch Changes
- #1270
adfe8b6Thanks @pranaygp! - Prevent hooks from being resumed via the public webhook endpoint by default. AddisWebhookoption tocreateHook()to opt-in to public resumption.createWebhook()always setsisWebhook: true.
4.1.0-beta.8
Patch Changes
4.1.0-beta.7
Patch Changes
4.1.0-beta.6
Patch Changes
- #956
b65bb07Thanks @TooTallNate! - OverloadgetEncryptionKeyForRuninterface: acceptWorkflowRun(preferred) orrunIdstring with optional opaque world-specific context forstart()
4.1.0-beta.5
Patch Changes
-
#979
6e72b29Thanks @TooTallNate! - AddWorld.getEncryptionKeyForRun()and thread encryption key through serialization layer -
#1057
5e06a7cThanks @pranaygp! - Materialize waits as entities to prevent duplicate wait_completed events@workflow/core: Handle 409 conflict gracefully when creating wait_completed events, preventing crashes when multiple concurrent invocations race to complete the same wait@workflow/world: AddWaittype,WaitSchema, andWaitStatusSchemaexports; add optionalwaitfield toEventResult@workflow/world-local: Materialize wait entities on wait_created/wait_completed with duplicate detection; clean up waits on terminal run states@workflow/world-postgres: Addworkflow_waitstable withwait_statusenum; materialize wait entities with conditional writes for duplicate prevention; clean up waits on terminal run states
-
#1081
5487983Thanks @TooTallNate! - Add optionalclose()method to theWorldinterface for releasing resources held by a World implementation
4.1.0-beta.4
Patch Changes
- #966
56f2221Thanks @VaguelySerious! - Add 429 throttle retry handling and 500 server error retry with exponential backoff to the workflow and step runtimes
4.1.0-beta.3
Patch Changes
-
#954
d9e9859Thanks @TooTallNate! - Generate runId client-side in start() and simplify runId typesThe
runIdis now generated client-side using ULID before serialization, rather than waiting for the server response. This simplifies theStreamerinterface andWorkflowServerWritableStreamto acceptstringinstead ofstring | Promise<string>forrunId.
4.1.0-beta.2
Patch Changes
-
#922
0ce46b9Thanks @pranaygp! - Add support for custom headers in queue messages -
#867
c54ba21Thanks @TooTallNate! - Add optionalwriteToStreamMultifunction to the World interface
4.1.0-beta.1
Minor Changes
-
#621
4966b72Thanks @pranaygp! - Add backwards compatibility for runs created with different spec versions- Add
RunNotSupportedErrorfor runs requiring newer world versions - Add semver-based version comparison utilities
- Legacy runs (< 4.1): route to legacy handlers
run_cancelled: skip event storage, directly update runwait_completed: store event only (no entity mutation)- Unknown legacy events: throw error
- Add
-
#621
4966b72Thanks @pranaygp! - BREAKING: Storage interface is now read-only; all mutations go throughevents.create()- Remove
cancel,pause,resumefromruns - Remove
create,updatefromruns,steps,hooks - Add run lifecycle events:
run_created,run_started,run_completed,run_failed,run_cancelled - Add
step_createdevent type - Remove
fatalfield fromstep_failed(terminal failure is now implicit) - Add
step_retryingevent with error info for retriable failures
- Remove
Patch Changes
-
#621
4966b72Thanks @pranaygp! - Addhook_conflictevent type for duplicate token detection- World returns
hook_conflictevent whenhook_createduses an existing token - Add
HOOK_CONFLICTerror slug
- World returns
-
#853
1060f9dThanks @TooTallNate! - BREAKING CHANGE: Change user input/output to be binary data (Uint8Array) at the World interfaceThis is part of specVersion 2 changes where serialization of workflow and step data uses binary format instead of JSON arrays. This allows the workflow client to be fully responsible for the data serialization format and enables future enhancements such as encryption and compression without the World implementation needing to care about the underlying data representation.
-
#621
4966b72Thanks @pranaygp! - Remove deprecatedworkflow_completed,workflow_failed, andworkflow_startedevents in favor ofrun_completed,run_failed, andrun_startedevents. -
#621
4966b72Thanks @pranaygp! - AddspecVersionproperty to World interface- All worlds expose
@workflow/worldpackage version for protocol compatibility - Stored in
run_createdevent andWorkflowRunschema - Displayed in observability UI
- All worlds expose
4.0.1-beta.13
Patch Changes
-
#743
61fdb41Thanks @TooTallNate! - AddHealthCheckPayloadSchema -
#772
0aa835fThanks @TooTallNate! - Add typedoc comments toHookinterface
4.0.1-beta.12
Patch Changes
- #751
dd3db13Thanks @VaguelySerious! - Remove the unused paused/resumed run events and states- Remove
run_pausedandrun_resumedevent types - Remove
pausedstatus fromWorkflowRunStatus - Remove
PauseWorkflowRunParamsandResumeWorkflowRunParamstypes - Remove
pauseWorkflowRunandresumeWorkflowRunfunctions from world-vercel
- Remove
4.0.1-beta.11
Patch Changes
- #455
e3f0390Thanks @karthikscale3! - Added Control Flow Graph extraction from Workflows and extended manifest.json's schema to incorporate the graph structure into it. Refactored manifest generation to pass manifest as a parameter instead of using instance state. Add e2e tests for manifest validation across all builders.
4.0.1-beta.10
Patch Changes
- #574
c82b467Thanks @VaguelySerious! - Add listByRunId endpoint to Streamer interface
4.0.1-beta.9
Patch Changes
57a2c32: Add expiredAt attribute to Run
4.0.1-beta.8
Patch Changes
4.0.1-beta.7
Patch Changes
fb9fd0f: Add support for closure scope vars in step functions
4.0.1-beta.6
Patch Changes
4b70739: Require specifying runId when writing to stream
4.0.1-beta.5
Patch Changes
00b0bb9: Add error stack propogation to steps and runs
4.0.1-beta.4
Patch Changes
f973954: Update license to Apache 2.0
4.0.1-beta.3
Patch Changes
20d51f0: Add optionalretryAfterproperty toStepinterface70be894: Implementsleep()natively into the workflow runtime
4.0.1-beta.2
Patch Changes
d3a4ed3: Remove@types/json-schemadependency (not used)d3a4ed3: Remove@types/nodefrom being a peerDependency7868434: RemoveAuthProviderinterface fromWorldand associated implementations
4.0.1-beta.1
Patch Changes
- 8422a32: Update Workflow naming convention
- e46294f: Add "license" and "repository" fields to
package.jsonfile
4.0.1-beta.0
Patch Changes
- fcf63d0: Initial publish