@workflow/web 5.0.0-beta.39 → 5.0.0-beta.40

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 (24) hide show
  1. package/build/client/assets/{app-BqwHo5GR.css → app-BkGXg64e.css} +1 -1
  2. package/build/client/assets/{arrow-up-right-Ccx_FPfU.js → arrow-up-right-Br49goey.js} +1 -1
  3. package/build/client/assets/{highlighted-body-B3W2YXNL-DMawUm9n.js → highlighted-body-B3W2YXNL-B5pbFkUr.js} +1 -1
  4. package/build/client/assets/{home-B6O_uPSC.js → home-DrXIdsG5.js} +60 -35
  5. package/build/client/assets/{loader-circle-BrO0dxVn.js → loader-circle-3PJSFf84.js} +1 -1
  6. package/build/client/assets/{manifest-7e8691f4.js → manifest-0c933230.js} +1 -1
  7. package/build/client/assets/{mermaid-3ZIDBTTL-D20ZkB54.js → mermaid-3ZIDBTTL-qqUSEahK.js} +151 -107
  8. package/build/client/assets/{root-CxZylOIf.css → root-ZRjqDhEN.css} +1 -1
  9. package/build/client/assets/{root-dudvdmvf.js → root-n7Zz0dTX.js} +3 -3
  10. package/build/client/assets/{run-detail-DtCCxxv2.js → run-detail-DHeMEsdg.js} +8 -4
  11. package/build/client/assets/{workflow-graph-viewer-B01nH75E.js → workflow-graph-viewer-DWdsfF3d.js} +7 -3
  12. package/build/client/assets/{zstd-browser-decoder-Dw3HhTgO.js → zstd-browser-decoder-DemK2pIP.js} +1 -1
  13. package/build/server/assets/{app-Bd12Opaf.js → app-BJXoDV4n.js} +3132 -614
  14. package/build/server/assets/{highlighted-body-B3W2YXNL-CFlRme7u.js → highlighted-body-B3W2YXNL-Kki0lKyo.js} +3 -1
  15. package/build/server/assets/{index-DIXsjgfZ.js → index-7-uV1dU1.js} +142 -1
  16. package/build/server/assets/index-XksKPyou.js +143 -0
  17. package/build/server/assets/{mermaid-3ZIDBTTL-CQsU8DGa.js → mermaid-3ZIDBTTL-Bh_zbSQ-.js} +3 -1
  18. package/build/server/assets/{token-XJr1pjmC.js → token-D8pb4TJ8.js} +1 -1
  19. package/build/server/assets/{token-util-BJaMxWWP.js → token-util-DPJj3x0B.js} +1 -1
  20. package/build/server/assets/wrapper-CsxTXsPR.js +3708 -0
  21. package/build/server/assets/{zstd-browser-decoder-DL7Vc3pV.js → zstd-browser-decoder-CWJVPmcb.js} +3 -1
  22. package/build/server/index.js +5 -3
  23. package/package.json +7 -7
  24. package/build/server/assets/index-B6SJpqpo.js +0 -137
@@ -1,7 +1,7 @@
1
1
  import { r as reactExports, j as jsxRuntimeExports, c as Link, R as ReactExports, o as reactDomExports, e as useSearchParams, d as useNavigate, C as useLocation, w as withComponentProps } from "./index-PFjW8YjQ.js";
