@workflow/web 4.1.7 → 4.1.8

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,14 +1,20 @@
1
1
  const NONCE_LENGTH = 12;
2
2
  const TAG_LENGTH = 128;
3
3
  const KEY_LENGTH = 32;
4
- async function importKey(raw) {
4
+ async function importKey(raw, usages = ["encrypt", "decrypt"]) {
5
5
  if (raw.byteLength !== KEY_LENGTH) {
6
6
  throw new Error(`Encryption key must be exactly ${KEY_LENGTH} bytes, got ${raw.byteLength}`);
7
7
  }
8
- return globalThis.crypto.subtle.importKey("raw", raw, "AES-GCM", false, [
9
- "encrypt",
10
- "decrypt"
11
- ]);
8
+ return globalThis.crypto.subtle.importKey(
9
+ "raw",
10
+ raw,
11
+ "AES-GCM",
12
+ false,
13
+ // `KeyUsage` is a DOM-lib type that's not in scope under `es2022`.
14
+ // The `ReadonlyArray<'encrypt' | 'decrypt'>` parameter type matches
15
+ // a strict subset of `KeyUsage[]`, so this cast is sound.
16
+ usages
17
+ );
12
18
  }
13
19
  async function decrypt(key, data) {
14
20
  const minLength = NONCE_LENGTH + TAG_LENGTH / 8;
@@ -1,4 +1,4 @@
1
- import { R, K as Ks, Q as Qe } from "./mermaid-3ZIDBTTL-Cr7OQX4b.js";
1
+ import { R, K as Ks, Q as Qe } from "./mermaid-3ZIDBTTL-CjHrXABH.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, 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-P4oMQJaV.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-Cr7OQX4b.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-BNsGQIfR.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-CjHrXABH.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-BzOKTpCh.js","imports":["/assets/index-DQa-BExo.js","/assets/mermaid-3ZIDBTTL-Cr7OQX4b.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-B9GhesEF.js","imports":["/assets/index-DQa-BExo.js","/assets/workflow-graph-viewer-P4oMQJaV.js","/assets/mermaid-3ZIDBTTL-Cr7OQX4b.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-CRqjlzw9.js","imports":["/assets/index-DQa-BExo.js","/assets/workflow-graph-viewer-P4oMQJaV.js","/assets/mermaid-3ZIDBTTL-Cr7OQX4b.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-830d5c7d.js","version":"830d5c7d"};
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--_OYilvb.js","imports":["/assets/index-DQa-BExo.js","/assets/mermaid-3ZIDBTTL-CjHrXABH.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-D6JmZfUp.js","imports":["/assets/index-DQa-BExo.js","/assets/workflow-graph-viewer-BNsGQIfR.js","/assets/mermaid-3ZIDBTTL-CjHrXABH.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-BeA7fQfA.js","imports":["/assets/index-DQa-BExo.js","/assets/workflow-graph-viewer-BNsGQIfR.js","/assets/mermaid-3ZIDBTTL-CjHrXABH.js","/assets/encryption-5eom23r0.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-3243993f.js","version":"3243993f"};
@@ -1,4 +1,4 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/highlighted-body-B3W2YXNL-D1wKXrjI.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-9Gx_xbQ8.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);
@@ -10340,7 +10340,7 @@ function hydrateData(value, revivers) {
10340
10340
  async function hydrateDataWithKey(value, revivers, key) {
10341
10341
  if (value instanceof Uint8Array && isEncryptedData(value) && key) {
10342
10342
  const { decrypt } = await __vitePreload(async () => {
10343
- const { decrypt: decrypt2 } = await import("./encryption-80GMP4r0.js");
10343
+ const { decrypt: decrypt2 } = await import("./encryption-5eom23r0.js");
10344
10344
  return { decrypt: decrypt2 };
10345
10345
  }, true ? [] : void 0);
10346
10346
  const { payload } = decodeFormatPrefix(value);
@@ -15466,6 +15466,11 @@ const WorkflowInvokePayloadSchema = object({
15466
15466
  runId: string$2(),
15467
15467
  traceCarrier: TraceCarrierSchema.optional(),
15468
15468
  requestedAt: date().optional(),
15469
+ /** Consecutive replay divergences in this recovery chain and latest position. */
15470
+ replayDivergence: object({
15471
+ eventId: string$2(),
15472
+ count: number$2().int().positive()
15473
+ }).optional(),
15469
15474
  /** Number of times this message has been re-enqueued due to server errors (5xx) */
15470
15475
  serverErrorRetryCount: number$2().int().optional(),
15471
15476
  /** Run creation data, only present on the first queue delivery from start() */
@@ -15805,7 +15810,7 @@ async function hydrateResourceIOWithKey(resource, key) {
15805
15810
  return { hydrateDataWithKey: hydrateDataWithKey3 };
15806
15811
  }, true ? void 0 : void 0);
15807
15812
  const { importKey } = await __vitePreload(async () => {
15808
- const { importKey: importKey2 } = await import("./encryption-80GMP4r0.js");
15813
+ const { importKey: importKey2 } = await import("./encryption-5eom23r0.js");
15809
15814
  return { importKey: importKey2 };
15810
15815
  }, true ? [] : void 0);
15811
15816
  const cryptoKey = await importKey(key);
@@ -42818,7 +42823,7 @@ var tn = f("block", "before:content-[counter(line)]", "before:inline-block", "be
42818
42823
  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 });
42819
42824
  var Se = reactExports.createContext({ code: "" }), de = () => reactExports.useContext(Se);
42820
42825
  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 }) });
42821
- var cn$1 = /\n+$/, dn = reactExports.lazy(() => __vitePreload(() => import("./highlighted-body-B3W2YXNL-D1wKXrjI.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 }) => {
42826
+ var cn$1 = /\n+$/, dn = reactExports.lazy(() => __vitePreload(() => import("./highlighted-body-B3W2YXNL-9Gx_xbQ8.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 }) => {
42822
42827
  let i = reactExports.useMemo(() => e.replace(cn$1, ""), [e]), c = reactExports.useMemo(() => ({ bg: "transparent", fg: "inherit", tokens: i.split(`
42823
42828
  `).map((a2) => [{ content: a2, color: "inherit", bgColor: "transparent", htmlStyle: {}, offset: 0 }]) }), [i]);
42824
42829
  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 }) })] }) });
