@workflow/web 5.0.0-beta.41 → 5.0.0-beta.43
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/app-9JVnf-IU.css +1 -0
- package/build/client/assets/{arrow-up-right-jWH-UQH9.js → arrow-up-right-D39pnGsD.js} +1 -1
- package/build/client/assets/{highlighted-body-B3W2YXNL-DmmWu7VM.js → highlighted-body-B3W2YXNL-Dc1dLaUr.js} +1 -1
- package/build/client/assets/{home-BwYHJJJr.js → home-C6CuMqQu.js} +3 -3
- package/build/client/assets/{loader-circle-fFQM94Ej.js → loader-circle-BOxaTUjK.js} +1 -1
- package/build/client/assets/{manifest-f6a9dca2.js → manifest-157e28f1.js} +1 -1
- package/build/client/assets/{mermaid-3ZIDBTTL-DchhEfRL.js → mermaid-3ZIDBTTL-gEw-Ch1C.js} +308 -284
- package/build/client/assets/{root-D6p4Hb4F.js → root-BfhMCbkz.js} +3 -3
- package/build/client/assets/root-Bl5xphvU.css +1 -0
- package/build/client/assets/{run-detail-vPCbZIXx.js → run-detail-BG_1K2Hq.js} +339 -130
- package/build/client/assets/{workflow-graph-viewer-t_fSwuwz.js → workflow-graph-viewer-CxrWityD.js} +3 -145
- package/build/client/assets/{zstd-browser-decoder-BTw1glGN.js → zstd-browser-decoder-CAEVa0bm.js} +1 -1
- package/build/server/assets/{app-D8GiFFR6.js → app-_xgEuKqE.js} +1533 -799
- package/build/server/assets/{highlighted-body-B3W2YXNL-BZVc2guG.js → highlighted-body-B3W2YXNL-B1Smd86a.js} +5 -4
- package/build/server/assets/index-CSsrecUx.js +161 -0
- package/build/server/assets/{index-DTci39F3.js → index-Ck5CB_wQ.js} +1 -1
- package/build/server/assets/{mermaid-3ZIDBTTL-DOefrphg.js → mermaid-3ZIDBTTL-CwYR558N.js} +5 -4
- package/build/server/assets/{token-c3byIJRC.js → token-COK7oHMh.js} +1 -1
- package/build/server/assets/{token-util-C2yENsqE.js → token-util-BhmVdeCX.js} +1 -1
- package/build/server/assets/{websocket-server-DagS_hnJ.js → websocket-server-ByjlHAhQ.js} +1 -1
- package/build/server/assets/{wrapper-Cnumc4u1.js → wrapper-DWeVTope.js} +7 -6
- package/build/server/assets/{ws-transport-2gJL6hC2.js → ws-transport-BCfcEhAO.js} +45 -6
- package/build/server/assets/{zstd-browser-decoder-BCVvr1WT.js → zstd-browser-decoder-D8JD_nwS.js} +5 -4
- package/build/server/index.js +7 -6
- package/package.json +7 -7
- package/build/client/assets/app-BkGXg64e.css +0 -1
- package/build/client/assets/root-ZRjqDhEN.css +0 -1
- package/build/server/assets/index-BByEr1g6.js +0 -154
|
@@ -13,12 +13,12 @@ var __privateAdd = (obj, member, value) => member.has(obj) ? __typeError("Cannot
|
|
|
13
13
|
var __privateSet = (obj, member, value, setter) => (__accessCheck(obj, member, "write to private field"), setter ? setter.call(obj, value) : member.set(obj, value), value);
|
|
14
14
|
var __privateMethod = (obj, member, method) => (__accessCheck(obj, member, "access private method"), method);
|
|
15
15
|
var __superGet = (cls, obj, key) => __reflectGet(__getProtoOf(cls), key, obj);
|
|
16
|
-
var _a2, _b, _c, _d, _listeners, _onabort, _reader, _root, _hasMagic, _uflag, _parts, _parent, _parentIndex, _negs, _filledNegs, _options, _toString, _emptyExt, _AST_instances, fillNegs_fn, _AST_static, parseAST_fn, canAdoptWithSpace_fn, canAdopt_fn, canAdoptType_fn, adoptWithSpace_fn, adopt_fn, canUsurpType_fn, canUsurp_fn, usurp_fn, flatten_fn, partsToRegExp_fn, parseGlob_fn, _Minimatch_instances, matchGlobstar_fn, matchGlobStarBodySections_fn, matchOne_fn, _worldPromise, _Run_instances, lazyWorldPromise_get, _encryptionKeyPromise, _resilientStart, getEncryptionKey_fn, getEncryptionKeyLazily_fn, pollReturnValue_fn;
|
|
16
|
+
var _a2, _b, _c, _d, _listeners, _onabort, _reader, _root, _hasMagic, _uflag, _parts, _parent, _parentIndex, _negs, _filledNegs, _options, _toString, _emptyExt, _AST_instances, fillNegs_fn, _AST_static, parseAST_fn, canAdoptWithSpace_fn, canAdopt_fn, canAdoptType_fn, adoptWithSpace_fn, adopt_fn, canUsurpType_fn, canUsurp_fn, usurp_fn, flatten_fn, partsToRegExp_fn, parseGlob_fn, _Minimatch_instances, matchGlobstar_fn, matchGlobStarBodySections_fn, matchOne_fn, _worldPromise, _Run_instances, lazyWorldPromise_get, _encryptionKeyPromise, _resilientStart, getEncryptionKey_fn, getEncryptionKeyLazily_fn, resolveTerminalReturnValue_fn, pollReturnValue_fn;
|
|
17
17
|
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 require$$0$5, { PassThrough } from "node:stream";
|
|
21
|
+
import require$$0$5, { PassThrough, Transform as Transform$1 } from "node:stream";
|
|
22
22
|
import require$$0$1, { Stream } from "stream";
|
|
23
23
|
import require$$0 from "util";
|
|
24
24
|
import require$$1 from "crypto";
|
|
@@ -36,22 +36,23 @@ import { promises } from "node:fs";
|
|
|
36
36
|
import os, { tmpdir, homedir } from "node:os";
|
|
37
37
|
import { execFile } from "node:child_process";
|
|
38
38
|
import { setTimeout as setTimeout$1 } from "node:timers/promises";
|
|
39
|
+
import require$$0$7, { Buffer as Buffer$2 } from "node:buffer";
|
|
40
|
+
import http from "node:http";
|
|
41
|
+
import https from "node:https";
|
|
42
|
+
import zlib from "node:zlib";
|
|
39
43
|
import require$$0$2 from "events";
|
|
40
44
|
import require$$0$4 from "node:assert";
|
|
41
45
|
import require$$1$1 from "node:net";
|
|
42
|
-
import require$$2$1 from "node:http";
|
|
43
46
|
import require$$5 from "node:querystring";
|
|
44
47
|
import require$$0$3, { EventEmitter } from "node:events";
|
|
45
48
|
import require$$0$6 from "node:diagnostics_channel";
|
|
46
49
|
import require$$4 from "node:tls";
|
|
47
|
-
import require$$0$7 from "node:buffer";
|
|
48
|
-
import require$$3$1 from "node:zlib";
|
|
49
50
|
import require$$5$1 from "node:perf_hooks";
|
|
50
51
|
import require$$8 from "node:util/types";
|
|
51
52
|
import require$$1$2 from "node:sqlite";
|
|
52
|
-
import require$$2$
|
|
53
|
+
import require$$2$1 from "node:worker_threads";
|
|
53
54
|
import require$$1$4 from "node:console";
|
|
54
|
-
import require$$2$
|
|
55
|
+
import require$$2$2 from "node:timers";
|
|
55
56
|
import require$$1$5 from "node:dns";
|
|
56
57
|
import * as path$2 from "path";
|
|
57
58
|
import path__default from "path";
|
|
@@ -59,7 +60,7 @@ import * as fs from "fs";
|
|
|
59
60
|
import fs__default from "fs";
|
|
60
61
|
import require$$0$9 from "constants";
|
|
61
62
|
import require$$5$2 from "assert";
|
|
62
|
-
import require$$2$
|
|
63
|
+
import require$$2$3 from "os";
|
|
63
64
|
import * as net from "net";
|
|
64
65
|
import assert$1 from "node:assert/strict";
|
|
65
66
|
import express from "express";
|
|
@@ -929,7 +930,7 @@ function requireReact_development() {
|
|
|
929
930
|
), ctor.default;
|
|
930
931
|
throw payload._result;
|
|
931
932
|
}
|
|
932
|
-
function
|
|
933
|
+
function resolveDispatcher2() {
|
|
933
934
|
var dispatcher2 = ReactSharedInternals.H;
|
|
934
935
|
null === dispatcher2 && console.error(
|
|
935
936
|
"Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:\n1. You might have mismatching versions of React and the renderer (such as React DOM)\n2. You might be breaking the Rules of Hooks\n3. You might have more than one copy of React in the same app\nSee https://react.dev/link/invalid-hook-call for tips about how to debug and fix this problem."
|
|
@@ -1103,7 +1104,7 @@ function requireReact_development() {
|
|
|
1103
1104
|
deprecatedAPIs = Object.freeze({
|
|
1104
1105
|
__proto__: null,
|
|
1105
1106
|
c: function(size2) {
|
|
1106
|
-
return
|
|
1107
|
+
return resolveDispatcher2().useMemoCache(size2);
|
|
1107
1108
|
}
|
|
1108
1109
|
});
|
|
1109
1110
|
exports.Children = {
|
|
@@ -1414,39 +1415,39 @@ function requireReact_development() {
|
|
|
1414
1415
|
}
|
|
1415
1416
|
};
|
|
1416
1417
|
exports.unstable_useCacheRefresh = function() {
|
|
1417
|
-
return
|
|
1418
|
+
return resolveDispatcher2().useCacheRefresh();
|
|
1418
1419
|
};
|
|
1419
1420
|
exports.use = function(usable) {
|
|
1420
|
-
return
|
|
1421
|
+
return resolveDispatcher2().use(usable);
|
|
1421
1422
|
};
|
|
1422
1423
|
exports.useActionState = function(action2, initialState, permalink) {
|
|
1423
|
-
return
|
|
1424
|
+
return resolveDispatcher2().useActionState(
|
|
1424
1425
|
action2,
|
|
1425
1426
|
initialState,
|
|
1426
1427
|
permalink
|
|
1427
1428
|
);
|
|
1428
1429
|
};
|
|
1429
1430
|
exports.useCallback = function(callback, deps) {
|
|
1430
|
-
return
|
|
1431
|
+
return resolveDispatcher2().useCallback(callback, deps);
|
|
1431
1432
|
};
|
|
1432
1433
|
exports.useContext = function(Context) {
|
|
1433
|
-
var dispatcher2 =
|
|
1434
|
+
var dispatcher2 = resolveDispatcher2();
|
|
1434
1435
|
Context.$$typeof === REACT_CONSUMER_TYPE && console.error(
|
|
1435
1436
|
"Calling useContext(Context.Consumer) is not supported and will cause bugs. Did you mean to call useContext(Context) instead?"
|
|
1436
1437
|
);
|
|
1437
1438
|
return dispatcher2.useContext(Context);
|
|
1438
1439
|
};
|
|
1439
1440
|
exports.useDebugValue = function(value, formatterFn) {
|
|
1440
|
-
return
|
|
1441
|
+
return resolveDispatcher2().useDebugValue(value, formatterFn);
|
|
1441
1442
|
};
|
|
1442
1443
|
exports.useDeferredValue = function(value, initialValue) {
|
|
1443
|
-
return
|
|
1444
|
+
return resolveDispatcher2().useDeferredValue(value, initialValue);
|
|
1444
1445
|
};
|
|
1445
1446
|
exports.useEffect = function(create2, createDeps, update) {
|
|
1446
1447
|
null == create2 && console.warn(
|
|
1447
1448
|
"React Hook useEffect requires an effect callback. Did you forget to pass a callback to the hook?"
|
|
1448
1449
|
);
|
|
1449
|
-
var dispatcher2 =
|
|
1450
|
+
var dispatcher2 = resolveDispatcher2();
|
|
1450
1451
|
if ("function" === typeof update)
|
|
1451
1452
|
throw Error(
|
|
1452
1453
|
"useEffect CRUD overload is not enabled in this build of React."
|
|
@@ -1454,47 +1455,47 @@ function requireReact_development() {
|
|
|
1454
1455
|
return dispatcher2.useEffect(create2, createDeps);
|
|
1455
1456
|
};
|
|
1456
1457
|
exports.useId = function() {
|
|
1457
|
-
return
|
|
1458
|
+
return resolveDispatcher2().useId();
|
|
1458
1459
|
};
|
|
1459
1460
|
exports.useImperativeHandle = function(ref, create2, deps) {
|
|
1460
|
-
return
|
|
1461
|
+
return resolveDispatcher2().useImperativeHandle(ref, create2, deps);
|
|
1461
1462
|
};
|
|
1462
1463
|
exports.useInsertionEffect = function(create2, deps) {
|
|
1463
1464
|
null == create2 && console.warn(
|
|
1464
1465
|
"React Hook useInsertionEffect requires an effect callback. Did you forget to pass a callback to the hook?"
|
|
1465
1466
|
);
|
|
1466
|
-
return
|
|
1467
|
+
return resolveDispatcher2().useInsertionEffect(create2, deps);
|
|
1467
1468
|
};
|
|
1468
1469
|
exports.useLayoutEffect = function(create2, deps) {
|
|
1469
1470
|
null == create2 && console.warn(
|
|
1470
1471
|
"React Hook useLayoutEffect requires an effect callback. Did you forget to pass a callback to the hook?"
|
|
1471
1472
|
);
|
|
1472
|
-
return
|
|
1473
|
+
return resolveDispatcher2().useLayoutEffect(create2, deps);
|
|
1473
1474
|
};
|
|
1474
1475
|
exports.useMemo = function(create2, deps) {
|
|
1475
|
-
return
|
|
1476
|
+
return resolveDispatcher2().useMemo(create2, deps);
|
|
1476
1477
|
};
|
|
1477
1478
|
exports.useOptimistic = function(passthrough, reducer) {
|
|
1478
|
-
return
|
|
1479
|
+
return resolveDispatcher2().useOptimistic(passthrough, reducer);
|
|
1479
1480
|
};
|
|
1480
1481
|
exports.useReducer = function(reducer, initialArg, init2) {
|
|
1481
|
-
return
|
|
1482
|
+
return resolveDispatcher2().useReducer(reducer, initialArg, init2);
|
|
1482
1483
|
};
|
|
1483
1484
|
exports.useRef = function(initialValue) {
|
|
1484
|
-
return
|
|
1485
|
+
return resolveDispatcher2().useRef(initialValue);
|
|
1485
1486
|
};
|
|
1486
1487
|
exports.useState = function(initialState) {
|
|
1487
|
-
return
|
|
1488
|
+
return resolveDispatcher2().useState(initialState);
|
|
1488
1489
|
};
|
|
1489
1490
|
exports.useSyncExternalStore = function(subscribe, getSnapshot, getServerSnapshot) {
|
|
1490
|
-
return
|
|
1491
|
+
return resolveDispatcher2().useSyncExternalStore(
|
|
1491
1492
|
subscribe,
|
|
1492
1493
|
getSnapshot,
|
|
1493
1494
|
getServerSnapshot
|
|
1494
1495
|
);
|
|
1495
1496
|
};
|
|
1496
1497
|
exports.useTransition = function() {
|
|
1497
|
-
return
|
|
1498
|
+
return resolveDispatcher2().useTransition();
|
|
1498
1499
|
};
|
|
1499
1500
|
exports.version = "19.1.0";
|
|
1500
1501
|
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error());
|
|
@@ -9725,7 +9726,7 @@ function requireReactDom_development() {
|
|
|
9725
9726
|
function getValueDescriptorExpectingEnumForWarning(thing) {
|
|
9726
9727
|
return null === thing ? "`null`" : void 0 === thing ? "`undefined`" : "" === thing ? "an empty string" : "string" === typeof thing ? JSON.stringify(thing) : "number" === typeof thing ? "`" + thing + "`" : 'something with type "' + typeof thing + '"';
|
|
9727
9728
|
}
|
|
9728
|
-
function
|
|
9729
|
+
function resolveDispatcher2() {
|
|
9729
9730
|
var dispatcher2 = ReactSharedInternals.H;
|
|
9730
9731
|
null === dispatcher2 && console.error(
|
|
9731
9732
|
"Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:\n1. You might have mismatching versions of React and the renderer (such as React DOM)\n2. You might be breaking the Rules of Hooks\n3. You might have more than one copy of React in the same app\nSee https://react.dev/link/invalid-hook-call for tips about how to debug and fix this problem."
|
|
@@ -9917,10 +9918,10 @@ function requireReactDom_development() {
|
|
|
9917
9918
|
return fn2(a2);
|
|
9918
9919
|
};
|
|
9919
9920
|
reactDom_development.useFormState = function(action2, initialState, permalink) {
|
|
9920
|
-
return
|
|
9921
|
+
return resolveDispatcher2().useFormState(action2, initialState, permalink);
|
|
9921
9922
|
};
|
|
9922
9923
|
reactDom_development.useFormStatus = function() {
|
|
9923
|
-
return
|
|
9924
|
+
return resolveDispatcher2().useHostTransitionStatus();
|
|
9924
9925
|
};
|
|
9925
9926
|
reactDom_development.version = "19.1.0";
|
|
9926
9927
|
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error());
|
|
@@ -43216,33 +43217,6 @@ const Lr = /* @__PURE__ */ K$3(() => {
|
|
|
43216
43217
|
function kn$1(t, e, n) {
|
|
43217
43218
|
return e !== "normal" && !(e != null && e.endsWith("px")) && n(`${t} was not resolved to pixel value correctly`, e, Ct$1.WARN), e === "normal" ? 0 : parseInt(e != null ? e : "0", 10);
|
|
43218
43219
|
}
|
|
43219
|
-
const WORKFLOW_ULID_BODY = "[0123456789ABCDEFGHJKMNPQRSTVWXYZ]{26}";
|
|
43220
|
-
const STEP_ID_PATTERN = new RegExp(`^step_(${WORKFLOW_ULID_BODY})$`, "i");
|
|
43221
|
-
const WAIT_ID_PATTERN = new RegExp(`^wait_(${WORKFLOW_ULID_BODY})$`, "i");
|
|
43222
|
-
const HOOK_ID_PATTERN = new RegExp(`^hook_(${WORKFLOW_ULID_BODY})$`, "i");
|
|
43223
|
-
const EVENT_ID_PATTERN = new RegExp(`^evnt_(${WORKFLOW_ULID_BODY})$`, "i");
|
|
43224
|
-
const WORKFLOW_ID_PREFIX_PATTERN = /^(step_|wait_|hook_|evnt_|wrun_)/i;
|
|
43225
|
-
function matchPrefixedId(pattern2, prefix, kind, query) {
|
|
43226
|
-
const match2 = query.match(pattern2);
|
|
43227
|
-
if (!match2) {
|
|
43228
|
-
return null;
|
|
43229
|
-
}
|
|
43230
|
-
return { kind, id: `${prefix}_${match2[1].toUpperCase()}` };
|
|
43231
|
-
}
|
|
43232
|
-
function parseExactWorkflowSearchId(query) {
|
|
43233
|
-
const trimmed = query.trim();
|
|
43234
|
-
if (!trimmed) {
|
|
43235
|
-
return null;
|
|
43236
|
-
}
|
|
43237
|
-
return matchPrefixedId(STEP_ID_PATTERN, "step", "step", trimmed) ?? matchPrefixedId(WAIT_ID_PATTERN, "wait", "wait", trimmed) ?? matchPrefixedId(HOOK_ID_PATTERN, "hook", "hook", trimmed) ?? matchPrefixedId(EVENT_ID_PATTERN, "evnt", "event", trimmed);
|
|
43238
|
-
}
|
|
43239
|
-
function looksLikeWorkflowIdSearchInput(query) {
|
|
43240
|
-
const trimmed = query.trim();
|
|
43241
|
-
if (!WORKFLOW_ID_PREFIX_PATTERN.test(trimmed)) {
|
|
43242
|
-
return false;
|
|
43243
|
-
}
|
|
43244
|
-
return /\d/.test(trimmed);
|
|
43245
|
-
}
|
|
43246
43220
|
const NEVER = Object.freeze({
|
|
43247
43221
|
status: "aborted"
|
|
43248
43222
|
});
|
|
@@ -57051,6 +57025,21 @@ const TERMINAL_STEP_EVENT_TYPES = TerminalStepEventTypeSchema.options;
|
|
|
57051
57025
|
function isTerminalStepEventType(eventType) {
|
|
57052
57026
|
return TERMINAL_STEP_EVENT_TYPES.includes(eventType);
|
|
57053
57027
|
}
|
|
57028
|
+
const ENTITY_EVENT_CLASS_BY_TYPE = {
|
|
57029
|
+
step_created: "step_created",
|
|
57030
|
+
step_started: "step_started",
|
|
57031
|
+
step_retrying: "step_retrying",
|
|
57032
|
+
step_completed: "step_terminal",
|
|
57033
|
+
step_failed: "step_terminal",
|
|
57034
|
+
wait_created: "wait_created",
|
|
57035
|
+
wait_completed: "wait_completed",
|
|
57036
|
+
hook_created: "hook_created",
|
|
57037
|
+
hook_disposed: "hook_disposed",
|
|
57038
|
+
run_started: "run_started"
|
|
57039
|
+
};
|
|
57040
|
+
function entityEventClass(eventType) {
|
|
57041
|
+
return ENTITY_EVENT_CLASS_BY_TYPE[eventType];
|
|
57042
|
+
}
|
|
57054
57043
|
const HookLifecycleEventTypeSchema = EventTypeSchema.extract([
|
|
57055
57044
|
"hook_created",
|
|
57056
57045
|
"hook_received",
|
|
@@ -57778,6 +57767,7 @@ const AnalyticsAttributeKeySchema = object$1({
|
|
|
57778
57767
|
firstSeenAt: date$2(),
|
|
57779
57768
|
lastSeenAt: date$2()
|
|
57780
57769
|
});
|
|
57770
|
+
const ANALYTICS_EVENTS_GET_MANY_LIMIT = 100;
|
|
57781
57771
|
const warnedEnvValues = /* @__PURE__ */ new Set();
|
|
57782
57772
|
function warnOnce(key, message2) {
|
|
57783
57773
|
if (warnedEnvValues.has(key))
|
|
@@ -57805,6 +57795,18 @@ function envNumber(name2, fallback, options = {}) {
|
|
|
57805
57795
|
}
|
|
57806
57796
|
return parsed;
|
|
57807
57797
|
}
|
|
57798
|
+
function envFlag(name2, fallback, env2 = process.env) {
|
|
57799
|
+
const raw2 = env2[name2];
|
|
57800
|
+
if (raw2 === void 0 || raw2 === "")
|
|
57801
|
+
return fallback;
|
|
57802
|
+
const normalized = raw2.toLowerCase();
|
|
57803
|
+
if (normalized === "0" || normalized === "false")
|
|
57804
|
+
return false;
|
|
57805
|
+
if (normalized === "1" || normalized === "true")
|
|
57806
|
+
return true;
|
|
57807
|
+
warnOnce(`${name2}=${raw2}`, `Ignoring ${name2}: expected 0/1/true/false; using default ${fallback}`);
|
|
57808
|
+
return fallback;
|
|
57809
|
+
}
|
|
57808
57810
|
const DEFAULT_MAX_EVENTS_PER_RUN = 25e3;
|
|
57809
57811
|
function getMaxEventsPerRun() {
|
|
57810
57812
|
const maxEvents = envNumber("WORKFLOW_MAX_EVENTS", DEFAULT_MAX_EVENTS_PER_RUN, { integer: true });
|
|
@@ -57870,6 +57872,19 @@ const RunInputSchema = object$1({
|
|
|
57870
57872
|
*/
|
|
57871
57873
|
environment: string$3().optional()
|
|
57872
57874
|
});
|
|
57875
|
+
const StepDispatchInputSchema = object$1({
|
|
57876
|
+
/**
|
|
57877
|
+
* The serialized step input, reused verbatim from the direct write. Always
|
|
57878
|
+
* binary: producers only attach `stepInput` when the dehydrated input is a
|
|
57879
|
+
* `Uint8Array` and the run's queue transport preserves bytes (CBOR).
|
|
57880
|
+
* Validated here so a malformed or transport-mangled payload fails the
|
|
57881
|
+
* message parse instead of being silently written into a `step_created` as
|
|
57882
|
+
* non-binary data. `Buffer` is a `Uint8Array` subclass and passes.
|
|
57883
|
+
*/
|
|
57884
|
+
input: custom((value) => value instanceof Uint8Array, {
|
|
57885
|
+
message: "stepInput.input must be a Uint8Array"
|
|
57886
|
+
})
|
|
57887
|
+
});
|
|
57873
57888
|
const HookResumeInputSchema = object$1({
|
|
57874
57889
|
/** Stable idempotency key minted once per `resumeHook()` call. */
|
|
57875
57890
|
resumeId: string$3(),
|
|
@@ -57903,6 +57918,22 @@ const HookResumeInputSchema = object$1({
|
|
|
57903
57918
|
*/
|
|
57904
57919
|
deploymentId: string$3().optional()
|
|
57905
57920
|
});
|
|
57921
|
+
const HookResumeTimingSchema = object$1({
|
|
57922
|
+
/** Epoch ms at entry into `resumeHook()` — the start of the TTR window. */
|
|
57923
|
+
resumeRequestedAtMs: number$3(),
|
|
57924
|
+
/** Epoch ms immediately before the queue publish was requested. */
|
|
57925
|
+
queuePublishRequestedAtMs: number$3(),
|
|
57926
|
+
/** Which `resumeHook()` dispatch path ran: `parallel` or `sequential`. */
|
|
57927
|
+
strategy: string$3().optional(),
|
|
57928
|
+
/** Epoch ms the final consumer's queue handler was entered. */
|
|
57929
|
+
consumerStartedAtMs: number$3().optional(),
|
|
57930
|
+
/** Epoch ms this invocation's first replay pass began. */
|
|
57931
|
+
replayStartedAtMs: number$3().optional(),
|
|
57932
|
+
/** Epoch ms replay first encountered a durable step after the resume. */
|
|
57933
|
+
nextStepEncounteredAtMs: number$3().optional(),
|
|
57934
|
+
/** How the consumer initialized replay state: see `ResumeSetupSource`. */
|
|
57935
|
+
setupSource: string$3().optional()
|
|
57936
|
+
});
|
|
57906
57937
|
const WorkflowInvokePayloadSchema = object$1({
|
|
57907
57938
|
runId: string$3(),
|
|
57908
57939
|
traceCarrier: TraceCarrierSchema.optional(),
|
|
@@ -57936,7 +57967,28 @@ const WorkflowInvokePayloadSchema = object$1({
|
|
|
57936
57967
|
* fast path. A consumer that understands this field idempotently ensures the
|
|
57937
57968
|
* `hook_received` event exists (keyed by `resumeId`) before replaying.
|
|
57938
57969
|
*/
|
|
57939
|
-
hookInput: HookResumeInputSchema.optional()
|
|
57970
|
+
hookInput: HookResumeInputSchema.optional(),
|
|
57971
|
+
/**
|
|
57972
|
+
* Resilient step dispatch data, only present alongside `stepId` when the
|
|
57973
|
+
* producer parallelized the `step_created` write with this queue publish. A
|
|
57974
|
+
* consumer that understands this field idempotently ensures the
|
|
57975
|
+
* `step_created` event exists (keyed by `stepId`) before executing the step.
|
|
57976
|
+
*/
|
|
57977
|
+
stepInput: StepDispatchInputSchema.optional(),
|
|
57978
|
+
/**
|
|
57979
|
+
* Hook-resume TTR timing. Present on both `resumeHook()` dispatch paths
|
|
57980
|
+
* (unlike `hookInput`, which only rides the parallel fast path), and
|
|
57981
|
+
* forwarded onto a dispatched step message when the resuming invocation
|
|
57982
|
+
* hands the next durable step to another invocation. Purely observational —
|
|
57983
|
+
* see {@link HookResumeTimingSchema}.
|
|
57984
|
+
*
|
|
57985
|
+
* `.catch(undefined)` because this field must never be able to fail the
|
|
57986
|
+
* parse of the invocation payload: a malformed value (a NaN boundary, a
|
|
57987
|
+
* shape change from a future producer) would otherwise throw on every
|
|
57988
|
+
* delivery of that message and burn the run's delivery budget over a
|
|
57989
|
+
* telemetry field. Anything unparseable degrades to "no measurement".
|
|
57990
|
+
*/
|
|
57991
|
+
hookResumeTiming: HookResumeTimingSchema.optional().catch(void 0)
|
|
57940
57992
|
});
|
|
57941
57993
|
const HealthCheckPayloadSchema = object$1({
|
|
57942
57994
|
__healthCheck: literal(true),
|
|
@@ -58018,6 +58070,11 @@ const HookSchema = object$1({
|
|
|
58018
58070
|
// is active.
|
|
58019
58071
|
resumeCapabilities: HookResumeCapabilitiesSchema.optional()
|
|
58020
58072
|
});
|
|
58073
|
+
const NODE_HTTP_ENV_VAR = "WORKFLOW_NODE_HTTP";
|
|
58074
|
+
const NODE_HTTP_DEFAULT = false;
|
|
58075
|
+
function isNodeHttpEnabled(env2 = process.env) {
|
|
58076
|
+
return envFlag(NODE_HTTP_ENV_VAR, NODE_HTTP_DEFAULT, env2);
|
|
58077
|
+
}
|
|
58021
58078
|
async function reenqueueActiveRuns(runs, enqueue, label, namespace2) {
|
|
58022
58079
|
const workflowQueuePrefix = getQueueTopicPrefix("workflow", resolveQueueNamespace(namespace2));
|
|
58023
58080
|
let reenqueued = 0;
|
|
@@ -58119,7 +58176,7 @@ const SPEC_VERSION_SUPPORTS_CBOR_QUEUE_TRANSPORT = 3;
|
|
|
58119
58176
|
const SPEC_VERSION_SUPPORTS_ATTRIBUTES = 4;
|
|
58120
58177
|
const SPEC_VERSION_SUPPORTS_COMPRESSION = 5;
|
|
58121
58178
|
const SPEC_VERSION_SUPPORTS_SLOT_IDENTITY = 6;
|
|
58122
|
-
const SPEC_VERSION_CURRENT =
|
|
58179
|
+
const SPEC_VERSION_CURRENT = SPEC_VERSION_SUPPORTS_SLOT_IDENTITY;
|
|
58123
58180
|
const SPEC_VERSION_MAX_SUPPORTED = SPEC_VERSION_SUPPORTS_SLOT_IDENTITY;
|
|
58124
58181
|
function isLegacySpecVersion(v2) {
|
|
58125
58182
|
return v2 === void 0 || v2 === null || v2 <= SPEC_VERSION_LEGACY;
|
|
@@ -58313,6 +58370,101 @@ function validateUlidTimestamp(prefixedUlid, prefix, pastThresholdMs = DEFAULT_T
|
|
|
58313
58370
|
const thresholdSeconds = Math.round(thresholdMs / 1e3);
|
|
58314
58371
|
return `Invalid runId timestamp: embedded timestamp is ${driftSeconds}s in the ${direction} (threshold: ${thresholdSeconds}s)`;
|
|
58315
58372
|
}
|
|
58373
|
+
const TERMINAL_EVENT_CLASSES = /* @__PURE__ */ new Set([
|
|
58374
|
+
"step_terminal",
|
|
58375
|
+
"wait_completed",
|
|
58376
|
+
"hook_disposed"
|
|
58377
|
+
]);
|
|
58378
|
+
const SINGLETON_EVENT_CLASSES = /* @__PURE__ */ new Set([
|
|
58379
|
+
"run_started"
|
|
58380
|
+
]);
|
|
58381
|
+
const RUN_ENTITY_KEY = "";
|
|
58382
|
+
const DUPLICATE_EVENT_MESSAGE = "Written by a concurrent replay after an event of the same kind was already recorded and acted on. The run follows the earlier one.";
|
|
58383
|
+
function compareEventId(a2, b2) {
|
|
58384
|
+
if (a2.eventId.length !== b2.eventId.length) {
|
|
58385
|
+
return a2.eventId.length - b2.eventId.length;
|
|
58386
|
+
}
|
|
58387
|
+
return a2.eventId < b2.eventId ? -1 : a2.eventId > b2.eventId ? 1 : 0;
|
|
58388
|
+
}
|
|
58389
|
+
function createdAtMs(event) {
|
|
58390
|
+
const createdAt = event.createdAt;
|
|
58391
|
+
return createdAt instanceof Date ? createdAt.getTime() : new Date(createdAt).getTime();
|
|
58392
|
+
}
|
|
58393
|
+
function hasKnowableLogOrder(orderedById) {
|
|
58394
|
+
if (orderedById.every((event) => isSlotEventId(event.eventId)))
|
|
58395
|
+
return true;
|
|
58396
|
+
for (let index2 = 1; index2 < orderedById.length; index2++) {
|
|
58397
|
+
const previous2 = createdAtMs(orderedById[index2 - 1]);
|
|
58398
|
+
const current = createdAtMs(orderedById[index2]);
|
|
58399
|
+
if (Number.isNaN(previous2) || Number.isNaN(current))
|
|
58400
|
+
return false;
|
|
58401
|
+
if (current < previous2)
|
|
58402
|
+
return false;
|
|
58403
|
+
}
|
|
58404
|
+
return true;
|
|
58405
|
+
}
|
|
58406
|
+
function foldDuplicates(ordered) {
|
|
58407
|
+
const duplicates = /* @__PURE__ */ new Set();
|
|
58408
|
+
const seenClasses = /* @__PURE__ */ new Set();
|
|
58409
|
+
const closedEntities = /* @__PURE__ */ new Set();
|
|
58410
|
+
for (const event of ordered) {
|
|
58411
|
+
const eventClass = entityEventClass(event.eventType);
|
|
58412
|
+
if (eventClass === void 0)
|
|
58413
|
+
continue;
|
|
58414
|
+
const entity = event.correlationId ?? RUN_ENTITY_KEY;
|
|
58415
|
+
const classKey = `${eventClass}:${entity}`;
|
|
58416
|
+
const repeatsClass = seenClasses.has(classKey);
|
|
58417
|
+
const entityWasClosed = closedEntities.has(entity);
|
|
58418
|
+
if (TERMINAL_EVENT_CLASSES.has(eventClass)) {
|
|
58419
|
+
closedEntities.add(entity);
|
|
58420
|
+
}
|
|
58421
|
+
if (!repeatsClass) {
|
|
58422
|
+
if (entityWasClosed)
|
|
58423
|
+
break;
|
|
58424
|
+
seenClasses.add(classKey);
|
|
58425
|
+
continue;
|
|
58426
|
+
}
|
|
58427
|
+
if (entityWasClosed || SINGLETON_EVENT_CLASSES.has(eventClass)) {
|
|
58428
|
+
duplicates.add(event.eventId);
|
|
58429
|
+
}
|
|
58430
|
+
}
|
|
58431
|
+
return duplicates;
|
|
58432
|
+
}
|
|
58433
|
+
function findDuplicateEventIds(events2, { isCompleteHistory }) {
|
|
58434
|
+
if (!isCompleteHistory || events2.length < 2)
|
|
58435
|
+
return /* @__PURE__ */ new Set();
|
|
58436
|
+
const ordered = events2.filter((event) => Boolean(event.eventId)).sort(compareEventId);
|
|
58437
|
+
if (!hasKnowableLogOrder(ordered))
|
|
58438
|
+
return /* @__PURE__ */ new Set();
|
|
58439
|
+
return foldDuplicates(ordered);
|
|
58440
|
+
}
|
|
58441
|
+
const WORKFLOW_ULID_BODY = "[0123456789ABCDEFGHJKMNPQRSTVWXYZ]{26}";
|
|
58442
|
+
const STEP_ID_PATTERN = new RegExp(`^step_(${WORKFLOW_ULID_BODY})$`, "i");
|
|
58443
|
+
const WAIT_ID_PATTERN = new RegExp(`^wait_(${WORKFLOW_ULID_BODY})$`, "i");
|
|
58444
|
+
const HOOK_ID_PATTERN = new RegExp(`^hook_(${WORKFLOW_ULID_BODY})$`, "i");
|
|
58445
|
+
const EVENT_ID_PATTERN = new RegExp(`^evnt_(${WORKFLOW_ULID_BODY})$`, "i");
|
|
58446
|
+
const WORKFLOW_ID_PREFIX_PATTERN = /^(step_|wait_|hook_|evnt_|wrun_)/i;
|
|
58447
|
+
function matchPrefixedId(pattern2, prefix, kind, query) {
|
|
58448
|
+
const match2 = query.match(pattern2);
|
|
58449
|
+
if (!match2) {
|
|
58450
|
+
return null;
|
|
58451
|
+
}
|
|
58452
|
+
return { kind, id: `${prefix}_${match2[1].toUpperCase()}` };
|
|
58453
|
+
}
|
|
58454
|
+
function parseExactWorkflowSearchId(query) {
|
|
58455
|
+
const trimmed = query.trim();
|
|
58456
|
+
if (!trimmed) {
|
|
58457
|
+
return null;
|
|
58458
|
+
}
|
|
58459
|
+
return matchPrefixedId(STEP_ID_PATTERN, "step", "step", trimmed) ?? matchPrefixedId(WAIT_ID_PATTERN, "wait", "wait", trimmed) ?? matchPrefixedId(HOOK_ID_PATTERN, "hook", "hook", trimmed) ?? matchPrefixedId(EVENT_ID_PATTERN, "evnt", "event", trimmed);
|
|
58460
|
+
}
|
|
58461
|
+
function looksLikeWorkflowIdSearchInput(query) {
|
|
58462
|
+
const trimmed = query.trim();
|
|
58463
|
+
if (!WORKFLOW_ID_PREFIX_PATTERN.test(trimmed)) {
|
|
58464
|
+
return false;
|
|
58465
|
+
}
|
|
58466
|
+
return /\d/.test(trimmed);
|
|
58467
|
+
}
|
|
58316
58468
|
const UNDEFINED$2 = -1;
|
|
58317
58469
|
const HOLE = -2;
|
|
58318
58470
|
const NAN = -3;
|
|
@@ -59383,6 +59535,21 @@ class RunExpiredError extends WorkflowWorldError {
|
|
|
59383
59535
|
return isError(value) && value.name === "RunExpiredError";
|
|
59384
59536
|
}
|
|
59385
59537
|
}
|
|
59538
|
+
class StreamExpiredError extends WorkflowWorldError {
|
|
59539
|
+
constructor(message2, runId, streamId, expiredAt) {
|
|
59540
|
+
super(message2, { status: 410, code: "stream-expired" });
|
|
59541
|
+
__publicField(this, "runId");
|
|
59542
|
+
__publicField(this, "streamId");
|
|
59543
|
+
__publicField(this, "expiredAt");
|
|
59544
|
+
this.runId = runId;
|
|
59545
|
+
this.streamId = streamId;
|
|
59546
|
+
this.expiredAt = expiredAt;
|
|
59547
|
+
this.name = "StreamExpiredError";
|
|
59548
|
+
}
|
|
59549
|
+
static is(value) {
|
|
59550
|
+
return isError(value) && value.name === "StreamExpiredError";
|
|
59551
|
+
}
|
|
59552
|
+
}
|
|
59386
59553
|
class TooEarlyError extends WorkflowWorldError {
|
|
59387
59554
|
constructor(message2, options) {
|
|
59388
59555
|
super(message2, { retryAfter: options == null ? void 0 : options.retryAfter });
|
|
@@ -60134,12 +60301,12 @@ function getNodeZlib$2() {
|
|
|
60134
60301
|
}
|
|
60135
60302
|
function decompressSyncIfAvailable(format2, payload) {
|
|
60136
60303
|
try {
|
|
60137
|
-
const
|
|
60138
|
-
if (format2 === SerializationFormat.GZIP && (
|
|
60139
|
-
return new Uint8Array(
|
|
60304
|
+
const zlib2 = getNodeZlib$2();
|
|
60305
|
+
if (format2 === SerializationFormat.GZIP && (zlib2 == null ? void 0 : zlib2.gunzipSync)) {
|
|
60306
|
+
return new Uint8Array(zlib2.gunzipSync(payload));
|
|
60140
60307
|
}
|
|
60141
|
-
if (format2 === SerializationFormat.ZSTD && (
|
|
60142
|
-
return new Uint8Array(
|
|
60308
|
+
if (format2 === SerializationFormat.ZSTD && (zlib2 == null ? void 0 : zlib2.zstdDecompressSync)) {
|
|
60309
|
+
return new Uint8Array(zlib2.zstdDecompressSync(payload));
|
|
60143
60310
|
}
|
|
60144
60311
|
} catch {
|
|
60145
60312
|
}
|
|
@@ -60737,7 +60904,7 @@ function replaceEncryptedAndExpiredWithMarkers(resource) {
|
|
|
60737
60904
|
}
|
|
60738
60905
|
async function hydrateResourceIOAsync(resource, key) {
|
|
60739
60906
|
const { hydrateDataWithKey: hydrateDataWithKey2, deriveRunPayloadKeys: deriveRunPayloadKeys2 } = await Promise.resolve().then(() => serializationFormat);
|
|
60740
|
-
const { ensureZstdDecoderRegistered } = await import("./zstd-browser-decoder-
|
|
60907
|
+
const { ensureZstdDecoderRegistered } = await import("./zstd-browser-decoder-D8JD_nwS.js");
|
|
60741
60908
|
ensureZstdDecoderRegistered();
|
|
60742
60909
|
const cryptoKey = key ? await deriveRunPayloadKeys2(key) : void 0;
|
|
60743
60910
|
const revivers = getRevivers();
|
|
@@ -62161,6 +62328,33 @@ function getMiddleTruncateCopyTextFromSelectionText({ prefixText, selectionText,
|
|
|
62161
62328
|
});
|
|
62162
62329
|
return mappedText === null ? null : leading + mappedText + trailing;
|
|
62163
62330
|
}
|
|
62331
|
+
const pendingMeasurements = /* @__PURE__ */ new Map();
|
|
62332
|
+
let measurementFrame = 0;
|
|
62333
|
+
function flushMeasurements() {
|
|
62334
|
+
measurementFrame = 0;
|
|
62335
|
+
const reads = [...pendingMeasurements.values()];
|
|
62336
|
+
pendingMeasurements.clear();
|
|
62337
|
+
const measures = reads.map((read2) => read2());
|
|
62338
|
+
for (const measure of measures) {
|
|
62339
|
+
measure == null ? void 0 : measure();
|
|
62340
|
+
}
|
|
62341
|
+
}
|
|
62342
|
+
function scheduleMeasurement(key, { read: read2, measure }) {
|
|
62343
|
+
pendingMeasurements.set(key, () => {
|
|
62344
|
+
const measurement = read2();
|
|
62345
|
+
return measurement === null ? null : () => measure(measurement);
|
|
62346
|
+
});
|
|
62347
|
+
if (measurementFrame === 0) {
|
|
62348
|
+
measurementFrame = requestAnimationFrame(flushMeasurements);
|
|
62349
|
+
}
|
|
62350
|
+
}
|
|
62351
|
+
function cancelMeasurement(key) {
|
|
62352
|
+
pendingMeasurements.delete(key);
|
|
62353
|
+
if (pendingMeasurements.size === 0 && measurementFrame !== 0) {
|
|
62354
|
+
cancelAnimationFrame(measurementFrame);
|
|
62355
|
+
measurementFrame = 0;
|
|
62356
|
+
}
|
|
62357
|
+
}
|
|
62164
62358
|
const useIsomorphicLayoutEffect$3 = typeof window === "undefined" ? reactExports.useEffect : reactExports.useLayoutEffect;
|
|
62165
62359
|
function createFullState(value, graphemes) {
|
|
62166
62360
|
return {
|
|
@@ -62178,7 +62372,13 @@ function useMiddleTruncate(value) {
|
|
|
62178
62372
|
const ref = reactExports.useRef(null);
|
|
62179
62373
|
const measureRef = reactExports.useRef(null);
|
|
62180
62374
|
const [state, setState] = reactExports.useState(() => fullState);
|
|
62181
|
-
const
|
|
62375
|
+
const measurementKeyRef = reactExports.useRef({});
|
|
62376
|
+
const textMeasurementCacheRef = reactExports.useRef({
|
|
62377
|
+
typography: "",
|
|
62378
|
+
value,
|
|
62379
|
+
widths: /* @__PURE__ */ new Map()
|
|
62380
|
+
});
|
|
62381
|
+
const lastMeasurementRef = reactExports.useRef(null);
|
|
62182
62382
|
const updateState = reactExports.useCallback((nextState) => {
|
|
62183
62383
|
setState((currentState) => {
|
|
62184
62384
|
if (currentState.displayText === nextState.displayText && currentState.isTruncated === nextState.isTruncated && currentState.prefixText === nextState.prefixText && currentState.prefixGraphemeCount === nextState.prefixGraphemeCount && currentState.suffixText === nextState.suffixText && currentState.suffixGraphemeCount === nextState.suffixGraphemeCount) {
|
|
@@ -62187,26 +62387,68 @@ function useMiddleTruncate(value) {
|
|
|
62187
62387
|
return nextState;
|
|
62188
62388
|
});
|
|
62189
62389
|
}, []);
|
|
62190
|
-
const
|
|
62390
|
+
const readMeasurement = reactExports.useCallback(() => {
|
|
62191
62391
|
const el = ref.current;
|
|
62192
62392
|
const measureEl = measureRef.current;
|
|
62193
62393
|
if (!el || !measureEl)
|
|
62394
|
+
return null;
|
|
62395
|
+
const availableWidth = el.clientWidth;
|
|
62396
|
+
const style2 = getComputedStyle(measureEl);
|
|
62397
|
+
return {
|
|
62398
|
+
availableWidth,
|
|
62399
|
+
typography: [
|
|
62400
|
+
style2.fontFamily,
|
|
62401
|
+
style2.fontFeatureSettings,
|
|
62402
|
+
style2.fontKerning,
|
|
62403
|
+
style2.fontSize,
|
|
62404
|
+
style2.fontStretch,
|
|
62405
|
+
style2.fontStyle,
|
|
62406
|
+
style2.fontVariationSettings,
|
|
62407
|
+
style2.fontWeight,
|
|
62408
|
+
style2.letterSpacing,
|
|
62409
|
+
style2.textTransform
|
|
62410
|
+
].join("\0")
|
|
62411
|
+
};
|
|
62412
|
+
}, []);
|
|
62413
|
+
const recalculate = reactExports.useCallback(({ availableWidth, typography }) => {
|
|
62414
|
+
const measureEl = measureRef.current;
|
|
62415
|
+
if (!measureEl)
|
|
62194
62416
|
return;
|
|
62195
|
-
const
|
|
62196
|
-
if (
|
|
62417
|
+
const lastMeasurement = lastMeasurementRef.current;
|
|
62418
|
+
if ((lastMeasurement == null ? void 0 : lastMeasurement.availableWidth) === availableWidth && lastMeasurement.typography === typography && lastMeasurement.value === value) {
|
|
62419
|
+
return;
|
|
62420
|
+
}
|
|
62421
|
+
lastMeasurementRef.current = {
|
|
62422
|
+
availableWidth,
|
|
62423
|
+
typography,
|
|
62424
|
+
value
|
|
62425
|
+
};
|
|
62426
|
+
if (availableWidth <= 0) {
|
|
62197
62427
|
updateState(fullState);
|
|
62198
62428
|
return;
|
|
62199
62429
|
}
|
|
62430
|
+
const textMeasurementCache = textMeasurementCacheRef.current;
|
|
62431
|
+
if (textMeasurementCache.typography !== typography || textMeasurementCache.value !== value) {
|
|
62432
|
+
textMeasurementCache.typography = typography;
|
|
62433
|
+
textMeasurementCache.value = value;
|
|
62434
|
+
textMeasurementCache.widths.clear();
|
|
62435
|
+
}
|
|
62200
62436
|
const measure = (text2) => {
|
|
62437
|
+
const cachedWidth = textMeasurementCache.widths.get(text2);
|
|
62438
|
+
if (cachedWidth !== void 0) {
|
|
62439
|
+
return cachedWidth;
|
|
62440
|
+
}
|
|
62201
62441
|
measureEl.textContent = text2;
|
|
62202
|
-
|
|
62442
|
+
const width = measureEl.scrollWidth;
|
|
62443
|
+
textMeasurementCache.widths.set(text2, width);
|
|
62444
|
+
return width;
|
|
62203
62445
|
};
|
|
62204
62446
|
const fullWidth = measure(value);
|
|
62205
|
-
if (fullWidth <=
|
|
62447
|
+
if (fullWidth <= availableWidth) {
|
|
62206
62448
|
updateState(fullState);
|
|
62207
62449
|
return;
|
|
62208
62450
|
}
|
|
62209
|
-
const result = middleTruncate(graphemes,
|
|
62451
|
+
const result = middleTruncate(graphemes, availableWidth, measure, fullWidth);
|
|
62210
62452
|
updateState({
|
|
62211
62453
|
displayText: result.text,
|
|
62212
62454
|
isTruncated: result.truncated,
|
|
@@ -62217,33 +62459,45 @@ function useMiddleTruncate(value) {
|
|
|
62217
62459
|
});
|
|
62218
62460
|
}, [fullState, graphemes, updateState, value]);
|
|
62219
62461
|
useIsomorphicLayoutEffect$3(() => {
|
|
62220
|
-
|
|
62221
|
-
|
|
62462
|
+
const measurement = readMeasurement();
|
|
62463
|
+
if (measurement) {
|
|
62464
|
+
recalculate(measurement);
|
|
62465
|
+
}
|
|
62466
|
+
}, [readMeasurement, recalculate]);
|
|
62222
62467
|
reactExports.useEffect(() => {
|
|
62223
62468
|
var _a3;
|
|
62224
62469
|
const el = ref.current;
|
|
62225
62470
|
if (!el)
|
|
62226
62471
|
return;
|
|
62227
|
-
const
|
|
62228
|
-
|
|
62229
|
-
|
|
62472
|
+
const measurementKey = measurementKeyRef.current;
|
|
62473
|
+
const scheduleRecalculation = () => {
|
|
62474
|
+
scheduleMeasurement(measurementKey, {
|
|
62475
|
+
read: readMeasurement,
|
|
62476
|
+
measure: recalculate
|
|
62477
|
+
});
|
|
62230
62478
|
};
|
|
62231
|
-
const ro2 = typeof ResizeObserver !== "undefined" ? new ResizeObserver(
|
|
62479
|
+
const ro2 = typeof ResizeObserver !== "undefined" ? new ResizeObserver(scheduleRecalculation) : null;
|
|
62232
62480
|
ro2 == null ? void 0 : ro2.observe(el);
|
|
62233
|
-
|
|
62481
|
+
if (!ro2) {
|
|
62482
|
+
window.addEventListener("resize", scheduleRecalculation);
|
|
62483
|
+
}
|
|
62234
62484
|
const onFontsLoaded = () => {
|
|
62235
|
-
|
|
62485
|
+
textMeasurementCacheRef.current.widths.clear();
|
|
62486
|
+
lastMeasurementRef.current = null;
|
|
62487
|
+
scheduleRecalculation();
|
|
62236
62488
|
};
|
|
62237
62489
|
const fontSet = "fonts" in document ? document.fonts : null;
|
|
62238
62490
|
(_a3 = fontSet == null ? void 0 : fontSet.addEventListener) == null ? void 0 : _a3.call(fontSet, "loadingdone", onFontsLoaded);
|
|
62239
62491
|
return () => {
|
|
62240
62492
|
var _a4;
|
|
62241
62493
|
ro2 == null ? void 0 : ro2.disconnect();
|
|
62242
|
-
|
|
62243
|
-
|
|
62494
|
+
if (!ro2) {
|
|
62495
|
+
window.removeEventListener("resize", scheduleRecalculation);
|
|
62496
|
+
}
|
|
62497
|
+
cancelMeasurement(measurementKey);
|
|
62244
62498
|
(_a4 = fontSet == null ? void 0 : fontSet.removeEventListener) == null ? void 0 : _a4.call(fontSet, "loadingdone", onFontsLoaded);
|
|
62245
62499
|
};
|
|
62246
|
-
}, [recalculate]);
|
|
62500
|
+
}, [readMeasurement, recalculate]);
|
|
62247
62501
|
return {
|
|
62248
62502
|
ref,
|
|
62249
62503
|
measureRef,
|
|
@@ -62259,12 +62513,18 @@ function getRangeOffsets(container, range2) {
|
|
|
62259
62513
|
if (!container.contains(range2.startContainer) || !container.contains(range2.endContainer)) {
|
|
62260
62514
|
return null;
|
|
62261
62515
|
}
|
|
62262
|
-
|
|
62263
|
-
|
|
62264
|
-
|
|
62265
|
-
|
|
62266
|
-
|
|
62267
|
-
|
|
62516
|
+
let startRange;
|
|
62517
|
+
let endRange;
|
|
62518
|
+
try {
|
|
62519
|
+
startRange = document.createRange();
|
|
62520
|
+
startRange.selectNodeContents(container);
|
|
62521
|
+
startRange.setEnd(range2.startContainer, range2.startOffset);
|
|
62522
|
+
endRange = document.createRange();
|
|
62523
|
+
endRange.selectNodeContents(container);
|
|
62524
|
+
endRange.setEnd(range2.endContainer, range2.endOffset);
|
|
62525
|
+
} catch {
|
|
62526
|
+
return null;
|
|
62527
|
+
}
|
|
62268
62528
|
return {
|
|
62269
62529
|
end: endRange.toString().length,
|
|
62270
62530
|
start: startRange.toString().length
|
|
@@ -62286,7 +62546,7 @@ function MiddleTruncate({ value, className, onCopy: onCopyProp, ...props }) {
|
|
|
62286
62546
|
const range2 = selection2.getRangeAt(0);
|
|
62287
62547
|
const visibleEl = visibleRef.current;
|
|
62288
62548
|
let copyText = null;
|
|
62289
|
-
if (e.currentTarget.contains(range2.startContainer) && e.currentTarget.contains(range2.endContainer) && visibleEl) {
|
|
62549
|
+
if (selectionText.includes(ELLIPSIS) && e.currentTarget.contains(range2.startContainer) && e.currentTarget.contains(range2.endContainer) && visibleEl) {
|
|
62290
62550
|
const offsets = getRangeOffsets(visibleEl, range2);
|
|
62291
62551
|
if (offsets) {
|
|
62292
62552
|
copyText = getMiddleTruncateCopyText({
|
|
@@ -62535,23 +62795,17 @@ function Spinner({ size: size2 = 14, color: color2 }) {
|
|
|
62535
62795
|
lineW: size2 * 0.24,
|
|
62536
62796
|
lineH: size2 * 0.08
|
|
62537
62797
|
};
|
|
62538
|
-
return jsxRuntimeExports.jsxs("span", { style: {
|
|
62539
|
-
display: "inline-flex",
|
|
62540
|
-
position: "relative",
|
|
62798
|
+
return jsxRuntimeExports.jsxs("span", { className: "relative inline-flex", style: {
|
|
62541
62799
|
width: size2,
|
|
62542
62800
|
height: size2
|
|
62543
|
-
}, children: [jsxRuntimeExports.jsx("style", { dangerouslySetInnerHTML: { __html: KEYFRAMES } }), config2.delays.map((delay, i) => jsxRuntimeExports.jsx("span", { style: {
|
|
62544
|
-
position: "absolute",
|
|
62545
|
-
left: "50%",
|
|
62546
|
-
top: "50%",
|
|
62801
|
+
}, children: [jsxRuntimeExports.jsx("style", { dangerouslySetInnerHTML: { __html: KEYFRAMES } }), config2.delays.map((delay, i) => jsxRuntimeExports.jsx("span", { className: "absolute top-1/2 left-1/2 rounded-[1px] bg-gray-700 [animation-iteration-count:infinite] [animation-name:wf-spinner-fade] [animation-timing-function:linear]", style: {
|
|
62547
62802
|
width: config2.lineW,
|
|
62548
62803
|
height: config2.lineH,
|
|
62549
62804
|
marginLeft: -config2.lineW / 2,
|
|
62550
62805
|
marginTop: -config2.lineH / 2,
|
|
62551
|
-
|
|
62552
|
-
backgroundColor: color2 ?? "var(--ds-gray-700)",
|
|
62806
|
+
backgroundColor: color2,
|
|
62553
62807
|
transform: `rotate(${i * config2.angle}deg) translate(${size2 * 0.36}px)`,
|
|
62554
|
-
|
|
62808
|
+
animationDuration: `${config2.duration}ms`,
|
|
62555
62809
|
animationDelay: `${delay}ms`
|
|
62556
62810
|
} }, delay))] });
|
|
62557
62811
|
}
|
|
@@ -62613,33 +62867,18 @@ function EncryptedInlineLabel() {
|
|
|
62613
62867
|
ctx.onDecrypt();
|
|
62614
62868
|
}, children: [ctx.isDecrypting ? jsxRuntimeExports.jsx(Spinner, { size: 10 }) : jsxRuntimeExports.jsx(Lock, { className: "h-3 w-3" }), jsxRuntimeExports.jsx("span", { children: "Decrypt" })] });
|
|
62615
62869
|
}
|
|
62616
|
-
return jsxRuntimeExports.jsxs("span", {
|
|
62617
|
-
display: "inline",
|
|
62618
|
-
verticalAlign: "middle",
|
|
62619
|
-
marginRight: "3px",
|
|
62620
|
-
marginTop: "-1px"
|
|
62621
|
-
} }), "Encrypted"] });
|
|
62870
|
+
return jsxRuntimeExports.jsxs("span", { className: "text-gray-600 italic", children: [jsxRuntimeExports.jsx(Lock, { className: "-mt-px mr-[3px] inline h-3 w-3 align-middle" }), "Encrypted"] });
|
|
62622
62871
|
}
|
|
62623
62872
|
function StreamRefInline({ streamRef }) {
|
|
62624
62873
|
const onStreamClick = reactExports.useContext(StreamClickContext);
|
|
62625
|
-
|
|
62626
|
-
return jsxRuntimeExports.jsxs("button", { type: "button", className: "inline-flex items-center gap-1 px-1.5 py-0.5 rounded text-[10px] font-mono cursor-pointer underline decoration-transparent transition-colors", style: {
|
|
62627
|
-
backgroundColor: hovered ? "var(--ds-blue-200)" : "var(--ds-blue-100)",
|
|
62628
|
-
color: "var(--ds-blue-900)",
|
|
62629
|
-
border: "1px solid var(--ds-blue-300)"
|
|
62630
|
-
}, onMouseEnter: () => setHovered(true), onMouseLeave: () => setHovered(false), onClick: (e) => {
|
|
62874
|
+
return jsxRuntimeExports.jsxs("button", { type: "button", className: "inline-flex cursor-pointer items-center gap-1 rounded border border-blue-300 bg-blue-100 px-1.5 py-0.5 font-mono text-[10px] text-blue-900 underline decoration-transparent transition-colors hover:bg-blue-200", onClick: (e) => {
|
|
62631
62875
|
e.stopPropagation();
|
|
62632
62876
|
onStreamClick == null ? void 0 : onStreamClick(streamRef.streamId);
|
|
62633
62877
|
}, title: `View stream: ${streamRef.streamId}`, children: [jsxRuntimeExports.jsx("span", { children: "📡" }), jsxRuntimeExports.jsx("span", { children: streamRef.streamId })] });
|
|
62634
62878
|
}
|
|
62635
62879
|
function RunRefInline({ runRef }) {
|
|
62636
62880
|
const onRunClick = reactExports.useContext(RunClickContext);
|
|
62637
|
-
|
|
62638
|
-
return jsxRuntimeExports.jsx("button", { type: "button", className: "inline-flex items-center gap-1 px-1.5 py-0.5 rounded text-[10px] font-mono cursor-pointer underline decoration-transparent transition-colors", style: {
|
|
62639
|
-
backgroundColor: hovered ? "var(--ds-purple-200)" : "var(--ds-purple-100)",
|
|
62640
|
-
color: "var(--ds-purple-900)",
|
|
62641
|
-
border: "1px solid var(--ds-purple-300)"
|
|
62642
|
-
}, onMouseEnter: () => setHovered(true), onMouseLeave: () => setHovered(false), onClick: (e) => {
|
|
62881
|
+
return jsxRuntimeExports.jsx("button", { type: "button", className: "inline-flex cursor-pointer items-center gap-1 rounded border border-purple-300 bg-purple-100 px-1.5 py-0.5 font-mono text-[10px] text-purple-900 underline decoration-transparent transition-colors hover:bg-purple-200", onClick: (e) => {
|
|
62643
62882
|
e.stopPropagation();
|
|
62644
62883
|
onRunClick == null ? void 0 : onRunClick(runRef.runId);
|
|
62645
62884
|
}, title: `View run: ${runRef.runId}`, children: jsxRuntimeExports.jsx("span", { children: runRef.runId }) });
|
|
@@ -62647,24 +62886,17 @@ function RunRefInline({ runRef }) {
|
|
|
62647
62886
|
function DecodedBytesChunk({ decodedText, source }) {
|
|
62648
62887
|
const [selectedView, setSelectedView] = reactExports.useState("decoded");
|
|
62649
62888
|
const parsed = parseChunkData(decodedText);
|
|
62650
|
-
return jsxRuntimeExports.jsxs("div", { className: "min-w-0", children: [selectedView === "decoded" ? jsxRuntimeExports.jsx("div", { className: "min-w-0", children: typeof parsed === "string" ? jsxRuntimeExports.jsx("span", { className: "whitespace-pre-wrap break-words
|
|
62651
|
-
backgroundColor: selectedView === "decoded" ? "var(--ds-gray-200)" : "var(--ds-gray-100)",
|
|
62652
|
-
color: "var(--ds-gray-900)"
|
|
62653
|
-
}, onClick: () => setSelectedView("decoded"), "aria-pressed": selectedView === "decoded", "aria-label": "Show decoded text", children: "Decoded" }), jsxRuntimeExports.jsx("button", { type: "button", className: "h-5 border-l px-1.5 text-[10px] font-medium", style: {
|
|
62654
|
-
borderColor: "var(--ds-gray-400)",
|
|
62655
|
-
backgroundColor: selectedView === "bytes" ? "var(--ds-gray-200)" : "var(--ds-gray-100)",
|
|
62656
|
-
color: "var(--ds-gray-900)"
|
|
62657
|
-
}, onClick: () => setSelectedView("bytes"), "aria-pressed": selectedView === "bytes", "aria-label": "Show raw bytes summary", children: "Bytes" })] }) })] });
|
|
62889
|
+
return jsxRuntimeExports.jsxs("div", { className: "min-w-0", children: [selectedView === "decoded" ? jsxRuntimeExports.jsx("div", { className: "min-w-0", children: typeof parsed === "string" ? jsxRuntimeExports.jsx("span", { className: "whitespace-pre-wrap break-words text-gray-1000", children: deserializeChunkText(parsed) }) : jsxRuntimeExports.jsx(DataInspector, { data: parsed, expandLevel: 1 }) }) : jsxRuntimeExports.jsx(DecodedBytesInspector, { decodedText, source }), jsxRuntimeExports.jsx("div", { className: "mt-2 flex", children: jsxRuntimeExports.jsxs("div", { className: "inline-flex overflow-hidden rounded border border-gray-400", title: `${source.type} decoded as ${source.encoding.toUpperCase()} text. Switch to Bytes to inspect the summarized raw value.`, children: [jsxRuntimeExports.jsx("button", { type: "button", className: cn$4("h-5 px-1.5 font-medium text-[10px] text-gray-900", selectedView === "decoded" ? "bg-gray-200" : "bg-gray-100"), onClick: () => setSelectedView("decoded"), "aria-pressed": selectedView === "decoded", "aria-label": "Show decoded text", children: "Decoded" }), jsxRuntimeExports.jsx("button", { type: "button", className: cn$4("h-5 border-gray-400 border-l px-1.5 font-medium text-[10px] text-gray-900", selectedView === "bytes" ? "bg-gray-200" : "bg-gray-100"), onClick: () => setSelectedView("bytes"), "aria-pressed": selectedView === "bytes", "aria-label": "Show raw bytes summary", children: "Bytes" })] }) })] });
|
|
62658
62890
|
}
|
|
62659
62891
|
function DecodedBytesInspector({ decodedText, source }) {
|
|
62660
62892
|
const [expanded, setExpanded] = reactExports.useState(false);
|
|
62661
|
-
return jsxRuntimeExports.jsxs("div", { className: "font-mono", children: [jsxRuntimeExports.jsxs("button", { type: "button", className: "flex max-w-full items-start gap-1 text-left
|
|
62893
|
+
return jsxRuntimeExports.jsxs("div", { className: "font-mono", children: [jsxRuntimeExports.jsxs("button", { type: "button", className: "flex max-w-full items-start gap-1 text-left text-gray-1000", onClick: () => setExpanded((value) => !value), title: `${source.type} decoded as ${source.encoding.toUpperCase()} text`, children: [jsxRuntimeExports.jsx("span", { className: "select-none text-gray-700", children: expanded ? "▼" : "▶" }), jsxRuntimeExports.jsx("span", { className: "min-w-0 break-words", children: source.rawSummary })] }), expanded && jsxRuntimeExports.jsxs("div", { className: "mt-1 pl-5", children: [jsxRuntimeExports.jsx("span", { className: "text-gray-700", children: "decoded: " }), jsxRuntimeExports.jsx("span", { className: "whitespace-pre-wrap break-words text-green-900", children: JSON.stringify(decodedText) })] })] });
|
|
62662
62894
|
}
|
|
62663
62895
|
function BytesDisplayValue({ display }) {
|
|
62664
62896
|
if (display.decodedFrom) {
|
|
62665
62897
|
return jsxRuntimeExports.jsx(DecodedBytesChunk, { decodedText: display.text, source: display.decodedFrom });
|
|
62666
62898
|
}
|
|
62667
|
-
return jsxRuntimeExports.jsx("span", { className: "whitespace-pre-wrap break-words
|
|
62899
|
+
return jsxRuntimeExports.jsx("span", { className: "whitespace-pre-wrap break-words text-gray-1000", children: display.text });
|
|
62668
62900
|
}
|
|
62669
62901
|
function formatField(field) {
|
|
62670
62902
|
return field === "" ? '""' : field;
|
|
@@ -63043,7 +63275,7 @@ const rowCopyValueVariants = cva("flex min-w-0 flex-1 items-center justify-end g
|
|
|
63043
63275
|
});
|
|
63044
63276
|
function DetailKeyValueRowBase({ label, value, copyText, href, removed = false, variant }) {
|
|
63045
63277
|
const stringValue = typeof value === "string" ? value : void 0;
|
|
63046
|
-
return jsxRuntimeExports.jsxs("div", { className: "px-1.5 hover:bg-gray-100 flex justify-between gap-3 -mx-1.5 py-0.5 rounded items-center", children: [jsxRuntimeExports.jsx("span", { className: "flex min-w-0 items-center gap-1.5 truncate text-label-13 text-gray-900", children: label }), removed ? jsxRuntimeExports.jsx("span", { className: "shrink-0 text-copy-13 italic text-gray-700", children: "removed" }) : copyText ? jsxRuntimeExports.jsxs("div", { className: cn$4(rowCopyValueVariants({ variant })), title: copyText, children: [href ? jsxRuntimeExports.jsxs("a", { href, target: "_blank", rel: "noreferrer", className: cn$4(rowValueVariants({ variant }), "flex min-w-0 items-center gap-0.5 hover:underline"), children: [jsxRuntimeExports.jsx(MiddleTruncate, { value: copyText, className: "min-w-0
|
|
63278
|
+
return jsxRuntimeExports.jsxs("div", { className: "px-1.5 hover:bg-gray-100 flex justify-between gap-3 -mx-1.5 py-0.5 rounded items-center", children: [jsxRuntimeExports.jsx("span", { className: "flex min-w-0 items-center gap-1.5 truncate text-label-13 text-gray-900", children: label }), removed ? jsxRuntimeExports.jsx("span", { className: "shrink-0 text-copy-13 italic text-gray-700", children: "removed" }) : copyText ? jsxRuntimeExports.jsxs("div", { className: cn$4(rowCopyValueVariants({ variant })), title: copyText, children: [href ? jsxRuntimeExports.jsxs("a", { href, target: "_blank", rel: "noreferrer", className: cn$4(rowValueVariants({ variant }), "flex min-w-0 items-center gap-0.5 hover:underline"), children: [jsxRuntimeExports.jsx(MiddleTruncate, { value: copyText, className: "min-w-0 grid-cols-[minmax(0,1fr)] text-right" }), jsxRuntimeExports.jsx(ArrowUpRight, { "aria-hidden": true, className: "h-3 w-3 shrink-0" })] }) : jsxRuntimeExports.jsx(MiddleTruncate, { value: copyText, className: cn$4(rowValueVariants({ variant, className: "text-right" }), "grid-cols-[minmax(0,1fr)]") }), jsxRuntimeExports.jsx(CopyButton, { copyText, ariaLabel: `Copy ${label}`, className: "shrink-0 -mr-1" })] }) : jsxRuntimeExports.jsx("span", { className: cn$4(rowValueVariants({ variant })), title: stringValue, children: href ? jsxRuntimeExports.jsx("a", { href, target: "_blank", rel: "noreferrer", className: "hover:underline", children: value }) : value })] });
|
|
63047
63279
|
}
|
|
63048
63280
|
function DetailKeyValueRow(props) {
|
|
63049
63281
|
return jsxRuntimeExports.jsx(DetailKeyValueRowBase, { ...props });
|
|
@@ -63118,10 +63350,7 @@ function AttrSetEventBlock({ data }) {
|
|
|
63118
63350
|
return jsxRuntimeExports.jsx(CopyableDataBlock, { data });
|
|
63119
63351
|
}
|
|
63120
63352
|
const writerLabel = describeWriter(data.writer);
|
|
63121
|
-
return jsxRuntimeExports.jsxs("div", { className: "flex flex-col px-3 py-1", children: [jsxRuntimeExports.jsx("div", { className: "flex flex-col", children: data.changes.map((change, index2) => jsxRuntimeExports.jsx(AttributeRow, { attributeKey: change.key, removed: change.value === null, value: change.value ?? void 0 }, `${change.key}:${index2}`)) }), writerLabel && jsxRuntimeExports.jsx("div", { className: "border-t py-1.5 text-label-12",
|
|
63122
|
-
borderColor: "var(--ds-gray-alpha-400)",
|
|
63123
|
-
color: "var(--ds-gray-700)"
|
|
63124
|
-
}, children: writerLabel })] });
|
|
63353
|
+
return jsxRuntimeExports.jsxs("div", { className: "flex flex-col px-3 py-1", children: [jsxRuntimeExports.jsx("div", { className: "flex flex-col", children: data.changes.map((change, index2) => jsxRuntimeExports.jsx(AttributeRow, { attributeKey: change.key, removed: change.value === null, value: change.value ?? void 0 }, `${change.key}:${index2}`)) }), writerLabel && jsxRuntimeExports.jsx("div", { className: "border-gray-alpha-400 border-t py-1.5 text-gray-700 text-label-12", children: writerLabel })] });
|
|
63125
63354
|
}
|
|
63126
63355
|
function setRef(ref, value) {
|
|
63127
63356
|
if (typeof ref === "function") {
|
|
@@ -63588,9 +63817,7 @@ function ContextCardProvider({ children: children2, portalTarget }) {
|
|
|
63588
63817
|
distanceFromLast,
|
|
63589
63818
|
lastOrigin
|
|
63590
63819
|
]);
|
|
63591
|
-
return jsxRuntimeExports.jsxs(ContextCardContext.Provider, { value: contextValue, children: [children2, isMounted ? reactDomExports.createPortal(jsxRuntimeExports.jsx("div", { className: "w-full h-full inset-0 fixed pointer-events-none z-[100000]", ref, children: jsxRuntimeExports.jsx("div", { className: "min-w-max transition-all duration-150 ease-[easing-function:cubic-bezier(0.3,_0.57,_0.07,_0.95)] will-change-[transform,width,height] motion-reduce:!transition-none", style: {
|
|
63592
|
-
opacity: visible ? 1 : 0
|
|
63593
|
-
}, children: jsxRuntimeExports.jsxs("div", { className: cn$4("absolute bg-background-100 bg-clip-padding rounded-[6px] overflow-visible pointer-events-none z-[1000000] shadow-[var(--ds-shadow-tooltip),0_0_0_1px_var(--ds-background-100)] w-fit [--context-card-tip-stroke:#DBDBDB] dark-theme:[--context-card-tip-stroke:#252525]", skipTransition ? "!transition-none" : "transition-[transform,width,height] duration-250 ease-[easing-function:cubic-bezier(0.29,0.31,0.05,0.96)] will-change-[transform,width,height] motion-reduce:!transition-none"), "data-skip-transition": skipTransition, style: {
|
|
63820
|
+
return jsxRuntimeExports.jsxs(ContextCardContext.Provider, { value: contextValue, children: [children2, isMounted ? reactDomExports.createPortal(jsxRuntimeExports.jsx("div", { className: "w-full h-full inset-0 fixed pointer-events-none z-[100000]", ref, children: jsxRuntimeExports.jsx("div", { className: cn$4("min-w-max transition-all duration-150 ease-[easing-function:cubic-bezier(0.3,_0.57,_0.07,_0.95)] will-change-[transform,width,height] motion-reduce:!transition-none", visible ? "opacity-100" : "opacity-0"), children: jsxRuntimeExports.jsxs("div", { className: cn$4("absolute bg-background-100 bg-clip-padding rounded-[6px] overflow-visible pointer-events-none z-[1000000] shadow-[var(--ds-shadow-tooltip),0_0_0_1px_var(--ds-background-100)] w-fit [--context-card-tip-stroke:#DBDBDB] dark-theme:[--context-card-tip-stroke:#252525]", skipTransition ? "!transition-none" : "transition-[transform,width,height] duration-[250ms] ease-[easing-function:cubic-bezier(0.29,0.31,0.05,0.96)] will-change-[transform,width,height] motion-reduce:!transition-none"), "data-skip-transition": skipTransition, style: {
|
|
63594
63821
|
transform: `translate(${activeBounds.x}px,${activeBounds.y}px)`,
|
|
63595
63822
|
width: activeBounds.width,
|
|
63596
63823
|
height: activeBounds.height
|
|
@@ -63599,18 +63826,13 @@ function ContextCardProvider({ children: children2, portalTarget }) {
|
|
|
63599
63826
|
"right-full -translate-y-1/2 rotate-90 -mr-[3.5px]": activeBounds.side === "right",
|
|
63600
63827
|
"bottom-full -translate-x-1/2 rotate-180": activeBounds.side === "bottom",
|
|
63601
63828
|
"left-full -translate-y-1/2 rotate-[270deg] -ml-[3.5px]": activeBounds.side === "left"
|
|
63602
|
-
}, skipTransition ? "!transition-none" : "transition-[transform,width,height] duration-
|
|
63829
|
+
}, skipTransition ? "!transition-none" : "transition-[transform,width,height] duration-[250ms] ease-[easing-function:cubic-bezier(0.29,0.31,0.05,0.96)] will-change-[transform,width,height] motion-reduce:!transition-none"), style: {
|
|
63603
63830
|
...activeBounds.side === "top" || activeBounds.side === "bottom" ? {
|
|
63604
63831
|
left: `calc(50% + ${activeBounds.arrowOffset.x}px)`
|
|
63605
63832
|
} : {
|
|
63606
63833
|
top: `calc(50% + ${activeBounds.arrowOffset.y}px)`
|
|
63607
63834
|
}
|
|
63608
|
-
}, "data-skip-transition": skipTransition, "data-side": activeBounds.side, children: jsxRuntimeExports.jsxs("svg", { width: "14", height: "7", viewBox: "0 0 14 7", fill: "none", xmlns: "http://www.w3.org/2000/svg", "aria-hidden": "true", children: [jsxRuntimeExports.jsx("g", { clipPath: "url(#context-card-tip-clip)", children: jsxRuntimeExports.jsx("path", { d: "M15 -0.5V0.5H12.9834L12.8184 0.508789C12.4377 0.550822 12.0853 0.738056 11.8359 1.03418L8.53027 4.95996C7.73114 5.90893 6.26886 5.90892 5.46973 4.95996L2.16406 1.03418C1.87905 0.695733 1.45907 0.5 1.0166 0.5H-1V-0.5H15Z", fill: "var(--ds-background-100)",
|
|
63609
|
-
fill: "var(--ds-background-100)",
|
|
63610
|
-
fillOpacity: 1,
|
|
63611
|
-
stroke: "var(--context-card-tip-stroke)",
|
|
63612
|
-
strokeOpacity: 1
|
|
63613
|
-
} }) }), jsxRuntimeExports.jsx("defs", { children: jsxRuntimeExports.jsx("clipPath", { id: "context-card-tip-clip", children: jsxRuntimeExports.jsx("rect", { width: "14", height: "7", fill: "white", style: { fill: "white", fillOpacity: 1 } }) }) })] }) }), jsxRuntimeExports.jsx("div", { ref: portalRef })] }) }) }), resolvedPortalTarget ?? document.body) : null] });
|
|
63835
|
+
}, "data-skip-transition": skipTransition, "data-side": activeBounds.side, children: jsxRuntimeExports.jsxs("svg", { width: "14", height: "7", viewBox: "0 0 14 7", fill: "none", xmlns: "http://www.w3.org/2000/svg", "aria-hidden": "true", children: [jsxRuntimeExports.jsx("g", { clipPath: "url(#context-card-tip-clip)", children: jsxRuntimeExports.jsx("path", { d: "M15 -0.5V0.5H12.9834L12.8184 0.508789C12.4377 0.550822 12.0853 0.738056 11.8359 1.03418L8.53027 4.95996C7.73114 5.90893 6.26886 5.90892 5.46973 4.95996L2.16406 1.03418C1.87905 0.695733 1.45907 0.5 1.0166 0.5H-1V-0.5H15Z", fill: "var(--ds-background-100)", className: "fill-background-100 stroke-[var(--context-card-tip-stroke)]" }) }), jsxRuntimeExports.jsx("defs", { children: jsxRuntimeExports.jsx("clipPath", { id: "context-card-tip-clip", children: jsxRuntimeExports.jsx("rect", { width: "14", height: "7", fill: "white", className: "fill-background-100" }) }) })] }) }), jsxRuntimeExports.jsx("div", { ref: portalRef })] }) }) }), resolvedPortalTarget ?? document.body) : null] });
|
|
63614
63836
|
}
|
|
63615
63837
|
function ContextCardTrigger({ content: content2, children: children2, side = "right", align = "center", sideOffset = 16, alignOffset = 0, ignoreCardPointerEvents = false, noPadding, asChild, className, hide: hide2, inactiveTimeoutMs = INACTIVE_TIMEOUT_MS }) {
|
|
63616
63838
|
const triggerRef = reactExports.useRef(null);
|
|
@@ -63845,17 +64067,22 @@ function ContextCardTrigger({ content: content2, children: children2, side = "ri
|
|
|
63845
64067
|
}
|
|
63846
64068
|
}
|
|
63847
64069
|
const Comp = asChild ? Root$6 : "div";
|
|
63848
|
-
return jsxRuntimeExports.jsxs(Comp, { className: cn$4("inline-flex cursor-pointer flex-[0_1_auto] overflow-hidden", className), onMouseEnter, onMouseLeave, onClick: handleClick, ref: triggerRef, children: [jsxRuntimeExports.jsx(Slottable$1, { children: children2 }), (portalRef == null ? void 0 : portalRef.current) && (localHover || persisting) ? reactDomExports.createPortal(jsxRuntimeExports.jsx("div", { className: cn$4("absolute top-0 p-3 left-0 max-w-max transition-[transform,width,height] duration-
|
|
63849
|
-
...noPadding ? { padding: 0 } : {},
|
|
63850
|
-
pointerEvents: rootVisible && visible && !ignoreCardPointerEvents ? "all" : "none"
|
|
63851
|
-
}, children: jsxRuntimeExports.jsx("div", { className: cn$4("min-w-max transition-all duration-150 ease-[easing-function:cubic-bezier(0.3,_0.57,_0.07,_0.95)] will-change-[transform,width,height] motion-reduce:!transition-none", skipTransition ? "!transition-none" : "transition-[transform,width,height] duration-250 ease-[easing-function:cubic-bezier(0.29,0.31,0.05,0.96)] will-change-[transform,width,height] motion-reduce:!transition-none"), ref: contentMeasureRef, style: {
|
|
63852
|
-
opacity: Number(visible)
|
|
63853
|
-
}, children: content2 }) }, id2), portalRef.current) : null] });
|
|
64070
|
+
return jsxRuntimeExports.jsxs(Comp, { className: cn$4("inline-flex cursor-pointer flex-[0_1_auto] overflow-hidden", className), onMouseEnter, onMouseLeave, onClick: handleClick, ref: triggerRef, children: [jsxRuntimeExports.jsx(Slottable$1, { children: children2 }), (portalRef == null ? void 0 : portalRef.current) && (localHover || persisting) ? reactDomExports.createPortal(jsxRuntimeExports.jsx("div", { className: cn$4("absolute top-0 p-3 left-0 max-w-max transition-[transform,width,height] duration-[250ms] ease-[easing-function:cubic-bezier(0.29,0.31,0.05,0.96)] will-change-[transform,width,height] motion-reduce:!transition-none", skipTransition && "!transition-none", noPadding && "p-0", rootVisible && visible && !ignoreCardPointerEvents ? "pointer-events-auto" : "pointer-events-none"), ref: contentRef, children: jsxRuntimeExports.jsx("div", { className: cn$4("min-w-max transition-all duration-150 ease-[easing-function:cubic-bezier(0.3,_0.57,_0.07,_0.95)] will-change-[transform,width,height] motion-reduce:!transition-none", skipTransition ? "!transition-none" : "transition-[transform,width,height] duration-[250ms] ease-[easing-function:cubic-bezier(0.29,0.31,0.05,0.96)] will-change-[transform,width,height] motion-reduce:!transition-none", visible ? "opacity-100" : "opacity-0"), ref: contentMeasureRef, children: content2 }) }, id2), portalRef.current) : null] });
|
|
63854
64071
|
}
|
|
63855
64072
|
const STYLES$2 = `.wf-decrypt-btn{appearance:none;-webkit-appearance:none;border:none;display:inline-flex;align-items:center;justify-content:center;height:40px;padding:0 12px;border-radius:6px;font-size:14px;font-weight:500;line-height:20px;cursor:pointer;white-space:nowrap;gap:6px;transition:background 150ms}.wf-decrypt-idle{color:var(--ds-gray-1000);background:var(--ds-background-100);box-shadow:0 0 0 1px var(--ds-gray-400)}.wf-decrypt-idle:hover{background:var(--ds-gray-alpha-200)}.wf-decrypt-done{color:var(--ds-green-900);background:var(--ds-green-100);box-shadow:0 0 0 1px var(--ds-green-400);cursor:default}`;
|
|
63856
64073
|
function DecryptButton({ decrypted = false, loading = false, onClick }) {
|
|
63857
64074
|
return jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [jsxRuntimeExports.jsx("style", { dangerouslySetInnerHTML: { __html: STYLES$2 } }), jsxRuntimeExports.jsxs("button", { type: "button", onClick: decrypted ? void 0 : onClick, disabled: decrypted || loading, className: `wf-decrypt-btn ${decrypted ? "wf-decrypt-done" : "wf-decrypt-idle"}`, children: [loading ? jsxRuntimeExports.jsx(Spinner, { size: 14 }) : decrypted ? jsxRuntimeExports.jsxs("svg", { width: 14, height: 14, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: 2, strokeLinecap: "round", strokeLinejoin: "round", children: [jsxRuntimeExports.jsx("rect", { x: "3", y: "11", width: "18", height: "11", rx: "2", ry: "2" }), jsxRuntimeExports.jsx("path", { d: "M7 11V7a5 5 0 0 1 9.9-1" })] }) : jsxRuntimeExports.jsxs("svg", { width: 14, height: 14, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: 2, strokeLinecap: "round", strokeLinejoin: "round", children: [jsxRuntimeExports.jsx("rect", { x: "3", y: "11", width: "18", height: "11", rx: "2", ry: "2" }), jsxRuntimeExports.jsx("path", { d: "M7 11V7a5 5 0 0 1 10 0v4" })] }), loading ? "Decrypting…" : decrypted ? "Decrypted" : "Decrypt"] })] });
|
|
63858
64075
|
}
|
|
64076
|
+
const TooltipProvider = Provider$2;
|
|
64077
|
+
const Tooltip$1 = Root3$1;
|
|
64078
|
+
const TooltipTrigger$1 = Trigger$4;
|
|
64079
|
+
const TooltipContent$1 = reactExports.forwardRef(({ className, sideOffset = 8, showArrow = true, children: children2, ...props }, ref) => jsxRuntimeExports.jsx(Portal$6, { children: jsxRuntimeExports.jsxs(Content2$4, { ref, sideOffset, className: cn$4("z-[99999] flex items-center gap-1 rounded-[10px] bg-gray-1000 px-2 py-1.5 !text-label-13 text-background-100 shadow-md select-none", className), ...props, children: [children2, showArrow ? jsxRuntimeExports.jsx(Arrow2$1, { width: 11, height: 5, className: "fill-gray-1000" }) : null] }) }));
|
|
64080
|
+
TooltipContent$1.displayName = Content2$4.displayName;
|
|
64081
|
+
function DuplicateEventTooltip({ isDuplicate = false, children: children2 }) {
|
|
64082
|
+
if (!isDuplicate)
|
|
64083
|
+
return children2;
|
|
64084
|
+
return jsxRuntimeExports.jsx(TooltipProvider, { delayDuration: 300, children: jsxRuntimeExports.jsxs(Tooltip$1, { children: [jsxRuntimeExports.jsx(TooltipTrigger$1, { asChild: true, children: children2 }), jsxRuntimeExports.jsx(TooltipContent$1, { className: "max-w-[264px] leading-snug", collisionPadding: 8, side: "top", children: DUPLICATE_EVENT_MESSAGE })] }) });
|
|
64085
|
+
}
|
|
63859
64086
|
function isStructuredError(value) {
|
|
63860
64087
|
return value != null && typeof value === "object" && (typeof value.message === "string" || typeof value.stack === "string");
|
|
63861
64088
|
}
|
|
@@ -63911,30 +64138,13 @@ function MenuDropdown({ options, value, onChange }) {
|
|
|
63911
64138
|
document.addEventListener("mousedown", handleClickOutside);
|
|
63912
64139
|
return () => document.removeEventListener("mousedown", handleClickOutside);
|
|
63913
64140
|
}, [open2]);
|
|
63914
|
-
return jsxRuntimeExports.jsxs("div", { ref,
|
|
63915
|
-
marginLeft: 16,
|
|
63916
|
-
marginRight: -4,
|
|
63917
|
-
color: "var(--ds-gray-900)"
|
|
63918
|
-
}, children: jsxRuntimeExports.jsx("path", { d: "M4.5 6L8 9.5L11.5 6", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" }) })] }), open2 && jsxRuntimeExports.jsx("div", { style: {
|
|
63919
|
-
position: "absolute",
|
|
63920
|
-
right: 0,
|
|
63921
|
-
top: "100%",
|
|
63922
|
-
marginTop: 4,
|
|
63923
|
-
minWidth: 140,
|
|
63924
|
-
padding: 4,
|
|
63925
|
-
borderRadius: 12,
|
|
63926
|
-
background: "var(--ds-background-100)",
|
|
63927
|
-
boxShadow: "var(--ds-shadow-menu, var(--ds-shadow-medium))",
|
|
63928
|
-
zIndex: 2001
|
|
63929
|
-
}, role: "menu", children: options.map((option) => jsxRuntimeExports.jsx("button", { type: "button", role: "menuitem", className: "wf-menu-item", style: {
|
|
63930
|
-
fontWeight: option.value === value ? 500 : 400
|
|
63931
|
-
}, onClick: () => {
|
|
64141
|
+
return jsxRuntimeExports.jsxs("div", { ref, className: "relative shrink-0", children: [jsxRuntimeExports.jsx("style", { dangerouslySetInnerHTML: { __html: STYLES } }), jsxRuntimeExports.jsxs("button", { type: "button", className: "wf-menu-btn", onClick: () => setOpen(!open2), children: [jsxRuntimeExports.jsx("span", { children: label }), jsxRuntimeExports.jsx("svg", { width: 16, height: 16, viewBox: "0 0 16 16", fill: "none", className: "-mr-1 ml-4 text-gray-900", children: jsxRuntimeExports.jsx("path", { d: "M4.5 6L8 9.5L11.5 6", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" }) })] }), open2 && jsxRuntimeExports.jsx("div", { className: "absolute top-full right-0 z-[2001] mt-1 min-w-[140px] bg-background-100 p-1 material-menu", role: "menu", children: options.map((option) => jsxRuntimeExports.jsx("button", { type: "button", role: "menuitem", className: cn$4("wf-menu-item", option.value === value ? "font-medium" : "font-normal"), onClick: () => {
|
|
63932
64142
|
onChange(option.value);
|
|
63933
64143
|
setOpen(false);
|
|
63934
64144
|
}, children: option.label }, option.value)) })] });
|
|
63935
64145
|
}
|
|
63936
64146
|
function Skeleton$1({ className, style: style2, ...props }) {
|
|
63937
|
-
return jsxRuntimeExports.jsx("div", { ...props, className: cn$4("rounded-md", className), style:
|
|
64147
|
+
return jsxRuntimeExports.jsx("div", { ...props, className: cn$4("rounded-md bg-gray-200", className), style: style2 });
|
|
63938
64148
|
}
|
|
63939
64149
|
const TIME_UNITS = [
|
|
63940
64150
|
{ unit: "year", ms: 31536e6 },
|
|
@@ -64116,8 +64326,8 @@ function buildNameMaps(events2, run2) {
|
|
|
64116
64326
|
const workflowName = (run2 == null ? void 0 : run2.workflowName) ? ((_b2 = parseWorkflowName(run2.workflowName)) == null ? void 0 : _b2.shortName) ?? run2.workflowName : null;
|
|
64117
64327
|
return { correlationNameMap, workflowName };
|
|
64118
64328
|
}
|
|
64119
|
-
function buildDurationMap(events2) {
|
|
64120
|
-
const chronological = [...events2].sort((a2, b2) => getEffectiveEventTime(a2) - getEffectiveEventTime(b2));
|
|
64329
|
+
function buildDurationMap(events2, duplicateEventIds = /* @__PURE__ */ new Set()) {
|
|
64330
|
+
const chronological = [...events2].filter((event) => !duplicateEventIds.has(event.eventId)).sort((a2, b2) => getEffectiveEventTime(a2) - getEffectiveEventTime(b2));
|
|
64121
64331
|
const createdTimes = /* @__PURE__ */ new Map();
|
|
64122
64332
|
const firstStartedTimes = /* @__PURE__ */ new Map();
|
|
64123
64333
|
const startedTimes = /* @__PURE__ */ new Map();
|
|
@@ -64366,7 +64576,7 @@ function RowsSkeleton({ showSeparateEventOccurrenceTimestamps = false }) {
|
|
|
64366
64576
|
marginLeft: i % 4 === 0 ? 5 : 6
|
|
64367
64577
|
} })] }), jsxRuntimeExports.jsx("div", { className: "w-5 flex-shrink-0 flex items-center justify-center", children: jsxRuntimeExports.jsx(Skeleton$1, { className: "w-5 h-5", style: { borderRadius: 4 } }) }), showSeparateEventOccurrenceTimestamps && jsxRuntimeExports.jsx("div", { className: "min-w-0 px-4", style: { flex: "2 1 0%" }, children: jsxRuntimeExports.jsx(Skeleton$1, { className: "h-3", style: { width: "70%" } }) }), jsxRuntimeExports.jsx("div", { className: "min-w-0 px-4", style: { flex: "2 1 0%" }, children: jsxRuntimeExports.jsx(Skeleton$1, { className: "h-3", style: { width: "70%" } }) }), jsxRuntimeExports.jsxs("div", { className: "min-w-0 px-4 flex items-center gap-1.5", style: { flex: "2 1 0%" }, children: [jsxRuntimeExports.jsx(Skeleton$1, { className: "flex-shrink-0", style: { width: 6, height: 6, borderRadius: "50%" } }), jsxRuntimeExports.jsx(Skeleton$1, { className: "h-3", style: { width: "60%" } })] }), jsxRuntimeExports.jsx("div", { className: "min-w-0 px-4", style: { flex: "2 1 0%" }, children: jsxRuntimeExports.jsx(Skeleton$1, { className: "h-3", style: { width: "50%" } }) }), jsxRuntimeExports.jsx("div", { className: "min-w-0 px-4", style: { flex: "3 1 0%" }, children: jsxRuntimeExports.jsx(Skeleton$1, { className: "h-3", style: { width: "75%" } }) }), jsxRuntimeExports.jsx("div", { className: "min-w-0 px-4", style: { flex: "3 1 0%" }, children: jsxRuntimeExports.jsx(Skeleton$1, { className: "h-3", style: { width: "75%" } }) })] }, i)) });
|
|
64368
64578
|
}
|
|
64369
|
-
function EventRow$1({ event, index: index2, isFirst, isLast, isExpanded, onToggleExpand, activeGroupKey, selectedGroupKey, selectedGroupRange, correlationNameMap, workflowName, durationMap, onSelectGroup, onHoverGroup, onLoadEventData, cachedEventData, onCacheEventData, encryptionKey, onEncryptedDataDetected, suppressGroupDimming = false, showSeparateEventOccurrenceTimestamps = false }) {
|
|
64579
|
+
function EventRow$1({ event, index: index2, isFirst, isLast, isExpanded, onToggleExpand, activeGroupKey, selectedGroupKey, selectedGroupRange, correlationNameMap, workflowName, durationMap, onSelectGroup, onHoverGroup, onLoadEventData, cachedEventData, onCacheEventData, encryptionKey, onEncryptedDataDetected, suppressGroupDimming = false, showSeparateEventOccurrenceTimestamps = false, isDuplicate = false }) {
|
|
64370
64580
|
const [isLoading, setIsLoading] = reactExports.useState(false);
|
|
64371
64581
|
const [loadedEventData, setLoadedEventData] = reactExports.useState(cachedEventData);
|
|
64372
64582
|
const [loadError, setLoadError] = reactExports.useState(null);
|
|
@@ -64484,7 +64694,9 @@ function EventRow$1({ event, index: index2, isFirst, isLast, isExpanded, onToggl
|
|
|
64484
64694
|
}, children: jsxRuntimeExports.jsx(ChevronRight, { className: "h-3 w-3 transition-transform", style: {
|
|
64485
64695
|
color: "var(--ds-gray-900)",
|
|
64486
64696
|
transform: isExpanded ? "rotate(90deg)" : "rotate(0deg)"
|
|
64487
|
-
} }) }), showSeparateEventOccurrenceTimestamps && jsxRuntimeExports.jsx("div", { className: "tabular-nums min-w-0 px-4", style: { color: "var(--ds-gray-900)", flex: "2 1 0%" }, children: occurredAt ? jsxRuntimeExports.jsx(TimestampTooltip, { date: occurredAt, children: jsxRuntimeExports.jsx("span", { children: formatEventTime(occurredAt) }) }) : "-" }), jsxRuntimeExports.jsx("div", { className: "tabular-nums min-w-0 px-4", style: { color: "var(--ds-gray-900)", flex: "2 1 0%" }, children: jsxRuntimeExports.jsx(TimestampTooltip, { date: displayedCreatedAt, children: jsxRuntimeExports.jsx("span", { children: formatEventTime(displayedCreatedAt) }) }) }), jsxRuntimeExports.jsx("div", { className: "font-medium min-w-0 px-4", style: { flex: "2 1 0%" }, children: jsxRuntimeExports.jsxs("span", { className: "inline-flex items-center gap-1.5", style: {
|
|
64697
|
+
} }) }), showSeparateEventOccurrenceTimestamps && jsxRuntimeExports.jsx("div", { className: "tabular-nums min-w-0 px-4", style: { color: "var(--ds-gray-900)", flex: "2 1 0%" }, children: occurredAt ? jsxRuntimeExports.jsx(TimestampTooltip, { date: occurredAt, children: jsxRuntimeExports.jsx("span", { children: formatEventTime(occurredAt) }) }) : "-" }), jsxRuntimeExports.jsx("div", { className: "tabular-nums min-w-0 px-4", style: { color: "var(--ds-gray-900)", flex: "2 1 0%" }, children: jsxRuntimeExports.jsx(TimestampTooltip, { date: displayedCreatedAt, children: jsxRuntimeExports.jsx("span", { children: formatEventTime(displayedCreatedAt) }) }) }), jsxRuntimeExports.jsx("div", { className: "font-medium min-w-0 px-4", style: { flex: "2 1 0%" }, children: jsxRuntimeExports.jsx(DuplicateEventTooltip, { isDuplicate, children: jsxRuntimeExports.jsxs("span", { className: "inline-flex items-center gap-1.5", style: {
|
|
64698
|
+
color: isDuplicate ? "var(--ds-gray-700)" : "var(--ds-gray-900)"
|
|
64699
|
+
}, children: [jsxRuntimeExports.jsxs("span", { style: {
|
|
64488
64700
|
position: "relative",
|
|
64489
64701
|
display: "inline-flex",
|
|
64490
64702
|
width: 6,
|
|
@@ -64503,7 +64715,7 @@ function EventRow$1({ event, index: index2, isFirst, isLast, isExpanded, onToggl
|
|
|
64503
64715
|
height: 6,
|
|
64504
64716
|
borderRadius: "50%",
|
|
64505
64717
|
backgroundColor: statusDotColor
|
|
64506
|
-
} })] }), formatEventType(event.eventType)] }) }), jsxRuntimeExports.jsx("div", { className: "min-w-0 px-4 overflow-hidden text-ellipsis whitespace-nowrap", style: { flex: "2 1 0%" }, title: eventName !== "-" ? eventName : void 0, children: eventName }), jsxRuntimeExports.jsx(CopyableCell, { value: event.correlationId || "", className: "font-mono", style: { flex: "3 1 0%" } }), jsxRuntimeExports.jsx(CopyableCell, { value: event.eventId, className: "font-mono", style: { flex: "3 1 0%" } })] })] }), isExpanded && jsxRuntimeExports.jsxs("div", { className: "flex", children: [jsxRuntimeExports.jsx(TreeGutter, { isFirst: false, isLast, isRunLevel: isRun, hasSelection: hasActive, showBranch: false, showLaneLine: showLaneLine && !isLaneEnd, isLaneStart: false, isLaneEnd: false, continuationOnly: true }), jsxRuntimeExports.jsx("div", { className: "w-5 flex-shrink-0" }), jsxRuntimeExports.jsxs("div", { className: "flex-1 my-1.5 mr-3 ml-2 py-2 rounded-md border overflow-hidden", style: {
|
|
64718
|
+
} })] }), formatEventType(event.eventType)] }) }) }), jsxRuntimeExports.jsx("div", { className: "min-w-0 px-4 overflow-hidden text-ellipsis whitespace-nowrap", style: { flex: "2 1 0%" }, title: eventName !== "-" ? eventName : void 0, children: eventName }), jsxRuntimeExports.jsx(CopyableCell, { value: event.correlationId || "", className: "font-mono", style: { flex: "3 1 0%" } }), jsxRuntimeExports.jsx(CopyableCell, { value: event.eventId, className: "font-mono", style: { flex: "3 1 0%" } })] })] }), isExpanded && jsxRuntimeExports.jsxs("div", { className: "flex", children: [jsxRuntimeExports.jsx(TreeGutter, { isFirst: false, isLast, isRunLevel: isRun, hasSelection: hasActive, showBranch: false, showLaneLine: showLaneLine && !isLaneEnd, isLaneStart: false, isLaneEnd: false, continuationOnly: true }), jsxRuntimeExports.jsx("div", { className: "w-5 flex-shrink-0" }), jsxRuntimeExports.jsxs("div", { className: "flex-1 my-1.5 mr-3 ml-2 py-2 rounded-md border overflow-hidden", style: {
|
|
64507
64719
|
borderColor: "var(--ds-gray-alpha-200)",
|
|
64508
64720
|
opacity: contentOpacity,
|
|
64509
64721
|
transition: "opacity 150ms"
|
|
@@ -64541,6 +64753,9 @@ function EventListViewInner({ events: events2, run: run2, onLoadEventData, hasMo
|
|
|
64541
64753
|
const dir = effectiveSortOrder === "desc" ? -1 : 1;
|
|
64542
64754
|
return [...sourceEvents].sort((a2, b2) => dir * (getEffectiveEventTime(a2) - getEffectiveEventTime(b2)));
|
|
64543
64755
|
}, [events2, effectiveSortOrder, isExactSearchActive, searchResults]);
|
|
64756
|
+
const duplicateEventIds = reactExports.useMemo(() => findDuplicateEventIds(events2 ?? [], {
|
|
64757
|
+
isCompleteHistory: !hasMoreEvents && !isExactSearchActive
|
|
64758
|
+
}), [events2, hasMoreEvents, isExactSearchActive]);
|
|
64544
64759
|
const hasEncryptedInlineData = reactExports.useMemo(() => {
|
|
64545
64760
|
const sourceEvents = isExactSearchActive ? searchResults : events2;
|
|
64546
64761
|
if (!sourceEvents)
|
|
@@ -64558,7 +64773,7 @@ function EventListViewInner({ events: events2, run: run2, onLoadEventData, hasMo
|
|
|
64558
64773
|
}, []);
|
|
64559
64774
|
const hasEncryptedData = hasEncryptedDataProp || hasEncryptedInlineData || foundEncryptedInLazyData;
|
|
64560
64775
|
const { correlationNameMap, workflowName } = reactExports.useMemo(() => buildNameMaps(isExactSearchActive ? searchResults : events2 ?? null, run2 ?? null), [events2, isExactSearchActive, run2, searchResults]);
|
|
64561
|
-
const durationMap = reactExports.useMemo(() => buildDurationMap(sortedEvents), [sortedEvents]);
|
|
64776
|
+
const durationMap = reactExports.useMemo(() => buildDurationMap(sortedEvents, duplicateEventIds), [sortedEvents, duplicateEventIds]);
|
|
64562
64777
|
const [selectedGroupKey, setSelectedGroupKey] = reactExports.useState(void 0);
|
|
64563
64778
|
const [hoveredGroupKey, setHoveredGroupKey] = reactExports.useState(void 0);
|
|
64564
64779
|
const onSelectGroup = reactExports.useCallback((groupKey) => {
|
|
@@ -64774,7 +64989,7 @@ function EventListViewInner({ events: events2, run: run2, onLoadEventData, hasMo
|
|
|
64774
64989
|
void (onLoadMoreEvents == null ? void 0 : onLoadMoreEvents());
|
|
64775
64990
|
}, itemContent: (index2) => {
|
|
64776
64991
|
const ev = sortedEvents[index2];
|
|
64777
|
-
return jsxRuntimeExports.jsx(EventRow$1, { event: ev, index: index2, isFirst: index2 === 0, isLast: index2 === sortedEvents.length - 1, isExpanded: expandedEventIds.has(ev.eventId), onToggleExpand: toggleEventExpanded, activeGroupKey, selectedGroupKey, selectedGroupRange, correlationNameMap, workflowName, durationMap, onSelectGroup, onHoverGroup, onLoadEventData, cachedEventData: eventDataCacheRef.current.get(ev.eventId) ?? null, onCacheEventData: cacheEventData, encryptionKey, onEncryptedDataDetected: handleEncryptedDataDetected, suppressGroupDimming: isExactSearchActive, showSeparateEventOccurrenceTimestamps });
|
|
64992
|
+
return jsxRuntimeExports.jsx(EventRow$1, { event: ev, index: index2, isFirst: index2 === 0, isLast: index2 === sortedEvents.length - 1, isExpanded: expandedEventIds.has(ev.eventId), onToggleExpand: toggleEventExpanded, activeGroupKey, selectedGroupKey, selectedGroupRange, correlationNameMap, workflowName, durationMap, onSelectGroup, onHoverGroup, onLoadEventData, cachedEventData: eventDataCacheRef.current.get(ev.eventId) ?? null, onCacheEventData: cacheEventData, encryptionKey, onEncryptedDataDetected: handleEncryptedDataDetected, suppressGroupDimming: isExactSearchActive, isDuplicate: duplicateEventIds.has(ev.eventId), showSeparateEventOccurrenceTimestamps });
|
|
64778
64993
|
}, style: { flex: 1, minHeight: 0 } }), jsxRuntimeExports.jsxs("div", { className: "relative flex-shrink-0 flex items-center h-10 border-t px-4 text-label-12", style: {
|
|
64779
64994
|
borderColor: "var(--ds-gray-alpha-200)",
|
|
64780
64995
|
color: "var(--ds-gray-900)",
|
|
@@ -64838,152 +65053,10 @@ function ResolveHookModal({ isOpen, onClose, onSubmit, isSubmitting = false }) {
|
|
|
64838
65053
|
if (!isOpen) {
|
|
64839
65054
|
return null;
|
|
64840
65055
|
}
|
|
64841
|
-
return jsxRuntimeExports.jsxs("div", {
|
|
64842
|
-
position: "fixed",
|
|
64843
|
-
inset: 0,
|
|
64844
|
-
zIndex: 50,
|
|
64845
|
-
display: "flex",
|
|
64846
|
-
alignItems: "center",
|
|
64847
|
-
justifyContent: "center"
|
|
64848
|
-
}, role: "dialog", "aria-modal": "true", "aria-labelledby": "resolve-hook-modal-title", children: [jsxRuntimeExports.jsx("div", { style: {
|
|
64849
|
-
position: "absolute",
|
|
64850
|
-
inset: 0,
|
|
64851
|
-
background: "rgba(0, 0, 0, 0.7)"
|
|
64852
|
-
}, onClick: isSubmitting ? void 0 : onClose }), jsxRuntimeExports.jsxs("div", { style: {
|
|
64853
|
-
position: "relative",
|
|
64854
|
-
zIndex: 10,
|
|
64855
|
-
width: 480,
|
|
64856
|
-
maxWidth: "calc(100% - 32px)",
|
|
64857
|
-
borderRadius: 12,
|
|
64858
|
-
border: "none",
|
|
64859
|
-
boxShadow: "var(--ds-shadow-menu)",
|
|
64860
|
-
background: "var(--ds-background-100)",
|
|
64861
|
-
color: "var(--ds-gray-1000)",
|
|
64862
|
-
overflow: "hidden"
|
|
64863
|
-
}, children: [jsxRuntimeExports.jsxs("div", { style: {
|
|
64864
|
-
display: "flex",
|
|
64865
|
-
alignItems: "center",
|
|
64866
|
-
justifyContent: "space-between",
|
|
64867
|
-
padding: "16px 24px"
|
|
64868
|
-
}, children: [jsxRuntimeExports.jsx("h2", { id: "resolve-hook-modal-title", style: {
|
|
64869
|
-
margin: 0,
|
|
64870
|
-
fontSize: 16,
|
|
64871
|
-
fontWeight: 600,
|
|
64872
|
-
color: "var(--ds-gray-1000)"
|
|
64873
|
-
}, children: "Resolve Hook" }), jsxRuntimeExports.jsx("button", { type: "button", onClick: onClose, disabled: isSubmitting, "aria-label": "Close modal", style: {
|
|
64874
|
-
display: "flex",
|
|
64875
|
-
alignItems: "center",
|
|
64876
|
-
justifyContent: "center",
|
|
64877
|
-
padding: 4,
|
|
64878
|
-
borderRadius: 6,
|
|
64879
|
-
border: "none",
|
|
64880
|
-
background: "transparent",
|
|
64881
|
-
color: "var(--ds-gray-900)",
|
|
64882
|
-
cursor: isSubmitting ? "not-allowed" : "pointer",
|
|
64883
|
-
opacity: isSubmitting ? 0.5 : 1,
|
|
64884
|
-
transition: "background 0.15s"
|
|
64885
|
-
}, onMouseEnter: (e) => {
|
|
64886
|
-
e.currentTarget.style.background = "var(--ds-gray-alpha-200)";
|
|
64887
|
-
}, onMouseLeave: (e) => {
|
|
64888
|
-
e.currentTarget.style.background = "transparent";
|
|
64889
|
-
}, children: jsxRuntimeExports.jsx(X$3, { style: { width: 16, height: 16 } }) })] }), jsxRuntimeExports.jsxs("form", { onSubmit: handleSubmit, children: [jsxRuntimeExports.jsxs("div", { style: { padding: "0 24px 16px" }, children: [jsxRuntimeExports.jsx("label", { htmlFor: "json-payload", style: {
|
|
64890
|
-
display: "block",
|
|
64891
|
-
fontSize: 14,
|
|
64892
|
-
fontWeight: 500,
|
|
64893
|
-
marginBottom: 6,
|
|
64894
|
-
color: "var(--ds-gray-1000)"
|
|
64895
|
-
}, children: "JSON Payload" }), jsxRuntimeExports.jsxs("p", { style: {
|
|
64896
|
-
fontSize: 13,
|
|
64897
|
-
marginBottom: 12,
|
|
64898
|
-
marginTop: 0,
|
|
64899
|
-
color: "var(--ds-gray-900)",
|
|
64900
|
-
lineHeight: 1.5
|
|
64901
|
-
}, children: ["Enter a JSON value to send to the hook. Leave empty to send", " ", jsxRuntimeExports.jsx("code", { style: {
|
|
64902
|
-
padding: "2px 6px",
|
|
64903
|
-
borderRadius: 4,
|
|
64904
|
-
fontSize: 12,
|
|
64905
|
-
fontFamily: 'var(--font-mono, ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace)',
|
|
64906
|
-
background: "var(--ds-gray-alpha-200)",
|
|
64907
|
-
color: "var(--ds-gray-1000)"
|
|
64908
|
-
}, children: "null" }), "."] }), jsxRuntimeExports.jsx("textarea", { ref: textareaRef, id: "json-payload", value: jsonInput, onChange: (e) => {
|
|
65056
|
+
return jsxRuntimeExports.jsxs("div", { className: "fixed inset-0 z-50 flex items-center justify-center", role: "dialog", "aria-modal": "true", "aria-labelledby": "resolve-hook-modal-title", children: [jsxRuntimeExports.jsx("div", { className: "absolute inset-0 bg-black/70", onClick: isSubmitting ? void 0 : onClose }), jsxRuntimeExports.jsxs("div", { className: "relative z-10 w-[480px] max-w-[calc(100%_-_32px)] overflow-hidden !border-none bg-background-100 text-gray-1000 material-menu", children: [jsxRuntimeExports.jsxs("div", { className: "flex items-center justify-between px-6 py-4", children: [jsxRuntimeExports.jsx("h2", { id: "resolve-hook-modal-title", className: "m-0 font-semibold text-base text-gray-1000", children: "Resolve Hook" }), jsxRuntimeExports.jsx("button", { type: "button", onClick: onClose, disabled: isSubmitting, "aria-label": "Close modal", className: "flex cursor-pointer items-center justify-center rounded-md !border-none !bg-transparent p-1 text-gray-900 transition-colors hover:!bg-gray-alpha-200 disabled:cursor-not-allowed disabled:opacity-50", children: jsxRuntimeExports.jsx(X$3, { className: "size-4" }) })] }), jsxRuntimeExports.jsxs("form", { onSubmit: handleSubmit, children: [jsxRuntimeExports.jsxs("div", { className: "px-6 pb-4", children: [jsxRuntimeExports.jsx("label", { htmlFor: "json-payload", className: "mb-1.5 block font-medium text-gray-1000 text-sm", children: "JSON Payload" }), jsxRuntimeExports.jsxs("p", { className: "mt-0 mb-3 text-[13px] text-gray-900 leading-[1.5]", children: ["Enter a JSON value to send to the hook. Leave empty to send", " ", jsxRuntimeExports.jsx("code", { className: "rounded bg-gray-alpha-200 px-1.5 py-0.5 font-mono text-gray-1000 text-xs", children: "null" }), "."] }), jsxRuntimeExports.jsx("textarea", { ref: textareaRef, id: "json-payload", value: jsonInput, onChange: (e) => {
|
|
64909
65057
|
setJsonInput(e.target.value);
|
|
64910
65058
|
setParseError(null);
|
|
64911
|
-
}, onKeyDown: handleKeyDown, disabled: isSubmitting, placeholder: '{"key": "value"}',
|
|
64912
|
-
width: "100%",
|
|
64913
|
-
height: 160,
|
|
64914
|
-
padding: "8px 12px",
|
|
64915
|
-
fontFamily: 'var(--font-mono, ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace)',
|
|
64916
|
-
fontSize: 13,
|
|
64917
|
-
lineHeight: 1.5,
|
|
64918
|
-
borderRadius: 8,
|
|
64919
|
-
border: `1px solid ${parseError ? "var(--ds-red-700)" : "var(--ds-gray-alpha-400)"}`,
|
|
64920
|
-
color: "var(--ds-gray-1000)",
|
|
64921
|
-
background: "var(--ds-background-100)",
|
|
64922
|
-
outline: "none",
|
|
64923
|
-
resize: "none",
|
|
64924
|
-
opacity: isSubmitting ? 0.5 : 1,
|
|
64925
|
-
cursor: isSubmitting ? "not-allowed" : "text",
|
|
64926
|
-
boxSizing: "border-box"
|
|
64927
|
-
} }), parseError && jsxRuntimeExports.jsx("p", { style: {
|
|
64928
|
-
marginTop: 8,
|
|
64929
|
-
fontSize: 13,
|
|
64930
|
-
color: "var(--ds-red-900)",
|
|
64931
|
-
margin: "8px 0 0"
|
|
64932
|
-
}, children: parseError }), jsxRuntimeExports.jsxs("p", { style: {
|
|
64933
|
-
marginTop: 8,
|
|
64934
|
-
fontSize: 12,
|
|
64935
|
-
color: "var(--ds-gray-800)",
|
|
64936
|
-
margin: "8px 0 0"
|
|
64937
|
-
}, children: ["Press", " ", jsxRuntimeExports.jsxs("kbd", { style: {
|
|
64938
|
-
padding: "2px 5px",
|
|
64939
|
-
borderRadius: 4,
|
|
64940
|
-
fontSize: 11,
|
|
64941
|
-
fontFamily: 'var(--font-mono, ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace)',
|
|
64942
|
-
background: "var(--ds-gray-alpha-200)",
|
|
64943
|
-
border: "1px solid var(--ds-gray-alpha-400)"
|
|
64944
|
-
}, children: [isMacPlatform ? "⌘" : "Ctrl", "+Enter"] }), " ", "to submit"] })] }), jsxRuntimeExports.jsxs("div", { style: {
|
|
64945
|
-
display: "flex",
|
|
64946
|
-
alignItems: "center",
|
|
64947
|
-
justifyContent: "flex-end",
|
|
64948
|
-
gap: 8,
|
|
64949
|
-
padding: "12px 24px",
|
|
64950
|
-
borderTop: "1px solid var(--ds-gray-alpha-400)"
|
|
64951
|
-
}, children: [jsxRuntimeExports.jsx("button", { type: "button", onClick: onClose, disabled: isSubmitting, style: {
|
|
64952
|
-
padding: "8px 16px",
|
|
64953
|
-
fontSize: 14,
|
|
64954
|
-
fontWeight: 500,
|
|
64955
|
-
borderRadius: 8,
|
|
64956
|
-
border: "1px solid var(--ds-gray-alpha-400)",
|
|
64957
|
-
background: "var(--ds-background-100)",
|
|
64958
|
-
color: "var(--ds-gray-1000)",
|
|
64959
|
-
cursor: isSubmitting ? "not-allowed" : "pointer",
|
|
64960
|
-
opacity: isSubmitting ? 0.5 : 1,
|
|
64961
|
-
transition: "background 0.15s"
|
|
64962
|
-
}, onMouseEnter: (e) => {
|
|
64963
|
-
e.currentTarget.style.background = "var(--ds-gray-alpha-100)";
|
|
64964
|
-
}, onMouseLeave: (e) => {
|
|
64965
|
-
e.currentTarget.style.background = "var(--ds-background-100)";
|
|
64966
|
-
}, children: "Cancel" }), jsxRuntimeExports.jsxs("button", { type: "button", onClick: () => void submitPayload(), disabled: isSubmitting, style: {
|
|
64967
|
-
display: "flex",
|
|
64968
|
-
alignItems: "center",
|
|
64969
|
-
gap: 6,
|
|
64970
|
-
padding: "8px 16px",
|
|
64971
|
-
fontSize: 14,
|
|
64972
|
-
fontWeight: 500,
|
|
64973
|
-
borderRadius: 8,
|
|
64974
|
-
border: "none",
|
|
64975
|
-
background: "var(--ds-gray-1000)",
|
|
64976
|
-
color: "var(--ds-background-100)",
|
|
64977
|
-
cursor: isSubmitting ? "not-allowed" : "pointer",
|
|
64978
|
-
opacity: isSubmitting ? 0.5 : 1,
|
|
64979
|
-
transition: "opacity 0.15s"
|
|
64980
|
-
}, onMouseEnter: (e) => {
|
|
64981
|
-
if (!isSubmitting)
|
|
64982
|
-
e.currentTarget.style.opacity = "0.9";
|
|
64983
|
-
}, onMouseLeave: (e) => {
|
|
64984
|
-
if (!isSubmitting)
|
|
64985
|
-
e.currentTarget.style.opacity = "1";
|
|
64986
|
-
}, children: [jsxRuntimeExports.jsx(Send, { style: { width: 14, height: 14 } }), isSubmitting ? "Sending..." : "Send Payload"] })] })] })] })] });
|
|
65059
|
+
}, onKeyDown: handleKeyDown, disabled: isSubmitting, placeholder: '{"key": "value"}', className: cn$4("box-border h-40 w-full resize-none rounded-lg border bg-background-100 px-3 py-2 font-mono text-[13px] text-gray-1000 leading-[1.5] outline-none disabled:cursor-not-allowed disabled:opacity-50", parseError ? "border-red-700" : "border-gray-alpha-400") }), parseError && jsxRuntimeExports.jsx("p", { className: "mt-2 mb-0 text-[13px] text-red-900", children: parseError }), jsxRuntimeExports.jsxs("p", { className: "mt-2 mb-0 text-gray-800 text-xs", children: ["Press", " ", jsxRuntimeExports.jsxs("kbd", { className: "rounded border border-gray-alpha-400 bg-gray-alpha-200 px-[5px] py-0.5 font-mono text-[11px]", children: [isMacPlatform ? "⌘" : "Ctrl", "+Enter"] }), " ", "to submit"] })] }), jsxRuntimeExports.jsxs("div", { className: "flex items-center justify-end gap-2 border-gray-alpha-400 border-t px-6 py-3", children: [jsxRuntimeExports.jsx("button", { type: "button", onClick: onClose, disabled: isSubmitting, className: "cursor-pointer rounded-lg border border-gray-alpha-400 bg-background-100 px-4 py-2 font-medium text-gray-1000 text-sm transition-colors hover:bg-gray-alpha-100 disabled:cursor-not-allowed disabled:opacity-50", children: "Cancel" }), jsxRuntimeExports.jsxs("button", { type: "button", onClick: () => void submitPayload(), disabled: isSubmitting, className: "flex cursor-pointer items-center gap-1.5 rounded-lg !border-none bg-gray-1000 px-4 py-2 font-medium text-background-100 text-sm transition-opacity hover:opacity-90 disabled:cursor-not-allowed disabled:opacity-50 disabled:hover:opacity-50", children: [jsxRuntimeExports.jsx(Send, { className: "size-3.5" }), isSubmitting ? "Sending..." : "Send Payload"] })] })] })] })] });
|
|
64987
65060
|
}
|
|
64988
65061
|
function useHookActions({ onResolve, callbacks }) {
|
|
64989
65062
|
const toast2 = useToast();
|
|
@@ -76557,7 +76630,7 @@ const knownMdxNames = /* @__PURE__ */ new Set([
|
|
|
76557
76630
|
"mdxTextExpression",
|
|
76558
76631
|
"mdxjsEsm"
|
|
76559
76632
|
]);
|
|
76560
|
-
const parseOptions = { sourceCodeLocationInfo: true, scriptingEnabled: false };
|
|
76633
|
+
const parseOptions$1 = { sourceCodeLocationInfo: true, scriptingEnabled: false };
|
|
76561
76634
|
function raw(tree, options) {
|
|
76562
76635
|
const document2 = documentMode(tree);
|
|
76563
76636
|
const one2 = zwitch("type", {
|
|
@@ -76565,7 +76638,7 @@ function raw(tree, options) {
|
|
|
76565
76638
|
unknown
|
|
76566
76639
|
});
|
|
76567
76640
|
const state = {
|
|
76568
|
-
parser: document2 ? new Parser(parseOptions) : Parser.getFragmentParser(void 0, parseOptions),
|
|
76641
|
+
parser: document2 ? new Parser(parseOptions$1) : Parser.getFragmentParser(void 0, parseOptions$1),
|
|
76569
76642
|
handle(node2) {
|
|
76570
76643
|
one2(node2, state);
|
|
76571
76644
|
},
|
|
@@ -91682,7 +91755,7 @@ var tn = f("block", "before:content-[counter(line)]", "before:inline-block", "be
|
|
|
91682
91755
|
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 });
|
|
91683
91756
|
var Se = reactExports.createContext({ code: "" }), de = () => reactExports.useContext(Se);
|
|
91684
91757
|
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 }) });
|
|
91685
|
-
var cn$1 = /\n+$/, dn = reactExports.lazy(() => import("./highlighted-body-B3W2YXNL-
|
|
91758
|
+
var cn$1 = /\n+$/, dn = reactExports.lazy(() => import("./highlighted-body-B3W2YXNL-B1Smd86a.js").then((e) => ({ default: e.HighlightedCodeBlockBody }))), rt = ({ code: e, language: t, className: o, children: n, isIncomplete: s2 = false, ...r2 }) => {
|
|
91686
91759
|
let i = reactExports.useMemo(() => e.replace(cn$1, ""), [e]), c = reactExports.useMemo(() => ({ bg: "transparent", fg: "inherit", tokens: i.split(`
|
|
91687
91760
|
`).map((a2) => [{ content: a2, color: "inherit", bgColor: "transparent", htmlStyle: {}, offset: 0 }]) }), [i]);
|
|
91688
91761
|
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 }) })] }) });
|
|
@@ -92004,7 +92077,7 @@ var Dt = ({ children: e, className: t, onDownload: o, onError: n }) => {
|
|
|
92004
92077
|
}, []), 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] });
|
|
92005
92078
|
};
|
|
92006
92079
|
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 }) })] });
|
|
92007
|
-
var Jn = reactExports.lazy(() => import("./mermaid-3ZIDBTTL-
|
|
92080
|
+
var Jn = reactExports.lazy(() => import("./mermaid-3ZIDBTTL-CwYR558N.js").then((e) => ({ default: e.Mermaid }))), Kn = /language-([^\s]+)/;
|
|
92008
92081
|
function ke(e, t) {
|
|
92009
92082
|
if (!(e != null && e.position || t != null && t.position)) return true;
|
|
92010
92083
|
if (!(e != null && e.position && (t != null && t.position))) return false;
|
|
@@ -92448,76 +92521,59 @@ var Nt = ({ chart: e, className: t, config: o, fullscreen: n = false, showContro
|
|
|
92448
92521
|
};
|
|
92449
92522
|
function ConversationView({ messages }) {
|
|
92450
92523
|
if (messages.length === 0) {
|
|
92451
|
-
return jsxRuntimeExports.jsx("div", { className: "
|
|
92524
|
+
return jsxRuntimeExports.jsx("div", { className: "py-8 text-center text-[11px] text-gray-600", children: "No messages" });
|
|
92452
92525
|
}
|
|
92453
92526
|
return jsxRuntimeExports.jsx("div", { className: "flex flex-col gap-3 p-3", children: messages.map((message2, index2) => jsxRuntimeExports.jsx(MessageBubble, { message: message2 }, index2)) });
|
|
92454
92527
|
}
|
|
92455
92528
|
function MessageBubble({ message: message2 }) {
|
|
92456
92529
|
const role = message2.role;
|
|
92457
92530
|
const parts = parseContent(message2.content);
|
|
92458
|
-
const
|
|
92459
|
-
return jsxRuntimeExports.jsxs("div", { className:
|
|
92460
|
-
backgroundColor: style2.bg,
|
|
92461
|
-
borderColor: style2.border
|
|
92462
|
-
}, children: [jsxRuntimeExports.jsx("div", { className: "px-2.5 py-1 border-b text-[10px] font-medium uppercase tracking-wide", style: {
|
|
92463
|
-
borderColor: style2.border,
|
|
92464
|
-
color: style2.label
|
|
92465
|
-
}, children: role }), jsxRuntimeExports.jsx("div", { className: "px-2.5 py-2 space-y-2", children: parts.map((part, i) => jsxRuntimeExports.jsx(ContentPart, { part, role }, i)) })] });
|
|
92531
|
+
const roleClasses = getRoleClasses(role);
|
|
92532
|
+
return jsxRuntimeExports.jsxs("div", { className: `rounded-md border text-[11px] ${roleClasses.bubble}`, children: [jsxRuntimeExports.jsx("div", { className: `border-b px-2.5 py-1 font-medium text-[10px] uppercase tracking-wide ${roleClasses.label}`, children: role }), jsxRuntimeExports.jsx("div", { className: "px-2.5 py-2 space-y-2", children: parts.map((part, i) => jsxRuntimeExports.jsx(ContentPart, { part, role }, i)) })] });
|
|
92466
92533
|
}
|
|
92467
92534
|
function ContentPart({ part, role }) {
|
|
92468
92535
|
if (part.type === "text") {
|
|
92469
92536
|
if (!part.text)
|
|
92470
92537
|
return null;
|
|
92471
92538
|
if (role === "assistant") {
|
|
92472
|
-
return jsxRuntimeExports.jsx("div", { className: "prose prose-sm max-w-none text-[11px] [&>*:first-child]:mt-0 [&>*:last-child]:mb-0",
|
|
92539
|
+
return jsxRuntimeExports.jsx("div", { className: "prose prose-sm max-w-none text-[11px] text-gray-1000 [&>*:first-child]:mt-0 [&>*:last-child]:mb-0", children: jsxRuntimeExports.jsx(_r, { children: part.text }) });
|
|
92473
92540
|
}
|
|
92474
|
-
return jsxRuntimeExports.jsx("div", { className: "whitespace-pre-wrap break-words
|
|
92541
|
+
return jsxRuntimeExports.jsx("div", { className: "whitespace-pre-wrap break-words text-gray-1000", children: part.text });
|
|
92475
92542
|
}
|
|
92476
92543
|
if (part.type === "tool-call") {
|
|
92477
|
-
return jsxRuntimeExports.jsxs("div", { className: "rounded border px-2 py-1.5",
|
|
92478
|
-
backgroundColor: "var(--ds-purple-100)",
|
|
92479
|
-
borderColor: "var(--ds-purple-300)"
|
|
92480
|
-
}, children: [jsxRuntimeExports.jsxs("div", { className: "flex items-center gap-1.5 text-[10px] font-medium", children: [jsxRuntimeExports.jsx("span", { children: "🔧" }), jsxRuntimeExports.jsx("span", { style: { color: "var(--ds-purple-900)" }, children: part.toolName })] }), part.input != null && jsxRuntimeExports.jsx("div", { className: "mt-1.5 overflow-x-auto p-1.5 rounded", style: { backgroundColor: "var(--ds-gray-100)" }, children: typeof part.input === "string" ? jsxRuntimeExports.jsx("pre", { className: "text-[10px]", style: { color: "var(--ds-gray-800)" }, children: part.input }) : jsxRuntimeExports.jsx(DataInspector, { data: part.input }) })] });
|
|
92544
|
+
return jsxRuntimeExports.jsxs("div", { className: "rounded border border-purple-300 bg-purple-100 px-2 py-1.5", children: [jsxRuntimeExports.jsxs("div", { className: "flex items-center gap-1.5 text-[10px] font-medium", children: [jsxRuntimeExports.jsx("span", { children: "🔧" }), jsxRuntimeExports.jsx("span", { className: "text-purple-900", children: part.toolName })] }), part.input != null && jsxRuntimeExports.jsx("div", { className: "mt-1.5 overflow-x-auto rounded bg-gray-100 p-1.5", children: typeof part.input === "string" ? jsxRuntimeExports.jsx("pre", { className: "text-[10px] text-gray-800", children: part.input }) : jsxRuntimeExports.jsx(DataInspector, { data: part.input }) })] });
|
|
92481
92545
|
}
|
|
92482
92546
|
if (part.type === "tool-result") {
|
|
92483
|
-
return jsxRuntimeExports.jsxs("div", { className: "rounded border px-2 py-1.5",
|
|
92484
|
-
backgroundColor: "var(--ds-green-100)",
|
|
92485
|
-
borderColor: "var(--ds-green-300)"
|
|
92486
|
-
}, children: [jsxRuntimeExports.jsxs("div", { className: "flex items-center gap-1.5 text-[10px] font-medium", children: [jsxRuntimeExports.jsx("span", { children: "✓" }), jsxRuntimeExports.jsxs("span", { style: { color: "var(--ds-green-900)" }, children: [part.toolName, " result"] })] }), part.output != null && jsxRuntimeExports.jsx("div", { className: "mt-1.5 overflow-x-auto max-h-[200px] overflow-y-auto p-1.5 rounded", style: { backgroundColor: "var(--ds-gray-100)" }, children: typeof part.output === "string" ? jsxRuntimeExports.jsx("pre", { className: "text-[10px]", style: { color: "var(--ds-gray-800)" }, children: part.output }) : jsxRuntimeExports.jsx(DataInspector, { data: part.output, expandLevel: 1 }) })] });
|
|
92547
|
+
return jsxRuntimeExports.jsxs("div", { className: "rounded border border-green-300 bg-green-100 px-2 py-1.5", children: [jsxRuntimeExports.jsxs("div", { className: "flex items-center gap-1.5 text-[10px] font-medium", children: [jsxRuntimeExports.jsx("span", { children: "✓" }), jsxRuntimeExports.jsxs("span", { className: "text-green-900", children: [part.toolName, " result"] })] }), part.output != null && jsxRuntimeExports.jsx("div", { className: "mt-1.5 max-h-[200px] overflow-x-auto overflow-y-auto rounded bg-gray-100 p-1.5", children: typeof part.output === "string" ? jsxRuntimeExports.jsx("pre", { className: "text-[10px] text-gray-800", children: part.output }) : jsxRuntimeExports.jsx(DataInspector, { data: part.output, expandLevel: 1 }) })] });
|
|
92487
92548
|
}
|
|
92488
92549
|
return null;
|
|
92489
92550
|
}
|
|
92490
|
-
function
|
|
92551
|
+
function getRoleClasses(role) {
|
|
92491
92552
|
switch (role) {
|
|
92492
92553
|
case "user":
|
|
92493
92554
|
return {
|
|
92494
|
-
|
|
92495
|
-
|
|
92496
|
-
label: "var(--ds-blue-700)"
|
|
92555
|
+
bubble: "border-blue-300 bg-blue-100",
|
|
92556
|
+
label: "border-blue-300 text-blue-700"
|
|
92497
92557
|
};
|
|
92498
92558
|
case "assistant":
|
|
92499
92559
|
return {
|
|
92500
|
-
|
|
92501
|
-
|
|
92502
|
-
label: "var(--ds-gray-700)"
|
|
92560
|
+
bubble: "border-gray-300 bg-gray-100",
|
|
92561
|
+
label: "border-gray-300 text-gray-700"
|
|
92503
92562
|
};
|
|
92504
92563
|
case "system":
|
|
92505
92564
|
return {
|
|
92506
|
-
|
|
92507
|
-
|
|
92508
|
-
label: "var(--ds-amber-700)"
|
|
92565
|
+
bubble: "border-amber-300 bg-amber-100",
|
|
92566
|
+
label: "border-amber-300 text-amber-700"
|
|
92509
92567
|
};
|
|
92510
92568
|
case "tool":
|
|
92511
92569
|
return {
|
|
92512
|
-
|
|
92513
|
-
|
|
92514
|
-
label: "var(--ds-green-700)"
|
|
92570
|
+
bubble: "border-green-300 bg-green-100",
|
|
92571
|
+
label: "border-green-300 text-green-700"
|
|
92515
92572
|
};
|
|
92516
92573
|
default:
|
|
92517
92574
|
return {
|
|
92518
|
-
|
|
92519
|
-
|
|
92520
|
-
label: "var(--ds-gray-700)"
|
|
92575
|
+
bubble: "border-gray-300 bg-gray-100",
|
|
92576
|
+
label: "border-gray-300 text-gray-700"
|
|
92521
92577
|
};
|
|
92522
92578
|
}
|
|
92523
92579
|
}
|
|
@@ -92568,13 +92624,13 @@ function useSidebarDataOptional() {
|
|
|
92568
92624
|
return reactExports.useContext(SidebarDataContext);
|
|
92569
92625
|
}
|
|
92570
92626
|
const STREAM_SKELETON_ROWS = [
|
|
92571
|
-
{ id: "stream-skeleton-row-1",
|
|
92572
|
-
{ id: "stream-skeleton-row-2",
|
|
92573
|
-
{ id: "stream-skeleton-row-3",
|
|
92574
|
-
{ id: "stream-skeleton-row-4",
|
|
92627
|
+
{ id: "stream-skeleton-row-1", widthClassName: "w-[72%]" },
|
|
92628
|
+
{ id: "stream-skeleton-row-2", widthClassName: "w-[58%]" },
|
|
92629
|
+
{ id: "stream-skeleton-row-3", widthClassName: "w-4/5" },
|
|
92630
|
+
{ id: "stream-skeleton-row-4", widthClassName: "w-[64%]" }
|
|
92575
92631
|
];
|
|
92576
92632
|
function StreamViewerSkeleton() {
|
|
92577
|
-
return jsxRuntimeExports.jsxs("output", { "aria-busy": "true", "aria-label": "Loading stream", className: "flex h-full min-h-0 w-full flex-col overflow-hidden bg-background-100", children: [jsxRuntimeExports.jsx("span", { className: "sr-only", children: "Loading stream…" }), jsxRuntimeExports.jsx("div", { className: "flex h-10 min-h-10 items-center border-b border-gray-alpha-400 px-3", children: jsxRuntimeExports.jsx(Skeleton$1, { className: "h-3 w-10" }) }), jsxRuntimeExports.jsx("div", { className: "flex flex-col", children: STREAM_SKELETON_ROWS.map((row) => jsxRuntimeExports.jsxs("div", { className: "flex h-10 items-center gap-2 border-b border-gray-alpha-400 px-3", children: [jsxRuntimeExports.jsx(Skeleton$1, { className:
|
|
92633
|
+
return jsxRuntimeExports.jsxs("output", { "aria-busy": "true", "aria-label": "Loading stream", className: "flex h-full min-h-0 w-full flex-col overflow-hidden bg-background-100", children: [jsxRuntimeExports.jsx("span", { className: "sr-only", children: "Loading stream…" }), jsxRuntimeExports.jsx("div", { className: "flex h-10 min-h-10 items-center border-b border-gray-alpha-400 px-3", children: jsxRuntimeExports.jsx(Skeleton$1, { className: "h-3 w-10" }) }), jsxRuntimeExports.jsx("div", { className: "flex flex-col", children: STREAM_SKELETON_ROWS.map((row) => jsxRuntimeExports.jsxs("div", { className: "flex h-10 items-center gap-2 border-b border-gray-alpha-400 px-3", children: [jsxRuntimeExports.jsx(Skeleton$1, { className: `h-3 ${row.widthClassName}` }), jsxRuntimeExports.jsx(Skeleton$1, { className: "h-4 w-4 shrink-0 rounded-sm" })] }, row.id)) })] });
|
|
92578
92634
|
}
|
|
92579
92635
|
const ChunkRow = ReactExports.memo(function ChunkRow2({ chunk }) {
|
|
92580
92636
|
return jsxRuntimeExports.jsxs("div", { className: "flex w-full items-start gap-1 border-b border-gray-alpha-400 px-3 py-2", children: [jsxRuntimeExports.jsx("div", { className: "min-w-0 flex-1", children: typeof chunk.value === "string" ? jsxRuntimeExports.jsx("span", { className: "whitespace-pre-wrap break-words text-label-12 font-mono text-gray-1000", children: chunk.value }) : jsxRuntimeExports.jsx(DataInspector, { data: chunk.value, expandLevel: 1 }) }), jsxRuntimeExports.jsx(CopyButton, { copyText: serializeForClipboard(chunk.value), ariaLabel: "Copy chunk", className: "shrink-0 -mr-1 [&>div]:h-4 [&>div]:w-4 [&_svg]:h-4 [&_svg]:w-4" })] });
|
|
@@ -92595,7 +92651,7 @@ function StreamViewer({ streamId: _streamId, chunks, isLive, error: error2, isLo
|
|
|
92595
92651
|
if (isLoading && chunks.length === 0) {
|
|
92596
92652
|
return jsxRuntimeExports.jsx(StreamViewerSkeleton, {});
|
|
92597
92653
|
}
|
|
92598
|
-
return jsxRuntimeExports.jsxs("div", { className: "flex h-full w-full flex-col overflow-hidden bg-background-100", children: [jsxRuntimeExports.jsx("div", { className: "flex h-10 min-h-10 items-center gap-1.5 border-b border-gray-alpha-400 px-3", children: isLive && jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [jsxRuntimeExports.jsx("span", { className: "inline-block h-2 w-2 rounded-full bg-green-600" }), jsxRuntimeExports.jsx("span", { className: "text-label-12 text-green-700", children: "Live" })] }) }), jsxRuntimeExports.jsx("div", { className: "flex-1 min-h-0", children: error2 ? jsxRuntimeExports.jsxs("div", { className: "border-b border-red-400 bg-red-100 px-3 py-2 text-label-12 text-red-900", children: [jsxRuntimeExports.jsx("div", { children: "Error reading stream:" }), jsxRuntimeExports.jsx("div", { children: error2 })] }) : chunks.length === 0 ? jsxRuntimeExports.jsx("div", { className: "flex h-10 items-center border-b border-gray-alpha-400 bg-background-200 px-3 text-label-12 text-gray-900", children: isLive ? "Waiting for stream data..." : "Stream is empty" }) : jsxRuntimeExports.jsx(Yr, { ref: virtuosoRef, totalCount: chunks.length, overscan: 10, endReached: () => onScrollEnd == null ? void 0 : onScrollEnd(), itemContent: (index2) => jsxRuntimeExports.jsx("div", { className: "w-full", children: jsxRuntimeExports.jsx(ChunkRow, { chunk: chunks[index2] }) }),
|
|
92654
|
+
return jsxRuntimeExports.jsxs("div", { className: "flex h-full w-full flex-col overflow-hidden bg-background-100", children: [jsxRuntimeExports.jsx("div", { className: "flex h-10 min-h-10 items-center gap-1.5 border-b border-gray-alpha-400 px-3", children: isLive && jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [jsxRuntimeExports.jsx("span", { className: "inline-block h-2 w-2 rounded-full bg-green-600" }), jsxRuntimeExports.jsx("span", { className: "text-label-12 text-green-700", children: "Live" })] }) }), jsxRuntimeExports.jsx("div", { className: "flex-1 min-h-0", children: error2 ? jsxRuntimeExports.jsxs("div", { className: "border-b border-red-400 bg-red-100 px-3 py-2 text-label-12 text-red-900", children: [jsxRuntimeExports.jsx("div", { children: "Error reading stream:" }), jsxRuntimeExports.jsx("div", { children: error2 })] }) : chunks.length === 0 ? jsxRuntimeExports.jsx("div", { className: "flex h-10 items-center border-b border-gray-alpha-400 bg-background-200 px-3 text-label-12 text-gray-900", children: isLive ? "Waiting for stream data..." : "Stream is empty" }) : jsxRuntimeExports.jsx(Yr, { ref: virtuosoRef, totalCount: chunks.length, overscan: 10, endReached: () => onScrollEnd == null ? void 0 : onScrollEnd(), itemContent: (index2) => jsxRuntimeExports.jsx("div", { className: "w-full", children: jsxRuntimeExports.jsx(ChunkRow, { chunk: chunks[index2] }) }), className: "min-h-0 flex-1" }) })] });
|
|
92599
92655
|
}
|
|
92600
92656
|
function shouldShowVerticalLine(eventType) {
|
|
92601
92657
|
if (isHookLifecycleEventType(eventType)) {
|
|
@@ -92988,9 +93044,13 @@ function cascadeSpans(runSpan, spans) {
|
|
|
92988
93044
|
};
|
|
92989
93045
|
});
|
|
92990
93046
|
}
|
|
92991
|
-
function buildTrace(run2, events2, now2) {
|
|
92992
|
-
const
|
|
92993
|
-
|
|
93047
|
+
function buildTrace(run2, events2, now2, { isCompleteHistory = false } = {}) {
|
|
93048
|
+
const duplicateEventIds = findDuplicateEventIds(events2, {
|
|
93049
|
+
isCompleteHistory
|
|
93050
|
+
});
|
|
93051
|
+
const actedOnEvents = duplicateEventIds.size === 0 ? events2 : events2.filter((event) => !duplicateEventIds.has(event.eventId));
|
|
93052
|
+
const groupedEvents = groupEventsByCorrelation(actedOnEvents);
|
|
93053
|
+
const latestKnownTime = computeLatestKnownTime(actedOnEvents, run2);
|
|
92994
93054
|
const { runSpan, spans } = buildSpans(run2, groupedEvents, now2, latestKnownTime);
|
|
92995
93055
|
const sortedCascadingSpans = cascadeSpans(runSpan, spans);
|
|
92996
93056
|
const traceStartMs = otelTimeToMs(runSpan.startTime);
|
|
@@ -93007,34 +93067,72 @@ function buildTrace(run2, events2, now2) {
|
|
|
93007
93067
|
}
|
|
93008
93068
|
}
|
|
93009
93069
|
],
|
|
93010
|
-
knownDurationMs: Math.max(0, knownDurationMs)
|
|
93070
|
+
knownDurationMs: Math.max(0, knownDurationMs),
|
|
93071
|
+
duplicateEventIds
|
|
93011
93072
|
};
|
|
93012
93073
|
}
|
|
93013
|
-
const GUTTER_PX = 1;
|
|
93014
|
-
const MIN_PX = 50;
|
|
93015
|
-
const DEFAULT_START_PX = 340;
|
|
93016
|
-
function paneColTemplate(startPx) {
|
|
93017
|
-
return `${startPx}px ${GUTTER_PX}px minmax(${MIN_PX}px, 1fr)`;
|
|
93018
|
-
}
|
|
93019
|
-
const COL_TEMPLATE = paneColTemplate(DEFAULT_START_PX);
|
|
93020
93074
|
const ROWS = [
|
|
93021
|
-
{
|
|
93022
|
-
|
|
93023
|
-
|
|
93024
|
-
|
|
93025
|
-
|
|
93026
|
-
|
|
93027
|
-
|
|
93028
|
-
{
|
|
93075
|
+
{
|
|
93076
|
+
id: "r0",
|
|
93077
|
+
nameClassName: "w-[62%]",
|
|
93078
|
+
offsetClassName: "left-0",
|
|
93079
|
+
barClassName: "w-[72%]",
|
|
93080
|
+
topClassName: "top-0"
|
|
93081
|
+
},
|
|
93082
|
+
{
|
|
93083
|
+
id: "r1",
|
|
93084
|
+
nameClassName: "w-[78%]",
|
|
93085
|
+
offsetClassName: "left-[6%]",
|
|
93086
|
+
barClassName: "w-[48%]",
|
|
93087
|
+
topClassName: "top-[3.5px]"
|
|
93088
|
+
},
|
|
93089
|
+
{
|
|
93090
|
+
id: "r2",
|
|
93091
|
+
nameClassName: "w-1/2",
|
|
93092
|
+
offsetClassName: "left-[10%]",
|
|
93093
|
+
barClassName: "w-[55%]",
|
|
93094
|
+
topClassName: "top-[7px]"
|
|
93095
|
+
},
|
|
93096
|
+
{
|
|
93097
|
+
id: "r3",
|
|
93098
|
+
nameClassName: "w-[84%]",
|
|
93099
|
+
offsetClassName: "left-[18%]",
|
|
93100
|
+
barClassName: "w-[30%]",
|
|
93101
|
+
topClassName: "top-[10.5px]"
|
|
93102
|
+
},
|
|
93103
|
+
{
|
|
93104
|
+
id: "r4",
|
|
93105
|
+
nameClassName: "w-[45%]",
|
|
93106
|
+
offsetClassName: "left-[18%]",
|
|
93107
|
+
barClassName: "w-[42%]",
|
|
93108
|
+
topClassName: "top-[14px]"
|
|
93109
|
+
},
|
|
93110
|
+
{
|
|
93111
|
+
id: "r5",
|
|
93112
|
+
nameClassName: "w-[66%]",
|
|
93113
|
+
offsetClassName: "left-[34%]",
|
|
93114
|
+
barClassName: "w-[38%]",
|
|
93115
|
+
topClassName: "top-[17.5px]"
|
|
93116
|
+
},
|
|
93117
|
+
{
|
|
93118
|
+
id: "r6",
|
|
93119
|
+
nameClassName: "w-[55%]",
|
|
93120
|
+
offsetClassName: "left-[41%]",
|
|
93121
|
+
barClassName: "w-1/4",
|
|
93122
|
+
topClassName: "top-[21px]"
|
|
93123
|
+
},
|
|
93124
|
+
{
|
|
93125
|
+
id: "r7",
|
|
93126
|
+
nameClassName: "w-2/5",
|
|
93127
|
+
offsetClassName: "left-1/2",
|
|
93128
|
+
barClassName: "w-[30%]",
|
|
93129
|
+
topClassName: "top-[24.5px]"
|
|
93130
|
+
}
|
|
93029
93131
|
];
|
|
93030
93132
|
const HEADER_MARKERS = ["m0", "m1", "m2", "m3"];
|
|
93031
93133
|
const HeaderDivider = () => jsxRuntimeExports.jsx("div", { className: "flex justify-center", children: jsxRuntimeExports.jsx("span", { "aria-hidden": true, className: "h-full w-px bg-gray-alpha-400" }) });
|
|
93032
93134
|
function TraceViewerSkeleton() {
|
|
93033
|
-
return jsxRuntimeExports.jsxs("output", { "aria-busy": "true", "aria-label": "Loading trace", className: "flex flex-col w-full h-full min-h-0 bg-background-100", children: [jsxRuntimeExports.jsx("span", { className: "sr-only", children: "Loading trace…" }), jsxRuntimeExports.jsx("div", { className: "relative h-10 min-h-10 shrink-0 border-b border-gray-alpha-400", children: jsxRuntimeExports.jsx("div", { className: "absolute inset-x-4 top-[6px]", children: ROWS.map((row,
|
|
93034
|
-
left: `${row.off}%`,
|
|
93035
|
-
width: `${row.bar}%`,
|
|
93036
|
-
top: index2 * 3.5
|
|
93037
|
-
} }, row.id)) }) }), jsxRuntimeExports.jsxs("div", { className: "shrink-0 grid", style: { gridTemplateColumns: COL_TEMPLATE }, children: [jsxRuntimeExports.jsxs("div", { className: "h-10 min-h-10 flex items-center border-b border-gray-alpha-400 pl-4 pr-2 gap-1.5", children: [jsxRuntimeExports.jsx(Skeleton$1, { className: "w-3.5 h-3.5 shrink-0 rounded-sm" }), jsxRuntimeExports.jsx(Skeleton$1, { className: "h-3.5 w-40" })] }), jsxRuntimeExports.jsx(HeaderDivider, {}), jsxRuntimeExports.jsx("div", { className: "h-10 min-h-10 flex items-end border-b border-gray-alpha-400 px-4 pb-1 gap-2", children: jsxRuntimeExports.jsx("div", { className: "relative flex-1 flex items-end justify-between", children: HEADER_MARKERS.map((id2) => jsxRuntimeExports.jsx(Skeleton$1, { className: "h-3.5 w-9" }, id2)) }) })] }), jsxRuntimeExports.jsxs("div", { className: "grid flex-1 min-h-0 overflow-hidden", style: { gridTemplateColumns: COL_TEMPLATE }, children: [jsxRuntimeExports.jsx("div", { className: "block overflow-visible", children: jsxRuntimeExports.jsx("ul", { className: "block divide-y divide-gray-alpha-400 border-b border-gray-alpha-400", children: ROWS.map((row) => jsxRuntimeExports.jsxs("li", { className: "h-10 flex items-center pl-4 pr-2", children: [jsxRuntimeExports.jsxs("div", { className: "flex min-w-0 flex-1 items-center gap-2", children: [jsxRuntimeExports.jsx(Skeleton$1, { className: "w-4 h-4 shrink-0 rounded-sm" }), jsxRuntimeExports.jsx(Skeleton$1, { className: "h-3.5", style: { width: `${row.name}%` } })] }), jsxRuntimeExports.jsx(Skeleton$1, { className: "ml-2 h-3.5 w-10 shrink-0" })] }, row.id)) }) }), jsxRuntimeExports.jsx("span", { "aria-hidden": true, className: "h-full w-px bg-gray-alpha-400" }), jsxRuntimeExports.jsx("div", { className: "relative min-h-0", children: ROWS.map((row) => jsxRuntimeExports.jsx("div", { className: "relative h-10", children: jsxRuntimeExports.jsx("div", { className: "absolute inset-x-4 inset-y-0", children: jsxRuntimeExports.jsx(Skeleton$1, { className: "absolute top-1/2 -translate-y-1/2 h-6 rounded-[0.25rem]", style: { left: `${row.off}%`, width: `${row.bar}%` } }) }) }, row.id)) })] })] });
|
|
93135
|
+
return jsxRuntimeExports.jsxs("output", { "aria-busy": "true", "aria-label": "Loading trace", className: "flex flex-col w-full h-full min-h-0 bg-background-100", children: [jsxRuntimeExports.jsx("span", { className: "sr-only", children: "Loading trace…" }), jsxRuntimeExports.jsx("div", { className: "relative h-10 min-h-10 shrink-0 border-b border-gray-alpha-400", children: jsxRuntimeExports.jsx("div", { className: "absolute inset-x-4 top-[6px]", children: ROWS.map((row) => jsxRuntimeExports.jsx(Skeleton$1, { className: `absolute h-[3px] rounded-full ${row.offsetClassName} ${row.barClassName} ${row.topClassName}` }, row.id)) }) }), jsxRuntimeExports.jsxs("div", { className: "grid shrink-0 grid-cols-[340px_1px_minmax(50px,1fr)]", children: [jsxRuntimeExports.jsxs("div", { className: "h-10 min-h-10 flex items-center border-b border-gray-alpha-400 pl-4 pr-2 gap-1.5", children: [jsxRuntimeExports.jsx(Skeleton$1, { className: "w-3.5 h-3.5 shrink-0 rounded-sm" }), jsxRuntimeExports.jsx(Skeleton$1, { className: "h-3.5 w-40" })] }), jsxRuntimeExports.jsx(HeaderDivider, {}), jsxRuntimeExports.jsx("div", { className: "h-10 min-h-10 flex items-end border-b border-gray-alpha-400 px-4 pb-1 gap-2", children: jsxRuntimeExports.jsx("div", { className: "relative flex-1 flex items-end justify-between", children: HEADER_MARKERS.map((id2) => jsxRuntimeExports.jsx(Skeleton$1, { className: "h-3.5 w-9" }, id2)) }) })] }), jsxRuntimeExports.jsxs("div", { className: "grid min-h-0 flex-1 grid-cols-[340px_1px_minmax(50px,1fr)] overflow-hidden", children: [jsxRuntimeExports.jsx("div", { className: "block overflow-visible", children: jsxRuntimeExports.jsx("ul", { className: "block divide-y divide-gray-alpha-400 border-b border-gray-alpha-400", children: ROWS.map((row) => jsxRuntimeExports.jsxs("li", { className: "h-10 flex items-center pl-4 pr-2", children: [jsxRuntimeExports.jsxs("div", { className: "flex min-w-0 flex-1 items-center gap-2", children: [jsxRuntimeExports.jsx(Skeleton$1, { className: "w-4 h-4 shrink-0 rounded-sm" }), jsxRuntimeExports.jsx(Skeleton$1, { className: `h-3.5 ${row.nameClassName}` })] }), jsxRuntimeExports.jsx(Skeleton$1, { className: "ml-2 h-3.5 w-10 shrink-0" })] }, row.id)) }) }), jsxRuntimeExports.jsx("span", { "aria-hidden": true, className: "h-full w-px bg-gray-alpha-400" }), jsxRuntimeExports.jsx("div", { className: "relative min-h-0", children: ROWS.map((row) => jsxRuntimeExports.jsx("div", { className: "relative h-10", children: jsxRuntimeExports.jsx("div", { className: "absolute inset-x-4 inset-y-0", children: jsxRuntimeExports.jsx(Skeleton$1, { className: `absolute top-1/2 h-6 -translate-y-1/2 rounded-[0.25rem] ${row.offsetClassName} ${row.barClassName}` }) }) }, row.id)) })] })] });
|
|
93038
93136
|
}
|
|
93039
93137
|
function useIntersectionObserver(elementRef, { threshold = 0, rootRef, rootMargin = "0%", freezeOnceVisible = false } = {}) {
|
|
93040
93138
|
const [entry2, setEntry] = reactExports.useState();
|
|
@@ -93114,11 +93212,6 @@ const kbdVariants = cva("inline-flex items-center justify-center rounded px-1 te
|
|
|
93114
93212
|
function Kbd({ children: children2, className, variant, size: size2, ...props }) {
|
|
93115
93213
|
return jsxRuntimeExports.jsx("kbd", { className: cn$4(kbdVariants({ variant, size: size2, className })), ...props, children: children2 });
|
|
93116
93214
|
}
|
|
93117
|
-
const TooltipProvider = Provider$2;
|
|
93118
|
-
const Tooltip$1 = Root3$1;
|
|
93119
|
-
const TooltipTrigger$1 = Trigger$4;
|
|
93120
|
-
const TooltipContent$1 = reactExports.forwardRef(({ className, sideOffset = 8, showArrow = true, children: children2, ...props }, ref) => jsxRuntimeExports.jsx(Portal$6, { children: jsxRuntimeExports.jsxs(Content2$4, { ref, sideOffset, className: cn$4("z-[99999] flex items-center gap-1 rounded-[10px] bg-gray-1000 px-2 py-1.5 !text-label-13 text-background-100 shadow-md select-none", className), ...props, children: [children2, showArrow ? jsxRuntimeExports.jsx(Arrow2$1, { width: 11, height: 5, className: "fill-gray-1000" }) : null] }) }));
|
|
93121
|
-
TooltipContent$1.displayName = Content2$4.displayName;
|
|
93122
93215
|
const millisecondsInWeek = 6048e5;
|
|
93123
93216
|
const millisecondsInDay = 864e5;
|
|
93124
93217
|
const millisecondsInMinute = 6e4;
|
|
@@ -95210,7 +95303,7 @@ const formatEventTimestamp = (date2) => date2.toLocaleString(void 0, {
|
|
|
95210
95303
|
fractionalSecondDigits: 3,
|
|
95211
95304
|
timeZoneName: "short"
|
|
95212
95305
|
});
|
|
95213
|
-
function EventItem({ event, onLoadEventData, encryptionKey, showSeparateEventOccurrenceTimestamps = false }) {
|
|
95306
|
+
function EventItem({ event, onLoadEventData, encryptionKey, showSeparateEventOccurrenceTimestamps = false, isDuplicate = false }) {
|
|
95214
95307
|
const [loadedData, setLoadedData] = reactExports.useState(null);
|
|
95215
95308
|
const [isLoading, setIsLoading] = reactExports.useState(false);
|
|
95216
95309
|
const [loadError, setLoadError] = reactExports.useState(null);
|
|
@@ -95262,7 +95355,7 @@ function EventItem({ event, onLoadEventData, encryptionKey, showSeparateEventOcc
|
|
|
95262
95355
|
return jsxRuntimeExports.jsxs(CollapsibleRoot, { variant: "card", onOpenChange: canHaveData ? (open2) => {
|
|
95263
95356
|
if (open2)
|
|
95264
95357
|
handleExpand();
|
|
95265
|
-
} : void 0, children: [jsxRuntimeExports.jsx(CollapsibleTrigger, { className: "px-3 py-2", children: jsxRuntimeExports.jsxs("div", { className: "flex w-full items-center justify-between gap-3", children: [jsxRuntimeExports.jsx("span", { className:
|
|
95358
|
+
} : void 0, children: [jsxRuntimeExports.jsx(CollapsibleTrigger, { className: "px-3 py-2", children: jsxRuntimeExports.jsxs("div", { className: "flex w-full items-center justify-between gap-3", children: [jsxRuntimeExports.jsx(DuplicateEventTooltip, { isDuplicate, children: jsxRuntimeExports.jsx("span", { className: `text-label-12 font-mono ${isDuplicate ? "text-gray-700" : "text-gray-1000"}`, children: event.eventType }) }), jsxRuntimeExports.jsx("span", { className: "shrink-0 text-label-13 text-gray-900", children: displayedCreatedAtTime })] }) }), jsxRuntimeExports.jsxs(CollapsibleContent, { children: [jsxRuntimeExports.jsxs("div", { className: "flex flex-col bg-background-200 [&:has(+_*)]:border-b [&:has(+_*)]:border-gray-alpha-400", children: [showSeparateEventOccurrenceTimestamps && occurredAt && jsxRuntimeExports.jsxs("div", { className: "flex items-center justify-between gap-2 py-2 px-3", children: [jsxRuntimeExports.jsx("span", { className: "text-label-12 text-gray-900", children: "Occurred" }), jsxRuntimeExports.jsx(TimestampTooltip, { date: occurredAt, children: jsxRuntimeExports.jsx("span", { className: "max-w-[70%] truncate text-right text-label-12 font-mono", children: formatEventTimestamp(occurredAt) }) })] }), jsxRuntimeExports.jsxs("div", { className: "flex items-center justify-between gap-2 py-2 px-3", children: [jsxRuntimeExports.jsx("span", { className: "text-label-12 text-gray-900", children: "Event ID" }), jsxRuntimeExports.jsx("span", { className: "max-w-[70%] truncate text-right text-label-12 font-mono", children: event.eventId })] }), event.correlationId && jsxRuntimeExports.jsxs("div", { className: "flex items-center justify-between gap-2 py-2 px-3", children: [jsxRuntimeExports.jsx("span", { className: "text-label-12 text-gray-900", children: "Correlation ID" }), jsxRuntimeExports.jsx("span", { className: "max-w-[70%] truncate text-right text-label-12 font-mono", children: event.correlationId })] })] }), isLoading && jsxRuntimeExports.jsxs("div", { className: "p-3", children: [jsxRuntimeExports.jsx(Skeleton$1, { className: "h-4 w-[35%]" }), jsxRuntimeExports.jsx(Skeleton$1, { className: "mt-2 h-4 w-[90%]" }), jsxRuntimeExports.jsx(Skeleton$1, { className: "mt-2 h-4 w-[75%]" })] }), loadError && jsxRuntimeExports.jsx(ErrorCard, { title: "Failed to load event data", details: loadError, className: "mt-2" }), displayPayload != null && jsxRuntimeExports.jsx("div", { className: "[&>div]:border-none [&>div]:rounded-none", children: jsxRuntimeExports.jsx(EventDataBlock, { eventType: event.eventType, data: displayPayload }) })] })] });
|
|
95266
95359
|
}
|
|
95267
95360
|
function hasOnlyExpiredFields(data, eventType) {
|
|
95268
95361
|
if (data === null || typeof data !== "object" || Array.isArray(data)) {
|
|
@@ -95298,13 +95391,13 @@ function EventDataBlock({ eventType, data }) {
|
|
|
95298
95391
|
}
|
|
95299
95392
|
return jsxRuntimeExports.jsx(CopyableDataBlock, { data });
|
|
95300
95393
|
}
|
|
95301
|
-
function EventsList({ events: events2, isLoading = false, error: error2, onLoadEventData, onStreamClick, onRunClick, encryptionKey, showSeparateEventOccurrenceTimestamps = false }) {
|
|
95394
|
+
function EventsList({ events: events2, isLoading = false, error: error2, onLoadEventData, onStreamClick, onRunClick, encryptionKey, showSeparateEventOccurrenceTimestamps = false, duplicateEventIds }) {
|
|
95302
95395
|
const sortedEvents = reactExports.useMemo(() => [...events2].sort((a2, b2) => getEffectiveEventDate(a2).getTime() - getEffectiveEventDate(b2).getTime()), [events2]);
|
|
95303
95396
|
const hasEvents = sortedEvents.length > 0 && !error2;
|
|
95304
95397
|
if (!hasEvents && !isLoading) {
|
|
95305
95398
|
return jsxRuntimeExports.jsx(Collapsible, { label: "Events", disabled: true });
|
|
95306
95399
|
}
|
|
95307
|
-
return jsxRuntimeExports.jsx(RunClickContext.Provider, { value: onRunClick, children: jsxRuntimeExports.jsx(StreamClickContext.Provider, { value: onStreamClick, children: jsxRuntimeExports.jsxs(CollapsibleRoot, { defaultOpen: true, children: [jsxRuntimeExports.jsx(CollapsibleTrigger, { children: "Events" }), jsxRuntimeExports.jsx(CollapsibleContent, { className: "mb-0", children: isLoading ? jsxRuntimeExports.jsx("div", { className: "flex flex-col -mx-4", children: [0, 1, 2].map((i) => jsxRuntimeExports.jsxs("div", { className: "flex items-center justify-between gap-3 bg-background-200 px-4 py-2", children: [jsxRuntimeExports.jsx(Skeleton$1, { className: "h-4 w-32 rounded" }), jsxRuntimeExports.jsx(Skeleton$1, { className: "h-3 w-16 rounded" })] }, i)) }) : jsxRuntimeExports.jsx("div", { className: "flex flex-col -mx-4", children: sortedEvents.map((event) => jsxRuntimeExports.jsx(EventItem, { event, onLoadEventData, encryptionKey, showSeparateEventOccurrenceTimestamps }, event.eventId)) }) })] }) }) });
|
|
95400
|
+
return jsxRuntimeExports.jsx(RunClickContext.Provider, { value: onRunClick, children: jsxRuntimeExports.jsx(StreamClickContext.Provider, { value: onStreamClick, children: jsxRuntimeExports.jsxs(CollapsibleRoot, { defaultOpen: true, children: [jsxRuntimeExports.jsx(CollapsibleTrigger, { children: "Events" }), jsxRuntimeExports.jsx(CollapsibleContent, { className: "mb-0", children: isLoading ? jsxRuntimeExports.jsx("div", { className: "flex flex-col -mx-4", children: [0, 1, 2].map((i) => jsxRuntimeExports.jsxs("div", { className: "flex items-center justify-between gap-3 bg-background-200 px-4 py-2", children: [jsxRuntimeExports.jsx(Skeleton$1, { className: "h-4 w-32 rounded" }), jsxRuntimeExports.jsx(Skeleton$1, { className: "h-3 w-16 rounded" })] }, i)) }) : jsxRuntimeExports.jsx("div", { className: "flex flex-col -mx-4", children: sortedEvents.map((event) => jsxRuntimeExports.jsx(EventItem, { event, onLoadEventData, encryptionKey, showSeparateEventOccurrenceTimestamps, isDuplicate: duplicateEventIds == null ? void 0 : duplicateEventIds.has(event.eventId) }, event.eventId)) }) })] }) }) });
|
|
95308
95401
|
}
|
|
95309
95402
|
const hasField = (value, key) => key in value;
|
|
95310
95403
|
const RESOURCES_WITH_FETCHED_DETAIL = /* @__PURE__ */ new Set(["run", "step", "sleep"]);
|
|
@@ -95624,7 +95717,7 @@ function EntityDetailPanel({ run: run2, onStreamClick, onRunClick, fetchSpanDeta
|
|
|
95624
95717
|
}, children: [jsxRuntimeExports.jsx(Zap, { className: "h-4 w-4" }), stoppingSleep ? "Waking up..." : "Wake Up Sleep"] }), resource === "hook" && canResolveHook && jsxRuntimeExports.jsxs("button", { type: "button", onClick: () => setShowResolveHookModal(true), disabled: resolvingHook, className: clsx("flex items-center justify-center gap-2 rounded-md px-3 py-2 text-button-14", "disabled:opacity-50 disabled:cursor-not-allowed transition-colors", resolvingHook ? "opacity-50 cursor-not-allowed" : "cursor-pointer"), style: {
|
|
95625
95718
|
background: "var(--ds-gray-1000)",
|
|
95626
95719
|
color: "var(--ds-background-100)"
|
|
95627
|
-
}, children: [jsxRuntimeExports.jsx(Send, { className: "h-4 w-4" }), "Resolve Hook"] })] })] }), jsxRuntimeExports.jsx(AttributePanel, { data: displayData, moduleSpecifier, moduleSourceUrl, expiredAt: run2.expiredAt, isLoading: loading, error: error2 ?? void 0, onStreamClick, onRunClick, onDecrypt, isDecrypting, resource }), rawEvents && jsxRuntimeExports.jsx(EventsList, { events: rawEvents, onLoadEventData, onStreamClick, onRunClick, encryptionKey, showSeparateEventOccurrenceTimestamps })] }) }), jsxRuntimeExports.jsx(ResolveHookModal, { isOpen: showResolveHookModal, onClose: () => setShowResolveHookModal(false), onSubmit: handleResolveHook, isSubmitting: resolvingHook })] });
|
|
95720
|
+
}, children: [jsxRuntimeExports.jsx(Send, { className: "h-4 w-4" }), "Resolve Hook"] })] })] }), jsxRuntimeExports.jsx(AttributePanel, { data: displayData, moduleSpecifier, moduleSourceUrl, expiredAt: run2.expiredAt, isLoading: loading, error: error2 ?? void 0, onStreamClick, onRunClick, onDecrypt, isDecrypting, resource }), rawEvents && jsxRuntimeExports.jsx(EventsList, { events: rawEvents, onLoadEventData, onStreamClick, onRunClick, encryptionKey, showSeparateEventOccurrenceTimestamps, duplicateEventIds: selectedSpan == null ? void 0 : selectedSpan.duplicateEventIds })] }) }), jsxRuntimeExports.jsx(ResolveHookModal, { isOpen: showResolveHookModal, onClose: () => setShowResolveHookModal(false), onSubmit: handleResolveHook, isSubmitting: resolvingHook })] });
|
|
95628
95721
|
}
|
|
95629
95722
|
const ActiveSpanContext = reactExports.createContext(null);
|
|
95630
95723
|
ActiveSpanContext.displayName = "ActiveSpanContext";
|
|
@@ -95846,7 +95939,8 @@ function useSelectedSpanInfo() {
|
|
|
95846
95939
|
data: (_b2 = activeSpan.attributes) == null ? void 0 : _b2.data,
|
|
95847
95940
|
resource,
|
|
95848
95941
|
spanId: activeSpan.spanId,
|
|
95849
|
-
rawEvents
|
|
95942
|
+
rawEvents,
|
|
95943
|
+
duplicateEventIds: sidebar.duplicateEventIds
|
|
95850
95944
|
};
|
|
95851
95945
|
}, [activeSpan, sidebar]);
|
|
95852
95946
|
}
|
|
@@ -95922,16 +96016,16 @@ function TraceDetailPanel({ containerRef, onNavigateToSpan, onClose }) {
|
|
|
95922
96016
|
return jsxRuntimeExports.jsxs("aside", { ref: asideRef, id: DETAIL_PANEL_ID, className: "relative flex flex-col h-full max-h-full shrink-0 bg-background-100 border-l border-gray-alpha-400", style: { width: panelWidth }, children: [jsxRuntimeExports.jsx(DraggableBorder, { element: asideRef, position: "left", onWidthChange: handleResize, onReset: () => handleResize(PANEL_DEFAULT_WIDTH), "aria-label": "Resize span details panel", "aria-controls": DETAIL_PANEL_ID, "aria-valuemin": PANEL_MIN_WIDTH, "aria-valuemax": panelMaxWidth, "aria-valuenow": Math.min(Math.max(Math.round(panelWidth), PANEL_MIN_WIDTH), panelMaxWidth) }), jsxRuntimeExports.jsxs("div", { className: "flex items-center justify-between gap-2 shrink-0 px-4 py-[7.5px]", children: [jsxRuntimeExports.jsx("span", { className: "text-label-14 font-medium text-gray-1000 truncate block", children: selectedSpanName }), jsxRuntimeExports.jsxs("div", { className: "flex items-center gap-0.5 shrink-0", children: [jsxRuntimeExports.jsxs(Tooltip$1, { children: [jsxRuntimeExports.jsx(TooltipTrigger$1, { asChild: true, children: jsxRuntimeExports.jsx(IconButton, { "aria-label": "Navigate up", "aria-keyshortcuts": "K", onClick: handleSelectPrev, disabled: !prevSpanId, children: jsxRuntimeExports.jsx(ChevronUp, { className: "w-4 h-4" }) }) }), prevSpanId ? jsxRuntimeExports.jsxs(TooltipContent$1, { children: ["Navigate up", jsxRuntimeExports.jsx(Kbd, { children: "K" })] }) : null] }), jsxRuntimeExports.jsxs(Tooltip$1, { children: [jsxRuntimeExports.jsx(TooltipTrigger$1, { asChild: true, children: jsxRuntimeExports.jsx(IconButton, { "aria-label": "Navigate down", "aria-keyshortcuts": "J", onClick: handleSelectNext, disabled: !nextSpanId, children: jsxRuntimeExports.jsx(ChevronDown, { className: "w-4 h-4" }) }) }), nextSpanId ? jsxRuntimeExports.jsxs(TooltipContent$1, { children: ["Navigate down", jsxRuntimeExports.jsx(Kbd, { children: "J" })] }) : null] }), jsxRuntimeExports.jsx("div", { "aria-hidden": true, className: "w-px h-4 bg-gray-alpha-400 mx-1" }), jsxRuntimeExports.jsx(IconButton, { "aria-label": "Close span details", "aria-keyshortcuts": "Escape", onClick: onClose, children: jsxRuntimeExports.jsx(X$3, { className: "w-4 h-4" }) })] })] }), jsxRuntimeExports.jsx("div", { className: "flex-1 overflow-y-auto", children: jsxRuntimeExports.jsx(ErrorBoundary$1, { children: jsxRuntimeExports.jsx(EntityDetailPanel, { run: sidebar.run, onStreamClick: sidebar.onStreamClick, onRunClick: sidebar.onRunClick, fetchSpanDetail: sidebar.fetchSpanDetail, onWakeUpSleep: sidebar.onWakeUpSleep, onLoadEventData: sidebar.onLoadEventData, onResolveHook: sidebar.onResolveHook, encryptionKey: sidebar.encryptionKey, onDecrypt: sidebar.onDecrypt, isDecrypting: sidebar.isDecrypting, selectedSpan, showSeparateEventOccurrenceTimestamps: sidebar.showSeparateEventOccurrenceTimestamps, getModuleSourceUrl: sidebar.getModuleSourceUrl }) }) })] });
|
|
95923
96017
|
}
|
|
95924
96018
|
const WorkflowIcon = () => {
|
|
95925
|
-
return jsxRuntimeExports.jsx("svg", { "data-testid": "geist-icon", height: "16", strokeLinejoin: "round",
|
|
96019
|
+
return jsxRuntimeExports.jsx("svg", { "aria-hidden": "true", "data-testid": "geist-icon", height: "16", strokeLinejoin: "round", viewBox: "0 0 16 16", width: "16", children: jsxRuntimeExports.jsx("path", { d: "M5.75 7L6.4209 7.33594L4.85254 10.4717C5.38789 10.771 5.75 11.3431 5.75 12V14C5.75 14.9665 4.96648 15.75 4 15.75H2C1.03352 15.75 0.25 14.9665 0.25 14V12C0.25 11.0335 1.03352 10.25 2 10.25H3.28711L5.0791 6.66504L5.75 7ZM14 10.25C14.9665 10.25 15.75 11.0335 15.75 12V14C15.75 14.9665 14.9665 15.75 14 15.75H12C11.1185 15.75 10.3909 15.098 10.2695 14.25H7V12.75H10.25V12C10.25 11.0335 11.0335 10.25 12 10.25H14ZM2 11.75C1.86192 11.75 1.75 11.8619 1.75 12V14C1.75 14.1381 1.86192 14.25 2 14.25H4C4.13808 14.25 4.25 14.1381 4.25 14V12C4.25 11.8619 4.13808 11.75 4 11.75H2ZM12 11.75C11.8619 11.75 11.75 11.8619 11.75 12V14C11.75 14.1381 11.8619 14.25 12 14.25H14C14.1381 14.25 14.25 14.1381 14.25 14V12C14.25 11.8619 14.1381 11.75 14 11.75H12ZM9 0.25C9.96649 0.25 10.75 1.03351 10.75 2V4C10.75 4.44642 10.5808 4.85197 10.3057 5.16113L12.2041 8.6416L10.8877 9.36035L8.91895 5.75H7C6.03351 5.75 5.25 4.96649 5.25 4V2C5.25 1.03351 6.03351 0.25 7 0.25H9ZM7 1.75C6.86193 1.75 6.75 1.86193 6.75 2V4C6.75 4.13807 6.86193 4.25 7 4.25H9C9.13807 4.25 9.25 4.13807 9.25 4V2C9.25 1.86193 9.13807 1.75 9 1.75H7Z", fill: "currentColor" }) });
|
|
95926
96020
|
};
|
|
95927
96021
|
const WebhookIcon = () => {
|
|
95928
|
-
return jsxRuntimeExports.jsx("svg", { "data-testid": "geist-icon", height: "16", strokeLinejoin: "round", viewBox: "0 0 16 16", width: "16",
|
|
96022
|
+
return jsxRuntimeExports.jsx("svg", { "aria-hidden": "true", "data-testid": "geist-icon", height: "16", strokeLinejoin: "round", viewBox: "0 0 16 16", width: "16", children: jsxRuntimeExports.jsx("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M5.8349 3.24994C5.14454 4.44567 5.55423 5.97464 6.74996 6.665L7.39465 7.03721L7.02726 7.68466L5.14599 11C5.21289 11.1531 5.25 11.3222 5.25 11.5C5.25 12.1904 4.69036 12.75 4 12.75C3.30964 12.75 2.75 12.1904 2.75 11.5C2.75 10.8634 3.22584 10.338 3.84123 10.26L5.38944 7.5316C3.95909 6.30274 3.55857 4.19264 4.53586 2.49994C5.64043 0.586765 8.08679 -0.0687357 9.99996 1.03583C11.836 2.09584 12.5137 4.39156 11.5892 6.26591L10.4949 4.33754C10.4418 3.53274 10.0009 2.76843 9.24996 2.33487C8.05423 1.64452 6.52525 2.0542 5.8349 3.24994ZM9.146 4.99996C9.21289 4.84686 9.25 4.67776 9.25 4.5C9.25 3.80964 8.69036 3.25 8 3.25C7.30964 3.25 6.75 3.80964 6.75 4.5C6.75 5.13659 7.22586 5.66203 7.84127 5.74002L9.72266 9.05556L10.0956 9.71274L10.75 9.33493C11.9457 8.64458 13.4747 9.05427 14.165 10.25C14.8554 11.4457 14.4457 12.9747 13.25 13.6651C12.5047 14.0953 11.63 14.0983 10.9096 13.75H8.69252C9.85895 15.4685 12.1727 16.0191 14 14.9641C15.9131 13.8595 16.5686 11.4132 15.4641 9.5C14.4886 7.81038 12.4665 7.10169 10.6895 7.71998L9.146 4.99996ZM13.25 11.5C13.25 12.1904 12.6904 12.75 12 12.75C11.591 12.75 11.228 12.5536 10.9999 12.25H7.9298C7.57875 14.1006 5.95279 15.5 4 15.5C1.79086 15.5 0 13.7091 0 11.5C0 9.40018 1.61801 7.67826 3.67529 7.51299L2.58098 9.44147C1.92792 9.89251 1.5 10.6463 1.5 11.5C1.5 12.8807 2.61929 14 4 14C5.38071 14 6.5 12.8807 6.5 11.5V10.75H7.25H10.9999C11.228 10.4464 11.591 10.25 12 10.25C12.6904 10.25 13.25 10.8096 13.25 11.5Z", fill: "currentColor" }) });
|
|
95929
96023
|
};
|
|
95930
96024
|
const SleepIcon = () => {
|
|
95931
|
-
return jsxRuntimeExports.jsx("svg", { "data-testid": "geist-icon", height: "16", strokeLinejoin: "round", viewBox: "0 0 16 16", width: "16",
|
|
96025
|
+
return jsxRuntimeExports.jsx("svg", { "aria-hidden": "true", "data-testid": "geist-icon", height: "16", strokeLinejoin: "round", viewBox: "0 0 16 16", width: "16", children: jsxRuntimeExports.jsx("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M7.25 1.25V2.03971C5.87928 2.18571 4.62678 2.72736 3.6089 3.54824L3.03033 2.96967L2.5 2.43934L1.43934 3.5L1.96967 4.03033L2.54824 4.6089C1.57979 5.80976 1 7.33717 1 9C1 12.866 4.13401 16 8 16C11.866 16 15 12.866 15 9C15 7.33717 14.4202 5.80976 13.4518 4.6089L14.0303 4.03033L14.5607 3.5L13.5 2.43934L12.9697 2.96967L12.3911 3.54824C11.3732 2.72736 10.1207 2.18571 8.75 2.03971V1.25H9.25H10V-0.25H9.25H8.75H7.25H6.75H6V1.25H6.75H7.25ZM2.5 9C2.5 5.96243 4.96243 3.5 8 3.5C11.0376 3.5 13.5 5.96243 13.5 9C13.5 12.0376 11.0376 14.5 8 14.5C4.96243 14.5 2.5 12.0376 2.5 9ZM8.75 6.75V6H7.25V6.75V9V9.75H8.75V9V6.75Z", fill: "currentColor" }) });
|
|
95932
96026
|
};
|
|
95933
96027
|
const StepForwardIcon = () => {
|
|
95934
|
-
return jsxRuntimeExports.jsx("svg", { "data-testid": "geist-icon", height: "16", strokeLinejoin: "round", viewBox: "0 0 16 16", width: "16",
|
|
96028
|
+
return jsxRuntimeExports.jsx("svg", { "aria-hidden": "true", "data-testid": "geist-icon", height: "16", strokeLinejoin: "round", viewBox: "0 0 16 16", width: "16", children: jsxRuntimeExports.jsx("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M4.21969 12.5303L4.75002 13.0607L5.81068 12L5.28035 11.4697L1.81068 7.99999L5.28035 4.53032L5.81068 3.99999L4.75002 2.93933L4.21969 3.46966L0.39647 7.29289C0.00594562 7.68341 0.00594562 8.31658 0.39647 8.7071L4.21969 12.5303ZM11.7804 12.5303L11.25 13.0607L10.1894 12L10.7197 11.4697L14.1894 7.99999L10.7197 4.53032L10.1894 3.99999L11.25 2.93933L11.7804 3.46966L15.6036 7.29289C15.9941 7.68341 15.9941 8.31658 15.6036 8.7071L11.7804 12.5303Z", fill: "currentColor" }) });
|
|
95935
96029
|
};
|
|
95936
96030
|
const ATTR_FILTER_REGEX = /(?:^|\s)(?<pair>(?<key>[\w.]+):(?<value>\S*))/g;
|
|
95937
96031
|
function parseSpanSearchQuery(rawQuery) {
|
|
@@ -96209,41 +96303,31 @@ function computeSpanDelta(anchor, hovered, viewStart, viewEnd) {
|
|
|
96209
96303
|
hoveredOffscreen: hoveredStart > viewEnd ? "right" : hoveredEnd < viewStart ? "left" : null
|
|
96210
96304
|
};
|
|
96211
96305
|
}
|
|
96212
|
-
const
|
|
96306
|
+
const RESOURCE_CLASS_NAMES = {
|
|
96213
96307
|
run: {
|
|
96214
|
-
|
|
96215
|
-
|
|
96216
|
-
errorBg: "var(--ds-red-200)",
|
|
96217
|
-
errorBorder: "var(--ds-red-500)"
|
|
96308
|
+
className: "border-blue-500 bg-blue-200",
|
|
96309
|
+
errorClassName: "border-red-500 bg-red-200"
|
|
96218
96310
|
},
|
|
96219
96311
|
step: {
|
|
96220
|
-
|
|
96221
|
-
|
|
96222
|
-
errorBg: "var(--ds-red-200)",
|
|
96223
|
-
errorBorder: "var(--ds-red-500)"
|
|
96312
|
+
className: "border-green-500 bg-green-200",
|
|
96313
|
+
errorClassName: "border-red-500 bg-red-200"
|
|
96224
96314
|
},
|
|
96225
96315
|
// Passive spans (hooks) stay gray — matches event-list icons and the minimap.
|
|
96226
96316
|
hook: {
|
|
96227
|
-
|
|
96228
|
-
|
|
96229
|
-
errorBg: "var(--ds-red-200)",
|
|
96230
|
-
errorBorder: "var(--ds-red-500)"
|
|
96317
|
+
className: "border-gray-500 bg-gray-200",
|
|
96318
|
+
errorClassName: "border-red-500 bg-red-200"
|
|
96231
96319
|
},
|
|
96232
96320
|
sleep: {
|
|
96233
|
-
|
|
96234
|
-
|
|
96235
|
-
errorBg: "var(--ds-red-200)",
|
|
96236
|
-
errorBorder: "var(--ds-red-500)"
|
|
96321
|
+
className: "border-purple-500 bg-purple-200",
|
|
96322
|
+
errorClassName: "border-red-500 bg-red-200"
|
|
96237
96323
|
},
|
|
96238
96324
|
default: {
|
|
96239
|
-
|
|
96240
|
-
|
|
96241
|
-
errorBg: "var(--ds-red-200)",
|
|
96242
|
-
errorBorder: "var(--ds-red-500)"
|
|
96325
|
+
className: "border-gray-500 bg-gray-200",
|
|
96326
|
+
errorClassName: "border-red-500 bg-red-200"
|
|
96243
96327
|
}
|
|
96244
96328
|
};
|
|
96245
|
-
function
|
|
96246
|
-
return
|
|
96329
|
+
function getResourceClassNames(resource) {
|
|
96330
|
+
return RESOURCE_CLASS_NAMES[resource] ?? RESOURCE_CLASS_NAMES.default;
|
|
96247
96331
|
}
|
|
96248
96332
|
function clampFraction(value) {
|
|
96249
96333
|
return Math.max(0, Math.min(1, value));
|
|
@@ -96622,10 +96706,6 @@ const SEGMENT_CLASSES = {
|
|
|
96622
96706
|
sleeping: "bg-gray-400 border border-gray-500",
|
|
96623
96707
|
received: "bg-blue-200 border border-blue-500"
|
|
96624
96708
|
};
|
|
96625
|
-
const TIMELINE_INSET_STYLE = {
|
|
96626
|
-
left: TIMELINE_PADDING_PX,
|
|
96627
|
-
right: TIMELINE_PADDING_PX
|
|
96628
|
-
};
|
|
96629
96709
|
const STRIPED_SEGMENT_STATUSES = /* @__PURE__ */ new Set([
|
|
96630
96710
|
"pending",
|
|
96631
96711
|
"running",
|
|
@@ -96706,8 +96786,8 @@ function BoundaryArrow({ direction }) {
|
|
|
96706
96786
|
const Icon2 = direction === "right" ? ArrowRight : ArrowLeft;
|
|
96707
96787
|
return jsxRuntimeExports.jsx("div", { className: "flex h-6 w-6 items-center justify-center rounded-[0.25rem]", children: jsxRuntimeExports.jsx(Icon2, { className: "size-3 text-gray-900" }) });
|
|
96708
96788
|
}
|
|
96709
|
-
function PlainBar({
|
|
96710
|
-
return jsxRuntimeExports.jsx("div", { className: "relative h-6 w-full min-w-1 rounded-[0.25rem] border",
|
|
96789
|
+
function PlainBar({ className, label }) {
|
|
96790
|
+
return jsxRuntimeExports.jsx("div", { className: cn$4("relative h-6 w-full min-w-1 rounded-[0.25rem] border", className), children: label ? jsxRuntimeExports.jsx(DurationLabel, { label }) : null });
|
|
96711
96791
|
}
|
|
96712
96792
|
function LeadInConnector({ leftPct, widthPct, label }) {
|
|
96713
96793
|
return jsxRuntimeExports.jsxs("div", { className: "absolute top-1/2 h-6 -translate-y-1/2", style: {
|
|
@@ -96727,11 +96807,10 @@ function SegmentBar({ segments, showLabels = true }) {
|
|
|
96727
96807
|
}
|
|
96728
96808
|
const label = formatDurationPrecise(seg.fullDurationMs);
|
|
96729
96809
|
const showLabel = showLabels && seg.pixelWidth >= Math.max(40, estimateLabelWidthPx(label));
|
|
96730
|
-
return jsxRuntimeExports.jsxs("div", { className: cn$4("absolute h-full overflow-hidden rounded-[0.25rem]", SEGMENT_CLASSES[seg.status]), style: {
|
|
96810
|
+
return jsxRuntimeExports.jsxs("div", { className: cn$4("absolute h-full min-w-px overflow-hidden rounded-[0.25rem]", SEGMENT_CLASSES[seg.status]), style: {
|
|
96731
96811
|
// 1px gap between adjacent segments, distributed equally.
|
|
96732
96812
|
left: `calc(${seg.leftPct}% + 0.5px)`,
|
|
96733
|
-
width: `calc(${seg.widthPct}% - 1px)
|
|
96734
|
-
minWidth: 1
|
|
96813
|
+
width: `calc(${seg.widthPct}% - 1px)`
|
|
96735
96814
|
}, children: [STRIPED_SEGMENT_STATUSES.has(seg.status) ? jsxRuntimeExports.jsx(AnimatedStripes, { status: seg.status }) : null, showLabel ? jsxRuntimeExports.jsx(DurationLabel, { label }) : null] }, i);
|
|
96736
96815
|
}) });
|
|
96737
96816
|
}
|
|
@@ -96747,15 +96826,14 @@ const TimelineBar = reactExports.memo(function TimelineBar2({ span, viewStart, v
|
|
|
96747
96826
|
const offscreen = reactExports.useMemo(() => geometry.mode.kind === "full" ? computeOffscreenMarkers(baseMarkers, geometry.visibleStartMs, geometry.visibleEndMs) : { left: null, right: null }, [geometry, baseMarkers]);
|
|
96748
96827
|
const hasMarkers = markers.length > 0 || offscreen.left !== null || offscreen.right !== null;
|
|
96749
96828
|
const isErrored = isSpanErrored(span);
|
|
96750
|
-
const colors =
|
|
96751
|
-
const
|
|
96752
|
-
const fallbackBorder = isErrored ? colors.errorBorder ?? "var(--ds-red-500)" : colors.border;
|
|
96829
|
+
const colors = getResourceClassNames(span.resource);
|
|
96830
|
+
const fallbackClassName = isErrored ? colors.errorClassName ?? "border-red-500 bg-red-200" : colors.className;
|
|
96753
96831
|
const totalLabel = formatDurationPrecise(totalDurationMs);
|
|
96754
96832
|
const showTotalLabel = geometry.visiblePixelWidth >= Math.max(40, estimateLabelWidthPx(totalLabel));
|
|
96755
96833
|
const handleClick = reactExports.useCallback(() => {
|
|
96756
96834
|
onSelect(span.spanId);
|
|
96757
96835
|
}, [onSelect, span.spanId]);
|
|
96758
|
-
return jsxRuntimeExports.jsx("div", { role: "treeitem", "aria-selected": isSelected, "aria-expanded": isSelected, "aria-level": 1, className: cn$4("group/timeline-row h-10 relative flex items-center hover:bg-gray-100 aria-selected:bg-gray-100 aria-selected:hover:bg-gray-200 transition-opacity", isDimmed && "opacity-35"), onClick: handleClick, children: jsxRuntimeExports.jsxs("div", { className: "absolute inset-y-0",
|
|
96836
|
+
return jsxRuntimeExports.jsx("div", { role: "treeitem", "aria-selected": isSelected, "aria-expanded": isSelected, "aria-level": 1, className: cn$4("group/timeline-row h-10 relative flex items-center hover:bg-gray-100 aria-selected:bg-gray-100 aria-selected:hover:bg-gray-200 transition-opacity", isDimmed && "opacity-35"), onClick: handleClick, children: jsxRuntimeExports.jsxs("div", { className: "absolute inset-x-4 inset-y-0", children: [jsxRuntimeExports.jsx("div", { className: "absolute top-1/2 h-6 -translate-y-1/2 overflow-hidden rounded-[0.25rem]", style: getBarPositionStyle(geometry), children: geometry.mode.kind === "arrow" ? jsxRuntimeExports.jsx(BoundaryArrow, { direction: geometry.mode.direction }) : geometry.mode.kind === "tiny" ? jsxRuntimeExports.jsx("div", { className: cn$4("h-6 rounded-[0.25rem] border", fallbackClassName) }) : segments.length > 0 ? jsxRuntimeExports.jsx(SegmentBar, { segments, showLabels: !hasMarkers }) : jsxRuntimeExports.jsx(PlainBar, { className: fallbackClassName, label: showTotalLabel ? totalLabel : null }) }), hasMarkers ? jsxRuntimeExports.jsxs("div", { className: "pointer-events-none absolute top-1/2 h-6 -translate-y-1/2", style: getBarPositionStyle(geometry), children: [markers.length > 0 ? jsxRuntimeExports.jsx(MarkerLayer, { markers }) : null, offscreen.left ? jsxRuntimeExports.jsx(OffscreenMarkerIndicator, { direction: "left", count: offscreen.left.count, targetMs: offscreen.left.nearestMs, onReveal: onRevealTime }) : null, offscreen.right ? jsxRuntimeExports.jsx(OffscreenMarkerIndicator, { direction: "right", count: offscreen.right.count, targetMs: offscreen.right.nearestMs, onReveal: onRevealTime }) : null, showTotalLabel ? jsxRuntimeExports.jsx(DurationLabel, {
|
|
96759
96837
|
label: totalLabel,
|
|
96760
96838
|
// Shift clear of the left edge indicator so it isn't covered.
|
|
96761
96839
|
className: offscreen.left ? "pl-10" : void 0
|
|
@@ -96776,9 +96854,8 @@ const DeltaMeasureLine = reactExports.memo(function DeltaMeasureLine2({ delta, a
|
|
|
96776
96854
|
const label = formatDurationPrecise(delta.deltaMs);
|
|
96777
96855
|
const labelWidthPx = estimateLabelWidthPx(label);
|
|
96778
96856
|
const labelPlacement = endX - startX >= labelWidthPx ? { left: (startX + endX) / 2, translate: "-translate-x-1/2" } : endX + 4 + labelWidthPx <= timelineWidth ? { left: endX + 4, translate: "" } : { left: startX - 4, translate: "-translate-x-full" };
|
|
96779
|
-
return jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [jsxRuntimeExports.jsx("div", { className: "absolute h-px bg-amber-800", style: {
|
|
96857
|
+
return jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [jsxRuntimeExports.jsx("div", { className: "absolute h-px w-1 bg-amber-800", style: {
|
|
96780
96858
|
left: Math.min(anchorX, guideX),
|
|
96781
|
-
width: MEASURE_GUIDE_OUTSET_PX,
|
|
96782
96859
|
top: anchorCenterY
|
|
96783
96860
|
} }), jsxRuntimeExports.jsx("div", { className: "absolute w-px bg-amber-800", style: {
|
|
96784
96861
|
left: guideX,
|
|
@@ -96828,10 +96905,10 @@ function Timeline({ spans, viewStart, viewEnd, markers, selectedId, searchResult
|
|
|
96828
96905
|
const delta = computeSpanDelta(anchorSpan, hoveredSpan, viewStart, viewEnd);
|
|
96829
96906
|
return delta ? { delta, anchorRowIndex: anchorIndex, hoveredRowIndex: hover.rowIndex } : null;
|
|
96830
96907
|
}, [altHeld, anchorIndex, hover, spans, viewStart, viewEnd]);
|
|
96831
|
-
return jsxRuntimeExports.jsxs("div", { ref: containerRef, className: "relative h-full overflow-hidden", style: { minHeight: spans.length * ROW_HEIGHT_PX }, children: [jsxRuntimeExports.jsx("div", { "aria-hidden": true, className: "absolute inset-
|
|
96908
|
+
return jsxRuntimeExports.jsxs("div", { ref: containerRef, className: "relative h-full overflow-hidden", style: { minHeight: spans.length * ROW_HEIGHT_PX }, children: [jsxRuntimeExports.jsx("div", { "aria-hidden": true, className: "pointer-events-none absolute inset-x-4 inset-y-0", children: markers.map((marker) => (
|
|
96832
96909
|
// Skip the "0s" origin marker since the left edge already implies it.
|
|
96833
96910
|
Math.abs(marker.value) > 1e-6 ? jsxRuntimeExports.jsx("div", { className: "absolute top-0 bottom-0 w-px bg-gray-alpha-300", style: { left: `${marker.position * 100}%` } }, String(marker.value)) : null
|
|
96834
|
-
)) }), hover != null && jsxRuntimeExports.jsx("div", { className: "absolute inset-
|
|
96911
|
+
)) }), hover != null && jsxRuntimeExports.jsx("div", { className: "pointer-events-none absolute inset-x-4 inset-y-0 z-10", children: jsxRuntimeExports.jsx("div", { className: "absolute top-0 bottom-0 w-px bg-gray-alpha-500", style: { left: `${hover.fraction * 100}%` } }) }), jsxRuntimeExports.jsx("div", { style: { transform: `translateY(${start2 * ROW_HEIGHT_PX}px)` }, children: spans.slice(start2, end).map((span) => jsxRuntimeExports.jsx(TimelineBar, { span, viewStart, viewDuration, containerWidth: timelineWidth, isSelected: selectedId === span.spanId, isDimmed: isSpanDimmedBySearch(span.spanId, searchResult), onSelect, onRevealTime }, span.spanId)) }), altHeld && anchorIndex < 0 && jsxRuntimeExports.jsx("div", { "aria-hidden": true, className: "pointer-events-none absolute inset-x-4 inset-y-0", children: gapMeasurements.map((gap) => jsxRuntimeExports.jsx(DeltaMeasureLine, { ...gap, timelineWidth }, gap.anchorRowIndex)) }), measurement && jsxRuntimeExports.jsx("div", { "aria-hidden": true, className: "pointer-events-none absolute inset-x-4 inset-y-0 z-20", children: jsxRuntimeExports.jsx(DeltaMeasureLine, { ...measurement, timelineWidth }) })] });
|
|
96835
96912
|
}
|
|
96836
96913
|
const CANVAS_PAD_Y_PX = 6;
|
|
96837
96914
|
const MIN_LINE_HEIGHT_PX = 1.5;
|
|
@@ -97110,6 +97187,12 @@ const Minimap = reactExports.memo(function Minimap2({ spans, root: root2, viewpo
|
|
|
97110
97187
|
(drag2 == null ? void 0 : drag2.mode) === "pan" ? "cursor-grabbing" : "cursor-grab"
|
|
97111
97188
|
), style: brushStyle, children: [jsxRuntimeExports.jsx("div", { "data-minimap-handle": "left", className: "absolute inset-y-0 -left-1 flex w-2.5 cursor-ew-resize items-center justify-center", children: jsxRuntimeExports.jsx("span", { className: cn$4("h-3.5 w-[3px] rounded-full bg-gray-600 opacity-0 transition-opacity group-hover/minimap-brush:opacity-100 group-focus-visible/minimap-brush:opacity-100", drag2 && "opacity-100") }) }), jsxRuntimeExports.jsx("div", { "data-minimap-handle": "right", className: "absolute inset-y-0 -right-1 flex w-2.5 cursor-ew-resize items-center justify-center", children: jsxRuntimeExports.jsx("span", { className: cn$4("h-3.5 w-[3px] rounded-full bg-gray-600 opacity-0 transition-opacity group-hover/minimap-brush:opacity-100 group-focus-visible/minimap-brush:opacity-100", drag2 && "opacity-100") }) })] })] });
|
|
97112
97189
|
});
|
|
97190
|
+
const GUTTER_PX = 1;
|
|
97191
|
+
const MIN_PX = 50;
|
|
97192
|
+
const DEFAULT_START_PX = 340;
|
|
97193
|
+
function paneColTemplate(startPx) {
|
|
97194
|
+
return `${startPx}px ${GUTTER_PX}px minmax(${MIN_PX}px, 1fr)`;
|
|
97195
|
+
}
|
|
97113
97196
|
const SPLIT_PANE_START_ID = "trace-split-start";
|
|
97114
97197
|
function SplitPane({ children: children2, className, startHeader, endHeader, scrollContainerRef }) {
|
|
97115
97198
|
const parts = reactExports.Children.toArray(children2);
|
|
@@ -97493,12 +97576,15 @@ const TraceViewer = ({ run: run2, events: events2, sidebarData, onLoadMore, hasM
|
|
|
97493
97576
|
if (!(run2 == null ? void 0 : run2.runId)) {
|
|
97494
97577
|
return void 0;
|
|
97495
97578
|
}
|
|
97496
|
-
return buildTrace(run2, events2, /* @__PURE__ */ new Date()
|
|
97497
|
-
|
|
97579
|
+
return buildTrace(run2, events2, /* @__PURE__ */ new Date(), {
|
|
97580
|
+
isCompleteHistory: !hasMore
|
|
97581
|
+
});
|
|
97582
|
+
}, [run2, events2, hasMore]);
|
|
97583
|
+
const sidebarValue = reactExports.useMemo(() => ({ ...sidebarData, duplicateEventIds: trace2 == null ? void 0 : trace2.duplicateEventIds }), [sidebarData, trace2]);
|
|
97498
97584
|
if (!trace2 || loading && events2.length === 0) {
|
|
97499
97585
|
return jsxRuntimeExports.jsx(TraceViewerSkeleton, {});
|
|
97500
97586
|
}
|
|
97501
|
-
return jsxRuntimeExports.jsx(SidebarDataProvider, { value:
|
|
97587
|
+
return jsxRuntimeExports.jsx(SidebarDataProvider, { value: sidebarValue, children: jsxRuntimeExports.jsx("div", { className: "relative w-full h-full flex", children: jsxRuntimeExports.jsx(TraceViewer$1, { trace: trace2, onLoadMore, hasMore, isLoadingMore }) }) });
|
|
97502
97588
|
};
|
|
97503
97589
|
function analyzeEvents(events2) {
|
|
97504
97590
|
if (!events2 || events2.length === 0) {
|
|
@@ -101966,6 +102052,17 @@ function getStepFunctionReviver(global2 = globalThis) {
|
|
|
101966
102052
|
}
|
|
101967
102053
|
const encoder = new TextEncoder();
|
|
101968
102054
|
const decoder = new TextDecoder();
|
|
102055
|
+
const MAX_SPARSE_ARRAY_LENGTH = 1e5;
|
|
102056
|
+
const parseOptions = {
|
|
102057
|
+
operations: {
|
|
102058
|
+
createSparseArray(length) {
|
|
102059
|
+
if (length > MAX_SPARSE_ARRAY_LENGTH) {
|
|
102060
|
+
throw new RangeError(`Sparse array length ${length} exceeds the maximum of ${MAX_SPARSE_ARRAY_LENGTH}`);
|
|
102061
|
+
}
|
|
102062
|
+
return default_parse_operations.createSparseArray(length);
|
|
102063
|
+
}
|
|
102064
|
+
}
|
|
102065
|
+
};
|
|
101969
102066
|
function getReducersForMode(mode, global2 = globalThis, extraReducers) {
|
|
101970
102067
|
let base;
|
|
101971
102068
|
switch (mode) {
|
|
@@ -102035,11 +102132,11 @@ const devalueCodec = {
|
|
|
102035
102132
|
deserialize(data, mode, options) {
|
|
102036
102133
|
const revivers = getReviversForMode(mode, options == null ? void 0 : options.global, options == null ? void 0 : options.extraRevivers);
|
|
102037
102134
|
const str = decoder.decode(data);
|
|
102038
|
-
return parse$5(str, revivers);
|
|
102135
|
+
return parse$5(str, revivers, parseOptions);
|
|
102039
102136
|
},
|
|
102040
102137
|
deserializeLegacy(data, mode, options) {
|
|
102041
102138
|
const revivers = getReviversForMode(mode, options == null ? void 0 : options.global, options == null ? void 0 : options.extraRevivers);
|
|
102042
|
-
return unflatten(data, revivers);
|
|
102139
|
+
return unflatten(data, revivers, parseOptions);
|
|
102043
102140
|
}
|
|
102044
102141
|
};
|
|
102045
102142
|
const COMPRESSION_MIN_BYTES = 1024;
|
|
@@ -102707,6 +102804,15 @@ function createReconnectingFramedStream(runId, name2, startIndex) {
|
|
|
102707
102804
|
connectMs = Date.now() - connectStart;
|
|
102708
102805
|
reader = stream.getReader();
|
|
102709
102806
|
}
|
|
102807
|
+
async function isVerifiedComplete() {
|
|
102808
|
+
try {
|
|
102809
|
+
const world = await getWorldLazy();
|
|
102810
|
+
const info = await world.streams.getInfo(runId, name2);
|
|
102811
|
+
return info.done && currentStartIndex + consumedFrames > info.tailIndex;
|
|
102812
|
+
} catch {
|
|
102813
|
+
return true;
|
|
102814
|
+
}
|
|
102815
|
+
}
|
|
102710
102816
|
async function reconnect() {
|
|
102711
102817
|
if (reader) {
|
|
102712
102818
|
await reader.cancel().catch(() => {
|
|
@@ -102730,7 +102836,9 @@ function createReconnectingFramedStream(runId, name2, startIndex) {
|
|
|
102730
102836
|
try {
|
|
102731
102837
|
await connect2();
|
|
102732
102838
|
return;
|
|
102733
|
-
} catch {
|
|
102839
|
+
} catch (error2) {
|
|
102840
|
+
if (StreamExpiredError.is(error2))
|
|
102841
|
+
throw error2;
|
|
102734
102842
|
}
|
|
102735
102843
|
}
|
|
102736
102844
|
}
|
|
@@ -102765,6 +102873,15 @@ function createReconnectingFramedStream(runId, name2, startIndex) {
|
|
|
102765
102873
|
}
|
|
102766
102874
|
if (result.done || !result.value) {
|
|
102767
102875
|
reader = void 0;
|
|
102876
|
+
if (reconnectSupported && !await isVerifiedComplete()) {
|
|
102877
|
+
try {
|
|
102878
|
+
await reconnect();
|
|
102879
|
+
} catch (reconnectErr) {
|
|
102880
|
+
controller.error(reconnectErr);
|
|
102881
|
+
return;
|
|
102882
|
+
}
|
|
102883
|
+
continue;
|
|
102884
|
+
}
|
|
102768
102885
|
if (readStart !== void 0) {
|
|
102769
102886
|
recordStreamReadComplete(readStart, runId, name2, chunksDelivered, bytesDelivered, totalReconnectCount);
|
|
102770
102887
|
}
|
|
@@ -104076,7 +104193,7 @@ function getStreamAndRequestRevivers(allRevivers) {
|
|
|
104076
104193
|
return extra;
|
|
104077
104194
|
}
|
|
104078
104195
|
`cinst_${ulid$3()}`;
|
|
104079
|
-
const version$1 = "5.0.0-beta.
|
|
104196
|
+
const version$1 = "5.0.0-beta.43";
|
|
104080
104197
|
const DEFAULT_HEALTH_CHECK_TIMEOUT = 3e4;
|
|
104081
104198
|
const SAFE_WORKFLOW_NAME_PATTERN = /^[a-zA-Z0-9_\-./@]+$/;
|
|
104082
104199
|
function getWorkflowQueueName(workflowName, namespace2) {
|
|
@@ -105255,6 +105372,263 @@ function instrumentObject$1(prefix, o) {
|
|
|
105255
105372
|
}
|
|
105256
105373
|
return handlers2;
|
|
105257
105374
|
}
|
|
105375
|
+
function createNodeHttpAgents(options) {
|
|
105376
|
+
const shared = {
|
|
105377
|
+
keepAlive: true,
|
|
105378
|
+
keepAliveMsecs: options.keepAliveMs,
|
|
105379
|
+
maxSockets: options.maxSockets
|
|
105380
|
+
};
|
|
105381
|
+
return { http: new http.Agent(shared), https: new https.Agent(shared) };
|
|
105382
|
+
}
|
|
105383
|
+
function destroyNodeHttpAgents(agents) {
|
|
105384
|
+
agents.http.destroy();
|
|
105385
|
+
agents.https.destroy();
|
|
105386
|
+
}
|
|
105387
|
+
const NULL_BODY_STATUSES = /* @__PURE__ */ new Set([204, 205, 304]);
|
|
105388
|
+
const ACCEPTED_ENCODINGS = "gzip, deflate, br";
|
|
105389
|
+
const TIMEOUT_CODE = "ETIMEDOUT";
|
|
105390
|
+
function transportError(message2, code2) {
|
|
105391
|
+
return Object.assign(new Error(message2), { code: code2 });
|
|
105392
|
+
}
|
|
105393
|
+
function toOutgoingHeaders(headers2) {
|
|
105394
|
+
const outgoing = {};
|
|
105395
|
+
headers2 == null ? void 0 : headers2.forEach((value, name2) => {
|
|
105396
|
+
outgoing[name2] = value;
|
|
105397
|
+
});
|
|
105398
|
+
return outgoing;
|
|
105399
|
+
}
|
|
105400
|
+
function toResponseHeaders(message2) {
|
|
105401
|
+
const headers2 = new Headers();
|
|
105402
|
+
for (const [name2, value] of Object.entries(message2.headers)) {
|
|
105403
|
+
if (value === void 0)
|
|
105404
|
+
continue;
|
|
105405
|
+
if (Array.isArray(value)) {
|
|
105406
|
+
for (const entry2 of value)
|
|
105407
|
+
headers2.append(name2, entry2);
|
|
105408
|
+
} else {
|
|
105409
|
+
headers2.append(name2, value);
|
|
105410
|
+
}
|
|
105411
|
+
}
|
|
105412
|
+
return headers2;
|
|
105413
|
+
}
|
|
105414
|
+
const ZLIB_OPTIONS = {
|
|
105415
|
+
flush: zlib.constants.Z_SYNC_FLUSH,
|
|
105416
|
+
finishFlush: zlib.constants.Z_SYNC_FLUSH
|
|
105417
|
+
};
|
|
105418
|
+
const BROTLI_OPTIONS = {
|
|
105419
|
+
flush: zlib.constants.BROTLI_OPERATION_FLUSH,
|
|
105420
|
+
finishFlush: zlib.constants.BROTLI_OPERATION_FLUSH
|
|
105421
|
+
};
|
|
105422
|
+
class InflateAuto extends Transform$1 {
|
|
105423
|
+
constructor() {
|
|
105424
|
+
super(...arguments);
|
|
105425
|
+
__publicField(this, "inner");
|
|
105426
|
+
}
|
|
105427
|
+
_transform(chunk, _encoding, callback) {
|
|
105428
|
+
if (!this.inner) {
|
|
105429
|
+
if (chunk.length === 0) {
|
|
105430
|
+
callback();
|
|
105431
|
+
return;
|
|
105432
|
+
}
|
|
105433
|
+
const inner = (chunk[0] & 15) === 8 ? zlib.createInflate(ZLIB_OPTIONS) : zlib.createInflateRaw(ZLIB_OPTIONS);
|
|
105434
|
+
inner.on("data", (decoded) => this.push(decoded));
|
|
105435
|
+
inner.on("end", () => this.push(null));
|
|
105436
|
+
inner.on("error", (error2) => this.destroy(error2));
|
|
105437
|
+
this.inner = inner;
|
|
105438
|
+
}
|
|
105439
|
+
this.inner.write(chunk, callback);
|
|
105440
|
+
}
|
|
105441
|
+
/**
|
|
105442
|
+
* Overriding `_final` keeps the readable side open past the end of the
|
|
105443
|
+
* writable one, so the last inflated bytes still reach the consumer. It is
|
|
105444
|
+
* closed by the inner stream's `end`, or here when there was no body at all.
|
|
105445
|
+
*/
|
|
105446
|
+
_final(callback) {
|
|
105447
|
+
if (this.inner) {
|
|
105448
|
+
this.inner.end();
|
|
105449
|
+
} else {
|
|
105450
|
+
this.push(null);
|
|
105451
|
+
}
|
|
105452
|
+
callback();
|
|
105453
|
+
}
|
|
105454
|
+
_destroy(error2, callback) {
|
|
105455
|
+
var _a3;
|
|
105456
|
+
(_a3 = this.inner) == null ? void 0 : _a3.destroy();
|
|
105457
|
+
callback(error2);
|
|
105458
|
+
}
|
|
105459
|
+
}
|
|
105460
|
+
function decodeBody(message2) {
|
|
105461
|
+
var _a3;
|
|
105462
|
+
const encoding2 = (_a3 = message2.headers["content-encoding"]) == null ? void 0 : _a3.toLowerCase().trim();
|
|
105463
|
+
if (!encoding2 || encoding2 === "identity")
|
|
105464
|
+
return message2;
|
|
105465
|
+
let decoder2;
|
|
105466
|
+
if (encoding2 === "gzip" || encoding2 === "x-gzip") {
|
|
105467
|
+
decoder2 = zlib.createGunzip(ZLIB_OPTIONS);
|
|
105468
|
+
} else if (encoding2 === "deflate") {
|
|
105469
|
+
decoder2 = new InflateAuto();
|
|
105470
|
+
} else if (encoding2 === "br") {
|
|
105471
|
+
decoder2 = zlib.createBrotliDecompress(BROTLI_OPTIONS);
|
|
105472
|
+
} else {
|
|
105473
|
+
return message2;
|
|
105474
|
+
}
|
|
105475
|
+
message2.on("error", (error2) => decoder2.destroy(error2));
|
|
105476
|
+
message2.on("close", () => {
|
|
105477
|
+
if (message2.complete)
|
|
105478
|
+
return;
|
|
105479
|
+
decoder2.destroy(transportError("socket hang up", "ECONNRESET"));
|
|
105480
|
+
});
|
|
105481
|
+
decoder2.on("close", () => {
|
|
105482
|
+
if (!message2.complete)
|
|
105483
|
+
message2.destroy();
|
|
105484
|
+
});
|
|
105485
|
+
return message2.pipe(decoder2);
|
|
105486
|
+
}
|
|
105487
|
+
function toWebStream(source, hooks) {
|
|
105488
|
+
let closed = false;
|
|
105489
|
+
const finish = (fn2) => {
|
|
105490
|
+
if (closed)
|
|
105491
|
+
return;
|
|
105492
|
+
closed = true;
|
|
105493
|
+
hooks.done();
|
|
105494
|
+
fn2();
|
|
105495
|
+
};
|
|
105496
|
+
return new ReadableStream({
|
|
105497
|
+
start(controller) {
|
|
105498
|
+
source.on("data", (chunk) => {
|
|
105499
|
+
hooks.progress();
|
|
105500
|
+
controller.enqueue(new Uint8Array(chunk));
|
|
105501
|
+
if ((controller.desiredSize ?? 1) <= 0)
|
|
105502
|
+
source.pause();
|
|
105503
|
+
});
|
|
105504
|
+
source.on("end", () => finish(() => controller.close()));
|
|
105505
|
+
source.on("error", (error2) => finish(() => controller.error(hooks.failure(error2))));
|
|
105506
|
+
source.on("close", () => finish(() => controller.error(hooks.failure())));
|
|
105507
|
+
},
|
|
105508
|
+
pull() {
|
|
105509
|
+
source.resume();
|
|
105510
|
+
},
|
|
105511
|
+
cancel(reason) {
|
|
105512
|
+
var _a3;
|
|
105513
|
+
finish(() => {
|
|
105514
|
+
});
|
|
105515
|
+
(_a3 = source.destroy) == null ? void 0 : _a3.call(source, reason instanceof Error ? reason : void 0);
|
|
105516
|
+
}
|
|
105517
|
+
});
|
|
105518
|
+
}
|
|
105519
|
+
function nodeHttpFetch(url2, init2 = {}) {
|
|
105520
|
+
const { method = "GET", headers: headers2, body: body2, signal, agents, headersTimeoutMs, bodyTimeoutMs } = init2;
|
|
105521
|
+
const target2 = new URL(url2);
|
|
105522
|
+
const secure = target2.protocol === "https:";
|
|
105523
|
+
if (!secure && target2.protocol !== "http:") {
|
|
105524
|
+
return Promise.reject(new TypeError(`node:http transport cannot request ${target2.protocol}// URLs`));
|
|
105525
|
+
}
|
|
105526
|
+
const outgoing = toOutgoingHeaders(headers2);
|
|
105527
|
+
const payload = body2 == null ? void 0 : typeof body2 === "string" ? Buffer$2.from(body2, "utf8") : Buffer$2.from(body2.buffer, body2.byteOffset, body2.byteLength);
|
|
105528
|
+
if (payload)
|
|
105529
|
+
outgoing["content-length"] = String(payload.byteLength);
|
|
105530
|
+
if (!("accept-encoding" in outgoing)) {
|
|
105531
|
+
outgoing["accept-encoding"] = ACCEPTED_ENCODINGS;
|
|
105532
|
+
}
|
|
105533
|
+
return new Promise((resolve2, reject) => {
|
|
105534
|
+
if (signal == null ? void 0 : signal.aborted) {
|
|
105535
|
+
reject(signal.reason);
|
|
105536
|
+
return;
|
|
105537
|
+
}
|
|
105538
|
+
let settled = false;
|
|
105539
|
+
let headersTimer;
|
|
105540
|
+
let bodyTimer;
|
|
105541
|
+
let teardownReason;
|
|
105542
|
+
const clearTimers = () => {
|
|
105543
|
+
clearTimeout(headersTimer);
|
|
105544
|
+
clearTimeout(bodyTimer);
|
|
105545
|
+
headersTimer = void 0;
|
|
105546
|
+
bodyTimer = void 0;
|
|
105547
|
+
};
|
|
105548
|
+
const request2 = (secure ? https : http).request(target2, {
|
|
105549
|
+
method,
|
|
105550
|
+
headers: outgoing,
|
|
105551
|
+
agent: agents ? secure ? agents.https : agents.http : void 0
|
|
105552
|
+
});
|
|
105553
|
+
const abort = () => {
|
|
105554
|
+
if ((signal == null ? void 0 : signal.reason) instanceof Error)
|
|
105555
|
+
teardownReason = signal.reason;
|
|
105556
|
+
request2.destroy(signal == null ? void 0 : signal.reason);
|
|
105557
|
+
};
|
|
105558
|
+
signal == null ? void 0 : signal.addEventListener("abort", abort, { once: true });
|
|
105559
|
+
const detach = () => {
|
|
105560
|
+
signal == null ? void 0 : signal.removeEventListener("abort", abort);
|
|
105561
|
+
};
|
|
105562
|
+
const fail = (error2) => {
|
|
105563
|
+
clearTimers();
|
|
105564
|
+
detach();
|
|
105565
|
+
if (settled)
|
|
105566
|
+
return;
|
|
105567
|
+
settled = true;
|
|
105568
|
+
reject(error2);
|
|
105569
|
+
};
|
|
105570
|
+
if (headersTimeoutMs) {
|
|
105571
|
+
request2.on("socket", () => {
|
|
105572
|
+
headersTimer = setTimeout(() => {
|
|
105573
|
+
request2.destroy(transportError(`no response headers within ${headersTimeoutMs}ms`, TIMEOUT_CODE));
|
|
105574
|
+
}, headersTimeoutMs);
|
|
105575
|
+
});
|
|
105576
|
+
}
|
|
105577
|
+
request2.on("error", fail);
|
|
105578
|
+
request2.on("response", (message2) => {
|
|
105579
|
+
clearTimeout(headersTimer);
|
|
105580
|
+
headersTimer = void 0;
|
|
105581
|
+
const status = message2.statusCode ?? 0;
|
|
105582
|
+
if (status < 200 || status > 599) {
|
|
105583
|
+
request2.destroy();
|
|
105584
|
+
fail(transportError(`origin returned an unusable status line (${status})`, "UNSUPPORTED_STATUS"));
|
|
105585
|
+
return;
|
|
105586
|
+
}
|
|
105587
|
+
const responseHeaders = toResponseHeaders(message2);
|
|
105588
|
+
const statusText = message2.statusMessage ?? "";
|
|
105589
|
+
const bodiless = NULL_BODY_STATUSES.has(status) || method.toUpperCase() === "HEAD";
|
|
105590
|
+
if (bodiless) {
|
|
105591
|
+
message2.resume();
|
|
105592
|
+
clearTimers();
|
|
105593
|
+
detach();
|
|
105594
|
+
settled = true;
|
|
105595
|
+
resolve2(new Response(null, { status, statusText, headers: responseHeaders }));
|
|
105596
|
+
return;
|
|
105597
|
+
}
|
|
105598
|
+
const armBodyTimer = () => {
|
|
105599
|
+
if (!bodyTimeoutMs)
|
|
105600
|
+
return;
|
|
105601
|
+
clearTimeout(bodyTimer);
|
|
105602
|
+
bodyTimer = setTimeout(() => {
|
|
105603
|
+
teardownReason = transportError(`no response body progress for ${bodyTimeoutMs}ms`, TIMEOUT_CODE);
|
|
105604
|
+
request2.destroy(teardownReason);
|
|
105605
|
+
}, bodyTimeoutMs);
|
|
105606
|
+
};
|
|
105607
|
+
armBodyTimer();
|
|
105608
|
+
const decoded = decodeBody(message2);
|
|
105609
|
+
if (decoded !== message2) {
|
|
105610
|
+
responseHeaders.delete("content-encoding");
|
|
105611
|
+
responseHeaders.delete("content-length");
|
|
105612
|
+
}
|
|
105613
|
+
const stream = toWebStream(decoded, {
|
|
105614
|
+
progress: armBodyTimer,
|
|
105615
|
+
done: () => {
|
|
105616
|
+
clearTimers();
|
|
105617
|
+
detach();
|
|
105618
|
+
},
|
|
105619
|
+
// A deliberate teardown (body deadline, caller abort) reaches the
|
|
105620
|
+
// socket as a plain reset, so the reason we tore it down for wins over
|
|
105621
|
+
// whatever the socket reported.
|
|
105622
|
+
failure: (cause) => teardownReason ?? cause ?? transportError("socket hang up", "ECONNRESET")
|
|
105623
|
+
});
|
|
105624
|
+
settled = true;
|
|
105625
|
+
resolve2(new Response(stream, { status, statusText, headers: responseHeaders }));
|
|
105626
|
+
});
|
|
105627
|
+
if (payload)
|
|
105628
|
+
request2.write(payload);
|
|
105629
|
+
request2.end();
|
|
105630
|
+
});
|
|
105631
|
+
}
|
|
105258
105632
|
var lib = {};
|
|
105259
105633
|
var hasRequiredLib;
|
|
105260
105634
|
function requireLib() {
|
|
@@ -106423,7 +106797,7 @@ function requireUtil$5() {
|
|
|
106423
106797
|
hasRequiredUtil$5 = 1;
|
|
106424
106798
|
const assert2 = require$$0$4;
|
|
106425
106799
|
const { kDestroyed, kBodyUsed, kListeners, kBody } = requireSymbols();
|
|
106426
|
-
const { IncomingMessage } =
|
|
106800
|
+
const { IncomingMessage } = http;
|
|
106427
106801
|
const stream = require$$0$5;
|
|
106428
106802
|
const net2 = require$$1$1;
|
|
106429
106803
|
const { stringify: stringify2 } = require$$5;
|
|
@@ -109750,8 +110124,8 @@ function requireRuntimeFeatures() {
|
|
|
109750
110124
|
__proto__: null,
|
|
109751
110125
|
"node:crypto": () => crypto$1,
|
|
109752
110126
|
"node:sqlite": () => require$$1$2,
|
|
109753
|
-
"node:worker_threads": () => require$$2$
|
|
109754
|
-
"node:zlib": () =>
|
|
110127
|
+
"node:worker_threads": () => require$$2$1,
|
|
110128
|
+
"node:zlib": () => zlib
|
|
109755
110129
|
};
|
|
109756
110130
|
function detectRuntimeFeatureByNodeModule(moduleName) {
|
|
109757
110131
|
try {
|
|
@@ -109975,7 +110349,7 @@ function requireWebidl() {
|
|
|
109975
110349
|
return "Object";
|
|
109976
110350
|
}
|
|
109977
110351
|
};
|
|
109978
|
-
webidl.util.markAsUncloneable = runtimeFeatures2.has("markAsUncloneable") ? require$$2$
|
|
110352
|
+
webidl.util.markAsUncloneable = runtimeFeatures2.has("markAsUncloneable") ? require$$2$1.markAsUncloneable : () => {
|
|
109979
110353
|
};
|
|
109980
110354
|
webidl.util.ConvertToInt = function(V2, bitLength, signedness, flags) {
|
|
109981
110355
|
let upperBound;
|
|
@@ -110458,7 +110832,7 @@ function requireUtil$4() {
|
|
|
110458
110832
|
if (hasRequiredUtil$4) return util$4;
|
|
110459
110833
|
hasRequiredUtil$4 = 1;
|
|
110460
110834
|
const { Transform: Transform2 } = require$$0$5;
|
|
110461
|
-
const zlib =
|
|
110835
|
+
const zlib$1 = zlib;
|
|
110462
110836
|
const { redirectStatusSet, referrerPolicyTokens, badPortsSet } = requireConstants$3();
|
|
110463
110837
|
const { getGlobalOrigin } = requireGlobal$1();
|
|
110464
110838
|
const { collectAnHTTPQuotedString, parseMIMEType } = requireDataUrl();
|
|
@@ -111066,7 +111440,7 @@ function requireUtil$4() {
|
|
|
111066
111440
|
callback();
|
|
111067
111441
|
return;
|
|
111068
111442
|
}
|
|
111069
|
-
this._inflateStream = (chunk[0] & 15) === 8 ? zlib.createInflate(__privateGet(this, _zlibOptions)) : zlib.createInflateRaw(__privateGet(this, _zlibOptions));
|
|
111443
|
+
this._inflateStream = (chunk[0] & 15) === 8 ? zlib$1.createInflate(__privateGet(this, _zlibOptions)) : zlib$1.createInflateRaw(__privateGet(this, _zlibOptions));
|
|
111070
111444
|
this._inflateStream.on("data", this.push.bind(this));
|
|
111071
111445
|
this._inflateStream.on("end", () => this.push(null));
|
|
111072
111446
|
this._inflateStream.on("error", (err) => this.destroy(err));
|
|
@@ -114034,7 +114408,7 @@ function requireClient() {
|
|
|
114034
114408
|
hasRequiredClient = 1;
|
|
114035
114409
|
const assert2 = require$$0$4;
|
|
114036
114410
|
const net2 = require$$1$1;
|
|
114037
|
-
const http =
|
|
114411
|
+
const http$1 = http;
|
|
114038
114412
|
const util2 = requireUtil$5();
|
|
114039
114413
|
const { ClientStats } = requireStats();
|
|
114040
114414
|
const { channels } = requireDiagnostics();
|
|
@@ -114092,7 +114466,7 @@ function requireClient() {
|
|
|
114092
114466
|
const connectH1 = requireClientH1();
|
|
114093
114467
|
const connectH2 = requireClientH2();
|
|
114094
114468
|
const kClosedResolve = Symbol("kClosedResolve");
|
|
114095
|
-
const getDefaultNodeMaxHeaderSize = http && http.maxHeaderSize && Number.isInteger(http.maxHeaderSize) && http.maxHeaderSize > 0 ? () => http.maxHeaderSize : () => {
|
|
114469
|
+
const getDefaultNodeMaxHeaderSize = http$1 && http$1.maxHeaderSize && Number.isInteger(http$1.maxHeaderSize) && http$1.maxHeaderSize > 0 ? () => http$1.maxHeaderSize : () => {
|
|
114096
114470
|
throw new InvalidArgumentError("http module not available or http.maxHeaderSize invalid");
|
|
114097
114471
|
};
|
|
114098
114472
|
const noop3 = () => {
|
|
@@ -118096,7 +118470,7 @@ function requireMockUtils() {
|
|
|
118096
118470
|
kTotalDispatchCount
|
|
118097
118471
|
} = requireMockSymbols();
|
|
118098
118472
|
const { serializePathWithQuery } = requireUtil$5();
|
|
118099
|
-
const { STATUS_CODES } =
|
|
118473
|
+
const { STATUS_CODES } = http;
|
|
118100
118474
|
const {
|
|
118101
118475
|
types: {
|
|
118102
118476
|
isPromise
|
|
@@ -119267,7 +119641,7 @@ function requireSnapshotRecorder() {
|
|
|
119267
119641
|
hasRequiredSnapshotRecorder = 1;
|
|
119268
119642
|
const { writeFile: writeFile2, readFile: readFile2, mkdir: mkdir2 } = fs$1;
|
|
119269
119643
|
const { dirname: dirname2, resolve: resolve2 } = path$3;
|
|
119270
|
-
const { setTimeout: setTimeout2, clearTimeout: clearTimeout2 } = require$$2$
|
|
119644
|
+
const { setTimeout: setTimeout2, clearTimeout: clearTimeout2 } = require$$2$2;
|
|
119271
119645
|
const { InvalidArgumentError, UndiciError } = requireErrors();
|
|
119272
119646
|
const { hashId, isUrlExcludedFactory, normalizeHeaders, createHeaderFilters } = requireSnapshotUtils();
|
|
119273
119647
|
function formatRequestKey(opts, headerFilters, matchOptions = {}) {
|
|
@@ -123162,7 +123536,7 @@ function requireDecompress() {
|
|
|
123162
123536
|
var _decompressors, _skipStatusCodes, _skipErrorResponses, _DecompressHandler_instances, shouldSkipDecompression_fn, createDecompressionChain_fn, setupDecompressorEvents_fn, setupSingleDecompressor_fn, setupMultipleDecompressors_fn, cleanupDecompressors_fn;
|
|
123163
123537
|
if (hasRequiredDecompress) return decompress$1;
|
|
123164
123538
|
hasRequiredDecompress = 1;
|
|
123165
|
-
const { createInflate, createGunzip, createBrotliDecompress, createZstdDecompress } =
|
|
123539
|
+
const { createInflate, createGunzip, createBrotliDecompress, createZstdDecompress } = zlib;
|
|
123166
123540
|
const { pipeline } = require$$0$5;
|
|
123167
123541
|
const DecoratorHandler = requireDecoratorHandler();
|
|
123168
123542
|
const { runtimeFeatures: runtimeFeatures2 } = requireRuntimeFeatures();
|
|
@@ -126023,7 +126397,7 @@ function requireFetch() {
|
|
|
126023
126397
|
} = requireResponse();
|
|
126024
126398
|
const { HeadersList } = requireHeaders();
|
|
126025
126399
|
const { Request: Request2, cloneRequest, getRequestDispatcher, getRequestState } = requireRequest();
|
|
126026
|
-
const zlib =
|
|
126400
|
+
const zlib$1 = zlib;
|
|
126027
126401
|
const {
|
|
126028
126402
|
makePolicyContainer,
|
|
126029
126403
|
clonePolicyContainer,
|
|
@@ -126073,7 +126447,7 @@ function requireFetch() {
|
|
|
126073
126447
|
const { dataURLProcessor, serializeAMimeType, minimizeSupportedMimeType } = requireDataUrl();
|
|
126074
126448
|
const { getGlobalDispatcher } = requireGlobal();
|
|
126075
126449
|
const { webidl } = requireWebidl();
|
|
126076
|
-
const { STATUS_CODES } =
|
|
126450
|
+
const { STATUS_CODES } = http;
|
|
126077
126451
|
const { bytesMatch } = requireSubresourceIntegrity();
|
|
126078
126452
|
const { createDeferredPromise } = requirePromise();
|
|
126079
126453
|
const { isomorphicEncode } = requireInfra();
|
|
@@ -127017,28 +127391,28 @@ function requireFetch() {
|
|
|
127017
127391
|
for (let i = codings.length - 1; i >= 0; --i) {
|
|
127018
127392
|
const coding = codings[i].trim();
|
|
127019
127393
|
if (coding === "x-gzip" || coding === "gzip") {
|
|
127020
|
-
decoders.push(zlib.createGunzip({
|
|
127394
|
+
decoders.push(zlib$1.createGunzip({
|
|
127021
127395
|
// Be less strict when decoding compressed responses, since sometimes
|
|
127022
127396
|
// servers send slightly invalid responses that are still accepted
|
|
127023
127397
|
// by common browsers.
|
|
127024
127398
|
// Always using Z_SYNC_FLUSH is what cURL does.
|
|
127025
|
-
flush: zlib.constants.Z_SYNC_FLUSH,
|
|
127026
|
-
finishFlush: zlib.constants.Z_SYNC_FLUSH
|
|
127399
|
+
flush: zlib$1.constants.Z_SYNC_FLUSH,
|
|
127400
|
+
finishFlush: zlib$1.constants.Z_SYNC_FLUSH
|
|
127027
127401
|
}));
|
|
127028
127402
|
} else if (coding === "deflate") {
|
|
127029
127403
|
decoders.push(createInflate({
|
|
127030
|
-
flush: zlib.constants.Z_SYNC_FLUSH,
|
|
127031
|
-
finishFlush: zlib.constants.Z_SYNC_FLUSH
|
|
127404
|
+
flush: zlib$1.constants.Z_SYNC_FLUSH,
|
|
127405
|
+
finishFlush: zlib$1.constants.Z_SYNC_FLUSH
|
|
127032
127406
|
}));
|
|
127033
127407
|
} else if (coding === "br") {
|
|
127034
|
-
decoders.push(zlib.createBrotliDecompress({
|
|
127035
|
-
flush: zlib.constants.BROTLI_OPERATION_FLUSH,
|
|
127036
|
-
finishFlush: zlib.constants.BROTLI_OPERATION_FLUSH
|
|
127408
|
+
decoders.push(zlib$1.createBrotliDecompress({
|
|
127409
|
+
flush: zlib$1.constants.BROTLI_OPERATION_FLUSH,
|
|
127410
|
+
finishFlush: zlib$1.constants.BROTLI_OPERATION_FLUSH
|
|
127037
127411
|
}));
|
|
127038
127412
|
} else if (coding === "zstd" && hasZstd) {
|
|
127039
|
-
decoders.push(zlib.createZstdDecompress({
|
|
127040
|
-
flush: zlib.constants.ZSTD_e_continue,
|
|
127041
|
-
finishFlush: zlib.constants.ZSTD_e_end
|
|
127413
|
+
decoders.push(zlib$1.createZstdDecompress({
|
|
127414
|
+
flush: zlib$1.constants.ZSTD_e_continue,
|
|
127415
|
+
finishFlush: zlib$1.constants.ZSTD_e_end
|
|
127042
127416
|
}));
|
|
127043
127417
|
} else {
|
|
127044
127418
|
decoders.length = 0;
|
|
@@ -129117,7 +129491,7 @@ function requirePermessageDeflate() {
|
|
|
129117
129491
|
var _inflate, _options2, _maxPayloadSize;
|
|
129118
129492
|
if (hasRequiredPermessageDeflate) return permessageDeflate;
|
|
129119
129493
|
hasRequiredPermessageDeflate = 1;
|
|
129120
|
-
const { createInflateRaw, Z_DEFAULT_WINDOWBITS } =
|
|
129494
|
+
const { createInflateRaw, Z_DEFAULT_WINDOWBITS } = zlib;
|
|
129121
129495
|
const { isValidClientWindowBits } = requireUtil$1();
|
|
129122
129496
|
const { MessageSizeExceededError } = requireErrors();
|
|
129123
129497
|
const tail = Buffer.from([0, 0, 255, 255]);
|
|
@@ -131414,7 +131788,12 @@ function isDetachedArrayBufferQueueError(error2) {
|
|
|
131414
131788
|
return false;
|
|
131415
131789
|
}
|
|
131416
131790
|
function createQueue$2(config2) {
|
|
131417
|
-
const
|
|
131791
|
+
const agentOptions = getQueueAgentOptions();
|
|
131792
|
+
const nodeHttpAgents = isNodeHttpEnabled() ? createNodeHttpAgents({
|
|
131793
|
+
maxSockets: agentOptions.connections,
|
|
131794
|
+
keepAliveMs: agentOptions.keepAliveTimeout
|
|
131795
|
+
}) : void 0;
|
|
131796
|
+
const httpAgent = nodeHttpAgents ? void 0 : new undiciExports.Agent(agentOptions);
|
|
131418
131797
|
const transport = new TypedJsonTransport();
|
|
131419
131798
|
const generateId2 = monotonicFactory();
|
|
131420
131799
|
const semaphore = new libExports.Sema(WORKFLOW_LOCAL_QUEUE_CONCURRENCY);
|
|
@@ -131475,13 +131854,24 @@ function createQueue$2(config2) {
|
|
|
131475
131854
|
response2 = await directHandler(req);
|
|
131476
131855
|
} else {
|
|
131477
131856
|
const baseUrl = await resolveBaseUrl$1(config2);
|
|
131478
|
-
|
|
131857
|
+
const url2 = createWorkflowUrl(baseUrl, { type: "flow" });
|
|
131858
|
+
response2 = nodeHttpAgents ? await nodeHttpFetch(url2, {
|
|
131479
131859
|
method: "POST",
|
|
131480
|
-
|
|
131481
|
-
|
|
131482
|
-
|
|
131483
|
-
|
|
131484
|
-
|
|
131860
|
+
headers: new Headers(headers2),
|
|
131861
|
+
body: body2,
|
|
131862
|
+
agents: nodeHttpAgents,
|
|
131863
|
+
headersTimeoutMs: agentOptions.headersTimeout,
|
|
131864
|
+
bodyTimeoutMs: agentOptions.bodyTimeout
|
|
131865
|
+
}) : (
|
|
131866
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any -- undici v7 dispatcher types don't match @types/node's RequestInit
|
|
131867
|
+
await fetch(url2, {
|
|
131868
|
+
method: "POST",
|
|
131869
|
+
duplex: "half",
|
|
131870
|
+
dispatcher: httpAgent,
|
|
131871
|
+
headers: headers2,
|
|
131872
|
+
body: body2
|
|
131873
|
+
})
|
|
131874
|
+
);
|
|
131485
131875
|
}
|
|
131486
131876
|
delivery++;
|
|
131487
131877
|
text2 = await response2.text();
|
|
@@ -131608,7 +131998,9 @@ function createQueue$2(config2) {
|
|
|
131608
131998
|
if (closeSignal.aborted)
|
|
131609
131999
|
return;
|
|
131610
132000
|
closeController.abort();
|
|
131611
|
-
|
|
132001
|
+
if (nodeHttpAgents)
|
|
132002
|
+
destroyNodeHttpAgents(nodeHttpAgents);
|
|
132003
|
+
await (httpAgent == null ? void 0 : httpAgent.close());
|
|
131612
132004
|
}
|
|
131613
132005
|
};
|
|
131614
132006
|
}
|
|
@@ -134018,6 +134410,7 @@ function createRunsStorage(basedir, tag) {
|
|
|
134018
134410
|
};
|
|
134019
134411
|
}
|
|
134020
134412
|
const DAY_MS$1 = 24 * 60 * 60 * 1e3;
|
|
134413
|
+
const MAX_CACHED_EVENT_ENTRIES = 1e3;
|
|
134021
134414
|
function getHookRetentionLimitMs() {
|
|
134022
134415
|
const days = Number(process.env.WORKFLOW_LOCAL_HOOK_RETENTION_LIMIT_DAYS ?? 30);
|
|
134023
134416
|
if (!Number.isFinite(days) || days <= 0) {
|
|
@@ -134164,7 +134557,7 @@ async function writeRunUnderLifecycleLock(basedir, runId, tag, proposed) {
|
|
|
134164
134557
|
function createEventsStorage(basedir, tag) {
|
|
134165
134558
|
const hookRetentionLimitMs = getHookRetentionLimitMs();
|
|
134166
134559
|
const maxCachedEventBytes = 4 * 1024 * 1024;
|
|
134167
|
-
const maxCachedEventEntries =
|
|
134560
|
+
const maxCachedEventEntries = MAX_CACHED_EVENT_ENTRIES;
|
|
134168
134561
|
const eventCache = /* @__PURE__ */ new Map();
|
|
134169
134562
|
const cachedEventBytes = /* @__PURE__ */ new Map();
|
|
134170
134563
|
const cachedPathsByRunId = /* @__PURE__ */ new Map();
|
|
@@ -135123,13 +135516,10 @@ function createEventsStorage(basedir, tag) {
|
|
|
135123
135516
|
if (terminalByMarker || runNow && isTerminalWorkflowRunStatus(runNow.status)) {
|
|
135124
135517
|
throw new RunExpiredError(`Workflow run "${effectiveRunId}" is already in a terminal state`);
|
|
135125
135518
|
}
|
|
135126
|
-
const stagedPath = pendingHookEventPath(basedir, effectiveRunId, eventId
|
|
135519
|
+
const stagedPath = pendingHookEventPath(basedir, effectiveRunId, `${eventId}.${monotonicUlid$1()}`, tag);
|
|
135127
135520
|
const staged = await writeExclusive(stagedPath, serializedEvent);
|
|
135128
135521
|
if (!staged) {
|
|
135129
|
-
|
|
135130
|
-
continue;
|
|
135131
|
-
}
|
|
135132
|
-
throw new EntityConflictError(`Event "${eventId}" already exists for run "${effectiveRunId}"`);
|
|
135522
|
+
throw new WorkflowWorldError(`Failed to stage event "${eventId}" for run "${effectiveRunId}": staging path already exists`);
|
|
135133
135523
|
}
|
|
135134
135524
|
try {
|
|
135135
135525
|
if (await isRunTerminalCommitted(basedir, effectiveRunId, tag)) {
|
|
@@ -135151,6 +135541,15 @@ function createEventsStorage(basedir, tag) {
|
|
|
135151
135541
|
notePublishedSlot(effectiveRunId, eventId);
|
|
135152
135542
|
break;
|
|
135153
135543
|
}
|
|
135544
|
+
if (data.eventType === "hook_received" && (params == null ? void 0 : params.resumeId)) {
|
|
135545
|
+
const occupant = await readJSONWithFallback(basedir, "events", `${effectiveRunId}-${eventId}`, EventSchema, tag);
|
|
135546
|
+
if (occupant && isResumeEvent(occupant, {
|
|
135547
|
+
resumeId: params.resumeId,
|
|
135548
|
+
hookId: data.correlationId
|
|
135549
|
+
})) {
|
|
135550
|
+
return { event: occupant };
|
|
135551
|
+
}
|
|
135552
|
+
}
|
|
135154
135553
|
if (!await bumpEventSlot(attempt)) {
|
|
135155
135554
|
break;
|
|
135156
135555
|
}
|
|
@@ -135761,11 +136160,7 @@ function createWorld$2(args) {
|
|
|
135761
136160
|
// `(runId, resumeId)` via a filesystem sidecar claim (see
|
|
135762
136161
|
// events-storage.ts `claimHookResume`), so resumeHook()'s parallel fast
|
|
135763
136162
|
// path converges on one event in dev exactly as it does on Vercel.
|
|
135764
|
-
hookResumeDedup: true
|
|
135765
|
-
// New runs get dense per-run slot event ids. Runs created before this
|
|
135766
|
-
// keep their ULIDs; the scheme is pinned by a run's own first event id,
|
|
135767
|
-
// not by this flag, which only says what new runs get.
|
|
135768
|
-
slotEventIds: true
|
|
136163
|
+
hookResumeDedup: true
|
|
135769
136164
|
},
|
|
135770
136165
|
...queue,
|
|
135771
136166
|
...storage,
|
|
@@ -135800,7 +136195,7 @@ function createWorld$2(args) {
|
|
|
135800
136195
|
const basedir = mergedConfig.dataDir;
|
|
135801
136196
|
const hooksDir = path$3.join(basedir, "hooks");
|
|
135802
136197
|
const taggedHookFiles = await listTaggedFiles(hooksDir, tag);
|
|
135803
|
-
const { HookSchema: HookSchema2 } = await import("./index-
|
|
136198
|
+
const { HookSchema: HookSchema2 } = await import("./index-CSsrecUx.js");
|
|
135804
136199
|
await Promise.all(taggedHookFiles.map(async (hookFile) => {
|
|
135805
136200
|
const hook = await readJSON(path$3.join(hooksDir, hookFile), HookSchema2);
|
|
135806
136201
|
if (hook == null ? void 0 : hook.token) {
|
|
@@ -135983,8 +136378,8 @@ function requireGetVercelOidcToken() {
|
|
|
135983
136378
|
}
|
|
135984
136379
|
try {
|
|
135985
136380
|
const [{ getTokenPayload, isExpired }, { refreshToken }] = await Promise.all([
|
|
135986
|
-
await import("./token-util-
|
|
135987
|
-
await import("./token-
|
|
136381
|
+
await import("./token-util-BhmVdeCX.js").then((n) => n.t),
|
|
136382
|
+
await import("./token-COK7oHMh.js").then((n) => n.t)
|
|
135988
136383
|
]);
|
|
135989
136384
|
if (!token || isExpired(getTokenPayload(token), options == null ? void 0 : options.expirationBufferMs)) {
|
|
135990
136385
|
await refreshToken(options);
|
|
@@ -136099,7 +136494,7 @@ function requireTokenIo() {
|
|
|
136099
136494
|
tokenIo = __toCommonJS(token_io_exports);
|
|
136100
136495
|
var import_path2 = __toESM(path__default);
|
|
136101
136496
|
var import_fs2 = __toESM(fs__default);
|
|
136102
|
-
var import_os2 = __toESM(require$$2$
|
|
136497
|
+
var import_os2 = __toESM(require$$2$3);
|
|
136103
136498
|
var import_token_error = requireTokenError();
|
|
136104
136499
|
function findRootDir() {
|
|
136105
136500
|
try {
|
|
@@ -136251,7 +136646,7 @@ function requireOauth() {
|
|
|
136251
136646
|
refreshTokenRequest: () => refreshTokenRequest
|
|
136252
136647
|
});
|
|
136253
136648
|
oauth = __toCommonJS(oauth_exports);
|
|
136254
|
-
var import_os2 = require$$2$
|
|
136649
|
+
var import_os2 = require$$2$3;
|
|
136255
136650
|
const VERCEL_ISSUER = "https://vercel.com";
|
|
136256
136651
|
const VERCEL_CLI_CLIENT_ID = "cl_HYyOPBNtFMfHhaUn9L4QPfTZz6TP47bp";
|
|
136257
136652
|
const userAgent = `@vercel/oidc node-${process.version} ${(0, import_os2.platform)()} (${(0, import_os2.arch)()}) ${(0, import_os2.hostname)()}`;
|
|
@@ -136550,10 +136945,13 @@ var distExports = requireDist();
|
|
|
136550
136945
|
let _dispatcher;
|
|
136551
136946
|
let _streamDispatcher;
|
|
136552
136947
|
let _streamCloseDispatcher;
|
|
136948
|
+
let _nodeHttpAgents;
|
|
136553
136949
|
const BASE_AGENT_OPTIONS = {
|
|
136554
136950
|
connections: 8,
|
|
136555
136951
|
keepAliveTimeout: 1e4
|
|
136556
136952
|
};
|
|
136953
|
+
const NODE_HTTP_HEADERS_TIMEOUT_MS = 3e5;
|
|
136954
|
+
const NODE_HTTP_BODY_TIMEOUT_MS = 3e5;
|
|
136557
136955
|
const H2_MAX_IN_FLIGHT_STREAMS = 100;
|
|
136558
136956
|
const H2_STREAM_WINDOW_BYTES = 4 * 1024 * 1024;
|
|
136559
136957
|
const H2_CONNECTION_WINDOW_BYTES = 16 * 1024 * 1024;
|
|
@@ -136713,17 +137111,36 @@ const eventsRecycler = createDispatcherRecycler(() => createEventsDispatcher(),
|
|
|
136713
137111
|
function noteEventsTransportOutcome(dispatcher2, error2) {
|
|
136714
137112
|
eventsRecycler.note(dispatcher2, error2);
|
|
136715
137113
|
}
|
|
137114
|
+
function resolveDispatcher(config2, buildDefault) {
|
|
137115
|
+
if (config2 == null ? void 0 : config2.dispatcher)
|
|
137116
|
+
return config2.dispatcher;
|
|
137117
|
+
return isNodeHttpEnabled() ? void 0 : buildDefault();
|
|
137118
|
+
}
|
|
137119
|
+
function getNodeHttpAgents(config2) {
|
|
137120
|
+
if (config2 == null ? void 0 : config2.dispatcher)
|
|
137121
|
+
return void 0;
|
|
137122
|
+
if (!isNodeHttpEnabled())
|
|
137123
|
+
return void 0;
|
|
137124
|
+
_nodeHttpAgents ?? (_nodeHttpAgents = createNodeHttpAgents({
|
|
137125
|
+
maxSockets: BASE_AGENT_OPTIONS.connections,
|
|
137126
|
+
keepAliveMs: BASE_AGENT_OPTIONS.keepAliveTimeout
|
|
137127
|
+
}));
|
|
137128
|
+
return _nodeHttpAgents;
|
|
137129
|
+
}
|
|
136716
137130
|
function getDispatcher(config2) {
|
|
137131
|
+
return resolveDispatcher(config2, getDefaultDispatcher);
|
|
137132
|
+
}
|
|
137133
|
+
function getQueueDispatcher(config2) {
|
|
136717
137134
|
return (config2 == null ? void 0 : config2.dispatcher) ?? getDefaultDispatcher();
|
|
136718
137135
|
}
|
|
136719
137136
|
function getEventsDispatcher(config2) {
|
|
136720
|
-
return (config2
|
|
137137
|
+
return resolveDispatcher(config2, () => eventsRecycler.get());
|
|
136721
137138
|
}
|
|
136722
137139
|
function getStreamDispatcher(config2) {
|
|
136723
|
-
return (config2
|
|
137140
|
+
return resolveDispatcher(config2, getDefaultStreamDispatcher);
|
|
136724
137141
|
}
|
|
136725
137142
|
function getStreamCloseDispatcher(config2) {
|
|
136726
|
-
return (config2
|
|
137143
|
+
return resolveDispatcher(config2, getDefaultStreamCloseDispatcher);
|
|
136727
137144
|
}
|
|
136728
137145
|
function makeRetryDispatcher(agentOptions, retryOptions) {
|
|
136729
137146
|
return new undiciExports.RetryAgent(new undiciExports.Agent(agentOptions), retryOptions);
|
|
@@ -136860,6 +137277,7 @@ const ServerAddress = SemanticConvention("server.address");
|
|
|
136860
137277
|
const ServerPort = SemanticConvention("server.port");
|
|
136861
137278
|
const HttpResponseStatusCode = SemanticConvention("http.response.status_code");
|
|
136862
137279
|
const ErrorType = SemanticConvention("error.type");
|
|
137280
|
+
const NetworkProtocolName = SemanticConvention("network.protocol.name");
|
|
136863
137281
|
const WorldParseFormat = SemanticConvention("workflow.world.parse.format");
|
|
136864
137282
|
const PeerService = SemanticConvention("peer.service");
|
|
136865
137283
|
const RpcSystem = SemanticConvention("rpc.system");
|
|
@@ -136870,6 +137288,15 @@ const StepId = SemanticConvention("step.id");
|
|
|
136870
137288
|
const WorkflowStreamName = SemanticConvention("workflow.stream.name");
|
|
136871
137289
|
const WorkflowStreamOperation = SemanticConvention("workflow.stream.operation");
|
|
136872
137290
|
const WorkflowStreamStartIndex = SemanticConvention("workflow.stream.start_index");
|
|
137291
|
+
const WorkflowEventsTransport = SemanticConvention("workflow.events.transport");
|
|
137292
|
+
const WorkflowHttpTransport = SemanticConvention("workflow.http.transport");
|
|
137293
|
+
const WorkflowEventType = SemanticConvention("workflow.event.type");
|
|
137294
|
+
const WorkflowClientVersion = SemanticConvention("workflow.client.version");
|
|
137295
|
+
const StepStsoMs = SemanticConvention("step.stso_ms");
|
|
137296
|
+
const StepLatencyOptimizations = SemanticConvention("step.latency_optimizations");
|
|
137297
|
+
const WorkflowWsUrl = SemanticConvention("workflow.events.ws.url");
|
|
137298
|
+
const WorkflowWsRequestId = SemanticConvention("workflow.events.ws.req_id");
|
|
137299
|
+
const WorkflowWsReconnectAttempt = SemanticConvention("workflow.events.ws.reconnect_attempt");
|
|
136873
137300
|
const REQUEST_TIMEOUT_MS = 6e4;
|
|
136874
137301
|
const getRequestTimeoutMs = () => envNumber("WORKFLOW_REQUEST_TIMEOUT_MS", REQUEST_TIMEOUT_MS, {
|
|
136875
137302
|
integer: true,
|
|
@@ -136922,8 +137349,14 @@ function errorForResponse(status, message2, opts = {}) {
|
|
|
136922
137349
|
const { retryAfter, code: code2, url: url2, mitigated, details } = opts;
|
|
136923
137350
|
if (status === 409)
|
|
136924
137351
|
return new EntityConflictError(message2);
|
|
136925
|
-
if (status === 410)
|
|
137352
|
+
if (status === 410) {
|
|
137353
|
+
if (code2 === "stream-expired") {
|
|
137354
|
+
const streamDetails = details && typeof details === "object" ? details : void 0;
|
|
137355
|
+
const expiredAt = typeof (streamDetails == null ? void 0 : streamDetails.expiredAt) === "string" ? new Date(streamDetails.expiredAt) : void 0;
|
|
137356
|
+
return new StreamExpiredError(message2, typeof (streamDetails == null ? void 0 : streamDetails.runId) === "string" ? streamDetails.runId : void 0, typeof (streamDetails == null ? void 0 : streamDetails.streamId) === "string" ? streamDetails.streamId : void 0, expiredAt && !Number.isNaN(expiredAt.getTime()) ? expiredAt : void 0);
|
|
137357
|
+
}
|
|
136926
137358
|
return new RunExpiredError(message2);
|
|
137359
|
+
}
|
|
136927
137360
|
if (status === 412)
|
|
136928
137361
|
return new PreconditionFailedError(message2, { retryAfter, details });
|
|
136929
137362
|
if (status === 425)
|
|
@@ -136950,9 +137383,10 @@ async function resolveVercelApiToken(opts) {
|
|
|
136950
137383
|
function parseServer(url2) {
|
|
136951
137384
|
try {
|
|
136952
137385
|
const parsed = new URL(url2);
|
|
137386
|
+
const secure = parsed.protocol === "https:" || parsed.protocol === "wss:";
|
|
136953
137387
|
return {
|
|
136954
137388
|
serverAddress: parsed.hostname,
|
|
136955
|
-
serverPort: parsed.port ? parseInt(parsed.port, 10) :
|
|
137389
|
+
serverPort: parsed.port ? parseInt(parsed.port, 10) : secure ? 443 : 80
|
|
136956
137390
|
};
|
|
136957
137391
|
} catch {
|
|
136958
137392
|
return {};
|
|
@@ -136971,11 +137405,9 @@ function httpClientSpanAttributes(args) {
|
|
|
136971
137405
|
...RpcService(peerService)
|
|
136972
137406
|
};
|
|
136973
137407
|
}
|
|
136974
|
-
async function
|
|
136975
|
-
const { method, url: url2,
|
|
136976
|
-
const label = logLabel ?? url2;
|
|
137408
|
+
async function withHttpClientSpan(opts, fn2) {
|
|
137409
|
+
const { method, url: url2, peerService = "workflow-server", spanName, attributes } = opts;
|
|
136977
137410
|
return trace(spanName ?? `http ${method}`, { kind: await getSpanKind("CLIENT") }, async (span) => {
|
|
136978
|
-
var _a3, _b2, _c2;
|
|
136979
137411
|
if (spanName && HTTP_DEBUG_ENABLED && span) {
|
|
136980
137412
|
const ctx = span.spanContext();
|
|
136981
137413
|
console.warn("[workflow:otel-diag] span-open", JSON.stringify({
|
|
@@ -136988,6 +137420,20 @@ async function instrumentedFetch(opts) {
|
|
|
136988
137420
|
span == null ? void 0 : span.setAttributes(httpClientSpanAttributes({ method, url: url2, peerService }));
|
|
136989
137421
|
if (attributes)
|
|
136990
137422
|
span == null ? void 0 : span.setAttributes(attributes);
|
|
137423
|
+
return fn2(span);
|
|
137424
|
+
});
|
|
137425
|
+
}
|
|
137426
|
+
function recordClientSpanStatus(span, status) {
|
|
137427
|
+
span == null ? void 0 : span.setAttributes({ ...HttpResponseStatusCode(status) });
|
|
137428
|
+
if (status < 200 || status >= 300) {
|
|
137429
|
+
span == null ? void 0 : span.setAttributes({ ...ErrorType(`HTTP ${status}`) });
|
|
137430
|
+
}
|
|
137431
|
+
}
|
|
137432
|
+
async function instrumentedFetch(opts) {
|
|
137433
|
+
const { method, url: url2, headers: headers2, body: body2, dispatcher: dispatcher2, peerService, timeoutMs = getRequestTimeoutMs(), signal: callerSignal, injectTraceContext: injectTraceContext2 = true, cacheBust = true, logLabel, buildError, spanName, attributes, durationAttribute, onTransportOutcome } = opts;
|
|
137434
|
+
const label = logLabel ?? url2;
|
|
137435
|
+
return withHttpClientSpan({ method, url: url2, peerService, spanName, attributes }, async (span) => {
|
|
137436
|
+
var _a3, _b2, _c2;
|
|
136991
137437
|
if (injectTraceContext2)
|
|
136992
137438
|
await injectTraceContextIntoHeaders(headers2);
|
|
136993
137439
|
if (cacheBust)
|
|
@@ -136997,7 +137443,23 @@ async function instrumentedFetch(opts) {
|
|
|
136997
137443
|
const start2 = Date.now();
|
|
136998
137444
|
let response2;
|
|
136999
137445
|
try {
|
|
137000
|
-
|
|
137446
|
+
const nodeAgents = dispatcher2 ? void 0 : getNodeHttpAgents();
|
|
137447
|
+
span == null ? void 0 : span.setAttributes({
|
|
137448
|
+
...WorkflowHttpTransport(nodeAgents ? "node-http" : "undici")
|
|
137449
|
+
});
|
|
137450
|
+
response2 = nodeAgents ? await nodeHttpFetch(url2, {
|
|
137451
|
+
method,
|
|
137452
|
+
headers: headers2,
|
|
137453
|
+
body: body2,
|
|
137454
|
+
signal,
|
|
137455
|
+
agents: nodeAgents,
|
|
137456
|
+
// Match undici's per-phase defaults (which the undici agents
|
|
137457
|
+
// inherit implicitly): without these the node:http path arms no
|
|
137458
|
+
// stalled-socket deadline, and a `timeoutMs: null` caller would
|
|
137459
|
+
// have no deadline at all.
|
|
137460
|
+
headersTimeoutMs: NODE_HTTP_HEADERS_TIMEOUT_MS,
|
|
137461
|
+
bodyTimeoutMs: NODE_HTTP_BODY_TIMEOUT_MS
|
|
137462
|
+
}) : await fetch(url2, {
|
|
137001
137463
|
method,
|
|
137002
137464
|
headers: headers2,
|
|
137003
137465
|
body: body2,
|
|
@@ -137019,11 +137481,10 @@ async function instrumentedFetch(opts) {
|
|
|
137019
137481
|
const ms2 = Date.now() - start2;
|
|
137020
137482
|
onTransportOutcome == null ? void 0 : onTransportOutcome();
|
|
137021
137483
|
httpLog(method, label, response2, ms2);
|
|
137022
|
-
span
|
|
137484
|
+
recordClientSpanStatus(span, response2.status);
|
|
137023
137485
|
if (durationAttribute)
|
|
137024
137486
|
span == null ? void 0 : span.setAttributes({ [durationAttribute]: ms2 });
|
|
137025
137487
|
if (!response2.ok) {
|
|
137026
|
-
span == null ? void 0 : span.setAttributes({ ...ErrorType(`HTTP ${response2.status}`) });
|
|
137027
137488
|
logCurlRepro(method, url2, headers2);
|
|
137028
137489
|
if (buildError) {
|
|
137029
137490
|
const error3 = await buildError(response2);
|
|
@@ -137041,7 +137502,7 @@ async function instrumentedFetch(opts) {
|
|
|
137041
137502
|
return response2;
|
|
137042
137503
|
});
|
|
137043
137504
|
}
|
|
137044
|
-
const version = "5.0.0-beta.
|
|
137505
|
+
const version = "5.0.0-beta.39";
|
|
137045
137506
|
const IDEMPOTENT_METHODS = /* @__PURE__ */ new Set(["GET", "HEAD"]);
|
|
137046
137507
|
const MAX_BODY_PARSE_RETRIES = 2;
|
|
137047
137508
|
const BODY_PARSE_RETRY_BASE_MS = 100;
|
|
@@ -137057,7 +137518,8 @@ const TRANSIENT_TRANSPORT_ERROR_CODES = /* @__PURE__ */ new Set([
|
|
|
137057
137518
|
"ECONNREFUSED",
|
|
137058
137519
|
"ENOTFOUND",
|
|
137059
137520
|
"EAI_AGAIN",
|
|
137060
|
-
"EPIPE"
|
|
137521
|
+
"EPIPE",
|
|
137522
|
+
"ETIMEDOUT"
|
|
137061
137523
|
]);
|
|
137062
137524
|
function getTransientTransportCode(error2) {
|
|
137063
137525
|
let current = error2;
|
|
@@ -137158,7 +137620,7 @@ async function getHttpConfig(config2) {
|
|
|
137158
137620
|
return { baseUrl, headers: headers2, usingProxy };
|
|
137159
137621
|
}
|
|
137160
137622
|
async function makeRequest({ endpoint, options = {}, config: config2 = {}, schema, data, onResponse, retryConnectTimeout = false }) {
|
|
137161
|
-
const method = options.method || "GET";
|
|
137623
|
+
const method = (options.method || "GET").toUpperCase();
|
|
137162
137624
|
const { baseUrl, headers: headers2 } = await getHttpConfig(config2);
|
|
137163
137625
|
const url2 = `${baseUrl}${endpoint}`;
|
|
137164
137626
|
return trace(`http ${method}`, { kind: await getSpanKind("CLIENT") }, async (span) => {
|
|
@@ -137175,23 +137637,33 @@ async function makeRequest({ endpoint, options = {}, config: config2 = {}, schem
|
|
|
137175
137637
|
headers2.set("Content-Type", "application/cbor");
|
|
137176
137638
|
body2 = encode$1(data);
|
|
137177
137639
|
}
|
|
137178
|
-
const canRetryRead = IDEMPOTENT_METHODS.has(method
|
|
137640
|
+
const canRetryRead = IDEMPOTENT_METHODS.has(method);
|
|
137179
137641
|
let parseResult;
|
|
137180
137642
|
let responseDiagnostics = "";
|
|
137181
137643
|
for (let attempt = 0; ; attempt++) {
|
|
137182
137644
|
headers2.set("X-Request-Time", Date.now().toString());
|
|
137183
137645
|
const timeoutSignal = AbortSignal.timeout(getRequestTimeoutMs());
|
|
137184
137646
|
const signal = options.signal ? AbortSignal.any([options.signal, timeoutSignal]) : timeoutSignal;
|
|
137185
|
-
const request2 = new Request(url2, {
|
|
137186
|
-
...options,
|
|
137187
|
-
body: body2,
|
|
137188
|
-
headers: headers2,
|
|
137189
|
-
signal
|
|
137190
|
-
});
|
|
137191
137647
|
const fetchStart = Date.now();
|
|
137192
137648
|
let response2;
|
|
137193
137649
|
try {
|
|
137194
|
-
|
|
137650
|
+
const nodeAgents = getNodeHttpAgents(config2);
|
|
137651
|
+
span == null ? void 0 : span.setAttributes({
|
|
137652
|
+
...WorkflowHttpTransport(nodeAgents ? "node-http" : "undici")
|
|
137653
|
+
});
|
|
137654
|
+
response2 = nodeAgents ? await nodeHttpFetch(url2, {
|
|
137655
|
+
method,
|
|
137656
|
+
headers: headers2,
|
|
137657
|
+
body: body2,
|
|
137658
|
+
signal,
|
|
137659
|
+
agents: nodeAgents,
|
|
137660
|
+
// Match undici's per-phase defaults (which the undici agents
|
|
137661
|
+
// inherit implicitly): without these the node:http path arms
|
|
137662
|
+
// no stalled-socket deadline.
|
|
137663
|
+
headersTimeoutMs: NODE_HTTP_HEADERS_TIMEOUT_MS,
|
|
137664
|
+
bodyTimeoutMs: NODE_HTTP_BODY_TIMEOUT_MS
|
|
137665
|
+
}) : await fetch(new Request(url2, { ...options, body: body2, headers: headers2, signal }), {
|
|
137666
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any -- undici v7 dispatcher types don't match @types/node's RequestInit
|
|
137195
137667
|
dispatcher: getDispatcher(config2)
|
|
137196
137668
|
});
|
|
137197
137669
|
} catch (error2) {
|
|
@@ -137208,10 +137680,10 @@ async function makeRequest({ endpoint, options = {}, config: config2 = {}, schem
|
|
|
137208
137680
|
await new Promise((resolve2) => setTimeout(resolve2, BODY_PARSE_RETRY_BASE_MS));
|
|
137209
137681
|
continue;
|
|
137210
137682
|
}
|
|
137211
|
-
const
|
|
137683
|
+
const transportError2 = new WorkflowWorldError(`${method} ${endpoint} transport failure after ${elapsed}ms (${transportCode})`, { url: url2, code: "TRANSPORT", cause: error2 });
|
|
137212
137684
|
span == null ? void 0 : span.setAttributes({ ...ErrorType("TRANSPORT") });
|
|
137213
|
-
(_b2 = span == null ? void 0 : span.recordException) == null ? void 0 : _b2.call(span,
|
|
137214
|
-
throw
|
|
137685
|
+
(_b2 = span == null ? void 0 : span.recordException) == null ? void 0 : _b2.call(span, transportError2);
|
|
137686
|
+
throw transportError2;
|
|
137215
137687
|
}
|
|
137216
137688
|
throw error2;
|
|
137217
137689
|
}
|
|
@@ -137224,14 +137696,15 @@ async function makeRequest({ endpoint, options = {}, config: config2 = {}, schem
|
|
|
137224
137696
|
if (!response2.ok) {
|
|
137225
137697
|
const errorData = await parseResponseBody(response2).then((r2) => r2.data).catch(() => ({}));
|
|
137226
137698
|
const errorCode = errorData.code ?? errorData.error;
|
|
137227
|
-
logCurlRepro(
|
|
137699
|
+
logCurlRepro(method, url2, headers2);
|
|
137228
137700
|
const retryAfter = parseRetryAfter(response2.headers.get("Retry-After"));
|
|
137229
|
-
const defaultMessage = (errorData.message || `${
|
|
137701
|
+
const defaultMessage = (errorData.message || `${method} ${endpoint} -> HTTP ${response2.status}: ${response2.statusText}`) + responseDiagnostics;
|
|
137230
137702
|
const error2 = errorForResponse(response2.status, defaultMessage, {
|
|
137231
137703
|
url: url2,
|
|
137232
137704
|
code: errorCode,
|
|
137233
137705
|
retryAfter,
|
|
137234
|
-
mitigated: response2.headers.get("x-vercel-mitigated")
|
|
137706
|
+
mitigated: response2.headers.get("x-vercel-mitigated"),
|
|
137707
|
+
details: errorData.details
|
|
137235
137708
|
});
|
|
137236
137709
|
span == null ? void 0 : span.setAttributes({
|
|
137237
137710
|
...ErrorType(errorCode || `HTTP ${response2.status}`)
|
|
@@ -137318,6 +137791,16 @@ function createQueryString(params) {
|
|
|
137318
137791
|
const query = params.toString();
|
|
137319
137792
|
return query ? `?${query}` : "";
|
|
137320
137793
|
}
|
|
137794
|
+
function normalizeEventIds(eventIds) {
|
|
137795
|
+
const uniqueEventIds = [...new Set(eventIds)];
|
|
137796
|
+
if (uniqueEventIds.length === 0) {
|
|
137797
|
+
throw new RangeError("eventIds must contain at least one event ID");
|
|
137798
|
+
}
|
|
137799
|
+
if (uniqueEventIds.length > ANALYTICS_EVENTS_GET_MANY_LIMIT) {
|
|
137800
|
+
throw new RangeError(`eventIds must contain at most ${ANALYTICS_EVENTS_GET_MANY_LIMIT} unique event IDs`);
|
|
137801
|
+
}
|
|
137802
|
+
return uniqueEventIds;
|
|
137803
|
+
}
|
|
137321
137804
|
function appendAttributeListParams(searchParams, params) {
|
|
137322
137805
|
if (params.workflowName) {
|
|
137323
137806
|
searchParams.set("workflowName", params.workflowName);
|
|
@@ -137398,6 +137881,15 @@ function createAnalytics(config2) {
|
|
|
137398
137881
|
schema: AnalyticsEventSchema
|
|
137399
137882
|
});
|
|
137400
137883
|
},
|
|
137884
|
+
getMany(runId, eventIds) {
|
|
137885
|
+
return makeRequest({
|
|
137886
|
+
endpoint: `/v2/analytics/runs/${encodeURIComponent(runId)}/events/get-many`,
|
|
137887
|
+
options: { method: "POST" },
|
|
137888
|
+
data: { eventIds: normalizeEventIds(eventIds) },
|
|
137889
|
+
config: config2,
|
|
137890
|
+
schema: AnalyticsEventSchema.array()
|
|
137891
|
+
});
|
|
137892
|
+
},
|
|
137401
137893
|
list(params) {
|
|
137402
137894
|
const searchParams = new URLSearchParams();
|
|
137403
137895
|
if (params.eventType) {
|
|
@@ -137785,7 +138277,7 @@ function createGetEncryptionKeyForRun(projectId, teamId, token, dispatcher2) {
|
|
|
137785
138277
|
};
|
|
137786
138278
|
}
|
|
137787
138279
|
async function getDeadline() {
|
|
137788
|
-
const { getDeadline: getDeadline2 } = await import("./index-
|
|
138280
|
+
const { getDeadline: getDeadline2 } = await import("./index-Ck5CB_wQ.js").then((n) => n.i);
|
|
137789
138281
|
return getDeadline2();
|
|
137790
138282
|
}
|
|
137791
138283
|
const WORKFLOW_SERVER_SERVICE = {
|
|
@@ -137867,6 +138359,7 @@ function instrumentObject(prefix, o) {
|
|
|
137867
138359
|
const f2 = o[key];
|
|
137868
138360
|
const methodName = String(key);
|
|
137869
138361
|
handlers2[key] = async (...args) => {
|
|
138362
|
+
var _a3;
|
|
137870
138363
|
let spanName = `${prefix}.${methodName}`;
|
|
137871
138364
|
if (prefix === "world.events" && methodName === "create") {
|
|
137872
138365
|
const eventType = extractEventType(args);
|
|
@@ -137874,13 +138367,36 @@ function instrumentObject(prefix, o) {
|
|
|
137874
138367
|
spanName = `${prefix}.${methodName} ${eventType}`;
|
|
137875
138368
|
}
|
|
137876
138369
|
}
|
|
138370
|
+
let batchAttributes;
|
|
138371
|
+
if (prefix === "world.events" && methodName === "createBatch") {
|
|
138372
|
+
const events2 = args[1];
|
|
138373
|
+
if (Array.isArray(events2)) {
|
|
138374
|
+
const counts = /* @__PURE__ */ new Map();
|
|
138375
|
+
for (const item of events2) {
|
|
138376
|
+
const eventType = (_a3 = item == null ? void 0 : item.event) == null ? void 0 : _a3.eventType;
|
|
138377
|
+
if (typeof eventType === "string") {
|
|
138378
|
+
counts.set(eventType, (counts.get(eventType) ?? 0) + 1);
|
|
138379
|
+
}
|
|
138380
|
+
}
|
|
138381
|
+
batchAttributes = {
|
|
138382
|
+
"workflow.batch.size": events2.length,
|
|
138383
|
+
// Sorted by type, so the same batch composition always renders
|
|
138384
|
+
// the same string. Map iteration is first-seen order, which
|
|
138385
|
+
// depends on frame order — a pre-claimed fold leads with a
|
|
138386
|
+
// pair while a pure eager fold leads with its creates — and an
|
|
138387
|
+
// unstable string is not groupable as a telemetry dimension.
|
|
138388
|
+
"workflow.batch.shape": [...counts].sort(([a2], [b2]) => a2 < b2 ? -1 : a2 > b2 ? 1 : 0).map(([type, count2]) => `${type}:${count2}`).join(",")
|
|
138389
|
+
};
|
|
138390
|
+
}
|
|
138391
|
+
}
|
|
137877
138392
|
return trace(spanName, { kind: await getSpanKind("CLIENT") }, async (span) => {
|
|
137878
138393
|
span == null ? void 0 : span.setAttributes({
|
|
137879
138394
|
...PeerService(WORKFLOW_SERVER_SERVICE.peerService),
|
|
137880
138395
|
...RpcSystem(WORKFLOW_SERVER_SERVICE.rpcSystem),
|
|
137881
138396
|
...RpcService(WORKFLOW_SERVER_SERVICE.rpcService),
|
|
137882
138397
|
...RpcMethod(spanName),
|
|
137883
|
-
...extractWorkflowAttributes(prefix, methodName, args)
|
|
138398
|
+
...extractWorkflowAttributes(prefix, methodName, args),
|
|
138399
|
+
...batchAttributes
|
|
137884
138400
|
});
|
|
137885
138401
|
const result = await f2(...args);
|
|
137886
138402
|
const resultRunId = getRunIdFromResult(result);
|
|
@@ -140332,14 +140848,6 @@ var MessageAlreadyProcessedError = class extends Error {
|
|
|
140332
140848
|
this.name = "MessageAlreadyProcessedError";
|
|
140333
140849
|
}
|
|
140334
140850
|
};
|
|
140335
|
-
var DuplicateMessageError = class extends Error {
|
|
140336
|
-
constructor(message2, idempotencyKey) {
|
|
140337
|
-
super(message2);
|
|
140338
|
-
__publicField(this, "idempotencyKey");
|
|
140339
|
-
this.name = "DuplicateMessageError";
|
|
140340
|
-
this.idempotencyKey = idempotencyKey;
|
|
140341
|
-
}
|
|
140342
|
-
};
|
|
140343
140851
|
var ConsumerDiscoveryError = class extends Error {
|
|
140344
140852
|
constructor(message2, deploymentId) {
|
|
140345
140853
|
super(message2);
|
|
@@ -141292,6 +141800,14 @@ function filePathToUrlPath(filePath) {
|
|
|
141292
141800
|
}
|
|
141293
141801
|
return urlPath;
|
|
141294
141802
|
}
|
|
141803
|
+
function importAtRuntime(absolutePath) {
|
|
141804
|
+
return import(
|
|
141805
|
+
/* webpackIgnore: true */
|
|
141806
|
+
/* turbopackIgnore: true */
|
|
141807
|
+
/* @vite-ignore */
|
|
141808
|
+
absolutePath
|
|
141809
|
+
);
|
|
141810
|
+
}
|
|
141295
141811
|
async function ensureHandlersLoaded(topicName, options = {}) {
|
|
141296
141812
|
const diagnostics2 = {
|
|
141297
141813
|
triedPorts: collectPrimePorts(),
|
|
@@ -141318,7 +141834,7 @@ async function ensureHandlersLoaded(topicName, options = {}) {
|
|
|
141318
141834
|
if (!alreadyRegistered) {
|
|
141319
141835
|
const absolutePath = path$2.resolve(process.cwd(), route.filePath);
|
|
141320
141836
|
try {
|
|
141321
|
-
await
|
|
141837
|
+
await importAtRuntime(absolutePath);
|
|
141322
141838
|
} catch (error2) {
|
|
141323
141839
|
diagnostics2.importFailures.push({
|
|
141324
141840
|
filePath: route.filePath,
|
|
@@ -141853,7 +142369,9 @@ function throwCommonHttpError(status, statusText, errorText, operation, badReque
|
|
|
141853
142369
|
errorText || `Server error: ${status} ${statusText}`
|
|
141854
142370
|
);
|
|
141855
142371
|
}
|
|
141856
|
-
throw new Error(
|
|
142372
|
+
throw new Error(
|
|
142373
|
+
errorText || `Failed to ${operation}: ${status} ${statusText}`
|
|
142374
|
+
);
|
|
141857
142375
|
}
|
|
141858
142376
|
function parseQueueHeaders(headers2) {
|
|
141859
142377
|
const messageId = headers2.get("Vqs-Message-Id");
|
|
@@ -142024,7 +142542,7 @@ Cause: ${cause}`
|
|
|
142024
142542
|
}
|
|
142025
142543
|
console.debug("[VQS Debug] Request:", JSON.stringify(logData, null, 2));
|
|
142026
142544
|
}
|
|
142027
|
-
init2.headers.set("User-Agent", `@vercel/queue/${"0.
|
|
142545
|
+
init2.headers.set("User-Agent", `@vercel/queue/${"0.5.0"}`);
|
|
142028
142546
|
init2.headers.set("Vqs-Client-Ts", (/* @__PURE__ */ new Date()).toISOString());
|
|
142029
142547
|
const fetchInit = this.dispatcher ? { ...init2, dispatcher: this.dispatcher } : init2;
|
|
142030
142548
|
const response2 = await fetch(url2, fetchInit);
|
|
@@ -142095,17 +142613,12 @@ Cause: ${cause}`
|
|
|
142095
142613
|
const response2 = await this.fetch(this.buildUrl(queueName), {
|
|
142096
142614
|
method: "POST",
|
|
142097
142615
|
body: body2,
|
|
142098
|
-
headers: headers2
|
|
142616
|
+
headers: headers2,
|
|
142617
|
+
...body2 instanceof ReadableStream && { duplex: "half" }
|
|
142099
142618
|
});
|
|
142100
142619
|
if (!response2.ok) {
|
|
142101
142620
|
const errorText = await response2.text();
|
|
142102
|
-
if (response2.status ===
|
|
142103
|
-
throw new DuplicateMessageError(
|
|
142104
|
-
errorText || "Duplicate idempotency key detected",
|
|
142105
|
-
idempotencyKey
|
|
142106
|
-
);
|
|
142107
|
-
}
|
|
142108
|
-
if (response2.status === 502) {
|
|
142621
|
+
if (response2.status === 502 && response2.headers.get("Vqs-Error-Code") === "consumer_discovery_failed") {
|
|
142109
142622
|
throw new ConsumerDiscoveryError(
|
|
142110
142623
|
errorText || "Consumer discovery failed",
|
|
142111
142624
|
deploymentId
|
|
@@ -142712,7 +143225,7 @@ const wsEventsChannelForInvocation = (runId, config2) => {
|
|
|
142712
143225
|
open() {
|
|
142713
143226
|
if (!runId || !isWsEventsTransportEnabled())
|
|
142714
143227
|
return;
|
|
142715
|
-
claim = import("./ws-transport-
|
|
143228
|
+
claim = import("./ws-transport-BCfcEhAO.js").then(({ openWsChannel }) => openWsChannel(runId, config2)).catch(() => void 0);
|
|
142716
143229
|
},
|
|
142717
143230
|
/**
|
|
142718
143231
|
* Awaited, unlike the open: work scheduled after the handler returns is not
|
|
@@ -142798,7 +143311,7 @@ function createQueue$1(config2) {
|
|
|
142798
143311
|
const jsonTransport = new JsonTransport2();
|
|
142799
143312
|
const dualTransport = new DualTransport();
|
|
142800
143313
|
const clientOptions = {
|
|
142801
|
-
dispatcher:
|
|
143314
|
+
dispatcher: getQueueDispatcher(config2),
|
|
142802
143315
|
transport: dualTransport,
|
|
142803
143316
|
...usingProxy && {
|
|
142804
143317
|
// final path will be /queues-proxy/api/v3/topic/...
|
|
@@ -142843,28 +143356,19 @@ function createQueue$1(config2) {
|
|
|
142843
143356
|
deploymentId: opts == null ? void 0 : opts.deploymentId
|
|
142844
143357
|
};
|
|
142845
143358
|
const sanitizedQueueName = getPhysicalQueueName(queueName, payload).replace(/[^A-Za-z0-9-_]/g, "-");
|
|
142846
|
-
|
|
142847
|
-
|
|
142848
|
-
|
|
142849
|
-
|
|
142850
|
-
|
|
142851
|
-
|
|
142852
|
-
...opts == null ? void 0 : opts.headers
|
|
142853
|
-
}
|
|
142854
|
-
});
|
|
142855
|
-
return {
|
|
142856
|
-
// messageId may be null when VQS fails over to a different region —
|
|
142857
|
-
// the event is ingested but the responding region cannot return an ID.
|
|
142858
|
-
messageId: messageId ? MessageId.parse(messageId) : null
|
|
142859
|
-
};
|
|
142860
|
-
} catch (error2) {
|
|
142861
|
-
if (error2 instanceof DuplicateMessageError) {
|
|
142862
|
-
return {
|
|
142863
|
-
messageId: MessageId.parse(`msg_duplicate_${error2.idempotencyKey ?? (opts == null ? void 0 : opts.idempotencyKey) ?? "unknown"}`)
|
|
142864
|
-
};
|
|
143359
|
+
const { messageId } = await client2.send(sanitizedQueueName, wrapper, {
|
|
143360
|
+
idempotencyKey: opts == null ? void 0 : opts.idempotencyKey,
|
|
143361
|
+
delaySeconds: opts == null ? void 0 : opts.delaySeconds,
|
|
143362
|
+
headers: {
|
|
143363
|
+
...getHeadersFromPayload(payload),
|
|
143364
|
+
...opts == null ? void 0 : opts.headers
|
|
142865
143365
|
}
|
|
142866
|
-
|
|
142867
|
-
|
|
143366
|
+
});
|
|
143367
|
+
return {
|
|
143368
|
+
// messageId may be null when the queue fails over to a different region:
|
|
143369
|
+
// the event is ingested but the responding region cannot return an ID.
|
|
143370
|
+
messageId: messageId ? MessageId.parse(messageId) : null
|
|
143371
|
+
};
|
|
142868
143372
|
};
|
|
142869
143373
|
const createQueueHandler = (_prefix, handler) => {
|
|
142870
143374
|
const client2 = new QueueClient(clientOptions);
|
|
@@ -143043,6 +143547,8 @@ const EVENT_RETRY_ELIGIBILITY = {
|
|
|
143043
143547
|
}
|
|
143044
143548
|
};
|
|
143045
143549
|
const MAX_EVENT_POST_RETRIES = 2;
|
|
143550
|
+
const THROTTLE_RETRY_BUDGET_MS = 3e4;
|
|
143551
|
+
const DEFAULT_THROTTLE_RETRY_AFTER_SECONDS = 1;
|
|
143046
143552
|
const EVENT_POST_RETRY_BASE_MS = 100;
|
|
143047
143553
|
const EVENT_POST_RETRY_JITTER_MS = 50;
|
|
143048
143554
|
const TRANSIENT_CODES = /* @__PURE__ */ new Set([
|
|
@@ -143112,33 +143618,61 @@ function errorMarker(err) {
|
|
|
143112
143618
|
}
|
|
143113
143619
|
return collectErrorMarkers(err)[0] ?? (err instanceof Error ? err.name : "unknown");
|
|
143114
143620
|
}
|
|
143115
|
-
|
|
143621
|
+
function createThrottleWaiter(eventType) {
|
|
143622
|
+
let waitedMs = 0;
|
|
143623
|
+
return async (err) => {
|
|
143624
|
+
const waitMs = Math.max(1, typeof err.retryAfter === "number" ? err.retryAfter : DEFAULT_THROTTLE_RETRY_AFTER_SECONDS) * 1e3;
|
|
143625
|
+
if (waitedMs + waitMs > THROTTLE_RETRY_BUDGET_MS) {
|
|
143626
|
+
logRetry("throttle retry budget exhausted; surfacing to the queue", {
|
|
143627
|
+
eventType,
|
|
143628
|
+
waitedMs,
|
|
143629
|
+
retryAfter: err.retryAfter
|
|
143630
|
+
});
|
|
143631
|
+
throw err;
|
|
143632
|
+
}
|
|
143633
|
+
waitedMs += waitMs;
|
|
143634
|
+
console.warn(`[workflow] Throttled (429) writing ${eventType} event; retrying in-process in ${waitMs / 1e3}s`);
|
|
143635
|
+
await sleep$1(waitMs);
|
|
143636
|
+
};
|
|
143637
|
+
}
|
|
143638
|
+
function isEligibleForTransientRetry(eventType, options) {
|
|
143116
143639
|
var _a3;
|
|
143117
|
-
|
|
143118
|
-
|
|
143640
|
+
if ((options == null ? void 0 : options.batchIdempotent) !== void 0) {
|
|
143641
|
+
return options.batchIdempotent;
|
|
143642
|
+
}
|
|
143643
|
+
return eventType === "hook_received" && (options == null ? void 0 : options.idempotentHookResume) === true || (((_a3 = EVENT_RETRY_ELIGIBILITY[eventType]) == null ? void 0 : _a3.retryable) ?? false);
|
|
143644
|
+
}
|
|
143645
|
+
async function withEventPostRetry(fn2, eventType, options) {
|
|
143646
|
+
const retryable = isEligibleForTransientRetry(eventType, options);
|
|
143647
|
+
const waitOutThrottle = createThrottleWaiter(eventType);
|
|
143648
|
+
for (let attempt = 0; ; ) {
|
|
143119
143649
|
try {
|
|
143120
143650
|
return await fn2();
|
|
143121
143651
|
} catch (err) {
|
|
143122
|
-
|
|
143123
|
-
|
|
143124
|
-
const backoff = EVENT_POST_RETRY_BASE_MS * 2 ** attempt + Math.floor(Math.random() * EVENT_POST_RETRY_JITTER_MS);
|
|
143125
|
-
logRetry("retrying event POST after transient failure", {
|
|
143126
|
-
eventType,
|
|
143127
|
-
attempt: attempt + 1,
|
|
143128
|
-
backoffMs: backoff,
|
|
143129
|
-
error: errorMarker(err)
|
|
143130
|
-
});
|
|
143131
|
-
await sleep$1(backoff);
|
|
143652
|
+
if (ThrottleError.is(err)) {
|
|
143653
|
+
await waitOutThrottle(err);
|
|
143132
143654
|
continue;
|
|
143133
143655
|
}
|
|
143134
|
-
if (
|
|
143656
|
+
if (!retryable || !isRetryableEventPostError(err)) {
|
|
143657
|
+
throw err;
|
|
143658
|
+
}
|
|
143659
|
+
if (attempt >= MAX_EVENT_POST_RETRIES) {
|
|
143135
143660
|
logRetry("exhausted in-process retries; surfacing for queue redelivery", {
|
|
143136
143661
|
eventType,
|
|
143137
143662
|
attempts: attempt + 1,
|
|
143138
143663
|
error: errorMarker(err)
|
|
143139
143664
|
});
|
|
143665
|
+
throw err;
|
|
143140
143666
|
}
|
|
143141
|
-
|
|
143667
|
+
const backoff = EVENT_POST_RETRY_BASE_MS * 2 ** attempt + Math.floor(Math.random() * EVENT_POST_RETRY_JITTER_MS);
|
|
143668
|
+
attempt++;
|
|
143669
|
+
logRetry("retrying event POST after transient failure", {
|
|
143670
|
+
eventType,
|
|
143671
|
+
attempt,
|
|
143672
|
+
backoffMs: backoff,
|
|
143673
|
+
error: errorMarker(err)
|
|
143674
|
+
});
|
|
143675
|
+
await sleep$1(backoff);
|
|
143142
143676
|
}
|
|
143143
143677
|
}
|
|
143144
143678
|
}
|
|
@@ -143158,16 +143692,24 @@ async function* decodeFrames(source) {
|
|
|
143158
143692
|
const chunks = Symbol.asyncIterator in source ? source[Symbol.asyncIterator]() : readerToIterator(source.getReader());
|
|
143159
143693
|
let buffer2 = new Uint8Array(0);
|
|
143160
143694
|
const refill = async (needed) => {
|
|
143161
|
-
|
|
143162
|
-
|
|
143163
|
-
|
|
143695
|
+
if (buffer2.byteLength >= needed)
|
|
143696
|
+
return true;
|
|
143697
|
+
const parts = [buffer2];
|
|
143698
|
+
let byteLength = buffer2.byteLength;
|
|
143699
|
+
while (byteLength < needed) {
|
|
143700
|
+
const chunk = await chunks.next();
|
|
143701
|
+
if (chunk.done)
|
|
143164
143702
|
return false;
|
|
143165
|
-
if (
|
|
143703
|
+
if (chunk.value.byteLength === 0)
|
|
143166
143704
|
continue;
|
|
143167
|
-
|
|
143168
|
-
|
|
143169
|
-
|
|
143170
|
-
|
|
143705
|
+
parts.push(chunk.value);
|
|
143706
|
+
byteLength += chunk.value.byteLength;
|
|
143707
|
+
}
|
|
143708
|
+
buffer2 = new Uint8Array(byteLength);
|
|
143709
|
+
let offset2 = 0;
|
|
143710
|
+
for (const part of parts) {
|
|
143711
|
+
buffer2.set(part, offset2);
|
|
143712
|
+
offset2 += part.byteLength;
|
|
143171
143713
|
}
|
|
143172
143714
|
return true;
|
|
143173
143715
|
};
|
|
@@ -143257,8 +143799,8 @@ function hasSerializedDataFormatPrefix(value) {
|
|
|
143257
143799
|
return format2 !== null && SERIALIZED_DATA_FORMAT_PREFIXES.has(format2);
|
|
143258
143800
|
}
|
|
143259
143801
|
function decompress(format2, payload) {
|
|
143260
|
-
const
|
|
143261
|
-
const decompress2 = format2 === ZSTD_FORMAT_PREFIX ?
|
|
143802
|
+
const zlib2 = getNodeZlib();
|
|
143803
|
+
const decompress2 = format2 === ZSTD_FORMAT_PREFIX ? zlib2 == null ? void 0 : zlib2.zstdDecompressSync : zlib2 == null ? void 0 : zlib2.gunzipSync;
|
|
143262
143804
|
if (!decompress2) {
|
|
143263
143805
|
throw new WorkflowWorldError(`Received ${format2}-compressed workflow data, but this Node.js runtime does not support ${format2} decompression. Use a compatible Node.js runtime or request unresolved data.`);
|
|
143264
143806
|
}
|
|
@@ -143370,7 +143912,7 @@ async function getStep(runId, stepId, params, config2) {
|
|
|
143370
143912
|
});
|
|
143371
143913
|
return filterStepData(step, resolveData);
|
|
143372
143914
|
}
|
|
143373
|
-
async function fetchV4(url2, init2, config2, opName) {
|
|
143915
|
+
async function fetchV4(url2, init2, config2, opName, attributes) {
|
|
143374
143916
|
const dispatcher2 = getEventsDispatcher(config2);
|
|
143375
143917
|
return instrumentedFetch({
|
|
143376
143918
|
method: init2.method,
|
|
@@ -143378,6 +143920,7 @@ async function fetchV4(url2, init2, config2, opName) {
|
|
|
143378
143920
|
headers: init2.headers,
|
|
143379
143921
|
body: init2.body,
|
|
143380
143922
|
dispatcher: dispatcher2,
|
|
143923
|
+
attributes,
|
|
143381
143924
|
// Repeated transport failures retire the shared events pool and the next
|
|
143382
143925
|
// request builds a fresh one. undici keeps a black-holed HTTP/2 session in
|
|
143383
143926
|
// service indefinitely, so without this every request routed onto it fails
|
|
@@ -143392,6 +143935,9 @@ async function fetchV4(url2, init2, config2, opName) {
|
|
|
143392
143935
|
}
|
|
143393
143936
|
const EVENT_ID_HEADER = "x-wf-event-id";
|
|
143394
143937
|
const MAX_EVENTS_HEADER = "x-wf-max-events";
|
|
143938
|
+
function eventsV4Url(baseUrl, runId, eventType) {
|
|
143939
|
+
return `${baseUrl}/v4/runs/${encodeURIComponent(runId)}/events/${encodeURIComponent(eventType)}`;
|
|
143940
|
+
}
|
|
143395
143941
|
const CreateEventV4BodyBaseSchema = object$1({
|
|
143396
143942
|
event: EventSchema,
|
|
143397
143943
|
run: WorkflowRunSchema.optional(),
|
|
@@ -143561,14 +144107,6 @@ function buildPostFrameMeta(input) {
|
|
|
143561
144107
|
meta2.sinceCursor = input.sinceCursor;
|
|
143562
144108
|
if (input.skipPreload)
|
|
143563
144109
|
meta2.skipPreload = true;
|
|
143564
|
-
if (input.stateUpdatedAt !== void 0) {
|
|
143565
|
-
meta2.stateUpdatedAt = input.stateUpdatedAt;
|
|
143566
|
-
}
|
|
143567
|
-
if (input.stateEventCount !== void 0) {
|
|
143568
|
-
meta2.stateEventCount = input.stateEventCount;
|
|
143569
|
-
}
|
|
143570
|
-
if (input.stateCursor !== void 0)
|
|
143571
|
-
meta2.stateCursor = input.stateCursor;
|
|
143572
144110
|
if (input.maxSlot !== void 0)
|
|
143573
144111
|
meta2.maxSlot = input.maxSlot;
|
|
143574
144112
|
if (input.replayDivergenceCount !== void 0) {
|
|
@@ -143577,6 +144115,9 @@ function buildPostFrameMeta(input) {
|
|
|
143577
144115
|
if (input.resumePayloadDigest !== void 0) {
|
|
143578
144116
|
meta2.resumePayloadDigest = input.resumePayloadDigest;
|
|
143579
144117
|
}
|
|
144118
|
+
if (input.viaStepDispatch !== void 0) {
|
|
144119
|
+
meta2.viaStepDispatch = input.viaStepDispatch;
|
|
144120
|
+
}
|
|
143580
144121
|
return meta2;
|
|
143581
144122
|
}
|
|
143582
144123
|
function errorFromV4Response(statusCode, responseHeaders, errorBody, opName, url2) {
|
|
@@ -143669,8 +144210,14 @@ async function postWorkflowRunEventV4(input, responseType, config2) {
|
|
|
143669
144210
|
headers2.set("Accept", V4_FRAME_CONTENT_TYPE);
|
|
143670
144211
|
}
|
|
143671
144212
|
const frame2 = encodeFrame(buildPostFrameMeta(input), input.payload ?? new Uint8Array(0));
|
|
143672
|
-
const url2 =
|
|
143673
|
-
return fetchV4(url2, { method: "POST", headers: headers2, body: frame2 }, config2, "createEvent"
|
|
144213
|
+
const url2 = eventsV4Url(baseUrl, input.runId, input.eventType);
|
|
144214
|
+
return fetchV4(url2, { method: "POST", headers: headers2, body: frame2 }, config2, "createEvent", {
|
|
144215
|
+
...WorkflowEventsTransport("http"),
|
|
144216
|
+
...WorkflowEventType(input.eventType),
|
|
144217
|
+
...WorkflowClientVersion(`@workflow/world-vercel/${version}`),
|
|
144218
|
+
...input.stso !== void 0 ? StepStsoMs(input.stso) : {},
|
|
144219
|
+
...input.optimizations !== void 0 ? StepLatencyOptimizations(input.optimizations) : {}
|
|
144220
|
+
});
|
|
143674
144221
|
}
|
|
143675
144222
|
async function createWorkflowRunEventV4(input, config2) {
|
|
143676
144223
|
if (isWsEventsTransportEnabled()) {
|
|
@@ -143714,6 +144261,56 @@ async function createWorkflowRunStartedEventV4(input, config2) {
|
|
|
143714
144261
|
}
|
|
143715
144262
|
return { events: events2, ...page, maxEvents: maxEvents.data };
|
|
143716
144263
|
}
|
|
144264
|
+
const BatchItemFailureSchema = object$1({
|
|
144265
|
+
status: number$3().int(),
|
|
144266
|
+
error: string$3(),
|
|
144267
|
+
message: string$3()
|
|
144268
|
+
});
|
|
144269
|
+
async function createWorkflowRunEventsBatchV4(input, config2) {
|
|
144270
|
+
assert$1(input.events.length > 0, "v4 createEventBatch: empty batch");
|
|
144271
|
+
const { baseUrl, headers: baseHeaders } = await getHttpConfig(config2);
|
|
144272
|
+
const headers2 = new Headers(baseHeaders);
|
|
144273
|
+
headers2.set("Content-Type", "application/octet-stream");
|
|
144274
|
+
const frames = input.events.map((event) => encodeFrame(buildPostFrameMeta(event), event.payload ?? new Uint8Array(0)));
|
|
144275
|
+
let total = 0;
|
|
144276
|
+
for (const frame2 of frames)
|
|
144277
|
+
total += frame2.byteLength;
|
|
144278
|
+
const body2 = new Uint8Array(total);
|
|
144279
|
+
let offset2 = 0;
|
|
144280
|
+
for (const frame2 of frames) {
|
|
144281
|
+
body2.set(frame2, offset2);
|
|
144282
|
+
offset2 += frame2.byteLength;
|
|
144283
|
+
}
|
|
144284
|
+
const url2 = `${baseUrl}/v4/runs/${encodeURIComponent(input.runId)}/events/batch`;
|
|
144285
|
+
const response2 = await fetchV4(url2, { method: "POST", headers: headers2, body: body2 }, config2, "createEventBatch", {
|
|
144286
|
+
...WorkflowEventsTransport("http"),
|
|
144287
|
+
"workflow.batch.bytes": body2.byteLength
|
|
144288
|
+
});
|
|
144289
|
+
const bodyBytes = new Uint8Array(await response2.arrayBuffer());
|
|
144290
|
+
const decoded = bodyBytes.byteLength > 0 ? decode$1(bodyBytes) : {};
|
|
144291
|
+
if (!Array.isArray(decoded.results) || decoded.results.length !== input.events.length) {
|
|
144292
|
+
throw new WorkflowWorldError(`v4 createEventBatch: response \`results\` length (${Array.isArray(decoded.results) ? decoded.results.length : "non-array"}) != ${input.events.length} submitted frames`, { code: "SCHEMA_VALIDATION" });
|
|
144293
|
+
}
|
|
144294
|
+
const results = decoded.results.map((raw2, index2) => {
|
|
144295
|
+
const failure = BatchItemFailureSchema.safeParse(raw2);
|
|
144296
|
+
if (failure.success && failure.data.status !== 200) {
|
|
144297
|
+
return failure.data;
|
|
144298
|
+
}
|
|
144299
|
+
if ((raw2 == null ? void 0 : raw2.status) !== 200) {
|
|
144300
|
+
throw new WorkflowWorldError(`v4 createEventBatch: result at index ${index2} is neither a success (status 200) nor a well-formed failure`, { code: "SCHEMA_VALIDATION" });
|
|
144301
|
+
}
|
|
144302
|
+
const eventType = input.events[index2].eventType;
|
|
144303
|
+
const parsed = CreateEventV4BodySchemas[eventType].safeParse(raw2);
|
|
144304
|
+
if (!parsed.success) {
|
|
144305
|
+
throw new WorkflowWorldError(`v4 createEventBatch: invalid result body at index ${index2} (${eventType})`, { code: "SCHEMA_VALIDATION", cause: parsed.error });
|
|
144306
|
+
}
|
|
144307
|
+
if (parsed.data.event.eventType !== eventType) {
|
|
144308
|
+
throw new WorkflowWorldError(`v4 createEventBatch: result at index ${index2} carries a ${parsed.data.event.eventType} event, expected ${eventType}`, { code: "SCHEMA_VALIDATION" });
|
|
144309
|
+
}
|
|
144310
|
+
return { status: 200, ...parsed.data };
|
|
144311
|
+
});
|
|
144312
|
+
return { results };
|
|
144313
|
+
}
|
|
143717
144314
|
function replyMetaToHeaderRecord(meta2) {
|
|
143718
144315
|
const out = {};
|
|
143719
144316
|
if (typeof meta2.eventId === "string")
|
|
@@ -143732,28 +144329,59 @@ function wsReplyStatus(reply, endpoint) {
|
|
|
143732
144329
|
return status;
|
|
143733
144330
|
}
|
|
143734
144331
|
async function postEventFrameOverWs(input, config2) {
|
|
143735
|
-
const { resolveWsTransport } = await import("./ws-transport-
|
|
144332
|
+
const { resolveWsTransport } = await import("./ws-transport-BCfcEhAO.js");
|
|
143736
144333
|
const { runId } = input;
|
|
143737
144334
|
const resolved = resolveWsTransport(runId, config2);
|
|
143738
144335
|
if (!resolved)
|
|
143739
144336
|
return void 0;
|
|
143740
144337
|
const { transport, wsUrl } = resolved;
|
|
143741
144338
|
const endpoint = `${wsUrl}#runs/${encodeURIComponent(runId)}/events`;
|
|
143742
|
-
|
|
143743
|
-
|
|
143744
|
-
|
|
143745
|
-
|
|
143746
|
-
|
|
143747
|
-
|
|
143748
|
-
|
|
143749
|
-
|
|
143750
|
-
|
|
143751
|
-
|
|
143752
|
-
|
|
143753
|
-
|
|
143754
|
-
|
|
143755
|
-
|
|
143756
|
-
|
|
144339
|
+
const restUrl = eventsV4Url(getHttpUrl(config2).baseUrl, runId, input.eventType);
|
|
144340
|
+
return withHttpClientSpan({
|
|
144341
|
+
method: "POST",
|
|
144342
|
+
url: restUrl,
|
|
144343
|
+
attributes: {
|
|
144344
|
+
...WorkflowEventsTransport("ws"),
|
|
144345
|
+
...WorkflowEventType(input.eventType),
|
|
144346
|
+
...WorkflowClientVersion(`@workflow/world-vercel/${version}`),
|
|
144347
|
+
...input.stso !== void 0 ? StepStsoMs(input.stso) : {},
|
|
144348
|
+
...input.optimizations !== void 0 ? StepLatencyOptimizations(input.optimizations) : {},
|
|
144349
|
+
...NetworkProtocolName("websocket"),
|
|
144350
|
+
...WorkflowWsUrl(wsUrl)
|
|
144351
|
+
}
|
|
144352
|
+
}, async (span) => {
|
|
144353
|
+
var _a3, _b2;
|
|
144354
|
+
const start2 = Date.now();
|
|
144355
|
+
let reply;
|
|
144356
|
+
try {
|
|
144357
|
+
reply = await transport.request((reqId) => {
|
|
144358
|
+
span == null ? void 0 : span.setAttributes({ ...WorkflowWsRequestId(reqId) });
|
|
144359
|
+
return encodeFrame({ reqId, type: "event", event: buildPostFrameMeta(input) }, input.payload ?? new Uint8Array(0));
|
|
144360
|
+
});
|
|
144361
|
+
} catch (err) {
|
|
144362
|
+
const error2 = new WorkflowWorldError(`POST ${endpoint} transport failure: ${err instanceof Error ? err.message : String(err)}`, { url: wsUrl, code: "TRANSPORT", cause: err });
|
|
144363
|
+
span == null ? void 0 : span.setAttributes({ ...ErrorType("TRANSPORT") });
|
|
144364
|
+
(_a3 = span == null ? void 0 : span.recordException) == null ? void 0 : _a3.call(span, error2);
|
|
144365
|
+
throw error2;
|
|
144366
|
+
}
|
|
144367
|
+
const ms2 = Date.now() - start2;
|
|
144368
|
+
const status = wsReplyStatus(reply, endpoint);
|
|
144369
|
+
const headerRecord = replyMetaToHeaderRecord(reply.meta);
|
|
144370
|
+
const headers2 = {
|
|
144371
|
+
get: (name2) => headerRecord[name2.toLowerCase()] ?? null
|
|
144372
|
+
};
|
|
144373
|
+
httpLog("POST", "createEvent", { status, headers: headers2 }, ms2);
|
|
144374
|
+
recordClientSpanStatus(span, status);
|
|
144375
|
+
if (status < 200 || status >= 300) {
|
|
144376
|
+
const error2 = errorFromV4Response(status, headerRecord, new TextDecoder().decode(reply.body), "createEvent", endpoint);
|
|
144377
|
+
(_b2 = span == null ? void 0 : span.recordException) == null ? void 0 : _b2.call(span, error2);
|
|
144378
|
+
throw error2;
|
|
144379
|
+
}
|
|
144380
|
+
return {
|
|
144381
|
+
headers: headers2,
|
|
144382
|
+
arrayBuffer: async () => reply.body.slice().buffer
|
|
144383
|
+
};
|
|
144384
|
+
});
|
|
143757
144385
|
}
|
|
143758
144386
|
async function createHookReceivedPreloadEventV4(input, config2) {
|
|
143759
144387
|
const response2 = await postWorkflowRunEventV4({ ...input, eventType: "hook_received" }, "event-stream", config2);
|
|
@@ -144172,6 +144800,59 @@ async function getWorkflowRunEvents(params, config2) {
|
|
|
144172
144800
|
hasMore: result.hasMore
|
|
144173
144801
|
};
|
|
144174
144802
|
}
|
|
144803
|
+
async function createWorkflowRunEventBatch(runId, events2, params, config2) {
|
|
144804
|
+
if (events2.length === 0) {
|
|
144805
|
+
throw new WorkflowWorldError("world-vercel: createBatch requires at least one event", { status: 400 });
|
|
144806
|
+
}
|
|
144807
|
+
if (events2.some(({ event }) => event.eventType === "hook_received")) {
|
|
144808
|
+
throw new WorkflowWorldError("world-vercel: hook_received cannot be batched (it has no entity condition, so a batch retry would append the delivery twice); send it through the single-event path", { status: 400 });
|
|
144809
|
+
}
|
|
144810
|
+
const inputs = events2.map(({ event, occurredAt, computeInstanceId }) => {
|
|
144811
|
+
const { payload, meta: meta2 } = splitEventDataForV4(event);
|
|
144812
|
+
return {
|
|
144813
|
+
runId,
|
|
144814
|
+
eventType: event.eventType,
|
|
144815
|
+
specVersion: event.specVersion ?? 2,
|
|
144816
|
+
...event.correlationId ? { correlationId: event.correlationId } : {},
|
|
144817
|
+
// Under slot identity this is the source of the durable createdAt, so
|
|
144818
|
+
// the caller's logical time is what every replay observes.
|
|
144819
|
+
occurredAt: occurredAt ?? /* @__PURE__ */ new Date(),
|
|
144820
|
+
// Per-event compute attribution (pre-claimed inline starts) — rides the
|
|
144821
|
+
// frame meta exactly like the single POST's CreateEventParams field.
|
|
144822
|
+
...computeInstanceId !== void 0 ? { computeInstanceId } : {},
|
|
144823
|
+
// Batch responses carry entities for bookkeeping, not payload reads —
|
|
144824
|
+
// default to lazy refs unless the caller explicitly asks for resolved
|
|
144825
|
+
// data (the same `resolveData` mapping the read paths use).
|
|
144826
|
+
remoteRefBehavior: (params == null ? void 0 : params.resolveData) === "all" ? "resolve" : "lazy",
|
|
144827
|
+
// Per-write request attribution, exactly like the single POST's
|
|
144828
|
+
// `params.requestId` → `vercelId` threading — stamped per frame so
|
|
144829
|
+
// batched usage facts carry the same attribution.
|
|
144830
|
+
...(params == null ? void 0 : params.requestId) ? { vercelId: params.requestId } : {},
|
|
144831
|
+
payload,
|
|
144832
|
+
...meta2
|
|
144833
|
+
};
|
|
144834
|
+
});
|
|
144835
|
+
const retryConvergent = events2.every(({ event }) => event.eventType !== "step_started" && event.eventType !== "step_retrying");
|
|
144836
|
+
const wire = await withEventPostRetry(() => createWorkflowRunEventsBatchV4({ runId, events: inputs }, config2), events2[0].event.eventType, { batchIdempotent: retryConvergent });
|
|
144837
|
+
return {
|
|
144838
|
+
results: wire.results.map((item) => {
|
|
144839
|
+
if (item.error !== void 0) {
|
|
144840
|
+
return {
|
|
144841
|
+
status: item.status,
|
|
144842
|
+
error: item.error,
|
|
144843
|
+
message: item.message
|
|
144844
|
+
};
|
|
144845
|
+
}
|
|
144846
|
+
return {
|
|
144847
|
+
status: 200,
|
|
144848
|
+
event: item.event,
|
|
144849
|
+
...item.run ? { run: item.run } : {},
|
|
144850
|
+
...item.step ? { step: item.step } : {},
|
|
144851
|
+
...item.wait ? { wait: item.wait } : {}
|
|
144852
|
+
};
|
|
144853
|
+
})
|
|
144854
|
+
};
|
|
144855
|
+
}
|
|
144175
144856
|
async function createWorkflowRunEvent(id2, data, params, config2) {
|
|
144176
144857
|
var _a3, _b2;
|
|
144177
144858
|
try {
|
|
@@ -144237,11 +144918,7 @@ async function createWorkflowRunEventInner(id2, data, params, config2) {
|
|
|
144237
144918
|
...data.correlationId ? { correlationId: data.correlationId } : {},
|
|
144238
144919
|
...(params == null ? void 0 : params.requestId) ? { vercelId: params.requestId } : {},
|
|
144239
144920
|
...(params == null ? void 0 : params.computeInstanceId) ? { computeInstanceId: params.computeInstanceId } : {},
|
|
144240
|
-
|
|
144241
|
-
stateEventCount: params == null ? void 0 : params.stateEventCount,
|
|
144242
|
-
...(params == null ? void 0 : params.stateCursor) ? { stateCursor: params.stateCursor } : {},
|
|
144243
|
-
// Slot-identity snapshot. The runtime sends `eventCount` instead of the
|
|
144244
|
-
// watermark triple once the run's own ids are slot-shaped; it rides as
|
|
144921
|
+
// Slot-identity snapshot: how much of the log the writer held. Rides as
|
|
144245
144922
|
// `maxSlot` because the v4 meta already has an unrelated telemetry
|
|
144246
144923
|
// `eventCount`.
|
|
144247
144924
|
...(params == null ? void 0 : params.eventCount) !== void 0 ? { maxSlot: params.eventCount } : {},
|
|
@@ -144257,6 +144934,11 @@ async function createWorkflowRunEventInner(id2, data, params, config2) {
|
|
|
144257
144934
|
...(params == null ? void 0 : params.sinceCursor) ? { sinceCursor: params.sinceCursor } : {},
|
|
144258
144935
|
...(params == null ? void 0 : params.resumeId) ? { resumeId: params.resumeId } : {},
|
|
144259
144936
|
...(params == null ? void 0 : params.resumePayloadDigest) ? { resumePayloadDigest: params.resumePayloadDigest } : {},
|
|
144937
|
+
// Resilient step dispatch re-ensure marker (step_created only). Advisory
|
|
144938
|
+
// — the server MAY refuse it with 410 → RunExpiredError as
|
|
144939
|
+
// defense-in-depth when it recorded a 412 rejection for this correlation
|
|
144940
|
+
// id and no step entity exists.
|
|
144941
|
+
...(params == null ? void 0 : params.viaStepDispatch) ? { viaStepDispatch: true } : {},
|
|
144260
144942
|
remoteRefBehavior,
|
|
144261
144943
|
payload,
|
|
144262
144944
|
...meta2
|
|
@@ -144431,6 +145113,7 @@ function createStorage(config2) {
|
|
|
144431
145113
|
},
|
|
144432
145114
|
events: {
|
|
144433
145115
|
create: (runId, data, params) => createWorkflowRunEvent(runId, data, params, config2),
|
|
145116
|
+
createBatch: (runId, events2, params) => createWorkflowRunEventBatch(runId, events2, params, config2),
|
|
144434
145117
|
get: (runId, eventId, params) => getEvent(runId, eventId, params, config2),
|
|
144435
145118
|
list: (params) => getWorkflowRunEvents(params, config2),
|
|
144436
145119
|
listByCorrelationId: (params) => getWorkflowRunEvents(params, config2)
|
|
@@ -144467,6 +145150,17 @@ function streamSpanAttributes(args) {
|
|
|
144467
145150
|
...typeof args.startIndex === "number" ? WorkflowStreamStartIndex(args.startIndex) : {}
|
|
144468
145151
|
};
|
|
144469
145152
|
}
|
|
145153
|
+
async function createStreamReadError(response2) {
|
|
145154
|
+
const fallback = `Failed to fetch stream: ${response2.status}`;
|
|
145155
|
+
if (response2.status !== 410)
|
|
145156
|
+
return new Error(fallback);
|
|
145157
|
+
try {
|
|
145158
|
+
const body2 = await response2.json();
|
|
145159
|
+
return errorForResponse(response2.status, typeof body2.message === "string" ? body2.message : fallback, { code: body2.error, details: body2.details });
|
|
145160
|
+
} catch {
|
|
145161
|
+
return new Error(fallback);
|
|
145162
|
+
}
|
|
145163
|
+
}
|
|
144470
145164
|
function createStreamRequestError(operation, url2, response2, text2) {
|
|
144471
145165
|
const context = [
|
|
144472
145166
|
`PUT ${url2.origin}${url2.pathname}`,
|
|
@@ -144593,6 +145287,7 @@ function createStreamer(config2) {
|
|
|
144593
145287
|
},
|
|
144594
145288
|
async get(runId, name2, startIndex) {
|
|
144595
145289
|
const httpConfig = await getHttpConfig(config2);
|
|
145290
|
+
httpConfig.headers.set("Accept", "application/json");
|
|
144596
145291
|
const url2 = getStreamReadUrl(name2, runId, httpConfig);
|
|
144597
145292
|
if (typeof startIndex === "number") {
|
|
144598
145293
|
url2.searchParams.set("startIndex", String(startIndex));
|
|
@@ -144611,7 +145306,7 @@ function createStreamer(config2) {
|
|
|
144611
145306
|
operation: "read",
|
|
144612
145307
|
startIndex
|
|
144613
145308
|
}),
|
|
144614
|
-
buildError:
|
|
145309
|
+
buildError: createStreamReadError
|
|
144615
145310
|
});
|
|
144616
145311
|
if (!response2.body) {
|
|
144617
145312
|
throw new Error("No response body for stream");
|
|
@@ -144663,31 +145358,25 @@ function createWorld$1(config2) {
|
|
|
144663
145358
|
var _a3, _b2;
|
|
144664
145359
|
const projectId = ((_a3 = config2 == null ? void 0 : config2.projectConfig) == null ? void 0 : _a3.projectId) || process.env.VERCEL_PROJECT_ID;
|
|
144665
145360
|
return {
|
|
144666
|
-
//
|
|
144667
|
-
//
|
|
144668
|
-
//
|
|
144669
|
-
//
|
|
144670
|
-
//
|
|
144671
|
-
|
|
145361
|
+
// The version is what tells the backend which id scheme a run uses: it is
|
|
145362
|
+
// stamped on `run_created` and read back on every later write, so a run
|
|
145363
|
+
// created before spec 6 keeps its ULIDs for its whole life even though this
|
|
145364
|
+
// adapter now asks for slot-numbered ids.
|
|
145365
|
+
//
|
|
145366
|
+
// Declared as the runtime's current version rather than as the literal
|
|
145367
|
+
// version that introduced slots: a bump has to move this declaration with
|
|
145368
|
+
// it, or the runtime's compatibility floor rises past the adapter shipped
|
|
145369
|
+
// alongside it and rejects it (see `assertWorldSupportsRuntimeProtocol`).
|
|
145370
|
+
specVersion: SPEC_VERSION_CURRENT,
|
|
144672
145371
|
capabilities: {
|
|
144673
145372
|
hookRetention: { active: true },
|
|
144674
|
-
// workflow-server enforces the `stateUpdatedAt` optimistic-concurrency
|
|
144675
|
-
// guard: creations carrying a stale snapshot are rejected with 412
|
|
144676
|
-
// (PreconditionFailedError) when the run's outside-event marker is
|
|
144677
|
-
// newer. See vercel/workflow-server#484.
|
|
144678
|
-
preconditionGuard: true,
|
|
144679
145373
|
// Vercel Queues supports maxConcurrency-limited consumers, which
|
|
144680
145374
|
// WORKFLOW_SEQUENTIAL_REPLAYS=1 uses for per-run `maxConcurrency: 1`
|
|
144681
145375
|
// flow topics (see queue.ts and @workflow/builders).
|
|
144682
145376
|
maxConcurrency: true,
|
|
144683
145377
|
// Vercel deployments are atomic and immutable, so a deployment id names
|
|
144684
145378
|
// one fixed build for its whole lifetime.
|
|
144685
|
-
deploymentAffinity: true
|
|
144686
|
-
// New runs get dense per-run slot event ids. Runs created before the
|
|
144687
|
-
// backend adopted them keep their ULIDs; the scheme is pinned by the
|
|
144688
|
-
// spec version stamped on each run, not by this flag, which only says
|
|
144689
|
-
// what new runs get.
|
|
144690
|
-
slotEventIds: true
|
|
145379
|
+
deploymentAffinity: true
|
|
144691
145380
|
// NOTE: the backend half of resumeHook()'s parallel fast path — that
|
|
144692
145381
|
// the server enforces the `(runId, resumeId)` dedup constraint — is
|
|
144693
145382
|
// NO LONGER a static world capability here. It is attested per-lookup by
|
|
@@ -144838,7 +145527,7 @@ const getWorld = async () => {
|
|
|
144838
145527
|
const GetWorldFnKey = Symbol.for("@workflow/world//getWorldFn");
|
|
144839
145528
|
globalThis[GetWorldFnKey] ?? (globalThis[GetWorldFnKey] = getWorld);
|
|
144840
145529
|
function waitUntil(promise2) {
|
|
144841
|
-
void import("./index-
|
|
145530
|
+
void import("./index-Ck5CB_wQ.js").then((n) => n.i).then(({ waitUntil: waitUntil2 }) => {
|
|
144842
145531
|
waitUntil2(promise2);
|
|
144843
145532
|
});
|
|
144844
145533
|
}
|
|
@@ -147614,9 +148303,9 @@ async function getHookByToken(token) {
|
|
|
147614
148303
|
return hook;
|
|
147615
148304
|
}
|
|
147616
148305
|
async function resumeHook$2(tokenOrHook, payload, encryptionKeyOverride) {
|
|
147617
|
-
return resumeHookImpl(tokenOrHook, payload, encryptionKeyOverride, false);
|
|
148306
|
+
return resumeHookImpl(tokenOrHook, payload, encryptionKeyOverride, false, Date.now());
|
|
147618
148307
|
}
|
|
147619
|
-
async function resumeHookImpl(tokenOrHook, payload, encryptionKeyOverride, hookFreshlyLookedUp) {
|
|
148308
|
+
async function resumeHookImpl(tokenOrHook, payload, encryptionKeyOverride, hookFreshlyLookedUp, resumeRequestedAtMs) {
|
|
147620
148309
|
return await waitedUntil(() => {
|
|
147621
148310
|
return trace$2("hook.resume", async (span) => {
|
|
147622
148311
|
var _a3, _b2, _c2;
|
|
@@ -147705,23 +148394,24 @@ async function resumeHookImpl(tokenOrHook, payload, encryptionKeyOverride, hookF
|
|
|
147705
148394
|
}
|
|
147706
148395
|
throw err;
|
|
147707
148396
|
}
|
|
148397
|
+
const queuePublishRequestedAtMs = Date.now();
|
|
147708
148398
|
await world.queue(queueName, {
|
|
147709
148399
|
runId: hook.runId,
|
|
147710
|
-
traceCarrier: resumeContext.traceCarrier ?? void 0
|
|
148400
|
+
traceCarrier: resumeContext.traceCarrier ?? void 0,
|
|
148401
|
+
hookResumeTiming: {
|
|
148402
|
+
resumeRequestedAtMs,
|
|
148403
|
+
queuePublishRequestedAtMs,
|
|
148404
|
+
strategy: "sequential"
|
|
148405
|
+
}
|
|
147711
148406
|
}, queueOptions);
|
|
147712
148407
|
return hook;
|
|
147713
148408
|
}
|
|
147714
148409
|
const resumeId = generateResumeId();
|
|
147715
148410
|
const payloadDigest = await computeResumePayloadDigest(dehydratedPayload);
|
|
147716
148411
|
span == null ? void 0 : span.setAttributes({ "workflow.hook.resume_id": resumeId });
|
|
147717
|
-
const
|
|
147718
|
-
|
|
147719
|
-
|
|
147720
|
-
specVersion: SPEC_VERSION_CURRENT,
|
|
147721
|
-
correlationId: hook.hookId,
|
|
147722
|
-
eventData
|
|
147723
|
-
}, { v1Compat, resumeId, resumePayloadDigest: payloadDigest }),
|
|
147724
|
-
world.queue(queueName, {
|
|
148412
|
+
const publishInvocation = () => {
|
|
148413
|
+
const queuePublishRequestedAtMs = Date.now();
|
|
148414
|
+
return world.queue(queueName, {
|
|
147725
148415
|
runId: hook.runId,
|
|
147726
148416
|
traceCarrier: resumeContext.traceCarrier ?? void 0,
|
|
147727
148417
|
hookInput: {
|
|
@@ -147734,8 +148424,22 @@ async function resumeHookImpl(tokenOrHook, payload, encryptionKeyOverride, hookF
|
|
|
147734
148424
|
// check: lets a misrouted delivery re-route before its
|
|
147735
148425
|
// hoisted hook_received write instead of after.
|
|
147736
148426
|
deploymentId: resumeContext.deploymentId
|
|
148427
|
+
},
|
|
148428
|
+
hookResumeTiming: {
|
|
148429
|
+
resumeRequestedAtMs,
|
|
148430
|
+
queuePublishRequestedAtMs,
|
|
148431
|
+
strategy: "parallel"
|
|
147737
148432
|
}
|
|
147738
|
-
}, queueOptions)
|
|
148433
|
+
}, queueOptions);
|
|
148434
|
+
};
|
|
148435
|
+
const [eventResult, queueResult] = await Promise.allSettled([
|
|
148436
|
+
world.events.create(hook.runId, {
|
|
148437
|
+
eventType: "hook_received",
|
|
148438
|
+
specVersion: SPEC_VERSION_CURRENT,
|
|
148439
|
+
correlationId: hook.hookId,
|
|
148440
|
+
eventData
|
|
148441
|
+
}, { v1Compat, resumeId, resumePayloadDigest: payloadDigest }),
|
|
148442
|
+
publishInvocation()
|
|
147739
148443
|
]);
|
|
147740
148444
|
if (queueResult.status === "rejected") {
|
|
147741
148445
|
throw queueResult.reason;
|
|
@@ -147775,6 +148479,7 @@ async function resumeHookImpl(tokenOrHook, payload, encryptionKeyOverride, hookF
|
|
|
147775
148479
|
});
|
|
147776
148480
|
}
|
|
147777
148481
|
async function resumeWebhook(token, request2) {
|
|
148482
|
+
const resumeRequestedAtMs = Date.now();
|
|
147778
148483
|
const { hook, encryptionKey } = await getHookByTokenWithKey(token);
|
|
147779
148484
|
if (hook.isWebhook === false) {
|
|
147780
148485
|
throw new HookNotFoundError(token);
|
|
@@ -147794,7 +148499,7 @@ async function resumeWebhook(token, request2) {
|
|
|
147794
148499
|
} else {
|
|
147795
148500
|
response2 = new Response(null, { status: 202 });
|
|
147796
148501
|
}
|
|
147797
|
-
await resumeHookImpl(hook, request2, encryptionKey, true);
|
|
148502
|
+
await resumeHookImpl(hook, request2, encryptionKey, true, resumeRequestedAtMs);
|
|
147798
148503
|
if (responseReadable) {
|
|
147799
148504
|
const reader = responseReadable.getReader();
|
|
147800
148505
|
const chunk = await reader.read();
|
|
@@ -148242,6 +148947,10 @@ async function wakeUpRun$2(world, runId, options) {
|
|
|
148242
148947
|
}
|
|
148243
148948
|
}
|
|
148244
148949
|
const RETURN_VALUE_POLL_INTERVAL_MS = 1e3;
|
|
148950
|
+
const PAYLOAD_TERMINAL_RUN_STATUSES = /* @__PURE__ */ new Set([
|
|
148951
|
+
"completed",
|
|
148952
|
+
"failed"
|
|
148953
|
+
]);
|
|
148245
148954
|
function getReturnValuePollIntervalMs() {
|
|
148246
148955
|
return envNumber("WORKFLOW_RETURN_VALUE_POLL_INTERVAL_MS", RETURN_VALUE_POLL_INTERVAL_MS, { integer: true, min: 1 });
|
|
148247
148956
|
}
|
|
@@ -148324,7 +149033,7 @@ const _Run = class _Run {
|
|
|
148324
149033
|
*/
|
|
148325
149034
|
get status() {
|
|
148326
149035
|
"use step";
|
|
148327
|
-
return __privateGet(this, _Run_instances, lazyWorldPromise_get).then((world) => world.runs.get(this.runId).then((run2) => run2.status));
|
|
149036
|
+
return __privateGet(this, _Run_instances, lazyWorldPromise_get).then((world) => world.runs.get(this.runId, { resolveData: "none" }).then((run2) => run2.status));
|
|
148328
149037
|
}
|
|
148329
149038
|
/**
|
|
148330
149039
|
* The return value of the workflow run.
|
|
@@ -148417,13 +149126,13 @@ _resilientStart = new WeakMap();
|
|
|
148417
149126
|
* to be resolved once.
|
|
148418
149127
|
* @internal
|
|
148419
149128
|
*/
|
|
148420
|
-
getEncryptionKey_fn = function() {
|
|
149129
|
+
getEncryptionKey_fn = function(run2) {
|
|
148421
149130
|
if (!__privateGet(this, _encryptionKeyPromise)) {
|
|
148422
149131
|
__privateSet(this, _encryptionKeyPromise, (async () => {
|
|
148423
149132
|
var _a3;
|
|
148424
149133
|
const world = await __privateGet(this, _Run_instances, lazyWorldPromise_get);
|
|
148425
|
-
const
|
|
148426
|
-
const rawKey = await ((_a3 = world.getEncryptionKeyForRun) == null ? void 0 : _a3.call(world,
|
|
149134
|
+
const runData = run2 ?? await world.runs.get(this.runId);
|
|
149135
|
+
const rawKey = await ((_a3 = world.getEncryptionKeyForRun) == null ? void 0 : _a3.call(world, runData));
|
|
148427
149136
|
return rawKey ? await deriveRunPayloadKeys(rawKey) : void 0;
|
|
148428
149137
|
})());
|
|
148429
149138
|
}
|
|
@@ -148438,6 +149147,28 @@ getEncryptionKey_fn = function() {
|
|
|
148438
149147
|
getEncryptionKeyLazily_fn = function() {
|
|
148439
149148
|
return () => __privateMethod(this, _Run_instances, getEncryptionKey_fn).call(this);
|
|
148440
149149
|
};
|
|
149150
|
+
resolveTerminalReturnValue_fn = async function(run2) {
|
|
149151
|
+
if (run2.status === "completed") {
|
|
149152
|
+
const encryptionKey = await __privateMethod(this, _Run_instances, getEncryptionKey_fn).call(this, run2);
|
|
149153
|
+
return await hydrateWorkflowReturnValue(run2.output, this.runId, encryptionKey);
|
|
149154
|
+
}
|
|
149155
|
+
if (run2.status === "cancelled") {
|
|
149156
|
+
throw new WorkflowRunCancelledError(this.runId);
|
|
149157
|
+
}
|
|
149158
|
+
if (run2.status === "failed") {
|
|
149159
|
+
const encryptionKey = await __privateMethod(this, _Run_instances, getEncryptionKey_fn).call(this, run2);
|
|
149160
|
+
let hydratedError;
|
|
149161
|
+
try {
|
|
149162
|
+
hydratedError = await hydrateRunError(run2.error, this.runId, encryptionKey);
|
|
149163
|
+
} catch {
|
|
149164
|
+
hydratedError = new Error("Failed to hydrate workflow run error");
|
|
149165
|
+
}
|
|
149166
|
+
throw new WorkflowRunFailedError(this.runId, hydratedError, {
|
|
149167
|
+
errorCode: run2.errorCode
|
|
149168
|
+
});
|
|
149169
|
+
}
|
|
149170
|
+
throw new WorkflowRunNotCompletedError(this.runId, run2.status);
|
|
149171
|
+
};
|
|
148441
149172
|
pollReturnValue_fn = async function() {
|
|
148442
149173
|
const world = await __privateGet(this, _Run_instances, lazyWorldPromise_get);
|
|
148443
149174
|
let notFoundRetries = 0;
|
|
@@ -148445,27 +149176,19 @@ pollReturnValue_fn = async function() {
|
|
|
148445
149176
|
const NOT_FOUND_DELAYS = [1e3, 3e3, 6e3];
|
|
148446
149177
|
while (true) {
|
|
148447
149178
|
try {
|
|
148448
|
-
const
|
|
148449
|
-
|
|
148450
|
-
|
|
148451
|
-
|
|
148452
|
-
}
|
|
148453
|
-
if (run2.status === "cancelled") {
|
|
149179
|
+
const runMetadata = await world.runs.get(this.runId, {
|
|
149180
|
+
resolveData: "none"
|
|
149181
|
+
});
|
|
149182
|
+
if (runMetadata.status === "cancelled") {
|
|
148454
149183
|
throw new WorkflowRunCancelledError(this.runId);
|
|
148455
149184
|
}
|
|
148456
|
-
if (
|
|
148457
|
-
const
|
|
148458
|
-
|
|
148459
|
-
try {
|
|
148460
|
-
hydratedError = await hydrateRunError(run2.error, this.runId, encryptionKey);
|
|
148461
|
-
} catch {
|
|
148462
|
-
hydratedError = new Error("Failed to hydrate workflow run error");
|
|
148463
|
-
}
|
|
148464
|
-
throw new WorkflowRunFailedError(this.runId, hydratedError, {
|
|
148465
|
-
errorCode: run2.errorCode
|
|
149185
|
+
if (PAYLOAD_TERMINAL_RUN_STATUSES.has(runMetadata.status)) {
|
|
149186
|
+
const run2 = await world.runs.get(this.runId, {
|
|
149187
|
+
resolveData: "all"
|
|
148466
149188
|
});
|
|
149189
|
+
return await __privateMethod(this, _Run_instances, resolveTerminalReturnValue_fn).call(this, run2);
|
|
148467
149190
|
}
|
|
148468
|
-
throw new WorkflowRunNotCompletedError(this.runId,
|
|
149191
|
+
throw new WorkflowRunNotCompletedError(this.runId, runMetadata.status);
|
|
148469
149192
|
} catch (error2) {
|
|
148470
149193
|
if (WorkflowRunNotCompletedError.is(error2)) {
|
|
148471
149194
|
await new Promise((resolve2) => setTimeout(resolve2, getReturnValuePollIntervalMs()));
|
|
@@ -171693,7 +172416,7 @@ const route4 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProper
|
|
|
171693
172416
|
__proto__: null,
|
|
171694
172417
|
loader
|
|
171695
172418
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
171696
|
-
const serverManifest = { "entry": { "module": "/assets/entry.client-LwI3HNYl.js", "imports": ["/assets/index-PFjW8YjQ.js"], "css": [] }, "routes": { "root": { "id": "root", "parentId": void 0, "path": "", "index": void 0, "caseSensitive": void 0, "hasAction": true, "hasLoader": true, "hasClientAction": false, "hasClientLoader": false, "hasClientMiddleware": false, "hasDefaultExport": true, "hasErrorBoundary": true, "module": "/assets/root-
|
|
172419
|
+
const serverManifest = { "entry": { "module": "/assets/entry.client-LwI3HNYl.js", "imports": ["/assets/index-PFjW8YjQ.js"], "css": [] }, "routes": { "root": { "id": "root", "parentId": void 0, "path": "", "index": void 0, "caseSensitive": void 0, "hasAction": true, "hasLoader": true, "hasClientAction": false, "hasClientLoader": false, "hasClientMiddleware": false, "hasDefaultExport": true, "hasErrorBoundary": true, "module": "/assets/root-BfhMCbkz.js", "imports": ["/assets/index-PFjW8YjQ.js", "/assets/mermaid-3ZIDBTTL-gEw-Ch1C.js", "/assets/loader-circle-BOxaTUjK.js", "/assets/arrow-up-right-D39pnGsD.js"], "css": ["/assets/root-Bl5xphvU.css", "/assets/mermaid-3ZIDBTTL-D8CjRQta.css"], "clientActionModule": void 0, "clientLoaderModule": void 0, "clientMiddlewareModule": void 0, "hydrateFallbackModule": void 0 }, "routes/home": { "id": "routes/home", "parentId": "root", "path": void 0, "index": true, "caseSensitive": void 0, "hasAction": false, "hasLoader": false, "hasClientAction": false, "hasClientLoader": false, "hasClientMiddleware": false, "hasDefaultExport": true, "hasErrorBoundary": false, "module": "/assets/home-C6CuMqQu.js", "imports": ["/assets/index-PFjW8YjQ.js", "/assets/workflow-graph-viewer-CxrWityD.js", "/assets/mermaid-3ZIDBTTL-gEw-Ch1C.js", "/assets/loader-circle-BOxaTUjK.js"], "css": ["/assets/workflow-graph-viewer-DnlNuQQH.css", "/assets/mermaid-3ZIDBTTL-D8CjRQta.css"], "clientActionModule": void 0, "clientLoaderModule": void 0, "clientMiddlewareModule": void 0, "hydrateFallbackModule": void 0 }, "routes/run-detail": { "id": "routes/run-detail", "parentId": "root", "path": "run/:runId", "index": void 0, "caseSensitive": void 0, "hasAction": false, "hasLoader": false, "hasClientAction": false, "hasClientLoader": false, "hasClientMiddleware": false, "hasDefaultExport": true, "hasErrorBoundary": false, "module": "/assets/run-detail-BG_1K2Hq.js", "imports": ["/assets/index-PFjW8YjQ.js", "/assets/workflow-graph-viewer-CxrWityD.js", "/assets/mermaid-3ZIDBTTL-gEw-Ch1C.js", "/assets/arrow-up-right-D39pnGsD.js"], "css": ["/assets/run-detail-CWoGxu_0.css", "/assets/workflow-graph-viewer-DnlNuQQH.css", "/assets/mermaid-3ZIDBTTL-D8CjRQta.css"], "clientActionModule": void 0, "clientLoaderModule": void 0, "clientMiddlewareModule": void 0, "hydrateFallbackModule": void 0 }, "routes/api.rpc": { "id": "routes/api.rpc", "parentId": "root", "path": "api/rpc", "index": void 0, "caseSensitive": void 0, "hasAction": true, "hasLoader": true, "hasClientAction": false, "hasClientLoader": false, "hasClientMiddleware": false, "hasDefaultExport": false, "hasErrorBoundary": false, "module": "/assets/api.rpc-l0sNRNKZ.js", "imports": [], "css": [], "clientActionModule": void 0, "clientLoaderModule": void 0, "clientMiddlewareModule": void 0, "hydrateFallbackModule": void 0 }, "routes/api.stream.$streamId": { "id": "routes/api.stream.$streamId", "parentId": "root", "path": "api/stream/:streamId", "index": void 0, "caseSensitive": void 0, "hasAction": false, "hasLoader": true, "hasClientAction": false, "hasClientLoader": false, "hasClientMiddleware": false, "hasDefaultExport": false, "hasErrorBoundary": false, "module": "/assets/api.stream._streamId-l0sNRNKZ.js", "imports": [], "css": [], "clientActionModule": void 0, "clientLoaderModule": void 0, "clientMiddlewareModule": void 0, "hydrateFallbackModule": void 0 } }, "url": "/assets/manifest-157e28f1.js", "version": "157e28f1", "sri": void 0 };
|
|
171697
172420
|
const assetsBuildDirectory = "build/client";
|
|
171698
172421
|
const basename = "/";
|
|
171699
172422
|
const future = { "unstable_optimizeDeps": false, "unstable_subResourceIntegrity": false, "unstable_trailingSlashAwareDataRequests": false, "unstable_previewServerPrerendering": false, "v8_middleware": false, "v8_splitRouteModules": false, "v8_viteEnvironmentApi": false };
|
|
@@ -171902,128 +172625,139 @@ function createFetchHandler(basename2 = "/") {
|
|
|
171902
172625
|
return (request2) => handler(request2, loadContext);
|
|
171903
172626
|
}
|
|
171904
172627
|
export {
|
|
171905
|
-
|
|
171906
|
-
|
|
172628
|
+
SPEC_VERSION_SUPPORTS_COMPRESSION as $,
|
|
172629
|
+
ANALYTICS_EVENTS_GET_MANY_LIMIT as A,
|
|
171907
172630
|
BULK_CANCEL_MAX_RUN_IDS as B,
|
|
171908
172631
|
CHILD_ENTITY_CREATION_EVENT_TYPES as C,
|
|
171909
172632
|
DEFAULT_TIMESTAMP_THRESHOLD_FUTURE_MS as D,
|
|
171910
172633
|
EVENT_DATA_PAYLOAD_FIELD_BY_EVENT_TYPE as E,
|
|
171911
172634
|
FIRST_EVENT_SLOT as F,
|
|
171912
|
-
|
|
172635
|
+
HealthCheckPayloadSchema as G,
|
|
171913
172636
|
HookSchema as H,
|
|
171914
|
-
|
|
171915
|
-
|
|
171916
|
-
|
|
172637
|
+
HookCreatedEventSchema as I,
|
|
172638
|
+
HookResumeCapabilitiesSchema as J,
|
|
172639
|
+
NODE_HTTP_DEFAULT as K,
|
|
171917
172640
|
LegacySerializedDataSchemaV1 as L,
|
|
171918
172641
|
MessageId as M,
|
|
171919
172642
|
Nt as N,
|
|
171920
|
-
|
|
172643
|
+
NODE_HTTP_ENV_VAR as O,
|
|
171921
172644
|
PARENT_RUN_ID_ATTRIBUTE as P,
|
|
171922
|
-
|
|
171923
|
-
|
|
171924
|
-
|
|
171925
|
-
|
|
171926
|
-
|
|
171927
|
-
|
|
171928
|
-
|
|
171929
|
-
|
|
171930
|
-
|
|
171931
|
-
|
|
171932
|
-
|
|
171933
|
-
|
|
171934
|
-
|
|
171935
|
-
|
|
171936
|
-
|
|
171937
|
-
|
|
171938
|
-
|
|
171939
|
-
|
|
171940
|
-
|
|
171941
|
-
|
|
171942
|
-
|
|
171943
|
-
|
|
171944
|
-
|
|
171945
|
-
|
|
171946
|
-
|
|
171947
|
-
|
|
171948
|
-
|
|
171949
|
-
|
|
171950
|
-
|
|
171951
|
-
|
|
171952
|
-
|
|
171953
|
-
|
|
171954
|
-
|
|
171955
|
-
|
|
171956
|
-
|
|
171957
|
-
|
|
171958
|
-
|
|
171959
|
-
|
|
171960
|
-
|
|
171961
|
-
|
|
171962
|
-
|
|
171963
|
-
|
|
171964
|
-
|
|
171965
|
-
|
|
171966
|
-
|
|
171967
|
-
|
|
171968
|
-
|
|
171969
|
-
|
|
171970
|
-
|
|
171971
|
-
|
|
171972
|
-
|
|
171973
|
-
|
|
171974
|
-
|
|
171975
|
-
|
|
171976
|
-
|
|
171977
|
-
|
|
171978
|
-
|
|
171979
|
-
|
|
171980
|
-
|
|
171981
|
-
|
|
171982
|
-
|
|
171983
|
-
|
|
171984
|
-
|
|
171985
|
-
|
|
171986
|
-
|
|
171987
|
-
|
|
171988
|
-
|
|
171989
|
-
|
|
171990
|
-
|
|
171991
|
-
|
|
171992
|
-
|
|
171993
|
-
|
|
171994
|
-
|
|
171995
|
-
|
|
171996
|
-
|
|
171997
|
-
|
|
171998
|
-
|
|
171999
|
-
|
|
172000
|
-
|
|
172001
|
-
|
|
172002
|
-
|
|
172003
|
-
|
|
172004
|
-
|
|
172005
|
-
|
|
172006
|
-
|
|
172007
|
-
|
|
172008
|
-
|
|
172009
|
-
|
|
172010
|
-
|
|
172011
|
-
|
|
172012
|
-
|
|
172013
|
-
|
|
172014
|
-
|
|
172015
|
-
|
|
172016
|
-
|
|
172017
|
-
|
|
172018
|
-
|
|
172019
|
-
|
|
172020
|
-
|
|
172021
|
-
|
|
172022
|
-
|
|
172023
|
-
|
|
172024
|
-
|
|
172025
|
-
|
|
172026
|
-
|
|
172027
|
-
|
|
172028
|
-
|
|
172645
|
+
PaginatedResponseSchema as Q,
|
|
172646
|
+
QueuePayloadSchema as R,
|
|
172647
|
+
QueuePrefix as S,
|
|
172648
|
+
RESERVED_ATTRIBUTE_KEY_PREFIX as T,
|
|
172649
|
+
ROOT_RUN_ID_ATTRIBUTE as U,
|
|
172650
|
+
RunInputSchema as V,
|
|
172651
|
+
SPEC_VERSION_CURRENT as W,
|
|
172652
|
+
SPEC_VERSION_LEGACY as X,
|
|
172653
|
+
SPEC_VERSION_MAX_SUPPORTED as Y,
|
|
172654
|
+
SPEC_VERSION_SUPPORTS_ATTRIBUTES as Z,
|
|
172655
|
+
SPEC_VERSION_SUPPORTS_CBOR_QUEUE_TRANSPORT as _,
|
|
172656
|
+
ATTRIBUTE_KEY_MAX_LENGTH as a,
|
|
172657
|
+
getHttpUrl as a$,
|
|
172658
|
+
SPEC_VERSION_SUPPORTS_SLOT_IDENTITY as a0,
|
|
172659
|
+
STEP_EVENT_TYPES as a1,
|
|
172660
|
+
SerializedDataSchema as a2,
|
|
172661
|
+
StepSchema as a3,
|
|
172662
|
+
StepStatusSchema as a4,
|
|
172663
|
+
StructuredErrorSchema as a5,
|
|
172664
|
+
TERMINAL_RUN_EVENT_TYPES as a6,
|
|
172665
|
+
TERMINAL_STEP_EVENT_TYPES as a7,
|
|
172666
|
+
TERMINAL_STEP_STATUSES as a8,
|
|
172667
|
+
TERMINAL_WORKFLOW_RUN_STATUSES as a9,
|
|
172668
|
+
isSlotBody as aA,
|
|
172669
|
+
isSlotEventId as aB,
|
|
172670
|
+
isStepEventType as aC,
|
|
172671
|
+
isTerminalRunEventType as aD,
|
|
172672
|
+
isTerminalStepEventType as aE,
|
|
172673
|
+
isTerminalStepStatus as aF,
|
|
172674
|
+
isTerminalWorkflowRunStatus as aG,
|
|
172675
|
+
isWaitEventType as aH,
|
|
172676
|
+
parseQueueName as aI,
|
|
172677
|
+
reenqueueActiveRuns as aJ,
|
|
172678
|
+
requiresNewerWorld as aK,
|
|
172679
|
+
resolveQueueNamespace as aL,
|
|
172680
|
+
slotToEventId as aM,
|
|
172681
|
+
stripEventDataRefs as aN,
|
|
172682
|
+
ulidToDate as aO,
|
|
172683
|
+
validateAttributeChanges as aP,
|
|
172684
|
+
validateAttributeKey as aQ,
|
|
172685
|
+
validateAttributeValue as aR,
|
|
172686
|
+
validateUlidTimestamp as aS,
|
|
172687
|
+
workflowRunIdSchema as aT,
|
|
172688
|
+
reactExports as aU,
|
|
172689
|
+
R as aV,
|
|
172690
|
+
Ks as aW,
|
|
172691
|
+
jsxRuntimeExports as aX,
|
|
172692
|
+
Qe as aY,
|
|
172693
|
+
registerZstdDecoder as aZ,
|
|
172694
|
+
isWsEventsTransportEnabled as a_,
|
|
172695
|
+
TerminalRunEventTypeSchema as aa,
|
|
172696
|
+
TerminalStepStatusSchema as ab,
|
|
172697
|
+
TerminalWorkflowRunStatusSchema as ac,
|
|
172698
|
+
ValidQueueName as ad,
|
|
172699
|
+
WAIT_EVENT_TYPES as ae,
|
|
172700
|
+
WaitSchema as af,
|
|
172701
|
+
WaitStatusSchema as ag,
|
|
172702
|
+
WorkflowInvokePayloadSchema as ah,
|
|
172703
|
+
WorkflowRunBaseSchema as ai,
|
|
172704
|
+
WorkflowRunSchema as aj,
|
|
172705
|
+
WorkflowRunStatusSchema as ak,
|
|
172706
|
+
applyAttributeChanges as al,
|
|
172707
|
+
entityEventClass as am,
|
|
172708
|
+
envFlag as an,
|
|
172709
|
+
envNumber as ao,
|
|
172710
|
+
eventIdToSlot as ap,
|
|
172711
|
+
getEventDataPayloadField as aq,
|
|
172712
|
+
getEventDataRefFields as ar,
|
|
172713
|
+
getMaxEventsPerRun as as,
|
|
172714
|
+
getQueueTopicPrefix as at,
|
|
172715
|
+
isChildEntityCreationEvent as au,
|
|
172716
|
+
isChildEntityCreationEventType as av,
|
|
172717
|
+
isHookEventRequiringExistence as aw,
|
|
172718
|
+
isHookLifecycleEventType as ax,
|
|
172719
|
+
isLegacySpecVersion as ay,
|
|
172720
|
+
isNodeHttpEnabled as az,
|
|
172721
|
+
ATTRIBUTE_MAX_PER_RUN as b,
|
|
172722
|
+
getHttpConfig as b0,
|
|
172723
|
+
headersToRecord as b1,
|
|
172724
|
+
getRequestTimeoutMs as b2,
|
|
172725
|
+
injectTraceContextIntoHeaders as b3,
|
|
172726
|
+
withHttpClientSpan as b4,
|
|
172727
|
+
ErrorType as b5,
|
|
172728
|
+
WorkflowWsReconnectAttempt as b6,
|
|
172729
|
+
NetworkProtocolName as b7,
|
|
172730
|
+
WorkflowEventsTransport as b8,
|
|
172731
|
+
distExports as b9,
|
|
172732
|
+
decodeFrames as ba,
|
|
172733
|
+
getDefaultExportFromCjs as bb,
|
|
172734
|
+
requireTokenUtil as bc,
|
|
172735
|
+
requireTokenError as bd,
|
|
172736
|
+
getAugmentedNamespace as be,
|
|
172737
|
+
app as bf,
|
|
172738
|
+
createFetchHandler as bg,
|
|
172739
|
+
ATTRIBUTE_VALUE_MAX_BYTES as c,
|
|
172740
|
+
AnalyticsAttributeKeySchema as d,
|
|
172741
|
+
AnalyticsEventSchema as e,
|
|
172742
|
+
AnalyticsHookSchema as f,
|
|
172743
|
+
AnalyticsRunSchema as g,
|
|
172744
|
+
AnalyticsStepSchema as h,
|
|
172745
|
+
AnalyticsWaitSchema as i,
|
|
172746
|
+
AttributeChangeSchema as j,
|
|
172747
|
+
AttributeChangesSchema as k,
|
|
172748
|
+
AttributeValidationError as l,
|
|
172749
|
+
BaseEventSchema as m,
|
|
172750
|
+
BulkCancelWorkflowRunResultSchema as n,
|
|
172751
|
+
BulkCancelWorkflowRunsRequestSchema as o,
|
|
172752
|
+
BulkCancelWorkflowRunsResultSchema as p,
|
|
172753
|
+
DEFAULT_TIMESTAMP_THRESHOLD_PAST_MS as q,
|
|
172754
|
+
EVENT_DATA_REF_FIELDS as r,
|
|
172755
|
+
EVENT_ID_BODY_LENGTH as s,
|
|
172756
|
+
EVENT_ID_PREFIX as t,
|
|
172757
|
+
EventSchema as u,
|
|
172758
|
+
EventTypeSchema as v,
|
|
172759
|
+
HOOK_EVENTS_REQUIRING_EXISTENCE as w,
|
|
172760
|
+
HOOK_LIFECYCLE_EVENT_TYPES as x,
|
|
172761
|
+
HOOK_RESUME_DEDUP_VERSION as y,
|
|
172762
|
+
HOOK_RESUME_INPUT_VERSION as z
|
|
172029
172763
|
};
|