@workflow/web 5.0.0-beta.37 → 5.0.0-beta.38

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 (29) hide show
  1. package/build/client/assets/app-_i85JgUF.css +1 -0
  2. package/build/client/assets/{arrow-up-right-DDNPFYmg.js → arrow-up-right-BRTGGI7c.js} +1 -1
  3. package/build/client/assets/{highlighted-body-B3W2YXNL-CRgNr0YA.js → highlighted-body-B3W2YXNL-DwhUiBi7.js} +1 -1
  4. package/build/client/assets/{home-BqvW8ODs.js → home-DBrnNvHF.js} +3 -2
  5. package/build/client/assets/loader-circle-WvWWlrvM.js +12 -0
  6. package/build/client/assets/manifest-70ec0eba.js +1 -0
  7. package/build/client/assets/{mermaid-3ZIDBTTL-CMP9Tato.js → mermaid-3ZIDBTTL-xYKZZytQ.js} +203 -144
  8. package/build/client/assets/root-CINgYZFD.css +1 -0
  9. package/build/client/assets/{root-2ub-CsWS.js → root-Cimnh7R3.js} +6 -2
  10. package/build/client/assets/{run-detail-B1PK-m7y.js → run-detail-Dr7nmBuO.js} +56 -152
  11. package/build/client/assets/{workflow-graph-viewer-DOLwtzSv.js → workflow-graph-viewer-tTf4FHzV.js} +64 -85
  12. package/build/client/assets/{zstd-browser-decoder-BAY5XtBl.js → zstd-browser-decoder-B15ptsR4.js} +1 -1
  13. package/build/server/assets/{server-build-C11Xqmwk.js → app-BUMjG2-y.js} +129741 -120432
  14. package/build/server/assets/{highlighted-body-B3W2YXNL-DE3KXslx.js → highlighted-body-B3W2YXNL-Bkx5Bh9I.js} +3 -4
  15. package/build/server/assets/{index-M4Ai7vsa.js → index-DVvcuTAp.js} +5 -6
  16. package/build/server/assets/{mermaid-3ZIDBTTL-DjL45D7x.js → mermaid-3ZIDBTTL-CSJYRI2g.js} +4 -5
  17. package/build/server/assets/{token-Ulh8Tdgw.js → token-BXRDO8X7.js} +1 -2
  18. package/build/server/assets/{token-util-CiVcDWD3.js → token-util-2RA-Rh-5.js} +1 -2
  19. package/build/server/assets/{zstd-browser-decoder-tQARkzJ5.js → zstd-browser-decoder-Cqnyq-Ly.js} +4 -5
  20. package/build/server/index.js +41 -2
  21. package/handler.d.ts +22 -0
  22. package/handler.js +186 -0
  23. package/package.json +19 -7
  24. package/registry.d.ts +29 -0
  25. package/registry.js +89 -0
  26. package/build/client/assets/manifest-7f03c136.js +0 -1
  27. package/build/client/assets/root-15oK726f.css +0 -1
  28. package/build/client/assets/server-build-DblSGQ6A.css +0 -1
  29. package/build/server/assets/app-BaJoK9ck.js +0 -9217