@@ -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-Cr7OQX4b.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-CjHrXABH.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,7 +1,7 @@
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, 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-P4oMQJaV.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, aB as fetchEvent, aC as fetchEventsByCorrelationId, T as Tooltip, a as TooltipTrigger, b as TooltipContent, aD as LIVE_UPDATE_INTERVAL_MS$1, u as useServerConfig, aE as getEncryptionKeyForRun, t as toast, L as LoaderCircle, aF as StreamViewer } from "./mermaid-3ZIDBTTL-Cr7OQX4b.js";
4
- import { decrypt, importKey } from "./encryption-80GMP4r0.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-BNsGQIfR.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, aB as fetchEvent, aC as fetchEventsByCorrelationId, T as Tooltip, a as TooltipTrigger, b as TooltipContent, aD as LIVE_UPDATE_INTERVAL_MS$1, u as useServerConfig, aE as getEncryptionKeyForRun, t as toast, L as LoaderCircle, aF as StreamViewer } from "./mermaid-3ZIDBTTL-CjHrXABH.js";
4
+ import { decrypt, importKey } from "./encryption-5eom23r0.js";
5
5
  /**
6
6
  * @license lucide-react v0.575.0 - ISC
7
7
  *
@@ -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, aG as cn, d as cn$1, G as cva, aH as composeRefs, E as useComposedRefs, aI as useFloating, aJ as offset, aK as shift, aL as limitShift, aM as flip, aN as size, aO as arrow, aP as hide, aQ as autoUpdate, T as Tooltip, a as TooltipTrigger, b as TooltipContent, aR as cancelRun$1, aS as reenqueueRun$1, aT as wakeUpRun$1, aU as resumeHook$1, aV 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-Cr7OQX4b.js";
4
+ import { c as createLucideIcon, aG as cn, d as cn$1, G as cva, aH as composeRefs, E as useComposedRefs, aI as useFloating, aJ as offset, aK as shift, aL as limitShift, aM as flip, aN as size, aO as arrow, aP as hide, aQ as autoUpdate, T as Tooltip, a as TooltipTrigger, b as TooltipContent, aR as cancelRun$1, aS as reenqueueRun$1, aT as wakeUpRun$1, aU as resumeHook$1, aV 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-CjHrXABH.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") {
@@ -9176,7 +9176,7 @@ const app = express();
9176
9176
  app.all(
9177
9177
  "*",
9178
9178
  createRequestHandler({
9179
- build: () => import("./server-build-DBNmVwSJ.js").then((n) => n.G)
9179
+ build: () => import("./server-build-BBm5-YMr.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-DBNmVwSJ.js";
2
- import { r as reactExports } from "./app-CthB1gsr.js";
1
+ import { y as R, K as Ks, z as jsxRuntimeExports, A as Qe } from "./server-build-BBm5-YMr.js";
2
+ import { r as reactExports } from "./app-Bw7CxKyr.js";
3
3
  import "node:stream";
4
4
  import "util";
5
5
  import "crypto";
@@ -1,6 +1,6 @@
1
- import { H as HookSchema } from "./server-build-DBNmVwSJ.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-DBNmVwSJ.js";
3
- import "./app-CthB1gsr.js";
1
+ import { H as HookSchema } from "./server-build-BBm5-YMr.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-BBm5-YMr.js";
3
+ import "./app-Bw7CxKyr.js";
4
4
  import "stream";
5
5
  import "express";
6
6
  import "node:stream";
@@ -1,5 +1,5 @@
1
- import { N as Nt } from "./server-build-DBNmVwSJ.js";
2
- import "./app-CthB1gsr.js";
1
+ import { N as Nt } from "./server-build-BBm5-YMr.js";
2
+ import "./app-Bw7CxKyr.js";
3
3
  import "stream";
4
4
  import "express";
5
5
  import "node:stream";
@@ -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, _root, _hasMagic, _uflag, _parts, _parent, _parentIndex, _negs, _filledNegs, _options, _toString, _emptyExt, _AST_instances, fillNegs_fn, _AST_static, parseAST_fn, canAdoptWithSpace_fn, canAdopt_fn, canAdoptType_fn, adoptWithSpace_fn, adopt_fn, canUsurpType_fn, canUsurp_fn, usurp_fn, flatten_fn, partsToRegExp_fn, parseGlob_fn, _Minimatch_instances, matchGlobstar_fn, matchGlobStarBodySections_fn, matchOne_fn, _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, d as withErrorBoundaryProps, M as Meta, L as Links, e as ScrollRestoration, f as Scripts, O as Outlet, u as useNavigate, h as useSearchParams, i as Link$1, j as useRouteError, k as isRouteErrorResponse, l as useLocation, m as useParams } from "./app-CthB1gsr.js";
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, d as withErrorBoundaryProps, M as Meta, L as Links, e as ScrollRestoration, f as Scripts, O as Outlet, u as useNavigate, h as useSearchParams, i as Link$1, j as useRouteError, k as isRouteErrorResponse, l as useLocation, m as useParams } from "./app-Bw7CxKyr.js";
18
18
  import require$$0$4, { PassThrough } from "node:stream";
19
19
  import require$$0 from "util";
20
20
  import require$$1 from "crypto";
@@ -48708,6 +48708,11 @@ const WorkflowInvokePayloadSchema = object$1({
48708
48708
  runId: string$3(),
48709
48709
  traceCarrier: TraceCarrierSchema.optional(),
48710
48710
  requestedAt: date$2().optional(),
48711
+ /** Consecutive replay divergences in this recovery chain and latest position. */
48712
+ replayDivergence: object$1({
48713
+ eventId: string$3(),
48714
+ count: number$3().int().positive()
48715
+ }).optional(),
48711
48716
  /** Number of times this message has been re-enqueued due to server errors (5xx) */
