@workflow/web 4.1.22 → 4.1.23

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.
@@ -9180,7 +9180,7 @@ const app = express();
9180
9180
  app.all(
9181
9181
  "/{*splat}",
9182
9182
  createRequestHandler({
9183
- build: () => import("./server-build-B1ehSvPo.js").then((n) => n.a6)
9183
+ build: () => import("./server-build-C7DcIi-X.js").then((n) => n.a6)
9184
9184
  })
9185
9185
  );
9186
9186
  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 { a0 as R, a1 as Ks, a2 as jsxRuntimeExports, a3 as Qe } from "./server-build-B1ehSvPo.js";
6
- import { r as reactExports } from "./app-RN9KG5Qq.js";
5
+ import { a0 as R, a1 as Ks, a2 as jsxRuntimeExports, a3 as Qe } from "./server-build-C7DcIi-X.js";
6
+ import { r as reactExports } from "./app-Cqq1tzT2.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-B1ehSvPo.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, _, $ } from "./server-build-B1ehSvPo.js";
7
- import "./app-RN9KG5Qq.js";
5
+ import { H as HookSchema } from "./server-build-C7DcIi-X.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, _, $ } from "./server-build-C7DcIi-X.js";
7
+ import "./app-Cqq1tzT2.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-B1ehSvPo.js";
6
- import "./app-RN9KG5Qq.js";
5
+ import { N as Nt } from "./server-build-C7DcIi-X.js";
6
+ import "./app-Cqq1tzT2.js";
7
7
  import "stream";
8
8
  import "express";
9
9
  import "node:stream";
@@ -18,7 +18,7 @@ import { createRequire as __wkfCreateRequire } from "node:module";
18
18
  if (typeof globalThis.require === "undefined") {
19
19
  globalThis.require = __wkfCreateRequire(import.meta.url);
20
20
  }
21
- import { a as requireReact, S as ServerRouter, c as createReadableStreamFromReadable, r as reactExports, g as getDefaultExportFromCjs, R as React, b as ReactExports, w as withComponentProps, d as withErrorBoundaryProps, M as Meta, L as Links, e as ScrollRestoration, f as Scripts, O as Outlet, u as useNavigate, h as useSearchParams, i as Link$1, j as useRouteError, k as isRouteErrorResponse, l as useLocation, m as useParams } from "./app-RN9KG5Qq.js";
21
+ import { a as requireReact, S as ServerRouter, c as createReadableStreamFromReadable, r as reactExports, g as getDefaultExportFromCjs, R as React, b as ReactExports, w as withComponentProps, d as withErrorBoundaryProps, M as Meta, L as Links, e as ScrollRestoration, f as Scripts, O as Outlet, u as useNavigate, h as useSearchParams, i as Link$1, j as useRouteError, k as isRouteErrorResponse, l as useLocation, m as useParams } from "./app-Cqq1tzT2.js";
22
22
  import require$$0$5, { PassThrough, Transform as Transform$1 } from "node:stream";
23
23
  import require$$0 from "util";
24
24
  import require$$1 from "crypto";
@@ -81857,7 +81857,7 @@ var tn = f("block", "before:content-[counter(line)]", "before:inline-block", "be
81857
81857
  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 });
81858
81858
  var Se = reactExports.createContext({ code: "" }), de = () => reactExports.useContext(Se);
81859
81859
  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 }) });
81860
- var cn$1 = /\n+$/, dn = reactExports.lazy(() => import("./highlighted-body-B3W2YXNL-BHd4-kG6.js").then((e) => ({ default: e.HighlightedCodeBlockBody }))), rt = ({ code: e, language: t, className: o, children: n, isIncomplete: s2 = false, ...r2 }) => {
81860
+ var cn$1 = /\n+$/, dn = reactExports.lazy(() => import("./highlighted-body-B3W2YXNL-DCJ0KRmM.js").then((e) => ({ default: e.HighlightedCodeBlockBody }))), rt = ({ code: e, language: t, className: o, children: n, isIncomplete: s2 = false, ...r2 }) => {
81861
81861
  let i = reactExports.useMemo(() => e.replace(cn$1, ""), [e]), c = reactExports.useMemo(() => ({ bg: "transparent", fg: "inherit", tokens: i.split(`
81862
81862
  `).map((a2) => [{ content: a2, color: "inherit", bgColor: "transparent", htmlStyle: {}, offset: 0 }]) }), [i]);
81863
81863
  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 }) })] }) });
