@workflow/web 5.0.0-beta.31 → 5.0.0-beta.33

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 (20) hide show
  1. package/build/client/assets/{arrow-up-right-UTJqZa58.js → arrow-up-right-B1QFlETT.js} +1 -1
  2. package/build/client/assets/{highlighted-body-B3W2YXNL-BJU4jA-M.js → highlighted-body-B3W2YXNL-Br23zjGQ.js} +1 -1
  3. package/build/client/assets/{home-1xisMAzt.js → home-rmBMtWNr.js} +2 -2
  4. package/build/client/assets/{manifest-37d4814f.js → manifest-9dd3e2d8.js} +1 -1
  5. package/build/client/assets/{mermaid-3ZIDBTTL-BxUZpfmG.js → mermaid-3ZIDBTTL-CQtb_4FN.js} +30 -14
  6. package/build/client/assets/{root-mjlqO83r.js → root-CraFPjyT.js} +2 -2
  7. package/build/client/assets/{run-detail-ysogMwZA.js → run-detail-BGHjSgVx.js} +3 -3
  8. package/build/client/assets/{workflow-graph-viewer-DpvUticH.js → workflow-graph-viewer-Cn2fThMy.js} +1 -1
  9. package/build/client/assets/{zstd-browser-decoder-BFS0fmpR.js → zstd-browser-decoder-BjHfY5Rj.js} +1 -1
  10. package/build/server/assets/{app-BgN_e9S7.js → app-YT2nFLf8.js} +1 -1
  11. package/build/server/assets/{highlighted-body-B3W2YXNL-CsR2wqX2.js → highlighted-body-B3W2YXNL-6aglRJd5.js} +2 -2
  12. package/build/server/assets/index-DtD2dyVs.js +133 -0
  13. package/build/server/assets/{mermaid-3ZIDBTTL-B-ddv9lk.js → mermaid-3ZIDBTTL-C_fIZXpA.js} +2 -2
  14. package/build/server/assets/{server-build-CQLvkWL5.js → server-build-riD1HycA.js} +545 -162
  15. package/build/server/assets/{token-Batv2rdg.js → token-ep3Bro6L.js} +2 -2
  16. package/build/server/assets/{token-util-C03rrkmJ.js → token-util-BjIqTaA8.js} +2 -2
  17. package/build/server/assets/{zstd-browser-decoder-vLGtEQW6.js → zstd-browser-decoder-CX-ryJFu.js} +2 -2
  18. package/build/server/index.js +1 -1
  19. package/package.json +6 -6
  20. package/build/server/assets/index-BbpsBsGO.js +0 -132
@@ -18,7 +18,7 @@ import { createRequire as __wkfCreateRequire } from "node:module";
18
18
  if (typeof require === "undefined") {
19
19
  globalThis.require = __wkfCreateRequire(import.meta.url);
20
20
  }
21
- import { a as requireReact, S as ServerRouter, c as createReadableStreamFromReadable, r as reactExports, g as getDefaultExportFromCjs, R as React, b as ReactExports, w as withComponentProps, d as withErrorBoundaryProps, M as Meta, L as Links, e as ScrollRestoration, f as Scripts, O as Outlet, u as useNavigate, h as useSearchParams, i as Link$1, j as useRouteError, k as isRouteErrorResponse, l as useLocation, m as useParams } from "./app-BgN_e9S7.js";
21
+ import { a as requireReact, S as ServerRouter, c as createReadableStreamFromReadable, r as reactExports, g as getDefaultExportFromCjs, R as React, b as ReactExports, w as withComponentProps, d as withErrorBoundaryProps, M as Meta, L as Links, e as ScrollRestoration, f as Scripts, O as Outlet, u as useNavigate, h as useSearchParams, i as Link$1, j as useRouteError, k as isRouteErrorResponse, l as useLocation, m as useParams } from "./app-YT2nFLf8.js";
22
22
  import require$$0$4, { PassThrough } from "node:stream";
23
23
  import require$$0 from "util";
24
24
  import require$$1 from "crypto";
@@ -35067,11 +35067,11 @@ const _encode = (_Err) => (schema, value, _ctx) => {
35067
35067
  const ctx = _ctx ? Object.assign(_ctx, { direction: "backward" }) : { direction: "backward" };
35068
35068
  return _parse(_Err)(schema, value, ctx);
35069
35069
  };
35070
- const encode$2 = /* @__PURE__ */ _encode($ZodRealError);
35070
+ const encode$3 = /* @__PURE__ */ _encode($ZodRealError);
35071
35071
  const _decode = (_Err) => (schema, value, _ctx) => {
35072
35072
  return _parse(_Err)(schema, value, _ctx);
35073
35073
  };
