@workflow/world-testing 5.0.1 → 5.0.3

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.
@@ -312,6 +312,13 @@ var require_ms = __commonJS({
312
312
 
313
313
  // ../utils/dist/time.js
314
314
  function parseDurationToDate(param) {
315
+ const date5 = durationToDate(param);
316
+ if (Number.isNaN(date5.getTime())) {
317
+ throw new Error(typeof param === "object" ? "Invalid date: the Date object does not hold a valid time." : `Invalid duration: ${JSON.stringify(param)} ends past the latest time a Date can represent.`);
318
+ }
319
+ return date5;
320
+ }
321
+ function durationToDate(param) {
315
322
  if (typeof param === "string") {
316
323
  const durationMs = (0, import_ms.default)(param);
317
324
  if (typeof durationMs !== "number" || durationMs < 0) {
@@ -335,6 +342,7 @@ var init_time = __esm({
335
342
  "use strict";
336
343
  import_ms = __toESM(require_ms(), 1);
337
344
  __name(parseDurationToDate, "parseDurationToDate");
345
+ __name(durationToDate, "durationToDate");
338
346
  }
339
347
  });
340
348
 
@@ -2508,7 +2516,7 @@ var init_node = __esm({
2508
2516
  });
2509
2517
 
2510
2518
  // ../core/dist/symbols.js
2511
- var STABLE_ULID, STREAM_NAME_SYMBOL, STREAM_TYPE_SYMBOL, STREAM_FRAMING_SYMBOL, STREAM_SERVER_RUN_ID_SYMBOL, STREAM_SERVER_DEPLOYMENT_ID_SYMBOL, STREAM_SERVER_PUBLIC_KEY_SYMBOL, STREAM_DRAIN_SYMBOL, BODY_INIT_SYMBOL, WEBHOOK_RESPONSE_WRITABLE, WORKFLOW_CLASS_REGISTRY, ABORT_STREAM_NAME, ABORT_HOOK_TOKEN, ABORT_LISTENER_ATTACHED, ABORT_READER_CANCEL;
2519
+ var STABLE_ULID, STREAM_NAME_SYMBOL, STREAM_TYPE_SYMBOL, STREAM_FRAMING_SYMBOL, STREAM_SERVER_RUN_ID_SYMBOL, STREAM_SERVER_DEPLOYMENT_ID_SYMBOL, STREAM_SERVER_PUBLIC_KEY_SYMBOL, STREAM_DRAIN_SYMBOL, STREAM_RELEASE_SYMBOL, BODY_INIT_SYMBOL, WEBHOOK_RESPONSE_WRITABLE, WORKFLOW_CLASS_REGISTRY, ABORT_STREAM_NAME, ABORT_HOOK_TOKEN, ABORT_LISTENER_ATTACHED, ABORT_READER_CANCEL;
2512
2520
  var init_symbols = __esm({
2513
2521
  "../core/dist/symbols.js"() {
2514
2522
  "use strict";
@@ -2520,6 +2528,7 @@ var init_symbols = __esm({
2520
2528
  STREAM_SERVER_DEPLOYMENT_ID_SYMBOL = /* @__PURE__ */ Symbol.for("WORKFLOW_STREAM_SERVER_DEPLOYMENT_ID");
2521
2529
  STREAM_SERVER_PUBLIC_KEY_SYMBOL = /* @__PURE__ */ Symbol.for("WORKFLOW_STREAM_SERVER_PUBLIC_KEY");
2522
2530
  STREAM_DRAIN_SYMBOL = /* @__PURE__ */ Symbol.for("WORKFLOW_STREAM_DRAIN");
2531
+ STREAM_RELEASE_SYMBOL = /* @__PURE__ */ Symbol.for("WORKFLOW_STREAM_RELEASE");
2523
2532
  BODY_INIT_SYMBOL = /* @__PURE__ */ Symbol.for("BODY_INIT");
2524
2533
  WEBHOOK_RESPONSE_WRITABLE = /* @__PURE__ */ Symbol.for("WEBHOOK_RESPONSE_WRITABLE");
2525
2534
  WORKFLOW_CLASS_REGISTRY = /* @__PURE__ */ Symbol.for("workflow-class-registry");
@@ -2576,12 +2585,11 @@ function isReadableUnlockedNotClosed(readable) {
2576
2585
  return true;
2577
2586
  }
2578
2587
  function resolveAfterDrain(state) {
2579
- const barrier = state.drainBarrier;
2580
- if (!barrier) {
2581
- state.resolve();
2582
- return;
2583
- }
2584
- barrier().then(() => state.resolve(), (err) => state.reject(err));
2588
+ const release = /* @__PURE__ */ __name(async () => {
2589
+ await state.drainBarrier?.();
2590
+ await state.releaseTransport?.();
2591
+ }, "release");
2592
+ release().then(() => state.resolve(), (err) => state.reject(err));
2585
2593
  }
2586
2594
  function markFlushableFrameProduced(state) {
2587
2595
  state.producedFrames++;
@@ -2674,6 +2682,7 @@ function trackFlushableWritable(writable, state, WritableStreamConstructor = Wri
2674
2682
  }
2675
2683
  }
2676
2684
  await drainFlushableSnapshot(state);
2685
+ await state.releaseTransport?.();
2677
2686
  if (!state.doneResolved) {
2678
2687
  state.doneResolved = true;
2679
2688
  state.resolve();
@@ -2745,6 +2754,10 @@ function flushablePipe(source, sink, state) {
2745
2754
  if (typeof drain === "function") {
2746
2755
  state.drainBarrier = drain;
2747
2756
  }
2757
+ const release = sink[STREAM_RELEASE_SYMBOL];
2758
+ if (typeof release === "function") {
2759
+ state.releaseTransport = release;
2760
+ }
2748
2761
  return flushablePipePerChunk(source, sink, state);
2749
2762
  }
2750
2763
  async function flushablePipePerChunk(source, sink, state) {
@@ -2796,6 +2809,8 @@ async function flushablePipePerChunk(source, sink, state) {
2796
2809
  await state.drainBarrier().catch(() => {
2797
2810
  });
2798
2811
  }
2812
+ await writer.abort(err).catch(() => {
2813
+ });
2799
2814
  if (!state.doneResolved) {
2800
2815
  state.doneResolved = true;
2801
2816
  state.reject(err);
@@ -2876,6 +2891,16 @@ var init_global = __esm({
2876
2891
  attributeCount;
2877
2892
  hookDisposedCount;
2878
2893
  abortCount;
2894
+ /**
2895
+ * Correlation ids of the open hooks that workflow code was waiting on a
2896
+ * payload for when the VM went idle, i.e. the hooks whose `hook_received`
2897
+ * could change what this suspension leads to. A hook absent from the set has
2898
+ * no waiting consumer, so a payload landing for it is buffered and inert
2899
+ * until the first `await`. `undefined` when the suspension was built without
2900
+ * the workflow context that tracks awaiters, which callers must read as
2901
+ * "every open hook is observed". See `runtime/out-of-band-observation.ts`.
2902
+ */
2903
+ observedHookIds;
2879
2904
  constructor(itemsInput, global2) {
2880
2905
  const items = [
2881
2906
  ...itemsInput.values()
@@ -24766,13 +24791,13 @@ var init_events = __esm({
24766
24791
  // meaning; replay skips it (see EventsConsumer). Never user-creatable.
24767
24792
  "noop"
24768
24793
  ]));
24769
- RunEventTypeSchema = external_exports.compile(EventTypeSchema.extract([
24794
+ RunEventTypeSchema = EventTypeSchema.extract([
24770
24795
  "run_created",
24771
24796
  "run_started",
24772
24797
  "run_completed",
24773
24798
  "run_failed",
24774
24799
  "run_cancelled"
24775
- ]));
24800
+ ]);
24776
24801
  RUN_EVENT_TYPES = RunEventTypeSchema.options;
24777
24802
  TerminalRunEventTypeSchema = external_exports.compile(EventTypeSchema.extract([
24778
24803
  "run_completed",
@@ -24780,40 +24805,40 @@ var init_events = __esm({
24780
24805
  "run_cancelled"
24781
24806
  ]));
24782
24807
  TERMINAL_RUN_EVENT_TYPES = TerminalRunEventTypeSchema.options;
24783
- StepEventTypeSchema = external_exports.compile(EventTypeSchema.extract([
24808
+ StepEventTypeSchema = EventTypeSchema.extract([
24784
24809
  "step_created",
24785
24810
  "step_completed",
24786
24811
  "step_failed",
24787
24812
  "step_retrying",
24788
24813
  "step_started"
24789
- ]));
24814
+ ]);
24790
24815
  STEP_EVENT_TYPES = StepEventTypeSchema.options;
24791
- TerminalStepEventTypeSchema = external_exports.compile(EventTypeSchema.extract([
24816
+ TerminalStepEventTypeSchema = EventTypeSchema.extract([
24792
24817
  "step_completed",
24793
24818
  "step_failed"
24794
- ]));
24819
+ ]);
24795
24820
  TERMINAL_STEP_EVENT_TYPES = TerminalStepEventTypeSchema.options;
24796
- HookLifecycleEventTypeSchema = external_exports.compile(EventTypeSchema.extract([
24821
+ HookLifecycleEventTypeSchema = EventTypeSchema.extract([
24797
24822
  "hook_created",
24798
24823
  "hook_received",
24799
24824
  "hook_disposed"
24800
- ]));
24825
+ ]);
24801
24826
  HOOK_LIFECYCLE_EVENT_TYPES = HookLifecycleEventTypeSchema.options;
24802
- HookEventRequiringExistenceTypeSchema = external_exports.compile(EventTypeSchema.extract([
24827
+ HookEventRequiringExistenceTypeSchema = EventTypeSchema.extract([
24803
24828
  "hook_disposed",
24804
24829
  "hook_received"
24805
- ]));
24830
+ ]);
24806
24831
  HOOK_EVENTS_REQUIRING_EXISTENCE = HookEventRequiringExistenceTypeSchema.options;
24807
- WaitEventTypeSchema = external_exports.compile(EventTypeSchema.extract([
24832
+ WaitEventTypeSchema = EventTypeSchema.extract([
24808
24833
  "wait_created",
24809
24834
  "wait_completed"
24810
- ]));
24835
+ ]);
24811
24836
  WAIT_EVENT_TYPES = WaitEventTypeSchema.options;
24812
- ChildEntityCreationEventTypeSchema = external_exports.compile(EventTypeSchema.extract([
24837
+ ChildEntityCreationEventTypeSchema = EventTypeSchema.extract([
24813
24838
  "step_created",
24814
24839
  "hook_created",
24815
24840
  "wait_created"
24816
- ]));
24841
+ ]);
24817
24842
  CHILD_ENTITY_CREATION_EVENT_TYPES = ChildEntityCreationEventTypeSchema.options;
24818
24843
  BaseEventSchema = external_exports.compile(external_exports.object({
24819
24844
  eventType: EventTypeSchema,
@@ -24851,7 +24876,7 @@ var init_events = __esm({
24851
24876
  // 'optimisticStart'), so latency metrics can be segmented by them.
24852
24877
  optimizations: external_exports.array(external_exports.string()).optional()
24853
24878
  };
24854
- StepCompletedEventSchema = external_exports.compile(BaseEventSchema.extend({
24879
+ StepCompletedEventSchema = BaseEventSchema.extend({
24855
24880
  eventType: external_exports.literal("step_completed"),
24856
24881
  correlationId: external_exports.string(),
24857
24882
  eventData: external_exports.object({
@@ -24863,8 +24888,8 @@ var init_events = __esm({
24863
24888
  result: SerializedDataSchema,
24864
24889
  ...stepLatencyTelemetryFields
24865
24890
  })
24866
- }));
24867
- StepFailedEventSchema = external_exports.compile(BaseEventSchema.extend({
24891
+ });
24892
+ StepFailedEventSchema = BaseEventSchema.extend({
24868
24893
  eventType: external_exports.literal("step_failed"),
24869
24894
  correlationId: external_exports.string(),
24870
24895
  eventData: external_exports.object({
@@ -24874,8 +24899,8 @@ var init_events = __esm({
24874
24899
  error: SerializedDataSchema,
24875
24900
  ...stepLatencyTelemetryFields
24876
24901
  })
24877
- }));
24878
- StepRetryingEventSchema = external_exports.compile(BaseEventSchema.extend({
24902
+ });
24903
+ StepRetryingEventSchema = BaseEventSchema.extend({
24879
24904
  eventType: external_exports.literal("step_retrying"),
24880
24905
  correlationId: external_exports.string(),
24881
24906
  eventData: external_exports.object({
@@ -24885,8 +24910,8 @@ var init_events = __esm({
24885
24910
  error: SerializedDataSchema,
24886
24911
  retryAfter: external_exports.coerce.date().optional()
24887
24912
  })
24888
- }));
24889
- StepStartedEventSchema = external_exports.compile(BaseEventSchema.extend({
24913
+ });
24914
+ StepStartedEventSchema = BaseEventSchema.extend({
24890
24915
  eventType: external_exports.literal("step_started"),
24891
24916
  correlationId: external_exports.string(),
24892
24917
  eventData: external_exports.object({
@@ -24912,8 +24937,8 @@ var init_events = __esm({
24912
24937
  // one message (see the Queue.createQueueHandler meta contract).
24913
24938
  ownerMessageId: external_exports.string().optional()
24914
24939
  }).optional()
24915
- }));
24916
- StepCreatedEventSchema = external_exports.compile(BaseEventSchema.extend({
24940
+ });
24941
+ StepCreatedEventSchema = BaseEventSchema.extend({
24917
24942
  eventType: external_exports.literal("step_created"),
24918
24943
  correlationId: external_exports.string(),
24919
24944
  eventData: external_exports.object({
@@ -24921,7 +24946,7 @@ var init_events = __esm({
24921
24946
  workflowName: external_exports.string().optional(),
24922
24947
  input: SerializedDataSchema
24923
24948
  })
24924
- }));
24949
+ });
24925
24950
  HookCreatedEventSchema = external_exports.compile(BaseEventSchema.extend({
24926
24951
  eventType: external_exports.literal("hook_created"),
24927
24952
  correlationId: external_exports.string(),
@@ -24956,15 +24981,15 @@ var init_events = __esm({
24956
24981
  }).optional()
24957
24982
  })
24958
24983
  }));
24959
- HookReceivedEventSchema = external_exports.compile(BaseEventSchema.extend({
24984
+ HookReceivedEventSchema = BaseEventSchema.extend({
24960
24985
  eventType: external_exports.literal("hook_received"),
24961
24986
  correlationId: external_exports.string(),
24962
24987
  eventData: external_exports.object({
24963
24988
  token: external_exports.string().optional(),
24964
24989
  payload: SerializedDataSchema
24965
24990
  })
24966
- }));
24967
- HookDisposedEventSchema = external_exports.compile(BaseEventSchema.extend({
24991
+ });
24992
+ HookDisposedEventSchema = BaseEventSchema.extend({
24968
24993
  eventType: external_exports.literal("hook_disposed"),
24969
24994
  correlationId: external_exports.string(),
24970
24995
  eventData: external_exports.object({
@@ -24980,8 +25005,8 @@ var init_events = __esm({
24980
25005
  hookId: external_exports.string()
24981
25006
  }).optional()
24982
25007
  }).optional()
24983
- }));
24984
- HookConflictEventSchema = external_exports.compile(BaseEventSchema.extend({
25008
+ });
25009
+ HookConflictEventSchema = BaseEventSchema.extend({
24985
25010
  eventType: external_exports.literal("hook_conflict"),
24986
25011
  correlationId: external_exports.string(),
24987
25012
  eventData: external_exports.object({
@@ -25001,28 +25026,28 @@ var init_events = __esm({
25001
25026
  */
25002
25027
  forceRefusedReason: external_exports.literal("victim-spec-version").optional()
25003
25028
  })
25004
- }));
25005
- NoopEventSchema = external_exports.compile(BaseEventSchema.extend({
25029
+ });
25030
+ NoopEventSchema = BaseEventSchema.extend({
25006
25031
  eventType: external_exports.literal("noop"),
25007
25032
  eventData: external_exports.object({
25008
25033
  sealed: external_exports.boolean().optional()
25009
25034
  }).passthrough().optional()
25010
- }));
25011
- WaitCreatedEventSchema = external_exports.compile(BaseEventSchema.extend({
25035
+ });
25036
+ WaitCreatedEventSchema = BaseEventSchema.extend({
25012
25037
  eventType: external_exports.literal("wait_created"),
25013
25038
  correlationId: external_exports.string(),
25014
25039
  eventData: external_exports.object({
25015
25040
  resumeAt: external_exports.coerce.date()
25016
25041
  })
25017
- }));
25018
- WaitCompletedEventSchema = external_exports.compile(BaseEventSchema.extend({
25042
+ });
25043
+ WaitCompletedEventSchema = BaseEventSchema.extend({
25019
25044
  eventType: external_exports.literal("wait_completed"),
25020
25045
  correlationId: external_exports.string(),
25021
25046
  eventData: external_exports.object({
25022
25047
  resumeAt: external_exports.coerce.date().optional()
25023
25048
  }).optional()
25024
- }));
25025
- AttributeWriterSchema = external_exports.compile(external_exports.discriminatedUnion("type", [
25049
+ });
25050
+ AttributeWriterSchema = external_exports.discriminatedUnion("type", [
25026
25051
  external_exports.object({
25027
25052
  type: external_exports.literal("workflow")
25028
25053
  }),
@@ -25031,8 +25056,8 @@ var init_events = __esm({
25031
25056
  stepId: external_exports.string(),
25032
25057
  attempt: external_exports.number()
25033
25058
  })
25034
- ]));
25035
- AttrSetEventSchema = external_exports.compile(BaseEventSchema.extend({
25059
+ ]);
25060
+ AttrSetEventSchema = BaseEventSchema.extend({
25036
25061
  eventType: external_exports.literal("attr_set"),
25037
25062
  correlationId: external_exports.string().optional(),
25038
25063
  eventData: external_exports.object({
@@ -25040,8 +25065,8 @@ var init_events = __esm({
25040
25065
  writer: AttributeWriterSchema,
25041
25066
  allowReservedAttributes: external_exports.literal(true).optional()
25042
25067
  })
25043
- }));
25044
- RunCreatedEventSchema = external_exports.compile(BaseEventSchema.extend({
25068
+ });
25069
+ RunCreatedEventSchema = BaseEventSchema.extend({
25045
25070
  eventType: external_exports.literal("run_created"),
25046
25071
  eventData: external_exports.object({
25047
25072
  deploymentId: external_exports.string(),
@@ -25074,8 +25099,8 @@ var init_events = __esm({
25074
25099
  ],
25075
25100
  message: "dynamicWorkflowCode and dynamicWorkflowCodeRef are mutually exclusive"
25076
25101
  })
25077
- }));
25078
- RunStartedEventSchema = external_exports.compile(BaseEventSchema.extend({
25102
+ });
25103
+ RunStartedEventSchema = BaseEventSchema.extend({
25079
25104
  eventType: external_exports.literal("run_started"),
25080
25105
  eventData: external_exports.object({
25081
25106
  input: SerializedDataSchema.optional(),
@@ -25100,14 +25125,14 @@ var init_events = __esm({
25100
25125
  ],
25101
25126
  message: "dynamicWorkflowCode and dynamicWorkflowCodeRef are mutually exclusive"
25102
25127
  }).optional()
25103
- }));
25104
- RunCompletedEventSchema = external_exports.compile(BaseEventSchema.extend({
25128
+ });
25129
+ RunCompletedEventSchema = BaseEventSchema.extend({
25105
25130
  eventType: external_exports.literal("run_completed"),
25106
25131
  eventData: external_exports.object({
25107
25132
  output: SerializedDataSchema.optional()
25108
25133
  })
25109
- }));
25110
- RunFailedEventSchema = external_exports.compile(BaseEventSchema.extend({
25134
+ });
25135
+ RunFailedEventSchema = BaseEventSchema.extend({
25111
25136
  eventType: external_exports.literal("run_failed"),
25112
25137
  eventData: external_exports.object({
25113
25138
  // The thrown value, serialized via the workflow serialization pipeline.
@@ -25119,8 +25144,8 @@ var init_events = __esm({
25119
25144
  // the full error payload.
25120
25145
  errorCode: external_exports.string().optional()
25121
25146
  })
25122
- }));
25123
- RunCancelledEventSchema = external_exports.compile(BaseEventSchema.extend({
25147
+ });
25148
+ RunCancelledEventSchema = BaseEventSchema.extend({
25124
25149
  eventType: external_exports.literal("run_cancelled"),
25125
25150
  eventData: external_exports.object({
25126
25151
  // Optional free-text reason for the cancellation. Kept as small
@@ -25128,7 +25153,7 @@ var init_events = __esm({
25128
25153
  // resolveData: 'none' and can be displayed without decryption.
25129
25154
  cancelReason: external_exports.string().max(512).optional()
25130
25155
  }).optional()
25131
- }));
25156
+ });
25132
25157
  CreateEventSchema = external_exports.compile(external_exports.discriminatedUnion("eventType", [
25133
25158
  // Run lifecycle events
25134
25159
  RunCreatedEventSchema,
@@ -25151,7 +25176,7 @@ var init_events = __esm({
25151
25176
  WaitCreatedEventSchema,
25152
25177
  WaitCompletedEventSchema
25153
25178
  ]));
25154
- AllEventsSchema = external_exports.compile(external_exports.discriminatedUnion("eventType", [
25179
+ AllEventsSchema = external_exports.discriminatedUnion("eventType", [
25155
25180
  // Run lifecycle events
25156
25181
  RunCreatedEventSchema,
25157
25182
  RunStartedEventSchema,
@@ -25174,7 +25199,7 @@ var init_events = __esm({
25174
25199
  WaitCreatedEventSchema,
25175
25200
  WaitCompletedEventSchema,
25176
25201
  NoopEventSchema
25177
- ]));
25202
+ ]);
25178
25203
  EventSchema = external_exports.compile(AllEventsSchema.and(external_exports.object({
25179
25204
  runId: external_exports.string(),
25180
25205
  eventId: external_exports.string(),
@@ -25914,6 +25939,11 @@ var init_hooks = __esm({
25914
25939
  // Named `runSpecVersion` to distinguish it from the hook's own `specVersion`.
25915
25940
  runSpecVersion: external_exports.number().optional(),
25916
25941
  workflowCoreVersion: external_exports.string().optional(),
25942
+ // Node.js version of the run's creating deployment, mirrored from
25943
+ // `executionContext.nodeVersion`. Decides whether a resume may write zstd
25944
+ // (which needs Node.js >= 22.15) or must use gzip. Absent on runs created
25945
+ // before the field existed and on non-Node runtimes, where writers use gzip.
25946
+ nodeVersion: external_exports.string().optional(),
25917
25947
  traceCarrier: TraceCarrierSchema.optional(),
25918
25948
  // The run's published X25519 public key (base64), mirrored from the run
25919
25949
  // entity. Lets a resume seal (`encp`) its payload to the run without reading
@@ -26425,7 +26455,7 @@ function readToStringTag(value) {
26425
26455
  const tag = readProperty(value, Symbol.toStringTag);
26426
26456
  return typeof tag === "string" ? tag : void 0;
26427
26457
  }
26428
- var GUEST_CODE_EXECUTION_SAMPLE_LIMIT, activeStats, reportedProxies, useStepClosures, uncurryThis, dateGetDate, dateGetTime, dateToISOString, regExpSource, regExpFlags, arrayBufferByteLength, mapEntries, setValues, numberValueOf, stringValueOf, booleanValueOf, bigIntValueOf, TypedArrayPrototype, typedArrayTag, typedArrayBuffer, typedArrayByteOffset, typedArrayByteLength, typedArrayLength, dataViewBuffer, dataViewByteOffset, dataViewByteLength, sharedArrayBufferByteLength, headersIterator, urlHrefGetter, urlSearchParamsToStringMethod, isProxy, functionToString, KNOWN_VIEW_TAGS, BRAND_DECIDED_TAGS, hardenedStringifyOperations;
26458
+ var GUEST_CODE_EXECUTION_SAMPLE_LIMIT, activeStats, reportedProxies, useStepClosures, uncurryThis, dateGetDate, dateGetTime, dateToISOString, regExpSource, regExpFlags, arrayBufferByteLength, mapEntries, setValues, numberValueOf, stringValueOf, booleanValueOf, bigIntValueOf, TypedArrayPrototype, typedArrayTag, typedArrayBuffer, typedArrayByteOffset, typedArrayByteLength, typedArrayLength, typedArraySet, HostArrayBuffer, HostUint8Array, dataViewBuffer, dataViewByteOffset, dataViewByteLength, sharedArrayBufferByteLength, headersIterator, urlHrefGetter, urlSearchParamsToStringMethod, isProxy, functionToString, KNOWN_VIEW_TAGS, BRAND_DECIDED_TAGS, hardenedStringifyOperations;
26429
26459
  var init_hardened = __esm({
26430
26460
  "../core/dist/serialization/hardened.js"() {
26431
26461
  "use strict";
@@ -26461,6 +26491,9 @@ var init_hardened = __esm({
26461
26491
  typedArrayByteOffset = protoGetter(TypedArrayPrototype, "byteOffset");
26462
26492
  typedArrayByteLength = protoGetter(TypedArrayPrototype, "byteLength");
26463
26493
  typedArrayLength = protoGetter(TypedArrayPrototype, "length");
26494
+ typedArraySet = uncurryThis(TypedArrayPrototype.set);
26495
+ HostArrayBuffer = ArrayBuffer;
26496
+ HostUint8Array = Uint8Array;
26464
26497
  dataViewBuffer = protoGetter(DataView.prototype, "buffer");
26465
26498
  dataViewByteOffset = protoGetter(DataView.prototype, "byteOffset");
26466
26499
  dataViewByteLength = protoGetter(DataView.prototype, "byteLength");
@@ -26554,12 +26587,23 @@ var init_hardened = __esm({
26554
26587
  entriesOf: /* @__PURE__ */ __name((map2) => mapToEntries(map2), "entriesOf"),
26555
26588
  viewInfo: /* @__PURE__ */ __name((view) => {
26556
26589
  const info = viewInfo(view);
26590
+ const length = types.isDataView(view) ? 0 : typedArrayLength(view);
26591
+ const bufferByteLength = types.isSharedArrayBuffer(info.buffer) ? sharedArrayBufferByteLength(info.buffer) : arrayBufferByteLength(info.buffer);
26592
+ if (info.byteLength === bufferByteLength) {
26593
+ return {
26594
+ ...info,
26595
+ length,
26596
+ bufferByteLength
26597
+ };
26598
+ }
26599
+ const copy = new HostArrayBuffer(info.byteLength);
26600
+ typedArraySet(new HostUint8Array(copy), new HostUint8Array(info.buffer, info.byteOffset, info.byteLength));
26557
26601
  return {
26558
- ...info,
26559
- // devalue only reads `length` for typed-array subviews; DataView
26560
- // subviews are encoded from `byteLength`.
26561
- length: types.isDataView(view) ? 0 : typedArrayLength(view),
26562
- bufferByteLength: types.isSharedArrayBuffer(info.buffer) ? sharedArrayBufferByteLength(info.buffer) : arrayBufferByteLength(info.buffer)
26602
+ buffer: copy,
26603
+ byteOffset: 0,
26604
+ byteLength: info.byteLength,
26605
+ length,
26606
+ bufferByteLength: info.byteLength
26563
26607
  };
26564
26608
  }, "viewInfo"),
26565
26609
  shapeOf: /* @__PURE__ */ __name((value) => {
@@ -27380,20 +27424,22 @@ function recordStats(stats, codec2, uncompressedBytes, storedBytes) {
27380
27424
  stats.uncompressedBytes = uncompressedBytes;
27381
27425
  stats.storedBytes = storedBytes;
27382
27426
  }
27383
- function selectWriteCodec() {
27427
+ function selectWriteCodec(mode) {
27384
27428
  const override = codecOverrideFromEnv();
27385
- if (override === "gzip") return isGzipAvailable() ? "gzip" : "none";
27429
+ if (mode === "gzip" || override === "gzip") {
27430
+ return isGzipAvailable() ? "gzip" : "none";
27431
+ }
27386
27432
  if (isZstdAvailable()) return "zstd";
27387
27433
  if (isGzipAvailable()) return "gzip";
27388
27434
  return "none";
27389
27435
  }
27390
- async function compress(data2, enabled, stats, opts) {
27436
+ async function compress(data2, mode, stats, opts) {
27391
27437
  if (!(data2 instanceof Uint8Array)) return data2;
27392
- if (!enabled || data2.length < COMPRESSION_MIN_BYTES || isCompressionDisabledByEnv()) {
27438
+ if (!mode || data2.length < COMPRESSION_MIN_BYTES || isCompressionDisabledByEnv()) {
27393
27439
  recordStats(stats, "none", data2.length, data2.length);
27394
27440
  return data2;
27395
27441
  }
27396
- const codec2 = selectWriteCodec();
27442
+ const codec2 = selectWriteCodec(mode);
27397
27443
  if (codec2 === "none") {
27398
27444
  recordStats(stats, "none", data2.length, data2.length);
27399
27445
  return data2;
@@ -30249,7 +30295,7 @@ async function serialize(value, encryptionKey, options) {
30249
30295
  try {
30250
30296
  const payload = devalueCodec.serialize(value, "client", options);
30251
30297
  const prefixed = encodeWithFormatPrefix(SerializationFormat.DEVALUE_V1, payload);
30252
- const compressed = await compress(prefixed, options?.compression === true, options?.compressionStats);
30298
+ const compressed = await compress(prefixed, options?.compression ?? false, options?.compressionStats);
30253
30299
  return encrypt2(compressed, encryptionKey);
30254
30300
  } catch (error61) {
30255
30301
  rethrowIfRuntimeError(error61);
@@ -30294,7 +30340,7 @@ async function serialize2(value, encryptionKey, options) {
30294
30340
  try {
30295
30341
  const payload = devalueCodec.serialize(value, "step", options);
30296
30342
  const prefixed = encodeWithFormatPrefix(SerializationFormat.DEVALUE_V1, payload);
30297
- const compressed = await compress(prefixed, options?.compression === true, options?.compressionStats);
30343
+ const compressed = await compress(prefixed, options?.compression ?? false, options?.compressionStats);
30298
30344
  return encrypt2(compressed, encryptionKey);
30299
30345
  } catch (error61) {
30300
30346
  rethrowIfRuntimeError(error61);
@@ -32437,7 +32483,22 @@ var require_semver3 = __commonJS({
32437
32483
  });
32438
32484
 
32439
32485
  // ../core/dist/capabilities.js
32440
- function getRunCapabilities(workflowCoreVersion) {
32486
+ function nodeVersionSupportsZstd(nodeVersion) {
32487
+ if (typeof nodeVersion !== "string" || !import_semver.default.valid(nodeVersion)) {
32488
+ return false;
32489
+ }
32490
+ return import_semver.default.satisfies(nodeVersion, ZSTD_NODE_RANGE);
32491
+ }
32492
+ function getCurrentNodeVersion() {
32493
+ try {
32494
+ const versions = globalThis.process?.versions;
32495
+ if (!versions || versions.bun || versions.deno) return void 0;
32496
+ return typeof versions.node === "string" ? versions.node : void 0;
32497
+ } catch {
32498
+ return void 0;
32499
+ }
32500
+ }
32501
+ function getRunCapabilities(workflowCoreVersion, nodeVersion) {
32441
32502
  if (!workflowCoreVersion || !import_semver.default.valid(workflowCoreVersion)) {
32442
32503
  return {
32443
32504
  supportedFormats: BASELINE_FORMATS,
@@ -32450,6 +32511,9 @@ function getRunCapabilities(workflowCoreVersion) {
32450
32511
  formats.add(format);
32451
32512
  }
32452
32513
  }
32514
+ if (!nodeVersionSupportsZstd(nodeVersion)) {
32515
+ formats.delete(SerializationFormat.ZSTD);
32516
+ }
32453
32517
  const result = {
32454
32518
  supportedFormats: formats,
32455
32519
  framedByteStreams: false
@@ -32461,7 +32525,13 @@ function getRunCapabilities(workflowCoreVersion) {
32461
32525
  }
32462
32526
  return result;
32463
32527
  }
32464
- var import_semver, FORMAT_VERSION_TABLE, CAPABILITY_VERSION_TABLE, BASELINE_FORMATS;
32528
+ function getCompressionMode(capabilities) {
32529
+ if (!capabilities.supportedFormats.has(SerializationFormat.GZIP)) {
32530
+ return false;
32531
+ }
32532
+ return capabilities.supportedFormats.has(SerializationFormat.ZSTD) ? true : "gzip";
32533
+ }
32534
+ var import_semver, FORMAT_VERSION_TABLE, CAPABILITY_VERSION_TABLE, BASELINE_FORMATS, ZSTD_NODE_RANGE;
32465
32535
  var init_capabilities = __esm({
32466
32536
  "../core/dist/capabilities.js"() {
32467
32537
  "use strict";
@@ -32477,7 +32547,8 @@ var init_capabilities = __esm({
32477
32547
  // bump to the next beta. A too-low cutoff makes new producers write
32478
32548
  // compressed payloads to consumers that cannot decompress them; too-high
32479
32549
  // merely delays the optimization (safe). gzip and zstd ship together, so
32480
- // they share a min version: a run that can read one can read both.
32550
+ // they share a min version. zstd additionally requires the run's runtime to
32551
+ // decode it; see `getRunCapabilities`.
32481
32552
  {
32482
32553
  format: SerializationFormat.GZIP,
32483
32554
  minVersion: "5.0.0-beta.18"
@@ -32510,7 +32581,11 @@ var init_capabilities = __esm({
32510
32581
  BASELINE_FORMATS = /* @__PURE__ */ new Set([
32511
32582
  SerializationFormat.DEVALUE_V1
32512
32583
  ]);
32584
+ ZSTD_NODE_RANGE = "^22.15.0 || >=23.8.0";
32585
+ __name(nodeVersionSupportsZstd, "nodeVersionSupportsZstd");
32586
+ __name(getCurrentNodeVersion, "getCurrentNodeVersion");
32513
32587
  __name(getRunCapabilities, "getRunCapabilities");
32588
+ __name(getCompressionMode, "getCompressionMode");
32514
32589
  }
32515
32590
  });
32516
32591
 
@@ -32519,7 +32594,7 @@ var version2;
32519
32594
  var init_version = __esm({
32520
32595
  "../core/dist/version.js"() {
32521
32596
  "use strict";
32522
- version2 = "5.0.1";
32597
+ version2 = "5.2.0";
32523
32598
  }
32524
32599
  });
32525
32600
 
@@ -32631,6 +32706,9 @@ function parseHealthCheckResponse(chunks) {
32631
32706
  if (typeof r.workflowCoreVersion === "string") {
32632
32707
  parsed.workflowCoreVersion = r.workflowCoreVersion;
32633
32708
  }
32709
+ if (typeof r.nodeVersion === "string") {
32710
+ parsed.nodeVersion = r.nodeVersion;
32711
+ }
32634
32712
  if (typeof r.encryptionPublicKey === "string") {
32635
32713
  parsed.encryptionPublicKey = r.encryptionPublicKey;
32636
32714
  }
@@ -32705,6 +32783,7 @@ var init_helpers = __esm({
32705
32783
  init_dist2();
32706
32784
  init_dist4();
32707
32785
  init_node();
32786
+ init_capabilities();
32708
32787
  init_logger();
32709
32788
  init_sealed_box();
32710
32789
  init_encryption2();
@@ -37790,11 +37869,13 @@ function resumeContextFromRun(run2) {
37790
37869
  const coreVersion = run2.executionContext?.workflowCoreVersion;
37791
37870
  const traceCarrier = run2.executionContext?.traceCarrier;
37792
37871
  const hookResumeInputVersion = run2.executionContext?.hookResumeInputVersion;
37872
+ const nodeVersion = run2.executionContext?.nodeVersion;
37793
37873
  return {
37794
37874
  deploymentId: run2.deploymentId,
37795
37875
  workflowName: run2.workflowName,
37796
37876
  runSpecVersion: run2.specVersion,
37797
37877
  workflowCoreVersion: typeof coreVersion === "string" ? coreVersion : void 0,
37878
+ nodeVersion: typeof nodeVersion === "string" ? nodeVersion : void 0,
37798
37879
  traceCarrier: traceCarrier && typeof traceCarrier === "object" ? traceCarrier : void 0,
37799
37880
  encryptionPublicKey: run2.encryptionPublicKey,
37800
37881
  hookResumeInputVersion: typeof hookResumeInputVersion === "number" ? hookResumeInputVersion : void 0
@@ -37991,7 +38072,7 @@ async function resumeHookAttempt(world, span, tokenOrHook, payload, encryptionKe
37991
38072
  if (info.run && isTerminalWorkflowRunStatus(info.run.status)) {
37992
38073
  throw new HookNotFoundError(hook.token);
37993
38074
  }
37994
- const capabilities = getRunCapabilities(resumeContext.workflowCoreVersion);
38075
+ const capabilities = getRunCapabilities(resumeContext.workflowCoreVersion, resumeContext.nodeVersion);
37995
38076
  let payloadKey;
37996
38077
  const runPublicKey = encryptionKeyOverride ? (
37997
38078
  // hydrate hook metadata), so sealing would add an ECDH for no
@@ -38007,7 +38088,7 @@ async function resumeHookAttempt(world, span, tokenOrHook, payload, encryptionKe
38007
38088
  }
38008
38089
  payloadKey = encryptionKey;
38009
38090
  }
38010
- const compression = (resumeContext.runSpecVersion ?? 0) >= SPEC_VERSION_SUPPORTS_COMPRESSION && capabilities.supportedFormats.has(SerializationFormat.GZIP);
38091
+ const compression = (resumeContext.runSpecVersion ?? 0) >= SPEC_VERSION_SUPPORTS_COMPRESSION ? getCompressionMode(capabilities) : false;
38011
38092
  const ops = [];
38012
38093
  const readbackOps = [];
38013
38094
  const v1Compat = isLegacySpecVersion(hook.specVersion);
@@ -39370,7 +39451,7 @@ function getExternalRevivers(global2 = globalThis, ops, runId, cryptoKey, option
39370
39451
  AbortSignal: /* @__PURE__ */ __name((value) => options?.liveAbortSignals === false ? reviveAbortSnapshot(value).signal : reviveAbortSignal(value, ops, runId), "AbortSignal")
39371
39452
  };
39372
39453
  }
39373
- function getStepRevivers(global2 = globalThis, ops, runId, cryptoKey, deploymentId, streamStates) {
39454
+ function getStepRevivers(global2 = globalThis, ops, runId, cryptoKey, deploymentId, streamStates, runReadyBarrier) {
39374
39455
  return {
39375
39456
  ...getCommonRevivers2(global2),
39376
39457
  // StepFunction reviver for step context - returns raw step function
@@ -39489,7 +39570,7 @@ function getStepRevivers(global2 = globalThis, ops, runId, cryptoKey, deployment
39489
39570
  pollReadableLock(userReadable, state);
39490
39571
  return userReadable;
39491
39572
  } else {
39492
- const transform2 = getDeserializeStream(getStepRevivers(global2, ops, runId, cryptoKey, deploymentId), cryptoKey);
39573
+ const transform2 = getDeserializeStream(getStepRevivers(global2, ops, runId, cryptoKey, deploymentId, streamStates, runReadyBarrier), cryptoKey);
39493
39574
  const state = createFlushableState();
39494
39575
  ops.push(state.promise);
39495
39576
  flushablePipe(readable, transform2.writable, state).catch(() => {
@@ -39502,8 +39583,9 @@ function getStepRevivers(global2 = globalThis, ops, runId, cryptoKey, deployment
39502
39583
  const targetRunId = typeof value.runId === "string" ? value.runId : runId;
39503
39584
  const targetDeploymentId = typeof value.deploymentId === "string" ? value.deploymentId : targetRunId === runId ? deploymentId : void 0;
39504
39585
  const targetKey = targetRunId === runId ? cryptoKey : lazyForwardedWritableEncryptionKey(targetRunId, targetDeploymentId, value.encryptionPublicKey);
39505
- const serialize3 = getSerializeStream(getStepReducers(global2, ops, targetRunId, targetKey), targetKey);
39506
- const serverWritable = new WorkflowServerWritableStream(targetRunId, value.name);
39586
+ const targetRunReady = targetRunId === runId ? runReadyBarrier : void 0;
39587
+ const serialize3 = getSerializeStream(getStepReducers(global2, ops, targetRunId, targetKey, false, targetRunReady), targetKey);
39588
+ const serverWritable = new WorkflowServerWritableStream(targetRunId, value.name, targetRunReady);
39507
39589
  const state = createFlushableState();
39508
39590
  state.deferReleaseSettlement = streamStates !== void 0;
39509
39591
  streamStates?.push(state);
@@ -39613,12 +39695,12 @@ async function dehydrateStepArguments(value, _runId, key, global2 = globalThis,
39613
39695
  });
39614
39696
  }
39615
39697
  }
39616
- async function hydrateStepArguments(value, runId, key, ops = [], global2 = globalThis, extraRevivers = {}, deploymentId, streamStates) {
39698
+ async function hydrateStepArguments(value, runId, key, ops = [], global2 = globalThis, extraRevivers = {}, deploymentId, streamStates, runReadyBarrier) {
39617
39699
  const compressionStats = {};
39618
39700
  const result = await deserialize2(value, key, {
39619
39701
  global: global2,
39620
39702
  extraRevivers: {
39621
- ...getStreamAndRequestRevivers(getStepRevivers(global2, ops, runId, key, deploymentId, streamStates)),
39703
+ ...getStreamAndRequestRevivers(getStepRevivers(global2, ops, runId, key, deploymentId, streamStates, runReadyBarrier)),
39622
39704
  ...extraRevivers
39623
39705
  },
39624
39706
  compressionStats
@@ -40067,6 +40149,14 @@ var init_serialization2 = __esm({
40067
40149
  enumerable: false,
40068
40150
  writable: false
40069
40151
  });
40152
+ Object.defineProperty(this, STREAM_RELEASE_SYMBOL, {
40153
+ value: /* @__PURE__ */ __name(async () => {
40154
+ const session = await writeSessionPromise.catch(() => void 0);
40155
+ await session?.release?.();
40156
+ }, "value"),
40157
+ enumerable: false,
40158
+ writable: false
40159
+ });
40070
40160
  }
40071
40161
  };
40072
40162
  __name(getAllBaseReducers, "getAllBaseReducers");
@@ -47414,20 +47504,23 @@ async function start(workflow, argsOrOptions, options) {
47414
47504
  throw dynamicStartRefusal("Dynamic workflows require a World that declares `capabilities.dynamicWorkflowCode`. This World does not, so no run was created.");
47415
47505
  }
47416
47506
  let framedByteStreams;
47417
- let targetSupportsCompression;
47507
+ let targetCompression;
47508
+ let targetNodeVersion;
47418
47509
  let targetHookResumeInputVersion;
47419
47510
  let probedRunPublicKey;
47420
47511
  let targetSpecVersion;
47421
47512
  let specVersionSource;
47422
47513
  if (!crossDeployment) {
47423
47514
  framedByteStreams = true;
47424
- targetSupportsCompression = true;
47515
+ targetCompression = true;
47516
+ targetNodeVersion = getCurrentNodeVersion();
47425
47517
  targetHookResumeInputVersion = HOOK_RESUME_INPUT_VERSION;
47426
47518
  targetSpecVersion = world.specVersion;
47427
47519
  specVersionSource = "same-deployment";
47428
47520
  } else if (typeof world.streams?.get !== "function") {
47429
47521
  framedByteStreams = false;
47430
- targetSupportsCompression = false;
47522
+ targetCompression = false;
47523
+ targetNodeVersion = void 0;
47431
47524
  targetHookResumeInputVersion = void 0;
47432
47525
  ({ specVersion: targetSpecVersion, source: specVersionSource } = resolveCrossDeploymentSpecVersion(void 0, world.specVersion));
47433
47526
  } else {
@@ -47437,9 +47530,10 @@ async function start(workflow, argsOrOptions, options) {
47437
47530
  namespace: opts.namespace
47438
47531
  });
47439
47532
  probedRunPublicKey = probe?.encryptionPublicKey;
47440
- const capabilities = getRunCapabilities(probe?.workflowCoreVersion);
47533
+ const capabilities = getRunCapabilities(probe?.workflowCoreVersion, probe?.nodeVersion);
47441
47534
  framedByteStreams = capabilities.framedByteStreams;
47442
- targetSupportsCompression = capabilities.supportedFormats.has(SerializationFormat.GZIP);
47535
+ targetCompression = getCompressionMode(capabilities);
47536
+ targetNodeVersion = probe?.nodeVersion;
47443
47537
  targetHookResumeInputVersion = probe?.hookResumeInputVersion;
47444
47538
  ({ specVersion: targetSpecVersion, source: specVersionSource } = resolveCrossDeploymentSpecVersion(probe, world.specVersion));
47445
47539
  span?.setAttributes({
@@ -47531,6 +47625,9 @@ async function start(workflow, argsOrOptions, options) {
47531
47625
  const executionContext = {
47532
47626
  traceCarrier,
47533
47627
  workflowCoreVersion: version2,
47628
+ ...targetNodeVersion ? {
47629
+ nodeVersion: targetNodeVersion
47630
+ } : {},
47534
47631
  features: {
47535
47632
  encryption: !!encryptionKey
47536
47633
  },
@@ -47557,7 +47654,7 @@ async function start(workflow, argsOrOptions, options) {
47557
47654
  throw dynamicStartRefusalFrom(err);
47558
47655
  }
47559
47656
  }
47560
- const compression = targetSupportsCompression && specVersion >= SPEC_VERSION_SUPPORTS_COMPRESSION;
47657
+ const compression = specVersion >= SPEC_VERSION_SUPPORTS_COMPRESSION ? targetCompression : false;
47561
47658
  const workflowArguments = await dehydrateWorkflowArguments(args, runId, encryptionKey, ops, globalThis, v1Compat, framedByteStreams, compression);
47562
47659
  let dynamicWorkflowCode;
47563
47660
  let dynamicWorkflowCodeRef;
@@ -47692,7 +47789,7 @@ __name(start, "start");
47692
47789
  value: "start",
47693
47790
  configurable: true
47694
47791
  });
47695
- })(start, "step//@workflow/core/runtime/start@5.0.1//start");
47792
+ })(start, "step//@workflow/core/runtime/start@5.2.0//start");
47696
47793
 
47697
47794
  // ../core/dist/runtime/runs.js
47698
47795
  async function wakeUpRun(world, runId, options) {
@@ -48166,7 +48263,7 @@ var Run = class _Run {
48166
48263
  value: "wakeUp",
48167
48264
  configurable: true
48168
48265
  });
48169
- })(Run.prototype["wakeUp"], "step//@workflow/core/runtime/run@5.0.1//Run#wakeUp");
48266
+ })(Run.prototype["wakeUp"], "step//@workflow/core/runtime/run@5.2.0//Run#wakeUp");
48170
48267
  (function(__wf_fn, __wf_id) {
48171
48268
  var __wf_sym = /* @__PURE__ */ Symbol.for("@workflow/core//registeredSteps"), __wf_reg = globalThis[__wf_sym] || (globalThis[__wf_sym] = /* @__PURE__ */ new Map());
48172
48269
  __wf_reg.set(__wf_id, __wf_fn);
@@ -48175,7 +48272,7 @@ var Run = class _Run {
48175
48272
  value: "cancel",
48176
48273
  configurable: true
48177
48274
  });
48178
- })(Run.prototype["cancel"], "step//@workflow/core/runtime/run@5.0.1//Run#cancel");
48275
+ })(Run.prototype["cancel"], "step//@workflow/core/runtime/run@5.2.0//Run#cancel");
48179
48276
  (function(__wf_fn, __wf_id) {
48180
48277
  var __wf_sym = /* @__PURE__ */ Symbol.for("@workflow/core//registeredSteps"), __wf_reg = globalThis[__wf_sym] || (globalThis[__wf_sym] = /* @__PURE__ */ new Map());
48181
48278
  __wf_reg.set(__wf_id, __wf_fn);
@@ -48184,7 +48281,7 @@ var Run = class _Run {
48184
48281
  value: "getReadable",
48185
48282
  configurable: true
48186
48283
  });
48187
- })(Run.prototype["getReadable"], "step//@workflow/core/runtime/run@5.0.1//Run#getReadable");
48284
+ })(Run.prototype["getReadable"], "step//@workflow/core/runtime/run@5.2.0//Run#getReadable");
48188
48285
  (function(__wf_fn, __wf_id) {
48189
48286
  var __wf_sym = /* @__PURE__ */ Symbol.for("@workflow/core//registeredSteps"), __wf_reg = globalThis[__wf_sym] || (globalThis[__wf_sym] = /* @__PURE__ */ new Map());
48190
48287
  __wf_reg.set(__wf_id, __wf_fn);
@@ -48193,7 +48290,7 @@ var Run = class _Run {
48193
48290
  value: "getWritable",
48194
48291
  configurable: true
48195
48292
  });
48196
- })(Run.prototype["getWritable"], "step//@workflow/core/runtime/run@5.0.1//Run#getWritable");
48293
+ })(Run.prototype["getWritable"], "step//@workflow/core/runtime/run@5.2.0//Run#getWritable");
48197
48294
  (function(__wf_fn, __wf_id) {
48198
48295
  var __wf_sym = /* @__PURE__ */ Symbol.for("@workflow/core//registeredSteps"), __wf_reg = globalThis[__wf_sym] || (globalThis[__wf_sym] = /* @__PURE__ */ new Map());
48199
48296
  __wf_reg.set(__wf_id, __wf_fn);
@@ -48202,7 +48299,7 @@ var Run = class _Run {
48202
48299
  value: "exists",
48203
48300
  configurable: true
48204
48301
  });
48205
- })(Object.getOwnPropertyDescriptor(Run.prototype, "exists").get, "step//@workflow/core/runtime/run@5.0.1//Run#exists");
48302
+ })(Object.getOwnPropertyDescriptor(Run.prototype, "exists").get, "step//@workflow/core/runtime/run@5.2.0//Run#exists");
48206
48303
  (function(__wf_fn, __wf_id) {
48207
48304
  var __wf_sym = /* @__PURE__ */ Symbol.for("@workflow/core//registeredSteps"), __wf_reg = globalThis[__wf_sym] || (globalThis[__wf_sym] = /* @__PURE__ */ new Map());
48208
48305
  __wf_reg.set(__wf_id, __wf_fn);
@@ -48211,7 +48308,7 @@ var Run = class _Run {
48211
48308
  value: "status",
48212
48309
  configurable: true
48213
48310
  });
48214
- })(Object.getOwnPropertyDescriptor(Run.prototype, "status").get, "step//@workflow/core/runtime/run@5.0.1//Run#status");
48311
+ })(Object.getOwnPropertyDescriptor(Run.prototype, "status").get, "step//@workflow/core/runtime/run@5.2.0//Run#status");
48215
48312
  (function(__wf_fn, __wf_id) {
48216
48313
  var __wf_sym = /* @__PURE__ */ Symbol.for("@workflow/core//registeredSteps"), __wf_reg = globalThis[__wf_sym] || (globalThis[__wf_sym] = /* @__PURE__ */ new Map());
48217
48314
  __wf_reg.set(__wf_id, __wf_fn);
@@ -48220,7 +48317,7 @@ var Run = class _Run {
48220
48317
  value: "returnValue",
48221
48318
  configurable: true
48222
48319
  });
48223
- })(Object.getOwnPropertyDescriptor(Run.prototype, "returnValue").get, "step//@workflow/core/runtime/run@5.0.1//Run#returnValue");
48320
+ })(Object.getOwnPropertyDescriptor(Run.prototype, "returnValue").get, "step//@workflow/core/runtime/run@5.2.0//Run#returnValue");
48224
48321
  (function(__wf_fn, __wf_id) {
48225
48322
  var __wf_sym = /* @__PURE__ */ Symbol.for("@workflow/core//registeredSteps"), __wf_reg = globalThis[__wf_sym] || (globalThis[__wf_sym] = /* @__PURE__ */ new Map());
48226
48323
  __wf_reg.set(__wf_id, __wf_fn);
@@ -48229,7 +48326,7 @@ var Run = class _Run {
48229
48326
  value: "workflowName",
48230
48327
  configurable: true
48231
48328
  });
48232
- })(Object.getOwnPropertyDescriptor(Run.prototype, "workflowName").get, "step//@workflow/core/runtime/run@5.0.1//Run#workflowName");
48329
+ })(Object.getOwnPropertyDescriptor(Run.prototype, "workflowName").get, "step//@workflow/core/runtime/run@5.2.0//Run#workflowName");
48233
48330
  (function(__wf_fn, __wf_id) {
48234
48331
  var __wf_sym = /* @__PURE__ */ Symbol.for("@workflow/core//registeredSteps"), __wf_reg = globalThis[__wf_sym] || (globalThis[__wf_sym] = /* @__PURE__ */ new Map());
48235
48332
  __wf_reg.set(__wf_id, __wf_fn);
@@ -48238,7 +48335,7 @@ var Run = class _Run {
48238
48335
  value: "createdAt",
48239
48336
  configurable: true
48240
48337
  });
48241
- })(Object.getOwnPropertyDescriptor(Run.prototype, "createdAt").get, "step//@workflow/core/runtime/run@5.0.1//Run#createdAt");
48338
+ })(Object.getOwnPropertyDescriptor(Run.prototype, "createdAt").get, "step//@workflow/core/runtime/run@5.2.0//Run#createdAt");
48242
48339
  (function(__wf_fn, __wf_id) {
48243
48340
  var __wf_sym = /* @__PURE__ */ Symbol.for("@workflow/core//registeredSteps"), __wf_reg = globalThis[__wf_sym] || (globalThis[__wf_sym] = /* @__PURE__ */ new Map());
48244
48341
  __wf_reg.set(__wf_id, __wf_fn);
@@ -48247,7 +48344,7 @@ var Run = class _Run {
48247
48344
  value: "startedAt",
48248
48345
  configurable: true
48249
48346
  });
48250
- })(Object.getOwnPropertyDescriptor(Run.prototype, "startedAt").get, "step//@workflow/core/runtime/run@5.0.1//Run#startedAt");
48347
+ })(Object.getOwnPropertyDescriptor(Run.prototype, "startedAt").get, "step//@workflow/core/runtime/run@5.2.0//Run#startedAt");
48251
48348
  (function(__wf_fn, __wf_id) {
48252
48349
  var __wf_sym = /* @__PURE__ */ Symbol.for("@workflow/core//registeredSteps"), __wf_reg = globalThis[__wf_sym] || (globalThis[__wf_sym] = /* @__PURE__ */ new Map());
48253
48350
  __wf_reg.set(__wf_id, __wf_fn);
@@ -48256,7 +48353,7 @@ var Run = class _Run {
48256
48353
  value: "completedAt",
48257
48354
  configurable: true
48258
48355
  });
48259
- })(Object.getOwnPropertyDescriptor(Run.prototype, "completedAt").get, "step//@workflow/core/runtime/run@5.0.1//Run#completedAt");
48356
+ })(Object.getOwnPropertyDescriptor(Run.prototype, "completedAt").get, "step//@workflow/core/runtime/run@5.2.0//Run#completedAt");
48260
48357
  (function(__wf_cls, __wf_id) {
48261
48358
  var __wf_sym = /* @__PURE__ */ Symbol.for("workflow-class-registry"), __wf_reg = globalThis[__wf_sym] || (globalThis[__wf_sym] = /* @__PURE__ */ new Map());
48262
48359
  __wf_reg.set(__wf_id, __wf_cls);
@@ -48266,7 +48363,7 @@ var Run = class _Run {
48266
48363
  enumerable: false,
48267
48364
  configurable: false
48268
48365
  });
48269
- })(Run, "class//@workflow/core/runtime/run@5.0.1//Run");
48366
+ })(Run, "class//@workflow/core/runtime/run@5.2.0//Run");
48270
48367
 
48271
48368
  // ../workflow/dist/stdlib.js
48272
48369
  async function fetch2(...args) {