@workflow/web 5.0.0-beta.25 → 5.0.0-beta.27

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (25) hide show
  1. package/build/client/assets/{encryption-g14N5vQl.js → encryption-BQTnudEZ.js} +1 -1
  2. package/build/client/assets/{highlighted-body-B3W2YXNL-QrddlyZu.js → highlighted-body-B3W2YXNL-B-EF8R0t.js} +1 -1
  3. package/build/client/assets/{home-BNApVOct.js → home-DQkixJk4.js} +3 -3
  4. package/build/client/assets/{index-B6-SzLmT.js → index-ConSkUmc.js} +0 -2
  5. package/build/client/assets/{manifest-379f050f.js → manifest-ce6dd06d.js} +1 -1
  6. package/build/client/assets/{mermaid-3ZIDBTTL-Cg-Mp5Kj.js → mermaid-3ZIDBTTL-aixonSAh.js} +445 -260
  7. package/build/client/assets/root-BlaSucTH.css +1 -0
  8. package/build/client/assets/{root-BsPxYsbK.js → root-CsCdj08f.js} +1 -1
  9. package/build/client/assets/{run-detail-sr7StYc6.js → run-detail-CCsVqid_.js} +975 -760
  10. package/build/client/assets/server-build-DPrKlhgf.css +1 -0
  11. package/build/client/assets/{workflow-graph-viewer-CcCwLmnF.js → workflow-graph-viewer-BlPvo_5I.js} +44 -62
  12. package/build/client/assets/{zstd-browser-decoder-OOeWOMJw.js → zstd-browser-decoder-RyHgsNO3.js} +1 -1
  13. package/build/server/assets/{app-e2FYIgWU.js → app-kYNGZFkW.js} +1 -1
  14. package/build/server/assets/{highlighted-body-B3W2YXNL-B7xcG7gl.js → highlighted-body-B3W2YXNL-D1QWoqJB.js} +3 -3
  15. package/build/server/assets/index-fWQcXKhC.js +115 -0
  16. package/build/server/assets/{mermaid-3ZIDBTTL-DQqBhQ9Y.js → mermaid-3ZIDBTTL-BOh-zwwU.js} +3 -3
  17. package/build/server/assets/{server-build-D7EgG_DH.js → server-build-B21fZEey.js} +2565 -1341
  18. package/build/server/assets/{token-guLCf66r.js → token-DmIqmbeU.js} +2 -2
  19. package/build/server/assets/{token-util-CCeU4-vR.js → token-util-D4JYdrFc.js} +2 -2
  20. package/build/server/assets/{zstd-browser-decoder-CcinVfMP.js → zstd-browser-decoder-DgO7NCG6.js} +3 -3
  21. package/build/server/index.js +1 -1
  22. package/package.json +8 -8
  23. package/build/client/assets/root-F_dqJDC7.css +0 -1
  24. package/build/client/assets/server-build-DVBDkRDS.css +0 -1
  25. package/build/server/assets/index-BELZxbAO.js +0 -100
@@ -1,4 +1,4 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/encryption-g14N5vQl.js","assets/index-B6-SzLmT.js","assets/index-BXZSIDEp.js","assets/zstd-browser-decoder-OOeWOMJw.js","assets/highlighted-body-B3W2YXNL-QrddlyZu.js"])))=>i.map(i=>d[i]);
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/encryption-BQTnudEZ.js","assets/index-ConSkUmc.js","assets/index-BXZSIDEp.js","assets/zstd-browser-decoder-RyHgsNO3.js","assets/highlighted-body-B3W2YXNL-B-EF8R0t.js"])))=>i.map(i=>d[i]);
2
2
  var __defProp = Object.defineProperty;
3
3
  var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
4
4
  var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