@@ -1,4 +1,4 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/zstd-browser-decoder-BAY5XtBl.js","assets/index-PFjW8YjQ.js","assets/highlighted-body-B3W2YXNL-CRgNr0YA.js"])))=>i.map(i=>d[i]);
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/zstd-browser-decoder-B15ptsR4.js","assets/index-PFjW8YjQ.js","assets/highlighted-body-B3W2YXNL-DwhUiBi7.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);
@@ -6746,22 +6746,30 @@ const createLucideIcon = (iconName, iconNode) => {
6746
6746
  * This source code is licensed under the ISC license.
6747
6747
  * See the LICENSE file in the root directory of this source tree.
6748
6748
  */
6749
- const __iconNode$5 = [
6749
+ const __iconNode$6 = [
6750
6750
  ["path", { d: "m12 19-7-7 7-7", key: "1l729n" }],
6751
6751
  ["path", { d: "M19 12H5", key: "x3x0zl" }]
6752
6752
  ];
6753
- const ArrowLeft = createLucideIcon("arrow-left", __iconNode$5);
6753
+ const ArrowLeft = createLucideIcon("arrow-left", __iconNode$6);
6754
6754
  /**
6755
6755
  * @license lucide-react v0.575.0 - ISC
6756
6756
  *
6757
6757
  * This source code is licensed under the ISC license.
6758
6758
  * See the LICENSE file in the root directory of this source tree.
6759
6759
  */
6760
- const __iconNode$4 = [
6760
+ const __iconNode$5 = [
6761
6761
  ["path", { d: "M5 12h14", key: "1ays0h" }],
6762
6762
  ["path", { d: "m12 5 7 7-7 7", key: "xquz4c" }]
6763
6763
  ];
6764
- const ArrowRight = createLucideIcon("arrow-right", __iconNode$4);
6764
+ const ArrowRight = createLucideIcon("arrow-right", __iconNode$5);
6765
+ /**
6766
+ * @license lucide-react v0.575.0 - ISC
6767
+ *
6768
+ * This source code is licensed under the ISC license.
6769
+ * See the LICENSE file in the root directory of this source tree.
6770
+ */
6771
+ const __iconNode$4 = [["path", { d: "M20 6 9 17l-5-5", key: "1gmf2c" }]];
6772
+ const Check = createLucideIcon("check", __iconNode$4);
6765
6773
  /**
6766
6774
  * @license lucide-react v0.575.0 - ISC
6767
6775
  *
@@ -6784,8 +6792,11 @@ const ChevronRight = createLucideIcon("chevron-right", __iconNode$2);
6784
6792
  * This source code is licensed under the ISC license.
6785
6793
  * See the LICENSE file in the root directory of this source tree.
6786
6794
  */
6787
- const __iconNode$1 = [["path", { d: "M21 12a9 9 0 1 1-6.219-8.56", key: "13zald" }]];
6788
- const LoaderCircle = createLucideIcon("loader-circle", __iconNode$1);
6795
+ const __iconNode$1 = [
6796
+ ["rect", { width: "14", height: "14", x: "8", y: "8", rx: "2", ry: "2", key: "17jyea" }],
6797
+ ["path", { d: "M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2", key: "zix9uf" }]
6798
+ ];
6799
+ const Copy = createLucideIcon("copy", __iconNode$1);
6789
6800
  /**
6790
6801
  * @license lucide-react v0.575.0 - ISC
6791
6802
  *
@@ -17254,7 +17265,7 @@ async function hydrateResourceIOAsync(resource, key) {
17254
17265
  return { hydrateDataWithKey: hydrateDataWithKey3, deriveRunPayloadKeys: deriveRunPayloadKeys3 };
17255
17266
  }, true ? void 0 : void 0);
17256
17267
  const { ensureZstdDecoderRegistered } = await __vitePreload(async () => {
17257
- const { ensureZstdDecoderRegistered: ensureZstdDecoderRegistered2 } = await import("./zstd-browser-decoder-BAY5XtBl.js");
17268
+ const { ensureZstdDecoderRegistered: ensureZstdDecoderRegistered2 } = await import("./zstd-browser-decoder-B15ptsR4.js");
17258
17269
  return { ensureZstdDecoderRegistered: ensureZstdDecoderRegistered2 };
17259
17270
  }, true ? __vite__mapDeps([0,1]) : void 0);
17260
17271
  ensureZstdDecoderRegistered();
@@ -18529,6 +18540,27 @@ const cva = (base, config2) => (props) => {
18529
18540
  }, []);
18530
18541
  return cx(base, getVariantClassNames, getCompoundVariantClassNames, props === null || props === void 0 ? void 0 : props.class, props === null || props === void 0 ? void 0 : props.className);
18531
18542
  };
18543
+ function CopyButton({ copyText, ariaLabel, className }) {
18544
+ const [copied, setCopied] = reactExports.useState(false);
18545
+ const timeoutRef = reactExports.useRef(null);
18546
+ reactExports.useEffect(() => {
18547
+ return () => {
18548
+ if (timeoutRef.current) {
18549
+ clearTimeout(timeoutRef.current);
18550
+ }
18551
+ };
18552
+ }, []);
18553
+ return jsxRuntimeExports.jsx("button", { type: "button", "aria-label": ariaLabel, className: cn$4("cursor-pointer text-gray-800 hover:text-gray-1000 bg-transparent border-0 p-1 m-0", className), onClick: (e) => {
18554
+ e.stopPropagation();
18555
+ if (timeoutRef.current) {
18556
+ clearTimeout(timeoutRef.current);
18557
+ }
18558
+ void navigator.clipboard.writeText(copyText).then(() => {
18559
+ setCopied(true);
18560
+ timeoutRef.current = setTimeout(() => setCopied(false), 1e3);
18561
+ });
18562
+ }, children: jsxRuntimeExports.jsxs("div", { className: "relative w-3 h-3", children: [jsxRuntimeExports.jsx("div", { className: cn$4("absolute inset-0 flex items-center justify-center transition-all duration-150 ease-out", copied ? "scale-100 opacity-100" : "scale-0 opacity-0"), children: jsxRuntimeExports.jsx(Check, { className: "w-3 h-3" }) }), jsxRuntimeExports.jsx("div", { className: cn$4("absolute inset-0 flex items-center justify-center transition-all duration-150 ease-out", copied ? "scale-0 opacity-0" : "scale-100 opacity-100"), children: jsxRuntimeExports.jsx(Copy, { className: "w-3 h-3" }) })] }) });
18563
+ }
18532
18564
  const CollapsibleContext = reactExports.createContext(null);
18533
18565
  function useCollapsibleContext(part) {
18534
18566
  const context = reactExports.useContext(CollapsibleContext);
@@ -19211,6 +19243,29 @@ function isDeepEqual(a2, b2, seen2 = /* @__PURE__ */ new WeakMap()) {
19211
19243
  }
19212
19244
  return true;
19213
19245
  }
19246
+ const encryptedPlaceholderPreview = `{
19247
+ "input": "[encrypted]",
19248
+ "result": "[encrypted]"
19249
+ }`;
19250
+ function EncryptedDataBlock() {
19251
+ const ctx = reactExports.useContext(DecryptClickContext);
19252
+ return jsxRuntimeExports.jsxs("div", { className: "relative min-h-20 overflow-hidden rounded-md border border-gray-alpha-400 bg-background-100", children: [jsxRuntimeExports.jsx("pre", { "aria-hidden": "true", className: "pointer-events-none m-0 select-none p-3 font-mono text-label-12 text-gray-900 blur-[4px]", children: encryptedPlaceholderPreview }), jsxRuntimeExports.jsx("div", { className: "absolute inset-0 flex items-center justify-center", children: ctx ? jsxRuntimeExports.jsxs(Button$1, { onClick: ctx.onDecrypt, disabled: ctx.isDecrypting, size: "xs", children: [ctx.isDecrypting ? jsxRuntimeExports.jsx(Spinner, { size: 10 }) : jsxRuntimeExports.jsx(Lock, { className: "h-3 w-3" }), jsxRuntimeExports.jsx("span", { children: "Decrypt" })] }) : jsxRuntimeExports.jsxs("span", { className: "inline-flex items-center gap-1 rounded border border-gray-alpha-400 bg-gray-100 px-1.5 py-0.5 text-button-12 font-medium text-gray-700", children: [jsxRuntimeExports.jsx(Lock, { className: "h-3 w-3" }), "Encrypted"] }) })] });
19253
+ }
19254
+ const serializeForClipboard = (value) => {
19255
+ if (typeof value === "string")
19256
+ return value;
19257
+ if (typeof value === "number" || typeof value === "boolean" || value === null) {
19258
+ return String(value);
19259
+ }
19260
+ try {
19261
+ return JSON.stringify(value, null, 2);
19262
+ } catch {
19263
+ return String(value);
19264
+ }
19265
+ };
19266
+ function CopyableDataBlock({ data }) {
19267
+ return jsxRuntimeExports.jsxs("div", { className: "relative overflow-x-auto rounded-md border border-gray-alpha-400 p-3", children: [jsxRuntimeExports.jsx(CopyButton, { copyText: serializeForClipboard(data), ariaLabel: "Copy data", className: "absolute right-2 top-2 z-10 flex h-6 w-6 items-center justify-center rounded-md border border-gray-alpha-400 !bg-background-100 p-0 text-gray-900 transition-transform transition-colors duration-100 hover:bg-gray-200 active:scale-95 active:bg-gray-300" }), jsxRuntimeExports.jsx(DataInspector, { data })] });
19268
+ }
19214
19269
  function setRef(ref, value) {
19215
19270
  if (typeof ref === "function") {
19216
19271
  return ref(value);
@@ -44813,7 +44868,7 @@ var tn = f("block", "before:content-[counter(line)]", "before:inline-block", "be
44813
44868
  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 });
44814
44869
  var Se = reactExports.createContext({ code: "" }), de = () => reactExports.useContext(Se);
44815
44870
  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 }) });
