@workflow/web 5.0.0-beta.17 → 5.0.0-beta.19
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.
- package/build/client/assets/{highlighted-body-B3W2YXNL-QKf7Yrcl.js → highlighted-body-B3W2YXNL-BDAdDO0w.js} +1 -1
- package/build/client/assets/{home-C2tAadK2.js → home-CJauHJtz.js} +2 -2
- package/build/client/assets/index-C7C6cDW5.js +200 -0
- package/build/client/assets/{manifest-96e6bcc7.js → manifest-41c15b7c.js} +1 -1
- package/build/client/assets/{mermaid-3ZIDBTTL-DQJ4rkIZ.js → mermaid-3ZIDBTTL-CO5WTIpO.js} +554 -293
- package/build/client/assets/mermaid-3ZIDBTTL-DYmT7Gxj.css +1 -0
- package/build/client/assets/root-1hd8ZXAx.css +1 -0
- package/build/client/assets/{root-QCHdCGTF.js → root-YgrrwLRm.js} +1 -1
- package/build/client/assets/{run-detail-D4mcR51B.js → run-detail-QryL_6ec.js} +84 -156
- package/build/client/assets/server-build-NFow1VGe.css +1 -0
- package/build/client/assets/{workflow-graph-viewer-BEhdopGj.js → workflow-graph-viewer-DE9gHUqH.js} +1 -1
- package/build/client/assets/zstd-B5R2yJjB.wasm +0 -0
- package/build/client/assets/zstd-browser-decoder-Cf0Zee4U.js +27 -0
- package/build/server/assets/{app-BEmI6bFe.js → app-BPycGx4j.js} +1 -1
- package/build/server/assets/{highlighted-body-B3W2YXNL-B_a6Jc52.js → highlighted-body-B3W2YXNL-DOFGe_gB.js} +2 -2
- package/build/server/assets/index-C7C6cDW5.js +200 -0
- package/build/server/assets/{index-Bg5S_1qh.js → index-CjQDTwmY.js} +27 -26
- package/build/server/assets/{mermaid-3ZIDBTTL-C7y9g953.js → mermaid-3ZIDBTTL-CC2oHOb_.js} +2 -2
- package/build/server/assets/{server-build-B3KD951q.js → server-build-D2BAH5fL.js} +744 -318
- package/build/server/assets/{token-B95VJmzW.js → token-BuB8DbpT.js} +2 -2
- package/build/server/assets/{token-util-q0eyRDZK.js → token-util-bxOuz2AK.js} +2 -2
- package/build/server/assets/zstd-browser-decoder-D_rFps2o.js +64 -0
- package/build/server/index.js +1 -1
- package/package.json +5 -5
- package/build/client/assets/mermaid-3ZIDBTTL-CVTQRy2j.css +0 -1
- package/build/client/assets/root-D1iC2mNY.css +0 -1
- package/build/client/assets/server-build-6KQbeuD8.css +0 -1
|
@@ -14,7 +14,7 @@ var __privateSet = (obj, member, value, setter) => (__accessCheck(obj, member, "
|
|
|
14
14
|
var __privateMethod = (obj, member, method) => (__accessCheck(obj, member, "access private method"), method);
|
|
15
15
|
var __superGet = (cls, obj, key) => __reflectGet(__getProtoOf(cls), key, obj);
|
|
16
16
|
var _a2, _b, _c, _d, _listeners, _onabort, _reader, _root, _hasMagic, _uflag, _parts, _parent, _parentIndex, _negs, _filledNegs, _options, _toString, _emptyExt, _AST_instances, fillNegs_fn, _AST_static, parseAST_fn, canAdoptWithSpace_fn, canAdopt_fn, canAdoptType_fn, adoptWithSpace_fn, adopt_fn, canUsurpType_fn, canUsurp_fn, usurp_fn, flatten_fn, partsToRegExp_fn, parseGlob_fn, _Minimatch_instances, matchGlobstar_fn, matchGlobStarBodySections_fn, matchOne_fn, _worldPromise, _Run_instances, lazyWorldPromise_get, _encryptionKeyPromise, _resilientStart, getEncryptionKey_fn, getEncryptionKeyLazily_fn, pollReturnValue_fn;
|
|
17
|
-
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-
|
|
17
|
+
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-BPycGx4j.js";
|
|
18
18
|
import require$$0$4, { PassThrough } from "node:stream";
|
|
19
19
|
import require$$0 from "util";
|
|
20
20
|
import require$$1 from "crypto";
|
|
@@ -34661,7 +34661,11 @@ const SerializationFormat$1 = {
|
|
|
34661
34661
|
/** devalue stringify/parse with TextEncoder/TextDecoder */
|
|
34662
34662
|
DEVALUE_V1: "devl",
|
|
34663
34663
|
/** Encrypted payload (inner payload has its own format prefix after decryption) */
|
|
34664
|
-
ENCRYPTED: "encr"
|
|
34664
|
+
ENCRYPTED: "encr",
|
|
34665
|
+
/** Gzip-compressed payload (inner payload has its own format prefix after decompression) */
|
|
34666
|
+
GZIP: "gzip",
|
|
34667
|
+
/** Zstandard-compressed payload (inner payload has its own format prefix after decompression) */
|
|
34668
|
+
ZSTD: "zstd"
|
|
34665
34669
|
};
|
|
34666
34670
|
const FORMAT_PREFIX_LENGTH$1 = 4;
|
|
34667
34671
|
new TextEncoder();
|
|
@@ -34707,6 +34711,71 @@ function isEncryptedData(data) {
|
|
|
34707
34711
|
const prefix = formatDecoder$1.decode(data.subarray(0, FORMAT_PREFIX_LENGTH$1));
|
|
34708
34712
|
return prefix === SerializationFormat$1.ENCRYPTED;
|
|
34709
34713
|
}
|
|
34714
|
+
function isCompressedData(data) {
|
|
34715
|
+
if (!(data instanceof Uint8Array) || data.length < FORMAT_PREFIX_LENGTH$1) {
|
|
34716
|
+
return false;
|
|
34717
|
+
}
|
|
34718
|
+
const prefix = formatDecoder$1.decode(data.subarray(0, FORMAT_PREFIX_LENGTH$1));
|
|
34719
|
+
return prefix === SerializationFormat$1.GZIP || prefix === SerializationFormat$1.ZSTD;
|
|
34720
|
+
}
|
|
34721
|
+
function getNodeZlib$1() {
|
|
34722
|
+
var _a3, _b2;
|
|
34723
|
+
try {
|
|
34724
|
+
return (_b2 = (_a3 = globalThis.process) == null ? void 0 : _a3.getBuiltinModule) == null ? void 0 : _b2.call(_a3, "node:zlib");
|
|
34725
|
+
} catch {
|
|
34726
|
+
return void 0;
|
|
34727
|
+
}
|
|
34728
|
+
}
|
|
34729
|
+
function decompressSyncIfAvailable(format2, payload) {
|
|
34730
|
+
try {
|
|
34731
|
+
const zlib = getNodeZlib$1();
|
|
34732
|
+
if (format2 === SerializationFormat$1.GZIP && (zlib == null ? void 0 : zlib.gunzipSync)) {
|
|
34733
|
+
return new Uint8Array(zlib.gunzipSync(payload));
|
|
34734
|
+
}
|
|
34735
|
+
if (format2 === SerializationFormat$1.ZSTD && (zlib == null ? void 0 : zlib.zstdDecompressSync)) {
|
|
34736
|
+
return new Uint8Array(zlib.zstdDecompressSync(payload));
|
|
34737
|
+
}
|
|
34738
|
+
} catch {
|
|
34739
|
+
}
|
|
34740
|
+
return void 0;
|
|
34741
|
+
}
|
|
34742
|
+
let zstdBrowserDecoder;
|
|
34743
|
+
function registerZstdDecoder(decoder2) {
|
|
34744
|
+
zstdBrowserDecoder = decoder2;
|
|
34745
|
+
}
|
|
34746
|
+
async function decompressAsync(format2, payload) {
|
|
34747
|
+
if (format2 === SerializationFormat$1.ZSTD) {
|
|
34748
|
+
const sync = decompressSyncIfAvailable(format2, payload);
|
|
34749
|
+
if (sync)
|
|
34750
|
+
return sync;
|
|
34751
|
+
if (zstdBrowserDecoder)
|
|
34752
|
+
return zstdBrowserDecoder(payload);
|
|
34753
|
+
throw new Error("zstd-compressed workflow data encountered but no zstd decoder is available. Node.js 22.15+ decodes natively; in the browser register one via registerZstdDecoder (the web o11y package does this).");
|
|
34754
|
+
}
|
|
34755
|
+
const transform2 = new DecompressionStream("gzip");
|
|
34756
|
+
const writer = transform2.writable.getWriter();
|
|
34757
|
+
const writePromise = writer.write(payload).then(() => writer.close());
|
|
34758
|
+
writePromise.catch(() => {
|
|
34759
|
+
});
|
|
34760
|
+
const chunks = [];
|
|
34761
|
+
let total = 0;
|
|
34762
|
+
const reader = transform2.readable.getReader();
|
|
34763
|
+
for (; ; ) {
|
|
34764
|
+
const { done, value } = await reader.read();
|
|
34765
|
+
if (done)
|
|
34766
|
+
break;
|
|
34767
|
+
chunks.push(value);
|
|
34768
|
+
total += value.length;
|
|
34769
|
+
}
|
|
34770
|
+
await writePromise;
|
|
34771
|
+
const out = new Uint8Array(total);
|
|
34772
|
+
let offset2 = 0;
|
|
34773
|
+
for (const chunk of chunks) {
|
|
34774
|
+
out.set(chunk, offset2);
|
|
34775
|
+
offset2 += chunk.length;
|
|
34776
|
+
}
|
|
34777
|
+
return out;
|
|
34778
|
+
}
|
|
34710
34779
|
function hydrateData(value, revivers) {
|
|
34711
34780
|
if (value instanceof Uint8Array) {
|
|
34712
34781
|
if (isEncryptedData(value)) {
|
|
@@ -34717,6 +34786,13 @@ function hydrateData(value, revivers) {
|
|
|
34717
34786
|
const str = new TextDecoder().decode(payload);
|
|
34718
34787
|
return parse$7(str, revivers);
|
|
34719
34788
|
}
|
|
34789
|
+
if (format2 === SerializationFormat$1.GZIP || format2 === SerializationFormat$1.ZSTD) {
|
|
34790
|
+
const inflated = decompressSyncIfAvailable(format2, payload);
|
|
34791
|
+
if (inflated === void 0) {
|
|
34792
|
+
return value;
|
|
34793
|
+
}
|
|
34794
|
+
return hydrateData(inflated, revivers);
|
|
34795
|
+
}
|
|
34720
34796
|
throw new Error(`Unsupported serialization format: ${format2}`);
|
|
34721
34797
|
}
|
|
34722
34798
|
if (Array.isArray(value)) {
|
|
@@ -34725,13 +34801,17 @@ function hydrateData(value, revivers) {
|
|
|
34725
34801
|
return value;
|
|
34726
34802
|
}
|
|
34727
34803
|
async function hydrateDataWithKey(value, revivers, key) {
|
|
34728
|
-
|
|
34804
|
+
let data = value;
|
|
34805
|
+
if (data instanceof Uint8Array && isEncryptedData(data) && key) {
|
|
34729
34806
|
const { decrypt: decrypt2 } = await Promise.resolve().then(() => encryption);
|
|
34730
|
-
const { payload } = decodeFormatPrefix$1(
|
|
34731
|
-
|
|
34732
|
-
|
|
34807
|
+
const { payload } = decodeFormatPrefix$1(data);
|
|
34808
|
+
data = await decrypt2(key, payload);
|
|
34809
|
+
}
|
|
34810
|
+
if (data instanceof Uint8Array && isCompressedData(data)) {
|
|
34811
|
+
const { format: format2, payload } = decodeFormatPrefix$1(data);
|
|
34812
|
+
data = await decompressAsync(format2, payload);
|
|
34733
34813
|
}
|
|
34734
|
-
return hydrateData(
|
|
34814
|
+
return hydrateData(data, revivers);
|
|
34735
34815
|
}
|
|
34736
34816
|
const STREAM_ID_PREFIX = "strm_";
|
|
34737
34817
|
const STREAM_REF_TYPE$1 = "__workflow_stream_ref__";
|
|
@@ -34984,10 +35064,12 @@ const serializationFormat = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object
|
|
|
34984
35064
|
hydrateData,
|
|
34985
35065
|
hydrateDataWithKey,
|
|
34986
35066
|
hydrateResourceIO: hydrateResourceIO$1,
|
|
35067
|
+
isCompressedData,
|
|
34987
35068
|
isEncryptedData,
|
|
34988
35069
|
isExpiredStub,
|
|
34989
35070
|
isRunRef: isRunRef$1,
|
|
34990
35071
|
observabilityRevivers,
|
|
35072
|
+
registerZstdDecoder,
|
|
34991
35073
|
serializedClassToString,
|
|
34992
35074
|
serializedInstanceToRef,
|
|
34993
35075
|
serializedRunToRunRef,
|
|
@@ -49261,7 +49343,8 @@ const SPEC_VERSION_LEGACY = 1;
|
|
|
49261
49343
|
const SPEC_VERSION_SUPPORTS_EVENT_SOURCING = 2;
|
|
49262
49344
|
const SPEC_VERSION_SUPPORTS_CBOR_QUEUE_TRANSPORT = 3;
|
|
49263
49345
|
const SPEC_VERSION_SUPPORTS_ATTRIBUTES = 4;
|
|
49264
|
-
const
|
|
49346
|
+
const SPEC_VERSION_SUPPORTS_COMPRESSION = 5;
|
|
49347
|
+
const SPEC_VERSION_CURRENT = SPEC_VERSION_SUPPORTS_COMPRESSION;
|
|
49265
49348
|
function isLegacySpecVersion(v2) {
|
|
49266
49349
|
return v2 === void 0 || v2 === null || v2 <= SPEC_VERSION_LEGACY;
|
|
49267
49350
|
}
|
|
@@ -49789,6 +49872,8 @@ function replaceEncryptedAndExpiredWithMarkers(resource) {
|
|
|
49789
49872
|
async function hydrateResourceIOWithKey(resource, key) {
|
|
49790
49873
|
const { hydrateDataWithKey: hydrateDataWithKey2 } = await Promise.resolve().then(() => serializationFormat);
|
|
49791
49874
|
const { importKey: importKey2 } = await Promise.resolve().then(() => encryption);
|
|
49875
|
+
const { ensureZstdDecoderRegistered } = await import("./zstd-browser-decoder-D_rFps2o.js");
|
|
49876
|
+
ensureZstdDecoderRegistered();
|
|
49792
49877
|
const cryptoKey = await importKey2(key);
|
|
49793
49878
|
const revivers = getRevivers();
|
|
49794
49879
|
async function decryptField(value, rev, k2) {
|
|
@@ -52306,9 +52391,7 @@ function ReservedBadge() {
|
|
|
52306
52391
|
}
|
|
52307
52392
|
function AttributeRow({ attributeKey, value, removed = false }) {
|
|
52308
52393
|
const reserved = isReservedAttributeKey(attributeKey);
|
|
52309
|
-
return jsxRuntimeExports.jsxs("div", { className: "flex items-center justify-between gap-3 py-
|
|
52310
|
-
color: reserved ? "var(--ds-gray-700)" : "var(--ds-gray-900)"
|
|
52311
|
-
}, children: [jsxRuntimeExports.jsx("span", { className: "truncate", children: attributeKey }), reserved && jsxRuntimeExports.jsx(ReservedBadge, {})] }), removed ? jsxRuntimeExports.jsx("span", { className: "shrink-0 text-label-12 italic", style: { color: "var(--ds-gray-700)" }, children: "removed" }) : jsxRuntimeExports.jsx("span", { className: "max-w-[60%] truncate text-right text-label-12 font-mono text-gray-1000", title: value, children: value })] });
|
|
52394
|
+
return jsxRuntimeExports.jsxs("div", { className: "flex items-center justify-between gap-3 py-0.5", children: [jsxRuntimeExports.jsxs("span", { className: "flex min-w-0 items-center gap-1.5 text-label-13 text-gray-900", style: reserved ? { color: "var(--ds-gray-700)" } : void 0, children: [jsxRuntimeExports.jsx("span", { className: "truncate", children: attributeKey }), reserved && jsxRuntimeExports.jsx(ReservedBadge, {})] }), removed ? jsxRuntimeExports.jsx("span", { className: "shrink-0 text-copy-13 italic text-gray-700", children: "removed" }) : jsxRuntimeExports.jsx("span", { className: "max-w-[60%] truncate text-copy-13 text-gray-1000", title: value, children: value })] });
|
|
52312
52395
|
}
|
|
52313
52396
|
function sortAttributeKeys(keys2) {
|
|
52314
52397
|
return [...keys2].sort((a2, b2) => {
|
|
@@ -52323,7 +52406,7 @@ function RunAttributesCard({ attributes }) {
|
|
|
52323
52406
|
const keys2 = sortAttributeKeys(Object.keys(attributes));
|
|
52324
52407
|
if (keys2.length === 0)
|
|
52325
52408
|
return null;
|
|
52326
|
-
return jsxRuntimeExports.jsx(DetailCard, { summary:
|
|
52409
|
+
return jsxRuntimeExports.jsx(DetailCard, { summary: "Attributes", defaultOpen: true, contentClassName: "mb-4", children: jsxRuntimeExports.jsx("div", { className: "flex flex-col", children: keys2.map((key) => jsxRuntimeExports.jsx(AttributeRow, { attributeKey: key, value: attributes[key] }, key)) }) });
|
|
52327
52410
|
}
|
|
52328
52411
|
function isAttrSetEventData(data) {
|
|
52329
52412
|
if (data === null || typeof data !== "object")
|
|
@@ -52346,7 +52429,7 @@ function AttrSetEventBlock({ data }) {
|
|
|
52346
52429
|
return jsxRuntimeExports.jsx(CopyableDataBlock, { data });
|
|
52347
52430
|
}
|
|
52348
52431
|
const writerLabel = describeWriter(data.writer);
|
|
52349
|
-
return jsxRuntimeExports.jsxs("div", { className: "flex flex-col px-3 py-1", children: [jsxRuntimeExports.jsx("div", { className: "flex flex-col
|
|
52432
|
+
return jsxRuntimeExports.jsxs("div", { className: "flex flex-col px-3 py-1", children: [jsxRuntimeExports.jsx("div", { className: "flex flex-col", children: data.changes.map((change, index2) => jsxRuntimeExports.jsx(AttributeRow, { attributeKey: change.key, removed: change.value === null, value: change.value ?? void 0 }, `${change.key}:${index2}`)) }), writerLabel && jsxRuntimeExports.jsx("div", { className: "border-t py-1.5 text-label-12", style: {
|
|
52350
52433
|
borderColor: "var(--ds-gray-alpha-400)",
|
|
52351
52434
|
color: "var(--ds-gray-700)"
|
|
52352
52435
|
}, children: writerLabel })] });
|
|
@@ -83142,7 +83225,7 @@ var tn = f("block", "before:content-[counter(line)]", "before:inline-block", "be
|
|
|
83142
83225
|
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 });
|
|
83143
83226
|
var Se = reactExports.createContext({ code: "" }), de = () => reactExports.useContext(Se);
|
|
83144
83227
|
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 }) });
|
|
83145
|
-
var cn$1 = /\n+$/, dn = reactExports.lazy(() => import("./highlighted-body-B3W2YXNL-
|
|
83228
|
+
var cn$1 = /\n+$/, dn = reactExports.lazy(() => import("./highlighted-body-B3W2YXNL-DOFGe_gB.js").then((e) => ({ default: e.HighlightedCodeBlockBody }))), rt = ({ code: e, language: t, className: o, children: n, isIncomplete: s2 = false, ...r2 }) => {
|
|
83146
83229
|
let i = reactExports.useMemo(() => e.replace(cn$1, ""), [e]), c = reactExports.useMemo(() => ({ bg: "transparent", fg: "inherit", tokens: i.split(`
|
|
83147
83230
|
`).map((a2) => [{ content: a2, color: "inherit", bgColor: "transparent", htmlStyle: {}, offset: 0 }]) }), [i]);
|
|
83148
83231
|
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 }) })] }) });
|
|
@@ -83464,7 +83547,7 @@ var Dt = ({ children: e, className: t, onDownload: o, onError: n }) => {
|
|
|
83464
83547
|
}, []), 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] });
|
|
83465
83548
|
};
|
|
83466
83549
|
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 }) })] });
|
|
83467
|
-
var Jn = reactExports.lazy(() => import("./mermaid-3ZIDBTTL-
|
|
83550
|
+
var Jn = reactExports.lazy(() => import("./mermaid-3ZIDBTTL-CC2oHOb_.js").then((e) => ({ default: e.Mermaid }))), Kn = /language-([^\s]+)/;
|
|
83468
83551
|
function ke(e, t) {
|
|
83469
83552
|
if (!(e != null && e.position || t != null && t.position)) return true;
|
|
83470
83553
|
if (!(e != null && e.position && (t != null && t.position))) return false;
|
|
@@ -84336,7 +84419,8 @@ const copyableBasicAttributes = /* @__PURE__ */ new Set([
|
|
|
84336
84419
|
"stepId",
|
|
84337
84420
|
"hookId",
|
|
84338
84421
|
"eventId",
|
|
84339
|
-
"deploymentId"
|
|
84422
|
+
"deploymentId",
|
|
84423
|
+
"moduleSpecifier"
|
|
84340
84424
|
]);
|
|
84341
84425
|
const AttributeBlock = ({ attribute, value, isLoading, inline = false, context }) => {
|
|
84342
84426
|
const decryptCtx = reactExports.useContext(DecryptClickContext);
|
|
@@ -84365,7 +84449,6 @@ const AttributeBlock = ({ attribute, value, isLoading, inline = false, context }
|
|
|
84365
84449
|
return jsxRuntimeExports.jsxs("div", { className: "relative", children: [typeof isLoading === "boolean" && isLoading && jsxRuntimeExports.jsx("div", { className: "absolute top-9 right-4", children: jsxRuntimeExports.jsx("div", { className: "animate-spin rounded-full h-4 w-4 border-b-2", style: { borderColor: "var(--ds-gray-900)" } }) }), jsxRuntimeExports.jsxs("div", { className: "my-2 flex flex-col gap-0", children: [jsxRuntimeExports.jsx("span", { className: "text-label-14 text-gray-1000 font-medium first-letter:uppercase", children: attribute }), jsxRuntimeExports.jsx("span", { className: "text-xs", style: { color: "var(--ds-gray-1000)" }, children: displayValue })] }, attribute)] });
|
|
84366
84450
|
};
|
|
84367
84451
|
const AttributePanel = ({ data, moduleSpecifier, isLoading, error: error2, expiredAt, onStreamClick, onRunClick, onDecrypt, isDecrypting = false, resource }) => {
|
|
84368
|
-
const toast2 = useToast();
|
|
84369
84452
|
const displayData = reactExports.useMemo(() => {
|
|
84370
84453
|
const result = { ...data };
|
|
84371
84454
|
const execCtx = data.executionContext;
|
|
@@ -84427,13 +84510,6 @@ const AttributePanel = ({ data, moduleSpecifier, isLoading, error: error2, expir
|
|
|
84427
84510
|
const displayContext = reactExports.useMemo(() => ({
|
|
84428
84511
|
stepName: displayData.stepName
|
|
84429
84512
|
}), [displayData.stepName]);
|
|
84430
|
-
const handleCopyModuleSpecifier = reactExports.useCallback((value) => {
|
|
84431
|
-
navigator.clipboard.writeText(value).then(() => {
|
|
84432
|
-
toast2.success("moduleSpecifier copied");
|
|
84433
|
-
}).catch(() => {
|
|
84434
|
-
toast2.error("Failed to copy moduleSpecifier");
|
|
84435
|
-
});
|
|
84436
|
-
}, []);
|
|
84437
84513
|
const outerDecryptCtx = reactExports.useContext(DecryptClickContext);
|
|
84438
84514
|
const decryptValue = onDecrypt ? {
|
|
84439
84515
|
onDecrypt,
|
|
@@ -84443,17 +84519,8 @@ const AttributePanel = ({ data, moduleSpecifier, isLoading, error: error2, expir
|
|
|
84443
84519
|
return jsxRuntimeExports.jsx(ContextCardProvider, { children: jsxRuntimeExports.jsx(RunClickContext.Provider, { value: onRunClick, children: jsxRuntimeExports.jsx(StreamClickContext.Provider, { value: onStreamClick, children: jsxRuntimeExports.jsxs(DecryptClickContext.Provider, { value: decryptValue, children: [visibleBasicAttributes.length > 0 && jsxRuntimeExports.jsxs("div", { className: "flex flex-col overflow-hidden divide-y divide-gray-alpha-400 mb-3", children: [orderedBasicAttributes.map((attribute) => {
|
|
84444
84520
|
var _a3;
|
|
84445
84521
|
const displayValue = (_a3 = attributeToDisplayFn[attribute]) == null ? void 0 : _a3.call(attributeToDisplayFn, displayData[attribute]);
|
|
84446
|
-
const isModuleSpecifier = attribute === "moduleSpecifier";
|
|
84447
84522
|
const isCopyableBasicAttribute = copyableBasicAttributes.has(attribute) && typeof displayValue === "string";
|
|
84448
|
-
|
|
84449
|
-
return jsxRuntimeExports.jsxs("div", { className: "flex items-center justify-between py-2", children: [jsxRuntimeExports.jsx("span", { className: "text-label-14 text-gray-900", children: getAttributeDisplayName(attribute) }), isModuleSpecifier ? jsxRuntimeExports.jsx("button", { type: "button", className: "min-w-0 max-w-[70%] truncate text-right text-label-13 font-mono", style: {
|
|
84450
|
-
color: "var(--ds-gray-1000)",
|
|
84451
|
-
background: "transparent",
|
|
84452
|
-
border: "none",
|
|
84453
|
-
padding: 0
|
|
84454
|
-
}, title: moduleSpecifierValue, onClick: () => handleCopyModuleSpecifier(moduleSpecifierValue), children: moduleSpecifierValue }) : isCopyableBasicAttribute ? jsxRuntimeExports.jsxs("div", { className: "flex min-w-0 max-w-[70%] items-center justify-end gap-1 text-right text-[13px] font-mono", style: {
|
|
84455
|
-
color: "var(--ds-gray-1000)"
|
|
84456
|
-
}, title: displayValue, children: [jsxRuntimeExports.jsx(MiddleTruncate, { value: displayValue, className: "flex-1" }), jsxRuntimeExports.jsx(CopyButton, { copyText: displayValue, ariaLabel: `Copy ${getAttributeDisplayName(attribute)}`, className: "shrink-0 -mr-1" })] }) : jsxRuntimeExports.jsx("span", { className: "text-right text-label-13 font-mono", children: displayValue })] }, attribute);
|
|
84523
|
+
return jsxRuntimeExports.jsxs("div", { className: "flex items-center justify-between py-2", children: [jsxRuntimeExports.jsx("span", { className: "text-label-14 text-gray-900", children: getAttributeDisplayName(attribute) }), isCopyableBasicAttribute ? jsxRuntimeExports.jsxs("div", { className: "flex min-w-0 max-w-[70%] items-center justify-end gap-1 text-[13px] font-mono text-gray-1000", title: displayValue, children: [jsxRuntimeExports.jsx(MiddleTruncate, { value: displayValue, className: "text-right", style: { gridTemplateColumns: "minmax(0, 1fr)" } }), jsxRuntimeExports.jsx(CopyButton, { copyText: displayValue, ariaLabel: `Copy ${getAttributeDisplayName(attribute)}`, className: "shrink-0 -mr-1" })] }) : jsxRuntimeExports.jsx("span", { className: "text-right text-label-13 font-mono", children: displayValue })] }, attribute);
|
|
84457
84524
|
}), isLoading && resource === "sleep" && !displayData.resumeAt && jsxRuntimeExports.jsx("div", { className: "py-1", children: jsxRuntimeExports.jsxs("div", { className: "flex min-h-[32px] items-center justify-between gap-4 rounded-sm px-2.5 py-1", children: [jsxRuntimeExports.jsx("span", { className: "text-[14px] first-letter:uppercase", style: { color: "var(--ds-gray-700)" }, children: "resumeAt" }), jsxRuntimeExports.jsx(Skeleton$2, { className: "h-4 w-[55%]" })] }) })] }), error2 ? jsxRuntimeExports.jsx(ErrorCard, { title: "Failed to load resource details", details: error2.message, className: "my-4" }) : hasExpired ? jsxRuntimeExports.jsx(ExpiredDataMessage, {}) : resolvedAttributes.length > 0 ? jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment, { children: resolvedAttributes.map((attribute) => jsxRuntimeExports.jsx(AttributeBlock, { isLoading, attribute, value: displayData[attribute], context: displayContext }, attribute)) }) : null] }) }) }) });
|
|
84458
84525
|
};
|
|
84459
84526
|
const ERROR_EVENT_TYPES = /* @__PURE__ */ new Set(["step_failed", "step_retrying"]);
|
|
@@ -84860,127 +84927,127 @@ const TraceViewerContext = reactExports.createContext({
|
|
|
84860
84927
|
TraceViewerContext.displayName = "TraceViewerContext";
|
|
84861
84928
|
const useTraceViewer = () => reactExports.useContext(TraceViewerContext);
|
|
84862
84929
|
reactExports.createContext(null);
|
|
84863
|
-
const traceNode = "
|
|
84864
|
-
const childRow = "
|
|
84865
|
-
const spanNode = "
|
|
84866
|
-
const huge = "
|
|
84867
|
-
const spanName = "
|
|
84868
|
-
const spanSpacer = "
|
|
84869
|
-
const spanDuration = "
|
|
84870
|
-
const small = "
|
|
84871
|
-
const xHover = "
|
|
84872
|
-
const spanNodeEvent = "
|
|
84873
|
-
const eventDiamond = "
|
|
84874
|
-
const customEventColor = "
|
|
84875
|
-
const hoverInfo = "
|
|
84876
|
-
const eventName = "
|
|
84877
|
-
const eventTimestamp = "
|
|
84878
|
-
const alignStart = "
|
|
84879
|
-
const alignEnd = "
|
|
84880
|
-
const colorVercel = "
|
|
84881
|
-
const color0 = "
|
|
84882
|
-
const color1 = "
|
|
84883
|
-
const color2 = "
|
|
84884
|
-
const color3 = "
|
|
84885
|
-
const color4 = "
|
|
84886
|
-
const colorHighlight = "
|
|
84887
|
-
const unlit = "
|
|
84888
|
-
const mapContainer = "
|
|
84889
|
-
const spanDetailPanel = "
|
|
84890
|
-
const spanDetailPanelResizer = "
|
|
84891
|
-
const spanDetailPanelTop = "
|
|
84892
|
-
const spanDetailPanelBody = "
|
|
84893
|
-
const spanDetailPanelTopInfo = "
|
|
84894
|
-
const spanNameDetailPanel = "
|
|
84895
|
-
const spanDetailPanelTruncatedHeading = "
|
|
84896
|
-
const spanDetailPanelName = "
|
|
84897
|
-
const spanDetailPanelDuration = "
|
|
84898
|
-
const spanDetailPanelCorner = "
|
|
84899
|
-
const spanDetailPanelCornerInner = "
|
|
84900
|
-
const spanDetailPanelCloseVerticalRule = "
|
|
84901
|
-
const spanDetailPanelClose = "
|
|
84902
|
-
const spanDetailPanelAttribute = "
|
|
84903
|
-
const spanDetailPanelAttributeKey = "
|
|
84904
|
-
const spanDetailPanelAttributeValue = "
|
|
84905
|
-
const spanDetailPanelQuickLink = "
|
|
84906
|
-
const spanDetailPanelQuickLinkLabel = "
|
|
84907
|
-
const detailGroup = "
|
|
84908
|
-
const expanded = "
|
|
84909
|
-
const collapsed = "
|
|
84910
|
-
const ancestorGroup = "
|
|
84911
|
-
const detailHeading = "
|
|
84912
|
-
const buttonLink = "
|
|
84913
|
-
const note = "
|
|
84914
|
-
const skeleton = "
|
|
84915
|
-
const skeletonRounded = "
|
|
84916
|
-
const detailHeadingIcon = "
|
|
84917
|
-
const infraSpanDescription = "
|
|
84918
|
-
const ancestorNode = "
|
|
84919
|
-
const ancestorText = "
|
|
84920
|
-
const ancestorName = "
|
|
84921
|
-
const ancestorDuration = "
|
|
84922
|
-
const ancestorLineContainer = "
|
|
84923
|
-
const ancestorLine = "
|
|
84924
|
-
const zoomButtonGroup = "
|
|
84925
|
-
const zoomButton = "
|
|
84926
|
-
const divider = "
|
|
84927
|
-
const markersContainer = "
|
|
84928
|
-
const markers = "
|
|
84929
|
-
const marker = "
|
|
84930
|
-
const notch = "
|
|
84931
|
-
const markerLabel = "
|
|
84932
|
-
const markerClockTime = "
|
|
84933
|
-
const eventMarkersContainer = "
|
|
84934
|
-
const eventMarkers = "
|
|
84935
|
-
const eventMarker = "
|
|
84936
|
-
const cursorMarkerStickyParent = "
|
|
84937
|
-
const cursorMarkerLabelContainer = "
|
|
84938
|
-
const cursorMarkerLabel = "
|
|
84939
|
-
const cursorMarkerContainer = "
|
|
84940
|
-
const cursorMarker = "
|
|
84941
|
-
const cursorSelection = "
|
|
84942
|
-
const traceViewer = "
|
|
84943
|
-
const mapCanvas = "
|
|
84944
|
-
const zoomButtonTraceViewer = "
|
|
84945
|
-
const timeline = "
|
|
84946
|
-
const searchBar = "
|
|
84947
|
-
const searchInput = "
|
|
84948
|
-
const searchInputLabel = "
|
|
84949
|
-
const searchInputPrefix = "
|
|
84950
|
-
const mapThumb = "
|
|
84951
|
-
const spanDetailPanelTraceViewer = "
|
|
84952
|
-
const traceViewerContent = "
|
|
84953
|
-
const inert = "
|
|
84954
|
-
const hidden = "
|
|
84955
|
-
const mobile = "
|
|
84956
|
-
const spanRunning = "
|
|
84957
|
-
const spanPending = "
|
|
84958
|
-
const spanCompleted = "
|
|
84959
|
-
const spanCancelled = "
|
|
84960
|
-
const spanFailed = "
|
|
84961
|
-
const spanPendingStriped = "
|
|
84962
|
-
const hasQueuedTime = "
|
|
84963
|
-
const spanSleep = "
|
|
84964
|
-
const spanHook = "
|
|
84965
|
-
const segmentLayer = "
|
|
84966
|
-
const segment = "
|
|
84967
|
-
const segmentLabel = "
|
|
84968
|
-
const segmentTag = "
|
|
84969
|
-
const segQueued = "
|
|
84970
|
-
const segRunning = "
|
|
84971
|
-
const segFailed = "
|
|
84972
|
-
const segRetrying = "
|
|
84973
|
-
const segSucceeded = "
|
|
84974
|
-
const segWaiting = "
|
|
84975
|
-
const segSleeping = "
|
|
84976
|
-
const segReceived = "
|
|
84977
|
-
const boundaryMarker = "
|
|
84978
|
-
const boundaryLine = "
|
|
84979
|
-
const hasSegments = "
|
|
84980
|
-
const eventFailed = "
|
|
84981
|
-
const eventRetrying = "
|
|
84982
|
-
const eventHook = "
|
|
84983
|
-
const eventDefault = "
|
|
84930
|
+
const traceNode = "_traceNode_1ytrx_1";
|
|
84931
|
+
const childRow = "_childRow_1ytrx_5";
|
|
84932
|
+
const spanNode = "_spanNode_1ytrx_11";
|
|
84933
|
+
const huge = "_huge_1ytrx_31";
|
|
84934
|
+
const spanName = "_spanName_1ytrx_34";
|
|
84935
|
+
const spanSpacer = "_spanSpacer_1ytrx_40";
|
|
84936
|
+
const spanDuration = "_spanDuration_1ytrx_44";
|
|
84937
|
+
const small = "_small_1ytrx_62";
|
|
84938
|
+
const xHover = "_xHover_1ytrx_62";
|
|
84939
|
+
const spanNodeEvent = "_spanNodeEvent_1ytrx_118";
|
|
84940
|
+
const eventDiamond = "_eventDiamond_1ytrx_124";
|
|
84941
|
+
const customEventColor = "_customEventColor_1ytrx_140";
|
|
84942
|
+
const hoverInfo = "_hoverInfo_1ytrx_145";
|
|
84943
|
+
const eventName = "_eventName_1ytrx_149";
|
|
84944
|
+
const eventTimestamp = "_eventTimestamp_1ytrx_153";
|
|
84945
|
+
const alignStart = "_alignStart_1ytrx_174";
|
|
84946
|
+
const alignEnd = "_alignEnd_1ytrx_178";
|
|
84947
|
+
const colorVercel = "_colorVercel_1ytrx_205";
|
|
84948
|
+
const color0 = "_color0_1ytrx_213";
|
|
84949
|
+
const color1 = "_color1_1ytrx_220";
|
|
84950
|
+
const color2 = "_color2_1ytrx_227";
|
|
84951
|
+
const color3 = "_color3_1ytrx_234";
|
|
84952
|
+
const color4 = "_color4_1ytrx_241";
|
|
84953
|
+
const colorHighlight = "_colorHighlight_1ytrx_248";
|
|
84954
|
+
const unlit = "_unlit_1ytrx_256";
|
|
84955
|
+
const mapContainer = "_mapContainer_1ytrx_262";
|
|
84956
|
+
const spanDetailPanel = "_spanDetailPanel_1ytrx_329";
|
|
84957
|
+
const spanDetailPanelResizer = "_spanDetailPanelResizer_1ytrx_338";
|
|
84958
|
+
const spanDetailPanelTop = "_spanDetailPanelTop_1ytrx_353";
|
|
84959
|
+
const spanDetailPanelBody = "_spanDetailPanelBody_1ytrx_362";
|
|
84960
|
+
const spanDetailPanelTopInfo = "_spanDetailPanelTopInfo_1ytrx_375";
|
|
84961
|
+
const spanNameDetailPanel = "_spanNameDetailPanel_1ytrx_389";
|
|
84962
|
+
const spanDetailPanelTruncatedHeading = "_spanDetailPanelTruncatedHeading_1ytrx_395";
|
|
84963
|
+
const spanDetailPanelName = "_spanDetailPanelName_1ytrx_405";
|
|
84964
|
+
const spanDetailPanelDuration = "_spanDetailPanelDuration_1ytrx_416";
|
|
84965
|
+
const spanDetailPanelCorner = "_spanDetailPanelCorner_1ytrx_427";
|
|
84966
|
+
const spanDetailPanelCornerInner = "_spanDetailPanelCornerInner_1ytrx_437";
|
|
84967
|
+
const spanDetailPanelCloseVerticalRule = "_spanDetailPanelCloseVerticalRule_1ytrx_445";
|
|
84968
|
+
const spanDetailPanelClose = "_spanDetailPanelClose_1ytrx_445";
|
|
84969
|
+
const spanDetailPanelAttribute = "_spanDetailPanelAttribute_1ytrx_467";
|
|
84970
|
+
const spanDetailPanelAttributeKey = "_spanDetailPanelAttributeKey_1ytrx_484";
|
|
84971
|
+
const spanDetailPanelAttributeValue = "_spanDetailPanelAttributeValue_1ytrx_492";
|
|
84972
|
+
const spanDetailPanelQuickLink = "_spanDetailPanelQuickLink_1ytrx_503";
|
|
84973
|
+
const spanDetailPanelQuickLinkLabel = "_spanDetailPanelQuickLinkLabel_1ytrx_506";
|
|
84974
|
+
const detailGroup = "_detailGroup_1ytrx_519";
|
|
84975
|
+
const expanded = "_expanded_1ytrx_533";
|
|
84976
|
+
const collapsed = "_collapsed_1ytrx_534";
|
|
84977
|
+
const ancestorGroup = "_ancestorGroup_1ytrx_535";
|
|
84978
|
+
const detailHeading = "_detailHeading_1ytrx_539";
|
|
84979
|
+
const buttonLink = "_buttonLink_1ytrx_562";
|
|
84980
|
+
const note = "_note_1ytrx_581";
|
|
84981
|
+
const skeleton = "_skeleton_1ytrx_589";
|
|
84982
|
+
const skeletonRounded = "_skeletonRounded_1ytrx_595";
|
|
84983
|
+
const detailHeadingIcon = "_detailHeadingIcon_1ytrx_599";
|
|
84984
|
+
const infraSpanDescription = "_infraSpanDescription_1ytrx_603";
|
|
84985
|
+
const ancestorNode = "_ancestorNode_1ytrx_613";
|
|
84986
|
+
const ancestorText = "_ancestorText_1ytrx_629";
|
|
84987
|
+
const ancestorName = "_ancestorName_1ytrx_639";
|
|
84988
|
+
const ancestorDuration = "_ancestorDuration_1ytrx_644";
|
|
84989
|
+
const ancestorLineContainer = "_ancestorLineContainer_1ytrx_649";
|
|
84990
|
+
const ancestorLine = "_ancestorLine_1ytrx_649";
|
|
84991
|
+
const zoomButtonGroup = "_zoomButtonGroup_1ytrx_701";
|
|
84992
|
+
const zoomButton = "_zoomButton_1ytrx_701";
|
|
84993
|
+
const divider = "_divider_1ytrx_751";
|
|
84994
|
+
const markersContainer = "_markersContainer_1ytrx_758";
|
|
84995
|
+
const markers = "_markers_1ytrx_758";
|
|
84996
|
+
const marker = "_marker_1ytrx_758";
|
|
84997
|
+
const notch = "_notch_1ytrx_792";
|
|
84998
|
+
const markerLabel = "_markerLabel_1ytrx_798";
|
|
84999
|
+
const markerClockTime = "_markerClockTime_1ytrx_807";
|
|
85000
|
+
const eventMarkersContainer = "_eventMarkersContainer_1ytrx_816";
|
|
85001
|
+
const eventMarkers = "_eventMarkers_1ytrx_816";
|
|
85002
|
+
const eventMarker = "_eventMarker_1ytrx_816";
|
|
85003
|
+
const cursorMarkerStickyParent = "_cursorMarkerStickyParent_1ytrx_839";
|
|
85004
|
+
const cursorMarkerLabelContainer = "_cursorMarkerLabelContainer_1ytrx_848";
|
|
85005
|
+
const cursorMarkerLabel = "_cursorMarkerLabel_1ytrx_848";
|
|
85006
|
+
const cursorMarkerContainer = "_cursorMarkerContainer_1ytrx_898";
|
|
85007
|
+
const cursorMarker = "_cursorMarker_1ytrx_839";
|
|
85008
|
+
const cursorSelection = "_cursorSelection_1ytrx_916";
|
|
85009
|
+
const traceViewer = "_traceViewer_1ytrx_966";
|
|
85010
|
+
const mapCanvas = "_mapCanvas_1ytrx_972";
|
|
85011
|
+
const zoomButtonTraceViewer = "_zoomButtonTraceViewer_1ytrx_988";
|
|
85012
|
+
const timeline = "_timeline_1ytrx_1011";
|
|
85013
|
+
const searchBar = "_searchBar_1ytrx_1019";
|
|
85014
|
+
const searchInput = "_searchInput_1ytrx_1031";
|
|
85015
|
+
const searchInputLabel = "_searchInputLabel_1ytrx_1038";
|
|
85016
|
+
const searchInputPrefix = "_searchInputPrefix_1ytrx_1063";
|
|
85017
|
+
const mapThumb = "_mapThumb_1ytrx_1101";
|
|
85018
|
+
const spanDetailPanelTraceViewer = "_spanDetailPanelTraceViewer_1ytrx_1115";
|
|
85019
|
+
const traceViewerContent = "_traceViewerContent_1ytrx_1134";
|
|
85020
|
+
const inert = "_inert_1ytrx_1144";
|
|
85021
|
+
const hidden = "_hidden_1ytrx_1180";
|
|
85022
|
+
const mobile = "_mobile_1ytrx_1184";
|
|
85023
|
+
const spanRunning = "_spanRunning_1ytrx_1194";
|
|
85024
|
+
const spanPending = "_spanPending_1ytrx_1195";
|
|
85025
|
+
const spanCompleted = "_spanCompleted_1ytrx_1203";
|
|
85026
|
+
const spanCancelled = "_spanCancelled_1ytrx_1211";
|
|
85027
|
+
const spanFailed = "_spanFailed_1ytrx_1219";
|
|
85028
|
+
const spanPendingStriped = "_spanPendingStriped_1ytrx_1228";
|
|
85029
|
+
const hasQueuedTime = "_hasQueuedTime_1ytrx_1242";
|
|
85030
|
+
const spanSleep = "_spanSleep_1ytrx_1254";
|
|
85031
|
+
const spanHook = "_spanHook_1ytrx_1263";
|
|
85032
|
+
const segmentLayer = "_segmentLayer_1ytrx_1275";
|
|
85033
|
+
const segment = "_segment_1ytrx_1275";
|
|
85034
|
+
const segmentLabel = "_segmentLabel_1ytrx_1291";
|
|
85035
|
+
const segmentTag = "_segmentTag_1ytrx_1306";
|
|
85036
|
+
const segQueued = "_segQueued_1ytrx_1314";
|
|
85037
|
+
const segRunning = "_segRunning_1ytrx_1325";
|
|
85038
|
+
const segFailed = "_segFailed_1ytrx_1330";
|
|
85039
|
+
const segRetrying = "_segRetrying_1ytrx_1335";
|
|
85040
|
+
const segSucceeded = "_segSucceeded_1ytrx_1346";
|
|
85041
|
+
const segWaiting = "_segWaiting_1ytrx_1351";
|
|
85042
|
+
const segSleeping = "_segSleeping_1ytrx_1362";
|
|
85043
|
+
const segReceived = "_segReceived_1ytrx_1367";
|
|
85044
|
+
const boundaryMarker = "_boundaryMarker_1ytrx_1372";
|
|
85045
|
+
const boundaryLine = "_boundaryLine_1ytrx_1373";
|
|
85046
|
+
const hasSegments = "_hasSegments_1ytrx_1395";
|
|
85047
|
+
const eventFailed = "_eventFailed_1ytrx_1432";
|
|
85048
|
+
const eventRetrying = "_eventRetrying_1ytrx_1441";
|
|
85049
|
+
const eventHook = "_eventHook_1ytrx_1450";
|
|
85050
|
+
const eventDefault = "_eventDefault_1ytrx_1459";
|
|
84984
85051
|
const styles$2 = {
|
|
84985
85052
|
traceNode,
|
|
84986
85053
|
childRow,
|
|
@@ -85044,7 +85111,7 @@ const styles$2 = {
|
|
|
85044
85111
|
ancestorLineContainer,
|
|
85045
85112
|
ancestorLine,
|
|
85046
85113
|
zoomButtonGroup,
|
|
85047
|
-
"zoom-buttons-fade-in": "_zoom-buttons-fade-
|
|
85114
|
+
"zoom-buttons-fade-in": "_zoom-buttons-fade-in_1ytrx_1",
|
|
85048
85115
|
zoomButton,
|
|
85049
85116
|
divider,
|
|
85050
85117
|
markersContainer,
|
|
@@ -85063,7 +85130,7 @@ const styles$2 = {
|
|
|
85063
85130
|
cursorMarker,
|
|
85064
85131
|
cursorSelection,
|
|
85065
85132
|
traceViewer,
|
|
85066
|
-
"span-skeleton": "_span-
|
|
85133
|
+
"span-skeleton": "_span-skeleton_1ytrx_1",
|
|
85067
85134
|
mapCanvas,
|
|
85068
85135
|
zoomButtonTraceViewer,
|
|
85069
85136
|
timeline,
|
|
@@ -86456,7 +86523,7 @@ function computeStepSegmentsFromSpan(startMs, duration2, events2) {
|
|
|
86456
86523
|
"step_completed"
|
|
86457
86524
|
]);
|
|
86458
86525
|
if (marks.length === 0) {
|
|
86459
|
-
segments.push({ startFraction: 0, endFraction: 1, status: "
|
|
86526
|
+
segments.push({ startFraction: 0, endFraction: 1, status: "queued" });
|
|
86460
86527
|
return segments;
|
|
86461
86528
|
}
|
|
86462
86529
|
const firstFraction = timeToFraction(marks[0].time, startMs, duration2);
|
|
@@ -86481,7 +86548,7 @@ function computeStepSegmentsFromSpan(startMs, duration2, events2) {
|
|
|
86481
86548
|
});
|
|
86482
86549
|
} else {
|
|
86483
86550
|
const nextType = nextMark.type;
|
|
86484
|
-
const attemptStatus = nextType === "step_retrying" || nextType === "step_failed" ? "failed" : nextType === "step_completed" ? "succeeded" : "
|
|
86551
|
+
const attemptStatus = nextType === "step_retrying" || nextType === "step_failed" ? "failed" : nextType === "step_completed" ? "succeeded" : "retrying";
|
|
86485
86552
|
segments.push({
|
|
86486
86553
|
startFraction: markFrac,
|
|
86487
86554
|
endFraction: nextFrac,
|
|
@@ -86510,34 +86577,15 @@ function computeHookSegmentsFromSpan(startMs, duration2, events2) {
|
|
|
86510
86577
|
const segments = [];
|
|
86511
86578
|
if (duration2 <= 0)
|
|
86512
86579
|
return segments;
|
|
86513
|
-
const
|
|
86514
|
-
const received = sorted.find((e) => e.name === "hook_received");
|
|
86515
|
-
const disposed = sorted.find((e) => e.name === "hook_disposed");
|
|
86516
|
-
if (!received && !disposed) {
|
|
86517
|
-
segments.push({ startFraction: 0, endFraction: 1, status: "waiting" });
|
|
86518
|
-
return segments;
|
|
86519
|
-
}
|
|
86520
|
-
const receivedFrac = received ? timeToFraction(received.time, startMs, duration2) : null;
|
|
86580
|
+
const disposed = sortedEventMarks(events2, ["hook_disposed"])[0];
|
|
86521
86581
|
const disposedFrac = disposed ? timeToFraction(disposed.time, startMs, duration2) : null;
|
|
86522
|
-
|
|
86582
|
+
const waitingEnd = disposedFrac ?? 1;
|
|
86583
|
+
if (waitingEnd > 1e-3) {
|
|
86523
86584
|
segments.push({
|
|
86524
86585
|
startFraction: 0,
|
|
86525
|
-
endFraction:
|
|
86586
|
+
endFraction: waitingEnd,
|
|
86526
86587
|
status: "waiting"
|
|
86527
86588
|
});
|
|
86528
|
-
} else if (receivedFrac === null && disposedFrac !== null) {
|
|
86529
|
-
segments.push({
|
|
86530
|
-
startFraction: 0,
|
|
86531
|
-
endFraction: disposedFrac,
|
|
86532
|
-
status: "waiting"
|
|
86533
|
-
});
|
|
86534
|
-
}
|
|
86535
|
-
if (receivedFrac !== null) {
|
|
86536
|
-
segments.push({
|
|
86537
|
-
startFraction: receivedFrac,
|
|
86538
|
-
endFraction: disposedFrac ?? 1,
|
|
86539
|
-
status: "received"
|
|
86540
|
-
});
|
|
86541
86589
|
}
|
|
86542
86590
|
if (disposedFrac !== null && disposedFrac < 0.999) {
|
|
86543
86591
|
segments.push({
|
|
@@ -86629,6 +86677,33 @@ function computeSpanSegments(span) {
|
|
|
86629
86677
|
return [];
|
|
86630
86678
|
}
|
|
86631
86679
|
}
|
|
86680
|
+
const MARKER_EVENT_NAMES = ["hook_received", "attr_set"];
|
|
86681
|
+
function computeSpanMarkers(span) {
|
|
86682
|
+
return sortedEventMarks(span.events, MARKER_EVENT_NAMES).map((mark2) => ({
|
|
86683
|
+
timeMs: mark2.time
|
|
86684
|
+
}));
|
|
86685
|
+
}
|
|
86686
|
+
function computeOffscreenMarkers(markers2, visibleStartMs, visibleEndMs) {
|
|
86687
|
+
let leftCount = 0;
|
|
86688
|
+
let rightCount = 0;
|
|
86689
|
+
let nearestLeft = Number.NEGATIVE_INFINITY;
|
|
86690
|
+
let nearestRight = Number.POSITIVE_INFINITY;
|
|
86691
|
+
for (const { timeMs } of markers2) {
|
|
86692
|
+
if (timeMs < visibleStartMs) {
|
|
86693
|
+
leftCount++;
|
|
86694
|
+
if (timeMs > nearestLeft)
|
|
86695
|
+
nearestLeft = timeMs;
|
|
86696
|
+
} else if (timeMs > visibleEndMs) {
|
|
86697
|
+
rightCount++;
|
|
86698
|
+
if (timeMs < nearestRight)
|
|
86699
|
+
nearestRight = timeMs;
|
|
86700
|
+
}
|
|
86701
|
+
}
|
|
86702
|
+
return {
|
|
86703
|
+
left: leftCount > 0 ? { count: leftCount, nearestMs: nearestLeft } : null,
|
|
86704
|
+
right: rightCount > 0 ? { count: rightCount, nearestMs: nearestRight } : null
|
|
86705
|
+
};
|
|
86706
|
+
}
|
|
86632
86707
|
const INITIAL_VISIBLE_ROWS = 60;
|
|
86633
86708
|
function getScrollParent(el) {
|
|
86634
86709
|
let node2 = (el == null ? void 0 : el.parentElement) ?? null;
|
|
@@ -86677,6 +86752,30 @@ function useRowWindow(ref, rowCount, rowHeight, overscan = 12) {
|
|
|
86677
86752
|
return range2;
|
|
86678
86753
|
}
|
|
86679
86754
|
const ROW_HEIGHT_PX = 40;
|
|
86755
|
+
function scrollRowIntoView(listEl, index2, rowHeight, opts) {
|
|
86756
|
+
const scroller = listEl ? getScrollParent(listEl) : null;
|
|
86757
|
+
if (!listEl || !scroller)
|
|
86758
|
+
return;
|
|
86759
|
+
const margin = (opts == null ? void 0 : opts.margin) ?? rowHeight;
|
|
86760
|
+
const listOffset = listEl.getBoundingClientRect().top - scroller.getBoundingClientRect().top + scroller.scrollTop;
|
|
86761
|
+
const rowTop = listOffset + index2 * rowHeight;
|
|
86762
|
+
const rowBottom = rowTop + rowHeight;
|
|
86763
|
+
const viewTop = scroller.scrollTop;
|
|
86764
|
+
const viewBottom = viewTop + scroller.clientHeight;
|
|
86765
|
+
let top = null;
|
|
86766
|
+
if (rowTop < viewTop) {
|
|
86767
|
+
top = rowTop - margin;
|
|
86768
|
+
} else if (rowBottom > viewBottom) {
|
|
86769
|
+
top = rowBottom + margin - scroller.clientHeight;
|
|
86770
|
+
}
|
|
86771
|
+
if (top === null)
|
|
86772
|
+
return;
|
|
86773
|
+
const max2 = scroller.scrollHeight - scroller.clientHeight;
|
|
86774
|
+
scroller.scrollTo({
|
|
86775
|
+
top: Math.max(0, Math.min(top, max2)),
|
|
86776
|
+
behavior: opts == null ? void 0 : opts.behavior
|
|
86777
|
+
});
|
|
86778
|
+
}
|
|
86680
86779
|
const eventStyles = {
|
|
86681
86780
|
run: { icon: WorkflowIcon, className: "text-blue-900" },
|
|
86682
86781
|
step: { icon: StepForwardIcon, className: "text-green-900" },
|
|
@@ -86808,6 +86907,51 @@ function SplitPane({ children: children2, className, defaultStartWidth = DEFAULT
|
|
|
86808
86907
|
}
|
|
86809
86908
|
return jsxRuntimeExports.jsxs("div", { ref: setContainerRef, className: cn$4("grid h-full min-h-0 content-start overflow-x-hidden overflow-y-auto", isDragging && "select-none", className), style: { gridTemplateColumns: colTemplate, height: "100%" }, children: [start2, gutter, end] });
|
|
86810
86909
|
}
|
|
86910
|
+
function projectMarkers(markers2, visibleStartMs, visibleEndMs) {
|
|
86911
|
+
const visibleDurationMs = visibleEndMs - visibleStartMs;
|
|
86912
|
+
if (visibleDurationMs <= 0)
|
|
86913
|
+
return [];
|
|
86914
|
+
return markers2.flatMap((m2) => {
|
|
86915
|
+
if (m2.timeMs < visibleStartMs || m2.timeMs > visibleEndMs) {
|
|
86916
|
+
return [];
|
|
86917
|
+
}
|
|
86918
|
+
return [
|
|
86919
|
+
{
|
|
86920
|
+
leftPct: (m2.timeMs - visibleStartMs) / visibleDurationMs * 100,
|
|
86921
|
+
timeMs: m2.timeMs
|
|
86922
|
+
}
|
|
86923
|
+
];
|
|
86924
|
+
});
|
|
86925
|
+
}
|
|
86926
|
+
const MARKER_MIN_GAP_PX = 16;
|
|
86927
|
+
function cullCollidingMarkers(projected, pixelWidth) {
|
|
86928
|
+
const kept = [];
|
|
86929
|
+
let lastKeptPct = Number.NEGATIVE_INFINITY;
|
|
86930
|
+
for (const m2 of projected) {
|
|
86931
|
+
const gapPx = (m2.leftPct - lastKeptPct) / 100 * pixelWidth;
|
|
86932
|
+
if (gapPx < MARKER_MIN_GAP_PX)
|
|
86933
|
+
continue;
|
|
86934
|
+
kept.push(m2);
|
|
86935
|
+
lastKeptPct = m2.leftPct;
|
|
86936
|
+
}
|
|
86937
|
+
return kept;
|
|
86938
|
+
}
|
|
86939
|
+
function MarkerTick({ className }) {
|
|
86940
|
+
return jsxRuntimeExports.jsx("span", { className: cn$4("block w-[3px] rounded-full bg-gray-1000", className) });
|
|
86941
|
+
}
|
|
86942
|
+
function MarkerLayer({ markers: markers2 }) {
|
|
86943
|
+
return jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment, { children: markers2.map((m2) => jsxRuntimeExports.jsx("span", { className: "pointer-events-auto absolute top-0 bottom-0 z-10 flex w-8 -translate-x-1/2 items-center justify-center", style: { left: `clamp(8px, ${m2.leftPct}%, calc(100% - 8px))` }, children: jsxRuntimeExports.jsx(TimestampTooltip, { date: m2.timeMs, children: jsxRuntimeExports.jsx("span", { className: "flex h-6 w-8 items-center justify-center", children: jsxRuntimeExports.jsx(MarkerTick, { className: "h-3" }) }) }) }, m2.timeMs)) });
|
|
86944
|
+
}
|
|
86945
|
+
function OffscreenMarkerIndicator({ direction, count: count2, targetMs, onReveal }) {
|
|
86946
|
+
const Chevron = direction === "right" ? ArrowRight : ArrowLeft;
|
|
86947
|
+
const label = `${count2} marker${count2 === 1 ? "" : "s"} ${direction === "right" ? "ahead" : "behind"} — click to scroll to ${count2 === 1 ? "it" : "the nearest"}`;
|
|
86948
|
+
const chevron = jsxRuntimeExports.jsx("span", { className: "flex h-6 w-6 shrink-0 items-center justify-center", children: jsxRuntimeExports.jsx(Chevron, { className: "size-3 text-gray-900" }) });
|
|
86949
|
+
const tick = jsxRuntimeExports.jsx(MarkerTick, { className: "h-3.5 shrink-0" });
|
|
86950
|
+
return jsxRuntimeExports.jsx("button", { type: "button", "aria-label": label, title: label, onClick: (e) => {
|
|
86951
|
+
e.stopPropagation();
|
|
86952
|
+
onReveal == null ? void 0 : onReveal(targetMs);
|
|
86953
|
+
}, className: cn$4("pointer-events-auto absolute top-1/2 z-20 flex h-6 -translate-y-1/2 cursor-pointer items-center rounded-[0.25rem] border border-gray-alpha-400 bg-background-100 shadow-sm hover:bg-gray-100", direction === "right" ? "right-0 pl-1.5" : "left-0 pr-1.5"), children: direction === "left" ? jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [chevron, tick] }) : jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [tick, chevron] }) });
|
|
86954
|
+
}
|
|
86811
86955
|
const runningStripes = "_runningStripes_62ud0_1";
|
|
86812
86956
|
const styles$1 = {
|
|
86813
86957
|
runningStripes
|
|
@@ -86818,7 +86962,7 @@ const TIMELINE_PADDING_PX = 16;
|
|
|
86818
86962
|
const SEGMENT_CLASSES = {
|
|
86819
86963
|
queued: "bg-gray-400 border border-gray-500",
|
|
86820
86964
|
retrying: "bg-gray-400 border border-gray-500",
|
|
86821
|
-
waiting: "bg-gray-
|
|
86965
|
+
waiting: "bg-gray-200 border border-gray-500",
|
|
86822
86966
|
running: "bg-blue-200 border border-blue-500",
|
|
86823
86967
|
completed: "bg-blue-200 border border-blue-500",
|
|
86824
86968
|
failed: "bg-red-200 border border-red-500",
|
|
@@ -86899,8 +87043,8 @@ function projectSegments(segments, spanStartMs, spanDurationMs, geometry) {
|
|
|
86899
87043
|
];
|
|
86900
87044
|
});
|
|
86901
87045
|
}
|
|
86902
|
-
function DurationLabel({ label }) {
|
|
86903
|
-
return jsxRuntimeExports.jsx("span", { className: "pointer-events-none absolute inset-0 flex items-center justify-start overflow-hidden px-1 text-[10px] font-mono font-medium leading-none whitespace-nowrap text-left text-gray-1000 tabular-nums opacity-0 group-hover/timeline-row:opacity-100", children: label });
|
|
87046
|
+
function DurationLabel({ label, className }) {
|
|
87047
|
+
return jsxRuntimeExports.jsx("span", { className: cn$4("pointer-events-none absolute inset-0 flex items-center justify-start overflow-hidden px-1 text-[10px] font-mono font-medium leading-none whitespace-nowrap text-left text-gray-1000 tabular-nums opacity-0 group-hover/timeline-row:opacity-100", className), children: label });
|
|
86904
87048
|
}
|
|
86905
87049
|
function BoundaryArrow({ direction }) {
|
|
86906
87050
|
const Icon2 = direction === "right" ? ArrowRight : ArrowLeft;
|
|
@@ -86915,15 +87059,18 @@ function LeadInConnector({ leftPct, widthPct, label }) {
|
|
|
86915
87059
|
width: `calc(${widthPct}% - 1px)`
|
|
86916
87060
|
}, children: [jsxRuntimeExports.jsx("div", { className: "absolute left-0 top-1/2 h-4 w-px -translate-y-1/2 bg-gray-500" }), jsxRuntimeExports.jsx("div", { className: "absolute inset-x-0 top-1/2 h-px -translate-y-1/2 bg-gray-500" }), label ? jsxRuntimeExports.jsx(DurationLabel, { label }) : null] });
|
|
86917
87061
|
}
|
|
86918
|
-
function SegmentBar({ segments }) {
|
|
87062
|
+
function SegmentBar({ segments, showLabels = true }) {
|
|
86919
87063
|
return jsxRuntimeExports.jsx("div", { className: "relative h-6 w-full", children: segments.map((seg, i) => {
|
|
86920
87064
|
if (seg.status === "queued") {
|
|
86921
87065
|
const leadInLabel = formatDurationPrecise(seg.fullDurationMs);
|
|
86922
|
-
const showLeadInLabel = seg.pixelWidth >= Math.max(40, leadInLabel.length * 6 + 12);
|
|
86923
|
-
|
|
87066
|
+
const showLeadInLabel = showLabels && seg.pixelWidth >= Math.max(40, leadInLabel.length * 6 + 12);
|
|
87067
|
+
const isFullWidthQueued = segments.length === 1;
|
|
87068
|
+
return jsxRuntimeExports.jsxs(reactExports.Fragment, { children: [jsxRuntimeExports.jsx(LeadInConnector, { leftPct: seg.leftPct, widthPct: seg.widthPct, label: showLeadInLabel ? leadInLabel : null }), isFullWidthQueued ? jsxRuntimeExports.jsx("div", { className: "absolute top-1/2 h-4 w-px -translate-y-1/2 bg-gray-500", style: {
|
|
87069
|
+
left: `calc(${seg.leftPct + seg.widthPct}% - 1.5px)`
|
|
87070
|
+
} }) : null] }, i);
|
|
86924
87071
|
}
|
|
86925
87072
|
const label = formatDurationPrecise(seg.fullDurationMs);
|
|
86926
|
-
const showLabel = seg.pixelWidth >= Math.max(40, label.length * 6 + 12);
|
|
87073
|
+
const showLabel = showLabels && seg.pixelWidth >= Math.max(40, label.length * 6 + 12);
|
|
86927
87074
|
return jsxRuntimeExports.jsxs("div", { className: cn$4("absolute h-full overflow-hidden rounded-[0.25rem]", SEGMENT_CLASSES[seg.status]), style: {
|
|
86928
87075
|
// 1px gap between adjacent segments, distributed equally.
|
|
86929
87076
|
left: `calc(${seg.leftPct}% + 0.5px)`,
|
|
@@ -86932,31 +87079,7 @@ function SegmentBar({ segments }) {
|
|
|
86932
87079
|
}, children: [ACTIVE_SEGMENT_STATUSES.has(seg.status) ? jsxRuntimeExports.jsx(RunningStripes, {}) : null, showLabel ? jsxRuntimeExports.jsx(DurationLabel, { label }) : null] }, i);
|
|
86933
87080
|
}) });
|
|
86934
87081
|
}
|
|
86935
|
-
function
|
|
86936
|
-
const date2 = new Date(ms2);
|
|
86937
|
-
return date2.toLocaleTimeString("en-US", {
|
|
86938
|
-
hour: "2-digit",
|
|
86939
|
-
minute: "2-digit",
|
|
86940
|
-
second: "2-digit",
|
|
86941
|
-
hour12: false
|
|
86942
|
-
}) + "." + date2.getMilliseconds().toString().padStart(3, "0");
|
|
86943
|
-
}
|
|
86944
|
-
function AttrSetMarkers({ span, viewStart, viewDuration }) {
|
|
86945
|
-
const markers2 = reactExports.useMemo(() => span.events.filter((e) => e.name === "attr_set"), [span.events]);
|
|
86946
|
-
if (markers2.length === 0 || viewDuration <= 0)
|
|
86947
|
-
return null;
|
|
86948
|
-
return jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment, { children: markers2.map((event, index2) => {
|
|
86949
|
-
const timeMs = getHighResInMs(event.timestamp);
|
|
86950
|
-
const frac = (timeMs - viewStart) / viewDuration;
|
|
86951
|
-
if (frac < 0 || frac > 1)
|
|
86952
|
-
return null;
|
|
86953
|
-
return jsxRuntimeExports.jsxs(Tooltip$1, { children: [jsxRuntimeExports.jsx(TooltipTrigger$1, { asChild: true, children: jsxRuntimeExports.jsx("div", { "aria-label": "Attributes set", className: "absolute top-1/2 z-10 flex h-4 w-4 -translate-x-1/2 -translate-y-1/2 cursor-pointer items-center justify-center", style: { left: `${frac * 100}%` }, children: jsxRuntimeExports.jsx("div", { className: "h-2 w-2 rotate-45 rounded-[1px] border", style: {
|
|
86954
|
-
backgroundColor: "var(--ds-teal-400)",
|
|
86955
|
-
borderColor: "var(--ds-teal-900)"
|
|
86956
|
-
} }) }) }), jsxRuntimeExports.jsxs(TooltipContent$1, { children: ["Attributes set · ", formatMarkerTime(timeMs)] })] }, `attr-set-${index2}`);
|
|
86957
|
-
}) });
|
|
86958
|
-
}
|
|
86959
|
-
const TimelineBar = reactExports.memo(function TimelineBar2({ span, viewStart, viewDuration, containerWidth, isSelected, isDimmed, onSelect }) {
|
|
87082
|
+
const TimelineBar = reactExports.memo(function TimelineBar2({ span, viewStart, viewDuration, containerWidth, isSelected, isDimmed, onSelect, onRevealTime }) {
|
|
86960
87083
|
var _a3;
|
|
86961
87084
|
const startMs = getHighResInMs(span.startTime);
|
|
86962
87085
|
const endMs = getHighResInMs(span.endTime);
|
|
@@ -86964,6 +87087,10 @@ const TimelineBar = reactExports.memo(function TimelineBar2({ span, viewStart, v
|
|
|
86964
87087
|
const geometry = reactExports.useMemo(() => computeBarGeometry(startMs, endMs, viewStart, viewStart + viewDuration, containerWidth), [startMs, endMs, viewStart, viewDuration, containerWidth]);
|
|
86965
87088
|
const baseSegments = reactExports.useMemo(() => computeSpanSegments(span), [span]);
|
|
86966
87089
|
const segments = reactExports.useMemo(() => geometry.mode.kind === "full" ? projectSegments(baseSegments, startMs, totalDurationMs, geometry) : [], [geometry, baseSegments, startMs, totalDurationMs]);
|
|
87090
|
+
const baseMarkers = reactExports.useMemo(() => computeSpanMarkers(span), [span]);
|
|
87091
|
+
const markers2 = reactExports.useMemo(() => geometry.mode.kind === "full" ? cullCollidingMarkers(projectMarkers(baseMarkers, geometry.visibleStartMs, geometry.visibleEndMs), geometry.visiblePixelWidth) : [], [geometry, baseMarkers]);
|
|
87092
|
+
const offscreen = reactExports.useMemo(() => geometry.mode.kind === "full" ? computeOffscreenMarkers(baseMarkers, geometry.visibleStartMs, geometry.visibleEndMs) : { left: null, right: null }, [geometry, baseMarkers]);
|
|
87093
|
+
const hasMarkers = markers2.length > 0 || offscreen.left !== null || offscreen.right !== null;
|
|
86967
87094
|
const workflowStatus = (_a3 = span.attributes.data) == null ? void 0 : _a3.status;
|
|
86968
87095
|
const isErrored = span.status.code === 2 || workflowStatus === "failed";
|
|
86969
87096
|
const colors = getResourceColor(span.resource);
|
|
@@ -86974,7 +87101,11 @@ const TimelineBar = reactExports.memo(function TimelineBar2({ span, viewStart, v
|
|
|
86974
87101
|
const handleClick = reactExports.useCallback(() => {
|
|
86975
87102
|
onSelect(span.spanId);
|
|
86976
87103
|
}, [onSelect, span.spanId]);
|
|
86977
|
-
return jsxRuntimeExports.jsx("div", { role: "treeitem", "aria-selected": isSelected, "aria-expanded": isSelected, "aria-level": 1, className: cn$4("group/timeline-row h-10 relative flex items-center hover:bg-gray-100 aria-selected:bg-gray-100 aria-selected:hover:bg-gray-200 transition-opacity", isDimmed && "opacity-35"), onClick: handleClick, children: jsxRuntimeExports.jsxs("div", { className: "absolute inset-y-0", style: TIMELINE_INSET_STYLE, children: [jsxRuntimeExports.jsx("div", { className: "absolute top-1/2 h-6 -translate-y-1/2 rounded-[0.25rem]", style: getBarPositionStyle(geometry), children: geometry.mode.kind === "arrow" ? jsxRuntimeExports.jsx(BoundaryArrow, { direction: geometry.mode.direction }) : geometry.mode.kind === "tiny" ? jsxRuntimeExports.jsx("div", { className: "h-6 rounded-[0.25rem] border", style: { background: fallbackBg, borderColor: fallbackBorder } }) : segments.length > 0 ? jsxRuntimeExports.jsx(SegmentBar, { segments }) : jsxRuntimeExports.jsx(PlainBar, { bg: fallbackBg, border: fallbackBorder, label: showTotalLabel ? totalLabel : null }) }), jsxRuntimeExports.
|
|
87104
|
+
return jsxRuntimeExports.jsx("div", { role: "treeitem", "aria-selected": isSelected, "aria-expanded": isSelected, "aria-level": 1, className: cn$4("group/timeline-row h-10 relative flex items-center hover:bg-gray-100 aria-selected:bg-gray-100 aria-selected:hover:bg-gray-200 transition-opacity", isDimmed && "opacity-35"), onClick: handleClick, children: jsxRuntimeExports.jsxs("div", { className: "absolute inset-y-0", style: TIMELINE_INSET_STYLE, children: [jsxRuntimeExports.jsx("div", { className: "absolute top-1/2 h-6 -translate-y-1/2 overflow-hidden rounded-[0.25rem]", style: getBarPositionStyle(geometry), children: geometry.mode.kind === "arrow" ? jsxRuntimeExports.jsx(BoundaryArrow, { direction: geometry.mode.direction }) : geometry.mode.kind === "tiny" ? jsxRuntimeExports.jsx("div", { className: "h-6 rounded-[0.25rem] border", style: { background: fallbackBg, borderColor: fallbackBorder } }) : segments.length > 0 ? jsxRuntimeExports.jsx(SegmentBar, { segments, showLabels: !hasMarkers }) : jsxRuntimeExports.jsx(PlainBar, { bg: fallbackBg, border: fallbackBorder, label: showTotalLabel ? totalLabel : null }) }), hasMarkers ? jsxRuntimeExports.jsxs("div", { className: "pointer-events-none absolute top-1/2 h-6 -translate-y-1/2", style: getBarPositionStyle(geometry), children: [markers2.length > 0 ? jsxRuntimeExports.jsx(MarkerLayer, { markers: markers2 }) : null, offscreen.left ? jsxRuntimeExports.jsx(OffscreenMarkerIndicator, { direction: "left", count: offscreen.left.count, targetMs: offscreen.left.nearestMs, onReveal: onRevealTime }) : null, offscreen.right ? jsxRuntimeExports.jsx(OffscreenMarkerIndicator, { direction: "right", count: offscreen.right.count, targetMs: offscreen.right.nearestMs, onReveal: onRevealTime }) : null, showTotalLabel ? jsxRuntimeExports.jsx(DurationLabel, {
|
|
87105
|
+
label: totalLabel,
|
|
87106
|
+
// Shift clear of the left edge indicator so it isn't covered.
|
|
87107
|
+
className: offscreen.left ? "pl-10" : void 0
|
|
87108
|
+
}) : null] }) : null] }) });
|
|
86978
87109
|
});
|
|
86979
87110
|
const DELTA_CAP_HEIGHT_PX = 8;
|
|
86980
87111
|
const DELTA_ROW_OFFSET_PX = 8;
|
|
@@ -86990,7 +87121,7 @@ const DeltaIndicator = reactExports.memo(function DeltaIndicator2({ leftFrac, ri
|
|
|
86990
87121
|
function TimelineHeader({ markers: markers2, hoverInfo: hoverInfo2 }) {
|
|
86991
87122
|
return jsxRuntimeExports.jsx("div", { className: "relative bg-background-100 border-b border-gray-alpha-400 h-10 min-h-10 flex items-end px-4 pb-1", children: jsxRuntimeExports.jsxs("div", { className: "relative h-full flex-1", children: [markers2.map((m2) => jsxRuntimeExports.jsx("span", { className: "absolute bottom-1 font-mono text-xs font-normal leading-4 text-gray-900 whitespace-nowrap", style: { left: `${m2.position * 100}%` }, children: m2.label }, String(m2.value))), hoverInfo2 && jsxRuntimeExports.jsx("span", { className: "absolute top-1 pointer-events-none z-10 font-mono text-[11px] leading-4 text-gray-1000 whitespace-nowrap bg-background-100 border border-gray-alpha-400 rounded px-1 -translate-x-1/2", style: { left: `${hoverInfo2.fraction * 100}%` }, children: hoverInfo2.label })] }) });
|
|
86992
87123
|
}
|
|
86993
|
-
function Timeline({ spans, viewStart, viewEnd, markers: markers2, selectedId, searchResult, onSelect, hoverFraction, altHeld = false }) {
|
|
87124
|
+
function Timeline({ spans, viewStart, viewEnd, markers: markers2, selectedId, searchResult, onSelect, onRevealTime, hoverFraction, altHeld = false }) {
|
|
86994
87125
|
const containerRef = reactExports.useRef(null);
|
|
86995
87126
|
const [containerWidth, setContainerWidth] = reactExports.useState(0);
|
|
86996
87127
|
const viewDuration = viewEnd - viewStart;
|
|
@@ -87010,7 +87141,7 @@ function Timeline({ spans, viewStart, viewEnd, markers: markers2, selectedId, se
|
|
|
87010
87141
|
return jsxRuntimeExports.jsxs("div", { ref: containerRef, className: "relative h-full overflow-hidden", style: { minHeight: spans.length * ROW_HEIGHT_PX }, children: [jsxRuntimeExports.jsx("div", { "aria-hidden": true, className: "absolute inset-y-0 pointer-events-none", style: TIMELINE_INSET_STYLE, children: markers2.map((marker2) => (
|
|
87011
87142
|
// Skip the "0s" origin marker since the left edge already implies it.
|
|
87012
87143
|
Math.abs(marker2.value) > 1e-6 ? jsxRuntimeExports.jsx("div", { className: "absolute top-0 bottom-0 w-px bg-gray-alpha-300", style: { left: `${marker2.position * 100}%` } }, String(marker2.value)) : null
|
|
87013
|
-
)) }), hoverFraction != null && jsxRuntimeExports.jsx("div", { className: "absolute inset-y-0 pointer-events-none z-10", style: TIMELINE_INSET_STYLE, children: jsxRuntimeExports.jsx("div", { className: "absolute top-0 bottom-0 w-px bg-gray-alpha-500", style: { left: `${hoverFraction * 100}%` } }) }), jsxRuntimeExports.jsx("div", { style: { transform: `translateY(${start2 * ROW_HEIGHT_PX}px)` }, children: spans.slice(start2, end).map((span) => jsxRuntimeExports.jsx(TimelineBar, { span, viewStart, viewDuration, containerWidth: timelineWidth, isSelected: selectedId === span.spanId, isDimmed: isSpanDimmedBySearch(span.spanId, searchResult), onSelect }, span.spanId)) }), altHeld && jsxRuntimeExports.jsx("div", { "aria-hidden": true, className: "absolute inset-y-0 pointer-events-none", style: TIMELINE_INSET_STYLE, children: gaps.map((gap) => jsxRuntimeExports.jsx(DeltaIndicator, { leftFrac: gap.leftFrac, rightFrac: gap.rightFrac, label: formatDuration(gap.gapMs, true), rowIndex: gap.rowIndex }, gap.rowIndex)) })] });
|
|
87144
|
+
)) }), hoverFraction != null && jsxRuntimeExports.jsx("div", { className: "absolute inset-y-0 pointer-events-none z-10", style: TIMELINE_INSET_STYLE, children: jsxRuntimeExports.jsx("div", { className: "absolute top-0 bottom-0 w-px bg-gray-alpha-500", style: { left: `${hoverFraction * 100}%` } }) }), jsxRuntimeExports.jsx("div", { style: { transform: `translateY(${start2 * ROW_HEIGHT_PX}px)` }, children: spans.slice(start2, end).map((span) => jsxRuntimeExports.jsx(TimelineBar, { span, viewStart, viewDuration, containerWidth: timelineWidth, isSelected: selectedId === span.spanId, isDimmed: isSpanDimmedBySearch(span.spanId, searchResult), onSelect, onRevealTime }, span.spanId)) }), altHeld && jsxRuntimeExports.jsx("div", { "aria-hidden": true, className: "absolute inset-y-0 pointer-events-none", style: TIMELINE_INSET_STYLE, children: gaps.map((gap) => jsxRuntimeExports.jsx(DeltaIndicator, { leftFrac: gap.leftFrac, rightFrac: gap.rightFrac, label: formatDuration(gap.gapMs, true), rowIndex: gap.rowIndex }, gap.rowIndex)) })] });
|
|
87014
87145
|
}
|
|
87015
87146
|
const ActiveSpanContext = reactExports.createContext(null);
|
|
87016
87147
|
ActiveSpanContext.displayName = "ActiveSpanContext";
|
|
@@ -87056,6 +87187,7 @@ const useActiveSpan = () => {
|
|
|
87056
87187
|
return context;
|
|
87057
87188
|
};
|
|
87058
87189
|
const MIN_VIEWPORT_MS = 1e-3;
|
|
87190
|
+
const ZOOM_DEBOUNCE_MS = 150;
|
|
87059
87191
|
function useAnimatedViewport(initial) {
|
|
87060
87192
|
const [viewport, setViewportState] = reactExports.useState(initial);
|
|
87061
87193
|
const animRef = reactExports.useRef(null);
|
|
@@ -87132,6 +87264,7 @@ function NewTraceViewerContent({ trace: trace2, onLoadMore, hasMore, isLoadingMo
|
|
|
87132
87264
|
const { activeSpan, activeSpanId, setActiveSpan, clearActiveSpan } = useActiveSpan();
|
|
87133
87265
|
const sidebar = useSidebarData();
|
|
87134
87266
|
const selectedSpan = useSelectedSpanInfo();
|
|
87267
|
+
const reducedMotion = useReducedMotion();
|
|
87135
87268
|
const [searchQuery, setSearchQuery] = reactExports.useState("");
|
|
87136
87269
|
const deferredSearchQuery = reactExports.useDeferredValue(searchQuery);
|
|
87137
87270
|
const searchResult = reactExports.useMemo(() => searchSpans(trace2.spans, deferredSearchQuery), [trace2.spans, deferredSearchQuery]);
|
|
@@ -87167,10 +87300,29 @@ function NewTraceViewerContent({ trace: trace2, onLoadMore, hasMore, isLoadingMo
|
|
|
87167
87300
|
prevRootRef.current = { start: newStart, end: newEnd };
|
|
87168
87301
|
}, [root2.startTime, root2.duration, setViewport]);
|
|
87169
87302
|
const viewDuration = viewport.end - viewport.start;
|
|
87303
|
+
const viewportRef = reactExports.useRef(viewport);
|
|
87304
|
+
viewportRef.current = viewport;
|
|
87170
87305
|
const timeMarkers = reactExports.useMemo(() => computeTimeMarkers(viewDuration, viewport.start - root2.startTime), [viewDuration, viewport.start, root2.startTime]);
|
|
87171
87306
|
const resetZoom = reactExports.useCallback(() => {
|
|
87172
87307
|
animateTo({ start: root2.startTime, end: root2.startTime + root2.duration });
|
|
87173
87308
|
}, [animateTo, root2.startTime, root2.duration]);
|
|
87309
|
+
const handleRevealTime = reactExports.useCallback((timeMs) => {
|
|
87310
|
+
const rootS = root2.startTime;
|
|
87311
|
+
const rootE = root2.startTime + root2.duration;
|
|
87312
|
+
const { start: start2, end } = viewportRef.current;
|
|
87313
|
+
const duration2 = end - start2;
|
|
87314
|
+
let newStart = timeMs - duration2 / 2;
|
|
87315
|
+
let newEnd = timeMs + duration2 / 2;
|
|
87316
|
+
if (newStart < rootS) {
|
|
87317
|
+
newStart = rootS;
|
|
87318
|
+
newEnd = rootS + duration2;
|
|
87319
|
+
}
|
|
87320
|
+
if (newEnd > rootE) {
|
|
87321
|
+
newEnd = rootE;
|
|
87322
|
+
newStart = Math.max(rootS, rootE - duration2);
|
|
87323
|
+
}
|
|
87324
|
+
animateTo({ start: newStart, end: newEnd });
|
|
87325
|
+
}, [animateTo, root2.startTime, root2.duration]);
|
|
87174
87326
|
const ZOOM_FACTOR = 0.5;
|
|
87175
87327
|
const zoomBy = reactExports.useCallback((factor) => {
|
|
87176
87328
|
const rootS = root2.startTime;
|
|
@@ -87195,12 +87347,7 @@ function NewTraceViewerContent({ trace: trace2, onLoadMore, hasMore, isLoadingMo
|
|
|
87195
87347
|
}, [setViewport, root2.startTime, root2.duration]);
|
|
87196
87348
|
const zoomIn = reactExports.useCallback(() => zoomBy(ZOOM_FACTOR), [zoomBy]);
|
|
87197
87349
|
const zoomOut = reactExports.useCallback(() => zoomBy(1 / ZOOM_FACTOR), [zoomBy]);
|
|
87198
|
-
const
|
|
87199
|
-
if (spanId === activeSpanId) {
|
|
87200
|
-
clearActiveSpan();
|
|
87201
|
-
return;
|
|
87202
|
-
}
|
|
87203
|
-
setActiveSpan(spanId);
|
|
87350
|
+
const focusViewportOnSpan = reactExports.useCallback((spanId) => {
|
|
87204
87351
|
const span = trace2.spans.find((s2) => s2.spanId === spanId);
|
|
87205
87352
|
if (!span)
|
|
87206
87353
|
return;
|
|
@@ -87233,15 +87380,53 @@ function NewTraceViewerContent({ trace: trace2, onLoadMore, hasMore, isLoadingMo
|
|
|
87233
87380
|
newStart = Math.max(rootS, rootE - duration2);
|
|
87234
87381
|
}
|
|
87235
87382
|
animateTo({ start: newStart, end: newEnd });
|
|
87383
|
+
}, [animateTo, trace2.spans, root2.startTime, root2.duration]);
|
|
87384
|
+
const scrollSpanIntoView = reactExports.useCallback((spanId) => {
|
|
87385
|
+
var _a3;
|
|
87386
|
+
const index2 = trace2.spans.findIndex((s2) => s2.spanId === spanId);
|
|
87387
|
+
if (index2 === -1)
|
|
87388
|
+
return;
|
|
87389
|
+
const list2 = ((_a3 = scrollContainerRef.current) == null ? void 0 : _a3.querySelector("#event-list")) ?? null;
|
|
87390
|
+
scrollRowIntoView(list2, index2, ROW_HEIGHT_PX, {
|
|
87391
|
+
behavior: reducedMotion ? "auto" : "smooth"
|
|
87392
|
+
});
|
|
87393
|
+
}, [trace2.spans, reducedMotion]);
|
|
87394
|
+
const zoomTimerRef = reactExports.useRef(null);
|
|
87395
|
+
const cancelPendingZoom = reactExports.useCallback(() => {
|
|
87396
|
+
if (zoomTimerRef.current !== null) {
|
|
87397
|
+
clearTimeout(zoomTimerRef.current);
|
|
87398
|
+
zoomTimerRef.current = null;
|
|
87399
|
+
}
|
|
87400
|
+
}, []);
|
|
87401
|
+
reactExports.useEffect(() => cancelPendingZoom, [cancelPendingZoom]);
|
|
87402
|
+
const handleClearActiveSpan = reactExports.useCallback(() => {
|
|
87403
|
+
cancelPendingZoom();
|
|
87404
|
+
clearActiveSpan();
|
|
87405
|
+
}, [cancelPendingZoom, clearActiveSpan]);
|
|
87406
|
+
const handleSelectSpan = reactExports.useCallback((spanId) => {
|
|
87407
|
+
cancelPendingZoom();
|
|
87408
|
+
if (spanId === activeSpanId) {
|
|
87409
|
+
clearActiveSpan();
|
|
87410
|
+
return;
|
|
87411
|
+
}
|
|
87412
|
+
setActiveSpan(spanId);
|
|
87413
|
+
focusViewportOnSpan(spanId);
|
|
87236
87414
|
}, [
|
|
87237
|
-
|
|
87238
|
-
setActiveSpan,
|
|
87239
|
-
clearActiveSpan,
|
|
87415
|
+
cancelPendingZoom,
|
|
87240
87416
|
activeSpanId,
|
|
87241
|
-
|
|
87242
|
-
|
|
87243
|
-
|
|
87417
|
+
clearActiveSpan,
|
|
87418
|
+
setActiveSpan,
|
|
87419
|
+
focusViewportOnSpan
|
|
87244
87420
|
]);
|
|
87421
|
+
const navigateToSpan = reactExports.useCallback((spanId) => {
|
|
87422
|
+
setActiveSpan(spanId);
|
|
87423
|
+
scrollSpanIntoView(spanId);
|
|
87424
|
+
cancelPendingZoom();
|
|
87425
|
+
zoomTimerRef.current = setTimeout(() => {
|
|
87426
|
+
zoomTimerRef.current = null;
|
|
87427
|
+
focusViewportOnSpan(spanId);
|
|
87428
|
+
}, ZOOM_DEBOUNCE_MS);
|
|
87429
|
+
}, [setActiveSpan, scrollSpanIntoView, cancelPendingZoom, focusViewportOnSpan]);
|
|
87245
87430
|
const [altHeld, setAltHeld] = reactExports.useState(false);
|
|
87246
87431
|
reactExports.useEffect(() => {
|
|
87247
87432
|
const handleSidebarNavKey = (e) => {
|
|
@@ -87252,12 +87437,12 @@ function NewTraceViewerContent({ trace: trace2, onLoadMore, hasMore, isLoadingMo
|
|
|
87252
87437
|
const targetId = e.key === "k" ? prevSpanIdRef.current : nextSpanIdRef.current;
|
|
87253
87438
|
if (targetId) {
|
|
87254
87439
|
e.preventDefault();
|
|
87255
|
-
|
|
87440
|
+
navigateToSpanRef.current(targetId);
|
|
87256
87441
|
}
|
|
87257
87442
|
};
|
|
87258
87443
|
const onKeyDown = (e) => {
|
|
87259
87444
|
if (e.key === "Escape") {
|
|
87260
|
-
|
|
87445
|
+
handleClearActiveSpan();
|
|
87261
87446
|
} else if (e.key === "Alt") {
|
|
87262
87447
|
e.preventDefault();
|
|
87263
87448
|
setAltHeld(true);
|
|
@@ -87278,7 +87463,7 @@ function NewTraceViewerContent({ trace: trace2, onLoadMore, hasMore, isLoadingMo
|
|
|
87278
87463
|
window.removeEventListener("keyup", onKeyUp);
|
|
87279
87464
|
window.removeEventListener("blur", onBlur);
|
|
87280
87465
|
};
|
|
87281
|
-
}, [
|
|
87466
|
+
}, [handleClearActiveSpan]);
|
|
87282
87467
|
const timelineRef = reactExports.useRef(null);
|
|
87283
87468
|
const [hoverFraction, setHoverFraction] = reactExports.useState(null);
|
|
87284
87469
|
const hoverInfo2 = reactExports.useMemo(() => {
|
|
@@ -87394,25 +87579,25 @@ function NewTraceViewerContent({ trace: trace2, onLoadMore, hasMore, isLoadingMo
|
|
|
87394
87579
|
}, [activeSpanId, trace2.spans]);
|
|
87395
87580
|
const handleSelectPrevSpan = reactExports.useCallback(() => {
|
|
87396
87581
|
if (prevSpanId)
|
|
87397
|
-
|
|
87398
|
-
}, [prevSpanId,
|
|
87582
|
+
navigateToSpan(prevSpanId);
|
|
87583
|
+
}, [prevSpanId, navigateToSpan]);
|
|
87399
87584
|
const handleSelectNextSpan = reactExports.useCallback(() => {
|
|
87400
87585
|
if (nextSpanId)
|
|
87401
|
-
|
|
87402
|
-
}, [nextSpanId,
|
|
87586
|
+
navigateToSpan(nextSpanId);
|
|
87587
|
+
}, [nextSpanId, navigateToSpan]);
|
|
87403
87588
|
const prevSpanIdRef = reactExports.useRef(prevSpanId);
|
|
87404
87589
|
const nextSpanIdRef = reactExports.useRef(nextSpanId);
|
|
87405
|
-
const
|
|
87590
|
+
const navigateToSpanRef = reactExports.useRef(navigateToSpan);
|
|
87406
87591
|
prevSpanIdRef.current = prevSpanId;
|
|
87407
87592
|
nextSpanIdRef.current = nextSpanId;
|
|
87408
|
-
|
|
87593
|
+
navigateToSpanRef.current = navigateToSpan;
|
|
87409
87594
|
return jsxRuntimeExports.jsxs("div", { "data-pane": "pane-root", "data-has-detail": activeSpan ? "" : void 0, className: "grid w-full h-full max-h-full grid-cols-[minmax(100px,1fr)] data-[has-detail]:grid-cols-[minmax(100px,1fr)_clamp(280px,360px,100%)]", children: [jsxRuntimeExports.jsxs("div", { id: "trace-parent", className: "grid grid-rows-[1fr] h-full min-h-0 overflow-hidden relative bg-background-100", children: [jsxRuntimeExports.jsxs(SplitPane, { scrollContainerRef, startHeader: jsxRuntimeExports.jsxs("div", { className: "bg-background-100 border-b border-gray-alpha-400 h-10 min-h-10 flex items-center pl-4 pr-2 gap-1.5", children: [jsxRuntimeExports.jsx(Search, { className: "w-3.5 h-3.5 shrink-0 text-gray-800" }), jsxRuntimeExports.jsx("input", { id: "trace-viewer-search", name: "trace-viewer-search", type: "text", value: searchQuery, onChange: (e) => setSearchQuery(e.target.value), onKeyDown: (e) => {
|
|
87410
87595
|
if (e.key === "Escape" && searchQuery) {
|
|
87411
87596
|
e.preventDefault();
|
|
87412
87597
|
e.stopPropagation();
|
|
87413
87598
|
setSearchQuery("");
|
|
87414
87599
|
}
|
|
87415
|
-
}, placeholder: "Search spans...", "aria-label": "Search spans", className: "flex-1 min-w-0 bg-transparent text-sm text-gray-1000 placeholder:text-gray-800 outline-none" }), searchQuery && jsxRuntimeExports.jsx("button", { type: "button", "aria-label": "Clear search", onClick: () => setSearchQuery(""), className: "-mr-2 hidden h-full max-w-full shrink-0 cursor-pointer items-center rounded-r-md border-0 bg-transparent px-2.5 font-inherit text-base text-gray-900 no-underline transition-colors duration-150 ease-in hover:text-gray-1000 focus-visible:-outline-offset-1 focus-visible:outline focus-visible:outline-2 focus-visible:outline-[var(--ds-focus-color)] min-[961px]:flex", children: jsxRuntimeExports.jsx("kbd", { className: "inline-flex h-5 min-h-5 min-w-5 items-center justify-center rounded border border-gray-alpha-400 bg-background-100 px-1 font-sans text-[13px] font-medium leading-[1.7em] text-gray-900", children: "Esc" }) })] }), endHeader: jsxRuntimeExports.jsx(TimelineHeader, { markers: timeMarkers, hoverInfo: hoverInfo2 }), children: [jsxRuntimeExports.jsxs("div", { className: "block overflow-visible", children: [jsxRuntimeExports.jsx(EventList, { spans: trace2.spans, activeSpanId, searchResult, onSelectSpan: handleSelectSpan }), jsxRuntimeExports.jsx("div", { ref: loadMoreSentinelRef, className: "flex justify-center", children: isLoadingMore ? jsxRuntimeExports.jsxs("div", { className: "flex items-center justify-center gap-2 py-3 text-sm text-gray-800", children: [jsxRuntimeExports.jsx(Spinner, { size: 14 }), jsxRuntimeExports.jsx("span", { children: "Loading spans…" })] }) : null })] }), jsxRuntimeExports.jsx("div", { ref: timelineRef, className: "block min-h-0 overflow-visible relative", onDoubleClick: resetZoom, onMouseMove: handleTimelineMouseMove, onMouseLeave: handleTimelineMouseLeave, children: jsxRuntimeExports.jsx(Timeline, { spans: trace2.spans, viewStart: viewport.start, viewEnd: viewport.end, markers: timeMarkers, selectedId: activeSpanId, searchResult, onSelect: handleSelectSpan, hoverFraction, altHeld }) })] }), jsxRuntimeExports.jsxs("div", { className: "absolute right-3 bottom-3 z-[5] flex items-center border border-gray-alpha-400 rounded-md bg-background-100 shadow-sm overflow-hidden divide-x divide-gray-alpha-400", children: [jsxRuntimeExports.jsx(IconButton, { variant: "muted", size: "small", onClick: zoomOut, "aria-label": "Zoom out", children: jsxRuntimeExports.jsx(ZoomOut, { className: "w-4 h-4" }) }), jsxRuntimeExports.jsx(IconButton, { variant: "muted", size: "small", onClick: resetZoom, "aria-label": "Reset zoom", children: jsxRuntimeExports.jsx(RotateCcw, { className: "w-3.5 h-3.5" }) }), jsxRuntimeExports.jsx(IconButton, { variant: "muted", size: "small", onClick: zoomIn, "aria-label": "Zoom in", children: jsxRuntimeExports.jsx(ZoomIn, { className: "w-4 h-4" }) })] })] }), activeSpan ? jsxRuntimeExports.jsxs("aside", { className: "flex flex-col h-full max-h-full bg-background-100 border-l border-gray-alpha-400 overflow-auto", children: [jsxRuntimeExports.jsxs("div", { className: "flex items-center justify-between gap-2 shrink-0 px-4 pt-3 pb-3", children: [jsxRuntimeExports.jsx("span", { className: "text-label-14 font-medium text-gray-1000 truncate block", children: selectedSpanName }), jsxRuntimeExports.jsxs("div", { className: "flex items-center gap-0.5 shrink-0", children: [jsxRuntimeExports.jsxs(Tooltip$1, { children: [jsxRuntimeExports.jsx(TooltipTrigger$1, { asChild: true, children: jsxRuntimeExports.jsx(IconButton, { "aria-label": "Navigate up", "aria-keyshortcuts": "K", onClick: handleSelectPrevSpan, disabled: !prevSpanId, children: jsxRuntimeExports.jsx(ChevronUp, { className: "w-4 h-4" }) }) }), prevSpanId ? jsxRuntimeExports.jsxs(TooltipContent$1, { children: ["Navigate up", jsxRuntimeExports.jsx(Kbd, { children: "K" })] }) : null] }), jsxRuntimeExports.jsxs(Tooltip$1, { children: [jsxRuntimeExports.jsx(TooltipTrigger$1, { asChild: true, children: jsxRuntimeExports.jsx(IconButton, { "aria-label": "Navigate down", "aria-keyshortcuts": "J", onClick: handleSelectNextSpan, disabled: !nextSpanId, children: jsxRuntimeExports.jsx(ChevronDown, { className: "w-4 h-4" }) }) }), nextSpanId ? jsxRuntimeExports.jsxs(TooltipContent$1, { children: ["Navigate down", jsxRuntimeExports.jsx(Kbd, { children: "J" })] }) : null] }), jsxRuntimeExports.jsx("div", { "aria-hidden": true, className: "w-px h-4 bg-gray-alpha-400 mx-1" }), jsxRuntimeExports.jsx(IconButton, { "aria-label": "Close span details", "aria-keyshortcuts": "Escape", onClick:
|
|
87600
|
+
}, placeholder: "Search spans...", "aria-label": "Search spans", className: "flex-1 min-w-0 bg-transparent text-sm text-gray-1000 placeholder:text-gray-800 outline-none" }), searchQuery && jsxRuntimeExports.jsx("button", { type: "button", "aria-label": "Clear search", onClick: () => setSearchQuery(""), className: "-mr-2 hidden h-full max-w-full shrink-0 cursor-pointer items-center rounded-r-md border-0 bg-transparent px-2.5 font-inherit text-base text-gray-900 no-underline transition-colors duration-150 ease-in hover:text-gray-1000 focus-visible:-outline-offset-1 focus-visible:outline focus-visible:outline-2 focus-visible:outline-[var(--ds-focus-color)] min-[961px]:flex", children: jsxRuntimeExports.jsx("kbd", { className: "inline-flex h-5 min-h-5 min-w-5 items-center justify-center rounded border border-gray-alpha-400 bg-background-100 px-1 font-sans text-[13px] font-medium leading-[1.7em] text-gray-900", children: "Esc" }) })] }), endHeader: jsxRuntimeExports.jsx(TimelineHeader, { markers: timeMarkers, hoverInfo: hoverInfo2 }), children: [jsxRuntimeExports.jsxs("div", { className: "block overflow-visible", children: [jsxRuntimeExports.jsx(EventList, { spans: trace2.spans, activeSpanId, searchResult, onSelectSpan: handleSelectSpan }), jsxRuntimeExports.jsx("div", { ref: loadMoreSentinelRef, className: "flex justify-center", children: isLoadingMore ? jsxRuntimeExports.jsxs("div", { className: "flex items-center justify-center gap-2 py-3 text-sm text-gray-800", children: [jsxRuntimeExports.jsx(Spinner, { size: 14 }), jsxRuntimeExports.jsx("span", { children: "Loading spans…" })] }) : null })] }), jsxRuntimeExports.jsx("div", { ref: timelineRef, className: "block min-h-0 overflow-visible relative", onDoubleClick: resetZoom, onMouseMove: handleTimelineMouseMove, onMouseLeave: handleTimelineMouseLeave, children: jsxRuntimeExports.jsx(Timeline, { spans: trace2.spans, viewStart: viewport.start, viewEnd: viewport.end, markers: timeMarkers, selectedId: activeSpanId, searchResult, onSelect: handleSelectSpan, onRevealTime: handleRevealTime, hoverFraction, altHeld }) })] }), jsxRuntimeExports.jsxs("div", { className: "absolute right-3 bottom-3 z-[5] flex items-center border border-gray-alpha-400 rounded-md bg-background-100 shadow-sm overflow-hidden divide-x divide-gray-alpha-400", children: [jsxRuntimeExports.jsx(IconButton, { variant: "muted", size: "small", onClick: zoomOut, "aria-label": "Zoom out", children: jsxRuntimeExports.jsx(ZoomOut, { className: "w-4 h-4" }) }), jsxRuntimeExports.jsx(IconButton, { variant: "muted", size: "small", onClick: resetZoom, "aria-label": "Reset zoom", children: jsxRuntimeExports.jsx(RotateCcw, { className: "w-3.5 h-3.5" }) }), jsxRuntimeExports.jsx(IconButton, { variant: "muted", size: "small", onClick: zoomIn, "aria-label": "Zoom in", children: jsxRuntimeExports.jsx(ZoomIn, { className: "w-4 h-4" }) })] })] }), activeSpan ? jsxRuntimeExports.jsxs("aside", { className: "flex flex-col h-full max-h-full bg-background-100 border-l border-gray-alpha-400 overflow-auto", children: [jsxRuntimeExports.jsxs("div", { className: "flex items-center justify-between gap-2 shrink-0 px-4 pt-3 pb-3", children: [jsxRuntimeExports.jsx("span", { className: "text-label-14 font-medium text-gray-1000 truncate block", children: selectedSpanName }), jsxRuntimeExports.jsxs("div", { className: "flex items-center gap-0.5 shrink-0", children: [jsxRuntimeExports.jsxs(Tooltip$1, { children: [jsxRuntimeExports.jsx(TooltipTrigger$1, { asChild: true, children: jsxRuntimeExports.jsx(IconButton, { "aria-label": "Navigate up", "aria-keyshortcuts": "K", onClick: handleSelectPrevSpan, disabled: !prevSpanId, children: jsxRuntimeExports.jsx(ChevronUp, { className: "w-4 h-4" }) }) }), prevSpanId ? jsxRuntimeExports.jsxs(TooltipContent$1, { children: ["Navigate up", jsxRuntimeExports.jsx(Kbd, { children: "K" })] }) : null] }), jsxRuntimeExports.jsxs(Tooltip$1, { children: [jsxRuntimeExports.jsx(TooltipTrigger$1, { asChild: true, children: jsxRuntimeExports.jsx(IconButton, { "aria-label": "Navigate down", "aria-keyshortcuts": "J", onClick: handleSelectNextSpan, disabled: !nextSpanId, children: jsxRuntimeExports.jsx(ChevronDown, { className: "w-4 h-4" }) }) }), nextSpanId ? jsxRuntimeExports.jsxs(TooltipContent$1, { children: ["Navigate down", jsxRuntimeExports.jsx(Kbd, { children: "J" })] }) : null] }), jsxRuntimeExports.jsx("div", { "aria-hidden": true, className: "w-px h-4 bg-gray-alpha-400 mx-1" }), jsxRuntimeExports.jsx(IconButton, { "aria-label": "Close span details", "aria-keyshortcuts": "Escape", onClick: handleClearActiveSpan, children: jsxRuntimeExports.jsx(X$3, { className: "w-4 h-4" }) })] })] }), jsxRuntimeExports.jsx("div", { className: "flex-1 overflow-y-auto", children: jsxRuntimeExports.jsx(ErrorBoundary$1, { children: jsxRuntimeExports.jsx(EntityDetailPanel, { run: sidebar.run, onStreamClick: sidebar.onStreamClick, onRunClick: sidebar.onRunClick, spanDetailData: sidebar.spanDetailData, spanDetailError: sidebar.spanDetailError, spanDetailLoading: sidebar.spanDetailLoading, onSpanSelect: sidebar.onSpanSelect, onWakeUpSleep: sidebar.onWakeUpSleep, onLoadEventData: sidebar.onLoadEventData, onResolveHook: sidebar.onResolveHook, encryptionKey: sidebar.encryptionKey, onDecrypt: sidebar.onDecrypt, isDecrypting: sidebar.isDecrypting, selectedSpan }) }) })] }) : null] });
|
|
87416
87601
|
}
|
|
87417
87602
|
const NewTraceViewer = ({ run: run2, events: events2, sidebarData, onLoadMore, hasMore, isLoadingMore, loading = false }) => {
|
|
87418
87603
|
const trace2 = reactExports.useMemo(() => {
|
|
@@ -91087,6 +91272,12 @@ const WorkflowSuspensionState = SemanticConvention$2("workflow.suspension.state"
|
|
|
91087
91272
|
const WorkflowSuspensionHookCount = SemanticConvention$2("workflow.suspension.hook_count");
|
|
91088
91273
|
const WorkflowSuspensionStepCount = SemanticConvention$2("workflow.suspension.step_count");
|
|
91089
91274
|
const WorkflowSuspensionWaitCount = SemanticConvention$2("workflow.suspension.wait_count");
|
|
91275
|
+
const SerializationOperation = SemanticConvention$2("workflow.serialization.operation");
|
|
91276
|
+
const SerializationCompressed = SemanticConvention$2("workflow.serialization.compressed");
|
|
91277
|
+
const SerializationCodec = SemanticConvention$2("workflow.serialization.codec");
|
|
91278
|
+
const SerializationUncompressedBytes = SemanticConvention$2("workflow.serialization.uncompressed_bytes");
|
|
91279
|
+
const SerializationStoredBytes = SemanticConvention$2("workflow.serialization.stored_bytes");
|
|
91280
|
+
const SerializationCompressionRatio = SemanticConvention$2("workflow.serialization.compression_ratio");
|
|
91090
91281
|
async function serializeTraceCarrier() {
|
|
91091
91282
|
const otel = await OtelApi.value;
|
|
91092
91283
|
if (!otel)
|
|
@@ -91311,7 +91502,7 @@ const encryption = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.definePr
|
|
|
91311
91502
|
encrypt: encrypt$1,
|
|
91312
91503
|
importKey
|
|
91313
91504
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
91314
|
-
const version$1 = "5.0.0-beta.
|
|
91505
|
+
const version$1 = "5.0.0-beta.19";
|
|
91315
91506
|
const WorldCacheKey = Symbol.for("@workflow/world//cache");
|
|
91316
91507
|
const WorldCachePromiseKey = Symbol.for("@workflow/world//cachePromise");
|
|
91317
91508
|
const GetWorldFnKey$1 = Symbol.for("@workflow/world//getWorldFn");
|
|
@@ -92110,7 +92301,11 @@ const SerializationFormat = {
|
|
|
92110
92301
|
/** devalue stringify/parse with TextEncoder/TextDecoder */
|
|
92111
92302
|
DEVALUE_V1: "devl",
|
|
92112
92303
|
/** Encrypted payload (inner payload has its own format prefix) */
|
|
92113
|
-
ENCRYPTED: "encr"
|
|
92304
|
+
ENCRYPTED: "encr",
|
|
92305
|
+
/** Gzip-compressed payload (inner payload has its own format prefix) */
|
|
92306
|
+
GZIP: "gzip",
|
|
92307
|
+
/** Zstandard-compressed payload (inner payload has its own format prefix) */
|
|
92308
|
+
ZSTD: "zstd"
|
|
92114
92309
|
};
|
|
92115
92310
|
const encoder = new TextEncoder();
|
|
92116
92311
|
const decoder = new TextDecoder();
|
|
@@ -92229,6 +92424,148 @@ function decodeFormatPrefix(data) {
|
|
|
92229
92424
|
const payload = data.subarray(FORMAT_PREFIX_LENGTH);
|
|
92230
92425
|
return { format: str, payload };
|
|
92231
92426
|
}
|
|
92427
|
+
const COMPRESSION_MIN_BYTES = 1024;
|
|
92428
|
+
const COMPRESSION_MIN_SAVINGS_RATIO = 0.05;
|
|
92429
|
+
const ZSTD_LEVEL = 3;
|
|
92430
|
+
function isCompressionDisabledByEnv() {
|
|
92431
|
+
var _a3;
|
|
92432
|
+
try {
|
|
92433
|
+
return typeof process !== "undefined" && ((_a3 = process.env) == null ? void 0 : _a3.WORKFLOW_DISABLE_COMPRESSION) === "1";
|
|
92434
|
+
} catch {
|
|
92435
|
+
return false;
|
|
92436
|
+
}
|
|
92437
|
+
}
|
|
92438
|
+
function codecOverrideFromEnv() {
|
|
92439
|
+
var _a3;
|
|
92440
|
+
try {
|
|
92441
|
+
const v2 = (_a3 = process.env) == null ? void 0 : _a3.WORKFLOW_COMPRESSION_CODEC;
|
|
92442
|
+
return v2 === "gzip" || v2 === "zstd" ? v2 : void 0;
|
|
92443
|
+
} catch {
|
|
92444
|
+
return void 0;
|
|
92445
|
+
}
|
|
92446
|
+
}
|
|
92447
|
+
function getNodeZlib() {
|
|
92448
|
+
var _a3, _b2;
|
|
92449
|
+
try {
|
|
92450
|
+
return (_b2 = (_a3 = globalThis.process) == null ? void 0 : _a3.getBuiltinModule) == null ? void 0 : _b2.call(_a3, "node:zlib");
|
|
92451
|
+
} catch {
|
|
92452
|
+
return void 0;
|
|
92453
|
+
}
|
|
92454
|
+
}
|
|
92455
|
+
function isZstdAvailable() {
|
|
92456
|
+
const z2 = getNodeZlib();
|
|
92457
|
+
return typeof (z2 == null ? void 0 : z2.zstdCompressSync) === "function" && typeof (z2 == null ? void 0 : z2.zstdDecompressSync) === "function";
|
|
92458
|
+
}
|
|
92459
|
+
function isGzipAvailable() {
|
|
92460
|
+
return typeof CompressionStream === "function" && typeof DecompressionStream === "function";
|
|
92461
|
+
}
|
|
92462
|
+
async function pipeThroughTransform(data, transform2) {
|
|
92463
|
+
const writer = transform2.writable.getWriter();
|
|
92464
|
+
const writePromise = writer.write(data).then(() => writer.close());
|
|
92465
|
+
writePromise.catch(() => {
|
|
92466
|
+
});
|
|
92467
|
+
const chunks = [];
|
|
92468
|
+
let total = 0;
|
|
92469
|
+
const reader = transform2.readable.getReader();
|
|
92470
|
+
for (; ; ) {
|
|
92471
|
+
const { done, value } = await reader.read();
|
|
92472
|
+
if (done)
|
|
92473
|
+
break;
|
|
92474
|
+
chunks.push(value);
|
|
92475
|
+
total += value.length;
|
|
92476
|
+
}
|
|
92477
|
+
await writePromise;
|
|
92478
|
+
const out = new Uint8Array(total);
|
|
92479
|
+
let offset2 = 0;
|
|
92480
|
+
for (const chunk of chunks) {
|
|
92481
|
+
out.set(chunk, offset2);
|
|
92482
|
+
offset2 += chunk.length;
|
|
92483
|
+
}
|
|
92484
|
+
return out;
|
|
92485
|
+
}
|
|
92486
|
+
async function gzipBytes(data) {
|
|
92487
|
+
return pipeThroughTransform(data, new CompressionStream("gzip"));
|
|
92488
|
+
}
|
|
92489
|
+
async function gunzipBytes(data) {
|
|
92490
|
+
return pipeThroughTransform(data, new DecompressionStream("gzip"));
|
|
92491
|
+
}
|
|
92492
|
+
function zstdBytes(data) {
|
|
92493
|
+
var _a3;
|
|
92494
|
+
const z2 = getNodeZlib();
|
|
92495
|
+
const level = (_a3 = z2 == null ? void 0 : z2.constants) == null ? void 0 : _a3.ZSTD_c_compressionLevel;
|
|
92496
|
+
const opts = level !== void 0 ? { params: { [level]: ZSTD_LEVEL } } : void 0;
|
|
92497
|
+
return new Uint8Array(z2.zstdCompressSync(data, opts));
|
|
92498
|
+
}
|
|
92499
|
+
function unzstdBytes(data) {
|
|
92500
|
+
const z2 = getNodeZlib();
|
|
92501
|
+
if (!(z2 == null ? void 0 : z2.zstdDecompressSync)) {
|
|
92502
|
+
throw new Error("Compressed (zstd) workflow data encountered but node:zlib zstd support is not available in this runtime (requires Node.js 22.15+). In the browser, register a zstd decoder via registerZstdDecoder (serialization-format.ts).");
|
|
92503
|
+
}
|
|
92504
|
+
return new Uint8Array(z2.zstdDecompressSync(data));
|
|
92505
|
+
}
|
|
92506
|
+
function recordStats(stats2, codec2, uncompressedBytes, storedBytes) {
|
|
92507
|
+
if (!stats2)
|
|
92508
|
+
return;
|
|
92509
|
+
stats2.recorded = true;
|
|
92510
|
+
stats2.compressed = codec2 !== "none";
|
|
92511
|
+
stats2.codec = codec2;
|
|
92512
|
+
stats2.uncompressedBytes = uncompressedBytes;
|
|
92513
|
+
stats2.storedBytes = storedBytes;
|
|
92514
|
+
}
|
|
92515
|
+
function selectWriteCodec() {
|
|
92516
|
+
const override = codecOverrideFromEnv();
|
|
92517
|
+
if (override === "gzip")
|
|
92518
|
+
return isGzipAvailable() ? "gzip" : "none";
|
|
92519
|
+
if (isZstdAvailable())
|
|
92520
|
+
return "zstd";
|
|
92521
|
+
if (isGzipAvailable())
|
|
92522
|
+
return "gzip";
|
|
92523
|
+
return "none";
|
|
92524
|
+
}
|
|
92525
|
+
async function compress(data, enabled, stats2) {
|
|
92526
|
+
if (!(data instanceof Uint8Array))
|
|
92527
|
+
return data;
|
|
92528
|
+
if (!enabled || data.length < COMPRESSION_MIN_BYTES || isCompressionDisabledByEnv()) {
|
|
92529
|
+
recordStats(stats2, "none", data.length, data.length);
|
|
92530
|
+
return data;
|
|
92531
|
+
}
|
|
92532
|
+
const codec2 = selectWriteCodec();
|
|
92533
|
+
if (codec2 === "none") {
|
|
92534
|
+
recordStats(stats2, "none", data.length, data.length);
|
|
92535
|
+
return data;
|
|
92536
|
+
}
|
|
92537
|
+
const compressed = codec2 === "zstd" ? zstdBytes(data) : await gzipBytes(data);
|
|
92538
|
+
const format2 = codec2 === "zstd" ? SerializationFormat.ZSTD : SerializationFormat.GZIP;
|
|
92539
|
+
const wrappedLength = 4 + compressed.length;
|
|
92540
|
+
if (wrappedLength >= data.length * (1 - COMPRESSION_MIN_SAVINGS_RATIO)) {
|
|
92541
|
+
recordStats(stats2, "none", data.length, data.length);
|
|
92542
|
+
return data;
|
|
92543
|
+
}
|
|
92544
|
+
recordStats(stats2, codec2, data.length, wrappedLength);
|
|
92545
|
+
return encodeWithFormatPrefix(format2, compressed);
|
|
92546
|
+
}
|
|
92547
|
+
async function decompress$1(data, stats2) {
|
|
92548
|
+
if (!(data instanceof Uint8Array))
|
|
92549
|
+
return data;
|
|
92550
|
+
const prefix = peekFormatPrefix(data);
|
|
92551
|
+
if (prefix === SerializationFormat.ZSTD) {
|
|
92552
|
+
const { payload } = decodeFormatPrefix(data);
|
|
92553
|
+
const inflated = unzstdBytes(payload);
|
|
92554
|
+
recordStats(stats2, "zstd", inflated.length, data.length);
|
|
92555
|
+
return inflated;
|
|
92556
|
+
}
|
|
92557
|
+
if (prefix === SerializationFormat.GZIP) {
|
|
92558
|
+
if (!isGzipAvailable()) {
|
|
92559
|
+
throw new Error("Compressed (gzip) workflow data encountered but DecompressionStream is not available in this runtime. Node.js 18+, browsers, and edge runtimes all support it.");
|
|
92560
|
+
}
|
|
92561
|
+
const { payload } = decodeFormatPrefix(data);
|
|
92562
|
+
const inflated = await gunzipBytes(payload);
|
|
92563
|
+
recordStats(stats2, "gzip", inflated.length, data.length);
|
|
92564
|
+
return inflated;
|
|
92565
|
+
}
|
|
92566
|
+
recordStats(stats2, "none", data.length, data.length);
|
|
92567
|
+
return data;
|
|
92568
|
+
}
|
|
92232
92569
|
async function resolveEncryptionKey(key) {
|
|
92233
92570
|
return typeof key === "function" ? key() : key;
|
|
92234
92571
|
}
|
|
@@ -92287,7 +92624,8 @@ async function serialize$1(value, encryptionKey, options) {
|
|
|
92287
92624
|
try {
|
|
92288
92625
|
const payload = devalueCodec.serialize(value, "client", options);
|
|
92289
92626
|
const prefixed = encodeWithFormatPrefix(SerializationFormat.DEVALUE_V1, payload);
|
|
92290
|
-
|
|
92627
|
+
const compressed = await compress(prefixed, (options == null ? void 0 : options.compression) === true, options == null ? void 0 : options.compressionStats);
|
|
92628
|
+
return encrypt(compressed, encryptionKey);
|
|
92291
92629
|
} catch (error2) {
|
|
92292
92630
|
rethrowIfRuntimeError(error2);
|
|
92293
92631
|
const { message: message2, hint: hint2 } = formatSerializationError("client value", error2);
|
|
@@ -92295,7 +92633,7 @@ async function serialize$1(value, encryptionKey, options) {
|
|
|
92295
92633
|
}
|
|
92296
92634
|
}
|
|
92297
92635
|
async function deserialize$2(data, encryptionKey, options) {
|
|
92298
|
-
const decrypted = await decrypt(data, encryptionKey);
|
|
92636
|
+
const decrypted = await decompress$1(await decrypt(data, encryptionKey), options == null ? void 0 : options.compressionStats);
|
|
92299
92637
|
if (!(decrypted instanceof Uint8Array)) {
|
|
92300
92638
|
if (devalueCodec.deserializeLegacy) {
|
|
92301
92639
|
return devalueCodec.deserializeLegacy(decrypted, "client", options);
|
|
@@ -92312,7 +92650,8 @@ async function serialize(value, encryptionKey, options) {
|
|
|
92312
92650
|
try {
|
|
92313
92651
|
const payload = devalueCodec.serialize(value, "step", options);
|
|
92314
92652
|
const prefixed = encodeWithFormatPrefix(SerializationFormat.DEVALUE_V1, payload);
|
|
92315
|
-
|
|
92653
|
+
const compressed = await compress(prefixed, (options == null ? void 0 : options.compression) === true, options == null ? void 0 : options.compressionStats);
|
|
92654
|
+
return encrypt(compressed, encryptionKey);
|
|
92316
92655
|
} catch (error2) {
|
|
92317
92656
|
rethrowIfRuntimeError(error2);
|
|
92318
92657
|
const { message: message2, hint: hint2 } = formatSerializationError("step value", error2);
|
|
@@ -92320,7 +92659,7 @@ async function serialize(value, encryptionKey, options) {
|
|
|
92320
92659
|
}
|
|
92321
92660
|
}
|
|
92322
92661
|
async function deserialize$1(data, encryptionKey, options) {
|
|
92323
|
-
const decrypted = await decrypt(data, encryptionKey);
|
|
92662
|
+
const decrypted = await decompress$1(await decrypt(data, encryptionKey), options == null ? void 0 : options.compressionStats);
|
|
92324
92663
|
if (!(decrypted instanceof Uint8Array)) {
|
|
92325
92664
|
if (devalueCodec.deserializeLegacy) {
|
|
92326
92665
|
return devalueCodec.deserializeLegacy(decrypted, "step", options);
|
|
@@ -92446,6 +92785,26 @@ function unwrapSerializationCause(error2) {
|
|
|
92446
92785
|
}
|
|
92447
92786
|
return error2;
|
|
92448
92787
|
}
|
|
92788
|
+
async function recordCompression(stats2, operation) {
|
|
92789
|
+
if (!stats2.recorded)
|
|
92790
|
+
return;
|
|
92791
|
+
try {
|
|
92792
|
+
const span = await getActiveSpan();
|
|
92793
|
+
if (!span)
|
|
92794
|
+
return;
|
|
92795
|
+
const uncompressedBytes = stats2.uncompressedBytes ?? 0;
|
|
92796
|
+
const storedBytes = stats2.storedBytes ?? 0;
|
|
92797
|
+
span.setAttributes({
|
|
92798
|
+
...SerializationOperation(operation),
|
|
92799
|
+
...SerializationCompressed(stats2.compressed ?? false),
|
|
92800
|
+
...SerializationCodec(stats2.codec ?? "none"),
|
|
92801
|
+
...SerializationUncompressedBytes(uncompressedBytes),
|
|
92802
|
+
...SerializationStoredBytes(storedBytes),
|
|
92803
|
+
...stats2.compressed && uncompressedBytes > 0 ? SerializationCompressionRatio(1 - storedBytes / uncompressedBytes) : {}
|
|
92804
|
+
});
|
|
92805
|
+
} catch {
|
|
92806
|
+
}
|
|
92807
|
+
}
|
|
92449
92808
|
function getSerializeStream(reducers, cryptoKey) {
|
|
92450
92809
|
const encoder2 = new TextEncoder();
|
|
92451
92810
|
const keyState = { resolved: false, key: void 0 };
|
|
@@ -93618,16 +93977,21 @@ function getStepRevivers(global2 = globalThis, ops, runId, cryptoKey, deployment
|
|
|
93618
93977
|
async function maybeDecrypt(data, key) {
|
|
93619
93978
|
return decrypt(data, key);
|
|
93620
93979
|
}
|
|
93621
|
-
async function dehydrateWorkflowArguments(value, runId, key, ops = [], global2 = globalThis, v1Compat = false, framedByteStreams = false) {
|
|
93980
|
+
async function dehydrateWorkflowArguments(value, runId, key, ops = [], global2 = globalThis, v1Compat = false, framedByteStreams = false, compression = false) {
|
|
93622
93981
|
if (v1Compat) {
|
|
93623
93982
|
const str = stringify$2(value, getExternalReducers(global2, ops, runId, key, framedByteStreams));
|
|
93624
93983
|
return revive(str);
|
|
93625
93984
|
}
|
|
93626
93985
|
try {
|
|
93627
|
-
|
|
93986
|
+
const compressionStats = {};
|
|
93987
|
+
const result = await serialize$1(value, key, {
|
|
93628
93988
|
global: global2,
|
|
93629
|
-
extraReducers: getStreamAndRequestReducers(getExternalReducers(global2, ops, runId, key, framedByteStreams))
|
|
93989
|
+
extraReducers: getStreamAndRequestReducers(getExternalReducers(global2, ops, runId, key, framedByteStreams)),
|
|
93990
|
+
compression,
|
|
93991
|
+
compressionStats
|
|
93630
93992
|
});
|
|
93993
|
+
await recordCompression(compressionStats, "serialize");
|
|
93994
|
+
return result;
|
|
93631
93995
|
} catch (error2) {
|
|
93632
93996
|
const cause = unwrapSerializationCause(error2);
|
|
93633
93997
|
const { message: message2, hint: hint2 } = formatSerializationError("workflow arguments", cause);
|
|
@@ -93635,7 +93999,10 @@ async function dehydrateWorkflowArguments(value, runId, key, ops = [], global2 =
|
|
|
93635
93999
|
}
|
|
93636
94000
|
}
|
|
93637
94001
|
async function hydrateWorkflowArguments(value, _runId, key, global2 = globalThis, extraRevivers = {}) {
|
|
93638
|
-
|
|
94002
|
+
const compressionStats = {};
|
|
94003
|
+
const inflated = await decompress$1(await maybeDecrypt(value, key), compressionStats);
|
|
94004
|
+
await recordCompression(compressionStats, "deserialize");
|
|
94005
|
+
return deserialize(inflated, {
|
|
93639
94006
|
global: global2,
|
|
93640
94007
|
extraRevivers: {
|
|
93641
94008
|
...getStreamAndRequestRevivers(getWorkflowRevivers(global2)),
|
|
@@ -93644,24 +94011,33 @@ async function hydrateWorkflowArguments(value, _runId, key, global2 = globalThis
|
|
|
93644
94011
|
});
|
|
93645
94012
|
}
|
|
93646
94013
|
async function hydrateWorkflowReturnValue(value, runId, key, ops = [], global2 = globalThis, extraRevivers = {}) {
|
|
93647
|
-
|
|
94014
|
+
const compressionStats = {};
|
|
94015
|
+
const result = await deserialize$2(value, key, {
|
|
93648
94016
|
global: global2,
|
|
93649
94017
|
extraRevivers: {
|
|
93650
94018
|
...getStreamAndRequestRevivers(getExternalRevivers(global2, ops, runId, key)),
|
|
93651
94019
|
...extraRevivers
|
|
93652
|
-
}
|
|
94020
|
+
},
|
|
94021
|
+
compressionStats
|
|
93653
94022
|
});
|
|
94023
|
+
await recordCompression(compressionStats, "deserialize");
|
|
94024
|
+
return result;
|
|
93654
94025
|
}
|
|
93655
|
-
async function dehydrateStepArguments(value, _runId, key, global2 = globalThis, v1Compat = false) {
|
|
94026
|
+
async function dehydrateStepArguments(value, _runId, key, global2 = globalThis, v1Compat = false, compression = false) {
|
|
93656
94027
|
if (v1Compat) {
|
|
93657
94028
|
const str = stringify$2(value, getWorkflowReducers(global2));
|
|
93658
94029
|
return revive(str);
|
|
93659
94030
|
}
|
|
93660
94031
|
try {
|
|
93661
|
-
|
|
94032
|
+
const compressionStats = {};
|
|
94033
|
+
const result = await serialize(value, key, {
|
|
93662
94034
|
global: global2,
|
|
93663
|
-
extraReducers: getStreamAndRequestReducers(getWorkflowReducers(global2))
|
|
94035
|
+
extraReducers: getStreamAndRequestReducers(getWorkflowReducers(global2)),
|
|
94036
|
+
compression,
|
|
94037
|
+
compressionStats
|
|
93664
94038
|
});
|
|
94039
|
+
await recordCompression(compressionStats, "serialize");
|
|
94040
|
+
return result;
|
|
93665
94041
|
} catch (error2) {
|
|
93666
94042
|
const cause = unwrapSerializationCause(error2);
|
|
93667
94043
|
const { message: message2, hint: hint2 } = formatSerializationError("step arguments", cause);
|
|
@@ -93669,24 +94045,33 @@ async function dehydrateStepArguments(value, _runId, key, global2 = globalThis,
|
|
|
93669
94045
|
}
|
|
93670
94046
|
}
|
|
93671
94047
|
async function hydrateStepArguments(value, runId, key, ops = [], global2 = globalThis, extraRevivers = {}, deploymentId) {
|
|
93672
|
-
|
|
94048
|
+
const compressionStats = {};
|
|
94049
|
+
const result = await deserialize$1(value, key, {
|
|
93673
94050
|
global: global2,
|
|
93674
94051
|
extraRevivers: {
|
|
93675
94052
|
...getStreamAndRequestRevivers(getStepRevivers(global2, ops, runId, key, deploymentId)),
|
|
93676
94053
|
...extraRevivers
|
|
93677
|
-
}
|
|
94054
|
+
},
|
|
94055
|
+
compressionStats
|
|
93678
94056
|
});
|
|
94057
|
+
await recordCompression(compressionStats, "deserialize");
|
|
94058
|
+
return result;
|
|
93679
94059
|
}
|
|
93680
|
-
async function dehydrateStepReturnValue(value, runId, key, ops = [], global2 = globalThis, v1Compat = false, framedByteStreams = false) {
|
|
94060
|
+
async function dehydrateStepReturnValue(value, runId, key, ops = [], global2 = globalThis, v1Compat = false, framedByteStreams = false, compression = false) {
|
|
93681
94061
|
if (v1Compat) {
|
|
93682
94062
|
const str = stringify$2(value, getStepReducers(global2, ops, runId, key, framedByteStreams));
|
|
93683
94063
|
return revive(str);
|
|
93684
94064
|
}
|
|
93685
94065
|
try {
|
|
93686
|
-
|
|
94066
|
+
const compressionStats = {};
|
|
94067
|
+
const result = await serialize(value, key, {
|
|
93687
94068
|
global: global2,
|
|
93688
|
-
extraReducers: getStreamAndRequestReducers(getStepReducers(global2, ops, runId, key, framedByteStreams))
|
|
94069
|
+
extraReducers: getStreamAndRequestReducers(getStepReducers(global2, ops, runId, key, framedByteStreams)),
|
|
94070
|
+
compression,
|
|
94071
|
+
compressionStats
|
|
93689
94072
|
});
|
|
94073
|
+
await recordCompression(compressionStats, "serialize");
|
|
94074
|
+
return result;
|
|
93690
94075
|
} catch (error2) {
|
|
93691
94076
|
const cause = unwrapSerializationCause(error2);
|
|
93692
94077
|
const { message: message2, hint: hint2 } = formatSerializationError("step return value", cause);
|
|
@@ -93694,7 +94079,9 @@ async function dehydrateStepReturnValue(value, runId, key, ops = [], global2 = g
|
|
|
93694
94079
|
}
|
|
93695
94080
|
}
|
|
93696
94081
|
async function hydrateRunError(value, runId, key, ops = [], global2 = globalThis, extraRevivers = {}) {
|
|
93697
|
-
const
|
|
94082
|
+
const compressionStats = {};
|
|
94083
|
+
const decrypted = await decompress$1(await maybeDecrypt(value, key), compressionStats);
|
|
94084
|
+
await recordCompression(compressionStats, "deserialize");
|
|
93698
94085
|
if (!(decrypted instanceof Uint8Array)) {
|
|
93699
94086
|
return unflatten(decrypted, {
|
|
93700
94087
|
...getExternalRevivers(global2, ops, runId, key),
|
|
@@ -121751,7 +122138,7 @@ function createLocalWorld(args) {
|
|
|
121751
122138
|
const basedir = mergedConfig.dataDir;
|
|
121752
122139
|
const hooksDir = path$3.join(basedir, "hooks");
|
|
121753
122140
|
const taggedHookFiles = await listTaggedFiles(hooksDir, tag);
|
|
121754
|
-
const { HookSchema: HookSchema2 } = await import("./index-
|
|
122141
|
+
const { HookSchema: HookSchema2 } = await import("./index-CjQDTwmY.js");
|
|
121755
122142
|
await Promise.all(taggedHookFiles.map(async (hookFile) => {
|
|
121756
122143
|
const hook = await readJSON(path$3.join(hooksDir, hookFile), HookSchema2);
|
|
121757
122144
|
if (hook == null ? void 0 : hook.token) {
|
|
@@ -121904,8 +122291,8 @@ function requireGetVercelOidcToken() {
|
|
|
121904
122291
|
}
|
|
121905
122292
|
try {
|
|
121906
122293
|
const [{ getTokenPayload, isExpired }, { refreshToken }] = await Promise.all([
|
|
121907
|
-
await import("./token-util-
|
|
121908
|
-
await import("./token-
|
|
122294
|
+
await import("./token-util-bxOuz2AK.js").then((n) => n.t),
|
|
122295
|
+
await import("./token-BuB8DbpT.js").then((n) => n.t)
|
|
121909
122296
|
]);
|
|
121910
122297
|
if (!token || isExpired(getTokenPayload(token), options == null ? void 0 : options.expirationBufferMs)) {
|
|
121911
122298
|
await refreshToken(options);
|
|
@@ -127190,7 +127577,7 @@ var QueueClient = class {
|
|
|
127190
127577
|
setApi(this, new ApiClient({ ...options, region }));
|
|
127191
127578
|
}
|
|
127192
127579
|
};
|
|
127193
|
-
const version = "5.0.0-beta.
|
|
127580
|
+
const version = "5.0.0-beta.18";
|
|
127194
127581
|
const HTTP_DEBUG_ENABLED = typeof process !== "undefined" && typeof process.env.DEBUG === "string" && (process.env.DEBUG.includes("workflow:") || process.env.DEBUG === "*");
|
|
127195
127582
|
function httpLog(method, endpoint, response2, ms2) {
|
|
127196
127583
|
if (HTTP_DEBUG_ENABLED) {
|
|
@@ -127934,11 +128321,14 @@ async function consumeListFrameStream(url2, headers2, config2, opName) {
|
|
|
127934
128321
|
const chunks = response2.body;
|
|
127935
128322
|
const events2 = [];
|
|
127936
128323
|
let next2;
|
|
128324
|
+
let hasMore;
|
|
127937
128325
|
let sawEndSentinel = false;
|
|
127938
128326
|
for await (const frame2 of decodeFrames(chunks)) {
|
|
127939
128327
|
if (frame2.meta._end === 1) {
|
|
127940
128328
|
if (typeof frame2.meta.next === "string")
|
|
127941
128329
|
next2 = frame2.meta.next;
|
|
128330
|
+
if (typeof frame2.meta.hasMore === "boolean")
|
|
128331
|
+
hasMore = frame2.meta.hasMore;
|
|
127942
128332
|
sawEndSentinel = true;
|
|
127943
128333
|
break;
|
|
127944
128334
|
}
|
|
@@ -127950,16 +128340,26 @@ async function consumeListFrameStream(url2, headers2, config2, opName) {
|
|
|
127950
128340
|
if (!sawEndSentinel) {
|
|
127951
128341
|
throw new Error(`v4 ${opName}: frame stream ended without the end-of-stream sentinel (${events2.length} events read) — truncated response?`);
|
|
127952
128342
|
}
|
|
127953
|
-
return {
|
|
128343
|
+
return {
|
|
128344
|
+
events: events2,
|
|
128345
|
+
...next2 ? { next: next2 } : {},
|
|
128346
|
+
...hasMore !== void 0 ? { hasMore } : {}
|
|
128347
|
+
};
|
|
127954
128348
|
}
|
|
127955
|
-
function
|
|
127956
|
-
const sp = new URLSearchParams();
|
|
128349
|
+
function appendListParams(sp, params) {
|
|
127957
128350
|
if (params.cursor)
|
|
127958
128351
|
sp.set("cursor", params.cursor);
|
|
127959
128352
|
if (params.limit !== void 0)
|
|
127960
128353
|
sp.set("limit", String(params.limit));
|
|
127961
128354
|
if (params.sortOrder)
|
|
127962
128355
|
sp.set("sortOrder", params.sortOrder);
|
|
128356
|
+
if (params.remoteRefBehavior) {
|
|
128357
|
+
sp.set("remoteRefBehavior", params.remoteRefBehavior);
|
|
128358
|
+
}
|
|
128359
|
+
}
|
|
128360
|
+
function paginationToQuery(params) {
|
|
128361
|
+
const sp = new URLSearchParams();
|
|
128362
|
+
appendListParams(sp, params);
|
|
127963
128363
|
const qs = sp.toString();
|
|
127964
128364
|
return qs ? `?${qs}` : "";
|
|
127965
128365
|
}
|
|
@@ -127972,12 +128372,7 @@ async function getEventsByCorrelationIdV4(correlationId, params = {}, config2) {
|
|
|
127972
128372
|
const { baseUrl, headers: headers2 } = await getHttpConfig(config2);
|
|
127973
128373
|
const sp = new URLSearchParams();
|
|
127974
128374
|
sp.set("correlationId", correlationId);
|
|
127975
|
-
|
|
127976
|
-
sp.set("cursor", params.cursor);
|
|
127977
|
-
if (params.limit !== void 0)
|
|
127978
|
-
sp.set("limit", String(params.limit));
|
|
127979
|
-
if (params.sortOrder)
|
|
127980
|
-
sp.set("sortOrder", params.sortOrder);
|
|
128375
|
+
appendListParams(sp, params);
|
|
127981
128376
|
const url2 = `${baseUrl}/v4/events?${sp.toString()}`;
|
|
127982
128377
|
return consumeListFrameStream(url2, headers2, config2, "listEventsByCorrelationId");
|
|
127983
128378
|
}
|
|
@@ -128333,14 +128728,19 @@ async function getWorkflowRunEvents(params, config2) {
|
|
|
128333
128728
|
const wirePagination = {
|
|
128334
128729
|
cursor: (pagination == null ? void 0 : pagination.cursor) ?? void 0,
|
|
128335
128730
|
limit: pagination == null ? void 0 : pagination.limit,
|
|
128336
|
-
sortOrder: pagination == null ? void 0 : pagination.sortOrder
|
|
128731
|
+
sortOrder: pagination == null ? void 0 : pagination.sortOrder,
|
|
128732
|
+
remoteRefBehavior: resolveData === "none" ? "lazy" : "resolve"
|
|
128337
128733
|
};
|
|
128338
128734
|
const result = await ("correlationId" in params ? getEventsByCorrelationIdV4(params.correlationId, wirePagination, config2) : getWorkflowRunEventsV4(params.runId, wirePagination, config2));
|
|
128339
128735
|
const events2 = result.events.map((listed) => buildEventFromV4(listed.event, listed.body, resolveData));
|
|
128340
128736
|
return {
|
|
128341
128737
|
data: events2,
|
|
128738
|
+
// `next` is present even on the final page (it's the incremental-load
|
|
128739
|
+
// resume cursor), so prefer the server's explicit `hasMore`. The
|
|
128740
|
+
// `Boolean(next)` fallback covers older servers that don't emit it —
|
|
128741
|
+
// at the cost of one extra empty-page request per load.
|
|
128342
128742
|
cursor: result.next ?? null,
|
|
128343
|
-
hasMore: Boolean(result.next)
|
|
128743
|
+
hasMore: typeof result.hasMore === "boolean" ? result.hasMore : Boolean(result.next)
|
|
128344
128744
|
};
|
|
128345
128745
|
}
|
|
128346
128746
|
async function createWorkflowRunEvent(id2, data, params, config2) {
|
|
@@ -128664,11 +129064,14 @@ function createVercelWorld(config2) {
|
|
|
128664
129064
|
var _a3, _b2;
|
|
128665
129065
|
const projectId = ((_a3 = config2 == null ? void 0 : config2.projectConfig) == null ? void 0 : _a3.projectId) || process.env.VERCEL_PROJECT_ID;
|
|
128666
129066
|
return {
|
|
128667
|
-
// Spec
|
|
128668
|
-
//
|
|
128669
|
-
//
|
|
128670
|
-
//
|
|
128671
|
-
|
|
129067
|
+
// Spec v5: new runs may carry gzip-compressed payloads (compression is
|
|
129068
|
+
// entirely client-side — the workflow-server stores payloads opaquely
|
|
129069
|
+
// via RemoteRef and never deserializes them). Spec 5 is a superset of
|
|
129070
|
+
// spec 4, so native `attr_set` events and initial run attributes still
|
|
129071
|
+
// work. New runs are stamped with this version; the server must support
|
|
129072
|
+
// at least it — workflow-server declared spec-5 support in
|
|
129073
|
+
// vercel/workflow-server#520.
|
|
129074
|
+
specVersion: SPEC_VERSION_SUPPORTS_COMPRESSION,
|
|
128672
129075
|
// On Vercel the platform fails the function invocation when the
|
|
128673
129076
|
// process exits non-zero, and VQS redelivers the queue message via a
|
|
128674
129077
|
// fresh invocation. The core runtime uses this to decide whether
|
|
@@ -131406,7 +131809,15 @@ function requireSemver() {
|
|
|
131406
131809
|
var semverExports = requireSemver();
|
|
131407
131810
|
const semver = /* @__PURE__ */ getDefaultExportFromCjs(semverExports);
|
|
131408
131811
|
const FORMAT_VERSION_TABLE = [
|
|
131409
|
-
{ format: SerializationFormat.ENCRYPTED, minVersion: "4.2.0-beta.64" }
|
|
131812
|
+
{ format: SerializationFormat.ENCRYPTED, minVersion: "4.2.0-beta.64" },
|
|
131813
|
+
// TODO(release): verify this matches the actual version that ships payload
|
|
131814
|
+
// compression. If a "Version Packages (beta)" PR merges before this change,
|
|
131815
|
+
// bump to the next beta. A too-low cutoff makes new producers write
|
|
131816
|
+
// compressed payloads to consumers that cannot decompress them; too-high
|
|
131817
|
+
// merely delays the optimization (safe). gzip and zstd ship together, so
|
|
131818
|
+
// they share a min version — a run that can read one can read both.
|
|
131819
|
+
{ format: SerializationFormat.GZIP, minVersion: "5.0.0-beta.18" },
|
|
131820
|
+
{ format: SerializationFormat.ZSTD, minVersion: "5.0.0-beta.18" }
|
|
131410
131821
|
// Future entries:
|
|
131411
131822
|
// { format: SerializationFormat.CBOR, minVersion: '5.x.y' },
|
|
131412
131823
|
// { format: SerializationFormat.ENCRYPTED_V2, minVersion: '5.x.y' },
|
|
@@ -131489,9 +131900,10 @@ async function resumeHook$2(tokenOrHook, payload, encryptionKeyOverride) {
|
|
|
131489
131900
|
if (!capabilities.supportedFormats.has(SerializationFormat.ENCRYPTED)) {
|
|
131490
131901
|
encryptionKey = void 0;
|
|
131491
131902
|
}
|
|
131903
|
+
const compression = (workflowRun.specVersion ?? 0) >= SPEC_VERSION_SUPPORTS_COMPRESSION && capabilities.supportedFormats.has(SerializationFormat.GZIP);
|
|
131492
131904
|
const ops = [];
|
|
131493
131905
|
const v1Compat = isLegacySpecVersion(hook.specVersion);
|
|
131494
|
-
const dehydratedPayload = await dehydrateStepReturnValue(payload, hook.runId, encryptionKey, ops, globalThis, v1Compat, capabilities.framedByteStreams);
|
|
131906
|
+
const dehydratedPayload = await dehydrateStepReturnValue(payload, hook.runId, encryptionKey, ops, globalThis, v1Compat, capabilities.framedByteStreams, compression);
|
|
131495
131907
|
safeWaitUntil(Promise.all(ops), (err) => {
|
|
131496
131908
|
if (err === void 0)
|
|
131497
131909
|
return;
|
|
@@ -131601,6 +132013,7 @@ function normalizeAttributeChanges(attrs, options = {}) {
|
|
|
131601
132013
|
}
|
|
131602
132014
|
const CROSS_DEPLOYMENT_CAPABILITY_PROBE_TIMEOUT_MS = 2e3;
|
|
131603
132015
|
const ulid = monotonicFactory();
|
|
132016
|
+
let hasWarnedLatestNoOp = false;
|
|
131604
132017
|
async function start$1(workflow, argsOrOptions, options) {
|
|
131605
132018
|
"use step";
|
|
131606
132019
|
return await waitedUntil(() => {
|
|
@@ -131629,22 +132042,32 @@ async function start$1(workflow, argsOrOptions, options) {
|
|
|
131629
132042
|
const currentDeploymentId = await world.getDeploymentId();
|
|
131630
132043
|
let deploymentId = opts.deploymentId ?? currentDeploymentId;
|
|
131631
132044
|
if (deploymentId === "latest") {
|
|
131632
|
-
if (
|
|
131633
|
-
|
|
132045
|
+
if (world.resolveLatestDeploymentId) {
|
|
132046
|
+
deploymentId = await world.resolveLatestDeploymentId();
|
|
132047
|
+
} else {
|
|
132048
|
+
if (!hasWarnedLatestNoOp) {
|
|
132049
|
+
hasWarnedLatestNoOp = true;
|
|
132050
|
+
runtimeLogger.warn("deploymentId: 'latest' has no effect in this world and was ignored. It is only supported by worlds with atomic deployments, such as Vercel. The run will target the current deployment.", { currentDeploymentId });
|
|
132051
|
+
}
|
|
132052
|
+
deploymentId = currentDeploymentId;
|
|
131634
132053
|
}
|
|
131635
|
-
deploymentId = await world.resolveLatestDeploymentId();
|
|
131636
132054
|
}
|
|
131637
132055
|
let framedByteStreams;
|
|
132056
|
+
let targetSupportsCompression;
|
|
131638
132057
|
if (deploymentId === currentDeploymentId) {
|
|
131639
132058
|
framedByteStreams = true;
|
|
132059
|
+
targetSupportsCompression = true;
|
|
131640
132060
|
} else if (typeof ((_a3 = world.streams) == null ? void 0 : _a3.get) !== "function") {
|
|
131641
132061
|
framedByteStreams = false;
|
|
132062
|
+
targetSupportsCompression = false;
|
|
131642
132063
|
} else {
|
|
131643
132064
|
const probe = await healthCheck(world, "workflow", {
|
|
131644
132065
|
deploymentId,
|
|
131645
132066
|
timeout: CROSS_DEPLOYMENT_CAPABILITY_PROBE_TIMEOUT_MS
|
|
131646
132067
|
}).catch(() => void 0);
|
|
131647
|
-
|
|
132068
|
+
const capabilities = getRunCapabilities(probe == null ? void 0 : probe.workflowCoreVersion);
|
|
132069
|
+
framedByteStreams = capabilities.framedByteStreams;
|
|
132070
|
+
targetSupportsCompression = capabilities.supportedFormats.has(SerializationFormat.GZIP);
|
|
131648
132071
|
}
|
|
131649
132072
|
const ops = [];
|
|
131650
132073
|
const runId = `wrun_${ulid()}`;
|
|
@@ -131676,7 +132099,8 @@ async function start$1(workflow, argsOrOptions, options) {
|
|
|
131676
132099
|
deploymentId
|
|
131677
132100
|
}));
|
|
131678
132101
|
const encryptionKey = rawKey ? await importKey(rawKey) : void 0;
|
|
131679
|
-
const
|
|
132102
|
+
const compression = targetSupportsCompression && specVersion >= SPEC_VERSION_SUPPORTS_COMPRESSION;
|
|
132103
|
+
const workflowArguments = await dehydrateWorkflowArguments(args, runId, encryptionKey, ops, globalThis, v1Compat, framedByteStreams, compression);
|
|
131680
132104
|
const executionContext = {
|
|
131681
132105
|
traceCarrier,
|
|
131682
132106
|
workflowCoreVersion: version$1,
|
|
@@ -153833,7 +154257,7 @@ const route4 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProper
|
|
|
153833
154257
|
__proto__: null,
|
|
153834
154258
|
loader
|
|
153835
154259
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
153836
|
-
const serverManifest = { "entry": { "module": "/assets/entry.client-DOJDY_4b.js", "imports": ["/assets/index-BXZSIDEp.js"], "css": [] }, "routes": { "root": { "id": "root", "parentId": void 0, "path": "", "index": void 0, "caseSensitive": void 0, "hasAction": true, "hasLoader": true, "hasClientAction": false, "hasClientLoader": false, "hasClientMiddleware": false, "hasDefaultExport": true, "hasErrorBoundary": true, "module": "/assets/root-
|
|
154260
|
+
const serverManifest = { "entry": { "module": "/assets/entry.client-DOJDY_4b.js", "imports": ["/assets/index-BXZSIDEp.js"], "css": [] }, "routes": { "root": { "id": "root", "parentId": void 0, "path": "", "index": void 0, "caseSensitive": void 0, "hasAction": true, "hasLoader": true, "hasClientAction": false, "hasClientLoader": false, "hasClientMiddleware": false, "hasDefaultExport": true, "hasErrorBoundary": true, "module": "/assets/root-YgrrwLRm.js", "imports": ["/assets/index-BXZSIDEp.js", "/assets/mermaid-3ZIDBTTL-CO5WTIpO.js"], "css": ["/assets/root-1hd8ZXAx.css", "/assets/mermaid-3ZIDBTTL-DYmT7Gxj.css"], "clientActionModule": void 0, "clientLoaderModule": void 0, "clientMiddlewareModule": void 0, "hydrateFallbackModule": void 0 }, "routes/home": { "id": "routes/home", "parentId": "root", "path": void 0, "index": true, "caseSensitive": void 0, "hasAction": false, "hasLoader": false, "hasClientAction": false, "hasClientLoader": false, "hasClientMiddleware": false, "hasDefaultExport": true, "hasErrorBoundary": false, "module": "/assets/home-CJauHJtz.js", "imports": ["/assets/index-BXZSIDEp.js", "/assets/workflow-graph-viewer-DE9gHUqH.js", "/assets/mermaid-3ZIDBTTL-CO5WTIpO.js", "/assets/index-B6-SzLmT.js"], "css": ["/assets/workflow-graph-viewer-DnlNuQQH.css", "/assets/mermaid-3ZIDBTTL-DYmT7Gxj.css"], "clientActionModule": void 0, "clientLoaderModule": void 0, "clientMiddlewareModule": void 0, "hydrateFallbackModule": void 0 }, "routes/run-detail": { "id": "routes/run-detail", "parentId": "root", "path": "run/:runId", "index": void 0, "caseSensitive": void 0, "hasAction": false, "hasLoader": false, "hasClientAction": false, "hasClientLoader": false, "hasClientMiddleware": false, "hasDefaultExport": true, "hasErrorBoundary": false, "module": "/assets/run-detail-QryL_6ec.js", "imports": ["/assets/index-BXZSIDEp.js", "/assets/workflow-graph-viewer-DE9gHUqH.js", "/assets/mermaid-3ZIDBTTL-CO5WTIpO.js", "/assets/encryption-g14N5vQl.js", "/assets/index-B6-SzLmT.js"], "css": ["/assets/workflow-graph-viewer-DnlNuQQH.css", "/assets/mermaid-3ZIDBTTL-DYmT7Gxj.css"], "clientActionModule": void 0, "clientLoaderModule": void 0, "clientMiddlewareModule": void 0, "hydrateFallbackModule": void 0 }, "routes/api.rpc": { "id": "routes/api.rpc", "parentId": "root", "path": "api/rpc", "index": void 0, "caseSensitive": void 0, "hasAction": true, "hasLoader": true, "hasClientAction": false, "hasClientLoader": false, "hasClientMiddleware": false, "hasDefaultExport": false, "hasErrorBoundary": false, "module": "/assets/api.rpc-l0sNRNKZ.js", "imports": [], "css": [], "clientActionModule": void 0, "clientLoaderModule": void 0, "clientMiddlewareModule": void 0, "hydrateFallbackModule": void 0 }, "routes/api.stream.$streamId": { "id": "routes/api.stream.$streamId", "parentId": "root", "path": "api/stream/:streamId", "index": void 0, "caseSensitive": void 0, "hasAction": false, "hasLoader": true, "hasClientAction": false, "hasClientLoader": false, "hasClientMiddleware": false, "hasDefaultExport": false, "hasErrorBoundary": false, "module": "/assets/api.stream._streamId-l0sNRNKZ.js", "imports": [], "css": [], "clientActionModule": void 0, "clientLoaderModule": void 0, "clientMiddlewareModule": void 0, "hydrateFallbackModule": void 0 } }, "url": "/assets/manifest-41c15b7c.js", "version": "41c15b7c", "sri": void 0 };
|
|
153837
154261
|
const assetsBuildDirectory = "build/client";
|
|
153838
154262
|
const basename = "/";
|
|
153839
154263
|
const future = { "unstable_optimizeDeps": false, "unstable_subResourceIntegrity": false, "unstable_trailingSlashAwareDataRequests": false, "unstable_previewServerPrerendering": false, "v8_middleware": false, "v8_splitRouteModules": false, "v8_viteEnvironmentApi": false };
|
|
@@ -153902,39 +154326,41 @@ const serverBuild = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineP
|
|
|
153902
154326
|
ssr
|
|
153903
154327
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
153904
154328
|
export {
|
|
153905
|
-
|
|
154329
|
+
Ks as $,
|
|
153906
154330
|
ATTRIBUTE_KEY_MAX_LENGTH as A,
|
|
153907
154331
|
BaseEventSchema as B,
|
|
153908
|
-
|
|
154332
|
+
getQueueTopicPrefix as C,
|
|
153909
154333
|
DEFAULT_TIMESTAMP_THRESHOLD_FUTURE_MS as D,
|
|
153910
154334
|
EVENT_DATA_REF_FIELDS as E,
|
|
153911
|
-
|
|
153912
|
-
|
|
154335
|
+
isLegacySpecVersion as F,
|
|
154336
|
+
parseQueueName as G,
|
|
153913
154337
|
HookSchema as H,
|
|
153914
|
-
|
|
153915
|
-
|
|
153916
|
-
|
|
154338
|
+
reenqueueActiveRuns as I,
|
|
154339
|
+
requiresNewerWorld as J,
|
|
154340
|
+
resolveQueueNamespace as K,
|
|
153917
154341
|
LegacySerializedDataSchemaV1 as L,
|
|
153918
154342
|
MessageId as M,
|
|
153919
154343
|
Nt as N,
|
|
153920
|
-
|
|
154344
|
+
stripEventDataRefs as O,
|
|
153921
154345
|
PaginatedResponseSchema as P,
|
|
153922
154346
|
QueuePayloadSchema as Q,
|
|
153923
154347
|
RESERVED_ATTRIBUTE_KEY_PREFIX as R,
|
|
153924
154348
|
SPEC_VERSION_CURRENT as S,
|
|
153925
|
-
|
|
153926
|
-
|
|
154349
|
+
ulidToDate as T,
|
|
154350
|
+
validateAttributeChanges as U,
|
|
153927
154351
|
ValidQueueName as V,
|
|
153928
154352
|
WaitSchema as W,
|
|
153929
|
-
|
|
153930
|
-
|
|
153931
|
-
|
|
153932
|
-
|
|
154353
|
+
validateAttributeKey as X,
|
|
154354
|
+
validateAttributeValue as Y,
|
|
154355
|
+
validateUlidTimestamp as Z,
|
|
154356
|
+
R as _,
|
|
153933
154357
|
ATTRIBUTE_MAX_PER_RUN as a,
|
|
153934
|
-
|
|
153935
|
-
|
|
153936
|
-
|
|
153937
|
-
|
|
154358
|
+
jsxRuntimeExports as a0,
|
|
154359
|
+
Qe as a1,
|
|
154360
|
+
registerZstdDecoder as a2,
|
|
154361
|
+
requireTokenUtil as a3,
|
|
154362
|
+
requireTokenError as a4,
|
|
154363
|
+
serverBuild as a5,
|
|
153938
154364
|
ATTRIBUTE_VALUE_MAX_BYTES as b,
|
|
153939
154365
|
AttributeChangeSchema as c,
|
|
153940
154366
|
AttributeChangesSchema as d,
|
|
@@ -153948,16 +154374,16 @@ export {
|
|
|
153948
154374
|
SPEC_VERSION_LEGACY as l,
|
|
153949
154375
|
SPEC_VERSION_SUPPORTS_ATTRIBUTES as m,
|
|
153950
154376
|
SPEC_VERSION_SUPPORTS_CBOR_QUEUE_TRANSPORT as n,
|
|
153951
|
-
|
|
153952
|
-
|
|
153953
|
-
|
|
153954
|
-
|
|
153955
|
-
|
|
153956
|
-
|
|
153957
|
-
|
|
153958
|
-
|
|
153959
|
-
|
|
153960
|
-
|
|
153961
|
-
|
|
153962
|
-
|
|
154377
|
+
SPEC_VERSION_SUPPORTS_COMPRESSION as o,
|
|
154378
|
+
SPEC_VERSION_SUPPORTS_EVENT_SOURCING as p,
|
|
154379
|
+
SerializedDataSchema as q,
|
|
154380
|
+
StepInvokePayloadSchema as r,
|
|
154381
|
+
StepSchema as s,
|
|
154382
|
+
StepStatusSchema as t,
|
|
154383
|
+
WaitStatusSchema as u,
|
|
154384
|
+
WorkflowInvokePayloadSchema as v,
|
|
154385
|
+
WorkflowRunBaseSchema as w,
|
|
154386
|
+
WorkflowRunSchema as x,
|
|
154387
|
+
WorkflowRunStatusSchema as y,
|
|
154388
|
+
applyAttributeChanges as z
|
|
153963
154389
|
};
|