@workflow/web 4.1.4 → 4.1.6

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.
@@ -1,4 +1,4 @@
1
- import { R, K as Ks, Q as Qe } from "./mermaid-3ZIDBTTL-B_qZU5zW.js";
1
+ import { R, K as Ks, Q as Qe } from "./mermaid-3ZIDBTTL-BE1h5qUK.js";
2
2
  import { r as reactExports, j as jsxRuntimeExports } from "./index-DQa-BExo.js";
3
3
  var L = ({ code: s, language: t, raw: e, className: n, ...d$1 }) => {
4
4
  let { shikiTheme: l } = reactExports.useContext(R), o = Ks(), [m, i] = reactExports.useState(e);
@@ -1,6 +1,6 @@
1
1
  import { r as reactExports, C as ReactDOM, j as jsxRuntimeExports, z as Link, f as reactDomExports, B as useSearchParams, A as useNavigate, D as useLocation, w as withComponentProps } from "./index-DQa-BExo.js";
2
- import { R as ResolveHookModal, S as Send, a as Skeleton, u as unwrapOrThrow, W as WorkflowWebAPIError, b as RelativeTime, A as Alert, C as CircleAlert, c as AlertTitle, d as AlertDescription, g as getErrorMessage, e as CopyableText, D as DropdownMenu, f as DropdownMenuTrigger, E as Ellipsis, h as DropdownMenuContent, i as DropdownMenuItem, j as ChevronRight, r as resumeHook, k as createCollection, l as hideOthers, m as ReactRemoveScroll, n as useDirection, o as ChevronDown, p as ChevronUp, q as Check, X, s as useControllableState$1, t as createContextScope$1, P as Primitive$1, v as composeEventHandlers$1, w as Presence, x as useSize, y as cancelRun, z as reenqueueRun, B as parseWorkflowName, F as StatusBadge, Z as Zap, G as CircleX, H as RunActionsDropdownItems, I as unwrapServerActionResult, J as WorkflowGraphViewer, T as Tabs, K as TabsList, L as TabsTrigger, M as TabsContent, N as ErrorBoundary } from "./workflow-graph-viewer-D5yEggTb.js";
3
- import { g as useLayoutEffect2, P as Primitive, c as createLucideIcon, h as useToast, d as cn, D as DEFAULT_PAGE_SIZE, i as fetchRuns, j as fetchHooks, k as getPaginationDisplay, T as Tooltip, a as TooltipTrigger, B as Button, b as TooltipContent, l as fetchEvents, m as useCallbackRef, n as useComposedRefs, o as createPopperScope, p as createContextScope, A as Anchor, q as composeEventHandlers, s as useId, v as createSlot, w as DismissableLayer, C as Content$1, x as useControllableState, y as Root2$1, V as VISUALLY_HIDDEN_STYLES, z as Arrow, E as useComposedRefs$1, u as useServerConfig, t as toast, L as LoaderCircle, F as fetchRun, G as cva, H as Presence$1, I as createContext2, J as fetchWorkflowsManifest } from "./mermaid-3ZIDBTTL-B_qZU5zW.js";
2
+ import { R as ResolveHookModal, S as Send, a as Skeleton, u as unwrapOrThrow, W as WorkflowWebAPIError, b as RelativeTime, A as Alert, C as CircleAlert, c as AlertTitle, d as AlertDescription, g as getErrorMessage, e as CopyableText, D as DropdownMenu, f as DropdownMenuTrigger, E as Ellipsis, h as DropdownMenuContent, i as DropdownMenuItem, j as ChevronRight, r as resumeHook, k as createCollection, l as hideOthers, m as ReactRemoveScroll, n as useDirection, o as ChevronDown, p as ChevronUp, q as Check, X, s as useControllableState$1, P as Primitive$1, t as composeEventHandlers$1, v as Presence, w as useSize, x as createContextScope$1, y as cancelRun, z as reenqueueRun, B as parseWorkflowName, F as StatusBadge, Z as Zap, G as CircleX, H as RunActionsDropdownItems, I as unwrapServerActionResult, J as WorkflowGraphViewer, T as Tabs, K as TabsList, L as TabsTrigger, M as TabsContent, N as ErrorBoundary } from "./workflow-graph-viewer-fudq4EvS.js";
3
+ import { g as useLayoutEffect2, P as Primitive, c as createLucideIcon, h as useToast, d as cn, D as DEFAULT_PAGE_SIZE, i as fetchRuns, j as fetchHooks, k as getPaginationDisplay, T as Tooltip, a as TooltipTrigger, B as Button, b as TooltipContent, l as fetchEvents, m as useCallbackRef, n as useComposedRefs, A as Anchor, o as composeEventHandlers, p as useId, q as createPopperScope, s as DismissableLayer, v as createContextScope, w as createSlot, C as Content$1, x as useControllableState, y as Root2$1, V as VISUALLY_HIDDEN_STYLES, z as Arrow, E as useComposedRefs$1, u as useServerConfig, t as toast, L as LoaderCircle, F as fetchRun, G as cva, H as Presence$1, I as createContext2, J as fetchWorkflowsManifest } from "./mermaid-3ZIDBTTL-BE1h5qUK.js";
4
4
  var PORTAL_NAME$2 = "Portal";
5
5
  var Portal$2 = reactExports.forwardRef((props, forwardedRef) => {
6
6
  var _a;
@@ -1 +1 @@
1
- window.__reactRouterManifest={"entry":{"module":"/assets/entry.client-BWsSsWQm.js","imports":["/assets/index-DQa-BExo.js"],"css":[]},"routes":{"root":{"id":"root","path":"","hasAction":true,"hasLoader":true,"hasClientAction":false,"hasClientLoader":false,"hasClientMiddleware":false,"hasDefaultExport":true,"hasErrorBoundary":true,"module":"/assets/root-CLs7COa2.js","imports":["/assets/index-DQa-BExo.js","/assets/mermaid-3ZIDBTTL-B_qZU5zW.js"],"css":["/assets/root-aMfmV5uh.css","/assets/mermaid-3ZIDBTTL-DKxHcEOp.css"]},"routes/home":{"id":"routes/home","parentId":"root","index":true,"hasAction":false,"hasLoader":false,"hasClientAction":false,"hasClientLoader":false,"hasClientMiddleware":false,"hasDefaultExport":true,"hasErrorBoundary":false,"module":"/assets/home-BMWyCqWy.js","imports":["/assets/index-DQa-BExo.js","/assets/workflow-graph-viewer-D5yEggTb.js","/assets/mermaid-3ZIDBTTL-B_qZU5zW.js"],"css":["/assets/workflow-graph-viewer-yls6qlc0.css","/assets/mermaid-3ZIDBTTL-DKxHcEOp.css"]},"routes/run-detail":{"id":"routes/run-detail","parentId":"root","path":"run/:runId","hasAction":false,"hasLoader":false,"hasClientAction":false,"hasClientLoader":false,"hasClientMiddleware":false,"hasDefaultExport":true,"hasErrorBoundary":false,"module":"/assets/run-detail-D7xkVxzE.js","imports":["/assets/index-DQa-BExo.js","/assets/workflow-graph-viewer-D5yEggTb.js","/assets/mermaid-3ZIDBTTL-B_qZU5zW.js","/assets/encryption-80GMP4r0.js"],"css":["/assets/workflow-graph-viewer-yls6qlc0.css","/assets/mermaid-3ZIDBTTL-DKxHcEOp.css"]},"routes/api.rpc":{"id":"routes/api.rpc","parentId":"root","path":"api/rpc","hasAction":true,"hasLoader":true,"hasClientAction":false,"hasClientLoader":false,"hasClientMiddleware":false,"hasDefaultExport":false,"hasErrorBoundary":false,"module":"/assets/api.rpc-l0sNRNKZ.js","imports":[],"css":[]},"routes/api.stream.$streamId":{"id":"routes/api.stream.$streamId","parentId":"root","path":"api/stream/:streamId","hasAction":false,"hasLoader":true,"hasClientAction":false,"hasClientLoader":false,"hasClientMiddleware":false,"hasDefaultExport":false,"hasErrorBoundary":false,"module":"/assets/api.stream._streamId-l0sNRNKZ.js","imports":[],"css":[]}},"url":"/assets/manifest-c0697365.js","version":"c0697365"};
1
+ window.__reactRouterManifest={"entry":{"module":"/assets/entry.client-BWsSsWQm.js","imports":["/assets/index-DQa-BExo.js"],"css":[]},"routes":{"root":{"id":"root","path":"","hasAction":true,"hasLoader":true,"hasClientAction":false,"hasClientLoader":false,"hasClientMiddleware":false,"hasDefaultExport":true,"hasErrorBoundary":true,"module":"/assets/root-Cr0bUIN7.js","imports":["/assets/index-DQa-BExo.js","/assets/mermaid-3ZIDBTTL-BE1h5qUK.js"],"css":["/assets/root-aMfmV5uh.css","/assets/mermaid-3ZIDBTTL-DKxHcEOp.css"]},"routes/home":{"id":"routes/home","parentId":"root","index":true,"hasAction":false,"hasLoader":false,"hasClientAction":false,"hasClientLoader":false,"hasClientMiddleware":false,"hasDefaultExport":true,"hasErrorBoundary":false,"module":"/assets/home-CI2sZzZZ.js","imports":["/assets/index-DQa-BExo.js","/assets/workflow-graph-viewer-fudq4EvS.js","/assets/mermaid-3ZIDBTTL-BE1h5qUK.js"],"css":["/assets/workflow-graph-viewer-yls6qlc0.css","/assets/mermaid-3ZIDBTTL-DKxHcEOp.css"]},"routes/run-detail":{"id":"routes/run-detail","parentId":"root","path":"run/:runId","hasAction":false,"hasLoader":false,"hasClientAction":false,"hasClientLoader":false,"hasClientMiddleware":false,"hasDefaultExport":true,"hasErrorBoundary":false,"module":"/assets/run-detail-gIcQ-2KJ.js","imports":["/assets/index-DQa-BExo.js","/assets/workflow-graph-viewer-fudq4EvS.js","/assets/mermaid-3ZIDBTTL-BE1h5qUK.js","/assets/encryption-80GMP4r0.js"],"css":["/assets/workflow-graph-viewer-yls6qlc0.css","/assets/mermaid-3ZIDBTTL-DKxHcEOp.css"]},"routes/api.rpc":{"id":"routes/api.rpc","parentId":"root","path":"api/rpc","hasAction":true,"hasLoader":true,"hasClientAction":false,"hasClientLoader":false,"hasClientMiddleware":false,"hasDefaultExport":false,"hasErrorBoundary":false,"module":"/assets/api.rpc-l0sNRNKZ.js","imports":[],"css":[]},"routes/api.stream.$streamId":{"id":"routes/api.stream.$streamId","parentId":"root","path":"api/stream/:streamId","hasAction":false,"hasLoader":true,"hasClientAction":false,"hasClientLoader":false,"hasClientMiddleware":false,"hasDefaultExport":false,"hasErrorBoundary":false,"module":"/assets/api.stream._streamId-l0sNRNKZ.js","imports":[],"css":[]}},"url":"/assets/manifest-c3c3f64e.js","version":"c3c3f64e"};
@@ -1,4 +1,4 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/highlighted-body-B3W2YXNL-CdV7thm2.js","assets/index-DQa-BExo.js"])))=>i.map(i=>d[i]);
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/highlighted-body-B3W2YXNL-BcILn2ch.js","assets/index-DQa-BExo.js"])))=>i.map(i=>d[i]);
2
2
  var __defProp = Object.defineProperty;
3
3
  var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
4
4
  var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
@@ -15268,6 +15268,7 @@ const StepCompletedEventSchema = BaseEventSchema.extend({
15268
15268
  eventType: literal("step_completed"),
15269
15269
  correlationId: string$2(),
15270
15270
  eventData: object({
15271
+ stepName: string$2().optional(),
15271
15272
  result: SerializedDataSchema
15272
15273
  })
15273
15274
  });
@@ -15275,6 +15276,7 @@ const StepFailedEventSchema = BaseEventSchema.extend({
15275
15276
  eventType: literal("step_failed"),
15276
15277
  correlationId: string$2(),
15277
15278
  eventData: object({
15279
+ stepName: string$2().optional(),
15278
15280
  error: any(),
15279
15281
  stack: string$2().optional()
15280
15282
  })
@@ -15283,6 +15285,7 @@ const StepRetryingEventSchema = BaseEventSchema.extend({
15283
15285
  eventType: literal("step_retrying"),
15284
15286
  correlationId: string$2(),
15285
15287
  eventData: object({
15288
+ stepName: string$2().optional(),
15286
15289
  error: any(),
15287
15290
  stack: string$2().optional(),
15288
15291
  retryAfter: date().optional()
@@ -15292,6 +15295,7 @@ const StepStartedEventSchema = BaseEventSchema.extend({
15292
15295
  eventType: literal("step_started"),
15293
15296
  correlationId: string$2(),
15294
15297
  eventData: object({
15298
+ stepName: string$2().optional(),
15295
15299
  attempt: number$2().optional()
15296
15300
  }).optional()
15297
15301
  });
@@ -15315,12 +15319,16 @@ const HookReceivedEventSchema = BaseEventSchema.extend({
15315
15319
  eventType: literal("hook_received"),
15316
15320
  correlationId: string$2(),
15317
15321
  eventData: object({
15322
+ token: string$2().optional(),
15318
15323
  payload: SerializedDataSchema
15319
15324
  })
15320
15325
  });
15321
15326
  const HookDisposedEventSchema = BaseEventSchema.extend({
15322
15327
  eventType: literal("hook_disposed"),
15323
- correlationId: string$2()
15328
+ correlationId: string$2(),
15329
+ eventData: object({
15330
+ token: string$2().optional()
15331
+ }).optional()
15324
15332
  });
15325
15333
  const HookConflictEventSchema = BaseEventSchema.extend({
15326
15334
  eventType: literal("hook_conflict"),
@@ -15338,7 +15346,10 @@ const WaitCreatedEventSchema = BaseEventSchema.extend({
15338
15346
  });
15339
15347
  const WaitCompletedEventSchema = BaseEventSchema.extend({
15340
15348
  eventType: literal("wait_completed"),
15341
- correlationId: string$2()
15349
+ correlationId: string$2(),
15350
+ eventData: object({
15351
+ resumeAt: date().optional()
15352
+ }).optional()
15342
15353
  });
15343
15354
  const RunCreatedEventSchema = BaseEventSchema.extend({
15344
15355
  eventType: literal("run_created"),
@@ -15491,7 +15502,7 @@ const StructuredErrorSchema = object({
15491
15502
  message: string$2(),
15492
15503
  stack: string$2().optional(),
15493
15504
  code: string$2().optional()
15494
- // Populated with RunErrorCode values (USER_ERROR, RUNTIME_ERROR) for run_failed events
15505
+ // Populated with RunErrorCode values (USER_ERROR, RUNTIME_ERROR, etc.) for run_failed events
15495
15506
  });
15496
15507
  const WorkflowRunStatusSchema = _enum([
15497
15508
  "pending",
@@ -15541,28 +15552,28 @@ discriminatedUnion("status", [
15541
15552
  // Non-final states
15542
15553
  WorkflowRunBaseSchema.extend({
15543
15554
  status: _enum(["pending", "running"]),
15544
- output: _undefined(),
15545
- error: _undefined(),
15546
- completedAt: _undefined()
15555
+ output: _undefined().optional(),
15556
+ error: _undefined().optional(),
15557
+ completedAt: _undefined().optional()
15547
15558
  }),
15548
15559
  // Cancelled state
15549
15560
  WorkflowRunBaseSchema.extend({
15550
15561
  status: literal("cancelled"),
15551
- output: _undefined(),
15552
- error: _undefined(),
15562
+ output: _undefined().optional(),
15563
+ error: _undefined().optional(),
15553
15564
  completedAt: date()
15554
15565
  }),
15555
15566
  // Completed state - output can be v1 or v2 format
15556
15567
  WorkflowRunBaseSchema.extend({
15557
15568
  status: literal("completed"),
15558
15569
  output: SerializedDataSchema,
15559
- error: _undefined(),
15570
+ error: _undefined().optional(),
15560
15571
  completedAt: date()
15561
15572
  }),
15562
15573
  // Failed state
15563
15574
  WorkflowRunBaseSchema.extend({
15564
15575
  status: literal("failed"),
15565
- output: _undefined(),
15576
+ output: _undefined().optional(),
15566
15577
  error: StructuredErrorSchema,
15567
15578
  completedAt: date()
15568
15579
  })
@@ -42807,7 +42818,7 @@ var tn = f("block", "before:content-[counter(line)]", "before:inline-block", "be
42807
42818
  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 });
42808
42819
  var Se = reactExports.createContext({ code: "" }), de = () => reactExports.useContext(Se);
42809
42820
  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 }) });
42810
- var cn$1 = /\n+$/, dn = reactExports.lazy(() => __vitePreload(() => import("./highlighted-body-B3W2YXNL-CdV7thm2.js"), true ? __vite__mapDeps([0,1]) : void 0).then((e) => ({ default: e.HighlightedCodeBlockBody }))), rt = ({ code: e, language: t, className: o, children: n, isIncomplete: s2 = false, ...r2 }) => {
42821
+ var cn$1 = /\n+$/, dn = reactExports.lazy(() => __vitePreload(() => import("./highlighted-body-B3W2YXNL-BcILn2ch.js"), true ? __vite__mapDeps([0,1]) : void 0).then((e) => ({ default: e.HighlightedCodeBlockBody }))), rt = ({ code: e, language: t, className: o, children: n, isIncomplete: s2 = false, ...r2 }) => {
42811
42822
  let i = reactExports.useMemo(() => e.replace(cn$1, ""), [e]), c = reactExports.useMemo(() => ({ bg: "transparent", fg: "inherit", tokens: i.split(`
42812
42823
  `).map((a2) => [{ content: a2, color: "inherit", bgColor: "transparent", htmlStyle: {}, offset: 0 }]) }), [i]);
42813
42824
  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 }) })] }) });
@@ -47999,11 +48010,11 @@ export {
47999
48010
  useFloating as aH,
48000
48011
  offset as aI,
48001
48012
  shift as aJ,
48002
- flip as aK,
48003
- size as aL,
48004
- arrow as aM,
48005
- hide as aN,
48006
- limitShift as aO,
48013
+ limitShift as aK,
48014
+ flip as aL,
48015
+ size as aM,
48016
+ arrow as aN,
48017
+ hide as aO,
48007
48018
  autoUpdate as aP,
48008
48019
  cancelRun as aQ,
48009
48020
  reenqueueRun as aR,
@@ -48049,15 +48060,15 @@ export {
48049
48060
  fetchEvents as l,
48050
48061
  useCallbackRef as m,
48051
48062
  useComposedRefs$1 as n,
48052
- createPopperScope as o,
48053
- createContextScope as p,
48054
- composeEventHandlers as q,
48063
+ composeEventHandlers as o,
48064
+ useId as p,
48065
+ createPopperScope as q,
48055
48066
  runHealthCheck as r,
48056
- useId as s,
48067
+ DismissableLayer as s,
48057
48068
  toast as t,
48058
48069
  useServerConfig as u,
48059
- createSlot as v,
48060
- DismissableLayer as w,
48070
+ createContextScope as v,
48071
+ createSlot as w,
48061
48072
  useControllableState as x,
48062
48073
  Root2 as y,
48063
48074
  Arrow$1 as z
@@ -1,5 +1,5 @@
1
1
  import { r as reactExports, j as jsxRuntimeExports, w as withComponentProps, v as withErrorBoundaryProps, M as Meta, L as Links, S as ScrollRestoration, x as Scripts, O as Outlet, y as useRouteError, i as isRouteErrorResponse, z as Link, A as useNavigate, B as useSearchParams } from "./index-DQa-BExo.js";
2
- import { c as createLucideIcon, u as useServerConfig, T as Tooltip, a as TooltipTrigger, b as TooltipContent, r as runHealthCheck, t as toast, B as Button, L as LoaderCircle, d as cn, e as Toaster$1, S as ServerConfigProvider, f as TooltipProvider } from "./mermaid-3ZIDBTTL-B_qZU5zW.js";
2
+ import { c as createLucideIcon, u as useServerConfig, T as Tooltip, a as TooltipTrigger, b as TooltipContent, r as runHealthCheck, t as toast, B as Button, L as LoaderCircle, d as cn, e as Toaster$1, S as ServerConfigProvider, f as TooltipProvider } from "./mermaid-3ZIDBTTL-BE1h5qUK.js";
3
3
  var M = (e, i, s, u, m, a, l, h) => {
4
4
  let d = document.documentElement, w = ["light", "dark"];
5
5
  function p(n) {
@@ -1,6 +1,6 @@
1
1
  import { j as jsxRuntimeExports, r as reactExports, f as reactDomExports, C as ReactDOM, A as useNavigate, B as useSearchParams, z as Link, w as withComponentProps, G as useParams } from "./index-DQa-BExo.js";
2
- import { O as Copy, C as CircleAlert, Q as parseStepName, B as parseWorkflowName, j as ChevronRight, q as Check, U as ErrorCard, Z as Zap, S as Send, R as ResolveHookModal, p as ChevronUp, o as ChevronDown, X, N as ErrorBoundary, V as Clock, G as CircleX, I as unwrapServerActionResult, u as unwrapOrThrow, W as WorkflowWebAPIError, Y as useEscapeKeydown, v as composeEventHandlers, _ as useCallbackRef, $ as useLayoutEffect2, t as createContextScope, a0 as createContext2, s as useControllableState, a1 as useId, w as Presence, l as hideOthers, m as ReactRemoveScroll, a2 as useFocusGuards, a3 as LAYOUT, a4 as wakeUpRun, r as resumeHook, A as Alert, c as AlertTitle, d as AlertDescription, a as Skeleton$1, a5 as RunActionsButtons, F as StatusBadge, e as CopyableText, b as RelativeTime, T as Tabs, K as TabsList, L as TabsTrigger, M as TabsContent, y as cancelRun, a6 as recreateRun } from "./workflow-graph-viewer-D5yEggTb.js";
3
- import { c as createLucideIcon, M as Spinner, h as useToast, N as Skeleton, O as DecryptClickContext, Y as Yr, U as isEncryptedMarker, W as formatDuration, X as DataInspector, _ as _r, Z as StreamClickContext, $ as isExpiredMarker, a0 as isDoStreamStep, a1 as extractConversation, a2 as Lock, a3 as EVENT_DATA_REF_FIELDS, a4 as clsx, a5 as useTraceViewer, a6 as styles, a7 as formatDurationForTimeline, a8 as formatWallClockTime, a9 as useImmediateStyle, aa as TIMELINE_PADDING, ab as formatTimeSelection, ac as MARKER_HEIGHT, ad as ROW_HEIGHT, ae as ROW_PADDING, af as SEARCH_HEIGHT, ag as getHighResInMs, ah as getMsInHighRes, ai as MARKER_NOTCH_HEIGHT, aj as MAP_HEIGHT, ak as SEARCH_GAP, al as MiniMap, am as SpanNodes, an as SpanDetailPanel, ao as TraceViewerContextProvider, ap as hydrateResourceIOWithKey, aq as hydrateResourceIO, ar as fetchHook, l as fetchEvents, F as fetchRun, as as fetchStep, at as hasEncryptedFields, au as fetchStreams, av as Slot, E as useComposedRefs, aw as Slottable, d as cn, ax as buttonVariants, ay as isEncryptedData, az as hydrateData, aA as getWebRevivers, T as Tooltip, a as TooltipTrigger, b as TooltipContent, aB as LIVE_UPDATE_INTERVAL_MS$1, u as useServerConfig, aC as fetchEvent, aD as getEncryptionKeyForRun, t as toast, L as LoaderCircle, aE as StreamViewer } from "./mermaid-3ZIDBTTL-B_qZU5zW.js";
2
+ import { O as Copy, C as CircleAlert, Q as parseStepName, B as parseWorkflowName, j as ChevronRight, q as Check, U as ErrorCard, Z as Zap, S as Send, R as ResolveHookModal, p as ChevronUp, o as ChevronDown, X, N as ErrorBoundary, V as Clock, G as CircleX, I as unwrapServerActionResult, u as unwrapOrThrow, W as WorkflowWebAPIError, Y as useEscapeKeydown, t as composeEventHandlers, _ as useCallbackRef, $ as useLayoutEffect2, s as useControllableState, a0 as useId, a1 as createContext2, v as Presence, x as createContextScope, l as hideOthers, m as ReactRemoveScroll, a2 as useFocusGuards, a3 as LAYOUT, a4 as wakeUpRun, r as resumeHook, A as Alert, c as AlertTitle, d as AlertDescription, a as Skeleton$1, a5 as RunActionsButtons, F as StatusBadge, e as CopyableText, b as RelativeTime, T as Tabs, K as TabsList, L as TabsTrigger, M as TabsContent, y as cancelRun, a6 as recreateRun } from "./workflow-graph-viewer-fudq4EvS.js";
3
+ import { c as createLucideIcon, M as Spinner, h as useToast, N as Skeleton, O as DecryptClickContext, Y as Yr, U as isEncryptedMarker, W as formatDuration, X as DataInspector, _ as _r, Z as StreamClickContext, $ as isExpiredMarker, a0 as isDoStreamStep, a1 as extractConversation, a2 as Lock, a3 as EVENT_DATA_REF_FIELDS, a4 as clsx, a5 as useTraceViewer, a6 as styles, a7 as formatDurationForTimeline, a8 as formatWallClockTime, a9 as useImmediateStyle, aa as TIMELINE_PADDING, ab as formatTimeSelection, ac as MARKER_HEIGHT, ad as ROW_HEIGHT, ae as ROW_PADDING, af as SEARCH_HEIGHT, ag as getHighResInMs, ah as getMsInHighRes, ai as MARKER_NOTCH_HEIGHT, aj as MAP_HEIGHT, ak as SEARCH_GAP, al as MiniMap, am as SpanNodes, an as SpanDetailPanel, ao as TraceViewerContextProvider, ap as hydrateResourceIOWithKey, aq as hydrateResourceIO, ar as fetchHook, l as fetchEvents, F as fetchRun, as as fetchStep, at as hasEncryptedFields, au as fetchStreams, av as Slot, E as useComposedRefs, aw as Slottable, d as cn, ax as buttonVariants, ay as isEncryptedData, az as hydrateData, aA as getWebRevivers, T as Tooltip, a as TooltipTrigger, b as TooltipContent, aB as LIVE_UPDATE_INTERVAL_MS$1, u as useServerConfig, aC as fetchEvent, aD as getEncryptionKeyForRun, t as toast, L as LoaderCircle, aE as StreamViewer } from "./mermaid-3ZIDBTTL-BE1h5qUK.js";
4
4
  import { decrypt, importKey } from "./encryption-80GMP4r0.js";
5
5
  /**
6
6
  * @license lucide-react v0.575.0 - ISC
@@ -372,27 +372,34 @@ function buildNameMaps(events, run) {
372
372
  return { correlationNameMap, workflowName };
373
373
  }
374
374
  function buildDurationMap(events) {
375
+ const chronological = [...events].sort((a, b) => new Date(a.createdAt).getTime() - new Date(b.createdAt).getTime());
375
376
  const createdTimes = /* @__PURE__ */ new Map();
377
+ const firstStartedTimes = /* @__PURE__ */ new Map();
376
378
  const startedTimes = /* @__PURE__ */ new Map();
377
379
  const durations = /* @__PURE__ */ new Map();
378
- for (const event of events) {
380
+ for (const event of chronological) {
379
381
  const ts = new Date(event.createdAt).getTime();
380
382
  const key = event.correlationId ?? "__run__";
381
383
  const type = event.eventType;
382
384
  if (type === "step_created" || type === "run_created") {
383
- createdTimes.set(key, ts);
384
- }
385
- if (type === "step_started" || type === "run_started" || type === "workflow_started") {
386
- startedTimes.set(key, ts);
387
385
  if (!createdTimes.has(key)) {
388
386
  createdTimes.set(key, ts);
389
387
  }
390
- const createdAt = createdTimes.get(key);
391
- const info = durations.get(key) ?? {};
392
- if (createdAt !== void 0) {
393
- info.queued = ts - createdAt;
388
+ }
389
+ if (type === "step_started" || type === "run_started" || type === "workflow_started") {
390
+ startedTimes.set(key, ts);
391
+ if (!firstStartedTimes.has(key)) {
392
+ firstStartedTimes.set(key, ts);
393
+ if (!createdTimes.has(key)) {
394
+ createdTimes.set(key, ts);
395
+ }
396
+ const createdAt = createdTimes.get(key);
397
+ const info = durations.get(key) ?? {};
398
+ if (createdAt !== void 0) {
399
+ info.queued = ts - createdAt;
400
+ }
401
+ durations.set(key, info);
394
402
  }
395
- durations.set(key, info);
396
403
  }
397
404
  if (type === "step_completed" || type === "step_failed" || type === "run_completed" || type === "run_failed" || type === "run_cancelled" || type === "workflow_completed" || type === "workflow_failed" || type === "wait_completed" || type === "hook_disposed") {
398
405
  const startedAt = startedTimes.get(key);
@@ -3388,7 +3395,7 @@ function hookToSpan(hookEvents, maxEndTime) {
3388
3395
  const endTime = hook.disposedAt || maxEndTime;
3389
3396
  return {
3390
3397
  spanId: String(hook.hookId),
3391
- name: String(hook.hookId),
3398
+ name: hook.token ?? String(hook.hookId),
3392
3399
  kind: 1,
3393
3400
  // INTERNAL span kind
3394
3401
  resource: "hook",
@@ -4054,7 +4061,7 @@ const WorkflowTraceViewer = ({ run, events, isLoading, error, spanDetailData, sp
4054
4061
  if (!trace) {
4055
4062
  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, { className: "w-full ml-2 mt-1 mb-1 h-[56px]" }), jsxRuntimeExports.jsxs("div", { className: "p-2 relative w-full", children: [jsxRuntimeExports.jsx(Skeleton, { className: "w-full mt-6 h-[20px]" }), jsxRuntimeExports.jsx(Skeleton, { className: "w-[10%] mt-2 ml-6 h-[20px]" }), jsxRuntimeExports.jsx(Skeleton, { className: "w-[10%] mt-2 ml-12 h-[20px]" }), jsxRuntimeExports.jsx(Skeleton, { className: "w-[20%] mt-2 ml-16 h-[20px]" })] })] });
4056
4063
  }
4057
- 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, run, isLive, onWakeUpSleep, onCancelRun, onResolveHook, onLoadMoreSpans, hasMoreSpans, isLoadingMoreSpans, children: jsxRuntimeExports.jsx(TraceViewerTimeline, { eagerRender: true, height: "100%", isLive, trace, knownDurationMs: traceWithMeta == null ? void 0 : traceWithMeta.knownDurationMs, hasMoreData: hasMoreSpans || Boolean(isLoading), footer: jsxRuntimeExports.jsx(TraceViewerFooter, { hasMore: hasMoreSpans, isLive, isInitialLoading: Boolean(isLoading) }) }) })] }) }), selectedSpan && jsxRuntimeExports.jsxs("div", { className: "relative border-l flex-shrink-0 flex flex-col", style: {
4064
+ return jsxRuntimeExports.jsxs("div", { className: "relative w-full h-full flex flex-row", 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, run, isLive, onWakeUpSleep, onCancelRun, onResolveHook, onLoadMoreSpans, hasMoreSpans, isLoadingMoreSpans, children: jsxRuntimeExports.jsx(TraceViewerTimeline, { eagerRender: true, height: "100%", isLive, trace, knownDurationMs: traceWithMeta == null ? void 0 : traceWithMeta.knownDurationMs, hasMoreData: hasMoreSpans || Boolean(isLoading), footer: jsxRuntimeExports.jsx(TraceViewerFooter, { hasMore: hasMoreSpans, isLive, isInitialLoading: Boolean(isLoading) }) }) })] }) }), selectedSpan && jsxRuntimeExports.jsxs("div", { className: "relative border-l flex-shrink-0 flex flex-col", style: {
4058
4065
  width: panelWidth,
4059
4066
  borderColor: "var(--ds-gray-200)",
4060
4067
  backgroundColor: "var(--ds-background-100)"
@@ -6320,7 +6327,6 @@ function RunDetailView({
6320
6327
  return;
6321
6328
  }
6322
6329
  setEncryptionKey(keyResult);
6323
- toast.success("Run data decrypted successfully");
6324
6330
  } finally {
6325
6331
  setIsDecrypting(false);
6326
6332
  }
@@ -1,7 +1,7 @@
1
1
  var __defProp = Object.defineProperty;
2
2
  var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
3
3
  var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
4
- import { c as createLucideIcon, aF as cn, d as cn$1, G as cva, aG as composeRefs, E as useComposedRefs, aH as useFloating, aI as offset, aJ as shift, aK as flip, aL as size, aM as arrow, aN as hide, aO as limitShift, aP as autoUpdate, T as Tooltip, a as TooltipTrigger, b as TooltipContent, aQ as cancelRun$1, aR as reenqueueRun$1, aS as wakeUpRun$1, aT as resumeHook$1, aU as recreateRun$1, p as createContextScope$1, n as useComposedRefs$1, v as createSlot, W as formatDuration, B as Button, t as toast, s as useId$1, P as Primitive$1, q as composeEventHandlers$1, x as useControllableState$1, m as useCallbackRef$2, H as Presence$1 } from "./mermaid-3ZIDBTTL-B_qZU5zW.js";
4
+ import { c as createLucideIcon, aF as cn, d as cn$1, G as cva, aG as composeRefs, E as useComposedRefs, aH as useFloating, aI as offset, aJ as shift, aK as limitShift, aL as flip, aM as size, aN as arrow, aO as hide, aP as autoUpdate, T as Tooltip, a as TooltipTrigger, b as TooltipContent, aQ as cancelRun$1, aR as reenqueueRun$1, aS as wakeUpRun$1, aT as resumeHook$1, aU as recreateRun$1, v as createContextScope$1, n as useComposedRefs$1, w as createSlot, W as formatDuration, B as Button, t as toast, p as useId$1, P as Primitive$1, o as composeEventHandlers$1, x as useControllableState$1, m as useCallbackRef$2, H as Presence$1 } from "./mermaid-3ZIDBTTL-BE1h5qUK.js";
5
5
  import { r as reactExports, j as jsxRuntimeExports, f as reactDomExports, R as ReactExports, H as React, C as ReactDOM, a as requireReact, I as getDefaultExportFromCjs } from "./index-DQa-BExo.js";
6
6
  function parseName(tag, name) {
7
7
  if (typeof name !== "string") {
@@ -16140,8 +16140,8 @@ export {
16140
16140
  Zap as Z,
16141
16141
  useCallbackRef$1 as _,
16142
16142
  Skeleton as a,
16143
- createContext2 as a0,
16144
- useId as a1,
16143
+ useId as a0,
16144
+ createContext2 as a1,
16145
16145
  useFocusGuards as a2,
16146
16146
  LAYOUT as a3,
16147
16147
  wakeUpRun as a4,
@@ -16165,11 +16165,11 @@ export {
16165
16165
  Check as q,
16166
16166
  resumeHook as r,
16167
16167
  useControllableState as s,
16168
- createContextScope as t,
16168
+ composeEventHandlers as t,
16169
16169
  unwrapOrThrow as u,
16170
- composeEventHandlers as v,
16171
- Presence as w,
16172
- useSize as x,
16170
+ Presence as v,
16171
+ useSize as w,
16172
+ createContextScope as x,
16173
16173
  cancelRun as y,
16174
16174
  reenqueueRun as z
16175
16175
  };
@@ -9176,7 +9176,7 @@ const app = express();
9176
9176
  app.all(
9177
9177
  "*",
9178
9178
  createRequestHandler({
9179
- build: () => import("./server-build-UvQ8ujzE.js").then((n) => n.G)
9179
+ build: () => import("./server-build-DiegzHGY.js").then((n) => n.G)
9180
9180
  })
9181
9181
  );
9182
9182
  app.use(
@@ -1,5 +1,5 @@
1
- import { y as R, K as Ks, z as jsxRuntimeExports, A as Qe } from "./server-build-UvQ8ujzE.js";
2
- import { r as reactExports } from "./app-uVjXCfex.js";
1
+ import { y as R, K as Ks, z as jsxRuntimeExports, A as Qe } from "./server-build-DiegzHGY.js";
2
+ import { r as reactExports } from "./app-DZ5lj7U4.js";
3
3
  import "node:stream";
4
4
  import "util";
5
5
  import "crypto";
@@ -1,5 +1,6 @@
1
- import { B, D, t, E, a, b, c, H, L, M, P, Q, d, R, l, m, n, o, h, S, p, q, i, V, w, x, W, e, f, g, j, r, k, s, u, v } from "./server-build-UvQ8ujzE.js";
2
- import "./app-uVjXCfex.js";
1
+ import { H as HookSchema } from "./server-build-DiegzHGY.js";
2
+ import { B, D, a, E, b, c, d, L, M, P, Q, e, R, S, f, g, h, i, j, k, l, m, V, W, n, o, p, q, r, s, t, u, v, w, x } from "./server-build-DiegzHGY.js";
3
+ import "./app-DZ5lj7U4.js";
3
4
  import "stream";
4
5
  import "express";
5
6
  import "node:stream";
@@ -44,38 +45,38 @@ import "node:os";
44
45
  export {
45
46
  B as BaseEventSchema,
46
47
  D as DEFAULT_TIMESTAMP_THRESHOLD_FUTURE_MS,
47
- t as DEFAULT_TIMESTAMP_THRESHOLD_PAST_MS,
48
+ a as DEFAULT_TIMESTAMP_THRESHOLD_PAST_MS,
48
49
  E as EVENT_DATA_REF_FIELDS,
49
- a as EventSchema,
50
- b as EventTypeSchema,
51
- c as HealthCheckPayloadSchema,
52
- H as HookSchema,
50
+ b as EventSchema,
51
+ c as EventTypeSchema,
52
+ d as HealthCheckPayloadSchema,
53
+ HookSchema,
53
54
  L as LegacySerializedDataSchemaV1,
54
55
  M as MessageId,
55
56
  P as PaginatedResponseSchema,
56
57
  Q as QueuePayloadSchema,
57
- d as QueuePrefix,
58
+ e as QueuePrefix,
58
59
  R as RunInputSchema,
59
- l as SPEC_VERSION_CURRENT,
60
- m as SPEC_VERSION_LEGACY,
61
- n as SPEC_VERSION_SUPPORTS_CBOR_QUEUE_TRANSPORT,
62
- o as SPEC_VERSION_SUPPORTS_EVENT_SOURCING,
63
- h as SerializedDataSchema,
64
- S as StepInvokePayloadSchema,
65
- p as StepSchema,
66
- q as StepStatusSchema,
67
- i as StructuredErrorSchema,
60
+ S as SPEC_VERSION_CURRENT,
61
+ f as SPEC_VERSION_LEGACY,
62
+ g as SPEC_VERSION_SUPPORTS_CBOR_QUEUE_TRANSPORT,
63
+ h as SPEC_VERSION_SUPPORTS_EVENT_SOURCING,
64
+ i as SerializedDataSchema,
65
+ j as StepInvokePayloadSchema,
66
+ k as StepSchema,
67
+ l as StepStatusSchema,
68
+ m as StructuredErrorSchema,
68
69
  V as ValidQueueName,
69
- w as WaitSchema,
70
- x as WaitStatusSchema,
71
- W as WorkflowInvokePayloadSchema,
72
- e as WorkflowRunBaseSchema,
73
- f as WorkflowRunSchema,
74
- g as WorkflowRunStatusSchema,
75
- j as isLegacySpecVersion,
76
- r as reenqueueActiveRuns,
77
- k as requiresNewerWorld,
78
- s as stripEventDataRefs,
79
- u as ulidToDate,
80
- v as validateUlidTimestamp
70
+ W as WaitSchema,
71
+ n as WaitStatusSchema,
72
+ o as WorkflowInvokePayloadSchema,
73
+ p as WorkflowRunBaseSchema,
74
+ q as WorkflowRunSchema,
75
+ r as WorkflowRunStatusSchema,
76
+ s as isLegacySpecVersion,
77
+ t as reenqueueActiveRuns,
78
+ u as requiresNewerWorld,
79
+ v as stripEventDataRefs,
80
+ w as ulidToDate,
81
+ x as validateUlidTimestamp
81
82
  };
@@ -1,5 +1,5 @@
1
- import { N } from "./server-build-UvQ8ujzE.js";
2
- import "./app-uVjXCfex.js";
1
+ import { N as Nt } from "./server-build-DiegzHGY.js";
2
+ import "./app-DZ5lj7U4.js";
3
3
  import "stream";
4
4
  import "express";
5
5
  import "node:stream";
@@ -42,5 +42,5 @@ import "fs";
42
42
  import "net";
43
43
  import "node:os";
44
44
  export {
45
- N as Mermaid
45
+ Nt as Mermaid
46
46
  };