@workflow/web 5.0.0-beta.28 → 5.0.0-beta.29

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.
Files changed (28) hide show
  1. package/build/client/assets/arrow-up-right-nUJMbeWN.js +15 -0
  2. package/build/client/assets/{encryption-BQTnudEZ.js → encryption-CLVP4klT.js} +2 -2
  3. package/build/client/assets/{entry.client-DQZ2hM2V.js → entry.client-Q4eUIqMI.js} +1 -1
  4. package/build/client/assets/{highlighted-body-B3W2YXNL-CQ-a-eYE.js → highlighted-body-B3W2YXNL-_4bJAUnT.js} +2 -2
  5. package/build/client/assets/{home-DuZRFOMe.js → home-W4Ja_rr1.js} +4 -4
  6. package/build/client/assets/{index-BXZSIDEp.js → index-Q81MFBxC.js} +22 -22
  7. package/build/client/assets/{index-ConSkUmc.js → index-STTN0-2V.js} +1 -1
  8. package/build/client/assets/manifest-56b6d9e0.js +1 -0
  9. package/build/client/assets/{mermaid-3ZIDBTTL-QcES6x1o.js → mermaid-3ZIDBTTL-BfwKRFTU.js} +33 -9
  10. package/build/client/assets/{root-BiHTsCtP.js → root-DOkL1_-J.js} +5 -15
  11. package/build/client/assets/root-okIQN2A_.css +1 -0
  12. package/build/client/assets/{run-detail-DSpZ5dnN.js → run-detail-CRleiBxx.js} +68 -98
  13. package/build/client/assets/server-build-H39y96IB.css +1 -0
  14. package/build/client/assets/{workflow-graph-viewer-CyKfZJOQ.js → workflow-graph-viewer-CvsdACR5.js} +3 -3
  15. package/build/client/assets/{zstd-browser-decoder-BigjGoI1.js → zstd-browser-decoder-bX851D8O.js} +2 -2
  16. package/build/server/assets/{app-Cl6-bhGd.js → app-jsOjV9W7.js} +1 -1
  17. package/build/server/assets/{highlighted-body-B3W2YXNL-Daljn6fi.js → highlighted-body-B3W2YXNL-DpTmbI4L.js} +2 -2
  18. package/build/server/assets/{index-B_N7SdQh.js → index-CJPCT6Jd.js} +3 -3
  19. package/build/server/assets/{mermaid-3ZIDBTTL-xnUhfFrD.js → mermaid-3ZIDBTTL-Dl6hRpcE.js} +2 -2
  20. package/build/server/assets/{server-build-D5Nuwxaw.js → server-build-BRxoSdNU.js} +431 -192
  21. package/build/server/assets/{token-DDgfwjzz.js → token-BqP-cpRD.js} +2 -2
  22. package/build/server/assets/{token-util-CthtfGuG.js → token-util-DaPlIe_a.js} +2 -2
  23. package/build/server/assets/{zstd-browser-decoder-zp5ZpR7T.js → zstd-browser-decoder-Cyb8--z9.js} +2 -2
  24. package/build/server/index.js +1 -1
  25. package/package.json +6 -6
  26. package/build/client/assets/manifest-bb838d97.js +0 -1
  27. package/build/client/assets/root-BT69a3LD.css +0 -1
  28. package/build/client/assets/server-build-BkKXPNcO.css +0 -1
@@ -18,7 +18,7 @@ import { createRequire as __wkfCreateRequire } from "node:module";
18
18
  if (typeof require === "undefined") {
19
19
  globalThis.require = __wkfCreateRequire(import.meta.url);
20
20
  }
21
- import { a as requireReact, S as ServerRouter, c as createReadableStreamFromReadable, r as reactExports, g as getDefaultExportFromCjs, R as React, b as ReactExports, w as withComponentProps, d as withErrorBoundaryProps, M as Meta, L as Links, e as ScrollRestoration, f as Scripts, O as Outlet, u as useNavigate, h as useSearchParams, i as Link$1, j as useRouteError, k as isRouteErrorResponse, l as useLocation, m as useParams } from "./app-Cl6-bhGd.js";
21
+ import { a as requireReact, S as ServerRouter, c as createReadableStreamFromReadable, r as reactExports, g as getDefaultExportFromCjs, R as React, b as ReactExports, w as withComponentProps, d as withErrorBoundaryProps, M as Meta, L as Links, e as ScrollRestoration, f as Scripts, O as Outlet, u as useNavigate, h as useSearchParams, i as Link$1, j as useRouteError, k as isRouteErrorResponse, l as useLocation, m as useParams } from "./app-jsOjV9W7.js";
22
22
  import require$$0$4, { PassThrough } from "node:stream";
23
23
  import require$$0 from "util";
24
24
  import require$$1 from "crypto";
@@ -48922,6 +48922,22 @@ const BaseEventSchema = object$1({
48922
48922
  correlationId: string$3().optional(),
48923
48923
  specVersion: number$3().optional()
48924
48924
  });
48925
+ const stepLatencyTelemetryFields = {
48926
+ // Time-to-first-step: milliseconds from run creation until the run's first
48927
+ // step body began executing, minus time spent committing hook_created
48928
+ // events. Only reported when nothing else (hooks received, waits,
48929
+ // attributes, other steps) happened before the first step.
48930
+ ttfs: number$3().optional(),
48931
+ // Step-to-step overhead: milliseconds between the previous step's terminal
48932
+ // event and this step's body beginning to execute. Only reported when the
48933
+ // two steps ran back-to-back (the previous event-log entry is a
48934
+ // step_completed/step_failed).
48935
+ stso: number$3().optional(),
48936
+ // Names of the runtime's optional startup-latency optimizations that were
48937
+ // active for this measurement (e.g. 'turbo', 'lazyStepStart',
48938
+ // 'optimisticStart'), so latency metrics can be segmented by them.
48939
+ optimizations: array$1(string$3()).optional()
48940
+ };
48925
48941
  const StepCompletedEventSchema = BaseEventSchema.extend({
48926
48942
  eventType: literal("step_completed"),
48927
48943
  correlationId: string$3(),
@@ -48931,7 +48947,8 @@ const StepCompletedEventSchema = BaseEventSchema.extend({
48931
48947
  // the key without an extra run lookup on this hot per-step write.
48932
48948
  // Optional: older runtimes omit it and the backend falls back to a read.
48933
48949
  workflowName: string$3().optional(),
48934
- result: SerializedDataSchema
48950
+ result: SerializedDataSchema,
48951
+ ...stepLatencyTelemetryFields
48935
48952
  })
48936
48953
  });
48937
48954
  const StepFailedEventSchema = BaseEventSchema.extend({
@@ -48941,7 +48958,8 @@ const StepFailedEventSchema = BaseEventSchema.extend({
48941
48958
  stepName: string$3().optional(),
48942
48959
  // The thrown value, serialized via the workflow serialization pipeline.
48943
48960
  // Can be any JavaScript value (string, number, object, Error, etc.)
48944
- error: SerializedDataSchema
48961
+ error: SerializedDataSchema,
48962
+ ...stepLatencyTelemetryFields
48945
48963
  })
48946
48964
  });
48947
48965
  const StepRetryingEventSchema = BaseEventSchema.extend({
@@ -49088,7 +49106,13 @@ const RunFailedEventSchema = BaseEventSchema.extend({
49088
49106
  })
49089
49107
  });
49090
49108
  const RunCancelledEventSchema = BaseEventSchema.extend({
49091
- eventType: literal("run_cancelled")
49109
+ eventType: literal("run_cancelled"),
49110
+ eventData: object$1({
49111
+ // Optional free-text reason for the cancellation. Kept as small
49112
+ // plaintext metadata (like run_failed's errorCode) so it survives
49113
+ // resolveData: 'none' and can be displayed without decryption.
49114
+ cancelReason: string$3().max(512).optional()
49115
+ }).optional()
49092
49116
  });
49093
49117
  discriminatedUnion("eventType", [
49094
49118
  // Run lifecycle events
@@ -50064,7 +50088,7 @@ function replaceEncryptedAndExpiredWithMarkers(resource) {
50064
50088
  }
50065
50089
  async function hydrateResourceIOAsync(resource, key) {
50066
50090
  const { hydrateDataWithKey: hydrateDataWithKey2 } = await Promise.resolve().then(() => serializationFormat);
50067
- const { ensureZstdDecoderRegistered } = await import("./zstd-browser-decoder-zp5ZpR7T.js");
50091
+ const { ensureZstdDecoderRegistered } = await import("./zstd-browser-decoder-Cyb8--z9.js");
50068
50092
  ensureZstdDecoderRegistered();
50069
50093
  const cryptoKey = key ? await Promise.resolve().then(() => encryption).then(({ importKey: importKey2 }) => importKey2(key)) : void 0;
50070
50094
  const revivers = getRevivers();
@@ -52346,7 +52370,7 @@ function CopyableDataBlock({ data }) {
52346
52370
  function isReservedAttributeKey(key) {
52347
52371
  return key.startsWith(RESERVED_ATTRIBUTE_KEY_PREFIX);
52348
52372
  }
52349
- const rowValueVariants = cva("max-w-[60%] truncate text-right text-copy-13 text-gray-1000", {
52373
+ const rowValueVariants = cva("min-w-0 flex-1 truncate text-right text-copy-13 text-gray-1000", {
52350
52374
  variants: {
52351
52375
  variant: {
52352
52376
  default: "",
@@ -52357,7 +52381,7 @@ const rowValueVariants = cva("max-w-[60%] truncate text-right text-copy-13 text-
52357
52381
  variant: "default"
52358
52382
  }
52359
52383
  });
52360
- const rowCopyValueVariants = cva("flex min-w-0 max-w-[60%] items-center justify-end gap-1 text-copy-13 text-gray-1000", {
52384
+ const rowCopyValueVariants = cva("flex min-w-0 flex-1 items-center justify-end gap-1 text-copy-13 text-gray-1000", {
52361
52385
  variants: {
52362
52386
  variant: {
52363
52387
  default: "",
@@ -52368,9 +52392,9 @@ const rowCopyValueVariants = cva("flex min-w-0 max-w-[60%] items-center justify-
52368
52392
  variant: "default"
52369
52393
  }
52370
52394
  });
52371
- function DetailKeyValueRowBase({ label, value, copyText, removed = false, variant }) {
52395
+ function DetailKeyValueRowBase({ label, value, copyText, href, removed = false, variant }) {
52372
52396
  const stringValue = typeof value === "string" ? value : void 0;
52373
- return jsxRuntimeExports.jsxs("div", { className: "px-1.5 hover:bg-gray-100 flex justify-between gap-3 -mx-1.5 py-0.5 rounded items-center", children: [jsxRuntimeExports.jsx("span", { className: "flex min-w-0 items-center gap-1.5 truncate text-label-13 text-gray-900", children: label }), removed ? jsxRuntimeExports.jsx("span", { className: "shrink-0 text-copy-13 italic text-gray-700", children: "removed" }) : copyText ? jsxRuntimeExports.jsxs("div", { className: cn$4(rowCopyValueVariants({ variant })), title: copyText, children: [jsxRuntimeExports.jsx(MiddleTruncate, { value: copyText, className: cn$4(rowValueVariants({ variant, className: "text-right" })), style: { gridTemplateColumns: "minmax(0, 1fr)" } }), jsxRuntimeExports.jsx(CopyButton, { copyText, ariaLabel: `Copy ${label}`, className: "shrink-0 -mr-1" })] }) : jsxRuntimeExports.jsx("span", { className: cn$4(rowValueVariants({ variant })), title: stringValue, children: value })] });
52397
+ return jsxRuntimeExports.jsxs("div", { className: "px-1.5 hover:bg-gray-100 flex justify-between gap-3 -mx-1.5 py-0.5 rounded items-center", children: [jsxRuntimeExports.jsx("span", { className: "flex min-w-0 items-center gap-1.5 truncate text-label-13 text-gray-900", children: label }), removed ? jsxRuntimeExports.jsx("span", { className: "shrink-0 text-copy-13 italic text-gray-700", children: "removed" }) : copyText ? jsxRuntimeExports.jsxs("div", { className: cn$4(rowCopyValueVariants({ variant })), title: copyText, children: [href ? jsxRuntimeExports.jsxs("a", { href, target: "_blank", rel: "noreferrer", className: cn$4(rowValueVariants({ variant }), "flex min-w-0 items-center gap-0.5 hover:underline"), children: [jsxRuntimeExports.jsx(MiddleTruncate, { value: copyText, className: "min-w-0 text-right", style: { gridTemplateColumns: "minmax(0, 1fr)" } }), jsxRuntimeExports.jsx(ArrowUpRight, { "aria-hidden": true, className: "h-3 w-3 shrink-0" })] }) : jsxRuntimeExports.jsx(MiddleTruncate, { value: copyText, className: cn$4(rowValueVariants({ variant, className: "text-right" })), style: { gridTemplateColumns: "minmax(0, 1fr)" } }), jsxRuntimeExports.jsx(CopyButton, { copyText, ariaLabel: `Copy ${label}`, className: "shrink-0 -mr-1" })] }) : jsxRuntimeExports.jsx("span", { className: cn$4(rowValueVariants({ variant })), title: stringValue, children: href ? jsxRuntimeExports.jsx("a", { href, target: "_blank", rel: "noreferrer", className: "hover:underline", children: value }) : value })] });
52374
52398
  }
52375
52399
  function DetailKeyValueRow(props) {
52376
52400
  return jsxRuntimeExports.jsx(DetailKeyValueRowBase, { ...props });
@@ -53667,6 +53691,12 @@ function PayloadBlock({ data, eventType }) {
53667
53691
  if (eventType === "attr_set") {
53668
53692
  return jsxRuntimeExports.jsx(AttrSetEventBlock, { data: cleaned });
53669
53693
  }
53694
+ if (eventType === "run_cancelled") {
53695
+ const cancelReason = cleaned != null && typeof cleaned === "object" && typeof cleaned.cancelReason === "string" ? cleaned.cancelReason : null;
53696
+ if (cancelReason) {
53697
+ return jsxRuntimeExports.jsxs("div", { className: "p-2 text-xs", style: { color: "var(--ds-gray-1000)" }, children: [jsxRuntimeExports.jsx("span", { style: { color: "var(--ds-gray-900)" }, children: "Reason: " }), jsxRuntimeExports.jsx("span", { className: "whitespace-pre-wrap break-words", children: cancelReason })] });
53698
+ }
53699
+ }
53670
53700
  return jsxRuntimeExports.jsxs("div", { className: "relative group/payload", children: [jsxRuntimeExports.jsx("div", { className: "overflow-x-auto p-2 text-[11px]", style: { color: "var(--ds-gray-1000)" }, children: jsxRuntimeExports.jsx(DataInspector, { data: cleaned, expandLevel: 2 }) }), jsxRuntimeExports.jsx("button", { type: "button", onClick: handleCopy, className: "absolute bottom-2 right-2 opacity-0 group-hover/payload:opacity-100 transition-opacity flex items-center gap-1 px-2 py-1 rounded-md text-xs hover:bg-[var(--ds-gray-alpha-200)]", style: { ...BUTTON_RESET_STYLE, color: "var(--ds-gray-700)" }, "aria-label": "Copy payload", children: copied ? jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [jsxRuntimeExports.jsx(Check, { className: "h-3 w-3", style: { color: "var(--ds-green-700)" } }), jsxRuntimeExports.jsx("span", { style: { color: "var(--ds-green-700)" }, children: "Copied" })] }) : jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [jsxRuntimeExports.jsx(Copy, { className: "h-3 w-3" }), jsxRuntimeExports.jsx("span", { children: "Copy" })] }) })] });
53671
53701
  }
53672
53702
  const SORT_OPTIONS = [
@@ -83026,7 +83056,7 @@ var tn = f("block", "before:content-[counter(line)]", "before:inline-block", "be
83026
83056
  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 });
83027
83057
  var Se = reactExports.createContext({ code: "" }), de = () => reactExports.useContext(Se);
83028
83058
  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 }) });
83029
- var cn$1 = /\n+$/, dn = reactExports.lazy(() => import("./highlighted-body-B3W2YXNL-Daljn6fi.js").then((e) => ({ default: e.HighlightedCodeBlockBody }))), rt = ({ code: e, language: t, className: o, children: n, isIncomplete: s2 = false, ...r2 }) => {
83059
+ var cn$1 = /\n+$/, dn = reactExports.lazy(() => import("./highlighted-body-B3W2YXNL-DpTmbI4L.js").then((e) => ({ default: e.HighlightedCodeBlockBody }))), rt = ({ code: e, language: t, className: o, children: n, isIncomplete: s2 = false, ...r2 }) => {
83030
83060
  let i = reactExports.useMemo(() => e.replace(cn$1, ""), [e]), c = reactExports.useMemo(() => ({ bg: "transparent", fg: "inherit", tokens: i.split(`
83031
83061
  `).map((a2) => [{ content: a2, color: "inherit", bgColor: "transparent", htmlStyle: {}, offset: 0 }]) }), [i]);
83032
83062
  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 }) })] }) });