44816
- var cn$1 = /\n+$/, dn = reactExports.lazy(() => __vitePreload(() => import("./highlighted-body-B3W2YXNL-CRgNr0YA.js"), true ? __vite__mapDeps([2,1]) : void 0).then((e) => ({ default: e.HighlightedCodeBlockBody }))), rt = ({ code: e, language: t, className: o, children: n, isIncomplete: s2 = false, ...r2 }) => {
44871
+ var cn$1 = /\n+$/, dn = reactExports.lazy(() => __vitePreload(() => import("./highlighted-body-B3W2YXNL-DwhUiBi7.js"), true ? __vite__mapDeps([2,1]) : void 0).then((e) => ({ default: e.HighlightedCodeBlockBody }))), rt = ({ code: e, language: t, className: o, children: n, isIncomplete: s2 = false, ...r2 }) => {
44817
44872
  let i = reactExports.useMemo(() => e.replace(cn$1, ""), [e]), c = reactExports.useMemo(() => ({ bg: "transparent", fg: "inherit", tokens: i.split(`
44818
44873
  `).map((a2) => [{ content: a2, color: "inherit", bgColor: "transparent", htmlStyle: {}, offset: 0 }]) }), [i]);
44819
44874
  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 }) })] }) });
@@ -46822,15 +46877,18 @@ reactExports.memo(function MiniMap({ timelineRef, rows, scale }) {
46822
46877
  height: MAP_HEIGHT - 4
46823
46878
  } })] });
