@workflow/web 5.0.0-beta.44 → 5.0.0-beta.46

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.
Files changed (23) hide show
  1. package/build/client/assets/{arrow-up-right-AtCpRI70.js → arrow-up-right-UOc2WcaC.js} +1 -1
  2. package/build/client/assets/{highlighted-body-B3W2YXNL-BPRwlr7r.js → highlighted-body-B3W2YXNL-D78gcP7S.js} +1 -1
  3. package/build/client/assets/{home-BMHSjdeg.js → home-DYB1uz9w.js} +3 -3
  4. package/build/client/assets/{loader-circle-abAcDEYl.js → loader-circle-oscnpy3L.js} +1 -1
  5. package/build/client/assets/{manifest-a9a8ec99.js → manifest-a701502a.js} +1 -1
  6. package/build/client/assets/{mermaid-3ZIDBTTL-CrfHaTou.js → mermaid-3ZIDBTTL-BKGEyEYb.js} +101 -46
  7. package/build/client/assets/{root-e8qlLJiK.js → root-Zvnb602n.js} +3 -3
  8. package/build/client/assets/{run-detail-CrWq-9Tk.js → run-detail-CedyZW9h.js} +3 -3
  9. package/build/client/assets/{workflow-graph-viewer-CFAXloBw.js → workflow-graph-viewer-Du0ztkb8.js} +1 -1
  10. package/build/client/assets/{zstd-browser-decoder-B9DmHkyE.js → zstd-browser-decoder-DafWVuEG.js} +1 -1
  11. package/build/server/assets/{app-wed_Qw3X.js → app-BpmEMaiu.js} +224 -228
  12. package/build/server/assets/{highlighted-body-B3W2YXNL-imLU-Cvz.js → highlighted-body-B3W2YXNL-C6ES2Pzm.js} +1 -1
  13. package/build/server/assets/{index-DxLR22JW.js → index-BtQfiVUN.js} +13 -15
  14. package/build/server/assets/{index-Dsr6TVhD.js → index-QOlZC9D-.js} +1 -1
  15. package/build/server/assets/{mermaid-3ZIDBTTL-CgaDjNgb.js → mermaid-3ZIDBTTL-X6IEJ8gj.js} +1 -1
  16. package/build/server/assets/{token-CA6-cBL4.js → token-CrxXUTBD.js} +1 -1
  17. package/build/server/assets/{token-util-BNjC27Tj.js → token-util-DuToe55u.js} +1 -1
  18. package/build/server/assets/{websocket-server-S8DMC969.js → websocket-server-CTnzV_B7.js} +1 -1
  19. package/build/server/assets/{wrapper-DeK0m2tW.js → wrapper-Bjff6YRz.js} +3 -3
  20. package/build/server/assets/{ws-transport-DdxSF5J6.js → ws-transport-ByYax88V.js} +2 -2
  21. package/build/server/assets/{zstd-browser-decoder-Cd_DTxZV.js → zstd-browser-decoder-Bfk1d5vU.js} +1 -1
  22. package/build/server/index.js +3 -3
  23. package/package.json +6 -6
@@ -56876,76 +56876,64 @@ const PARENT_RUN_ID_ATTRIBUTE = `${RESERVED_ATTRIBUTE_KEY_PREFIX}parentRunId`;
56876
56876
  const ATTRIBUTE_KEY_MAX_LENGTH = 256;
56877
56877
  const ATTRIBUTE_VALUE_MAX_BYTES = 256;
56878
56878
  const ATTRIBUTE_MAX_PER_RUN = 64;
56879
- const AttributeChangeSchema = object$1({
56880
- key: string$3(),
56881
- value: union([string$3(), _null()])
56882
- });
56883
- const AttributeChangesSchema = array$1(AttributeChangeSchema);
56879
+ const textEncoder$2 = new TextEncoder();
56884
56880
  class AttributeValidationError extends Error {
56885
56881
  constructor(message2) {
56886
56882
  super(message2);
56887
56883
  this.name = "AttributeValidationError";
56888
56884
  }
56889
56885
  }