@@ -83348,7 +83378,7 @@ var Dt = ({ children: e, className: t, onDownload: o, onError: n }) => {
83348
83378
  }, []), 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] });
83349
83379
  };
83350
83380
  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 }) })] });
83351
- var Jn = reactExports.lazy(() => import("./mermaid-3ZIDBTTL-xnUhfFrD.js").then((e) => ({ default: e.Mermaid }))), Kn = /language-([^\s]+)/;
83381
+ var Jn = reactExports.lazy(() => import("./mermaid-3ZIDBTTL-Dl6hRpcE.js").then((e) => ({ default: e.Mermaid }))), Kn = /language-([^\s]+)/;
83352
83382
  function ke(e, t) {
83353
83383
  if (!(e != null && e.position || t != null && t.position)) return true;
83354
83384
  if (!(e != null && e.position && (t != null && t.position))) return false;
@@ -83933,9 +83963,9 @@ const conversationTabs = [
83933
83963
  { id: "conversation", label: "Conversation" },
83934
83964
  { id: "json", label: "Raw JSON" }
83935
83965
  ];
83936
- function ConversationWithTabs({ conversation, args }) {
83966
+ function ConversationWithTabs({ conversation, args, defaultOpen, onOpenChange }) {
83937
83967
  const [activeTab, setActiveTab] = reactExports.useState("conversation");
83938
- return jsxRuntimeExports.jsx(Collapsible, { label: "Input", children: jsxRuntimeExports.jsx(TabbedContainer, { tabs: conversationTabs, activeTab, onTabChange: setActiveTab, ariaLabel: "Conversation view", children: activeTab === "conversation" ? jsxRuntimeExports.jsx(ConversationView, { messages: conversation }) : jsxRuntimeExports.jsx("div", { className: "p-3", children: Array.isArray(args) ? args.map((v2, i) => jsxRuntimeExports.jsx("div", { className: "mt-2 first:mt-0", children: JsonBlock(v2) }, i)) : JsonBlock(args) }) }) });
83968
+ return jsxRuntimeExports.jsx(Collapsible, { label: "Input", defaultOpen, onOpenChange, children: jsxRuntimeExports.jsx(TabbedContainer, { tabs: conversationTabs, activeTab, onTabChange: setActiveTab, ariaLabel: "Conversation view", children: activeTab === "conversation" ? jsxRuntimeExports.jsx(ConversationView, { messages: conversation }) : jsxRuntimeExports.jsx("div", { className: "p-3", children: Array.isArray(args) ? args.map((v2, i) => jsxRuntimeExports.jsx("div", { className: "mt-2 first:mt-0", children: JsonBlock(v2) }, i)) : JsonBlock(args) }) }) });
83939
83969
  }
83940
83970
  function EncryptedFieldBlock() {
83941
83971
  return jsxRuntimeExports.jsx(EncryptedDataBlock, {});
@@ -84137,7 +84167,7 @@ const attributeToDisplayFn = {
84137
84167
  },
84138
84168
  input: (value, context) => {
84139
84169
  if (isEncryptedMarker$1(value)) {
84140
- return jsxRuntimeExports.jsx(Collapsible, { label: "Input", children: jsxRuntimeExports.jsx(EncryptedFieldBlock, {}) });
84170
+ return jsxRuntimeExports.jsx(Collapsible, { label: "Input", defaultOpen: context == null ? void 0 : context.sectionOpen, onOpenChange: context == null ? void 0 : context.onSectionOpenChange, children: jsxRuntimeExports.jsx(EncryptedFieldBlock, {}) });
84141
84171
  }
84142
84172
  if (isExpiredMarker(value))
84143
84173
  return jsxRuntimeExports.jsx(ExpiredFieldBlock, {});
@@ -84149,28 +84179,28 @@ const attributeToDisplayFn = {
84149
84179
  if ((context == null ? void 0 : context.stepName) && isDoStreamStep(context.stepName)) {
84150
84180
  const conversation = extractConversation(args);
84151
84181
  if (conversation && conversation.length > 0) {
84152
- return jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [jsxRuntimeExports.jsx(ConversationWithTabs, { conversation, args }), hasClosureVars && jsxRuntimeExports.jsx(Collapsible, { label: "Closure Variables", children: JsonBlock(closureVars) }), hasThisVal && jsxRuntimeExports.jsx(Collapsible, { label: "This Value", children: JsonBlock(thisVal) })] });
84182
+ return jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [jsxRuntimeExports.jsx(ConversationWithTabs, { conversation, args, defaultOpen: context == null ? void 0 : context.sectionOpen, onOpenChange: context == null ? void 0 : context.onSectionOpenChange }), hasClosureVars && jsxRuntimeExports.jsx(Collapsible, { label: "Closure Variables", children: JsonBlock(closureVars) }), hasThisVal && jsxRuntimeExports.jsx(Collapsible, { label: "This Value", children: JsonBlock(thisVal) })] });
84153
84183
  }
84154
84184
  }
84155
84185
  if (!hasArgs && !hasClosureVars && !hasThisVal) {
84156
84186
  return jsxRuntimeExports.jsx(Collapsible, { label: "Input (no data)", disabled: true });
84157
84187
  }
84158
- return jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [jsxRuntimeExports.jsx(Collapsible, { label: "Input", children: Array.isArray(args) ? args.map((v2, i) => jsxRuntimeExports.jsx("div", { className: "mt-2 first:mt-0", children: JsonBlock(v2) }, i)) : JsonBlock(args) }), hasClosureVars && jsxRuntimeExports.jsx(Collapsible, { label: "Closure Variables", children: JsonBlock(closureVars) }), hasThisVal && jsxRuntimeExports.jsx(Collapsible, { label: "Context", children: JsonBlock(thisVal) })] });
84188
+ return jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [jsxRuntimeExports.jsx(Collapsible, { label: "Input", defaultOpen: context == null ? void 0 : context.sectionOpen, onOpenChange: context == null ? void 0 : context.onSectionOpenChange, children: Array.isArray(args) ? args.map((v2, i) => jsxRuntimeExports.jsx("div", { className: "mt-2 first:mt-0", children: JsonBlock(v2) }, i)) : JsonBlock(args) }), hasClosureVars && jsxRuntimeExports.jsx(Collapsible, { label: "Closure Variables", children: JsonBlock(closureVars) }), hasThisVal && jsxRuntimeExports.jsx(Collapsible, { label: "Context", children: JsonBlock(thisVal) })] });
84159
84189
  }
84160
84190
  if (!hasDisplayContent(value)) {
84161
84191
  return jsxRuntimeExports.jsx(Collapsible, { label: "Input (no data)", disabled: true });
84162
84192
  }
84163
- return jsxRuntimeExports.jsx(Collapsible, { label: "Input", children: Array.isArray(value) ? value.map((v2, i) => jsxRuntimeExports.jsx("div", { className: "mt-2 first:mt-0", children: JsonBlock(v2) }, i)) : JsonBlock(value) });
84193
+ return jsxRuntimeExports.jsx(Collapsible, { label: "Input", defaultOpen: context == null ? void 0 : context.sectionOpen, onOpenChange: context == null ? void 0 : context.onSectionOpenChange, children: Array.isArray(value) ? value.map((v2, i) => jsxRuntimeExports.jsx("div", { className: "mt-2 first:mt-0", children: JsonBlock(v2) }, i)) : JsonBlock(value) });
84164
84194
  },