2
- import { R as ResolveHookModal, S as Send, r as requireShim, u as unwrapOrThrow, W as WorkflowWebAPIError, f as fetchHookToken, a as Skeleton, b as RelativeTime, A as Alert, C as CircleAlert, c as AlertTitle, g as getErrorTitle, d as AlertDescription, e as getErrorMessage, h as CopyableText, D as DropdownMenu, i as DropdownMenuTrigger, E as Ellipsis, j as DropdownMenuContent, k as DropdownMenuItem, l as resumeHook, m as createCollection, n as hideOthers, o as ReactRemoveScroll, p as useDirection, q as ChevronUp, X, s as useControllableState$1, P as Primitive$1, t as composeEventHandlers$1, v as Presence, w as useSize, x as createContextScope$1, y as cancelRun, z as reenqueueRun, B as parseWorkflowName, F as StatusBadge, Z as Zap, G as CircleX, H as RunActionsDropdownItems, I as unwrapServerActionResult, J as WorkflowGraphViewer, T as Tabs, K as TabsList, L as TabsTrigger, M as TabsContent, N as ErrorBoundary } from "./workflow-graph-viewer-B01nH75E.js";
3
- import { c as createLucideIcon, h as useToast, e as cn, i as fetchRuns, j as fetchHooks, k as getPaginationDisplay, T as Tooltip, a as TooltipTrigger, C as Check, l as Copy, b as TooltipContent, D as DEFAULT_PAGE_SIZE, B as Button, m as ChevronRight, n as fetchEvents, o as useCallbackRef, p as useComposedRefs, P as Primitive, A as Anchor, q as composeEventHandlers, s as useLayoutEffect2, v as Portal$2, w as useId, x as createPopperScope, y as DismissableLayer, z as createContextScope, E as createSlot, F as Content$1, G as useControllableState, H as Root2$1, V as VISUALLY_HIDDEN_STYLES, I as Arrow, J as ChevronDown, L as useComposedRefs$1, u as useServerConfig, t as toast, M as fetchRun, N as cva, O as Presence$1, U as createContext2, W as fetchWorkflowsManifest } from "./mermaid-3ZIDBTTL-D20ZkB54.js";
4
- import { L as LoaderCircle } from "./loader-circle-BrO0dxVn.js";
2
+ import { R as ResolveHookModal, S as Send, r as requireShim, u as unwrapOrThrow, W as WorkflowWebAPIError, f as fetchHookToken, a as Skeleton, b as RelativeTime, A as Alert, C as CircleAlert, c as AlertTitle, g as getErrorTitle, d as AlertDescription, e as getErrorMessage, h as CopyableText, D as DropdownMenu, i as DropdownMenuTrigger, E as Ellipsis, j as DropdownMenuContent, k as DropdownMenuItem, l as resumeHook, m as createCollection, n as hideOthers, o as ReactRemoveScroll, p as useDirection, q as ChevronUp, X, s as useControllableState$1, P as Primitive$1, t as composeEventHandlers$1, v as Presence, w as useSize, x as createContextScope$1, y as bulkCancelRuns, z as reenqueueRun, B as parseWorkflowName, F as StatusBadge, Z as Zap, G as CircleX, H as RunActionsDropdownItems, I as unwrapServerActionResult, J as WorkflowGraphViewer, T as Tabs, K as TabsList, L as TabsTrigger, M as TabsContent, N as ErrorBoundary } from "./workflow-graph-viewer-DWdsfF3d.js";
3
+ import { c as createLucideIcon, h as useToast, e as cn, i as fetchRuns, j as fetchHooks, k as getPaginationDisplay, T as Tooltip, a as TooltipTrigger, C as Check, l as Copy, b as TooltipContent, D as DEFAULT_PAGE_SIZE, B as Button, m as ChevronRight, n as fetchEvents, o as useCallbackRef, p as useComposedRefs, P as Primitive, A as Anchor, q as composeEventHandlers, s as useLayoutEffect2, v as Portal$2, w as useId, x as createPopperScope, y as DismissableLayer, z as createContextScope, E as createSlot, F as Content$1, G as useControllableState, H as Root2$1, V as VISUALLY_HIDDEN_STYLES, I as Arrow, J as ChevronDown, L as useComposedRefs$1, u as useServerConfig, M as BULK_CANCEL_MAX_RUN_IDS, t as toast, N as fetchRun, O as cva, U as Presence$1, W as createContext2, X as fetchWorkflowsManifest } from "./mermaid-3ZIDBTTL-qqUSEahK.js";
4
+ import { L as LoaderCircle } from "./loader-circle-3PJSFf84.js";
5
5
  /**
6
6
  * @license lucide-react v0.575.0 - ISC
7
7
  *
@@ -3627,6 +3627,16 @@ const SelectSeparator = reactExports.forwardRef(({ className, ...props }, ref) =
3627
3627
  }
3628
3628
  ));
3629
3629
  SelectSeparator.displayName = Separator.displayName;
3630
+ function bulkCancelToastSeverity(summary) {
3631
+ const succeeded = summary.cancelled + summary.alreadyCancelled;
3632
+ const hadProblem = summary.failed + summary.notCancellable + summary.notFound > 0;
3633
+ if (succeeded === 0) return "error";
3634
+ if (hadProblem) return "warning";
3635
+ return "success";
3636
+ }
3637
+ function shouldRetainSelectionAfterBulkCancel(result) {
3638
+ return result.outcome === "failed" && result.retryable;
3639
+ }
3630
3640
  const windows = /* @__PURE__ */ new Map();
3631
3641
  function createWindow(periodMs) {
3632
3642
  const end = Date.now();
@@ -4393,27 +4403,39 @@ function RunsTable({ onRunClick }) {
4393
4403
  );
4394
4404
  }, [selectedRuns]);
4395
4405
  const hasCancellableSelection = cancellableSelectedRuns.length > 0;