56890
- const valueByteLength = (value) => new TextEncoder().encode(value).length;
56891
- function validateAttributeKey(key, options = {}) {
56886
+ function assertValidAttributeKey(key, allowReservedAttributes) {
56892
56887
  if (typeof key !== "string") {
56893
- return new AttributeValidationError(`Attribute key must be a string, got ${typeof key}`);
56888
+ throw new AttributeValidationError(`Attribute key must be a string, got ${typeof key}`);
56894
56889
  }
56895
56890
  if (key.length === 0) {
56896
- return new AttributeValidationError("Attribute key must not be empty");
56891
+ throw new AttributeValidationError("Attribute key must not be empty");
56897
56892
  }
56898
56893
  if (key.length > ATTRIBUTE_KEY_MAX_LENGTH) {
56899
- return new AttributeValidationError(`Attribute key length ${key.length} exceeds limit ${ATTRIBUTE_KEY_MAX_LENGTH}: ${JSON.stringify(key.slice(0, 32))}…`);
56894
+ throw new AttributeValidationError(`Attribute key length ${key.length} exceeds limit ${ATTRIBUTE_KEY_MAX_LENGTH}: ${JSON.stringify(key.slice(0, 32))}…`);
56900
56895
  }
56901
- if (!options.allowReservedAttributes && key.startsWith(RESERVED_ATTRIBUTE_KEY_PREFIX)) {
56902
- return new AttributeValidationError(`Attribute key ${JSON.stringify(key)} starts with reserved prefix "${RESERVED_ATTRIBUTE_KEY_PREFIX}" — that namespace is reserved for framework/library code. Set { allowReservedAttributes: true } only if your caller is framework-level.`);
56896
+ if (!allowReservedAttributes && key.startsWith(RESERVED_ATTRIBUTE_KEY_PREFIX)) {
56897
+ throw new AttributeValidationError(`Attribute key ${JSON.stringify(key)} starts with reserved prefix "${RESERVED_ATTRIBUTE_KEY_PREFIX}" — that namespace is reserved for framework/library code. Set { allowReservedAttributes: true } only if your caller is framework-level.`);
56903
56898
  }
56904
- return null;
56905
56899
  }
56906
- function validateAttributeValue(value) {
56907
- if (value === null)
56908
- return null;
56909
- if (typeof value !== "string") {
56910
- return new AttributeValidationError(`Attribute value must be a string or null, got ${typeof value}`);
56900
+ function assertValidAttributeValue(value) {
56901
+ if (value !== null && typeof value !== "string") {
56902
+ throw new AttributeValidationError(`Attribute value must be a string or null, got ${typeof value}`);
56911
56903
  }
56912
- const bytes = valueByteLength(value);
56904
+ if (value === null)
56905
+ return;
56906
+ const bytes = textEncoder$2.encode(value).length;
56913
56907
  if (bytes > ATTRIBUTE_VALUE_MAX_BYTES) {
56914
- return new AttributeValidationError(`Attribute value byte length ${bytes} exceeds limit ${ATTRIBUTE_VALUE_MAX_BYTES}`);
56908
+ throw new AttributeValidationError(`Attribute value byte length ${bytes} exceeds limit ${ATTRIBUTE_VALUE_MAX_BYTES}`);
56915
56909
  }
56916
- return null;
56917
56910
  }
56918
- function validateAttributeChanges(changes, context = {}) {
56911
+ function attributeCountDelta(key, value, existingKeys) {
56912
+ if (value === null)
56913
+ return (existingKeys == null ? void 0 : existingKeys.has(key)) ? -1 : 0;
56914
+ return existingKeys === void 0 || !existingKeys.has(key) ? 1 : 0;
56915
+ }
56916
+ function validateAttributeBatchConstraints(changes, context = {}) {
56919
56917
  const seenKeys = /* @__PURE__ */ new Set();
56920
56918
  const existingKeys = context.existingKeys === void 0 ? void 0 : context.existingKeys instanceof Set ? context.existingKeys : new Set(context.existingKeys);
56921
- let netAdds = 0;
56922
- let netDeletes = 0;
56923
- for (const change of changes) {
56924
- const keyError = validateAttributeKey(change.key, {
56925
- allowReservedAttributes: context.allowReservedAttributes
56926
- });
56927
- if (keyError)
56928
- throw keyError;
56929
- const valueError = validateAttributeValue(change.value);
56930
- if (valueError)
56931
- throw valueError;
56932
- if (seenKeys.has(change.key)) {
56933
- throw new AttributeValidationError(`Attribute key ${JSON.stringify(change.key)} appears more than once in the same batch`);
56934
- }
56935
- seenKeys.add(change.key);
56936
- if (change.value !== null) {
56937
- if (existingKeys === void 0 || !existingKeys.has(change.key)) {
56938
- netAdds += 1;
56939
- }
56940
- } else if (existingKeys === void 0 || existingKeys.has(change.key)) {
56941
- netDeletes += 1;
56919
+ let postMergeCount = (existingKeys == null ? void 0 : existingKeys.size) ?? 0;
56920
+ for (const { key, value } of changes) {
56921
+ if (seenKeys.has(key)) {
56922
+ throw new AttributeValidationError(`Attribute key ${JSON.stringify(key)} appears more than once in the same batch`);
56942
56923
  }
56924
+ seenKeys.add(key);
56925
+ postMergeCount += attributeCountDelta(key, value, existingKeys);
56926
+ }
56927
+ if (postMergeCount > ATTRIBUTE_MAX_PER_RUN) {
56928
+ throw new AttributeValidationError(`Run attribute count would exceed limit ${ATTRIBUTE_MAX_PER_RUN} (post-merge ${postMergeCount})`);
56943
56929
  }
56944
- const existing = existingKeys === void 0 ? 0 : existingKeys.size;
56945
- const postMerge = existing + netAdds - netDeletes;
56946
- if (postMerge > ATTRIBUTE_MAX_PER_RUN) {
56947
- throw new AttributeValidationError(`Run attribute count would exceed limit ${ATTRIBUTE_MAX_PER_RUN} (post-merge ${postMerge})`);
56930
+ }
56931
+ function validateAttributeChanges(changes, context = {}) {
56932
+ for (const { key, value } of changes) {
56933
+ assertValidAttributeKey(key, context.allowReservedAttributes === true);
56934
+ assertValidAttributeValue(value);
56948
56935
  }
56936
+ validateAttributeBatchConstraints(changes, context);
56949
56937
  }
56950
56938
  function applyAttributeChanges(existing, changes) {
56951
56939
  const next2 = { ...existing ?? {} };
@@ -56958,6 +56946,71 @@ function applyAttributeChanges(existing, changes) {
56958
56946
  }
56959
56947
  return next2;
56960
56948
  }
56949
+ const textEncoder$1 = new TextEncoder();
56950
+ const AttributeKeySchema = string$3().min(1, { error: "Attribute key must not be empty" }).max(ATTRIBUTE_KEY_MAX_LENGTH, {
56951
+ error: `Attribute key exceeds limit ${ATTRIBUTE_KEY_MAX_LENGTH}`
56952
+ });
56953
+ const AttributeValueSchema = string$3().refine((value) => textEncoder$1.encode(value).length <= ATTRIBUTE_VALUE_MAX_BYTES, {
56954
+ error: `Attribute value exceeds limit ${ATTRIBUTE_VALUE_MAX_BYTES} UTF-8 bytes`
56955
+ }).nullable();
56956
+ const AttributeChangeSchema = object$1({
56957
+ key: AttributeKeySchema,
56958
+ value: AttributeValueSchema
56959
+ });
56960
+ const AttributeChangesSchema = array$1(AttributeChangeSchema).superRefine((changes, context) => {
56961
+ try {
56962
+ validateAttributeBatchConstraints(changes);
56963
+ } catch (error2) {
56964
+ if (!(error2 instanceof AttributeValidationError))
56965
+ throw error2;
56966
+ context.addIssue({
56967
+ code: "custom",
56968
+ message: error2.message,
56969
+ input: changes
56970
+ });
56971
+ }
56972
+ });
56973
+ function getOwnProperty$1(object2, key) {
56974
+ return Object.hasOwn(object2, key) ? object2[key] : void 0;
56975
+ }
56976
+ function isSealedNoopEvent$1(event) {
56977
+ return event.eventType === "noop";
56978
+ }
56979
+ const ENTITY_EVENT_CLASS_BY_TYPE = {
56980
+ step_created: "step_created",
56981
+ step_started: "step_started",
56982
+ step_retrying: "step_retrying",
56983
+ step_completed: "step_terminal",
56984
+ step_failed: "step_terminal",
56985
+ wait_created: "wait_created",
56986
+ wait_completed: "wait_completed",
56987
+ hook_created: "hook_created",
56988
+ hook_disposed: "hook_disposed",
56989
+ run_started: "run_started"
56990
+ };
56991
+ function entityEventClass(eventType) {
56992
+ return getOwnProperty$1(ENTITY_EVENT_CLASS_BY_TYPE, eventType);
56993
+ }
56994
+ const EVENT_DATA_REF_FIELDS_BY_EVENT_TYPE = {
56995
+ run_created: ["input"],
56996
+ run_started: ["input"],
56997
+ run_completed: ["output"],
56998
+ run_failed: ["error"],
56999
+ step_created: ["input"],
57000
+ step_started: ["input"],
57001
+ step_completed: ["result"],
57002
+ step_failed: ["error"],
57003
+ step_retrying: ["error"],
57004
+ hook_created: ["metadata"],
57005
+ hook_received: ["payload"]
57006
+ };
57007
+ const NO_EVENT_DATA_REF_FIELDS = [];
57008
+ function getEventDataRefFields(eventType) {
57009
+ return getOwnProperty$1(EVENT_DATA_REF_FIELDS_BY_EVENT_TYPE, eventType) ?? NO_EVENT_DATA_REF_FIELDS;
57010
+ }
57011
+ function getEventDataPayloadField(eventType) {
57012
+ return getEventDataRefFields(eventType)[0];
57013
+ }
56961
57014
  const BinarySerializedDataSchema = _instanceof(Uint8Array);
56962
57015
  const LegacySerializedDataSchemaV1 = any();
56963
57016
  const SerializedDataSchema = union([
@@ -57029,21 +57082,6 @@ const TERMINAL_STEP_EVENT_TYPES = TerminalStepEventTypeSchema.options;
57029
57082
  function isTerminalStepEventType(eventType) {
57030
57083
  return TERMINAL_STEP_EVENT_TYPES.includes(eventType);
57031
57084
  }
57032
- const ENTITY_EVENT_CLASS_BY_TYPE = {
57033
- step_created: "step_created",
57034
- step_started: "step_started",
57035
- step_retrying: "step_retrying",
57036
- step_completed: "step_terminal",
57037
- step_failed: "step_terminal",
57038
- wait_created: "wait_created",
57039
- wait_completed: "wait_completed",
57040
- hook_created: "hook_created",
57041
- hook_disposed: "hook_disposed",
57042
- run_started: "run_started"
57043
- };
57044
- function entityEventClass(eventType) {
57045
- return ENTITY_EVENT_CLASS_BY_TYPE[eventType];
57046
- }
57047
57085
  const HookLifecycleEventTypeSchema = EventTypeSchema.extract([
57048
57086
  "hook_created",
57049
57087
  "hook_received",
@@ -57069,9 +57107,6 @@ const WAIT_EVENT_TYPES = WaitEventTypeSchema.options;
57069
57107
  function isWaitEventType(eventType) {
57070
57108
  return WAIT_EVENT_TYPES.includes(eventType);
57071
57109
  }
57072
- function isSealedNoopEvent$1(event) {
57073
- return event.eventType === "noop";
57074
- }
57075
57110
  const ChildEntityCreationEventTypeSchema = EventTypeSchema.extract([
57076
57111
  "step_created",
57077
57112
  "hook_created",
@@ -57081,26 +57116,6 @@ const CHILD_ENTITY_CREATION_EVENT_TYPES = ChildEntityCreationEventTypeSchema.opt
57081
57116
  function isChildEntityCreationEventType(eventType) {
57082
57117
  return CHILD_ENTITY_CREATION_EVENT_TYPES.includes(eventType);
57083
57118
  }
57084
- const EVENT_DATA_PAYLOAD_FIELD_BY_EVENT_TYPE = {
57085
- run_created: "input",
57086
- run_started: "input",
57087
- run_completed: "output",
57088
- run_failed: "error",
57089
- step_created: "input",
57090
- step_started: "input",
57091
- step_completed: "result",
57092
- step_failed: "error",
57093
- step_retrying: "error",
57094
- hook_created: "metadata",
57095
- hook_received: "payload"
57096
- };
57097
- const EVENT_DATA_REF_FIELDS = Object.fromEntries(Object.entries(EVENT_DATA_PAYLOAD_FIELD_BY_EVENT_TYPE).map(([eventType, field]) => [eventType, [field]]));
57098
- function getEventDataRefFields(eventType) {
57099
- return EVENT_DATA_REF_FIELDS[eventType] ?? [];
57100
- }
57101
- function getEventDataPayloadField(eventType) {
57102
- return EVENT_DATA_PAYLOAD_FIELD_BY_EVENT_TYPE[eventType];
57103
- }
57104
57119
  function stripEventDataRefs(event, resolveData) {
57105
57120
  if (resolveData !== "none")
57106
57121
  return event;
@@ -57940,7 +57955,10 @@ const HookResumeTimingSchema = object$1({
57940
57955
  resumeRequestedAtMs: number$3(),
57941
57956
  /** Epoch ms immediately before the queue publish was requested. */
57942
57957
  queuePublishRequestedAtMs: number$3(),
57943
- /** Which `resumeHook()` dispatch path ran: `parallel` or `sequential`. */
57958
+ /**
57959
+ * Which `resumeHook()` dispatch path ran: `lazy` or `sequential` (`parallel`
57960
+ * from producers predating lazy-only resume).
57961
+ */
57944
57962
  strategy: string$3().optional(),
57945
57963
  /** Epoch ms the final consumer's queue handler was entered. */
57946
57964
  consumerStartedAtMs: number$3().optional(),
@@ -58025,7 +58043,7 @@ const WorkflowInvokePayloadSchema = object$1({
58025
58043
  stepInput: StepDispatchInputSchema.optional(),
58026
58044
  /**
58027
58045
  * Hook-resume TTR timing. Present on both `resumeHook()` dispatch paths
58028
- * (unlike `hookInput`, which only rides the parallel fast path), and
58046
+ * (unlike `hookInput`, which only rides the lazy path), and
58029
58047
  * forwarded onto a dispatched step message when the resuming invocation
58030
58048
  * hands the next durable step to another invocation. Purely observational.
58031
58049
  * See {@link HookResumeTimingSchema}.
@@ -58073,8 +58091,8 @@ const HookResumeContextSchema = object$1({
58073
58091
  // Feature marker: the version of the lazy-hook-resume consumer protocol the
58074
58092
  // run's creating deployment supports. Present (>= 1) means that deployment's
58075
58093
  // `@workflow/core` re-ensures the `hook_received` event from the queue
58076
- // message's `hookInput` on replay, so `resumeHook()`'s parallel fast path is
58077
- // safe to use. Because a run is pinned to its creating deployment, this
58094
+ // message's `hookInput` on replay, so `resumeHook()`'s lazy path is safe to
58095
+ // use. Because a run is pinned to its creating deployment, this
58078
58096
  // marker is a reliable per-run attestation, unlike inferring support from a
58079
58097
  // version compare against a predicted release cutoff. Absent on runs created
58080
58098
  // before the marker existed (fall back to the sequential path).
@@ -58113,7 +58131,7 @@ const HookSchema = object$1({
58113
58131
  // lookup: RESPONSE-ONLY and TRANSIENT. Never persisted on the hook entity
58114
58132
  // and never part of `resumeContext`, so a server rollback or kill switch
58115
58133
  // takes effect on the next lookup (the field stops appearing).
58116
- // `resumeHook()` gates its parallel fast path on this being present and
58134
+ // `resumeHook()` gates its lazy path on this being present and
58117
58135
  // current. Absent against an older/rolled-back server or when the kill switch
58118
58136
  // is active.
58119
58137
  resumeCapabilities: HookResumeCapabilitiesSchema.optional()
@@ -60970,7 +60988,7 @@ function replaceEncryptedAndExpiredWithMarkers(resource) {
60970
60988
  }
60971
60989
  async function hydrateResourceIOAsync(resource, key) {
60972
60990
  const { hydrateDataWithKey: hydrateDataWithKey2, deriveRunPayloadKeys: deriveRunPayloadKeys2 } = await Promise.resolve().then(() => serializationFormat);
60973
- const { ensureZstdDecoderRegistered } = await import("./zstd-browser-decoder-Cd_DTxZV.js");
60991
+ const { ensureZstdDecoderRegistered } = await import("./zstd-browser-decoder-Bfk1d5vU.js");
60974
60992
  ensureZstdDecoderRegistered();
60975
60993
  const cryptoKey = key ? await deriveRunPayloadKeys2(key) : void 0;
60976
60994
  const revivers = getRevivers();
@@ -91840,7 +91858,7 @@ var tn = f("block", "before:content-[counter(line)]", "before:inline-block", "be
91840
91858
  var et = ({ className: e, language: t, style: o, isIncomplete: n, ...s2 }) => jsxRuntimeExports.jsx("div", { className: f("my-4 flex w-full flex-col gap-2 rounded-xl border border-border bg-sidebar p-2", e), "data-incomplete": n || void 0, "data-language": t, "data-streamdown": "code-block", style: { contentVisibility: "auto", containIntrinsicSize: "auto 200px", ...o }, ...s2 });
91841
91859
  var Se = reactExports.createContext({ code: "" }), de = () => reactExports.useContext(Se);
91842
91860
  var ot = ({ language: e }) => jsxRuntimeExports.jsx("div", { className: "flex h-8 items-center text-muted-foreground text-xs", "data-language": e, "data-streamdown": "code-block-header", children: jsxRuntimeExports.jsx("span", { className: "ml-1 font-mono lowercase", children: e }) });
91843
- var cn$1 = /\n+$/, dn = reactExports.lazy(() => import("./highlighted-body-B3W2YXNL-imLU-Cvz.js").then((e) => ({ default: e.HighlightedCodeBlockBody }))), rt = ({ code: e, language: t, className: o, children: n, isIncomplete: s2 = false, ...r2 }) => {
91861
+ var cn$1 = /\n+$/, dn = reactExports.lazy(() => import("./highlighted-body-B3W2YXNL-C6ES2Pzm.js").then((e) => ({ default: e.HighlightedCodeBlockBody }))), rt = ({ code: e, language: t, className: o, children: n, isIncomplete: s2 = false, ...r2 }) => {
91844
91862
  let i = reactExports.useMemo(() => e.replace(cn$1, ""), [e]), c = reactExports.useMemo(() => ({ bg: "transparent", fg: "inherit", tokens: i.split(`
91845
91863
  `).map((a2) => [{ content: a2, color: "inherit", bgColor: "transparent", htmlStyle: {}, offset: 0 }]) }), [i]);
91846
91864
  return jsxRuntimeExports.jsx(Se.Provider, { value: { code: e }, children: jsxRuntimeExports.jsxs(et, { isIncomplete: s2, language: t, children: [jsxRuntimeExports.jsx(ot, { language: t }), n ? jsxRuntimeExports.jsx("div", { className: "pointer-events-none sticky top-2 z-10 -mt-10 flex h-8 items-center justify-end", children: jsxRuntimeExports.jsx("div", { className: "pointer-events-auto flex shrink-0 items-center gap-2 rounded-md border border-sidebar bg-sidebar/80 px-1.5 py-1 supports-[backdrop-filter]:bg-sidebar/70 supports-[backdrop-filter]:backdrop-blur", "data-streamdown": "code-block-actions", children: n }) }) : null, jsxRuntimeExports.jsx(reactExports.Suspense, { fallback: jsxRuntimeExports.jsx(Qe, { className: o, language: t, result: c, ...r2 }), children: jsxRuntimeExports.jsx(dn, { className: o, code: i, language: t, raw: c, ...r2 }) })] }) });
@@ -92162,7 +92180,7 @@ var Dt = ({ children: e, className: t, onDownload: o, onError: n }) => {
92162
92180
  }, []), jsxRuntimeExports.jsxs("div", { className: "relative", ref: i, children: [jsxRuntimeExports.jsx("button", { className: f("cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50", t), disabled: c, onClick: () => r2(!s2), title: "Download table", type: "button", children: e != null ? e : jsxRuntimeExports.jsx(Z, { size: 14 }) }), s2 ? jsxRuntimeExports.jsxs("div", { className: "absolute top-full right-0 z-10 mt-1 min-w-[120px] overflow-hidden rounded-md border border-border bg-background shadow-lg", children: [jsxRuntimeExports.jsx("button", { className: "w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40", onClick: () => a2("csv"), title: "Download table as CSV", type: "button", children: "CSV" }), jsxRuntimeExports.jsx("button", { className: "w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40", onClick: () => a2("markdown"), title: "Download table as Markdown", type: "button", children: "Markdown" })] }) : null] });
92163
92181
  };
92164
92182
  var Vt = ({ children: e, className: t, showControls: o, ...n }) => jsxRuntimeExports.jsxs("div", { className: "my-4 flex flex-col gap-2 rounded-lg border border-border bg-sidebar p-2", "data-streamdown": "table-wrapper", children: [o ? jsxRuntimeExports.jsxs("div", { className: "flex items-center justify-end gap-1", children: [jsxRuntimeExports.jsx(Ht, {}), jsxRuntimeExports.jsx(Dt, {})] }) : null, jsxRuntimeExports.jsx("div", { className: "border-collapse overflow-x-auto overscroll-y-auto rounded-md border border-border bg-background", children: jsxRuntimeExports.jsx("table", { className: f("w-full divide-y divide-border", t), "data-streamdown": "table", ...n, children: e }) })] });
92165
- var Jn = reactExports.lazy(() => import("./mermaid-3ZIDBTTL-CgaDjNgb.js").then((e) => ({ default: e.Mermaid }))), Kn = /language-([^\s]+)/;
92183
+ var Jn = reactExports.lazy(() => import("./mermaid-3ZIDBTTL-X6IEJ8gj.js").then((e) => ({ default: e.Mermaid }))), Kn = /language-([^\s]+)/;
92166
92184
  function ke(e, t) {
92167
92185
  if (!(e != null && e.position || t != null && t.position)) return true;
92168
92186
  if (!(e != null && e.position && (t != null && t.position))) return false;
@@ -100599,15 +100617,15 @@ function magenta(str) {
100599
100617
  return chalk.magenta(str);
100600
100618
  }
100601
100619
  class WorkflowSuspension extends Error {
100602
- constructor(stepsInput, global2) {
100603
- const steps = [...stepsInput.values()];
100620
+ constructor(itemsInput, global2) {
100621
+ const items = [...itemsInput.values()];
100604
100622
  let stepCount = 0;
100605
100623
  let hookCount = 0;
100606
100624
  let waitCount = 0;
100607
100625
  let attributeCount = 0;
100608
100626
  let hookDisposedCount = 0;
100609
100627
  let abortCount = 0;
100610
- for (const item of steps) {
100628
+ for (const item of items) {
100611
100629
  if (item.type === "step")
100612
100630
  stepCount++;
100613
100631
  else if (item.type === "hook") {
@@ -100659,6 +100677,8 @@ class WorkflowSuspension extends Error {
100659
100677
  }
100660
100678
  const description = parts.length > 0 ? `${parts.join(" and ")} ${hasOrHave} not been ${action2} yet` : "0 steps have not been run yet";
100661
100679
  super(description);
100680
+ __publicField(this, "items");
100681
+ /** @deprecated Use `items` instead. */
100662
100682
  __publicField(this, "steps");
100663
100683
  __publicField(this, "globalThis");
100664
100684
  __publicField(this, "stepCount");
@@ -100668,7 +100688,8 @@ class WorkflowSuspension extends Error {
100668
100688
  __publicField(this, "hookDisposedCount");
100669
100689
  __publicField(this, "abortCount");
100670
100690
  this.name = "WorkflowSuspension";
100671
- this.steps = steps;
100691
+ this.items = items;
100692
+ this.steps = items;
100672
100693
  this.globalThis = global2;
100673
100694
  this.stepCount = stepCount;
100674
100695
  this.hookCount = hookCount;
@@ -100852,7 +100873,6 @@ const DeploymentId = SemanticConvention$2("deployment.id");
100852
100873
  const HookToken = SemanticConvention$2("workflow.hook.token");
100853
100874
  const HookId = SemanticConvention$2("workflow.hook.id");
100854
100875
  const HookFound = SemanticConvention$2("workflow.hook.found");
100855
- const HookResilientResume = SemanticConvention$2("workflow.hook.resilient_resume");
100856
100876
  const WorkflowSuspensionState = SemanticConvention$2("workflow.suspension.state");
100857
100877
  const WorkflowSuspensionHookCount = SemanticConvention$2("workflow.suspension.hook_count");
100858
100878
  const WorkflowSuspensionStepCount = SemanticConvention$2("workflow.suspension.step_count");
@@ -101347,6 +101367,7 @@ async function getWorldLazy() {
101347
101367
  }
101348
101368
  throw new Error("Workflow world runtime was not initialized. Import from the host workflow entrypoints (`workflow`, `workflow/api`, or `workflow/runtime`) so @workflow/core/runtime/world-init can register getWorld before getWorldLazy() is used.");
101349
101369
  }
101370
+ const GUEST_CODE_EXECUTION_SAMPLE_LIMIT = 5;
101350
101371
  let activeStats = null;
101351
101372
  let reportedProxies = null;
101352
101373
  function withGuestCodeStats(stats2, fn2) {
@@ -101368,6 +101389,10 @@ function isUseStepClosureFn(fn2) {
101368
101389
  function recordGuestCode(kind, detail) {
101369
101390
  if (!activeStats)
101370
101391
  return;
101392
+ activeStats.totalExecutions = (activeStats.totalExecutions ?? activeStats.executions.length) + 1;
101393
+ if (activeStats.executions.length >= GUEST_CODE_EXECUTION_SAMPLE_LIMIT) {
101394
+ return;
101395
+ }
101371
101396
  const execution = { kind };
101372
101397
  if (detail !== void 0)
101373
101398
  execution.detail = detail;
@@ -102592,7 +102617,8 @@ async function recordCompression(stats2, operation) {
102592
102617
  }
102593
102618
  }
102594
102619
  async function recordGuestCodeExecutions(stats2) {
102595
- if (stats2.executions.length === 0)
102620
+ const totalExecutions = stats2.totalExecutions ?? stats2.executions.length;
102621
+ if (totalExecutions === 0)
102596
102622
  return;
102597
102623
  try {
102598
102624
  const span = await getActiveSpan();
@@ -102602,7 +102628,7 @@ async function recordGuestCodeExecutions(stats2) {
102602
102628
  ...new Set(stats2.executions.map((e) => e.detail ? `${e.kind} (${e.detail})` : e.kind))
102603
102629
  ];
102604
102630
  span.setAttributes({
102605
- ...SerializationGuestCodeExecutions(stats2.executions.length),
102631
+ ...SerializationGuestCodeExecutions(totalExecutions),
102606
102632
  ...SerializationGuestCodeDetails(details)
102607
102633
  });
102608
102634
  } catch {
@@ -103708,8 +103734,8 @@ function reviveAbortController(value, ops, runId) {
103708
103734
  if (value.hookToken) {
103709
103735
  const hookResume = (async () => {
103710
103736
  try {
103711
- const { resumeHook: resumeHookFn } = await Promise.resolve().then(() => resumeHook$3);
103712
- await resumeHookFn(value.hookToken, {
103737
+ const { resumeHookDurable: resumeHookDurable2 } = await Promise.resolve().then(() => resumeHook$3);
103738
+ await resumeHookDurable2(value.hookToken, {
103713
103739
  aborted: true,
103714
103740
  reason
103715
103741
  });
@@ -104299,7 +104325,7 @@ globalSingleton("@workflow/core//envWarnings", 1, () => ({
104299
104325
  maxInlineStepsValues: /* @__PURE__ */ new Set(),
104300
104326
  maxEventsValues: /* @__PURE__ */ new Set()
104301
104327
  }));
104302
- const version$1 = "5.0.0-beta.44";
104328
+ const version$1 = "5.0.0-beta.46";
104303
104329
  const DEFAULT_HEALTH_CHECK_TIMEOUT = 3e4;
104304
104330
  const SAFE_WORKFLOW_NAME_PATTERN = /^[a-zA-Z0-9_\-./@]+$/;
104305
104331
  function getWorkflowQueueName(workflowName, namespace2) {
@@ -136368,7 +136394,7 @@ function createWorld$2(args) {
136368
136394
  const basedir = mergedConfig.dataDir;
136369
136395
  const hooksDir = path$3.join(basedir, "hooks");
136370
136396
  const taggedHookFiles = await listTaggedFiles(hooksDir, tag);
136371
- const { HookSchema: HookSchema2 } = await import("./index-DxLR22JW.js");
136397
+ const { HookSchema: HookSchema2 } = await import("./index-BtQfiVUN.js");
136372
136398
  await Promise.all(taggedHookFiles.map(async (hookFile) => {
136373
136399
  const hook = await readJSON(path$3.join(hooksDir, hookFile), HookSchema2);
136374
136400
  if (hook == null ? void 0 : hook.token) {
@@ -136551,8 +136577,8 @@ function requireGetVercelOidcToken() {
136551
136577
  }
136552
136578
  try {
136553
136579
  const [{ getTokenPayload, isExpired }, { refreshToken }] = await Promise.all([
136554
- await import("./token-util-BNjC27Tj.js").then((n) => n.t),
136555
- await import("./token-CA6-cBL4.js").then((n) => n.t)
136580
+ await import("./token-util-DuToe55u.js").then((n) => n.t),
136581
+ await import("./token-CrxXUTBD.js").then((n) => n.t)
136556
136582
  ]);
136557
136583
  if (!token || isExpired(getTokenPayload(token), options == null ? void 0 : options.expirationBufferMs)) {
136558
136584
  await refreshToken(options);
@@ -137115,7 +137141,7 @@ function requireDist() {
137115
137141
  return dist;
137116
137142
  }
137117
137143
  var distExports = requireDist();
137118
- const version = "5.0.0-beta.40";
137144
+ const version = "5.0.0-beta.42";
137119
137145
  const pools = globalSingleton("@workflow/world-vercel//httpPools", 1, () => ({
137120
137146
  dispatcher: void 0,
137121
137147
  streamDispatcher: void 0,
@@ -138476,7 +138502,7 @@ function createGetEncryptionKeyForRun(projectId, teamId, token, dispatcher2) {
138476
138502
  };
138477
138503
  }
138478
138504
  async function getDeadline() {
138479
- const { getDeadline: getDeadline2 } = await import("./index-Dsr6TVhD.js").then((n) => n.i);
138505
+ const { getDeadline: getDeadline2 } = await import("./index-QOlZC9D-.js").then((n) => n.i);
138480
138506
  return getDeadline2();
138481
138507
  }
138482
138508
  const WORKFLOW_SERVER_SERVICE = {
@@ -143429,7 +143455,7 @@ const wsEventsChannelForInvocation = (runId, config2) => {
143429
143455
  open() {
143430
143456
  if (!runId || !isWsEventsTransportEnabled())
143431
143457
  return;
143432
- claim = import("./ws-transport-DdxSF5J6.js").then(({ openWsChannel }) => openWsChannel(runId, config2)).catch(() => void 0);
143458
+ claim = import("./ws-transport-ByYax88V.js").then(({ openWsChannel }) => openWsChannel(runId, config2)).catch(() => void 0);
143433
143459
  },
143434
143460
  /**
143435
143461
  * Awaited, unlike the open: work scheduled after the handler returns is not
@@ -144551,7 +144577,7 @@ function wsReplyStatus(reply, endpoint) {
144551
144577
  return status;
144552
144578
  }
144553
144579
  async function postEventFrameOverWs(input, config2) {
144554
- const { resolveWsTransport } = await import("./ws-transport-DdxSF5J6.js");
144580
+ const { resolveWsTransport } = await import("./ws-transport-ByYax88V.js");
144555
144581
  const { runId } = input;
144556
144582
  const resolved = resolveWsTransport(runId, config2);
144557
144583
  if (!resolved)
@@ -145645,7 +145671,7 @@ function createWorld$1(config2) {
145645
145671
  // Vercel deployments are atomic and immutable, so a deployment id names
145646
145672
  // one fixed build for its whole lifetime.
145647
145673
  deploymentAffinity: true
145648
- // NOTE: the backend half of resumeHook()'s parallel fast path (that
145674
+ // NOTE: the backend half of resumeHook()'s lazy path (that
145649
145675
  // the server enforces the `(runId, resumeId)` dedup constraint) is
145650
145676
  // NO LONGER a static world capability here. It is attested per-lookup by
145651
145677
  // the server via `Hook.resumeCapabilities.hookResumeDedupVersion`
@@ -145800,7 +145826,7 @@ globalSingleton("@workflow/core//devServerPort", 1, () => ({
145800
145826
  inFlight: void 0
145801
145827
  }));
145802
145828
  function waitUntil(promise2) {
145803
- void import("./index-Dsr6TVhD.js").then((n) => n.i).then(({ waitUntil: waitUntil2 }) => {
145829
+ void import("./index-QOlZC9D-.js").then((n) => n.i).then(({ waitUntil: waitUntil2 }) => {
145804
145830
  waitUntil2(promise2);
145805
145831
  });
145806
145832
  }
@@ -148489,7 +148515,7 @@ const CAPABILITY_VERSION_TABLE = [
148489
148515
  // version-compare against a predicted release cutoff is a guess; instead the
148490
148516
  // run's creating deployment stamps an explicit `hookResumeInputVersion`
148491
148517
  // marker into its execution context, which the server mirrors onto the hook's
148492
- // resumeContext. `resumeHook()` gates the parallel fast path on that marker.
148518
+ // resumeContext. `resumeHook()` gates the lazy path on that marker.
148493
148519
  ];
148494
148520
  const BASELINE_FORMATS = /* @__PURE__ */ new Set([
148495
148521
  SerializationFormat$1.DEVALUE_V1
@@ -148583,9 +148609,12 @@ async function getHookByToken(token) {
148583
148609
  return hook;
148584
148610
  }
148585
148611
  async function resumeHook$2(tokenOrHook, payload, encryptionKeyOverride) {
148586
- return resumeHookImpl(tokenOrHook, payload, encryptionKeyOverride, false, Date.now());
148612
+ return resumeHookImpl(tokenOrHook, payload, encryptionKeyOverride, false, Date.now(), false);
148613
+ }
148614
+ async function resumeHookDurable(tokenOrHook, payload, encryptionKeyOverride) {
148615
+ return resumeHookImpl(tokenOrHook, payload, encryptionKeyOverride, false, Date.now(), true);
148587
148616
  }
148588
- async function resumeHookImpl(tokenOrHook, payload, encryptionKeyOverride, hookFreshlyLookedUp, resumeRequestedAtMs) {
148617
+ async function resumeHookImpl(tokenOrHook, payload, encryptionKeyOverride, hookFreshlyLookedUp, resumeRequestedAtMs, requireDurableWrite) {
148589
148618
  return await waitedUntil(() => {
148590
148619
  return trace$2("hook.resume", async (span) => {
148591
148620
  var _a3, _b2, _c2;
@@ -148642,31 +148671,36 @@ async function resumeHookImpl(tokenOrHook, payload, encryptionKeyOverride, hookF
148642
148671
  if (originLink) {
148643
148672
  (_a3 = span == null ? void 0 : span.addLink) == null ? void 0 : _a3.call(span, originLink);
148644
148673
  }
148645
- const eventData = {
148646
- ...v1Compat ? {} : { token: hook.token },
148647
- payload: dehydratedPayload
148648
- };
148649
148674
  const queueName = getWorkflowQueueName(resumeContext.workflowName);
148650
148675
  const queueOptions = {
148651
148676
  deploymentId: resumeContext.deploymentId,
148652
148677
  specVersion: resumeContext.runSpecVersion ?? SPEC_VERSION_LEGACY
148653
148678
  };
148654
- const parallelResumeDisabled = process.env.WORKFLOW_DISABLE_LAZY_HOOK_RESUME === "1";
148679
+ const lazyResumeDisabled = process.env.WORKFLOW_DISABLE_LAZY_HOOK_RESUME === "1";
148655
148680
  const backendDedupSupported = (hookResumeCapabilitiesAreFresh ? ((_b2 = hook.resumeCapabilities) == null ? void 0 : _b2.hookResumeDedupVersion) ?? 0 : 0) >= HOOK_RESUME_DEDUP_VERSION || ((_c2 = world.capabilities) == null ? void 0 : _c2.hookResumeDedup) === true;
148656
- const fallbackReason = parallelResumeDisabled ? "disabled" : !backendDedupSupported ? "backend_unsupported" : (resumeContext.hookResumeInputVersion ?? 0) < HOOK_RESUME_INPUT_VERSION ? "consumer_unsupported" : v1Compat ? "legacy" : (resumeContext.runSpecVersion ?? 0) < SPEC_VERSION_SUPPORTS_CBOR_QUEUE_TRANSPORT ? "non_cbor_transport" : !(dehydratedPayload instanceof Uint8Array) ? "non_bytes" : dehydratedPayload.byteLength > MAX_INLINE_RESUME_PAYLOAD_BYTES ? "oversized" : null;
148657
- const useParallelResume = fallbackReason === null;
148681
+ const fallbackReason = requireDurableWrite ? (
148682
+ // An internal caller needs the event committed before this
148683
+ // resolves (an ordering barrier), which only the eager write
148684
+ // provides. Checked first so the span names the real reason
148685
+ // rather than whichever gate happens to fail alongside it.
148686
+ "durable_required"
148687
+ ) : lazyResumeDisabled ? "disabled" : !backendDedupSupported ? "backend_unsupported" : (resumeContext.hookResumeInputVersion ?? 0) < HOOK_RESUME_INPUT_VERSION ? "consumer_unsupported" : v1Compat ? "legacy" : (resumeContext.runSpecVersion ?? 0) < SPEC_VERSION_SUPPORTS_CBOR_QUEUE_TRANSPORT ? "non_cbor_transport" : !(dehydratedPayload instanceof Uint8Array) ? "non_bytes" : dehydratedPayload.byteLength > MAX_INLINE_RESUME_PAYLOAD_BYTES ? "oversized" : null;
148688
+ const useLazyResume = fallbackReason === null;
148658
148689
  span == null ? void 0 : span.setAttributes({
148659
- "workflow.hook.resume_strategy": useParallelResume ? "parallel" : "sequential",
148690
+ "workflow.hook.resume_strategy": useLazyResume ? "lazy" : "sequential",
148660
148691
  ...fallbackReason ? { "workflow.hook.resume_fallback_reason": fallbackReason } : {}
148661
148692
  });
148662
- const isHookGoneError = (err) => HookNotFoundError.is(err) || EntityConflictError.is(err) || RunExpiredError.is(err);
148663
- if (!useParallelResume) {
148693
+ if (!useLazyResume) {
148694
+ const isHookGoneError = (err) => HookNotFoundError.is(err) || EntityConflictError.is(err) || RunExpiredError.is(err);
148664
148695
  try {
148665
148696
  await world.events.create(hook.runId, {
148666
148697
  eventType: "hook_received",
148667
148698
  specVersion: SPEC_VERSION_CURRENT,
148668
148699
  correlationId: hook.hookId,
148669
- eventData
148700
+ eventData: {
148701
+ ...v1Compat ? {} : { token: hook.token },
148702
+ payload: dehydratedPayload
148703
+ }
148670
148704
  }, { v1Compat });
148671
148705
  } catch (err) {
148672
148706
  if (isHookGoneError(err)) {
@@ -148674,13 +148708,13 @@ async function resumeHookImpl(tokenOrHook, payload, encryptionKeyOverride, hookF
148674
148708
  }
148675
148709
  throw err;
148676
148710
  }
148677
- const queuePublishRequestedAtMs = Date.now();
148711
+ const queuePublishRequestedAtMs2 = Date.now();
148678
148712
  await world.queue(queueName, {
148679
148713
  runId: hook.runId,
148680
148714
  traceCarrier: resumeContext.traceCarrier ?? void 0,
148681
148715
  hookResumeTiming: {
148682
148716
  resumeRequestedAtMs,
148683
- queuePublishRequestedAtMs,
148717
+ queuePublishRequestedAtMs: queuePublishRequestedAtMs2,
148684
148718
  strategy: "sequential"
148685
148719
  }
148686
148720
  }, queueOptions);
@@ -148689,65 +148723,28 @@ async function resumeHookImpl(tokenOrHook, payload, encryptionKeyOverride, hookF
148689
148723
  const resumeId = generateResumeId();
148690
148724
  const payloadDigest = await computeResumePayloadDigest(dehydratedPayload);
148691
148725
  span == null ? void 0 : span.setAttributes({ "workflow.hook.resume_id": resumeId });
148692
- const publishInvocation = () => {
148693
- const queuePublishRequestedAtMs = Date.now();
148694
- return world.queue(queueName, {
148695
- runId: hook.runId,
148696
- traceCarrier: resumeContext.traceCarrier ?? void 0,
148697
- hookInput: {
148698
- resumeId,
148699
- hookId: hook.hookId,
148700
- token: hook.token,
148701
- payload: dehydratedPayload,
148702
- payloadDigest,
148703
- // Deployment affinity for the consumer's cheap pre-write
148704
- // check: lets a misrouted delivery re-route before its
148705
- // hoisted hook_received write instead of after.
148706
- deploymentId: resumeContext.deploymentId
148707
- },
148708
- hookResumeTiming: {
148709
- resumeRequestedAtMs,
148710
- queuePublishRequestedAtMs,
148711
- strategy: "parallel"
148712
- }
148713
- }, queueOptions);
148714
- };
148715
- const [eventResult, queueResult] = await Promise.allSettled([
148716
- world.events.create(hook.runId, {
148717
- eventType: "hook_received",
148718
- specVersion: SPEC_VERSION_CURRENT,
148719
- correlationId: hook.hookId,
148720
- eventData
148721
- }, { v1Compat, resumeId, resumePayloadDigest: payloadDigest }),
148722
- publishInvocation()
148723
- ]);
148724
- if (queueResult.status === "rejected") {
148725
- throw queueResult.reason;
148726
- }
148727
- let resilientResume = false;
148728
- if (eventResult.status === "rejected") {
148729
- const err = eventResult.reason;
148730
- if (HookNotFoundError.is(err) || RunExpiredError.is(err)) {
148731
- throw new HookNotFoundError(hook.token);
148732
- }
148733
- if (EntityConflictError.is(err) || isRetryableWorldError(err)) {
148734
- resilientResume = true;
148735
- span == null ? void 0 : span.setAttributes({
148736
- ...HookResilientResume(true),
148737
- "workflow.hook.resume_event_write_recovered": true,
148738
- "workflow.hook.resume_event_write_error": err instanceof Error ? err.name : "unknown"
148739
- });
148740
- runtimeLogger.warn("Hook resume event write failed, but the run was re-triggered via the queue. The hook_received event will be ensured by the queue consumer.", {
148741
- workflowRunId: hook.runId,
148742
- hookId: hook.hookId,
148743
- resumeId,
148744
- error: err instanceof Error ? err.message : String(err)
148745
- });
148746
- } else {
148747
- throw err;
148726
+ const queuePublishRequestedAtMs = Date.now();
148727
+ await world.queue(queueName, {
148728
+ runId: hook.runId,
148729
+ traceCarrier: resumeContext.traceCarrier ?? void 0,
148730
+ hookInput: {
148731
+ resumeId,
148732
+ hookId: hook.hookId,
148733
+ token: hook.token,
148734
+ payload: dehydratedPayload,
148735
+ payloadDigest,
148736
+ // Deployment affinity for the consumer's cheap pre-write
148737
+ // check: lets a misrouted delivery re-route before its
148738
+ // hoisted hook_received write instead of after.
148739
+ deploymentId: resumeContext.deploymentId
148740
+ },
148741
+ hookResumeTiming: {
148742
+ resumeRequestedAtMs,
148743
+ queuePublishRequestedAtMs,
148744
+ strategy: "lazy"
148748
148745
  }
148749
- }
148750
- return resilientResume ? { ...hook, resilientResume: true } : hook;
148746
+ }, queueOptions);
148747
+ return hook;
148751
148748
  } catch (err) {
148752
148749
  span == null ? void 0 : span.setAttributes({
148753
148750
  ...HookToken(typeof tokenOrHook === "string" ? tokenOrHook : tokenOrHook.token),
@@ -148779,7 +148776,7 @@ async function resumeWebhook(token, request2) {
148779
148776
  } else {
148780
148777
  response2 = new Response(null, { status: 202 });
148781
148778
  }
148782
- await resumeHookImpl(hook, request2, encryptionKey, true, resumeRequestedAtMs);
148779
+ await resumeHookImpl(hook, request2, encryptionKey, true, resumeRequestedAtMs, false);
148783
148780
  if (responseReadable) {
148784
148781
  const reader = responseReadable.getReader();
148785
148782
  const chunk = await reader.read();
@@ -148799,6 +148796,7 @@ const resumeHook$3 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.define
148799
148796
  __proto__: null,
148800
148797
  getHookByToken,
148801
148798
  resumeHook: resumeHook$2,
148799
+ resumeHookDurable,
148802
148800
  resumeWebhook
148803
148801
  }, Symbol.toStringTag, { value: "Module" }));
148804
148802
  function normalizeAttributeChanges(attrs, options = {}) {
@@ -172724,7 +172722,7 @@ const route4 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProper
172724
172722
  __proto__: null,
172725
172723
  loader
172726
172724
  }, Symbol.toStringTag, { value: "Module" }));
172727
- const serverManifest = { "entry": { "module": "/assets/entry.client-LwI3HNYl.js", "imports": ["/assets/index-PFjW8YjQ.js"], "css": [] }, "routes": { "root": { "id": "root", "parentId": void 0, "path": "", "index": void 0, "caseSensitive": void 0, "hasAction": true, "hasLoader": true, "hasClientAction": false, "hasClientLoader": false, "hasClientMiddleware": false, "hasDefaultExport": true, "hasErrorBoundary": true, "module": "/assets/root-e8qlLJiK.js", "imports": ["/assets/index-PFjW8YjQ.js", "/assets/mermaid-3ZIDBTTL-CrfHaTou.js", "/assets/loader-circle-abAcDEYl.js", "/assets/arrow-up-right-AtCpRI70.js"], "css": ["/assets/root-Bl5xphvU.css", "/assets/mermaid-3ZIDBTTL-D8CjRQta.css"], "clientActionModule": void 0, "clientLoaderModule": void 0, "clientMiddlewareModule": void 0, "hydrateFallbackModule": void 0 }, "routes/home": { "id": "routes/home", "parentId": "root", "path": void 0, "index": true, "caseSensitive": void 0, "hasAction": false, "hasLoader": false, "hasClientAction": false, "hasClientLoader": false, "hasClientMiddleware": false, "hasDefaultExport": true, "hasErrorBoundary": false, "module": "/assets/home-BMHSjdeg.js", "imports": ["/assets/index-PFjW8YjQ.js", "/assets/workflow-graph-viewer-CFAXloBw.js", "/assets/mermaid-3ZIDBTTL-CrfHaTou.js", "/assets/loader-circle-abAcDEYl.js"], "css": ["/assets/workflow-graph-viewer-DnlNuQQH.css", "/assets/mermaid-3ZIDBTTL-D8CjRQta.css"], "clientActionModule": void 0, "clientLoaderModule": void 0, "clientMiddlewareModule": void 0, "hydrateFallbackModule": void 0 }, "routes/run-detail": { "id": "routes/run-detail", "parentId": "root", "path": "run/:runId", "index": void 0, "caseSensitive": void 0, "hasAction": false, "hasLoader": false, "hasClientAction": false, "hasClientLoader": false, "hasClientMiddleware": false, "hasDefaultExport": true, "hasErrorBoundary": false, "module": "/assets/run-detail-CrWq-9Tk.js", "imports": ["/assets/index-PFjW8YjQ.js", "/assets/workflow-graph-viewer-CFAXloBw.js", "/assets/mermaid-3ZIDBTTL-CrfHaTou.js", "/assets/arrow-up-right-AtCpRI70.js"], "css": ["/assets/run-detail-CWoGxu_0.css", "/assets/workflow-graph-viewer-DnlNuQQH.css", "/assets/mermaid-3ZIDBTTL-D8CjRQta.css"], "clientActionModule": void 0, "clientLoaderModule": void 0, "clientMiddlewareModule": void 0, "hydrateFallbackModule": void 0 }, "routes/api.rpc": { "id": "routes/api.rpc", "parentId": "root", "path": "api/rpc", "index": void 0, "caseSensitive": void 0, "hasAction": true, "hasLoader": true, "hasClientAction": false, "hasClientLoader": false, "hasClientMiddleware": false, "hasDefaultExport": false, "hasErrorBoundary": false, "module": "/assets/api.rpc-l0sNRNKZ.js", "imports": [], "css": [], "clientActionModule": void 0, "clientLoaderModule": void 0, "clientMiddlewareModule": void 0, "hydrateFallbackModule": void 0 }, "routes/api.stream.$streamId": { "id": "routes/api.stream.$streamId", "parentId": "root", "path": "api/stream/:streamId", "index": void 0, "caseSensitive": void 0, "hasAction": false, "hasLoader": true, "hasClientAction": false, "hasClientLoader": false, "hasClientMiddleware": false, "hasDefaultExport": false, "hasErrorBoundary": false, "module": "/assets/api.stream._streamId-l0sNRNKZ.js", "imports": [], "css": [], "clientActionModule": void 0, "clientLoaderModule": void 0, "clientMiddlewareModule": void 0, "hydrateFallbackModule": void 0 } }, "url": "/assets/manifest-a9a8ec99.js", "version": "a9a8ec99", "sri": void 0 };
172725
+ const serverManifest = { "entry": { "module": "/assets/entry.client-LwI3HNYl.js", "imports": ["/assets/index-PFjW8YjQ.js"], "css": [] }, "routes": { "root": { "id": "root", "parentId": void 0, "path": "", "index": void 0, "caseSensitive": void 0, "hasAction": true, "hasLoader": true, "hasClientAction": false, "hasClientLoader": false, "hasClientMiddleware": false, "hasDefaultExport": true, "hasErrorBoundary": true, "module": "/assets/root-Zvnb602n.js", "imports": ["/assets/index-PFjW8YjQ.js", "/assets/mermaid-3ZIDBTTL-BKGEyEYb.js", "/assets/loader-circle-oscnpy3L.js", "/assets/arrow-up-right-UOc2WcaC.js"], "css": ["/assets/root-Bl5xphvU.css", "/assets/mermaid-3ZIDBTTL-D8CjRQta.css"], "clientActionModule": void 0, "clientLoaderModule": void 0, "clientMiddlewareModule": void 0, "hydrateFallbackModule": void 0 }, "routes/home": { "id": "routes/home", "parentId": "root", "path": void 0, "index": true, "caseSensitive": void 0, "hasAction": false, "hasLoader": false, "hasClientAction": false, "hasClientLoader": false, "hasClientMiddleware": false, "hasDefaultExport": true, "hasErrorBoundary": false, "module": "/assets/home-DYB1uz9w.js", "imports": ["/assets/index-PFjW8YjQ.js", "/assets/workflow-graph-viewer-Du0ztkb8.js", "/assets/mermaid-3ZIDBTTL-BKGEyEYb.js", "/assets/loader-circle-oscnpy3L.js"], "css": ["/assets/workflow-graph-viewer-DnlNuQQH.css", "/assets/mermaid-3ZIDBTTL-D8CjRQta.css"], "clientActionModule": void 0, "clientLoaderModule": void 0, "clientMiddlewareModule": void 0, "hydrateFallbackModule": void 0 }, "routes/run-detail": { "id": "routes/run-detail", "parentId": "root", "path": "run/:runId", "index": void 0, "caseSensitive": void 0, "hasAction": false, "hasLoader": false, "hasClientAction": false, "hasClientLoader": false, "hasClientMiddleware": false, "hasDefaultExport": true, "hasErrorBoundary": false, "module": "/assets/run-detail-CedyZW9h.js", "imports": ["/assets/index-PFjW8YjQ.js", "/assets/workflow-graph-viewer-Du0ztkb8.js", "/assets/mermaid-3ZIDBTTL-BKGEyEYb.js", "/assets/arrow-up-right-UOc2WcaC.js"], "css": ["/assets/run-detail-CWoGxu_0.css", "/assets/workflow-graph-viewer-DnlNuQQH.css", "/assets/mermaid-3ZIDBTTL-D8CjRQta.css"], "clientActionModule": void 0, "clientLoaderModule": void 0, "clientMiddlewareModule": void 0, "hydrateFallbackModule": void 0 }, "routes/api.rpc": { "id": "routes/api.rpc", "parentId": "root", "path": "api/rpc", "index": void 0, "caseSensitive": void 0, "hasAction": true, "hasLoader": true, "hasClientAction": false, "hasClientLoader": false, "hasClientMiddleware": false, "hasDefaultExport": false, "hasErrorBoundary": false, "module": "/assets/api.rpc-l0sNRNKZ.js", "imports": [], "css": [], "clientActionModule": void 0, "clientLoaderModule": void 0, "clientMiddlewareModule": void 0, "hydrateFallbackModule": void 0 }, "routes/api.stream.$streamId": { "id": "routes/api.stream.$streamId", "parentId": "root", "path": "api/stream/:streamId", "index": void 0, "caseSensitive": void 0, "hasAction": false, "hasLoader": true, "hasClientAction": false, "hasClientLoader": false, "hasClientMiddleware": false, "hasDefaultExport": false, "hasErrorBoundary": false, "module": "/assets/api.stream._streamId-l0sNRNKZ.js", "imports": [], "css": [], "clientActionModule": void 0, "clientLoaderModule": void 0, "clientMiddlewareModule": void 0, "hydrateFallbackModule": void 0 } }, "url": "/assets/manifest-a701502a.js", "version": "a701502a", "sri": void 0 };
172728
172726
  const assetsBuildDirectory = "build/client";
172729
172727
  const basename = "/";
172730
172728
  const future = { "unstable_optimizeDeps": false, "unstable_subResourceIntegrity": false, "unstable_trailingSlashAwareDataRequests": false, "unstable_previewServerPrerendering": false, "v8_middleware": false, "v8_splitRouteModules": false, "v8_viteEnvironmentApi": false };
@@ -172938,7 +172936,7 @@ export {
172938
172936
  BULK_CANCEL_MAX_RUN_IDS as B,
172939
172937
  CHILD_ENTITY_CREATION_EVENT_TYPES as C,
172940
172938
  DEFAULT_TIMESTAMP_THRESHOLD_FUTURE_MS as D,
172941
- EVENT_DATA_PAYLOAD_FIELD_BY_EVENT_TYPE as E,
172939
+ EVENT_ID_BODY_LENGTH as E,
172942
172940
  FIRST_EVENT_SLOT as F,
172943
172941
  HealthCheckPayloadSchema as G,
172944
172942
  HookSchema as H,
@@ -172962,7 +172960,7 @@ export {
172962
172960
  SPEC_VERSION_MAX_SUPPORTED as Z,
172963
172961
  SPEC_VERSION_SUPPORTS_ATTRIBUTES as _,
172964
172962
  ATTRIBUTE_KEY_MAX_LENGTH as a,
172965
- jsxRuntimeExports as a$,
172963
+ registerZstdDecoder as a$,
172966
172964
  SPEC_VERSION_SUPPORTS_COMPRESSION as a0,
172967
172965
  SPEC_VERSION_SUPPORTS_SEALED_LOG as a1,
172968
172966
  SPEC_VERSION_SUPPORTS_SLOT_IDENTITY as a2,
@@ -172993,13 +172991,13 @@ export {
172993
172991
  stripEventDataRefs as aR,
172994
172992
  ulidToDate as aS,
172995
172993
  validateAttributeChanges as aT,
172996
- validateAttributeKey as aU,
172997
- validateAttributeValue as aV,
172998
- validateUlidTimestamp as aW,
172999
- workflowRunIdSchema as aX,
173000
- reactExports as aY,
173001
- R as aZ,
173002
- Ks as a_,
172994
+ validateUlidTimestamp as aU,
172995
+ workflowRunIdSchema as aV,
172996
+ reactExports as aW,
172997
+ R as aX,
172998
+ Ks as aY,
172999
+ jsxRuntimeExports as aZ,
173000
+ Qe as a_,
173003
173001
  TERMINAL_STEP_STATUSES as aa,
173004
173002
  TERMINAL_WORKFLOW_RUN_STATUSES as ab,
173005
173003
  TerminalRunEventTypeSchema as ac,
@@ -173027,29 +173025,27 @@ export {
173027
173025
  isHookEventRequiringExistence as ay,
173028
173026
  isHookLifecycleEventType as az,
173029
173027
  ATTRIBUTE_MAX_PER_RUN as b,
173030
- Qe as b0,
173031
- registerZstdDecoder as b1,
173032
- isWsEventsTransportEnabled as b2,
173033
- getHttpUrl as b3,
173034
- globalSingleton as b4,
173035
- version as b5,
173036
- getHttpConfig as b6,
173037
- headersToRecord as b7,
173038
- getRequestTimeoutMs as b8,
173039
- injectTraceContextIntoHeaders as b9,
173040
- withHttpClientSpan as ba,
173041
- ErrorType as bb,
173042
- WorkflowWsReconnectAttempt as bc,
173043
- NetworkProtocolName as bd,
173044
- WorkflowEventsTransport as be,
173045
- distExports as bf,
173046
- decodeFrames as bg,
173047
- getDefaultExportFromCjs as bh,
173048
- requireTokenUtil as bi,
173049
- requireTokenError as bj,
173050
- getAugmentedNamespace as bk,
173051
- app as bl,
173052
- createFetchHandler as bm,
173028
+ isWsEventsTransportEnabled as b0,
173029
+ getHttpUrl as b1,
173030
+ globalSingleton as b2,
173031
+ version as b3,
173032
+ getHttpConfig as b4,
173033
+ headersToRecord as b5,
173034
+ getRequestTimeoutMs as b6,
173035
+ injectTraceContextIntoHeaders as b7,
173036
+ withHttpClientSpan as b8,
173037
+ ErrorType as b9,
173038
+ WorkflowWsReconnectAttempt as ba,
173039
+ NetworkProtocolName as bb,
173040
+ WorkflowEventsTransport as bc,
173041
+ distExports as bd,
173042
+ decodeFrames as be,
173043
+ getDefaultExportFromCjs as bf,
173044
+ requireTokenUtil as bg,
173045
+ requireTokenError as bh,
173046
+ getAugmentedNamespace as bi,
173047
+ app as bj,
173048
+ createFetchHandler as bk,
173053
173049
  ATTRIBUTE_VALUE_MAX_BYTES as c,
173054
173050
  AnalyticsAttributeKeySchema as d,
173055
173051
  AnalyticsEventSchema as e,
@@ -173059,14 +173055,14 @@ export {
173059
173055
  AnalyticsWaitSchema as i,
173060
173056
  AttributeChangeSchema as j,
173061
173057
  AttributeChangesSchema as k,
173062
- AttributeValidationError as l,
173063
- BaseEventSchema as m,
173064
- BulkCancelWorkflowRunResultSchema as n,
173065
- BulkCancelWorkflowRunsRequestSchema as o,
173066
- BulkCancelWorkflowRunsResultSchema as p,
173067
- DEFAULT_TIMESTAMP_THRESHOLD_PAST_MS as q,
173068
- EVENT_DATA_REF_FIELDS as r,
173069
- EVENT_ID_BODY_LENGTH as s,
173058
+ AttributeKeySchema as l,
173059
+ AttributeValidationError as m,
173060
+ AttributeValueSchema as n,
173061
+ BaseEventSchema as o,
173062
+ BulkCancelWorkflowRunResultSchema as p,
173063
+ BulkCancelWorkflowRunsRequestSchema as q,
173064
+ BulkCancelWorkflowRunsResultSchema as r,
173065
+ DEFAULT_TIMESTAMP_THRESHOLD_PAST_MS as s,
173070
173066
  EVENT_ID_PREFIX as t,
173071
173067
  EventSchema as u,
173072
173068
  EventTypeSchema as v,