84165
- output: (value) => {
84195
+ output: (value, context) => {
84166
84196
  if (isEncryptedMarker$1(value)) {
84167
- return jsxRuntimeExports.jsx(Collapsible, { label: "Output", children: jsxRuntimeExports.jsx(EncryptedFieldBlock, {}) });
84197
+ return jsxRuntimeExports.jsx(Collapsible, { label: "Output", defaultOpen: context == null ? void 0 : context.sectionOpen, onOpenChange: context == null ? void 0 : context.onSectionOpenChange, children: jsxRuntimeExports.jsx(EncryptedFieldBlock, {}) });
84168
84198
  }
84169
84199
  if (!hasDisplayContent(value))
84170
84200
  return null;
84171
84201
  if (isExpiredMarker(value))
84172
84202
  return jsxRuntimeExports.jsx(ExpiredFieldBlock, {});
84173
- return jsxRuntimeExports.jsx(Collapsible, { label: "Output", children: JsonBlock(value) });
84203
+ return jsxRuntimeExports.jsx(Collapsible, { label: "Output", defaultOpen: context == null ? void 0 : context.sectionOpen, onOpenChange: context == null ? void 0 : context.onSectionOpenChange, children: JsonBlock(value) });
84174
84204
  },
84175
84205
  error: (value) => {
84176
84206
  if (isEncryptedMarker$1(value)) {
@@ -84229,13 +84259,21 @@ const copyableBasicAttributes = /* @__PURE__ */ new Set([
84229
84259
  "deploymentId",
84230
84260
  "moduleSpecifier"
84231
84261
  ]);
84262
+ const loadingSectionLabels = {
84263
+ input: "Input",
84264
+ output: "Output",
84265
+ eventData: "Event Data"
84266
+ };
84232
84267
  const AttributeBlock = ({ attribute, value, isLoading, inline = false, context }) => {
84233
84268
  const decryptCtx = reactExports.useContext(DecryptClickContext);
84234
- const isExpandableLoadingTarget = attribute === "input" || attribute === "output" || attribute === "eventData";
84235
- if (isLoading && isExpandableLoadingTarget && !hasDisplayContent(value)) {
84236
- const label = attribute === "eventData" ? "Event Data" : attribute === "output" ? "Output" : "Input";
84269
+ const sectionOpenRef = reactExports.useRef(false);
84270
+ const handleSectionOpenChange = reactExports.useCallback((open) => {
84271
+ sectionOpenRef.current = open;
84272
+ }, []);
84273
+ const label = loadingSectionLabels[attribute];
84274
+ if (isLoading && label && !hasDisplayContent(value)) {
84237
84275
  if (decryptCtx == null ? void 0 : decryptCtx.hasEncryptedData) {
84238
- return jsxRuntimeExports.jsx(Collapsible, { label, defaultOpen: attribute === "eventData", children: jsxRuntimeExports.jsx(EncryptedFieldBlock, {}) });
84276
+ return jsxRuntimeExports.jsx(Collapsible, { label, defaultOpen: attribute === "eventData" || sectionOpenRef.current, onOpenChange: handleSectionOpenChange, children: jsxRuntimeExports.jsx(EncryptedFieldBlock, {}) });
84239
84277
  }
84240
84278
  return jsxRuntimeExports.jsx(Collapsible, { label });
84241
84279
  }
@@ -84243,7 +84281,11 @@ const AttributeBlock = ({ attribute, value, isLoading, inline = false, context }
84243
84281
  if (!displayFn) {
84244
84282
  return null;
84245
84283
  }
84246
- const displayValue = displayFn(value, context);
84284
+ const displayValue = displayFn(value, {
84285
+ ...context,
84286
+ sectionOpen: sectionOpenRef.current,
84287
+ onSectionOpenChange: handleSectionOpenChange
84288
+ });
84247
84289
  if (!displayValue) {
84248
84290
  return null;
84249
84291
  }
@@ -84255,7 +84297,7 @@ const AttributeBlock = ({ attribute, value, isLoading, inline = false, context }
84255
84297
  }
84256
84298
  return jsxRuntimeExports.jsxs("div", { className: "relative", children: [typeof isLoading === "boolean" && isLoading && jsxRuntimeExports.jsx("div", { className: "absolute top-9 right-4", children: jsxRuntimeExports.jsx("div", { className: "animate-spin rounded-full h-4 w-4 border-b-2", style: { borderColor: "var(--ds-gray-900)" } }) }), jsxRuntimeExports.jsxs("div", { className: "my-2 flex flex-col gap-0", children: [jsxRuntimeExports.jsx("span", { className: "text-label-14 text-gray-1000 font-medium first-letter:uppercase", children: attribute }), jsxRuntimeExports.jsx("span", { className: "text-xs", style: { color: "var(--ds-gray-1000)" }, children: displayValue })] }, attribute)] });
84257
84299
  };
84258
- const AttributePanel = ({ data, moduleSpecifier, isLoading, error: error2, expiredAt, onStreamClick, onRunClick, onDecrypt, isDecrypting = false, resource }) => {
84300
+ const AttributePanel = ({ data, moduleSpecifier, moduleSourceUrl, isLoading, error: error2, expiredAt, onStreamClick, onRunClick, onDecrypt, isDecrypting = false, resource }) => {
84259
84301
  const displayData = reactExports.useMemo(() => {
84260
84302
  const result = { ...data };
84261
84303
  const execCtx = data.executionContext;
@@ -84328,7 +84370,7 @@ const AttributePanel = ({ data, moduleSpecifier, isLoading, error: error2, expir
84328
84370
  const displayValue = (_a3 = attributeToDisplayFn[attribute]) == null ? void 0 : _a3.call(attributeToDisplayFn, displayData[attribute]);
84329
84371
  const isCopyableBasicAttribute = copyableBasicAttributes.has(attribute) && typeof displayValue === "string";
84330
84372
  const label = getAttributeDisplayName(attribute);
84331
- return jsxRuntimeExports.jsx(DetailMonoKeyValueRow, { label, value: displayValue, copyText: isCopyableBasicAttribute ? displayValue : void 0 }, attribute);
84373
+ return jsxRuntimeExports.jsx(DetailMonoKeyValueRow, { label, value: displayValue, copyText: isCopyableBasicAttribute ? displayValue : void 0, href: attribute === "moduleSpecifier" ? moduleSourceUrl : void 0 }, attribute);
84332
84374
  }), isLoading && resource === "sleep" && !displayData.resumeAt && jsxRuntimeExports.jsxs("div", { className: "flex items-center justify-between gap-3 py-0.5", children: [jsxRuntimeExports.jsx("span", { className: "text-label-13 text-gray-900", children: "Resume" }), jsxRuntimeExports.jsx(Skeleton$2, { className: "h-4 w-[55%]" })] })] }) })] }), error2 ? jsxRuntimeExports.jsx(ErrorCard, { title: "Failed to load resource details", details: error2.message, className: "my-4" }) : hasExpired ? jsxRuntimeExports.jsx(ExpiredDataMessage, {}) : resolvedAttributes.length > 0 ? resolvedAttributes.map((attribute) => jsxRuntimeExports.jsx(AttributeBlock, { isLoading, attribute, value: displayData[attribute], context: displayContext }, attribute)) : null] }) }) }) });
84333
84375
  };
84334
84376
  const ERROR_EVENT_TYPES = /* @__PURE__ */ new Set(["step_failed", "step_retrying"]);
@@ -84624,7 +84666,7 @@ function useSelectedSpanDetail(selectedSpan, fetchSpanDetail) {
84624
84666
  function isHook(data) {
84625
84667
  return data !== null && typeof data === "object" && "hookId" in data;
84626
84668
  }
84627
- function EntityDetailPanel({ run: run2, onStreamClick, onRunClick, fetchSpanDetail, onWakeUpSleep, onLoadEventData, onResolveHook, encryptionKey, onDecrypt, isDecrypting = false, selectedSpan, showSeparateEventOccurrenceTimestamps = false }) {
84669
+ function EntityDetailPanel({ run: run2, onStreamClick, onRunClick, fetchSpanDetail, onWakeUpSleep, onLoadEventData, onResolveHook, encryptionKey, onDecrypt, isDecrypting = false, selectedSpan, showSeparateEventOccurrenceTimestamps = false, getModuleSourceUrl }) {
84628
84670
  const toast2 = useToast();
84629
84671
  const [stoppingSleep, setStoppingSleep] = reactExports.useState(false);
84630
84672
  const [showResolveHookModal, setShowResolveHookModal] = reactExports.useState(false);
@@ -84768,6 +84810,18 @@ function EntityDetailPanel({ run: run2, onStreamClick, onRunClick, fetchSpanDeta
84768
84810
  }
84769
84811
  return void 0;
84770
84812
  }, [displayData, run2.workflowName]);
84813
+ const moduleSourceUrl = reactExports.useMemo(() => {
84814
+ if (!getModuleSourceUrl || !moduleSpecifier)
84815
+ return void 0;
84816
+ const parsed = parseStepName(moduleSpecifier) ?? parseWorkflowName(moduleSpecifier);
84817
+ if (!parsed)
84818
+ return void 0;
84819
+ const dataDeploymentId = displayData.deploymentId;
84820
+ return getModuleSourceUrl({
84821
+ moduleSpecifier: parsed.moduleSpecifier,
84822
+ deploymentId: typeof dataDeploymentId === "string" ? dataDeploymentId : run2.deploymentId
84823
+ });
84824
+ }, [getModuleSourceUrl, moduleSpecifier, displayData, run2.deploymentId]);
84771
84825
  if (!selectedSpan || !resource || !resourceId) {
84772
84826
  return null;
84773
84827
  }
@@ -84781,7 +84835,7 @@ function EntityDetailPanel({ run: run2, onStreamClick, onRunClick, fetchSpanDeta
84781
84835
  }, children: [jsxRuntimeExports.jsx(Zap, { className: "h-4 w-4" }), stoppingSleep ? "Waking up..." : "Wake Up Sleep"] }), resource === "hook" && canResolveHook && jsxRuntimeExports.jsxs("button", { type: "button", onClick: () => setShowResolveHookModal(true), disabled: resolvingHook, className: clsx("flex items-center justify-center gap-2 rounded-md px-3 py-2 text-sm font-medium", "disabled:opacity-50 disabled:cursor-not-allowed transition-colors", resolvingHook ? "opacity-50 cursor-not-allowed" : "cursor-pointer"), style: {
84782
84836
  background: "var(--ds-gray-1000)",
84783
84837
  color: "var(--ds-background-100)"
84784
- }, children: [jsxRuntimeExports.jsx(Send, { className: "h-4 w-4" }), "Resolve Hook"] })] })] }), jsxRuntimeExports.jsx(AttributePanel, { data: displayData, moduleSpecifier, expiredAt: run2.expiredAt, isLoading: loading, error: error2 ?? void 0, onStreamClick, onRunClick, onDecrypt, isDecrypting, resource }), rawEvents && jsxRuntimeExports.jsx(EventsList, { events: rawEvents, onLoadEventData, onStreamClick, onRunClick, encryptionKey, showSeparateEventOccurrenceTimestamps })] }) }), jsxRuntimeExports.jsx(ResolveHookModal, { isOpen: showResolveHookModal, onClose: () => setShowResolveHookModal(false), onSubmit: handleResolveHook, isSubmitting: resolvingHook })] });
84838
+ }, children: [jsxRuntimeExports.jsx(Send, { className: "h-4 w-4" }), "Resolve Hook"] })] })] }), jsxRuntimeExports.jsx(AttributePanel, { data: displayData, moduleSpecifier, moduleSourceUrl, expiredAt: run2.expiredAt, isLoading: loading, error: error2 ?? void 0, onStreamClick, onRunClick, onDecrypt, isDecrypting, resource }), rawEvents && jsxRuntimeExports.jsx(EventsList, { events: rawEvents, onLoadEventData, onStreamClick, onRunClick, encryptionKey, showSeparateEventOccurrenceTimestamps })] }) }), jsxRuntimeExports.jsx(ResolveHookModal, { isOpen: showResolveHookModal, onClose: () => setShowResolveHookModal(false), onSubmit: handleResolveHook, isSubmitting: resolvingHook })] });
84785
84839
  }
84786
84840
  const MAP_HEIGHT = 56;
84787
84841
  const TIMELINE_PADDING = 8;
@@ -86424,7 +86478,7 @@ function TraceDetailPanel({ containerRef, onNavigateToSpan, onClose }) {
86424
86478
  }, [selectedSpan == null ? void 0 : selectedSpan.data, selectedSpan == null ? void 0 : selectedSpan.resource]);
86425
86479
  if (!activeSpan)
86426
86480
  return null;
