@vitest-agent/ui 2.3.0 → 2.4.0

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 (3) hide show
  1. package/index.d.ts +133 -65
  2. package/index.js +1 -1
  3. package/package.json +3 -3
package/index.d.ts CHANGED
@@ -41,7 +41,7 @@ type FileCoverageReport = typeof FileCoverageReport.Type;
41
41
  * Per-test record accumulated as `TestStarted` / `TestFinished` events arrive.
42
42
  * @public
43
43
  */
44
- declare const TestRecord: Schema.Struct<{
44
+ export declare const TestRecord: Schema.Struct<{
45
45
  readonly testName: Schema.String;
46
46
  readonly suitePath: Schema.$Array<Schema.String>;
47
47
  readonly status: Schema.Union<readonly [Schema.Literals<readonly ["passed", "failed", "skipped", "pending"]>, Schema.Literals<readonly ["running", "timed-out"]>]>;
@@ -55,13 +55,13 @@ declare const TestRecord: Schema.Struct<{
55
55
  }>>;
56
56
  }>;
57
57
  /** @public */
58
- type TestRecord = typeof TestRecord.Type;
58
+ export type TestRecord = typeof TestRecord.Type;
59
59
  /**
60
60
  * Per-module aggregation. The reducer keeps modules keyed on
61
61
  * `modulePath` so out-of-order events can update the right slot.
62
62
  * @public
63
63
  */
64
- declare const ModuleRecord: Schema.Struct<{
64
+ export declare const ModuleRecord: Schema.Struct<{
65
65
  readonly modulePath: Schema.String;
66
66
  readonly status: Schema.Literals<readonly ["queued", "running", "finished"]>;
67
67
  readonly passCount: Schema.Number;
@@ -98,14 +98,14 @@ declare const ModuleRecord: Schema.Struct<{
98
98
  readonly tagCounts: Schema.optional<Schema.$Record<Schema.String, Schema.Number>>;
99
99
  }>;
100
100
  /** @public */
101
- type ModuleRecord = typeof ModuleRecord.Type;
101
+ export type ModuleRecord = typeof ModuleRecord.Type;
102
102
  /**
103
103
  * One row in the failure list. A failure can exist before its
104
104
  * classification arrives (`FailureClassified` is emitted from a
105
105
  * separate pipeline), so `classification` is nullable.
106
106
  * @public
107
107
  */
108
- declare const FailureRecord: Schema.Struct<{
108
+ export declare const FailureRecord: Schema.Struct<{
109
109
  readonly modulePath: Schema.String;
110
110
  readonly testName: Schema.String;
111
111
  readonly suitePath: Schema.$Array<Schema.String>;
@@ -120,13 +120,13 @@ declare const FailureRecord: Schema.Struct<{
120
120
  readonly classification: Schema.NullOr<Schema.Literals<readonly ["stable", "new-failure", "persistent", "flaky", "recovered"]>>;
121
121
  }>;
122
122
  /** @public */
123
- type FailureRecord = typeof FailureRecord.Type;
123
+ export type FailureRecord = typeof FailureRecord.Type;
124
124
  /**
125
125
  * Coverage block, populated only after `CoverageReady`. Threshold
126
126
  * violations are accumulated separately as they arrive.
127
127
  * @public
128
128
  */
129
- declare const CoverageRenderState: Schema.Struct<{
129
+ export declare const CoverageRenderState: Schema.Struct<{
130
130
  readonly metrics: Schema.Struct<{
131
131
  readonly statements: Schema.Number;
132
132
  readonly branches: Schema.Number;
@@ -159,25 +159,25 @@ declare const CoverageRenderState: Schema.Struct<{
159
159
  readonly totalFiles: Schema.optional<Schema.Number>;
160
160
  }>;
161
161
  /** @public */
162
- type CoverageRenderState = typeof CoverageRenderState.Type;
162
+ export type CoverageRenderState = typeof CoverageRenderState.Type;
163
163
  /**
164
164
  * A `SuggestedAction` event, denormalized into the queue the renderer reads.
165
165
  * @public
166
166
  */
167
- declare const SuggestedActionRecord: Schema.Struct<{
167
+ export declare const SuggestedActionRecord: Schema.Struct<{
168
168
  readonly severity: Schema.Literals<readonly ["info", "warn", "blocker"]>;
169
169
  readonly title: Schema.String;
170
170
  readonly detail: Schema.String;
171
171
  readonly targetTool: Schema.optional<Schema.String>;
172
172
  }>;
173
173
  /** @public */
174
- type SuggestedActionRecord = typeof SuggestedActionRecord.Type;
174
+ export type SuggestedActionRecord = typeof SuggestedActionRecord.Type;
175
175
  /**
176
176
  * Per-run totals, recomputed on every `ModuleFinished` and reconciled
177
177
  * against `RunFinished` (which carries the runner's own count).
178
178
  * @public
179
179
  */
180
- declare const RenderTotals: Schema.Struct<{
180
+ export declare const RenderTotals: Schema.Struct<{
181
181
  readonly passCount: Schema.Number;
182
182
  readonly failCount: Schema.Number;
183
183
  readonly skipCount: Schema.Number;
@@ -185,7 +185,7 @@ declare const RenderTotals: Schema.Struct<{
185
185
  readonly durationMs: Schema.Number;
186
186
  }>;
187
187
  /** @public */
188
- type RenderTotals = typeof RenderTotals.Type;
188
+ export type RenderTotals = typeof RenderTotals.Type;
189
189
  /**
190
190
  * The renderer state. Both the human (Ink) and agent (string)
191
191
  * renderers read this shape; the reducer is the only producer.
@@ -197,7 +197,7 @@ type RenderTotals = typeof RenderTotals.Type;
197
197
  * rather than the suite completing.
198
198
  * @public
199
199
  */
200
- declare const RenderState: Schema.Struct<{
200
+ export declare const RenderState: Schema.Struct<{
201
201
  readonly phase: Schema.Literals<readonly ["idle", "running", "finished", "timed-out"]>;
202
202
  readonly runId: Schema.NullOr<Schema.String>;
203
203
  readonly configHash: Schema.NullOr<Schema.String>;
@@ -328,14 +328,14 @@ declare const RenderState: Schema.Struct<{
328
328
  }>>;
329
329
  }>;
330
330
  /** @public */
331
- type RenderState = typeof RenderState.Type;
331
+ export type RenderState = typeof RenderState.Type;
332
332
  /**
333
333
  * Initial state — what the reducer returns when no events have been
334
334
  * applied yet. Exported so tests and the renderers' bootstrapping
335
335
  * code share one definition.
336
336
  * @public
337
337
  */
338
- declare const initialRenderState: RenderState;
338
+ export declare const initialRenderState: RenderState;
339
339
  //#endregion
340
340
  //#region src/contracts/dispatcher.d.ts
341
341
  /**
@@ -537,6 +537,12 @@ declare const AgentReport: Schema.Struct<{
537
537
  readonly functions: Schema.optional<Schema.Number>;
538
538
  readonly branches: Schema.optional<Schema.Number>;
539
539
  readonly statements: Schema.optional<Schema.Number>;
540
+ readonly perFile: Schema.optionalKey<Schema.Union<readonly [Schema.Boolean, Schema.Struct<{
541
+ readonly lines: Schema.optional<Schema.Number>;
542
+ readonly functions: Schema.optional<Schema.Number>;
543
+ readonly branches: Schema.optional<Schema.Number>;
544
+ readonly statements: Schema.optional<Schema.Number>;
545
+ }>]>>;
540
546
  }>]>>, never>;
541
547
  }>;
542
548
  readonly targets: Schema.optional<Schema.Struct<{
@@ -551,6 +557,12 @@ declare const AgentReport: Schema.Struct<{
551
557
  readonly functions: Schema.optional<Schema.Number>;
552
558
  readonly branches: Schema.optional<Schema.Number>;
553
559
  readonly statements: Schema.optional<Schema.Number>;
560
+ readonly perFile: Schema.optionalKey<Schema.Union<readonly [Schema.Boolean, Schema.Struct<{
561
+ readonly lines: Schema.optional<Schema.Number>;
562
+ readonly functions: Schema.optional<Schema.Number>;
563
+ readonly branches: Schema.optional<Schema.Number>;
564
+ readonly statements: Schema.optional<Schema.Number>;
565
+ }>]>>;
554
566
  }>]>>, never>;
555
567
  }>>;
556
568
  readonly baselines: Schema.optional<Schema.Struct<{
@@ -565,6 +577,12 @@ declare const AgentReport: Schema.Struct<{
565
577
  readonly functions: Schema.optional<Schema.Number>;
566
578
  readonly branches: Schema.optional<Schema.Number>;
567
579
  readonly statements: Schema.optional<Schema.Number>;
580
+ readonly perFile: Schema.optionalKey<Schema.Union<readonly [Schema.Boolean, Schema.Struct<{
581
+ readonly lines: Schema.optional<Schema.Number>;
582
+ readonly functions: Schema.optional<Schema.Number>;
583
+ readonly branches: Schema.optional<Schema.Number>;
584
+ readonly statements: Schema.optional<Schema.Number>;
585
+ }>]>>;
568
586
  }>]>>, never>;
569
587
  }>>;
570
588
  readonly scoped: Schema.withDecodingDefaultKey<Schema.Boolean, never>;
@@ -629,22 +647,22 @@ type TestClassification = typeof TestClassification.Type;
629
647
  * Coverage metric whose threshold can be violated independently.
630
648
  * @public
631
649
  */
632
- declare const CoverageMetric: Schema.Literals<readonly ["lines", "branches", "functions", "statements"]>;
650
+ export declare const CoverageMetric: Schema.Literals<readonly ["lines", "branches", "functions", "statements"]>;
633
651
  /** @public */
634
- type CoverageMetric = typeof CoverageMetric.Type;
652
+ export type CoverageMetric = typeof CoverageMetric.Type;
635
653
  /**
636
654
  * Severity tier for a suggested action emitted during a run.
637
655
  * @public
638
656
  */
639
- declare const ActionSeverity: Schema.Literals<readonly ["info", "warn", "blocker"]>;
657
+ export declare const ActionSeverity: Schema.Literals<readonly ["info", "warn", "blocker"]>;
640
658
  /** @public */
641
- type ActionSeverity = typeof ActionSeverity.Type;
659
+ export type ActionSeverity = typeof ActionSeverity.Type;
642
660
  /**
643
661
  * A coverage gap surfaced to the renderer — a per-file shortfall that
644
662
  * a renderer may want to call out individually.
645
663
  * @public
646
664
  */
647
- declare const CoverageGap: Schema.Struct<{
665
+ export declare const CoverageGap: Schema.Struct<{
648
666
  readonly file: Schema.String;
649
667
  readonly missing: Schema.Struct<{
650
668
  readonly statements: Schema.Number;
@@ -655,7 +673,7 @@ declare const CoverageGap: Schema.Struct<{
655
673
  readonly uncoveredLines: Schema.optional<Schema.String>;
656
674
  }>;
657
675
  /** @public */
658
- type CoverageGap = typeof CoverageGap.Type;
676
+ export type CoverageGap = typeof CoverageGap.Type;
659
677
  /**
660
678
  * The reducer projects this union into `RenderState`. Renderers
661
679
  * never read the raw event stream — they read the projected state.
@@ -666,7 +684,7 @@ type CoverageGap = typeof CoverageGap.Type;
666
684
  * been updated to consume the new state shape.
667
685
  * @public
668
686
  */
669
- declare const RunEvent: Schema.Union<readonly [Schema.TaggedStruct<"RunStarted", {
687
+ export declare const RunEvent: Schema.Union<readonly [Schema.TaggedStruct<"RunStarted", {
670
688
  readonly runId: Schema.String;
671
689
  readonly startedAt: Schema.String;
672
690
  readonly configHash: Schema.String;
@@ -749,11 +767,36 @@ declare const RunEvent: Schema.Union<readonly [Schema.TaggedStruct<"RunStarted",
749
767
  readonly testName: Schema.String;
750
768
  readonly suitePath: Schema.$Array<Schema.String>;
751
769
  readonly annotation: Schema.String;
770
+ readonly annotationType: Schema.String;
771
+ readonly location: Schema.optional<Schema.Struct<{
772
+ readonly file: Schema.String;
773
+ readonly line: Schema.Number;
774
+ readonly column: Schema.Number;
775
+ }>>;
776
+ readonly attachments: Schema.$Array<Schema.Struct<{
777
+ readonly contentType: Schema.optional<Schema.String>;
778
+ readonly path: Schema.optional<Schema.String>;
779
+ readonly body: Schema.optional<Schema.String>;
780
+ readonly bodyEncoding: Schema.optional<Schema.Literals<readonly ["base64", "utf-8"]>>;
781
+ readonly byteSize: Schema.Number;
782
+ }>>;
752
783
  }>, Schema.TaggedStruct<"TestArtifactRecorded", {
753
784
  readonly modulePath: Schema.String;
754
785
  readonly testName: Schema.String;
755
786
  readonly suitePath: Schema.$Array<Schema.String>;
756
787
  readonly artifact: Schema.String;
788
+ readonly location: Schema.optional<Schema.Struct<{
789
+ readonly file: Schema.String;
790
+ readonly line: Schema.Number;
791
+ readonly column: Schema.Number;
792
+ }>>;
793
+ readonly attachments: Schema.$Array<Schema.Struct<{
794
+ readonly contentType: Schema.optional<Schema.String>;
795
+ readonly path: Schema.optional<Schema.String>;
796
+ readonly body: Schema.optional<Schema.String>;
797
+ readonly bodyEncoding: Schema.optional<Schema.Literals<readonly ["base64", "utf-8"]>>;
798
+ readonly byteSize: Schema.Number;
799
+ }>>;
757
800
  }>, Schema.TaggedStruct<"WatcherReady", {}>, Schema.TaggedStruct<"WatcherRerun", {
758
801
  readonly triggerFiles: Schema.$Array<Schema.String>;
759
802
  readonly reason: Schema.optional<Schema.String>;
@@ -830,7 +873,7 @@ declare const RunEvent: Schema.Union<readonly [Schema.TaggedStruct<"RunStarted",
830
873
  }>>>;
831
874
  }>]>;
832
875
  /** @public */
833
- type RunEvent = typeof RunEvent.Type;
876
+ export type RunEvent = typeof RunEvent.Type;
834
877
  /**
835
878
  * Convenience: discriminator-keyed map of the individual variants.
836
879
  *
@@ -1044,7 +1087,7 @@ interface Cell {
1044
1087
  * @returns the run shape classification
1045
1088
  * @public
1046
1089
  */
1047
- declare const classifyRunShape: (state: RenderState, projects: ReadonlyArray<ProjectSummary>) => RunShape;
1090
+ export declare const classifyRunShape: (state: RenderState, projects: ReadonlyArray<ProjectSummary>) => RunShape;
1048
1091
  /**
1049
1092
  * Compute the outcome class from the reduced state.
1050
1093
  *
@@ -1065,7 +1108,7 @@ declare const classifyRunShape: (state: RenderState, projects: ReadonlyArray<Pro
1065
1108
  * @returns the outcome classification
1066
1109
  * @public
1067
1110
  */
1068
- declare const classifyOutcome: (state: RenderState) => RunOutcome;
1111
+ export declare const classifyOutcome: (state: RenderState) => RunOutcome;
1069
1112
  //#endregion
1070
1113
  //#region src/dispatcher/dispatch.d.ts
1071
1114
  /**
@@ -1075,7 +1118,7 @@ declare const classifyOutcome: (state: RenderState) => RunOutcome;
1075
1118
  *
1076
1119
  * @public
1077
1120
  */
1078
- declare const dispatcherTable: Readonly<Record<RunShape, Readonly<Record<RunOutcome, Cell>>>>;
1121
+ export declare const dispatcherTable: Readonly<Record<RunShape, Readonly<Record<RunOutcome, Cell>>>>;
1079
1122
  /**
1080
1123
  * Dispatch to the cell that matches `(inputs.shape, inputs.outcome)`
1081
1124
  * and return its agent-half string output.
@@ -1085,7 +1128,7 @@ declare const dispatcherTable: Readonly<Record<RunShape, Readonly<Record<RunOutc
1085
1128
  * @returns the agent-string output for the matched cell
1086
1129
  * @public
1087
1130
  */
1088
- declare const dispatch: (inputs: DispatchInputs, opts: CellOptions) => string;
1131
+ export declare const dispatch: (inputs: DispatchInputs, opts: CellOptions) => string;
1089
1132
  /**
1090
1133
  * Dispatch to the cell that matches `(inputs.shape, inputs.outcome)`
1091
1134
  * and return its Ink-half React tree. Returns `null` when the matched
@@ -1097,7 +1140,7 @@ declare const dispatch: (inputs: DispatchInputs, opts: CellOptions) => string;
1097
1140
  * @returns the Ink React element, or `null` when the cell has no Ink half
1098
1141
  * @public
1099
1142
  */
1100
- declare const dispatchInk: (inputs: DispatchInputs, opts: CellOptions) => ReactElement | null;
1143
+ export declare const dispatchInk: (inputs: DispatchInputs, opts: CellOptions) => ReactElement | null;
1101
1144
  //#endregion
1102
1145
  //#region src/dispatcher/footer.d.ts
1103
1146
  /**
@@ -1111,7 +1154,7 @@ declare const dispatchInk: (inputs: DispatchInputs, opts: CellOptions) => ReactE
1111
1154
  * @returns the most actionable classification, or `null` when none applies
1112
1155
  * @public
1113
1156
  */
1114
- declare const dominantClassification: (state: RenderState) => TestClassification | null;
1157
+ export declare const dominantClassification: (state: RenderState) => TestClassification | null;
1115
1158
  /**
1116
1159
  * Compose the trailing footer lines for a dispatcher cell. Returns an
1117
1160
  * empty string when no pointer applies. The footer starts with a
@@ -1122,7 +1165,7 @@ declare const dominantClassification: (state: RenderState) => TestClassification
1122
1165
  * @returns the footer string, or an empty string when no pointer applies
1123
1166
  * @public
1124
1167
  */
1125
- declare const buildFooter: (inputs: DispatchInputs) => string;
1168
+ export declare const buildFooter: (inputs: DispatchInputs) => string;
1126
1169
  //#endregion
1127
1170
  //#region src/format-duration.d.ts
1128
1171
  /**
@@ -1150,7 +1193,7 @@ declare const buildFooter: (inputs: DispatchInputs) => string;
1150
1193
  * @returns formatted duration string
1151
1194
  * @public
1152
1195
  */
1153
- declare const formatDisplayDuration: (ms: number) => string;
1196
+ export declare const formatDisplayDuration: (ms: number) => string;
1154
1197
  //#endregion
1155
1198
  //#region src/pubsub/Channel.d.ts
1156
1199
  declare const RunEventChannel_base: Context.ServiceClass<RunEventChannel, "vitest-agent-ui/RunEventChannel", PubSub.PubSub<{
@@ -1252,12 +1295,37 @@ declare const RunEventChannel_base: Context.ServiceClass<RunEventChannel, "vites
1252
1295
  readonly testName: string;
1253
1296
  readonly suitePath: readonly string[];
1254
1297
  readonly annotation: string;
1298
+ readonly annotationType: string;
1299
+ readonly location?: {
1300
+ readonly file: string;
1301
+ readonly line: number;
1302
+ readonly column: number;
1303
+ } | undefined;
1304
+ readonly attachments: readonly {
1305
+ readonly contentType?: string | undefined;
1306
+ readonly path?: string | undefined;
1307
+ readonly body?: string | undefined;
1308
+ readonly bodyEncoding?: "base64" | "utf-8" | undefined;
1309
+ readonly byteSize: number;
1310
+ }[];
1255
1311
  } | {
1256
1312
  readonly _tag: "TestArtifactRecorded";
1257
1313
  readonly modulePath: string;
1258
1314
  readonly testName: string;
1259
1315
  readonly suitePath: readonly string[];
1260
1316
  readonly artifact: string;
1317
+ readonly location?: {
1318
+ readonly file: string;
1319
+ readonly line: number;
1320
+ readonly column: number;
1321
+ } | undefined;
1322
+ readonly attachments: readonly {
1323
+ readonly contentType?: string | undefined;
1324
+ readonly path?: string | undefined;
1325
+ readonly body?: string | undefined;
1326
+ readonly bodyEncoding?: "base64" | "utf-8" | undefined;
1327
+ readonly byteSize: number;
1328
+ }[];
1261
1329
  } | {
1262
1330
  readonly _tag: "WatcherReady";
1263
1331
  } | {
@@ -1336,7 +1404,7 @@ declare const RunEventChannel_base: Context.ServiceClass<RunEventChannel, "vites
1336
1404
  *
1337
1405
  * @public
1338
1406
  */
1339
- declare class RunEventChannel extends RunEventChannel_base {}
1407
+ export declare class RunEventChannel extends RunEventChannel_base {}
1340
1408
  /**
1341
1409
  * Default live layer providing an unbounded Effect `PubSub` for
1342
1410
  * the run-event channel. The PubSub is scoped — when the surrounding
@@ -1352,7 +1420,7 @@ declare class RunEventChannel extends RunEventChannel_base {}
1352
1420
  *
1353
1421
  * @public
1354
1422
  */
1355
- declare const RunEventChannelLive: Layer.Layer<RunEventChannel>;
1423
+ export declare const RunEventChannelLive: Layer.Layer<RunEventChannel>;
1356
1424
  //#endregion
1357
1425
  //#region src/pubsub/Publisher.d.ts
1358
1426
  /**
@@ -1366,7 +1434,7 @@ declare const RunEventChannelLive: Layer.Layer<RunEventChannel>;
1366
1434
  * @returns an Effect that resolves to the publish success boolean
1367
1435
  * @public
1368
1436
  */
1369
- declare const publish: (event: RunEvent) => Effect.Effect<boolean, never, RunEventChannel>;
1437
+ export declare const publish: (event: RunEvent) => Effect.Effect<boolean, never, RunEventChannel>;
1370
1438
  /**
1371
1439
  * Emit a batch of events onto the channel in order.
1372
1440
  *
@@ -1378,7 +1446,7 @@ declare const publish: (event: RunEvent) => Effect.Effect<boolean, never, RunEve
1378
1446
  * @returns an Effect that resolves when all events are enqueued
1379
1447
  * @public
1380
1448
  */
1381
- declare const publishAll: (events: Iterable<RunEvent>) => Effect.Effect<void, never, RunEventChannel>;
1449
+ export declare const publishAll: (events: Iterable<RunEvent>) => Effect.Effect<void, never, RunEventChannel>;
1382
1450
  //#endregion
1383
1451
  //#region src/pubsub/Subscriber.d.ts
1384
1452
  /**
@@ -1392,7 +1460,7 @@ declare const publishAll: (events: Iterable<RunEvent>) => Effect.Effect<void, ne
1392
1460
  * @returns an Effect that resolves to the terminal render state
1393
1461
  * @public
1394
1462
  */
1395
- declare const accumulateUntilFinished: (initial?: RenderState) => Effect.Effect<RenderState, never, RunEventChannel>;
1463
+ export declare const accumulateUntilFinished: (initial?: RenderState) => Effect.Effect<RenderState, never, RunEventChannel>;
1396
1464
  /**
1397
1465
  * Run a callback for every projected `RenderState` as events
1398
1466
  * arrive. The stream terminates when the PubSub shuts down (typically
@@ -1408,7 +1476,7 @@ declare const accumulateUntilFinished: (initial?: RenderState) => Effect.Effect<
1408
1476
  * @returns an Effect that completes when the PubSub shuts down
1409
1477
  * @public
1410
1478
  */
1411
- declare const forEachRenderState: <R, E>(onState: (state: RenderState) => Effect.Effect<void, E, R>, initial?: RenderState) => Effect.Effect<void, E, R | RunEventChannel>;
1479
+ export declare const forEachRenderState: <R, E>(onState: (state: RenderState) => Effect.Effect<void, E, R>, initial?: RenderState) => Effect.Effect<void, E, R | RunEventChannel>;
1412
1480
  /**
1413
1481
  * Build an Effect `Stream` of accumulated states over the channel.
1414
1482
  *
@@ -1420,7 +1488,7 @@ declare const forEachRenderState: <R, E>(onState: (state: RenderState) => Effect
1420
1488
  * @returns an Effect that resolves to a Stream of render states
1421
1489
  * @public
1422
1490
  */
1423
- declare const renderStateStream: (initial?: RenderState) => Effect.Effect<Stream.Stream<RenderState>, never, RunEventChannel>;
1491
+ export declare const renderStateStream: (initial?: RenderState) => Effect.Effect<Stream.Stream<RenderState>, never, RunEventChannel>;
1424
1492
  /**
1425
1493
  * Convenience: subscribe and produce a low-level dequeue of raw
1426
1494
  * `RunEvent` values. Mostly for tests and ad-hoc consumers; most
@@ -1430,7 +1498,7 @@ declare const renderStateStream: (initial?: RenderState) => Effect.Effect<Stream
1430
1498
  * @returns an Effect that resolves to a dequeue of raw run events
1431
1499
  * @public
1432
1500
  */
1433
- declare const subscribeRaw: () => Effect.Effect<PubSub.Subscription<RunEvent>, never, RunEventChannel | Scope.Scope>;
1501
+ export declare const subscribeRaw: () => Effect.Effect<PubSub.Subscription<RunEvent>, never, RunEventChannel | Scope.Scope>;
1434
1502
  //#endregion
1435
1503
  //#region src/reducer.d.ts
1436
1504
  /**
@@ -1445,7 +1513,7 @@ declare const subscribeRaw: () => Effect.Effect<PubSub.Subscription<RunEvent>, n
1445
1513
  * @returns the next render state
1446
1514
  * @public
1447
1515
  */
1448
- declare const reduceRenderState: (state: RenderState, event: RunEvent) => RenderState;
1516
+ export declare const reduceRenderState: (state: RenderState, event: RunEvent) => RenderState;
1449
1517
  /**
1450
1518
  * Fold a sequence of events into a final `RenderState`.
1451
1519
  *
@@ -1457,7 +1525,7 @@ declare const reduceRenderState: (state: RenderState, event: RunEvent) => Render
1457
1525
  * @returns the terminal render state after all events are applied
1458
1526
  * @public
1459
1527
  */
1460
- declare const reduceRenderStateAll: (events: ReadonlyArray<RunEvent>, seed?: RenderState) => RenderState;
1528
+ export declare const reduceRenderStateAll: (events: ReadonlyArray<RunEvent>, seed?: RenderState) => RenderState;
1461
1529
  //#endregion
1462
1530
  //#region src/render-agent.d.ts
1463
1531
  /**
@@ -1504,7 +1572,7 @@ interface RenderAgentOptions {
1504
1572
  * @returns the agent-format string
1505
1573
  * @public
1506
1574
  */
1507
- declare const renderAgent: (state: RenderState, options?: RenderAgentOptions) => string;
1575
+ export declare const renderAgent: (state: RenderState, options?: RenderAgentOptions) => string;
1508
1576
  //#endregion
1509
1577
  //#region src/render-ink/CountColumns.d.ts
1510
1578
  /**
@@ -1529,7 +1597,7 @@ interface CountColumnsProps {
1529
1597
  *
1530
1598
  * @public
1531
1599
  */
1532
- declare const DURATION_CELL_WIDTH = 7;
1600
+ export declare const DURATION_CELL_WIDTH = 7;
1533
1601
  /**
1534
1602
  * Renders four colored count columns (pass ✓, fail ✗, skip ↷, timeout ⧖)
1535
1603
  * for an aggregate row. Counts render right-aligned in fixed 4-digit cells so
@@ -1538,7 +1606,7 @@ declare const DURATION_CELL_WIDTH = 7;
1538
1606
  *
1539
1607
  * @public
1540
1608
  */
1541
- declare const CountColumns: FC<CountColumnsProps>;
1609
+ export declare const CountColumns: FC<CountColumnsProps>;
1542
1610
  //#endregion
1543
1611
  //#region src/render-ink/CoverageBlock.d.ts
1544
1612
  /**
@@ -1558,7 +1626,7 @@ interface CoverageBlockProps {
1558
1626
  *
1559
1627
  * @public
1560
1628
  */
1561
- declare const CoverageBlock: FC<CoverageBlockProps>;
1629
+ export declare const CoverageBlock: FC<CoverageBlockProps>;
1562
1630
  //#endregion
1563
1631
  //#region src/render-ink/FailureSection.d.ts
1564
1632
  /**
@@ -1578,7 +1646,7 @@ interface FailureSectionProps {
1578
1646
  *
1579
1647
  * @public
1580
1648
  */
1581
- declare const FailureSection: FC<FailureSectionProps>;
1649
+ export declare const FailureSection: FC<FailureSectionProps>;
1582
1650
  //#endregion
1583
1651
  //#region src/render-ink/FailuresSection.d.ts
1584
1652
  /**
@@ -1598,7 +1666,7 @@ interface FailuresSectionProps {
1598
1666
  *
1599
1667
  * @public
1600
1668
  */
1601
- declare const FailuresSection: FC<FailuresSectionProps>;
1669
+ export declare const FailuresSection: FC<FailuresSectionProps>;
1602
1670
  //#endregion
1603
1671
  //#region src/render-ink/ModuleHeader.d.ts
1604
1672
  /**
@@ -1616,7 +1684,7 @@ interface ModuleHeaderProps {
1616
1684
  *
1617
1685
  * @public
1618
1686
  */
1619
- declare const ModuleHeader: FC<ModuleHeaderProps>;
1687
+ export declare const ModuleHeader: FC<ModuleHeaderProps>;
1620
1688
  //#endregion
1621
1689
  //#region src/render-ink/ProjectRow.d.ts
1622
1690
  /**
@@ -1662,7 +1730,7 @@ interface ProjectRowProps {
1662
1730
  *
1663
1731
  * @public
1664
1732
  */
1665
- declare const ProjectRow: FC<ProjectRowProps>;
1733
+ export declare const ProjectRow: FC<ProjectRowProps>;
1666
1734
  //#endregion
1667
1735
  //#region src/render-ink/StatusIcon.d.ts
1668
1736
  /**
@@ -1685,7 +1753,7 @@ interface StatusIconProps {
1685
1753
  *
1686
1754
  * @public
1687
1755
  */
1688
- declare const StatusIcon: FC<StatusIconProps>;
1756
+ export declare const StatusIcon: FC<StatusIconProps>;
1689
1757
  //#endregion
1690
1758
  //#region src/render-ink/StreamApp.d.ts
1691
1759
  /**
@@ -1707,7 +1775,7 @@ interface StreamAppProps {
1707
1775
  *
1708
1776
  * @public
1709
1777
  */
1710
- declare const StreamApp: FC<StreamAppProps>;
1778
+ export declare const StreamApp: FC<StreamAppProps>;
1711
1779
  //#endregion
1712
1780
  //#region src/render-ink/SuggestedActions.d.ts
1713
1781
  /**
@@ -1725,7 +1793,7 @@ interface SuggestedActionsProps {
1725
1793
  *
1726
1794
  * @public
1727
1795
  */
1728
- declare const SuggestedActions: FC<SuggestedActionsProps>;
1796
+ export declare const SuggestedActions: FC<SuggestedActionsProps>;
1729
1797
  //#endregion
1730
1798
  //#region src/render-ink/spinner.d.ts
1731
1799
  /**
@@ -1745,13 +1813,13 @@ declare const SuggestedActions: FC<SuggestedActionsProps>;
1745
1813
  *
1746
1814
  * @public
1747
1815
  */
1748
- declare const SPINNER_FRAMES: readonly ["⠋", "⠙", "⠹", "⠸", "⠼", "⠴", "⠦", "⠧", "⠇", "⠏"];
1816
+ export declare const SPINNER_FRAMES: readonly ["⠋", "⠙", "⠹", "⠸", "⠼", "⠴", "⠦", "⠧", "⠇", "⠏"];
1749
1817
  /**
1750
1818
  * How long each spinner frame is held, in milliseconds.
1751
1819
  *
1752
1820
  * @public
1753
1821
  */
1754
- declare const SPINNER_FRAME_MS = 80;
1822
+ export declare const SPINNER_FRAME_MS = 80;
1755
1823
  /**
1756
1824
  * Resolve the spinner glyph for a frame index. The index wraps modulo
1757
1825
  * the frame count and tolerates negative values, so a wall-clock-derived
@@ -1761,7 +1829,7 @@ declare const SPINNER_FRAME_MS = 80;
1761
1829
  * @returns the Braille glyph for the given frame
1762
1830
  * @public
1763
1831
  */
1764
- declare const spinnerFrame: (index: number) => string;
1832
+ export declare const spinnerFrame: (index: number) => string;
1765
1833
  /**
1766
1834
  * Derive the spinner frame index from a wall-clock timestamp. Using the
1767
1835
  * clock — rather than a monotonic counter — keeps the animation correct
@@ -1771,7 +1839,7 @@ declare const spinnerFrame: (index: number) => string;
1771
1839
  * @returns the frame index for the given timestamp
1772
1840
  * @public
1773
1841
  */
1774
- declare const spinnerFrameForTime: (nowMs: number) => number;
1842
+ export declare const spinnerFrameForTime: (nowMs: number) => number;
1775
1843
  //#endregion
1776
1844
  //#region src/render-ink/TagColumns.d.ts
1777
1845
  /**
@@ -1782,7 +1850,7 @@ declare const spinnerFrameForTime: (nowMs: number) => number;
1782
1850
  *
1783
1851
  * @public
1784
1852
  */
1785
- declare const tagUnion: (rows: ReadonlyArray<Record<string, number> | undefined>) => ReadonlyArray<string>;
1853
+ export declare const tagUnion: (rows: ReadonlyArray<Record<string, number> | undefined>) => ReadonlyArray<string>;
1786
1854
  /**
1787
1855
  * Props for the `TagColumns` component.
1788
1856
  *
@@ -1800,7 +1868,7 @@ interface TagColumnsProps {
1800
1868
  *
1801
1869
  * @public
1802
1870
  */
1803
- declare const TagColumns: FC<TagColumnsProps>;
1871
+ export declare const TagColumns: FC<TagColumnsProps>;
1804
1872
  //#endregion
1805
1873
  //#region src/render-ink/TestRow.d.ts
1806
1874
  /**
@@ -1819,7 +1887,7 @@ interface TestRowProps {
1819
1887
  *
1820
1888
  * @public
1821
1889
  */
1822
- declare const TestRow: FC<TestRowProps>;
1890
+ export declare const TestRow: FC<TestRowProps>;
1823
1891
  //#endregion
1824
1892
  //#region src/render-ink/TrendLine.d.ts
1825
1893
  /**
@@ -1839,7 +1907,7 @@ interface TrendLineProps {
1839
1907
  *
1840
1908
  * @public
1841
1909
  */
1842
- declare const TrendLine: FC<TrendLineProps>;
1910
+ export declare const TrendLine: FC<TrendLineProps>;
1843
1911
  //#endregion
1844
1912
  //#region src/synthesize.d.ts
1845
1913
  /**
@@ -1850,7 +1918,7 @@ declare const TrendLine: FC<TrendLineProps>;
1850
1918
  *
1851
1919
  * @public
1852
1920
  */
1853
- declare const SUITE_LOAD_FAILURE_LABEL = "test suite failed to load";
1921
+ export declare const SUITE_LOAD_FAILURE_LABEL = "test suite failed to load";
1854
1922
  /**
1855
1923
  * Optional metadata threaded through the synthesized event stream.
1856
1924
  *
@@ -1905,7 +1973,7 @@ interface SynthesizedCoverage {
1905
1973
  * @returns an ordered array of run events
1906
1974
  * @public
1907
1975
  */
1908
- declare const synthesizeRunEvents: (modules: ReadonlyArray<VitestTestModule>, options?: SynthesizeOptions) => RunEvent[];
1976
+ export declare const synthesizeRunEvents: (modules: ReadonlyArray<VitestTestModule>, options?: SynthesizeOptions) => RunEvent[];
1909
1977
  /**
1910
1978
  * Options for {@link synthesizeFromAgentReport}.
1911
1979
  *
@@ -1938,7 +2006,7 @@ interface SynthesizeFromAgentReportOptions {
1938
2006
  * @returns an ordered array of run events
1939
2007
  * @public
1940
2008
  */
1941
- declare const synthesizeFromAgentReport: (report: AgentReport, options?: SynthesizeFromAgentReportOptions) => RunEvent[];
2009
+ export declare const synthesizeFromAgentReport: (report: AgentReport, options?: SynthesizeFromAgentReportOptions) => RunEvent[];
1942
2010
  //#endregion
1943
2011
  //#region src/index.d.ts
1944
2012
  /**
@@ -1948,7 +2016,7 @@ declare const synthesizeFromAgentReport: (report: AgentReport, options?: Synthes
1948
2016
  *
1949
2017
  * @public
1950
2018
  */
1951
- declare const CURRENT_UI_VERSION: string;
2019
+ export declare const CURRENT_UI_VERSION: string;
1952
2020
  //#endregion
1953
- export { ActionSeverity, type AgentCellFn, type AgentReport, CURRENT_UI_VERSION, type Cell, type CellOptions, CountColumns, type CountColumnsProps, CoverageBlock, type CoverageBlockProps, FileCoverageReport as CoverageFile, CoverageGap, CoverageMetric, CoverageRenderState, type CoverageTotals, DURATION_CELL_WIDTH, type DispatchInputs, FailureRecord, FailureSection, type FailureSectionProps, FailuresSection, type FailuresSectionProps, type InkCellFn, type MetricThresholds, ModuleHeader, type ModuleHeaderProps, ModuleRecord, ProjectRow, type ProjectRowProps, type ProjectSummary, type RenderAgentOptions, RenderState, RenderTotals, RunEvent, type RunEventByTag, RunEventChannel, RunEventChannelLive, type RunOutcome, type RunShape, SPINNER_FRAMES, SPINNER_FRAME_MS, SUITE_LOAD_FAILURE_LABEL, StatusIcon, type StatusIconKind, type StatusIconProps, StreamApp, type StreamAppProps, SuggestedActionRecord, SuggestedActions, type SuggestedActionsProps, type SynthesizeFromAgentReportOptions, type SynthesizeOptions, type SynthesizedCoverage, TagColumns, type TagColumnsProps, type TestClassification, TestRecord, TestRow, type TestRowProps, TrendLine, type TrendLineProps, type TrendSummary, type VitestModuleDiagnostic, type VitestModuleError, type VitestParsedStack, type VitestTestCase, type VitestTestDiagnostic, type VitestTestError, type VitestTestModule, type VitestTestResult, type VitestTestSuite, accumulateUntilFinished, buildFooter, classifyOutcome, classifyRunShape, dispatch, dispatchInk, dispatcherTable, dominantClassification, forEachRenderState, formatDisplayDuration, initialRenderState, publish, publishAll, reduceRenderState, reduceRenderStateAll, renderAgent, renderStateStream, spinnerFrame, spinnerFrameForTime, subscribeRaw, synthesizeFromAgentReport, synthesizeRunEvents, tagUnion };
2021
+ export { type AgentCellFn, type AgentReport, type Cell, type CellOptions, type CountColumnsProps, type CoverageBlockProps, FileCoverageReport as CoverageFile, type CoverageTotals, type DispatchInputs, type FailureSectionProps, type FailuresSectionProps, type InkCellFn, type MetricThresholds, type ModuleHeaderProps, type ProjectRowProps, type ProjectSummary, type RenderAgentOptions, type RunEventByTag, type RunOutcome, type RunShape, type StatusIconKind, type StatusIconProps, type StreamAppProps, type SuggestedActionsProps, type SynthesizeFromAgentReportOptions, type SynthesizeOptions, type SynthesizedCoverage, type TagColumnsProps, type TestClassification, type TestRowProps, type TrendLineProps, type TrendSummary, type VitestModuleDiagnostic, type VitestModuleError, type VitestParsedStack, type VitestTestCase, type VitestTestDiagnostic, type VitestTestError, type VitestTestModule, type VitestTestResult, type VitestTestSuite };
1954
2022
  //# sourceMappingURL=index.d.ts.map
package/index.js CHANGED
@@ -33,7 +33,7 @@ import { ActionSeverity, CoverageFile, CoverageGap, CoverageMetric, CoverageRend
33
33
  *
34
34
  * @public
35
35
  */
36
- const CURRENT_UI_VERSION = "2.3.0";
36
+ const CURRENT_UI_VERSION = "2.4.0";
37
37
 
38
38
  //#endregion
39
39
  export { ActionSeverity, CURRENT_UI_VERSION, CountColumns, CoverageBlock, CoverageFile, CoverageGap, CoverageMetric, CoverageRenderState, DURATION_CELL_WIDTH, FailureRecord, FailureSection, FailuresSection, ModuleHeader, ModuleRecord, ProjectRow, RenderState, RenderTotals, RunEvent, RunEventChannel, RunEventChannelLive, SPINNER_FRAMES, SPINNER_FRAME_MS, SUITE_LOAD_FAILURE_LABEL, StatusIcon, StreamApp, SuggestedActionRecord, SuggestedActions, TagColumns, TestRecord, TestRow, TrendLine, accumulateUntilFinished, buildFooter, classifyOutcome, classifyRunShape, dispatch, dispatchInk, dispatcherTable, dominantClassification, forEachRenderState, formatDisplayDuration, initialRenderState, publish, publishAll, reduceRenderState, reduceRenderStateAll, renderAgent, renderStateStream, spinnerFrame, spinnerFrameForTime, subscribeRaw, synthesizeFromAgentReport, synthesizeRunEvents, tagUnion };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vitest-agent/ui",
3
- "version": "2.3.0",
3
+ "version": "2.4.0",
4
4
  "private": false,
5
5
  "description": "Shared event-sourced renderer for vitest-agent. React Ink view for humans, plain-string view for agents, both fed by the same reducer over a RunEvent stream.",
6
6
  "keywords": [
@@ -39,8 +39,8 @@
39
39
  "./package.json": "./package.json"
40
40
  },
41
41
  "dependencies": {
42
- "@vitest-agent/sdk": "2.5.0",
43
- "effect": "4.0.0-rc.109"
42
+ "@vitest-agent/sdk": "3.0.0",
43
+ "effect": "4.0.0-rc.112"
44
44
  },
45
45
  "peerDependencies": {
46
46
  "ink": "^7.1.0",