4406
+ const exceedsBulkCancelLimit = cancellableSelectedRuns.length > BULK_CANCEL_MAX_RUN_IDS;
4396
4407
  const handleBulkCancel = reactExports.useCallback(async () => {
4397
- if (isBulkCancelling || cancellableSelectedRuns.length === 0) return;
4408
+ if (isBulkCancelling || cancellableSelectedRuns.length === 0 || cancellableSelectedRuns.length > BULK_CANCEL_MAX_RUN_IDS) {
4409
+ return;
4410
+ }
4398
4411
  setIsBulkCancelling(true);
4399
4412
  try {
4400
- const results = await Promise.allSettled(
4401
- cancellableSelectedRuns.map((run) => cancelRun(env, run.runId))
4413
+ const { summary, results } = await bulkCancelRuns(
4414
+ env,
4415
+ cancellableSelectedRuns.map((run) => run.runId)
4402
4416
  );
4403
- const succeeded = results.filter((r) => r.status === "fulfilled").length;
4404
- const failed = results.filter((r) => r.status === "rejected").length;
4405
- if (failed === 0) {
4406
- toast.success(
4407
- `Cancelled ${succeeded} run${succeeded !== 1 ? "s" : ""}`
4408
- );
4409
- } else if (succeeded === 0) {
4410
- toast.error(`Failed to cancel ${failed} run${failed !== 1 ? "s" : ""}`);
4417
+ const parts = [];
4418
+ if (summary.cancelled > 0) parts.push(`${summary.cancelled} cancelled`);
4419
+ if (summary.alreadyCancelled > 0)
4420
+ parts.push(`${summary.alreadyCancelled} already cancelled`);
4421
+ if (summary.notCancellable > 0)
4422
+ parts.push(`${summary.notCancellable} not cancellable`);
4423
+ if (summary.notFound > 0) parts.push(`${summary.notFound} not found`);
4424
+ if (summary.failed > 0) parts.push(`${summary.failed} failed`);
4425
+ const message = parts.join(", ") || "No runs cancelled";
4426
+ const severity = bulkCancelToastSeverity(summary);
4427
+ if (severity === "error") {
4428
+ toast.error(message);
4429
+ } else if (severity === "warning") {
4430
+ toast.warning(message);
4411
4431
  } else {
4412
- toast.warning(
4413
- `Cancelled ${succeeded} run${succeeded !== 1 ? "s" : ""}, ${failed} failed`
4414
- );
4432
+ toast.success(message);
4433
+ }
4434
+ for (const result of results) {
4435
+ if (!shouldRetainSelectionAfterBulkCancel(result)) {
4436
+ selection.deselectById(result.runId);
4437
+ }
4415
4438
  }
4416
- selection.clearSelection();
4417
4439
  onReload();
4418
4440
  } catch (err) {
4419
4441
  toast.error("Failed to cancel runs", {
@@ -4632,23 +4654,26 @@ function RunsTable({ onRunClick }) {
4632
4654
  ) }),
4633
4655
  /* @__PURE__ */ jsxRuntimeExports.jsx(TooltipContent, { children: "Re-enqueue the workflow orchestration layer for selected runs. Useful if workflows appear stuck." })
4634
4656
  ] }),
4635
- hasCancellableSelection && /* @__PURE__ */ jsxRuntimeExports.jsxs(
4636
- Button,
4637
- {
4638
- variant: "ghost",
4639
- size: "sm",
4640
- className: "h-7 text-primary-foreground hover:bg-primary-foreground/10 hover:text-primary-foreground",
4641
- onClick: handleBulkCancel,
4642
- disabled: isBulkCancelling,
4643
- children: [
4644
- isBulkCancelling ? /* @__PURE__ */ jsxRuntimeExports.jsx(LoaderCircle, { className: "h-4 w-4 mr-1 animate-spin" }) : /* @__PURE__ */ jsxRuntimeExports.jsx(CircleX, { className: "h-4 w-4 mr-1" }),
4645
- "Cancel",
4646
- " ",
4647
- cancellableSelectedRuns.length !== selection.selectionCount ? `${cancellableSelectedRuns.length} ` : "",
4648
- isBulkCancelling ? "cancelling..." : ""
4649
- ]
4650
- }
4651
- )
4657
+ hasCancellableSelection && /* @__PURE__ */ jsxRuntimeExports.jsxs(Tooltip, { children: [
4658
+ /* @__PURE__ */ jsxRuntimeExports.jsx(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "inline-flex", children: /* @__PURE__ */ jsxRuntimeExports.jsxs(
4659
+ Button,
4660
+ {
4661
+ variant: "ghost",
4662
+ size: "sm",
4663
+ className: "h-7 text-primary-foreground hover:bg-primary-foreground/10 hover:text-primary-foreground",
4664
+ onClick: handleBulkCancel,
4665
+ disabled: isBulkCancelling || exceedsBulkCancelLimit,
4666
+ children: [
4667
+ isBulkCancelling ? /* @__PURE__ */ jsxRuntimeExports.jsx(LoaderCircle, { className: "h-4 w-4 mr-1 animate-spin" }) : /* @__PURE__ */ jsxRuntimeExports.jsx(CircleX, { className: "h-4 w-4 mr-1" }),
4668
+ "Cancel",
4669
+ " ",
4670
+ cancellableSelectedRuns.length !== selection.selectionCount ? `${cancellableSelectedRuns.length} ` : "",
4671
+ isBulkCancelling ? "cancelling..." : ""
4672
+ ]
4673
+ }
4674
+ ) }) }),
4675
+ /* @__PURE__ */ jsxRuntimeExports.jsx(TooltipContent, { children: exceedsBulkCancelLimit ? `Select up to ${BULK_CANCEL_MAX_RUN_IDS} runs at a time.` : "Cancel the selected pending and running runs." })
4676
+ ] })
4652
4677
  ] })