@@ -6746,22 +6746,38 @@ const createLucideIcon = (iconName, iconNode) => {
6746
6746
  * This source code is licensed under the ISC license.
6747
6747
  * See the LICENSE file in the root directory of this source tree.
6748
6748
  */
6749
- const __iconNode$3 = [
6749
+ const __iconNode$5 = [
6750
6750
  ["path", { d: "m12 19-7-7 7-7", key: "1l729n" }],
6751
6751
  ["path", { d: "M19 12H5", key: "x3x0zl" }]
6752
6752
  ];
6753
- const ArrowLeft = createLucideIcon("arrow-left", __iconNode$3);
6753
+ const ArrowLeft = createLucideIcon("arrow-left", __iconNode$5);
6754
6754
  /**
6755
6755
  * @license lucide-react v0.575.0 - ISC
6756
6756
  *
6757
6757
  * This source code is licensed under the ISC license.
6758
6758
  * See the LICENSE file in the root directory of this source tree.
6759
6759
  */
6760
- const __iconNode$2 = [
6760
+ const __iconNode$4 = [
6761
6761
  ["path", { d: "M5 12h14", key: "1ays0h" }],
6762
6762
  ["path", { d: "m12 5 7 7-7 7", key: "xquz4c" }]
6763
6763
  ];
6764
- const ArrowRight = createLucideIcon("arrow-right", __iconNode$2);
6764
+ const ArrowRight = createLucideIcon("arrow-right", __iconNode$4);
6765
+ /**
6766
+ * @license lucide-react v0.575.0 - ISC
6767
+ *
6768
+ * This source code is licensed under the ISC license.
6769
+ * See the LICENSE file in the root directory of this source tree.
6770
+ */
6771
+ const __iconNode$3 = [["path", { d: "m6 9 6 6 6-6", key: "qrunsl" }]];
6772
+ const ChevronDown = createLucideIcon("chevron-down", __iconNode$3);
6773
+ /**
6774
+ * @license lucide-react v0.575.0 - ISC
6775
+ *
6776
+ * This source code is licensed under the ISC license.
6777
+ * See the LICENSE file in the root directory of this source tree.
6778
+ */
6779
+ const __iconNode$2 = [["path", { d: "m9 18 6-6-6-6", key: "mthhwq" }]];
6780
+ const ChevronRight = createLucideIcon("chevron-right", __iconNode$2);
6765
6781
  /**
6766
6782
  * @license lucide-react v0.575.0 - ISC
6767
6783
  *
@@ -10526,7 +10542,7 @@ async function hydrateDataWithKey(value, revivers, key) {
10526
10542
  let data = value;
10527
10543
  if (data instanceof Uint8Array && isEncryptedData(data) && key) {
10528
10544
  const { decrypt } = await __vitePreload(async () => {
10529
- const { decrypt: decrypt2 } = await import("./encryption-g14N5vQl.js");
10545
+ const { decrypt: decrypt2 } = await import("./encryption-BQTnudEZ.js");
10530
10546
  return { decrypt: decrypt2 };
10531
10547
  }, true ? __vite__mapDeps([0,1,2]) : void 0);
10532
10548
  const { payload } = decodeFormatPrefix(data);
@@ -11451,7 +11467,7 @@ const string$3 = (params) => {
11451
11467
  return new RegExp(`^${regex}$`);
11452
11468
  };
11453
11469
  const integer = /^-?\d+$/;
11454
- const number$3 = /^-?\d+(?:\.\d+)?$/;
11470
+ const number$4 = /^-?\d+(?:\.\d+)?$/;
11455
11471
  const boolean$3 = /^(?:true|false)$/i;
11456
11472
  const _null$2 = /^null$/i;
11457
11473
  const _undefined$2 = /^undefined$/i;
@@ -12293,7 +12309,7 @@ const $ZodJWT = /* @__PURE__ */ $constructor("$ZodJWT", (inst, def) => {
12293
12309
  });
12294
12310
  const $ZodNumber = /* @__PURE__ */ $constructor("$ZodNumber", (inst, def) => {
12295
12311
  $ZodType.init(inst, def);
12296
- inst._zod.pattern = inst._zod.bag.pattern ?? number$3;
12312
+ inst._zod.pattern = inst._zod.bag.pattern ?? number$4;
12297
12313
  inst._zod.parse = (payload, _ctx) => {
12298
12314
  if (def.coerce)
12299
12315
  try {
@@ -12980,7 +12996,7 @@ const $ZodRecord = /* @__PURE__ */ $constructor("$ZodRecord", (inst, def) => {
12980
12996
  if (keyResult instanceof Promise) {
12981
12997
  throw new Error("Async schemas not supported in object keys currently");
12982
12998
  }
12983
- const checkNumericKey = typeof key === "string" && number$3.test(key) && keyResult.issues.length;
12999
+ const checkNumericKey = typeof key === "string" && number$4.test(key) && keyResult.issues.length;
12984
13000
  if (checkNumericKey) {
12985
13001
  const retryResult = def.keyType._zod.run({ value: Number(key), issues: [] }, ctx);
12986
13002
  if (retryResult instanceof Promise) {
@@ -13686,6 +13702,15 @@ function _number(Class, params) {
13686
13702
  });
13687
13703
  }
13688
13704
  // @__NO_SIDE_EFFECTS__
13705
+ function _coercedNumber(Class, params) {
13706
+ return new Class({
13707
+ type: "number",
13708
+ coerce: true,
13709
+ checks: [],
13710
+ ...normalizeParams(params)
13711
+ });
13712
+ }
13713
+ // @__NO_SIDE_EFFECTS__
13689
13714
  function _int(Class, params) {
13690
13715
  return new Class({
13691
13716
  type: "number",
@@ -14976,7 +15001,7 @@ const ZodNumber = /* @__PURE__ */ $constructor("ZodNumber", (inst, def) => {
14976
15001
  inst.isFinite = true;
14977
15002
  inst.format = bag.format ?? null;
14978
15003
  });
14979
- function number$2(params) {
15004
+ function number$3(params) {
14980
15005
  return /* @__PURE__ */ _number(ZodNumber, params);
14981
15006
  }
14982
15007
  const ZodNumberFormat = /* @__PURE__ */ $constructor("ZodNumberFormat", (inst, def) => {
@@ -15414,6 +15439,9 @@ function _instanceof(cls, params = {}) {
15414
15439
  };
15415
15440
  return inst;
15416
15441
  }
15442
+ function number$2(params) {
15443
+ return /* @__PURE__ */ _coercedNumber(ZodNumber, params);
15444
+ }
15417
15445
  function date(params) {
15418
15446
  return /* @__PURE__ */ _coercedDate(ZodDate, params);
15419
15447
  }
@@ -15465,10 +15493,16 @@ const EventTypeSchema = _enum([
15465
15493
  "wait_created",
15466
15494
  "wait_completed"
15467
15495
  ]);
15496
+ const TerminalRunEventTypeSchema = EventTypeSchema.extract([
15497
+ "run_completed",
15498
+ "run_failed",
15499
+ "run_cancelled"
15500
+ ]);
15501
+ TerminalRunEventTypeSchema.options;
15468
15502
  const BaseEventSchema = object({
15469
15503
  eventType: EventTypeSchema,
15470
15504
  correlationId: string$2().optional(),
15471
- specVersion: number$2().optional()
15505
+ specVersion: number$3().optional()
15472
15506
  });
15473
15507
  const StepCompletedEventSchema = BaseEventSchema.extend({
15474
15508
  eventType: literal("step_completed"),
@@ -15508,7 +15542,7 @@ const StepStartedEventSchema = BaseEventSchema.extend({
15508
15542
  correlationId: string$2(),
15509
15543
  eventData: object({
15510
15544
  stepName: string$2().optional(),
15511
- attempt: number$2().optional(),
15545
+ attempt: number$3().optional(),
15512
15546
  // Carried on the lazy-start path (where `input` is present) so the
15513
15547
  // backend can build the payload ref key without re-reading the run.
15514
15548
  workflowName: string$2().optional(),
@@ -15582,7 +15616,7 @@ const AttributeWriterSchema = discriminatedUnion("type", [
15582
15616
  object({
15583
15617
  type: literal("step"),
15584
15618
  stepId: string$2(),
15585
- attempt: number$2()
15619
+ attempt: number$3()
15586
15620
  })
15587
15621
  ]);
15588
15622
  const AttrSetEventSchema = BaseEventSchema.extend({
@@ -15689,78 +15723,8 @@ AllEventsSchema.and(object({
15689
15723
  eventId: string$2(),
15690
15724
  createdAt: date(),
15691
15725
  occurredAt: date().optional(),
15692
- specVersion: number$2().optional()
15726
+ specVersion: number$3().optional()
15693
15727
  }));
15694
- object({
15695
- runId: string$2(),
15696
- hookId: string$2(),
15697
- token: string$2(),
15698
- ownerId: string$2(),
15699
- projectId: string$2(),
15700
- environment: string$2(),
15701
- metadata: SerializedDataSchema.optional(),
15702
- createdAt: date(),
15703
- // Optional in database for backwards compatibility, defaults to 1 (legacy) when reading
15704
- specVersion: number$2().optional(),
15705
- isWebhook: boolean$2().optional(),
15706
- isSystem: boolean$2().optional()
15707
- });
15708
- string$2().regex(/^__(?:[a-z][a-z0-9]*_)?wkf_(?:workflow|step)_$/, "Must match __wkf_{workflow|step}_ or __{namespace}_wkf_{workflow|step}_");
15709
- string$2().regex(/^__(?:[a-z][a-z0-9]*_)?wkf_(?:workflow|step)_.+$/, "Must be a valid queue name with a recognized prefix");
15710
- string$2().regex(/^[a-z][a-z0-9]*$/, "Must be lowercase alphanumeric, starting with a letter");
15711
- string$2().brand().describe("A stored queue message ID");
15712
- const TraceCarrierSchema = record(string$2(), string$2());
15713
- const RunInputSchema = object({
15714
- input: unknown$1(),
15715
- deploymentId: string$2(),
15716
- workflowName: string$2(),
15717
- specVersion: number$2(),
15718
- executionContext: record(string$2(), any()).optional(),
15719
- /** Initial plaintext run attributes, for resilient run creation. */
15720
- attributes: record(string$2(), string$2()).optional(),
15721
- /**
15722
- * Permits reserved `$`-prefixed keys in `attributes`, mirrored from the
15723
- * `start()` option so resilient run creation validates the same way as
15724
- * the original `run_created` attempt.
15725
- */
15726
- allowReservedAttributes: literal(true).optional()
15727
- });
15728
- const WorkflowInvokePayloadSchema = object({
15729
- runId: string$2(),
15730
- traceCarrier: TraceCarrierSchema.optional(),
15731
- requestedAt: date().optional(),
15732
- /** Consecutive replay divergences in this recovery chain and latest position. */
15733
- replayDivergence: object({
15734
- eventId: string$2(),
15735
- count: number$2().int().positive()
15736
- }).optional(),
15737
- /** Number of times this message has been re-enqueued due to server errors (5xx) */
15738
- serverErrorRetryCount: number$2().int().optional(),
15739
- /** Step ID for inline step execution in combined handler. If provided, the flow execution
15740
- * will jump directly to execute the step with the given ID before doing an event replay. */
15741
- stepId: string$2().optional(),
15742
- /** Step name, sent alongside stepId to avoid loading the event log just to resolve the name. */
15743
- stepName: string$2().optional(),
15744
- /** Run creation data, only present on the first queue delivery from start() */
15745
- runInput: RunInputSchema.optional()
15746
- });
15747
- const StepInvokePayloadSchema = object({
15748
- workflowName: string$2(),
15749
- workflowRunId: string$2(),
15750
- workflowStartedAt: number$2(),
15751
- stepId: string$2(),
15752
- traceCarrier: TraceCarrierSchema.optional(),
15753
- requestedAt: date().optional()
15754
- });
15755
- const HealthCheckPayloadSchema = object({
15756
- __healthCheck: literal(true),
15757
- correlationId: string$2()
15758
- });
15759
- union([
15760
- WorkflowInvokePayloadSchema,
15761
- StepInvokePayloadSchema,
15762
- HealthCheckPayloadSchema
15763
- ]);
15764
15728
  const WorkflowRunStatusSchema = _enum([
15765
15729
  "pending",
15766
15730
  "running",
@@ -15768,6 +15732,12 @@ const WorkflowRunStatusSchema = _enum([
15768
15732
  "failed",
15769
15733
  "cancelled"
15770
15734
  ]);
15735
+ const TerminalWorkflowRunStatusSchema = WorkflowRunStatusSchema.extract([
15736
+ "completed",
15737
+ "failed",
15738
+ "cancelled"
15739
+ ]);
15740
+ TerminalWorkflowRunStatusSchema.options;
15771
15741
  const WorkflowRunBaseSchema = object({
15772
15742
  runId: string$2(),
15773
15743
  status: WorkflowRunStatusSchema,
@@ -15794,7 +15764,7 @@ const WorkflowRunBaseSchema = object({
15794
15764
  */
15795
15765
  workflowName: string$2(),
15796
15766
  // Optional in database for backwards compatibility, defaults to 1 (legacy) when reading
15797
- specVersion: number$2().optional(),
15767
+ specVersion: number$3().optional(),
15798
15768
  executionContext: record(string$2(), any()).optional(),
15799
15769
  input: SerializedDataSchema.optional(),
15800
15770
  output: SerializedDataSchema.optional(),
@@ -15866,22 +15836,6 @@ discriminatedUnion("status", [
15866
15836
  completedAt: date()
15867
15837
  })
15868
15838
  ]);
15869
- const zodJsonSchema = lazy(() => {
15870
- return union([
15871
- string$2(),
15872
- number$2(),
15873
- boolean$2(),
15874
- _null(),
15875
- array(zodJsonSchema),
15876
- record(string$2(), zodJsonSchema)
15877
- ]);
15878
- });
15879
- object({
15880
- message: string$2(),
15881
- stack: string$2().optional(),
15882
- code: string$2().optional()
15883
- // Populated with RunErrorCode values (USER_ERROR, RUNTIME_ERROR, etc.) for run_failed events
15884
- });
15885
15839
  const StepStatusSchema = _enum([
15886
15840
  "pending",
15887
15841
  "running",
@@ -15927,7 +15881,7 @@ object({
15927
15881
  * view the error without going through the decryption + hydration pipeline.
15928
15882
  */
15929
15883
  error: SerializedDataSchema.optional(),
15930
- attempt: number$2(),
15884
+ attempt: number$3(),
15931
15885
  /**
15932
15886
  * When the step first started executing. Set by the first step_started event
15933
15887
  * and not updated on subsequent retries.
@@ -15938,9 +15892,14 @@ object({
15938
15892
  updatedAt: date(),
15939
15893
  retryAfter: date().optional(),
15940
15894
  // Optional in database for backwards compatibility, defaults to 1 (legacy) when reading
15941
- specVersion: number$2().optional()
15895
+ specVersion: number$3().optional()
15942
15896
  });
15943
- string$2().ulid();
15897
+ const TerminalStepStatusSchema = StepStatusSchema.extract([
15898
+ "completed",
15899
+ "failed",
15900
+ "cancelled"
15901
+ ]);
15902
+ TerminalStepStatusSchema.options;
15944
15903
  const WaitStatusSchema = _enum(["waiting", "completed"]);
15945
15904
  object({
15946
15905
  waitId: string$2(),
@@ -15950,8 +15909,194 @@ object({
15950
15909
  completedAt: date().optional(),
15951
15910
  createdAt: date(),
15952
15911
  updatedAt: date(),
15953
- specVersion: number$2().optional()
15912
+ specVersion: number$3().optional()
15913
+ });
15914
+ const NullableDateSchema = date().nullable().optional();
15915
+ const NullableStringSchema = string$2().nullable().optional();
15916
+ const NullableBooleanSchema = boolean$2().nullable().optional();
15917
+ object({
15918
+ runId: string$2(),
15919
+ status: WorkflowRunStatusSchema,
15920
+ deploymentId: string$2(),
15921
+ workflowName: string$2(),
15922
+ specVersion: number$2().optional(),
15923
+ attributes: record(string$2(), string$2()).default({}),
15924
+ createdAt: date(),
15925
+ updatedAt: date(),
15926
+ startedAt: NullableDateSchema,
15927
+ completedAt: NullableDateSchema,
15928
+ errorCode: NullableStringSchema,
15929
+ workflowCoreVersion: NullableStringSchema,
15930
+ workflowEncryptionEnabled: NullableBooleanSchema
15931
+ });
15932
+ object({
15933
+ runId: string$2(),
15934
+ stepId: string$2(),
15935
+ stepName: NullableStringSchema,
15936
+ status: StepStatusSchema,
15937
+ attempt: number$3().optional(),
15938
+ createdAt: date(),
15939
+ updatedAt: date(),
15940
+ startedAt: NullableDateSchema,
15941
+ completedAt: NullableDateSchema,
15942
+ retryAfter: NullableDateSchema,
15943
+ errorCode: NullableStringSchema,
15944
+ workflowCoreVersion: NullableStringSchema,
15945
+ workflowEncryptionEnabled: NullableBooleanSchema
15946
+ });
15947
+ object({
15948
+ runId: string$2(),
15949
+ eventId: string$2(),
15950
+ eventType: EventTypeSchema,
15951
+ correlationId: NullableStringSchema,
15952
+ entityId: NullableStringSchema,
15953
+ stepName: NullableStringSchema,
15954
+ workflowName: string$2(),
15955
+ deploymentId: string$2(),
15956
+ specVersion: number$2().optional(),
15957
+ runCreatedAt: date(),
15958
+ createdAt: date(),
15959
+ region: NullableStringSchema,
15960
+ vercelId: NullableStringSchema,
15961
+ requestId: NullableStringSchema,
15962
+ resumeAt: NullableDateSchema,
15963
+ retryAfter: NullableDateSchema,
15964
+ errorCode: NullableStringSchema,
15965
+ workflowCoreVersion: NullableStringSchema,
15966
+ isWebhook: NullableBooleanSchema,
15967
+ isSystem: NullableBooleanSchema,
15968
+ workflowEncryptionEnabled: NullableBooleanSchema
15969
+ });
15970
+ object({
15971
+ runId: string$2(),
15972
+ hookId: string$2(),
15973
+ status: _enum(["created", "received", "disposed", "conflict"]),
15974
+ createdAt: date(),
15975
+ updatedAt: date(),
15976
+ receivedAt: NullableDateSchema,
15977
+ disposedAt: NullableDateSchema,
15978
+ isWebhook: NullableBooleanSchema,
15979
+ isSystem: NullableBooleanSchema,
15980
+ workflowCoreVersion: NullableStringSchema,
15981
+ workflowEncryptionEnabled: NullableBooleanSchema
15954
15982
  });
15983
+ object({
15984
+ runId: string$2(),
15985
+ waitId: string$2(),
15986
+ status: WaitStatusSchema,
15987
+ resumeAt: NullableDateSchema,
15988
+ createdAt: date(),
15989
+ updatedAt: date(),
15990
+ completedAt: NullableDateSchema,
15991
+ workflowCoreVersion: NullableStringSchema,
15992
+ workflowEncryptionEnabled: NullableBooleanSchema
15993
+ });
15994
+ object({
15995
+ runId: string$2(),
15996
+ hookId: string$2(),
15997
+ token: string$2(),
15998
+ ownerId: string$2(),
15999
+ projectId: string$2(),
16000
+ environment: string$2(),
16001
+ metadata: SerializedDataSchema.optional(),
16002
+ createdAt: date(),
16003
+ // Optional in database for backwards compatibility, defaults to 1 (legacy) when reading
16004
+ specVersion: number$3().optional(),
16005
+ isWebhook: boolean$2().optional(),
16006
+ isSystem: boolean$2().optional()
16007
+ });
16008
+ string$2().regex(/^__(?:[a-z][a-z0-9]*_)?wkf_(?:workflow|step)_$/, "Must match __wkf_{workflow|step}_ or __{namespace}_wkf_{workflow|step}_");
16009
+ string$2().regex(/^__(?:[a-z][a-z0-9]*_)?wkf_(?:workflow|step)_.+$/, "Must be a valid queue name with a recognized prefix");
16010
+ string$2().regex(/^[a-z][a-z0-9]*$/, "Must be lowercase alphanumeric, starting with a letter");
16011
+ string$2().brand().describe("A stored queue message ID");
16012
+ const TraceCarrierSchema = record(string$2(), string$2());
16013
+ const RunInputSchema = object({
16014
+ input: unknown$1(),
16015
+ deploymentId: string$2(),
16016
+ workflowName: string$2(),
16017
+ specVersion: number$3(),
16018
+ executionContext: record(string$2(), any()).optional(),
16019
+ /** Initial plaintext run attributes, for resilient run creation. */
16020
+ attributes: record(string$2(), string$2()).optional(),
16021
+ /**
16022
+ * Permits reserved `$`-prefixed keys in `attributes`, mirrored from the
16023
+ * `start()` option so resilient run creation validates the same way as
16024
+ * the original `run_created` attempt.
16025
+ */
16026
+ allowReservedAttributes: literal(true).optional()
16027
+ });
16028
+ const WorkflowInvokePayloadSchema = object({
16029
+ runId: string$2(),
16030
+ traceCarrier: TraceCarrierSchema.optional(),
16031
+ requestedAt: date().optional(),
16032
+ /** Consecutive replay divergences in this recovery chain and latest position. */
16033
+ replayDivergence: object({
16034
+ eventId: string$2(),
16035
+ count: number$3().int().positive()
16036
+ }).optional(),
16037
+ /** Number of times this message has been re-enqueued due to server errors (5xx) */
16038
+ serverErrorRetryCount: number$3().int().optional(),
16039
+ /** Step ID for inline step execution in combined handler. If provided, the flow execution
16040
+ * will jump directly to execute the step with the given ID before doing an event replay. */
16041
+ stepId: string$2().optional(),
16042
+ /** Step name, sent alongside stepId to avoid loading the event log just to resolve the name. */
16043
+ stepName: string$2().optional(),
16044
+ /** Run creation data, only present on the first queue delivery from start() */
16045
+ runInput: RunInputSchema.optional()
16046
+ });
16047
+ const StepInvokePayloadSchema = object({
16048
+ workflowName: string$2(),
16049
+ workflowRunId: string$2(),
16050
+ workflowStartedAt: number$3(),
16051
+ stepId: string$2(),
16052
+ traceCarrier: TraceCarrierSchema.optional(),
16053
+ requestedAt: date().optional()
16054
+ });
16055
+ const HealthCheckPayloadSchema = object({
16056
+ __healthCheck: literal(true),
16057
+ correlationId: string$2()
16058
+ });
16059
+ union([
16060
+ WorkflowInvokePayloadSchema,
16061
+ StepInvokePayloadSchema,
16062
+ HealthCheckPayloadSchema
16063
+ ]);
16064
+ const zodJsonSchema = lazy(() => {
16065
+ return union([
16066
+ string$2(),
16067
+ number$3(),
16068
+ boolean$2(),
16069
+ _null(),
16070
+ array(zodJsonSchema),
16071
+ record(string$2(), zodJsonSchema)
16072
+ ]);
16073
+ });
16074
+ object({
16075
+ currentLookbackDays: number$3(),
16076
+ maxLookbackDays: number$3(),
16077
+ currentWindowStart: date(),
16078
+ maxWindowStart: date(),
16079
+ upgradeAvailable: boolean$2()
16080
+ });
16081
+ object({
16082
+ message: string$2(),
16083
+ stack: string$2().optional(),
16084
+ code: string$2().optional()
16085
+ // Populated with RunErrorCode values (USER_ERROR, RUNTIME_ERROR, etc.) for run_failed events
16086
+ });
16087
+ string$2().ulid();
16088
+ const V4_EXTRA_EVENT_DATA_REF_FIELDS = {
16089
+ run_started: ["input"],
16090
+ step_started: ["input"]
16091
+ };
16092
+ function getEventDataRefFields(eventType) {
16093
+ return [
16094
+ .../* @__PURE__ */ new Set([
16095
+ ...EVENT_DATA_REF_FIELDS[eventType] ?? [],
16096
+ ...V4_EXTRA_EVENT_DATA_REF_FIELDS[eventType] ?? []
16097
+ ])
16098
+ ];
16099
+ }
15955
16100
  function base64ToArrayBuffer(base642) {
15956
16101
  if (base642 === "" || base642 === ".") {
15957
16102
  return new ArrayBuffer(0);
@@ -16213,7 +16358,7 @@ function replaceEncryptedAndExpiredWithMarkers(resource) {
16213
16358
  }
16214
16359
  if (result.eventData && typeof result.eventData === "object") {
16215
16360
  const eventType = typeof result.eventType === "string" ? result.eventType : "";
16216
- const refKeys = EVENT_DATA_REF_FIELDS[eventType] ?? [];
16361
+ const refKeys = getEventDataRefFields(eventType);
16217
16362
  const ed = { ...result.eventData };
16218
16363
  for (const key of refKeys) {
16219
16364
  if (key in ed) {
@@ -16224,29 +16369,28 @@ function replaceEncryptedAndExpiredWithMarkers(resource) {
16224
16369
  }
16225
16370
  return result;
16226
16371
  }
16227
- async function hydrateResourceIOWithKey(resource, key) {
16372
+ async function hydrateResourceIOAsync(resource, key) {
16228
16373
  const { hydrateDataWithKey: hydrateDataWithKey2 } = await __vitePreload(async () => {
16229
16374
  const { hydrateDataWithKey: hydrateDataWithKey3 } = await Promise.resolve().then(() => serializationFormat);
16230
16375
  return { hydrateDataWithKey: hydrateDataWithKey3 };
16231
16376
  }, true ? void 0 : void 0);
16232
- const { importKey } = await __vitePreload(async () => {
16233
- const { importKey: importKey2 } = await import("./encryption-g14N5vQl.js");
16234
- return { importKey: importKey2 };
16235
- }, true ? __vite__mapDeps([0,1,2]) : void 0);
16236
16377
  const { ensureZstdDecoderRegistered } = await __vitePreload(async () => {
16237
- const { ensureZstdDecoderRegistered: ensureZstdDecoderRegistered2 } = await import("./zstd-browser-decoder-OOeWOMJw.js");
16378
+ const { ensureZstdDecoderRegistered: ensureZstdDecoderRegistered2 } = await import("./zstd-browser-decoder-RyHgsNO3.js");
16238
16379
  return { ensureZstdDecoderRegistered: ensureZstdDecoderRegistered2 };
16239
16380
  }, true ? __vite__mapDeps([3,2]) : void 0);
16240
16381
  ensureZstdDecoderRegistered();
16241
- const cryptoKey = await importKey(key);
16382
+ const cryptoKey = key ? await __vitePreload(async () => {
16383
+ const { importKey } = await import("./encryption-BQTnudEZ.js");
16384
+ return { importKey };
16385
+ }, true ? __vite__mapDeps([0,1,2]) : void 0).then(({ importKey }) => importKey(key)) : void 0;
16242
16386
  const revivers = getRevivers();
16243
- async function decryptField(value, rev, k2) {
16387
+ async function hydrateField(value) {
16244
16388
  if (isEncryptedMarker$1(value)) {
16245
16389
  const raw2 = value.__encryptedData;
16246
- return hydrateDataWithKey2(raw2, rev, k2);
16390
+ return cryptoKey ? hydrateDataWithKey2(raw2, revivers, cryptoKey) : value;
16247
16391
  }
16248
16392
  if (value instanceof Uint8Array) {
16249
- return hydrateDataWithKey2(value, rev, k2);
16393
+ return hydrateDataWithKey2(value, revivers, cryptoKey);
16250
16394
  }
16251
16395
  return value;
16252
16396
  }
@@ -16254,21 +16398,21 @@ async function hydrateResourceIOWithKey(resource, key) {
16254
16398
  const result = { ...r2 };
16255
16399
  for (const field of ["input", "output", "metadata", "error"]) {
16256
16400
  if (field in result) {
16257
- result[field] = await decryptField(result[field], revivers, cryptoKey);
16401
+ result[field] = await hydrateField(result[field]);
16258
16402
  }
16259
16403
  }
16260
16404
  if (result.eventData && typeof result.eventData === "object") {
16261
16405
  const eventType = typeof result.eventType === "string" ? result.eventType : "";
16262
- const refKeys = EVENT_DATA_REF_FIELDS[eventType] ?? [];
16406
+ const refKeys = getEventDataRefFields(eventType);
16263
16407
  const eventData = { ...result.eventData };
16264
16408
  for (const field of refKeys) {
16265
16409
  if (field in eventData) {
16266
- eventData[field] = await decryptField(eventData[field], revivers, cryptoKey);
16410
+ eventData[field] = await hydrateField(eventData[field]);
16267
16411
  }
16268
16412
  }
16269
16413
  result.eventData = eventData;
16270
16414
  }
16271
- return result;
16415
+ return replaceEncryptedAndExpiredWithMarkers(result);
16272
16416
  }
16273
16417
  function hasEncryptedFields(resource) {
16274
16418
  if (!resource || typeof resource !== "object")
@@ -16280,7 +16424,7 @@ function hasEncryptedFields(resource) {
16280
16424
  }
16281
16425
  if (r2.eventData && typeof r2.eventData === "object") {
16282
16426
  const eventType = typeof r2.eventType === "string" ? r2.eventType : "";
16283
- const refKeys = EVENT_DATA_REF_FIELDS[eventType] ?? [];
16427
+ const refKeys = getEventDataRefFields(eventType);
16284
16428
  const ed = r2.eventData;
16285
16429
  for (const key of refKeys) {
16286
16430
  if (key in ed && isEncryptedMarker$1(ed[key]))
@@ -17512,6 +17656,47 @@ const cva = (base, config2) => (props) => {
17512
17656
  }, []);
17513
17657
  return cx(base, getVariantClassNames, getCompoundVariantClassNames, props === null || props === void 0 ? void 0 : props.class, props === null || props === void 0 ? void 0 : props.className);
17514
17658
  };
17659
+ const CollapsibleContext = reactExports.createContext(null);
17660
+ function useCollapsibleContext(part) {
17661
+ const context = reactExports.useContext(CollapsibleContext);
17662
+ if (!context) {
17663
+ throw new Error(`<Collapsible${part}> must be rendered inside <CollapsibleRoot>`);
17664
+ }
17665
+ return context;
17666
+ }
17667
+ function CollapsibleRoot({ children: children2, variant = "section", disabled = false, defaultOpen = false, onOpenChange, className }) {
17668
+ const [open, setOpen] = reactExports.useState(defaultOpen);
17669
+ const handleToggle = (event) => {
17670
+ if (event.target !== event.currentTarget)
17671
+ return;
17672
+ const next2 = event.currentTarget.open;
17673
+ setOpen(next2);
17674
+ onOpenChange == null ? void 0 : onOpenChange(next2);
17675
+ };
17676
+ const details = jsxRuntimeExports.jsx("details", { "data-slot": "collapsible", "data-state": open ? "open" : "closed", open, onToggle: disabled ? void 0 : handleToggle, className: cn$4(variant === "card" ? "group/card border-gray-alpha-400 last:border-b" : "group", className), children: jsxRuntimeExports.jsx(CollapsibleContext.Provider, { value: { variant, disabled }, children: children2 }) });
17677
+ if (variant === "card") {
17678
+ return details;
17679
+ }
17680
+ return jsxRuntimeExports.jsx("section", { className: "-mx-4 border-t border-gray-alpha-400 px-4 py-2", children: details });
17681
+ }
17682
+ function CollapsibleTrigger({ children: children2, className }) {
17683
+ const { variant, disabled } = useCollapsibleContext("Trigger");
17684
+ if (variant === "card") {
17685
+ return jsxRuntimeExports.jsxs("summary", { "data-slot": "collapsible-trigger", className: cn$4("flex cursor-pointer list-none items-center gap-1.5 border-t border-gray-alpha-400 bg-background-200 px-3 py-4 hover:bg-gray-100 [&::-webkit-details-marker]:hidden", className), children: [jsxRuntimeExports.jsx(ChevronRight, { size: 14, className: "shrink-0 text-gray-700 group-hover/card:text-gray-1000 group-open/card:rotate-90" }), children2] });
17686
+ }
17687
+ const row = "flex h-9 items-center gap-2 -mx-2 px-2 text-heading-14 font-medium list-none [&::-webkit-details-marker]:hidden";
17688
+ if (disabled) {
17689
+ return jsxRuntimeExports.jsx("summary", { "data-slot": "collapsible-trigger", className: cn$4(row, "pointer-events-none text-gray-700", className), children: jsxRuntimeExports.jsx("span", { className: "min-w-0 flex-1", children: children2 }) });
17690
+ }
17691
+ return jsxRuntimeExports.jsxs("summary", { "data-slot": "collapsible-trigger", className: cn$4(row, "group/trigger cursor-pointer rounded hover:bg-gray-alpha-100", className), children: [jsxRuntimeExports.jsxs("span", { className: "relative isolate h-3.5 w-3.5 shrink-0 text-gray-700 group-hover/trigger:text-gray-1000", children: [jsxRuntimeExports.jsx(ChevronRight, { size: 14, className: "absolute top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 opacity-100 group-open:opacity-0" }), jsxRuntimeExports.jsx(ChevronDown, { size: 14, className: "absolute top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 opacity-0 group-open:opacity-100" })] }), jsxRuntimeExports.jsx("span", { className: "min-w-0 flex-1", children: children2 })] });
17692
+ }
17693
+ function CollapsibleContent({ children: children2, className }) {
17694
+ const { variant } = useCollapsibleContext("Content");
17695
+ return jsxRuntimeExports.jsx("div", { "data-slot": "collapsible-content", className: cn$4(variant === "section" && "mt-2 mb-3", className), children: children2 });
17696
+ }
17697
+ function Collapsible({ label, children: children2, disabled, defaultOpen, onOpenChange }) {
17698
+ return jsxRuntimeExports.jsxs(CollapsibleRoot, { disabled, defaultOpen, onOpenChange, children: [jsxRuntimeExports.jsx(CollapsibleTrigger, { children: label }), children2 != null && jsxRuntimeExports.jsx(CollapsibleContent, { children: children2 })] });
17699
+ }
17515
17700
  const buttonVariants$1 = cva([
17516
17701
  "outline-none m-0 border-0 align-baseline no-underline group/trigger",
17517
17702
  "relative cursor-pointer select-none transform translate-z-0",
@@ -17969,14 +18154,7 @@ function ExpandableContainer({ field, entries, open, close, prefix, ctx, isLast
17969
18154
  }
17970
18155
  };
17971
18156
  const lastIndex = entries.length - 1;
17972
- return (
17973
- // The treeitem row is the focusable, keyboard-operable control (roving
17974
- // tabindex + arrow keys); the disclosure marker below is purely decorative.
17975
- jsxRuntimeExports.jsxs("div", { className: CLS.child, role: "treeitem", "aria-expanded": expanded2, "aria-controls": expanded2 ? contentsId : void 0, "data-json-expander": true, ref: rowRef, tabIndex: level === 0 ? 0 : -1, onClick, onKeyDown, children: [jsxRuntimeExports.jsx("span", { className: expanded2 ? CLS.collapseIcon : CLS.expandIcon, "aria-hidden": "true" }), field !== void 0 && jsxRuntimeExports.jsx("span", { className: CLS.clickableLabel, children: `${formatField(field)}:` }), prefix ? jsxRuntimeExports.jsx("span", { className: CLS.className, children: prefix }) : null, jsxRuntimeExports.jsx("span", { className: CLS.punctuation, children: open }), expanded2 ? (
17976
- // biome-ignore lint/a11y/useSemanticElements: ARIA tree group is the correct role here
17977
- jsxRuntimeExports.jsx("ul", { id: contentsId, className: CLS.childFields, role: "group", children: entries.map(([childField, childValue], index2) => jsxRuntimeExports.jsx(DataRender, { field: childField, value: childValue, isLast: index2 === lastIndex, ctx: { ...ctx, level: level + 1 } }, childField ?? index2)) })
17978
- ) : jsxRuntimeExports.jsx("span", { className: CLS.collapsedContent, "aria-hidden": "true" }), jsxRuntimeExports.jsx("span", { className: CLS.punctuation, children: close }), jsxRuntimeExports.jsx(Comma, { isLast })] })
17979
- );
18157
+ return jsxRuntimeExports.jsxs("div", { className: CLS.child, role: "treeitem", "aria-expanded": expanded2, "aria-controls": expanded2 ? contentsId : void 0, "data-json-expander": true, ref: rowRef, tabIndex: level === 0 ? 0 : -1, onClick, onKeyDown, children: [jsxRuntimeExports.jsx("span", { className: expanded2 ? CLS.collapseIcon : CLS.expandIcon, "aria-hidden": "true" }), field !== void 0 && jsxRuntimeExports.jsx("span", { className: CLS.clickableLabel, children: `${formatField(field)}:` }), prefix ? jsxRuntimeExports.jsx("span", { className: CLS.className, children: prefix }) : null, jsxRuntimeExports.jsx("span", { className: CLS.punctuation, children: open }), expanded2 ? jsxRuntimeExports.jsx("ul", { id: contentsId, className: CLS.childFields, role: "group", children: entries.map(([childField, childValue], index2) => jsxRuntimeExports.jsx(DataRender, { field: childField, value: childValue, isLast: index2 === lastIndex, ctx: { ...ctx, level: level + 1 } }, childField ?? index2)) }) : jsxRuntimeExports.jsx("span", { className: CLS.collapsedContent, "aria-hidden": "true" }), jsxRuntimeExports.jsx("span", { className: CLS.punctuation, children: close }), jsxRuntimeExports.jsx(Comma, { isLast })] });
17980
18158
  }
17981
18159
  function DataRender({ field, value, isLast, ctx }) {
17982
18160
  if (isBytesDisplay(value)) {
@@ -43762,7 +43940,7 @@ var tn = f("block", "before:content-[counter(line)]", "before:inline-block", "be
43762
43940
  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 });
43763
43941
  var Se = reactExports.createContext({ code: "" }), de = () => reactExports.useContext(Se);
43764
43942
  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 }) });
43765
- var cn$1 = /\n+$/, dn = reactExports.lazy(() => __vitePreload(() => import("./highlighted-body-B3W2YXNL-QrddlyZu.js"), true ? __vite__mapDeps([4,2]) : void 0).then((e) => ({ default: e.HighlightedCodeBlockBody }))), rt = ({ code: e, language: t, className: o, children: n, isIncomplete: s2 = false, ...r2 }) => {
43943
+ var cn$1 = /\n+$/, dn = reactExports.lazy(() => __vitePreload(() => import("./highlighted-body-B3W2YXNL-B-EF8R0t.js"), true ? __vite__mapDeps([4,2]) : void 0).then((e) => ({ default: e.HighlightedCodeBlockBody }))), rt = ({ code: e, language: t, className: o, children: n, isIncomplete: s2 = false, ...r2 }) => {
43766
43944
  let i = reactExports.useMemo(() => e.replace(cn$1, ""), [e]), c = reactExports.useMemo(() => ({ bg: "transparent", fg: "inherit", tokens: i.split(`
43767
43945
  `).map((a2) => [{ content: a2, color: "inherit", bgColor: "transparent", htmlStyle: {}, offset: 0 }]) }), [i]);
43768
43946
  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 }) })] }) });
@@ -45834,6 +46012,50 @@ const Tooltip$1 = Root3;
45834
46012
  const TooltipTrigger$1 = Trigger;
45835
46013
  const TooltipContent$1 = reactExports.forwardRef(({ className, sideOffset = 8, showArrow = true, children: children2, ...props }, ref) => jsxRuntimeExports.jsx(Portal, { children: jsxRuntimeExports.jsxs(Content2, { 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, { width: 11, height: 5, className: "fill-gray-1000" }) : null] }) }));
45836
46014
  TooltipContent$1.displayName = Content2.displayName;
46015
+ const ActiveSpanContext = reactExports.createContext(null);
46016
+ ActiveSpanContext.displayName = "ActiveSpanContext";
46017
+ function ActiveSpanProvider({ spans, children: children2 }) {
46018
+ const [activeSpanId, setActiveSpanId] = reactExports.useState(null);
46019
+ reactExports.useEffect(() => {
46020
+ setActiveSpanId((currentSpanId) => {
46021
+ if (!currentSpanId) {
46022
+ return null;
46023
+ }
46024
+ const hasCurrentSpan = spans.some((span) => span.spanId === currentSpanId);
46025
+ if (hasCurrentSpan) {
46026
+ return currentSpanId;
46027
+ }
46028
+ return null;
46029
+ });
46030
+ }, [spans]);
46031
+ const activeSpan = reactExports.useMemo(() => {
46032
+ if (!activeSpanId) {
46033
+ return null;
46034
+ }
46035
+ return spans.find((span) => span.spanId === activeSpanId) ?? null;
46036
+ }, [activeSpanId, spans]);
46037
+ const setActiveSpan = reactExports.useCallback((spanId) => {
46038
+ setActiveSpanId(spanId);
46039
+ }, []);
46040
+ const clearActiveSpan = reactExports.useCallback(() => {
46041
+ setActiveSpanId(null);
46042
+ }, []);
46043
+ const value = reactExports.useMemo(() => ({
46044
+ activeSpanId,
46045
+ activeSpan,
46046
+ spans,
46047
+ setActiveSpan,
46048
+ clearActiveSpan
46049
+ }), [activeSpanId, activeSpan, spans, setActiveSpan, clearActiveSpan]);
46050
+ return jsxRuntimeExports.jsx(ActiveSpanContext.Provider, { value, children: children2 });
46051
+ }
46052
+ const useActiveSpan = () => {
46053
+ const context = reactExports.useContext(ActiveSpanContext);
46054
+ if (!context) {
46055
+ throw new Error("useActiveSpan must be used within ActiveSpanProvider");
46056
+ }
46057
+ return context;
46058
+ };
45837
46059
  const ATTR_FILTER_REGEX = /(?:^|\s)(?<pair>(?<key>[\w.]+):(?<value>\S*))/g;
45838
46060
  function parseSpanSearchQuery(rawQuery) {
45839
46061
  var _a3, _b2, _c;
@@ -46608,49 +46830,6 @@ function Timeline({ spans, viewStart, viewEnd, markers: markers2, selectedId, se
46608
46830
  Math.abs(marker2.value) > 1e-6 ? jsxRuntimeExports.jsx("div", { className: "absolute top-0 bottom-0 w-px bg-gray-alpha-300", style: { left: `${marker2.position * 100}%` } }, String(marker2.value)) : null
46609
46831
  )) }), hoverFraction != null && jsxRuntimeExports.jsx("div", { className: "absolute inset-y-0 pointer-events-none z-10", style: TIMELINE_INSET_STYLE, children: jsxRuntimeExports.jsx("div", { className: "absolute top-0 bottom-0 w-px bg-gray-alpha-500", style: { left: `${hoverFraction * 100}%` } }) }), jsxRuntimeExports.jsx("div", { style: { transform: `translateY(${start * ROW_HEIGHT_PX}px)` }, children: spans.slice(start, end).map((span) => jsxRuntimeExports.jsx(TimelineBar, { span, viewStart, viewDuration, containerWidth: timelineWidth, isSelected: selectedId === span.spanId, isDimmed: isSpanDimmedBySearch(span.spanId, searchResult), onSelect, onRevealTime }, span.spanId)) }), altHeld && jsxRuntimeExports.jsx("div", { "aria-hidden": true, className: "absolute inset-y-0 pointer-events-none", style: TIMELINE_INSET_STYLE, children: gaps.map((gap) => jsxRuntimeExports.jsx(DeltaIndicator, { leftFrac: gap.leftFrac, rightFrac: gap.rightFrac, label: formatDuration(gap.gapMs, true), rowIndex: gap.rowIndex }, gap.rowIndex)) })] });
46610
46832
  }
46611
- const ActiveSpanContext = reactExports.createContext(null);
46612
- ActiveSpanContext.displayName = "ActiveSpanContext";
46613
- function ActiveSpanProvider({ spans, children: children2 }) {
46614
- const [activeSpanId, setActiveSpanId] = reactExports.useState(null);
46615
- reactExports.useEffect(() => {
46616
- setActiveSpanId((currentSpanId) => {
46617
- if (!currentSpanId) {
46618
- return null;
46619
- }
46620
- const hasCurrentSpan = spans.some((span) => span.spanId === currentSpanId);
46621
- if (hasCurrentSpan) {
46622
- return currentSpanId;
46623
- }
46624
- return null;
46625
- });
46626
- }, [spans]);
46627
- const activeSpan = reactExports.useMemo(() => {
46628
- if (!activeSpanId) {
46629
- return null;
46630
- }
46631
- return spans.find((span) => span.spanId === activeSpanId) ?? null;
46632
- }, [activeSpanId, spans]);
46633
- const setActiveSpan = reactExports.useCallback((spanId) => {
46634
- setActiveSpanId(spanId);
46635
- }, []);
46636
- const clearActiveSpan = reactExports.useCallback(() => {
46637
- setActiveSpanId(null);
46638
- }, []);
46639
- const value = reactExports.useMemo(() => ({
46640
- activeSpanId,
46641
- activeSpan,
46642
- setActiveSpan,
46643
- clearActiveSpan
46644
- }), [activeSpanId, activeSpan, setActiveSpan, clearActiveSpan]);
46645
- return jsxRuntimeExports.jsx(ActiveSpanContext.Provider, { value, children: children2 });
46646
- }
46647
- const useActiveSpan = () => {
46648
- const context = reactExports.useContext(ActiveSpanContext);
46649
- if (!context) {
46650
- throw new Error("useActiveSpan must be used within ActiveSpanProvider");
46651
- }
46652
- return context;
46653
- };
46654
46833
  const DEFAULT_PAGE_SIZE = 10;
46655
46834
  function cn(...inputs) {
46656
46835
  return twMerge(clsx(inputs));
@@ -49050,106 +49229,112 @@ const mermaid3ZIDBTTL = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.def
49050
49229
  Mermaid: Nt
49051
49230
  }, Symbol.toStringTag, { value: "Module" }));
49052
49231
  export {
49053
- RESERVED_ATTRIBUTE_KEY_PREFIX as $,
49232
+ Spinner as $,
49054
49233
  Anchor as A,
49055
49234
  Button as B,
49056
- Content as C,
49235
+ ChevronRight as C,
49057
49236
  DEFAULT_PAGE_SIZE as D,
49058
- Root2 as E,
49059
- Arrow as F,
49060
- useComposedRefs as G,
49061
- fetchRun as H,
49062
- cva as I,
49063
- Presence as J,
49237
+ useControllableState as E,
49238
+ Root2 as F,
49239
+ Arrow as G,
49240
+ ChevronDown as H,
49241
+ useComposedRefs as I,
49242
+ fetchRun as J,
49064
49243
  Ks as K,
49065
49244
  LoaderCircle as L,
49066
- createContext2 as M,
49067
- fetchWorkflowsManifest as N,
49068
- cn$4 as O,
49245
+ cva as M,
49246
+ Presence as N,
49247
+ createContext2 as O,
49069
49248
  Primitive as P,
49070
49249
  Qe as Q,
49071
49250
  R,
49072
49251
  ServerConfigProvider as S,
49073
49252
  Tooltip as T,
49074
- DataInspector as U,
49253
+ fetchWorkflowsManifest as U,
49075
49254
  VISUALLY_HIDDEN_STYLES as V,
49076
- DecryptClickContext as W,
49077
- Button$1 as X,
49078
- Spinner as Y,
49079
- Lock as Z,
49255
+ cn$4 as W,
49256
+ DataInspector as X,
49257
+ DecryptClickContext as Y,
49258
+ Button$1 as Z,
49080
49259
  __vitePreload as _,
49081
49260
  TooltipTrigger as a,
49082
- hide as a$,
49083
- ContextCardProvider as a0,
49084
- Skeleton$1 as a1,
49085
- Yr as a2,
49086
- isEncryptedMarker$1 as a3,
49087
- TimestampTooltip as a4,
49088
- formatDuration as a5,
49089
- _r as a6,
49090
- RunClickContext as a7,
49091
- StreamClickContext as a8,
49092
- isExpiredMarker as a9,
49093
- TooltipTrigger$1 as aA,
49094
- TooltipContent$1 as aB,
49095
- SidebarDataProvider as aC,
49096
- fetchHook as aD,
49097
- hydrateResourceIO as aE,
49098
- hydrateResourceIOWithKey as aF,
49099
- fetchStep as aG,
49100
- fetchStreams as aH,
49101
- Slot as aI,
49102
- Slottable as aJ,
49103
- buttonVariants as aK,
49104
- fetchEvent as aL,
49105
- fetchEventsByCorrelationId as aM,
49106
- isEncryptedData as aN,
49107
- hydrateData as aO,
49108
- getWebRevivers as aP,
49109
- LIVE_UPDATE_INTERVAL_MS as aQ,
49110
- getEncryptionKeyForRun as aR,
49111
- StreamViewer as aS,
49112
- composeRefs as aT,
49113
- useFloating as aU,
49114
- offset as aV,
49115
- shift as aW,
49116
- limitShift as aX,
49117
- flip as aY,
49118
- size as aZ,
49119
- arrow as a_,
49120
- isDoStreamStep as aa,
49121
- extractConversation as ab,
49122
- hasEncryptedFields as ac,
49123
- EVENT_DATA_REF_FIELDS as ad,
49124
- useSidebarDataOptional as ae,
49125
- clsx as af,
49126
- useRowWindow as ag,
49127
- isSpanDimmedBySearch as ah,
49128
- ROW_HEIGHT_PX as ai,
49129
- getSpanDurationMs as aj,
49130
- formatDurationPrecise as ak,
49131
- TooltipProvider as al,
49132
- ActiveSpanProvider as am,
49133
- useActiveSpan as an,
49134
- useSidebarData as ao,
49135
- useReducedMotion as ap,
49136
- searchSpans as aq,
49137
- computeRootBounds as ar,
49138
- computeTimeMarkers as as,
49139
- getHighResInMs as at,
49140
- scrollRowIntoView as au,
49141
- TIMELINE_PADDING_PX as av,
49142
- Timeline as aw,
49143
- TimelineHeader as ax,
49144
- IconButton as ay,
49145
- Tooltip$1 as az,
49261
+ offset as a$,
49262
+ Lock as a0,
49263
+ CollapsibleRoot as a1,
49264
+ CollapsibleTrigger as a2,
49265
+ CollapsibleContent as a3,
49266
+ RESERVED_ATTRIBUTE_KEY_PREFIX as a4,
49267
+ ContextCardProvider as a5,
49268
+ Skeleton$1 as a6,
49269
+ Yr as a7,
49270
+ isEncryptedMarker$1 as a8,
49271
+ TimestampTooltip as a9,
49272
+ searchSpans as aA,
49273
+ computeRootBounds as aB,
49274
+ computeTimeMarkers as aC,
49275
+ getHighResInMs as aD,
49276
+ scrollRowIntoView as aE,
49277
+ TIMELINE_PADDING_PX as aF,
49278
+ Timeline as aG,
49279
+ TimelineHeader as aH,
49280
+ SidebarDataProvider as aI,
49281
+ fetchHook as aJ,
49282
+ hydrateResourceIOAsync as aK,
49283
+ fetchStep as aL,
49284
+ hydrateResourceIO as aM,
49285
+ fetchStreams as aN,
49286
+ Slot as aO,
49287
+ Slottable as aP,
49288
+ buttonVariants as aQ,
49289
+ fetchEvent as aR,
49290
+ fetchEventsByCorrelationId as aS,
49291
+ isEncryptedData as aT,
49292
+ hydrateData as aU,
49293
+ getWebRevivers as aV,
49294
+ LIVE_UPDATE_INTERVAL_MS as aW,
49295
+ getEncryptionKeyForRun as aX,
49296
+ StreamViewer as aY,
49297
+ composeRefs as aZ,
49298
+ useFloating as a_,
49299
+ formatDuration as aa,
49300
+ _r as ab,
49301
+ RunClickContext as ac,
49302
+ StreamClickContext as ad,
49303
+ Collapsible as ae,
49304
+ isExpiredMarker as af,
49305
+ isDoStreamStep as ag,
49306
+ extractConversation as ah,
49307
+ hasEncryptedFields as ai,
49308
+ getEventDataRefFields as aj,
49309
+ useSidebarDataOptional as ak,
49310
+ clsx as al,
49311
+ useActiveSpan as am,
49312
+ useSidebarData as an,
49313
+ Tooltip$1 as ao,
49314
+ TooltipTrigger$1 as ap,
49315
+ IconButton as aq,
49316
+ TooltipContent$1 as ar,
49317
+ useRowWindow as as,
49318
+ isSpanDimmedBySearch as at,
49319
+ ROW_HEIGHT_PX as au,
49320
+ getSpanDurationMs as av,
49321
+ formatDurationPrecise as aw,
49322
+ TooltipProvider as ax,
49323
+ ActiveSpanProvider as ay,
49324
+ useReducedMotion as az,
49146
49325
  TooltipContent as b,
49147
- autoUpdate as b0,
49148
- cancelRun as b1,
49149
- reenqueueRun as b2,
49150
- wakeUpRun as b3,
49151
- resumeHook as b4,
49152
- recreateRun as b5,
49326
+ shift as b0,
49327
+ limitShift as b1,
49328
+ flip as b2,
49329
+ size as b3,
49330
+ arrow as b4,
49331
+ hide as b5,
49332
+ autoUpdate as b6,
49333
+ cancelRun as b7,
49334
+ reenqueueRun as b8,
49335
+ wakeUpRun as b9,
49336
+ resumeHook as ba,
49337
+ recreateRun as bb,
49153
49338
  createLucideIcon as c,
49154
49339
  runHealthCheck as d,
49155
49340
  cn as e,
@@ -49173,5 +49358,5 @@ export {
49173
49358
  DismissableLayer as w,
49174
49359
  createContextScope as x,
49175
49360
  createSlot as y,
49176
- useControllableState as z
49361
+ Content as z
49177
49362
  };