@workflow/web 4.1.31 → 4.1.33

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,5 +1,5 @@
1
1
  import { r as reactExports, j as jsxRuntimeExports, w as withComponentProps, x as withErrorBoundaryProps, M as Meta, L as Links, S as ScrollRestoration, y as Scripts, O as Outlet, z as useRouteError, i as isRouteErrorResponse, A as Link, B as useNavigate, C as useSearchParams } from "./index-BQ-Xa8kF.js";
2
- import { c as createLucideIcon, u as useServerConfig, T as Tooltip, a as TooltipTrigger, b as TooltipContent, r as runHealthCheck, t as toast, B as Button, L as LoaderCircle, d as cn, e as Toaster$1, S as ServerConfigProvider, f as TooltipProvider } from "./mermaid-3ZIDBTTL-DV4S4pTo.js";
2
+ import { c as createLucideIcon, u as useServerConfig, T as Tooltip, a as TooltipTrigger, b as TooltipContent, r as runHealthCheck, t as toast, B as Button, L as LoaderCircle, d as cn, e as Toaster$1, S as ServerConfigProvider, f as TooltipProvider } from "./mermaid-3ZIDBTTL-CCVNMOf9.js";
3
3
  var M = (e, i, s, u, m, a, l, h) => {
4
4
  let d = document.documentElement, w = ["light", "dark"];
5
5
  function p(n) {
@@ -1,6 +1,6 @@
1
1
  import { j as jsxRuntimeExports, r as reactExports, f as reactDomExports, D as ReactDOM, B as useNavigate, C as useSearchParams, A as Link, w as withComponentProps, G as useParams } from "./index-BQ-Xa8kF.js";
2
- import { O as Copy, C as CircleAlert, Q as parseStepName, B as parseWorkflowName, j as ChevronRight, q as Check, U as ErrorCard, V as format, Z as Zap, S as Send, R as ResolveHookModal, p as ChevronUp, o as ChevronDown, X, N as ErrorBoundary, Y as Clock, G as CircleX, I as unwrapServerActionResult, u as unwrapOrThrow, W as WorkflowWebAPIError, _ as useEscapeKeydown, t as composeEventHandlers, $ as useCallbackRef, a0 as useLayoutEffect2, s as useControllableState, a1 as useId, a2 as createContext2, v as Presence, x as createContextScope, l as hideOthers, m as ReactRemoveScroll, a3 as useFocusGuards, a4 as LAYOUT, a5 as wakeUpRun, r as resumeHook, A as Alert, c as AlertTitle, d as AlertDescription, a as Skeleton$1, a6 as RunActionsButtons, F as StatusBadge, e as CopyableText, b as RelativeTime, T as Tabs, K as TabsList, L as TabsTrigger, M as TabsContent, y as cancelRun, a7 as recreateRun } from "./workflow-graph-viewer-De_-9tJh.js";
3
- import { c as createLucideIcon, M as Spinner, h as useToast, N as useHasContextCardProvider, O as ContextCardProvider, U as ContextCardTrigger, W as Skeleton, X as DecryptClickContext, Y as Yr, Z as isEncryptedMarker, _ as formatDuration, $ as DataInspector, a0 as _r, a1 as StreamClickContext, a2 as isExpiredMarker, a3 as isDoStreamStep, a4 as extractConversation, a5 as Lock, a6 as EVENT_DATA_REF_FIELDS, a7 as clsx, a8 as useTraceViewer, a9 as styles, aa as formatDurationForTimeline, ab as formatWallClockTime, ac as useImmediateStyle, ad as TIMELINE_PADDING, ae as formatTimeSelection, af as MARKER_HEIGHT, ag as ROW_HEIGHT, ah as ROW_PADDING, ai as SEARCH_HEIGHT, aj as getHighResInMs, ak as getMsInHighRes, al as MARKER_NOTCH_HEIGHT, am as MAP_HEIGHT, an as SEARCH_GAP, ao as MiniMap, ap as SpanNodes, aq as SpanDetailPanel, ar as TraceViewerContextProvider, as as hydrateResourceIOWithKey, at as hydrateResourceIO, au as fetchHook, l as fetchEvents, F as fetchRun, av as fetchStep, aw as hasEncryptedFields, ax as fetchStreams, ay as Slot, E as useComposedRefs, az as Slottable, d as cn, aA as buttonVariants, aB as isEncryptedData, aC as hydrateData, aD as getWebRevivers, aE as fetchEvent, aF as fetchEventsByCorrelationId, T as Tooltip, a as TooltipTrigger, b as TooltipContent, aG as LIVE_UPDATE_INTERVAL_MS$1, u as useServerConfig, aH as getEncryptionKeyForRun, t as toast, L as LoaderCircle, aI as StreamViewer } from "./mermaid-3ZIDBTTL-DV4S4pTo.js";
2
+ import { O as Copy, C as CircleAlert, Q as parseStepName, B as parseWorkflowName, j as ChevronRight, q as Check, U as ErrorCard, V as format, Z as Zap, S as Send, R as ResolveHookModal, p as ChevronUp, o as ChevronDown, X, N as ErrorBoundary, Y as Clock, G as CircleX, I as unwrapServerActionResult, u as unwrapOrThrow, W as WorkflowWebAPIError, _ as useEscapeKeydown, t as composeEventHandlers, $ as useCallbackRef, a0 as useLayoutEffect2, s as useControllableState, a1 as useId, a2 as createContext2, v as Presence, x as createContextScope, l as hideOthers, m as ReactRemoveScroll, a3 as useFocusGuards, a4 as LAYOUT, a5 as wakeUpRun, r as resumeHook, A as Alert, c as AlertTitle, d as AlertDescription, a as Skeleton$1, a6 as RunActionsButtons, F as StatusBadge, e as CopyableText, b as RelativeTime, T as Tabs, K as TabsList, L as TabsTrigger, M as TabsContent, y as cancelRun, a7 as recreateRun } from "./workflow-graph-viewer-CTw33ANm.js";
3
+ import { c as createLucideIcon, M as Spinner, h as useToast, N as useHasContextCardProvider, O as ContextCardProvider, U as ContextCardTrigger, W as Skeleton, X as DecryptClickContext, Y as Yr, Z as isEncryptedMarker, _ as formatDuration, $ as DataInspector, a0 as _r, a1 as StreamClickContext, a2 as isExpiredMarker, a3 as isDoStreamStep, a4 as extractConversation, a5 as Lock, a6 as EVENT_DATA_REF_FIELDS, a7 as clsx, a8 as useTraceViewer, a9 as styles, aa as formatDurationForTimeline, ab as formatWallClockTime, ac as useImmediateStyle, ad as TIMELINE_PADDING, ae as formatTimeSelection, af as MARKER_HEIGHT, ag as ROW_HEIGHT, ah as ROW_PADDING, ai as SEARCH_HEIGHT, aj as getHighResInMs, ak as getMsInHighRes, al as MARKER_NOTCH_HEIGHT, am as MAP_HEIGHT, an as SEARCH_GAP, ao as MiniMap, ap as SpanNodes, aq as SpanDetailPanel, ar as TraceViewerContextProvider, as as hydrateResourceIOWithKey, at as hydrateResourceIO, au as fetchHook, l as fetchEvents, F as fetchRun, av as fetchStep, aw as hasEncryptedFields, ax as fetchStreams, ay as Slot, E as useComposedRefs, az as Slottable, d as cn, aA as buttonVariants, aB as isEncryptedData, aC as hydrateData, aD as SerializationFormat, aE as getWebRevivers, aF as fetchEvent, aG as fetchEventsByCorrelationId, T as Tooltip, a as TooltipTrigger, b as TooltipContent, aH as LIVE_UPDATE_INTERVAL_MS$1, u as useServerConfig, aI as getEncryptionKeyForRun, t as toast, L as LoaderCircle, aJ as StreamViewer } from "./mermaid-3ZIDBTTL-CCVNMOf9.js";
4
4
  import { decrypt, importKey } from "./encryption-Cu4jq70Y.js";
5
5
  import "./index-CXBr7N7m.js";
6
6
  /**
@@ -5768,8 +5768,12 @@ function sanitizeForDisplay(value, depth = 0) {
5768
5768
  }
5769
5769
  const yieldToMain = () => new Promise((resolve) => setTimeout(resolve, 0));
5770
5770
  const YIELD_EVERY_N_FRAMES = 64;
5771
- function detectEncoding(data) {
5771
+ function detectEncoding(data, streamId) {
5772
5772
  if (data.length < FRAME_HEADER_SIZE) return "framed";
5773
+ const prefix = new TextDecoder().decode(data.subarray(0, FRAME_HEADER_SIZE));
5774
+ if (streamId.endsWith("_system_abort") && Object.values(SerializationFormat).some((format2) => format2 === prefix)) {
5775
+ return "unframed";
5776
+ }
5773
5777
  const view = new DataView(data.buffer, data.byteOffset, data.byteLength);
5774
5778
  const len = view.getUint32(0, false);
5775
5779
  if (len > 0 && len <= 10 * 1024 * 1024) return "framed";
@@ -5888,7 +5892,14 @@ function useStreamReader(env, streamId, runId, encryptionKey, runStatus) {
5888
5892
  if (abortController.signal.aborted) break;
5889
5893
  const { value, done } = await reader.read();
5890
5894
  if (done) {
5891
- if (encoding === "legacy" && textRemainder.trim()) {
5895
+ if (encoding === "unframed" && buffer.length > 0) {
5896
+ frameIndex++;
5897
+ if (frameIndex > skipFrames) {
5898
+ const result = await processFrame(buffer, cryptoKey, revivers);
5899
+ if (result.encrypted) return { encrypted: true };
5900
+ targetBuffer.push(result.chunk);
5901
+ }
5902
+ } else if (encoding === "legacy" && textRemainder.trim()) {
5892
5903
  frameIndex++;
5893
5904
  if (frameIndex > skipFrames) {
5894
5905
  targetBuffer.push(parseLegacyLine(textRemainder.trim()));
@@ -5900,7 +5911,7 @@ function useStreamReader(env, streamId, runId, encryptionKey, runStatus) {
5900
5911
  if (encoding === null) {
5901
5912
  appendToBuffer(value);
5902
5913
  if (buffer.length >= FRAME_HEADER_SIZE) {
5903
- encoding = detectEncoding(buffer);
5914
+ encoding = detectEncoding(buffer, streamId);
5904
5915
  }
5905
5916
  if (encoding === "legacy") {
5906
5917
  textRemainder = decoder.decode(buffer, { stream: true });
@@ -5925,6 +5936,7 @@ function useStreamReader(env, streamId, runId, encryptionKey, runStatus) {
5925
5936
  }
5926
5937
  continue;
5927
5938
  }
5939
+ if (encoding === "unframed") continue;
5928
5940
  let offset = 0;
5929
5941
  let framesInBatch = 0;
5930
5942
  while (offset + FRAME_HEADER_SIZE <= buffer.length) {
@@ -1,7 +1,7 @@
1
1
  var __defProp = Object.defineProperty;
2
2
  var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
3
3
  var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
4
- import { c as createLucideIcon, aJ as cn, d as cn$1, G as cva, aK as composeRefs, E as useComposedRefs, aL as useFloating, aM as offset, aN as shift, aO as limitShift, aP as flip, aQ as size, aR as arrow, aS as hide, aT as autoUpdate, T as Tooltip, a as TooltipTrigger, b as TooltipContent, aU as cancelRun$1, aV as reenqueueRun$1, aW as wakeUpRun$1, aX as resumeHook$1, aY as recreateRun$1, v as createContextScope$1, n as useComposedRefs$1, w as createSlot, _ as formatDuration, B as Button, t as toast, p as useId$1, P as Primitive$1, o as composeEventHandlers$1, x as useControllableState$1, m as useCallbackRef$2, H as Presence$1 } from "./mermaid-3ZIDBTTL-DV4S4pTo.js";
4
+ import { c as createLucideIcon, aK as cn, d as cn$1, G as cva, aL as composeRefs, E as useComposedRefs, aM as useFloating, aN as offset, aO as shift, aP as limitShift, aQ as flip, aR as size, aS as arrow, aT as hide, aU as autoUpdate, T as Tooltip, a as TooltipTrigger, b as TooltipContent, aV as cancelRun$1, aW as reenqueueRun$1, aX as wakeUpRun$1, aY as resumeHook$1, aZ as recreateRun$1, v as createContextScope$1, n as useComposedRefs$1, w as createSlot, _ as formatDuration, B as Button, t as toast, p as useId$1, P as Primitive$1, o as composeEventHandlers$1, x as useControllableState$1, m as useCallbackRef$2, H as Presence$1 } from "./mermaid-3ZIDBTTL-CCVNMOf9.js";
5
5
  import { r as reactExports, j as jsxRuntimeExports, f as reactDomExports, R as ReactExports, H as React, D as ReactDOM, a as requireReact, g as getDefaultExportFromCjs } from "./index-BQ-Xa8kF.js";
6
6
  import { V as VERCEL_403_ERROR_MESSAGE } from "./index-CXBr7N7m.js";
7
7
  function parseName(tag, name) {
@@ -9457,7 +9457,7 @@ const app = express();
9457
9457
  app.all(
9458
9458
  "/{*splat}",
9459
9459
  createRequestHandler({
9460
- build: () => import("./server-build-C5Cjji9M.js").then((n) => n.a7)
9460
+ build: () => import("./server-build-D0sUavwG.js").then((n) => n.a7)
9461
9461
  })
9462
9462
  );
9463
9463
  app.use(
@@ -2,8 +2,8 @@ import { createRequire as __wkfCreateRequire } from "node:module";
2
2
  if (typeof globalThis.require === "undefined") {
3
3
  globalThis.require = __wkfCreateRequire(import.meta.url);
4
4
  }
5
- import { a1 as R, a2 as Ks, a3 as jsxRuntimeExports, a4 as Qe } from "./server-build-C5Cjji9M.js";
6
- import { r as reactExports } from "./app-BEfIuX74.js";
5
+ import { a1 as R, a2 as Ks, a3 as jsxRuntimeExports, a4 as Qe } from "./server-build-D0sUavwG.js";
6
+ import { r as reactExports } from "./app-DFeBwpXW.js";
7
7
  import "node:stream";
8
8
  import "util";
9
9
  import "crypto";
@@ -2,9 +2,9 @@ import { createRequire as __wkfCreateRequire } from "node:module";
2
2
  if (typeof globalThis.require === "undefined") {
3
3
  globalThis.require = __wkfCreateRequire(import.meta.url);
4
4
  }
5
- import { H as HookSchema } from "./server-build-C5Cjji9M.js";
6
- import { B, D, a, E, b, c, d, e, L, M, f, g, P, Q, h, R, S, i, j, k, l, m, n, o, p, T, q, r, s, t, u, V, W, v, w, x, y, z, A, C, F, G, I, J, K, O, U, X, Y, Z, _, $, a0 } from "./server-build-C5Cjji9M.js";
7
- import "./app-BEfIuX74.js";
5
+ import { H as HookSchema } from "./server-build-D0sUavwG.js";
6
+ import { B, D, a, E, b, c, d, e, L, M, f, g, P, Q, h, R, S, i, j, k, l, m, n, o, p, T, q, r, s, t, u, V, W, v, w, x, y, z, A, C, F, G, I, J, K, O, U, X, Y, Z, _, $, a0 } from "./server-build-D0sUavwG.js";
7
+ import "./app-DFeBwpXW.js";
8
8
  import "stream";
9
9
  import "express";
10
10
  import "node:stream";
@@ -2,8 +2,8 @@ import { createRequire as __wkfCreateRequire } from "node:module";
2
2
  if (typeof globalThis.require === "undefined") {
3
3
  globalThis.require = __wkfCreateRequire(import.meta.url);
4
4
  }
5
- import { N as Nt } from "./server-build-C5Cjji9M.js";
6
- import "./app-BEfIuX74.js";
5
+ import { N as Nt } from "./server-build-D0sUavwG.js";
6
+ import "./app-DFeBwpXW.js";
7
7
  import "stream";
8
8
  import "express";
9
9
  import "node:stream";