@@ -82179,7 +82179,7 @@ var Dt = ({ children: e, className: t, onDownload: o, onError: n }) => {
82179
82179
  }, []), jsxRuntimeExports.jsxs("div", { className: "relative", ref: i, children: [jsxRuntimeExports.jsx("button", { className: f("cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50", t), disabled: c, onClick: () => r2(!s2), title: "Download table", type: "button", children: e != null ? e : jsxRuntimeExports.jsx(Z, { size: 14 }) }), s2 ? jsxRuntimeExports.jsxs("div", { className: "absolute top-full right-0 z-10 mt-1 min-w-[120px] overflow-hidden rounded-md border border-border bg-background shadow-lg", children: [jsxRuntimeExports.jsx("button", { className: "w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40", onClick: () => a2("csv"), title: "Download table as CSV", type: "button", children: "CSV" }), jsxRuntimeExports.jsx("button", { className: "w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40", onClick: () => a2("markdown"), title: "Download table as Markdown", type: "button", children: "Markdown" })] }) : null] });
82180
82180
  };
82181
82181
  var Vt = ({ children: e, className: t, showControls: o, ...n }) => jsxRuntimeExports.jsxs("div", { className: "my-4 flex flex-col gap-2 rounded-lg border border-border bg-sidebar p-2", "data-streamdown": "table-wrapper", children: [o ? jsxRuntimeExports.jsxs("div", { className: "flex items-center justify-end gap-1", children: [jsxRuntimeExports.jsx(Ht, {}), jsxRuntimeExports.jsx(Dt, {})] }) : null, jsxRuntimeExports.jsx("div", { className: "border-collapse overflow-x-auto overscroll-y-auto rounded-md border border-border bg-background", children: jsxRuntimeExports.jsx("table", { className: f("w-full divide-y divide-border", t), "data-streamdown": "table", ...n, children: e }) })] });
