@vitest-agent/ui 1.0.0 → 1.0.2

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.
@@ -183,4 +183,4 @@ const pctCell = (n) => {
183
183
  };
184
184
 
185
185
  //#endregion
186
- export { formatBelowTargetTable, formatCoverageJudgmentLine, formatFailure, formatProjectsTable, formatTestName, formatTotals, formatTrendLine, formatWorkspaceTotal, soleModulePath, soleTest };
186
+ export { formatBelowTargetTable, formatCoverageJudgmentLine, formatDisplayDuration, formatFailure, formatProjectRow, formatProjectsTable, formatTestName, formatTotals, formatTrendLine, formatWorkspaceTotal, soleModulePath, soleTest, truncate };
package/index.d.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  import { Context, Effect, Layer, PubSub, Queue, Schema, Scope, Stream } from "effect";
2
2
  import { FC, ReactElement } from "react";
3
3
 
4
- //#region ../sdk/dist/dev/pkg/DataReader-2kJ9I9Hh.d.ts
4
+ //#region ../sdk/dist/dev/pkg/index.d.ts
5
5
  //#region src/schemas/Coverage.d.ts
6
6
  /**
7
7
  * Aggregate coverage percentages across four istanbul metrics.
@@ -35,156 +35,7 @@ type FileCoverageReport = typeof FileCoverageReport.Type;
35
35
  * Complete coverage report attached to an AgentReport.
36
36
  * @public
37
37
  */