35074
- const decode$3 = /* @__PURE__ */ _decode($ZodRealError);
35074
+ const decode$4 = /* @__PURE__ */ _decode($ZodRealError);
35075
35075
  const _encodeAsync = (_Err) => async (schema, value, _ctx) => {
35076
35076
  const ctx = _ctx ? Object.assign(_ctx, { direction: "backward" }) : { direction: "backward" };
35077
35077
  return _parseAsync(_Err)(schema, value, ctx);
@@ -35101,7 +35101,7 @@ const _safeDecodeAsync = (_Err) => async (schema, value, _ctx) => {
35101
35101
  const safeDecodeAsync$1 = /* @__PURE__ */ _safeDecodeAsync($ZodRealError);
35102
35102
  const cuid$1 = /^[cC][^\s-]{8,}$/;
35103
35103
  const cuid2$1 = /^[0-9a-z]+$/;
35104
- const ulid$3 = /^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/;
35104
+ const ulid$4 = /^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/;
35105
35105
  const xid$1 = /^[0-9a-vA-V]{20}$/;
35106
35106
  const ksuid$1 = /^[A-Za-z0-9]{27}$/;
35107
35107
  const nanoid$1 = /^[a-zA-Z0-9_-]{21}$/;
@@ -35244,7 +35244,7 @@ const regexes = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.definePrope
35244
35244
  sha512_hex,
35245
35245
  string: string$4,
35246
35246
  time: time$1,
35247
- ulid: ulid$3,
35247
+ ulid: ulid$4,
35248
35248
  undefined: _undefined$2,
35249
35249
  unicodeEmail,
35250
35250
  uppercase,
@@ -36075,7 +36075,7 @@ const $ZodCUID2 = /* @__PURE__ */ $constructor("$ZodCUID2", (inst, def) => {
36075
36075
  $ZodStringFormat.init(inst, def);
36076
36076
  });
36077
36077
  const $ZodULID = /* @__PURE__ */ $constructor("$ZodULID", (inst, def) => {
36078
- def.pattern ?? (def.pattern = ulid$3);
36078
+ def.pattern ?? (def.pattern = ulid$4);
36079
36079
  $ZodStringFormat.init(inst, def);
36080
36080
  });
36081
36081
  const $ZodXID = /* @__PURE__ */ $constructor("$ZodXID", (inst, def) => {
@@ -45618,10 +45618,10 @@ const index$2 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.definePrope
45618
45618
  config: config$1,
45619
45619
  createStandardJSONSchemaMethod,
45620
45620
  createToJSONSchemaMethod,
45621
- decode: decode$3,
45621
+ decode: decode$4,
45622
45622
  decodeAsync: decodeAsync$1,
45623
45623
  describe: describe$1,
45624
- encode: encode$2,
45624
+ encode: encode$3,
45625
45625
  encodeAsync: encodeAsync$1,
45626
45626
  extractDefs,
45627
45627
  finalize,
@@ -45766,8 +45766,8 @@ const parse$6 = /* @__PURE__ */ _parse(ZodRealError);
45766
45766
  const parseAsync = /* @__PURE__ */ _parseAsync(ZodRealError);
45767
45767
  const safeParse = /* @__PURE__ */ _safeParse(ZodRealError);
45768
45768
  const safeParseAsync = /* @__PURE__ */ _safeParseAsync(ZodRealError);
45769
- const encode$1 = /* @__PURE__ */ _encode(ZodRealError);
45770
- const decode$2 = /* @__PURE__ */ _decode(ZodRealError);
45769
+ const encode$2 = /* @__PURE__ */ _encode(ZodRealError);
45770
+ const decode$3 = /* @__PURE__ */ _decode(ZodRealError);
45771
45771
  const encodeAsync = /* @__PURE__ */ _encodeAsync(ZodRealError);
45772
45772
  const decodeAsync = /* @__PURE__ */ _decodeAsync(ZodRealError);
45773
45773
  const safeEncode = /* @__PURE__ */ _safeEncode(ZodRealError);
@@ -45808,8 +45808,8 @@ const ZodType = /* @__PURE__ */ $constructor("ZodType", (inst, def) => {
45808
45808
  inst.parseAsync = async (data, params) => parseAsync(inst, data, params, { callee: inst.parseAsync });
45809
45809
  inst.safeParseAsync = async (data, params) => safeParseAsync(inst, data, params);
45810
45810
  inst.spa = inst.safeParseAsync;
45811
- inst.encode = (data, params) => encode$1(inst, data, params);
45812
- inst.decode = (data, params) => decode$2(inst, data, params);
45811
+ inst.encode = (data, params) => encode$2(inst, data, params);
45812
+ inst.decode = (data, params) => decode$3(inst, data, params);
45813
45813
  inst.encodeAsync = async (data, params) => encodeAsync(inst, data, params);
45814
45814
  inst.decodeAsync = async (data, params) => decodeAsync(inst, data, params);
45815
45815
  inst.safeEncode = (data, params) => safeEncode(inst, data, params);
@@ -45996,7 +45996,7 @@ const ZodULID = /* @__PURE__ */ $constructor("ZodULID", (inst, def) => {
45996
45996
  $ZodULID.init(inst, def);
45997
45997
  ZodStringFormat.init(inst, def);
45998
45998
  });
45999
- function ulid$2(params) {
45999
+ function ulid$3(params) {
46000
46000
  return /* @__PURE__ */ _ulid(ZodULID, params);
46001
46001
  }
46002
46002
  const ZodXID = /* @__PURE__ */ $constructor("ZodXID", (inst, def) => {
@@ -47006,7 +47006,7 @@ const _schemas = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProp
47006
47006
  tuple,
47007
47007
  uint32,
47008
47008
  uint64,
47009
- ulid: ulid$2,
47009
+ ulid: ulid$3,
47010
47010
  undefined: _undefined,
47011
47011
  union,
47012
47012
  unknown: unknown$1,
@@ -47646,14 +47646,14 @@ const z$2 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty(
47646
47646
  cuid2,
47647
47647
  custom,
47648
47648
  date: date$3,
47649
- decode: decode$2,
47649
+ decode: decode$3,
47650
47650
  decodeAsync,
47651
47651
  describe,
47652
47652
  discriminatedUnion,
47653
47653
  e164,
47654
47654
  email,
47655
47655
  emoji,
47656
- encode: encode$1,
47656
+ encode: encode$2,
47657
47657
  encodeAsync,
47658
47658
  endsWith: _endsWith,
47659
47659
  enum: _enum,
@@ -47765,7 +47765,7 @@ const z$2 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty(
47765
47765
  tuple,
47766
47766
  uint32,
47767
47767
  uint64,
47768
- ulid: ulid$2,
47768
+ ulid: ulid$3,
47769
47769
  undefined: _undefined,
47770
47770
  union,
47771
47771
  unknown: unknown$1,
@@ -48475,7 +48475,14 @@ const WaitSchema = object$1({
48475
48475
  updatedAt: date$2(),
48476
48476
  specVersion: number$3().optional()
48477
48477
  });
48478
- const NullableDateSchema = date$2().nullable().optional();
48478
+ const NAIVE_DATETIME = /^\d{4}-\d{2}-\d{2}[ T]\d{2}:\d{2}:\d{2}(?:\.\d+)?$/;
48479
+ const UTCDateSchema = preprocess$1((value) => {
48480
+ if (typeof value === "string" && NAIVE_DATETIME.test(value)) {
48481
+ return `${value.replace(" ", "T")}Z`;
48482
+ }
48483
+ return value;
48484
+ }, date$2());
48485
+ const NullableDateSchema = UTCDateSchema.nullable().optional();
48479
48486
  const NullableStringSchema = string$3().nullable().optional();
48480
48487
  const NullableBooleanSchema = boolean$3().nullable().optional();
48481
48488
  const AnalyticsRunSchema = object$1({
@@ -48485,8 +48492,8 @@ const AnalyticsRunSchema = object$1({
48485
48492
  workflowName: string$3(),
48486
48493
  specVersion: number$2().optional(),
48487
48494
  attributes: record(string$3(), string$3()).default({}),
48488
- createdAt: date$2(),
48489
- updatedAt: date$2(),
48495
+ createdAt: UTCDateSchema,
48496
+ updatedAt: UTCDateSchema,
48490
48497
  startedAt: NullableDateSchema,
48491
48498
  completedAt: NullableDateSchema,
48492
48499
  errorCode: NullableStringSchema,
@@ -48499,8 +48506,8 @@ const AnalyticsStepSchema = object$1({
48499
48506
  stepName: NullableStringSchema,
48500
48507
  status: StepStatusSchema,
48501
48508
  attempt: number$3().optional(),
48502
- createdAt: date$2(),
48503
- updatedAt: date$2(),
48509
+ createdAt: UTCDateSchema,
48510
+ updatedAt: UTCDateSchema,
48504
48511
  startedAt: NullableDateSchema,
48505
48512
  completedAt: NullableDateSchema,
48506
48513
  retryAfter: NullableDateSchema,
@@ -48518,8 +48525,8 @@ const AnalyticsEventSchema = object$1({
48518
48525
  workflowName: string$3(),
48519
48526
  deploymentId: string$3(),
48520
48527
  specVersion: number$2().optional(),
48521
- runCreatedAt: date$2(),
48522
- createdAt: date$2(),
48528
+ runCreatedAt: UTCDateSchema,
48529
+ createdAt: UTCDateSchema,
48523
48530
  region: NullableStringSchema,
48524
48531
  vercelId: NullableStringSchema,
48525
48532
  requestId: NullableStringSchema,
@@ -48535,8 +48542,8 @@ const AnalyticsHookSchema = object$1({
48535
48542
  runId: string$3(),
48536
48543
  hookId: string$3(),
48537
48544
  status: _enum(["created", "received", "disposed", "conflict"]),
48538
- createdAt: date$2(),
48539
- updatedAt: date$2(),
48545
+ createdAt: UTCDateSchema,
48546
+ updatedAt: UTCDateSchema,
48540
48547
  receivedAt: NullableDateSchema,
48541
48548
  disposedAt: NullableDateSchema,
48542
48549
  isWebhook: NullableBooleanSchema,
@@ -48549,12 +48556,18 @@ const AnalyticsWaitSchema = object$1({
48549
48556
  waitId: string$3(),
48550
48557
  status: WaitStatusSchema,
48551
48558
  resumeAt: NullableDateSchema,
48552
- createdAt: date$2(),
48553
- updatedAt: date$2(),
48559
+ createdAt: UTCDateSchema,
48560
+ updatedAt: UTCDateSchema,
48554
48561
  completedAt: NullableDateSchema,
48555
48562
  workflowCoreVersion: NullableStringSchema,
48556
48563
  workflowEncryptionEnabled: NullableBooleanSchema
48557
48564
  });
48565
+ const AnalyticsAttributeKeySchema = object$1({
48566
+ key: string$3(),
48567
+ runCount: number$2(),
48568
+ firstSeenAt: date$2(),
48569
+ lastSeenAt: date$2()
48570
+ });
48558
48571
  const warnedEnvValues = /* @__PURE__ */ new Set();
48559
48572
  function warnOnce(key, message2) {
48560
48573
  if (warnedEnvValues.has(key))
@@ -48744,7 +48757,7 @@ function requiresNewerWorld(v2) {
48744
48757
  return false;
48745
48758
  return v2 > SPEC_VERSION_CURRENT;
48746
48759
  }
48747
- const ENCODING = "0123456789ABCDEFGHJKMNPQRSTVWXYZ";
48760
+ const ENCODING$1 = "0123456789ABCDEFGHJKMNPQRSTVWXYZ";
48748
48761
  const ENCODING_LEN = 32;
48749
48762
  const RANDOM_LEN = 16;
48750
48763
  const TIME_LEN = 10;
@@ -48771,7 +48784,7 @@ class ULIDError extends Error {
48771
48784
  }
48772
48785
  function randomChar(prng) {
48773
48786
  const randomPosition = Math.floor(prng() * ENCODING_LEN) % ENCODING_LEN;
48774
- return ENCODING.charAt(randomPosition);
48787
+ return ENCODING$1.charAt(randomPosition);
48775
48788
  }
48776
48789
  function replaceCharAt(str, index2, char) {
48777
48790
  if (index2 > str.length - 1) {
@@ -48784,15 +48797,15 @@ function incrementBase32(str) {
48784
48797
  const maxCharIndex = ENCODING_LEN - 1;
48785
48798
  while (!done && index2-- >= 0) {
48786
48799
  char = output[index2];
48787
- charIndex = ENCODING.indexOf(char);
48800
+ charIndex = ENCODING$1.indexOf(char);
48788
48801
  if (charIndex === -1) {
48789
48802
  throw new ULIDError(ULIDErrorCode.Base32IncorrectEncoding, "Incorrectly encoded string");
48790
48803
  }
48791
48804
  if (charIndex === maxCharIndex) {
48792
- output = replaceCharAt(output, index2, ENCODING[0]);
48805
+ output = replaceCharAt(output, index2, ENCODING$1[0]);
48793
48806
  continue;
48794
48807
  }
48795
- done = replaceCharAt(output, index2, ENCODING[charIndex + 1]);
48808
+ done = replaceCharAt(output, index2, ENCODING$1[charIndex + 1]);
48796
48809
  }
48797
48810
  if (typeof done === "string") {
48798
48811
  return done;
@@ -48804,7 +48817,7 @@ function decodeTime(id2) {
48804
48817
  throw new ULIDError(ULIDErrorCode.DecodeTimeValueMalformed, "Malformed ULID");
48805
48818
  }
48806
48819
  const time2 = id2.substr(0, TIME_LEN).toUpperCase().split("").reverse().reduce((carry, char, index2) => {
48807
- const encodingIndex = ENCODING.indexOf(char);
48820
+ const encodingIndex = ENCODING$1.indexOf(char);
48808
48821
  if (encodingIndex === -1) {
48809
48822
  throw new ULIDError(ULIDErrorCode.DecodeTimeInvalidCharacter, `Time decode error: Invalid character: ${char}`);
48810
48823
  }
@@ -48866,7 +48879,7 @@ function encodeTime(now2, len = TIME_LEN) {
48866
48879
  let mod, str = "";
48867
48880
  for (let currentLen = len; currentLen > 0; currentLen--) {
48868
48881
  mod = now2 % ENCODING_LEN;
48869
- str = ENCODING.charAt(mod) + str;
48882
+ str = ENCODING$1.charAt(mod) + str;
48870
48883
  now2 = (now2 - mod) / ENCODING_LEN;
48871
48884
  }
48872
48885
  return str;
@@ -48889,7 +48902,7 @@ function monotonicFactory(prng) {
48889
48902
  };
48890
48903
  }
48891
48904
  const UlidSchema = string$3().ulid();
48892
- const workflowRunIdSchema = templateLiteral(["wrun_", ulid$2()]);
48905
+ const workflowRunIdSchema = templateLiteral(["wrun_", ulid$3()]);
48893
48906
  const DEFAULT_TIMESTAMP_THRESHOLD_PAST_MS = 24 * 60 * 60 * 1e3;
48894
48907
  const DEFAULT_TIMESTAMP_THRESHOLD_FUTURE_MS = 5 * 60 * 1e3;
48895
48908
  function ulidToDate(maybeUlid) {
@@ -50143,7 +50156,7 @@ function replaceEncryptedAndExpiredWithMarkers(resource) {
50143
50156
  }
50144
50157
  async function hydrateResourceIOAsync(resource, key) {
50145
50158
  const { hydrateDataWithKey: hydrateDataWithKey2 } = await Promise.resolve().then(() => serializationFormat);
50146
- const { ensureZstdDecoderRegistered } = await import("./zstd-browser-decoder-vLGtEQW6.js");
50159
+ const { ensureZstdDecoderRegistered } = await import("./zstd-browser-decoder-CX-ryJFu.js");
50147
50160
  ensureZstdDecoderRegistered();
50148
50161
  const cryptoKey = key ? await Promise.resolve().then(() => encryption).then(({ importKey: importKey2 }) => importKey2(key)) : void 0;
50149
50162
  const revivers = getRevivers();
@@ -72459,9 +72472,9 @@ function decodeNumericCharacterReference(value, base) {
72459
72472
  }
72460
72473
  const characterEscapeOrReference = /\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;
72461
72474
  function decodeString(value) {
72462
- return value.replace(characterEscapeOrReference, decode$1);
72475
+ return value.replace(characterEscapeOrReference, decode$2);
72463
72476
  }
72464
- function decode$1($0, $1, $2) {
72477
+ function decode$2($0, $1, $2) {
72465
72478
  if ($1) {
72466
72479
  return $1;
72467
72480
  }
@@ -83108,7 +83121,7 @@ var tn = f("block", "before:content-[counter(line)]", "before:inline-block", "be
83108
83121
  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 });
83109
83122
  var Se = reactExports.createContext({ code: "" }), de = () => reactExports.useContext(Se);
83110
83123
  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 }) });
83111
- var cn$1 = /\n+$/, dn = reactExports.lazy(() => import("./highlighted-body-B3W2YXNL-CsR2wqX2.js").then((e) => ({ default: e.HighlightedCodeBlockBody }))), rt = ({ code: e, language: t, className: o, children: n, isIncomplete: s2 = false, ...r2 }) => {
83124
+ var cn$1 = /\n+$/, dn = reactExports.lazy(() => import("./highlighted-body-B3W2YXNL-6aglRJd5.js").then((e) => ({ default: e.HighlightedCodeBlockBody }))), rt = ({ code: e, language: t, className: o, children: n, isIncomplete: s2 = false, ...r2 }) => {
83112
83125
  let i = reactExports.useMemo(() => e.replace(cn$1, ""), [e]), c = reactExports.useMemo(() => ({ bg: "transparent", fg: "inherit", tokens: i.split(`
83113
83126
  `).map((a2) => [{ content: a2, color: "inherit", bgColor: "transparent", htmlStyle: {}, offset: 0 }]) }), [i]);
83114
83127
  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 }) })] }) });
@@ -83430,7 +83443,7 @@ var Dt = ({ children: e, className: t, onDownload: o, onError: n }) => {
83430
83443
  }, []), 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] });
83431
83444
  };
83432
83445
  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 }) })] });
83433
- var Jn = reactExports.lazy(() => import("./mermaid-3ZIDBTTL-B-ddv9lk.js").then((e) => ({ default: e.Mermaid }))), Kn = /language-([^\s]+)/;
83446
+ var Jn = reactExports.lazy(() => import("./mermaid-3ZIDBTTL-C_fIZXpA.js").then((e) => ({ default: e.Mermaid }))), Kn = /language-([^\s]+)/;
83434
83447
  function ke(e, t) {
83435
83448
  if (!(e != null && e.position || t != null && t.position)) return true;
83436
83449
  if (!(e != null && e.position && (t != null && t.position))) return false;
@@ -89350,7 +89363,7 @@ for (let i = 0; i < 256; i++) {
89350
89363
  mult10[i] = +("1e" + Math.floor(45.15 - i * 0.30103));
89351
89364
  }
89352
89365
  let defaultDecoder = new Decoder({ useRecords: false });
89353
- const decode = defaultDecoder.decode;
89366
+ const decode$1 = defaultDecoder.decode;
89354
89367
  defaultDecoder.decodeMultiple;
89355
89368
  let textEncoder;
89356
89369
  try {
@@ -90528,7 +90541,7 @@ function writeBundles(start2, encode2) {
90528
90541
  encode2(writeStrings[1]);
90529
90542
  }
90530
90543
  let defaultEncoder = new Encoder({ useRecords: false });
90531
- const encode = defaultEncoder.encode;
90544
+ const encode$1 = defaultEncoder.encode;
90532
90545
  defaultEncoder.encodeAsIterable;
90533
90546
  defaultEncoder.encodeAsAsyncIterable;
90534
90547
  const REUSE_BUFFER_MODE = 512;
@@ -90555,12 +90568,12 @@ async function rpc(method, params) {
90555
90568
  "Content-Type": "application/cbor",
90556
90569
  Accept: "application/cbor"
90557
90570
  },
90558
- body: new Uint8Array(encode({ method, params: params ?? {} }))
90571
+ body: new Uint8Array(encode$1({ method, params: params ?? {} }))
90559
90572
  });
90560
90573
  if (!res.ok) {
90561
90574
  try {
90562
90575
  const buffer22 = await res.arrayBuffer();
90563
- const errorBody = decode(new Uint8Array(buffer22));
90576
+ const errorBody = decode$1(new Uint8Array(buffer22));
90564
90577
  if ((_a3 = errorBody == null ? void 0 : errorBody.error) == null ? void 0 : _a3.message) {
90565
90578
  throw new Error(errorBody.error.message);
90566
90579
  }
@@ -90574,7 +90587,7 @@ async function rpc(method, params) {
90574
90587
  );
90575
90588
  }
90576
90589
  const buffer2 = await res.arrayBuffer();
90577
- return decode(new Uint8Array(buffer2));
90590
+ return decode$1(new Uint8Array(buffer2));
90578
90591
  }
90579
90592
  async function fetchRuns$1(worldEnv, params) {
90580
90593
  return rpc("fetchRuns", { worldEnv, params });
@@ -91965,7 +91978,7 @@ const encryption = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.definePr
91965
91978
  encrypt: encrypt$1,
91966
91979
  importKey
91967
91980
  }, Symbol.toStringTag, { value: "Module" }));
91968
- const version$1 = "5.0.0-beta.31";
91981
+ const version$1 = "5.0.0-beta.33";
91969
91982
  function assertWorldSupportsRuntimeProtocol(world) {
91970
91983
  if (world.specVersion === SPEC_VERSION_CURRENT) {
91971
91984
  return;
@@ -92075,8 +92088,9 @@ function parseHealthCheckResponse(chunks) {
92075
92088
  return parsed;
92076
92089
  }
92077
92090
  async function healthCheck(world, endpoint, options) {
92091
+ var _a3;
92078
92092
  const timeout2 = (options == null ? void 0 : options.timeout) ?? DEFAULT_HEALTH_CHECK_TIMEOUT;
92079
- const correlationId = generateId();
92093
+ const correlationId = ((_a3 = world.createRunId) == null ? void 0 : _a3.call(world)) ?? generateId();
92080
92094
  const streamName = getHealthCheckStreamName(correlationId);
92081
92095
  const queueName = `${getQueueTopicPrefix(endpoint, resolveQueueNamespace(options == null ? void 0 : options.namespace))}health_check`;
92082
92096
  const startTime = Date.now();
@@ -93635,6 +93649,21 @@ const STREAM_FLUSH_INTERVAL_MS = 10;
93635
93649
  const getStreamFlushIntervalMs = () => envNumber("WORKFLOW_STREAM_FLUSH_INTERVAL_MS", STREAM_FLUSH_INTERVAL_MS, {
93636
93650
  integer: true
93637
93651
  });
93652
+ function recordStreamWriteFlush(startEpochMs, dispatchEpochMs, runId, name2, chunkCount, byteCount) {
93653
+ void (async () => {
93654
+ await recordElapsedSpan("workflow.stream.flush", startEpochMs, {
93655
+ kind: await getSpanKind$2("CLIENT"),
93656
+ attributes: {
93657
+ "workflow.run.id": runId,
93658
+ "workflow.stream.name": name2,
93659
+ "workflow.stream.operation": "flush",
93660
+ "workflow.stream.flush.buffer_dwell_ms": dispatchEpochMs - startEpochMs,
93661
+ "workflow.stream.flush.chunks": chunkCount,
93662
+ "workflow.stream.flush.bytes": byteCount
93663
+ }
93664
+ });
93665
+ })();
93666
+ }
93638
93667
  class WorkflowServerWritableStream extends WritableStream {
93639
93668
  /**
93640
93669
  * @param runReadyBarrier Turbo mode only: a promise that resolves once the
@@ -93667,6 +93696,7 @@ class WorkflowServerWritableStream extends WritableStream {
93667
93696
  let flushTimer = null;
93668
93697
  let flushPromise = null;
93669
93698
  let resolvedFlushIntervalMs;
93699
+ let batchStartAt;
93670
93700
  const flush = async () => {
93671
93701
  if (flushTimer) {
93672
93702
  clearTimeout(flushTimer);
@@ -93676,16 +93706,29 @@ class WorkflowServerWritableStream extends WritableStream {
93676
93706
  return;
93677
93707
  await ensureRunReady();
93678
93708
  const chunksToFlush = buffer2.slice();
93709
+ const batchStart = batchStartAt;
93710
+ batchStartAt = void 0;
93711
+ const dispatchAt = Date.now();
93679
93712
  const world = await worldPromise;
93680
93713
  if (resolvedFlushIntervalMs === void 0) {
93681
93714
  resolvedFlushIntervalMs = world.streamFlushIntervalMs ?? getStreamFlushIntervalMs();
93682
93715
  }
93683
- if (typeof world.streams.writeMulti === "function" && chunksToFlush.length > 1) {
93684
- await world.streams.writeMulti(runId, name2, chunksToFlush);
93685
- } else {
93686
- for (const chunk of chunksToFlush) {
93687
- await world.streams.write(runId, name2, chunk);
93716
+ try {
93717
+ if (typeof world.streams.writeMulti === "function" && chunksToFlush.length > 1) {
93718
+ await world.streams.writeMulti(runId, name2, chunksToFlush);
93719
+ } else {
93720
+ for (const chunk of chunksToFlush) {
93721
+ await world.streams.write(runId, name2, chunk);
93722
+ }
93723
+ }
93724
+ } catch (error2) {
93725
+ if (batchStart !== void 0) {
93726
+ batchStartAt = batchStartAt === void 0 ? batchStart : Math.min(batchStartAt, batchStart);
93688
93727
  }
93728
+ throw error2;
93729
+ }
93730
+ if (batchStart !== void 0) {
93731
+ recordStreamWriteFlush(batchStart, dispatchAt, runId, name2, chunksToFlush.length, chunksToFlush.reduce((sum, c) => sum + c.byteLength, 0));
93689
93732
  }
93690
93733
  buffer2 = [];
93691
93734
  };
@@ -93708,6 +93751,8 @@ class WorkflowServerWritableStream extends WritableStream {
93708
93751
  };
93709
93752
  super({
93710
93753
  async write(chunk) {
93754
+ if (batchStartAt === void 0)
93755
+ batchStartAt = Date.now();
93711
93756
  if (flushPromise) {
93712
93757
  await flushPromise;
93713
93758
  flushPromise = null;
@@ -97589,7 +97634,7 @@ function normalizeAttributeChanges(attrs, options = {}) {
97589
97634
  return changes;
97590
97635
  }
97591
97636
  const CROSS_DEPLOYMENT_CAPABILITY_PROBE_TIMEOUT_MS = 2e3;
97592
- const ulid$1 = monotonicFactory();
97637
+ const ulid$2 = monotonicFactory();
97593
97638
  let hasWarnedLatestNoOp = false;
97594
97639
  async function start$1(workflow, argsOrOptions, options) {
97595
97640
  "use step";
@@ -97649,7 +97694,7 @@ async function start$1(workflow, argsOrOptions, options) {
97649
97694
  targetSupportsCompression = capabilities.supportedFormats.has(SerializationFormat.GZIP);
97650
97695
  }
97651
97696
  const ops = [];
97652
- const runId = `wrun_${ulid$1()}`;
97697
+ const runId = `wrun_${world.createRunId ? world.createRunId(opts) : ulid$2()}`;
97653
97698
  const traceCarrier = await serializeTraceCarrier();
97654
97699
  const specVersion = opts.specVersion ?? world.specVersion;
97655
97700
  const v1Compat = isLegacySpecVersion(specVersion);
@@ -97716,7 +97761,12 @@ async function start$1(workflow, argsOrOptions, options) {
97716
97761
  } : {}
97717
97762
  }, {
97718
97763
  deploymentId,
97719
- specVersion
97764
+ specVersion,
97765
+ // Forward any caller-supplied region hint so worlds with
97766
+ // per-region queue routing (e.g. world-vercel) can target the
97767
+ // matching queue. Worlds without a regional dimension ignore
97768
+ // this field.
97769
+ ...opts.region !== void 0 ? { region: opts.region } : {}
97720
97770
  })
97721
97771
  ]);
97722
97772
  if (queueResult.status === "rejected") {
@@ -98476,7 +98526,7 @@ async function resolveBaseUrl$1(config2) {
98476
98526
  }
98477
98527
  throw new Error("Unable to resolve base URL for workflow queue.");
98478
98528
  }
98479
- const ulid = monotonicFactory(() => Math.random());
98529
+ const ulid$1 = monotonicFactory(() => Math.random());
98480
98530
  function truncateForError(value) {
98481
98531
  const s2 = typeof value === "string" ? value : String(value);
98482
98532
  const MAX = 48;
@@ -98636,7 +98686,7 @@ async function write(filePath, data, opts) {
98636
98686
  }
98637
98687
  }
98638
98688
  }
98639
- const tempPath = `${filePath}.tmp.${ulid()}`;
98689
+ const tempPath = `${filePath}.tmp.${ulid$1()}`;
98640
98690
  let tempFileCreated = false;
98641
98691
  try {
98642
98692
  await withEnsuredDirectory(path$3.dirname(filePath), async () => {
@@ -98686,7 +98736,7 @@ async function deleteJSON(filePath) {
98686
98736
  }
98687
98737
  }
98688
98738
  async function writeExclusive(filePath, data) {
98689
- const tempPath = `${filePath}.tmp.${ulid()}`;
98739
+ const tempPath = `${filePath}.tmp.${ulid$1()}`;
98690
98740
  let tempFileCreated = false;
98691
98741
  try {
98692
98742
  return await withEnsuredDirectory(path$3.dirname(filePath), async () => {
@@ -127038,7 +127088,7 @@ function createWorld$1(args) {
127038
127088
  const basedir = mergedConfig.dataDir;
127039
127089
  const hooksDir = path$3.join(basedir, "hooks");
127040
127090
  const taggedHookFiles = await listTaggedFiles(hooksDir, tag);
127041
- const { HookSchema: HookSchema2 } = await import("./index-BbpsBsGO.js");
127091
+ const { HookSchema: HookSchema2 } = await import("./index-DtD2dyVs.js");
127042
127092
  await Promise.all(taggedHookFiles.map(async (hookFile) => {
127043
127093
  const hook = await readJSON(path$3.join(hooksDir, hookFile), HookSchema2);
127044
127094
  if (hook == null ? void 0 : hook.token) {
@@ -127221,8 +127271,8 @@ function requireGetVercelOidcToken() {
127221
127271
  }
127222
127272
  try {
127223
127273
  const [{ getTokenPayload, isExpired }, { refreshToken }] = await Promise.all([
127224
- await import("./token-util-C03rrkmJ.js").then((n) => n.t),
127225
- await import("./token-Batv2rdg.js").then((n) => n.t)
127274
+ await import("./token-util-BjIqTaA8.js").then((n) => n.t),
127275
+ await import("./token-ep3Bro6L.js").then((n) => n.t)
127226
127276
  ]);
127227
127277
  if (!token || isExpired(getTokenPayload(token), options == null ? void 0 : options.expirationBufferMs)) {
127228
127278
  await refreshToken(options);
@@ -127849,7 +127899,12 @@ function getDefaultStreamDispatcher() {
127849
127899
  let otelApiPromise$1 = null;
127850
127900
  async function getOtelApi$1() {
127851
127901
  if (!otelApiPromise$1) {
127852
- otelApiPromise$1 = import("./index-Dq5jTBN4.js").catch(() => null);
127902
+ otelApiPromise$1 = import("./index-Dq5jTBN4.js").catch((error2) => {
127903
+ if (typeof process !== "undefined" && typeof process.env.DEBUG === "string" && (process.env.DEBUG.includes("workflow:") || process.env.DEBUG === "*")) {
127904
+ console.warn("[workflow] @opentelemetry/api unavailable — world-vercel spans disabled:", error2 instanceof Error ? error2.message : error2);
127905
+ }
127906
+ return null;
127907
+ });
127853
127908
  }
127854
127909
  return otelApiPromise$1;
127855
127910
  }
@@ -128070,7 +128125,7 @@ async function instrumentedFetch(opts) {
128070
128125
  return response2;
128071
128126
  });
128072
128127
  }
128073
- const version = "5.0.0-beta.27";
128128
+ const version = "5.0.0-beta.29";
128074
128129
  const IDEMPOTENT_METHODS = /* @__PURE__ */ new Set(["GET", "HEAD"]);
128075
128130
  const MAX_BODY_PARSE_RETRIES = 2;
128076
128131
  const BODY_PARSE_RETRY_BASE_MS = 100;
@@ -128190,7 +128245,7 @@ async function makeRequest({ endpoint, options = {}, config: config2 = {}, schem
128190
128245
  let body2;
128191
128246
  if (data !== void 0) {
128192
128247
  headers2.set("Content-Type", "application/cbor");
128193
- body2 = encode(data);
128248
+ body2 = encode$1(data);
128194
128249
  }
128195
128250
  const canRetryBody = IDEMPOTENT_METHODS.has(method.toUpperCase());
128196
128251
  let parseResult;
@@ -128306,7 +128361,7 @@ async function parseResponseBody(response2) {
128306
128361
  const contentType = response2.headers.get("Content-Type") || "";
128307
128362
  if (contentType.includes("application/cbor")) {
128308
128363
  const buffer2 = await response2.arrayBuffer();
128309
- const data2 = decode(new Uint8Array(buffer2));
128364
+ const data2 = decode$1(new Uint8Array(buffer2));
128310
128365
  return {
128311
128366
  data: data2,
128312
128367
  getDebugContext: () => `Content-Type: ${contentType}, ${buffer2.byteLength} bytes (CBOR), preview: ${createPreview(data2)}`
@@ -128331,6 +128386,16 @@ function createQueryString(params) {
128331
128386
  const query = params.toString();
128332
128387
  return query ? `?${query}` : "";
128333
128388
  }
128389
+ function appendAttributeListParams(searchParams, params) {
128390
+ if (params.workflowName) {
128391
+ searchParams.set("workflowName", params.workflowName);
128392
+ }
128393
+ if (params.startTime && params.endTime) {
128394
+ searchParams.set("startTime", params.startTime);
128395
+ searchParams.set("endTime", params.endTime);
128396
+ }
128397
+ appendPagination(searchParams, params.pagination);
128398
+ }
128334
128399
  function createAnalytics(config2) {
128335
128400
  return {
128336
128401
  runs: {
@@ -128353,6 +128418,9 @@ function createAnalytics(config2) {
128353
128418
  searchParams.set("startTime", params.startTime);
128354
128419
  searchParams.set("endTime", params.endTime);
128355
128420
  }
128421
+ if (params.attributes && Object.keys(params.attributes).length > 0) {
128422
+ searchParams.set("attributes", JSON.stringify(params.attributes));
128423
+ }
128356
128424
  appendPagination(searchParams, params.pagination);
128357
128425
  return makeRequest({
128358
128426
  endpoint: `/v2/analytics/runs${createQueryString(searchParams)}`,
@@ -128361,6 +128429,17 @@ function createAnalytics(config2) {
128361
128429
  });
128362
128430
  }
128363
128431
  },
128432
+ attributes: {
128433
+ list(params = {}) {
128434
+ const searchParams = new URLSearchParams();
128435
+ appendAttributeListParams(searchParams, params);
128436
+ return makeRequest({
128437
+ endpoint: `/v2/analytics/attributes${createQueryString(searchParams)}`,
128438
+ config: config2,
128439
+ schema: PaginatedResponseSchema(AnalyticsAttributeKeySchema)
128440
+ });
128441
+ }
128442
+ },
128364
128443
  steps: {
128365
128444
  get(runId, stepId) {
128366
128445
  return makeRequest({
@@ -128459,6 +128538,225 @@ function createAnalytics(config2) {
128459
128538
  }
128460
128539
  };
128461
128540
  }
128541
+ const ENCODING = "0123456789ABCDEFGHJKMNPQRSTVWXYZ";
128542
+ const DECODE_TABLE = (() => {
128543
+ const table2 = new Int8Array(128).fill(-1);
128544
+ for (let i = 0; i < ENCODING.length; i++) {
128545
+ table2[ENCODING.charCodeAt(i)] = i;
128546
+ }
128547
+ for (let i = 0; i < ENCODING.length; i++) {
128548
+ const lower2 = ENCODING[i].toLowerCase();
128549
+ if (lower2 !== ENCODING[i]) {
128550
+ table2[lower2.charCodeAt(0)] = i;
128551
+ }
128552
+ }
128553
+ return table2;
128554
+ })();
128555
+ const ULID_LENGTH = 26;
128556
+ const ULID_BYTE_LENGTH = 16;
128557
+ const TAG_BIT_MASK = 128;
128558
+ const REGION_MASK = 252;
128559
+ const VERSION_HIGH_MASK = 3;
128560
+ const VERSION_LOW_MASK = 224;
128561
+ const REGION_BYTE_INDEX = 6;
128562
+ const VERSION_LOW_BYTE_INDEX = 7;
128563
+ const VERSION_BIT_WIDTH = 5;
128564
+ const REGION_BIT_WIDTH = 6;
128565
+ const MAX_VERSION = (1 << VERSION_BIT_WIDTH) - 1;
128566
+ const MAX_REGION = (1 << REGION_BIT_WIDTH) - 1;
128567
+ function ulidToBytes(ulid2) {
128568
+ if (typeof ulid2 !== "string") {
128569
+ throw new TypeError(`Expected ULID string, got ${typeof ulid2}`);
128570
+ }
128571
+ if (ulid2.length !== ULID_LENGTH) {
128572
+ throw new Error(`Invalid ULID length: expected ${ULID_LENGTH}, got ${ulid2.length}`);
128573
+ }
128574
+ const values = new Uint8Array(ULID_LENGTH);
128575
+ for (let i = 0; i < ULID_LENGTH; i++) {
128576
+ const code2 = ulid2.charCodeAt(i);
128577
+ const v2 = code2 < 128 ? DECODE_TABLE[code2] : -1;
128578
+ if (v2 < 0) {
128579
+ throw new Error(`Invalid Crockford-Base32 character at index ${i}: ${JSON.stringify(ulid2[i])}`);
128580
+ }
128581
+ values[i] = v2;
128582
+ }
128583
+ if ((values[0] & 24) !== 0) {
128584
+ throw new Error(`Invalid ULID: top 2 bits must be zero (first char > '7'): ${JSON.stringify(ulid2[0])}`);
128585
+ }
128586
+ const out = new Uint8Array(ULID_BYTE_LENGTH);
128587
+ let bitBuf = values[0] & 7;
128588
+ let bitCount = 3;
128589
+ let outIdx = 0;
128590
+ for (let i = 1; i < ULID_LENGTH; i++) {
128591
+ bitBuf = bitBuf << 5 | values[i];
128592
+ bitCount += 5;
128593
+ while (bitCount >= 8) {
128594
+ bitCount -= 8;
128595
+ out[outIdx++] = bitBuf >> bitCount & 255;
128596
+ }
128597
+ }
128598
+ if (outIdx !== ULID_BYTE_LENGTH || bitCount !== 0) {
128599
+ throw new Error("Internal error: ULID bit packing did not consume cleanly");
128600
+ }
128601
+ return out;
128602
+ }
128603
+ function bytesToUlid(bytes) {
128604
+ if (bytes.length !== ULID_BYTE_LENGTH) {
128605
+ throw new Error(`Invalid byte length: expected ${ULID_BYTE_LENGTH}, got ${bytes.length}`);
128606
+ }
128607
+ let bitBuf = 0;
128608
+ let bitCount = 0;
128609
+ bitBuf = 0;
128610
+ bitCount = 2;
128611
+ let out = "";
128612
+ for (let i = 0; i < ULID_BYTE_LENGTH; i++) {
128613
+ bitBuf = bitBuf << 8 | bytes[i];
128614
+ bitCount += 8;
128615
+ while (bitCount >= 5) {
128616
+ bitCount -= 5;
128617
+ out += ENCODING[bitBuf >> bitCount & 31];
128618
+ }
128619
+ }
128620
+ if (out.length !== ULID_LENGTH || bitCount !== 0) {
128621
+ throw new Error("Internal error: ULID bit packing did not flush cleanly");
128622
+ }
128623
+ return out;
128624
+ }
128625
+ const REGION_IDS = {
128626
+ unknown: 0,
128627
+ iad1: 1,
128628
+ sfo1: 2,
128629
+ pdx1: 3,
128630
+ cle1: 4,
128631
+ yul1: 5,
128632
+ gru1: 6,
128633
+ dub1: 7,
128634
+ lhr1: 8,
128635
+ cdg1: 9,
128636
+ fra1: 10,
128637
+ bru1: 11,
128638
+ arn1: 12,
128639
+ hel1: 13,
128640
+ zrh1: 14,
128641
+ cpt1: 15,
128642
+ dxb1: 16,
128643
+ bom1: 17,
128644
+ sin1: 18,
128645
+ hkg1: 19,
128646
+ hnd1: 20,
128647
+ icn1: 21,
128648
+ kix1: 22,
128649
+ syd1: 23
128650
+ };
128651
+ const DEFAULT_REGION_CODE = "iad1";
128652
+ const REGION_CODES_BY_ID = new Map(Object.entries(REGION_IDS).filter((entry2) => entry2[0] !== "unknown").map(([code2, id2]) => [id2, code2]));
128653
+ function lookupRegion(regionId) {
128654
+ return REGION_CODES_BY_ID.get(regionId) ?? null;
128655
+ }
128656
+ function isKnownRegionCode(code2) {
128657
+ return code2 !== void 0 && code2 !== "unknown" && Object.hasOwn(REGION_IDS, code2);
128658
+ }
128659
+ const CURRENT_VERSION = 1;
128660
+ function isRegionCode(value) {
128661
+ return typeof value === "string" && value !== "unknown" && Object.hasOwn(REGION_IDS, value);
128662
+ }
128663
+ function encode(ulid2, region, options = {}) {
128664
+ let regionId;
128665
+ if (typeof region === "number") {
128666
+ if (!Number.isInteger(region) || region < 0 || region > MAX_REGION) {
128667
+ throw new RangeError(`regionId must be an integer in [0, ${MAX_REGION}]; got ${region}`);
128668
+ }
128669
+ regionId = region;
128670
+ } else if (isRegionCode(region)) {
128671
+ regionId = REGION_IDS[region];
128672
+ } else {
128673
+ throw new Error(`Unknown region: ${String(region)}`);
128674
+ }
128675
+ const version2 = options.version ?? CURRENT_VERSION;
128676
+ if (!Number.isInteger(version2) || version2 < 0 || version2 > MAX_VERSION) {
128677
+ throw new RangeError(`version must be an integer in [0, ${MAX_VERSION}]; got ${version2}`);
128678
+ }
128679
+ const bytes = ulidToBytes(ulid2);
128680
+ bytes[0] = bytes[0] | TAG_BIT_MASK;
128681
+ const regionShifted = (regionId & MAX_REGION) << 2;
128682
+ const versionHigh = version2 >> 3 & VERSION_HIGH_MASK;
128683
+ const versionLow = (version2 & 7) << 5;
128684
+ bytes[REGION_BYTE_INDEX] = bytes[REGION_BYTE_INDEX] & -256 | regionShifted | versionHigh;
128685
+ bytes[VERSION_LOW_BYTE_INDEX] = bytes[VERSION_LOW_BYTE_INDEX] & ~VERSION_LOW_MASK | versionLow;
128686
+ return bytesToUlid(bytes);
128687
+ }
128688
+ function decode(taggedUlid) {
128689
+ const bytes = ulidToBytes(taggedUlid);
128690
+ const tagged = (bytes[0] & TAG_BIT_MASK) !== 0;
128691
+ bytes[0] = bytes[0] & ~TAG_BIT_MASK;
128692
+ const ulid2 = bytesToUlid(bytes);
128693
+ if (!tagged) {
128694
+ return { tagged: false, ulid: ulid2, version: null, regionId: null, region: null };
128695
+ }
128696
+ const regionId = (bytes[REGION_BYTE_INDEX] & REGION_MASK) >> 2;
128697
+ const version2 = (bytes[REGION_BYTE_INDEX] & VERSION_HIGH_MASK) << 3 | (bytes[VERSION_LOW_BYTE_INDEX] & VERSION_LOW_MASK) >> 5;
128698
+ return {
128699
+ tagged: true,
128700
+ ulid: ulid2,
128701
+ version: version2,
128702
+ regionId,
128703
+ region: lookupRegion(regionId)
128704
+ };
128705
+ }
128706
+ const ulid = monotonicFactory();
128707
+ let lastRunId;
128708
+ function bumpAboveMetadata(ulidStr) {
128709
+ const bytes = ulidToBytes(ulidStr);
128710
+ let i = 5;
128711
+ let carry = 1;
128712
+ while (i >= 0 && carry > 0) {
128713
+ const sum = bytes[i] + carry;
128714
+ bytes[i] = sum & 255;
128715
+ carry = sum >> 8;
128716
+ i--;
128717
+ }
128718
+ if (carry > 0) {
128719
+ throw new Error("ULID space exhausted");
128720
+ }
128721
+ return bytesToUlid(bytes);
128722
+ }
128723
+ function coerceRegion(value) {
128724
+ if (typeof value !== "string" || value === "" || value === "unknown") {
128725
+ return null;
128726
+ }
128727
+ return Object.hasOwn(REGION_IDS, value) ? value : null;
128728
+ }
128729
+ function resolveRegion$1(options) {
128730
+ return coerceRegion(options == null ? void 0 : options.region) ?? coerceRegion(process.env.VERCEL_REGION) ?? DEFAULT_REGION_CODE;
128731
+ }
128732
+ function createRunId(options) {
128733
+ const region = resolveRegion$1(options);
128734
+ const regionId = REGION_IDS[region];
128735
+ let candidate = encode(ulid(), regionId);
128736
+ if (lastRunId !== void 0) {
128737
+ while (candidate <= lastRunId) {
128738
+ candidate = encode(bumpAboveMetadata(lastRunId), regionId);
128739
+ }
128740
+ }
128741
+ lastRunId = candidate;
128742
+ return candidate;
128743
+ }
128744
+ function regionForRunId(runId) {
128745
+ const bare = runId.startsWith("wrun_") ? runId.slice("wrun_".length) : runId;
128746
+ try {
128747
+ const decoded = decode(bare);
128748
+ return decoded.tagged && decoded.region ? decoded.region : DEFAULT_REGION_CODE;
128749
+ } catch {
128750
+ return null;
128751
+ }
128752
+ }
128753
+ function describeRun(run2) {
128754
+ const runId = run2.runId;
128755
+ if (typeof runId !== "string" || runId.length === 0) {
128756
+ return null;
128757
+ }
128758
+ return { region: regionForRunId(runId) };
128759
+ }
128462
128760
  const KEY_BYTES = 32;
128463
128761
  async function deriveRunKey(deploymentKey, projectId, runId) {
128464
128762
  if (deploymentKey.length !== KEY_BYTES) {
@@ -133370,7 +133668,7 @@ class CborTransport {
133370
133668
  __publicField(this, "contentType", "application/cbor");
133371
133669
  }
133372
133670
  serialize(value) {
133373
- return Buffer.from(encode(value));
133671
+ return Buffer.from(encode$1(value));
133374
133672
  }
133375
133673
  async deserialize(stream) {
133376
133674
  const chunks = [];
@@ -133382,7 +133680,7 @@ class CborTransport {
133382
133680
  if (value)
133383
133681
  chunks.push(value);
133384
133682
  }
133385
- return decode(Buffer.concat(chunks));
133683
+ return decode$1(Buffer.concat(chunks));
133386
133684
  }
133387
133685
  }
133388
133686
  class JsonTransport2 {
@@ -133410,7 +133708,7 @@ class DualTransport {
133410
133708
  __publicField(this, "contentType", "application/cbor");
133411
133709
  }
133412
133710
  serialize(value) {
133413
- return Buffer.from(encode(value));
133711
+ return Buffer.from(encode$1(value));
133414
133712
  }
133415
133713
  async deserialize(stream) {
133416
133714
  const chunks = [];
@@ -133424,7 +133722,7 @@ class DualTransport {
133424
133722
  }
133425
133723
  const buffer2 = Buffer.concat(chunks);
133426
133724
  try {
133427
- return decode(buffer2);
133725
+ return decode$1(buffer2);
133428
133726
  } catch {
133429
133727
  return JSON.parse(buffer2.toString());
133430
133728
  }
@@ -133452,6 +133750,43 @@ function getHandlerErrorRetryAfterSeconds(deliveryCount) {
133452
133750
  const jitterSeconds = Math.floor(Math.random() * (Math.ceil(backoffSeconds * HANDLER_ERROR_RETRY_JITTER_RATIO) + 1));
133453
133751
  return Math.max(HANDLER_ERROR_RETRY_AFTER_SECONDS, backoffSeconds - jitterSeconds);
133454
133752
  }
133753
+ const FALLBACK_REGION = "iad1";
133754
+ function getRunIdFromPayload(payload) {
133755
+ if ("runId" in payload && typeof payload.runId === "string") {
133756
+ return payload.runId;
133757
+ }
133758
+ if ("workflowRunId" in payload && typeof payload.workflowRunId === "string") {
133759
+ return payload.workflowRunId;
133760
+ }
133761
+ return void 0;
133762
+ }
133763
+ const RUN_ID_PREFIX = "wrun_";
133764
+ function regionFromTaggedRunId(runId) {
133765
+ if (!runId)
133766
+ return void 0;
133767
+ const ulid2 = runId.startsWith(RUN_ID_PREFIX) ? runId.slice(RUN_ID_PREFIX.length) : runId;
133768
+ try {
133769
+ const decoded = decode(ulid2);
133770
+ if (!decoded.tagged)
133771
+ return void 0;
133772
+ if (decoded.regionId === REGION_IDS.unknown)
133773
+ return void 0;
133774
+ return decoded.region ?? void 0;
133775
+ } catch {
133776
+ return void 0;
133777
+ }
133778
+ }
133779
+ function resolveTargetRegion(payload, opts) {
133780
+ if (isKnownRegionCode(opts == null ? void 0 : opts.region))
133781
+ return opts.region;
133782
+ const fromRunId = regionFromTaggedRunId(getRunIdFromPayload(payload));
133783
+ if (fromRunId)
133784
+ return fromRunId;
133785
+ const fromEnv = process.env.VERCEL_REGION;
133786
+ if (isKnownRegionCode(fromEnv))
133787
+ return fromEnv;
133788
+ return FALLBACK_REGION;
133789
+ }
133455
133790
  function getHeadersFromPayload(payload) {
133456
133791
  const headers2 = {};
133457
133792
  if ("runId" in payload && typeof payload.runId === "string") {
@@ -133465,15 +133800,41 @@ function getHeadersFromPayload(payload) {
133465
133800
  }
133466
133801
  return Object.keys(headers2).length > 0 ? headers2 : void 0;
133467
133802
  }
133803
+ const FLOW_TOPIC_PATTERN = /^__([a-z][a-z0-9]*_)?wkf_workflow_/;
133804
+ let loggedSequentialReplays = false;
133805
+ function isSequentialReplaysEnabled() {
133806
+ const explicit = process.env.WORKFLOW_SEQUENTIAL_REPLAYS;
133807
+ if (explicit !== void 0 && explicit !== "") {
133808
+ return explicit === "1";
133809
+ }
133810
+ return process.env.WORKFLOW_SAFE_MODE === "1";
133811
+ }
133812
+ function getPhysicalQueueName(queueName, payload) {
133813
+ if (!isSequentialReplaysEnabled() || !FLOW_TOPIC_PATTERN.test(queueName)) {
133814
+ return queueName;
133815
+ }
133816
+ if (!loggedSequentialReplays) {
133817
+ loggedSequentialReplays = true;
133818
+ console.warn("[workflow] WORKFLOW_SEQUENTIAL_REPLAYS=1: routing flow messages to per-run queue topics");
133819
+ }
133820
+ if ("runId" in payload && typeof payload.runId === "string") {
133821
+ if ("stepId" in payload && typeof payload.stepId === "string") {
133822
+ return `${queueName}_${payload.runId}_${payload.stepId}`;
133823
+ }
133824
+ return `${queueName}_${payload.runId}`;
133825
+ }
133826
+ if ("__healthCheck" in payload && typeof payload.correlationId === "string") {
133827
+ return `${queueName}_${payload.correlationId}`;
133828
+ }
133829
+ return queueName;
133830
+ }
133468
133831
  function createQueue$1(config2) {
133469
133832
  const { baseUrl, usingProxy } = getHttpUrl(config2);
133470
133833
  const headers2 = getHeaders(config2, { usingProxy });
133471
- const region = "iad1";
133472
133834
  const cborTransport = new CborTransport();
133473
133835
  const jsonTransport = new JsonTransport2();
133474
133836
  const dualTransport = new DualTransport();
133475
133837
  const clientOptions = {
133476
- region,
133477
133838
  dispatcher: getDispatcher(config2),
133478
133839
  transport: dualTransport,
133479
133840
  ...usingProxy && {
@@ -133482,12 +133843,7 @@ function createQueue$1(config2) {
133482
133843
  resolveBaseUrl: () => new URL(`${baseUrl}/queues-proxy`),
133483
133844
  token: config2 == null ? void 0 : config2.token
133484
133845
  },
133485
- headers: {
133486
- ...Object.fromEntries(headers2.entries()),
133487
- // The proxy's fixed base URL bypasses the SDK's regional host
133488
- // resolution, so the region travels as a header instead.
133489
- ...usingProxy && { "x-vercel-queue-region": region }
133490
- }
133846
+ headers: Object.fromEntries(headers2.entries())
133491
133847
  };
133492
133848
  const queue = async (queueName, payload, opts) => {
133493
133849
  const deploymentId = (opts == null ? void 0 : opts.deploymentId) ?? process.env.VERCEL_DEPLOYMENT_ID;
@@ -133496,18 +133852,34 @@ function createQueue$1(config2) {
133496
133852
  }
133497
133853
  const useCbor = ((opts == null ? void 0 : opts.specVersion) ?? SPEC_VERSION_CURRENT) >= SPEC_VERSION_SUPPORTS_CBOR_QUEUE_TRANSPORT;
133498
133854
  const transport = useCbor ? cborTransport : jsonTransport;
133855
+ const region = resolveTargetRegion(payload, opts);
133499
133856
  const client2 = new QueueClient({
133500
133857
  ...clientOptions,
133858
+ // When sending through the api.vercel.com proxy, the fixed
133859
+ // `resolveBaseUrl` above replaces the queue SDK's own
133860
+ // region -> `<region>.vercel-queue.com` base-URL resolution, so
133861
+ // the per-send resolved region must travel as a header instead:
133862
+ // the proxy forwards the send to that region's VQS dataplane
133863
+ // host when `x-vercel-queue-region` is present (vercel/api#79056).
133864
+ ...usingProxy && {
133865
+ headers: {
133866
+ ...clientOptions.headers,
133867
+ "x-vercel-queue-region": region
133868
+ }
133869
+ },
133870
+ region,
133501
133871
  deploymentId,
133502
133872
  transport
133503
133873
  });
133504
133874
  const wrapper = {
133505
133875
  payload,
133876
+ // Keep the logical queue name so the handler and re-enqueue path
133877
+ // resolve the same per-run physical topic on the next invocation.
133506
133878
  queueName,
133507
133879
  // Store deploymentId in the message so it can be preserved when re-enqueueing
133508
133880
  deploymentId: opts == null ? void 0 : opts.deploymentId
133509
133881
  };
133510
- const sanitizedQueueName = queueName.replace(/[^A-Za-z0-9-_]/g, "-");
133882
+ const sanitizedQueueName = getPhysicalQueueName(queueName, payload).replace(/[^A-Za-z0-9-_]/g, "-");
133511
133883
  try {
133512
133884
  const { messageId } = await client2.send(sanitizedQueueName, wrapper, {
133513
133885
  idempotencyKey: opts == null ? void 0 : opts.idempotencyKey,
@@ -133793,7 +134165,7 @@ async function withEventPostRetry(fn2, eventType) {
133793
134165
  }
133794
134166
  const V4_FRAME_CONTENT_TYPE = "application/vnd.workflow.v4-frames";
133795
134167
  function encodeFrame(meta2, body2) {
133796
- const metaBytes = new Uint8Array(encode(meta2));
134168
+ const metaBytes = new Uint8Array(encode$1(meta2));
133797
134169
  const out = new Uint8Array(4 + metaBytes.byteLength + 4 + body2.byteLength);
133798
134170
  const view = new DataView(out.buffer);
133799
134171
  view.setUint32(0, metaBytes.byteLength, false);
@@ -133833,7 +134205,7 @@ async function* decodeFrames(source) {
133833
134205
  if (!await refill(metaLen)) {
133834
134206
  throw new Error("decodeFrames: truncated meta block");
133835
134207
  }
133836
- const meta2 = decode(take(metaLen));
134208
+ const meta2 = decode$1(take(metaLen));
133837
134209
  if (!await refill(4)) {
133838
134210
  throw new Error("decodeFrames: truncated body length");
133839
134211
  }
@@ -134001,7 +134373,7 @@ async function createWorkflowRunEventV4(input, config2) {
134001
134373
  throw new Error("v4 createEvent: response missing required x-wf-* headers");
134002
134374
  }
134003
134375
  const bodyBytes = new Uint8Array(await response2.arrayBuffer());
134004
- const body2 = bodyBytes.byteLength > 0 ? decode(bodyBytes) : {};
134376
+ const body2 = bodyBytes.byteLength > 0 ? decode$1(bodyBytes) : {};
134005
134377
  return { eventId, runId, createdAt, body: body2 };
134006
134378
  }
134007
134379
  function readHeader(responseHeaders, name2) {
@@ -134383,6 +134755,14 @@ async function getStep(runId, stepId, params, config2) {
134383
134755
  });
134384
134756
  return filterStepData(step, resolveData);
134385
134757
  }
134758
+ function validateWorkflowRunIdTimestamp(id2) {
134759
+ const raw2 = id2.startsWith("wrun_") ? id2.slice("wrun_".length) : id2;
134760
+ try {
134761
+ return validateUlidTimestamp(`wrun_${decode(raw2).ulid}`, "wrun_");
134762
+ } catch {
134763
+ return validateUlidTimestamp(id2, "wrun_");
134764
+ }
134765
+ }
134386
134766
  const eventsNeedingResolve = /* @__PURE__ */ new Set([
134387
134767
  "run_created",
134388
134768
  // runtime reads result.run.runId
@@ -134579,7 +134959,7 @@ async function createWorkflowRunEventInner(id2, data, params, config2) {
134579
134959
  throw new WorkflowWorldError("world-vercel v4: createWorkflowRunEvent requires a client-generated runId for run_created (the runId is part of the payload storage ref key). Generate a wrun_ ULID before calling.", { status: 400 });
134580
134960
  }
134581
134961
  if (data.eventType === "run_created") {
134582
- const validationError = validateUlidTimestamp(id2, "wrun_");
134962
+ const validationError = validateWorkflowRunIdTimestamp(id2);
134583
134963
  if (validationError) {
134584
134964
  throw new WorkflowWorldError(validationError, { status: 400 });
134585
134965
  }
@@ -134952,6 +135332,8 @@ function createWorld(config2) {
134952
135332
  ...createStorage(config2),
134953
135333
  analytics: createAnalytics(config2),
134954
135334
  ...instrumentObject("world.streams", createStreamer(config2)),
135335
+ createRunId,
135336
+ describeRun,
134955
135337
  getEncryptionKeyForRun: createGetEncryptionKeyForRun(projectId, (_b2 = config2 == null ? void 0 : config2.projectConfig) == null ? void 0 : _b2.teamId, config2 == null ? void 0 : config2.token, config2 == null ? void 0 : config2.dispatcher),
134956
135338
  resolveLatestDeploymentId: createResolveLatestDeploymentId(config2)
134957
135339
  };
@@ -157927,7 +158309,7 @@ const handlers = {
157927
158309
  getPublicServerConfig: () => getPublicServerConfig()
157928
158310
  };
157929
158311
  function cborResponse(data, status = 200) {
157930
- const encoded = encode(data);
158312
+ const encoded = encode$1(data);
157931
158313
  return new Response(new Uint8Array(encoded), {
157932
158314
  status,
157933
158315
  headers: {
@@ -157943,7 +158325,7 @@ async function action({
157943
158325
  try {
157944
158326
  if (contentType.includes("application/cbor")) {
157945
158327
  const buffer2 = await request2.arrayBuffer();
157946
- body2 = decode(new Uint8Array(buffer2));
158328
+ body2 = decode$1(new Uint8Array(buffer2));
157947
158329
  } else {
157948
158330
  body2 = await request2.json();
157949
158331
  }
@@ -158060,7 +158442,7 @@ const route4 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProper
158060
158442
  __proto__: null,
158061
158443
  loader
158062
158444
  }, Symbol.toStringTag, { value: "Module" }));
158063
- const serverManifest = { "entry": { "module": "/assets/entry.client-Q4eUIqMI.js", "imports": ["/assets/index-Q81MFBxC.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-mjlqO83r.js", "imports": ["/assets/index-Q81MFBxC.js", "/assets/mermaid-3ZIDBTTL-BxUZpfmG.js", "/assets/arrow-up-right-UTJqZa58.js"], "css": ["/assets/root-CQggqXow.css", "/assets/mermaid-3ZIDBTTL-DDxQhcP4.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-1xisMAzt.js", "imports": ["/assets/index-Q81MFBxC.js", "/assets/workflow-graph-viewer-DpvUticH.js", "/assets/mermaid-3ZIDBTTL-BxUZpfmG.js", "/assets/index-STTN0-2V.js"], "css": ["/assets/workflow-graph-viewer-DnlNuQQH.css", "/assets/mermaid-3ZIDBTTL-DDxQhcP4.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-ysogMwZA.js", "imports": ["/assets/index-Q81MFBxC.js", "/assets/workflow-graph-viewer-DpvUticH.js", "/assets/mermaid-3ZIDBTTL-BxUZpfmG.js", "/assets/arrow-up-right-UTJqZa58.js", "/assets/encryption-CLVP4klT.js", "/assets/index-STTN0-2V.js"], "css": ["/assets/run-detail-CWoGxu_0.css", "/assets/workflow-graph-viewer-DnlNuQQH.css", "/assets/mermaid-3ZIDBTTL-DDxQhcP4.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-37d4814f.js", "version": "37d4814f", "sri": void 0 };
158445
+ const serverManifest = { "entry": { "module": "/assets/entry.client-Q4eUIqMI.js", "imports": ["/assets/index-Q81MFBxC.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-CraFPjyT.js", "imports": ["/assets/index-Q81MFBxC.js", "/assets/mermaid-3ZIDBTTL-CQtb_4FN.js", "/assets/arrow-up-right-B1QFlETT.js"], "css": ["/assets/root-CQggqXow.css", "/assets/mermaid-3ZIDBTTL-DDxQhcP4.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-rmBMtWNr.js", "imports": ["/assets/index-Q81MFBxC.js", "/assets/workflow-graph-viewer-Cn2fThMy.js", "/assets/mermaid-3ZIDBTTL-CQtb_4FN.js", "/assets/index-STTN0-2V.js"], "css": ["/assets/workflow-graph-viewer-DnlNuQQH.css", "/assets/mermaid-3ZIDBTTL-DDxQhcP4.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-BGHjSgVx.js", "imports": ["/assets/index-Q81MFBxC.js", "/assets/workflow-graph-viewer-Cn2fThMy.js", "/assets/mermaid-3ZIDBTTL-CQtb_4FN.js", "/assets/arrow-up-right-B1QFlETT.js", "/assets/encryption-CLVP4klT.js", "/assets/index-STTN0-2V.js"], "css": ["/assets/run-detail-CWoGxu_0.css", "/assets/workflow-graph-viewer-DnlNuQQH.css", "/assets/mermaid-3ZIDBTTL-DDxQhcP4.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-9dd3e2d8.js", "version": "9dd3e2d8", "sri": void 0 };
158064
158446
  const assetsBuildDirectory = "build/client";
158065
158447
  const basename = "/";
158066
158448
  const future = { "unstable_optimizeDeps": false, "unstable_subResourceIntegrity": false, "unstable_trailingSlashAwareDataRequests": false, "unstable_previewServerPrerendering": false, "v8_middleware": false, "v8_splitRouteModules": false, "v8_viteEnvironmentApi": false };
@@ -158129,96 +158511,97 @@ const serverBuild = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineP
158129
158511
  ssr
158130
158512
  }, Symbol.toStringTag, { value: "Module" }));
158131
158513
  export {
158132
- WorkflowInvokePayloadSchema as $,
158514
+ WaitStatusSchema as $,
158133
158515
  ATTRIBUTE_KEY_MAX_LENGTH as A,
158134
158516
  BaseEventSchema as B,
158135
158517
  CHILD_ENTITY_CREATION_EVENT_TYPES as C,
158136
158518
  DEFAULT_TIMESTAMP_THRESHOLD_FUTURE_MS as D,
158137
158519
  EVENT_DATA_PAYLOAD_FIELD_BY_EVENT_TYPE as E,
158138
- StepInvokePayloadSchema as F,
158139
- StepSchema as G,
158520
+ SerializedDataSchema as F,
158521
+ StepInvokePayloadSchema as G,
158140
158522
  HookSchema as H,
158141
- StepStatusSchema as I,
158142
- TERMINAL_STEP_EVENT_TYPES as J,
158143
- TERMINAL_STEP_STATUSES as K,
158523
+ StepSchema as I,
158524
+ StepStatusSchema as J,
158525
+ TERMINAL_STEP_EVENT_TYPES as K,
158144
158526
  LegacySerializedDataSchemaV1 as L,
158145
158527
  MessageId as M,
158146
158528
  Nt as N,
158147
- TERMINAL_WORKFLOW_RUN_STATUSES as O,
158529
+ TERMINAL_STEP_STATUSES as O,
158148
158530
  PaginatedResponseSchema as P,
158149
158531
  QueuePayloadSchema as Q,
158150
158532
  RESERVED_ATTRIBUTE_KEY_PREFIX as R,
158151
158533
  SPEC_VERSION_CURRENT as S,
158152
158534
  TERMINAL_RUN_EVENT_TYPES as T,
158153
- TerminalRunEventTypeSchema as U,
158154
- TerminalStepStatusSchema as V,
158155
- TerminalWorkflowRunStatusSchema as W,
158156
- ValidQueueName as X,
158157
- WAIT_EVENT_TYPES as Y,
158158
- WaitSchema as Z,
158159
- WaitStatusSchema as _,
158535
+ TERMINAL_WORKFLOW_RUN_STATUSES as U,
158536
+ TerminalRunEventTypeSchema as V,
158537
+ TerminalStepStatusSchema as W,
158538
+ TerminalWorkflowRunStatusSchema as X,
158539
+ ValidQueueName as Y,
158540
+ WAIT_EVENT_TYPES as Z,
158541
+ WaitSchema as _,
158160
158542
  ATTRIBUTE_MAX_PER_RUN as a,
158161
- WorkflowRunBaseSchema as a0,
158162
- WorkflowRunSchema as a1,
158163
- WorkflowRunStatusSchema as a2,
158164
- applyAttributeChanges as a3,
158165
- envNumber as a4,
158166
- getEventDataPayloadField as a5,
158167
- getEventDataRefFields as a6,
158168
- getQueueTopicPrefix as a7,
158169
- isChildEntityCreationEvent as a8,
158170
- isChildEntityCreationEventType as a9,
158171
- requireTokenError as aA,
158172
- serverBuild as aB,
158173
- isHookEventRequiringExistence as aa,
158174
- isHookLifecycleEventType as ab,
158175
- isLegacySpecVersion as ac,
158176
- isStepEventType as ad,
158177
- isTerminalRunEventType as ae,
158178
- isTerminalStepEventType as af,
158179
- isTerminalStepStatus as ag,
158180
- isTerminalWorkflowRunStatus as ah,
158181
- isWaitEventType as ai,
158182
- parseQueueName as aj,
158183
- reenqueueActiveRuns as ak,
158184
- requiresNewerWorld as al,
158185
- resolveQueueNamespace as am,
158186
- stripEventDataRefs as an,
158187
- ulidToDate as ao,
158188
- validateAttributeChanges as ap,
158189
- validateAttributeKey as aq,
158190
- validateAttributeValue as ar,
158191
- validateUlidTimestamp as as,
158192
- workflowRunIdSchema as at,
158193
- R as au,
158194
- Ks as av,
158195
- jsxRuntimeExports as aw,
158196
- Qe as ax,
158197
- registerZstdDecoder as ay,
158198
- requireTokenUtil as az,
158543
+ WorkflowInvokePayloadSchema as a0,
158544
+ WorkflowRunBaseSchema as a1,
158545
+ WorkflowRunSchema as a2,
158546
+ WorkflowRunStatusSchema as a3,
158547
+ applyAttributeChanges as a4,
158548
+ envNumber as a5,
158549
+ getEventDataPayloadField as a6,
158550
+ getEventDataRefFields as a7,
158551
+ getQueueTopicPrefix as a8,
158552
+ isChildEntityCreationEvent as a9,
158553
+ requireTokenUtil as aA,
158554
+ requireTokenError as aB,
158555
+ serverBuild as aC,
158556
+ isChildEntityCreationEventType as aa,
158557
+ isHookEventRequiringExistence as ab,
158558
+ isHookLifecycleEventType as ac,
158559
+ isLegacySpecVersion as ad,
158560
+ isStepEventType as ae,
158561
+ isTerminalRunEventType as af,
158562
+ isTerminalStepEventType as ag,
158563
+ isTerminalStepStatus as ah,
158564
+ isTerminalWorkflowRunStatus as ai,
158565
+ isWaitEventType as aj,
158566
+ parseQueueName as ak,
158567
+ reenqueueActiveRuns as al,
158568
+ requiresNewerWorld as am,
158569
+ resolveQueueNamespace as an,
158570
+ stripEventDataRefs as ao,
158571
+ ulidToDate as ap,
158572
+ validateAttributeChanges as aq,
158573
+ validateAttributeKey as ar,
158574
+ validateAttributeValue as as,
158575
+ validateUlidTimestamp as at,
158576
+ workflowRunIdSchema as au,
158577
+ R as av,
158578
+ Ks as aw,
158579
+ jsxRuntimeExports as ax,
158580
+ Qe as ay,
158581
+ registerZstdDecoder as az,
158199
158582
  ATTRIBUTE_VALUE_MAX_BYTES as b,
158200
- AnalyticsEventSchema as c,
158201
- AnalyticsHookSchema as d,
158202
- AnalyticsRunSchema as e,
158203
- AnalyticsStepSchema as f,
158204
- AnalyticsWaitSchema as g,
158205
- AttributeChangeSchema as h,
158206
- AttributeChangesSchema as i,
158207
- AttributeValidationError as j,
158208
- DEFAULT_TIMESTAMP_THRESHOLD_PAST_MS as k,
158209
- EVENT_DATA_REF_FIELDS as l,
158210
- EventSchema as m,
158211
- EventTypeSchema as n,
158212
- HOOK_EVENTS_REQUIRING_EXISTENCE as o,
158213
- HOOK_LIFECYCLE_EVENT_TYPES as p,
158214
- HealthCheckPayloadSchema as q,
158215
- HookCreatedEventSchema as r,
158216
- QueuePrefix as s,
158217
- RunInputSchema as t,
158218
- SPEC_VERSION_LEGACY as u,
158219
- SPEC_VERSION_SUPPORTS_ATTRIBUTES as v,
158220
- SPEC_VERSION_SUPPORTS_CBOR_QUEUE_TRANSPORT as w,
158221
- SPEC_VERSION_SUPPORTS_COMPRESSION as x,
158222
- STEP_EVENT_TYPES as y,
158223
- SerializedDataSchema as z
158583
+ AnalyticsAttributeKeySchema as c,
158584
+ AnalyticsEventSchema as d,
158585
+ AnalyticsHookSchema as e,
158586
+ AnalyticsRunSchema as f,
158587
+ AnalyticsStepSchema as g,
158588
+ AnalyticsWaitSchema as h,
158589
+ AttributeChangeSchema as i,
158590
+ AttributeChangesSchema as j,
158591
+ AttributeValidationError as k,
158592
+ DEFAULT_TIMESTAMP_THRESHOLD_PAST_MS as l,
158593
+ EVENT_DATA_REF_FIELDS as m,
158594
+ EventSchema as n,
158595
+ EventTypeSchema as o,
158596
+ HOOK_EVENTS_REQUIRING_EXISTENCE as p,
158597
+ HOOK_LIFECYCLE_EVENT_TYPES as q,
158598
+ HealthCheckPayloadSchema as r,
158599
+ HookCreatedEventSchema as s,
158600
+ QueuePrefix as t,
158601
+ RunInputSchema as u,
158602
+ SPEC_VERSION_LEGACY as v,
158603
+ SPEC_VERSION_SUPPORTS_ATTRIBUTES as w,
158604
+ SPEC_VERSION_SUPPORTS_CBOR_QUEUE_TRANSPORT as x,
158605
+ SPEC_VERSION_SUPPORTS_COMPRESSION as y,
158606
+ STEP_EVENT_TYPES as z
158224
158607
  };