46824
46879
  });
46825
- const ChunkRow = ReactExports.memo(function ChunkRow2({ chunk, index: index2 }) {
46826
- return jsxRuntimeExports.jsx("div", { className: "text-[11px] rounded-md border p-3", style: {
46827
- borderColor: "var(--ds-gray-300)",
46828
- backgroundColor: "var(--ds-gray-100)"
46829
- }, children: jsxRuntimeExports.jsxs("div", { className: "flex items-start gap-2", children: [jsxRuntimeExports.jsxs("span", { className: "select-none pt-px", style: { color: "var(--ds-gray-500)" }, children: ["[", index2, "]"] }), jsxRuntimeExports.jsx("div", { className: "min-w-0 flex-1", children: typeof chunk.value === "string" ? jsxRuntimeExports.jsx("span", { className: "whitespace-pre-wrap break-words", style: { color: "var(--ds-gray-1000)" }, children: chunk.value }) : jsxRuntimeExports.jsx(DataInspector, { data: chunk.value, expandLevel: 1 }) })] }) });
46830
- });
46831
- function StreamSkeleton() {
46832
- return jsxRuntimeExports.jsxs("div", { className: "flex flex-col gap-3 animate-in fade-in", children: [jsxRuntimeExports.jsx(Skeleton$1, { style: { width: 120, height: 16, borderRadius: 4 } }), [1, 2, 3, 4].map((i) => jsxRuntimeExports.jsx(Skeleton$1, { style: { height: 56, borderRadius: 6 } }, i))] });
46880
+ const STREAM_SKELETON_ROWS = [
46881
+ { id: "stream-skeleton-row-1", width: "72%" },
46882
+ { id: "stream-skeleton-row-2", width: "58%" },
46883
+ { id: "stream-skeleton-row-3", width: "80%" },
46884
+ { id: "stream-skeleton-row-4", width: "64%" }
46885
+ ];
46886
+ function StreamViewerSkeleton() {
46887
+ return jsxRuntimeExports.jsxs("output", { "aria-busy": "true", "aria-label": "Loading stream", className: "flex h-full min-h-0 w-full flex-col overflow-hidden bg-background-100", children: [jsxRuntimeExports.jsx("span", { className: "sr-only", children: "Loading stream…" }), jsxRuntimeExports.jsx("div", { className: "flex h-10 min-h-10 items-center border-b border-gray-alpha-400 px-3", children: jsxRuntimeExports.jsx(Skeleton$1, { className: "h-3 w-10" }) }), jsxRuntimeExports.jsx("div", { className: "flex flex-col", children: STREAM_SKELETON_ROWS.map((row) => jsxRuntimeExports.jsxs("div", { className: "flex h-10 items-center gap-2 border-b border-gray-alpha-400 px-3", children: [jsxRuntimeExports.jsx(Skeleton$1, { className: "h-3", style: { width: row.width } }), jsxRuntimeExports.jsx(Skeleton$1, { className: "h-4 w-4 shrink-0 rounded-sm" })] }, row.id)) })] });
46833
46888
  }
46889
+ const ChunkRow = ReactExports.memo(function ChunkRow2({ chunk }) {
46890
+ return jsxRuntimeExports.jsxs("div", { className: "flex w-full items-start gap-1 border-b border-gray-alpha-400 px-3 py-2", children: [jsxRuntimeExports.jsx("div", { className: "min-w-0 flex-1", children: typeof chunk.value === "string" ? jsxRuntimeExports.jsx("span", { className: "whitespace-pre-wrap break-words text-label-12 font-mono text-gray-1000", children: chunk.value }) : jsxRuntimeExports.jsx(DataInspector, { data: chunk.value, expandLevel: 1 }) }), jsxRuntimeExports.jsx(CopyButton, { copyText: serializeForClipboard(chunk.value), ariaLabel: "Copy chunk", className: "shrink-0 -mr-1 [&>div]:h-4 [&>div]:w-4 [&_svg]:h-4 [&_svg]:w-4" })] });
46891
+ });
46834
46892
  function StreamViewer({ streamId: _streamId, chunks, isLive, error, isLoading, onScrollEnd }) {
46835
46893
  const virtuosoRef = reactExports.useRef(null);
46836
46894
  const prevChunkCountRef = reactExports.useRef(0);
@@ -46845,17 +46903,9 @@ function StreamViewer({ streamId: _streamId, chunks, isLive, error, isLoading, o
46845
46903
  prevChunkCountRef.current = chunks.length;
46846
46904
  }, [chunks.length]);
46847
46905
  if (isLoading && chunks.length === 0) {
46848
- return jsxRuntimeExports.jsx("div", { className: "flex flex-col h-full", children: jsxRuntimeExports.jsx(StreamSkeleton, {}) });
46849
- }
46850
- return jsxRuntimeExports.jsxs("div", { className: "flex flex-col h-full", children: [isLive && jsxRuntimeExports.jsxs("div", { className: "flex items-center gap-1.5 mb-2 px-1", children: [jsxRuntimeExports.jsx("span", { className: "inline-block w-2 h-2 rounded-full", style: { backgroundColor: "var(--ds-green-600)" } }), jsxRuntimeExports.jsx("span", { className: "text-xs", style: { color: "var(--ds-green-700)" }, children: "Live" })] }), chunks.length > 0 && jsxRuntimeExports.jsxs("div", { className: "flex items-center gap-2 mb-2 px-1", children: [jsxRuntimeExports.jsx("span", { className: "text-[13px] font-medium", style: { color: "var(--ds-gray-900)" }, children: "Stream Chunks" }), jsxRuntimeExports.jsxs("span", { className: "text-xs tabular-nums", style: { color: "var(--ds-gray-600)" }, children: ["(", chunks.length, ")"] })] }), jsxRuntimeExports.jsx("div", { className: "flex-1 min-h-0", children: error ? jsxRuntimeExports.jsxs("div", { className: "text-[11px] rounded-md border p-3", style: {
46851
- borderColor: "var(--ds-red-300)",
46852
- backgroundColor: "var(--ds-red-100)",
46853
- color: "var(--ds-red-700)"
46854
- }, children: [jsxRuntimeExports.jsx("div", { children: "Error reading stream:" }), jsxRuntimeExports.jsx("div", { children: error })] }) : chunks.length === 0 ? jsxRuntimeExports.jsx("div", { className: "text-[11px] rounded-md border p-3", style: {
46855
- borderColor: "var(--ds-gray-300)",
46856
- backgroundColor: "var(--ds-gray-100)",
46857
- color: "var(--ds-gray-600)"
46858
- }, children: isLive ? "Waiting for stream data..." : "Stream is empty" }) : jsxRuntimeExports.jsx(Yr, { ref: virtuosoRef, totalCount: chunks.length, overscan: 10, endReached: () => onScrollEnd == null ? void 0 : onScrollEnd(), itemContent: (index2) => jsxRuntimeExports.jsx("div", { style: { paddingBottom: 8 }, children: jsxRuntimeExports.jsx(ChunkRow, { chunk: chunks[index2], index: index2 }) }), style: { flex: 1, minHeight: 0 } }) })] });
46906
+ return jsxRuntimeExports.jsx(StreamViewerSkeleton, {});
46907
+ }
46908
+ return jsxRuntimeExports.jsxs("div", { className: "flex h-full w-full flex-col overflow-hidden bg-background-100", children: [jsxRuntimeExports.jsx("div", { className: "flex h-10 min-h-10 items-center gap-1.5 border-b border-gray-alpha-400 px-3", children: isLive && jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [jsxRuntimeExports.jsx("span", { className: "inline-block h-2 w-2 rounded-full bg-green-600" }), jsxRuntimeExports.jsx("span", { className: "text-label-12 text-green-700", children: "Live" })] }) }), jsxRuntimeExports.jsx("div", { className: "flex-1 min-h-0", children: error ? jsxRuntimeExports.jsxs("div", { className: "border-b border-red-400 bg-red-100 px-3 py-2 text-label-12 text-red-900", children: [jsxRuntimeExports.jsx("div", { children: "Error reading stream:" }), jsxRuntimeExports.jsx("div", { children: error })] }) : chunks.length === 0 ? jsxRuntimeExports.jsx("div", { className: "flex h-10 items-center border-b border-gray-alpha-400 bg-background-200 px-3 text-label-12 text-gray-900", children: isLive ? "Waiting for stream data..." : "Stream is empty" }) : jsxRuntimeExports.jsx(Yr, { ref: virtuosoRef, totalCount: chunks.length, overscan: 10, endReached: () => onScrollEnd == null ? void 0 : onScrollEnd(), itemContent: (index2) => jsxRuntimeExports.jsx("div", { className: "w-full", children: jsxRuntimeExports.jsx(ChunkRow, { chunk: chunks[index2] }) }), style: { flex: 1, minHeight: 0 } }) })] });
46859
46909
  }