38
- /**
39
- * Complete per-project test report written to disk as JSON.
40
- * @public
41
- */
42
- declare const AgentReport: Schema.Struct<{
43
- timestamp: typeof Schema.String;
44
- project: Schema.optional<typeof Schema.String>;
45
- reason: Schema.Literal<["passed", "failed", "interrupted"]>;
46
- summary: Schema.Struct<{
47
- total: typeof Schema.Number;
48
- passed: typeof Schema.Number;
49
- failed: typeof Schema.Number;
50
- skipped: typeof Schema.Number;
51
- duration: typeof Schema.Number;
52
- }>;
53
- failed: Schema.Array$<Schema.Struct<{
54
- file: typeof Schema.String;
55
- state: Schema.Literal<["passed", "failed", "skipped", "pending"]>;
56
- duration: Schema.optional<typeof Schema.Number>;
57
- errors: Schema.optional<Schema.Array$<Schema.Struct<{
58
- message: typeof Schema.String;
59
- stack: Schema.optional<typeof Schema.String>;
60
- diff: Schema.optional<typeof Schema.String>;
61
- expected: Schema.optional<typeof Schema.String>;
62
- received: Schema.optional<typeof Schema.String>;
63
- }>>>;
64
- tests: Schema.Array$<Schema.Struct<{
65
- name: typeof Schema.String;
66
- fullName: typeof Schema.String;
67
- state: Schema.Literal<["passed", "failed", "skipped", "pending"]>;
68
- duration: Schema.optional<typeof Schema.Number>;
69
- flaky: Schema.optional<typeof Schema.Boolean>;
70
- slow: Schema.optional<typeof Schema.Boolean>;
71
- errors: Schema.optional<Schema.Array$<Schema.Struct<{
72
- message: typeof Schema.String;
73
- stack: Schema.optional<typeof Schema.String>;
74
- diff: Schema.optional<typeof Schema.String>;
75
- expected: Schema.optional<typeof Schema.String>;
76
- received: Schema.optional<typeof Schema.String>;
77
- }>>>;
78
- classification: Schema.optional<Schema.Literal<["stable", "new-failure", "persistent", "flaky", "recovered"]>>;
79
- }>>;
80
- }>>;
81
- unhandledErrors: Schema.Array$<Schema.Struct<{
82
- message: typeof Schema.String;
83
- stack: Schema.optional<typeof Schema.String>;
84
- diff: Schema.optional<typeof Schema.String>;
85
- expected: Schema.optional<typeof Schema.String>;
86
- received: Schema.optional<typeof Schema.String>;
87
- }>>;
88
- failedFiles: Schema.Array$<typeof Schema.String>;
89
- coverage: Schema.optional<Schema.Struct<{
90
- totals: Schema.Struct<{
91
- statements: typeof Schema.Number;
92
- branches: typeof Schema.Number;
93
- functions: typeof Schema.Number;
94
- lines: typeof Schema.Number;
95
- }>;
96
- thresholds: Schema.Struct<{
97
- global: Schema.Struct<{
98
- lines: Schema.optional<typeof Schema.Number>;
99
- functions: Schema.optional<typeof Schema.Number>;
100
- branches: Schema.optional<typeof Schema.Number>;
101
- statements: Schema.optional<typeof Schema.Number>;
102
- }>;
103
- patterns: Schema.optionalWith<Schema.Array$<Schema.Tuple2<typeof Schema.String, Schema.Struct<{
104
- lines: Schema.optional<typeof Schema.Number>;
105
- functions: Schema.optional<typeof Schema.Number>;
106
- branches: Schema.optional<typeof Schema.Number>;
107
- statements: Schema.optional<typeof Schema.Number>;
108
- }>>>, {
109
- default: () => never[];
110
- }>;
111
- }>;
112
- targets: Schema.optional<Schema.Struct<{
113
- global: Schema.Struct<{
114
- lines: Schema.optional<typeof Schema.Number>;
115
- functions: Schema.optional<typeof Schema.Number>;
116
- branches: Schema.optional<typeof Schema.Number>;
117
- statements: Schema.optional<typeof Schema.Number>;
118
- }>;
119
- patterns: Schema.optionalWith<Schema.Array$<Schema.Tuple2<typeof Schema.String, Schema.Struct<{
120
- lines: Schema.optional<typeof Schema.Number>;
121
- functions: Schema.optional<typeof Schema.Number>;
122
- branches: Schema.optional<typeof Schema.Number>;
123
- statements: Schema.optional<typeof Schema.Number>;
124
- }>>>, {
125
- default: () => never[];
126
- }>;
127
- }>>;
128
- baselines: Schema.optional<Schema.Struct<{
129
- global: Schema.Struct<{
130
- lines: Schema.optional<typeof Schema.Number>;
131
- functions: Schema.optional<typeof Schema.Number>;
132
- branches: Schema.optional<typeof Schema.Number>;
133
- statements: Schema.optional<typeof Schema.Number>;
134
- }>;
135
- patterns: Schema.optionalWith<Schema.Array$<Schema.Tuple2<typeof Schema.String, Schema.Struct<{
136
- lines: Schema.optional<typeof Schema.Number>;
137
- functions: Schema.optional<typeof Schema.Number>;
138
- branches: Schema.optional<typeof Schema.Number>;
139
- statements: Schema.optional<typeof Schema.Number>;
140
- }>>>, {
141
- default: () => never[];
142
- }>;
143
- }>>;
144
- scoped: Schema.optionalWith<typeof Schema.Boolean, {
145
- default: () => false;
146
- }>;
147
- scopedFiles: Schema.optional<Schema.Array$<typeof Schema.String>>;
148
- lowCoverage: Schema.Array$<Schema.Struct<{
149
- file: typeof Schema.String;
150
- summary: Schema.Struct<{
151
- statements: typeof Schema.Number;
152
- branches: typeof Schema.Number;
153
- functions: typeof Schema.Number;
154
- lines: typeof Schema.Number;
155
- }>;
156
- uncoveredLines: typeof Schema.String;
157
- }>>;
158
- lowCoverageFiles: Schema.Array$<typeof Schema.String>;
159
- belowTarget: Schema.optional<Schema.Array$<Schema.Struct<{
160
- file: typeof Schema.String;
161
- summary: Schema.Struct<{
162
- statements: typeof Schema.Number;
163
- branches: typeof Schema.Number;
164
- functions: typeof Schema.Number;
165
- lines: typeof Schema.Number;
166
- }>;
167
- uncoveredLines: typeof Schema.String;
168
- }>>>;
169
- belowTargetFiles: Schema.optional<Schema.Array$<typeof Schema.String>>;
170
- }>>;
171
- tagCounts: Schema.optional<Schema.Record$<typeof Schema.String, Schema.Struct<{
172
- passed: Schema.optional<typeof Schema.Number>;
173
- failed: Schema.optional<typeof Schema.Number>;
174
- skipped: Schema.optional<typeof Schema.Number>;
175
- }>>>;
176
- }>;
177
- /** @public */
178
- type AgentReport = typeof AgentReport.Type; //#endregion
179
- //#region src/schemas/Identity.d.ts
180
- /**
181
- * Canonical UUID for an LLM agent invocation. Generated server-side at
182
- * `register_agent` time. Stable across transport reconnects within an
183
- * agent's lifetime.
184
- * @public
185
- */
186
38
  //#endregion