48712
48717
  serverErrorRetryCount: number$3().int().optional(),
48713
48718
  /** Run creation data, only present on the first queue delivery from start() */
@@ -79383,7 +79388,7 @@ var tn = f("block", "before:content-[counter(line)]", "before:inline-block", "be
79383
79388
  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 });
79384
79389
  var Se = reactExports.createContext({ code: "" }), de = () => reactExports.useContext(Se);
79385
79390
  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 }) });
79386
- var cn$1 = /\n+$/, dn = reactExports.lazy(() => import("./highlighted-body-B3W2YXNL-Bid3dXog.js").then((e) => ({ default: e.HighlightedCodeBlockBody }))), rt = ({ code: e, language: t, className: o, children: n, isIncomplete: s2 = false, ...r2 }) => {
79391
+ var cn$1 = /\n+$/, dn = reactExports.lazy(() => import("./highlighted-body-B3W2YXNL-KnZkHlP2.js").then((e) => ({ default: e.HighlightedCodeBlockBody }))), rt = ({ code: e, language: t, className: o, children: n, isIncomplete: s2 = false, ...r2 }) => {
79387
79392
  let i = reactExports.useMemo(() => e.replace(cn$1, ""), [e]), c = reactExports.useMemo(() => ({ bg: "transparent", fg: "inherit", tokens: i.split(`
79388
79393
  `).map((a2) => [{ content: a2, color: "inherit", bgColor: "transparent", htmlStyle: {}, offset: 0 }]) }), [i]);
79389
79394
  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 }) })] }) });
@@ -79705,7 +79710,7 @@ var Dt = ({ children: e, className: t, onDownload: o, onError: n }) => {
79705
79710
  }, []), 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] });
79706
79711
  };
79707
79712
  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 }) })] });
