@workflow/web 5.0.0-beta.32 → 5.0.0-beta.34
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.
- package/build/client/assets/{arrow-up-right-UTJqZa58.js → arrow-up-right-B1QFlETT.js} +1 -1
- package/build/client/assets/{highlighted-body-B3W2YXNL-BJU4jA-M.js → highlighted-body-B3W2YXNL-Br23zjGQ.js} +1 -1
- package/build/client/assets/{home-1xisMAzt.js → home-rmBMtWNr.js} +2 -2
- package/build/client/assets/{manifest-37d4814f.js → manifest-9dd3e2d8.js} +1 -1
- package/build/client/assets/{mermaid-3ZIDBTTL-BxUZpfmG.js → mermaid-3ZIDBTTL-CQtb_4FN.js} +30 -14
- package/build/client/assets/{root-mjlqO83r.js → root-CraFPjyT.js} +2 -2
- package/build/client/assets/{run-detail-ysogMwZA.js → run-detail-BGHjSgVx.js} +3 -3
- package/build/client/assets/{workflow-graph-viewer-DpvUticH.js → workflow-graph-viewer-Cn2fThMy.js} +1 -1
- package/build/client/assets/{zstd-browser-decoder-BFS0fmpR.js → zstd-browser-decoder-BjHfY5Rj.js} +1 -1
- package/build/server/assets/{app-TShfJF1A.js → app-i2AZJqU9.js} +1 -1
- package/build/server/assets/{highlighted-body-B3W2YXNL-Cn3Ldhfl.js → highlighted-body-B3W2YXNL-CLwuqern.js} +2 -2
- package/build/server/assets/index-CDZXmART.js +133 -0
- package/build/server/assets/index-CETb4fkq.js +1164 -0
- package/build/server/assets/{mermaid-3ZIDBTTL-Conbg-cC.js → mermaid-3ZIDBTTL-D9aZdQJZ.js} +2 -2
- package/build/server/assets/{server-build-GYVyEwoy.js → server-build-DIxG6FRI.js} +649 -167
- package/build/server/assets/{token-B0_1Gw9R.js → token-Ni6JMJBG.js} +2 -2
- package/build/server/assets/{token-util-B_XNC39V.js → token-util-DXRPWBKh.js} +2 -2
- package/build/server/assets/{zstd-browser-decoder-DmzLFSRd.js → zstd-browser-decoder-Do5u42Eg.js} +2 -2
- package/build/server/index.js +1 -1
- package/package.json +6 -6
- package/build/server/assets/index-BuK37-uW.js +0 -132
- package/build/server/assets/index-Dq5jTBN4.js +0 -1286
|
@@ -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-
|
|
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-i2AZJqU9.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$
|
|
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$
|
|
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$
|
|
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$
|
|
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$
|
|
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$
|
|
45621
|
+
decode: decode$4,
|
|
45622
45622
|
decodeAsync: decodeAsync$1,
|
|
45623
45623
|
describe: describe$1,
|
|
45624
|
-
encode: encode$
|
|
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$
|
|
45770
|
-
const decode$
|
|
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$
|
|
45812
|
-
inst.decode = (data, params) => decode$
|
|
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$
|
|
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$
|
|
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$
|
|
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$
|
|
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$
|
|
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
|
|
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:
|
|
48489
|
-
updatedAt:
|
|
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:
|
|
48503
|
-
updatedAt:
|
|
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:
|
|
48522
|
-
createdAt:
|
|
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:
|
|
48539
|
-
updatedAt:
|
|
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:
|
|
48553
|
-
updatedAt:
|
|
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$
|
|
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-
|
|
50159
|
+
const { ensureZstdDecoderRegistered } = await import("./zstd-browser-decoder-Do5u42Eg.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$
|
|
72475
|
+
return value.replace(characterEscapeOrReference, decode$2);
|
|
72463
72476
|
}
|
|
72464
|
-
function decode$
|
|
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-
|
|
83124
|
+
var cn$1 = /\n+$/, dn = reactExports.lazy(() => import("./highlighted-body-B3W2YXNL-CLwuqern.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-
|
|
83446
|
+
var Jn = reactExports.lazy(() => import("./mermaid-3ZIDBTTL-D9aZdQJZ.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 });
|
|
@@ -91740,7 +91753,7 @@ async function deserializeTraceCarrier(traceCarrier) {
|
|
|
91740
91753
|
}
|
|
91741
91754
|
const OtelApi = once$1(async () => {
|
|
91742
91755
|
try {
|
|
91743
|
-
return await import("./index-
|
|
91756
|
+
return await import("./index-CETb4fkq.js");
|
|
91744
91757
|
} catch {
|
|
91745
91758
|
runtimeLogger.info("OpenTelemetry not available, tracing will be disabled");
|
|
91746
91759
|
return null;
|
|
@@ -91750,8 +91763,35 @@ const Tracer = once$1(async () => {
|
|
|
91750
91763
|
const api2 = await OtelApi.value;
|
|
91751
91764
|
if (!api2)
|
|
91752
91765
|
return null;
|
|
91753
|
-
|
|
91766
|
+
const tracer = api2.trace.getTracer("workflow");
|
|
91767
|
+
logOtelDiagnosticOnce$1(api2, tracer);
|
|
91768
|
+
return tracer;
|
|
91754
91769
|
});
|
|
91770
|
+
let otelDiagLogged$1 = false;
|
|
91771
|
+
function logOtelDiagnosticOnce$1(otel, tracer) {
|
|
91772
|
+
var _a3, _b2, _c2, _d2, _e2;
|
|
91773
|
+
const debugEnabled = typeof process !== "undefined" && typeof process.env.DEBUG === "string" && (process.env.DEBUG.includes("workflow:") || process.env.DEBUG === "*");
|
|
91774
|
+
if (otelDiagLogged$1 || !debugEnabled)
|
|
91775
|
+
return;
|
|
91776
|
+
otelDiagLogged$1 = true;
|
|
91777
|
+
try {
|
|
91778
|
+
const g2 = globalThis[Symbol.for("opentelemetry.js.api.1")];
|
|
91779
|
+
const provider = otel.trace.getTracerProvider();
|
|
91780
|
+
const delegate = ((_a3 = provider.getDelegate) == null ? void 0 : _a3.call(provider)) ?? provider;
|
|
91781
|
+
const probe = tracer.startSpan("workflow.otel.probe.core");
|
|
91782
|
+
console.warn("[workflow:otel-diag] core", JSON.stringify({
|
|
91783
|
+
globalRegistrationVersion: (g2 == null ? void 0 : g2.version) ?? null,
|
|
91784
|
+
providerCtor: ((_b2 = provider == null ? void 0 : provider.constructor) == null ? void 0 : _b2.name) ?? null,
|
|
91785
|
+
delegateCtor: ((_c2 = delegate == null ? void 0 : delegate.constructor) == null ? void 0 : _c2.name) ?? null,
|
|
91786
|
+
tracerCtor: ((_d2 = tracer == null ? void 0 : tracer.constructor) == null ? void 0 : _d2.name) ?? null,
|
|
91787
|
+
probeCtor: ((_e2 = probe == null ? void 0 : probe.constructor) == null ? void 0 : _e2.name) ?? null,
|
|
91788
|
+
probeRecording: probe.isRecording()
|
|
91789
|
+
}));
|
|
91790
|
+
probe.end();
|
|
91791
|
+
} catch (error2) {
|
|
91792
|
+
console.warn("[workflow:otel-diag] core failed:", error2 instanceof Error ? error2.message : error2);
|
|
91793
|
+
}
|
|
91794
|
+
}
|
|
91755
91795
|
async function trace$2(spanName2, ...args) {
|
|
91756
91796
|
const [tracer, otel] = await Promise.all([Tracer.value, OtelApi.value]);
|
|
91757
91797
|
const { fn: fn2, opts } = typeof args[0] === "function" ? { fn: args[0], opts: {} } : { fn: args[1], opts: args[0] };
|
|
@@ -91965,7 +92005,7 @@ const encryption = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.definePr
|
|
|
91965
92005
|
encrypt: encrypt$1,
|
|
91966
92006
|
importKey
|
|
91967
92007
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
91968
|
-
const version$1 = "5.0.0-beta.
|
|
92008
|
+
const version$1 = "5.0.0-beta.34";
|
|
91969
92009
|
function assertWorldSupportsRuntimeProtocol(world) {
|
|
91970
92010
|
if (world.specVersion === SPEC_VERSION_CURRENT) {
|
|
91971
92011
|
return;
|
|
@@ -92075,8 +92115,9 @@ function parseHealthCheckResponse(chunks) {
|
|
|
92075
92115
|
return parsed;
|
|
92076
92116
|
}
|
|
92077
92117
|
async function healthCheck(world, endpoint, options) {
|
|
92118
|
+
var _a3;
|
|
92078
92119
|
const timeout2 = (options == null ? void 0 : options.timeout) ?? DEFAULT_HEALTH_CHECK_TIMEOUT;
|
|
92079
|
-
const correlationId = generateId();
|
|
92120
|
+
const correlationId = ((_a3 = world.createRunId) == null ? void 0 : _a3.call(world)) ?? generateId();
|
|
92080
92121
|
const streamName = getHealthCheckStreamName(correlationId);
|
|
92081
92122
|
const queueName = `${getQueueTopicPrefix(endpoint, resolveQueueNamespace(options == null ? void 0 : options.namespace))}health_check`;
|
|
92082
92123
|
const startTime = Date.now();
|
|
@@ -93456,7 +93497,7 @@ function getByteUnframingStream() {
|
|
|
93456
93497
|
}
|
|
93457
93498
|
});
|
|
93458
93499
|
}
|
|
93459
|
-
function recordReadTimeToFirstChunk(startEpochMs, runId, name2, startIndex) {
|
|
93500
|
+
function recordReadTimeToFirstChunk(startEpochMs, runId, name2, startIndex, connectMs) {
|
|
93460
93501
|
void (async () => {
|
|
93461
93502
|
await recordElapsedSpan("workflow.stream.read", startEpochMs, {
|
|
93462
93503
|
kind: await getSpanKind$2("CLIENT"),
|
|
@@ -93465,11 +93506,28 @@ function recordReadTimeToFirstChunk(startEpochMs, runId, name2, startIndex) {
|
|
|
93465
93506
|
"workflow.stream.name": name2,
|
|
93466
93507
|
"workflow.stream.operation": "read",
|
|
93467
93508
|
"workflow.stream.read.ttfc_ms": Date.now() - startEpochMs,
|
|
93509
|
+
...typeof connectMs === "number" ? { "workflow.stream.read.connect_ms": connectMs } : {},
|
|
93468
93510
|
...typeof startIndex === "number" ? { "workflow.stream.start_index": startIndex } : {}
|
|
93469
93511
|
}
|
|
93470
93512
|
});
|
|
93471
93513
|
})();
|
|
93472
93514
|
}
|
|
93515
|
+
function recordStreamReadComplete(startEpochMs, runId, name2, chunkCount, byteCount, reconnects) {
|
|
93516
|
+
void (async () => {
|
|
93517
|
+
await recordElapsedSpan("workflow.stream.read.complete", startEpochMs, {
|
|
93518
|
+
kind: await getSpanKind$2("CLIENT"),
|
|
93519
|
+
attributes: {
|
|
93520
|
+
"workflow.run.id": runId,
|
|
93521
|
+
"workflow.stream.name": name2,
|
|
93522
|
+
"workflow.stream.operation": "read_complete",
|
|
93523
|
+
"workflow.stream.read.total_ms": Date.now() - startEpochMs,
|
|
93524
|
+
"workflow.stream.read.chunks": chunkCount,
|
|
93525
|
+
"workflow.stream.read.bytes": byteCount,
|
|
93526
|
+
...typeof reconnects === "number" ? { "workflow.stream.read.reconnects": reconnects } : {}
|
|
93527
|
+
}
|
|
93528
|
+
});
|
|
93529
|
+
})();
|
|
93530
|
+
}
|
|
93473
93531
|
class WorkflowServerReadableStream extends ReadableStream {
|
|
93474
93532
|
constructor(runId, name2, startIndex) {
|
|
93475
93533
|
if (typeof name2 !== "string" || name2.length === 0) {
|
|
@@ -93477,6 +93535,9 @@ class WorkflowServerReadableStream extends ReadableStream {
|
|
|
93477
93535
|
}
|
|
93478
93536
|
let readStart;
|
|
93479
93537
|
let firstChunkReported = false;
|
|
93538
|
+
let connectMs;
|
|
93539
|
+
let chunksDelivered = 0;
|
|
93540
|
+
let bytesDelivered = 0;
|
|
93480
93541
|
super({
|
|
93481
93542
|
// @ts-expect-error Not sure why TypeScript is complaining about this
|
|
93482
93543
|
type: "bytes",
|
|
@@ -93486,7 +93547,9 @@ class WorkflowServerReadableStream extends ReadableStream {
|
|
|
93486
93547
|
if (readStart === void 0)
|
|
93487
93548
|
readStart = Date.now();
|
|
93488
93549
|
const world = await getWorldLazy();
|
|
93550
|
+
const connectStart = Date.now();
|
|
93489
93551
|
const stream = await world.streams.get(runId, name2, startIndex);
|
|
93552
|
+
connectMs = Date.now() - connectStart;
|
|
93490
93553
|
reader = __privateSet(this, _reader, stream.getReader());
|
|
93491
93554
|
}
|
|
93492
93555
|
if (!reader) {
|
|
@@ -93496,12 +93559,17 @@ class WorkflowServerReadableStream extends ReadableStream {
|
|
|
93496
93559
|
const result = await reader.read();
|
|
93497
93560
|
if (result.done) {
|
|
93498
93561
|
__privateSet(this, _reader, void 0);
|
|
93562
|
+
if (readStart !== void 0) {
|
|
93563
|
+
recordStreamReadComplete(readStart, runId, name2, chunksDelivered, bytesDelivered);
|
|
93564
|
+
}
|
|
93499
93565
|
controller.close();
|
|
93500
93566
|
} else {
|
|
93501
93567
|
if (!firstChunkReported && result.value.byteLength > 0 && readStart !== void 0) {
|
|
93502
93568
|
firstChunkReported = true;
|
|
93503
|
-
recordReadTimeToFirstChunk(readStart, runId, name2, startIndex);
|
|
93569
|
+
recordReadTimeToFirstChunk(readStart, runId, name2, startIndex, connectMs);
|
|
93504
93570
|
}
|
|
93571
|
+
chunksDelivered += 1;
|
|
93572
|
+
bytesDelivered += result.value.byteLength;
|
|
93505
93573
|
controller.enqueue(result.value);
|
|
93506
93574
|
}
|
|
93507
93575
|
},
|
|
@@ -93532,10 +93600,18 @@ function createReconnectingFramedStream(runId, name2, startIndex) {
|
|
|
93532
93600
|
let totalReconnectCount = 0;
|
|
93533
93601
|
let reader;
|
|
93534
93602
|
let buffer2 = new Uint8Array(0);
|
|
93603
|
+
let readStart;
|
|
93604
|
+
let connectMs;
|
|
93605
|
+
let firstChunkReported = false;
|
|
93606
|
+
let chunksDelivered = 0;
|
|
93607
|
+
let bytesDelivered = 0;
|
|
93535
93608
|
async function connect2() {
|
|
93536
93609
|
const world = await getWorldLazy();
|
|
93537
93610
|
const effectiveStartIndex = reconnectSupported ? currentStartIndex + consumedFrames : startIndex;
|
|
93611
|
+
const connectStart = Date.now();
|
|
93538
93612
|
const stream = await world.streams.get(runId, name2, effectiveStartIndex);
|
|
93613
|
+
if (connectMs === void 0)
|
|
93614
|
+
connectMs = Date.now() - connectStart;
|
|
93539
93615
|
reader = stream.getReader();
|
|
93540
93616
|
}
|
|
93541
93617
|
async function reconnect() {
|
|
@@ -93567,6 +93643,8 @@ function createReconnectingFramedStream(runId, name2, startIndex) {
|
|
|
93567
93643
|
}
|
|
93568
93644
|
return new ReadableStream({
|
|
93569
93645
|
pull: async (controller) => {
|
|
93646
|
+
if (readStart === void 0)
|
|
93647
|
+
readStart = Date.now();
|
|
93570
93648
|
for (; ; ) {
|
|
93571
93649
|
if (!reader) {
|
|
93572
93650
|
try {
|
|
@@ -93594,6 +93672,9 @@ function createReconnectingFramedStream(runId, name2, startIndex) {
|
|
|
93594
93672
|
}
|
|
93595
93673
|
if (result.done || !result.value) {
|
|
93596
93674
|
reader = void 0;
|
|
93675
|
+
if (readStart !== void 0) {
|
|
93676
|
+
recordStreamReadComplete(readStart, runId, name2, chunksDelivered, bytesDelivered, totalReconnectCount);
|
|
93677
|
+
}
|
|
93597
93678
|
controller.close();
|
|
93598
93679
|
return;
|
|
93599
93680
|
}
|
|
@@ -93613,6 +93694,12 @@ function createReconnectingFramedStream(runId, name2, startIndex) {
|
|
|
93613
93694
|
controller.enqueue(buffer2.slice(0, total));
|
|
93614
93695
|
buffer2 = buffer2.slice(total);
|
|
93615
93696
|
consumedFrames++;
|
|
93697
|
+
chunksDelivered++;
|
|
93698
|
+
bytesDelivered += total;
|
|
93699
|
+
if (!firstChunkReported && readStart !== void 0) {
|
|
93700
|
+
firstChunkReported = true;
|
|
93701
|
+
recordReadTimeToFirstChunk(readStart, runId, name2, startIndex, connectMs);
|
|
93702
|
+
}
|
|
93616
93703
|
emitted = true;
|
|
93617
93704
|
}
|
|
93618
93705
|
if (emitted) {
|
|
@@ -93635,7 +93722,7 @@ const STREAM_FLUSH_INTERVAL_MS = 10;
|
|
|
93635
93722
|
const getStreamFlushIntervalMs = () => envNumber("WORKFLOW_STREAM_FLUSH_INTERVAL_MS", STREAM_FLUSH_INTERVAL_MS, {
|
|
93636
93723
|
integer: true
|
|
93637
93724
|
});
|
|
93638
|
-
function recordStreamWriteFlush(startEpochMs, dispatchEpochMs, runId, name2, chunkCount, byteCount) {
|
|
93725
|
+
function recordStreamWriteFlush(startEpochMs, dispatchEpochMs, runId, name2, chunkCount, byteCount, rpcMs) {
|
|
93639
93726
|
void (async () => {
|
|
93640
93727
|
await recordElapsedSpan("workflow.stream.flush", startEpochMs, {
|
|
93641
93728
|
kind: await getSpanKind$2("CLIENT"),
|
|
@@ -93645,7 +93732,24 @@ function recordStreamWriteFlush(startEpochMs, dispatchEpochMs, runId, name2, chu
|
|
|
93645
93732
|
"workflow.stream.operation": "flush",
|
|
93646
93733
|
"workflow.stream.flush.buffer_dwell_ms": dispatchEpochMs - startEpochMs,
|
|
93647
93734
|
"workflow.stream.flush.chunks": chunkCount,
|
|
93648
|
-
"workflow.stream.flush.bytes": byteCount
|
|
93735
|
+
"workflow.stream.flush.bytes": byteCount,
|
|
93736
|
+
// Client-observed World write RPC duration (network hop included).
|
|
93737
|
+
// Same key as world-vercel's per-request span attribute so queries
|
|
93738
|
+
// work regardless of which layer emitted it.
|
|
93739
|
+
"workflow.stream.write.chunk_rtt": rpcMs
|
|
93740
|
+
}
|
|
93741
|
+
});
|
|
93742
|
+
})();
|
|
93743
|
+
}
|
|
93744
|
+
function recordStreamClose(startEpochMs, runId, name2) {
|
|
93745
|
+
void (async () => {
|
|
93746
|
+
await recordElapsedSpan("workflow.stream.close", startEpochMs, {
|
|
93747
|
+
kind: await getSpanKind$2("CLIENT"),
|
|
93748
|
+
attributes: {
|
|
93749
|
+
"workflow.run.id": runId,
|
|
93750
|
+
"workflow.stream.name": name2,
|
|
93751
|
+
"workflow.stream.operation": "close",
|
|
93752
|
+
"workflow.stream.close.rpc_ms": Date.now() - startEpochMs
|
|
93649
93753
|
}
|
|
93650
93754
|
});
|
|
93651
93755
|
})();
|
|
@@ -93699,6 +93803,7 @@ class WorkflowServerWritableStream extends WritableStream {
|
|
|
93699
93803
|
if (resolvedFlushIntervalMs === void 0) {
|
|
93700
93804
|
resolvedFlushIntervalMs = world.streamFlushIntervalMs ?? getStreamFlushIntervalMs();
|
|
93701
93805
|
}
|
|
93806
|
+
const rpcStartAt = Date.now();
|
|
93702
93807
|
try {
|
|
93703
93808
|
if (typeof world.streams.writeMulti === "function" && chunksToFlush.length > 1) {
|
|
93704
93809
|
await world.streams.writeMulti(runId, name2, chunksToFlush);
|
|
@@ -93714,7 +93819,7 @@ class WorkflowServerWritableStream extends WritableStream {
|
|
|
93714
93819
|
throw error2;
|
|
93715
93820
|
}
|
|
93716
93821
|
if (batchStart !== void 0) {
|
|
93717
|
-
recordStreamWriteFlush(batchStart, dispatchAt, runId, name2, chunksToFlush.length, chunksToFlush.reduce((sum, c) => sum + c.byteLength, 0));
|
|
93822
|
+
recordStreamWriteFlush(batchStart, dispatchAt, runId, name2, chunksToFlush.length, chunksToFlush.reduce((sum, c) => sum + c.byteLength, 0), Date.now() - rpcStartAt);
|
|
93718
93823
|
}
|
|
93719
93824
|
buffer2 = [];
|
|
93720
93825
|
};
|
|
@@ -93757,7 +93862,9 @@ class WorkflowServerWritableStream extends WritableStream {
|
|
|
93757
93862
|
await flush();
|
|
93758
93863
|
await ensureRunReady();
|
|
93759
93864
|
const world = await worldPromise;
|
|
93865
|
+
const closeStart = Date.now();
|
|
93760
93866
|
await world.streams.close(runId, name2);
|
|
93867
|
+
recordStreamClose(closeStart, runId, name2);
|
|
93761
93868
|
},
|
|
93762
93869
|
abort(reason) {
|
|
93763
93870
|
if (flushTimer) {
|
|
@@ -97620,7 +97727,7 @@ function normalizeAttributeChanges(attrs, options = {}) {
|
|
|
97620
97727
|
return changes;
|
|
97621
97728
|
}
|
|
97622
97729
|
const CROSS_DEPLOYMENT_CAPABILITY_PROBE_TIMEOUT_MS = 2e3;
|
|
97623
|
-
const ulid$
|
|
97730
|
+
const ulid$2 = monotonicFactory();
|
|
97624
97731
|
let hasWarnedLatestNoOp = false;
|
|
97625
97732
|
async function start$1(workflow, argsOrOptions, options) {
|
|
97626
97733
|
"use step";
|
|
@@ -97680,7 +97787,7 @@ async function start$1(workflow, argsOrOptions, options) {
|
|
|
97680
97787
|
targetSupportsCompression = capabilities.supportedFormats.has(SerializationFormat.GZIP);
|
|
97681
97788
|
}
|
|
97682
97789
|
const ops = [];
|
|
97683
|
-
const runId = `wrun_${ulid$
|
|
97790
|
+
const runId = `wrun_${world.createRunId ? world.createRunId(opts) : ulid$2()}`;
|
|
97684
97791
|
const traceCarrier = await serializeTraceCarrier();
|
|
97685
97792
|
const specVersion = opts.specVersion ?? world.specVersion;
|
|
97686
97793
|
const v1Compat = isLegacySpecVersion(specVersion);
|
|
@@ -97747,7 +97854,12 @@ async function start$1(workflow, argsOrOptions, options) {
|
|
|
97747
97854
|
} : {}
|
|
97748
97855
|
}, {
|
|
97749
97856
|
deploymentId,
|
|
97750
|
-
specVersion
|
|
97857
|
+
specVersion,
|
|
97858
|
+
// Forward any caller-supplied region hint so worlds with
|
|
97859
|
+
// per-region queue routing (e.g. world-vercel) can target the
|
|
97860
|
+
// matching queue. Worlds without a regional dimension ignore
|
|
97861
|
+
// this field.
|
|
97862
|
+
...opts.region !== void 0 ? { region: opts.region } : {}
|
|
97751
97863
|
})
|
|
97752
97864
|
]);
|
|
97753
97865
|
if (queueResult.status === "rejected") {
|
|
@@ -98507,7 +98619,7 @@ async function resolveBaseUrl$1(config2) {
|
|
|
98507
98619
|
}
|
|
98508
98620
|
throw new Error("Unable to resolve base URL for workflow queue.");
|
|
98509
98621
|
}
|
|
98510
|
-
const ulid = monotonicFactory(() => Math.random());
|
|
98622
|
+
const ulid$1 = monotonicFactory(() => Math.random());
|
|
98511
98623
|
function truncateForError(value) {
|
|
98512
98624
|
const s2 = typeof value === "string" ? value : String(value);
|
|
98513
98625
|
const MAX = 48;
|
|
@@ -98667,7 +98779,7 @@ async function write(filePath, data, opts) {
|
|
|
98667
98779
|
}
|
|
98668
98780
|
}
|
|
98669
98781
|
}
|
|
98670
|
-
const tempPath = `${filePath}.tmp.${ulid()}`;
|
|
98782
|
+
const tempPath = `${filePath}.tmp.${ulid$1()}`;
|
|
98671
98783
|
let tempFileCreated = false;
|
|
98672
98784
|
try {
|
|
98673
98785
|
await withEnsuredDirectory(path$3.dirname(filePath), async () => {
|
|
@@ -98717,7 +98829,7 @@ async function deleteJSON(filePath) {
|
|
|
98717
98829
|
}
|
|
98718
98830
|
}
|
|
98719
98831
|
async function writeExclusive(filePath, data) {
|
|
98720
|
-
const tempPath = `${filePath}.tmp.${ulid()}`;
|
|
98832
|
+
const tempPath = `${filePath}.tmp.${ulid$1()}`;
|
|
98721
98833
|
let tempFileCreated = false;
|
|
98722
98834
|
try {
|
|
98723
98835
|
return await withEnsuredDirectory(path$3.dirname(filePath), async () => {
|
|
@@ -99023,7 +99135,7 @@ async function initDataDir(dataDir) {
|
|
|
99023
99135
|
let otelApiPromise$2 = null;
|
|
99024
99136
|
async function getOtelApi$2() {
|
|
99025
99137
|
if (!otelApiPromise$2) {
|
|
99026
|
-
otelApiPromise$2 = import("./index-
|
|
99138
|
+
otelApiPromise$2 = import("./index-CETb4fkq.js").catch(() => null);
|
|
99027
99139
|
}
|
|
99028
99140
|
return otelApiPromise$2;
|
|
99029
99141
|
}
|
|
@@ -127069,7 +127181,7 @@ function createWorld$1(args) {
|
|
|
127069
127181
|
const basedir = mergedConfig.dataDir;
|
|
127070
127182
|
const hooksDir = path$3.join(basedir, "hooks");
|
|
127071
127183
|
const taggedHookFiles = await listTaggedFiles(hooksDir, tag);
|
|
127072
|
-
const { HookSchema: HookSchema2 } = await import("./index-
|
|
127184
|
+
const { HookSchema: HookSchema2 } = await import("./index-CDZXmART.js");
|
|
127073
127185
|
await Promise.all(taggedHookFiles.map(async (hookFile) => {
|
|
127074
127186
|
const hook = await readJSON(path$3.join(hooksDir, hookFile), HookSchema2);
|
|
127075
127187
|
if (hook == null ? void 0 : hook.token) {
|
|
@@ -127252,8 +127364,8 @@ function requireGetVercelOidcToken() {
|
|
|
127252
127364
|
}
|
|
127253
127365
|
try {
|
|
127254
127366
|
const [{ getTokenPayload, isExpired }, { refreshToken }] = await Promise.all([
|
|
127255
|
-
await import("./token-util-
|
|
127256
|
-
await import("./token-
|
|
127367
|
+
await import("./token-util-DXRPWBKh.js").then((n) => n.t),
|
|
127368
|
+
await import("./token-Ni6JMJBG.js").then((n) => n.t)
|
|
127257
127369
|
]);
|
|
127258
127370
|
if (!token || isExpired(getTokenPayload(token), options == null ? void 0 : options.expirationBufferMs)) {
|
|
127259
127371
|
await refreshToken(options);
|
|
@@ -127880,7 +127992,7 @@ function getDefaultStreamDispatcher() {
|
|
|
127880
127992
|
let otelApiPromise$1 = null;
|
|
127881
127993
|
async function getOtelApi$1() {
|
|
127882
127994
|
if (!otelApiPromise$1) {
|
|
127883
|
-
otelApiPromise$1 = import("./index-
|
|
127995
|
+
otelApiPromise$1 = import("./index-CETb4fkq.js").catch((error2) => {
|
|
127884
127996
|
if (typeof process !== "undefined" && typeof process.env.DEBUG === "string" && (process.env.DEBUG.includes("workflow:") || process.env.DEBUG === "*")) {
|
|
127885
127997
|
console.warn("[workflow] @opentelemetry/api unavailable — world-vercel spans disabled:", error2 instanceof Error ? error2.message : error2);
|
|
127886
127998
|
}
|
|
@@ -127890,9 +128002,42 @@ async function getOtelApi$1() {
|
|
|
127890
128002
|
return otelApiPromise$1;
|
|
127891
128003
|
}
|
|
127892
128004
|
let tracerPromise = null;
|
|
128005
|
+
function workflowDebugEnabled() {
|
|
128006
|
+
return typeof process !== "undefined" && typeof process.env.DEBUG === "string" && (process.env.DEBUG.includes("workflow:") || process.env.DEBUG === "*");
|
|
128007
|
+
}
|
|
128008
|
+
let otelDiagLogged = false;
|
|
128009
|
+
function logOtelDiagnosticOnce(otel, tracer) {
|
|
128010
|
+
var _a3, _b2, _c2, _d2, _e2;
|
|
128011
|
+
if (otelDiagLogged || !workflowDebugEnabled())
|
|
128012
|
+
return;
|
|
128013
|
+
otelDiagLogged = true;
|
|
128014
|
+
try {
|
|
128015
|
+
const g2 = globalThis[Symbol.for("opentelemetry.js.api.1")];
|
|
128016
|
+
const provider = otel.trace.getTracerProvider();
|
|
128017
|
+
const delegate = ((_a3 = provider.getDelegate) == null ? void 0 : _a3.call(provider)) ?? provider;
|
|
128018
|
+
const probe = tracer.startSpan("workflow.otel.probe.world_vercel");
|
|
128019
|
+
console.warn("[workflow:otel-diag] world-vercel", JSON.stringify({
|
|
128020
|
+
globalRegistrationVersion: (g2 == null ? void 0 : g2.version) ?? null,
|
|
128021
|
+
providerCtor: ((_b2 = provider == null ? void 0 : provider.constructor) == null ? void 0 : _b2.name) ?? null,
|
|
128022
|
+
delegateCtor: ((_c2 = delegate == null ? void 0 : delegate.constructor) == null ? void 0 : _c2.name) ?? null,
|
|
128023
|
+
tracerCtor: ((_d2 = tracer == null ? void 0 : tracer.constructor) == null ? void 0 : _d2.name) ?? null,
|
|
128024
|
+
probeCtor: ((_e2 = probe == null ? void 0 : probe.constructor) == null ? void 0 : _e2.name) ?? null,
|
|
128025
|
+
probeRecording: probe.isRecording()
|
|
128026
|
+
}));
|
|
128027
|
+
probe.end();
|
|
128028
|
+
} catch (error2) {
|
|
128029
|
+
console.warn("[workflow:otel-diag] world-vercel failed:", error2 instanceof Error ? error2.message : error2);
|
|
128030
|
+
}
|
|
128031
|
+
}
|
|
127893
128032
|
async function getTracer() {
|
|
127894
128033
|
if (!tracerPromise) {
|
|
127895
|
-
tracerPromise = getOtelApi$1().then((otel) =>
|
|
128034
|
+
tracerPromise = getOtelApi$1().then((otel) => {
|
|
128035
|
+
if (!otel)
|
|
128036
|
+
return null;
|
|
128037
|
+
const tracer = otel.trace.getTracer("workflow");
|
|
128038
|
+
logOtelDiagnosticOnce(otel, tracer);
|
|
128039
|
+
return tracer;
|
|
128040
|
+
});
|
|
127896
128041
|
}
|
|
127897
128042
|
return tracerPromise;
|
|
127898
128043
|
}
|
|
@@ -128052,6 +128197,15 @@ async function instrumentedFetch(opts) {
|
|
|
128052
128197
|
const label = logLabel ?? url2;
|
|
128053
128198
|
return trace(spanName2 ?? `http ${method}`, { kind: await getSpanKind("CLIENT") }, async (span) => {
|
|
128054
128199
|
var _a3, _b2, _c2;
|
|
128200
|
+
if (spanName2 && HTTP_DEBUG_ENABLED && span) {
|
|
128201
|
+
const ctx = span.spanContext();
|
|
128202
|
+
console.warn("[workflow:otel-diag] span-open", JSON.stringify({
|
|
128203
|
+
spanName: spanName2,
|
|
128204
|
+
traceId: ctx.traceId,
|
|
128205
|
+
spanId: ctx.spanId,
|
|
128206
|
+
recording: span.isRecording()
|
|
128207
|
+
}));
|
|
128208
|
+
}
|
|
128055
128209
|
span == null ? void 0 : span.setAttributes(httpClientSpanAttributes({ method, url: url2, peerService }));
|
|
128056
128210
|
if (attributes)
|
|
128057
128211
|
span == null ? void 0 : span.setAttributes(attributes);
|
|
@@ -128106,7 +128260,7 @@ async function instrumentedFetch(opts) {
|
|
|
128106
128260
|
return response2;
|
|
128107
128261
|
});
|
|
128108
128262
|
}
|
|
128109
|
-
const version = "5.0.0-beta.
|
|
128263
|
+
const version = "5.0.0-beta.30";
|
|
128110
128264
|
const IDEMPOTENT_METHODS = /* @__PURE__ */ new Set(["GET", "HEAD"]);
|
|
128111
128265
|
const MAX_BODY_PARSE_RETRIES = 2;
|
|
128112
128266
|
const BODY_PARSE_RETRY_BASE_MS = 100;
|
|
@@ -128226,7 +128380,7 @@ async function makeRequest({ endpoint, options = {}, config: config2 = {}, schem
|
|
|
128226
128380
|
let body2;
|
|
128227
128381
|
if (data !== void 0) {
|
|
128228
128382
|
headers2.set("Content-Type", "application/cbor");
|
|
128229
|
-
body2 = encode(data);
|
|
128383
|
+
body2 = encode$1(data);
|
|
128230
128384
|
}
|
|
128231
128385
|
const canRetryBody = IDEMPOTENT_METHODS.has(method.toUpperCase());
|
|
128232
128386
|
let parseResult;
|
|
@@ -128342,7 +128496,7 @@ async function parseResponseBody(response2) {
|
|
|
128342
128496
|
const contentType = response2.headers.get("Content-Type") || "";
|
|
128343
128497
|
if (contentType.includes("application/cbor")) {
|
|
128344
128498
|
const buffer2 = await response2.arrayBuffer();
|
|
128345
|
-
const data2 = decode(new Uint8Array(buffer2));
|
|
128499
|
+
const data2 = decode$1(new Uint8Array(buffer2));
|
|
128346
128500
|
return {
|
|
128347
128501
|
data: data2,
|
|
128348
128502
|
getDebugContext: () => `Content-Type: ${contentType}, ${buffer2.byteLength} bytes (CBOR), preview: ${createPreview(data2)}`
|
|
@@ -128367,6 +128521,16 @@ function createQueryString(params) {
|
|
|
128367
128521
|
const query = params.toString();
|
|
128368
128522
|
return query ? `?${query}` : "";
|
|
128369
128523
|
}
|
|
128524
|
+
function appendAttributeListParams(searchParams, params) {
|
|
128525
|
+
if (params.workflowName) {
|
|
128526
|
+
searchParams.set("workflowName", params.workflowName);
|
|
128527
|
+
}
|
|
128528
|
+
if (params.startTime && params.endTime) {
|
|
128529
|
+
searchParams.set("startTime", params.startTime);
|
|
128530
|
+
searchParams.set("endTime", params.endTime);
|
|
128531
|
+
}
|
|
128532
|
+
appendPagination(searchParams, params.pagination);
|
|
128533
|
+
}
|
|
128370
128534
|
function createAnalytics(config2) {
|
|
128371
128535
|
return {
|
|
128372
128536
|
runs: {
|
|
@@ -128389,6 +128553,9 @@ function createAnalytics(config2) {
|
|
|
128389
128553
|
searchParams.set("startTime", params.startTime);
|
|
128390
128554
|
searchParams.set("endTime", params.endTime);
|
|
128391
128555
|
}
|
|
128556
|
+
if (params.attributes && Object.keys(params.attributes).length > 0) {
|
|
128557
|
+
searchParams.set("attributes", JSON.stringify(params.attributes));
|
|
128558
|
+
}
|
|
128392
128559
|
appendPagination(searchParams, params.pagination);
|
|
128393
128560
|
return makeRequest({
|
|
128394
128561
|
endpoint: `/v2/analytics/runs${createQueryString(searchParams)}`,
|
|
@@ -128397,6 +128564,17 @@ function createAnalytics(config2) {
|
|
|
128397
128564
|
});
|
|
128398
128565
|
}
|
|
128399
128566
|
},
|
|
128567
|
+
attributes: {
|
|
128568
|
+
list(params = {}) {
|
|
128569
|
+
const searchParams = new URLSearchParams();
|
|
128570
|
+
appendAttributeListParams(searchParams, params);
|
|
128571
|
+
return makeRequest({
|
|
128572
|
+
endpoint: `/v2/analytics/attributes${createQueryString(searchParams)}`,
|
|
128573
|
+
config: config2,
|
|
128574
|
+
schema: PaginatedResponseSchema(AnalyticsAttributeKeySchema)
|
|
128575
|
+
});
|
|
128576
|
+
}
|
|
128577
|
+
},
|
|
128400
128578
|
steps: {
|
|
128401
128579
|
get(runId, stepId) {
|
|
128402
128580
|
return makeRequest({
|
|
@@ -128495,6 +128673,225 @@ function createAnalytics(config2) {
|
|
|
128495
128673
|
}
|
|
128496
128674
|
};
|
|
128497
128675
|
}
|
|
128676
|
+
const ENCODING = "0123456789ABCDEFGHJKMNPQRSTVWXYZ";
|
|
128677
|
+
const DECODE_TABLE = (() => {
|
|
128678
|
+
const table2 = new Int8Array(128).fill(-1);
|
|
128679
|
+
for (let i = 0; i < ENCODING.length; i++) {
|
|
128680
|
+
table2[ENCODING.charCodeAt(i)] = i;
|
|
128681
|
+
}
|
|
128682
|
+
for (let i = 0; i < ENCODING.length; i++) {
|
|
128683
|
+
const lower2 = ENCODING[i].toLowerCase();
|
|
128684
|
+
if (lower2 !== ENCODING[i]) {
|
|
128685
|
+
table2[lower2.charCodeAt(0)] = i;
|
|
128686
|
+
}
|
|
128687
|
+
}
|
|
128688
|
+
return table2;
|
|
128689
|
+
})();
|
|
128690
|
+
const ULID_LENGTH = 26;
|
|
128691
|
+
const ULID_BYTE_LENGTH = 16;
|
|
128692
|
+
const TAG_BIT_MASK = 128;
|
|
128693
|
+
const REGION_MASK = 252;
|
|
128694
|
+
const VERSION_HIGH_MASK = 3;
|
|
128695
|
+
const VERSION_LOW_MASK = 224;
|
|
128696
|
+
const REGION_BYTE_INDEX = 6;
|
|
128697
|
+
const VERSION_LOW_BYTE_INDEX = 7;
|
|
128698
|
+
const VERSION_BIT_WIDTH = 5;
|
|
128699
|
+
const REGION_BIT_WIDTH = 6;
|
|
128700
|
+
const MAX_VERSION = (1 << VERSION_BIT_WIDTH) - 1;
|
|
128701
|
+
const MAX_REGION = (1 << REGION_BIT_WIDTH) - 1;
|
|
128702
|
+
function ulidToBytes(ulid2) {
|
|
128703
|
+
if (typeof ulid2 !== "string") {
|
|
128704
|
+
throw new TypeError(`Expected ULID string, got ${typeof ulid2}`);
|
|
128705
|
+
}
|
|
128706
|
+
if (ulid2.length !== ULID_LENGTH) {
|
|
128707
|
+
throw new Error(`Invalid ULID length: expected ${ULID_LENGTH}, got ${ulid2.length}`);
|
|
128708
|
+
}
|
|
128709
|
+
const values = new Uint8Array(ULID_LENGTH);
|
|
128710
|
+
for (let i = 0; i < ULID_LENGTH; i++) {
|
|
128711
|
+
const code2 = ulid2.charCodeAt(i);
|
|
128712
|
+
const v2 = code2 < 128 ? DECODE_TABLE[code2] : -1;
|
|
128713
|
+
if (v2 < 0) {
|
|
128714
|
+
throw new Error(`Invalid Crockford-Base32 character at index ${i}: ${JSON.stringify(ulid2[i])}`);
|
|
128715
|
+
}
|
|
128716
|
+
values[i] = v2;
|
|
128717
|
+
}
|
|
128718
|
+
if ((values[0] & 24) !== 0) {
|
|
128719
|
+
throw new Error(`Invalid ULID: top 2 bits must be zero (first char > '7'): ${JSON.stringify(ulid2[0])}`);
|
|
128720
|
+
}
|
|
128721
|
+
const out = new Uint8Array(ULID_BYTE_LENGTH);
|
|
128722
|
+
let bitBuf = values[0] & 7;
|
|
128723
|
+
let bitCount = 3;
|
|
128724
|
+
let outIdx = 0;
|
|
128725
|
+
for (let i = 1; i < ULID_LENGTH; i++) {
|
|
128726
|
+
bitBuf = bitBuf << 5 | values[i];
|
|
128727
|
+
bitCount += 5;
|
|
128728
|
+
while (bitCount >= 8) {
|
|
128729
|
+
bitCount -= 8;
|
|
128730
|
+
out[outIdx++] = bitBuf >> bitCount & 255;
|
|
128731
|
+
}
|
|
128732
|
+
}
|
|
128733
|
+
if (outIdx !== ULID_BYTE_LENGTH || bitCount !== 0) {
|
|
128734
|
+
throw new Error("Internal error: ULID bit packing did not consume cleanly");
|
|
128735
|
+
}
|
|
128736
|
+
return out;
|
|
128737
|
+
}
|
|
128738
|
+
function bytesToUlid(bytes) {
|
|
128739
|
+
if (bytes.length !== ULID_BYTE_LENGTH) {
|
|
128740
|
+
throw new Error(`Invalid byte length: expected ${ULID_BYTE_LENGTH}, got ${bytes.length}`);
|
|
128741
|
+
}
|
|
128742
|
+
let bitBuf = 0;
|
|
128743
|
+
let bitCount = 0;
|
|
128744
|
+
bitBuf = 0;
|
|
128745
|
+
bitCount = 2;
|
|
128746
|
+
let out = "";
|
|
128747
|
+
for (let i = 0; i < ULID_BYTE_LENGTH; i++) {
|
|
128748
|
+
bitBuf = bitBuf << 8 | bytes[i];
|
|
128749
|
+
bitCount += 8;
|
|
128750
|
+
while (bitCount >= 5) {
|
|
128751
|
+
bitCount -= 5;
|
|
128752
|
+
out += ENCODING[bitBuf >> bitCount & 31];
|
|
128753
|
+
}
|
|
128754
|
+
}
|
|
128755
|
+
if (out.length !== ULID_LENGTH || bitCount !== 0) {
|
|
128756
|
+
throw new Error("Internal error: ULID bit packing did not flush cleanly");
|
|
128757
|
+
}
|
|
128758
|
+
return out;
|
|
128759
|
+
}
|
|
128760
|
+
const REGION_IDS = {
|
|
128761
|
+
unknown: 0,
|
|
128762
|
+
iad1: 1,
|
|
128763
|
+
sfo1: 2,
|
|
128764
|
+
pdx1: 3,
|
|
128765
|
+
cle1: 4,
|
|
128766
|
+
yul1: 5,
|
|
128767
|
+
gru1: 6,
|
|
128768
|
+
dub1: 7,
|
|
128769
|
+
lhr1: 8,
|
|
128770
|
+
cdg1: 9,
|
|
128771
|
+
fra1: 10,
|
|
128772
|
+
bru1: 11,
|
|
128773
|
+
arn1: 12,
|
|
128774
|
+
hel1: 13,
|
|
128775
|
+
zrh1: 14,
|
|
128776
|
+
cpt1: 15,
|
|
128777
|
+
dxb1: 16,
|
|
128778
|
+
bom1: 17,
|
|
128779
|
+
sin1: 18,
|
|
128780
|
+
hkg1: 19,
|
|
128781
|
+
hnd1: 20,
|
|
128782
|
+
icn1: 21,
|
|
128783
|
+
kix1: 22,
|
|
128784
|
+
syd1: 23
|
|
128785
|
+
};
|
|
128786
|
+
const DEFAULT_REGION_CODE = "iad1";
|
|
128787
|
+
const REGION_CODES_BY_ID = new Map(Object.entries(REGION_IDS).filter((entry2) => entry2[0] !== "unknown").map(([code2, id2]) => [id2, code2]));
|
|
128788
|
+
function lookupRegion(regionId) {
|
|
128789
|
+
return REGION_CODES_BY_ID.get(regionId) ?? null;
|
|
128790
|
+
}
|
|
128791
|
+
function isKnownRegionCode(code2) {
|
|
128792
|
+
return code2 !== void 0 && code2 !== "unknown" && Object.hasOwn(REGION_IDS, code2);
|
|
128793
|
+
}
|
|
128794
|
+
const CURRENT_VERSION = 1;
|
|
128795
|
+
function isRegionCode(value) {
|
|
128796
|
+
return typeof value === "string" && value !== "unknown" && Object.hasOwn(REGION_IDS, value);
|
|
128797
|
+
}
|
|
128798
|
+
function encode(ulid2, region, options = {}) {
|
|
128799
|
+
let regionId;
|
|
128800
|
+
if (typeof region === "number") {
|
|
128801
|
+
if (!Number.isInteger(region) || region < 0 || region > MAX_REGION) {
|
|
128802
|
+
throw new RangeError(`regionId must be an integer in [0, ${MAX_REGION}]; got ${region}`);
|
|
128803
|
+
}
|
|
128804
|
+
regionId = region;
|
|
128805
|
+
} else if (isRegionCode(region)) {
|
|
128806
|
+
regionId = REGION_IDS[region];
|
|
128807
|
+
} else {
|
|
128808
|
+
throw new Error(`Unknown region: ${String(region)}`);
|
|
128809
|
+
}
|
|
128810
|
+
const version2 = options.version ?? CURRENT_VERSION;
|
|
128811
|
+
if (!Number.isInteger(version2) || version2 < 0 || version2 > MAX_VERSION) {
|
|
128812
|
+
throw new RangeError(`version must be an integer in [0, ${MAX_VERSION}]; got ${version2}`);
|
|
128813
|
+
}
|
|
128814
|
+
const bytes = ulidToBytes(ulid2);
|
|
128815
|
+
bytes[0] = bytes[0] | TAG_BIT_MASK;
|
|
128816
|
+
const regionShifted = (regionId & MAX_REGION) << 2;
|
|
128817
|
+
const versionHigh = version2 >> 3 & VERSION_HIGH_MASK;
|
|
128818
|
+
const versionLow = (version2 & 7) << 5;
|
|
128819
|
+
bytes[REGION_BYTE_INDEX] = bytes[REGION_BYTE_INDEX] & -256 | regionShifted | versionHigh;
|
|
128820
|
+
bytes[VERSION_LOW_BYTE_INDEX] = bytes[VERSION_LOW_BYTE_INDEX] & ~VERSION_LOW_MASK | versionLow;
|
|
128821
|
+
return bytesToUlid(bytes);
|
|
128822
|
+
}
|
|
128823
|
+
function decode(taggedUlid) {
|
|
128824
|
+
const bytes = ulidToBytes(taggedUlid);
|
|
128825
|
+
const tagged = (bytes[0] & TAG_BIT_MASK) !== 0;
|
|
128826
|
+
bytes[0] = bytes[0] & ~TAG_BIT_MASK;
|
|
128827
|
+
const ulid2 = bytesToUlid(bytes);
|
|
128828
|
+
if (!tagged) {
|
|
128829
|
+
return { tagged: false, ulid: ulid2, version: null, regionId: null, region: null };
|
|
128830
|
+
}
|
|
128831
|
+
const regionId = (bytes[REGION_BYTE_INDEX] & REGION_MASK) >> 2;
|
|
128832
|
+
const version2 = (bytes[REGION_BYTE_INDEX] & VERSION_HIGH_MASK) << 3 | (bytes[VERSION_LOW_BYTE_INDEX] & VERSION_LOW_MASK) >> 5;
|
|
128833
|
+
return {
|
|
128834
|
+
tagged: true,
|
|
128835
|
+
ulid: ulid2,
|
|
128836
|
+
version: version2,
|
|
128837
|
+
regionId,
|
|
128838
|
+
region: lookupRegion(regionId)
|
|
128839
|
+
};
|
|
128840
|
+
}
|
|
128841
|
+
const ulid = monotonicFactory();
|
|
128842
|
+
let lastRunId;
|
|
128843
|
+
function bumpAboveMetadata(ulidStr) {
|
|
128844
|
+
const bytes = ulidToBytes(ulidStr);
|
|
128845
|
+
let i = 5;
|
|
128846
|
+
let carry = 1;
|
|
128847
|
+
while (i >= 0 && carry > 0) {
|
|
128848
|
+
const sum = bytes[i] + carry;
|
|
128849
|
+
bytes[i] = sum & 255;
|
|
128850
|
+
carry = sum >> 8;
|
|
128851
|
+
i--;
|
|
128852
|
+
}
|
|
128853
|
+
if (carry > 0) {
|
|
128854
|
+
throw new Error("ULID space exhausted");
|
|
128855
|
+
}
|
|
128856
|
+
return bytesToUlid(bytes);
|
|
128857
|
+
}
|
|
128858
|
+
function coerceRegion(value) {
|
|
128859
|
+
if (typeof value !== "string" || value === "" || value === "unknown") {
|
|
128860
|
+
return null;
|
|
128861
|
+
}
|
|
128862
|
+
return Object.hasOwn(REGION_IDS, value) ? value : null;
|
|
128863
|
+
}
|
|
128864
|
+
function resolveRegion$1(options) {
|
|
128865
|
+
return coerceRegion(options == null ? void 0 : options.region) ?? coerceRegion(process.env.VERCEL_REGION) ?? DEFAULT_REGION_CODE;
|
|
128866
|
+
}
|
|
128867
|
+
function createRunId(options) {
|
|
128868
|
+
const region = resolveRegion$1(options);
|
|
128869
|
+
const regionId = REGION_IDS[region];
|
|
128870
|
+
let candidate = encode(ulid(), regionId);
|
|
128871
|
+
if (lastRunId !== void 0) {
|
|
128872
|
+
while (candidate <= lastRunId) {
|
|
128873
|
+
candidate = encode(bumpAboveMetadata(lastRunId), regionId);
|
|
128874
|
+
}
|
|
128875
|
+
}
|
|
128876
|
+
lastRunId = candidate;
|
|
128877
|
+
return candidate;
|
|
128878
|
+
}
|
|
128879
|
+
function regionForRunId(runId) {
|
|
128880
|
+
const bare = runId.startsWith("wrun_") ? runId.slice("wrun_".length) : runId;
|
|
128881
|
+
try {
|
|
128882
|
+
const decoded = decode(bare);
|
|
128883
|
+
return decoded.tagged && decoded.region ? decoded.region : DEFAULT_REGION_CODE;
|
|
128884
|
+
} catch {
|
|
128885
|
+
return null;
|
|
128886
|
+
}
|
|
128887
|
+
}
|
|
128888
|
+
function describeRun(run2) {
|
|
128889
|
+
const runId = run2.runId;
|
|
128890
|
+
if (typeof runId !== "string" || runId.length === 0) {
|
|
128891
|
+
return null;
|
|
128892
|
+
}
|
|
128893
|
+
return { region: regionForRunId(runId) };
|
|
128894
|
+
}
|
|
128498
128895
|
const KEY_BYTES = 32;
|
|
128499
128896
|
async function deriveRunKey(deploymentKey, projectId, runId) {
|
|
128500
128897
|
if (deploymentKey.length !== KEY_BYTES) {
|
|
@@ -132439,7 +132836,7 @@ function resolveTelemetryConfig(client2, send2) {
|
|
|
132439
132836
|
var otelApiPromise;
|
|
132440
132837
|
function getOtelApi() {
|
|
132441
132838
|
if (!otelApiPromise) {
|
|
132442
|
-
otelApiPromise = import("./index-
|
|
132839
|
+
otelApiPromise = import("./index-CETb4fkq.js").then(
|
|
132443
132840
|
(mod) => mod,
|
|
132444
132841
|
() => null
|
|
132445
132842
|
);
|
|
@@ -133406,7 +133803,7 @@ class CborTransport {
|
|
|
133406
133803
|
__publicField(this, "contentType", "application/cbor");
|
|
133407
133804
|
}
|
|
133408
133805
|
serialize(value) {
|
|
133409
|
-
return Buffer.from(encode(value));
|
|
133806
|
+
return Buffer.from(encode$1(value));
|
|
133410
133807
|
}
|
|
133411
133808
|
async deserialize(stream) {
|
|
133412
133809
|
const chunks = [];
|
|
@@ -133418,7 +133815,7 @@ class CborTransport {
|
|
|
133418
133815
|
if (value)
|
|
133419
133816
|
chunks.push(value);
|
|
133420
133817
|
}
|
|
133421
|
-
return decode(Buffer.concat(chunks));
|
|
133818
|
+
return decode$1(Buffer.concat(chunks));
|
|
133422
133819
|
}
|
|
133423
133820
|
}
|
|
133424
133821
|
class JsonTransport2 {
|
|
@@ -133446,7 +133843,7 @@ class DualTransport {
|
|
|
133446
133843
|
__publicField(this, "contentType", "application/cbor");
|
|
133447
133844
|
}
|
|
133448
133845
|
serialize(value) {
|
|
133449
|
-
return Buffer.from(encode(value));
|
|
133846
|
+
return Buffer.from(encode$1(value));
|
|
133450
133847
|
}
|
|
133451
133848
|
async deserialize(stream) {
|
|
133452
133849
|
const chunks = [];
|
|
@@ -133460,7 +133857,7 @@ class DualTransport {
|
|
|
133460
133857
|
}
|
|
133461
133858
|
const buffer2 = Buffer.concat(chunks);
|
|
133462
133859
|
try {
|
|
133463
|
-
return decode(buffer2);
|
|
133860
|
+
return decode$1(buffer2);
|
|
133464
133861
|
} catch {
|
|
133465
133862
|
return JSON.parse(buffer2.toString());
|
|
133466
133863
|
}
|
|
@@ -133488,6 +133885,43 @@ function getHandlerErrorRetryAfterSeconds(deliveryCount) {
|
|
|
133488
133885
|
const jitterSeconds = Math.floor(Math.random() * (Math.ceil(backoffSeconds * HANDLER_ERROR_RETRY_JITTER_RATIO) + 1));
|
|
133489
133886
|
return Math.max(HANDLER_ERROR_RETRY_AFTER_SECONDS, backoffSeconds - jitterSeconds);
|
|
133490
133887
|
}
|
|
133888
|
+
const FALLBACK_REGION = "iad1";
|
|
133889
|
+
function getRunIdFromPayload(payload) {
|
|
133890
|
+
if ("runId" in payload && typeof payload.runId === "string") {
|
|
133891
|
+
return payload.runId;
|
|
133892
|
+
}
|
|
133893
|
+
if ("workflowRunId" in payload && typeof payload.workflowRunId === "string") {
|
|
133894
|
+
return payload.workflowRunId;
|
|
133895
|
+
}
|
|
133896
|
+
return void 0;
|
|
133897
|
+
}
|
|
133898
|
+
const RUN_ID_PREFIX = "wrun_";
|
|
133899
|
+
function regionFromTaggedRunId(runId) {
|
|
133900
|
+
if (!runId)
|
|
133901
|
+
return void 0;
|
|
133902
|
+
const ulid2 = runId.startsWith(RUN_ID_PREFIX) ? runId.slice(RUN_ID_PREFIX.length) : runId;
|
|
133903
|
+
try {
|
|
133904
|
+
const decoded = decode(ulid2);
|
|
133905
|
+
if (!decoded.tagged)
|
|
133906
|
+
return void 0;
|
|
133907
|
+
if (decoded.regionId === REGION_IDS.unknown)
|
|
133908
|
+
return void 0;
|
|
133909
|
+
return decoded.region ?? void 0;
|
|
133910
|
+
} catch {
|
|
133911
|
+
return void 0;
|
|
133912
|
+
}
|
|
133913
|
+
}
|
|
133914
|
+
function resolveTargetRegion(payload, opts) {
|
|
133915
|
+
if (isKnownRegionCode(opts == null ? void 0 : opts.region))
|
|
133916
|
+
return opts.region;
|
|
133917
|
+
const fromRunId = regionFromTaggedRunId(getRunIdFromPayload(payload));
|
|
133918
|
+
if (fromRunId)
|
|
133919
|
+
return fromRunId;
|
|
133920
|
+
const fromEnv = process.env.VERCEL_REGION;
|
|
133921
|
+
if (isKnownRegionCode(fromEnv))
|
|
133922
|
+
return fromEnv;
|
|
133923
|
+
return FALLBACK_REGION;
|
|
133924
|
+
}
|
|
133491
133925
|
function getHeadersFromPayload(payload) {
|
|
133492
133926
|
const headers2 = {};
|
|
133493
133927
|
if ("runId" in payload && typeof payload.runId === "string") {
|
|
@@ -133501,15 +133935,41 @@ function getHeadersFromPayload(payload) {
|
|
|
133501
133935
|
}
|
|
133502
133936
|
return Object.keys(headers2).length > 0 ? headers2 : void 0;
|
|
133503
133937
|
}
|
|
133938
|
+
const FLOW_TOPIC_PATTERN = /^__([a-z][a-z0-9]*_)?wkf_workflow_/;
|
|
133939
|
+
let loggedSequentialReplays = false;
|
|
133940
|
+
function isSequentialReplaysEnabled() {
|
|
133941
|
+
const explicit = process.env.WORKFLOW_SEQUENTIAL_REPLAYS;
|
|
133942
|
+
if (explicit !== void 0 && explicit !== "") {
|
|
133943
|
+
return explicit === "1";
|
|
133944
|
+
}
|
|
133945
|
+
return process.env.WORKFLOW_SAFE_MODE === "1";
|
|
133946
|
+
}
|
|
133947
|
+
function getPhysicalQueueName(queueName, payload) {
|
|
133948
|
+
if (!isSequentialReplaysEnabled() || !FLOW_TOPIC_PATTERN.test(queueName)) {
|
|
133949
|
+
return queueName;
|
|
133950
|
+
}
|
|
133951
|
+
if (!loggedSequentialReplays) {
|
|
133952
|
+
loggedSequentialReplays = true;
|
|
133953
|
+
console.warn("[workflow] WORKFLOW_SEQUENTIAL_REPLAYS=1: routing flow messages to per-run queue topics");
|
|
133954
|
+
}
|
|
133955
|
+
if ("runId" in payload && typeof payload.runId === "string") {
|
|
133956
|
+
if ("stepId" in payload && typeof payload.stepId === "string") {
|
|
133957
|
+
return `${queueName}_${payload.runId}_${payload.stepId}`;
|
|
133958
|
+
}
|
|
133959
|
+
return `${queueName}_${payload.runId}`;
|
|
133960
|
+
}
|
|
133961
|
+
if ("__healthCheck" in payload && typeof payload.correlationId === "string") {
|
|
133962
|
+
return `${queueName}_${payload.correlationId}`;
|
|
133963
|
+
}
|
|
133964
|
+
return queueName;
|
|
133965
|
+
}
|
|
133504
133966
|
function createQueue$1(config2) {
|
|
133505
133967
|
const { baseUrl, usingProxy } = getHttpUrl(config2);
|
|
133506
133968
|
const headers2 = getHeaders(config2, { usingProxy });
|
|
133507
|
-
const region = "iad1";
|
|
133508
133969
|
const cborTransport = new CborTransport();
|
|
133509
133970
|
const jsonTransport = new JsonTransport2();
|
|
133510
133971
|
const dualTransport = new DualTransport();
|
|
133511
133972
|
const clientOptions = {
|
|
133512
|
-
region,
|
|
133513
133973
|
dispatcher: getDispatcher(config2),
|
|
133514
133974
|
transport: dualTransport,
|
|
133515
133975
|
...usingProxy && {
|
|
@@ -133518,12 +133978,7 @@ function createQueue$1(config2) {
|
|
|
133518
133978
|
resolveBaseUrl: () => new URL(`${baseUrl}/queues-proxy`),
|
|
133519
133979
|
token: config2 == null ? void 0 : config2.token
|
|
133520
133980
|
},
|
|
133521
|
-
headers:
|
|
133522
|
-
...Object.fromEntries(headers2.entries()),
|
|
133523
|
-
// The proxy's fixed base URL bypasses the SDK's regional host
|
|
133524
|
-
// resolution, so the region travels as a header instead.
|
|
133525
|
-
...usingProxy && { "x-vercel-queue-region": region }
|
|
133526
|
-
}
|
|
133981
|
+
headers: Object.fromEntries(headers2.entries())
|
|
133527
133982
|
};
|
|
133528
133983
|
const queue = async (queueName, payload, opts) => {
|
|
133529
133984
|
const deploymentId = (opts == null ? void 0 : opts.deploymentId) ?? process.env.VERCEL_DEPLOYMENT_ID;
|
|
@@ -133532,18 +133987,34 @@ function createQueue$1(config2) {
|
|
|
133532
133987
|
}
|
|
133533
133988
|
const useCbor = ((opts == null ? void 0 : opts.specVersion) ?? SPEC_VERSION_CURRENT) >= SPEC_VERSION_SUPPORTS_CBOR_QUEUE_TRANSPORT;
|
|
133534
133989
|
const transport = useCbor ? cborTransport : jsonTransport;
|
|
133990
|
+
const region = resolveTargetRegion(payload, opts);
|
|
133535
133991
|
const client2 = new QueueClient({
|
|
133536
133992
|
...clientOptions,
|
|
133993
|
+
// When sending through the api.vercel.com proxy, the fixed
|
|
133994
|
+
// `resolveBaseUrl` above replaces the queue SDK's own
|
|
133995
|
+
// region -> `<region>.vercel-queue.com` base-URL resolution, so
|
|
133996
|
+
// the per-send resolved region must travel as a header instead:
|
|
133997
|
+
// the proxy forwards the send to that region's VQS dataplane
|
|
133998
|
+
// host when `x-vercel-queue-region` is present (vercel/api#79056).
|
|
133999
|
+
...usingProxy && {
|
|
134000
|
+
headers: {
|
|
134001
|
+
...clientOptions.headers,
|
|
134002
|
+
"x-vercel-queue-region": region
|
|
134003
|
+
}
|
|
134004
|
+
},
|
|
134005
|
+
region,
|
|
133537
134006
|
deploymentId,
|
|
133538
134007
|
transport
|
|
133539
134008
|
});
|
|
133540
134009
|
const wrapper = {
|
|
133541
134010
|
payload,
|
|
134011
|
+
// Keep the logical queue name so the handler and re-enqueue path
|
|
134012
|
+
// resolve the same per-run physical topic on the next invocation.
|
|
133542
134013
|
queueName,
|
|
133543
134014
|
// Store deploymentId in the message so it can be preserved when re-enqueueing
|
|
133544
134015
|
deploymentId: opts == null ? void 0 : opts.deploymentId
|
|
133545
134016
|
};
|
|
133546
|
-
const sanitizedQueueName = queueName.replace(/[^A-Za-z0-9-_]/g, "-");
|
|
134017
|
+
const sanitizedQueueName = getPhysicalQueueName(queueName, payload).replace(/[^A-Za-z0-9-_]/g, "-");
|
|
133547
134018
|
try {
|
|
133548
134019
|
const { messageId } = await client2.send(sanitizedQueueName, wrapper, {
|
|
133549
134020
|
idempotencyKey: opts == null ? void 0 : opts.idempotencyKey,
|
|
@@ -133829,7 +134300,7 @@ async function withEventPostRetry(fn2, eventType) {
|
|
|
133829
134300
|
}
|
|
133830
134301
|
const V4_FRAME_CONTENT_TYPE = "application/vnd.workflow.v4-frames";
|
|
133831
134302
|
function encodeFrame(meta2, body2) {
|
|
133832
|
-
const metaBytes = new Uint8Array(encode(meta2));
|
|
134303
|
+
const metaBytes = new Uint8Array(encode$1(meta2));
|
|
133833
134304
|
const out = new Uint8Array(4 + metaBytes.byteLength + 4 + body2.byteLength);
|
|
133834
134305
|
const view = new DataView(out.buffer);
|
|
133835
134306
|
view.setUint32(0, metaBytes.byteLength, false);
|
|
@@ -133869,7 +134340,7 @@ async function* decodeFrames(source) {
|
|
|
133869
134340
|
if (!await refill(metaLen)) {
|
|
133870
134341
|
throw new Error("decodeFrames: truncated meta block");
|
|
133871
134342
|
}
|
|
133872
|
-
const meta2 = decode(take(metaLen));
|
|
134343
|
+
const meta2 = decode$1(take(metaLen));
|
|
133873
134344
|
if (!await refill(4)) {
|
|
133874
134345
|
throw new Error("decodeFrames: truncated body length");
|
|
133875
134346
|
}
|
|
@@ -134037,7 +134508,7 @@ async function createWorkflowRunEventV4(input, config2) {
|
|
|
134037
134508
|
throw new Error("v4 createEvent: response missing required x-wf-* headers");
|
|
134038
134509
|
}
|
|
134039
134510
|
const bodyBytes = new Uint8Array(await response2.arrayBuffer());
|
|
134040
|
-
const body2 = bodyBytes.byteLength > 0 ? decode(bodyBytes) : {};
|
|
134511
|
+
const body2 = bodyBytes.byteLength > 0 ? decode$1(bodyBytes) : {};
|
|
134041
134512
|
return { eventId, runId, createdAt, body: body2 };
|
|
134042
134513
|
}
|
|
134043
134514
|
function readHeader(responseHeaders, name2) {
|
|
@@ -134419,6 +134890,14 @@ async function getStep(runId, stepId, params, config2) {
|
|
|
134419
134890
|
});
|
|
134420
134891
|
return filterStepData(step, resolveData);
|
|
134421
134892
|
}
|
|
134893
|
+
function validateWorkflowRunIdTimestamp(id2) {
|
|
134894
|
+
const raw2 = id2.startsWith("wrun_") ? id2.slice("wrun_".length) : id2;
|
|
134895
|
+
try {
|
|
134896
|
+
return validateUlidTimestamp(`wrun_${decode(raw2).ulid}`, "wrun_");
|
|
134897
|
+
} catch {
|
|
134898
|
+
return validateUlidTimestamp(id2, "wrun_");
|
|
134899
|
+
}
|
|
134900
|
+
}
|
|
134422
134901
|
const eventsNeedingResolve = /* @__PURE__ */ new Set([
|
|
134423
134902
|
"run_created",
|
|
134424
134903
|
// runtime reads result.run.runId
|
|
@@ -134615,7 +135094,7 @@ async function createWorkflowRunEventInner(id2, data, params, config2) {
|
|
|
134615
135094
|
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 });
|
|
134616
135095
|
}
|
|
134617
135096
|
if (data.eventType === "run_created") {
|
|
134618
|
-
const validationError =
|
|
135097
|
+
const validationError = validateWorkflowRunIdTimestamp(id2);
|
|
134619
135098
|
if (validationError) {
|
|
134620
135099
|
throw new WorkflowWorldError(validationError, { status: 400 });
|
|
134621
135100
|
}
|
|
@@ -134988,6 +135467,8 @@ function createWorld(config2) {
|
|
|
134988
135467
|
...createStorage(config2),
|
|
134989
135468
|
analytics: createAnalytics(config2),
|
|
134990
135469
|
...instrumentObject("world.streams", createStreamer(config2)),
|
|
135470
|
+
createRunId,
|
|
135471
|
+
describeRun,
|
|
134991
135472
|
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),
|
|
134992
135473
|
resolveLatestDeploymentId: createResolveLatestDeploymentId(config2)
|
|
134993
135474
|
};
|
|
@@ -157963,7 +158444,7 @@ const handlers = {
|
|
|
157963
158444
|
getPublicServerConfig: () => getPublicServerConfig()
|
|
157964
158445
|
};
|
|
157965
158446
|
function cborResponse(data, status = 200) {
|
|
157966
|
-
const encoded = encode(data);
|
|
158447
|
+
const encoded = encode$1(data);
|
|
157967
158448
|
return new Response(new Uint8Array(encoded), {
|
|
157968
158449
|
status,
|
|
157969
158450
|
headers: {
|
|
@@ -157979,7 +158460,7 @@ async function action({
|
|
|
157979
158460
|
try {
|
|
157980
158461
|
if (contentType.includes("application/cbor")) {
|
|
157981
158462
|
const buffer2 = await request2.arrayBuffer();
|
|
157982
|
-
body2 = decode(new Uint8Array(buffer2));
|
|
158463
|
+
body2 = decode$1(new Uint8Array(buffer2));
|
|
157983
158464
|
} else {
|
|
157984
158465
|
body2 = await request2.json();
|
|
157985
158466
|
}
|
|
@@ -158096,7 +158577,7 @@ const route4 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProper
|
|
|
158096
158577
|
__proto__: null,
|
|
158097
158578
|
loader
|
|
158098
158579
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
158099
|
-
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-
|
|
158580
|
+
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 };
|
|
158100
158581
|
const assetsBuildDirectory = "build/client";
|
|
158101
158582
|
const basename = "/";
|
|
158102
158583
|
const future = { "unstable_optimizeDeps": false, "unstable_subResourceIntegrity": false, "unstable_trailingSlashAwareDataRequests": false, "unstable_previewServerPrerendering": false, "v8_middleware": false, "v8_splitRouteModules": false, "v8_viteEnvironmentApi": false };
|
|
@@ -158165,96 +158646,97 @@ const serverBuild = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineP
|
|
|
158165
158646
|
ssr
|
|
158166
158647
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
158167
158648
|
export {
|
|
158168
|
-
|
|
158649
|
+
WaitStatusSchema as $,
|
|
158169
158650
|
ATTRIBUTE_KEY_MAX_LENGTH as A,
|
|
158170
158651
|
BaseEventSchema as B,
|
|
158171
158652
|
CHILD_ENTITY_CREATION_EVENT_TYPES as C,
|
|
158172
158653
|
DEFAULT_TIMESTAMP_THRESHOLD_FUTURE_MS as D,
|
|
158173
158654
|
EVENT_DATA_PAYLOAD_FIELD_BY_EVENT_TYPE as E,
|
|
158174
|
-
|
|
158175
|
-
|
|
158655
|
+
SerializedDataSchema as F,
|
|
158656
|
+
StepInvokePayloadSchema as G,
|
|
158176
158657
|
HookSchema as H,
|
|
158177
|
-
|
|
158178
|
-
|
|
158179
|
-
|
|
158658
|
+
StepSchema as I,
|
|
158659
|
+
StepStatusSchema as J,
|
|
158660
|
+
TERMINAL_STEP_EVENT_TYPES as K,
|
|
158180
158661
|
LegacySerializedDataSchemaV1 as L,
|
|
158181
158662
|
MessageId as M,
|
|
158182
158663
|
Nt as N,
|
|
158183
|
-
|
|
158664
|
+
TERMINAL_STEP_STATUSES as O,
|
|
158184
158665
|
PaginatedResponseSchema as P,
|
|
158185
158666
|
QueuePayloadSchema as Q,
|
|
158186
158667
|
RESERVED_ATTRIBUTE_KEY_PREFIX as R,
|
|
158187
158668
|
SPEC_VERSION_CURRENT as S,
|
|
158188
158669
|
TERMINAL_RUN_EVENT_TYPES as T,
|
|
158189
|
-
|
|
158190
|
-
|
|
158191
|
-
|
|
158192
|
-
|
|
158193
|
-
|
|
158194
|
-
|
|
158195
|
-
|
|
158670
|
+
TERMINAL_WORKFLOW_RUN_STATUSES as U,
|
|
158671
|
+
TerminalRunEventTypeSchema as V,
|
|
158672
|
+
TerminalStepStatusSchema as W,
|
|
158673
|
+
TerminalWorkflowRunStatusSchema as X,
|
|
158674
|
+
ValidQueueName as Y,
|
|
158675
|
+
WAIT_EVENT_TYPES as Z,
|
|
158676
|
+
WaitSchema as _,
|
|
158196
158677
|
ATTRIBUTE_MAX_PER_RUN as a,
|
|
158197
|
-
|
|
158198
|
-
|
|
158199
|
-
|
|
158200
|
-
|
|
158201
|
-
|
|
158202
|
-
|
|
158203
|
-
|
|
158204
|
-
|
|
158205
|
-
|
|
158206
|
-
|
|
158207
|
-
|
|
158208
|
-
|
|
158209
|
-
|
|
158210
|
-
|
|
158211
|
-
|
|
158212
|
-
|
|
158213
|
-
|
|
158214
|
-
|
|
158215
|
-
|
|
158216
|
-
|
|
158217
|
-
|
|
158218
|
-
|
|
158219
|
-
|
|
158220
|
-
|
|
158221
|
-
|
|
158222
|
-
|
|
158223
|
-
|
|
158224
|
-
|
|
158225
|
-
|
|
158226
|
-
|
|
158227
|
-
|
|
158228
|
-
|
|
158229
|
-
|
|
158230
|
-
|
|
158231
|
-
|
|
158232
|
-
|
|
158233
|
-
|
|
158234
|
-
|
|
158678
|
+
WorkflowInvokePayloadSchema as a0,
|
|
158679
|
+
WorkflowRunBaseSchema as a1,
|
|
158680
|
+
WorkflowRunSchema as a2,
|
|
158681
|
+
WorkflowRunStatusSchema as a3,
|
|
158682
|
+
applyAttributeChanges as a4,
|
|
158683
|
+
envNumber as a5,
|
|
158684
|
+
getEventDataPayloadField as a6,
|
|
158685
|
+
getEventDataRefFields as a7,
|
|
158686
|
+
getQueueTopicPrefix as a8,
|
|
158687
|
+
isChildEntityCreationEvent as a9,
|
|
158688
|
+
requireTokenUtil as aA,
|
|
158689
|
+
requireTokenError as aB,
|
|
158690
|
+
serverBuild as aC,
|
|
158691
|
+
isChildEntityCreationEventType as aa,
|
|
158692
|
+
isHookEventRequiringExistence as ab,
|
|
158693
|
+
isHookLifecycleEventType as ac,
|
|
158694
|
+
isLegacySpecVersion as ad,
|
|
158695
|
+
isStepEventType as ae,
|
|
158696
|
+
isTerminalRunEventType as af,
|
|
158697
|
+
isTerminalStepEventType as ag,
|
|
158698
|
+
isTerminalStepStatus as ah,
|
|
158699
|
+
isTerminalWorkflowRunStatus as ai,
|
|
158700
|
+
isWaitEventType as aj,
|
|
158701
|
+
parseQueueName as ak,
|
|
158702
|
+
reenqueueActiveRuns as al,
|
|
158703
|
+
requiresNewerWorld as am,
|
|
158704
|
+
resolveQueueNamespace as an,
|
|
158705
|
+
stripEventDataRefs as ao,
|
|
158706
|
+
ulidToDate as ap,
|
|
158707
|
+
validateAttributeChanges as aq,
|
|
158708
|
+
validateAttributeKey as ar,
|
|
158709
|
+
validateAttributeValue as as,
|
|
158710
|
+
validateUlidTimestamp as at,
|
|
158711
|
+
workflowRunIdSchema as au,
|
|
158712
|
+
R as av,
|
|
158713
|
+
Ks as aw,
|
|
158714
|
+
jsxRuntimeExports as ax,
|
|
158715
|
+
Qe as ay,
|
|
158716
|
+
registerZstdDecoder as az,
|
|
158235
158717
|
ATTRIBUTE_VALUE_MAX_BYTES as b,
|
|
158236
|
-
|
|
158237
|
-
|
|
158238
|
-
|
|
158239
|
-
|
|
158240
|
-
|
|
158241
|
-
|
|
158242
|
-
|
|
158243
|
-
|
|
158244
|
-
|
|
158245
|
-
|
|
158246
|
-
|
|
158247
|
-
|
|
158248
|
-
|
|
158249
|
-
|
|
158250
|
-
|
|
158251
|
-
|
|
158252
|
-
|
|
158253
|
-
|
|
158254
|
-
|
|
158255
|
-
|
|
158256
|
-
|
|
158257
|
-
|
|
158258
|
-
|
|
158259
|
-
|
|
158718
|
+
AnalyticsAttributeKeySchema as c,
|
|
158719
|
+
AnalyticsEventSchema as d,
|
|
158720
|
+
AnalyticsHookSchema as e,
|
|
158721
|
+
AnalyticsRunSchema as f,
|
|
158722
|
+
AnalyticsStepSchema as g,
|
|
158723
|
+
AnalyticsWaitSchema as h,
|
|
158724
|
+
AttributeChangeSchema as i,
|
|
158725
|
+
AttributeChangesSchema as j,
|
|
158726
|
+
AttributeValidationError as k,
|
|
158727
|
+
DEFAULT_TIMESTAMP_THRESHOLD_PAST_MS as l,
|
|
158728
|
+
EVENT_DATA_REF_FIELDS as m,
|
|
158729
|
+
EventSchema as n,
|
|
158730
|
+
EventTypeSchema as o,
|
|
158731
|
+
HOOK_EVENTS_REQUIRING_EXISTENCE as p,
|
|
158732
|
+
HOOK_LIFECYCLE_EVENT_TYPES as q,
|
|
158733
|
+
HealthCheckPayloadSchema as r,
|
|
158734
|
+
HookCreatedEventSchema as s,
|
|
158735
|
+
QueuePrefix as t,
|
|
158736
|
+
RunInputSchema as u,
|
|
158737
|
+
SPEC_VERSION_LEGACY as v,
|
|
158738
|
+
SPEC_VERSION_SUPPORTS_ATTRIBUTES as w,
|
|
158739
|
+
SPEC_VERSION_SUPPORTS_CBOR_QUEUE_TRANSPORT as x,
|
|
158740
|
+
SPEC_VERSION_SUPPORTS_COMPRESSION as y,
|
|
158741
|
+
STEP_EVENT_TYPES as z
|
|
158260
158742
|
};
|