187
- //#region ../sdk/dist/dev/pkg/index.d.ts
188
39
  //#region src/schemas/RenderState.d.ts
189
40
  /**
190
41
  * Per-test record accumulated as `TestStarted` / `TestFinished` events arrive.
@@ -577,6 +428,163 @@ interface CellOptions {
577
428
  */
578
429
  readonly osc8: (url: string, label: string) => string;
579
430
  } //#endregion
431
+ //#region src/schemas/AgentReport.d.ts
432
+ /**
433
+ * Aggregate test run statistics.
434
+ * @public
435
+ */
436
+ /**
437
+ * Complete per-project test report written to disk as JSON.
438
+ * @public
439
+ */
440
+ declare const AgentReport: Schema.Struct<{
441
+ timestamp: typeof Schema.String;
442
+ project: Schema.optional<typeof Schema.String>;
443
+ reason: Schema.Literal<["passed", "failed", "interrupted"]>;
444
+ summary: Schema.Struct<{
445
+ total: typeof Schema.Number;
446
+ passed: typeof Schema.Number;
447
+ failed: typeof Schema.Number;
448
+ skipped: typeof Schema.Number;
449
+ duration: typeof Schema.Number;
450
+ }>;
451
+ failed: Schema.Array$<Schema.Struct<{
452
+ file: typeof Schema.String;
453
+ state: Schema.Literal<["passed", "failed", "skipped", "pending"]>;
454
+ duration: Schema.optional<typeof Schema.Number>;
455
+ errors: Schema.optional<Schema.Array$<Schema.Struct<{
456
+ message: typeof Schema.String;
457
+ stack: Schema.optional<typeof Schema.String>;
458
+ diff: Schema.optional<typeof Schema.String>;
459
+ expected: Schema.optional<typeof Schema.String>;
460
+ received: Schema.optional<typeof Schema.String>;
461
+ }>>>;
462
+ tests: Schema.Array$<Schema.Struct<{
463
+ name: typeof Schema.String;
464
+ fullName: typeof Schema.String;
465
+ state: Schema.Literal<["passed", "failed", "skipped", "pending"]>;
466
+ duration: Schema.optional<typeof Schema.Number>;
467
+ flaky: Schema.optional<typeof Schema.Boolean>;
468
+ slow: Schema.optional<typeof Schema.Boolean>;
469
+ errors: Schema.optional<Schema.Array$<Schema.Struct<{
470
+ message: typeof Schema.String;
471
+ stack: Schema.optional<typeof Schema.String>;
472
+ diff: Schema.optional<typeof Schema.String>;
473
+ expected: Schema.optional<typeof Schema.String>;
474
+ received: Schema.optional<typeof Schema.String>;
475
+ }>>>;
476
+ classification: Schema.optional<Schema.Literal<["stable", "new-failure", "persistent", "flaky", "recovered"]>>;
477
+ }>>;
478
+ }>>;
479
+ unhandledErrors: Schema.Array$<Schema.Struct<{
480
+ message: typeof Schema.String;
481
+ stack: Schema.optional<typeof Schema.String>;
482
+ diff: Schema.optional<typeof Schema.String>;
483
+ expected: Schema.optional<typeof Schema.String>;
484
+ received: Schema.optional<typeof Schema.String>;
485
+ }>>;
486
+ failedFiles: Schema.Array$<typeof Schema.String>;
487
+ coverage: Schema.optional<Schema.Struct<{
488
+ totals: Schema.Struct<{
489
+ statements: typeof Schema.Number;
490
+ branches: typeof Schema.Number;
491
+ functions: typeof Schema.Number;
492
+ lines: typeof Schema.Number;
493
+ }>;
494
+ thresholds: Schema.Struct<{
495
+ global: Schema.Struct<{
496
+ lines: Schema.optional<typeof Schema.Number>;
497
+ functions: Schema.optional<typeof Schema.Number>;
498
+ branches: Schema.optional<typeof Schema.Number>;
499
+ statements: Schema.optional<typeof Schema.Number>;
500
+ }>;
501
+ patterns: Schema.optionalWith<Schema.Array$<Schema.Tuple2<typeof Schema.String, Schema.Struct<{
502
+ lines: Schema.optional<typeof Schema.Number>;
503
+ functions: Schema.optional<typeof Schema.Number>;
504
+ branches: Schema.optional<typeof Schema.Number>;
505
+ statements: Schema.optional<typeof Schema.Number>;
506
+ }>>>, {
507
+ default: () => never[];
508
+ }>;
509
+ }>;
510
+ targets: Schema.optional<Schema.Struct<{
511
+ global: Schema.Struct<{
512
+ lines: Schema.optional<typeof Schema.Number>;
513
+ functions: Schema.optional<typeof Schema.Number>;
514
+ branches: Schema.optional<typeof Schema.Number>;
515
+ statements: Schema.optional<typeof Schema.Number>;
516
+ }>;
517
+ patterns: Schema.optionalWith<Schema.Array$<Schema.Tuple2<typeof Schema.String, Schema.Struct<{
518
+ lines: Schema.optional<typeof Schema.Number>;
519
+ functions: Schema.optional<typeof Schema.Number>;
520
+ branches: Schema.optional<typeof Schema.Number>;
521
+ statements: Schema.optional<typeof Schema.Number>;
522
+ }>>>, {
523
+ default: () => never[];
524
+ }>;
525
+ }>>;
526
+ baselines: Schema.optional<Schema.Struct<{
527
+ global: Schema.Struct<{
528
+ lines: Schema.optional<typeof Schema.Number>;
529
+ functions: Schema.optional<typeof Schema.Number>;
530
+ branches: Schema.optional<typeof Schema.Number>;
531
+ statements: Schema.optional<typeof Schema.Number>;
532
+ }>;
533
+ patterns: Schema.optionalWith<Schema.Array$<Schema.Tuple2<typeof Schema.String, Schema.Struct<{
534
+ lines: Schema.optional<typeof Schema.Number>;
535
+ functions: Schema.optional<typeof Schema.Number>;
536
+ branches: Schema.optional<typeof Schema.Number>;
537
+ statements: Schema.optional<typeof Schema.Number>;
538
+ }>>>, {
539
+ default: () => never[];
540
+ }>;
541
+ }>>;
542
+ scoped: Schema.optionalWith<typeof Schema.Boolean, {
543
+ default: () => false;
544
+ }>;
545
+ scopedFiles: Schema.optional<Schema.Array$<typeof Schema.String>>;
546
+ lowCoverage: Schema.Array$<Schema.Struct<{
547
+ file: typeof Schema.String;
548
+ summary: Schema.Struct<{
549
+ statements: typeof Schema.Number;
550
+ branches: typeof Schema.Number;
551
+ functions: typeof Schema.Number;
552
+ lines: typeof Schema.Number;
553
+ }>;
554
+ uncoveredLines: typeof Schema.String;
555
+ }>>;
556
+ lowCoverageFiles: Schema.Array$<typeof Schema.String>;
557
+ belowTarget: Schema.optional<Schema.Array$<Schema.Struct<{
558
+ file: typeof Schema.String;
559
+ summary: Schema.Struct<{
560
+ statements: typeof Schema.Number;
561
+ branches: typeof Schema.Number;
562
+ functions: typeof Schema.Number;
563
+ lines: typeof Schema.Number;
564
+ }>;
565
+ uncoveredLines: typeof Schema.String;
566
+ }>>>;
567
+ belowTargetFiles: Schema.optional<Schema.Array$<typeof Schema.String>>;
568
+ }>>;
569
+ tagCounts: Schema.optional<Schema.Record$<typeof Schema.String, Schema.Struct<{
570
+ passed: Schema.optional<typeof Schema.Number>;
571
+ failed: Schema.optional<typeof Schema.Number>;
572
+ skipped: Schema.optional<typeof Schema.Number>;
573
+ }>>>;
574
+ consoleLeaks: Schema.optional<Schema.Struct<{
575
+ total: typeof Schema.Number;
576
+ byFile: Schema.Array$<Schema.Struct<{
577
+ file: typeof Schema.String;
578
+ stdout: typeof Schema.Number;
579
+ stderr: typeof Schema.Number;
580
+ tests: Schema.optional<Schema.Array$<typeof Schema.String>>;
581
+ sample: Schema.optional<typeof Schema.String>;
582
+ }>>;
583
+ truncated: Schema.optional<typeof Schema.Boolean>;
584
+ }>>;
585
+ }>;
586
+ /** @public */
587
+ type AgentReport = typeof AgentReport.Type; //#endregion
580
588
  //#region src/schemas/Common.d.ts