4653
4678
  }
4654
4679
  )
@@ -1,4 +1,4 @@
1
- import { c as createLucideIcon } from "./mermaid-3ZIDBTTL-D20ZkB54.js";
1
+ import { c as createLucideIcon } from "./mermaid-3ZIDBTTL-qqUSEahK.js";
2
2
  /**
3
3
  * @license lucide-react v0.575.0 - ISC
4
4
  *
@@ -1 +1 @@
1
- window.__reactRouterManifest={"entry":{"module":"/assets/entry.client-LwI3HNYl.js","imports":["/assets/index-PFjW8YjQ.js"],"css":[]},"routes":{"root":{"id":"root","path":"","hasAction":true,"hasLoader":true,"hasClientAction":false,"hasClientLoader":false,"hasClientMiddleware":false,"hasDefaultExport":true,"hasErrorBoundary":true,"module":"/assets/root-dudvdmvf.js","imports":["/assets/index-PFjW8YjQ.js","/assets/mermaid-3ZIDBTTL-D20ZkB54.js","/assets/loader-circle-BrO0dxVn.js","/assets/arrow-up-right-Ccx_FPfU.js"],"css":["/assets/root-CxZylOIf.css","/assets/mermaid-3ZIDBTTL-D8CjRQta.css"]},"routes/home":{"id":"routes/home","parentId":"root","index":true,"hasAction":false,"hasLoader":false,"hasClientAction":false,"hasClientLoader":false,"hasClientMiddleware":false,"hasDefaultExport":true,"hasErrorBoundary":false,"module":"/assets/home-B6O_uPSC.js","imports":["/assets/index-PFjW8YjQ.js","/assets/workflow-graph-viewer-B01nH75E.js","/assets/mermaid-3ZIDBTTL-D20ZkB54.js","/assets/loader-circle-BrO0dxVn.js"],"css":["/assets/workflow-graph-viewer-DnlNuQQH.css","/assets/mermaid-3ZIDBTTL-D8CjRQta.css"]},"routes/run-detail":{"id":"routes/run-detail","parentId":"root","path":"run/:runId","hasAction":false,"hasLoader":false,"hasClientAction":false,"hasClientLoader":false,"hasClientMiddleware":false,"hasDefaultExport":true,"hasErrorBoundary":false,"module":"/assets/run-detail-DtCCxxv2.js","imports":["/assets/index-PFjW8YjQ.js","/assets/workflow-graph-viewer-B01nH75E.js","/assets/mermaid-3ZIDBTTL-D20ZkB54.js","/assets/arrow-up-right-Ccx_FPfU.js"],"css":["/assets/run-detail-CWoGxu_0.css","/assets/workflow-graph-viewer-DnlNuQQH.css","/assets/mermaid-3ZIDBTTL-D8CjRQta.css"]},"routes/api.rpc":{"id":"routes/api.rpc","parentId":"root","path":"api/rpc","hasAction":true,"hasLoader":true,"hasClientAction":false,"hasClientLoader":false,"hasClientMiddleware":false,"hasDefaultExport":false,"hasErrorBoundary":false,"module":"/assets/api.rpc-l0sNRNKZ.js","imports":[],"css":[]},"routes/api.stream.$streamId":{"id":"routes/api.stream.$streamId","parentId":"root","path":"api/stream/:streamId","hasAction":false,"hasLoader":true,"hasClientAction":false,"hasClientLoader":false,"hasClientMiddleware":false,"hasDefaultExport":false,"hasErrorBoundary":false,"module":"/assets/api.stream._streamId-l0sNRNKZ.js","imports":[],"css":[]}},"url":"/assets/manifest-7e8691f4.js","version":"7e8691f4"};
1
+ window.__reactRouterManifest={"entry":{"module":"/assets/entry.client-LwI3HNYl.js","imports":["/assets/index-PFjW8YjQ.js"],"css":[]},"routes":{"root":{"id":"root","path":"","hasAction":true,"hasLoader":true,"hasClientAction":false,"hasClientLoader":false,"hasClientMiddleware":false,"hasDefaultExport":true,"hasErrorBoundary":true,"module":"/assets/root-n7Zz0dTX.js","imports":["/assets/index-PFjW8YjQ.js","/assets/mermaid-3ZIDBTTL-qqUSEahK.js","/assets/loader-circle-3PJSFf84.js","/assets/arrow-up-right-Br49goey.js"],"css":["/assets/root-ZRjqDhEN.css","/assets/mermaid-3ZIDBTTL-D8CjRQta.css"]},"routes/home":{"id":"routes/home","parentId":"root","index":true,"hasAction":false,"hasLoader":false,"hasClientAction":false,"hasClientLoader":false,"hasClientMiddleware":false,"hasDefaultExport":true,"hasErrorBoundary":false,"module":"/assets/home-DrXIdsG5.js","imports":["/assets/index-PFjW8YjQ.js","/assets/workflow-graph-viewer-DWdsfF3d.js","/assets/mermaid-3ZIDBTTL-qqUSEahK.js","/assets/loader-circle-3PJSFf84.js"],"css":["/assets/workflow-graph-viewer-DnlNuQQH.css","/assets/mermaid-3ZIDBTTL-D8CjRQta.css"]},"routes/run-detail":{"id":"routes/run-detail","parentId":"root","path":"run/:runId","hasAction":false,"hasLoader":false,"hasClientAction":false,"hasClientLoader":false,"hasClientMiddleware":false,"hasDefaultExport":true,"hasErrorBoundary":false,"module":"/assets/run-detail-DHeMEsdg.js","imports":["/assets/index-PFjW8YjQ.js","/assets/workflow-graph-viewer-DWdsfF3d.js","/assets/mermaid-3ZIDBTTL-qqUSEahK.js","/assets/arrow-up-right-Br49goey.js"],"css":["/assets/run-detail-CWoGxu_0.css","/assets/workflow-graph-viewer-DnlNuQQH.css","/assets/mermaid-3ZIDBTTL-D8CjRQta.css"]},"routes/api.rpc":{"id":"routes/api.rpc","parentId":"root","path":"api/rpc","hasAction":true,"hasLoader":true,"hasClientAction":false,"hasClientLoader":false,"hasClientMiddleware":false,"hasDefaultExport":false,"hasErrorBoundary":false,"module":"/assets/api.rpc-l0sNRNKZ.js","imports":[],"css":[]},"routes/api.stream.$streamId":{"id":"routes/api.stream.$streamId","parentId":"root","path":"api/stream/:streamId","hasAction":false,"hasLoader":true,"hasClientAction":false,"hasClientLoader":false,"hasClientMiddleware":false,"hasDefaultExport":false,"hasErrorBoundary":false,"module":"/assets/api.stream._streamId-l0sNRNKZ.js","imports":[],"css":[]}},"url":"/assets/manifest-0c933230.js","version":"0c933230"};
@@ -1,4 +1,4 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/zstd-browser-decoder-Dw3HhTgO.js","assets/index-PFjW8YjQ.js","assets/highlighted-body-B3W2YXNL-DMawUm9n.js"])))=>i.map(i=>d[i]);
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/zstd-browser-decoder-DemK2pIP.js","assets/index-PFjW8YjQ.js","assets/highlighted-body-B3W2YXNL-B5pbFkUr.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);
@@ -15434,6 +15434,40 @@ discriminatedUnion("status", [
15434
15434
  completedAt: date()
15435
15435
  })
15436
15436
  ]);
15437
+ const BULK_CANCEL_MAX_RUN_IDS = 500;
15438
+ object({
15439
+ runIds: array(string$2()).min(1).max(BULK_CANCEL_MAX_RUN_IDS).refine((ids) => new Set(ids).size === ids.length, {
15440
+ message: "runIds must not contain duplicates"
15441
+ }),
15442
+ cancelReason: string$2().max(512).optional()
15443
+ });
15444
+ const BulkCancelWorkflowRunResultSchema = discriminatedUnion("outcome", [
15445
+ object({ runId: string$2(), outcome: literal("cancelled") }),
15446
+ object({ runId: string$2(), outcome: literal("already_cancelled") }),
15447
+ object({
15448
+ runId: string$2(),
15449
+ outcome: literal("not_cancellable"),
15450
+ status: string$2()
15451
+ }),
15452
+ object({ runId: string$2(), outcome: literal("not_found") }),
15453
+ object({
15454
+ runId: string$2(),
15455
+ outcome: literal("failed"),
15456
+ code: string$2(),
15457
+ retryable: boolean$2()
15458
+ })
15459
+ ]);
15460
+ object({
15461
+ summary: object({
15462
+ requested: number$3(),
15463
+ cancelled: number$3(),
15464
+ alreadyCancelled: number$3(),
15465
+ notCancellable: number$3(),
15466
+ notFound: number$3(),
15467
+ failed: number$3()
15468
+ }),
15469
+ results: array(BulkCancelWorkflowRunResultSchema)
15470
+ });
15437
15471
  const StepStatusSchema = _enum([
15438
15472
  "pending",
15439
15473
  "running",
@@ -15688,6 +15722,8 @@ const WorkflowInvokePayloadSchema = object({
15688
15722
  preconditionReinvocations: number$3().int().positive().optional(),
15689
15723
  /** Number of times this message has been re-enqueued due to server errors (5xx) */