86427
- return jsxRuntimeExports.jsxs("aside", { ref: asideRef, id: DETAIL_PANEL_ID, className: "relative flex flex-col h-full max-h-full shrink-0 bg-background-100 border-l border-gray-alpha-400", style: { width: panelWidth }, children: [jsxRuntimeExports.jsx(DraggableBorder, { element: asideRef, position: "left", onWidthChange: handleResize, onReset: () => handleResize(PANEL_DEFAULT_WIDTH), "aria-label": "Resize span details panel", "aria-controls": DETAIL_PANEL_ID, "aria-valuemin": PANEL_MIN_WIDTH, "aria-valuemax": panelMaxWidth, "aria-valuenow": Math.min(Math.max(Math.round(panelWidth), PANEL_MIN_WIDTH), panelMaxWidth) }), jsxRuntimeExports.jsxs("div", { className: "flex items-center justify-between gap-2 shrink-0 px-4 py-[7.5px]", children: [jsxRuntimeExports.jsx("span", { className: "text-label-14 font-medium text-gray-1000 truncate block", children: selectedSpanName }), jsxRuntimeExports.jsxs("div", { className: "flex items-center gap-0.5 shrink-0", children: [jsxRuntimeExports.jsxs(Tooltip$1, { children: [jsxRuntimeExports.jsx(TooltipTrigger$1, { asChild: true, children: jsxRuntimeExports.jsx(IconButton, { "aria-label": "Navigate up", "aria-keyshortcuts": "K", onClick: handleSelectPrev, disabled: !prevSpanId, children: jsxRuntimeExports.jsx(ChevronUp, { className: "w-4 h-4" }) }) }), prevSpanId ? jsxRuntimeExports.jsxs(TooltipContent$1, { children: ["Navigate up", jsxRuntimeExports.jsx(Kbd, { children: "K" })] }) : null] }), jsxRuntimeExports.jsxs(Tooltip$1, { children: [jsxRuntimeExports.jsx(TooltipTrigger$1, { asChild: true, children: jsxRuntimeExports.jsx(IconButton, { "aria-label": "Navigate down", "aria-keyshortcuts": "J", onClick: handleSelectNext, disabled: !nextSpanId, children: jsxRuntimeExports.jsx(ChevronDown, { className: "w-4 h-4" }) }) }), nextSpanId ? jsxRuntimeExports.jsxs(TooltipContent$1, { children: ["Navigate down", jsxRuntimeExports.jsx(Kbd, { children: "J" })] }) : null] }), jsxRuntimeExports.jsx("div", { "aria-hidden": true, className: "w-px h-4 bg-gray-alpha-400 mx-1" }), jsxRuntimeExports.jsx(IconButton, { "aria-label": "Close span details", "aria-keyshortcuts": "Escape", onClick: onClose, children: jsxRuntimeExports.jsx(X$3, { className: "w-4 h-4" }) })] })] }), jsxRuntimeExports.jsx("div", { className: "flex-1 overflow-y-auto", children: jsxRuntimeExports.jsx(ErrorBoundary$1, { children: jsxRuntimeExports.jsx(EntityDetailPanel, { run: sidebar.run, onStreamClick: sidebar.onStreamClick, onRunClick: sidebar.onRunClick, fetchSpanDetail: sidebar.fetchSpanDetail, onWakeUpSleep: sidebar.onWakeUpSleep, onLoadEventData: sidebar.onLoadEventData, onResolveHook: sidebar.onResolveHook, encryptionKey: sidebar.encryptionKey, onDecrypt: sidebar.onDecrypt, isDecrypting: sidebar.isDecrypting, selectedSpan, showSeparateEventOccurrenceTimestamps: sidebar.showSeparateEventOccurrenceTimestamps }) }) })] });
86481
+ return jsxRuntimeExports.jsxs("aside", { ref: asideRef, id: DETAIL_PANEL_ID, className: "relative flex flex-col h-full max-h-full shrink-0 bg-background-100 border-l border-gray-alpha-400", style: { width: panelWidth }, children: [jsxRuntimeExports.jsx(DraggableBorder, { element: asideRef, position: "left", onWidthChange: handleResize, onReset: () => handleResize(PANEL_DEFAULT_WIDTH), "aria-label": "Resize span details panel", "aria-controls": DETAIL_PANEL_ID, "aria-valuemin": PANEL_MIN_WIDTH, "aria-valuemax": panelMaxWidth, "aria-valuenow": Math.min(Math.max(Math.round(panelWidth), PANEL_MIN_WIDTH), panelMaxWidth) }), jsxRuntimeExports.jsxs("div", { className: "flex items-center justify-between gap-2 shrink-0 px-4 py-[7.5px]", children: [jsxRuntimeExports.jsx("span", { className: "text-label-14 font-medium text-gray-1000 truncate block", children: selectedSpanName }), jsxRuntimeExports.jsxs("div", { className: "flex items-center gap-0.5 shrink-0", children: [jsxRuntimeExports.jsxs(Tooltip$1, { children: [jsxRuntimeExports.jsx(TooltipTrigger$1, { asChild: true, children: jsxRuntimeExports.jsx(IconButton, { "aria-label": "Navigate up", "aria-keyshortcuts": "K", onClick: handleSelectPrev, disabled: !prevSpanId, children: jsxRuntimeExports.jsx(ChevronUp, { className: "w-4 h-4" }) }) }), prevSpanId ? jsxRuntimeExports.jsxs(TooltipContent$1, { children: ["Navigate up", jsxRuntimeExports.jsx(Kbd, { children: "K" })] }) : null] }), jsxRuntimeExports.jsxs(Tooltip$1, { children: [jsxRuntimeExports.jsx(TooltipTrigger$1, { asChild: true, children: jsxRuntimeExports.jsx(IconButton, { "aria-label": "Navigate down", "aria-keyshortcuts": "J", onClick: handleSelectNext, disabled: !nextSpanId, children: jsxRuntimeExports.jsx(ChevronDown, { className: "w-4 h-4" }) }) }), nextSpanId ? jsxRuntimeExports.jsxs(TooltipContent$1, { children: ["Navigate down", jsxRuntimeExports.jsx(Kbd, { children: "J" })] }) : null] }), jsxRuntimeExports.jsx("div", { "aria-hidden": true, className: "w-px h-4 bg-gray-alpha-400 mx-1" }), jsxRuntimeExports.jsx(IconButton, { "aria-label": "Close span details", "aria-keyshortcuts": "Escape", onClick: onClose, children: jsxRuntimeExports.jsx(X$3, { className: "w-4 h-4" }) })] })] }), jsxRuntimeExports.jsx("div", { className: "flex-1 overflow-y-auto", children: jsxRuntimeExports.jsx(ErrorBoundary$1, { children: jsxRuntimeExports.jsx(EntityDetailPanel, { run: sidebar.run, onStreamClick: sidebar.onStreamClick, onRunClick: sidebar.onRunClick, fetchSpanDetail: sidebar.fetchSpanDetail, onWakeUpSleep: sidebar.onWakeUpSleep, onLoadEventData: sidebar.onLoadEventData, onResolveHook: sidebar.onResolveHook, encryptionKey: sidebar.encryptionKey, onDecrypt: sidebar.onDecrypt, isDecrypting: sidebar.isDecrypting, selectedSpan, showSeparateEventOccurrenceTimestamps: sidebar.showSeparateEventOccurrenceTimestamps, getModuleSourceUrl: sidebar.getModuleSourceUrl }) }) })] });
86428
86482
  }