79708
- var Jn = reactExports.lazy(() => import("./mermaid-3ZIDBTTL-Dx3Er0ad.js").then((e) => ({ default: e.Mermaid }))), Kn = /language-([^\s]+)/;
79713
+ var Jn = reactExports.lazy(() => import("./mermaid-3ZIDBTTL-CvDmHqoa.js").then((e) => ({ default: e.Mermaid }))), Kn = /language-([^\s]+)/;
79709
79714
  function ke(e, t) {
79710
79715
  if (!(e != null && e.position || t != null && t.position)) return true;
79711
79716
  if (!(e != null && e.position && (t != null && t.position))) return false;
@@ -88545,14 +88550,20 @@ const VERCEL_403_ERROR_MESSAGE = "Your current vercel account does not have acce
88545
88550
  const NONCE_LENGTH = 12;
88546
88551
  const TAG_LENGTH = 128;
88547
88552
  const KEY_LENGTH = 32;
88548
- async function importKey(raw2) {
88553
+ async function importKey(raw2, usages = ["encrypt", "decrypt"]) {
88549
88554
  if (raw2.byteLength !== KEY_LENGTH) {
88550
88555
  throw new Error(`Encryption key must be exactly ${KEY_LENGTH} bytes, got ${raw2.byteLength}`);
88551
88556
  }
88552
- return globalThis.crypto.subtle.importKey("raw", raw2, "AES-GCM", false, [
88553
- "encrypt",
88554
- "decrypt"
88555
- ]);
88557
+ return globalThis.crypto.subtle.importKey(
88558
+ "raw",
88559
+ raw2,
88560
+ "AES-GCM",
88561
+ false,
88562
+ // `KeyUsage` is a DOM-lib type that's not in scope under `es2022`.
88563
+ // The `ReadonlyArray<'encrypt' | 'decrypt'>` parameter type matches
88564
+ // a strict subset of `KeyUsage[]`, so this cast is sound.
88565
+ usages
88566
+ );
88556
88567
  }
88557
88568
  async function encrypt(key, data) {
88558
88569
  const nonce = globalThis.crypto.getRandomValues(new Uint8Array(NONCE_LENGTH));
@@ -89502,7 +89513,7 @@ createLogger("webhook");
89502
89513
  createLogger("events");
89503
89514
  createLogger("adapter");
89504
89515
  const MAX_QUEUE_DELIVERIES = 48;
89505
- const version$1 = "4.2.6";
89516
+ const version$1 = "4.3.0";
89506
89517
  const execFileAsync = promisify(execFile);
89507
89518
  function parsePort$1(value, radix = 10) {
89508
89519
  const port = parseInt(value, radix);
@@ -116039,7 +116050,7 @@ function createLocalWorld(args) {
116039
116050
  const basedir = mergedConfig.dataDir;
116040
116051
  const hooksDir = path$3.join(basedir, "hooks");
116041
116052
  const taggedHookFiles = await listTaggedFiles(hooksDir, tag);
116042
- const { HookSchema: HookSchema2 } = await import("./index-DSI4dt08.js");
116053
+ const { HookSchema: HookSchema2 } = await import("./index-D1onv-Hr.js");
116043
116054
  await Promise.all(taggedHookFiles.map(async (hookFile) => {
116044
116055
  const hook = await readJSON(path$3.join(hooksDir, hookFile), HookSchema2);
116045
116056
  if (hook == null ? void 0 : hook.token) {
@@ -116191,8 +116202,8 @@ function requireGetVercelOidcToken() {
116191
116202
  }
116192
116203
  try {
116193
116204
  const [{ getTokenPayload, isExpired }, { refreshToken }] = await Promise.all([
116194
- await import("./token-util-B88n4Kn9.js").then((n) => n.t),
116195
- await import("./token-bXRgYyTK.js").then((n) => n.t)
116205
+ await import("./token-util-DoCTpdh_.js").then((n) => n.t),
116206
+ await import("./token-DUzouuf-.js").then((n) => n.t)
116196
116207
  ]);
116197
116208
  if (!token || isExpired(getTokenPayload(token), options == null ? void 0 : options.expirationBufferMs)) {
116198
116209
  await refreshToken(options);
@@ -121363,7 +121374,7 @@ var QueueClient = class {
121363
121374
  setApi(this, new ApiClient({ ...options, region }));
121364
121375
  }
121365
121376
  };
121366
- const version = "4.3.0";
121377
+ const version = "4.3.1";
121367
121378
  const HTTP_DEBUG_ENABLED = typeof process !== "undefined" && typeof process.env.DEBUG === "string" && (process.env.DEBUG.includes("workflow:") || process.env.DEBUG === "*");
121368
121379
  function httpLog(method, endpoint, status, ms2) {
121369
121380
  if (HTTP_DEBUG_ENABLED) {
@@ -124100,6 +124111,8 @@ const WORKFLOW_DESERIALIZE = Symbol.for("workflow-deserialize");
124100
124111
  const STABLE_ULID = Symbol.for("WORKFLOW_STABLE_ULID");
124101
124112
  const STREAM_NAME_SYMBOL = Symbol.for("WORKFLOW_STREAM_NAME");
124102
124113
  const STREAM_TYPE_SYMBOL = Symbol.for("WORKFLOW_STREAM_TYPE");
124114
+ const STREAM_SERVER_RUN_ID_SYMBOL = Symbol.for("WORKFLOW_STREAM_SERVER_RUN_ID");
124115
+ const STREAM_SERVER_DEPLOYMENT_ID_SYMBOL = Symbol.for("WORKFLOW_STREAM_SERVER_DEPLOYMENT_ID");
124103
124116
  const BODY_INIT_SYMBOL = Symbol.for("BODY_INIT");
124104
124117
  const WEBHOOK_RESPONSE_WRITABLE = Symbol.for("WEBHOOK_RESPONSE_WRITABLE");
124105
124118
  const WORKFLOW_CLASS_REGISTRY = Symbol.for("workflow-class-registry");
@@ -124789,6 +124802,19 @@ function getExternalReducers(global2 = globalThis, ops, runId, cryptoKey) {
124789
124802
  WritableStream: (value) => {
124790
124803
  if (!(value instanceof global2.WritableStream))
124791
124804
  return false;
124805
+ const existingName = value[STREAM_NAME_SYMBOL];
124806
+ const existingRunId = value[STREAM_SERVER_RUN_ID_SYMBOL];
124807
+ if (typeof existingName === "string" && typeof existingRunId === "string") {
124808
+ const descriptor = {
124809
+ name: existingName,
124810
+ runId: existingRunId
124811
+ };
124812
+ const existingDeploymentId = value[STREAM_SERVER_DEPLOYMENT_ID_SYMBOL];
124813
+ if (typeof existingDeploymentId === "string") {
124814
+ descriptor.deploymentId = existingDeploymentId;
124815
+ }
124816
+ return descriptor;
124817
+ }
124792
124818
  const streamId = (global2[STABLE_ULID] || defaultUlid)();
124793
124819
  const name2 = `strm_${streamId}`;
124794
124820
  const readable2 = new WorkflowServerReadableStream(name2);
@@ -124828,12 +124854,20 @@ function getStepReducers(global2 = globalThis, ops, runId, cryptoKey) {
124828
124854
  if (!(value instanceof global2.WritableStream))
124829
124855
  return false;
124830
124856
  let name2 = value[STREAM_NAME_SYMBOL];
124857
+ const foreignRunId = value[STREAM_SERVER_RUN_ID_SYMBOL];
124831
124858
  if (!name2) {
124832
124859
  const streamId = (global2[STABLE_ULID] || defaultUlid)();
124833
124860
  name2 = `strm_${streamId}`;
124834
124861
  ops.push(new WorkflowServerReadableStream(name2).pipeThrough(getDeserializeStream(getStepRevivers(global2, ops, runId, cryptoKey), cryptoKey)).pipeTo(value));
124835
124862
  }
124836
- return { name: name2 };
124863
+ const s2 = { name: name2 };
124864
+ if (typeof foreignRunId === "string")
124865
+ s2.runId = foreignRunId;
124866
+ const foreignDeploymentId = value[STREAM_SERVER_DEPLOYMENT_ID_SYMBOL];
124867
+ if (typeof foreignDeploymentId === "string") {
124868
+ s2.deploymentId = foreignDeploymentId;
124869
+ }
124870
+ return s2;
124837
124871
  }
124838
124872
  };
124839
124873
  }
@@ -124937,6 +124971,13 @@ function getCommonRevivers(global2 = globalThis) {
124937
124971
  }
124938
124972
  };
124939
124973
  }
124974
+ async function getForwardedWritableEncryptionKey(runId, deploymentId) {
124975
+ const world = getWorld();
124976
+ if (!world.getEncryptionKeyForRun)
124977
+ return void 0;
124978
+ const rawKey = deploymentId ? await world.getEncryptionKeyForRun(runId, { deploymentId }) : await world.getEncryptionKeyForRun(await world.runs.get(runId));
124979
+ return rawKey ? await importKey(rawKey, ["encrypt"]) : void 0;
124980
+ }
124940
124981
  function getExternalRevivers(global2 = globalThis, ops, runId, cryptoKey) {
124941
124982
  return {
124942
124983
  ...getCommonRevivers(global2),
@@ -124985,13 +125026,29 @@ function getExternalRevivers(global2 = globalThis, ops, runId, cryptoKey) {
124985
125026
  }
124986
125027
  },
124987
125028
  WritableStream: (value) => {
124988
- const serialize2 = getSerializeStream(getExternalReducers(global2, ops, runId, cryptoKey), cryptoKey);
124989
- const serverWritable = new WorkflowServerWritableStream(value.name, runId);
125029
+ const targetRunId = typeof value.runId === "string" ? value.runId : runId;
125030
+ const targetKey = targetRunId === runId ? cryptoKey : getForwardedWritableEncryptionKey(targetRunId, value.deploymentId);
125031
+ const serialize2 = getSerializeStream(getExternalReducers(global2, ops, targetRunId, targetKey), targetKey);
125032
+ const serverWritable = new WorkflowServerWritableStream(value.name, targetRunId);
124990
125033
  const state = createFlushableState();
124991
125034
  ops.push(state.promise);
124992
125035
  flushablePipe(serialize2.readable, serverWritable, state).catch(() => {
124993
125036
  });
124994
125037
  pollWritableLock(serialize2.writable, state);
125038
+ Object.defineProperty(serialize2.writable, STREAM_NAME_SYMBOL, {
125039
+ value: value.name,
125040
+ writable: false
125041
+ });
125042
+ Object.defineProperty(serialize2.writable, STREAM_SERVER_RUN_ID_SYMBOL, {
125043
+ value: targetRunId,
125044
+ writable: false
125045
+ });
125046
+ if (typeof value.deploymentId === "string") {
125047
+ Object.defineProperty(serialize2.writable, STREAM_SERVER_DEPLOYMENT_ID_SYMBOL, {
125048
+ value: value.deploymentId,
125049
+ writable: false
125050
+ });
125051
+ }
124995
125052
  return serialize2.writable;
124996
125053
  }
124997
125054
  };
@@ -125053,16 +125110,29 @@ function getWorkflowRevivers(global2 = globalThis) {
125053
125110
  });
125054
125111
  },
125055
125112
  WritableStream: (value) => {
125056
- return Object.create(global2.WritableStream.prototype, {
125113
+ const descriptor = {
125057
125114
  [STREAM_NAME_SYMBOL]: {
125058
125115
  value: value.name,
125059
125116
  writable: false
125060
125117
  }
125061
- });
125118
+ };
125119
+ if (typeof value.runId === "string") {
125120
+ descriptor[STREAM_SERVER_RUN_ID_SYMBOL] = {
125121
+ value: value.runId,
125122
+ writable: false
125123
+ };
125124
+ }
125125
+ if (typeof value.deploymentId === "string") {
125126
+ descriptor[STREAM_SERVER_DEPLOYMENT_ID_SYMBOL] = {
125127
+ value: value.deploymentId,
125128
+ writable: false
125129
+ };
125130
+ }
125131
+ return Object.create(global2.WritableStream.prototype, descriptor);
125062
125132
  }
125063
125133
  };
125064
125134
  }
125065
- function getStepRevivers(global2 = globalThis, ops, runId, cryptoKey) {
125135
+ function getStepRevivers(global2 = globalThis, ops, runId, cryptoKey, deploymentId) {
125066
125136
  return {
125067
125137
  ...getCommonRevivers(global2),
125068
125138
  // StepFunction reviver for step context - returns raw step function
@@ -125166,7 +125236,7 @@ function getStepRevivers(global2 = globalThis, ops, runId, cryptoKey) {
125166
125236
  pollReadableLock(userReadable, state);
125167
125237
  return userReadable;
125168
125238
  } else {
125169
- const transform2 = getDeserializeStream(getStepRevivers(global2, ops, runId, cryptoKey), cryptoKey);
125239
+ const transform2 = getDeserializeStream(getStepRevivers(global2, ops, runId, cryptoKey, deploymentId), cryptoKey);
125170
125240
  const state = createFlushableState();
125171
125241
  ops.push(state.promise);
125172
125242
  flushablePipe(readable2, transform2.writable, state).catch(() => {
@@ -125176,13 +125246,30 @@ function getStepRevivers(global2 = globalThis, ops, runId, cryptoKey) {
125176
125246
  }
125177
125247
  },
125178
125248
  WritableStream: (value) => {
125179
- const serialize2 = getSerializeStream(getStepReducers(global2, ops, runId, cryptoKey), cryptoKey);
125180
- const serverWritable = new WorkflowServerWritableStream(value.name, runId);
125249
+ const targetRunId = typeof value.runId === "string" ? value.runId : runId;
125250
+ const targetDeploymentId = typeof value.deploymentId === "string" ? value.deploymentId : targetRunId === runId ? deploymentId : void 0;
125251
+ const targetKey = targetRunId === runId ? cryptoKey : getForwardedWritableEncryptionKey(targetRunId, targetDeploymentId);
125252
+ const serialize2 = getSerializeStream(getStepReducers(global2, ops, targetRunId, targetKey), targetKey);
125253
+ const serverWritable = new WorkflowServerWritableStream(value.name, targetRunId);
125181
125254
  const state = createFlushableState();
125182
125255
  ops.push(state.promise);
125183
125256
  flushablePipe(serialize2.readable, serverWritable, state).catch(() => {
125184
125257
  });
125185
125258
  pollWritableLock(serialize2.writable, state);
125259
+ Object.defineProperty(serialize2.writable, STREAM_NAME_SYMBOL, {
125260
+ value: value.name,
125261
+ writable: false
125262
+ });
125263
+ Object.defineProperty(serialize2.writable, STREAM_SERVER_RUN_ID_SYMBOL, {
125264
+ value: targetRunId,
125265
+ writable: false
125266
+ });
125267
+ if (targetDeploymentId) {
125268
+ Object.defineProperty(serialize2.writable, STREAM_SERVER_DEPLOYMENT_ID_SYMBOL, {
125269
+ value: targetDeploymentId,
125270
+ writable: false
125271
+ });
125272
+ }
125186
125273
  return serialize2.writable;
125187
125274
  }
125188
125275
  };
@@ -125257,11 +125344,11 @@ async function hydrateWorkflowReturnValue(value, runId, key, ops = [], global2 =
125257
125344
  }
125258
125345
  throw new Error(`Unsupported serialization format: ${format2}`);
125259
125346
  }
125260
- async function hydrateStepArguments(value, runId, key, ops = [], global2 = globalThis, extraRevivers = {}) {
125347
+ async function hydrateStepArguments(value, runId, key, ops = [], global2 = globalThis, extraRevivers = {}, deploymentId) {
125261
125348
  const decrypted = await maybeDecrypt(value, key);
125262
125349
  if (!(decrypted instanceof Uint8Array)) {
125263
125350
  return unflatten(decrypted, {
125264
- ...getStepRevivers(global2, ops, runId, key),
125351
+ ...getStepRevivers(global2, ops, runId, key, deploymentId),
125265
125352
  ...extraRevivers
125266
125353
  });
125267
125354
  }
@@ -125269,7 +125356,7 @@ async function hydrateStepArguments(value, runId, key, ops = [], global2 = globa
125269
125356
  if (format2 === SerializationFormat.DEVALUE_V1) {
125270
125357
  const str = new TextDecoder().decode(payload);
125271
125358
  const obj = parse$7(str, {
125272
- ...getStepRevivers(global2, ops, runId, key),
125359
+ ...getStepRevivers(global2, ops, runId, key, deploymentId),
125273
125360
  ...extraRevivers
125274
125361
  });
125275
125362
  return obj;
@@ -128803,7 +128890,7 @@ createQueueHandler("__wkf_step_", async (message_, metadata) => {
128803
128890
  const encryptionKey = rawKey ? await importKey(rawKey) : void 0;
128804
128891
  const hydratedInput = await trace$2("step.hydrate", {}, async (hydrateSpan) => {
128805
128892
  const startTime = Date.now();
128806
- const result2 = await hydrateStepArguments(step.input, workflowRunId, encryptionKey, ops);
128893
+ const result2 = await hydrateStepArguments(step.input, workflowRunId, encryptionKey, ops, globalThis, {}, process.env.VERCEL_DEPLOYMENT_ID);
128807
128894
  const durationMs = Date.now() - startTime;
128808
128895
  hydrateSpan == null ? void 0 : hydrateSpan.setAttributes({
128809
128896
  ...StepArgumentsCount(result2.args.length),
@@ -128833,6 +128920,7 @@ createQueueHandler("__wkf_step_", async (message_, metadata) => {
128833
128920
  // solution only works for vercel + local worlds.
128834
128921
  url: isVercel ? `https://${process.env.VERCEL_URL}` : `http://localhost:${port ?? 3e3}`
128835
128922
  },
128923
+ workflowDeploymentId: process.env.VERCEL_DEPLOYMENT_ID,
128836
128924
  ops,
128837
128925
  closureVars: hydratedInput.closureVars,
128838
128926
  encryptionKey
@@ -152422,7 +152510,7 @@ const route4 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProper
152422
152510
  __proto__: null,
152423
152511
  loader
152424
152512
  }, Symbol.toStringTag, { value: "Module" }));
152425
- const serverManifest = { "entry": { "module": "/assets/entry.client-BWsSsWQm.js", "imports": ["/assets/index-DQa-BExo.js"], "css": [] }, "routes": { "root": { "id": "root", "parentId": void 0, "path": "", "index": void 0, "caseSensitive": void 0, "hasAction": true, "hasLoader": true, "hasClientAction": false, "hasClientLoader": false, "hasClientMiddleware": false, "hasDefaultExport": true, "hasErrorBoundary": true, "module": "/assets/root-BzOKTpCh.js", "imports": ["/assets/index-DQa-BExo.js", "/assets/mermaid-3ZIDBTTL-Cr7OQX4b.js"], "css": ["/assets/root-aMfmV5uh.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-B9GhesEF.js", "imports": ["/assets/index-DQa-BExo.js", "/assets/workflow-graph-viewer-P4oMQJaV.js", "/assets/mermaid-3ZIDBTTL-Cr7OQX4b.js"], "css": ["/assets/workflow-graph-viewer-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-CRqjlzw9.js", "imports": ["/assets/index-DQa-BExo.js", "/assets/workflow-graph-viewer-P4oMQJaV.js", "/assets/mermaid-3ZIDBTTL-Cr7OQX4b.js", "/assets/encryption-80GMP4r0.js"], "css": ["/assets/workflow-graph-viewer-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-830d5c7d.js", "version": "830d5c7d", "sri": void 0 };
152513
+ const serverManifest = { "entry": { "module": "/assets/entry.client-BWsSsWQm.js", "imports": ["/assets/index-DQa-BExo.js"], "css": [] }, "routes": { "root": { "id": "root", "parentId": void 0, "path": "", "index": void 0, "caseSensitive": void 0, "hasAction": true, "hasLoader": true, "hasClientAction": false, "hasClientLoader": false, "hasClientMiddleware": false, "hasDefaultExport": true, "hasErrorBoundary": true, "module": "/assets/root--_OYilvb.js", "imports": ["/assets/index-DQa-BExo.js", "/assets/mermaid-3ZIDBTTL-CjHrXABH.js"], "css": ["/assets/root-aMfmV5uh.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-D6JmZfUp.js", "imports": ["/assets/index-DQa-BExo.js", "/assets/workflow-graph-viewer-BNsGQIfR.js", "/assets/mermaid-3ZIDBTTL-CjHrXABH.js"], "css": ["/assets/workflow-graph-viewer-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-BeA7fQfA.js", "imports": ["/assets/index-DQa-BExo.js", "/assets/workflow-graph-viewer-BNsGQIfR.js", "/assets/mermaid-3ZIDBTTL-CjHrXABH.js", "/assets/encryption-5eom23r0.js"], "css": ["/assets/workflow-graph-viewer-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-3243993f.js", "version": "3243993f", "sri": void 0 };
152426
152514
  const assetsBuildDirectory = "build/client";
152427
152515
  const basename = "/";
152428
152516
  const future = { "unstable_optimizeDeps": false, "unstable_subResourceIntegrity": false, "unstable_trailingSlashAwareDataRequests": false, "unstable_previewServerPrerendering": false, "v8_middleware": false, "v8_splitRouteModules": false, "v8_viteEnvironmentApi": false };
@@ -1,5 +1,5 @@
1
- import { g as getDefaultExportFromCjs } from "./app-CthB1gsr.js";
2
- import { F as requireTokenError, C as requireTokenUtil } from "./server-build-DBNmVwSJ.js";
1
+ import { g as getDefaultExportFromCjs } from "./app-Bw7CxKyr.js";
2
+ import { F as requireTokenError, C as requireTokenUtil } from "./server-build-BBm5-YMr.js";
3
3
  function _mergeNamespaces(n, m) {
4
4
  for (var i = 0; i < m.length; i++) {
5
5
  const e = m[i];
@@ -1,5 +1,5 @@
1
- import { g as getDefaultExportFromCjs } from "./app-CthB1gsr.js";
2
- import { C as requireTokenUtil } from "./server-build-DBNmVwSJ.js";
1
+ import { g as getDefaultExportFromCjs } from "./app-Bw7CxKyr.js";
2
+ import { C as requireTokenUtil } from "./server-build-BBm5-YMr.js";
3
3
  function _mergeNamespaces(n, m) {
4
4
  for (var i = 0; i < m.length; i++) {
5
5
  const e = m[i];
@@ -1,4 +1,4 @@
1
- import { n } from "./assets/app-CthB1gsr.js";
1
+ import { n } from "./assets/app-Bw7CxKyr.js";
2
2
  import "express";
3
3
  import "stream";
4
4
  export {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@workflow/web",
3
3
  "description": "Workflow Observability UI",
4
- "version": "4.1.7",
4
+ "version": "4.1.8",
5
5
  "type": "module",
6
6
  "private": false,
7
7
  "files": [
@@ -71,12 +71,12 @@
71
71
  "vite": "^6",
72
72
  "vitest": "^3",
73
73
  "jsdom": "^26",
74
- "@workflow/core": "4.2.6",
75
- "@workflow/errors": "4.1.2",
74
+ "@workflow/core": "4.3.0",
75
+ "@workflow/errors": "4.1.3",
76
76
  "@workflow/utils": "4.1.2",
77
- "@workflow/web-shared": "4.1.7",
78
- "@workflow/world": "4.1.3",
79
- "@workflow/world-vercel": "4.3.0"
77
+ "@workflow/web-shared": "4.1.8",
78
+ "@workflow/world": "4.1.4",
79
+ "@workflow/world-vercel": "4.3.1"
80
80
  },
81
81
  "scripts": {
82
82
  "dev": "react-router dev",