15690
15724
  serverErrorRetryCount: number$3().int().optional(),
15725
+ /** Number of times this message has been re-routed after a deployment mismatch */
15726
+ deploymentMismatchRetryCount: number$3().int().nonnegative().optional(),
15691
15727
  /** Step ID for inline step execution in combined handler. If provided, the flow execution
15692
15728
  * will jump directly to execute the step with the given ID before doing an event replay. */
15693
15729
  stepId: string$2().optional(),
@@ -15764,6 +15800,9 @@ object({
15764
15800
  specVersion: number$3().optional(),
15765
15801
  isWebhook: boolean$2().optional(),
15766
15802
  isSystem: boolean$2().optional(),
15803
+ // Earliest time the token can become available after the owning run ends.
15804
+ // An active run keeps the token beyond this deadline.
15805
+ tokenRetentionUntil: date().optional(),
15767
15806
  // Present when the server stored it (new hooks) or synthesized it from the
15768
15807
  // run (old hooks). Absent only against an old server, where the resume path
15769
15808
  // falls back to `runs.get`.
@@ -17393,7 +17432,7 @@ async function hydrateResourceIOAsync(resource, key) {
17393
17432
  return { hydrateDataWithKey: hydrateDataWithKey3, deriveRunPayloadKeys: deriveRunPayloadKeys3 };
17394
17433
  }, true ? void 0 : void 0);
17395
17434
  const { ensureZstdDecoderRegistered } = await __vitePreload(async () => {
17396
- const { ensureZstdDecoderRegistered: ensureZstdDecoderRegistered2 } = await import("./zstd-browser-decoder-Dw3HhTgO.js");
17435
+ const { ensureZstdDecoderRegistered: ensureZstdDecoderRegistered2 } = await import("./zstd-browser-decoder-DemK2pIP.js");
17397
17436
  return { ensureZstdDecoderRegistered: ensureZstdDecoderRegistered2 };
17398
17437
  }, true ? __vite__mapDeps([0,1]) : void 0);
17399
17438
  ensureZstdDecoderRegistered();
@@ -45019,7 +45058,7 @@ var tn = f("block", "before:content-[counter(line)]", "before:inline-block", "be
45019
45058
  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 });