86429
86483
  const WorkflowIcon = () => {
86430
86484
  return jsxRuntimeExports.jsx("svg", { "data-testid": "geist-icon", height: "16", strokeLinejoin: "round", style: { color: "currentColor" }, viewBox: "0 0 16 16", width: "16", children: jsxRuntimeExports.jsx("path", { d: "M5.75 7L6.4209 7.33594L4.85254 10.4717C5.38789 10.771 5.75 11.3431 5.75 12V14C5.75 14.9665 4.96648 15.75 4 15.75H2C1.03352 15.75 0.25 14.9665 0.25 14V12C0.25 11.0335 1.03352 10.25 2 10.25H3.28711L5.0791 6.66504L5.75 7ZM14 10.25C14.9665 10.25 15.75 11.0335 15.75 12V14C15.75 14.9665 14.9665 15.75 14 15.75H12C11.1185 15.75 10.3909 15.098 10.2695 14.25H7V12.75H10.25V12C10.25 11.0335 11.0335 10.25 12 10.25H14ZM2 11.75C1.86192 11.75 1.75 11.8619 1.75 12V14C1.75 14.1381 1.86192 14.25 2 14.25H4C4.13808 14.25 4.25 14.1381 4.25 14V12C4.25 11.8619 4.13808 11.75 4 11.75H2ZM12 11.75C11.8619 11.75 11.75 11.8619 11.75 12V14C11.75 14.1381 11.8619 14.25 12 14.25H14C14.1381 14.25 14.25 14.1381 14.25 14V12C14.25 11.8619 14.1381 11.75 14 11.75H12ZM9 0.25C9.96649 0.25 10.75 1.03351 10.75 2V4C10.75 4.44642 10.5808 4.85197 10.3057 5.16113L12.2041 8.6416L10.8877 9.36035L8.91895 5.75H7C6.03351 5.75 5.25 4.96649 5.25 4V2C5.25 1.03351 6.03351 0.25 7 0.25H9ZM7 1.75C6.86193 1.75 6.75 1.86193 6.75 2V4C6.75 4.13807 6.86193 4.25 7 4.25H9C9.13807 4.25 9.25 4.13807 9.25 4V2C9.25 1.86193 9.13807 1.75 9 1.75H7Z", fill: "currentColor" }) });
@@ -87021,7 +87075,7 @@ const EventRow = ({ span, isSelected, isDimmed, onSelectSpan }) => {
87021
87075
  const EventList = ({ spans, activeSpanId, searchResult, onSelectSpan }) => {
87022
87076
  const listRef = reactExports.useRef(null);
87023
87077
  const { start: start2, end } = useRowWindow(listRef, spans.length, ROW_HEIGHT_PX);
87024
- return jsxRuntimeExports.jsx("ul", { ref: listRef, id: "event-list", role: "tree", className: "block min-h-0 overflow-visible divide-y divide-gray-alpha-400 border-b border-gray-alpha-400", style: {
87078
+ return jsxRuntimeExports.jsx("ul", { ref: listRef, id: "event-list", role: "tree", className: "block min-h-0 overflow-visible divide-y divide-gray-400 border-b border-gray-400", style: {
87025
87079
  paddingTop: start2 * ROW_HEIGHT_PX,
87026
87080
  paddingBottom: (spans.length - end) * ROW_HEIGHT_PX
87027
87081
  }, children: spans.slice(start2, end).map((span) => jsxRuntimeExports.jsx(EventRow, { span, isSelected: span.spanId === activeSpanId, isDimmed: isSpanDimmedBySearch(span.spanId, searchResult), onSelectSpan }, span.spanId)) });
@@ -87541,6 +87595,7 @@ const Minimap = reactExports.memo(function Minimap2({ spans, root: root2, viewpo
87541
87595
  (drag2 == null ? void 0 : drag2.mode) === "pan" ? "cursor-grabbing" : "cursor-grab"
87542
87596
  ), style: brushStyle, children: [jsxRuntimeExports.jsx("div", { "data-minimap-handle": "left", className: "absolute inset-y-0 -left-1 flex w-2.5 cursor-ew-resize items-center justify-center", children: jsxRuntimeExports.jsx("span", { className: cn$4("h-3.5 w-[3px] rounded-full bg-gray-600 opacity-0 transition-opacity group-hover/minimap-brush:opacity-100 group-focus-visible/minimap-brush:opacity-100", drag2 && "opacity-100") }) }), jsxRuntimeExports.jsx("div", { "data-minimap-handle": "right", className: "absolute inset-y-0 -right-1 flex w-2.5 cursor-ew-resize items-center justify-center", children: jsxRuntimeExports.jsx("span", { className: cn$4("h-3.5 w-[3px] rounded-full bg-gray-600 opacity-0 transition-opacity group-hover/minimap-brush:opacity-100 group-focus-visible/minimap-brush:opacity-100", drag2 && "opacity-100") }) })] })] });
87543
87597
  });
87598
+ const SPLIT_PANE_START_ID = "trace-split-start";
87544
87599
  function SplitPane({ children: children2, className, startHeader, endHeader, scrollContainerRef }) {
87545
87600
  const parts = reactExports.Children.toArray(children2);
87546
87601
  if (parts.length !== 2) {
@@ -87548,19 +87603,9 @@ function SplitPane({ children: children2, className, startHeader, endHeader, scr
87548
87603
  }
87549
87604
  const [start2, end] = parts;
87550
87605
  const [startPx, setStartPx] = reactExports.useState(DEFAULT_START_PX);
87551
- const [isDragging, setIsDragging] = reactExports.useState(false);
87552
87606
  const containerRef = reactExports.useRef(null);
87553
- const gutterRef = reactExports.useRef(null);
87554
- const rafRef = reactExports.useRef(null);
87555
- const pendingPx = reactExports.useRef(DEFAULT_START_PX);
87556
- const pointerIdRef = reactExports.useRef(null);
87607
+ const startRef = reactExports.useRef(null);
87557
87608
  const containerWidth = useElementWidth(containerRef);
87558
- reactExports.useEffect(() => {
87559
- return () => {
87560
- if (rafRef.current)
87561
- cancelAnimationFrame(rafRef.current);
87562
- };
87563
- }, []);
87564
87609
  const setContainerRef = reactExports.useCallback((node2) => {
87565
87610
  containerRef.current = node2;
87566
87611
  if (scrollContainerRef) {
@@ -87574,64 +87619,12 @@ function SplitPane({ children: children2, className, startHeader, endHeader, scr
87574
87619
  const maxPx = el.getBoundingClientRect().width - MIN_PX - GUTTER_PX;
87575
87620
  return Math.min(maxPx, Math.max(MIN_PX, px));
87576
87621
  }, []);
87577
- reactExports.useEffect(() => {
87578
- if (!isDragging)
87579
- return;
87580
- const onPointerMove = (e) => {
87581
- if (e.pointerId !== pointerIdRef.current)
87582
- return;
87583
- const container = containerRef.current;
87584
- if (!container)
87585
- return;
87586
- const rect = container.getBoundingClientRect();
87587
- pendingPx.current = clampPx(e.clientX - rect.left);
87588
- if (!rafRef.current) {
87589
- rafRef.current = requestAnimationFrame(() => {
87590
- rafRef.current = null;
87591
- setStartPx(pendingPx.current);
87592
- });
87593
- }
87594
- };
87595
- const onPointerUp = (e) => {
87596
- if (e.pointerId !== pointerIdRef.current)
87597
- return;
87598
- const gutter2 = gutterRef.current;
87599
- if (gutter2 == null ? void 0 : gutter2.hasPointerCapture(e.pointerId)) {
87600
- gutter2.releasePointerCapture(e.pointerId);
87601
- }
87602
- if (rafRef.current) {
87603
- cancelAnimationFrame(rafRef.current);
87604
- rafRef.current = null;
87605
- }
87606
- pointerIdRef.current = null;
87607
- setIsDragging(false);
87608
- };
87609
- document.addEventListener("pointermove", onPointerMove);
87610
- document.addEventListener("pointerup", onPointerUp);
87611
- document.addEventListener("pointercancel", onPointerUp);
87612
- return () => {
87613
- document.removeEventListener("pointermove", onPointerMove);
87614
- document.removeEventListener("pointerup", onPointerUp);
87615
- document.removeEventListener("pointercancel", onPointerUp);
87616
- };
87617
- }, [isDragging, clampPx]);
87618
- const handlePointerDown = (e) => {
87619
- e.currentTarget.setPointerCapture(e.pointerId);
87620
- pointerIdRef.current = e.pointerId;
87621
- setIsDragging(true);
87622
- };
87623
- const handleLostPointerCapture = () => {
87624
- pointerIdRef.current = null;
87625
- setIsDragging(false);
87626
- if (rafRef.current) {
87627
- cancelAnimationFrame(rafRef.current);
87628
- rafRef.current = null;
87629
- }
87630
- };
87622
+ const handleWidthChange = reactExports.useCallback((next2) => setStartPx(clampPx(next2)), [clampPx]);
87623
+ const handleReset = reactExports.useCallback(() => setStartPx(clampPx(DEFAULT_START_PX)), [clampPx]);
87631
87624
  const effectiveStartPx = containerWidth > 0 ? Math.max(MIN_PX, Math.min(containerWidth - MIN_PX - GUTTER_PX, startPx)) : startPx;
87632
87625
  const colTemplate = paneColTemplate(effectiveStartPx);
87633
- const gutter = jsxRuntimeExports.jsx("div", { ref: gutterRef, className: "relative z-20 isolate flex shrink-0 cursor-col-resize justify-center", onPointerDown: handlePointerDown, onLostPointerCapture: handleLostPointerCapture, children: jsxRuntimeExports.jsx("span", { className: "pointer-events-none relative z-10 h-full w-px shrink-0 bg-gray-alpha-400", "aria-hidden": true }) });
87634
- return jsxRuntimeExports.jsxs("div", { className: cn$4("flex flex-col h-full min-h-0", className), children: [jsxRuntimeExports.jsxs("div", { className: "shrink-0 grid", style: { gridTemplateColumns: colTemplate }, children: [jsxRuntimeExports.jsx("div", { children: startHeader }), jsxRuntimeExports.jsx("div", { className: "flex justify-center", children: jsxRuntimeExports.jsx("span", { className: "h-full w-px bg-gray-alpha-400", "aria-hidden": true }) }), jsxRuntimeExports.jsx("div", { children: endHeader })] }), jsxRuntimeExports.jsxs("div", { ref: setContainerRef, className: cn$4("grid flex-1 min-h-0 overflow-x-hidden overflow-y-auto", isDragging && "select-none"), style: { gridTemplateColumns: colTemplate }, children: [start2, gutter, end] })] });
87626
+ const maxStartPx = Math.max(MIN_PX, containerWidth > 0 ? containerWidth - MIN_PX - GUTTER_PX : startPx);
87627
+ return jsxRuntimeExports.jsxs("div", { className: cn$4("flex flex-col h-full min-h-0", className), children: [jsxRuntimeExports.jsxs("div", { className: "shrink-0 grid", style: { gridTemplateColumns: colTemplate }, children: [jsxRuntimeExports.jsx("div", { children: startHeader }), jsxRuntimeExports.jsx("div", { className: "flex justify-center", children: jsxRuntimeExports.jsx("span", { className: "h-full w-px bg-gray-alpha-400", "aria-hidden": true }) }), jsxRuntimeExports.jsx("div", { children: endHeader })] }), jsxRuntimeExports.jsxs("div", { ref: setContainerRef, className: "grid flex-1 min-h-0 overflow-x-hidden overflow-y-auto", style: { gridTemplateColumns: colTemplate }, children: [jsxRuntimeExports.jsx("div", { ref: startRef, id: SPLIT_PANE_START_ID, className: "min-w-0", children: start2 }), jsxRuntimeExports.jsxs("div", { className: "relative z-20 isolate flex shrink-0 justify-center", children: [jsxRuntimeExports.jsx("span", { className: "pointer-events-none relative z-10 h-full w-px shrink-0 bg-gray-alpha-400", "aria-hidden": true }), jsxRuntimeExports.jsx(DraggableBorder, { element: startRef, position: "right", onWidthChange: handleWidthChange, onReset: handleReset, "aria-label": "Resize event list", "aria-controls": SPLIT_PANE_START_ID, "aria-valuemin": MIN_PX, "aria-valuemax": maxStartPx, "aria-valuenow": Math.min(Math.max(Math.round(effectiveStartPx), MIN_PX), maxStartPx) })] }), end] })] });
87635
87628
  }
87636
87629
  const hint$1 = "_hint_1dmsq_3";
87637
87630
  const styles$1 = {
@@ -87708,8 +87701,8 @@ function useAnimatedViewport(initial) {
87708
87701
  const from = currentRef.current;
87709
87702
  const anim = { raf: 0, from, to: target2, start: performance.now() };
87710
87703
  const tick = () => {
87711
- const t = Math.min((performance.now() - anim.start) / 150, 1);
87712
- const e = 1 - (1 - t) * (1 - t);
87704
+ const t = Math.min((performance.now() - anim.start) / 240, 1);
87705
+ const e = t < 0.5 ? 8 * t * t * t * t : 1 - (-2 * t + 2) ** 4 / 2;
87713
87706
  setViewportState({
87714
87707
  start: anim.from.start + (anim.to.start - anim.from.start) * e,
87715
87708
  end: anim.from.end + (anim.to.end - anim.from.end) * e
@@ -91928,7 +91921,7 @@ const encryption = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.definePr
91928
91921
  encrypt: encrypt$1,
91929
91922
  importKey
91930
91923
  }, Symbol.toStringTag, { value: "Module" }));
91931
- const version$1 = "5.0.0-beta.28";
91924
+ const version$1 = "5.0.0-beta.29";
91932
91925
  function assertWorldSupportsRuntimeProtocol(world) {
91933
91926
  if (world.specVersion === SPEC_VERSION_CURRENT) {
91934
91927
  return;
@@ -97704,16 +97697,17 @@ async function recreateRunFromExisting(world, runId, options = {}) {
97704
97697
  throw new Error(`Failed to recreate run from ${runId}: ${err instanceof Error ? err.message : String(err)}`, { cause: err });
97705
97698
  }
97706
97699
  }
97707
- async function cancelRun$2(world, runId) {
97700
+ async function cancelRun$2(world, runId, options) {
97708
97701
  try {
97709
97702
  const run2 = await world.runs.get(runId, { resolveData: "none" });
97710
97703
  const specVersion = run2.specVersion ?? SPEC_VERSION_LEGACY;
97711
97704
  const compatMode = isLegacySpecVersion(specVersion);
97712
- const eventData = {
97705
+ const eventRequest = {
97713
97706
  eventType: "run_cancelled",
97714
- specVersion
97707
+ specVersion,
97708
+ ...(options == null ? void 0 : options.cancelReason) !== void 0 ? { eventData: { cancelReason: options.cancelReason } } : {}
97715
97709
  };
97716
- await world.events.create(runId, eventData, { v1Compat: compatMode });
97710
+ await world.events.create(runId, eventRequest, { v1Compat: compatMode });
97717
97711
  } catch (err) {
97718
97712
  throw new Error(`Failed to cancel run ${runId}: ${err instanceof Error ? err.message : String(err)}`, { cause: err });
97719
97713
  }
@@ -97847,13 +97841,18 @@ const _Run = class _Run {
97847
97841
  }
97848
97842
  /**
97849
97843
  * Cancels the workflow run.
97844
+ *
97845
+ * @param options - Optional cancellation settings. `cancelReason` records a
97846
+ * free-text reason (max 512 chars) on the run_cancelled event, surfaced in
97847
+ * the run detail view.
97850
97848
  */
97851
- async cancel() {
97849
+ async cancel(options) {
97852
97850
  "use step";
97853
97851
  const world = await __privateGet(this, _Run_instances, lazyWorldPromise_get);
97854
97852
  await world.events.create(this.runId, {
97855
97853
  eventType: "run_cancelled",
97856
- specVersion: SPEC_VERSION_CURRENT
97854
+ specVersion: SPEC_VERSION_CURRENT,
97855
+ ...(options == null ? void 0 : options.cancelReason) !== void 0 ? { eventData: { cancelReason: options.cancelReason } } : {}
97857
97856
  });
97858
97857
  }
97859
97858
  /**
@@ -98678,21 +98677,26 @@ async function paginatedFileSystemQuery(config2) {
98678
98677
  return true;
98679
98678
  });
98680
98679
  }
98680
+ const readConcurrency = 32;
98681
98681
  const validItems = [];
98682
- for (const fileId of candidateFileIds) {
98683
- const filePath = path$3.join(resolvedDirectory, `${fileId}.json`);
98684
- let item = null;
98685
- try {
98686
- const cachedItem = cachedItems == null ? void 0 : cachedItems.get(filePath);
98687
- item = cachedItem === void 0 ? await readJSON(filePath, schema) : structuredClone(cachedItem);
98688
- } catch (error2) {
98689
- if (error2 instanceof ZodError) {
98690
- console.warn(`Skipping item ${fileId} due to malformed JSON: ${error2.message}`);
98691
- continue;
98682
+ for (let batchStart = 0; batchStart < candidateFileIds.length; batchStart += readConcurrency) {
98683
+ const batch = candidateFileIds.slice(batchStart, batchStart + readConcurrency);
98684
+ const loadedBatch = await Promise.all(batch.map(async (fileId) => {
98685
+ const filePath = path$3.join(resolvedDirectory, `${fileId}.json`);
98686
+ try {
98687
+ const cachedItem = cachedItems == null ? void 0 : cachedItems.get(filePath);
98688
+ return cachedItem === void 0 ? await readJSON(filePath, schema) : structuredClone(cachedItem);
98689
+ } catch (error2) {
98690
+ if (error2 instanceof ZodError) {
98691
+ console.warn(`Skipping item ${fileId} due to malformed JSON: ${error2.message}`);
98692
+ return null;
98693
+ }
98694
+ throw error2;
98692
98695
  }
98693
- throw error2;
98694
- }
98695
- if (item) {
98696
+ }));
98697
+ for (const item of loadedBatch) {
98698
+ if (!item)
98699
+ continue;
98696
98700
  if (filter2 && !filter2(item))
98697
98701
  continue;
98698
98702
  if (parsedCursor) {
@@ -124917,21 +124921,212 @@ function hookRecoveryMarkerPath(basedir, token, runId, hookId) {
124917
124921
  return path$3.join(basedir, "hooks", "tokens", `${key}.recovery.json`);
124918
124922
  }
124919
124923
  const monotonicUlid$1 = monotonicFactory(() => Math.random());
124920
- const getObjectCreatedAt = (idPrefix) => (filename) => {
124921
- const cleanName = stripTag(filename.replace(/\.json$/, "")) + ".json";
124924
+ const getObjectCreatedAt = (idPrefix) => {
124922
124925
  const replaceRegex = new RegExp(`^${idPrefix}_`, "g");
124923
- const dashIndex = cleanName.indexOf("-");
124924
- if (dashIndex === -1) {
124925
- const ulid3 = cleanName.replace(/\.json$/, "").replace(replaceRegex, "");
124926
- return ulidToDate(ulid3);
124926
+ return (filename) => {
124927
+ const cleanName = stripTag(filename.replace(/\.json$/, "")) + ".json";
124928
+ const dashIndex = cleanName.indexOf("-");
124929
+ if (dashIndex === -1) {
124930
+ const ulid3 = cleanName.replace(/\.json$/, "").replace(replaceRegex, "");
124931
+ return ulidToDate(ulid3);
124932
+ }
124933
+ if (idPrefix === "step") {
124934
+ return null;
124935
+ }
124936
+ const id2 = cleanName.substring(dashIndex + 1).replace(/\.json$/, "");
124937
+ const ulid2 = id2.replace(replaceRegex, "");
124938
+ return ulidToDate(ulid2);
124939
+ };
124940
+ };
124941
+ const IndexEntrySchema = object$1({
124942
+ runId: string$3()
124943
+ });
124944
+ const ByRunMarkerSchema = object$1({
124945
+ hookId: string$3(),
124946
+ tag: string$3().optional()
124947
+ });
124948
+ const INDEX_COMPLETE_MARKER = ".hook-index-complete";
124949
+ function tokenIndexDir(basedir, token) {
124950
+ return resolveWithinBase(basedir, "hooks", "token-index", hashToken(token));
124951
+ }
124952
+ function idIndexDir(basedir, hookId) {
124953
+ assertSafeEntityId("hookId", hookId);
124954
+ return resolveWithinBase(basedir, "hooks", "id-index", hookId);
124955
+ }
124956
+ function byRunDir(basedir) {
124957
+ return resolveWithinBase(basedir, "hooks", "by-run");
124958
+ }
124959
+ function tagOf(fileId) {
124960
+ const stripped = stripTag(fileId);
124961
+ return stripped === fileId ? void 0 : fileId.slice(stripped.length + 1);
124962
+ }
124963
+ function isVisibleToTag(fileId, tag) {
124964
+ return tag ? isUntagged(fileId) || hasTag(fileId, tag) : isUntagged(fileId);
124965
+ }
124966
+ async function readEventLenient(filePath) {
124967
+ try {
124968
+ return await readJSON(filePath, EventSchema);
124969
+ } catch (error2) {
124970
+ if (error2 instanceof SyntaxError || error2 instanceof ZodError) {
124971
+ return null;
124972
+ }
124973
+ throw error2;
124974
+ }
124975
+ }
124976
+ async function writeHookCreatedIndexEntries(basedir, token, runId, hookId, eventId, tag) {
124977
+ assertSafeEntityId("runId", runId);
124978
+ assertSafeEntityId("eventId", eventId);
124979
+ if (tag !== void 0)
124980
+ assertSafeEntityId("tag", tag);
124981
+ const fileName = tag ? `${eventId}.${tag}.json` : `${eventId}.json`;
124982
+ const content2 = JSON.stringify({ runId });
124983
+ await Promise.all([
124984
+ writeExclusive(path$3.join(tokenIndexDir(basedir, token), fileName), content2),
124985
+ writeExclusive(path$3.join(idIndexDir(basedir, hookId), fileName), content2)
124986
+ ]);
124987
+ }
124988
+ function hookByRunMarkerPath(basedir, runId, hookId, tag) {
124989
+ return taggedPath(basedir, "hooks/by-run", `${runId}-${hookId}`, tag);
124990
+ }
124991
+ async function writeHookByRunMarker(basedir, runId, hookId, tag) {
124992
+ await writeExclusive(hookByRunMarkerPath(basedir, runId, hookId, tag), JSON.stringify(tag ? { hookId, tag } : { hookId }));
124993
+ }
124994
+ async function deleteHookByRunMarker(basedir, runId, hookId, tag) {
124995
+ await deleteJSON(hookByRunMarkerPath(basedir, runId, hookId, tag));
124996
+ if (tag) {
124997
+ await deleteJSON(hookByRunMarkerPath(basedir, runId, hookId));
124998
+ }
124999
+ }
125000
+ async function listHookByRunMarkers(basedir, runId) {
125001
+ assertSafeEntityId("runId", runId);
125002
+ const dir = byRunDir(basedir);
125003
+ const prefix = `${runId}-`;
125004
+ const out = [];
125005
+ for (const fileId of await listJSONFiles(dir)) {
125006
+ if (!fileId.startsWith(prefix))
125007
+ continue;
125008
+ let marker2 = null;
125009
+ try {
125010
+ marker2 = await readJSON(path$3.join(dir, `${fileId}.json`), ByRunMarkerSchema);
125011
+ } catch (error2) {
125012
+ if (!(error2 instanceof SyntaxError || error2 instanceof ZodError)) {
125013
+ throw error2;
125014
+ }
125015
+ }
125016
+ out.push({
125017
+ fileId,
125018
+ hookId: (marker2 == null ? void 0 : marker2.hookId) ?? null,
125019
+ tag: marker2 == null ? void 0 : marker2.tag
125020
+ });
125021
+ }
125022
+ return out;
125023
+ }
125024
+ async function deleteHookByRunMarkerFile(basedir, fileId) {
125025
+ await deleteJSON(path$3.join(byRunDir(basedir), `${fileId}.json`));
125026
+ }
125027
+ const ensuredBasedirs = /* @__PURE__ */ new Map();
125028
+ function resetHookIndexEnsureCache() {
125029
+ ensuredBasedirs.clear();
125030
+ }
125031
+ async function ensureHookIndexes(basedir) {
125032
+ const key = path$3.resolve(basedir);
125033
+ let pending = ensuredBasedirs.get(key);
125034
+ if (!pending) {
125035
+ pending = ensureHookIndexesImpl(key).catch((error2) => {
125036
+ ensuredBasedirs.delete(key);
125037
+ throw error2;
125038
+ });
125039
+ ensuredBasedirs.set(key, pending);
125040
+ }
125041
+ return pending;
125042
+ }
125043
+ async function forEachConcurrent(items, concurrency, fn2) {
125044
+ for (let start2 = 0; start2 < items.length; start2 += concurrency) {
125045
+ await Promise.all(items.slice(start2, start2 + concurrency).map(fn2));
125046
+ }
125047
+ }
125048
+ async function ensureHookIndexesImpl(basedir) {
125049
+ const markerPath = path$3.join(basedir, "hooks", INDEX_COMPLETE_MARKER);
125050
+ try {
125051
+ await fs$1.access(markerPath);
125052
+ return;
125053
+ } catch {
124927
125054
  }
124928
- if (idPrefix === "step") {
125055
+ const eventsDir = path$3.join(basedir, "events");
125056
+ await forEachConcurrent(await listJSONFiles(eventsDir), 32, async (fileId) => {
125057
+ var _a3;
125058
+ const event = await readEventLenient(path$3.join(eventsDir, `${fileId}.json`));
125059
+ if (!event || event.eventType !== "hook_created")
125060
+ return;
125061
+ if (typeof event.correlationId !== "string")
125062
+ return;
125063
+ const token = (_a3 = event.eventData) == null ? void 0 : _a3.token;
125064
+ if (typeof token !== "string")
125065
+ return;
125066
+ try {
125067
+ await writeHookCreatedIndexEntries(basedir, token, event.runId, event.correlationId, event.eventId, tagOf(fileId));
125068
+ } catch {
125069
+ }
125070
+ });
125071
+ const hooksDir = path$3.join(basedir, "hooks");
125072
+ await forEachConcurrent(await listJSONFiles(hooksDir), 32, async (fileId) => {
125073
+ let hook = null;
125074
+ try {
125075
+ hook = await readJSON(path$3.join(hooksDir, `${fileId}.json`), HookSchema);
125076
+ } catch (error2) {
125077
+ if (!(error2 instanceof SyntaxError || error2 instanceof ZodError)) {
125078
+ throw error2;
125079
+ }
125080
+ }
125081
+ if (!hook)
125082
+ return;
125083
+ try {
125084
+ await writeHookByRunMarker(basedir, hook.runId, hook.hookId, tagOf(fileId));
125085
+ } catch {
125086
+ }
125087
+ });
125088
+ await writeExclusive(markerPath, "");
125089
+ }
125090
+ async function findNewestIndexedHookCreatedEvent(basedir, index2, matches, tag) {
125091
+ await ensureHookIndexes(basedir);
125092
+ let dir;
125093
+ try {
125094
+ dir = index2.kind === "token" ? tokenIndexDir(basedir, index2.token) : idIndexDir(basedir, index2.hookId);
125095
+ } catch {
124929
125096
  return null;
124930
125097
  }
124931
- const id2 = cleanName.substring(dashIndex + 1).replace(/\.json$/, "");
124932
- const ulid2 = id2.replace(replaceRegex, "");
124933
- return ulidToDate(ulid2);
124934
- };
125098
+ const entryIds = (await listJSONFiles(dir)).filter((fileId) => isVisibleToTag(fileId, tag)).sort((a2, b2) => stripTag(b2).localeCompare(stripTag(a2)));
125099
+ for (const entryId of entryIds) {
125100
+ let entry2 = null;
125101
+ try {
125102
+ entry2 = await readJSON(path$3.join(dir, `${entryId}.json`), IndexEntrySchema);
125103
+ } catch (error2) {
125104
+ if (!(error2 instanceof SyntaxError || error2 instanceof ZodError)) {
125105
+ throw error2;
125106
+ }
125107
+ }
125108
+ if (!entry2)
125109
+ continue;
125110
+ const eventId = stripTag(entryId);
125111
+ let eventPath;
125112
+ try {
125113
+ eventPath = taggedPath(basedir, "events", `${entry2.runId}-${eventId}`, tagOf(entryId));
125114
+ } catch {
125115
+ continue;
125116
+ }
125117
+ const event = await readEventLenient(eventPath);
125118
+ if (!event)
125119
+ continue;
125120
+ if (event.eventType !== "hook_created")
125121
+ continue;
125122
+ if (typeof event.correlationId !== "string")
125123
+ continue;
125124
+ if (!matches(event))
125125
+ continue;
125126
+ return event;
125127
+ }
125128
+ return null;
125129
+ }
124935
125130
  function filterRunData$1(run2, resolveData) {
124936
125131
  if (resolveData === "none") {
124937
125132
  return {
@@ -124959,9 +125154,6 @@ function filterHookData$1(hook, resolveData) {
124959
125154
  }
124960
125155
  return hook;
124961
125156
  }
124962
- function isVisibleToTag(fileId, tag) {
124963
- return tag ? isUntagged(fileId) || hasTag(fileId, tag) : isUntagged(fileId);
124964
- }
124965
125157
  function getHookCreatedToken(event) {
124966
125158
  if (event.eventType !== "hook_created")
124967
125159
  return void 0;
@@ -124987,56 +125179,22 @@ function hookFromCreatedEvent(event) {
124987
125179
  function isMatchingHookCreatedEvent(event, matches) {
124988
125180
  return event.eventType === "hook_created" && typeof event.correlationId === "string" && matches(event);
124989
125181
  }
124990
- function closesLiveHook(event, liveEvent) {
124991
- if (event.runId !== liveEvent.runId)
124992
- return false;
124993
- return event.eventType === "hook_disposed" && event.correlationId === liveEvent.correlationId || isTerminalRunEventType(event.eventType);
124994
- }
124995
- async function readEventForHookScan(filePath) {
124996
- try {
124997
- return await readJSON(filePath, EventSchema);
124998
- } catch (error2) {
124999
- if (error2 instanceof SyntaxError || error2 instanceof ZodError) {
125000
- return null;
125001
- }
125002
- throw error2;
125003
- }
125004
- }
125005
125182
  async function isTerminalRunCache(basedir, runId, tag) {
125006
125183
  const run2 = await readJSONWithFallback(basedir, "runs", runId, WorkflowRunSchema, tag);
125007
125184
  return run2 ? isTerminalWorkflowRunStatus(run2.status) : false;
125008
125185
  }
125009
- async function findLiveHookCreatedEvent(basedir, matches, tag) {
125010
- const eventsDir = path$3.join(basedir, "events");
125011
- const events2 = [];
125012
- for (const fileId of await listJSONFiles(eventsDir)) {
125013
- if (!isVisibleToTag(fileId, tag))
125014
- continue;
125015
- const event = await readEventForHookScan(path$3.join(eventsDir, `${fileId}.json`));
125016
- if (event)
125017
- events2.push(event);
125018
- }
125019
- events2.sort((a2, b2) => {
125020
- const byTime = a2.createdAt.getTime() - b2.createdAt.getTime();
125021
- return byTime === 0 ? a2.eventId.localeCompare(b2.eventId) : byTime;
125022
- });
125023
- let liveEvent = null;
125024
- for (const event of events2) {
125025
- if (isMatchingHookCreatedEvent(event, matches)) {
125026
- liveEvent = event;
125027
- continue;
125028
- }
125029
- if (liveEvent && closesLiveHook(event, liveEvent)) {
125030
- liveEvent = null;
125031
- }
125186
+ async function findLiveHookCreatedEvent(basedir, index2, matches, tag) {
125187
+ const newest = await findNewestIndexedHookCreatedEvent(basedir, index2, (event) => isMatchingHookCreatedEvent(event, matches), tag);
125188
+ if (!newest || !isMatchingHookCreatedEvent(newest, matches)) {
125189
+ return null;
125032
125190
  }
125033
- if (liveEvent && await isTerminalRunCache(basedir, liveEvent.runId, tag)) {
125191
+ if (await isTerminalRunCache(basedir, newest.runId, tag)) {
125034
125192
  return null;
125035
125193
  }
125036
- if (liveEvent && await isHookDisposalCommitted(basedir, liveEvent.correlationId, tag)) {
125194
+ if (await isHookDisposalCommitted(basedir, newest.correlationId, tag)) {
125037
125195
  return null;
125038
125196
  }
125039
- return liveEvent;
125197
+ return newest;
125040
125198
  }
125041
125199
  async function restoreHookCachesFromEvent(basedir, event, tag) {
125042
125200
  const hook = hookFromCreatedEvent(event);
@@ -125047,19 +125205,43 @@ async function restoreHookCachesFromEvent(basedir, event, tag) {
125047
125205
  runId: hook.runId,
125048
125206
  eventId: event.eventId
125049
125207
  }));
125208
+ await writeHookByRunMarker(basedir, hook.runId, hook.hookId, tag);
125050
125209
  await writeExclusive(taggedPath(basedir, "hooks", hook.hookId, tag), JSON.stringify(hook, jsonReplacer, 2));
125051
125210
  return hook;
125052
125211
  }
125053
125212
  async function rebuildLiveHookByTokenFromEventLog(basedir, token, tag) {
125054
- const event = await findLiveHookCreatedEvent(basedir, (candidate) => getHookCreatedToken(candidate) === token, tag);
125213
+ const event = await findLiveHookCreatedEvent(basedir, { kind: "token", token }, (candidate) => getHookCreatedToken(candidate) === token, tag);
125055
125214
  return event ? restoreHookCachesFromEvent(basedir, event, tag) : null;
125056
125215
  }
125057
125216
  async function rebuildLiveHookByIdFromEventLog(basedir, hookId, tag) {
125058
- const event = await findLiveHookCreatedEvent(basedir, (candidate) => candidate.correlationId === hookId, tag);
125217
+ const event = await findLiveHookCreatedEvent(basedir, { kind: "id", hookId }, (candidate) => candidate.correlationId === hookId, tag);
125059
125218
  return event ? restoreHookCachesFromEvent(basedir, event, tag) : null;
125060
125219
  }
125061
125220
  function createHooksStorage(basedir, tag) {
125221
+ const TokenClaimPointerSchema = object$1({
125222
+ hookId: string$3().optional()
125223
+ });
125062
125224
  async function findHookByToken(token) {
125225
+ let claim = null;
125226
+ try {
125227
+ claim = await readJSON(hookTokenClaimPath(basedir, token), TokenClaimPointerSchema);
125228
+ } catch (error2) {
125229
+ if (!(error2 instanceof SyntaxError || error2 instanceof ZodError)) {
125230
+ throw error2;
125231
+ }
125232
+ }
125233
+ if (claim == null ? void 0 : claim.hookId) {
125234
+ try {
125235
+ const hook = await readJSONWithFallback(basedir, "hooks", claim.hookId, HookSchema, tag);
125236
+ if (hook && hook.token === token) {
125237
+ return { ...hook, isWebhook: hook.isWebhook ?? true };
125238
+ }
125239
+ } catch (error2) {
125240
+ if (!UnsafeEntityIdError.is(error2)) {
125241
+ throw error2;
125242
+ }
125243
+ }
125244
+ }
125063
125245
  const hooksDir = path$3.join(basedir, "hooks");
125064
125246
  const files = await listJSONFiles(hooksDir);
125065
125247
  for (const file2 of files) {
@@ -125123,16 +125305,26 @@ function createHooksStorage(basedir, tag) {
125123
125305
  return { get: get2, getByToken, list: list2 };
125124
125306
  }
125125
125307
  async function deleteAllHooksForRun(basedir, runId) {
125126
- const hooksDir = path$3.join(basedir, "hooks");
125127
- const files = await listJSONFiles(hooksDir);
125128
- for (const file2 of files) {
125129
- const hookPath = path$3.join(hooksDir, `${file2}.json`);
125130
- const hook = await readJSON(hookPath, HookSchema);
125131
- if (hook && hook.runId === runId) {
125132
- await releaseHookTokenClaimIfOwnedBy(basedir, hook.token, hook.runId, hook.hookId);
125133
- await deleteJSON(hookRecoveryMarkerPath(basedir, hook.token, hook.runId, hook.hookId));
125134
- await deleteJSON(hookPath);
125308
+ await ensureHookIndexes(basedir);
125309
+ for (const marker2 of await listHookByRunMarkers(basedir, runId)) {
125310
+ if (marker2.hookId) {
125311
+ let hook = null;
125312
+ let hookPath = null;
125313
+ try {
125314
+ hookPath = taggedPath(basedir, "hooks", marker2.hookId, marker2.tag);
125315
+ hook = await readJSON(hookPath, HookSchema);
125316
+ } catch (error2) {
125317
+ if (!UnsafeEntityIdError.is(error2) && !(error2 instanceof SyntaxError || error2 instanceof ZodError)) {
125318
+ throw error2;
125319
+ }
125320
+ }
125321
+ if (hook && hookPath && hook.runId === runId) {
125322
+ await releaseHookTokenClaimIfOwnedBy(basedir, hook.token, hook.runId, hook.hookId);
125323
+ await deleteJSON(hookRecoveryMarkerPath(basedir, hook.token, hook.runId, hook.hookId));
125324
+ await deleteJSON(hookPath);
125325
+ }
125135
125326
  }
125327
+ await deleteHookByRunMarkerFile(basedir, marker2.fileId);
125136
125328
  }
125137
125329
  }
125138
125330
  async function handleLegacyEvent(basedir, runId, data, currentRun, params) {
@@ -125233,7 +125425,10 @@ function createRunsStorage(basedir, tag) {
125233
125425
  return true;
125234
125426
  },
125235
125427
  sortOrder: ((_a3 = params == null ? void 0 : params.pagination) == null ? void 0 : _a3.sortOrder) ?? "desc",
125236
- limit: (_b2 = params == null ? void 0 : params.pagination) == null ? void 0 : _b2.limit,
125428
+ // Each page pays a full directory scan, so larger default pages
125429
+ // keep unpaginated consumers (e.g. startup recovery) cheap over
125430
+ // large run histories.
125431
+ limit: ((_b2 = params == null ? void 0 : params.pagination) == null ? void 0 : _b2.limit) ?? 200,
125237
125432
  cursor: (_c2 = params == null ? void 0 : params.pagination) == null ? void 0 : _c2.cursor,
125238
125433
  getCreatedAt: getObjectCreatedAt("wrun"),
125239
125434
  getId: (run2) => run2.runId
@@ -125374,6 +125569,8 @@ async function repairHookEntityFromPersistedEvent(basedir, runId, hookId, persis
125374
125569
  isWebhook: eventData.isWebhook ?? true,
125375
125570
  isSystem: eventData.isSystem ?? false
125376
125571
  };
125572
+ await writeHookCreatedIndexEntries(basedir, eventData.token, runId, hookId, persistedEventId, tag);
125573
+ await writeHookByRunMarker(basedir, runId, hookId, tag);
125377
125574
  await writeExclusive(taggedPath(basedir, "hooks", hookId, tag), JSON.stringify(hook, jsonReplacer, 2));
125378
125575
  }
125379
125576
  async function pinCanonicalEventIdForLegacyClaim(basedir, token, runId, hookId, candidateEventId) {
@@ -126114,6 +126311,7 @@ function createEventsStorage(basedir, tag) {
126114
126311
  isSystem: hookData.isSystem ?? false
126115
126312
  };
126116
126313
  hookEntityWriteOptions = writeHookEntityWithOverwrite ? { overwrite: true } : void 0;
126314
+ await writeHookCreatedIndexEntries(basedir, hookData.token, effectiveRunId, data.correlationId, eventId, tag);
126117
126315
  } else if (data.eventType === "hook_disposed") {
126118
126316
  const lockPath = hookDisposeLockPath(basedir, data.correlationId, tag);
126119
126317
  const claimed = await writeExclusive(lockPath, "");
@@ -126127,6 +126325,7 @@ function createEventsStorage(basedir, tag) {
126127
126325
  await deleteJSON(hookRecoveryMarkerPath(basedir, existingHook.token, existingHook.runId, existingHook.hookId));
126128
126326
  }
126129
126327
  await deleteJSON(hookPath);
126328
+ await deleteHookByRunMarker(basedir, effectiveRunId, data.correlationId, tag);
126130
126329
  } else if (data.eventType === "wait_created" && "eventData" in data) {
126131
126330
  const waitCompositeKey = `${effectiveRunId}-${data.correlationId}`;
126132
126331
  const waitCreatedLockName = tag ? `${waitCompositeKey}.created.${tag}` : `${waitCompositeKey}.created`;
@@ -126184,6 +126383,7 @@ function createEventsStorage(basedir, tag) {
126184
126383
  }
126185
126384
  rememberStoredEvent(event, eventPath, serializedEvent);
126186
126385
  if (hook && data.eventType === "hook_created") {
126386
+ await writeHookByRunMarker(basedir, hook.runId, hook.hookId, tag);
126187
126387
  await writeJSON(taggedPath(basedir, "hooks", hook.hookId, tag), hook, hookEntityWriteOptions);
126188
126388
  }
126189
126389
  const resolveData = (params == null ? void 0 : params.resolveData) ?? DEFAULT_RESOLVE_DATA_OPTION$1;
@@ -126767,7 +126967,7 @@ function createWorld$1(args) {
126767
126967
  const basedir = mergedConfig.dataDir;
126768
126968
  const hooksDir = path$3.join(basedir, "hooks");
126769
126969
  const taggedHookFiles = await listTaggedFiles(hooksDir, tag);
126770
- const { HookSchema: HookSchema2 } = await import("./index-B_N7SdQh.js");
126970
+ const { HookSchema: HookSchema2 } = await import("./index-CJPCT6Jd.js");
126771
126971
  await Promise.all(taggedHookFiles.map(async (hookFile) => {
126772
126972
  const hook = await readJSON(path$3.join(hooksDir, hookFile), HookSchema2);
126773
126973
  if (hook == null ? void 0 : hook.token) {
@@ -126780,6 +126980,7 @@ function createWorld$1(args) {
126780
126980
  "steps",
126781
126981
  "events",
126782
126982
  "hooks",
126983
+ "hooks/by-run",
126783
126984
  "waits",
126784
126985
  "streams/runs"
126785
126986
  ];
@@ -126788,6 +126989,22 @@ function createWorld$1(args) {
126788
126989
  const files = await listTaggedFiles(fullDir, tag);
126789
126990
  await Promise.all(files.map((f2) => deleteJSON(path$3.join(fullDir, f2))));
126790
126991
  }));
126992
+ for (const indexDir of ["token-index", "id-index"]) {
126993
+ const fullIndexDir = path$3.join(basedir, "hooks", indexDir);
126994
+ let keyDirEntries;
126995
+ try {
126996
+ keyDirEntries = await promises.readdir(fullIndexDir, {
126997
+ withFileTypes: true
126998
+ });
126999
+ } catch {
127000
+ keyDirEntries = [];
127001
+ }
127002
+ await Promise.all(keyDirEntries.filter((entry2) => entry2.isDirectory()).map(async (entry2) => {
127003
+ const keyDir = path$3.join(fullIndexDir, entry2.name);
127004
+ const taggedEntryFiles = await listTaggedFiles(keyDir, tag);
127005
+ await Promise.all(taggedEntryFiles.map((f2) => deleteJSON(path$3.join(keyDir, f2))));
127006
+ }));
127007
+ }
126791
127008
  await promises.rm(path$3.join(basedir, ".locks"), { recursive: true, force: true }).catch(() => {
126792
127009
  });
126793
127010
  const chunksDir = path$3.join(basedir, "streams", "chunks");
@@ -126808,6 +127025,7 @@ function createWorld$1(args) {
126808
127025
  clearCreatedFilesCache();
126809
127026
  } else {
126810
127027
  clearCreatedFilesCache();
127028
+ resetHookIndexEnsureCache();
126811
127029
  await rm(mergedConfig.dataDir, { recursive: true, force: true });
126812
127030
  await initDataDir(mergedConfig.dataDir);
126813
127031
  }
@@ -126932,8 +127150,8 @@ function requireGetVercelOidcToken() {
126932
127150
  }
126933
127151
  try {
126934
127152
  const [{ getTokenPayload, isExpired }, { refreshToken }] = await Promise.all([
126935
- await import("./token-util-CthtfGuG.js").then((n) => n.t),
126936
- await import("./token-DDgfwjzz.js").then((n) => n.t)
127153
+ await import("./token-util-DaPlIe_a.js").then((n) => n.t),
127154
+ await import("./token-BqP-cpRD.js").then((n) => n.t)
126937
127155
  ]);
126938
127156
  if (!token || isExpired(getTokenPayload(token), options == null ? void 0 : options.expirationBufferMs)) {
126939
127157
  await refreshToken(options);
@@ -127774,7 +127992,7 @@ async function instrumentedFetch(opts) {
127774
127992
  return response2;
127775
127993
  });
127776
127994
  }
127777
- const version = "5.0.0-beta.24";
127995
+ const version = "5.0.0-beta.25";
127778
127996
  const IDEMPOTENT_METHODS = /* @__PURE__ */ new Set(["GET", "HEAD"]);
127779
127997
  const MAX_BODY_PARSE_RETRIES = 2;
127780
127998
  const BODY_PARSE_RETRY_BASE_MS = 100;
@@ -133407,6 +133625,8 @@ function buildPostFrameMeta(input) {
133407
133625
  meta2.hookIsSystem = input.hookIsSystem;
133408
133626
  if (input.errorCode !== void 0)
133409
133627
  meta2.errorCode = input.errorCode;
133628
+ if (input.cancelReason !== void 0)
133629
+ meta2.cancelReason = input.cancelReason;
133410
133630
  if (input.executionContext !== void 0) {
133411
133631
  meta2.executionContext = input.executionContext;
133412
133632
  }
@@ -133419,6 +133639,13 @@ function buildPostFrameMeta(input) {
133419
133639
  if (input.allowReservedAttributes !== void 0) {
133420
133640
  meta2.allowReservedAttributes = input.allowReservedAttributes;
133421
133641
  }
133642
+ if (input.ttfs !== void 0)
133643
+ meta2.ttfs = input.ttfs;
133644
+ if (input.stso !== void 0)
133645
+ meta2.stso = input.stso;
133646
+ if (input.optimizations !== void 0) {
133647
+ meta2.optimizations = input.optimizations;
133648
+ }
133422
133649
  if (input.sinceCursor !== void 0)
133423
133650
  meta2.sinceCursor = input.sinceCursor;
133424
133651
  if (input.skipPreload !== void 0)
@@ -133932,6 +134159,9 @@ function splitEventDataForV4(data) {
133932
134159
  if (typeof eventData.errorCode === "string") {
133933
134160
  meta2.errorCode = eventData.errorCode;
133934
134161
  }
134162
+ if (typeof eventData.cancelReason === "string") {
134163
+ meta2.cancelReason = eventData.cancelReason;
134164
+ }
133935
134165
  if (eventData.executionContext !== void 0 && eventData.executionContext !== null && typeof eventData.executionContext === "object") {
133936
134166
  meta2.executionContext = eventData.executionContext;
133937
134167
  }
@@ -133947,6 +134177,15 @@ function splitEventDataForV4(data) {
133947
134177
  if (typeof eventData.allowReservedAttributes === "boolean") {
133948
134178
  meta2.allowReservedAttributes = eventData.allowReservedAttributes;
133949
134179
  }
134180
+ if (typeof eventData.ttfs === "number") {
134181
+ meta2.ttfs = eventData.ttfs;
134182
+ }
134183
+ if (typeof eventData.stso === "number") {
134184
+ meta2.stso = eventData.stso;
134185
+ }
134186
+ if (Array.isArray(eventData.optimizations) && eventData.optimizations.every((o) => typeof o === "string")) {
134187
+ meta2.optimizations = eventData.optimizations;
134188
+ }
133950
134189
  let payload;
133951
134190
  if (payloadField && payloadField in eventData) {
133952
134191
  const value = eventData[payloadField];
@@ -157520,7 +157759,7 @@ const route4 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProper
157520
157759
  __proto__: null,
157521
157760
  loader
157522
157761
  }, Symbol.toStringTag, { value: "Module" }));
157523
- const serverManifest = { "entry": { "module": "/assets/entry.client-DQZ2hM2V.js", "imports": ["/assets/index-BXZSIDEp.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-BiHTsCtP.js", "imports": ["/assets/index-BXZSIDEp.js", "/assets/mermaid-3ZIDBTTL-QcES6x1o.js"], "css": ["/assets/root-BT69a3LD.css", "/assets/mermaid-3ZIDBTTL-DDxQhcP4.css"], "clientActionModule": void 0, "clientLoaderModule": void 0, "clientMiddlewareModule": void 0, "hydrateFallbackModule": void 0 }, "routes/home": { "id": "routes/home", "parentId": "root", "path": void 0, "index": true, "caseSensitive": void 0, "hasAction": false, "hasLoader": false, "hasClientAction": false, "hasClientLoader": false, "hasClientMiddleware": false, "hasDefaultExport": true, "hasErrorBoundary": false, "module": "/assets/home-DuZRFOMe.js", "imports": ["/assets/index-BXZSIDEp.js", "/assets/workflow-graph-viewer-CyKfZJOQ.js", "/assets/mermaid-3ZIDBTTL-QcES6x1o.js", "/assets/index-ConSkUmc.js"], "css": ["/assets/workflow-graph-viewer-DnlNuQQH.css", "/assets/mermaid-3ZIDBTTL-DDxQhcP4.css"], "clientActionModule": void 0, "clientLoaderModule": void 0, "clientMiddlewareModule": void 0, "hydrateFallbackModule": void 0 }, "routes/run-detail": { "id": "routes/run-detail", "parentId": "root", "path": "run/:runId", "index": void 0, "caseSensitive": void 0, "hasAction": false, "hasLoader": false, "hasClientAction": false, "hasClientLoader": false, "hasClientMiddleware": false, "hasDefaultExport": true, "hasErrorBoundary": false, "module": "/assets/run-detail-DSpZ5dnN.js", "imports": ["/assets/index-BXZSIDEp.js", "/assets/workflow-graph-viewer-CyKfZJOQ.js", "/assets/mermaid-3ZIDBTTL-QcES6x1o.js", "/assets/encryption-BQTnudEZ.js", "/assets/index-ConSkUmc.js"], "css": ["/assets/run-detail-CWoGxu_0.css", "/assets/workflow-graph-viewer-DnlNuQQH.css", "/assets/mermaid-3ZIDBTTL-DDxQhcP4.css"], "clientActionModule": void 0, "clientLoaderModule": void 0, "clientMiddlewareModule": void 0, "hydrateFallbackModule": void 0 }, "routes/api.rpc": { "id": "routes/api.rpc", "parentId": "root", "path": "api/rpc", "index": void 0, "caseSensitive": void 0, "hasAction": true, "hasLoader": true, "hasClientAction": false, "hasClientLoader": false, "hasClientMiddleware": false, "hasDefaultExport": false, "hasErrorBoundary": false, "module": "/assets/api.rpc-l0sNRNKZ.js", "imports": [], "css": [], "clientActionModule": void 0, "clientLoaderModule": void 0, "clientMiddlewareModule": void 0, "hydrateFallbackModule": void 0 }, "routes/api.stream.$streamId": { "id": "routes/api.stream.$streamId", "parentId": "root", "path": "api/stream/:streamId", "index": void 0, "caseSensitive": void 0, "hasAction": false, "hasLoader": true, "hasClientAction": false, "hasClientLoader": false, "hasClientMiddleware": false, "hasDefaultExport": false, "hasErrorBoundary": false, "module": "/assets/api.stream._streamId-l0sNRNKZ.js", "imports": [], "css": [], "clientActionModule": void 0, "clientLoaderModule": void 0, "clientMiddlewareModule": void 0, "hydrateFallbackModule": void 0 } }, "url": "/assets/manifest-bb838d97.js", "version": "bb838d97", "sri": void 0 };
157762
+ const serverManifest = { "entry": { "module": "/assets/entry.client-Q4eUIqMI.js", "imports": ["/assets/index-Q81MFBxC.js"], "css": [] }, "routes": { "root": { "id": "root", "parentId": void 0, "path": "", "index": void 0, "caseSensitive": void 0, "hasAction": true, "hasLoader": true, "hasClientAction": false, "hasClientLoader": false, "hasClientMiddleware": false, "hasDefaultExport": true, "hasErrorBoundary": true, "module": "/assets/root-DOkL1_-J.js", "imports": ["/assets/index-Q81MFBxC.js", "/assets/mermaid-3ZIDBTTL-BfwKRFTU.js", "/assets/arrow-up-right-nUJMbeWN.js"], "css": ["/assets/root-okIQN2A_.css", "/assets/mermaid-3ZIDBTTL-DDxQhcP4.css"], "clientActionModule": void 0, "clientLoaderModule": void 0, "clientMiddlewareModule": void 0, "hydrateFallbackModule": void 0 }, "routes/home": { "id": "routes/home", "parentId": "root", "path": void 0, "index": true, "caseSensitive": void 0, "hasAction": false, "hasLoader": false, "hasClientAction": false, "hasClientLoader": false, "hasClientMiddleware": false, "hasDefaultExport": true, "hasErrorBoundary": false, "module": "/assets/home-W4Ja_rr1.js", "imports": ["/assets/index-Q81MFBxC.js", "/assets/workflow-graph-viewer-CvsdACR5.js", "/assets/mermaid-3ZIDBTTL-BfwKRFTU.js", "/assets/index-STTN0-2V.js"], "css": ["/assets/workflow-graph-viewer-DnlNuQQH.css", "/assets/mermaid-3ZIDBTTL-DDxQhcP4.css"], "clientActionModule": void 0, "clientLoaderModule": void 0, "clientMiddlewareModule": void 0, "hydrateFallbackModule": void 0 }, "routes/run-detail": { "id": "routes/run-detail", "parentId": "root", "path": "run/:runId", "index": void 0, "caseSensitive": void 0, "hasAction": false, "hasLoader": false, "hasClientAction": false, "hasClientLoader": false, "hasClientMiddleware": false, "hasDefaultExport": true, "hasErrorBoundary": false, "module": "/assets/run-detail-CRleiBxx.js", "imports": ["/assets/index-Q81MFBxC.js", "/assets/workflow-graph-viewer-CvsdACR5.js", "/assets/mermaid-3ZIDBTTL-BfwKRFTU.js", "/assets/arrow-up-right-nUJMbeWN.js", "/assets/encryption-CLVP4klT.js", "/assets/index-STTN0-2V.js"], "css": ["/assets/run-detail-CWoGxu_0.css", "/assets/workflow-graph-viewer-DnlNuQQH.css", "/assets/mermaid-3ZIDBTTL-DDxQhcP4.css"], "clientActionModule": void 0, "clientLoaderModule": void 0, "clientMiddlewareModule": void 0, "hydrateFallbackModule": void 0 }, "routes/api.rpc": { "id": "routes/api.rpc", "parentId": "root", "path": "api/rpc", "index": void 0, "caseSensitive": void 0, "hasAction": true, "hasLoader": true, "hasClientAction": false, "hasClientLoader": false, "hasClientMiddleware": false, "hasDefaultExport": false, "hasErrorBoundary": false, "module": "/assets/api.rpc-l0sNRNKZ.js", "imports": [], "css": [], "clientActionModule": void 0, "clientLoaderModule": void 0, "clientMiddlewareModule": void 0, "hydrateFallbackModule": void 0 }, "routes/api.stream.$streamId": { "id": "routes/api.stream.$streamId", "parentId": "root", "path": "api/stream/:streamId", "index": void 0, "caseSensitive": void 0, "hasAction": false, "hasLoader": true, "hasClientAction": false, "hasClientLoader": false, "hasClientMiddleware": false, "hasDefaultExport": false, "hasErrorBoundary": false, "module": "/assets/api.stream._streamId-l0sNRNKZ.js", "imports": [], "css": [], "clientActionModule": void 0, "clientLoaderModule": void 0, "clientMiddlewareModule": void 0, "hydrateFallbackModule": void 0 } }, "url": "/assets/manifest-56b6d9e0.js", "version": "56b6d9e0", "sri": void 0 };
157524
157763
  const assetsBuildDirectory = "build/client";
157525
157764
  const basename = "/";
157526
157765
  const future = { "unstable_optimizeDeps": false, "unstable_subResourceIntegrity": false, "unstable_trailingSlashAwareDataRequests": false, "unstable_previewServerPrerendering": false, "v8_middleware": false, "v8_splitRouteModules": false, "v8_viteEnvironmentApi": false };