@workflow/web 5.0.6 → 5.0.7

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 (21) hide show
  1. package/build/client/assets/{arrow-up-right-DDLzuSl1.js → arrow-up-right-a32MzRMp.js} +1 -1
  2. package/build/client/assets/{highlighted-body-B3W2YXNL-7nJixRf5.js → highlighted-body-B3W2YXNL-DCgLQxra.js} +1 -1
  3. package/build/client/assets/{home-DjMKxUF0.js → home-DpdZcGVy.js} +3 -3
  4. package/build/client/assets/{loader-circle-BuHkkqyY.js → loader-circle-Cmjna4Hz.js} +1 -1
  5. package/build/client/assets/{manifest-4ef14c64.js → manifest-9394faa9.js} +1 -1
  6. package/build/client/assets/{mermaid-3ZIDBTTL-CQkIfF6F.js → mermaid-3ZIDBTTL-DLxMuWKz.js} +287 -38
  7. package/build/client/assets/{root-BdoS4wTM.js → root-09zD_6mm.js} +3 -3
  8. package/build/client/assets/{run-detail-CY1rcVcm.js → run-detail-CmoLyPEh.js} +30 -11
  9. package/build/client/assets/{workflow-graph-viewer-DaFQpLw8.js → workflow-graph-viewer-CDgnftai.js} +1 -1
  10. package/build/client/assets/{zstd-browser-decoder-BEdfA1e2.js → zstd-browser-decoder-EPcbqS8a.js} +1 -1
  11. package/build/server/assets/{app-BWanCGIY.js → app-CGNn2sgH.js} +61445 -58530
  12. package/build/server/assets/{highlighted-body-B3W2YXNL-DTYrZ-0h.js → highlighted-body-B3W2YXNL-B_5okmFo.js} +1 -1
  13. package/build/server/assets/{index-DKlEIDGP.js → index-B4MODFYC.js} +1 -1
  14. package/build/server/assets/{index-BE6TqyDE.js → index-D-4ijDGf.js} +96 -79
  15. package/build/server/assets/{mermaid-3ZIDBTTL-lgfv9_nj.js → mermaid-3ZIDBTTL-nxLg8eQL.js} +1 -1
  16. package/build/server/assets/{token-BhYk3Bk4.js → token-gWdV0VkL.js} +1 -1
  17. package/build/server/assets/{token-util-CfkQa5kX.js → token-util-Bwa03_6B.js} +1 -1
  18. package/build/server/assets/{wrapper-BO03ZtLx.js → wrapper-D5B7_s57.js} +9 -9
  19. package/build/server/assets/{zstd-browser-decoder-BAaFFyPz.js → zstd-browser-decoder-Dt7h9Xjv.js} +1 -1
  20. package/build/server/index.js +2 -2
  21. package/package.json +7 -7
@@ -1,7 +1,7 @@
1
1
  import { r as reactExports, j as jsxRuntimeExports, f as reactDomExports, D as ReactDOM, A as useNavigate, B as useSearchParams, z as Link, w as withComponentProps, E as useParams } from "./index-CRmVVsbP.js";