45020
45059
  var Se = reactExports.createContext({ code: "" }), de = () => reactExports.useContext(Se);
45021
45060
  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 }) });
45022
- var cn$1 = /\n+$/, dn = reactExports.lazy(() => __vitePreload(() => import("./highlighted-body-B3W2YXNL-DMawUm9n.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 }) => {
45061
+ var cn$1 = /\n+$/, dn = reactExports.lazy(() => __vitePreload(() => import("./highlighted-body-B3W2YXNL-B5pbFkUr.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 }) => {
45023
45062
  let i = reactExports.useMemo(() => e.replace(cn$1, ""), [e]), c = reactExports.useMemo(() => ({ bg: "transparent", fg: "inherit", tokens: i.split(`
45024
45063
  `).map((a2) => [{ content: a2, color: "inherit", bgColor: "transparent", htmlStyle: {}, offset: 0 }]) }), [i]);
45025
45064
  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 }) })] }) });
@@ -49420,6 +49459,9 @@ async function fetchHook(worldEnv, hookId, resolveData = "all") {
49420
49459
  async function cancelRun(worldEnv, runId) {
49421
49460
  return rpc("cancelRun", { worldEnv, runId });
49422
49461
  }
49462
+ async function bulkCancelRuns(worldEnv, runIds) {
49463
+ return rpc("bulkCancelRuns", { worldEnv, runIds });
49464
+ }
49423
49465
  async function recreateRun(worldEnv, runId, deploymentId) {
49424
49466
  return rpc("recreateRun", { worldEnv, runId, deploymentId });
49425
49467
  }
@@ -49449,7 +49491,7 @@ const mermaid3ZIDBTTL = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.def
49449
49491
  Mermaid: Nt
49450
49492
  }, Symbol.toStringTag, { value: "Module" }));