581
589
  /**
582
590
  * Possible states for an individual test case.
@@ -1111,31 +1119,48 @@ declare const formatDisplayDuration: (ms: number) => string;
1111
1119
  //#endregion
1112
1120
  //#region src/pubsub/Channel.d.ts
1113
1121
  declare const RunEventChannel_base: Context.TagClass<RunEventChannel, "vitest-agent-ui/RunEventChannel", PubSub.PubSub<{
1114
- readonly _tag: "RunStarted";
1115
- readonly runId: string;
1116
- readonly startedAt: string;
1117
- readonly configHash: string;
1118
- } | {
1119
- readonly _tag: "ModuleQueued";
1120
- readonly modulePath: string;
1121
- readonly projectName?: string | undefined;
1122
+ readonly _tag: "ConsoleLog";
1123
+ readonly modulePath?: string | undefined;
1124
+ readonly testName?: string | undefined;
1125
+ readonly level: "stderr" | "stdout";
1126
+ readonly content: string;
1127
+ readonly time: number;
1122
1128
  } | {
1123
- readonly _tag: "ModuleStarted";
1124
- readonly startedAt: string;
1125
- readonly modulePath: string;
1126
- readonly projectName?: string | undefined;
1129
+ readonly _tag: "CoverageReady";
1130
+ readonly metrics: {
1131
+ readonly statements: number;
1132
+ readonly branches: number;
1133
+ readonly functions: number;
1134
+ readonly lines: number;
1135
+ };
1136
+ readonly thresholds: {
1137
+ readonly lines?: number | undefined;
1138
+ readonly functions?: number | undefined;
1139
+ readonly branches?: number | undefined;
1140
+ readonly statements?: number | undefined;
1141
+ };
1142
+ readonly gaps: readonly {
1143
+ readonly file: string;
1144
+ readonly missing: {
1145
+ readonly statements: number;
1146
+ readonly branches: number;
1147
+ readonly functions: number;
1148
+ readonly lines: number;
1149
+ };
1150
+ readonly uncoveredLines?: string | undefined;
1151
+ }[];
1127
1152
  } | {
1128
- readonly _tag: "TestStarted";
1153
+ readonly _tag: "FailureClassified";
1129
1154
  readonly modulePath: string;
1130
1155
  readonly testName: string;
1131
- readonly suitePath: readonly string[];
1156
+ readonly classification: "flaky" | "new-failure" | "persistent" | "recovered" | "stable";
1132
1157
  } | {
1133
- readonly _tag: "TestFinished";
1158
+ readonly _tag: "HookFinished";
1134
1159
  readonly modulePath: string;
1135
- readonly testName: string;
1136
- readonly suitePath: readonly string[];
1137
- readonly status: "passed" | "failed" | "skipped" | "pending";
1160
+ readonly hookType: "afterAll" | "afterEach" | "beforeAll" | "beforeEach";
1161
+ readonly scopeName: string;
1138
1162
  readonly durationMs: number;
1163
+ readonly status: "failed" | "passed";
1139
1164
  readonly error?: {
1140
1165
  readonly message: string;
1141
1166
  readonly stack?: string | undefined;
@@ -1143,46 +1168,91 @@ declare const RunEventChannel_base: Context.TagClass<RunEventChannel, "vitest-ag
1143
1168
  readonly expected?: string | undefined;
1144
1169
  readonly received?: string | undefined;
1145
1170
  } | undefined;
1146
- readonly timedOut?: boolean | undefined;
1171
+ } | {
1172
+ readonly _tag: "HookStarted";
1173
+ readonly modulePath: string;
1174
+ readonly hookType: "afterAll" | "afterEach" | "beforeAll" | "beforeEach";
1175
+ readonly scopeName: string;
1176
+ } | {
1177
+ readonly _tag: "ModuleCollected";
1178
+ readonly modulePath: string;
1179
+ readonly testCount: number;
1180
+ readonly suiteCount: number;
1147
1181
  } | {
1148
1182
  readonly _tag: "ModuleFinished";
1149
1183
  readonly modulePath: string;
1150
- readonly projectName?: string | undefined;
1151
- readonly durationMs: number;
1152
1184
  readonly passCount: number;
1153
1185
  readonly failCount: number;
1154
1186
  readonly skipCount: number;
1187
+ readonly durationMs: number;
1188
+ readonly projectName?: string | undefined;
1155
1189
  readonly timeoutCount?: number | undefined;
1156
1190
  readonly tagCounts?: {
1157
1191
  readonly [x: string]: number;
1158
1192
  } | undefined;
1159
1193
  } | {
1160
- readonly _tag: "ModuleCollected";
1194
+ readonly _tag: "ModuleQueued";
1161
1195
  readonly modulePath: string;
1162
- readonly testCount: number;
1163
- readonly suiteCount: number;
1196
+ readonly projectName?: string | undefined;
1164
1197
  } | {
1165
- readonly _tag: "SuiteStarted";
1198
+ readonly _tag: "ModuleStarted";
1166
1199
  readonly modulePath: string;
1167
- readonly suitePath: readonly string[];
1168
- readonly suiteName: string;
1200
+ readonly startedAt: string;
1201
+ readonly projectName?: string | undefined;
1202
+ } | {
1203
+ readonly _tag: "RunFinished";
1204
+ readonly runId: string;
1205
+ readonly finishedAt: string;
1206
+ readonly passCount: number;
1207
+ readonly failCount: number;
1208
+ readonly skipCount: number;
1209
+ readonly durationMs: number;
1210
+ readonly timeoutCount?: number | undefined;
1211
+ } | {
1212
+ readonly _tag: "RunStarted";
1213
+ readonly runId: string;
1214
+ readonly startedAt: string;
1215
+ readonly configHash: string;
1216
+ } | {
1217
+ readonly _tag: "RunTimedOut";
1218
+ readonly message: string;
1219
+ } | {
1220
+ readonly _tag: "SuggestedAction";
1221
+ readonly severity: "blocker" | "info" | "warn";
1222
+ readonly title: string;
1223
+ readonly detail: string;
1224
+ readonly targetTool?: string | undefined;
1169
1225
  } | {
1170
1226
  readonly _tag: "SuiteFinished";
1171
1227
  readonly modulePath: string;
1172
1228
  readonly suitePath: readonly string[];
1229
+ readonly suiteName: string;
1173
1230
  readonly passCount: number;
1174
1231
  readonly failCount: number;
1175
1232
  readonly skipCount: number;
1233
+ } | {
1234
+ readonly _tag: "SuiteStarted";
1235
+ readonly modulePath: string;
1236
+ readonly suitePath: readonly string[];
1176
1237
  readonly suiteName: string;
1177
1238
  } | {
1178
- readonly _tag: "HookStarted";
1239
+ readonly _tag: "TestAnnotated";
1179
1240
  readonly modulePath: string;
1180
- readonly hookType: "beforeAll" | "afterAll" | "beforeEach" | "afterEach";
1181
- readonly scopeName: string;
1241
+ readonly testName: string;
1242
+ readonly suitePath: readonly string[];
1243
+ readonly annotation: string;
1182
1244
  } | {
1183
- readonly _tag: "HookFinished";
1245
+ readonly _tag: "TestArtifactRecorded";
1184
1246
  readonly modulePath: string;
1185
- readonly status: "passed" | "failed";
1247
+ readonly testName: string;
1248
+ readonly suitePath: readonly string[];
1249
+ readonly artifact: string;
1250
+ } | {
1251
+ readonly _tag: "TestFinished";
1252
+ readonly modulePath: string;
1253
+ readonly testName: string;
1254
+ readonly suitePath: readonly string[];
1255
+ readonly status: "failed" | "passed" | "pending" | "skipped";
1186
1256
  readonly durationMs: number;
1187
1257
  readonly error?: {
1188
1258
  readonly message: string;
@@ -1191,89 +1261,27 @@ declare const RunEventChannel_base: Context.TagClass<RunEventChannel, "vitest-ag
1191
1261
  readonly expected?: string | undefined;
1192
1262
  readonly received?: string | undefined;
1193
1263
  } | undefined;
1194
- readonly hookType: "beforeAll" | "afterAll" | "beforeEach" | "afterEach";
1195
- readonly scopeName: string;
1196
- } | {
1197
- readonly _tag: "ConsoleLog";
1198
- readonly modulePath?: string | undefined;
1199
- readonly testName?: string | undefined;
1200
- readonly level: "stdout" | "stderr";
1201
- readonly content: string;
1202
- readonly time: number;
1203
- } | {
1204
- readonly _tag: "RunTimedOut";
1205
- readonly message: string;
1206
- } | {
1207
- readonly _tag: "TestAnnotated";
1208
- readonly modulePath: string;
1209
- readonly testName: string;
1210
- readonly suitePath: readonly string[];
1211
- readonly annotation: string;
1264
+ readonly timedOut?: boolean | undefined;
1212
1265
  } | {
1213
- readonly _tag: "TestArtifactRecorded";
1266
+ readonly _tag: "TestStarted";
1214
1267
  readonly modulePath: string;
1215
1268
  readonly testName: string;
1216
1269
  readonly suitePath: readonly string[];
1217
- readonly artifact: string;
1218
- } | {
1219
- readonly _tag: "WatcherReady";
1220
- } | {
1221
- readonly _tag: "WatcherRerun";
1222
- readonly triggerFiles: readonly string[];
1223
- readonly reason?: string | undefined;
1224
- } | {
1225
- readonly _tag: "TrendComputed";
1226
- readonly direction: "improving" | "regressing" | "stable";
1227
- readonly runCount: number;
1228
- } | {
1229
- readonly _tag: "CoverageReady";
1230
- readonly metrics: {
1231
- readonly statements: number;
1232
- readonly branches: number;
1233
- readonly functions: number;
1234
- readonly lines: number;
1235
- };
1236
- readonly thresholds: {
1237
- readonly statements?: number | undefined;
1238
- readonly branches?: number | undefined;
1239
- readonly functions?: number | undefined;
1240
- readonly lines?: number | undefined;
1241
- };
1242
- readonly gaps: readonly {
1243
- readonly file: string;
1244
- readonly missing: {
1245
- readonly statements: number;
1246
- readonly branches: number;
1247
- readonly functions: number;
1248
- readonly lines: number;
1249
- };
1250
- readonly uncoveredLines?: string | undefined;
1251
- }[];
1252
1270
  } | {
1253
1271
  readonly _tag: "ThresholdViolation";
1272
+ readonly metric: "branches" | "functions" | "lines" | "statements";
1254
1273
  readonly expected: number;
1255
- readonly metric: "statements" | "branches" | "functions" | "lines";
1256
1274
  readonly actual: number;
1257
1275
  } | {
1258
- readonly _tag: "FailureClassified";
1259
- readonly modulePath: string;
1260
- readonly testName: string;
1261
- readonly classification: "stable" | "new-failure" | "persistent" | "flaky" | "recovered";
1276
+ readonly _tag: "TrendComputed";
1277
+ readonly direction: "improving" | "regressing" | "stable";
1278
+ readonly runCount: number;
1262
1279
  } | {
1263
- readonly _tag: "SuggestedAction";
1264
- readonly severity: "info" | "warn" | "blocker";
1265
- readonly title: string;
1266
- readonly detail: string;
1267
- readonly targetTool?: string | undefined;
1280
+ readonly _tag: "WatcherReady";
1268
1281
  } | {
1269
- readonly _tag: "RunFinished";
1270
- readonly runId: string;
1271
- readonly durationMs: number;
1272
- readonly passCount: number;
1273
- readonly failCount: number;
1274
- readonly skipCount: number;
1275
- readonly timeoutCount?: number | undefined;
1276
- readonly finishedAt: string;
1282
+ readonly _tag: "WatcherRerun";
1283
+ readonly triggerFiles: readonly string[];
1284
+ readonly reason?: string | undefined;
1277
1285
  }>>;
1278
1286
  /**
1279
1287
  * Service tag for the run-event channel. Consumers depend on this tag;
@@ -1831,9 +1839,7 @@ declare const synthesizeFromAgentReport: (report: AgentReport, options?: Synthes
1831
1839
  /**
1832
1840
  * The version of this package, inlined at build time from
1833
1841
  * `package.json#version` via rslib-builder's `__PACKAGE_VERSION__`
1834
- * substitution. The UI package is consumed through the plugin so it does not
1835
- * run its own init-time drift check, but the constant is exported so the
1836
- * plugin can compare against it.
1842
+ * substitution. Exported for version introspection by downstream tooling.
1837
1843
  *
1838
1844
  * @public
1839
1845
  */