46860
46910
  const iconButtonVariants = cva([
46861
46911
  "m-0 inline-flex shrink-0 appearance-none items-center justify-center border-0 bg-transparent p-0 align-baseline font-inherit no-underline [background:none] [-webkit-appearance:none] [-webkit-tap-highlight-color:transparent]",
@@ -50379,9 +50429,13 @@ defaultEncoder.encodeAsAsyncIterable;
50379
50429
  const REUSE_BUFFER_MODE = 512;
50380
50430
  const RESET_BUFFER_MODE = 1024;
50381
50431
  const THROW_ON_ITERABLE = 2048;
50432
+ function apiBase() {
50433
+ if (typeof window === "undefined") return "";
50434
+ return window.__WORKFLOW_BASENAME__ ?? "";
50435
+ }
50382
50436
  async function rpc(method, params) {
50383
50437
  var _a3;
50384
- const res = await fetch("/api/rpc", {
50438
+ const res = await fetch(`${apiBase()}/api/rpc`, {
50385
50439
  method: "POST",
50386
50440
  headers: {
50387
50441
  "Content-Type": "application/cbor",
@@ -50471,126 +50525,131 @@ const mermaid3ZIDBTTL = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.def
50471
50525
  Mermaid: Nt
50472
50526
  }, Symbol.toStringTag, { value: "Module" }));
50473
50527
  export {
50474
- Spinner as $,
50528
+ CollapsibleTrigger as $,
50475
50529
  Anchor as A,
50476
50530
  Button as B,
50477
- ChevronRight as C,
50531
+ Check as C,
50478
50532
  DEFAULT_PAGE_SIZE as D,
50479
- useControllableState as E,
50480
- Root2 as F,
50481
- Arrow as G,
50482
- ChevronDown as H,
50483
- useComposedRefs as I,
50484
- fetchRun as J,
50533
+ createSlot as E,
50534
+ Content as F,
50535
+ useControllableState as G,
50536
+ Root2 as H,
50537
+ Arrow as I,
50538
+ ChevronDown as J,
50485
50539
  Ks as K,
50486
- LoaderCircle as L,
50487
- cva as M,
50488
- Presence as N,
50489
- createContext2 as O,
50540
+ useComposedRefs as L,
50541
+ fetchRun as M,
50542
+ cva as N,
50543
+ Presence as O,
50490
50544
  Primitive as P,
50491
50545
  Qe as Q,
50492
50546
  R,
50493
50547
  ServerConfigProvider as S,
50494
50548
  Tooltip as T,
50495
- fetchWorkflowsManifest as U,
50549
+ createContext2 as U,
50496
50550
  VISUALLY_HIDDEN_STYLES as V,
50497
- cn$4 as W,
50498
- DataInspector as X,
50499
- DecryptClickContext as Y,
50500
- Button$1 as Z,
50551
+ fetchWorkflowsManifest as W,
50552
+ cn$4 as X,
50553
+ CopyableDataBlock as Y,
50554
+ CollapsibleRoot as Z,
50501
50555
  __vitePreload as _,
50502
50556
  TooltipTrigger as a,
50503
- fetchEvent as a$,
50504
- Lock as a0,
50505
- CollapsibleRoot as a1,
50506
- CollapsibleTrigger as a2,
50507
- CollapsibleContent as a3,
50508
- RESERVED_ATTRIBUTE_KEY_PREFIX as a4,
50509
- ContextCardProvider as a5,
50510
- Skeleton$1 as a6,
50557
+ Slot as a$,
50558
+ CollapsibleContent as a0,
50559
+ CopyButton as a1,
50560
+ RESERVED_ATTRIBUTE_KEY_PREFIX as a2,
50561
+ Spinner as a3,
50562
+ ContextCardProvider as a4,
50563
+ Skeleton$1 as a5,
50564
+ DecryptClickContext as a6,
50511
50565
  Yr as a7,
50512
50566
  isEncryptedMarker$1 as a8,
50513
50567
  TimestampTooltip as a9,
50514
- getSpanDurationMs as aA,
50515
- isSpanErrored as aB,
50516
- formatDurationPrecise as aC,
50517
- TooltipProvider as aD,
50518
- ActiveSpanProvider as aE,
50519
- useReducedMotion as aF,
50520
- searchSpans as aG,
50521
- computeRootBounds as aH,
50522
- computeTimeMarkers as aI,
50523
- clampViewportToRoot as aJ,
50524
- getHighResInMs as aK,
50525
- scrollRowIntoView as aL,
50526
- TIMELINE_PADDING_PX as aM,
50527
- Minimap as aN,
50528
- Timeline as aO,
50529
- TimelineHeader as aP,
50530
- wheelZoomScaleFactor as aQ,
50531
- wheelDeltaToPixels as aR,
50532
- SidebarDataProvider as aS,
50533
- fetchHook as aT,
50534
- hydrateResourceIOAsync as aU,
50535
- fetchStep as aV,
50536
- hydrateResourceIO as aW,
50537
- fetchStreams as aX,
50538
- Slot as aY,
50539
- Slottable as aZ,
50540
- buttonVariants as a_,
50568
+ isSpanDimmedBySearch as aA,
50569
+ ROW_HEIGHT_PX as aB,
50570
+ getSpanDurationMs as aC,
50571
+ isSpanErrored as aD,
50572
+ formatDurationPrecise as aE,
50573
+ TooltipProvider as aF,
50574
+ ActiveSpanProvider as aG,
50575
+ useReducedMotion as aH,
50576
+ searchSpans as aI,
50577
+ computeRootBounds as aJ,
50578
+ computeTimeMarkers as aK,
50579
+ clampViewportToRoot as aL,
50580
+ getHighResInMs as aM,
50581
+ scrollRowIntoView as aN,
50582
+ TIMELINE_PADDING_PX as aO,
50583
+ Minimap as aP,
50584
+ Timeline as aQ,
50585
+ TimelineHeader as aR,
50586
+ wheelZoomScaleFactor as aS,
50587
+ wheelDeltaToPixels as aT,
50588
+ SidebarDataProvider as aU,
50589
+ fetchHook as aV,
50590
+ hydrateResourceIOAsync as aW,
50591
+ fetchStep as aX,
50592
+ hydrateResourceIO as aY,
50593
+ fetchStreams as aZ,
50594
+ apiBase as a_,
50541
50595
  formatDuration as aa,
50542
- isHookLifecycleEventType as ab,
50543
- isTerminalStepEventType as ac,
50544
- isWaitEventType as ad,
50545
- isStepEventType as ae,
50546
- _r as af,
50547
- RunClickContext as ag,
50548
- StreamClickContext as ah,
50549
- Collapsible as ai,
50550
- isExpiredMarker as aj,
50551
- isDoStreamStep as ak,
50552
- extractConversation as al,
50553
- getEventDataRefFields as am,
50554
- hasEncryptedFields as an,
50555
- useSidebarDataOptional as ao,
50556
- isTerminalWorkflowRunStatus as ap,
50557
- clsx as aq,
50558
- useActiveSpan as ar,
50559
- useSidebarData as as,
50560
- Tooltip$1 as at,
50561
- TooltipTrigger$1 as au,
50562
- IconButton as av,
50563
- TooltipContent$1 as aw,
50564
- useRowWindow as ax,
50565
- isSpanDimmedBySearch as ay,
50566
- ROW_HEIGHT_PX as az,
50596
+ DataInspector as ab,
50597
+ isHookLifecycleEventType as ac,
50598
+ isTerminalStepEventType as ad,
50599
+ isWaitEventType as ae,
50600
+ isStepEventType as af,
50601
+ _r as ag,
50602
+ RunClickContext as ah,
50603
+ StreamClickContext as ai,
50604
+ Collapsible as aj,
50605
+ isExpiredMarker as ak,
50606
+ isDoStreamStep as al,
50607
+ extractConversation as am,
50608
+ EncryptedDataBlock as an,
50609
+ getEventDataRefFields as ao,
50610
+ hasEncryptedFields as ap,
50611
+ useSidebarDataOptional as aq,
50612
+ isTerminalWorkflowRunStatus as ar,
50613
+ clsx as as,
50614
+ useActiveSpan as at,
50615
+ useSidebarData as au,
50616
+ Tooltip$1 as av,
50617
+ TooltipTrigger$1 as aw,
50618
+ IconButton as ax,
50619
+ TooltipContent$1 as ay,
50620
+ useRowWindow as az,
50567
50621
  TooltipContent as b,
50568
- fetchEventsByCorrelationId as b0,
50569
- isEncryptedData as b1,
50570
- hydrateData as b2,
50571
- decrypt as b3,
50572
- deriveRunPayloadKeys as b4,
50573
- getWebRevivers as b5,
50574
- LIVE_UPDATE_INTERVAL_MS as b6,
50575
- getEncryptionKeyForRun as b7,
50576
- StreamViewer as b8,
50577
- composeRefs as b9,
50578
- useFloating as ba,
50579
- offset as bb,
50580
- shift as bc,
50581
- limitShift as bd,
50582
- flip as be,
50583
- size as bf,
50584
- arrow as bg,
50585
- hide as bh,
50586
- autoUpdate as bi,
50587
- VERCEL_403_ERROR_MESSAGE as bj,
50588
- cancelRun as bk,
50589
- reenqueueRun as bl,
50590
- wakeUpRun as bm,
50591
- resumeHook as bn,
50592
- fetchHookToken as bo,
50593
- recreateRun as bp,
50622
+ Slottable as b0,
50623
+ buttonVariants as b1,
50624
+ fetchEvent as b2,
50625
+ fetchEventsByCorrelationId as b3,
50626
+ isEncryptedData as b4,
50627
+ hydrateData as b5,
50628
+ decrypt as b6,
50629
+ deriveRunPayloadKeys as b7,
50630
+ getWebRevivers as b8,
50631
+ LIVE_UPDATE_INTERVAL_MS as b9,
50632
+ getEncryptionKeyForRun as ba,
50633
+ StreamViewerSkeleton as bb,
50634
+ Lock as bc,
50635
+ StreamViewer as bd,
50636
+ composeRefs as be,
50637
+ useFloating as bf,
50638
+ offset as bg,
50639
+ shift as bh,
50640
+ limitShift as bi,
50641
+ flip as bj,
50642
+ size as bk,
50643
+ arrow as bl,
50644
+ hide as bm,
50645
+ autoUpdate as bn,
50646
+ VERCEL_403_ERROR_MESSAGE as bo,
50647
+ cancelRun as bp,
50648
+ reenqueueRun as bq,
50649
+ wakeUpRun as br,
50650
+ resumeHook as bs,
50651
+ fetchHookToken as bt,
50652
+ recreateRun as bu,
50594
50653
  createLucideIcon as c,
50595
50654
  runHealthCheck as d,
50596
50655
  cn as e,
@@ -50600,19 +50659,19 @@ export {
50600
50659
  fetchRuns as i,
50601
50660
  fetchHooks as j,
50602
50661
  getPaginationDisplay as k,
50603
- fetchEvents as l,
50604
- useCallbackRef as m,
50605
- useComposedRefs$1 as n,
50606
- composeEventHandlers as o,
50607
- useLayoutEffect2 as p,
50608
- Portal$1 as q,
50662
+ Copy as l,
50663
+ ChevronRight as m,
50664
+ fetchEvents as n,
50665
+ useCallbackRef as o,
50666
+ useComposedRefs$1 as p,
50667
+ composeEventHandlers as q,
50609
50668
  registerZstdDecoder as r,
50610
- useId as s,
50669
+ useLayoutEffect2 as s,
50611
50670
  toast as t,
50612
50671
  useServerConfig as u,
50613
- createPopperScope as v,
50614
- DismissableLayer as w,
50615
- createContextScope as x,
50616
- createSlot as y,
50617
- Content as z
50672
+ Portal$1 as v,
50673
+ useId as w,
50674
+ createPopperScope as x,
50675
+ DismissableLayer as y,
50676
+ createContextScope as z
50618
50677
  };