49451
49493
  export {
49452
- CollapsibleTrigger as $,
49494
+ CollapsibleRoot as $,
49453
49495
  Anchor as A,
49454
49496
  Button as B,
49455
49497
  Check as C,
@@ -49462,118 +49504,120 @@ export {
49462
49504
  ChevronDown as J,
49463
49505
  Ks as K,
49464
49506
  useComposedRefs as L,
49465
- fetchRun as M,
49466
- cva as N,
49467
- Presence as O,
49507
+ BULK_CANCEL_MAX_RUN_IDS as M,
49508
+ fetchRun as N,
49509
+ cva as O,
49468
49510
  Primitive as P,
49469
49511
  Qe as Q,
49470
49512
  R,
49471
49513
  ServerConfigProvider as S,
49472
49514
  Tooltip as T,
49473
- createContext2 as U,
49515
+ Presence as U,
49474
49516
  VISUALLY_HIDDEN_STYLES as V,
49475
- fetchWorkflowsManifest as W,
49476
- cn$4 as X,
49477
- CopyableDataBlock as Y,
49478
- CollapsibleRoot as Z,
49517
+ createContext2 as W,
49518
+ fetchWorkflowsManifest as X,
49519
+ cn$4 as Y,
49520
+ CopyableDataBlock as Z,
49479
49521
  __vitePreload as _,
49480
49522
  TooltipTrigger as a,
49481
- Slot as a$,
49482
- CollapsibleContent as a0,
49483
- CopyButton as a1,
49484
- RESERVED_ATTRIBUTE_KEY_PREFIX as a2,
49485
- Spinner as a3,
49486
- ContextCardProvider as a4,
49487
- Skeleton as a5,
49488
- DecryptClickContext as a6,
49489
- Yr as a7,
49490
- isEncryptedMarker$1 as a8,
49491
- TimestampTooltip as a9,
49492
- isSpanDimmedBySearch as aA,
49493
- ROW_HEIGHT_PX as aB,
49494
- getSpanDurationMs as aC,
49495
- isSpanErrored as aD,
49496
- formatDurationPrecise as aE,
49497
- TooltipProvider as aF,
49498
- ActiveSpanProvider as aG,
49499
- useReducedMotion as aH,
49500
- searchSpans as aI,
49501
- computeRootBounds as aJ,
49502
- computeTimeMarkers as aK,
49503
- clampViewportToRoot as aL,
49504
- getHighResInMs as aM,
49505
- scrollRowIntoView as aN,
49506
- TIMELINE_PADDING_PX as aO,
49507
- Minimap as aP,
49508
- Timeline as aQ,
49509
- TimelineHeader as aR,
49510
- wheelZoomScaleFactor as aS,
49511
- wheelDeltaToPixels as aT,
49512
- SidebarDataProvider as aU,
49513
- fetchHook as aV,
49514
- hydrateResourceIOAsync as aW,
49515
- fetchStep as aX,
49516
- hydrateResourceIO as aY,
49517
- fetchStreams as aZ,
49518
- apiBase as a_,
49519
- formatDuration as aa,
49520
- DataInspector as ab,
49521
- _r as ac,
49522
- isHookLifecycleEventType as ad,
49523
- isTerminalStepEventType as ae,
49524
- isWaitEventType as af,
49525
- isStepEventType as ag,
49526
- RunClickContext as ah,
49527
- StreamClickContext as ai,
49528
- Collapsible as aj,
49529
- isExpiredMarker as ak,
49530
- isDoStreamStep as al,
49531
- extractConversation as am,
49532
- EncryptedDataBlock as an,
49533
- getEventDataRefFields as ao,
49534
- hasEncryptedFields as ap,
49535
- useSidebarDataOptional as aq,
49536
- isTerminalWorkflowRunStatus as ar,
49537
- clsx as as,
49538
- useActiveSpan as at,
49539
- useSidebarData as au,
49540
- Tooltip$1 as av,
49541
- TooltipTrigger$1 as aw,
49542
- IconButton as ax,
49543
- TooltipContent$1 as ay,
49544
- useRowWindow as az,
49523
+ apiBase as a$,
49524
+ CollapsibleTrigger as a0,
49525
+ CollapsibleContent as a1,
49526
+ CopyButton as a2,
49527
+ RESERVED_ATTRIBUTE_KEY_PREFIX as a3,
49528
+ Spinner as a4,
49529
+ ContextCardProvider as a5,
49530
+ Skeleton as a6,
49531
+ DecryptClickContext as a7,
49532
+ Yr as a8,
49533
+ isEncryptedMarker$1 as a9,
49534
+ useRowWindow as aA,
49535
+ isSpanDimmedBySearch as aB,
49536
+ ROW_HEIGHT_PX as aC,
49537
+ getSpanDurationMs as aD,
49538
+ isSpanErrored as aE,
49539
+ formatDurationPrecise as aF,
49540
+ TooltipProvider as aG,
49541
+ ActiveSpanProvider as aH,
49542
+ useReducedMotion as aI,
49543
+ searchSpans as aJ,
49544
+ computeRootBounds as aK,
49545
+ computeTimeMarkers as aL,
49546
+ clampViewportToRoot as aM,
49547
+ getHighResInMs as aN,
49548
+ scrollRowIntoView as aO,
49549
+ TIMELINE_PADDING_PX as aP,
49550
+ Minimap as aQ,
49551
+ Timeline as aR,
49552
+ TimelineHeader as aS,
49553
+ wheelZoomScaleFactor as aT,
49554
+ wheelDeltaToPixels as aU,
49555
+ SidebarDataProvider as aV,
49556
+ fetchHook as aW,
49557
+ hydrateResourceIOAsync as aX,
49558
+ fetchStep as aY,
49559
+ hydrateResourceIO as aZ,
49560
+ fetchStreams as a_,
49561
+ TimestampTooltip as aa,
49562
+ formatDuration as ab,
49563
+ DataInspector as ac,
49564
+ _r as ad,
49565
+ isHookLifecycleEventType as ae,
49566
+ isTerminalStepEventType as af,
49567
+ isWaitEventType as ag,
49568
+ isStepEventType as ah,
49569
+ RunClickContext as ai,
49570
+ StreamClickContext as aj,
49571
+ Collapsible as ak,
49572
+ isExpiredMarker as al,
49573
+ isDoStreamStep as am,
49574
+ extractConversation as an,
49575
+ EncryptedDataBlock as ao,
49576
+ getEventDataRefFields as ap,
49577
+ hasEncryptedFields as aq,
49578
+ useSidebarDataOptional as ar,
49579
+ isTerminalWorkflowRunStatus as as,
49580
+ clsx as at,
49581
+ useActiveSpan as au,
49582
+ useSidebarData as av,
49583
+ Tooltip$1 as aw,
49584
+ TooltipTrigger$1 as ax,
49585
+ IconButton as ay,
49586
+ TooltipContent$1 as az,
49545
49587
  TooltipContent as b,
49546
- Slottable as b0,
49547
- buttonVariants as b1,
49548
- fetchEvent as b2,
49549
- fetchEventsByCorrelationId as b3,
49550
- isEncryptedData as b4,
49551
- hydrateData as b5,
49552
- decrypt as b6,
49553
- deriveRunPayloadKeys as b7,
49554
- getWebRevivers as b8,
49555
- LIVE_UPDATE_INTERVAL_MS as b9,
49556
- getEncryptionKeyForRun as ba,
49557
- StreamViewerSkeleton as bb,
49558
- Lock as bc,
49559
- StreamViewer as bd,
49560
- composeRefs as be,
49561
- useFloating as bf,
49562
- offset as bg,
49563
- shift as bh,
49564
- limitShift as bi,
49565
- flip as bj,
49566
- size as bk,
49567
- arrow as bl,
49568
- hide as bm,
49569
- autoUpdate as bn,
49570
- VERCEL_403_ERROR_MESSAGE as bo,
49571
- cancelRun as bp,
49572
- reenqueueRun as bq,
49573
- wakeUpRun as br,
49574
- resumeHook as bs,
49575
- fetchHookToken as bt,
49576
- recreateRun as bu,
49588
+ Slot as b0,
49589
+ Slottable as b1,
49590
+ buttonVariants as b2,
49591
+ fetchEvent as b3,
49592
+ fetchEventsByCorrelationId as b4,
49593
+ isEncryptedData as b5,
49594
+ hydrateData as b6,
49595
+ decrypt as b7,
49596
+ deriveRunPayloadKeys as b8,
49597
+ getWebRevivers as b9,
49598
+ LIVE_UPDATE_INTERVAL_MS as ba,
49599
+ getEncryptionKeyForRun as bb,
49600
+ StreamViewerSkeleton as bc,
49601
+ Lock as bd,
49602
+ StreamViewer as be,
49603
+ composeRefs as bf,
49604
+ useFloating as bg,
49605
+ offset as bh,
49606
+ shift as bi,
49607
+ limitShift as bj,
49608
+ flip as bk,
49609
+ size as bl,
49610
+ arrow as bm,
49611
+ hide as bn,
49612
+ autoUpdate as bo,
49613
+ VERCEL_403_ERROR_MESSAGE as bp,
49614
+ bulkCancelRuns as bq,
49615
+ reenqueueRun as br,
49616
+ wakeUpRun as bs,
49617
+ resumeHook as bt,
49618
+ fetchHookToken as bu,
49619
+ cancelRun as bv,
49620
+ recreateRun as bw,
49577
49621
  createLucideIcon as c,
49578
49622
  runHealthCheck as d,
49579
49623
  cn as e,