package/index.js CHANGED
@@ -28,13 +28,11 @@ import { ActionSeverity, CoverageFile, CoverageGap, CoverageMetric, CoverageRend
28
28
  /**
29
29
  * The version of this package, inlined at build time from
30
30
  * `package.json#version` via rslib-builder's `__PACKAGE_VERSION__`
31
- * substitution. The UI package is consumed through the plugin so it does not
32
- * run its own init-time drift check, but the constant is exported so the
33
- * plugin can compare against it.
31
+ * substitution. Exported for version introspection by downstream tooling.
34
32
  *
35
33
  * @public
36
34
  */
37
- const CURRENT_UI_VERSION = "1.0.0";
35
+ const CURRENT_UI_VERSION = "1.0.2";
38
36
 
39
37
  //#endregion
40
38
  export { ActionSeverity, CURRENT_UI_VERSION, CountColumns, CoverageBlock, CoverageFile, CoverageGap, CoverageMetric, CoverageRenderState, FailureRecord, FailureSection, FailuresSection, ModuleHeader, ModuleRecord, ProjectRow, RenderState, RenderTotals, RunEvent, RunEventChannel, RunEventChannelLive, SPINNER_FRAMES, SPINNER_FRAME_MS, StatusIcon, StreamApp, SuggestedActionRecord, SuggestedActions, 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 };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vitest-agent/ui",
3
- "version": "1.0.0",
3
+ "version": "1.0.2",
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": [
@@ -38,7 +38,7 @@
38
38
  "./package.json": "./package.json"
39
39
  },