82182
- var Jn = reactExports.lazy(() => import("./mermaid-3ZIDBTTL-DNnc363s.js").then((e) => ({ default: e.Mermaid }))), Kn = /language-([^\s]+)/;
82182
+ var Jn = reactExports.lazy(() => import("./mermaid-3ZIDBTTL-Dagv8YB7.js").then((e) => ({ default: e.Mermaid }))), Kn = /language-([^\s]+)/;
82183
82183
  function ke(e, t) {
82184
82184
  if (!(e != null && e.position || t != null && t.position)) return true;
82185
82185
  if (!(e != null && e.position && (t != null && t.position))) return false;
@@ -92071,7 +92071,7 @@ createLogger("build", {
92071
92071
  debugNamespace: "workflow:build"
92072
92072
  });
92073
92073
  const MAX_QUEUE_DELIVERIES = 48;
92074
- const version$1 = "4.8.6";
92074
+ const version$1 = "4.8.7";
92075
92075
  const execFileAsync = promisify(execFile);
92076
92076
  function parsePort$1(value, radix = 10) {
92077
92077
  const port = parseInt(value, radix);
@@ -120733,7 +120733,7 @@ function createLocalWorld(args) {
120733
120733
  const basedir = mergedConfig.dataDir;
120734
120734
  const hooksDir = path$3.join(basedir, "hooks");
120735
120735
  const taggedHookFiles = await listTaggedFiles(hooksDir, tag);
120736
- const { HookSchema: HookSchema2 } = await import("./index-9aIXU-9S.js");
120736
+ const { HookSchema: HookSchema2 } = await import("./index-B4hi3c32.js");
120737
120737
  await Promise.all(taggedHookFiles.map(async (hookFile) => {
120738
120738
  const hook = await readJSON(path$3.join(hooksDir, hookFile), HookSchema2);
120739
120739
  if (hook == null ? void 0 : hook.token) {
@@ -121160,8 +121160,8 @@ function requireGetVercelOidcToken() {
121160
121160
  }
121161
121161
  try {
121162
121162
  const [{ getTokenPayload, isExpired }, { refreshToken }] = await Promise.all([
121163
- await import("./token-util-0IzeGP3A.js").then((n) => n.t),
121164
- await import("./token-Csl_4rgO.js").then((n) => n.t)
121163
+ await import("./token-util-Br9V80P7.js").then((n) => n.t),
121164
+ await import("./token-CERc2_Jt.js").then((n) => n.t)
121165
121165
  ]);
121166
121166
  if (!token || isExpired(getTokenPayload(token), options == null ? void 0 : options.expirationBufferMs)) {
121167
121167
  await refreshToken(options);
@@ -121796,6 +121796,35 @@ const WorkflowRunId = SemanticConvention("workflow.run.id");
121796
121796
  const StepId = SemanticConvention("step.id");
121797
121797
  const WorkflowHttpTransport = SemanticConvention("workflow.http.transport");
121798
121798
  const REQUEST_TIMEOUT_MS = 6e4;
121799
+ const TRANSIENT_TRANSPORT_ERROR_CODES = /* @__PURE__ */ new Set([
121800
+ "UND_ERR_INFO",
121801
+ "UND_ERR_REQ_RETRY",
121802
+ "UND_ERR_SOCKET",
121803
+ "UND_ERR_CONNECT",
121804
+ "UND_ERR_CONNECT_TIMEOUT",
121805
+ "UND_ERR_HEADERS_TIMEOUT",
121806
+ "UND_ERR_BODY_TIMEOUT",
121807
+ "UND_ERR_CLOSED",
121808
+ "ECONNRESET",
121809
+ "ECONNREFUSED",
121810
+ "ENOTFOUND",
121811
+ "EAI_AGAIN",
121812
+ "EPIPE",
121813
+ "ETIMEDOUT"
121814
+ ]);
121815
+ function getTransientTransportCode(error2) {
121816
+ let current = error2;
121817
+ for (let depth = 0; current != null && depth < 8; depth++) {
121818
+ if (typeof current === "object" && "code" in current) {
121819
+ const code2 = current.code;
121820
+ if (typeof code2 === "string" && TRANSIENT_TRANSPORT_ERROR_CODES.has(code2)) {
121821
+ return code2;
121822
+ }
121823
+ }
121824
+ current = current == null ? void 0 : current.cause;
121825
+ }
121826
+ return void 0;
121827
+ }
121799
121828
  const HTTP_DEBUG_ENABLED = typeof process !== "undefined" && typeof process.env.DEBUG === "string" && (process.env.DEBUG.includes("workflow:") || process.env.DEBUG === "*");
121800
121829
  const DIAGNOSTIC_HEADERS = [
121801
121830
  "x-vercel-id",
@@ -121889,7 +121918,7 @@ async function instrumentedFetch(opts) {
121889
121918
  const { method, url: url2, headers: headers2, body: body2, dispatcher: dispatcher2, peerService = "workflow-server", timeoutMs = REQUEST_TIMEOUT_MS, signal: callerSignal, injectTraceContext = true, cacheBust = true, logLabel, buildError, onTransportOutcome, deferTransportSuccessUntilBody = false } = opts;
121890
121919
  const label = logLabel ?? url2;
121891
121920
  return trace(`http ${method}`, { kind: await getSpanKind("CLIENT") }, async (span) => {
121892
- var _a3, _b2, _c;
121921
+ var _a3, _b2, _c, _d, _e2;
121893
121922
  span == null ? void 0 : span.setAttributes(httpClientSpanAttributes({ method, url: url2, peerService }));
121894
121923
  if (injectTraceContext)
121895
121924
  await injectTraceContextIntoHeaders(headers2);
@@ -121927,11 +121956,18 @@ async function instrumentedFetch(opts) {
121927
121956
  const elapsed = Date.now() - start2;
121928
121957
  onTransportOutcome == null ? void 0 : onTransportOutcome(error2);
121929
121958
  if (error2 instanceof Error && (error2.name === "TimeoutError" || error2.name === "AbortError")) {
121930
- const timeoutError = new WorkflowWorldError(`${method} ${label} timed out after ${elapsed}ms`, { url: url2, cause: error2 });
121959
+ const timeoutError = new WorkflowWorldError(`${method} ${label} timed out after ${elapsed}ms`, { url: url2, code: "TIMEOUT", cause: error2 });
121931
121960
  span == null ? void 0 : span.setAttributes({ ...ErrorType("TIMEOUT") });
121932
121961
  (_a3 = span == null ? void 0 : span.recordException) == null ? void 0 : _a3.call(span, timeoutError);
121933
121962
  throw timeoutError;
121934
121963
  }
121964
+ const transportCode = getTransientTransportCode(error2);
121965
+ if (transportCode) {
121966
+ const transportError2 = new WorkflowWorldError(`${method} ${label} transport failure after ${elapsed}ms (${transportCode})`, { url: url2, code: "TRANSPORT", cause: error2 });
121967
+ span == null ? void 0 : span.setAttributes({ ...ErrorType("TRANSPORT") });
121968
+ (_b2 = span == null ? void 0 : span.recordException) == null ? void 0 : _b2.call(span, transportError2);
121969
+ throw transportError2;
121970
+ }
121935
121971
  throw error2;
121936
121972
  }
121937
121973
  const ms2 = Date.now() - start2;
@@ -121947,6 +121983,16 @@ async function instrumentedFetch(opts) {
121947
121983
  try {
121948
121984
  error3 = await buildError(response2);
121949
121985
  } catch (cause) {
121986
+ const transportCode = getTransientTransportCode(cause);
121987
+ if (transportCode) {
121988
+ if (deferTransportSuccessUntilBody) {
121989
+ onTransportOutcome == null ? void 0 : onTransportOutcome(cause);
121990
+ }
121991
+ const transportError2 = new WorkflowWorldError(`${method} ${label} response body transport failure (${transportCode})`, { url: url2, code: "TRANSPORT", cause });
121992
+ span == null ? void 0 : span.setAttributes({ ...ErrorType("TRANSPORT") });
121993
+ (_c = span == null ? void 0 : span.recordException) == null ? void 0 : _c.call(span, transportError2);
121994
+ throw transportError2;
121995
+ }
121950
121996
  if (deferTransportSuccessUntilBody) {
121951
121997
  onTransportOutcome == null ? void 0 : onTransportOutcome(cause);
121952
121998
  }
@@ -121954,7 +122000,7 @@ async function instrumentedFetch(opts) {
121954
122000
  }
121955
122001
  if (deferTransportSuccessUntilBody)
121956
122002
  onTransportOutcome == null ? void 0 : onTransportOutcome();
121957
- (_b2 = span == null ? void 0 : span.recordException) == null ? void 0 : _b2.call(span, error3);
122003
+ (_d = span == null ? void 0 : span.recordException) == null ? void 0 : _d.call(span, error3);
121958
122004
  throw error3;
121959
122005
  }
121960
122006
  const text2 = await response2.text().catch(() => "");
@@ -121964,7 +122010,7 @@ async function instrumentedFetch(opts) {
121964
122010
  url: url2,
121965
122011
  retryAfter: parseRetryAfter(response2.headers.get("Retry-After"))
121966
122012
  });
121967
- (_c = span == null ? void 0 : span.recordException) == null ? void 0 : _c.call(span, error2);
122013
+ (_e2 = span == null ? void 0 : span.recordException) == null ? void 0 : _e2.call(span, error2);
121968
122014
  throw error2;
121969
122015
  }
121970
122016
  return response2;
@@ -126661,38 +126707,10 @@ var QueueClient = class {
126661
126707
  setApi(this, new ApiClient({ ...options, region }));
126662
126708
  }
126663
126709
  };
126664
- const version = "4.7.2";
126710
+ const version = "4.7.3";
126665
126711
  const IDEMPOTENT_METHODS = /* @__PURE__ */ new Set(["GET", "HEAD"]);
126666
126712
  const MAX_BODY_PARSE_RETRIES = 2;
126667
126713
  const BODY_PARSE_RETRY_BASE_MS = 100;
126668
- const TRANSIENT_TRANSPORT_ERROR_CODES = /* @__PURE__ */ new Set([
126669
- "UND_ERR_REQ_RETRY",
126670
- "UND_ERR_SOCKET",
126671
- "UND_ERR_CONNECT",
126672
- "UND_ERR_CONNECT_TIMEOUT",
126673
- "UND_ERR_HEADERS_TIMEOUT",
126674
- "UND_ERR_BODY_TIMEOUT",
126675
- "UND_ERR_CLOSED",
126676
- "ECONNRESET",
126677
- "ECONNREFUSED",
126678
- "ENOTFOUND",
126679
- "EAI_AGAIN",
126680
- "EPIPE",
126681
- "ETIMEDOUT"
126682
- ]);
126683
- function getTransientTransportCode(error2) {
126684
- let current = error2;
126685
- for (let depth = 0; current != null && depth < 5; depth++) {
126686
- if (typeof current === "object" && "code" in current) {
126687
- const code2 = current.code;
126688
- if (typeof code2 === "string" && TRANSIENT_TRANSPORT_ERROR_CODES.has(code2)) {
126689
- return code2;
126690
- }
126691
- }
126692
- current = current == null ? void 0 : current.cause;
126693
- }
126694
- return void 0;
126695
- }
126696
126714
  const getWorkflowServerUrlOverride = () => process.env.VERCEL_WORKFLOW_SERVER_URL || "";
126697
126715
  const DEFAULT_RESOLVE_DATA_OPTION = "all";
126698
126716
  function deserializeError(obj) {
@@ -127503,7 +127521,8 @@ async function fetchV4(url2, init2, config2, opName) {
127503
127521
  }
127504
127522
  } catch (cause) {
127505
127523
  noteEventsTransportOutcome(dispatcher2, cause);
127506
- controller.error(cause);
127524
+ const transportCode = getTransientTransportCode(cause);
127525
+ controller.error(transportCode ? new WorkflowWorldError(`v4 ${opName}: response stream transport failure (${transportCode})`, { url: url2, code: "TRANSPORT", cause }) : cause);
127507
127526
  }
127508
127527
  },
127509
127528
  cancel(reason) {
@@ -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 { g as getDefaultExportFromCjs } from "./app-RN9KG5Qq.js";
6
- import { a5 as requireTokenError, a4 as requireTokenUtil } from "./server-build-B1ehSvPo.js";
5
+ import { g as getDefaultExportFromCjs } from "./app-Cqq1tzT2.js";
6
+ import { a5 as requireTokenError, a4 as requireTokenUtil } from "./server-build-C7DcIi-X.js";
7
7
  function _mergeNamespaces(n, m) {
8
8
  for (var i = 0; i < m.length; i++) {
9
9
  const e = m[i];
@@ -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 { g as getDefaultExportFromCjs } from "./app-RN9KG5Qq.js";
6
- import { a4 as requireTokenUtil } from "./server-build-B1ehSvPo.js";
5
+ import { g as getDefaultExportFromCjs } from "./app-Cqq1tzT2.js";
6
+ import { a4 as requireTokenUtil } from "./server-build-C7DcIi-X.js";
7
7
  function _mergeNamespaces(n, m) {
8
8
  for (var i = 0; i < m.length; i++) {
9
9
  const e = m[i];
@@ -2,7 +2,7 @@ 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 } from "./assets/app-RN9KG5Qq.js";
5
+ import { n } from "./assets/app-Cqq1tzT2.js";
6
6
  import "express";
7
7
  import "stream";
8
8
  export {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@workflow/web",
3
3
  "description": "Workflow Observability UI",
4
- "version": "4.1.22",
4
+ "version": "4.1.23",
5
5
  "type": "module",
6
6
  "private": false,
7
7
  "files": [
@@ -71,12 +71,12 @@
71
71
  "vite": "^6",
72
72
  "vitest": "^3",
73
73
  "jsdom": "^26",
74
- "@workflow/core": "4.8.6",
74
+ "@workflow/core": "4.8.7",
75
75
  "@workflow/errors": "4.2.1",
76
76
  "@workflow/utils": "4.1.4",
77
- "@workflow/web-shared": "4.1.22",
78
77
  "@workflow/world": "4.5.0",
79
- "@workflow/world-vercel": "4.7.2"
78
+ "@workflow/web-shared": "4.1.23",
79
+ "@workflow/world-vercel": "4.7.3"
80
80
  },
81
81
  "scripts": {
82
82
  "dev": "react-router dev",