@workflow/web 5.0.0-beta.41 → 5.0.0-beta.42
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/app-9JVnf-IU.css +1 -0
- package/build/client/assets/{arrow-up-right-jWH-UQH9.js → arrow-up-right-D39pnGsD.js} +1 -1
- package/build/client/assets/{highlighted-body-B3W2YXNL-DmmWu7VM.js → highlighted-body-B3W2YXNL-Dc1dLaUr.js} +1 -1
- package/build/client/assets/{home-BwYHJJJr.js → home-C6CuMqQu.js} +3 -3
- package/build/client/assets/{loader-circle-fFQM94Ej.js → loader-circle-BOxaTUjK.js} +1 -1
- package/build/client/assets/{manifest-f6a9dca2.js → manifest-cf88886b.js} +1 -1
- package/build/client/assets/{mermaid-3ZIDBTTL-DchhEfRL.js → mermaid-3ZIDBTTL-gEw-Ch1C.js} +308 -284
- package/build/client/assets/{root-D6p4Hb4F.js → root-BfhMCbkz.js} +3 -3
- package/build/client/assets/root-Bl5xphvU.css +1 -0
- package/build/client/assets/{run-detail-vPCbZIXx.js → run-detail-DKz7lp2q.js} +221 -105
- package/build/client/assets/{workflow-graph-viewer-t_fSwuwz.js → workflow-graph-viewer-CxrWityD.js} +3 -145
- package/build/client/assets/{zstd-browser-decoder-BTw1glGN.js → zstd-browser-decoder-CAEVa0bm.js} +1 -1
- package/build/server/assets/{app-D8GiFFR6.js → app-SrggQnfh.js} +739 -608
- package/build/server/assets/{highlighted-body-B3W2YXNL-BZVc2guG.js → highlighted-body-B3W2YXNL-DMhwZQgG.js} +1 -1
- package/build/server/assets/{index-DTci39F3.js → index-ByPjQpgH.js} +1 -1
- package/build/server/assets/index-DsnQrgwB.js +156 -0
- package/build/server/assets/{mermaid-3ZIDBTTL-DOefrphg.js → mermaid-3ZIDBTTL-CK9fLYE8.js} +1 -1
- package/build/server/assets/{token-c3byIJRC.js → token-sFDUVNm0.js} +1 -1
- package/build/server/assets/{token-util-C2yENsqE.js → token-util-CighjZkT.js} +1 -1
- package/build/server/assets/{websocket-server-DagS_hnJ.js → websocket-server-BADWB2u5.js} +1 -1
- package/build/server/assets/{wrapper-Cnumc4u1.js → wrapper-Bwi-W3ol.js} +3 -3
- package/build/server/assets/{ws-transport-2gJL6hC2.js → ws-transport-DaZsgQ2B.js} +41 -3
- package/build/server/assets/{zstd-browser-decoder-BCVvr1WT.js → zstd-browser-decoder-dRi0VqoM.js} +1 -1
- package/build/server/index.js +3 -3
- package/package.json +7 -7
- package/build/client/assets/app-BkGXg64e.css +0 -1
- package/build/client/assets/root-ZRjqDhEN.css +0 -1
- package/build/server/assets/index-BByEr1g6.js +0 -154
|
@@ -43216,33 +43216,6 @@ const Lr = /* @__PURE__ */ K$3(() => {
|
|
|
43216
43216
|
function kn$1(t, e, n) {
|
|
43217
43217
|
return e !== "normal" && !(e != null && e.endsWith("px")) && n(`${t} was not resolved to pixel value correctly`, e, Ct$1.WARN), e === "normal" ? 0 : parseInt(e != null ? e : "0", 10);
|
|
43218
43218
|
}
|
|
43219
|
-
const WORKFLOW_ULID_BODY = "[0123456789ABCDEFGHJKMNPQRSTVWXYZ]{26}";
|
|
43220
|
-
const STEP_ID_PATTERN = new RegExp(`^step_(${WORKFLOW_ULID_BODY})$`, "i");
|
|
43221
|
-
const WAIT_ID_PATTERN = new RegExp(`^wait_(${WORKFLOW_ULID_BODY})$`, "i");
|
|
43222
|
-
const HOOK_ID_PATTERN = new RegExp(`^hook_(${WORKFLOW_ULID_BODY})$`, "i");
|
|
43223
|
-
const EVENT_ID_PATTERN = new RegExp(`^evnt_(${WORKFLOW_ULID_BODY})$`, "i");
|
|
43224
|
-
const WORKFLOW_ID_PREFIX_PATTERN = /^(step_|wait_|hook_|evnt_|wrun_)/i;
|
|
43225
|
-
function matchPrefixedId(pattern2, prefix, kind, query) {
|
|
43226
|
-
const match2 = query.match(pattern2);
|
|
43227
|
-
if (!match2) {
|
|
43228
|
-
return null;
|
|
43229
|
-
}
|
|
43230
|
-
return { kind, id: `${prefix}_${match2[1].toUpperCase()}` };
|
|
43231
|
-
}
|
|
43232
|
-
function parseExactWorkflowSearchId(query) {
|
|
43233
|
-
const trimmed = query.trim();
|
|
43234
|
-
if (!trimmed) {
|
|
43235
|
-
return null;
|
|
43236
|
-
}
|
|
43237
|
-
return matchPrefixedId(STEP_ID_PATTERN, "step", "step", trimmed) ?? matchPrefixedId(WAIT_ID_PATTERN, "wait", "wait", trimmed) ?? matchPrefixedId(HOOK_ID_PATTERN, "hook", "hook", trimmed) ?? matchPrefixedId(EVENT_ID_PATTERN, "evnt", "event", trimmed);
|
|
43238
|
-
}
|
|
43239
|
-
function looksLikeWorkflowIdSearchInput(query) {
|
|
43240
|
-
const trimmed = query.trim();
|
|
43241
|
-
if (!WORKFLOW_ID_PREFIX_PATTERN.test(trimmed)) {
|
|
43242
|
-
return false;
|
|
43243
|
-
}
|
|
43244
|
-
return /\d/.test(trimmed);
|
|
43245
|
-
}
|
|
43246
43219
|
const NEVER = Object.freeze({
|
|
43247
43220
|
status: "aborted"
|
|
43248
43221
|
});
|
|
@@ -57051,6 +57024,21 @@ const TERMINAL_STEP_EVENT_TYPES = TerminalStepEventTypeSchema.options;
|
|
|
57051
57024
|
function isTerminalStepEventType(eventType) {
|
|
57052
57025
|
return TERMINAL_STEP_EVENT_TYPES.includes(eventType);
|
|
57053
57026
|
}
|
|
57027
|
+
const ENTITY_EVENT_CLASS_BY_TYPE = {
|
|
57028
|
+
step_created: "step_created",
|
|
57029
|
+
step_started: "step_started",
|
|
57030
|
+
step_retrying: "step_retrying",
|
|
57031
|
+
step_completed: "step_terminal",
|
|
57032
|
+
step_failed: "step_terminal",
|
|
57033
|
+
wait_created: "wait_created",
|
|
57034
|
+
wait_completed: "wait_completed",
|
|
57035
|
+
hook_created: "hook_created",
|
|
57036
|
+
hook_disposed: "hook_disposed",
|
|
57037
|
+
run_started: "run_started"
|
|
57038
|
+
};
|
|
57039
|
+
function entityEventClass(eventType) {
|
|
57040
|
+
return ENTITY_EVENT_CLASS_BY_TYPE[eventType];
|
|
57041
|
+
}
|
|
57054
57042
|
const HookLifecycleEventTypeSchema = EventTypeSchema.extract([
|
|
57055
57043
|
"hook_created",
|
|
57056
57044
|
"hook_received",
|
|
@@ -57778,6 +57766,7 @@ const AnalyticsAttributeKeySchema = object$1({
|
|
|
57778
57766
|
firstSeenAt: date$2(),
|
|
57779
57767
|
lastSeenAt: date$2()
|
|
57780
57768
|
});
|
|
57769
|
+
const ANALYTICS_EVENTS_GET_MANY_LIMIT = 100;
|
|
57781
57770
|
const warnedEnvValues = /* @__PURE__ */ new Set();
|
|
57782
57771
|
function warnOnce(key, message2) {
|
|
57783
57772
|
if (warnedEnvValues.has(key))
|
|
@@ -57870,6 +57859,19 @@ const RunInputSchema = object$1({
|
|
|
57870
57859
|
*/
|
|
57871
57860
|
environment: string$3().optional()
|
|
57872
57861
|
});
|
|
57862
|
+
const StepDispatchInputSchema = object$1({
|
|
57863
|
+
/**
|
|
57864
|
+
* The serialized step input, reused verbatim from the direct write. Always
|
|
57865
|
+
* binary: producers only attach `stepInput` when the dehydrated input is a
|
|
57866
|
+
* `Uint8Array` and the run's queue transport preserves bytes (CBOR).
|
|
57867
|
+
* Validated here so a malformed or transport-mangled payload fails the
|
|
57868
|
+
* message parse instead of being silently written into a `step_created` as
|
|
57869
|
+
* non-binary data. `Buffer` is a `Uint8Array` subclass and passes.
|
|
57870
|
+
*/
|
|
57871
|
+
input: custom((value) => value instanceof Uint8Array, {
|
|
57872
|
+
message: "stepInput.input must be a Uint8Array"
|
|
57873
|
+
})
|
|
57874
|
+
});
|
|
57873
57875
|
const HookResumeInputSchema = object$1({
|
|
57874
57876
|
/** Stable idempotency key minted once per `resumeHook()` call. */
|
|
57875
57877
|
resumeId: string$3(),
|
|
@@ -57903,6 +57905,22 @@ const HookResumeInputSchema = object$1({
|
|
|
57903
57905
|
*/
|
|
57904
57906
|
deploymentId: string$3().optional()
|
|
57905
57907
|
});
|
|
57908
|
+
const HookResumeTimingSchema = object$1({
|
|
57909
|
+
/** Epoch ms at entry into `resumeHook()` — the start of the TTR window. */
|
|
57910
|
+
resumeRequestedAtMs: number$3(),
|
|
57911
|
+
/** Epoch ms immediately before the queue publish was requested. */
|
|
57912
|
+
queuePublishRequestedAtMs: number$3(),
|
|
57913
|
+
/** Which `resumeHook()` dispatch path ran: `parallel` or `sequential`. */
|
|
57914
|
+
strategy: string$3().optional(),
|
|
57915
|
+
/** Epoch ms the final consumer's queue handler was entered. */
|
|
57916
|
+
consumerStartedAtMs: number$3().optional(),
|
|
57917
|
+
/** Epoch ms this invocation's first replay pass began. */
|
|
57918
|
+
replayStartedAtMs: number$3().optional(),
|
|
57919
|
+
/** Epoch ms replay first encountered a durable step after the resume. */
|
|
57920
|
+
nextStepEncounteredAtMs: number$3().optional(),
|
|
57921
|
+
/** How the consumer initialized replay state: see `ResumeSetupSource`. */
|
|
57922
|
+
setupSource: string$3().optional()
|
|
57923
|
+
});
|
|
57906
57924
|
const WorkflowInvokePayloadSchema = object$1({
|
|
57907
57925
|
runId: string$3(),
|
|
57908
57926
|
traceCarrier: TraceCarrierSchema.optional(),
|
|
@@ -57936,7 +57954,28 @@ const WorkflowInvokePayloadSchema = object$1({
|
|
|
57936
57954
|
* fast path. A consumer that understands this field idempotently ensures the
|
|
57937
57955
|
* `hook_received` event exists (keyed by `resumeId`) before replaying.
|
|
57938
57956
|
*/
|
|
57939
|
-
hookInput: HookResumeInputSchema.optional()
|
|
57957
|
+
hookInput: HookResumeInputSchema.optional(),
|
|
57958
|
+
/**
|
|
57959
|
+
* Resilient step dispatch data, only present alongside `stepId` when the
|
|
57960
|
+
* producer parallelized the `step_created` write with this queue publish. A
|
|
57961
|
+
* consumer that understands this field idempotently ensures the
|
|
57962
|
+
* `step_created` event exists (keyed by `stepId`) before executing the step.
|
|
57963
|
+
*/
|
|
57964
|
+
stepInput: StepDispatchInputSchema.optional(),
|
|
57965
|
+
/**
|
|
57966
|
+
* Hook-resume TTR timing. Present on both `resumeHook()` dispatch paths
|
|
57967
|
+
* (unlike `hookInput`, which only rides the parallel fast path), and
|
|
57968
|
+
* forwarded onto a dispatched step message when the resuming invocation
|
|
57969
|
+
* hands the next durable step to another invocation. Purely observational —
|
|
57970
|
+
* see {@link HookResumeTimingSchema}.
|
|
57971
|
+
*
|
|
57972
|
+
* `.catch(undefined)` because this field must never be able to fail the
|
|
57973
|
+
* parse of the invocation payload: a malformed value (a NaN boundary, a
|
|
57974
|
+
* shape change from a future producer) would otherwise throw on every
|
|
57975
|
+
* delivery of that message and burn the run's delivery budget over a
|
|
57976
|
+
* telemetry field. Anything unparseable degrades to "no measurement".
|
|
57977
|
+
*/
|
|
57978
|
+
hookResumeTiming: HookResumeTimingSchema.optional().catch(void 0)
|
|
57940
57979
|
});
|
|
57941
57980
|
const HealthCheckPayloadSchema = object$1({
|
|
57942
57981
|
__healthCheck: literal(true),
|
|
@@ -58119,7 +58158,7 @@ const SPEC_VERSION_SUPPORTS_CBOR_QUEUE_TRANSPORT = 3;
|
|
|
58119
58158
|
const SPEC_VERSION_SUPPORTS_ATTRIBUTES = 4;
|
|
58120
58159
|
const SPEC_VERSION_SUPPORTS_COMPRESSION = 5;
|
|
58121
58160
|
const SPEC_VERSION_SUPPORTS_SLOT_IDENTITY = 6;
|
|
58122
|
-
const SPEC_VERSION_CURRENT =
|
|
58161
|
+
const SPEC_VERSION_CURRENT = SPEC_VERSION_SUPPORTS_SLOT_IDENTITY;
|
|
58123
58162
|
const SPEC_VERSION_MAX_SUPPORTED = SPEC_VERSION_SUPPORTS_SLOT_IDENTITY;
|
|
58124
58163
|
function isLegacySpecVersion(v2) {
|
|
58125
58164
|
return v2 === void 0 || v2 === null || v2 <= SPEC_VERSION_LEGACY;
|
|
@@ -58313,6 +58352,101 @@ function validateUlidTimestamp(prefixedUlid, prefix, pastThresholdMs = DEFAULT_T
|
|
|
58313
58352
|
const thresholdSeconds = Math.round(thresholdMs / 1e3);
|
|
58314
58353
|
return `Invalid runId timestamp: embedded timestamp is ${driftSeconds}s in the ${direction} (threshold: ${thresholdSeconds}s)`;
|
|
58315
58354
|
}
|
|
58355
|
+
const TERMINAL_EVENT_CLASSES = /* @__PURE__ */ new Set([
|
|
58356
|
+
"step_terminal",
|
|
58357
|
+
"wait_completed",
|
|
58358
|
+
"hook_disposed"
|
|
58359
|
+
]);
|
|
58360
|
+
const SINGLETON_EVENT_CLASSES = /* @__PURE__ */ new Set([
|
|
58361
|
+
"run_started"
|
|
58362
|
+
]);
|
|
58363
|
+
const RUN_ENTITY_KEY = "";
|
|
58364
|
+
const DUPLICATE_EVENT_MESSAGE = "Written by a concurrent replay after an event of the same kind was already recorded and acted on. The run follows the earlier one.";
|
|
58365
|
+
function compareEventId(a2, b2) {
|
|
58366
|
+
if (a2.eventId.length !== b2.eventId.length) {
|
|
58367
|
+
return a2.eventId.length - b2.eventId.length;
|
|
58368
|
+
}
|
|
58369
|
+
return a2.eventId < b2.eventId ? -1 : a2.eventId > b2.eventId ? 1 : 0;
|
|
58370
|
+
}
|
|
58371
|
+
function createdAtMs(event) {
|
|
58372
|
+
const createdAt = event.createdAt;
|
|
58373
|
+
return createdAt instanceof Date ? createdAt.getTime() : new Date(createdAt).getTime();
|
|
58374
|
+
}
|
|
58375
|
+
function hasKnowableLogOrder(orderedById) {
|
|
58376
|
+
if (orderedById.every((event) => isSlotEventId(event.eventId)))
|
|
58377
|
+
return true;
|
|
58378
|
+
for (let index2 = 1; index2 < orderedById.length; index2++) {
|
|
58379
|
+
const previous2 = createdAtMs(orderedById[index2 - 1]);
|
|
58380
|
+
const current = createdAtMs(orderedById[index2]);
|
|
58381
|
+
if (Number.isNaN(previous2) || Number.isNaN(current))
|
|
58382
|
+
return false;
|
|
58383
|
+
if (current < previous2)
|
|
58384
|
+
return false;
|
|
58385
|
+
}
|
|
58386
|
+
return true;
|
|
58387
|
+
}
|
|
58388
|
+
function foldDuplicates(ordered) {
|
|
58389
|
+
const duplicates = /* @__PURE__ */ new Set();
|
|
58390
|
+
const seenClasses = /* @__PURE__ */ new Set();
|
|
58391
|
+
const closedEntities = /* @__PURE__ */ new Set();
|
|
58392
|
+
for (const event of ordered) {
|
|
58393
|
+
const eventClass = entityEventClass(event.eventType);
|
|
58394
|
+
if (eventClass === void 0)
|
|
58395
|
+
continue;
|
|
58396
|
+
const entity = event.correlationId ?? RUN_ENTITY_KEY;
|
|
58397
|
+
const classKey = `${eventClass}:${entity}`;
|
|
58398
|
+
const repeatsClass = seenClasses.has(classKey);
|
|
58399
|
+
const entityWasClosed = closedEntities.has(entity);
|
|
58400
|
+
if (TERMINAL_EVENT_CLASSES.has(eventClass)) {
|
|
58401
|
+
closedEntities.add(entity);
|
|
58402
|
+
}
|
|
58403
|
+
if (!repeatsClass) {
|
|
58404
|
+
if (entityWasClosed)
|
|
58405
|
+
break;
|
|
58406
|
+
seenClasses.add(classKey);
|
|
58407
|
+
continue;
|
|
58408
|
+
}
|
|
58409
|
+
if (entityWasClosed || SINGLETON_EVENT_CLASSES.has(eventClass)) {
|
|
58410
|
+
duplicates.add(event.eventId);
|
|
58411
|
+
}
|
|
58412
|
+
}
|
|
58413
|
+
return duplicates;
|
|
58414
|
+
}
|
|
58415
|
+
function findDuplicateEventIds(events2, { isCompleteHistory }) {
|
|
58416
|
+
if (!isCompleteHistory || events2.length < 2)
|
|
58417
|
+
return /* @__PURE__ */ new Set();
|
|
58418
|
+
const ordered = events2.filter((event) => Boolean(event.eventId)).sort(compareEventId);
|
|
58419
|
+
if (!hasKnowableLogOrder(ordered))
|
|
58420
|
+
return /* @__PURE__ */ new Set();
|
|
58421
|
+
return foldDuplicates(ordered);
|
|
58422
|
+
}
|
|
58423
|
+
const WORKFLOW_ULID_BODY = "[0123456789ABCDEFGHJKMNPQRSTVWXYZ]{26}";
|
|
58424
|
+
const STEP_ID_PATTERN = new RegExp(`^step_(${WORKFLOW_ULID_BODY})$`, "i");
|
|
58425
|
+
const WAIT_ID_PATTERN = new RegExp(`^wait_(${WORKFLOW_ULID_BODY})$`, "i");
|
|
58426
|
+
const HOOK_ID_PATTERN = new RegExp(`^hook_(${WORKFLOW_ULID_BODY})$`, "i");
|
|
58427
|
+
const EVENT_ID_PATTERN = new RegExp(`^evnt_(${WORKFLOW_ULID_BODY})$`, "i");
|
|
58428
|
+
const WORKFLOW_ID_PREFIX_PATTERN = /^(step_|wait_|hook_|evnt_|wrun_)/i;
|
|
58429
|
+
function matchPrefixedId(pattern2, prefix, kind, query) {
|
|
58430
|
+
const match2 = query.match(pattern2);
|
|
58431
|
+
if (!match2) {
|
|
58432
|
+
return null;
|
|
58433
|
+
}
|
|
58434
|
+
return { kind, id: `${prefix}_${match2[1].toUpperCase()}` };
|
|
58435
|
+
}
|
|
58436
|
+
function parseExactWorkflowSearchId(query) {
|
|
58437
|
+
const trimmed = query.trim();
|
|
58438
|
+
if (!trimmed) {
|
|
58439
|
+
return null;
|
|
58440
|
+
}
|
|
58441
|
+
return matchPrefixedId(STEP_ID_PATTERN, "step", "step", trimmed) ?? matchPrefixedId(WAIT_ID_PATTERN, "wait", "wait", trimmed) ?? matchPrefixedId(HOOK_ID_PATTERN, "hook", "hook", trimmed) ?? matchPrefixedId(EVENT_ID_PATTERN, "evnt", "event", trimmed);
|
|
58442
|
+
}
|
|
58443
|
+
function looksLikeWorkflowIdSearchInput(query) {
|
|
58444
|
+
const trimmed = query.trim();
|
|
58445
|
+
if (!WORKFLOW_ID_PREFIX_PATTERN.test(trimmed)) {
|
|
58446
|
+
return false;
|
|
58447
|
+
}
|
|
58448
|
+
return /\d/.test(trimmed);
|
|
58449
|
+
}
|
|
58316
58450
|
const UNDEFINED$2 = -1;
|
|
58317
58451
|
const HOLE = -2;
|
|
58318
58452
|
const NAN = -3;
|
|
@@ -59383,6 +59517,21 @@ class RunExpiredError extends WorkflowWorldError {
|
|
|
59383
59517
|
return isError(value) && value.name === "RunExpiredError";
|
|
59384
59518
|
}
|
|
59385
59519
|
}
|
|
59520
|
+
class StreamExpiredError extends WorkflowWorldError {
|
|
59521
|
+
constructor(message2, runId, streamId, expiredAt) {
|
|
59522
|
+
super(message2, { status: 410, code: "stream-expired" });
|
|
59523
|
+
__publicField(this, "runId");
|
|
59524
|
+
__publicField(this, "streamId");
|
|
59525
|
+
__publicField(this, "expiredAt");
|
|
59526
|
+
this.runId = runId;
|
|
59527
|
+
this.streamId = streamId;
|
|
59528
|
+
this.expiredAt = expiredAt;
|
|
59529
|
+
this.name = "StreamExpiredError";
|
|
59530
|
+
}
|
|
59531
|
+
static is(value) {
|
|
59532
|
+
return isError(value) && value.name === "StreamExpiredError";
|
|
59533
|
+
}
|
|
59534
|
+
}
|
|
59386
59535
|
class TooEarlyError extends WorkflowWorldError {
|
|
59387
59536
|
constructor(message2, options) {
|
|
59388
59537
|
super(message2, { retryAfter: options == null ? void 0 : options.retryAfter });
|
|
@@ -60737,7 +60886,7 @@ function replaceEncryptedAndExpiredWithMarkers(resource) {
|
|
|
60737
60886
|
}
|
|
60738
60887
|
async function hydrateResourceIOAsync(resource, key) {
|
|
60739
60888
|
const { hydrateDataWithKey: hydrateDataWithKey2, deriveRunPayloadKeys: deriveRunPayloadKeys2 } = await Promise.resolve().then(() => serializationFormat);
|
|
60740
|
-
const { ensureZstdDecoderRegistered } = await import("./zstd-browser-decoder-
|
|
60889
|
+
const { ensureZstdDecoderRegistered } = await import("./zstd-browser-decoder-dRi0VqoM.js");
|
|
60741
60890
|
ensureZstdDecoderRegistered();
|
|
60742
60891
|
const cryptoKey = key ? await deriveRunPayloadKeys2(key) : void 0;
|
|
60743
60892
|
const revivers = getRevivers();
|
|
@@ -62535,23 +62684,17 @@ function Spinner({ size: size2 = 14, color: color2 }) {
|
|
|
62535
62684
|
lineW: size2 * 0.24,
|
|
62536
62685
|
lineH: size2 * 0.08
|
|
62537
62686
|
};
|
|
62538
|
-
return jsxRuntimeExports.jsxs("span", { style: {
|
|
62539
|
-
display: "inline-flex",
|
|
62540
|
-
position: "relative",
|
|
62687
|
+
return jsxRuntimeExports.jsxs("span", { className: "relative inline-flex", style: {
|
|
62541
62688
|
width: size2,
|
|
62542
62689
|
height: size2
|
|
62543
|
-
}, children: [jsxRuntimeExports.jsx("style", { dangerouslySetInnerHTML: { __html: KEYFRAMES } }), config2.delays.map((delay, i) => jsxRuntimeExports.jsx("span", { style: {
|
|
62544
|
-
position: "absolute",
|
|
62545
|
-
left: "50%",
|
|
62546
|
-
top: "50%",
|
|
62690
|
+
}, children: [jsxRuntimeExports.jsx("style", { dangerouslySetInnerHTML: { __html: KEYFRAMES } }), config2.delays.map((delay, i) => jsxRuntimeExports.jsx("span", { className: "absolute top-1/2 left-1/2 rounded-[1px] bg-gray-700 [animation-iteration-count:infinite] [animation-name:wf-spinner-fade] [animation-timing-function:linear]", style: {
|
|
62547
62691
|
width: config2.lineW,
|
|
62548
62692
|
height: config2.lineH,
|
|
62549
62693
|
marginLeft: -config2.lineW / 2,
|
|
62550
62694
|
marginTop: -config2.lineH / 2,
|
|
62551
|
-
|
|
62552
|
-
backgroundColor: color2 ?? "var(--ds-gray-700)",
|
|
62695
|
+
backgroundColor: color2,
|
|
62553
62696
|
transform: `rotate(${i * config2.angle}deg) translate(${size2 * 0.36}px)`,
|
|
62554
|
-
|
|
62697
|
+
animationDuration: `${config2.duration}ms`,
|
|
62555
62698
|
animationDelay: `${delay}ms`
|
|
62556
62699
|
} }, delay))] });
|
|
62557
62700
|
}
|
|
@@ -62613,33 +62756,18 @@ function EncryptedInlineLabel() {
|
|
|
62613
62756
|
ctx.onDecrypt();
|
|
62614
62757
|
}, children: [ctx.isDecrypting ? jsxRuntimeExports.jsx(Spinner, { size: 10 }) : jsxRuntimeExports.jsx(Lock, { className: "h-3 w-3" }), jsxRuntimeExports.jsx("span", { children: "Decrypt" })] });
|
|
62615
62758
|
}
|
|
62616
|
-
return jsxRuntimeExports.jsxs("span", {
|
|
62617
|
-
display: "inline",
|
|
62618
|
-
verticalAlign: "middle",
|
|
62619
|
-
marginRight: "3px",
|
|
62620
|
-
marginTop: "-1px"
|
|
62621
|
-
} }), "Encrypted"] });
|
|
62759
|
+
return jsxRuntimeExports.jsxs("span", { className: "text-gray-600 italic", children: [jsxRuntimeExports.jsx(Lock, { className: "-mt-px mr-[3px] inline h-3 w-3 align-middle" }), "Encrypted"] });
|
|
62622
62760
|
}
|
|
62623
62761
|
function StreamRefInline({ streamRef }) {
|
|
62624
62762
|
const onStreamClick = reactExports.useContext(StreamClickContext);
|
|
62625
|
-
|
|
62626
|
-
return jsxRuntimeExports.jsxs("button", { type: "button", className: "inline-flex items-center gap-1 px-1.5 py-0.5 rounded text-[10px] font-mono cursor-pointer underline decoration-transparent transition-colors", style: {
|
|
62627
|
-
backgroundColor: hovered ? "var(--ds-blue-200)" : "var(--ds-blue-100)",
|
|
62628
|
-
color: "var(--ds-blue-900)",
|
|
62629
|
-
border: "1px solid var(--ds-blue-300)"
|
|
62630
|
-
}, onMouseEnter: () => setHovered(true), onMouseLeave: () => setHovered(false), onClick: (e) => {
|
|
62763
|
+
return jsxRuntimeExports.jsxs("button", { type: "button", className: "inline-flex cursor-pointer items-center gap-1 rounded border border-blue-300 bg-blue-100 px-1.5 py-0.5 font-mono text-[10px] text-blue-900 underline decoration-transparent transition-colors hover:bg-blue-200", onClick: (e) => {
|
|
62631
62764
|
e.stopPropagation();
|
|
62632
62765
|
onStreamClick == null ? void 0 : onStreamClick(streamRef.streamId);
|
|
62633
62766
|
}, title: `View stream: ${streamRef.streamId}`, children: [jsxRuntimeExports.jsx("span", { children: "📡" }), jsxRuntimeExports.jsx("span", { children: streamRef.streamId })] });
|
|
62634
62767
|
}
|
|
62635
62768
|
function RunRefInline({ runRef }) {
|
|
62636
62769
|
const onRunClick = reactExports.useContext(RunClickContext);
|
|
62637
|
-
|
|
62638
|
-
return jsxRuntimeExports.jsx("button", { type: "button", className: "inline-flex items-center gap-1 px-1.5 py-0.5 rounded text-[10px] font-mono cursor-pointer underline decoration-transparent transition-colors", style: {
|
|
62639
|
-
backgroundColor: hovered ? "var(--ds-purple-200)" : "var(--ds-purple-100)",
|
|
62640
|
-
color: "var(--ds-purple-900)",
|
|
62641
|
-
border: "1px solid var(--ds-purple-300)"
|
|
62642
|
-
}, onMouseEnter: () => setHovered(true), onMouseLeave: () => setHovered(false), onClick: (e) => {
|
|
62770
|
+
return jsxRuntimeExports.jsx("button", { type: "button", className: "inline-flex cursor-pointer items-center gap-1 rounded border border-purple-300 bg-purple-100 px-1.5 py-0.5 font-mono text-[10px] text-purple-900 underline decoration-transparent transition-colors hover:bg-purple-200", onClick: (e) => {
|
|
62643
62771
|
e.stopPropagation();
|
|
62644
62772
|
onRunClick == null ? void 0 : onRunClick(runRef.runId);
|
|
62645
62773
|
}, title: `View run: ${runRef.runId}`, children: jsxRuntimeExports.jsx("span", { children: runRef.runId }) });
|
|
@@ -62647,24 +62775,17 @@ function RunRefInline({ runRef }) {
|
|
|
62647
62775
|
function DecodedBytesChunk({ decodedText, source }) {
|
|
62648
62776
|
const [selectedView, setSelectedView] = reactExports.useState("decoded");
|
|
62649
62777
|
const parsed = parseChunkData(decodedText);
|
|
62650
|
-
return jsxRuntimeExports.jsxs("div", { className: "min-w-0", children: [selectedView === "decoded" ? jsxRuntimeExports.jsx("div", { className: "min-w-0", children: typeof parsed === "string" ? jsxRuntimeExports.jsx("span", { className: "whitespace-pre-wrap break-words
|
|
62651
|
-
backgroundColor: selectedView === "decoded" ? "var(--ds-gray-200)" : "var(--ds-gray-100)",
|
|
62652
|
-
color: "var(--ds-gray-900)"
|
|
62653
|
-
}, onClick: () => setSelectedView("decoded"), "aria-pressed": selectedView === "decoded", "aria-label": "Show decoded text", children: "Decoded" }), jsxRuntimeExports.jsx("button", { type: "button", className: "h-5 border-l px-1.5 text-[10px] font-medium", style: {
|
|
62654
|
-
borderColor: "var(--ds-gray-400)",
|
|
62655
|
-
backgroundColor: selectedView === "bytes" ? "var(--ds-gray-200)" : "var(--ds-gray-100)",
|
|
62656
|
-
color: "var(--ds-gray-900)"
|
|
62657
|
-
}, onClick: () => setSelectedView("bytes"), "aria-pressed": selectedView === "bytes", "aria-label": "Show raw bytes summary", children: "Bytes" })] }) })] });
|
|
62778
|
+
return jsxRuntimeExports.jsxs("div", { className: "min-w-0", children: [selectedView === "decoded" ? jsxRuntimeExports.jsx("div", { className: "min-w-0", children: typeof parsed === "string" ? jsxRuntimeExports.jsx("span", { className: "whitespace-pre-wrap break-words text-gray-1000", children: deserializeChunkText(parsed) }) : jsxRuntimeExports.jsx(DataInspector, { data: parsed, expandLevel: 1 }) }) : jsxRuntimeExports.jsx(DecodedBytesInspector, { decodedText, source }), jsxRuntimeExports.jsx("div", { className: "mt-2 flex", children: jsxRuntimeExports.jsxs("div", { className: "inline-flex overflow-hidden rounded border border-gray-400", title: `${source.type} decoded as ${source.encoding.toUpperCase()} text. Switch to Bytes to inspect the summarized raw value.`, children: [jsxRuntimeExports.jsx("button", { type: "button", className: cn$4("h-5 px-1.5 font-medium text-[10px] text-gray-900", selectedView === "decoded" ? "bg-gray-200" : "bg-gray-100"), onClick: () => setSelectedView("decoded"), "aria-pressed": selectedView === "decoded", "aria-label": "Show decoded text", children: "Decoded" }), jsxRuntimeExports.jsx("button", { type: "button", className: cn$4("h-5 border-gray-400 border-l px-1.5 font-medium text-[10px] text-gray-900", selectedView === "bytes" ? "bg-gray-200" : "bg-gray-100"), onClick: () => setSelectedView("bytes"), "aria-pressed": selectedView === "bytes", "aria-label": "Show raw bytes summary", children: "Bytes" })] }) })] });
|
|
62658
62779
|
}
|
|
62659
62780
|
function DecodedBytesInspector({ decodedText, source }) {
|
|
62660
62781
|
const [expanded, setExpanded] = reactExports.useState(false);
|
|
62661
|
-
return jsxRuntimeExports.jsxs("div", { className: "font-mono", children: [jsxRuntimeExports.jsxs("button", { type: "button", className: "flex max-w-full items-start gap-1 text-left
|
|
62782
|
+
return jsxRuntimeExports.jsxs("div", { className: "font-mono", children: [jsxRuntimeExports.jsxs("button", { type: "button", className: "flex max-w-full items-start gap-1 text-left text-gray-1000", onClick: () => setExpanded((value) => !value), title: `${source.type} decoded as ${source.encoding.toUpperCase()} text`, children: [jsxRuntimeExports.jsx("span", { className: "select-none text-gray-700", children: expanded ? "▼" : "▶" }), jsxRuntimeExports.jsx("span", { className: "min-w-0 break-words", children: source.rawSummary })] }), expanded && jsxRuntimeExports.jsxs("div", { className: "mt-1 pl-5", children: [jsxRuntimeExports.jsx("span", { className: "text-gray-700", children: "decoded: " }), jsxRuntimeExports.jsx("span", { className: "whitespace-pre-wrap break-words text-green-900", children: JSON.stringify(decodedText) })] })] });
|
|
62662
62783
|
}
|
|
62663
62784
|
function BytesDisplayValue({ display }) {
|
|
62664
62785
|
if (display.decodedFrom) {
|
|
62665
62786
|
return jsxRuntimeExports.jsx(DecodedBytesChunk, { decodedText: display.text, source: display.decodedFrom });
|
|
62666
62787
|
}
|
|
62667
|
-
return jsxRuntimeExports.jsx("span", { className: "whitespace-pre-wrap break-words
|
|
62788
|
+
return jsxRuntimeExports.jsx("span", { className: "whitespace-pre-wrap break-words text-gray-1000", children: display.text });
|
|
62668
62789
|
}
|
|
62669
62790
|
function formatField(field) {
|
|
62670
62791
|
return field === "" ? '""' : field;
|
|
@@ -63043,7 +63164,7 @@ const rowCopyValueVariants = cva("flex min-w-0 flex-1 items-center justify-end g
|
|
|
63043
63164
|
});
|
|
63044
63165
|
function DetailKeyValueRowBase({ label, value, copyText, href, removed = false, variant }) {
|
|
63045
63166
|
const stringValue = typeof value === "string" ? value : void 0;
|
|
63046
|
-
return jsxRuntimeExports.jsxs("div", { className: "px-1.5 hover:bg-gray-100 flex justify-between gap-3 -mx-1.5 py-0.5 rounded items-center", children: [jsxRuntimeExports.jsx("span", { className: "flex min-w-0 items-center gap-1.5 truncate text-label-13 text-gray-900", children: label }), removed ? jsxRuntimeExports.jsx("span", { className: "shrink-0 text-copy-13 italic text-gray-700", children: "removed" }) : copyText ? jsxRuntimeExports.jsxs("div", { className: cn$4(rowCopyValueVariants({ variant })), title: copyText, children: [href ? jsxRuntimeExports.jsxs("a", { href, target: "_blank", rel: "noreferrer", className: cn$4(rowValueVariants({ variant }), "flex min-w-0 items-center gap-0.5 hover:underline"), children: [jsxRuntimeExports.jsx(MiddleTruncate, { value: copyText, className: "min-w-0
|
|
63167
|
+
return jsxRuntimeExports.jsxs("div", { className: "px-1.5 hover:bg-gray-100 flex justify-between gap-3 -mx-1.5 py-0.5 rounded items-center", children: [jsxRuntimeExports.jsx("span", { className: "flex min-w-0 items-center gap-1.5 truncate text-label-13 text-gray-900", children: label }), removed ? jsxRuntimeExports.jsx("span", { className: "shrink-0 text-copy-13 italic text-gray-700", children: "removed" }) : copyText ? jsxRuntimeExports.jsxs("div", { className: cn$4(rowCopyValueVariants({ variant })), title: copyText, children: [href ? jsxRuntimeExports.jsxs("a", { href, target: "_blank", rel: "noreferrer", className: cn$4(rowValueVariants({ variant }), "flex min-w-0 items-center gap-0.5 hover:underline"), children: [jsxRuntimeExports.jsx(MiddleTruncate, { value: copyText, className: "min-w-0 grid-cols-[minmax(0,1fr)] text-right" }), jsxRuntimeExports.jsx(ArrowUpRight, { "aria-hidden": true, className: "h-3 w-3 shrink-0" })] }) : jsxRuntimeExports.jsx(MiddleTruncate, { value: copyText, className: cn$4(rowValueVariants({ variant, className: "text-right" }), "grid-cols-[minmax(0,1fr)]") }), jsxRuntimeExports.jsx(CopyButton, { copyText, ariaLabel: `Copy ${label}`, className: "shrink-0 -mr-1" })] }) : jsxRuntimeExports.jsx("span", { className: cn$4(rowValueVariants({ variant })), title: stringValue, children: href ? jsxRuntimeExports.jsx("a", { href, target: "_blank", rel: "noreferrer", className: "hover:underline", children: value }) : value })] });
|
|
63047
63168
|
}
|
|
63048
63169
|
function DetailKeyValueRow(props) {
|
|
63049
63170
|
return jsxRuntimeExports.jsx(DetailKeyValueRowBase, { ...props });
|
|
@@ -63118,10 +63239,7 @@ function AttrSetEventBlock({ data }) {
|
|
|
63118
63239
|
return jsxRuntimeExports.jsx(CopyableDataBlock, { data });
|
|
63119
63240
|
}
|
|
63120
63241
|
const writerLabel = describeWriter(data.writer);
|
|
63121
|
-
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",
|
|
63122
|
-
borderColor: "var(--ds-gray-alpha-400)",
|
|
63123
|
-
color: "var(--ds-gray-700)"
|
|
63124
|
-
}, children: writerLabel })] });
|
|
63242
|
+
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-gray-alpha-400 border-t py-1.5 text-gray-700 text-label-12", children: writerLabel })] });
|
|
63125
63243
|
}
|
|
63126
63244
|
function setRef(ref, value) {
|
|
63127
63245
|
if (typeof ref === "function") {
|
|
@@ -63588,9 +63706,7 @@ function ContextCardProvider({ children: children2, portalTarget }) {
|
|
|
63588
63706
|
distanceFromLast,
|
|
63589
63707
|
lastOrigin
|
|
63590
63708
|
]);
|
|
63591
|
-
return jsxRuntimeExports.jsxs(ContextCardContext.Provider, { value: contextValue, children: [children2, isMounted ? reactDomExports.createPortal(jsxRuntimeExports.jsx("div", { className: "w-full h-full inset-0 fixed pointer-events-none z-[100000]", ref, children: jsxRuntimeExports.jsx("div", { className: "min-w-max transition-all duration-150 ease-[easing-function:cubic-bezier(0.3,_0.57,_0.07,_0.95)] will-change-[transform,width,height] motion-reduce:!transition-none", style: {
|
|
63592
|
-
opacity: visible ? 1 : 0
|
|
63593
|
-
}, children: jsxRuntimeExports.jsxs("div", { className: cn$4("absolute bg-background-100 bg-clip-padding rounded-[6px] overflow-visible pointer-events-none z-[1000000] shadow-[var(--ds-shadow-tooltip),0_0_0_1px_var(--ds-background-100)] w-fit [--context-card-tip-stroke:#DBDBDB] dark-theme:[--context-card-tip-stroke:#252525]", skipTransition ? "!transition-none" : "transition-[transform,width,height] duration-250 ease-[easing-function:cubic-bezier(0.29,0.31,0.05,0.96)] will-change-[transform,width,height] motion-reduce:!transition-none"), "data-skip-transition": skipTransition, style: {
|
|
63709
|
+
return jsxRuntimeExports.jsxs(ContextCardContext.Provider, { value: contextValue, children: [children2, isMounted ? reactDomExports.createPortal(jsxRuntimeExports.jsx("div", { className: "w-full h-full inset-0 fixed pointer-events-none z-[100000]", ref, children: jsxRuntimeExports.jsx("div", { className: cn$4("min-w-max transition-all duration-150 ease-[easing-function:cubic-bezier(0.3,_0.57,_0.07,_0.95)] will-change-[transform,width,height] motion-reduce:!transition-none", visible ? "opacity-100" : "opacity-0"), children: jsxRuntimeExports.jsxs("div", { className: cn$4("absolute bg-background-100 bg-clip-padding rounded-[6px] overflow-visible pointer-events-none z-[1000000] shadow-[var(--ds-shadow-tooltip),0_0_0_1px_var(--ds-background-100)] w-fit [--context-card-tip-stroke:#DBDBDB] dark-theme:[--context-card-tip-stroke:#252525]", skipTransition ? "!transition-none" : "transition-[transform,width,height] duration-[250ms] ease-[easing-function:cubic-bezier(0.29,0.31,0.05,0.96)] will-change-[transform,width,height] motion-reduce:!transition-none"), "data-skip-transition": skipTransition, style: {
|
|
63594
63710
|
transform: `translate(${activeBounds.x}px,${activeBounds.y}px)`,
|
|
63595
63711
|
width: activeBounds.width,
|
|
63596
63712
|
height: activeBounds.height
|
|
@@ -63599,18 +63715,13 @@ function ContextCardProvider({ children: children2, portalTarget }) {
|
|
|
63599
63715
|
"right-full -translate-y-1/2 rotate-90 -mr-[3.5px]": activeBounds.side === "right",
|
|
63600
63716
|
"bottom-full -translate-x-1/2 rotate-180": activeBounds.side === "bottom",
|
|
63601
63717
|
"left-full -translate-y-1/2 rotate-[270deg] -ml-[3.5px]": activeBounds.side === "left"
|
|
63602
|
-
}, skipTransition ? "!transition-none" : "transition-[transform,width,height] duration-
|
|
63718
|
+
}, skipTransition ? "!transition-none" : "transition-[transform,width,height] duration-[250ms] ease-[easing-function:cubic-bezier(0.29,0.31,0.05,0.96)] will-change-[transform,width,height] motion-reduce:!transition-none"), style: {
|
|
63603
63719
|
...activeBounds.side === "top" || activeBounds.side === "bottom" ? {
|
|
63604
63720
|
left: `calc(50% + ${activeBounds.arrowOffset.x}px)`
|
|
63605
63721
|
} : {
|
|
63606
63722
|
top: `calc(50% + ${activeBounds.arrowOffset.y}px)`
|
|
63607
63723
|
}
|
|
63608
|
-
}, "data-skip-transition": skipTransition, "data-side": activeBounds.side, children: jsxRuntimeExports.jsxs("svg", { width: "14", height: "7", viewBox: "0 0 14 7", fill: "none", xmlns: "http://www.w3.org/2000/svg", "aria-hidden": "true", children: [jsxRuntimeExports.jsx("g", { clipPath: "url(#context-card-tip-clip)", children: jsxRuntimeExports.jsx("path", { d: "M15 -0.5V0.5H12.9834L12.8184 0.508789C12.4377 0.550822 12.0853 0.738056 11.8359 1.03418L8.53027 4.95996C7.73114 5.90893 6.26886 5.90892 5.46973 4.95996L2.16406 1.03418C1.87905 0.695733 1.45907 0.5 1.0166 0.5H-1V-0.5H15Z", fill: "var(--ds-background-100)",
|
|
63609
|
-
fill: "var(--ds-background-100)",
|
|
63610
|
-
fillOpacity: 1,
|
|
63611
|
-
stroke: "var(--context-card-tip-stroke)",
|
|
63612
|
-
strokeOpacity: 1
|
|
63613
|
-
} }) }), jsxRuntimeExports.jsx("defs", { children: jsxRuntimeExports.jsx("clipPath", { id: "context-card-tip-clip", children: jsxRuntimeExports.jsx("rect", { width: "14", height: "7", fill: "white", style: { fill: "white", fillOpacity: 1 } }) }) })] }) }), jsxRuntimeExports.jsx("div", { ref: portalRef })] }) }) }), resolvedPortalTarget ?? document.body) : null] });
|
|
63724
|
+
}, "data-skip-transition": skipTransition, "data-side": activeBounds.side, children: jsxRuntimeExports.jsxs("svg", { width: "14", height: "7", viewBox: "0 0 14 7", fill: "none", xmlns: "http://www.w3.org/2000/svg", "aria-hidden": "true", children: [jsxRuntimeExports.jsx("g", { clipPath: "url(#context-card-tip-clip)", children: jsxRuntimeExports.jsx("path", { d: "M15 -0.5V0.5H12.9834L12.8184 0.508789C12.4377 0.550822 12.0853 0.738056 11.8359 1.03418L8.53027 4.95996C7.73114 5.90893 6.26886 5.90892 5.46973 4.95996L2.16406 1.03418C1.87905 0.695733 1.45907 0.5 1.0166 0.5H-1V-0.5H15Z", fill: "var(--ds-background-100)", className: "fill-background-100 stroke-[var(--context-card-tip-stroke)]" }) }), jsxRuntimeExports.jsx("defs", { children: jsxRuntimeExports.jsx("clipPath", { id: "context-card-tip-clip", children: jsxRuntimeExports.jsx("rect", { width: "14", height: "7", fill: "white", className: "fill-background-100" }) }) })] }) }), jsxRuntimeExports.jsx("div", { ref: portalRef })] }) }) }), resolvedPortalTarget ?? document.body) : null] });
|
|
63614
63725
|
}
|
|
63615
63726
|
function ContextCardTrigger({ content: content2, children: children2, side = "right", align = "center", sideOffset = 16, alignOffset = 0, ignoreCardPointerEvents = false, noPadding, asChild, className, hide: hide2, inactiveTimeoutMs = INACTIVE_TIMEOUT_MS }) {
|
|
63616
63727
|
const triggerRef = reactExports.useRef(null);
|
|
@@ -63845,17 +63956,22 @@ function ContextCardTrigger({ content: content2, children: children2, side = "ri
|
|
|
63845
63956
|
}
|
|
63846
63957
|
}
|
|
63847
63958
|
const Comp = asChild ? Root$6 : "div";
|
|
63848
|
-
return jsxRuntimeExports.jsxs(Comp, { className: cn$4("inline-flex cursor-pointer flex-[0_1_auto] overflow-hidden", className), onMouseEnter, onMouseLeave, onClick: handleClick, ref: triggerRef, children: [jsxRuntimeExports.jsx(Slottable$1, { children: children2 }), (portalRef == null ? void 0 : portalRef.current) && (localHover || persisting) ? reactDomExports.createPortal(jsxRuntimeExports.jsx("div", { className: cn$4("absolute top-0 p-3 left-0 max-w-max transition-[transform,width,height] duration-
|
|
63849
|
-
...noPadding ? { padding: 0 } : {},
|
|
63850
|
-
pointerEvents: rootVisible && visible && !ignoreCardPointerEvents ? "all" : "none"
|
|
63851
|
-
}, children: jsxRuntimeExports.jsx("div", { className: cn$4("min-w-max transition-all duration-150 ease-[easing-function:cubic-bezier(0.3,_0.57,_0.07,_0.95)] will-change-[transform,width,height] motion-reduce:!transition-none", skipTransition ? "!transition-none" : "transition-[transform,width,height] duration-250 ease-[easing-function:cubic-bezier(0.29,0.31,0.05,0.96)] will-change-[transform,width,height] motion-reduce:!transition-none"), ref: contentMeasureRef, style: {
|
|
63852
|
-
opacity: Number(visible)
|
|
63853
|
-
}, children: content2 }) }, id2), portalRef.current) : null] });
|
|
63959
|
+
return jsxRuntimeExports.jsxs(Comp, { className: cn$4("inline-flex cursor-pointer flex-[0_1_auto] overflow-hidden", className), onMouseEnter, onMouseLeave, onClick: handleClick, ref: triggerRef, children: [jsxRuntimeExports.jsx(Slottable$1, { children: children2 }), (portalRef == null ? void 0 : portalRef.current) && (localHover || persisting) ? reactDomExports.createPortal(jsxRuntimeExports.jsx("div", { className: cn$4("absolute top-0 p-3 left-0 max-w-max transition-[transform,width,height] duration-[250ms] ease-[easing-function:cubic-bezier(0.29,0.31,0.05,0.96)] will-change-[transform,width,height] motion-reduce:!transition-none", skipTransition && "!transition-none", noPadding && "p-0", rootVisible && visible && !ignoreCardPointerEvents ? "pointer-events-auto" : "pointer-events-none"), ref: contentRef, children: jsxRuntimeExports.jsx("div", { className: cn$4("min-w-max transition-all duration-150 ease-[easing-function:cubic-bezier(0.3,_0.57,_0.07,_0.95)] will-change-[transform,width,height] motion-reduce:!transition-none", skipTransition ? "!transition-none" : "transition-[transform,width,height] duration-[250ms] ease-[easing-function:cubic-bezier(0.29,0.31,0.05,0.96)] will-change-[transform,width,height] motion-reduce:!transition-none", visible ? "opacity-100" : "opacity-0"), ref: contentMeasureRef, children: content2 }) }, id2), portalRef.current) : null] });
|
|
63854
63960
|
}
|
|
63855
63961
|
const STYLES$2 = `.wf-decrypt-btn{appearance:none;-webkit-appearance:none;border:none;display:inline-flex;align-items:center;justify-content:center;height:40px;padding:0 12px;border-radius:6px;font-size:14px;font-weight:500;line-height:20px;cursor:pointer;white-space:nowrap;gap:6px;transition:background 150ms}.wf-decrypt-idle{color:var(--ds-gray-1000);background:var(--ds-background-100);box-shadow:0 0 0 1px var(--ds-gray-400)}.wf-decrypt-idle:hover{background:var(--ds-gray-alpha-200)}.wf-decrypt-done{color:var(--ds-green-900);background:var(--ds-green-100);box-shadow:0 0 0 1px var(--ds-green-400);cursor:default}`;
|
|
63856
63962
|
function DecryptButton({ decrypted = false, loading = false, onClick }) {
|
|
63857
63963
|
return jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [jsxRuntimeExports.jsx("style", { dangerouslySetInnerHTML: { __html: STYLES$2 } }), jsxRuntimeExports.jsxs("button", { type: "button", onClick: decrypted ? void 0 : onClick, disabled: decrypted || loading, className: `wf-decrypt-btn ${decrypted ? "wf-decrypt-done" : "wf-decrypt-idle"}`, children: [loading ? jsxRuntimeExports.jsx(Spinner, { size: 14 }) : decrypted ? jsxRuntimeExports.jsxs("svg", { width: 14, height: 14, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: 2, strokeLinecap: "round", strokeLinejoin: "round", children: [jsxRuntimeExports.jsx("rect", { x: "3", y: "11", width: "18", height: "11", rx: "2", ry: "2" }), jsxRuntimeExports.jsx("path", { d: "M7 11V7a5 5 0 0 1 9.9-1" })] }) : jsxRuntimeExports.jsxs("svg", { width: 14, height: 14, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: 2, strokeLinecap: "round", strokeLinejoin: "round", children: [jsxRuntimeExports.jsx("rect", { x: "3", y: "11", width: "18", height: "11", rx: "2", ry: "2" }), jsxRuntimeExports.jsx("path", { d: "M7 11V7a5 5 0 0 1 10 0v4" })] }), loading ? "Decrypting…" : decrypted ? "Decrypted" : "Decrypt"] })] });
|
|
63858
63964
|
}
|
|
63965
|
+
const TooltipProvider = Provider$2;
|
|
63966
|
+
const Tooltip$1 = Root3$1;
|
|
63967
|
+
const TooltipTrigger$1 = Trigger$4;
|
|
63968
|
+
const TooltipContent$1 = reactExports.forwardRef(({ className, sideOffset = 8, showArrow = true, children: children2, ...props }, ref) => jsxRuntimeExports.jsx(Portal$6, { children: jsxRuntimeExports.jsxs(Content2$4, { ref, sideOffset, className: cn$4("z-[99999] flex items-center gap-1 rounded-[10px] bg-gray-1000 px-2 py-1.5 !text-label-13 text-background-100 shadow-md select-none", className), ...props, children: [children2, showArrow ? jsxRuntimeExports.jsx(Arrow2$1, { width: 11, height: 5, className: "fill-gray-1000" }) : null] }) }));
|
|
63969
|
+
TooltipContent$1.displayName = Content2$4.displayName;
|
|
63970
|
+
function DuplicateEventTooltip({ isDuplicate = false, children: children2 }) {
|
|
63971
|
+
if (!isDuplicate)
|
|
63972
|
+
return children2;
|
|
63973
|
+
return jsxRuntimeExports.jsx(TooltipProvider, { delayDuration: 300, children: jsxRuntimeExports.jsxs(Tooltip$1, { children: [jsxRuntimeExports.jsx(TooltipTrigger$1, { asChild: true, children: children2 }), jsxRuntimeExports.jsx(TooltipContent$1, { className: "max-w-[264px] leading-snug", collisionPadding: 8, side: "top", children: DUPLICATE_EVENT_MESSAGE })] }) });
|
|
63974
|
+
}
|
|
63859
63975
|
function isStructuredError(value) {
|
|
63860
63976
|
return value != null && typeof value === "object" && (typeof value.message === "string" || typeof value.stack === "string");
|
|
63861
63977
|
}
|
|
@@ -63911,30 +64027,13 @@ function MenuDropdown({ options, value, onChange }) {
|
|
|
63911
64027
|
document.addEventListener("mousedown", handleClickOutside);
|
|
63912
64028
|
return () => document.removeEventListener("mousedown", handleClickOutside);
|
|
63913
64029
|
}, [open2]);
|
|
63914
|
-
return jsxRuntimeExports.jsxs("div", { ref,
|
|
63915
|
-
marginLeft: 16,
|
|
63916
|
-
marginRight: -4,
|
|
63917
|
-
color: "var(--ds-gray-900)"
|
|
63918
|
-
}, children: jsxRuntimeExports.jsx("path", { d: "M4.5 6L8 9.5L11.5 6", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" }) })] }), open2 && jsxRuntimeExports.jsx("div", { style: {
|
|
63919
|
-
position: "absolute",
|
|
63920
|
-
right: 0,
|
|
63921
|
-
top: "100%",
|
|
63922
|
-
marginTop: 4,
|
|
63923
|
-
minWidth: 140,
|
|
63924
|
-
padding: 4,
|
|
63925
|
-
borderRadius: 12,
|
|
63926
|
-
background: "var(--ds-background-100)",
|
|
63927
|
-
boxShadow: "var(--ds-shadow-menu, var(--ds-shadow-medium))",
|
|
63928
|
-
zIndex: 2001
|
|
63929
|
-
}, role: "menu", children: options.map((option) => jsxRuntimeExports.jsx("button", { type: "button", role: "menuitem", className: "wf-menu-item", style: {
|
|
63930
|
-
fontWeight: option.value === value ? 500 : 400
|
|
63931
|
-
}, onClick: () => {
|
|
64030
|
+
return jsxRuntimeExports.jsxs("div", { ref, className: "relative shrink-0", children: [jsxRuntimeExports.jsx("style", { dangerouslySetInnerHTML: { __html: STYLES } }), jsxRuntimeExports.jsxs("button", { type: "button", className: "wf-menu-btn", onClick: () => setOpen(!open2), children: [jsxRuntimeExports.jsx("span", { children: label }), jsxRuntimeExports.jsx("svg", { width: 16, height: 16, viewBox: "0 0 16 16", fill: "none", className: "-mr-1 ml-4 text-gray-900", children: jsxRuntimeExports.jsx("path", { d: "M4.5 6L8 9.5L11.5 6", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" }) })] }), open2 && jsxRuntimeExports.jsx("div", { className: "absolute top-full right-0 z-[2001] mt-1 min-w-[140px] bg-background-100 p-1 material-menu", role: "menu", children: options.map((option) => jsxRuntimeExports.jsx("button", { type: "button", role: "menuitem", className: cn$4("wf-menu-item", option.value === value ? "font-medium" : "font-normal"), onClick: () => {
|
|
63932
64031
|
onChange(option.value);
|
|
63933
64032
|
setOpen(false);
|
|
63934
64033
|
}, children: option.label }, option.value)) })] });
|
|
63935
64034
|
}
|
|
63936
64035
|
function Skeleton$1({ className, style: style2, ...props }) {
|
|
63937
|
-
return jsxRuntimeExports.jsx("div", { ...props, className: cn$4("rounded-md", className), style:
|
|
64036
|
+
return jsxRuntimeExports.jsx("div", { ...props, className: cn$4("rounded-md bg-gray-200", className), style: style2 });
|
|
63938
64037
|
}
|
|
63939
64038
|
const TIME_UNITS = [
|
|
63940
64039
|
{ unit: "year", ms: 31536e6 },
|
|
@@ -64116,8 +64215,8 @@ function buildNameMaps(events2, run2) {
|
|
|
64116
64215
|
const workflowName = (run2 == null ? void 0 : run2.workflowName) ? ((_b2 = parseWorkflowName(run2.workflowName)) == null ? void 0 : _b2.shortName) ?? run2.workflowName : null;
|
|
64117
64216
|
return { correlationNameMap, workflowName };
|
|
64118
64217
|
}
|
|
64119
|
-
function buildDurationMap(events2) {
|
|
64120
|
-
const chronological = [...events2].sort((a2, b2) => getEffectiveEventTime(a2) - getEffectiveEventTime(b2));
|
|
64218
|
+
function buildDurationMap(events2, duplicateEventIds = /* @__PURE__ */ new Set()) {
|
|
64219
|
+
const chronological = [...events2].filter((event) => !duplicateEventIds.has(event.eventId)).sort((a2, b2) => getEffectiveEventTime(a2) - getEffectiveEventTime(b2));
|
|
64121
64220
|
const createdTimes = /* @__PURE__ */ new Map();
|
|
64122
64221
|
const firstStartedTimes = /* @__PURE__ */ new Map();
|
|
64123
64222
|
const startedTimes = /* @__PURE__ */ new Map();
|
|
@@ -64366,7 +64465,7 @@ function RowsSkeleton({ showSeparateEventOccurrenceTimestamps = false }) {
|
|
|
64366
64465
|
marginLeft: i % 4 === 0 ? 5 : 6
|
|
64367
64466
|
} })] }), jsxRuntimeExports.jsx("div", { className: "w-5 flex-shrink-0 flex items-center justify-center", children: jsxRuntimeExports.jsx(Skeleton$1, { className: "w-5 h-5", style: { borderRadius: 4 } }) }), showSeparateEventOccurrenceTimestamps && jsxRuntimeExports.jsx("div", { className: "min-w-0 px-4", style: { flex: "2 1 0%" }, children: jsxRuntimeExports.jsx(Skeleton$1, { className: "h-3", style: { width: "70%" } }) }), jsxRuntimeExports.jsx("div", { className: "min-w-0 px-4", style: { flex: "2 1 0%" }, children: jsxRuntimeExports.jsx(Skeleton$1, { className: "h-3", style: { width: "70%" } }) }), jsxRuntimeExports.jsxs("div", { className: "min-w-0 px-4 flex items-center gap-1.5", style: { flex: "2 1 0%" }, children: [jsxRuntimeExports.jsx(Skeleton$1, { className: "flex-shrink-0", style: { width: 6, height: 6, borderRadius: "50%" } }), jsxRuntimeExports.jsx(Skeleton$1, { className: "h-3", style: { width: "60%" } })] }), jsxRuntimeExports.jsx("div", { className: "min-w-0 px-4", style: { flex: "2 1 0%" }, children: jsxRuntimeExports.jsx(Skeleton$1, { className: "h-3", style: { width: "50%" } }) }), jsxRuntimeExports.jsx("div", { className: "min-w-0 px-4", style: { flex: "3 1 0%" }, children: jsxRuntimeExports.jsx(Skeleton$1, { className: "h-3", style: { width: "75%" } }) }), jsxRuntimeExports.jsx("div", { className: "min-w-0 px-4", style: { flex: "3 1 0%" }, children: jsxRuntimeExports.jsx(Skeleton$1, { className: "h-3", style: { width: "75%" } }) })] }, i)) });
|
|
64368
64467
|
}
|
|
64369
|
-
function EventRow$1({ event, index: index2, isFirst, isLast, isExpanded, onToggleExpand, activeGroupKey, selectedGroupKey, selectedGroupRange, correlationNameMap, workflowName, durationMap, onSelectGroup, onHoverGroup, onLoadEventData, cachedEventData, onCacheEventData, encryptionKey, onEncryptedDataDetected, suppressGroupDimming = false, showSeparateEventOccurrenceTimestamps = false }) {
|
|
64468
|
+
function EventRow$1({ event, index: index2, isFirst, isLast, isExpanded, onToggleExpand, activeGroupKey, selectedGroupKey, selectedGroupRange, correlationNameMap, workflowName, durationMap, onSelectGroup, onHoverGroup, onLoadEventData, cachedEventData, onCacheEventData, encryptionKey, onEncryptedDataDetected, suppressGroupDimming = false, showSeparateEventOccurrenceTimestamps = false, isDuplicate = false }) {
|
|
64370
64469
|
const [isLoading, setIsLoading] = reactExports.useState(false);
|
|
64371
64470
|
const [loadedEventData, setLoadedEventData] = reactExports.useState(cachedEventData);
|
|
64372
64471
|
const [loadError, setLoadError] = reactExports.useState(null);
|
|
@@ -64484,7 +64583,9 @@ function EventRow$1({ event, index: index2, isFirst, isLast, isExpanded, onToggl
|
|
|
64484
64583
|
}, children: jsxRuntimeExports.jsx(ChevronRight, { className: "h-3 w-3 transition-transform", style: {
|
|
64485
64584
|
color: "var(--ds-gray-900)",
|
|
64486
64585
|
transform: isExpanded ? "rotate(90deg)" : "rotate(0deg)"
|
|
64487
|
-
} }) }), showSeparateEventOccurrenceTimestamps && jsxRuntimeExports.jsx("div", { className: "tabular-nums min-w-0 px-4", style: { color: "var(--ds-gray-900)", flex: "2 1 0%" }, children: occurredAt ? jsxRuntimeExports.jsx(TimestampTooltip, { date: occurredAt, children: jsxRuntimeExports.jsx("span", { children: formatEventTime(occurredAt) }) }) : "-" }), jsxRuntimeExports.jsx("div", { className: "tabular-nums min-w-0 px-4", style: { color: "var(--ds-gray-900)", flex: "2 1 0%" }, children: jsxRuntimeExports.jsx(TimestampTooltip, { date: displayedCreatedAt, children: jsxRuntimeExports.jsx("span", { children: formatEventTime(displayedCreatedAt) }) }) }), jsxRuntimeExports.jsx("div", { className: "font-medium min-w-0 px-4", style: { flex: "2 1 0%" }, children: jsxRuntimeExports.jsxs("span", { className: "inline-flex items-center gap-1.5", style: {
|
|
64586
|
+
} }) }), showSeparateEventOccurrenceTimestamps && jsxRuntimeExports.jsx("div", { className: "tabular-nums min-w-0 px-4", style: { color: "var(--ds-gray-900)", flex: "2 1 0%" }, children: occurredAt ? jsxRuntimeExports.jsx(TimestampTooltip, { date: occurredAt, children: jsxRuntimeExports.jsx("span", { children: formatEventTime(occurredAt) }) }) : "-" }), jsxRuntimeExports.jsx("div", { className: "tabular-nums min-w-0 px-4", style: { color: "var(--ds-gray-900)", flex: "2 1 0%" }, children: jsxRuntimeExports.jsx(TimestampTooltip, { date: displayedCreatedAt, children: jsxRuntimeExports.jsx("span", { children: formatEventTime(displayedCreatedAt) }) }) }), jsxRuntimeExports.jsx("div", { className: "font-medium min-w-0 px-4", style: { flex: "2 1 0%" }, children: jsxRuntimeExports.jsx(DuplicateEventTooltip, { isDuplicate, children: jsxRuntimeExports.jsxs("span", { className: "inline-flex items-center gap-1.5", style: {
|
|
64587
|
+
color: isDuplicate ? "var(--ds-gray-700)" : "var(--ds-gray-900)"
|
|
64588
|
+
}, children: [jsxRuntimeExports.jsxs("span", { style: {
|
|
64488
64589
|
position: "relative",
|
|
64489
64590
|
display: "inline-flex",
|
|
64490
64591
|
width: 6,
|
|
@@ -64503,7 +64604,7 @@ function EventRow$1({ event, index: index2, isFirst, isLast, isExpanded, onToggl
|
|
|
64503
64604
|
height: 6,
|
|
64504
64605
|
borderRadius: "50%",
|
|
64505
64606
|
backgroundColor: statusDotColor
|
|
64506
|
-
} })] }), formatEventType(event.eventType)] }) }), jsxRuntimeExports.jsx("div", { className: "min-w-0 px-4 overflow-hidden text-ellipsis whitespace-nowrap", style: { flex: "2 1 0%" }, title: eventName !== "-" ? eventName : void 0, children: eventName }), jsxRuntimeExports.jsx(CopyableCell, { value: event.correlationId || "", className: "font-mono", style: { flex: "3 1 0%" } }), jsxRuntimeExports.jsx(CopyableCell, { value: event.eventId, className: "font-mono", style: { flex: "3 1 0%" } })] })] }), isExpanded && jsxRuntimeExports.jsxs("div", { className: "flex", children: [jsxRuntimeExports.jsx(TreeGutter, { isFirst: false, isLast, isRunLevel: isRun, hasSelection: hasActive, showBranch: false, showLaneLine: showLaneLine && !isLaneEnd, isLaneStart: false, isLaneEnd: false, continuationOnly: true }), jsxRuntimeExports.jsx("div", { className: "w-5 flex-shrink-0" }), jsxRuntimeExports.jsxs("div", { className: "flex-1 my-1.5 mr-3 ml-2 py-2 rounded-md border overflow-hidden", style: {
|
|
64607
|
+
} })] }), formatEventType(event.eventType)] }) }) }), jsxRuntimeExports.jsx("div", { className: "min-w-0 px-4 overflow-hidden text-ellipsis whitespace-nowrap", style: { flex: "2 1 0%" }, title: eventName !== "-" ? eventName : void 0, children: eventName }), jsxRuntimeExports.jsx(CopyableCell, { value: event.correlationId || "", className: "font-mono", style: { flex: "3 1 0%" } }), jsxRuntimeExports.jsx(CopyableCell, { value: event.eventId, className: "font-mono", style: { flex: "3 1 0%" } })] })] }), isExpanded && jsxRuntimeExports.jsxs("div", { className: "flex", children: [jsxRuntimeExports.jsx(TreeGutter, { isFirst: false, isLast, isRunLevel: isRun, hasSelection: hasActive, showBranch: false, showLaneLine: showLaneLine && !isLaneEnd, isLaneStart: false, isLaneEnd: false, continuationOnly: true }), jsxRuntimeExports.jsx("div", { className: "w-5 flex-shrink-0" }), jsxRuntimeExports.jsxs("div", { className: "flex-1 my-1.5 mr-3 ml-2 py-2 rounded-md border overflow-hidden", style: {
|
|
64507
64608
|
borderColor: "var(--ds-gray-alpha-200)",
|
|
64508
64609
|
opacity: contentOpacity,
|
|
64509
64610
|
transition: "opacity 150ms"
|
|
@@ -64541,6 +64642,9 @@ function EventListViewInner({ events: events2, run: run2, onLoadEventData, hasMo
|
|
|
64541
64642
|
const dir = effectiveSortOrder === "desc" ? -1 : 1;
|
|
64542
64643
|
return [...sourceEvents].sort((a2, b2) => dir * (getEffectiveEventTime(a2) - getEffectiveEventTime(b2)));
|
|
64543
64644
|
}, [events2, effectiveSortOrder, isExactSearchActive, searchResults]);
|
|
64645
|
+
const duplicateEventIds = reactExports.useMemo(() => findDuplicateEventIds(events2 ?? [], {
|
|
64646
|
+
isCompleteHistory: !hasMoreEvents && !isExactSearchActive
|
|
64647
|
+
}), [events2, hasMoreEvents, isExactSearchActive]);
|
|
64544
64648
|
const hasEncryptedInlineData = reactExports.useMemo(() => {
|
|
64545
64649
|
const sourceEvents = isExactSearchActive ? searchResults : events2;
|
|
64546
64650
|
if (!sourceEvents)
|
|
@@ -64558,7 +64662,7 @@ function EventListViewInner({ events: events2, run: run2, onLoadEventData, hasMo
|
|
|
64558
64662
|
}, []);
|
|
64559
64663
|
const hasEncryptedData = hasEncryptedDataProp || hasEncryptedInlineData || foundEncryptedInLazyData;
|
|
64560
64664
|
const { correlationNameMap, workflowName } = reactExports.useMemo(() => buildNameMaps(isExactSearchActive ? searchResults : events2 ?? null, run2 ?? null), [events2, isExactSearchActive, run2, searchResults]);
|
|
64561
|
-
const durationMap = reactExports.useMemo(() => buildDurationMap(sortedEvents), [sortedEvents]);
|
|
64665
|
+
const durationMap = reactExports.useMemo(() => buildDurationMap(sortedEvents, duplicateEventIds), [sortedEvents, duplicateEventIds]);
|
|
64562
64666
|
const [selectedGroupKey, setSelectedGroupKey] = reactExports.useState(void 0);
|
|
64563
64667
|
const [hoveredGroupKey, setHoveredGroupKey] = reactExports.useState(void 0);
|
|
64564
64668
|
const onSelectGroup = reactExports.useCallback((groupKey) => {
|
|
@@ -64774,7 +64878,7 @@ function EventListViewInner({ events: events2, run: run2, onLoadEventData, hasMo
|
|
|
64774
64878
|
void (onLoadMoreEvents == null ? void 0 : onLoadMoreEvents());
|
|
64775
64879
|
}, itemContent: (index2) => {
|
|
64776
64880
|
const ev = sortedEvents[index2];
|
|
64777
|
-
return jsxRuntimeExports.jsx(EventRow$1, { event: ev, index: index2, isFirst: index2 === 0, isLast: index2 === sortedEvents.length - 1, isExpanded: expandedEventIds.has(ev.eventId), onToggleExpand: toggleEventExpanded, activeGroupKey, selectedGroupKey, selectedGroupRange, correlationNameMap, workflowName, durationMap, onSelectGroup, onHoverGroup, onLoadEventData, cachedEventData: eventDataCacheRef.current.get(ev.eventId) ?? null, onCacheEventData: cacheEventData, encryptionKey, onEncryptedDataDetected: handleEncryptedDataDetected, suppressGroupDimming: isExactSearchActive, showSeparateEventOccurrenceTimestamps });
|
|
64881
|
+
return jsxRuntimeExports.jsx(EventRow$1, { event: ev, index: index2, isFirst: index2 === 0, isLast: index2 === sortedEvents.length - 1, isExpanded: expandedEventIds.has(ev.eventId), onToggleExpand: toggleEventExpanded, activeGroupKey, selectedGroupKey, selectedGroupRange, correlationNameMap, workflowName, durationMap, onSelectGroup, onHoverGroup, onLoadEventData, cachedEventData: eventDataCacheRef.current.get(ev.eventId) ?? null, onCacheEventData: cacheEventData, encryptionKey, onEncryptedDataDetected: handleEncryptedDataDetected, suppressGroupDimming: isExactSearchActive, isDuplicate: duplicateEventIds.has(ev.eventId), showSeparateEventOccurrenceTimestamps });
|
|
64778
64882
|
}, style: { flex: 1, minHeight: 0 } }), jsxRuntimeExports.jsxs("div", { className: "relative flex-shrink-0 flex items-center h-10 border-t px-4 text-label-12", style: {
|
|
64779
64883
|
borderColor: "var(--ds-gray-alpha-200)",
|
|
64780
64884
|
color: "var(--ds-gray-900)",
|
|
@@ -64838,152 +64942,10 @@ function ResolveHookModal({ isOpen, onClose, onSubmit, isSubmitting = false }) {
|
|
|
64838
64942
|
if (!isOpen) {
|
|
64839
64943
|
return null;
|
|
64840
64944
|
}
|
|
64841
|
-
return jsxRuntimeExports.jsxs("div", {
|
|
64842
|
-
position: "fixed",
|
|
64843
|
-
inset: 0,
|
|
64844
|
-
zIndex: 50,
|
|
64845
|
-
display: "flex",
|
|
64846
|
-
alignItems: "center",
|
|
64847
|
-
justifyContent: "center"
|
|
64848
|
-
}, role: "dialog", "aria-modal": "true", "aria-labelledby": "resolve-hook-modal-title", children: [jsxRuntimeExports.jsx("div", { style: {
|
|
64849
|
-
position: "absolute",
|
|
64850
|
-
inset: 0,
|
|
64851
|
-
background: "rgba(0, 0, 0, 0.7)"
|
|
64852
|
-
}, onClick: isSubmitting ? void 0 : onClose }), jsxRuntimeExports.jsxs("div", { style: {
|
|
64853
|
-
position: "relative",
|
|
64854
|
-
zIndex: 10,
|
|
64855
|
-
width: 480,
|
|
64856
|
-
maxWidth: "calc(100% - 32px)",
|
|
64857
|
-
borderRadius: 12,
|
|
64858
|
-
border: "none",
|
|
64859
|
-
boxShadow: "var(--ds-shadow-menu)",
|
|
64860
|
-
background: "var(--ds-background-100)",
|
|
64861
|
-
color: "var(--ds-gray-1000)",
|
|
64862
|
-
overflow: "hidden"
|
|
64863
|
-
}, children: [jsxRuntimeExports.jsxs("div", { style: {
|
|
64864
|
-
display: "flex",
|
|
64865
|
-
alignItems: "center",
|
|
64866
|
-
justifyContent: "space-between",
|
|
64867
|
-
padding: "16px 24px"
|
|
64868
|
-
}, children: [jsxRuntimeExports.jsx("h2", { id: "resolve-hook-modal-title", style: {
|
|
64869
|
-
margin: 0,
|
|
64870
|
-
fontSize: 16,
|
|
64871
|
-
fontWeight: 600,
|
|
64872
|
-
color: "var(--ds-gray-1000)"
|
|
64873
|
-
}, children: "Resolve Hook" }), jsxRuntimeExports.jsx("button", { type: "button", onClick: onClose, disabled: isSubmitting, "aria-label": "Close modal", style: {
|
|
64874
|
-
display: "flex",
|
|
64875
|
-
alignItems: "center",
|
|
64876
|
-
justifyContent: "center",
|
|
64877
|
-
padding: 4,
|
|
64878
|
-
borderRadius: 6,
|
|
64879
|
-
border: "none",
|
|
64880
|
-
background: "transparent",
|
|
64881
|
-
color: "var(--ds-gray-900)",
|
|
64882
|
-
cursor: isSubmitting ? "not-allowed" : "pointer",
|
|
64883
|
-
opacity: isSubmitting ? 0.5 : 1,
|
|
64884
|
-
transition: "background 0.15s"
|
|
64885
|
-
}, onMouseEnter: (e) => {
|
|
64886
|
-
e.currentTarget.style.background = "var(--ds-gray-alpha-200)";
|
|
64887
|
-
}, onMouseLeave: (e) => {
|
|
64888
|
-
e.currentTarget.style.background = "transparent";
|
|
64889
|
-
}, children: jsxRuntimeExports.jsx(X$3, { style: { width: 16, height: 16 } }) })] }), jsxRuntimeExports.jsxs("form", { onSubmit: handleSubmit, children: [jsxRuntimeExports.jsxs("div", { style: { padding: "0 24px 16px" }, children: [jsxRuntimeExports.jsx("label", { htmlFor: "json-payload", style: {
|
|
64890
|
-
display: "block",
|
|
64891
|
-
fontSize: 14,
|
|
64892
|
-
fontWeight: 500,
|
|
64893
|
-
marginBottom: 6,
|
|
64894
|
-
color: "var(--ds-gray-1000)"
|
|
64895
|
-
}, children: "JSON Payload" }), jsxRuntimeExports.jsxs("p", { style: {
|
|
64896
|
-
fontSize: 13,
|
|
64897
|
-
marginBottom: 12,
|
|
64898
|
-
marginTop: 0,
|
|
64899
|
-
color: "var(--ds-gray-900)",
|
|
64900
|
-
lineHeight: 1.5
|
|
64901
|
-
}, children: ["Enter a JSON value to send to the hook. Leave empty to send", " ", jsxRuntimeExports.jsx("code", { style: {
|
|
64902
|
-
padding: "2px 6px",
|
|
64903
|
-
borderRadius: 4,
|
|
64904
|
-
fontSize: 12,
|
|
64905
|
-
fontFamily: 'var(--font-mono, ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace)',
|
|
64906
|
-
background: "var(--ds-gray-alpha-200)",
|
|
64907
|
-
color: "var(--ds-gray-1000)"
|
|
64908
|
-
}, children: "null" }), "."] }), jsxRuntimeExports.jsx("textarea", { ref: textareaRef, id: "json-payload", value: jsonInput, onChange: (e) => {
|
|
64945
|
+
return jsxRuntimeExports.jsxs("div", { className: "fixed inset-0 z-50 flex items-center justify-center", role: "dialog", "aria-modal": "true", "aria-labelledby": "resolve-hook-modal-title", children: [jsxRuntimeExports.jsx("div", { className: "absolute inset-0 bg-black/70", onClick: isSubmitting ? void 0 : onClose }), jsxRuntimeExports.jsxs("div", { className: "relative z-10 w-[480px] max-w-[calc(100%_-_32px)] overflow-hidden !border-none bg-background-100 text-gray-1000 material-menu", children: [jsxRuntimeExports.jsxs("div", { className: "flex items-center justify-between px-6 py-4", children: [jsxRuntimeExports.jsx("h2", { id: "resolve-hook-modal-title", className: "m-0 font-semibold text-base text-gray-1000", children: "Resolve Hook" }), jsxRuntimeExports.jsx("button", { type: "button", onClick: onClose, disabled: isSubmitting, "aria-label": "Close modal", className: "flex cursor-pointer items-center justify-center rounded-md !border-none !bg-transparent p-1 text-gray-900 transition-colors hover:!bg-gray-alpha-200 disabled:cursor-not-allowed disabled:opacity-50", children: jsxRuntimeExports.jsx(X$3, { className: "size-4" }) })] }), jsxRuntimeExports.jsxs("form", { onSubmit: handleSubmit, children: [jsxRuntimeExports.jsxs("div", { className: "px-6 pb-4", children: [jsxRuntimeExports.jsx("label", { htmlFor: "json-payload", className: "mb-1.5 block font-medium text-gray-1000 text-sm", children: "JSON Payload" }), jsxRuntimeExports.jsxs("p", { className: "mt-0 mb-3 text-[13px] text-gray-900 leading-[1.5]", children: ["Enter a JSON value to send to the hook. Leave empty to send", " ", jsxRuntimeExports.jsx("code", { className: "rounded bg-gray-alpha-200 px-1.5 py-0.5 font-mono text-gray-1000 text-xs", children: "null" }), "."] }), jsxRuntimeExports.jsx("textarea", { ref: textareaRef, id: "json-payload", value: jsonInput, onChange: (e) => {
|
|
64909
64946
|
setJsonInput(e.target.value);
|
|
64910
64947
|
setParseError(null);
|
|
64911
|
-
}, onKeyDown: handleKeyDown, disabled: isSubmitting, placeholder: '{"key": "value"}',
|
|
64912
|
-
width: "100%",
|
|
64913
|
-
height: 160,
|
|
64914
|
-
padding: "8px 12px",
|
|
64915
|
-
fontFamily: 'var(--font-mono, ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace)',
|
|
64916
|
-
fontSize: 13,
|
|
64917
|
-
lineHeight: 1.5,
|
|
64918
|
-
borderRadius: 8,
|
|
64919
|
-
border: `1px solid ${parseError ? "var(--ds-red-700)" : "var(--ds-gray-alpha-400)"}`,
|
|
64920
|
-
color: "var(--ds-gray-1000)",
|
|
64921
|
-
background: "var(--ds-background-100)",
|
|
64922
|
-
outline: "none",
|
|
64923
|
-
resize: "none",
|
|
64924
|
-
opacity: isSubmitting ? 0.5 : 1,
|
|
64925
|
-
cursor: isSubmitting ? "not-allowed" : "text",
|
|
64926
|
-
boxSizing: "border-box"
|
|
64927
|
-
} }), parseError && jsxRuntimeExports.jsx("p", { style: {
|
|
64928
|
-
marginTop: 8,
|
|
64929
|
-
fontSize: 13,
|
|
64930
|
-
color: "var(--ds-red-900)",
|
|
64931
|
-
margin: "8px 0 0"
|
|
64932
|
-
}, children: parseError }), jsxRuntimeExports.jsxs("p", { style: {
|
|
64933
|
-
marginTop: 8,
|
|
64934
|
-
fontSize: 12,
|
|
64935
|
-
color: "var(--ds-gray-800)",
|
|
64936
|
-
margin: "8px 0 0"
|
|
64937
|
-
}, children: ["Press", " ", jsxRuntimeExports.jsxs("kbd", { style: {
|
|
64938
|
-
padding: "2px 5px",
|
|
64939
|
-
borderRadius: 4,
|
|
64940
|
-
fontSize: 11,
|
|
64941
|
-
fontFamily: 'var(--font-mono, ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace)',
|
|
64942
|
-
background: "var(--ds-gray-alpha-200)",
|
|
64943
|
-
border: "1px solid var(--ds-gray-alpha-400)"
|
|
64944
|
-
}, children: [isMacPlatform ? "⌘" : "Ctrl", "+Enter"] }), " ", "to submit"] })] }), jsxRuntimeExports.jsxs("div", { style: {
|
|
64945
|
-
display: "flex",
|
|
64946
|
-
alignItems: "center",
|
|
64947
|
-
justifyContent: "flex-end",
|
|
64948
|
-
gap: 8,
|
|
64949
|
-
padding: "12px 24px",
|
|
64950
|
-
borderTop: "1px solid var(--ds-gray-alpha-400)"
|
|
64951
|
-
}, children: [jsxRuntimeExports.jsx("button", { type: "button", onClick: onClose, disabled: isSubmitting, style: {
|
|
64952
|
-
padding: "8px 16px",
|
|
64953
|
-
fontSize: 14,
|
|
64954
|
-
fontWeight: 500,
|
|
64955
|
-
borderRadius: 8,
|
|
64956
|
-
border: "1px solid var(--ds-gray-alpha-400)",
|
|
64957
|
-
background: "var(--ds-background-100)",
|
|
64958
|
-
color: "var(--ds-gray-1000)",
|
|
64959
|
-
cursor: isSubmitting ? "not-allowed" : "pointer",
|
|
64960
|
-
opacity: isSubmitting ? 0.5 : 1,
|
|
64961
|
-
transition: "background 0.15s"
|
|
64962
|
-
}, onMouseEnter: (e) => {
|
|
64963
|
-
e.currentTarget.style.background = "var(--ds-gray-alpha-100)";
|
|
64964
|
-
}, onMouseLeave: (e) => {
|
|
64965
|
-
e.currentTarget.style.background = "var(--ds-background-100)";
|
|
64966
|
-
}, children: "Cancel" }), jsxRuntimeExports.jsxs("button", { type: "button", onClick: () => void submitPayload(), disabled: isSubmitting, style: {
|
|
64967
|
-
display: "flex",
|
|
64968
|
-
alignItems: "center",
|
|
64969
|
-
gap: 6,
|
|
64970
|
-
padding: "8px 16px",
|
|
64971
|
-
fontSize: 14,
|
|
64972
|
-
fontWeight: 500,
|
|
64973
|
-
borderRadius: 8,
|
|
64974
|
-
border: "none",
|
|
64975
|
-
background: "var(--ds-gray-1000)",
|
|
64976
|
-
color: "var(--ds-background-100)",
|
|
64977
|
-
cursor: isSubmitting ? "not-allowed" : "pointer",
|
|
64978
|
-
opacity: isSubmitting ? 0.5 : 1,
|
|
64979
|
-
transition: "opacity 0.15s"
|
|
64980
|
-
}, onMouseEnter: (e) => {
|
|
64981
|
-
if (!isSubmitting)
|
|
64982
|
-
e.currentTarget.style.opacity = "0.9";
|
|
64983
|
-
}, onMouseLeave: (e) => {
|
|
64984
|
-
if (!isSubmitting)
|
|
64985
|
-
e.currentTarget.style.opacity = "1";
|
|
64986
|
-
}, children: [jsxRuntimeExports.jsx(Send, { style: { width: 14, height: 14 } }), isSubmitting ? "Sending..." : "Send Payload"] })] })] })] })] });
|
|
64948
|
+
}, onKeyDown: handleKeyDown, disabled: isSubmitting, placeholder: '{"key": "value"}', className: cn$4("box-border h-40 w-full resize-none rounded-lg border bg-background-100 px-3 py-2 font-mono text-[13px] text-gray-1000 leading-[1.5] outline-none disabled:cursor-not-allowed disabled:opacity-50", parseError ? "border-red-700" : "border-gray-alpha-400") }), parseError && jsxRuntimeExports.jsx("p", { className: "mt-2 mb-0 text-[13px] text-red-900", children: parseError }), jsxRuntimeExports.jsxs("p", { className: "mt-2 mb-0 text-gray-800 text-xs", children: ["Press", " ", jsxRuntimeExports.jsxs("kbd", { className: "rounded border border-gray-alpha-400 bg-gray-alpha-200 px-[5px] py-0.5 font-mono text-[11px]", children: [isMacPlatform ? "⌘" : "Ctrl", "+Enter"] }), " ", "to submit"] })] }), jsxRuntimeExports.jsxs("div", { className: "flex items-center justify-end gap-2 border-gray-alpha-400 border-t px-6 py-3", children: [jsxRuntimeExports.jsx("button", { type: "button", onClick: onClose, disabled: isSubmitting, className: "cursor-pointer rounded-lg border border-gray-alpha-400 bg-background-100 px-4 py-2 font-medium text-gray-1000 text-sm transition-colors hover:bg-gray-alpha-100 disabled:cursor-not-allowed disabled:opacity-50", children: "Cancel" }), jsxRuntimeExports.jsxs("button", { type: "button", onClick: () => void submitPayload(), disabled: isSubmitting, className: "flex cursor-pointer items-center gap-1.5 rounded-lg !border-none bg-gray-1000 px-4 py-2 font-medium text-background-100 text-sm transition-opacity hover:opacity-90 disabled:cursor-not-allowed disabled:opacity-50 disabled:hover:opacity-50", children: [jsxRuntimeExports.jsx(Send, { className: "size-3.5" }), isSubmitting ? "Sending..." : "Send Payload"] })] })] })] })] });
|
|
64987
64949
|
}
|
|
64988
64950
|
function useHookActions({ onResolve, callbacks }) {
|
|
64989
64951
|
const toast2 = useToast();
|
|
@@ -76557,7 +76519,7 @@ const knownMdxNames = /* @__PURE__ */ new Set([
|
|
|
76557
76519
|
"mdxTextExpression",
|
|
76558
76520
|
"mdxjsEsm"
|
|
76559
76521
|
]);
|
|
76560
|
-
const parseOptions = { sourceCodeLocationInfo: true, scriptingEnabled: false };
|
|
76522
|
+
const parseOptions$1 = { sourceCodeLocationInfo: true, scriptingEnabled: false };
|
|
76561
76523
|
function raw(tree, options) {
|
|
76562
76524
|
const document2 = documentMode(tree);
|
|
76563
76525
|
const one2 = zwitch("type", {
|
|
@@ -76565,7 +76527,7 @@ function raw(tree, options) {
|
|
|
76565
76527
|
unknown
|
|
76566
76528
|
});
|
|
76567
76529
|
const state = {
|
|
76568
|
-
parser: document2 ? new Parser(parseOptions) : Parser.getFragmentParser(void 0, parseOptions),
|
|
76530
|
+
parser: document2 ? new Parser(parseOptions$1) : Parser.getFragmentParser(void 0, parseOptions$1),
|
|
76569
76531
|
handle(node2) {
|
|
76570
76532
|
one2(node2, state);
|
|
76571
76533
|
},
|
|
@@ -91682,7 +91644,7 @@ var tn = f("block", "before:content-[counter(line)]", "before:inline-block", "be
|
|
|
91682
91644
|
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 });
|
|
91683
91645
|
var Se = reactExports.createContext({ code: "" }), de = () => reactExports.useContext(Se);
|
|
91684
91646
|
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 }) });
|
|
91685
|
-
var cn$1 = /\n+$/, dn = reactExports.lazy(() => import("./highlighted-body-B3W2YXNL-
|
|
91647
|
+
var cn$1 = /\n+$/, dn = reactExports.lazy(() => import("./highlighted-body-B3W2YXNL-DMhwZQgG.js").then((e) => ({ default: e.HighlightedCodeBlockBody }))), rt = ({ code: e, language: t, className: o, children: n, isIncomplete: s2 = false, ...r2 }) => {
|
|
91686
91648
|
let i = reactExports.useMemo(() => e.replace(cn$1, ""), [e]), c = reactExports.useMemo(() => ({ bg: "transparent", fg: "inherit", tokens: i.split(`
|
|
91687
91649
|
`).map((a2) => [{ content: a2, color: "inherit", bgColor: "transparent", htmlStyle: {}, offset: 0 }]) }), [i]);
|
|
91688
91650
|
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 }) })] }) });
|
|
@@ -92004,7 +91966,7 @@ var Dt = ({ children: e, className: t, onDownload: o, onError: n }) => {
|
|
|
92004
91966
|
}, []), 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] });
|
|
92005
91967
|
};
|
|
92006
91968
|
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 }) })] });
|
|
92007
|
-
var Jn = reactExports.lazy(() => import("./mermaid-3ZIDBTTL-
|
|
91969
|
+
var Jn = reactExports.lazy(() => import("./mermaid-3ZIDBTTL-CK9fLYE8.js").then((e) => ({ default: e.Mermaid }))), Kn = /language-([^\s]+)/;
|
|
92008
91970
|
function ke(e, t) {
|
|
92009
91971
|
if (!(e != null && e.position || t != null && t.position)) return true;
|
|
92010
91972
|
if (!(e != null && e.position && (t != null && t.position))) return false;
|
|
@@ -92448,76 +92410,59 @@ var Nt = ({ chart: e, className: t, config: o, fullscreen: n = false, showContro
|
|
|
92448
92410
|
};
|
|
92449
92411
|
function ConversationView({ messages }) {
|
|
92450
92412
|
if (messages.length === 0) {
|
|
92451
|
-
return jsxRuntimeExports.jsx("div", { className: "
|
|
92413
|
+
return jsxRuntimeExports.jsx("div", { className: "py-8 text-center text-[11px] text-gray-600", children: "No messages" });
|
|
92452
92414
|
}
|
|
92453
92415
|
return jsxRuntimeExports.jsx("div", { className: "flex flex-col gap-3 p-3", children: messages.map((message2, index2) => jsxRuntimeExports.jsx(MessageBubble, { message: message2 }, index2)) });
|
|
92454
92416
|
}
|
|
92455
92417
|
function MessageBubble({ message: message2 }) {
|
|
92456
92418
|
const role = message2.role;
|
|
92457
92419
|
const parts = parseContent(message2.content);
|
|
92458
|
-
const
|
|
92459
|
-
return jsxRuntimeExports.jsxs("div", { className:
|
|
92460
|
-
backgroundColor: style2.bg,
|
|
92461
|
-
borderColor: style2.border
|
|
92462
|
-
}, children: [jsxRuntimeExports.jsx("div", { className: "px-2.5 py-1 border-b text-[10px] font-medium uppercase tracking-wide", style: {
|
|
92463
|
-
borderColor: style2.border,
|
|
92464
|
-
color: style2.label
|
|
92465
|
-
}, children: role }), jsxRuntimeExports.jsx("div", { className: "px-2.5 py-2 space-y-2", children: parts.map((part, i) => jsxRuntimeExports.jsx(ContentPart, { part, role }, i)) })] });
|
|
92420
|
+
const roleClasses = getRoleClasses(role);
|
|
92421
|
+
return jsxRuntimeExports.jsxs("div", { className: `rounded-md border text-[11px] ${roleClasses.bubble}`, children: [jsxRuntimeExports.jsx("div", { className: `border-b px-2.5 py-1 font-medium text-[10px] uppercase tracking-wide ${roleClasses.label}`, children: role }), jsxRuntimeExports.jsx("div", { className: "px-2.5 py-2 space-y-2", children: parts.map((part, i) => jsxRuntimeExports.jsx(ContentPart, { part, role }, i)) })] });
|
|
92466
92422
|
}
|
|
92467
92423
|
function ContentPart({ part, role }) {
|
|
92468
92424
|
if (part.type === "text") {
|
|
92469
92425
|
if (!part.text)
|
|
92470
92426
|
return null;
|
|
92471
92427
|
if (role === "assistant") {
|
|
92472
|
-
return jsxRuntimeExports.jsx("div", { className: "prose prose-sm max-w-none text-[11px] [&>*:first-child]:mt-0 [&>*:last-child]:mb-0",
|
|
92428
|
+
return jsxRuntimeExports.jsx("div", { className: "prose prose-sm max-w-none text-[11px] text-gray-1000 [&>*:first-child]:mt-0 [&>*:last-child]:mb-0", children: jsxRuntimeExports.jsx(_r, { children: part.text }) });
|
|
92473
92429
|
}
|
|
92474
|
-
return jsxRuntimeExports.jsx("div", { className: "whitespace-pre-wrap break-words
|
|
92430
|
+
return jsxRuntimeExports.jsx("div", { className: "whitespace-pre-wrap break-words text-gray-1000", children: part.text });
|
|
92475
92431
|
}
|
|
92476
92432
|
if (part.type === "tool-call") {
|
|
92477
|
-
return jsxRuntimeExports.jsxs("div", { className: "rounded border px-2 py-1.5",
|
|
92478
|
-
backgroundColor: "var(--ds-purple-100)",
|
|
92479
|
-
borderColor: "var(--ds-purple-300)"
|
|
92480
|
-
}, children: [jsxRuntimeExports.jsxs("div", { className: "flex items-center gap-1.5 text-[10px] font-medium", children: [jsxRuntimeExports.jsx("span", { children: "🔧" }), jsxRuntimeExports.jsx("span", { style: { color: "var(--ds-purple-900)" }, children: part.toolName })] }), part.input != null && jsxRuntimeExports.jsx("div", { className: "mt-1.5 overflow-x-auto p-1.5 rounded", style: { backgroundColor: "var(--ds-gray-100)" }, children: typeof part.input === "string" ? jsxRuntimeExports.jsx("pre", { className: "text-[10px]", style: { color: "var(--ds-gray-800)" }, children: part.input }) : jsxRuntimeExports.jsx(DataInspector, { data: part.input }) })] });
|
|
92433
|
+
return jsxRuntimeExports.jsxs("div", { className: "rounded border border-purple-300 bg-purple-100 px-2 py-1.5", children: [jsxRuntimeExports.jsxs("div", { className: "flex items-center gap-1.5 text-[10px] font-medium", children: [jsxRuntimeExports.jsx("span", { children: "🔧" }), jsxRuntimeExports.jsx("span", { className: "text-purple-900", children: part.toolName })] }), part.input != null && jsxRuntimeExports.jsx("div", { className: "mt-1.5 overflow-x-auto rounded bg-gray-100 p-1.5", children: typeof part.input === "string" ? jsxRuntimeExports.jsx("pre", { className: "text-[10px] text-gray-800", children: part.input }) : jsxRuntimeExports.jsx(DataInspector, { data: part.input }) })] });
|
|
92481
92434
|
}
|
|
92482
92435
|
if (part.type === "tool-result") {
|
|
92483
|
-
return jsxRuntimeExports.jsxs("div", { className: "rounded border px-2 py-1.5",
|
|
92484
|
-
backgroundColor: "var(--ds-green-100)",
|
|
92485
|
-
borderColor: "var(--ds-green-300)"
|
|
92486
|
-
}, children: [jsxRuntimeExports.jsxs("div", { className: "flex items-center gap-1.5 text-[10px] font-medium", children: [jsxRuntimeExports.jsx("span", { children: "✓" }), jsxRuntimeExports.jsxs("span", { style: { color: "var(--ds-green-900)" }, children: [part.toolName, " result"] })] }), part.output != null && jsxRuntimeExports.jsx("div", { className: "mt-1.5 overflow-x-auto max-h-[200px] overflow-y-auto p-1.5 rounded", style: { backgroundColor: "var(--ds-gray-100)" }, children: typeof part.output === "string" ? jsxRuntimeExports.jsx("pre", { className: "text-[10px]", style: { color: "var(--ds-gray-800)" }, children: part.output }) : jsxRuntimeExports.jsx(DataInspector, { data: part.output, expandLevel: 1 }) })] });
|
|
92436
|
+
return jsxRuntimeExports.jsxs("div", { className: "rounded border border-green-300 bg-green-100 px-2 py-1.5", children: [jsxRuntimeExports.jsxs("div", { className: "flex items-center gap-1.5 text-[10px] font-medium", children: [jsxRuntimeExports.jsx("span", { children: "✓" }), jsxRuntimeExports.jsxs("span", { className: "text-green-900", children: [part.toolName, " result"] })] }), part.output != null && jsxRuntimeExports.jsx("div", { className: "mt-1.5 max-h-[200px] overflow-x-auto overflow-y-auto rounded bg-gray-100 p-1.5", children: typeof part.output === "string" ? jsxRuntimeExports.jsx("pre", { className: "text-[10px] text-gray-800", children: part.output }) : jsxRuntimeExports.jsx(DataInspector, { data: part.output, expandLevel: 1 }) })] });
|
|
92487
92437
|
}
|
|
92488
92438
|
return null;
|
|
92489
92439
|
}
|
|
92490
|
-
function
|
|
92440
|
+
function getRoleClasses(role) {
|
|
92491
92441
|
switch (role) {
|
|
92492
92442
|
case "user":
|
|
92493
92443
|
return {
|
|
92494
|
-
|
|
92495
|
-
|
|
92496
|
-
label: "var(--ds-blue-700)"
|
|
92444
|
+
bubble: "border-blue-300 bg-blue-100",
|
|
92445
|
+
label: "border-blue-300 text-blue-700"
|
|
92497
92446
|
};
|
|
92498
92447
|
case "assistant":
|
|
92499
92448
|
return {
|
|
92500
|
-
|
|
92501
|
-
|
|
92502
|
-
label: "var(--ds-gray-700)"
|
|
92449
|
+
bubble: "border-gray-300 bg-gray-100",
|
|
92450
|
+
label: "border-gray-300 text-gray-700"
|
|
92503
92451
|
};
|
|
92504
92452
|
case "system":
|
|
92505
92453
|
return {
|
|
92506
|
-
|
|
92507
|
-
|
|
92508
|
-
label: "var(--ds-amber-700)"
|
|
92454
|
+
bubble: "border-amber-300 bg-amber-100",
|
|
92455
|
+
label: "border-amber-300 text-amber-700"
|
|
92509
92456
|
};
|
|
92510
92457
|
case "tool":
|
|
92511
92458
|
return {
|
|
92512
|
-
|
|
92513
|
-
|
|
92514
|
-
label: "var(--ds-green-700)"
|
|
92459
|
+
bubble: "border-green-300 bg-green-100",
|
|
92460
|
+
label: "border-green-300 text-green-700"
|
|
92515
92461
|
};
|
|
92516
92462
|
default:
|
|
92517
92463
|
return {
|
|
92518
|
-
|
|
92519
|
-
|
|
92520
|
-
label: "var(--ds-gray-700)"
|
|
92464
|
+
bubble: "border-gray-300 bg-gray-100",
|
|
92465
|
+
label: "border-gray-300 text-gray-700"
|
|
92521
92466
|
};
|
|
92522
92467
|
}
|
|
92523
92468
|
}
|
|
@@ -92568,13 +92513,13 @@ function useSidebarDataOptional() {
|
|
|
92568
92513
|
return reactExports.useContext(SidebarDataContext);
|
|
92569
92514
|
}
|
|
92570
92515
|
const STREAM_SKELETON_ROWS = [
|
|
92571
|
-
{ id: "stream-skeleton-row-1",
|
|
92572
|
-
{ id: "stream-skeleton-row-2",
|
|
92573
|
-
{ id: "stream-skeleton-row-3",
|
|
92574
|
-
{ id: "stream-skeleton-row-4",
|
|
92516
|
+
{ id: "stream-skeleton-row-1", widthClassName: "w-[72%]" },
|
|
92517
|
+
{ id: "stream-skeleton-row-2", widthClassName: "w-[58%]" },
|
|
92518
|
+
{ id: "stream-skeleton-row-3", widthClassName: "w-4/5" },
|
|
92519
|
+
{ id: "stream-skeleton-row-4", widthClassName: "w-[64%]" }
|
|
92575
92520
|
];
|
|
92576
92521
|
function StreamViewerSkeleton() {
|
|
92577
|
-
return jsxRuntimeExports.jsxs("output", { "aria-busy": "true", "aria-label": "Loading stream", className: "flex h-full min-h-0 w-full flex-col overflow-hidden bg-background-100", children: [jsxRuntimeExports.jsx("span", { className: "sr-only", children: "Loading stream…" }), jsxRuntimeExports.jsx("div", { className: "flex h-10 min-h-10 items-center border-b border-gray-alpha-400 px-3", children: jsxRuntimeExports.jsx(Skeleton$1, { className: "h-3 w-10" }) }), jsxRuntimeExports.jsx("div", { className: "flex flex-col", children: STREAM_SKELETON_ROWS.map((row) => jsxRuntimeExports.jsxs("div", { className: "flex h-10 items-center gap-2 border-b border-gray-alpha-400 px-3", children: [jsxRuntimeExports.jsx(Skeleton$1, { className:
|
|
92522
|
+
return jsxRuntimeExports.jsxs("output", { "aria-busy": "true", "aria-label": "Loading stream", className: "flex h-full min-h-0 w-full flex-col overflow-hidden bg-background-100", children: [jsxRuntimeExports.jsx("span", { className: "sr-only", children: "Loading stream…" }), jsxRuntimeExports.jsx("div", { className: "flex h-10 min-h-10 items-center border-b border-gray-alpha-400 px-3", children: jsxRuntimeExports.jsx(Skeleton$1, { className: "h-3 w-10" }) }), jsxRuntimeExports.jsx("div", { className: "flex flex-col", children: STREAM_SKELETON_ROWS.map((row) => jsxRuntimeExports.jsxs("div", { className: "flex h-10 items-center gap-2 border-b border-gray-alpha-400 px-3", children: [jsxRuntimeExports.jsx(Skeleton$1, { className: `h-3 ${row.widthClassName}` }), jsxRuntimeExports.jsx(Skeleton$1, { className: "h-4 w-4 shrink-0 rounded-sm" })] }, row.id)) })] });
|
|
92578
92523
|
}
|
|
92579
92524
|
const ChunkRow = ReactExports.memo(function ChunkRow2({ chunk }) {
|
|
92580
92525
|
return jsxRuntimeExports.jsxs("div", { className: "flex w-full items-start gap-1 border-b border-gray-alpha-400 px-3 py-2", children: [jsxRuntimeExports.jsx("div", { className: "min-w-0 flex-1", children: typeof chunk.value === "string" ? jsxRuntimeExports.jsx("span", { className: "whitespace-pre-wrap break-words text-label-12 font-mono text-gray-1000", children: chunk.value }) : jsxRuntimeExports.jsx(DataInspector, { data: chunk.value, expandLevel: 1 }) }), jsxRuntimeExports.jsx(CopyButton, { copyText: serializeForClipboard(chunk.value), ariaLabel: "Copy chunk", className: "shrink-0 -mr-1 [&>div]:h-4 [&>div]:w-4 [&_svg]:h-4 [&_svg]:w-4" })] });
|
|
@@ -92595,7 +92540,7 @@ function StreamViewer({ streamId: _streamId, chunks, isLive, error: error2, isLo
|
|
|
92595
92540
|
if (isLoading && chunks.length === 0) {
|
|
92596
92541
|
return jsxRuntimeExports.jsx(StreamViewerSkeleton, {});
|
|
92597
92542
|
}
|
|
92598
|
-
return jsxRuntimeExports.jsxs("div", { className: "flex h-full w-full flex-col overflow-hidden bg-background-100", children: [jsxRuntimeExports.jsx("div", { className: "flex h-10 min-h-10 items-center gap-1.5 border-b border-gray-alpha-400 px-3", children: isLive && jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [jsxRuntimeExports.jsx("span", { className: "inline-block h-2 w-2 rounded-full bg-green-600" }), jsxRuntimeExports.jsx("span", { className: "text-label-12 text-green-700", children: "Live" })] }) }), jsxRuntimeExports.jsx("div", { className: "flex-1 min-h-0", children: error2 ? jsxRuntimeExports.jsxs("div", { className: "border-b border-red-400 bg-red-100 px-3 py-2 text-label-12 text-red-900", children: [jsxRuntimeExports.jsx("div", { children: "Error reading stream:" }), jsxRuntimeExports.jsx("div", { children: error2 })] }) : chunks.length === 0 ? jsxRuntimeExports.jsx("div", { className: "flex h-10 items-center border-b border-gray-alpha-400 bg-background-200 px-3 text-label-12 text-gray-900", children: isLive ? "Waiting for stream data..." : "Stream is empty" }) : jsxRuntimeExports.jsx(Yr, { ref: virtuosoRef, totalCount: chunks.length, overscan: 10, endReached: () => onScrollEnd == null ? void 0 : onScrollEnd(), itemContent: (index2) => jsxRuntimeExports.jsx("div", { className: "w-full", children: jsxRuntimeExports.jsx(ChunkRow, { chunk: chunks[index2] }) }),
|
|
92543
|
+
return jsxRuntimeExports.jsxs("div", { className: "flex h-full w-full flex-col overflow-hidden bg-background-100", children: [jsxRuntimeExports.jsx("div", { className: "flex h-10 min-h-10 items-center gap-1.5 border-b border-gray-alpha-400 px-3", children: isLive && jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [jsxRuntimeExports.jsx("span", { className: "inline-block h-2 w-2 rounded-full bg-green-600" }), jsxRuntimeExports.jsx("span", { className: "text-label-12 text-green-700", children: "Live" })] }) }), jsxRuntimeExports.jsx("div", { className: "flex-1 min-h-0", children: error2 ? jsxRuntimeExports.jsxs("div", { className: "border-b border-red-400 bg-red-100 px-3 py-2 text-label-12 text-red-900", children: [jsxRuntimeExports.jsx("div", { children: "Error reading stream:" }), jsxRuntimeExports.jsx("div", { children: error2 })] }) : chunks.length === 0 ? jsxRuntimeExports.jsx("div", { className: "flex h-10 items-center border-b border-gray-alpha-400 bg-background-200 px-3 text-label-12 text-gray-900", children: isLive ? "Waiting for stream data..." : "Stream is empty" }) : jsxRuntimeExports.jsx(Yr, { ref: virtuosoRef, totalCount: chunks.length, overscan: 10, endReached: () => onScrollEnd == null ? void 0 : onScrollEnd(), itemContent: (index2) => jsxRuntimeExports.jsx("div", { className: "w-full", children: jsxRuntimeExports.jsx(ChunkRow, { chunk: chunks[index2] }) }), className: "min-h-0 flex-1" }) })] });
|
|
92599
92544
|
}
|
|
92600
92545
|
function shouldShowVerticalLine(eventType) {
|
|
92601
92546
|
if (isHookLifecycleEventType(eventType)) {
|
|
@@ -92988,9 +92933,13 @@ function cascadeSpans(runSpan, spans) {
|
|
|
92988
92933
|
};
|
|
92989
92934
|
});
|
|
92990
92935
|
}
|
|
92991
|
-
function buildTrace(run2, events2, now2) {
|
|
92992
|
-
const
|
|
92993
|
-
|
|
92936
|
+
function buildTrace(run2, events2, now2, { isCompleteHistory = false } = {}) {
|
|
92937
|
+
const duplicateEventIds = findDuplicateEventIds(events2, {
|
|
92938
|
+
isCompleteHistory
|
|
92939
|
+
});
|
|
92940
|
+
const actedOnEvents = duplicateEventIds.size === 0 ? events2 : events2.filter((event) => !duplicateEventIds.has(event.eventId));
|
|
92941
|
+
const groupedEvents = groupEventsByCorrelation(actedOnEvents);
|
|
92942
|
+
const latestKnownTime = computeLatestKnownTime(actedOnEvents, run2);
|
|
92994
92943
|
const { runSpan, spans } = buildSpans(run2, groupedEvents, now2, latestKnownTime);
|
|
92995
92944
|
const sortedCascadingSpans = cascadeSpans(runSpan, spans);
|
|
92996
92945
|
const traceStartMs = otelTimeToMs(runSpan.startTime);
|
|
@@ -93007,34 +92956,72 @@ function buildTrace(run2, events2, now2) {
|
|
|
93007
92956
|
}
|
|
93008
92957
|
}
|
|
93009
92958
|
],
|
|
93010
|
-
knownDurationMs: Math.max(0, knownDurationMs)
|
|
92959
|
+
knownDurationMs: Math.max(0, knownDurationMs),
|
|
92960
|
+
duplicateEventIds
|
|
93011
92961
|
};
|
|
93012
92962
|
}
|
|
93013
|
-
const GUTTER_PX = 1;
|
|
93014
|
-
const MIN_PX = 50;
|
|
93015
|
-
const DEFAULT_START_PX = 340;
|
|
93016
|
-
function paneColTemplate(startPx) {
|
|
93017
|
-
return `${startPx}px ${GUTTER_PX}px minmax(${MIN_PX}px, 1fr)`;
|
|
93018
|
-
}
|
|
93019
|
-
const COL_TEMPLATE = paneColTemplate(DEFAULT_START_PX);
|
|
93020
92963
|
const ROWS = [
|
|
93021
|
-
{
|
|
93022
|
-
|
|
93023
|
-
|
|
93024
|
-
|
|
93025
|
-
|
|
93026
|
-
|
|
93027
|
-
|
|
93028
|
-
{
|
|
92964
|
+
{
|
|
92965
|
+
id: "r0",
|
|
92966
|
+
nameClassName: "w-[62%]",
|
|
92967
|
+
offsetClassName: "left-0",
|
|
92968
|
+
barClassName: "w-[72%]",
|
|
92969
|
+
topClassName: "top-0"
|
|
92970
|
+
},
|
|
92971
|
+
{
|
|
92972
|
+
id: "r1",
|
|
92973
|
+
nameClassName: "w-[78%]",
|
|
92974
|
+
offsetClassName: "left-[6%]",
|
|
92975
|
+
barClassName: "w-[48%]",
|
|
92976
|
+
topClassName: "top-[3.5px]"
|
|
92977
|
+
},
|
|
92978
|
+
{
|
|
92979
|
+
id: "r2",
|
|
92980
|
+
nameClassName: "w-1/2",
|
|
92981
|
+
offsetClassName: "left-[10%]",
|
|
92982
|
+
barClassName: "w-[55%]",
|
|
92983
|
+
topClassName: "top-[7px]"
|
|
92984
|
+
},
|
|
92985
|
+
{
|
|
92986
|
+
id: "r3",
|
|
92987
|
+
nameClassName: "w-[84%]",
|
|
92988
|
+
offsetClassName: "left-[18%]",
|
|
92989
|
+
barClassName: "w-[30%]",
|
|
92990
|
+
topClassName: "top-[10.5px]"
|
|
92991
|
+
},
|
|
92992
|
+
{
|
|
92993
|
+
id: "r4",
|
|
92994
|
+
nameClassName: "w-[45%]",
|
|
92995
|
+
offsetClassName: "left-[18%]",
|
|
92996
|
+
barClassName: "w-[42%]",
|
|
92997
|
+
topClassName: "top-[14px]"
|
|
92998
|
+
},
|
|
92999
|
+
{
|
|
93000
|
+
id: "r5",
|
|
93001
|
+
nameClassName: "w-[66%]",
|
|
93002
|
+
offsetClassName: "left-[34%]",
|
|
93003
|
+
barClassName: "w-[38%]",
|
|
93004
|
+
topClassName: "top-[17.5px]"
|
|
93005
|
+
},
|
|
93006
|
+
{
|
|
93007
|
+
id: "r6",
|
|
93008
|
+
nameClassName: "w-[55%]",
|
|
93009
|
+
offsetClassName: "left-[41%]",
|
|
93010
|
+
barClassName: "w-1/4",
|
|
93011
|
+
topClassName: "top-[21px]"
|
|
93012
|
+
},
|
|
93013
|
+
{
|
|
93014
|
+
id: "r7",
|
|
93015
|
+
nameClassName: "w-2/5",
|
|
93016
|
+
offsetClassName: "left-1/2",
|
|
93017
|
+
barClassName: "w-[30%]",
|
|
93018
|
+
topClassName: "top-[24.5px]"
|
|
93019
|
+
}
|
|
93029
93020
|
];
|
|
93030
93021
|
const HEADER_MARKERS = ["m0", "m1", "m2", "m3"];
|
|
93031
93022
|
const HeaderDivider = () => jsxRuntimeExports.jsx("div", { className: "flex justify-center", children: jsxRuntimeExports.jsx("span", { "aria-hidden": true, className: "h-full w-px bg-gray-alpha-400" }) });
|
|
93032
93023
|
function TraceViewerSkeleton() {
|
|
93033
|
-
return jsxRuntimeExports.jsxs("output", { "aria-busy": "true", "aria-label": "Loading trace", className: "flex flex-col w-full h-full min-h-0 bg-background-100", children: [jsxRuntimeExports.jsx("span", { className: "sr-only", children: "Loading trace…" }), jsxRuntimeExports.jsx("div", { className: "relative h-10 min-h-10 shrink-0 border-b border-gray-alpha-400", children: jsxRuntimeExports.jsx("div", { className: "absolute inset-x-4 top-[6px]", children: ROWS.map((row,
|
|
93034
|
-
left: `${row.off}%`,
|
|
93035
|
-
width: `${row.bar}%`,
|
|
93036
|
-
top: index2 * 3.5
|
|
93037
|
-
} }, row.id)) }) }), jsxRuntimeExports.jsxs("div", { className: "shrink-0 grid", style: { gridTemplateColumns: COL_TEMPLATE }, children: [jsxRuntimeExports.jsxs("div", { className: "h-10 min-h-10 flex items-center border-b border-gray-alpha-400 pl-4 pr-2 gap-1.5", children: [jsxRuntimeExports.jsx(Skeleton$1, { className: "w-3.5 h-3.5 shrink-0 rounded-sm" }), jsxRuntimeExports.jsx(Skeleton$1, { className: "h-3.5 w-40" })] }), jsxRuntimeExports.jsx(HeaderDivider, {}), jsxRuntimeExports.jsx("div", { className: "h-10 min-h-10 flex items-end border-b border-gray-alpha-400 px-4 pb-1 gap-2", children: jsxRuntimeExports.jsx("div", { className: "relative flex-1 flex items-end justify-between", children: HEADER_MARKERS.map((id2) => jsxRuntimeExports.jsx(Skeleton$1, { className: "h-3.5 w-9" }, id2)) }) })] }), jsxRuntimeExports.jsxs("div", { className: "grid flex-1 min-h-0 overflow-hidden", style: { gridTemplateColumns: COL_TEMPLATE }, children: [jsxRuntimeExports.jsx("div", { className: "block overflow-visible", children: jsxRuntimeExports.jsx("ul", { className: "block divide-y divide-gray-alpha-400 border-b border-gray-alpha-400", children: ROWS.map((row) => jsxRuntimeExports.jsxs("li", { className: "h-10 flex items-center pl-4 pr-2", children: [jsxRuntimeExports.jsxs("div", { className: "flex min-w-0 flex-1 items-center gap-2", children: [jsxRuntimeExports.jsx(Skeleton$1, { className: "w-4 h-4 shrink-0 rounded-sm" }), jsxRuntimeExports.jsx(Skeleton$1, { className: "h-3.5", style: { width: `${row.name}%` } })] }), jsxRuntimeExports.jsx(Skeleton$1, { className: "ml-2 h-3.5 w-10 shrink-0" })] }, row.id)) }) }), jsxRuntimeExports.jsx("span", { "aria-hidden": true, className: "h-full w-px bg-gray-alpha-400" }), jsxRuntimeExports.jsx("div", { className: "relative min-h-0", children: ROWS.map((row) => jsxRuntimeExports.jsx("div", { className: "relative h-10", children: jsxRuntimeExports.jsx("div", { className: "absolute inset-x-4 inset-y-0", children: jsxRuntimeExports.jsx(Skeleton$1, { className: "absolute top-1/2 -translate-y-1/2 h-6 rounded-[0.25rem]", style: { left: `${row.off}%`, width: `${row.bar}%` } }) }) }, row.id)) })] })] });
|
|
93024
|
+
return jsxRuntimeExports.jsxs("output", { "aria-busy": "true", "aria-label": "Loading trace", className: "flex flex-col w-full h-full min-h-0 bg-background-100", children: [jsxRuntimeExports.jsx("span", { className: "sr-only", children: "Loading trace…" }), jsxRuntimeExports.jsx("div", { className: "relative h-10 min-h-10 shrink-0 border-b border-gray-alpha-400", children: jsxRuntimeExports.jsx("div", { className: "absolute inset-x-4 top-[6px]", children: ROWS.map((row) => jsxRuntimeExports.jsx(Skeleton$1, { className: `absolute h-[3px] rounded-full ${row.offsetClassName} ${row.barClassName} ${row.topClassName}` }, row.id)) }) }), jsxRuntimeExports.jsxs("div", { className: "grid shrink-0 grid-cols-[340px_1px_minmax(50px,1fr)]", children: [jsxRuntimeExports.jsxs("div", { className: "h-10 min-h-10 flex items-center border-b border-gray-alpha-400 pl-4 pr-2 gap-1.5", children: [jsxRuntimeExports.jsx(Skeleton$1, { className: "w-3.5 h-3.5 shrink-0 rounded-sm" }), jsxRuntimeExports.jsx(Skeleton$1, { className: "h-3.5 w-40" })] }), jsxRuntimeExports.jsx(HeaderDivider, {}), jsxRuntimeExports.jsx("div", { className: "h-10 min-h-10 flex items-end border-b border-gray-alpha-400 px-4 pb-1 gap-2", children: jsxRuntimeExports.jsx("div", { className: "relative flex-1 flex items-end justify-between", children: HEADER_MARKERS.map((id2) => jsxRuntimeExports.jsx(Skeleton$1, { className: "h-3.5 w-9" }, id2)) }) })] }), jsxRuntimeExports.jsxs("div", { className: "grid min-h-0 flex-1 grid-cols-[340px_1px_minmax(50px,1fr)] overflow-hidden", children: [jsxRuntimeExports.jsx("div", { className: "block overflow-visible", children: jsxRuntimeExports.jsx("ul", { className: "block divide-y divide-gray-alpha-400 border-b border-gray-alpha-400", children: ROWS.map((row) => jsxRuntimeExports.jsxs("li", { className: "h-10 flex items-center pl-4 pr-2", children: [jsxRuntimeExports.jsxs("div", { className: "flex min-w-0 flex-1 items-center gap-2", children: [jsxRuntimeExports.jsx(Skeleton$1, { className: "w-4 h-4 shrink-0 rounded-sm" }), jsxRuntimeExports.jsx(Skeleton$1, { className: `h-3.5 ${row.nameClassName}` })] }), jsxRuntimeExports.jsx(Skeleton$1, { className: "ml-2 h-3.5 w-10 shrink-0" })] }, row.id)) }) }), jsxRuntimeExports.jsx("span", { "aria-hidden": true, className: "h-full w-px bg-gray-alpha-400" }), jsxRuntimeExports.jsx("div", { className: "relative min-h-0", children: ROWS.map((row) => jsxRuntimeExports.jsx("div", { className: "relative h-10", children: jsxRuntimeExports.jsx("div", { className: "absolute inset-x-4 inset-y-0", children: jsxRuntimeExports.jsx(Skeleton$1, { className: `absolute top-1/2 h-6 -translate-y-1/2 rounded-[0.25rem] ${row.offsetClassName} ${row.barClassName}` }) }) }, row.id)) })] })] });
|
|
93038
93025
|
}
|
|
93039
93026
|
function useIntersectionObserver(elementRef, { threshold = 0, rootRef, rootMargin = "0%", freezeOnceVisible = false } = {}) {
|
|
93040
93027
|
const [entry2, setEntry] = reactExports.useState();
|
|
@@ -93114,11 +93101,6 @@ const kbdVariants = cva("inline-flex items-center justify-center rounded px-1 te
|
|
|
93114
93101
|
function Kbd({ children: children2, className, variant, size: size2, ...props }) {
|
|
93115
93102
|
return jsxRuntimeExports.jsx("kbd", { className: cn$4(kbdVariants({ variant, size: size2, className })), ...props, children: children2 });
|
|
93116
93103
|
}
|
|
93117
|
-
const TooltipProvider = Provider$2;
|
|
93118
|
-
const Tooltip$1 = Root3$1;
|
|
93119
|
-
const TooltipTrigger$1 = Trigger$4;
|
|
93120
|
-
const TooltipContent$1 = reactExports.forwardRef(({ className, sideOffset = 8, showArrow = true, children: children2, ...props }, ref) => jsxRuntimeExports.jsx(Portal$6, { children: jsxRuntimeExports.jsxs(Content2$4, { ref, sideOffset, className: cn$4("z-[99999] flex items-center gap-1 rounded-[10px] bg-gray-1000 px-2 py-1.5 !text-label-13 text-background-100 shadow-md select-none", className), ...props, children: [children2, showArrow ? jsxRuntimeExports.jsx(Arrow2$1, { width: 11, height: 5, className: "fill-gray-1000" }) : null] }) }));
|
|
93121
|
-
TooltipContent$1.displayName = Content2$4.displayName;
|
|
93122
93104
|
const millisecondsInWeek = 6048e5;
|
|
93123
93105
|
const millisecondsInDay = 864e5;
|
|
93124
93106
|
const millisecondsInMinute = 6e4;
|
|
@@ -95210,7 +95192,7 @@ const formatEventTimestamp = (date2) => date2.toLocaleString(void 0, {
|
|
|
95210
95192
|
fractionalSecondDigits: 3,
|
|
95211
95193
|
timeZoneName: "short"
|
|
95212
95194
|
});
|
|
95213
|
-
function EventItem({ event, onLoadEventData, encryptionKey, showSeparateEventOccurrenceTimestamps = false }) {
|
|
95195
|
+
function EventItem({ event, onLoadEventData, encryptionKey, showSeparateEventOccurrenceTimestamps = false, isDuplicate = false }) {
|
|
95214
95196
|
const [loadedData, setLoadedData] = reactExports.useState(null);
|
|
95215
95197
|
const [isLoading, setIsLoading] = reactExports.useState(false);
|
|
95216
95198
|
const [loadError, setLoadError] = reactExports.useState(null);
|
|
@@ -95262,7 +95244,7 @@ function EventItem({ event, onLoadEventData, encryptionKey, showSeparateEventOcc
|
|
|
95262
95244
|
return jsxRuntimeExports.jsxs(CollapsibleRoot, { variant: "card", onOpenChange: canHaveData ? (open2) => {
|
|
95263
95245
|
if (open2)
|
|
95264
95246
|
handleExpand();
|
|
95265
|
-
} : void 0, children: [jsxRuntimeExports.jsx(CollapsibleTrigger, { className: "px-3 py-2", children: jsxRuntimeExports.jsxs("div", { className: "flex w-full items-center justify-between gap-3", children: [jsxRuntimeExports.jsx("span", { className:
|
|
95247
|
+
} : void 0, children: [jsxRuntimeExports.jsx(CollapsibleTrigger, { className: "px-3 py-2", children: jsxRuntimeExports.jsxs("div", { className: "flex w-full items-center justify-between gap-3", children: [jsxRuntimeExports.jsx(DuplicateEventTooltip, { isDuplicate, children: jsxRuntimeExports.jsx("span", { className: `text-label-12 font-mono ${isDuplicate ? "text-gray-700" : "text-gray-1000"}`, children: event.eventType }) }), jsxRuntimeExports.jsx("span", { className: "shrink-0 text-label-13 text-gray-900", children: displayedCreatedAtTime })] }) }), jsxRuntimeExports.jsxs(CollapsibleContent, { children: [jsxRuntimeExports.jsxs("div", { className: "flex flex-col bg-background-200 [&:has(+_*)]:border-b [&:has(+_*)]:border-gray-alpha-400", children: [showSeparateEventOccurrenceTimestamps && occurredAt && jsxRuntimeExports.jsxs("div", { className: "flex items-center justify-between gap-2 py-2 px-3", children: [jsxRuntimeExports.jsx("span", { className: "text-label-12 text-gray-900", children: "Occurred" }), jsxRuntimeExports.jsx(TimestampTooltip, { date: occurredAt, children: jsxRuntimeExports.jsx("span", { className: "max-w-[70%] truncate text-right text-label-12 font-mono", children: formatEventTimestamp(occurredAt) }) })] }), jsxRuntimeExports.jsxs("div", { className: "flex items-center justify-between gap-2 py-2 px-3", children: [jsxRuntimeExports.jsx("span", { className: "text-label-12 text-gray-900", children: "Event ID" }), jsxRuntimeExports.jsx("span", { className: "max-w-[70%] truncate text-right text-label-12 font-mono", children: event.eventId })] }), event.correlationId && jsxRuntimeExports.jsxs("div", { className: "flex items-center justify-between gap-2 py-2 px-3", children: [jsxRuntimeExports.jsx("span", { className: "text-label-12 text-gray-900", children: "Correlation ID" }), jsxRuntimeExports.jsx("span", { className: "max-w-[70%] truncate text-right text-label-12 font-mono", children: event.correlationId })] })] }), isLoading && jsxRuntimeExports.jsxs("div", { className: "p-3", children: [jsxRuntimeExports.jsx(Skeleton$1, { className: "h-4 w-[35%]" }), jsxRuntimeExports.jsx(Skeleton$1, { className: "mt-2 h-4 w-[90%]" }), jsxRuntimeExports.jsx(Skeleton$1, { className: "mt-2 h-4 w-[75%]" })] }), loadError && jsxRuntimeExports.jsx(ErrorCard, { title: "Failed to load event data", details: loadError, className: "mt-2" }), displayPayload != null && jsxRuntimeExports.jsx("div", { className: "[&>div]:border-none [&>div]:rounded-none", children: jsxRuntimeExports.jsx(EventDataBlock, { eventType: event.eventType, data: displayPayload }) })] })] });
|
|
95266
95248
|
}
|
|
95267
95249
|
function hasOnlyExpiredFields(data, eventType) {
|
|
95268
95250
|
if (data === null || typeof data !== "object" || Array.isArray(data)) {
|
|
@@ -95298,13 +95280,13 @@ function EventDataBlock({ eventType, data }) {
|
|
|
95298
95280
|
}
|
|
95299
95281
|
return jsxRuntimeExports.jsx(CopyableDataBlock, { data });
|
|
95300
95282
|
}
|
|
95301
|
-
function EventsList({ events: events2, isLoading = false, error: error2, onLoadEventData, onStreamClick, onRunClick, encryptionKey, showSeparateEventOccurrenceTimestamps = false }) {
|
|
95283
|
+
function EventsList({ events: events2, isLoading = false, error: error2, onLoadEventData, onStreamClick, onRunClick, encryptionKey, showSeparateEventOccurrenceTimestamps = false, duplicateEventIds }) {
|
|
95302
95284
|
const sortedEvents = reactExports.useMemo(() => [...events2].sort((a2, b2) => getEffectiveEventDate(a2).getTime() - getEffectiveEventDate(b2).getTime()), [events2]);
|
|
95303
95285
|
const hasEvents = sortedEvents.length > 0 && !error2;
|
|
95304
95286
|
if (!hasEvents && !isLoading) {
|
|
95305
95287
|
return jsxRuntimeExports.jsx(Collapsible, { label: "Events", disabled: true });
|
|
95306
95288
|
}
|
|
95307
|
-
return jsxRuntimeExports.jsx(RunClickContext.Provider, { value: onRunClick, children: jsxRuntimeExports.jsx(StreamClickContext.Provider, { value: onStreamClick, children: jsxRuntimeExports.jsxs(CollapsibleRoot, { defaultOpen: true, children: [jsxRuntimeExports.jsx(CollapsibleTrigger, { children: "Events" }), jsxRuntimeExports.jsx(CollapsibleContent, { className: "mb-0", children: isLoading ? jsxRuntimeExports.jsx("div", { className: "flex flex-col -mx-4", children: [0, 1, 2].map((i) => jsxRuntimeExports.jsxs("div", { className: "flex items-center justify-between gap-3 bg-background-200 px-4 py-2", children: [jsxRuntimeExports.jsx(Skeleton$1, { className: "h-4 w-32 rounded" }), jsxRuntimeExports.jsx(Skeleton$1, { className: "h-3 w-16 rounded" })] }, i)) }) : jsxRuntimeExports.jsx("div", { className: "flex flex-col -mx-4", children: sortedEvents.map((event) => jsxRuntimeExports.jsx(EventItem, { event, onLoadEventData, encryptionKey, showSeparateEventOccurrenceTimestamps }, event.eventId)) }) })] }) }) });
|
|
95289
|
+
return jsxRuntimeExports.jsx(RunClickContext.Provider, { value: onRunClick, children: jsxRuntimeExports.jsx(StreamClickContext.Provider, { value: onStreamClick, children: jsxRuntimeExports.jsxs(CollapsibleRoot, { defaultOpen: true, children: [jsxRuntimeExports.jsx(CollapsibleTrigger, { children: "Events" }), jsxRuntimeExports.jsx(CollapsibleContent, { className: "mb-0", children: isLoading ? jsxRuntimeExports.jsx("div", { className: "flex flex-col -mx-4", children: [0, 1, 2].map((i) => jsxRuntimeExports.jsxs("div", { className: "flex items-center justify-between gap-3 bg-background-200 px-4 py-2", children: [jsxRuntimeExports.jsx(Skeleton$1, { className: "h-4 w-32 rounded" }), jsxRuntimeExports.jsx(Skeleton$1, { className: "h-3 w-16 rounded" })] }, i)) }) : jsxRuntimeExports.jsx("div", { className: "flex flex-col -mx-4", children: sortedEvents.map((event) => jsxRuntimeExports.jsx(EventItem, { event, onLoadEventData, encryptionKey, showSeparateEventOccurrenceTimestamps, isDuplicate: duplicateEventIds == null ? void 0 : duplicateEventIds.has(event.eventId) }, event.eventId)) }) })] }) }) });
|
|
95308
95290
|
}
|
|
95309
95291
|
const hasField = (value, key) => key in value;
|
|
95310
95292
|
const RESOURCES_WITH_FETCHED_DETAIL = /* @__PURE__ */ new Set(["run", "step", "sleep"]);
|
|
@@ -95624,7 +95606,7 @@ function EntityDetailPanel({ run: run2, onStreamClick, onRunClick, fetchSpanDeta
|
|
|
95624
95606
|
}, children: [jsxRuntimeExports.jsx(Zap, { className: "h-4 w-4" }), stoppingSleep ? "Waking up..." : "Wake Up Sleep"] }), resource === "hook" && canResolveHook && jsxRuntimeExports.jsxs("button", { type: "button", onClick: () => setShowResolveHookModal(true), disabled: resolvingHook, className: clsx("flex items-center justify-center gap-2 rounded-md px-3 py-2 text-button-14", "disabled:opacity-50 disabled:cursor-not-allowed transition-colors", resolvingHook ? "opacity-50 cursor-not-allowed" : "cursor-pointer"), style: {
|
|
95625
95607
|
background: "var(--ds-gray-1000)",
|
|
95626
95608
|
color: "var(--ds-background-100)"
|
|
95627
|
-
}, children: [jsxRuntimeExports.jsx(Send, { className: "h-4 w-4" }), "Resolve Hook"] })] })] }), jsxRuntimeExports.jsx(AttributePanel, { data: displayData, moduleSpecifier, moduleSourceUrl, expiredAt: run2.expiredAt, isLoading: loading, error: error2 ?? void 0, onStreamClick, onRunClick, onDecrypt, isDecrypting, resource }), rawEvents && jsxRuntimeExports.jsx(EventsList, { events: rawEvents, onLoadEventData, onStreamClick, onRunClick, encryptionKey, showSeparateEventOccurrenceTimestamps })] }) }), jsxRuntimeExports.jsx(ResolveHookModal, { isOpen: showResolveHookModal, onClose: () => setShowResolveHookModal(false), onSubmit: handleResolveHook, isSubmitting: resolvingHook })] });
|
|
95609
|
+
}, children: [jsxRuntimeExports.jsx(Send, { className: "h-4 w-4" }), "Resolve Hook"] })] })] }), jsxRuntimeExports.jsx(AttributePanel, { data: displayData, moduleSpecifier, moduleSourceUrl, expiredAt: run2.expiredAt, isLoading: loading, error: error2 ?? void 0, onStreamClick, onRunClick, onDecrypt, isDecrypting, resource }), rawEvents && jsxRuntimeExports.jsx(EventsList, { events: rawEvents, onLoadEventData, onStreamClick, onRunClick, encryptionKey, showSeparateEventOccurrenceTimestamps, duplicateEventIds: selectedSpan == null ? void 0 : selectedSpan.duplicateEventIds })] }) }), jsxRuntimeExports.jsx(ResolveHookModal, { isOpen: showResolveHookModal, onClose: () => setShowResolveHookModal(false), onSubmit: handleResolveHook, isSubmitting: resolvingHook })] });
|
|
95628
95610
|
}
|
|
95629
95611
|
const ActiveSpanContext = reactExports.createContext(null);
|
|
95630
95612
|
ActiveSpanContext.displayName = "ActiveSpanContext";
|
|
@@ -95846,7 +95828,8 @@ function useSelectedSpanInfo() {
|
|
|
95846
95828
|
data: (_b2 = activeSpan.attributes) == null ? void 0 : _b2.data,
|
|
95847
95829
|
resource,
|
|
95848
95830
|
spanId: activeSpan.spanId,
|
|
95849
|
-
rawEvents
|
|
95831
|
+
rawEvents,
|
|
95832
|
+
duplicateEventIds: sidebar.duplicateEventIds
|
|
95850
95833
|
};
|
|
95851
95834
|
}, [activeSpan, sidebar]);
|
|
95852
95835
|
}
|
|
@@ -95922,16 +95905,16 @@ function TraceDetailPanel({ containerRef, onNavigateToSpan, onClose }) {
|
|
|
95922
95905
|
return jsxRuntimeExports.jsxs("aside", { ref: asideRef, id: DETAIL_PANEL_ID, className: "relative flex flex-col h-full max-h-full shrink-0 bg-background-100 border-l border-gray-alpha-400", style: { width: panelWidth }, children: [jsxRuntimeExports.jsx(DraggableBorder, { element: asideRef, position: "left", onWidthChange: handleResize, onReset: () => handleResize(PANEL_DEFAULT_WIDTH), "aria-label": "Resize span details panel", "aria-controls": DETAIL_PANEL_ID, "aria-valuemin": PANEL_MIN_WIDTH, "aria-valuemax": panelMaxWidth, "aria-valuenow": Math.min(Math.max(Math.round(panelWidth), PANEL_MIN_WIDTH), panelMaxWidth) }), jsxRuntimeExports.jsxs("div", { className: "flex items-center justify-between gap-2 shrink-0 px-4 py-[7.5px]", 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: handleSelectPrev, 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: handleSelectNext, 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: onClose, 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, fetchSpanDetail: sidebar.fetchSpanDetail, onWakeUpSleep: sidebar.onWakeUpSleep, onLoadEventData: sidebar.onLoadEventData, onResolveHook: sidebar.onResolveHook, encryptionKey: sidebar.encryptionKey, onDecrypt: sidebar.onDecrypt, isDecrypting: sidebar.isDecrypting, selectedSpan, showSeparateEventOccurrenceTimestamps: sidebar.showSeparateEventOccurrenceTimestamps, getModuleSourceUrl: sidebar.getModuleSourceUrl }) }) })] });
|
|
95923
95906
|
}
|
|
95924
95907
|
const WorkflowIcon = () => {
|
|
95925
|
-
return jsxRuntimeExports.jsx("svg", { "data-testid": "geist-icon", height: "16", strokeLinejoin: "round",
|
|
95908
|
+
return jsxRuntimeExports.jsx("svg", { "aria-hidden": "true", "data-testid": "geist-icon", height: "16", strokeLinejoin: "round", viewBox: "0 0 16 16", width: "16", children: jsxRuntimeExports.jsx("path", { d: "M5.75 7L6.4209 7.33594L4.85254 10.4717C5.38789 10.771 5.75 11.3431 5.75 12V14C5.75 14.9665 4.96648 15.75 4 15.75H2C1.03352 15.75 0.25 14.9665 0.25 14V12C0.25 11.0335 1.03352 10.25 2 10.25H3.28711L5.0791 6.66504L5.75 7ZM14 10.25C14.9665 10.25 15.75 11.0335 15.75 12V14C15.75 14.9665 14.9665 15.75 14 15.75H12C11.1185 15.75 10.3909 15.098 10.2695 14.25H7V12.75H10.25V12C10.25 11.0335 11.0335 10.25 12 10.25H14ZM2 11.75C1.86192 11.75 1.75 11.8619 1.75 12V14C1.75 14.1381 1.86192 14.25 2 14.25H4C4.13808 14.25 4.25 14.1381 4.25 14V12C4.25 11.8619 4.13808 11.75 4 11.75H2ZM12 11.75C11.8619 11.75 11.75 11.8619 11.75 12V14C11.75 14.1381 11.8619 14.25 12 14.25H14C14.1381 14.25 14.25 14.1381 14.25 14V12C14.25 11.8619 14.1381 11.75 14 11.75H12ZM9 0.25C9.96649 0.25 10.75 1.03351 10.75 2V4C10.75 4.44642 10.5808 4.85197 10.3057 5.16113L12.2041 8.6416L10.8877 9.36035L8.91895 5.75H7C6.03351 5.75 5.25 4.96649 5.25 4V2C5.25 1.03351 6.03351 0.25 7 0.25H9ZM7 1.75C6.86193 1.75 6.75 1.86193 6.75 2V4C6.75 4.13807 6.86193 4.25 7 4.25H9C9.13807 4.25 9.25 4.13807 9.25 4V2C9.25 1.86193 9.13807 1.75 9 1.75H7Z", fill: "currentColor" }) });
|
|
95926
95909
|
};
|
|
95927
95910
|
const WebhookIcon = () => {
|
|
95928
|
-
return jsxRuntimeExports.jsx("svg", { "data-testid": "geist-icon", height: "16", strokeLinejoin: "round", viewBox: "0 0 16 16", width: "16",
|
|
95911
|
+
return jsxRuntimeExports.jsx("svg", { "aria-hidden": "true", "data-testid": "geist-icon", height: "16", strokeLinejoin: "round", viewBox: "0 0 16 16", width: "16", children: jsxRuntimeExports.jsx("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M5.8349 3.24994C5.14454 4.44567 5.55423 5.97464 6.74996 6.665L7.39465 7.03721L7.02726 7.68466L5.14599 11C5.21289 11.1531 5.25 11.3222 5.25 11.5C5.25 12.1904 4.69036 12.75 4 12.75C3.30964 12.75 2.75 12.1904 2.75 11.5C2.75 10.8634 3.22584 10.338 3.84123 10.26L5.38944 7.5316C3.95909 6.30274 3.55857 4.19264 4.53586 2.49994C5.64043 0.586765 8.08679 -0.0687357 9.99996 1.03583C11.836 2.09584 12.5137 4.39156 11.5892 6.26591L10.4949 4.33754C10.4418 3.53274 10.0009 2.76843 9.24996 2.33487C8.05423 1.64452 6.52525 2.0542 5.8349 3.24994ZM9.146 4.99996C9.21289 4.84686 9.25 4.67776 9.25 4.5C9.25 3.80964 8.69036 3.25 8 3.25C7.30964 3.25 6.75 3.80964 6.75 4.5C6.75 5.13659 7.22586 5.66203 7.84127 5.74002L9.72266 9.05556L10.0956 9.71274L10.75 9.33493C11.9457 8.64458 13.4747 9.05427 14.165 10.25C14.8554 11.4457 14.4457 12.9747 13.25 13.6651C12.5047 14.0953 11.63 14.0983 10.9096 13.75H8.69252C9.85895 15.4685 12.1727 16.0191 14 14.9641C15.9131 13.8595 16.5686 11.4132 15.4641 9.5C14.4886 7.81038 12.4665 7.10169 10.6895 7.71998L9.146 4.99996ZM13.25 11.5C13.25 12.1904 12.6904 12.75 12 12.75C11.591 12.75 11.228 12.5536 10.9999 12.25H7.9298C7.57875 14.1006 5.95279 15.5 4 15.5C1.79086 15.5 0 13.7091 0 11.5C0 9.40018 1.61801 7.67826 3.67529 7.51299L2.58098 9.44147C1.92792 9.89251 1.5 10.6463 1.5 11.5C1.5 12.8807 2.61929 14 4 14C5.38071 14 6.5 12.8807 6.5 11.5V10.75H7.25H10.9999C11.228 10.4464 11.591 10.25 12 10.25C12.6904 10.25 13.25 10.8096 13.25 11.5Z", fill: "currentColor" }) });
|
|
95929
95912
|
};
|
|
95930
95913
|
const SleepIcon = () => {
|
|
95931
|
-
return jsxRuntimeExports.jsx("svg", { "data-testid": "geist-icon", height: "16", strokeLinejoin: "round", viewBox: "0 0 16 16", width: "16",
|
|
95914
|
+
return jsxRuntimeExports.jsx("svg", { "aria-hidden": "true", "data-testid": "geist-icon", height: "16", strokeLinejoin: "round", viewBox: "0 0 16 16", width: "16", children: jsxRuntimeExports.jsx("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M7.25 1.25V2.03971C5.87928 2.18571 4.62678 2.72736 3.6089 3.54824L3.03033 2.96967L2.5 2.43934L1.43934 3.5L1.96967 4.03033L2.54824 4.6089C1.57979 5.80976 1 7.33717 1 9C1 12.866 4.13401 16 8 16C11.866 16 15 12.866 15 9C15 7.33717 14.4202 5.80976 13.4518 4.6089L14.0303 4.03033L14.5607 3.5L13.5 2.43934L12.9697 2.96967L12.3911 3.54824C11.3732 2.72736 10.1207 2.18571 8.75 2.03971V1.25H9.25H10V-0.25H9.25H8.75H7.25H6.75H6V1.25H6.75H7.25ZM2.5 9C2.5 5.96243 4.96243 3.5 8 3.5C11.0376 3.5 13.5 5.96243 13.5 9C13.5 12.0376 11.0376 14.5 8 14.5C4.96243 14.5 2.5 12.0376 2.5 9ZM8.75 6.75V6H7.25V6.75V9V9.75H8.75V9V6.75Z", fill: "currentColor" }) });
|
|
95932
95915
|
};
|
|
95933
95916
|
const StepForwardIcon = () => {
|
|
95934
|
-
return jsxRuntimeExports.jsx("svg", { "data-testid": "geist-icon", height: "16", strokeLinejoin: "round", viewBox: "0 0 16 16", width: "16",
|
|
95917
|
+
return jsxRuntimeExports.jsx("svg", { "aria-hidden": "true", "data-testid": "geist-icon", height: "16", strokeLinejoin: "round", viewBox: "0 0 16 16", width: "16", children: jsxRuntimeExports.jsx("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M4.21969 12.5303L4.75002 13.0607L5.81068 12L5.28035 11.4697L1.81068 7.99999L5.28035 4.53032L5.81068 3.99999L4.75002 2.93933L4.21969 3.46966L0.39647 7.29289C0.00594562 7.68341 0.00594562 8.31658 0.39647 8.7071L4.21969 12.5303ZM11.7804 12.5303L11.25 13.0607L10.1894 12L10.7197 11.4697L14.1894 7.99999L10.7197 4.53032L10.1894 3.99999L11.25 2.93933L11.7804 3.46966L15.6036 7.29289C15.9941 7.68341 15.9941 8.31658 15.6036 8.7071L11.7804 12.5303Z", fill: "currentColor" }) });
|
|
95935
95918
|
};
|
|
95936
95919
|
const ATTR_FILTER_REGEX = /(?:^|\s)(?<pair>(?<key>[\w.]+):(?<value>\S*))/g;
|
|
95937
95920
|
function parseSpanSearchQuery(rawQuery) {
|
|
@@ -96209,41 +96192,31 @@ function computeSpanDelta(anchor, hovered, viewStart, viewEnd) {
|
|
|
96209
96192
|
hoveredOffscreen: hoveredStart > viewEnd ? "right" : hoveredEnd < viewStart ? "left" : null
|
|
96210
96193
|
};
|
|
96211
96194
|
}
|
|
96212
|
-
const
|
|
96195
|
+
const RESOURCE_CLASS_NAMES = {
|
|
96213
96196
|
run: {
|
|
96214
|
-
|
|
96215
|
-
|
|
96216
|
-
errorBg: "var(--ds-red-200)",
|
|
96217
|
-
errorBorder: "var(--ds-red-500)"
|
|
96197
|
+
className: "border-blue-500 bg-blue-200",
|
|
96198
|
+
errorClassName: "border-red-500 bg-red-200"
|
|
96218
96199
|
},
|
|
96219
96200
|
step: {
|
|
96220
|
-
|
|
96221
|
-
|
|
96222
|
-
errorBg: "var(--ds-red-200)",
|
|
96223
|
-
errorBorder: "var(--ds-red-500)"
|
|
96201
|
+
className: "border-green-500 bg-green-200",
|
|
96202
|
+
errorClassName: "border-red-500 bg-red-200"
|
|
96224
96203
|
},
|
|
96225
96204
|
// Passive spans (hooks) stay gray — matches event-list icons and the minimap.
|
|
96226
96205
|
hook: {
|
|
96227
|
-
|
|
96228
|
-
|
|
96229
|
-
errorBg: "var(--ds-red-200)",
|
|
96230
|
-
errorBorder: "var(--ds-red-500)"
|
|
96206
|
+
className: "border-gray-500 bg-gray-200",
|
|
96207
|
+
errorClassName: "border-red-500 bg-red-200"
|
|
96231
96208
|
},
|
|
96232
96209
|
sleep: {
|
|
96233
|
-
|
|
96234
|
-
|
|
96235
|
-
errorBg: "var(--ds-red-200)",
|
|
96236
|
-
errorBorder: "var(--ds-red-500)"
|
|
96210
|
+
className: "border-purple-500 bg-purple-200",
|
|
96211
|
+
errorClassName: "border-red-500 bg-red-200"
|
|
96237
96212
|
},
|
|
96238
96213
|
default: {
|
|
96239
|
-
|
|
96240
|
-
|
|
96241
|
-
errorBg: "var(--ds-red-200)",
|
|
96242
|
-
errorBorder: "var(--ds-red-500)"
|
|
96214
|
+
className: "border-gray-500 bg-gray-200",
|
|
96215
|
+
errorClassName: "border-red-500 bg-red-200"
|
|
96243
96216
|
}
|
|
96244
96217
|
};
|
|
96245
|
-
function
|
|
96246
|
-
return
|
|
96218
|
+
function getResourceClassNames(resource) {
|
|
96219
|
+
return RESOURCE_CLASS_NAMES[resource] ?? RESOURCE_CLASS_NAMES.default;
|
|
96247
96220
|
}
|
|
96248
96221
|
function clampFraction(value) {
|
|
96249
96222
|
return Math.max(0, Math.min(1, value));
|
|
@@ -96622,10 +96595,6 @@ const SEGMENT_CLASSES = {
|
|
|
96622
96595
|
sleeping: "bg-gray-400 border border-gray-500",
|
|
96623
96596
|
received: "bg-blue-200 border border-blue-500"
|
|
96624
96597
|
};
|
|
96625
|
-
const TIMELINE_INSET_STYLE = {
|
|
96626
|
-
left: TIMELINE_PADDING_PX,
|
|
96627
|
-
right: TIMELINE_PADDING_PX
|
|
96628
|
-
};
|
|
96629
96598
|
const STRIPED_SEGMENT_STATUSES = /* @__PURE__ */ new Set([
|
|
96630
96599
|
"pending",
|
|
96631
96600
|
"running",
|
|
@@ -96706,8 +96675,8 @@ function BoundaryArrow({ direction }) {
|
|
|
96706
96675
|
const Icon2 = direction === "right" ? ArrowRight : ArrowLeft;
|
|
96707
96676
|
return jsxRuntimeExports.jsx("div", { className: "flex h-6 w-6 items-center justify-center rounded-[0.25rem]", children: jsxRuntimeExports.jsx(Icon2, { className: "size-3 text-gray-900" }) });
|
|
96708
96677
|
}
|
|
96709
|
-
function PlainBar({
|
|
96710
|
-
return jsxRuntimeExports.jsx("div", { className: "relative h-6 w-full min-w-1 rounded-[0.25rem] border",
|
|
96678
|
+
function PlainBar({ className, label }) {
|
|
96679
|
+
return jsxRuntimeExports.jsx("div", { className: cn$4("relative h-6 w-full min-w-1 rounded-[0.25rem] border", className), children: label ? jsxRuntimeExports.jsx(DurationLabel, { label }) : null });
|
|
96711
96680
|
}
|
|
96712
96681
|
function LeadInConnector({ leftPct, widthPct, label }) {
|
|
96713
96682
|
return jsxRuntimeExports.jsxs("div", { className: "absolute top-1/2 h-6 -translate-y-1/2", style: {
|
|
@@ -96727,11 +96696,10 @@ function SegmentBar({ segments, showLabels = true }) {
|
|
|
96727
96696
|
}
|
|
96728
96697
|
const label = formatDurationPrecise(seg.fullDurationMs);
|
|
96729
96698
|
const showLabel = showLabels && seg.pixelWidth >= Math.max(40, estimateLabelWidthPx(label));
|
|
96730
|
-
return jsxRuntimeExports.jsxs("div", { className: cn$4("absolute h-full overflow-hidden rounded-[0.25rem]", SEGMENT_CLASSES[seg.status]), style: {
|
|
96699
|
+
return jsxRuntimeExports.jsxs("div", { className: cn$4("absolute h-full min-w-px overflow-hidden rounded-[0.25rem]", SEGMENT_CLASSES[seg.status]), style: {
|
|
96731
96700
|
// 1px gap between adjacent segments, distributed equally.
|
|
96732
96701
|
left: `calc(${seg.leftPct}% + 0.5px)`,
|
|
96733
|
-
width: `calc(${seg.widthPct}% - 1px)
|
|
96734
|
-
minWidth: 1
|
|
96702
|
+
width: `calc(${seg.widthPct}% - 1px)`
|
|
96735
96703
|
}, children: [STRIPED_SEGMENT_STATUSES.has(seg.status) ? jsxRuntimeExports.jsx(AnimatedStripes, { status: seg.status }) : null, showLabel ? jsxRuntimeExports.jsx(DurationLabel, { label }) : null] }, i);
|
|
96736
96704
|
}) });
|
|
96737
96705
|
}
|
|
@@ -96747,15 +96715,14 @@ const TimelineBar = reactExports.memo(function TimelineBar2({ span, viewStart, v
|
|
|
96747
96715
|
const offscreen = reactExports.useMemo(() => geometry.mode.kind === "full" ? computeOffscreenMarkers(baseMarkers, geometry.visibleStartMs, geometry.visibleEndMs) : { left: null, right: null }, [geometry, baseMarkers]);
|
|
96748
96716
|
const hasMarkers = markers.length > 0 || offscreen.left !== null || offscreen.right !== null;
|
|
96749
96717
|
const isErrored = isSpanErrored(span);
|
|
96750
|
-
const colors =
|
|
96751
|
-
const
|
|
96752
|
-
const fallbackBorder = isErrored ? colors.errorBorder ?? "var(--ds-red-500)" : colors.border;
|
|
96718
|
+
const colors = getResourceClassNames(span.resource);
|
|
96719
|
+
const fallbackClassName = isErrored ? colors.errorClassName ?? "border-red-500 bg-red-200" : colors.className;
|
|
96753
96720
|
const totalLabel = formatDurationPrecise(totalDurationMs);
|
|
96754
96721
|
const showTotalLabel = geometry.visiblePixelWidth >= Math.max(40, estimateLabelWidthPx(totalLabel));
|
|
96755
96722
|
const handleClick = reactExports.useCallback(() => {
|
|
96756
96723
|
onSelect(span.spanId);
|
|
96757
96724
|
}, [onSelect, span.spanId]);
|
|
96758
|
-
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",
|
|
96725
|
+
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-x-4 inset-y-0", 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: cn$4("h-6 rounded-[0.25rem] border", fallbackClassName) }) : segments.length > 0 ? jsxRuntimeExports.jsx(SegmentBar, { segments, showLabels: !hasMarkers }) : jsxRuntimeExports.jsx(PlainBar, { className: fallbackClassName, 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: [markers.length > 0 ? jsxRuntimeExports.jsx(MarkerLayer, { markers }) : 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, {
|
|
96759
96726
|
label: totalLabel,
|
|
96760
96727
|
// Shift clear of the left edge indicator so it isn't covered.
|
|
96761
96728
|
className: offscreen.left ? "pl-10" : void 0
|
|
@@ -96776,9 +96743,8 @@ const DeltaMeasureLine = reactExports.memo(function DeltaMeasureLine2({ delta, a
|
|
|
96776
96743
|
const label = formatDurationPrecise(delta.deltaMs);
|
|
96777
96744
|
const labelWidthPx = estimateLabelWidthPx(label);
|
|
96778
96745
|
const labelPlacement = endX - startX >= labelWidthPx ? { left: (startX + endX) / 2, translate: "-translate-x-1/2" } : endX + 4 + labelWidthPx <= timelineWidth ? { left: endX + 4, translate: "" } : { left: startX - 4, translate: "-translate-x-full" };
|
|
96779
|
-
return jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [jsxRuntimeExports.jsx("div", { className: "absolute h-px bg-amber-800", style: {
|
|
96746
|
+
return jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [jsxRuntimeExports.jsx("div", { className: "absolute h-px w-1 bg-amber-800", style: {
|
|
96780
96747
|
left: Math.min(anchorX, guideX),
|
|
96781
|
-
width: MEASURE_GUIDE_OUTSET_PX,
|
|
96782
96748
|
top: anchorCenterY
|
|
96783
96749
|
} }), jsxRuntimeExports.jsx("div", { className: "absolute w-px bg-amber-800", style: {
|
|
96784
96750
|
left: guideX,
|
|
@@ -96828,10 +96794,10 @@ function Timeline({ spans, viewStart, viewEnd, markers, selectedId, searchResult
|
|
|
96828
96794
|
const delta = computeSpanDelta(anchorSpan, hoveredSpan, viewStart, viewEnd);
|
|
96829
96795
|
return delta ? { delta, anchorRowIndex: anchorIndex, hoveredRowIndex: hover.rowIndex } : null;
|
|
96830
96796
|
}, [altHeld, anchorIndex, hover, spans, viewStart, viewEnd]);
|
|
96831
|
-
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-
|
|
96797
|
+
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: "pointer-events-none absolute inset-x-4 inset-y-0", children: markers.map((marker) => (
|
|
96832
96798
|
// Skip the "0s" origin marker since the left edge already implies it.
|
|
96833
96799
|
Math.abs(marker.value) > 1e-6 ? jsxRuntimeExports.jsx("div", { className: "absolute top-0 bottom-0 w-px bg-gray-alpha-300", style: { left: `${marker.position * 100}%` } }, String(marker.value)) : null
|
|
96834
|
-
)) }), hover != null && jsxRuntimeExports.jsx("div", { className: "absolute inset-
|
|
96800
|
+
)) }), hover != null && jsxRuntimeExports.jsx("div", { className: "pointer-events-none absolute inset-x-4 inset-y-0 z-10", children: jsxRuntimeExports.jsx("div", { className: "absolute top-0 bottom-0 w-px bg-gray-alpha-500", style: { left: `${hover.fraction * 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 && anchorIndex < 0 && jsxRuntimeExports.jsx("div", { "aria-hidden": true, className: "pointer-events-none absolute inset-x-4 inset-y-0", children: gapMeasurements.map((gap) => jsxRuntimeExports.jsx(DeltaMeasureLine, { ...gap, timelineWidth }, gap.anchorRowIndex)) }), measurement && jsxRuntimeExports.jsx("div", { "aria-hidden": true, className: "pointer-events-none absolute inset-x-4 inset-y-0 z-20", children: jsxRuntimeExports.jsx(DeltaMeasureLine, { ...measurement, timelineWidth }) })] });
|
|
96835
96801
|
}
|
|
96836
96802
|
const CANVAS_PAD_Y_PX = 6;
|
|
96837
96803
|
const MIN_LINE_HEIGHT_PX = 1.5;
|
|
@@ -97110,6 +97076,12 @@ const Minimap = reactExports.memo(function Minimap2({ spans, root: root2, viewpo
|
|
|
97110
97076
|
(drag2 == null ? void 0 : drag2.mode) === "pan" ? "cursor-grabbing" : "cursor-grab"
|
|
97111
97077
|
), style: brushStyle, children: [jsxRuntimeExports.jsx("div", { "data-minimap-handle": "left", className: "absolute inset-y-0 -left-1 flex w-2.5 cursor-ew-resize items-center justify-center", children: jsxRuntimeExports.jsx("span", { className: cn$4("h-3.5 w-[3px] rounded-full bg-gray-600 opacity-0 transition-opacity group-hover/minimap-brush:opacity-100 group-focus-visible/minimap-brush:opacity-100", drag2 && "opacity-100") }) }), jsxRuntimeExports.jsx("div", { "data-minimap-handle": "right", className: "absolute inset-y-0 -right-1 flex w-2.5 cursor-ew-resize items-center justify-center", children: jsxRuntimeExports.jsx("span", { className: cn$4("h-3.5 w-[3px] rounded-full bg-gray-600 opacity-0 transition-opacity group-hover/minimap-brush:opacity-100 group-focus-visible/minimap-brush:opacity-100", drag2 && "opacity-100") }) })] })] });
|
|
97112
97078
|
});
|
|
97079
|
+
const GUTTER_PX = 1;
|
|
97080
|
+
const MIN_PX = 50;
|
|
97081
|
+
const DEFAULT_START_PX = 340;
|
|
97082
|
+
function paneColTemplate(startPx) {
|
|
97083
|
+
return `${startPx}px ${GUTTER_PX}px minmax(${MIN_PX}px, 1fr)`;
|
|
97084
|
+
}
|
|
97113
97085
|
const SPLIT_PANE_START_ID = "trace-split-start";
|
|
97114
97086
|
function SplitPane({ children: children2, className, startHeader, endHeader, scrollContainerRef }) {
|
|
97115
97087
|
const parts = reactExports.Children.toArray(children2);
|
|
@@ -97493,12 +97465,15 @@ const TraceViewer = ({ run: run2, events: events2, sidebarData, onLoadMore, hasM
|
|
|
97493
97465
|
if (!(run2 == null ? void 0 : run2.runId)) {
|
|
97494
97466
|
return void 0;
|
|
97495
97467
|
}
|
|
97496
|
-
return buildTrace(run2, events2, /* @__PURE__ */ new Date()
|
|
97497
|
-
|
|
97468
|
+
return buildTrace(run2, events2, /* @__PURE__ */ new Date(), {
|
|
97469
|
+
isCompleteHistory: !hasMore
|
|
97470
|
+
});
|
|
97471
|
+
}, [run2, events2, hasMore]);
|
|
97472
|
+
const sidebarValue = reactExports.useMemo(() => ({ ...sidebarData, duplicateEventIds: trace2 == null ? void 0 : trace2.duplicateEventIds }), [sidebarData, trace2]);
|
|
97498
97473
|
if (!trace2 || loading && events2.length === 0) {
|
|
97499
97474
|
return jsxRuntimeExports.jsx(TraceViewerSkeleton, {});
|
|
97500
97475
|
}
|
|
97501
|
-
return jsxRuntimeExports.jsx(SidebarDataProvider, { value:
|
|
97476
|
+
return jsxRuntimeExports.jsx(SidebarDataProvider, { value: sidebarValue, children: jsxRuntimeExports.jsx("div", { className: "relative w-full h-full flex", children: jsxRuntimeExports.jsx(TraceViewer$1, { trace: trace2, onLoadMore, hasMore, isLoadingMore }) }) });
|
|
97502
97477
|
};
|
|
97503
97478
|
function analyzeEvents(events2) {
|
|
97504
97479
|
if (!events2 || events2.length === 0) {
|
|
@@ -101966,6 +101941,17 @@ function getStepFunctionReviver(global2 = globalThis) {
|
|
|
101966
101941
|
}
|
|
101967
101942
|
const encoder = new TextEncoder();
|
|
101968
101943
|
const decoder = new TextDecoder();
|
|
101944
|
+
const MAX_SPARSE_ARRAY_LENGTH = 1e5;
|
|
101945
|
+
const parseOptions = {
|
|
101946
|
+
operations: {
|
|
101947
|
+
createSparseArray(length) {
|
|
101948
|
+
if (length > MAX_SPARSE_ARRAY_LENGTH) {
|
|
101949
|
+
throw new RangeError(`Sparse array length ${length} exceeds the maximum of ${MAX_SPARSE_ARRAY_LENGTH}`);
|
|
101950
|
+
}
|
|
101951
|
+
return default_parse_operations.createSparseArray(length);
|
|
101952
|
+
}
|
|
101953
|
+
}
|
|
101954
|
+
};
|
|
101969
101955
|
function getReducersForMode(mode, global2 = globalThis, extraReducers) {
|
|
101970
101956
|
let base;
|
|
101971
101957
|
switch (mode) {
|
|
@@ -102035,11 +102021,11 @@ const devalueCodec = {
|
|
|
102035
102021
|
deserialize(data, mode, options) {
|
|
102036
102022
|
const revivers = getReviversForMode(mode, options == null ? void 0 : options.global, options == null ? void 0 : options.extraRevivers);
|
|
102037
102023
|
const str = decoder.decode(data);
|
|
102038
|
-
return parse$5(str, revivers);
|
|
102024
|
+
return parse$5(str, revivers, parseOptions);
|
|
102039
102025
|
},
|
|
102040
102026
|
deserializeLegacy(data, mode, options) {
|
|
102041
102027
|
const revivers = getReviversForMode(mode, options == null ? void 0 : options.global, options == null ? void 0 : options.extraRevivers);
|
|
102042
|
-
return unflatten(data, revivers);
|
|
102028
|
+
return unflatten(data, revivers, parseOptions);
|
|
102043
102029
|
}
|
|
102044
102030
|
};
|
|
102045
102031
|
const COMPRESSION_MIN_BYTES = 1024;
|
|
@@ -102730,7 +102716,9 @@ function createReconnectingFramedStream(runId, name2, startIndex) {
|
|
|
102730
102716
|
try {
|
|
102731
102717
|
await connect2();
|
|
102732
102718
|
return;
|
|
102733
|
-
} catch {
|
|
102719
|
+
} catch (error2) {
|
|
102720
|
+
if (StreamExpiredError.is(error2))
|
|
102721
|
+
throw error2;
|
|
102734
102722
|
}
|
|
102735
102723
|
}
|
|
102736
102724
|
}
|
|
@@ -104076,7 +104064,7 @@ function getStreamAndRequestRevivers(allRevivers) {
|
|
|
104076
104064
|
return extra;
|
|
104077
104065
|
}
|
|
104078
104066
|
`cinst_${ulid$3()}`;
|
|
104079
|
-
const version$1 = "5.0.0-beta.
|
|
104067
|
+
const version$1 = "5.0.0-beta.42";
|
|
104080
104068
|
const DEFAULT_HEALTH_CHECK_TIMEOUT = 3e4;
|
|
104081
104069
|
const SAFE_WORKFLOW_NAME_PATTERN = /^[a-zA-Z0-9_\-./@]+$/;
|
|
104082
104070
|
function getWorkflowQueueName(workflowName, namespace2) {
|
|
@@ -134018,6 +134006,7 @@ function createRunsStorage(basedir, tag) {
|
|
|
134018
134006
|
};
|
|
134019
134007
|
}
|
|
134020
134008
|
const DAY_MS$1 = 24 * 60 * 60 * 1e3;
|
|
134009
|
+
const MAX_CACHED_EVENT_ENTRIES = 1e3;
|
|
134021
134010
|
function getHookRetentionLimitMs() {
|
|
134022
134011
|
const days = Number(process.env.WORKFLOW_LOCAL_HOOK_RETENTION_LIMIT_DAYS ?? 30);
|
|
134023
134012
|
if (!Number.isFinite(days) || days <= 0) {
|
|
@@ -134164,7 +134153,7 @@ async function writeRunUnderLifecycleLock(basedir, runId, tag, proposed) {
|
|
|
134164
134153
|
function createEventsStorage(basedir, tag) {
|
|
134165
134154
|
const hookRetentionLimitMs = getHookRetentionLimitMs();
|
|
134166
134155
|
const maxCachedEventBytes = 4 * 1024 * 1024;
|
|
134167
|
-
const maxCachedEventEntries =
|
|
134156
|
+
const maxCachedEventEntries = MAX_CACHED_EVENT_ENTRIES;
|
|
134168
134157
|
const eventCache = /* @__PURE__ */ new Map();
|
|
134169
134158
|
const cachedEventBytes = /* @__PURE__ */ new Map();
|
|
134170
134159
|
const cachedPathsByRunId = /* @__PURE__ */ new Map();
|
|
@@ -135123,13 +135112,10 @@ function createEventsStorage(basedir, tag) {
|
|
|
135123
135112
|
if (terminalByMarker || runNow && isTerminalWorkflowRunStatus(runNow.status)) {
|
|
135124
135113
|
throw new RunExpiredError(`Workflow run "${effectiveRunId}" is already in a terminal state`);
|
|
135125
135114
|
}
|
|
135126
|
-
const stagedPath = pendingHookEventPath(basedir, effectiveRunId, eventId
|
|
135115
|
+
const stagedPath = pendingHookEventPath(basedir, effectiveRunId, `${eventId}.${monotonicUlid$1()}`, tag);
|
|
135127
135116
|
const staged = await writeExclusive(stagedPath, serializedEvent);
|
|
135128
135117
|
if (!staged) {
|
|
135129
|
-
|
|
135130
|
-
continue;
|
|
135131
|
-
}
|
|
135132
|
-
throw new EntityConflictError(`Event "${eventId}" already exists for run "${effectiveRunId}"`);
|
|
135118
|
+
throw new WorkflowWorldError(`Failed to stage event "${eventId}" for run "${effectiveRunId}": staging path already exists`);
|
|
135133
135119
|
}
|
|
135134
135120
|
try {
|
|
135135
135121
|
if (await isRunTerminalCommitted(basedir, effectiveRunId, tag)) {
|
|
@@ -135151,6 +135137,15 @@ function createEventsStorage(basedir, tag) {
|
|
|
135151
135137
|
notePublishedSlot(effectiveRunId, eventId);
|
|
135152
135138
|
break;
|
|
135153
135139
|
}
|
|
135140
|
+
if (data.eventType === "hook_received" && (params == null ? void 0 : params.resumeId)) {
|
|
135141
|
+
const occupant = await readJSONWithFallback(basedir, "events", `${effectiveRunId}-${eventId}`, EventSchema, tag);
|
|
135142
|
+
if (occupant && isResumeEvent(occupant, {
|
|
135143
|
+
resumeId: params.resumeId,
|
|
135144
|
+
hookId: data.correlationId
|
|
135145
|
+
})) {
|
|
135146
|
+
return { event: occupant };
|
|
135147
|
+
}
|
|
135148
|
+
}
|
|
135154
135149
|
if (!await bumpEventSlot(attempt)) {
|
|
135155
135150
|
break;
|
|
135156
135151
|
}
|
|
@@ -135761,11 +135756,7 @@ function createWorld$2(args) {
|
|
|
135761
135756
|
// `(runId, resumeId)` via a filesystem sidecar claim (see
|
|
135762
135757
|
// events-storage.ts `claimHookResume`), so resumeHook()'s parallel fast
|
|
135763
135758
|
// path converges on one event in dev exactly as it does on Vercel.
|
|
135764
|
-
hookResumeDedup: true
|
|
135765
|
-
// New runs get dense per-run slot event ids. Runs created before this
|
|
135766
|
-
// keep their ULIDs; the scheme is pinned by a run's own first event id,
|
|
135767
|
-
// not by this flag, which only says what new runs get.
|
|
135768
|
-
slotEventIds: true
|
|
135759
|
+
hookResumeDedup: true
|
|
135769
135760
|
},
|
|
135770
135761
|
...queue,
|
|
135771
135762
|
...storage,
|
|
@@ -135800,7 +135791,7 @@ function createWorld$2(args) {
|
|
|
135800
135791
|
const basedir = mergedConfig.dataDir;
|
|
135801
135792
|
const hooksDir = path$3.join(basedir, "hooks");
|
|
135802
135793
|
const taggedHookFiles = await listTaggedFiles(hooksDir, tag);
|
|
135803
|
-
const { HookSchema: HookSchema2 } = await import("./index-
|
|
135794
|
+
const { HookSchema: HookSchema2 } = await import("./index-DsnQrgwB.js");
|
|
135804
135795
|
await Promise.all(taggedHookFiles.map(async (hookFile) => {
|
|
135805
135796
|
const hook = await readJSON(path$3.join(hooksDir, hookFile), HookSchema2);
|
|
135806
135797
|
if (hook == null ? void 0 : hook.token) {
|
|
@@ -135983,8 +135974,8 @@ function requireGetVercelOidcToken() {
|
|
|
135983
135974
|
}
|
|
135984
135975
|
try {
|
|
135985
135976
|
const [{ getTokenPayload, isExpired }, { refreshToken }] = await Promise.all([
|
|
135986
|
-
await import("./token-util-
|
|
135987
|
-
await import("./token-
|
|
135977
|
+
await import("./token-util-CighjZkT.js").then((n) => n.t),
|
|
135978
|
+
await import("./token-sFDUVNm0.js").then((n) => n.t)
|
|
135988
135979
|
]);
|
|
135989
135980
|
if (!token || isExpired(getTokenPayload(token), options == null ? void 0 : options.expirationBufferMs)) {
|
|
135990
135981
|
await refreshToken(options);
|
|
@@ -136860,6 +136851,7 @@ const ServerAddress = SemanticConvention("server.address");
|
|
|
136860
136851
|
const ServerPort = SemanticConvention("server.port");
|
|
136861
136852
|
const HttpResponseStatusCode = SemanticConvention("http.response.status_code");
|
|
136862
136853
|
const ErrorType = SemanticConvention("error.type");
|
|
136854
|
+
const NetworkProtocolName = SemanticConvention("network.protocol.name");
|
|
136863
136855
|
const WorldParseFormat = SemanticConvention("workflow.world.parse.format");
|
|
136864
136856
|
const PeerService = SemanticConvention("peer.service");
|
|
136865
136857
|
const RpcSystem = SemanticConvention("rpc.system");
|
|
@@ -136870,6 +136862,14 @@ const StepId = SemanticConvention("step.id");
|
|
|
136870
136862
|
const WorkflowStreamName = SemanticConvention("workflow.stream.name");
|
|
136871
136863
|
const WorkflowStreamOperation = SemanticConvention("workflow.stream.operation");
|
|
136872
136864
|
const WorkflowStreamStartIndex = SemanticConvention("workflow.stream.start_index");
|
|
136865
|
+
const WorkflowEventsTransport = SemanticConvention("workflow.events.transport");
|
|
136866
|
+
const WorkflowEventType = SemanticConvention("workflow.event.type");
|
|
136867
|
+
const WorkflowClientVersion = SemanticConvention("workflow.client.version");
|
|
136868
|
+
const StepStsoMs = SemanticConvention("step.stso_ms");
|
|
136869
|
+
const StepLatencyOptimizations = SemanticConvention("step.latency_optimizations");
|
|
136870
|
+
const WorkflowWsUrl = SemanticConvention("workflow.events.ws.url");
|
|
136871
|
+
const WorkflowWsRequestId = SemanticConvention("workflow.events.ws.req_id");
|
|
136872
|
+
const WorkflowWsReconnectAttempt = SemanticConvention("workflow.events.ws.reconnect_attempt");
|
|
136873
136873
|
const REQUEST_TIMEOUT_MS = 6e4;
|
|
136874
136874
|
const getRequestTimeoutMs = () => envNumber("WORKFLOW_REQUEST_TIMEOUT_MS", REQUEST_TIMEOUT_MS, {
|
|
136875
136875
|
integer: true,
|
|
@@ -136922,8 +136922,14 @@ function errorForResponse(status, message2, opts = {}) {
|
|
|
136922
136922
|
const { retryAfter, code: code2, url: url2, mitigated, details } = opts;
|
|
136923
136923
|
if (status === 409)
|
|
136924
136924
|
return new EntityConflictError(message2);
|
|
136925
|
-
if (status === 410)
|
|
136925
|
+
if (status === 410) {
|
|
136926
|
+
if (code2 === "stream-expired") {
|
|
136927
|
+
const streamDetails = details && typeof details === "object" ? details : void 0;
|
|
136928
|
+
const expiredAt = typeof (streamDetails == null ? void 0 : streamDetails.expiredAt) === "string" ? new Date(streamDetails.expiredAt) : void 0;
|
|
136929
|
+
return new StreamExpiredError(message2, typeof (streamDetails == null ? void 0 : streamDetails.runId) === "string" ? streamDetails.runId : void 0, typeof (streamDetails == null ? void 0 : streamDetails.streamId) === "string" ? streamDetails.streamId : void 0, expiredAt && !Number.isNaN(expiredAt.getTime()) ? expiredAt : void 0);
|
|
136930
|
+
}
|
|
136926
136931
|
return new RunExpiredError(message2);
|
|
136932
|
+
}
|
|
136927
136933
|
if (status === 412)
|
|
136928
136934
|
return new PreconditionFailedError(message2, { retryAfter, details });
|
|
136929
136935
|
if (status === 425)
|
|
@@ -136950,9 +136956,10 @@ async function resolveVercelApiToken(opts) {
|
|
|
136950
136956
|
function parseServer(url2) {
|
|
136951
136957
|
try {
|
|
136952
136958
|
const parsed = new URL(url2);
|
|
136959
|
+
const secure = parsed.protocol === "https:" || parsed.protocol === "wss:";
|
|
136953
136960
|
return {
|
|
136954
136961
|
serverAddress: parsed.hostname,
|
|
136955
|
-
serverPort: parsed.port ? parseInt(parsed.port, 10) :
|
|
136962
|
+
serverPort: parsed.port ? parseInt(parsed.port, 10) : secure ? 443 : 80
|
|
136956
136963
|
};
|
|
136957
136964
|
} catch {
|
|
136958
136965
|
return {};
|
|
@@ -136971,11 +136978,9 @@ function httpClientSpanAttributes(args) {
|
|
|
136971
136978
|
...RpcService(peerService)
|
|
136972
136979
|
};
|
|
136973
136980
|
}
|
|
136974
|
-
async function
|
|
136975
|
-
const { method, url: url2,
|
|
136976
|
-
const label = logLabel ?? url2;
|
|
136981
|
+
async function withHttpClientSpan(opts, fn2) {
|
|
136982
|
+
const { method, url: url2, peerService = "workflow-server", spanName, attributes } = opts;
|
|
136977
136983
|
return trace(spanName ?? `http ${method}`, { kind: await getSpanKind("CLIENT") }, async (span) => {
|
|
136978
|
-
var _a3, _b2, _c2;
|
|
136979
136984
|
if (spanName && HTTP_DEBUG_ENABLED && span) {
|
|
136980
136985
|
const ctx = span.spanContext();
|
|
136981
136986
|
console.warn("[workflow:otel-diag] span-open", JSON.stringify({
|
|
@@ -136988,6 +136993,20 @@ async function instrumentedFetch(opts) {
|
|
|
136988
136993
|
span == null ? void 0 : span.setAttributes(httpClientSpanAttributes({ method, url: url2, peerService }));
|
|
136989
136994
|
if (attributes)
|
|
136990
136995
|
span == null ? void 0 : span.setAttributes(attributes);
|
|
136996
|
+
return fn2(span);
|
|
136997
|
+
});
|
|
136998
|
+
}
|
|
136999
|
+
function recordClientSpanStatus(span, status) {
|
|
137000
|
+
span == null ? void 0 : span.setAttributes({ ...HttpResponseStatusCode(status) });
|
|
137001
|
+
if (status < 200 || status >= 300) {
|
|
137002
|
+
span == null ? void 0 : span.setAttributes({ ...ErrorType(`HTTP ${status}`) });
|
|
137003
|
+
}
|
|
137004
|
+
}
|
|
137005
|
+
async function instrumentedFetch(opts) {
|
|
137006
|
+
const { method, url: url2, headers: headers2, body: body2, dispatcher: dispatcher2, peerService, timeoutMs = getRequestTimeoutMs(), signal: callerSignal, injectTraceContext: injectTraceContext2 = true, cacheBust = true, logLabel, buildError, spanName, attributes, durationAttribute, onTransportOutcome } = opts;
|
|
137007
|
+
const label = logLabel ?? url2;
|
|
137008
|
+
return withHttpClientSpan({ method, url: url2, peerService, spanName, attributes }, async (span) => {
|
|
137009
|
+
var _a3, _b2, _c2;
|
|
136991
137010
|
if (injectTraceContext2)
|
|
136992
137011
|
await injectTraceContextIntoHeaders(headers2);
|
|
136993
137012
|
if (cacheBust)
|
|
@@ -137019,11 +137038,10 @@ async function instrumentedFetch(opts) {
|
|
|
137019
137038
|
const ms2 = Date.now() - start2;
|
|
137020
137039
|
onTransportOutcome == null ? void 0 : onTransportOutcome();
|
|
137021
137040
|
httpLog(method, label, response2, ms2);
|
|
137022
|
-
span
|
|
137041
|
+
recordClientSpanStatus(span, response2.status);
|
|
137023
137042
|
if (durationAttribute)
|
|
137024
137043
|
span == null ? void 0 : span.setAttributes({ [durationAttribute]: ms2 });
|
|
137025
137044
|
if (!response2.ok) {
|
|
137026
|
-
span == null ? void 0 : span.setAttributes({ ...ErrorType(`HTTP ${response2.status}`) });
|
|
137027
137045
|
logCurlRepro(method, url2, headers2);
|
|
137028
137046
|
if (buildError) {
|
|
137029
137047
|
const error3 = await buildError(response2);
|
|
@@ -137041,7 +137059,7 @@ async function instrumentedFetch(opts) {
|
|
|
137041
137059
|
return response2;
|
|
137042
137060
|
});
|
|
137043
137061
|
}
|
|
137044
|
-
const version = "5.0.0-beta.
|
|
137062
|
+
const version = "5.0.0-beta.38";
|
|
137045
137063
|
const IDEMPOTENT_METHODS = /* @__PURE__ */ new Set(["GET", "HEAD"]);
|
|
137046
137064
|
const MAX_BODY_PARSE_RETRIES = 2;
|
|
137047
137065
|
const BODY_PARSE_RETRY_BASE_MS = 100;
|
|
@@ -137231,7 +137249,8 @@ async function makeRequest({ endpoint, options = {}, config: config2 = {}, schem
|
|
|
137231
137249
|
url: url2,
|
|
137232
137250
|
code: errorCode,
|
|
137233
137251
|
retryAfter,
|
|
137234
|
-
mitigated: response2.headers.get("x-vercel-mitigated")
|
|
137252
|
+
mitigated: response2.headers.get("x-vercel-mitigated"),
|
|
137253
|
+
details: errorData.details
|
|
137235
137254
|
});
|
|
137236
137255
|
span == null ? void 0 : span.setAttributes({
|
|
137237
137256
|
...ErrorType(errorCode || `HTTP ${response2.status}`)
|
|
@@ -137318,6 +137337,16 @@ function createQueryString(params) {
|
|
|
137318
137337
|
const query = params.toString();
|
|
137319
137338
|
return query ? `?${query}` : "";
|
|
137320
137339
|
}
|
|
137340
|
+
function normalizeEventIds(eventIds) {
|
|
137341
|
+
const uniqueEventIds = [...new Set(eventIds)];
|
|
137342
|
+
if (uniqueEventIds.length === 0) {
|
|
137343
|
+
throw new RangeError("eventIds must contain at least one event ID");
|
|
137344
|
+
}
|
|
137345
|
+
if (uniqueEventIds.length > ANALYTICS_EVENTS_GET_MANY_LIMIT) {
|
|
137346
|
+
throw new RangeError(`eventIds must contain at most ${ANALYTICS_EVENTS_GET_MANY_LIMIT} unique event IDs`);
|
|
137347
|
+
}
|
|
137348
|
+
return uniqueEventIds;
|
|
137349
|
+
}
|
|
137321
137350
|
function appendAttributeListParams(searchParams, params) {
|
|
137322
137351
|
if (params.workflowName) {
|
|
137323
137352
|
searchParams.set("workflowName", params.workflowName);
|
|
@@ -137398,6 +137427,15 @@ function createAnalytics(config2) {
|
|
|
137398
137427
|
schema: AnalyticsEventSchema
|
|
137399
137428
|
});
|
|
137400
137429
|
},
|
|
137430
|
+
getMany(runId, eventIds) {
|
|
137431
|
+
return makeRequest({
|
|
137432
|
+
endpoint: `/v2/analytics/runs/${encodeURIComponent(runId)}/events/get-many`,
|
|
137433
|
+
options: { method: "POST" },
|
|
137434
|
+
data: { eventIds: normalizeEventIds(eventIds) },
|
|
137435
|
+
config: config2,
|
|
137436
|
+
schema: AnalyticsEventSchema.array()
|
|
137437
|
+
});
|
|
137438
|
+
},
|
|
137401
137439
|
list(params) {
|
|
137402
137440
|
const searchParams = new URLSearchParams();
|
|
137403
137441
|
if (params.eventType) {
|
|
@@ -137785,7 +137823,7 @@ function createGetEncryptionKeyForRun(projectId, teamId, token, dispatcher2) {
|
|
|
137785
137823
|
};
|
|
137786
137824
|
}
|
|
137787
137825
|
async function getDeadline() {
|
|
137788
|
-
const { getDeadline: getDeadline2 } = await import("./index-
|
|
137826
|
+
const { getDeadline: getDeadline2 } = await import("./index-ByPjQpgH.js").then((n) => n.i);
|
|
137789
137827
|
return getDeadline2();
|
|
137790
137828
|
}
|
|
137791
137829
|
const WORKFLOW_SERVER_SERVICE = {
|
|
@@ -142712,7 +142750,7 @@ const wsEventsChannelForInvocation = (runId, config2) => {
|
|
|
142712
142750
|
open() {
|
|
142713
142751
|
if (!runId || !isWsEventsTransportEnabled())
|
|
142714
142752
|
return;
|
|
142715
|
-
claim = import("./ws-transport-
|
|
142753
|
+
claim = import("./ws-transport-DaZsgQ2B.js").then(({ openWsChannel }) => openWsChannel(runId, config2)).catch(() => void 0);
|
|
142716
142754
|
},
|
|
142717
142755
|
/**
|
|
142718
142756
|
* Awaited, unlike the open: work scheduled after the handler returns is not
|
|
@@ -143043,6 +143081,8 @@ const EVENT_RETRY_ELIGIBILITY = {
|
|
|
143043
143081
|
}
|
|
143044
143082
|
};
|
|
143045
143083
|
const MAX_EVENT_POST_RETRIES = 2;
|
|
143084
|
+
const THROTTLE_RETRY_BUDGET_MS = 3e4;
|
|
143085
|
+
const DEFAULT_THROTTLE_RETRY_AFTER_SECONDS = 1;
|
|
143046
143086
|
const EVENT_POST_RETRY_BASE_MS = 100;
|
|
143047
143087
|
const EVENT_POST_RETRY_JITTER_MS = 50;
|
|
143048
143088
|
const TRANSIENT_CODES = /* @__PURE__ */ new Set([
|
|
@@ -143112,33 +143152,58 @@ function errorMarker(err) {
|
|
|
143112
143152
|
}
|
|
143113
143153
|
return collectErrorMarkers(err)[0] ?? (err instanceof Error ? err.name : "unknown");
|
|
143114
143154
|
}
|
|
143115
|
-
|
|
143155
|
+
function createThrottleWaiter(eventType) {
|
|
143156
|
+
let waitedMs = 0;
|
|
143157
|
+
return async (err) => {
|
|
143158
|
+
const waitMs = Math.max(1, typeof err.retryAfter === "number" ? err.retryAfter : DEFAULT_THROTTLE_RETRY_AFTER_SECONDS) * 1e3;
|
|
143159
|
+
if (waitedMs + waitMs > THROTTLE_RETRY_BUDGET_MS) {
|
|
143160
|
+
logRetry("throttle retry budget exhausted; surfacing to the queue", {
|
|
143161
|
+
eventType,
|
|
143162
|
+
waitedMs,
|
|
143163
|
+
retryAfter: err.retryAfter
|
|
143164
|
+
});
|
|
143165
|
+
throw err;
|
|
143166
|
+
}
|
|
143167
|
+
waitedMs += waitMs;
|
|
143168
|
+
console.warn(`[workflow] Throttled (429) writing ${eventType} event; retrying in-process in ${waitMs / 1e3}s`);
|
|
143169
|
+
await sleep$1(waitMs);
|
|
143170
|
+
};
|
|
143171
|
+
}
|
|
143172
|
+
function isEligibleForTransientRetry(eventType, options) {
|
|
143116
143173
|
var _a3;
|
|
143117
|
-
|
|
143118
|
-
|
|
143174
|
+
return eventType === "hook_received" && (options == null ? void 0 : options.idempotentHookResume) === true || (((_a3 = EVENT_RETRY_ELIGIBILITY[eventType]) == null ? void 0 : _a3.retryable) ?? false);
|
|
143175
|
+
}
|
|
143176
|
+
async function withEventPostRetry(fn2, eventType, options) {
|
|
143177
|
+
const retryable = isEligibleForTransientRetry(eventType, options);
|
|
143178
|
+
const waitOutThrottle = createThrottleWaiter(eventType);
|
|
143179
|
+
for (let attempt = 0; ; ) {
|
|
143119
143180
|
try {
|
|
143120
143181
|
return await fn2();
|
|
143121
143182
|
} catch (err) {
|
|
143122
|
-
|
|
143123
|
-
|
|
143124
|
-
const backoff = EVENT_POST_RETRY_BASE_MS * 2 ** attempt + Math.floor(Math.random() * EVENT_POST_RETRY_JITTER_MS);
|
|
143125
|
-
logRetry("retrying event POST after transient failure", {
|
|
143126
|
-
eventType,
|
|
143127
|
-
attempt: attempt + 1,
|
|
143128
|
-
backoffMs: backoff,
|
|
143129
|
-
error: errorMarker(err)
|
|
143130
|
-
});
|
|
143131
|
-
await sleep$1(backoff);
|
|
143183
|
+
if (ThrottleError.is(err)) {
|
|
143184
|
+
await waitOutThrottle(err);
|
|
143132
143185
|
continue;
|
|
143133
143186
|
}
|
|
143134
|
-
if (
|
|
143187
|
+
if (!retryable || !isRetryableEventPostError(err)) {
|
|
143188
|
+
throw err;
|
|
143189
|
+
}
|
|
143190
|
+
if (attempt >= MAX_EVENT_POST_RETRIES) {
|
|
143135
143191
|
logRetry("exhausted in-process retries; surfacing for queue redelivery", {
|
|
143136
143192
|
eventType,
|
|
143137
143193
|
attempts: attempt + 1,
|
|
143138
143194
|
error: errorMarker(err)
|
|
143139
143195
|
});
|
|
143196
|
+
throw err;
|
|
143140
143197
|
}
|
|
143141
|
-
|
|
143198
|
+
const backoff = EVENT_POST_RETRY_BASE_MS * 2 ** attempt + Math.floor(Math.random() * EVENT_POST_RETRY_JITTER_MS);
|
|
143199
|
+
attempt++;
|
|
143200
|
+
logRetry("retrying event POST after transient failure", {
|
|
143201
|
+
eventType,
|
|
143202
|
+
attempt,
|
|
143203
|
+
backoffMs: backoff,
|
|
143204
|
+
error: errorMarker(err)
|
|
143205
|
+
});
|
|
143206
|
+
await sleep$1(backoff);
|
|
143142
143207
|
}
|
|
143143
143208
|
}
|
|
143144
143209
|
}
|
|
@@ -143370,7 +143435,7 @@ async function getStep(runId, stepId, params, config2) {
|
|
|
143370
143435
|
});
|
|
143371
143436
|
return filterStepData(step, resolveData);
|
|
143372
143437
|
}
|
|
143373
|
-
async function fetchV4(url2, init2, config2, opName) {
|
|
143438
|
+
async function fetchV4(url2, init2, config2, opName, attributes) {
|
|
143374
143439
|
const dispatcher2 = getEventsDispatcher(config2);
|
|
143375
143440
|
return instrumentedFetch({
|
|
143376
143441
|
method: init2.method,
|
|
@@ -143378,6 +143443,7 @@ async function fetchV4(url2, init2, config2, opName) {
|
|
|
143378
143443
|
headers: init2.headers,
|
|
143379
143444
|
body: init2.body,
|
|
143380
143445
|
dispatcher: dispatcher2,
|
|
143446
|
+
attributes,
|
|
143381
143447
|
// Repeated transport failures retire the shared events pool and the next
|
|
143382
143448
|
// request builds a fresh one. undici keeps a black-holed HTTP/2 session in
|
|
143383
143449
|
// service indefinitely, so without this every request routed onto it fails
|
|
@@ -143392,6 +143458,9 @@ async function fetchV4(url2, init2, config2, opName) {
|
|
|
143392
143458
|
}
|
|
143393
143459
|
const EVENT_ID_HEADER = "x-wf-event-id";
|
|
143394
143460
|
const MAX_EVENTS_HEADER = "x-wf-max-events";
|
|
143461
|
+
function eventsV4Url(baseUrl, runId, eventType) {
|
|
143462
|
+
return `${baseUrl}/v4/runs/${encodeURIComponent(runId)}/events/${encodeURIComponent(eventType)}`;
|
|
143463
|
+
}
|
|
143395
143464
|
const CreateEventV4BodyBaseSchema = object$1({
|
|
143396
143465
|
event: EventSchema,
|
|
143397
143466
|
run: WorkflowRunSchema.optional(),
|
|
@@ -143561,14 +143630,6 @@ function buildPostFrameMeta(input) {
|
|
|
143561
143630
|
meta2.sinceCursor = input.sinceCursor;
|
|
143562
143631
|
if (input.skipPreload)
|
|
143563
143632
|
meta2.skipPreload = true;
|
|
143564
|
-
if (input.stateUpdatedAt !== void 0) {
|
|
143565
|
-
meta2.stateUpdatedAt = input.stateUpdatedAt;
|
|
143566
|
-
}
|
|
143567
|
-
if (input.stateEventCount !== void 0) {
|
|
143568
|
-
meta2.stateEventCount = input.stateEventCount;
|
|
143569
|
-
}
|
|
143570
|
-
if (input.stateCursor !== void 0)
|
|
143571
|
-
meta2.stateCursor = input.stateCursor;
|
|
143572
143633
|
if (input.maxSlot !== void 0)
|
|
143573
143634
|
meta2.maxSlot = input.maxSlot;
|
|
143574
143635
|
if (input.replayDivergenceCount !== void 0) {
|
|
@@ -143577,6 +143638,9 @@ function buildPostFrameMeta(input) {
|
|
|
143577
143638
|
if (input.resumePayloadDigest !== void 0) {
|
|
143578
143639
|
meta2.resumePayloadDigest = input.resumePayloadDigest;
|
|
143579
143640
|
}
|
|
143641
|
+
if (input.viaStepDispatch !== void 0) {
|
|
143642
|
+
meta2.viaStepDispatch = input.viaStepDispatch;
|
|
143643
|
+
}
|
|
143580
143644
|
return meta2;
|
|
143581
143645
|
}
|
|
143582
143646
|
function errorFromV4Response(statusCode, responseHeaders, errorBody, opName, url2) {
|
|
@@ -143669,8 +143733,14 @@ async function postWorkflowRunEventV4(input, responseType, config2) {
|
|
|
143669
143733
|
headers2.set("Accept", V4_FRAME_CONTENT_TYPE);
|
|
143670
143734
|
}
|
|
143671
143735
|
const frame2 = encodeFrame(buildPostFrameMeta(input), input.payload ?? new Uint8Array(0));
|
|
143672
|
-
const url2 =
|
|
143673
|
-
return fetchV4(url2, { method: "POST", headers: headers2, body: frame2 }, config2, "createEvent"
|
|
143736
|
+
const url2 = eventsV4Url(baseUrl, input.runId, input.eventType);
|
|
143737
|
+
return fetchV4(url2, { method: "POST", headers: headers2, body: frame2 }, config2, "createEvent", {
|
|
143738
|
+
...WorkflowEventsTransport("http"),
|
|
143739
|
+
...WorkflowEventType(input.eventType),
|
|
143740
|
+
...WorkflowClientVersion(`@workflow/world-vercel/${version}`),
|
|
143741
|
+
...input.stso !== void 0 ? StepStsoMs(input.stso) : {},
|
|
143742
|
+
...input.optimizations !== void 0 ? StepLatencyOptimizations(input.optimizations) : {}
|
|
143743
|
+
});
|
|
143674
143744
|
}
|
|
143675
143745
|
async function createWorkflowRunEventV4(input, config2) {
|
|
143676
143746
|
if (isWsEventsTransportEnabled()) {
|
|
@@ -143732,28 +143802,59 @@ function wsReplyStatus(reply, endpoint) {
|
|
|
143732
143802
|
return status;
|
|
143733
143803
|
}
|
|
143734
143804
|
async function postEventFrameOverWs(input, config2) {
|
|
143735
|
-
const { resolveWsTransport } = await import("./ws-transport-
|
|
143805
|
+
const { resolveWsTransport } = await import("./ws-transport-DaZsgQ2B.js");
|
|
143736
143806
|
const { runId } = input;
|
|
143737
143807
|
const resolved = resolveWsTransport(runId, config2);
|
|
143738
143808
|
if (!resolved)
|
|
143739
143809
|
return void 0;
|
|
143740
143810
|
const { transport, wsUrl } = resolved;
|
|
143741
143811
|
const endpoint = `${wsUrl}#runs/${encodeURIComponent(runId)}/events`;
|
|
143742
|
-
|
|
143743
|
-
|
|
143744
|
-
|
|
143745
|
-
|
|
143746
|
-
|
|
143747
|
-
|
|
143748
|
-
|
|
143749
|
-
|
|
143750
|
-
|
|
143751
|
-
|
|
143752
|
-
|
|
143753
|
-
|
|
143754
|
-
|
|
143755
|
-
|
|
143756
|
-
|
|
143812
|
+
const restUrl = eventsV4Url(getHttpUrl(config2).baseUrl, runId, input.eventType);
|
|
143813
|
+
return withHttpClientSpan({
|
|
143814
|
+
method: "POST",
|
|
143815
|
+
url: restUrl,
|
|
143816
|
+
attributes: {
|
|
143817
|
+
...WorkflowEventsTransport("ws"),
|
|
143818
|
+
...WorkflowEventType(input.eventType),
|
|
143819
|
+
...WorkflowClientVersion(`@workflow/world-vercel/${version}`),
|
|
143820
|
+
...input.stso !== void 0 ? StepStsoMs(input.stso) : {},
|
|
143821
|
+
...input.optimizations !== void 0 ? StepLatencyOptimizations(input.optimizations) : {},
|
|
143822
|
+
...NetworkProtocolName("websocket"),
|
|
143823
|
+
...WorkflowWsUrl(wsUrl)
|
|
143824
|
+
}
|
|
143825
|
+
}, async (span) => {
|
|
143826
|
+
var _a3, _b2;
|
|
143827
|
+
const start2 = Date.now();
|
|
143828
|
+
let reply;
|
|
143829
|
+
try {
|
|
143830
|
+
reply = await transport.request((reqId) => {
|
|
143831
|
+
span == null ? void 0 : span.setAttributes({ ...WorkflowWsRequestId(reqId) });
|
|
143832
|
+
return encodeFrame({ reqId, type: "event", event: buildPostFrameMeta(input) }, input.payload ?? new Uint8Array(0));
|
|
143833
|
+
});
|
|
143834
|
+
} catch (err) {
|
|
143835
|
+
const error2 = new WorkflowWorldError(`POST ${endpoint} transport failure: ${err instanceof Error ? err.message : String(err)}`, { url: wsUrl, code: "TRANSPORT", cause: err });
|
|
143836
|
+
span == null ? void 0 : span.setAttributes({ ...ErrorType("TRANSPORT") });
|
|
143837
|
+
(_a3 = span == null ? void 0 : span.recordException) == null ? void 0 : _a3.call(span, error2);
|
|
143838
|
+
throw error2;
|
|
143839
|
+
}
|
|
143840
|
+
const ms2 = Date.now() - start2;
|
|
143841
|
+
const status = wsReplyStatus(reply, endpoint);
|
|
143842
|
+
const headerRecord = replyMetaToHeaderRecord(reply.meta);
|
|
143843
|
+
const headers2 = {
|
|
143844
|
+
get: (name2) => headerRecord[name2.toLowerCase()] ?? null
|
|
143845
|
+
};
|
|
143846
|
+
httpLog("POST", "createEvent", { status, headers: headers2 }, ms2);
|
|
143847
|
+
recordClientSpanStatus(span, status);
|
|
143848
|
+
if (status < 200 || status >= 300) {
|
|
143849
|
+
const error2 = errorFromV4Response(status, headerRecord, new TextDecoder().decode(reply.body), "createEvent", endpoint);
|
|
143850
|
+
(_b2 = span == null ? void 0 : span.recordException) == null ? void 0 : _b2.call(span, error2);
|
|
143851
|
+
throw error2;
|
|
143852
|
+
}
|
|
143853
|
+
return {
|
|
143854
|
+
headers: headers2,
|
|
143855
|
+
arrayBuffer: async () => reply.body.slice().buffer
|
|
143856
|
+
};
|
|
143857
|
+
});
|
|
143757
143858
|
}
|
|
143758
143859
|
async function createHookReceivedPreloadEventV4(input, config2) {
|
|
143759
143860
|
const response2 = await postWorkflowRunEventV4({ ...input, eventType: "hook_received" }, "event-stream", config2);
|
|
@@ -144237,11 +144338,7 @@ async function createWorkflowRunEventInner(id2, data, params, config2) {
|
|
|
144237
144338
|
...data.correlationId ? { correlationId: data.correlationId } : {},
|
|
144238
144339
|
...(params == null ? void 0 : params.requestId) ? { vercelId: params.requestId } : {},
|
|
144239
144340
|
...(params == null ? void 0 : params.computeInstanceId) ? { computeInstanceId: params.computeInstanceId } : {},
|
|
144240
|
-
|
|
144241
|
-
stateEventCount: params == null ? void 0 : params.stateEventCount,
|
|
144242
|
-
...(params == null ? void 0 : params.stateCursor) ? { stateCursor: params.stateCursor } : {},
|
|
144243
|
-
// Slot-identity snapshot. The runtime sends `eventCount` instead of the
|
|
144244
|
-
// watermark triple once the run's own ids are slot-shaped; it rides as
|
|
144341
|
+
// Slot-identity snapshot: how much of the log the writer held. Rides as
|
|
144245
144342
|
// `maxSlot` because the v4 meta already has an unrelated telemetry
|
|
144246
144343
|
// `eventCount`.
|
|
144247
144344
|
...(params == null ? void 0 : params.eventCount) !== void 0 ? { maxSlot: params.eventCount } : {},
|
|
@@ -144257,6 +144354,11 @@ async function createWorkflowRunEventInner(id2, data, params, config2) {
|
|
|
144257
144354
|
...(params == null ? void 0 : params.sinceCursor) ? { sinceCursor: params.sinceCursor } : {},
|
|
144258
144355
|
...(params == null ? void 0 : params.resumeId) ? { resumeId: params.resumeId } : {},
|
|
144259
144356
|
...(params == null ? void 0 : params.resumePayloadDigest) ? { resumePayloadDigest: params.resumePayloadDigest } : {},
|
|
144357
|
+
// Resilient step dispatch re-ensure marker (step_created only). Advisory
|
|
144358
|
+
// — the server MAY refuse it with 410 → RunExpiredError as
|
|
144359
|
+
// defense-in-depth when it recorded a 412 rejection for this correlation
|
|
144360
|
+
// id and no step entity exists.
|
|
144361
|
+
...(params == null ? void 0 : params.viaStepDispatch) ? { viaStepDispatch: true } : {},
|
|
144260
144362
|
remoteRefBehavior,
|
|
144261
144363
|
payload,
|
|
144262
144364
|
...meta2
|
|
@@ -144467,6 +144569,17 @@ function streamSpanAttributes(args) {
|
|
|
144467
144569
|
...typeof args.startIndex === "number" ? WorkflowStreamStartIndex(args.startIndex) : {}
|
|
144468
144570
|
};
|
|
144469
144571
|
}
|
|
144572
|
+
async function createStreamReadError(response2) {
|
|
144573
|
+
const fallback = `Failed to fetch stream: ${response2.status}`;
|
|
144574
|
+
if (response2.status !== 410)
|
|
144575
|
+
return new Error(fallback);
|
|
144576
|
+
try {
|
|
144577
|
+
const body2 = await response2.json();
|
|
144578
|
+
return errorForResponse(response2.status, typeof body2.message === "string" ? body2.message : fallback, { code: body2.error, details: body2.details });
|
|
144579
|
+
} catch {
|
|
144580
|
+
return new Error(fallback);
|
|
144581
|
+
}
|
|
144582
|
+
}
|
|
144470
144583
|
function createStreamRequestError(operation, url2, response2, text2) {
|
|
144471
144584
|
const context = [
|
|
144472
144585
|
`PUT ${url2.origin}${url2.pathname}`,
|
|
@@ -144593,6 +144706,7 @@ function createStreamer(config2) {
|
|
|
144593
144706
|
},
|
|
144594
144707
|
async get(runId, name2, startIndex) {
|
|
144595
144708
|
const httpConfig = await getHttpConfig(config2);
|
|
144709
|
+
httpConfig.headers.set("Accept", "application/json");
|
|
144596
144710
|
const url2 = getStreamReadUrl(name2, runId, httpConfig);
|
|
144597
144711
|
if (typeof startIndex === "number") {
|
|
144598
144712
|
url2.searchParams.set("startIndex", String(startIndex));
|
|
@@ -144611,7 +144725,7 @@ function createStreamer(config2) {
|
|
|
144611
144725
|
operation: "read",
|
|
144612
144726
|
startIndex
|
|
144613
144727
|
}),
|
|
144614
|
-
buildError:
|
|
144728
|
+
buildError: createStreamReadError
|
|
144615
144729
|
});
|
|
144616
144730
|
if (!response2.body) {
|
|
144617
144731
|
throw new Error("No response body for stream");
|
|
@@ -144663,31 +144777,25 @@ function createWorld$1(config2) {
|
|
|
144663
144777
|
var _a3, _b2;
|
|
144664
144778
|
const projectId = ((_a3 = config2 == null ? void 0 : config2.projectConfig) == null ? void 0 : _a3.projectId) || process.env.VERCEL_PROJECT_ID;
|
|
144665
144779
|
return {
|
|
144666
|
-
//
|
|
144667
|
-
//
|
|
144668
|
-
//
|
|
144669
|
-
//
|
|
144670
|
-
//
|
|
144671
|
-
|
|
144780
|
+
// The version is what tells the backend which id scheme a run uses: it is
|
|
144781
|
+
// stamped on `run_created` and read back on every later write, so a run
|
|
144782
|
+
// created before spec 6 keeps its ULIDs for its whole life even though this
|
|
144783
|
+
// adapter now asks for slot-numbered ids.
|
|
144784
|
+
//
|
|
144785
|
+
// Declared as the runtime's current version rather than as the literal
|
|
144786
|
+
// version that introduced slots: a bump has to move this declaration with
|
|
144787
|
+
// it, or the runtime's compatibility floor rises past the adapter shipped
|
|
144788
|
+
// alongside it and rejects it (see `assertWorldSupportsRuntimeProtocol`).
|
|
144789
|
+
specVersion: SPEC_VERSION_CURRENT,
|
|
144672
144790
|
capabilities: {
|
|
144673
144791
|
hookRetention: { active: true },
|
|
144674
|
-
// workflow-server enforces the `stateUpdatedAt` optimistic-concurrency
|
|
144675
|
-
// guard: creations carrying a stale snapshot are rejected with 412
|
|
144676
|
-
// (PreconditionFailedError) when the run's outside-event marker is
|
|
144677
|
-
// newer. See vercel/workflow-server#484.
|
|
144678
|
-
preconditionGuard: true,
|
|
144679
144792
|
// Vercel Queues supports maxConcurrency-limited consumers, which
|
|
144680
144793
|
// WORKFLOW_SEQUENTIAL_REPLAYS=1 uses for per-run `maxConcurrency: 1`
|
|
144681
144794
|
// flow topics (see queue.ts and @workflow/builders).
|
|
144682
144795
|
maxConcurrency: true,
|
|
144683
144796
|
// Vercel deployments are atomic and immutable, so a deployment id names
|
|
144684
144797
|
// one fixed build for its whole lifetime.
|
|
144685
|
-
deploymentAffinity: true
|
|
144686
|
-
// New runs get dense per-run slot event ids. Runs created before the
|
|
144687
|
-
// backend adopted them keep their ULIDs; the scheme is pinned by the
|
|
144688
|
-
// spec version stamped on each run, not by this flag, which only says
|
|
144689
|
-
// what new runs get.
|
|
144690
|
-
slotEventIds: true
|
|
144798
|
+
deploymentAffinity: true
|
|
144691
144799
|
// NOTE: the backend half of resumeHook()'s parallel fast path — that
|
|
144692
144800
|
// the server enforces the `(runId, resumeId)` dedup constraint — is
|
|
144693
144801
|
// NO LONGER a static world capability here. It is attested per-lookup by
|
|
@@ -144838,7 +144946,7 @@ const getWorld = async () => {
|
|
|
144838
144946
|
const GetWorldFnKey = Symbol.for("@workflow/world//getWorldFn");
|
|
144839
144947
|
globalThis[GetWorldFnKey] ?? (globalThis[GetWorldFnKey] = getWorld);
|
|
144840
144948
|
function waitUntil(promise2) {
|
|
144841
|
-
void import("./index-
|
|
144949
|
+
void import("./index-ByPjQpgH.js").then((n) => n.i).then(({ waitUntil: waitUntil2 }) => {
|
|
144842
144950
|
waitUntil2(promise2);
|
|
144843
144951
|
});
|
|
144844
144952
|
}
|
|
@@ -147614,9 +147722,9 @@ async function getHookByToken(token) {
|
|
|
147614
147722
|
return hook;
|
|
147615
147723
|
}
|
|
147616
147724
|
async function resumeHook$2(tokenOrHook, payload, encryptionKeyOverride) {
|
|
147617
|
-
return resumeHookImpl(tokenOrHook, payload, encryptionKeyOverride, false);
|
|
147725
|
+
return resumeHookImpl(tokenOrHook, payload, encryptionKeyOverride, false, Date.now());
|
|
147618
147726
|
}
|
|
147619
|
-
async function resumeHookImpl(tokenOrHook, payload, encryptionKeyOverride, hookFreshlyLookedUp) {
|
|
147727
|
+
async function resumeHookImpl(tokenOrHook, payload, encryptionKeyOverride, hookFreshlyLookedUp, resumeRequestedAtMs) {
|
|
147620
147728
|
return await waitedUntil(() => {
|
|
147621
147729
|
return trace$2("hook.resume", async (span) => {
|
|
147622
147730
|
var _a3, _b2, _c2;
|
|
@@ -147705,23 +147813,24 @@ async function resumeHookImpl(tokenOrHook, payload, encryptionKeyOverride, hookF
|
|
|
147705
147813
|
}
|
|
147706
147814
|
throw err;
|
|
147707
147815
|
}
|
|
147816
|
+
const queuePublishRequestedAtMs = Date.now();
|
|
147708
147817
|
await world.queue(queueName, {
|
|
147709
147818
|
runId: hook.runId,
|
|
147710
|
-
traceCarrier: resumeContext.traceCarrier ?? void 0
|
|
147819
|
+
traceCarrier: resumeContext.traceCarrier ?? void 0,
|
|
147820
|
+
hookResumeTiming: {
|
|
147821
|
+
resumeRequestedAtMs,
|
|
147822
|
+
queuePublishRequestedAtMs,
|
|
147823
|
+
strategy: "sequential"
|
|
147824
|
+
}
|
|
147711
147825
|
}, queueOptions);
|
|
147712
147826
|
return hook;
|
|
147713
147827
|
}
|
|
147714
147828
|
const resumeId = generateResumeId();
|
|
147715
147829
|
const payloadDigest = await computeResumePayloadDigest(dehydratedPayload);
|
|
147716
147830
|
span == null ? void 0 : span.setAttributes({ "workflow.hook.resume_id": resumeId });
|
|
147717
|
-
const
|
|
147718
|
-
|
|
147719
|
-
|
|
147720
|
-
specVersion: SPEC_VERSION_CURRENT,
|
|
147721
|
-
correlationId: hook.hookId,
|
|
147722
|
-
eventData
|
|
147723
|
-
}, { v1Compat, resumeId, resumePayloadDigest: payloadDigest }),
|
|
147724
|
-
world.queue(queueName, {
|
|
147831
|
+
const publishInvocation = () => {
|
|
147832
|
+
const queuePublishRequestedAtMs = Date.now();
|
|
147833
|
+
return world.queue(queueName, {
|
|
147725
147834
|
runId: hook.runId,
|
|
147726
147835
|
traceCarrier: resumeContext.traceCarrier ?? void 0,
|
|
147727
147836
|
hookInput: {
|
|
@@ -147734,8 +147843,22 @@ async function resumeHookImpl(tokenOrHook, payload, encryptionKeyOverride, hookF
|
|
|
147734
147843
|
// check: lets a misrouted delivery re-route before its
|
|
147735
147844
|
// hoisted hook_received write instead of after.
|
|
147736
147845
|
deploymentId: resumeContext.deploymentId
|
|
147846
|
+
},
|
|
147847
|
+
hookResumeTiming: {
|
|
147848
|
+
resumeRequestedAtMs,
|
|
147849
|
+
queuePublishRequestedAtMs,
|
|
147850
|
+
strategy: "parallel"
|
|
147737
147851
|
}
|
|
147738
|
-
}, queueOptions)
|
|
147852
|
+
}, queueOptions);
|
|
147853
|
+
};
|
|
147854
|
+
const [eventResult, queueResult] = await Promise.allSettled([
|
|
147855
|
+
world.events.create(hook.runId, {
|
|
147856
|
+
eventType: "hook_received",
|
|
147857
|
+
specVersion: SPEC_VERSION_CURRENT,
|
|
147858
|
+
correlationId: hook.hookId,
|
|
147859
|
+
eventData
|
|
147860
|
+
}, { v1Compat, resumeId, resumePayloadDigest: payloadDigest }),
|
|
147861
|
+
publishInvocation()
|
|
147739
147862
|
]);
|
|
147740
147863
|
if (queueResult.status === "rejected") {
|
|
147741
147864
|
throw queueResult.reason;
|
|
@@ -147775,6 +147898,7 @@ async function resumeHookImpl(tokenOrHook, payload, encryptionKeyOverride, hookF
|
|
|
147775
147898
|
});
|
|
147776
147899
|
}
|
|
147777
147900
|
async function resumeWebhook(token, request2) {
|
|
147901
|
+
const resumeRequestedAtMs = Date.now();
|
|
147778
147902
|
const { hook, encryptionKey } = await getHookByTokenWithKey(token);
|
|
147779
147903
|
if (hook.isWebhook === false) {
|
|
147780
147904
|
throw new HookNotFoundError(token);
|
|
@@ -147794,7 +147918,7 @@ async function resumeWebhook(token, request2) {
|
|
|
147794
147918
|
} else {
|
|
147795
147919
|
response2 = new Response(null, { status: 202 });
|
|
147796
147920
|
}
|
|
147797
|
-
await resumeHookImpl(hook, request2, encryptionKey, true);
|
|
147921
|
+
await resumeHookImpl(hook, request2, encryptionKey, true, resumeRequestedAtMs);
|
|
147798
147922
|
if (responseReadable) {
|
|
147799
147923
|
const reader = responseReadable.getReader();
|
|
147800
147924
|
const chunk = await reader.read();
|
|
@@ -171693,7 +171817,7 @@ const route4 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProper
|
|
|
171693
171817
|
__proto__: null,
|
|
171694
171818
|
loader
|
|
171695
171819
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
171696
|
-
const serverManifest = { "entry": { "module": "/assets/entry.client-LwI3HNYl.js", "imports": ["/assets/index-PFjW8YjQ.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-
|
|
171820
|
+
const serverManifest = { "entry": { "module": "/assets/entry.client-LwI3HNYl.js", "imports": ["/assets/index-PFjW8YjQ.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-BfhMCbkz.js", "imports": ["/assets/index-PFjW8YjQ.js", "/assets/mermaid-3ZIDBTTL-gEw-Ch1C.js", "/assets/loader-circle-BOxaTUjK.js", "/assets/arrow-up-right-D39pnGsD.js"], "css": ["/assets/root-Bl5xphvU.css", "/assets/mermaid-3ZIDBTTL-D8CjRQta.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-C6CuMqQu.js", "imports": ["/assets/index-PFjW8YjQ.js", "/assets/workflow-graph-viewer-CxrWityD.js", "/assets/mermaid-3ZIDBTTL-gEw-Ch1C.js", "/assets/loader-circle-BOxaTUjK.js"], "css": ["/assets/workflow-graph-viewer-DnlNuQQH.css", "/assets/mermaid-3ZIDBTTL-D8CjRQta.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-DKz7lp2q.js", "imports": ["/assets/index-PFjW8YjQ.js", "/assets/workflow-graph-viewer-CxrWityD.js", "/assets/mermaid-3ZIDBTTL-gEw-Ch1C.js", "/assets/arrow-up-right-D39pnGsD.js"], "css": ["/assets/run-detail-CWoGxu_0.css", "/assets/workflow-graph-viewer-DnlNuQQH.css", "/assets/mermaid-3ZIDBTTL-D8CjRQta.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-cf88886b.js", "version": "cf88886b", "sri": void 0 };
|
|
171697
171821
|
const assetsBuildDirectory = "build/client";
|
|
171698
171822
|
const basename = "/";
|
|
171699
171823
|
const future = { "unstable_optimizeDeps": false, "unstable_subResourceIntegrity": false, "unstable_trailingSlashAwareDataRequests": false, "unstable_previewServerPrerendering": false, "v8_middleware": false, "v8_splitRouteModules": false, "v8_viteEnvironmentApi": false };
|
|
@@ -171902,128 +172026,135 @@ function createFetchHandler(basename2 = "/") {
|
|
|
171902
172026
|
return (request2) => handler(request2, loadContext);
|
|
171903
172027
|
}
|
|
171904
172028
|
export {
|
|
171905
|
-
|
|
171906
|
-
|
|
172029
|
+
STEP_EVENT_TYPES as $,
|
|
172030
|
+
ANALYTICS_EVENTS_GET_MANY_LIMIT as A,
|
|
171907
172031
|
BULK_CANCEL_MAX_RUN_IDS as B,
|
|
171908
172032
|
CHILD_ENTITY_CREATION_EVENT_TYPES as C,
|
|
171909
172033
|
DEFAULT_TIMESTAMP_THRESHOLD_FUTURE_MS as D,
|
|
171910
172034
|
EVENT_DATA_PAYLOAD_FIELD_BY_EVENT_TYPE as E,
|
|
171911
172035
|
FIRST_EVENT_SLOT as F,
|
|
171912
|
-
|
|
172036
|
+
HealthCheckPayloadSchema as G,
|
|
171913
172037
|
HookSchema as H,
|
|
171914
|
-
|
|
171915
|
-
|
|
171916
|
-
|
|
172038
|
+
HookCreatedEventSchema as I,
|
|
172039
|
+
HookResumeCapabilitiesSchema as J,
|
|
172040
|
+
PaginatedResponseSchema as K,
|
|
171917
172041
|
LegacySerializedDataSchemaV1 as L,
|
|
171918
172042
|
MessageId as M,
|
|
171919
172043
|
Nt as N,
|
|
171920
|
-
|
|
172044
|
+
QueuePrefix as O,
|
|
171921
172045
|
PARENT_RUN_ID_ATTRIBUTE as P,
|
|
171922
172046
|
QueuePayloadSchema as Q,
|
|
171923
172047
|
RESERVED_ATTRIBUTE_KEY_PREFIX as R,
|
|
171924
|
-
|
|
171925
|
-
|
|
171926
|
-
|
|
171927
|
-
|
|
171928
|
-
|
|
171929
|
-
|
|
171930
|
-
|
|
171931
|
-
|
|
171932
|
-
|
|
171933
|
-
|
|
171934
|
-
|
|
171935
|
-
|
|
171936
|
-
|
|
171937
|
-
|
|
171938
|
-
|
|
171939
|
-
|
|
171940
|
-
|
|
171941
|
-
|
|
171942
|
-
|
|
171943
|
-
|
|
171944
|
-
|
|
171945
|
-
|
|
171946
|
-
|
|
171947
|
-
|
|
171948
|
-
|
|
171949
|
-
|
|
171950
|
-
|
|
171951
|
-
|
|
171952
|
-
|
|
171953
|
-
|
|
171954
|
-
|
|
171955
|
-
|
|
171956
|
-
|
|
171957
|
-
|
|
171958
|
-
|
|
171959
|
-
|
|
171960
|
-
|
|
171961
|
-
|
|
171962
|
-
|
|
171963
|
-
|
|
171964
|
-
|
|
171965
|
-
|
|
171966
|
-
|
|
171967
|
-
|
|
171968
|
-
|
|
171969
|
-
|
|
171970
|
-
|
|
171971
|
-
|
|
171972
|
-
|
|
171973
|
-
|
|
171974
|
-
|
|
171975
|
-
|
|
171976
|
-
|
|
171977
|
-
|
|
171978
|
-
|
|
171979
|
-
|
|
171980
|
-
|
|
171981
|
-
|
|
171982
|
-
|
|
171983
|
-
|
|
171984
|
-
|
|
171985
|
-
|
|
171986
|
-
|
|
171987
|
-
|
|
171988
|
-
|
|
171989
|
-
|
|
171990
|
-
|
|
171991
|
-
|
|
171992
|
-
|
|
171993
|
-
|
|
171994
|
-
|
|
171995
|
-
|
|
171996
|
-
|
|
171997
|
-
|
|
171998
|
-
|
|
171999
|
-
|
|
172000
|
-
|
|
172001
|
-
|
|
172002
|
-
|
|
172003
|
-
|
|
172004
|
-
|
|
172005
|
-
|
|
172006
|
-
|
|
172007
|
-
|
|
172008
|
-
|
|
172009
|
-
|
|
172010
|
-
|
|
172011
|
-
|
|
172012
|
-
|
|
172013
|
-
|
|
172014
|
-
|
|
172015
|
-
|
|
172016
|
-
|
|
172017
|
-
|
|
172018
|
-
|
|
172019
|
-
|
|
172020
|
-
|
|
172021
|
-
|
|
172022
|
-
|
|
172023
|
-
|
|
172024
|
-
|
|
172025
|
-
|
|
172026
|
-
|
|
172027
|
-
|
|
172028
|
-
|
|
172048
|
+
ROOT_RUN_ID_ATTRIBUTE as S,
|
|
172049
|
+
RunInputSchema as T,
|
|
172050
|
+
SPEC_VERSION_CURRENT as U,
|
|
172051
|
+
SPEC_VERSION_LEGACY as V,
|
|
172052
|
+
SPEC_VERSION_MAX_SUPPORTED as W,
|
|
172053
|
+
SPEC_VERSION_SUPPORTS_ATTRIBUTES as X,
|
|
172054
|
+
SPEC_VERSION_SUPPORTS_CBOR_QUEUE_TRANSPORT as Y,
|
|
172055
|
+
SPEC_VERSION_SUPPORTS_COMPRESSION as Z,
|
|
172056
|
+
SPEC_VERSION_SUPPORTS_SLOT_IDENTITY as _,
|
|
172057
|
+
ATTRIBUTE_KEY_MAX_LENGTH as a,
|
|
172058
|
+
injectTraceContextIntoHeaders as a$,
|
|
172059
|
+
SerializedDataSchema as a0,
|
|
172060
|
+
StepSchema as a1,
|
|
172061
|
+
StepStatusSchema as a2,
|
|
172062
|
+
StructuredErrorSchema as a3,
|
|
172063
|
+
TERMINAL_RUN_EVENT_TYPES as a4,
|
|
172064
|
+
TERMINAL_STEP_EVENT_TYPES as a5,
|
|
172065
|
+
TERMINAL_STEP_STATUSES as a6,
|
|
172066
|
+
TERMINAL_WORKFLOW_RUN_STATUSES as a7,
|
|
172067
|
+
TerminalRunEventTypeSchema as a8,
|
|
172068
|
+
TerminalStepStatusSchema as a9,
|
|
172069
|
+
isTerminalStepEventType as aA,
|
|
172070
|
+
isTerminalStepStatus as aB,
|
|
172071
|
+
isTerminalWorkflowRunStatus as aC,
|
|
172072
|
+
isWaitEventType as aD,
|
|
172073
|
+
parseQueueName as aE,
|
|
172074
|
+
reenqueueActiveRuns as aF,
|
|
172075
|
+
requiresNewerWorld as aG,
|
|
172076
|
+
resolveQueueNamespace as aH,
|
|
172077
|
+
slotToEventId as aI,
|
|
172078
|
+
stripEventDataRefs as aJ,
|
|
172079
|
+
ulidToDate as aK,
|
|
172080
|
+
validateAttributeChanges as aL,
|
|
172081
|
+
validateAttributeKey as aM,
|
|
172082
|
+
validateAttributeValue as aN,
|
|
172083
|
+
validateUlidTimestamp as aO,
|
|
172084
|
+
workflowRunIdSchema as aP,
|
|
172085
|
+
reactExports as aQ,
|
|
172086
|
+
R as aR,
|
|
172087
|
+
Ks as aS,
|
|
172088
|
+
jsxRuntimeExports as aT,
|
|
172089
|
+
Qe as aU,
|
|
172090
|
+
registerZstdDecoder as aV,
|
|
172091
|
+
isWsEventsTransportEnabled as aW,
|
|
172092
|
+
getHttpUrl as aX,
|
|
172093
|
+
getHttpConfig as aY,
|
|
172094
|
+
headersToRecord as aZ,
|
|
172095
|
+
getRequestTimeoutMs as a_,
|
|
172096
|
+
TerminalWorkflowRunStatusSchema as aa,
|
|
172097
|
+
ValidQueueName as ab,
|
|
172098
|
+
WAIT_EVENT_TYPES as ac,
|
|
172099
|
+
WaitSchema as ad,
|
|
172100
|
+
WaitStatusSchema as ae,
|
|
172101
|
+
WorkflowInvokePayloadSchema as af,
|
|
172102
|
+
WorkflowRunBaseSchema as ag,
|
|
172103
|
+
WorkflowRunSchema as ah,
|
|
172104
|
+
WorkflowRunStatusSchema as ai,
|
|
172105
|
+
applyAttributeChanges as aj,
|
|
172106
|
+
entityEventClass as ak,
|
|
172107
|
+
envNumber as al,
|
|
172108
|
+
eventIdToSlot as am,
|
|
172109
|
+
getEventDataPayloadField as an,
|
|
172110
|
+
getEventDataRefFields as ao,
|
|
172111
|
+
getMaxEventsPerRun as ap,
|
|
172112
|
+
getQueueTopicPrefix as aq,
|
|
172113
|
+
isChildEntityCreationEvent as ar,
|
|
172114
|
+
isChildEntityCreationEventType as as,
|
|
172115
|
+
isHookEventRequiringExistence as at,
|
|
172116
|
+
isHookLifecycleEventType as au,
|
|
172117
|
+
isLegacySpecVersion as av,
|
|
172118
|
+
isSlotBody as aw,
|
|
172119
|
+
isSlotEventId as ax,
|
|
172120
|
+
isStepEventType as ay,
|
|
172121
|
+
isTerminalRunEventType as az,
|
|
172122
|
+
ATTRIBUTE_MAX_PER_RUN as b,
|
|
172123
|
+
withHttpClientSpan as b0,
|
|
172124
|
+
ErrorType as b1,
|
|
172125
|
+
WorkflowWsReconnectAttempt as b2,
|
|
172126
|
+
NetworkProtocolName as b3,
|
|
172127
|
+
WorkflowEventsTransport as b4,
|
|
172128
|
+
distExports as b5,
|
|
172129
|
+
decodeFrames as b6,
|
|
172130
|
+
getDefaultExportFromCjs as b7,
|
|
172131
|
+
requireTokenUtil as b8,
|
|
172132
|
+
requireTokenError as b9,
|
|
172133
|
+
getAugmentedNamespace as ba,
|
|
172134
|
+
app as bb,
|
|
172135
|
+
createFetchHandler as bc,
|
|
172136
|
+
ATTRIBUTE_VALUE_MAX_BYTES as c,
|
|
172137
|
+
AnalyticsAttributeKeySchema as d,
|
|
172138
|
+
AnalyticsEventSchema as e,
|
|
172139
|
+
AnalyticsHookSchema as f,
|
|
172140
|
+
AnalyticsRunSchema as g,
|
|
172141
|
+
AnalyticsStepSchema as h,
|
|
172142
|
+
AnalyticsWaitSchema as i,
|
|
172143
|
+
AttributeChangeSchema as j,
|
|
172144
|
+
AttributeChangesSchema as k,
|
|
172145
|
+
AttributeValidationError as l,
|
|
172146
|
+
BaseEventSchema as m,
|
|
172147
|
+
BulkCancelWorkflowRunResultSchema as n,
|
|
172148
|
+
BulkCancelWorkflowRunsRequestSchema as o,
|
|
172149
|
+
BulkCancelWorkflowRunsResultSchema as p,
|
|
172150
|
+
DEFAULT_TIMESTAMP_THRESHOLD_PAST_MS as q,
|
|
172151
|
+
EVENT_DATA_REF_FIELDS as r,
|
|
172152
|
+
EVENT_ID_BODY_LENGTH as s,
|
|
172153
|
+
EVENT_ID_PREFIX as t,
|
|
172154
|
+
EventSchema as u,
|
|
172155
|
+
EventTypeSchema as v,
|
|
172156
|
+
HOOK_EVENTS_REQUIRING_EXISTENCE as w,
|
|
172157
|
+
HOOK_LIFECYCLE_EVENT_TYPES as x,
|
|
172158
|
+
HOOK_RESUME_DEDUP_VERSION as y,
|
|
172159
|
+
HOOK_RESUME_INPUT_VERSION as z
|
|
172029
172160
|
};
|