2
- import { C as CircleAlert, O as parseStepName, B as parseWorkflowName, Q as ErrorCard, U as format, Z as Zap, S as Send, R as ResolveHookModal, q as ChevronUp, X, N as ErrorBoundary, V as Circle, u as unwrapOrThrow, W as WorkflowWebAPIError, I as unwrapServerActionResult, A as Alert, c as AlertTitle, d as AlertDescription, Y as useEscapeKeydown, t as composeEventHandlers, _ as useCallbackRef, $ as useLayoutEffect2, s as useControllableState, a0 as useId, a1 as createContext2, v as Presence, x as createContextScope, n as hideOthers, o as ReactRemoveScroll, a2 as useFocusGuards, a3 as LAYOUT, a4 as wakeUpRun, l as resumeHook, g as getErrorTitle, e as getErrorMessage, a as Skeleton$1, a5 as RunActionsButtons, F as StatusBadge, h as CopyableText, b as RelativeTime, T as Tabs, K as TabsList, L as TabsTrigger, M as TabsContent, a6 as cancelRun, a7 as recreateRun } from "./workflow-graph-viewer-DaFQpLw8.js";
3
- import { c as createLucideIcon, Y as classifyEntityEvent, Z as TERMINAL_EVENT_CLASSES, $ as isSealedNoopEvent$1, a0 as cn, a1 as CopyableDataBlock, a2 as CollapsibleRoot, a3 as CollapsibleTrigger, a4 as CollapsibleContent, a5 as CopyButton, O as cva, a6 as RESERVED_ATTRIBUTE_KEY_PREFIX, a7 as Spinner, a8 as TooltipProvider, T as Tooltip, a as TooltipTrigger, b as TooltipContent, a9 as ContextCardProvider, h as useToast, aa as Skeleton, ab as DecryptClickContext, ac as Yr, ad as isEncryptedMarker, ae as getEventDataRefFields, m as ChevronRight, af as TimestampTooltip, ag as formatDuration, C as Check, l as Copy, ah as DataInspector, ai as _r, aj as isHookLifecycleEventType, ak as isTerminalStepEventType, al as isWaitEventType, am as isStepEventType, an as RunClickContext, ao as StreamClickContext, ap as Collapsible, aq as isExpiredMarker, ar as isDoStreamStep, as as extractConversation, at as EncryptedDataBlock, au as hasEncryptedFields, av as useSidebarDataOptional, aw as isTerminalWorkflowRunStatus, ax as clsx, ay as useActiveSpan, az as useSidebarData, aA as IconButton, J as ChevronDown, aB as useRowWindow, aC as isSpanDimmedBySearch, aD as ROW_HEIGHT_PX, aE as getSpanDurationMs, aF as isSpanErrored, aG as isSpanCancelled, aH as formatDurationPrecise, aI as ActiveSpanProvider, aJ as useReducedMotion, aK as searchSpans, aL as computeRootBounds, aM as computeTimeMarkers, aN as clampViewportToRoot, aO as getHighResInMs, aP as scrollRowIntoView, aQ as TIMELINE_PADDING_PX, aR as Minimap, aS as Timeline, aT as TimelineHeader, aU as wheelZoomScaleFactor, aV as wheelDeltaToPixels, aW as SidebarDataProvider, aX as fetchHook, n as fetchEvents, aY as hydrateResourceIOAsync, N as fetchRun, aZ as fetchStep, a_ as hydrateResourceIO, a$ as fetchStreams, b0 as apiBase, b1 as Slot, L as useComposedRefs, b2 as Slottable, e as cn$1, b3 as buttonVariants, b4 as fetchEvent, b5 as fetchEventsByCorrelationId, b6 as isEncryptedData, b7 as hydrateData, b8 as decrypt, b9 as deriveRunPayloadKeys, ba as getWebRevivers, bb as LIVE_UPDATE_INTERVAL_MS$1, u as useServerConfig, bc as getEncryptionKeyForRun, t as toast, bd as StreamViewerSkeleton, be as Lock, bf as StreamViewer } from "./mermaid-3ZIDBTTL-CQkIfF6F.js";
4
- import { A as ArrowUpRight } from "./arrow-up-right-DDLzuSl1.js";
2
+ import { C as CircleAlert, O as parseStepName, B as parseWorkflowName, Q as ErrorCard, U as format, Z as Zap, S as Send, R as ResolveHookModal, q as ChevronUp, X, N as ErrorBoundary, V as Circle, u as unwrapOrThrow, W as WorkflowWebAPIError, I as unwrapServerActionResult, A as Alert, c as AlertTitle, d as AlertDescription, Y as useEscapeKeydown, t as composeEventHandlers, _ as useCallbackRef, $ as useLayoutEffect2, s as useControllableState, a0 as useId, a1 as createContext2, v as Presence, x as createContextScope, n as hideOthers, o as ReactRemoveScroll, a2 as useFocusGuards, a3 as LAYOUT, a4 as wakeUpRun, l as resumeHook, g as getErrorTitle, e as getErrorMessage, a as Skeleton$1, a5 as RunActionsButtons, F as StatusBadge, h as CopyableText, b as RelativeTime, T as Tabs, K as TabsList, L as TabsTrigger, M as TabsContent, a6 as cancelRun, a7 as recreateRun } from "./workflow-graph-viewer-CDgnftai.js";
3
+ import { c as createLucideIcon, Y as classifyEntityEvent, Z as TERMINAL_EVENT_CLASSES, $ as isSealedNoopEvent$1, a0 as cn, a1 as CopyableDataBlock, a2 as CollapsibleRoot, a3 as CollapsibleTrigger, a4 as CollapsibleContent, a5 as CopyButton, O as cva, a6 as RESERVED_ATTRIBUTE_KEY_PREFIX, a7 as Spinner, a8 as TooltipProvider, T as Tooltip, a as TooltipTrigger, b as TooltipContent, a9 as ContextCardProvider, h as useToast, aa as Skeleton, ab as DecryptClickContext, ac as Yr, ad as isEncryptedMarker, ae as getEventDataRefFields, m as ChevronRight, af as TimestampTooltip, ag as formatDuration, C as Check, l as Copy, ah as DataInspector, ai as _r, aj as isHookLifecycleEventType, ak as isTerminalStepEventType, al as isWaitEventType, am as isStepEventType, an as RunClickContext, ao as StreamClickContext, ap as Collapsible, aq as isExpiredMarker, ar as isDoStreamStep, as as extractConversation, at as EncryptedDataBlock, au as hasEncryptedFields, av as useSidebarDataOptional, aw as isTerminalWorkflowRunStatus, ax as clsx, ay as useActiveSpan, az as useSidebarData, aA as IconButton, J as ChevronDown, aB as useRowWindow, aC as isSpanDimmedBySearch, aD as ROW_HEIGHT_PX, aE as getSpanDurationMs, aF as isSpanErrored, aG as isSpanCancelled, aH as formatDurationPrecise, aI as ActiveSpanProvider, aJ as useReducedMotion, aK as searchSpans, aL as computeRootBounds, aM as computeTimeMarkers, aN as clampViewportToRoot, aO as getHighResInMs, aP as scrollRowIntoView, aQ as TIMELINE_PADDING_PX, aR as Minimap, aS as Timeline, aT as TimelineHeader, aU as wheelZoomScaleFactor, aV as wheelDeltaToPixels, aW as SidebarDataProvider, aX as fetchHook, n as fetchEvents, aY as hydrateResourceIOAsync, N as fetchRun, aZ as fetchStep, a_ as hydrateResourceIO, a$ as fetchStreams, b0 as apiBase, b1 as Slot, L as useComposedRefs, b2 as Slottable, e as cn$1, b3 as buttonVariants, b4 as fetchEvent, b5 as fetchEventsByCorrelationId, b6 as isEncryptedData, b7 as hydrateData, b8 as decrypt, b9 as deriveRunPayloadKeys, ba as SerializationFormat, bb as getWebRevivers, bc as LIVE_UPDATE_INTERVAL_MS$1, u as useServerConfig, bd as getEncryptionKeyForRun, t as toast, be as StreamViewerSkeleton, bf as Lock, bg as StreamViewer } from "./mermaid-3ZIDBTTL-DLxMuWKz.js";
4
+ import { A as ArrowUpRight } from "./arrow-up-right-a32MzRMp.js";
5
5
  /**
6
6
  * @license lucide-react v0.575.0 - ISC
7
7
  *
@@ -2231,6 +2231,7 @@ const attributeOrder = [
2231
2231
  "attempt",
2232
2232
  "token",
2233
2233
  "tokenRetentionUntil",
2234
+ "startHook",
2234
2235
  "claimedFrom",
2235
2236
  "isWebhook",
2236
2237
  "isSystem",
@@ -2282,6 +2283,7 @@ const attributeDisplayNames = {
2282
2283
  runId: "Run ID",
2283
2284
  token: "Token",
2284
2285
  tokenRetentionUntil: "Minimum Retention Until",
2286
+ startHook: "Start Hook Token",
2285
2287
  claimedFrom: "Token Taken From Run",
2286
2288
  eventType: "Event Type",
2287
2289
  errorCode: "Error Code",
@@ -2492,6 +2494,11 @@ const attributeToDisplayFn = {
2492
2494
  // cross-run writers to seal payloads to this run. Not actionable for users
2493
2495
  // and not secret, so hidden rather than rendered as 44 opaque base64 chars.
2494
2496
  encryptionPublicKey: (_value) => null,
2497
+ // The token of the Hook `start({ hook })` created: the run's idempotency key.
2498
+ startHook: (value) => {
2499
+ const token = value == null ? void 0 : value.token;
2500
+ return typeof token === "string" && token.length > 0 ? token : null;
2501
+ },
2495
2502
  // A dynamic run's own workflow code — the code the run actually executed,
2496
2503
  // which for these runs exists nowhere in the deployment's source. Shown as
2497
2504
  // its own collapsed section: it is the most useful thing on a dynamic run's
@@ -5570,8 +5577,12 @@ function isRunActive(status) {
5570
5577
  }
5571
5578
  const yieldToMain = () => new Promise((resolve) => setTimeout(resolve, 0));
5572
5579
  const YIELD_EVERY_N_FRAMES = 64;
5573
- function detectEncoding(data) {
5580
+ function detectEncoding(data, streamId) {
5574
5581
  if (data.length < FRAME_HEADER_SIZE) return "framed";
5582
+ const prefix = new TextDecoder().decode(data.subarray(0, FRAME_HEADER_SIZE));
5583
+ if (streamId.endsWith("_system_abort") && Object.values(SerializationFormat).some((format2) => format2 === prefix)) {
5584
+ return "unframed";
5585
+ }
5575
5586
  const view = new DataView(data.buffer, data.byteOffset, data.byteLength);
5576
5587
  const len = view.getUint32(0, false);
5577
5588
  if (len > 0 && len <= 10 * 1024 * 1024) return "framed";
@@ -5681,7 +5692,14 @@ function useStreamReader(env, streamId, runId, encryptionKey, runStatus) {
5681
5692
  if (abortController.signal.aborted) break;
5682
5693
  const { value, done } = await reader.read();
5683
5694
  if (done) {
5684
- if (encoding === "legacy" && textRemainder.trim()) {
5695
+ if (encoding === "unframed" && buffer.length > 0) {
5696
+ frameIndex++;
5697
+ if (frameIndex > skipFrames) {
5698
+ const result = await processFrame(buffer, cryptoKey, revivers);
5699
+ if (result.encrypted) return { encrypted: true };
5700
+ targetBuffer.push(result.chunk);
5701
+ }
5702
+ } else if (encoding === "legacy" && textRemainder.trim()) {
5685
5703
  frameIndex++;
5686
5704
  if (frameIndex > skipFrames) {
5687
5705
  targetBuffer.push(parseLegacyLine(textRemainder.trim()));
@@ -5693,7 +5711,7 @@ function useStreamReader(env, streamId, runId, encryptionKey, runStatus) {
5693
5711
  if (encoding === null) {
5694
5712
  appendToBuffer(value);
5695
5713
  if (buffer.length >= FRAME_HEADER_SIZE) {
5696
- encoding = detectEncoding(buffer);
5714
+ encoding = detectEncoding(buffer, streamId);
5697
5715
  }
5698
5716
  if (encoding === "legacy") {
5699
5717
  textRemainder = decoder.decode(buffer, { stream: true });
@@ -5718,6 +5736,7 @@ function useStreamReader(env, streamId, runId, encryptionKey, runStatus) {
5718
5736
  }
5719
5737
  continue;
5720
5738
  }
5739
+ if (encoding === "unframed") continue;
5721
5740
  let offset = 0;
5722
5741
  let framesInBatch = 0;
5723
5742
  while (offset + FRAME_HEADER_SIZE <= buffer.length) {
@@ -6293,15 +6312,15 @@ function RunDetailView({
6293
6312
  }
6294
6313
  ),
6295
6314
  /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "min-h-0 flex-1 divide-y divide-gray-400 overflow-y-auto", children: streamsLoading ? /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex flex-col divide-y divide-gray-400", children: [
6296
- /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "flex h-10 items-center pl-4 pr-2", children: /* @__PURE__ */ jsxRuntimeExports.jsx(Skeleton$1, { className: "h-3.5 w-24" }) }),
6297
- /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "flex h-10 items-center pl-4 pr-2", children: /* @__PURE__ */ jsxRuntimeExports.jsx(Skeleton$1, { className: "h-3.5 w-32" }) }),
6298
- /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "flex h-10 items-center pl-4 pr-2", children: /* @__PURE__ */ jsxRuntimeExports.jsx(Skeleton$1, { className: "h-3.5 w-20" }) })
6299
- ] }) : streamsError ? /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "px-4 py-2 text-label-12 text-red-900", children: streamsError.message }) : streams.length === 0 ? /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "flex h-10 items-center px-4 text-label-12 text-gray-900", children: "No streams found for this run" }) : streams.map((streamId) => /* @__PURE__ */ jsxRuntimeExports.jsx(
6315
+ /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "flex h-10 min-h-10 items-center pl-4 pr-2", children: /* @__PURE__ */ jsxRuntimeExports.jsx(Skeleton$1, { className: "h-3.5 w-24" }) }),
6316
+ /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "flex h-10 min-h-10 items-center pl-4 pr-2", children: /* @__PURE__ */ jsxRuntimeExports.jsx(Skeleton$1, { className: "h-3.5 w-32" }) }),
6317
+ /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "flex h-10 min-h-10 items-center pl-4 pr-2", children: /* @__PURE__ */ jsxRuntimeExports.jsx(Skeleton$1, { className: "h-3.5 w-20" }) })
6318
+ ] }) : streamsError ? /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "px-4 py-2 text-label-12 text-red-900", children: streamsError.message }) : streams.length === 0 ? /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "flex h-10 min-h-10 items-center px-4 text-label-12 text-gray-900", children: "No streams found for this run" }) : streams.map((streamId) => /* @__PURE__ */ jsxRuntimeExports.jsx(
6300
6319
  "button",
6301
6320
  {
6302
6321
  type: "button",
6303
6322
  onClick: () => setSelectedStreamId(streamId),
6304
- className: `flex h-10 w-full min-w-0 items-center truncate pl-4 pr-2 text-left text-label-14 transition-colors ${selectedStreamId === streamId ? "bg-gray-100 text-gray-1000 hover:bg-gray-200 active:bg-gray-200" : "bg-transparent text-gray-900 hover:bg-gray-100 hover:text-gray-1000 focus-visible:bg-gray-100 focus-visible:text-gray-1000"}`,
6323
+ className: `flex h-10 min-h-10 w-full min-w-0 items-center truncate pl-4 pr-2 text-left text-label-14 transition-colors ${selectedStreamId === streamId ? "bg-gray-100 text-gray-1000 hover:bg-gray-200 active:bg-gray-200" : "bg-transparent text-gray-900 hover:bg-gray-100 hover:text-gray-1000 focus-visible:bg-gray-100 focus-visible:text-gray-1000"}`,
6305
6324
  title: streamId,
6306
6325
  children: streamId
6307
6326
  },
@@ -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, J as ChevronDown, a0 as cn, e as cn$1, O as cva, bg as composeRefs, L as useComposedRefs, bh as useFloating, bi as offset, bj as shift, bk as limitShift, bl as flip, bm as size, bn as arrow, bo as hide, bp as autoUpdate, m as ChevronRight, C as Check, bq as VERCEL_403_ERROR_MESSAGE, br as bulkCancelRuns$1, bs as reenqueueRun$1, bt as wakeUpRun$1, bu as resumeHook$1, bv as fetchHookToken$1, bw as cancelRun$1, bx as recreateRun$1, T as Tooltip, a as TooltipTrigger, l as Copy, b as TooltipContent, z as createContextScope$1, p as useComposedRefs$1, E as createSlot, ag as formatDuration, B as Button, t as toast, w as useId$1, P as Primitive$1, q as composeEventHandlers$1, G as useControllableState$1, o as useCallbackRef$2, U as Presence$1 } from "./mermaid-3ZIDBTTL-CQkIfF6F.js";
4
+ import { c as createLucideIcon, J as ChevronDown, a0 as cn, e as cn$1, O as cva, bh as composeRefs, L as useComposedRefs, bi as useFloating, bj as offset, bk as shift, bl as limitShift, bm as flip, bn as size, bo as arrow, bp as hide, bq as autoUpdate, m as ChevronRight, C as Check, br as VERCEL_403_ERROR_MESSAGE, bs as bulkCancelRuns$1, bt as reenqueueRun$1, bu as wakeUpRun$1, bv as resumeHook$1, bw as fetchHookToken$1, bx as cancelRun$1, by as recreateRun$1, T as Tooltip, a as TooltipTrigger, l as Copy, b as TooltipContent, z as createContextScope$1, p as useComposedRefs$1, E as createSlot, ag as formatDuration, B as Button, t as toast, w as useId$1, P as Primitive$1, q as composeEventHandlers$1, G as useControllableState$1, o as useCallbackRef$2, U as Presence$1 } from "./mermaid-3ZIDBTTL-DLxMuWKz.js";
5
5
  import { r as reactExports, j as jsxRuntimeExports, f as reactDomExports, R as ReactExports, G as React, D as ReactDOM, a as requireReact, H as getDefaultExportFromCjs } from "./index-CRmVVsbP.js";
6
6
  function parseName(tag, name) {
7
7
  if (typeof name !== "string") {
@@ -1,4 +1,4 @@
1
- import { r as registerZstdDecoder, _ as __vitePreload } from "./mermaid-3ZIDBTTL-CQkIfF6F.js";
1
+ import { r as registerZstdDecoder, _ as __vitePreload } from "./mermaid-3ZIDBTTL-DLxMuWKz.js";
2
2
  import "./index-CRmVVsbP.js";
3
3
  let registered = false;
4
4
  let modulePromise;