40
40
  "dependencies": {
41
- "@vitest-agent/sdk": "1.0.0",
41
+ "@vitest-agent/sdk": "1.1.0",
42
42
  "effect": "^3.21.4"
43
43
  },
44
44
  "peerDependencies": {
package/pubsub/index.js CHANGED
@@ -2,4 +2,4 @@ import { RunEventChannel, RunEventChannelLive } from "./Channel.js";
2
2
  import { publish, publishAll } from "./Publisher.js";
3
3
  import { accumulateUntilFinished, forEachRenderState, renderStateStream, subscribeRaw } from "./Subscriber.js";
4
4
 
5
- export { };
5
+ export { RunEventChannel, RunEventChannelLive, accumulateUntilFinished, forEachRenderState, publish, publishAll, renderStateStream, subscribeRaw };
@@ -11,4 +11,4 @@ import { TrendLine } from "./TrendLine.js";
11
11
  import { StreamApp } from "./StreamApp.js";
12
12
  import { SuggestedActions } from "./SuggestedActions.js";
13
13
 
14
- export { };
14
+ export { CountColumns, CoverageBlock, FailureSection, FailuresSection, ModuleHeader, ProjectRow, SPINNER_FRAMES, SPINNER_FRAME_MS, StatusIcon, StreamApp, SuggestedActions, TestRow, TrendLine, spinnerFrame, spinnerFrameForTime };