@workflow/web 4.1.0-beta.39 → 4.1.0-beta.40
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/{highlighted-body-B3W2YXNL-BlI_3W94.js → highlighted-body-B3W2YXNL-BlfdcYh0.js} +1 -1
- package/build/client/assets/home-Xl3EX8M3.js +35 -0
- package/build/client/assets/{manifest-ef94afe1.js → manifest-0e172cba.js} +1 -1
- package/build/client/assets/{mermaid-3ZIDBTTL-BhkyG8Sq.js → mermaid-3ZIDBTTL-RlQIshou.js} +11 -11
- package/build/client/assets/root-9gRDb_Jz.css +1 -0
- package/build/client/assets/{root-B2fanH6r.js → root-D-041AAq.js} +1 -1
- package/build/client/assets/run-detail-BPOihWwO.js +41 -0
- package/build/client/assets/server-build-Dj97HEP4.css +1 -0
- package/build/client/assets/{use-workflow-graph-D6xsvBGu.js → use-workflow-graph-C-GqGBPl.js} +1 -1
- package/build/server/assets/{app-YwmyVuwT.js → app-DLRJr3zg.js} +1 -1
- package/build/server/assets/{highlighted-body-B3W2YXNL-Dqsnck2u.js → highlighted-body-B3W2YXNL-7BMdhIzo.js} +2 -2
- package/build/server/assets/{mermaid-3ZIDBTTL-mfJ74Epj.js → mermaid-3ZIDBTTL-C-mhM4Cx.js} +2 -2
- package/build/server/assets/{server-build-B3ijdJBL.js → server-build-B-uZ5KmC.js} +611 -741
- package/build/server/assets/{token-DJXheGCg.js → token-BRJJ012D.js} +2 -2
- package/build/server/assets/{token-CWWXwMh8.js → token-mzBpVePm.js} +3 -3
- package/build/server/assets/{token-util-REQ15piK.js → token-util-C29I-on4.js} +1 -1
- package/build/server/assets/{token-util-l0RNhdPG.js → token-util-D7WmNSMO.js} +2 -2
- package/build/server/assets/{token-util-CvLiUUQD.js → token-util-YAVqVR6-.js} +2 -2
- package/build/server/index.js +1 -1
- package/package.json +5 -7
- package/build/client/assets/home-B4MMr7LP.js +0 -35
- package/build/client/assets/root-Dr_TuMgh.css +0 -1
- package/build/client/assets/run-detail-D40YBNgh.js +0 -41
- package/build/client/assets/server-build-CgcbAXmU.css +0 -1
|
@@ -14,7 +14,7 @@ var __privateSet = (obj, member, value, setter) => (__accessCheck(obj, member, "
|
|
|
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
16
|
var _a2, _reader;
|
|
17
|
-
import { a as requireReact, S as ServerRouter, c as createReadableStreamFromReadable, r as reactExports, g as getDefaultExportFromCjs, R as React, b as ReactExports, w as withComponentProps, M as Meta, L as Links, d as ScrollRestoration, e as Scripts, O as Outlet, u as useNavigate, f as useSearchParams, h as Link$1, i as useLocation, j as useParams } from "./app-
|
|
17
|
+
import { a as requireReact, S as ServerRouter, c as createReadableStreamFromReadable, r as reactExports, g as getDefaultExportFromCjs, R as React, b as ReactExports, w as withComponentProps, M as Meta, L as Links, d as ScrollRestoration, e as Scripts, O as Outlet, u as useNavigate, f as useSearchParams, h as Link$1, i as useLocation, j as useParams } from "./app-DLRJr3zg.js";
|
|
18
18
|
import require$$0$4, { PassThrough } from "node:stream";
|
|
19
19
|
import require$$0 from "util";
|
|
20
20
|
import require$$1$1 from "crypto";
|
|
@@ -23352,8 +23352,8 @@ function handleRequest(request2, responseStatusCode, responseHeaders, routerCont
|
|
|
23352
23352
|
}
|
|
23353
23353
|
return new Promise((resolve2, reject) => {
|
|
23354
23354
|
let shellRendered = false;
|
|
23355
|
-
|
|
23356
|
-
|
|
23355
|
+
const userAgent = request2.headers.get("user-agent");
|
|
23356
|
+
const readyOption = userAgent && isbot(userAgent) || routerContext.isSpaMode ? "onAllReady" : "onShellReady";
|
|
23357
23357
|
let timeoutId = setTimeout(
|
|
23358
23358
|
() => abort(),
|
|
23359
23359
|
streamTimeout + 1e3
|
|
@@ -37101,16 +37101,19 @@ function getStatusDotColor(eventType) {
|
|
|
37101
37101
|
}
|
|
37102
37102
|
return "var(--ds-gray-600)";
|
|
37103
37103
|
}
|
|
37104
|
-
function buildNameMaps(
|
|
37105
|
-
var _a3;
|
|
37104
|
+
function buildNameMaps(events2, run) {
|
|
37105
|
+
var _a3, _b;
|
|
37106
37106
|
const correlationNameMap = /* @__PURE__ */ new Map();
|
|
37107
|
-
if (
|
|
37108
|
-
for (const
|
|
37109
|
-
|
|
37110
|
-
|
|
37107
|
+
if (events2) {
|
|
37108
|
+
for (const event of events2) {
|
|
37109
|
+
if (event.eventType === "step_created" && event.correlationId) {
|
|
37110
|
+
const stepName = ((_a3 = event.eventData) == null ? void 0 : _a3.stepName) ?? "";
|
|
37111
|
+
const parsed = parseStepName(String(stepName));
|
|
37112
|
+
correlationNameMap.set(event.correlationId, (parsed == null ? void 0 : parsed.shortName) ?? stepName);
|
|
37113
|
+
}
|
|
37111
37114
|
}
|
|
37112
37115
|
}
|
|
37113
|
-
const workflowName = (run == null ? void 0 : run.workflowName) ? ((
|
|
37116
|
+
const workflowName = (run == null ? void 0 : run.workflowName) ? ((_b = parseWorkflowName(run.workflowName)) == null ? void 0 : _b.shortName) ?? run.workflowName : null;
|
|
37114
37117
|
return { correlationNameMap, workflowName };
|
|
37115
37118
|
}
|
|
37116
37119
|
function buildDurationMap(events2) {
|
|
@@ -37436,13 +37439,13 @@ function EventRow({ event, index: index2, isFirst, isLast, activeGroupKey, selec
|
|
|
37436
37439
|
color: "var(--ds-red-900)"
|
|
37437
37440
|
}, children: loadError }) : isLoading || !hasExistingEventData && !hasAttemptedLoad && event.correlationId ? jsxRuntimeExports.jsxs("div", { className: "flex flex-col gap-2 p-3", children: [jsxRuntimeExports.jsx(Skeleton$2, { className: "h-3", style: { width: "75%" } }), jsxRuntimeExports.jsx(Skeleton$2, { className: "h-3", style: { width: "50%" } }), jsxRuntimeExports.jsx(Skeleton$2, { className: "h-3", style: { width: "60%" } })] }) : jsxRuntimeExports.jsx("div", { className: "p-2 text-xs", style: { color: "var(--ds-gray-900)" }, children: "No data" })] })] })] });
|
|
37438
37441
|
}
|
|
37439
|
-
function EventListView({ events: events2,
|
|
37442
|
+
function EventListView({ events: events2, run, onLoadEventData, hasMoreEvents = false, isLoadingMoreEvents = false, onLoadMoreEvents, encryptionKey }) {
|
|
37440
37443
|
const sortedEvents2 = reactExports.useMemo(() => {
|
|
37441
37444
|
if (!events2 || events2.length === 0)
|
|
37442
37445
|
return [];
|
|
37443
37446
|
return [...events2].sort((a2, b2) => new Date(a2.createdAt).getTime() - new Date(b2.createdAt).getTime());
|
|
37444
37447
|
}, [events2]);
|
|
37445
|
-
const { correlationNameMap, workflowName } = reactExports.useMemo(() => buildNameMaps(
|
|
37448
|
+
const { correlationNameMap, workflowName } = reactExports.useMemo(() => buildNameMaps(events2 ?? null, run ?? null), [events2, run]);
|
|
37446
37449
|
const durationMap = reactExports.useMemo(() => buildDurationMap(sortedEvents2), [sortedEvents2]);
|
|
37447
37450
|
const [selectedGroupKey, setSelectedGroupKey] = reactExports.useState(void 0);
|
|
37448
37451
|
const [hoveredGroupKey, setHoveredGroupKey] = reactExports.useState(void 0);
|
|
@@ -64424,7 +64427,7 @@ var tn = f("block", "before:content-[counter(line)]", "before:inline-block", "be
|
|
|
64424
64427
|
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 });
|
|
64425
64428
|
var Se = reactExports.createContext({ code: "" }), de$1 = () => reactExports.useContext(Se);
|
|
64426
64429
|
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 }) });
|
|
64427
|
-
var cn$1 = /\n+$/, dn = reactExports.lazy(() => import("./highlighted-body-B3W2YXNL-
|
|
64430
|
+
var cn$1 = /\n+$/, dn = reactExports.lazy(() => import("./highlighted-body-B3W2YXNL-7BMdhIzo.js").then((e) => ({ default: e.HighlightedCodeBlockBody }))), rt = ({ code: e, language: t, className: o, children: n, isIncomplete: s2 = false, ...r2 }) => {
|
|
64428
64431
|
let i = reactExports.useMemo(() => e.replace(cn$1, ""), [e]), c = reactExports.useMemo(() => ({ bg: "transparent", fg: "inherit", tokens: i.split(`
|
|
64429
64432
|
`).map((a2) => [{ content: a2, color: "inherit", bgColor: "transparent", htmlStyle: {}, offset: 0 }]) }), [i]);
|
|
64430
64433
|
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 }) })] }) });
|
|
@@ -64746,7 +64749,7 @@ var Dt = ({ children: e, className: t, onDownload: o, onError: n }) => {
|
|
|
64746
64749
|
}, []), 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] });
|
|
64747
64750
|
};
|
|
64748
64751
|
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 }) })] });
|
|
64749
|
-
var Jn = reactExports.lazy(() => import("./mermaid-3ZIDBTTL-
|
|
64752
|
+
var Jn = reactExports.lazy(() => import("./mermaid-3ZIDBTTL-C-mhM4Cx.js").then((e) => ({ default: e.Mermaid }))), Kn = /language-([^\s]+)/;
|
|
64750
64753
|
function ke(e, t) {
|
|
64751
64754
|
if (!(e != null && e.position || t != null && t.position)) return true;
|
|
64752
64755
|
if (!(e != null && e.position && (t != null && t.position))) return false;
|
|
@@ -65325,11 +65328,12 @@ function DetailCard({ summary, children: children2, onToggle, disabled = false,
|
|
|
65325
65328
|
opacity: 0.8
|
|
65326
65329
|
}, children: summary });
|
|
65327
65330
|
}
|
|
65328
|
-
return jsxRuntimeExports.jsxs("details", { className: "group", onToggle: (e) => onToggle == null ? void 0 : onToggle(e.target.open), children: [jsxRuntimeExports.jsx("summary", { className: `cursor-pointer rounded-md border px-2.5 py-1.5 text-xs hover:brightness-95 ${summaryClassName ?? ""}`, style: {
|
|
65331
|
+
return jsxRuntimeExports.jsxs("details", { className: "group", onToggle: (e) => onToggle == null ? void 0 : onToggle(e.target.open), children: [jsxRuntimeExports.jsx("summary", { className: `cursor-pointer rounded-md border px-2.5 py-1.5 text-xs hover:brightness-95 [&::-webkit-details-marker]:hidden ${summaryClassName ?? ""}`, style: {
|
|
65329
65332
|
borderColor: "var(--ds-gray-300)",
|
|
65330
65333
|
backgroundColor: "var(--ds-gray-100)",
|
|
65331
|
-
color: "var(--ds-gray-900)"
|
|
65332
|
-
|
|
65334
|
+
color: "var(--ds-gray-900)",
|
|
65335
|
+
listStyle: "none"
|
|
65336
|
+
}, children: jsxRuntimeExports.jsxs("span", { className: "flex items-center gap-1.5", children: [jsxRuntimeExports.jsx(ChevronRight, { size: 14, className: "shrink-0 transition-transform group-open:rotate-90" }), summary] }) }), jsxRuntimeExports.jsxs("div", { className: `relative pl-6 mt-3 ${contentClassName ?? ""}`, children: [jsxRuntimeExports.jsx("div", { className: "absolute left-3 -top-3 w-px h-3", style: { backgroundColor: "var(--ds-gray-400)" } }), jsxRuntimeExports.jsx("div", { className: "absolute left-3 top-0 w-3 h-3 border-l border-b rounded-bl-lg", style: { borderColor: "var(--ds-gray-400)" } }), jsxRuntimeExports.jsx("div", { className: "absolute left-6 top-3 w-0 h-px -translate-y-px", style: { backgroundColor: "var(--ds-gray-400)" } }), jsxRuntimeExports.jsx("div", { children: children2 })] })] });
|
|
65333
65337
|
}
|
|
65334
65338
|
function TabButton({ active, onClick, children: children2 }) {
|
|
65335
65339
|
return jsxRuntimeExports.jsx("button", { type: "button", role: "tab", "aria-selected": active, tabIndex: active ? 0 : -1, onClick, className: "px-3 py-1.5 text-[11px] font-medium transition-colors -mb-px", style: {
|
|
@@ -65404,6 +65408,9 @@ const attributeOrder = [
|
|
|
65404
65408
|
"runId",
|
|
65405
65409
|
"attempt",
|
|
65406
65410
|
"token",
|
|
65411
|
+
"receivedCount",
|
|
65412
|
+
"lastReceivedAt",
|
|
65413
|
+
"disposedAt",
|
|
65407
65414
|
"correlationId",
|
|
65408
65415
|
"eventType",
|
|
65409
65416
|
"deploymentId",
|
|
@@ -65432,7 +65439,8 @@ const sortByAttributeOrder = (a2, b2) => {
|
|
|
65432
65439
|
return aIndex - bIndex;
|
|
65433
65440
|
};
|
|
65434
65441
|
const attributeDisplayNames = {
|
|
65435
|
-
workflowCoreVersion: "@workflow/core version"
|
|
65442
|
+
workflowCoreVersion: "@workflow/core version",
|
|
65443
|
+
receivedCount: "times resolved"
|
|
65436
65444
|
};
|
|
65437
65445
|
const getAttributeDisplayName = (attribute) => {
|
|
65438
65446
|
return attributeDisplayNames[attribute] ?? attribute;
|
|
@@ -65507,6 +65515,9 @@ const attributeToDisplayFn = {
|
|
|
65507
65515
|
// Hook details
|
|
65508
65516
|
token: (value) => String(value),
|
|
65509
65517
|
isWebhook: (value) => String(value),
|
|
65518
|
+
receivedCount: (value) => String(value),
|
|
65519
|
+
lastReceivedAt: localMillisecondTimeOrNull,
|
|
65520
|
+
disposedAt: localMillisecondTimeOrNull,
|
|
65510
65521
|
// Event details
|
|
65511
65522
|
eventType: (value) => String(value),
|
|
65512
65523
|
correlationId: (value) => String(value),
|
|
@@ -65683,8 +65694,9 @@ const AttributePanel = ({ data, moduleSpecifier, isLoading, error: error2, expir
|
|
|
65683
65694
|
const displayValue = (_a3 = attributeToDisplayFn[attribute]) == null ? void 0 : _a3.call(attributeToDisplayFn, displayData[attribute]);
|
|
65684
65695
|
const isModuleSpecifier = attribute === "moduleSpecifier";
|
|
65685
65696
|
const moduleSpecifierValue = typeof displayValue === "string" ? displayValue : String(displayValue ?? displayData.moduleSpecifier ?? "");
|
|
65697
|
+
const shouldCapitalizeLabel = attribute !== "workflowCoreVersion";
|
|
65686
65698
|
const showDivider = index2 < orderedBasicAttributes.length - 1;
|
|
65687
|
-
return jsxRuntimeExports.jsxs("div", { className: "py-1", children: [jsxRuntimeExports.jsxs("div", { className: "flex min-h-[32px] items-center justify-between gap-4 rounded-sm px-2.5 py-1", children: [jsxRuntimeExports.jsx("span", { className: "text-[14px] first-letter:uppercase", style: { color: "var(--ds-gray-700)" }, children: getAttributeDisplayName(attribute) }), isModuleSpecifier ? jsxRuntimeExports.jsx("button", { type: "button", className: "min-w-0 max-w-[70%] truncate text-right text-[13px] font-mono", style: {
|
|
65699
|
+
return jsxRuntimeExports.jsxs("div", { className: "py-1", children: [jsxRuntimeExports.jsxs("div", { className: "flex min-h-[32px] items-center justify-between gap-4 rounded-sm px-2.5 py-1", children: [jsxRuntimeExports.jsx("span", { className: shouldCapitalizeLabel ? "text-[14px] first-letter:uppercase" : "text-[14px]", style: { color: "var(--ds-gray-700)" }, children: getAttributeDisplayName(attribute) }), isModuleSpecifier ? jsxRuntimeExports.jsx("button", { type: "button", className: "min-w-0 max-w-[70%] truncate text-right text-[13px] font-mono", style: {
|
|
65688
65700
|
color: "var(--ds-gray-1000)",
|
|
65689
65701
|
background: "transparent",
|
|
65690
65702
|
border: "none",
|
|
@@ -65775,7 +65787,7 @@ function isWorkflowRun(data) {
|
|
|
65775
65787
|
function isHook(data) {
|
|
65776
65788
|
return data !== null && typeof data === "object" && "hookId" in data;
|
|
65777
65789
|
}
|
|
65778
|
-
function EntityDetailPanel({ run,
|
|
65790
|
+
function EntityDetailPanel({ run, onStreamClick, spanDetailData, spanDetailError, spanDetailLoading, onSpanSelect, onWakeUpSleep, onLoadEventData, onResolveHook, encryptionKey, onDecrypt, selectedSpan }) {
|
|
65779
65791
|
const [stoppingSleep, setStoppingSleep] = reactExports.useState(false);
|
|
65780
65792
|
const [showResolveHookModal, setShowResolveHookModal] = reactExports.useState(false);
|
|
65781
65793
|
const [resolvingHook, setResolvingHook] = reactExports.useState(false);
|
|
@@ -65798,10 +65810,11 @@ function EntityDetailPanel({ run, hooks, onStreamClick, spanDetailData, spanDeta
|
|
|
65798
65810
|
return { resource: "hook", resourceId: data.hookId, runId: void 0 };
|
|
65799
65811
|
}
|
|
65800
65812
|
if (res === "sleep") {
|
|
65813
|
+
const waitData = data;
|
|
65801
65814
|
return {
|
|
65802
65815
|
resource: "sleep",
|
|
65803
65816
|
resourceId: selectedSpan.spanId,
|
|
65804
|
-
runId: void 0
|
|
65817
|
+
runId: waitData == null ? void 0 : waitData.runId
|
|
65805
65818
|
};
|
|
65806
65819
|
}
|
|
65807
65820
|
return { resource: void 0, resourceId: void 0, runId: void 0 };
|
|
@@ -65849,21 +65862,23 @@ function EntityDetailPanel({ run, hooks, onStreamClick, spanDetailData, spanDeta
|
|
|
65849
65862
|
]);
|
|
65850
65863
|
const error2 = spanDetailError ?? void 0;
|
|
65851
65864
|
const loading = spanDetailLoading ?? false;
|
|
65865
|
+
const hasEncryptedFields = reactExports.useMemo(() => {
|
|
65866
|
+
if (!spanDetailData)
|
|
65867
|
+
return false;
|
|
65868
|
+
const d2 = spanDetailData;
|
|
65869
|
+
return isEncryptedMarker(d2.input) || isEncryptedMarker(d2.output) || isEncryptedMarker(d2.error) || isEncryptedMarker(d2.metadata);
|
|
65870
|
+
}, [spanDetailData]);
|
|
65852
65871
|
const hookToken = reactExports.useMemo(() => {
|
|
65853
65872
|
if (resource !== "hook" || !resourceId)
|
|
65854
65873
|
return void 0;
|
|
65855
65874
|
if (isHook(spanDetailData) && spanDetailData.token) {
|
|
65856
65875
|
return spanDetailData.token;
|
|
65857
65876
|
}
|
|
65858
|
-
const hookFromArray = hooks == null ? void 0 : hooks.find((h2) => h2.hookId === resourceId);
|
|
65859
|
-
if (hookFromArray == null ? void 0 : hookFromArray.token) {
|
|
65860
|
-
return hookFromArray.token;
|
|
65861
|
-
}
|
|
65862
65877
|
if (isHook(data) && data.token) {
|
|
65863
65878
|
return data.token;
|
|
65864
65879
|
}
|
|
65865
65880
|
return void 0;
|
|
65866
|
-
}, [resource, resourceId, spanDetailData, data
|
|
65881
|
+
}, [resource, resourceId, spanDetailData, data]);
|
|
65867
65882
|
reactExports.useEffect(() => {
|
|
65868
65883
|
if (error2 && selectedSpan && resource) {
|
|
65869
65884
|
toast.error(`Failed to load ${resource} details`, {
|
|
@@ -65937,10 +65952,7 @@ function EntityDetailPanel({ run, hooks, onStreamClick, spanDetailData, spanDeta
|
|
|
65937
65952
|
setResolvingHook(false);
|
|
65938
65953
|
}
|
|
65939
65954
|
}, [onResolveHook, hookToken, resolvingHook, spanDetailData, data]);
|
|
65940
|
-
|
|
65941
|
-
return null;
|
|
65942
|
-
}
|
|
65943
|
-
const displayData = resource === "sleep" ? data : spanDetailData ?? data;
|
|
65955
|
+
const displayData = spanDetailData ?? data;
|
|
65944
65956
|
const moduleSpecifier = reactExports.useMemo(() => {
|
|
65945
65957
|
const displayRecord = displayData;
|
|
65946
65958
|
const displayStepName = displayRecord.stepName;
|
|
@@ -65956,16 +65968,24 @@ function EntityDetailPanel({ run, hooks, onStreamClick, spanDetailData, spanDeta
|
|
|
65956
65968
|
}
|
|
65957
65969
|
return void 0;
|
|
65958
65970
|
}, [displayData, run.workflowName]);
|
|
65971
|
+
if (!selectedSpan || !resource || !resourceId) {
|
|
65972
|
+
return null;
|
|
65973
|
+
}
|
|
65959
65974
|
const resourceLabel = resource.charAt(0).toUpperCase() + resource.slice(1);
|
|
65960
65975
|
const hasPendingActions = resource === "sleep" && canWakeUp || resource === "hook" && canResolveHook;
|
|
65961
65976
|
const runStateLabel = run.completedAt ? "Completed" : "Live";
|
|
65962
|
-
return jsxRuntimeExports.jsxs("div", { className: "flex h-full flex-col", children: [jsxRuntimeExports.jsx("div", { className: "border-b px-3 py-3", style: { borderColor: "var(--ds-gray-200)" }, children: jsxRuntimeExports.
|
|
65977
|
+
return jsxRuntimeExports.jsxs("div", { className: "flex h-full flex-col", children: [jsxRuntimeExports.jsx("div", { className: "border-b px-3 py-3", style: { borderColor: "var(--ds-gray-200)" }, children: jsxRuntimeExports.jsxs("div", { className: "flex items-start justify-between gap-2", children: [jsxRuntimeExports.jsxs("div", { className: "min-w-0", children: [jsxRuntimeExports.jsxs("div", { className: "flex items-center gap-2", children: [jsxRuntimeExports.jsx("span", { className: "inline-flex items-center rounded-full border px-2 py-0.5 text-[13px] font-medium", style: {
|
|
65963
65978
|
borderColor: "var(--ds-gray-300)",
|
|
65964
65979
|
color: "var(--ds-gray-900)",
|
|
65965
65980
|
backgroundColor: "var(--ds-background-100)"
|
|
65966
65981
|
}, children: resourceLabel }), jsxRuntimeExports.jsx("span", { className: "text-[13px]", style: {
|
|
65967
65982
|
color: run.completedAt ? "var(--ds-gray-700)" : "var(--ds-green-800)"
|
|
65968
|
-
}, children: runStateLabel })] }), jsxRuntimeExports.jsx("p", { className: "mt-1 truncate font-mono text-[13px]", style: { color: "var(--ds-gray-700)" }, title: resourceId, children: resourceId })] })
|
|
65983
|
+
}, children: runStateLabel })] }), jsxRuntimeExports.jsx("p", { className: "mt-1 truncate font-mono text-[13px]", style: { color: "var(--ds-gray-700)" }, title: resourceId, children: resourceId })] }), (hasEncryptedFields || encryptionKey) && onDecrypt && jsxRuntimeExports.jsxs("button", { type: "button", onClick: onDecrypt, disabled: !!encryptionKey, className: "inline-flex items-center gap-1 rounded-md border px-2 py-1 text-xs font-medium transition-colors flex-shrink-0", style: {
|
|
65984
|
+
borderColor: encryptionKey ? "var(--ds-green-400)" : "var(--ds-gray-300)",
|
|
65985
|
+
color: encryptionKey ? "var(--ds-green-900)" : "var(--ds-gray-900)",
|
|
65986
|
+
backgroundColor: encryptionKey ? "var(--ds-green-100)" : "var(--ds-background-100)",
|
|
65987
|
+
cursor: encryptionKey ? "default" : "pointer"
|
|
65988
|
+
}, children: [encryptionKey ? jsxRuntimeExports.jsx(LockOpen, { className: "h-3 w-3" }) : jsxRuntimeExports.jsx(Lock, { className: "h-3 w-3" }), encryptionKey ? "Decrypted" : "Decrypt"] })] }) }), jsxRuntimeExports.jsxs("div", { className: "flex-1 overflow-y-auto px-3 pt-3 pb-8", children: [hasPendingActions && jsxRuntimeExports.jsxs("div", { className: "mb-4 rounded-lg border p-2", style: {
|
|
65969
65989
|
borderColor: "var(--ds-gray-300)",
|
|
65970
65990
|
backgroundColor: "var(--ds-gray-100)"
|
|
65971
65991
|
}, children: [jsxRuntimeExports.jsx("p", { className: "mb-2 px-1 text-[13px] font-medium uppercase tracking-wide", style: { color: "var(--ds-gray-700)" }, children: "Actions" }), jsxRuntimeExports.jsxs("div", { className: "flex flex-col gap-2", children: [resource === "sleep" && canWakeUp && jsxRuntimeExports.jsxs("button", { type: "button", onClick: handleWakeUp, disabled: stoppingSleep, className: clsx("flex items-center justify-center gap-2 rounded-md px-3 py-2 text-sm font-medium", "disabled:opacity-50 disabled:cursor-not-allowed transition-colors", stoppingSleep ? "opacity-50 cursor-not-allowed" : "cursor-pointer"), style: {
|
|
@@ -68719,7 +68739,7 @@ const skeletonTrace = {
|
|
|
68719
68739
|
],
|
|
68720
68740
|
rootSpanId: "root"
|
|
68721
68741
|
};
|
|
68722
|
-
function TraceViewerTimeline({ trace: trace2 = skeletonTrace, className = "", scrollLock = false, height, withPanel = false, highlightedSpans, eagerRender = false, isLive = false }) {
|
|
68742
|
+
function TraceViewerTimeline({ trace: trace2 = skeletonTrace, className = "", scrollLock = false, height, withPanel = false, highlightedSpans, eagerRender = false, isLive = false, footer: footer2, knownDurationMs, hasMoreData = false }) {
|
|
68723
68743
|
const isSkeleton = trace2 === skeletonTrace;
|
|
68724
68744
|
const { state, dispatch: dispatch2 } = useTraceViewer();
|
|
68725
68745
|
const { timelineRef, scrollSnapshotRef } = state;
|
|
@@ -68954,16 +68974,35 @@ function TraceViewerTimeline({ trace: trace2 = skeletonTrace, className = "", sc
|
|
|
68954
68974
|
"--scrollbar-width": `${state.scrollbarWidth}px`,
|
|
68955
68975
|
"--marker-height": `${MARKER_HEIGHT}px`,
|
|
68956
68976
|
"--marker-notch-height": `${MARKER_NOTCH_HEIGHT}px`
|
|
68957
|
-
}, children: [!hideSearchBar ? jsxRuntimeExports.jsx(SearchBar, {}) : null, jsxRuntimeExports.jsx(MiniMap, { rows, scale, timelineRef }), jsxRuntimeExports.jsxs("div", { className: clsx(styles.traceViewerContent, inert2 && styles.inert), children: [jsxRuntimeExports.
|
|
68977
|
+
}, children: [!hideSearchBar ? jsxRuntimeExports.jsx(SearchBar, {}) : null, jsxRuntimeExports.jsx(MiniMap, { rows, scale, timelineRef }), jsxRuntimeExports.jsxs("div", { className: clsx(styles.traceViewerContent, inert2 && styles.inert), children: [jsxRuntimeExports.jsxs("div", { className: styles.timeline, ref: timelineRef, children: [jsxRuntimeExports.jsx("div", { style: {
|
|
68958
68978
|
position: "relative",
|
|
68959
68979
|
width: state.timelineWidth,
|
|
68960
|
-
|
|
68980
|
+
minHeight: state.timelineHeight - TIMELINE_PADDING * 2,
|
|
68961
68981
|
padding: TIMELINE_PADDING,
|
|
68962
68982
|
paddingBottom: 0
|
|
68963
68983
|
}, children: jsxRuntimeExports.jsxs("div", { className: styles.traceNode, style: {
|
|
68964
68984
|
width: state.root.duration * scale || void 0,
|
|
68965
68985
|
height: timelineHeight - TIMELINE_PADDING * 2
|
|
68966
|
-
}, children: [jsxRuntimeExports.jsx(Markers, { scale, isLive }), jsxRuntimeExports.jsx(EventMarkers, { events: events2, root: state.root, scale }), jsxRuntimeExports.jsx(CursorMarker, { dispatch: dispatch2, events: events2, memoCacheRef: state.memoCacheRef, root: state.root, scale, scrollSnapshotRef, spans, timelineRef }), jsxRuntimeExports.jsx(SpanNodes, { cacheKey: memoCache.get(""), cache: memoCache, customSpanClassNameFunc: state.customSpanClassNameFunc, customSpanEventClassNameFunc: state.customSpanEventClassNameFunc, isLive, root: state.root, scale, scrollSnapshotRef, spans })
|
|
68986
|
+
}, children: [jsxRuntimeExports.jsx(Markers, { scale, isLive }), jsxRuntimeExports.jsx(EventMarkers, { events: events2, root: state.root, scale }), jsxRuntimeExports.jsx(CursorMarker, { dispatch: dispatch2, events: events2, memoCacheRef: state.memoCacheRef, root: state.root, scale, scrollSnapshotRef, spans, timelineRef }), jsxRuntimeExports.jsx(SpanNodes, { cacheKey: memoCache.get(""), cache: memoCache, customSpanClassNameFunc: state.customSpanClassNameFunc, customSpanEventClassNameFunc: state.customSpanEventClassNameFunc, isLive, root: state.root, scale, scrollSnapshotRef, spans }), knownDurationMs != null && knownDurationMs > 0 && (hasMoreData || isLive) && state.root.duration > 0 && (() => {
|
|
68987
|
+
const knownPx = knownDurationMs * scale;
|
|
68988
|
+
const totalPx = state.root.duration * scale;
|
|
68989
|
+
const unknownWidth = totalPx - knownPx;
|
|
68990
|
+
if (unknownWidth < 4)
|
|
68991
|
+
return null;
|
|
68992
|
+
const insetPx = Math.min(unknownWidth * 0.05, 20);
|
|
68993
|
+
return jsxRuntimeExports.jsx("div", { style: {
|
|
68994
|
+
position: "absolute",
|
|
68995
|
+
top: 0,
|
|
68996
|
+
left: knownPx + insetPx,
|
|
68997
|
+
width: unknownWidth - insetPx,
|
|
68998
|
+
height: "100%",
|
|
68999
|
+
pointerEvents: "none",
|
|
69000
|
+
zIndex: 1,
|
|
69001
|
+
maskImage: "linear-gradient(to right, transparent 1%, black 3%)",
|
|
69002
|
+
WebkitMaskImage: "linear-gradient(to right, transparent 1%, black 3%)",
|
|
69003
|
+
background: "repeating-linear-gradient(-45deg, var(--ds-background-200) 0, var(--ds-background-200) 11px, var(--ds-gray-200) 11px, var(--ds-gray-200) 12px)"
|
|
69004
|
+
} });
|
|
69005
|
+
})()] }) }), footer2] }), jsxRuntimeExports.jsx("div", { className: styles.zoomButtonTraceViewer, children: jsxRuntimeExports.jsx(ZoomButton, {}) })] }), withPanel ? jsxRuntimeExports.jsx("div", { className: clsx(styles.spanDetailPanelTraceViewer, !state.selected && styles.hidden, state.isMobile && styles.mobile), children: jsxRuntimeExports.jsx(SpanDetailPanel, { attached: true }) }) : null] });
|
|
68967
69006
|
}
|
|
68968
69007
|
function getStatusClassName(status, isStripped = false) {
|
|
68969
69008
|
if (isStripped && status === "pending") {
|
|
@@ -69106,14 +69145,13 @@ const waitEventsToWaitEntity = (events2) => {
|
|
|
69106
69145
|
completedAt: completedEvent == null ? void 0 : completedEvent.createdAt
|
|
69107
69146
|
};
|
|
69108
69147
|
};
|
|
69109
|
-
function waitToSpan(events2,
|
|
69148
|
+
function waitToSpan(events2, maxEndTime) {
|
|
69110
69149
|
const wait = waitEventsToWaitEntity(events2);
|
|
69111
69150
|
if (!wait) {
|
|
69112
69151
|
return null;
|
|
69113
69152
|
}
|
|
69114
|
-
const
|
|
69115
|
-
const
|
|
69116
|
-
const endTime = (wait == null ? void 0 : wait.completedAt) ?? viewerEndTime;
|
|
69153
|
+
const startTime = wait.createdAt;
|
|
69154
|
+
const endTime = wait.completedAt ?? maxEndTime;
|
|
69117
69155
|
const start2 = dateToOtelTime(startTime);
|
|
69118
69156
|
const end = dateToOtelTime(endTime);
|
|
69119
69157
|
const duration2 = calculateDuration(startTime, endTime);
|
|
@@ -69139,16 +69177,67 @@ function waitToSpan(events2, run, nowTime) {
|
|
|
69139
69177
|
endTime: end
|
|
69140
69178
|
};
|
|
69141
69179
|
}
|
|
69142
|
-
|
|
69143
|
-
|
|
69180
|
+
const stepEventsToStepEntity = (events2) => {
|
|
69181
|
+
var _a3;
|
|
69182
|
+
const createdEvent = events2.find((event) => event.eventType === "step_created");
|
|
69183
|
+
if (!createdEvent) {
|
|
69184
|
+
return null;
|
|
69185
|
+
}
|
|
69186
|
+
let status = "pending";
|
|
69187
|
+
let attempt = 0;
|
|
69188
|
+
let startedAt;
|
|
69189
|
+
let completedAt;
|
|
69190
|
+
for (const e of events2) {
|
|
69191
|
+
switch (e.eventType) {
|
|
69192
|
+
case "step_started":
|
|
69193
|
+
status = "running";
|
|
69194
|
+
attempt += 1;
|
|
69195
|
+
if (!startedAt)
|
|
69196
|
+
startedAt = e.createdAt;
|
|
69197
|
+
completedAt = void 0;
|
|
69198
|
+
break;
|
|
69199
|
+
case "step_completed":
|
|
69200
|
+
status = "completed";
|
|
69201
|
+
completedAt = e.createdAt;
|
|
69202
|
+
break;
|
|
69203
|
+
case "step_failed":
|
|
69204
|
+
status = "failed";
|
|
69205
|
+
completedAt = e.createdAt;
|
|
69206
|
+
break;
|
|
69207
|
+
case "step_retrying":
|
|
69208
|
+
status = "pending";
|
|
69209
|
+
completedAt = void 0;
|
|
69210
|
+
break;
|
|
69211
|
+
}
|
|
69212
|
+
}
|
|
69213
|
+
if (attempt === 0)
|
|
69214
|
+
attempt = 1;
|
|
69215
|
+
const lastEvent = events2[events2.length - 1];
|
|
69216
|
+
return {
|
|
69217
|
+
stepId: createdEvent.correlationId,
|
|
69218
|
+
runId: createdEvent.runId,
|
|
69219
|
+
stepName: ((_a3 = createdEvent.eventData) == null ? void 0 : _a3.stepName) ?? "",
|
|
69220
|
+
status,
|
|
69221
|
+
attempt,
|
|
69222
|
+
createdAt: createdEvent.createdAt,
|
|
69223
|
+
updatedAt: (lastEvent == null ? void 0 : lastEvent.createdAt) ?? createdEvent.createdAt,
|
|
69224
|
+
startedAt,
|
|
69225
|
+
completedAt,
|
|
69226
|
+
specVersion: createdEvent.specVersion
|
|
69227
|
+
};
|
|
69228
|
+
};
|
|
69229
|
+
function stepToSpan(stepEvents, maxEndTime) {
|
|
69230
|
+
const step = stepEventsToStepEntity(stepEvents);
|
|
69231
|
+
if (!step) {
|
|
69232
|
+
return null;
|
|
69233
|
+
}
|
|
69144
69234
|
const parsedName = parseStepName(String(step.stepName));
|
|
69145
|
-
const { input: _i, output: _o2, error: _e2, ...stepIdentity } = step;
|
|
69146
69235
|
const attributes = {
|
|
69147
69236
|
resource: "step",
|
|
69148
|
-
data:
|
|
69237
|
+
data: step
|
|
69149
69238
|
};
|
|
69150
69239
|
const resource = "step";
|
|
69151
|
-
const endTime = new Date(step.completedAt ?? maxEndTime
|
|
69240
|
+
const endTime = new Date(step.completedAt ?? maxEndTime);
|
|
69152
69241
|
const events2 = convertEventsToSpanEvents(stepEvents, false);
|
|
69153
69242
|
const spanStartTime = new Date(step.createdAt);
|
|
69154
69243
|
let activeStartTime = step.startedAt ? new Date(step.startedAt) : void 0;
|
|
@@ -69176,7 +69265,7 @@ function stepToSpan(step, stepEvents, nowTime, maxEndTime) {
|
|
|
69176
69265
|
};
|
|
69177
69266
|
}
|
|
69178
69267
|
const hookEventsToHookEntity = (events2) => {
|
|
69179
|
-
var _a3;
|
|
69268
|
+
var _a3, _b;
|
|
69180
69269
|
const createdEvent = events2.find((event) => event.eventType === "hook_created");
|
|
69181
69270
|
if (!createdEvent) {
|
|
69182
69271
|
return null;
|
|
@@ -69187,20 +69276,20 @@ const hookEventsToHookEntity = (events2) => {
|
|
|
69187
69276
|
return {
|
|
69188
69277
|
hookId: createdEvent.correlationId,
|
|
69189
69278
|
runId: createdEvent.runId,
|
|
69279
|
+
token: (_a3 = createdEvent.eventData) == null ? void 0 : _a3.token,
|
|
69190
69280
|
createdAt: createdEvent.createdAt,
|
|
69191
69281
|
receivedCount: receivedEvents.length,
|
|
69192
69282
|
lastReceivedAt: (lastReceivedEvent == null ? void 0 : lastReceivedEvent.createdAt) || void 0,
|
|
69193
|
-
disposedAt: ((
|
|
69283
|
+
disposedAt: ((_b = disposedEvents.at(-1)) == null ? void 0 : _b.createdAt) || void 0
|
|
69194
69284
|
};
|
|
69195
69285
|
};
|
|
69196
|
-
function hookToSpan(hookEvents,
|
|
69286
|
+
function hookToSpan(hookEvents, maxEndTime) {
|
|
69197
69287
|
const hook = hookEventsToHookEntity(hookEvents);
|
|
69198
69288
|
if (!hook) {
|
|
69199
69289
|
return null;
|
|
69200
69290
|
}
|
|
69201
69291
|
const events2 = convertEventsToSpanEvents(hookEvents, false);
|
|
69202
|
-
const
|
|
69203
|
-
const endTime = hook.disposedAt || viewerEndTime;
|
|
69292
|
+
const endTime = hook.disposedAt || maxEndTime;
|
|
69204
69293
|
return {
|
|
69205
69294
|
spanId: String(hook.hookId),
|
|
69206
69295
|
name: String(hook.hookId),
|
|
@@ -69252,6 +69341,102 @@ function runToSpan(run, runEvents, nowTime) {
|
|
|
69252
69341
|
activeStartTime: activeStartTime && activeStartTime.getTime() > spanStartTime.getTime() ? dateToOtelTime(activeStartTime) : void 0
|
|
69253
69342
|
};
|
|
69254
69343
|
}
|
|
69344
|
+
const isStepEvent = (eventType) => eventType.startsWith("step_");
|
|
69345
|
+
const isTimerEvent = (eventType) => eventType === "wait_created" || eventType === "wait_completed";
|
|
69346
|
+
const isHookLifecycleEvent = (eventType) => eventType === "hook_received" || eventType === "hook_created" || eventType === "hook_disposed";
|
|
69347
|
+
function pushEvent(map2, correlationId, event) {
|
|
69348
|
+
const existing = map2.get(correlationId);
|
|
69349
|
+
if (existing) {
|
|
69350
|
+
existing.push(event);
|
|
69351
|
+
return;
|
|
69352
|
+
}
|
|
69353
|
+
map2.set(correlationId, [event]);
|
|
69354
|
+
}
|
|
69355
|
+
function groupEventsByCorrelation(events2) {
|
|
69356
|
+
const eventsByStepId = /* @__PURE__ */ new Map();
|
|
69357
|
+
const runLevelEvents = [];
|
|
69358
|
+
const timerEvents = /* @__PURE__ */ new Map();
|
|
69359
|
+
const hookEvents = /* @__PURE__ */ new Map();
|
|
69360
|
+
for (const event of events2) {
|
|
69361
|
+
const correlationId = event.correlationId;
|
|
69362
|
+
if (!correlationId) {
|
|
69363
|
+
runLevelEvents.push(event);
|
|
69364
|
+
continue;
|
|
69365
|
+
}
|
|
69366
|
+
if (isTimerEvent(event.eventType)) {
|
|
69367
|
+
pushEvent(timerEvents, correlationId, event);
|
|
69368
|
+
continue;
|
|
69369
|
+
}
|
|
69370
|
+
if (isHookLifecycleEvent(event.eventType)) {
|
|
69371
|
+
pushEvent(hookEvents, correlationId, event);
|
|
69372
|
+
continue;
|
|
69373
|
+
}
|
|
69374
|
+
if (isStepEvent(event.eventType)) {
|
|
69375
|
+
pushEvent(eventsByStepId, correlationId, event);
|
|
69376
|
+
continue;
|
|
69377
|
+
}
|
|
69378
|
+
runLevelEvents.push(event);
|
|
69379
|
+
}
|
|
69380
|
+
return { eventsByStepId, runLevelEvents, timerEvents, hookEvents };
|
|
69381
|
+
}
|
|
69382
|
+
function computeLatestKnownTime(events2, run) {
|
|
69383
|
+
let latest = new Date(run.createdAt).getTime();
|
|
69384
|
+
for (const event of events2) {
|
|
69385
|
+
const t = new Date(event.createdAt).getTime();
|
|
69386
|
+
if (t > latest)
|
|
69387
|
+
latest = t;
|
|
69388
|
+
}
|
|
69389
|
+
return new Date(latest);
|
|
69390
|
+
}
|
|
69391
|
+
function buildSpans(run, groupedEvents, now2, latestKnownTime) {
|
|
69392
|
+
const childMaxEnd = latestKnownTime;
|
|
69393
|
+
const stepSpans = Array.from(groupedEvents.eventsByStepId.values()).map((events2) => stepToSpan(events2, childMaxEnd)).filter((span) => span !== null);
|
|
69394
|
+
const hookSpans = Array.from(groupedEvents.hookEvents.values()).map((events2) => hookToSpan(events2, childMaxEnd)).filter((span) => span !== null);
|
|
69395
|
+
const waitSpans = Array.from(groupedEvents.timerEvents.values()).map((events2) => waitToSpan(events2, childMaxEnd)).filter((span) => span !== null);
|
|
69396
|
+
return {
|
|
69397
|
+
runSpan: runToSpan(run, groupedEvents.runLevelEvents, now2),
|
|
69398
|
+
spans: [...stepSpans, ...hookSpans, ...waitSpans]
|
|
69399
|
+
};
|
|
69400
|
+
}
|
|
69401
|
+
function cascadeSpans(runSpan, spans) {
|
|
69402
|
+
const sortedSpans = [
|
|
69403
|
+
runSpan,
|
|
69404
|
+
...spans.slice().sort((a2, b2) => {
|
|
69405
|
+
const aStart = otelTimeToMs(a2.startTime);
|
|
69406
|
+
const bStart = otelTimeToMs(b2.startTime);
|
|
69407
|
+
return aStart - bStart;
|
|
69408
|
+
})
|
|
69409
|
+
];
|
|
69410
|
+
return sortedSpans.map((span, index2) => {
|
|
69411
|
+
const parentSpanId = index2 === 0 ? void 0 : String(sortedSpans[index2 - 1].spanId);
|
|
69412
|
+
return {
|
|
69413
|
+
...span,
|
|
69414
|
+
parentSpanId
|
|
69415
|
+
};
|
|
69416
|
+
});
|
|
69417
|
+
}
|
|
69418
|
+
function buildTrace(run, events2, now2) {
|
|
69419
|
+
const groupedEvents = groupEventsByCorrelation(events2);
|
|
69420
|
+
const latestKnownTime = computeLatestKnownTime(events2, run);
|
|
69421
|
+
const { runSpan, spans } = buildSpans(run, groupedEvents, now2, latestKnownTime);
|
|
69422
|
+
const sortedCascadingSpans = cascadeSpans(runSpan, spans);
|
|
69423
|
+
const traceStartMs = otelTimeToMs(runSpan.startTime);
|
|
69424
|
+
const knownDurationMs = latestKnownTime.getTime() - traceStartMs;
|
|
69425
|
+
return {
|
|
69426
|
+
traceId: run.runId,
|
|
69427
|
+
rootSpanId: run.runId,
|
|
69428
|
+
spans: sortedCascadingSpans,
|
|
69429
|
+
resources: [
|
|
69430
|
+
{
|
|
69431
|
+
name: "workflow",
|
|
69432
|
+
attributes: {
|
|
69433
|
+
"service.name": WORKFLOW_LIBRARY.name
|
|
69434
|
+
}
|
|
69435
|
+
}
|
|
69436
|
+
],
|
|
69437
|
+
knownDurationMs: Math.max(0, knownDurationMs)
|
|
69438
|
+
};
|
|
69439
|
+
}
|
|
69255
69440
|
function useLiveTick(isLive) {
|
|
69256
69441
|
const { state, dispatch: dispatch2 } = useTraceViewer();
|
|
69257
69442
|
const stateRef = reactExports.useRef(state);
|
|
@@ -69394,7 +69579,7 @@ function SpanContextMenu({ menu, items, onClose }) {
|
|
|
69394
69579
|
onClose();
|
|
69395
69580
|
}, children: [item.icon ?? null, item.label] }, item.label))] }), document.body);
|
|
69396
69581
|
}
|
|
69397
|
-
function TraceViewerWithContextMenu({ trace: trace2, run,
|
|
69582
|
+
function TraceViewerWithContextMenu({ trace: trace2, run, isLive, onWakeUpSleep, onCancelRun, onResolveHook, onLoadMoreSpans, hasMoreSpans = false, isLoadingMoreSpans = false, children: children2 }) {
|
|
69398
69583
|
const { state, dispatch: dispatch2 } = useTraceViewer();
|
|
69399
69584
|
useLiveTick(isLive);
|
|
69400
69585
|
const [contextMenu, setContextMenu] = reactExports.useState(null);
|
|
@@ -69408,13 +69593,6 @@ function TraceViewerWithContextMenu({ trace: trace2, run, hooks, isLive, onWakeU
|
|
|
69408
69593
|
}
|
|
69409
69594
|
return map2;
|
|
69410
69595
|
}, [trace2.spans]);
|
|
69411
|
-
const hookLookup = reactExports.useMemo(() => {
|
|
69412
|
-
const map2 = /* @__PURE__ */ new Map();
|
|
69413
|
-
for (const hook of hooks) {
|
|
69414
|
-
map2.set(hook.hookId, hook);
|
|
69415
|
-
}
|
|
69416
|
-
return map2;
|
|
69417
|
-
}, [hooks]);
|
|
69418
69596
|
const handleResolveHook = reactExports.useCallback(async (payload) => {
|
|
69419
69597
|
if (resolvingHook || !resolveHookTarget || !onResolveHook)
|
|
69420
69598
|
return;
|
|
@@ -69426,7 +69604,7 @@ function TraceViewerWithContextMenu({ trace: trace2, run, hooks, isLive, onWakeU
|
|
|
69426
69604
|
}
|
|
69427
69605
|
try {
|
|
69428
69606
|
setResolvingHook(true);
|
|
69429
|
-
await onResolveHook(resolveHookTarget.token, payload
|
|
69607
|
+
await onResolveHook(resolveHookTarget.token, payload);
|
|
69430
69608
|
toast.success("Hook resolved", {
|
|
69431
69609
|
description: "The payload has been sent and the hook resolved."
|
|
69432
69610
|
});
|
|
@@ -69536,16 +69714,18 @@ function TraceViewerWithContextMenu({ trace: trace2, run, hooks, isLive, onWakeU
|
|
|
69536
69714
|
});
|
|
69537
69715
|
}
|
|
69538
69716
|
if (menu.resourceType === "hook" && isRunActive && onResolveHook) {
|
|
69539
|
-
const hook = hookLookup.get(menu.spanId);
|
|
69540
69717
|
const span = spanLookup.get(menu.spanId);
|
|
69541
69718
|
const hookData = (_a3 = span == null ? void 0 : span.attributes) == null ? void 0 : _a3.data;
|
|
69542
69719
|
const isDisposed = Boolean(hookData == null ? void 0 : hookData.disposedAt) || Boolean((_b = span == null ? void 0 : span.events) == null ? void 0 : _b.some((e) => e.name === "hook_disposed")) || resolvedHookIds.has(menu.spanId);
|
|
69543
|
-
if ((
|
|
69720
|
+
if ((hookData == null ? void 0 : hookData.token) && !isDisposed) {
|
|
69544
69721
|
items.push({
|
|
69545
69722
|
label: "Resolve Hook",
|
|
69546
69723
|
icon: jsxRuntimeExports.jsx(Send, { className: "h-3.5 w-3.5" }),
|
|
69547
69724
|
action: () => {
|
|
69548
|
-
setResolveHookTarget(
|
|
69725
|
+
setResolveHookTarget({
|
|
69726
|
+
hookId: menu.spanId,
|
|
69727
|
+
token: hookData.token
|
|
69728
|
+
});
|
|
69549
69729
|
}
|
|
69550
69730
|
});
|
|
69551
69731
|
}
|
|
@@ -69599,7 +69779,6 @@ function TraceViewerWithContextMenu({ trace: trace2, run, hooks, isLive, onWakeU
|
|
|
69599
69779
|
onWakeUpSleep,
|
|
69600
69780
|
onCancelRun,
|
|
69601
69781
|
onResolveHook,
|
|
69602
|
-
hookLookup,
|
|
69603
69782
|
spanLookup,
|
|
69604
69783
|
resolvedHookIds,
|
|
69605
69784
|
run.runId,
|
|
@@ -69607,104 +69786,6 @@ function TraceViewerWithContextMenu({ trace: trace2, run, hooks, isLive, onWakeU
|
|
|
69607
69786
|
]);
|
|
69608
69787
|
return jsxRuntimeExports.jsxs("div", { className: "relative w-full h-full", ref: containerRef, children: [children2, contextMenu ? jsxRuntimeExports.jsx(SpanContextMenu, { menu: contextMenu, items: getMenuItems(contextMenu), onClose: closeMenu }) : null, jsxRuntimeExports.jsx(ResolveHookModal, { isOpen: resolveHookTarget !== null, onClose: () => setResolveHookTarget(null), onSubmit: handleResolveHook, isSubmitting: resolvingHook })] });
|
|
69609
69788
|
}
|
|
69610
|
-
const isTimerEvent = (eventType) => eventType === "wait_created" || eventType === "wait_completed";
|
|
69611
|
-
const isHookLifecycleEvent = (eventType) => eventType === "hook_received" || eventType === "hook_created" || eventType === "hook_disposed";
|
|
69612
|
-
const pushEvent = (map2, correlationId, event) => {
|
|
69613
|
-
const existing = map2.get(correlationId);
|
|
69614
|
-
if (existing) {
|
|
69615
|
-
existing.push(event);
|
|
69616
|
-
return;
|
|
69617
|
-
}
|
|
69618
|
-
map2.set(correlationId, [event]);
|
|
69619
|
-
};
|
|
69620
|
-
const groupEventsByCorrelation = (events2, steps, hooks) => {
|
|
69621
|
-
const eventsByStepId = /* @__PURE__ */ new Map();
|
|
69622
|
-
const eventsByHookId = /* @__PURE__ */ new Map();
|
|
69623
|
-
const runLevelEvents = [];
|
|
69624
|
-
const timerEvents = /* @__PURE__ */ new Map();
|
|
69625
|
-
const hookEvents = /* @__PURE__ */ new Map();
|
|
69626
|
-
const stepIds = new Set(steps.map((step) => step.stepId));
|
|
69627
|
-
const hookIds = new Set(hooks.map((hook) => hook.hookId));
|
|
69628
|
-
for (const event of events2) {
|
|
69629
|
-
const correlationId = event.correlationId;
|
|
69630
|
-
if (!correlationId) {
|
|
69631
|
-
runLevelEvents.push(event);
|
|
69632
|
-
continue;
|
|
69633
|
-
}
|
|
69634
|
-
if (isTimerEvent(event.eventType)) {
|
|
69635
|
-
pushEvent(timerEvents, correlationId, event);
|
|
69636
|
-
continue;
|
|
69637
|
-
}
|
|
69638
|
-
if (isHookLifecycleEvent(event.eventType)) {
|
|
69639
|
-
pushEvent(hookEvents, correlationId, event);
|
|
69640
|
-
continue;
|
|
69641
|
-
}
|
|
69642
|
-
if (stepIds.has(correlationId)) {
|
|
69643
|
-
pushEvent(eventsByStepId, correlationId, event);
|
|
69644
|
-
continue;
|
|
69645
|
-
}
|
|
69646
|
-
if (hookIds.has(correlationId)) {
|
|
69647
|
-
pushEvent(eventsByHookId, correlationId, event);
|
|
69648
|
-
continue;
|
|
69649
|
-
}
|
|
69650
|
-
runLevelEvents.push(event);
|
|
69651
|
-
}
|
|
69652
|
-
return {
|
|
69653
|
-
eventsByStepId,
|
|
69654
|
-
eventsByHookId,
|
|
69655
|
-
runLevelEvents,
|
|
69656
|
-
timerEvents,
|
|
69657
|
-
hookEvents
|
|
69658
|
-
};
|
|
69659
|
-
};
|
|
69660
|
-
const buildSpans = (run, steps, groupedEvents, now2) => {
|
|
69661
|
-
const viewerEndTime = new Date(run.completedAt || now2);
|
|
69662
|
-
const stepSpans = steps.map((step) => {
|
|
69663
|
-
const stepEvents = groupedEvents.eventsByStepId.get(step.stepId) || [];
|
|
69664
|
-
return stepToSpan(step, stepEvents, now2, viewerEndTime);
|
|
69665
|
-
});
|
|
69666
|
-
const hookSpans = Array.from(groupedEvents.hookEvents.values()).map((events2) => hookToSpan(events2, run, now2)).filter((span) => span !== null);
|
|
69667
|
-
const waitSpans = Array.from(groupedEvents.timerEvents.values()).map((events2) => waitToSpan(events2, run, now2)).filter((span) => span !== null);
|
|
69668
|
-
return {
|
|
69669
|
-
runSpan: runToSpan(run, groupedEvents.runLevelEvents, now2),
|
|
69670
|
-
spans: [...stepSpans, ...hookSpans, ...waitSpans]
|
|
69671
|
-
};
|
|
69672
|
-
};
|
|
69673
|
-
const cascadeSpans = (runSpan, spans) => {
|
|
69674
|
-
const sortedSpans = [
|
|
69675
|
-
runSpan,
|
|
69676
|
-
...spans.slice().sort((a2, b2) => {
|
|
69677
|
-
const aStart = otelTimeToMs(a2.startTime);
|
|
69678
|
-
const bStart = otelTimeToMs(b2.startTime);
|
|
69679
|
-
return aStart - bStart;
|
|
69680
|
-
})
|
|
69681
|
-
];
|
|
69682
|
-
return sortedSpans.map((span, index2) => {
|
|
69683
|
-
const parentSpanId = index2 === 0 ? void 0 : String(sortedSpans[index2 - 1].spanId);
|
|
69684
|
-
return {
|
|
69685
|
-
...span,
|
|
69686
|
-
parentSpanId
|
|
69687
|
-
};
|
|
69688
|
-
});
|
|
69689
|
-
};
|
|
69690
|
-
const buildTrace = (run, steps, hooks, events2, now2) => {
|
|
69691
|
-
const groupedEvents = groupEventsByCorrelation(events2, steps, hooks);
|
|
69692
|
-
const { runSpan, spans } = buildSpans(run, steps, groupedEvents, now2);
|
|
69693
|
-
const sortedCascadingSpans = cascadeSpans(runSpan, spans);
|
|
69694
|
-
return {
|
|
69695
|
-
traceId: run.runId,
|
|
69696
|
-
rootSpanId: run.runId,
|
|
69697
|
-
spans: sortedCascadingSpans,
|
|
69698
|
-
resources: [
|
|
69699
|
-
{
|
|
69700
|
-
name: "workflow",
|
|
69701
|
-
attributes: {
|
|
69702
|
-
"service.name": WORKFLOW_LIBRARY.name
|
|
69703
|
-
}
|
|
69704
|
-
}
|
|
69705
|
-
]
|
|
69706
|
-
};
|
|
69707
|
-
};
|
|
69708
69789
|
function SelectionBridge({ onSelectionChange }) {
|
|
69709
69790
|
const { state } = useTraceViewer();
|
|
69710
69791
|
const { selected: selected2 } = state;
|
|
@@ -69760,18 +69841,29 @@ function PanelResizeHandle({ onResize }) {
|
|
|
69760
69841
|
}, [onResize]);
|
|
69761
69842
|
return jsxRuntimeExports.jsx("div", { className: "absolute left-0 top-0 bottom-0 w-1 cursor-col-resize hover:bg-blue-400/50 z-10", onPointerDown: handlePointerDown });
|
|
69762
69843
|
}
|
|
69763
|
-
|
|
69844
|
+
function TraceViewerFooter({ hasMore, isLive }) {
|
|
69845
|
+
const style2 = { color: "var(--ds-gray-900)" };
|
|
69846
|
+
if (hasMore) {
|
|
69847
|
+
return jsxRuntimeExports.jsxs("div", { className: "flex items-center justify-center gap-2 py-3 text-xs", style: style2, children: [jsxRuntimeExports.jsxs("svg", { className: "h-3.5 w-3.5 animate-spin", viewBox: "0 0 24 24", fill: "none", children: [jsxRuntimeExports.jsx("circle", { className: "opacity-25", cx: "12", cy: "12", r: "10", stroke: "currentColor", strokeWidth: "4" }), jsxRuntimeExports.jsx("path", { className: "opacity-75", fill: "currentColor", d: "M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4z" })] }), "Loading more events…"] });
|
|
69848
|
+
}
|
|
69849
|
+
if (isLive) {
|
|
69850
|
+
return jsxRuntimeExports.jsx("div", { className: "flex items-center justify-center py-3 text-xs", style: style2, children: "Waiting for more events…" });
|
|
69851
|
+
}
|
|
69852
|
+
return jsxRuntimeExports.jsx("div", { className: "flex items-center justify-center py-3 text-xs", style: style2, children: "End of run" });
|
|
69853
|
+
}
|
|
69854
|
+
const WorkflowTraceViewer = ({ run, events: events2, isLoading, error: error2, spanDetailData, spanDetailLoading, spanDetailError, onWakeUpSleep, onResolveHook, onCancelRun, onStreamClick, onSpanSelect, onLoadEventData, onLoadMoreSpans, hasMoreSpans = false, isLoadingMoreSpans = false, encryptionKey, onDecrypt }) => {
|
|
69764
69855
|
const [selectedSpan, setSelectedSpan] = reactExports.useState(null);
|
|
69765
69856
|
const [panelWidth, setPanelWidth] = reactExports.useState(DEFAULT_PANEL_WIDTH);
|
|
69766
69857
|
const [deselectTrigger, setDeselectTrigger] = reactExports.useState(0);
|
|
69767
69858
|
const [selectRequest, setSelectRequest] = reactExports.useState(null);
|
|
69768
69859
|
const isLive = Boolean(run && !run.completedAt);
|
|
69769
|
-
const
|
|
69770
|
-
if (!run) {
|
|
69860
|
+
const traceWithMeta = reactExports.useMemo(() => {
|
|
69861
|
+
if (!(run == null ? void 0 : run.runId)) {
|
|
69771
69862
|
return void 0;
|
|
69772
69863
|
}
|
|
69773
|
-
return buildTrace(run,
|
|
69774
|
-
}, [run,
|
|
69864
|
+
return buildTrace(run, events2, /* @__PURE__ */ new Date());
|
|
69865
|
+
}, [run, events2]);
|
|
69866
|
+
const trace2 = traceWithMeta;
|
|
69775
69867
|
reactExports.useEffect(() => {
|
|
69776
69868
|
if (error2 && !isLoading) {
|
|
69777
69869
|
console.error(error2);
|
|
@@ -69856,10 +69948,10 @@ const WorkflowTraceViewer = ({ run, steps, hooks, events: events2, isLoading, er
|
|
|
69856
69948
|
const workflowName = data.workflowName;
|
|
69857
69949
|
return (stepName ? (_a3 = parseStepName(stepName)) == null ? void 0 : _a3.shortName : void 0) ?? (workflowName ? (_b = parseWorkflowName(workflowName)) == null ? void 0 : _b.shortName : void 0) ?? stepName ?? workflowName ?? data.hookId ?? "Details";
|
|
69858
69950
|
}, [selectedSpan == null ? void 0 : selectedSpan.data]);
|
|
69859
|
-
if (
|
|
69951
|
+
if (!trace2) {
|
|
69860
69952
|
return jsxRuntimeExports.jsxs("div", { className: "relative w-full h-full", children: [jsxRuntimeExports.jsx("div", { className: "border-b border-gray-alpha-400 w-full" }), jsxRuntimeExports.jsx(Skeleton$2, { className: "w-full ml-2 mt-1 mb-1 h-[56px]" }), jsxRuntimeExports.jsxs("div", { className: "p-2 relative w-full", children: [jsxRuntimeExports.jsx(Skeleton$2, { className: "w-full mt-6 h-[20px]" }), jsxRuntimeExports.jsx(Skeleton$2, { className: "w-[10%] mt-2 ml-6 h-[20px]" }), jsxRuntimeExports.jsx(Skeleton$2, { className: "w-[10%] mt-2 ml-12 h-[20px]" }), jsxRuntimeExports.jsx(Skeleton$2, { className: "w-[20%] mt-2 ml-16 h-[20px]" })] })] });
|
|
69861
69953
|
}
|
|
69862
|
-
return jsxRuntimeExports.jsxs("div", { className: "relative w-full h-full flex", children: [jsxRuntimeExports.jsx("div", { className: "flex-1 min-w-0 relative", children: jsxRuntimeExports.jsxs(TraceViewerContextProvider, { customSpanClassNameFunc: getCustomSpanClassName, customSpanEventClassNameFunc: getCustomSpanEventClassName, children: [jsxRuntimeExports.jsx(SelectionBridge, { onSelectionChange: handleSelectionChange }), jsxRuntimeExports.jsx(DeselectBridge, { triggerDeselect: deselectTrigger }), jsxRuntimeExports.jsx(SelectBridge, { selectRequest }), jsxRuntimeExports.jsx(TraceViewerWithContextMenu, { trace: trace2, run,
|
|
69954
|
+
return jsxRuntimeExports.jsxs("div", { className: "relative w-full h-full flex", children: [jsxRuntimeExports.jsx("div", { className: "flex-1 min-w-0 relative", children: jsxRuntimeExports.jsxs(TraceViewerContextProvider, { customSpanClassNameFunc: getCustomSpanClassName, customSpanEventClassNameFunc: getCustomSpanEventClassName, children: [jsxRuntimeExports.jsx(SelectionBridge, { onSelectionChange: handleSelectionChange }), jsxRuntimeExports.jsx(DeselectBridge, { triggerDeselect: deselectTrigger }), jsxRuntimeExports.jsx(SelectBridge, { selectRequest }), jsxRuntimeExports.jsx(TraceViewerWithContextMenu, { trace: trace2, run, isLive, onWakeUpSleep, onCancelRun, onResolveHook, onLoadMoreSpans, hasMoreSpans, isLoadingMoreSpans, children: jsxRuntimeExports.jsx(TraceViewerTimeline, { eagerRender: true, height: "100%", isLive, trace: trace2, knownDurationMs: traceWithMeta == null ? void 0 : traceWithMeta.knownDurationMs, hasMoreData: hasMoreSpans, footer: jsxRuntimeExports.jsx(TraceViewerFooter, { hasMore: hasMoreSpans, isLive }) }) })] }) }), selectedSpan && jsxRuntimeExports.jsxs("div", { className: "relative border-l flex-shrink-0 flex flex-col", style: {
|
|
69863
69955
|
width: panelWidth,
|
|
69864
69956
|
borderColor: "var(--ds-gray-200)",
|
|
69865
69957
|
backgroundColor: "var(--ds-background-100)"
|
|
@@ -69929,7 +70021,7 @@ const WorkflowTraceViewer = ({ run, steps, hooks, events: events2, isLoading, er
|
|
|
69929
70021
|
e.currentTarget.style.background = "var(--ds-gray-alpha-100)";
|
|
69930
70022
|
}, onMouseLeave: (e) => {
|
|
69931
70023
|
e.currentTarget.style.background = "transparent";
|
|
69932
|
-
}, children: jsxRuntimeExports.jsx(X$3, { size: 16 }) }) })] }), jsxRuntimeExports.jsx("div", { className: "flex-1 overflow-y-auto", children: jsxRuntimeExports.jsx(ErrorBoundary, { title: "Failed to load entity details", children: jsxRuntimeExports.jsx(EntityDetailPanel, { run,
|
|
70024
|
+
}, children: jsxRuntimeExports.jsx(X$3, { size: 16 }) }) })] }), jsxRuntimeExports.jsx("div", { className: "flex-1 overflow-y-auto", children: jsxRuntimeExports.jsx(ErrorBoundary, { title: "Failed to load entity details", children: jsxRuntimeExports.jsx(EntityDetailPanel, { run, onStreamClick, spanDetailData: spanDetailData ?? null, spanDetailError, spanDetailLoading, onSpanSelect: handleSpanSelect, onWakeUpSleep, onLoadEventData, onResolveHook, encryptionKey, onDecrypt, selectedSpan }) }) })] })] });
|
|
69933
70025
|
};
|
|
69934
70026
|
function deserializeChunkText(text2) {
|
|
69935
70027
|
try {
|
|
@@ -72703,9 +72795,6 @@ async function fetchRuns$1(worldEnv, params) {
|
|
|
72703
72795
|
async function fetchRun$1(worldEnv, runId, resolveData = "all") {
|
|
72704
72796
|
return rpc("fetchRun", { worldEnv, runId, resolveData });
|
|
72705
72797
|
}
|
|
72706
|
-
async function fetchSteps$1(worldEnv, runId, params) {
|
|
72707
|
-
return rpc("fetchSteps", { worldEnv, runId, params });
|
|
72708
|
-
}
|
|
72709
72798
|
async function fetchStep$1(worldEnv, runId, stepId, resolveData = "all") {
|
|
72710
72799
|
return rpc("fetchStep", { worldEnv, runId, stepId, resolveData });
|
|
72711
72800
|
}
|
|
@@ -72715,9 +72804,6 @@ async function fetchEvents$1(worldEnv, runId, params) {
|
|
|
72715
72804
|
async function fetchEvent$1(worldEnv, runId, eventId, resolveData = "all") {
|
|
72716
72805
|
return rpc("fetchEvent", { worldEnv, runId, eventId, resolveData });
|
|
72717
72806
|
}
|
|
72718
|
-
async function fetchEventsByCorrelationId$1(worldEnv, correlationId, params) {
|
|
72719
|
-
return rpc("fetchEventsByCorrelationId", { worldEnv, correlationId, params });
|
|
72720
|
-
}
|
|
72721
72807
|
async function fetchHooks$1(worldEnv, params) {
|
|
72722
72808
|
return rpc("fetchHooks", { worldEnv, params });
|
|
72723
72809
|
}
|
|
@@ -73161,6 +73247,16 @@ function parseDurationToDate(param) {
|
|
|
73161
73247
|
throw new Error(`Invalid duration parameter. Expected a duration string, number (milliseconds), or Date object.`);
|
|
73162
73248
|
}
|
|
73163
73249
|
}
|
|
73250
|
+
function resolveWorkflowTargetWorld(env2 = process.env) {
|
|
73251
|
+
const configuredWorld = env2.WORKFLOW_TARGET_WORLD;
|
|
73252
|
+
if (configuredWorld) {
|
|
73253
|
+
return configuredWorld;
|
|
73254
|
+
}
|
|
73255
|
+
return env2.VERCEL_DEPLOYMENT_ID ? "vercel" : "local";
|
|
73256
|
+
}
|
|
73257
|
+
function isVercelWorldTarget(targetWorld) {
|
|
73258
|
+
return targetWorld === "vercel" || targetWorld === "@workflow/world-vercel";
|
|
73259
|
+
}
|
|
73164
73260
|
const BASE_URL = "https://useworkflow.dev/err";
|
|
73165
73261
|
function isError(value) {
|
|
73166
73262
|
return typeof value === "object" && value !== null && "name" in value && "message" in value;
|
|
@@ -89427,8 +89523,8 @@ function requireGetVercelOidcToken$1() {
|
|
|
89427
89523
|
}
|
|
89428
89524
|
try {
|
|
89429
89525
|
const [{ getTokenPayload, isExpired }, { refreshToken }] = await Promise.all([
|
|
89430
|
-
await import("./token-util-
|
|
89431
|
-
await import("./token-
|
|
89526
|
+
await import("./token-util-YAVqVR6-.js").then((n) => n.t),
|
|
89527
|
+
await import("./token-mzBpVePm.js").then((n) => n.t)
|
|
89432
89528
|
]);
|
|
89433
89529
|
if (!token || isExpired(getTokenPayload(token))) {
|
|
89434
89530
|
await refreshToken();
|
|
@@ -115613,19 +115709,21 @@ function createQueue$2(config2) {
|
|
|
115613
115709
|
body: body2
|
|
115614
115710
|
});
|
|
115615
115711
|
}
|
|
115616
|
-
if (response2.ok) {
|
|
115617
|
-
return;
|
|
115618
|
-
}
|
|
115619
115712
|
const text2 = await response2.text();
|
|
115620
|
-
if (response2.
|
|
115713
|
+
if (response2.ok) {
|
|
115621
115714
|
try {
|
|
115622
115715
|
const timeoutSeconds = Number(JSON.parse(text2).timeoutSeconds);
|
|
115623
|
-
|
|
115624
|
-
|
|
115625
|
-
|
|
115626
|
-
|
|
115716
|
+
if (Number.isFinite(timeoutSeconds) && timeoutSeconds >= 0) {
|
|
115717
|
+
if (timeoutSeconds > 0) {
|
|
115718
|
+
const timeoutMs = Math.min(timeoutSeconds * 1e3, MAX_SAFE_TIMEOUT_MS);
|
|
115719
|
+
await setTimeout$1(timeoutMs);
|
|
115720
|
+
}
|
|
115721
|
+
defaultRetriesLeft++;
|
|
115722
|
+
continue;
|
|
115723
|
+
}
|
|
115627
115724
|
} catch {
|
|
115628
115725
|
}
|
|
115726
|
+
return;
|
|
115629
115727
|
}
|
|
115630
115728
|
console.error(`[local world] Failed to queue message`, {
|
|
115631
115729
|
queueName,
|
|
@@ -115678,7 +115776,7 @@ function createQueue$2(config2) {
|
|
|
115678
115776
|
timeoutSeconds = Math.min(result.timeoutSeconds, LOCAL_QUEUE_MAX_VISIBILITY);
|
|
115679
115777
|
}
|
|
115680
115778
|
if (timeoutSeconds != null) {
|
|
115681
|
-
return Response.json({ timeoutSeconds }
|
|
115779
|
+
return Response.json({ timeoutSeconds });
|
|
115682
115780
|
}
|
|
115683
115781
|
return Response.json({ ok: true });
|
|
115684
115782
|
} catch (error2) {
|
|
@@ -117129,8 +117227,8 @@ function requireGetVercelOidcToken() {
|
|
|
117129
117227
|
}
|
|
117130
117228
|
try {
|
|
117131
117229
|
const [{ getTokenPayload, isExpired }, { refreshToken }] = await Promise.all([
|
|
117132
|
-
await import("./token-util-
|
|
117133
|
-
await import("./token-
|
|
117230
|
+
await import("./token-util-D7WmNSMO.js").then((n) => n.t),
|
|
117231
|
+
await import("./token-BRJJ012D.js").then((n) => n.t)
|
|
117134
117232
|
]);
|
|
117135
117233
|
if (!token || isExpired(getTokenPayload(token), options == null ? void 0 : options.expirationBufferMs)) {
|
|
117136
117234
|
await refreshToken(options);
|
|
@@ -117749,11 +117847,17 @@ async function fetchRunKey(deploymentId, projectId, runId, options) {
|
|
|
117749
117847
|
headers: {
|
|
117750
117848
|
authorization: `Bearer ${token}`
|
|
117751
117849
|
},
|
|
117850
|
+
// @ts-expect-error -- undici dispatcher is accepted by Node.js fetch but not in @types/node's RequestInit
|
|
117752
117851
|
dispatcher: getDispatcher()
|
|
117753
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any -- undici v7 dispatcher types don't match @types/node's RequestInit
|
|
117754
117852
|
});
|
|
117755
117853
|
if (!response2.ok) {
|
|
117756
|
-
|
|
117854
|
+
let body2;
|
|
117855
|
+
try {
|
|
117856
|
+
body2 = await response2.text();
|
|
117857
|
+
} catch {
|
|
117858
|
+
body2 = "<unable to read response body>";
|
|
117859
|
+
}
|
|
117860
|
+
throw new Error(`Failed to fetch run key for ${runId} (deployment ${deploymentId}): HTTP ${response2.status} ${response2.statusText}${body2 ? ` — ${body2}` : ""}`);
|
|
117757
117861
|
}
|
|
117758
117862
|
const data = await response2.json();
|
|
117759
117863
|
const result = object$1({ key: string$1().nullable() }).safeParse(data);
|
|
@@ -117768,7 +117872,7 @@ async function fetchRunKey(deploymentId, projectId, runId, options) {
|
|
|
117768
117872
|
function createGetEncryptionKeyForRun(projectId, teamId, token) {
|
|
117769
117873
|
if (!projectId)
|
|
117770
117874
|
return void 0;
|
|
117771
|
-
const
|
|
117875
|
+
const isServerlessRuntime = process.env.VERCEL === "1";
|
|
117772
117876
|
let localDeploymentKey;
|
|
117773
117877
|
function getLocalDeploymentKey() {
|
|
117774
117878
|
if (localDeploymentKey)
|
|
@@ -117782,12 +117886,16 @@ function createGetEncryptionKeyForRun(projectId, teamId, token) {
|
|
|
117782
117886
|
return async function getEncryptionKeyForRun2(run, context) {
|
|
117783
117887
|
const runId = typeof run === "string" ? run : run.runId;
|
|
117784
117888
|
const deploymentId = typeof run === "string" ? context == null ? void 0 : context.deploymentId : run.deploymentId;
|
|
117785
|
-
if (
|
|
117786
|
-
|
|
117787
|
-
|
|
117788
|
-
|
|
117789
|
-
|
|
117889
|
+
if (isServerlessRuntime) {
|
|
117890
|
+
if (!deploymentId || deploymentId === process.env.VERCEL_DEPLOYMENT_ID) {
|
|
117891
|
+
const localKey = getLocalDeploymentKey();
|
|
117892
|
+
if (!localKey)
|
|
117893
|
+
return void 0;
|
|
117894
|
+
return deriveRunKey(localKey, projectId, runId);
|
|
117895
|
+
}
|
|
117790
117896
|
}
|
|
117897
|
+
if (!deploymentId)
|
|
117898
|
+
return void 0;
|
|
117791
117899
|
return fetchRunKey(deploymentId, projectId, runId, { token, teamId });
|
|
117792
117900
|
};
|
|
117793
117901
|
}
|
|
@@ -117849,7 +117957,7 @@ const PeerService = SemanticConvention("peer.service");
|
|
|
117849
117957
|
const RpcSystem = SemanticConvention("rpc.system");
|
|
117850
117958
|
const RpcService = SemanticConvention("rpc.service");
|
|
117851
117959
|
const RpcMethod = SemanticConvention("rpc.method");
|
|
117852
|
-
const version$1 = "4.1.0-beta.
|
|
117960
|
+
const version$1 = "4.1.0-beta.42";
|
|
117853
117961
|
const DEFAULT_RESOLVE_DATA_OPTION = "all";
|
|
117854
117962
|
function deserializeError(obj) {
|
|
117855
117963
|
const { error: error2, ...rest } = obj;
|
|
@@ -118970,26 +119078,19 @@ const require$1 = createRequire$1(join$1(process.cwd(), "index.js"));
|
|
|
118970
119078
|
const WorldCache = Symbol.for("@workflow/world//cache");
|
|
118971
119079
|
const StubbedWorldCache = Symbol.for("@workflow/world//stubbedCache");
|
|
118972
119080
|
const globalSymbols = globalThis;
|
|
118973
|
-
function defaultWorld() {
|
|
118974
|
-
if (process.env.VERCEL_DEPLOYMENT_ID) {
|
|
118975
|
-
return "vercel";
|
|
118976
|
-
}
|
|
118977
|
-
return "local";
|
|
118978
|
-
}
|
|
118979
119081
|
const createWorld = () => {
|
|
118980
|
-
const targetWorld =
|
|
118981
|
-
if (targetWorld
|
|
118982
|
-
|
|
118983
|
-
|
|
118984
|
-
|
|
118985
|
-
|
|
118986
|
-
|
|
118987
|
-
|
|
118988
|
-
|
|
118989
|
-
|
|
118990
|
-
|
|
118991
|
-
|
|
118992
|
-
});
|
|
119082
|
+
const targetWorld = resolveWorkflowTargetWorld();
|
|
119083
|
+
if (isVercelWorldTarget(targetWorld)) {
|
|
119084
|
+
const staleEnvVars = [
|
|
119085
|
+
"WORKFLOW_VERCEL_PROJECT",
|
|
119086
|
+
"WORKFLOW_VERCEL_TEAM",
|
|
119087
|
+
"WORKFLOW_VERCEL_AUTH_TOKEN",
|
|
119088
|
+
"WORKFLOW_VERCEL_ENV"
|
|
119089
|
+
].filter((key) => process.env[key]);
|
|
119090
|
+
if (staleEnvVars.length > 0) {
|
|
119091
|
+
console.warn(`[workflow] Warning: ${staleEnvVars.join(", ")} env var(s) are set but have no effect at runtime. These are only used by the Workflow CLI. Remove them from your Vercel project environment variables.`);
|
|
119092
|
+
}
|
|
119093
|
+
return createVercelWorld();
|
|
118993
119094
|
}
|
|
118994
119095
|
if (targetWorld === "local") {
|
|
118995
119096
|
return createLocalWorld({
|
|
@@ -122211,7 +122312,7 @@ async function resumeHook$2(tokenOrHook, payload, encryptionKeyOverride) {
|
|
|
122211
122312
|
});
|
|
122212
122313
|
});
|
|
122213
122314
|
}
|
|
122214
|
-
const version = "4.2.0-beta.
|
|
122315
|
+
const version = "4.2.0-beta.68";
|
|
122215
122316
|
const ulid = monotonicFactory();
|
|
122216
122317
|
async function start$1(workflow, argsOrOptions, options) {
|
|
122217
122318
|
return await waitedUntil(() => {
|
|
@@ -122242,7 +122343,10 @@ async function start$1(workflow, argsOrOptions, options) {
|
|
|
122242
122343
|
const traceCarrier = await serializeTraceCarrier();
|
|
122243
122344
|
const specVersion = opts.specVersion ?? SPEC_VERSION_CURRENT;
|
|
122244
122345
|
const v1Compat = isLegacySpecVersion(specVersion);
|
|
122245
|
-
const rawKey = await ((_a3 = world.getEncryptionKeyForRun) == null ? void 0 : _a3.call(world, runId, {
|
|
122346
|
+
const rawKey = await ((_a3 = world.getEncryptionKeyForRun) == null ? void 0 : _a3.call(world, runId, {
|
|
122347
|
+
...opts,
|
|
122348
|
+
deploymentId
|
|
122349
|
+
}));
|
|
122246
122350
|
const encryptionKey = rawKey ? await importKey(rawKey) : void 0;
|
|
122247
122351
|
const workflowArguments = await dehydrateWorkflowArguments(args, runId, encryptionKey, ops, globalThis, v1Compat);
|
|
122248
122352
|
const result = await world.events.create(runId, {
|
|
@@ -123506,31 +123610,6 @@ async function fetchEvent(worldEnv, runId, eventId, resolveData = "all") {
|
|
|
123506
123610
|
});
|
|
123507
123611
|
}
|
|
123508
123612
|
}
|
|
123509
|
-
async function fetchEventsByCorrelationId(worldEnv, correlationId, params) {
|
|
123510
|
-
const { cursor, sortOrder = "asc", limit = 1e3, withData = false } = params;
|
|
123511
|
-
try {
|
|
123512
|
-
const world = await getWorldFromEnv(worldEnv);
|
|
123513
|
-
const result = await world.events.listByCorrelationId({
|
|
123514
|
-
correlationId,
|
|
123515
|
-
pagination: { cursor, limit, sortOrder },
|
|
123516
|
-
resolveData: withData ? "all" : "none"
|
|
123517
|
-
});
|
|
123518
|
-
return createResponse({
|
|
123519
|
-
data: result.data,
|
|
123520
|
-
cursor: result.cursor ?? void 0,
|
|
123521
|
-
hasMore: result.hasMore
|
|
123522
|
-
});
|
|
123523
|
-
} catch (error2) {
|
|
123524
|
-
return createServerActionError(
|
|
123525
|
-
error2,
|
|
123526
|
-
"world.events.listByCorrelationId",
|
|
123527
|
-
{
|
|
123528
|
-
correlationId,
|
|
123529
|
-
...params
|
|
123530
|
-
}
|
|
123531
|
-
);
|
|
123532
|
-
}
|
|
123533
|
-
}
|
|
123534
123613
|
async function fetchHooks(worldEnv, params) {
|
|
123535
123614
|
const { runId, cursor, sortOrder = "desc", limit = 10 } = params;
|
|
123536
123615
|
try {
|
|
@@ -129521,57 +129600,72 @@ function useWorkflowResourceData(env2, resource, resourceId, options = {}) {
|
|
|
129521
129600
|
}
|
|
129522
129601
|
setData(null);
|
|
129523
129602
|
setError(null);
|
|
129603
|
+
setLoading(true);
|
|
129524
129604
|
if (resource === "hook") {
|
|
129525
|
-
const { error: error22, result } = await unwrapServerActionResult(
|
|
129526
|
-
fetchHook$1(env2, resourceId, "all")
|
|
129527
|
-
);
|
|
129528
|
-
if (error22) {
|
|
129529
|
-
setError(error22);
|
|
129530
|
-
return;
|
|
129531
|
-
}
|
|
129532
129605
|
try {
|
|
129533
|
-
|
|
129534
|
-
|
|
129535
|
-
setError(
|
|
129536
|
-
hydrateError instanceof Error ? hydrateError : new Error(String(hydrateError))
|
|
129606
|
+
const { error: error22, result } = await unwrapServerActionResult(
|
|
129607
|
+
fetchHook$1(env2, resourceId, "all")
|
|
129537
129608
|
);
|
|
129609
|
+
if (error22) {
|
|
129610
|
+
setError(error22);
|
|
129611
|
+
return;
|
|
129612
|
+
}
|
|
129613
|
+
try {
|
|
129614
|
+
setData(await hydrate(result));
|
|
129615
|
+
} catch (hydrateError) {
|
|
129616
|
+
setError(
|
|
129617
|
+
hydrateError instanceof Error ? hydrateError : new Error(String(hydrateError))
|
|
129618
|
+
);
|
|
129619
|
+
}
|
|
129620
|
+
} finally {
|
|
129621
|
+
setLoading(false);
|
|
129538
129622
|
}
|
|
129539
129623
|
return;
|
|
129540
129624
|
}
|
|
129541
129625
|
if (resource === "sleep") {
|
|
129542
|
-
const { error: error22, result } = await unwrapServerActionResult(
|
|
129543
|
-
fetchEventsByCorrelationId$1(env2, resourceId, {
|
|
129544
|
-
sortOrder: "asc",
|
|
129545
|
-
limit: 100,
|
|
129546
|
-
withData: true
|
|
129547
|
-
})
|
|
129548
|
-
);
|
|
129549
|
-
if (error22) {
|
|
129550
|
-
setError(error22);
|
|
129551
|
-
return;
|
|
129552
|
-
}
|
|
129553
129626
|
try {
|
|
129554
|
-
|
|
129555
|
-
|
|
129627
|
+
if (!runId) {
|
|
129628
|
+
setError(new Error("runId is required for loading sleep details"));
|
|
129629
|
+
return;
|
|
129630
|
+
}
|
|
129631
|
+
const { error: error22, result } = await unwrapServerActionResult(
|
|
129632
|
+
fetchEvents$1(env2, runId, {
|
|
129633
|
+
sortOrder: "asc",
|
|
129634
|
+
limit: 1e3,
|
|
129635
|
+
withData: true
|
|
129636
|
+
})
|
|
129556
129637
|
);
|
|
129557
|
-
|
|
129558
|
-
|
|
129638
|
+
if (error22) {
|
|
129639
|
+
setError(error22);
|
|
129640
|
+
return;
|
|
129641
|
+
}
|
|
129642
|
+
try {
|
|
129643
|
+
const allEvents = result.data.map(
|
|
129644
|
+
hydrateResourceIO
|
|
129645
|
+
);
|
|
129646
|
+
const waitEvents = await Promise.all(
|
|
129647
|
+
allEvents.filter((e) => e.correlationId === resourceId).map(hydrate)
|
|
129648
|
+
);
|
|
129649
|
+
const data2 = waitEventsToWaitEntity(waitEvents);
|
|
129650
|
+
if (data2 === null) {
|
|
129651
|
+
setError(
|
|
129652
|
+
new Error(
|
|
129653
|
+
`Failed to load ${resource} details: missing required event data`
|
|
129654
|
+
)
|
|
129655
|
+
);
|
|
129656
|
+
return;
|
|
129657
|
+
}
|
|
129658
|
+
setData(data2);
|
|
129659
|
+
} catch (hydrateError) {
|
|
129559
129660
|
setError(
|
|
129560
|
-
new Error(
|
|
129561
|
-
`Failed to load ${resource} details: missing required event data`
|
|
129562
|
-
)
|
|
129661
|
+
hydrateError instanceof Error ? hydrateError : new Error(String(hydrateError))
|
|
129563
129662
|
);
|
|
129564
|
-
return;
|
|
129565
129663
|
}
|
|
129566
|
-
|
|
129567
|
-
|
|
129568
|
-
setError(
|
|
129569
|
-
hydrateError instanceof Error ? hydrateError : new Error(String(hydrateError))
|
|
129570
|
-
);
|
|
129664
|
+
} finally {
|
|
129665
|
+
setLoading(false);
|
|
129571
129666
|
}
|
|
129572
129667
|
return;
|
|
129573
129668
|
}
|
|
129574
|
-
setLoading(true);
|
|
129575
129669
|
try {
|
|
129576
129670
|
const { data: resourceData } = await fetchResourceWithCorrelationId(
|
|
129577
129671
|
env2,
|
|
@@ -129608,7 +129702,6 @@ function useWorkflowResourceData(env2, resource, resourceId, options = {}) {
|
|
|
129608
129702
|
refresh: fetchData
|
|
129609
129703
|
};
|
|
129610
129704
|
}
|
|
129611
|
-
const MAX_ITEMS = 1e3;
|
|
129612
129705
|
function mergeById(prev, next2, idKey) {
|
|
129613
129706
|
const combined = [...prev, ...next2];
|
|
129614
129707
|
const uniqueById = new Map(
|
|
@@ -129642,89 +129735,35 @@ async function pollResource(opts) {
|
|
|
129642
129735
|
}
|
|
129643
129736
|
return false;
|
|
129644
129737
|
}
|
|
129645
|
-
const LIVE_POLL_LIMIT =
|
|
129646
|
-
const
|
|
129647
|
-
const
|
|
129738
|
+
const LIVE_POLL_LIMIT = 100;
|
|
129739
|
+
const INITIAL_PAGE_SIZE = 500;
|
|
129740
|
+
const LOAD_MORE_PAGE_SIZE = 100;
|
|
129648
129741
|
const LIVE_UPDATE_INTERVAL_MS = 5e3;
|
|
129649
|
-
async function fetchAllEventsForCorrelationId(env2, correlationId) {
|
|
129650
|
-
let eventsData = [];
|
|
129651
|
-
let cursor;
|
|
129652
|
-
while (true) {
|
|
129653
|
-
const { error: error2, result } = await unwrapServerActionResult(
|
|
129654
|
-
fetchEventsByCorrelationId$1(env2, correlationId, {
|
|
129655
|
-
cursor,
|
|
129656
|
-
sortOrder: "asc",
|
|
129657
|
-
limit: 1e3
|
|
129658
|
-
})
|
|
129659
|
-
);
|
|
129660
|
-
if (error2) {
|
|
129661
|
-
break;
|
|
129662
|
-
}
|
|
129663
|
-
eventsData = [...eventsData, ...result.data];
|
|
129664
|
-
if (!result.hasMore || !result.cursor || eventsData.length >= MAX_ITEMS) {
|
|
129665
|
-
break;
|
|
129666
|
-
}
|
|
129667
|
-
cursor = result.cursor;
|
|
129668
|
-
}
|
|
129669
|
-
return eventsData;
|
|
129670
|
-
}
|
|
129671
|
-
async function fetchEventsForCorrelationIds(env2, correlationIds) {
|
|
129672
|
-
if (correlationIds.length === 0) {
|
|
129673
|
-
return [];
|
|
129674
|
-
}
|
|
129675
|
-
const results = await Promise.all(
|
|
129676
|
-
correlationIds.map(
|
|
129677
|
-
(correlationId) => fetchAllEventsForCorrelationId(env2, correlationId)
|
|
129678
|
-
)
|
|
129679
|
-
);
|
|
129680
|
-
return results.flat();
|
|
129681
|
-
}
|
|
129682
129742
|
function useWorkflowTraceViewerData(env2, runId, options = {}) {
|
|
129683
129743
|
const { live = false } = options;
|
|
129684
129744
|
const [run, setRun] = reactExports.useState(null);
|
|
129685
|
-
const [steps, setSteps] = reactExports.useState([]);
|
|
129686
|
-
const [hooks, setHooks] = reactExports.useState([]);
|
|
129687
129745
|
const [events2, setEvents] = reactExports.useState([]);
|
|
129688
129746
|
const [loading, setLoading] = reactExports.useState(true);
|
|
129689
|
-
const [auxiliaryDataLoading, setAuxiliaryDataLoading] = reactExports.useState(false);
|
|
129690
129747
|
const [error2, setError] = reactExports.useState(null);
|
|
129691
|
-
const [stepsCursor, setStepsCursor] = reactExports.useState();
|
|
129692
|
-
const [hooksCursor, setHooksCursor] = reactExports.useState();
|
|
129693
129748
|
const [eventsCursor, setEventsCursor] = reactExports.useState();
|
|
129694
|
-
const [stepsHasMore, setStepsHasMore] = reactExports.useState(false);
|
|
129695
|
-
const [hooksHasMore, setHooksHasMore] = reactExports.useState(false);
|
|
129696
129749
|
const [eventsHasMore, setEventsHasMore] = reactExports.useState(false);
|
|
129697
129750
|
const [isLoadingMoreTraceData, setIsLoadingMoreTraceData] = reactExports.useState(false);
|
|
129698
129751
|
const isFetchingRef = reactExports.useRef(false);
|
|
129699
129752
|
const [initialLoadCompleted, setInitialLoadCompleted] = reactExports.useState(false);
|
|
129700
129753
|
const fetchAllData = reactExports.useCallback(async () => {
|
|
129701
|
-
var _a3;
|
|
129702
129754
|
if (isFetchingRef.current) {
|
|
129703
129755
|
return;
|
|
129704
129756
|
}
|
|
129705
129757
|
isFetchingRef.current = true;
|
|
129706
129758
|
setLoading(true);
|
|
129707
|
-
setAuxiliaryDataLoading(true);
|
|
129708
129759
|
setError(null);
|
|
129709
|
-
const [runResult,
|
|
129760
|
+
const [runResult, eventsResult] = await Promise.all([
|
|
129710
129761
|
unwrapServerActionResult(fetchRun$1(env2, runId, "none")),
|
|
129711
|
-
unwrapServerActionResult(
|
|
129712
|
-
fetchSteps$1(env2, runId, {
|
|
129713
|
-
sortOrder: "asc",
|
|
129714
|
-
limit: TRACE_VIEWER_BATCH_SIZE
|
|
129715
|
-
})
|
|
129716
|
-
),
|
|
129717
|
-
unwrapServerActionResult(
|
|
129718
|
-
fetchHooks$1(env2, {
|
|
129719
|
-
runId,
|
|
129720
|
-
sortOrder: "asc",
|
|
129721
|
-
limit: TRACE_VIEWER_BATCH_SIZE
|
|
129722
|
-
})
|
|
129723
|
-
),
|
|
129724
129762
|
unwrapServerActionResult(
|
|
129725
129763
|
fetchEvents$1(env2, runId, {
|
|
129726
129764
|
sortOrder: "asc",
|
|
129727
|
-
limit:
|
|
129765
|
+
limit: INITIAL_PAGE_SIZE,
|
|
129766
|
+
withData: true
|
|
129728
129767
|
})
|
|
129729
129768
|
)
|
|
129730
129769
|
]);
|
|
@@ -129733,133 +129772,45 @@ function useWorkflowTraceViewerData(env2, runId, options = {}) {
|
|
|
129733
129772
|
} else {
|
|
129734
129773
|
setRun(hydrateResourceIO(runResult.result));
|
|
129735
129774
|
}
|
|
129736
|
-
const nextSteps = stepsResult.error ? [] : stepsResult.result.data.map(hydrateResourceIO);
|
|
129737
|
-
const nextHooks = hooksResult.error ? [] : hooksResult.result.data.map(hydrateResourceIO);
|
|
129738
129775
|
const initialEvents = eventsResult.error ? [] : eventsResult.result.data.map(hydrateResourceIO);
|
|
129739
|
-
|
|
129740
|
-
...nextSteps.map((step) => step.stepId),
|
|
129741
|
-
...nextHooks.map((hook) => hook.hookId)
|
|
129742
|
-
];
|
|
129743
|
-
const correlationEventsRaw = await fetchEventsForCorrelationIds(
|
|
129744
|
-
env2,
|
|
129745
|
-
correlationIds
|
|
129746
|
-
);
|
|
129747
|
-
const correlationEvents = correlationEventsRaw.map(hydrateResourceIO);
|
|
129748
|
-
setSteps(nextSteps);
|
|
129749
|
-
setHooks(nextHooks);
|
|
129750
|
-
setEvents(
|
|
129751
|
-
mergeById([], [...initialEvents, ...correlationEvents], "eventId")
|
|
129752
|
-
);
|
|
129753
|
-
setStepsCursor(
|
|
129754
|
-
stepsResult.error || !stepsResult.result.hasMore ? void 0 : stepsResult.result.cursor
|
|
129755
|
-
);
|
|
129756
|
-
setHooksCursor(
|
|
129757
|
-
hooksResult.error || !hooksResult.result.hasMore ? void 0 : hooksResult.result.cursor
|
|
129758
|
-
);
|
|
129776
|
+
setEvents(mergeById([], initialEvents, "eventId"));
|
|
129759
129777
|
setEventsCursor(
|
|
129760
129778
|
eventsResult.error || !eventsResult.result.hasMore ? void 0 : eventsResult.result.cursor
|
|
129761
129779
|
);
|
|
129762
|
-
setStepsHasMore(Boolean(!stepsResult.error && stepsResult.result.hasMore));
|
|
129763
|
-
setHooksHasMore(Boolean(!hooksResult.error && hooksResult.result.hasMore));
|
|
129764
129780
|
setEventsHasMore(
|
|
129765
129781
|
Boolean(!eventsResult.error && eventsResult.result.hasMore)
|
|
129766
129782
|
);
|
|
129767
|
-
const settledResults = [runResult, stepsResult, hooksResult, eventsResult];
|
|
129768
129783
|
setLoading(false);
|
|
129769
|
-
setAuxiliaryDataLoading(false);
|
|
129770
129784
|
setInitialLoadCompleted(true);
|
|
129771
129785
|
isFetchingRef.current = false;
|
|
129772
|
-
if (!runResult.error) {
|
|
129773
|
-
|
|
129774
|
-
if (firstError) {
|
|
129775
|
-
setError(firstError);
|
|
129776
|
-
}
|
|
129786
|
+
if (!runResult.error && eventsResult.error) {
|
|
129787
|
+
setError(eventsResult.error);
|
|
129777
129788
|
}
|
|
129778
129789
|
}, [env2, runId]);
|
|
129779
129790
|
const loadMoreTraceData = reactExports.useCallback(async () => {
|
|
129780
|
-
|
|
129781
|
-
if (isFetchingRef.current || !initialLoadCompleted || isLoadingMoreTraceData) {
|
|
129782
|
-
return;
|
|
129783
|
-
}
|
|
129784
|
-
if (!stepsHasMore && !hooksHasMore && !eventsHasMore) {
|
|
129791
|
+
if (isFetchingRef.current || !initialLoadCompleted || isLoadingMoreTraceData || !eventsHasMore) {
|
|
129785
129792
|
return;
|
|
129786
129793
|
}
|
|
129787
129794
|
setIsLoadingMoreTraceData(true);
|
|
129788
129795
|
try {
|
|
129789
|
-
const
|
|
129790
|
-
|
|
129791
|
-
|
|
129792
|
-
|
|
129793
|
-
|
|
129794
|
-
|
|
129795
|
-
|
|
129796
|
-
|
|
129797
|
-
hooksHasMore ? unwrapServerActionResult(
|
|
129798
|
-
fetchHooks$1(env2, {
|
|
129799
|
-
runId,
|
|
129800
|
-
cursor: hooksCursor,
|
|
129801
|
-
sortOrder: "asc",
|
|
129802
|
-
limit: TRACE_VIEWER_BATCH_SIZE
|
|
129803
|
-
})
|
|
129804
|
-
) : Promise.resolve({ error: null, result: null }),
|
|
129805
|
-
eventsHasMore ? unwrapServerActionResult(
|
|
129806
|
-
fetchEvents$1(env2, runId, {
|
|
129807
|
-
cursor: eventsCursor,
|
|
129808
|
-
sortOrder: "asc",
|
|
129809
|
-
limit: TRACE_VIEWER_BATCH_SIZE
|
|
129810
|
-
})
|
|
129811
|
-
) : Promise.resolve({ error: null, result: null })
|
|
129812
|
-
]);
|
|
129813
|
-
if (nextStepsResult.error) {
|
|
129814
|
-
setError(nextStepsResult.error);
|
|
129815
|
-
}
|
|
129816
|
-
if (nextHooksResult.error) {
|
|
129817
|
-
setError(nextHooksResult.error);
|
|
129818
|
-
}
|
|
129796
|
+
const nextEventsResult = await unwrapServerActionResult(
|
|
129797
|
+
fetchEvents$1(env2, runId, {
|
|
129798
|
+
cursor: eventsCursor,
|
|
129799
|
+
sortOrder: "asc",
|
|
129800
|
+
limit: LOAD_MORE_PAGE_SIZE,
|
|
129801
|
+
withData: true
|
|
129802
|
+
})
|
|
129803
|
+
);
|
|
129819
129804
|
if (nextEventsResult.error) {
|
|
129820
129805
|
setError(nextEventsResult.error);
|
|
129821
|
-
}
|
|
129822
|
-
|
|
129823
|
-
|
|
129824
|
-
|
|
129825
|
-
|
|
129826
|
-
|
|
129827
|
-
}
|
|
129828
|
-
if (nextHooks.length > 0) {
|
|
129829
|
-
setHooks((prev) => mergeById(prev, nextHooks, "hookId"));
|
|
129830
|
-
}
|
|
129831
|
-
const newCorrelationIds = [
|
|
129832
|
-
...nextSteps.map((step) => step.stepId),
|
|
129833
|
-
...nextHooks.map((hook) => hook.hookId)
|
|
129834
|
-
];
|
|
129835
|
-
const correlationEventsRaw = await fetchEventsForCorrelationIds(
|
|
129836
|
-
env2,
|
|
129837
|
-
newCorrelationIds
|
|
129838
|
-
);
|
|
129839
|
-
const correlationEvents = correlationEventsRaw.map(hydrateResourceIO);
|
|
129840
|
-
const allNewEvents = [...nextEvents, ...correlationEvents];
|
|
129841
|
-
if (allNewEvents.length > 0) {
|
|
129842
|
-
setEvents((prev) => mergeById(prev, allNewEvents, "eventId"));
|
|
129843
|
-
}
|
|
129844
|
-
const nextStepsHasMore = nextStepsResult.error ? stepsHasMore : Boolean(nextStepsResult.result && nextStepsResult.result.hasMore);
|
|
129845
|
-
const nextHooksHasMore = nextHooksResult.error ? hooksHasMore : Boolean(nextHooksResult.result && nextHooksResult.result.hasMore);
|
|
129846
|
-
const nextEventsHasMore = nextEventsResult.error ? eventsHasMore : Boolean(nextEventsResult.result && nextEventsResult.result.hasMore);
|
|
129847
|
-
setStepsHasMore(nextStepsHasMore);
|
|
129848
|
-
setHooksHasMore(nextHooksHasMore);
|
|
129849
|
-
setEventsHasMore(nextEventsHasMore);
|
|
129850
|
-
if (!nextStepsResult.error) {
|
|
129851
|
-
setStepsCursor(
|
|
129852
|
-
((_d = nextStepsResult.result) == null ? void 0 : _d.hasMore) ? nextStepsResult.result.cursor : void 0
|
|
129853
|
-
);
|
|
129854
|
-
}
|
|
129855
|
-
if (!nextHooksResult.error) {
|
|
129856
|
-
setHooksCursor(
|
|
129857
|
-
((_e2 = nextHooksResult.result) == null ? void 0 : _e2.hasMore) ? nextHooksResult.result.cursor : void 0
|
|
129858
|
-
);
|
|
129859
|
-
}
|
|
129860
|
-
if (!nextEventsResult.error) {
|
|
129806
|
+
} else {
|
|
129807
|
+
const nextEvents = nextEventsResult.result.data.map(hydrateResourceIO);
|
|
129808
|
+
if (nextEvents.length > 0) {
|
|
129809
|
+
setEvents((prev) => mergeById(prev, nextEvents, "eventId"));
|
|
129810
|
+
}
|
|
129811
|
+
setEventsHasMore(Boolean(nextEventsResult.result.hasMore));
|
|
129861
129812
|
setEventsCursor(
|
|
129862
|
-
|
|
129813
|
+
nextEventsResult.result.hasMore ? nextEventsResult.result.cursor : void 0
|
|
129863
129814
|
);
|
|
129864
129815
|
}
|
|
129865
129816
|
} finally {
|
|
@@ -129870,11 +129821,7 @@ function useWorkflowTraceViewerData(env2, runId, options = {}) {
|
|
|
129870
129821
|
runId,
|
|
129871
129822
|
initialLoadCompleted,
|
|
129872
129823
|
isLoadingMoreTraceData,
|
|
129873
|
-
stepsHasMore,
|
|
129874
|
-
hooksHasMore,
|
|
129875
129824
|
eventsHasMore,
|
|
129876
|
-
stepsCursor,
|
|
129877
|
-
hooksCursor,
|
|
129878
129825
|
eventsCursor
|
|
129879
129826
|
]);
|
|
129880
129827
|
const pollRun = reactExports.useCallback(async () => {
|
|
@@ -129892,49 +129839,14 @@ function useWorkflowTraceViewerData(env2, runId, options = {}) {
|
|
|
129892
129839
|
setRun(hydrateResourceIO(result));
|
|
129893
129840
|
return true;
|
|
129894
129841
|
}, [env2, runId, run == null ? void 0 : run.completedAt]);
|
|
129895
|
-
const pollSteps = reactExports.useCallback(
|
|
129896
|
-
() => pollResource({
|
|
129897
|
-
fetchFn: () => unwrapServerActionResult(
|
|
129898
|
-
fetchSteps$1(env2, runId, {
|
|
129899
|
-
cursor: stepsCursor,
|
|
129900
|
-
sortOrder: "asc",
|
|
129901
|
-
limit: LIVE_POLL_LIMIT
|
|
129902
|
-
})
|
|
129903
|
-
),
|
|
129904
|
-
setItems: setSteps,
|
|
129905
|
-
setCursor: setStepsCursor,
|
|
129906
|
-
setError,
|
|
129907
|
-
idKey: "stepId",
|
|
129908
|
-
cursorStrategy: "onHasMore",
|
|
129909
|
-
transform: hydrateResourceIO
|
|
129910
|
-
}),
|
|
129911
|
-
[env2, runId, stepsCursor]
|
|
129912
|
-
);
|
|
129913
|
-
const pollHooks = reactExports.useCallback(
|
|
129914
|
-
() => pollResource({
|
|
129915
|
-
fetchFn: () => unwrapServerActionResult(
|
|
129916
|
-
fetchHooks$1(env2, {
|
|
129917
|
-
runId,
|
|
129918
|
-
cursor: hooksCursor,
|
|
129919
|
-
sortOrder: "asc",
|
|
129920
|
-
limit: LIVE_POLL_LIMIT
|
|
129921
|
-
})
|
|
129922
|
-
),
|
|
129923
|
-
setItems: setHooks,
|
|
129924
|
-
setCursor: setHooksCursor,
|
|
129925
|
-
setError,
|
|
129926
|
-
idKey: "hookId",
|
|
129927
|
-
transform: hydrateResourceIO
|
|
129928
|
-
}),
|
|
129929
|
-
[env2, runId, hooksCursor]
|
|
129930
|
-
);
|
|
129931
129842
|
const pollEvents = reactExports.useCallback(
|
|
129932
129843
|
() => pollResource({
|
|
129933
129844
|
fetchFn: () => unwrapServerActionResult(
|
|
129934
129845
|
fetchEvents$1(env2, runId, {
|
|
129935
129846
|
cursor: eventsCursor,
|
|
129936
129847
|
sortOrder: "asc",
|
|
129937
|
-
limit: LIVE_POLL_LIMIT
|
|
129848
|
+
limit: LIVE_POLL_LIMIT,
|
|
129849
|
+
withData: true
|
|
129938
129850
|
})
|
|
129939
129851
|
),
|
|
129940
129852
|
setItems: setEvents,
|
|
@@ -129945,27 +129857,19 @@ function useWorkflowTraceViewerData(env2, runId, options = {}) {
|
|
|
129945
129857
|
}),
|
|
129946
129858
|
[env2, runId, eventsCursor]
|
|
129947
129859
|
);
|
|
129948
|
-
const update = reactExports.useCallback(
|
|
129949
|
-
|
|
129950
|
-
|
|
129951
|
-
|
|
129952
|
-
|
|
129953
|
-
|
|
129954
|
-
|
|
129955
|
-
|
|
129956
|
-
|
|
129957
|
-
|
|
129958
|
-
|
|
129959
|
-
|
|
129960
|
-
|
|
129961
|
-
foundNewItems = stepsUpdated || hooksUpdated || eventsUpdated;
|
|
129962
|
-
} catch (err) {
|
|
129963
|
-
console.error("Update error:", err);
|
|
129964
|
-
}
|
|
129965
|
-
return { foundNewItems };
|
|
129966
|
-
},
|
|
129967
|
-
[pollSteps, pollHooks, pollEvents, initialLoadCompleted, pollRun]
|
|
129968
|
-
);
|
|
129860
|
+
const update = reactExports.useCallback(async () => {
|
|
129861
|
+
if (isFetchingRef.current || !initialLoadCompleted) {
|
|
129862
|
+
return { foundNewItems: false };
|
|
129863
|
+
}
|
|
129864
|
+
let foundNewItems = false;
|
|
129865
|
+
try {
|
|
129866
|
+
const [_2, eventsUpdated] = await Promise.all([pollRun(), pollEvents()]);
|
|
129867
|
+
foundNewItems = eventsUpdated;
|
|
129868
|
+
} catch (err) {
|
|
129869
|
+
console.error("Update error:", err);
|
|
129870
|
+
}
|
|
129871
|
+
return { foundNewItems };
|
|
129872
|
+
}, [pollEvents, initialLoadCompleted, pollRun]);
|
|
129969
129873
|
reactExports.useEffect(() => {
|
|
129970
129874
|
fetchAllData();
|
|
129971
129875
|
}, [fetchAllData]);
|
|
@@ -129976,25 +129880,18 @@ function useWorkflowTraceViewerData(env2, runId, options = {}) {
|
|
|
129976
129880
|
const interval2 = setInterval(() => {
|
|
129977
129881
|
update();
|
|
129978
129882
|
}, LIVE_UPDATE_INTERVAL_MS);
|
|
129979
|
-
const stepInterval = setInterval(() => {
|
|
129980
|
-
update(true);
|
|
129981
|
-
}, LIVE_STEP_UPDATE_INTERVAL_MS);
|
|
129982
129883
|
return () => {
|
|
129983
129884
|
clearInterval(interval2);
|
|
129984
|
-
clearInterval(stepInterval);
|
|
129985
129885
|
};
|
|
129986
129886
|
}, [live, initialLoadCompleted, update, run == null ? void 0 : run.completedAt]);
|
|
129987
129887
|
return {
|
|
129988
129888
|
run: run ?? {},
|
|
129989
|
-
steps,
|
|
129990
|
-
hooks,
|
|
129991
129889
|
events: events2,
|
|
129992
129890
|
loading,
|
|
129993
|
-
auxiliaryDataLoading,
|
|
129994
129891
|
error: error2,
|
|
129995
129892
|
update,
|
|
129996
129893
|
loadMoreTraceData,
|
|
129997
|
-
hasMoreTraceData:
|
|
129894
|
+
hasMoreTraceData: eventsHasMore,
|
|
129998
129895
|
isLoadingMoreTraceData
|
|
129999
129896
|
};
|
|
130000
129897
|
}
|
|
@@ -130127,7 +130024,7 @@ function HooksTable({
|
|
|
130127
130024
|
};
|
|
130128
130025
|
const [invocationData, setInvocationData] = reactExports.useState(/* @__PURE__ */ new Map());
|
|
130129
130026
|
reactExports.useEffect(() => {
|
|
130130
|
-
if (!hooks.length) return;
|
|
130027
|
+
if (!hooks.length || !runId) return;
|
|
130131
130028
|
const fetchInvocations = async () => {
|
|
130132
130029
|
const initialData = /* @__PURE__ */ new Map();
|
|
130133
130030
|
for (const hook of hooks) {
|
|
@@ -130138,65 +130035,55 @@ function HooksTable({
|
|
|
130138
130035
|
});
|
|
130139
130036
|
}
|
|
130140
130037
|
setInvocationData(initialData);
|
|
130141
|
-
|
|
130142
|
-
|
|
130143
|
-
|
|
130144
|
-
|
|
130145
|
-
|
|
130146
|
-
|
|
130147
|
-
|
|
130148
|
-
|
|
130149
|
-
|
|
130150
|
-
|
|
130151
|
-
}
|
|
130152
|
-
);
|
|
130153
|
-
if (!serverResult.success) {
|
|
130154
|
-
return {
|
|
130155
|
-
hookId: hook.hookId,
|
|
130156
|
-
count: new Error(
|
|
130157
|
-
((_a3 = serverResult.error) == null ? void 0 : _a3.message) || "Failed to fetch events"
|
|
130158
|
-
),
|
|
130159
|
-
hasMore: false
|
|
130160
|
-
};
|
|
130038
|
+
try {
|
|
130039
|
+
const serverResult = await fetchEvents$1(env2, runId, {
|
|
130040
|
+
sortOrder: "asc",
|
|
130041
|
+
limit: 1e3
|
|
130042
|
+
});
|
|
130043
|
+
if (!serverResult.success) {
|
|
130044
|
+
setInvocationData((prev) => {
|
|
130045
|
+
const updated = new Map(prev);
|
|
130046
|
+
for (const hook of hooks) {
|
|
130047
|
+
updated.set(hook.hookId, { count: 0, hasMore: false, loading: false });
|
|
130161
130048
|
}
|
|
130162
|
-
|
|
130163
|
-
|
|
130164
|
-
|
|
130165
|
-
|
|
130166
|
-
|
|
130167
|
-
|
|
130168
|
-
|
|
130169
|
-
|
|
130170
|
-
|
|
130171
|
-
|
|
130172
|
-
|
|
130173
|
-
|
|
130174
|
-
|
|
130175
|
-
hasMore: false
|
|
130176
|
-
};
|
|
130049
|
+
return updated;
|
|
130050
|
+
});
|
|
130051
|
+
return;
|
|
130052
|
+
}
|
|
130053
|
+
const allEvents = serverResult.data.data;
|
|
130054
|
+
const hookIds = new Set(hooks.map((h2) => h2.hookId));
|
|
130055
|
+
const counts = /* @__PURE__ */ new Map();
|
|
130056
|
+
for (const event of allEvents) {
|
|
130057
|
+
if (event.eventType === "hook_received" && event.correlationId && hookIds.has(event.correlationId)) {
|
|
130058
|
+
counts.set(
|
|
130059
|
+
event.correlationId,
|
|
130060
|
+
(counts.get(event.correlationId) ?? 0) + 1
|
|
130061
|
+
);
|
|
130177
130062
|
}
|
|
130178
|
-
}
|
|
130179
|
-
|
|
130180
|
-
|
|
130181
|
-
|
|
130182
|
-
|
|
130183
|
-
|
|
130184
|
-
|
|
130185
|
-
if (result.status === "fulfilled") {
|
|
130186
|
-
updated.set(result.value.hookId, {
|
|
130187
|
-
count: result.value.count,
|
|
130188
|
-
hasMore: result.value.hasMore,
|
|
130063
|
+
}
|
|
130064
|
+
setInvocationData((prev) => {
|
|
130065
|
+
const updated = new Map(prev);
|
|
130066
|
+
for (const hook of hooks) {
|
|
130067
|
+
updated.set(hook.hookId, {
|
|
130068
|
+
count: counts.get(hook.hookId) ?? 0,
|
|
130069
|
+
hasMore: serverResult.data.hasMore,
|
|
130189
130070
|
loading: false
|
|
130190
130071
|
});
|
|
130191
|
-
} else {
|
|
130192
|
-
updated.set(hookId, { count: 0, hasMore: false, loading: false });
|
|
130193
130072
|
}
|
|
130194
|
-
|
|
130195
|
-
|
|
130196
|
-
}
|
|
130073
|
+
return updated;
|
|
130074
|
+
});
|
|
130075
|
+
} catch {
|
|
130076
|
+
setInvocationData((prev) => {
|
|
130077
|
+
const updated = new Map(prev);
|
|
130078
|
+
for (const hook of hooks) {
|
|
130079
|
+
updated.set(hook.hookId, { count: 0, hasMore: false, loading: false });
|
|
130080
|
+
}
|
|
130081
|
+
return updated;
|
|
130082
|
+
});
|
|
130083
|
+
}
|
|
130197
130084
|
};
|
|
130198
130085
|
fetchInvocations();
|
|
130199
|
-
}, [hooks, env2]);
|
|
130086
|
+
}, [hooks, env2, runId]);
|
|
130200
130087
|
const renderInvocationCount = (hook) => {
|
|
130201
130088
|
const data2 = invocationData.get(hook.hookId);
|
|
130202
130089
|
if (!data2 || data2.loading) {
|
|
@@ -146879,7 +146766,6 @@ function WorkflowGraphExecutionViewer({
|
|
|
146879
146766
|
}
|
|
146880
146767
|
function GraphTabContent({
|
|
146881
146768
|
run,
|
|
146882
|
-
allSteps,
|
|
146883
146769
|
allEvents,
|
|
146884
146770
|
env: env2
|
|
146885
146771
|
}) {
|
|
@@ -146904,15 +146790,30 @@ function GraphTabContent({
|
|
|
146904
146790
|
return ((_a4 = parseWorkflowName(wf.workflowName)) == null ? void 0 : _a4.shortName) === runShortName;
|
|
146905
146791
|
}) ?? null;
|
|
146906
146792
|
}, [graphManifest, run.workflowName]);
|
|
146793
|
+
const stepsFromEvents = reactExports.useMemo(() => {
|
|
146794
|
+
if (!allEvents) return [];
|
|
146795
|
+
const stepEventsMap = /* @__PURE__ */ new Map();
|
|
146796
|
+
for (const event of allEvents) {
|
|
146797
|
+
if (event.eventType.startsWith("step_") && event.correlationId) {
|
|
146798
|
+
const existing = stepEventsMap.get(event.correlationId);
|
|
146799
|
+
if (existing) {
|
|
146800
|
+
existing.push(event);
|
|
146801
|
+
} else {
|
|
146802
|
+
stepEventsMap.set(event.correlationId, [event]);
|
|
146803
|
+
}
|
|
146804
|
+
}
|
|
146805
|
+
}
|
|
146806
|
+
return Array.from(stepEventsMap.values()).map(stepEventsToStepEntity).filter((s2) => s2 !== null);
|
|
146807
|
+
}, [allEvents]);
|
|
146907
146808
|
const execution = reactExports.useMemo(() => {
|
|
146908
146809
|
if (!workflowGraph || !run.runId) return null;
|
|
146909
146810
|
return mapRunToExecution(
|
|
146910
146811
|
run,
|
|
146911
|
-
|
|
146812
|
+
stepsFromEvents,
|
|
146912
146813
|
allEvents || [],
|
|
146913
146814
|
workflowGraph
|
|
146914
146815
|
);
|
|
146915
|
-
}, [workflowGraph, run,
|
|
146816
|
+
}, [workflowGraph, run, stepsFromEvents, allEvents]);
|
|
146916
146817
|
if (graphLoading) {
|
|
146917
146818
|
return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center justify-center w-full h-full", children: [
|
|
146918
146819
|
/* @__PURE__ */ jsxRuntimeExports.jsx(LoaderCircle, { className: "h-8 w-8 animate-spin text-muted-foreground" }),
|
|
@@ -147042,11 +146943,8 @@ function RunDetailView({
|
|
|
147042
146943
|
const isLocalBackend = serverConfig.backendId === "local" || serverConfig.backendId === "@workflow/world-local";
|
|
147043
146944
|
const {
|
|
147044
146945
|
run: runData,
|
|
147045
|
-
steps: allSteps,
|
|
147046
|
-
hooks: allHooks,
|
|
147047
146946
|
events: allEvents,
|
|
147048
146947
|
loading,
|
|
147049
|
-
auxiliaryDataLoading,
|
|
147050
146948
|
error: error2,
|
|
147051
146949
|
update,
|
|
147052
146950
|
loadMoreTraceData,
|
|
@@ -147198,24 +147096,6 @@ function RunDetailView({
|
|
|
147198
147096
|
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "mb-4", children: /* @__PURE__ */ jsxRuntimeExports.jsx("h1", { className: "text-xl font-semibold", children: workflowName ? workflowName : /* @__PURE__ */ jsxRuntimeExports.jsx(Skeleton, { className: "w-[260px] h-[28px]" }) }) }),
|
|
147199
147097
|
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center justify-between gap-2", children: [
|
|
147200
147098
|
/* @__PURE__ */ jsxRuntimeExports.jsx(LiveStatus, { hasError, errorMessage }),
|
|
147201
|
-
(isEncryptedMarker(run.input) || isEncryptedMarker(run.output) || isEncryptedMarker(run.error) || allSteps.some(
|
|
147202
|
-
(s2) => isEncryptedMarker(s2.input) || isEncryptedMarker(s2.output)
|
|
147203
|
-
)) && /* @__PURE__ */ jsxRuntimeExports.jsxs(Tooltip, { children: [
|
|
147204
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsxRuntimeExports.jsx("span", { children: /* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
147205
|
-
Button,
|
|
147206
|
-
{
|
|
147207
|
-
variant: "outline",
|
|
147208
|
-
size: "sm",
|
|
147209
|
-
onClick: handleDecrypt,
|
|
147210
|
-
disabled: !!encryptionKey,
|
|
147211
|
-
children: [
|
|
147212
|
-
encryptionKey ? /* @__PURE__ */ jsxRuntimeExports.jsx(LockOpen, { className: "h-4 w-4" }) : /* @__PURE__ */ jsxRuntimeExports.jsx(Lock, { className: "h-4 w-4" }),
|
|
147213
|
-
encryptionKey ? "Decrypted" : "Decrypt"
|
|
147214
|
-
]
|
|
147215
|
-
}
|
|
147216
|
-
) }) }),
|
|
147217
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(TooltipContent, { children: encryptionKey ? /* @__PURE__ */ jsxRuntimeExports.jsx("p", { children: "Data has been decrypted for this workflow run. All encrypted input, output, and event data is now visible across all tabs." }) : /* @__PURE__ */ jsxRuntimeExports.jsx("p", { children: "This run's data is end-to-end encrypted. Decrypt to reveal input, output, and event data across all tabs for this workflow run." }) })
|
|
147218
|
-
] }),
|
|
147219
147099
|
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
147220
147100
|
RunActionsButtons,
|
|
147221
147101
|
{
|
|
@@ -147223,7 +147103,7 @@ function RunDetailView({
|
|
|
147223
147103
|
runId,
|
|
147224
147104
|
runStatus: run.status,
|
|
147225
147105
|
events: allEvents,
|
|
147226
|
-
eventsLoading:
|
|
147106
|
+
eventsLoading: loading,
|
|
147227
147107
|
loading,
|
|
147228
147108
|
onRerunClick: handleRerunClick,
|
|
147229
147109
|
onCancelClick: handleCancelClick,
|
|
@@ -147282,159 +147162,150 @@ function RunDetailView({
|
|
|
147282
147162
|
] })
|
|
147283
147163
|
] })
|
|
147284
147164
|
] }),
|
|
147285
|
-
/* @__PURE__ */ jsxRuntimeExports.
|
|
147286
|
-
|
|
147287
|
-
|
|
147288
|
-
|
|
147289
|
-
|
|
147290
|
-
|
|
147291
|
-
|
|
147292
|
-
children: [
|
|
147293
|
-
/* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
147294
|
-
/* @__PURE__ */ jsxRuntimeExports.
|
|
147295
|
-
|
|
147296
|
-
"Trace"
|
|
147297
|
-
] }),
|
|
147298
|
-
isLocalBackend && /* @__PURE__ */ jsxRuntimeExports.jsxs(TabsTrigger, { value: "graph", className: "gap-2", children: [
|
|
147299
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(GitBranch, { className: "h-4 w-4" }),
|
|
147300
|
-
"Graph"
|
|
147301
|
-
] }),
|
|
147302
|
-
/* @__PURE__ */ jsxRuntimeExports.jsxs(TabsTrigger, { value: "events", className: "gap-2", children: [
|
|
147303
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(List$1, { className: "h-4 w-4" }),
|
|
147304
|
-
"Events"
|
|
147305
|
-
] }),
|
|
147306
|
-
/* @__PURE__ */ jsxRuntimeExports.jsxs(TabsTrigger, { value: "streams", className: "gap-2", children: [
|
|
147307
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(List$1, { className: "h-4 w-4" }),
|
|
147308
|
-
"Streams"
|
|
147309
|
-
] })
|
|
147165
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "mt-4 flex-1 flex flex-col min-h-0", children: /* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
147166
|
+
Tabs,
|
|
147167
|
+
{
|
|
147168
|
+
value: activeTab,
|
|
147169
|
+
onValueChange: (v2) => setActiveTab(v2),
|
|
147170
|
+
className: "flex-1 flex flex-col min-h-0",
|
|
147171
|
+
children: [
|
|
147172
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs(TabsList, { className: "mb-4 flex-none", children: [
|
|
147173
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs(TabsTrigger, { value: "trace", className: "gap-2", children: [
|
|
147174
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(List$1, { className: "h-4 w-4" }),
|
|
147175
|
+
"Trace"
|
|
147310
147176
|
] }),
|
|
147311
|
-
|
|
147312
|
-
|
|
147313
|
-
|
|
147314
|
-
|
|
147315
|
-
|
|
147316
|
-
|
|
147317
|
-
|
|
147318
|
-
|
|
147319
|
-
|
|
147320
|
-
|
|
147321
|
-
|
|
147322
|
-
|
|
147323
|
-
|
|
147324
|
-
|
|
147325
|
-
|
|
147326
|
-
|
|
147327
|
-
|
|
147328
|
-
|
|
147329
|
-
|
|
147330
|
-
|
|
147331
|
-
|
|
147332
|
-
|
|
147333
|
-
|
|
147334
|
-
|
|
147335
|
-
|
|
147177
|
+
isLocalBackend && /* @__PURE__ */ jsxRuntimeExports.jsxs(TabsTrigger, { value: "graph", className: "gap-2", children: [
|
|
147178
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(GitBranch, { className: "h-4 w-4" }),
|
|
147179
|
+
"Graph"
|
|
147180
|
+
] }),
|
|
147181
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs(TabsTrigger, { value: "events", className: "gap-2", children: [
|
|
147182
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(List$1, { className: "h-4 w-4" }),
|
|
147183
|
+
"Events"
|
|
147184
|
+
] }),
|
|
147185
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs(TabsTrigger, { value: "streams", className: "gap-2", children: [
|
|
147186
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(List$1, { className: "h-4 w-4" }),
|
|
147187
|
+
"Streams"
|
|
147188
|
+
] })
|
|
147189
|
+
] }),
|
|
147190
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(TabsContent, { value: "trace", className: "mt-0 flex-1 min-h-0", children: /* @__PURE__ */ jsxRuntimeExports.jsx(ErrorBoundary, { title: "Failed to load trace viewer", children: /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "h-full", children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
147191
|
+
WorkflowTraceViewer,
|
|
147192
|
+
{
|
|
147193
|
+
error: error2,
|
|
147194
|
+
events: allEvents,
|
|
147195
|
+
run,
|
|
147196
|
+
isLoading: loading,
|
|
147197
|
+
spanDetailData,
|
|
147198
|
+
spanDetailLoading,
|
|
147199
|
+
spanDetailError,
|
|
147200
|
+
onSpanSelect: handleSpanSelect,
|
|
147201
|
+
onStreamClick: handleStreamClick,
|
|
147202
|
+
onWakeUpSleep: handleWakeUpSleep,
|
|
147203
|
+
onResolveHook: handleResolveHook,
|
|
147204
|
+
onLoadEventData: handleLoadSidebarEventData,
|
|
147205
|
+
onLoadMoreSpans: loadMoreTraceData,
|
|
147206
|
+
hasMoreSpans: hasMoreTraceData,
|
|
147207
|
+
isLoadingMoreSpans: isLoadingMoreTraceData,
|
|
147208
|
+
encryptionKey: encryptionKey ?? void 0,
|
|
147209
|
+
onDecrypt: handleDecrypt
|
|
147210
|
+
}
|
|
147211
|
+
) }) }) }),
|
|
147212
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(TabsContent, { value: "events", className: "mt-0 flex-1 min-h-0", children: /* @__PURE__ */ jsxRuntimeExports.jsx(ErrorBoundary, { title: "Failed to load events list", children: /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "h-full", children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
147213
|
+
EventListView,
|
|
147214
|
+
{
|
|
147215
|
+
events: allEvents,
|
|
147216
|
+
run,
|
|
147217
|
+
onLoadEventData: handleLoadEventData,
|
|
147218
|
+
encryptionKey: encryptionKey ?? void 0
|
|
147219
|
+
}
|
|
147220
|
+
) }) }) }),
|
|
147221
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(TabsContent, { value: "streams", className: "mt-0 flex-1 min-h-0", children: /* @__PURE__ */ jsxRuntimeExports.jsx(ErrorBoundary, { title: "Failed to load stream data", children: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "h-full flex gap-4", children: [
|
|
147222
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
147223
|
+
"div",
|
|
147336
147224
|
{
|
|
147337
|
-
|
|
147338
|
-
|
|
147339
|
-
|
|
147340
|
-
|
|
147341
|
-
|
|
147342
|
-
|
|
147343
|
-
|
|
147344
|
-
|
|
147345
|
-
|
|
147346
|
-
|
|
147347
|
-
|
|
147348
|
-
|
|
147349
|
-
|
|
147350
|
-
borderColor: "var(--ds-gray-300)",
|
|
147351
|
-
backgroundColor: "var(--ds-background-100)"
|
|
147352
|
-
},
|
|
147353
|
-
children: [
|
|
147354
|
-
/* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
147355
|
-
"div",
|
|
147356
|
-
{
|
|
147357
|
-
className: "px-3 py-2 border-b text-xs font-medium",
|
|
147358
|
-
style: {
|
|
147359
|
-
borderColor: "var(--ds-gray-300)",
|
|
147360
|
-
color: "var(--ds-gray-900)"
|
|
147361
|
-
},
|
|
147362
|
-
children: [
|
|
147363
|
-
"Streams (",
|
|
147364
|
-
streams.length,
|
|
147365
|
-
")"
|
|
147366
|
-
]
|
|
147367
|
-
}
|
|
147368
|
-
),
|
|
147369
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "overflow-auto max-h-[calc(100vh-400px)]", children: streamsLoading ? /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "p-4 flex items-center justify-center", children: /* @__PURE__ */ jsxRuntimeExports.jsx(LoaderCircle, { className: "h-4 w-4 animate-spin text-muted-foreground" }) }) : streamsError ? /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "p-4 text-xs text-destructive", children: streamsError.message }) : streams.length === 0 ? /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
147370
|
-
"div",
|
|
147371
|
-
{
|
|
147372
|
-
className: "p-4 text-xs",
|
|
147373
|
-
style: { color: "var(--ds-gray-600)" },
|
|
147374
|
-
children: "No streams found for this run"
|
|
147375
|
-
}
|
|
147376
|
-
) : streams.map((streamId) => /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
147377
|
-
"button",
|
|
147378
|
-
{
|
|
147379
|
-
type: "button",
|
|
147380
|
-
onClick: () => setSelectedStreamId(streamId),
|
|
147381
|
-
className: "w-full text-left px-3 py-2 text-xs font-mono truncate hover:bg-accent transition-colors",
|
|
147382
|
-
style: {
|
|
147383
|
-
backgroundColor: selectedStreamId === streamId ? "var(--ds-gray-200)" : "transparent",
|
|
147384
|
-
color: "var(--ds-gray-1000)"
|
|
147385
|
-
},
|
|
147386
|
-
title: streamId,
|
|
147387
|
-
children: streamId
|
|
147225
|
+
className: "w-64 flex-shrink-0 border rounded-lg overflow-hidden",
|
|
147226
|
+
style: {
|
|
147227
|
+
borderColor: "var(--ds-gray-300)",
|
|
147228
|
+
backgroundColor: "var(--ds-background-100)"
|
|
147229
|
+
},
|
|
147230
|
+
children: [
|
|
147231
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
147232
|
+
"div",
|
|
147233
|
+
{
|
|
147234
|
+
className: "px-3 py-2 border-b text-xs font-medium",
|
|
147235
|
+
style: {
|
|
147236
|
+
borderColor: "var(--ds-gray-300)",
|
|
147237
|
+
color: "var(--ds-gray-900)"
|
|
147388
147238
|
},
|
|
147389
|
-
|
|
147390
|
-
|
|
147391
|
-
|
|
147392
|
-
|
|
147393
|
-
|
|
147394
|
-
|
|
147395
|
-
|
|
147396
|
-
|
|
147397
|
-
streamId: selectedStreamId,
|
|
147398
|
-
chunks: streamChunks,
|
|
147399
|
-
isLive: streamIsLive,
|
|
147400
|
-
error: streamError
|
|
147401
|
-
}
|
|
147402
|
-
) : /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
147403
|
-
"div",
|
|
147404
|
-
{
|
|
147405
|
-
className: "h-full flex items-center justify-center rounded-lg border",
|
|
147406
|
-
style: {
|
|
147407
|
-
borderColor: "var(--ds-gray-300)",
|
|
147408
|
-
backgroundColor: "var(--ds-gray-100)"
|
|
147409
|
-
},
|
|
147410
|
-
children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
147239
|
+
children: [
|
|
147240
|
+
"Streams (",
|
|
147241
|
+
streams.length,
|
|
147242
|
+
")"
|
|
147243
|
+
]
|
|
147244
|
+
}
|
|
147245
|
+
),
|
|
147246
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "overflow-auto max-h-[calc(100vh-400px)]", children: streamsLoading ? /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "p-4 flex items-center justify-center", children: /* @__PURE__ */ jsxRuntimeExports.jsx(LoaderCircle, { className: "h-4 w-4 animate-spin text-muted-foreground" }) }) : streamsError ? /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "p-4 text-xs text-destructive", children: streamsError.message }) : streams.length === 0 ? /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
147411
147247
|
"div",
|
|
147412
147248
|
{
|
|
147413
|
-
className: "text-
|
|
147249
|
+
className: "p-4 text-xs",
|
|
147414
147250
|
style: { color: "var(--ds-gray-600)" },
|
|
147415
|
-
children:
|
|
147251
|
+
children: "No streams found for this run"
|
|
147416
147252
|
}
|
|
147417
|
-
)
|
|
147418
|
-
|
|
147419
|
-
|
|
147420
|
-
|
|
147421
|
-
|
|
147422
|
-
|
|
147253
|
+
) : streams.map((streamId) => /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
147254
|
+
"button",
|
|
147255
|
+
{
|
|
147256
|
+
type: "button",
|
|
147257
|
+
onClick: () => setSelectedStreamId(streamId),
|
|
147258
|
+
className: "w-full text-left px-3 py-2 text-xs font-mono truncate hover:bg-accent transition-colors",
|
|
147259
|
+
style: {
|
|
147260
|
+
backgroundColor: selectedStreamId === streamId ? "var(--ds-gray-200)" : "transparent",
|
|
147261
|
+
color: "var(--ds-gray-1000)"
|
|
147262
|
+
},
|
|
147263
|
+
title: streamId,
|
|
147264
|
+
children: streamId
|
|
147265
|
+
},
|
|
147266
|
+
streamId
|
|
147267
|
+
)) })
|
|
147268
|
+
]
|
|
147269
|
+
}
|
|
147270
|
+
),
|
|
147271
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "flex-1 min-w-0", children: selectedStreamId ? /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
147272
|
+
StreamViewer,
|
|
147423
147273
|
{
|
|
147424
|
-
|
|
147425
|
-
|
|
147426
|
-
|
|
147427
|
-
|
|
147274
|
+
streamId: selectedStreamId,
|
|
147275
|
+
chunks: streamChunks,
|
|
147276
|
+
isLive: streamIsLive,
|
|
147277
|
+
error: streamError
|
|
147428
147278
|
}
|
|
147429
|
-
)
|
|
147430
|
-
|
|
147431
|
-
|
|
147432
|
-
|
|
147433
|
-
|
|
147434
|
-
|
|
147435
|
-
|
|
147436
|
-
|
|
147437
|
-
|
|
147279
|
+
) : /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
147280
|
+
"div",
|
|
147281
|
+
{
|
|
147282
|
+
className: "h-full flex items-center justify-center rounded-lg border",
|
|
147283
|
+
style: {
|
|
147284
|
+
borderColor: "var(--ds-gray-300)",
|
|
147285
|
+
backgroundColor: "var(--ds-gray-100)"
|
|
147286
|
+
},
|
|
147287
|
+
children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
147288
|
+
"div",
|
|
147289
|
+
{
|
|
147290
|
+
className: "text-sm",
|
|
147291
|
+
style: { color: "var(--ds-gray-600)" },
|
|
147292
|
+
children: streams.length > 0 ? "Select a stream to view its data" : "No streams available"
|
|
147293
|
+
}
|
|
147294
|
+
)
|
|
147295
|
+
}
|
|
147296
|
+
) })
|
|
147297
|
+
] }) }) }),
|
|
147298
|
+
isLocalBackend && /* @__PURE__ */ jsxRuntimeExports.jsx(TabsContent, { value: "graph", className: "mt-0 flex-1 min-h-0", children: /* @__PURE__ */ jsxRuntimeExports.jsx(ErrorBoundary, { title: "Failed to load execution graph", children: /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "h-full min-h-[500px]", children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
147299
|
+
GraphTabContent,
|
|
147300
|
+
{
|
|
147301
|
+
run,
|
|
147302
|
+
allEvents,
|
|
147303
|
+
env: env2
|
|
147304
|
+
}
|
|
147305
|
+
) }) }) })
|
|
147306
|
+
]
|
|
147307
|
+
}
|
|
147308
|
+
) })
|
|
147438
147309
|
] })
|
|
147439
147310
|
] });
|
|
147440
147311
|
}
|
|
@@ -147465,7 +147336,6 @@ const handlers = {
|
|
|
147465
147336
|
fetchStep: (p2) => fetchStep(p2.worldEnv ?? {}, p2.runId, p2.stepId, p2.resolveData),
|
|
147466
147337
|
fetchEvents: (p2) => fetchEvents(p2.worldEnv ?? {}, p2.runId, p2.params ?? {}),
|
|
147467
147338
|
fetchEvent: (p2) => fetchEvent(p2.worldEnv ?? {}, p2.runId, p2.eventId, p2.resolveData),
|
|
147468
|
-
fetchEventsByCorrelationId: (p2) => fetchEventsByCorrelationId(p2.worldEnv ?? {}, p2.correlationId, p2.params ?? {}),
|
|
147469
147339
|
fetchHooks: (p2) => fetchHooks(p2.worldEnv ?? {}, p2.params ?? {}),
|
|
147470
147340
|
fetchHook: (p2) => fetchHook(p2.worldEnv ?? {}, p2.hookId, p2.resolveData),
|
|
147471
147341
|
cancelRun: (p2) => cancelRun$1(p2.worldEnv ?? {}, p2.runId),
|
|
@@ -147608,7 +147478,7 @@ const route4 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProper
|
|
|
147608
147478
|
__proto__: null,
|
|
147609
147479
|
loader
|
|
147610
147480
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
147611
|
-
const serverManifest = { "entry": { "module": "/assets/entry.client-BjpmGyLC.js", "imports": ["/assets/index-DklpUtP3.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": false, "module": "/assets/root-
|
|
147481
|
+
const serverManifest = { "entry": { "module": "/assets/entry.client-BjpmGyLC.js", "imports": ["/assets/index-DklpUtP3.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": false, "module": "/assets/root-D-041AAq.js", "imports": ["/assets/index-DklpUtP3.js", "/assets/mermaid-3ZIDBTTL-RlQIshou.js"], "css": ["/assets/root-9gRDb_Jz.css", "/assets/mermaid-3ZIDBTTL-DKxHcEOp.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-Xl3EX8M3.js", "imports": ["/assets/index-DklpUtP3.js", "/assets/use-workflow-graph-C-GqGBPl.js", "/assets/mermaid-3ZIDBTTL-RlQIshou.js"], "css": ["/assets/use-workflow-graph-yls6qlc0.css", "/assets/mermaid-3ZIDBTTL-DKxHcEOp.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-BPOihWwO.js", "imports": ["/assets/index-DklpUtP3.js", "/assets/use-workflow-graph-C-GqGBPl.js", "/assets/mermaid-3ZIDBTTL-RlQIshou.js", "/assets/encryption-8OvC6eoJ.js"], "css": ["/assets/use-workflow-graph-yls6qlc0.css", "/assets/mermaid-3ZIDBTTL-DKxHcEOp.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-0e172cba.js", "version": "0e172cba", "sri": void 0 };
|
|
147612
147482
|
const assetsBuildDirectory = "build/client";
|
|
147613
147483
|
const basename = "/";
|
|
147614
147484
|
const future = { "unstable_optimizeDeps": false, "unstable_subResourceIntegrity": false, "unstable_trailingSlashAwareDataRequests": false, "unstable_previewServerPrerendering": false, "v8_middleware": false, "v8_splitRouteModules": false, "v8_viteEnvironmentApi": false };
|