@vitest-agent/ui 2.5.3 → 4.0.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.
package/index.d.ts CHANGED
@@ -1,5 +1,6 @@
1
- import { Context, Effect, Layer, PubSub, Schema, Scope, Stream } from "effect";
1
+ import { Schema } from "effect";
2
2
  import { FC, ReactElement } from "react";
3
+ import { CoreStatusName, GlyphSet, Status, Style, TokenName } from "@effected/cli";
3
4
  //#region ../sdk/dist/dev/pkg/index.d.ts
4
5
  //#region src/schemas/Coverage.d.ts
5
6
  /**
@@ -1170,7 +1171,9 @@ export declare const buildFooter: (inputs: DispatchInputs) => string;
1170
1171
  * (`14.87745800000016`). Rendering those verbatim is noise. This is
1171
1172
  * the single formatter every render path calls — `render-agent.ts`,
1172
1173
  * the `render-ink/` components, the dispatcher cells, and `StreamApp`
1173
- * — so a duration looks the same wherever it appears.
1174
+ * — so a duration looks the same wherever it appears. It delegates to
1175
+ * `@effected/cli`'s `Fmt.duration`, so it also matches every other kit
1176
+ * CLI's output.
1174
1177
  *
1175
1178
  * Display only. Full-precision durations continue to persist to the
1176
1179
  * database unchanged; nothing in the trend / baseline / classification
@@ -1179,10 +1182,10 @@ export declare const buildFooter: (inputs: DispatchInputs) => string;
1179
1182
  /**
1180
1183
  * Format a duration in milliseconds for display.
1181
1184
  *
1182
- * Sub-second values round to one decimal place and render as `<N.N>ms`;
1183
- * values at or above one second render as `<N.N>s`. A value that rounds
1184
- * to a whole number drops the trailing `.0` naturally (`Number`
1185
- * stringification), so `1000` → `1s` and `250` → `250ms`.
1185
+ * Whole milliseconds under a second (`250ms`), seconds to one decimal
1186
+ * under a minute with a trailing `.0` dropped (`1.2s`, `2s`), then
1187
+ * `1m 3s` and `1h 2m`. A value that rounds up to the next unit is
1188
+ * written in that unit (`999.6` → `1s`).
1186
1189
  *
1187
1190
  * @param ms - duration in milliseconds
1188
1191
  * @returns formatted duration string
@@ -1190,311 +1193,6 @@ export declare const buildFooter: (inputs: DispatchInputs) => string;
1190
1193
  */
1191
1194
  export declare const formatDisplayDuration: (ms: number) => string;
1192
1195
  //#endregion
1193
- //#region src/pubsub/Channel.d.ts
1194
- declare const RunEventChannel_base: Context.ServiceClass<RunEventChannel, "vitest-agent-ui/RunEventChannel", PubSub.PubSub<{
1195
- readonly _tag: "RunStarted";
1196
- readonly runId: string;
1197
- readonly startedAt: string;
1198
- readonly configHash: string;
1199
- } | {
1200
- readonly _tag: "ModuleQueued";
1201
- readonly modulePath: string;
1202
- readonly projectName?: string | undefined;
1203
- } | {
1204
- readonly _tag: "ModuleStarted";
1205
- readonly modulePath: string;
1206
- readonly startedAt: string;
1207
- readonly projectName?: string | undefined;
1208
- } | {
1209
- readonly _tag: "TestStarted";
1210
- readonly modulePath: string;
1211
- readonly testName: string;
1212
- readonly suitePath: readonly string[];
1213
- } | {
1214
- readonly _tag: "TestFinished";
1215
- readonly modulePath: string;
1216
- readonly testName: string;
1217
- readonly suitePath: readonly string[];
1218
- readonly status: "failed" | "passed" | "pending" | "skipped";
1219
- readonly durationMs: number;
1220
- readonly error?: {
1221
- readonly message: string;
1222
- readonly stack?: string | undefined;
1223
- readonly diff?: string | undefined;
1224
- readonly expected?: string | undefined;
1225
- readonly received?: string | undefined;
1226
- } | undefined;
1227
- readonly timedOut?: boolean | undefined;
1228
- } | {
1229
- readonly _tag: "ModuleFinished";
1230
- readonly modulePath: string;
1231
- readonly passCount: number;
1232
- readonly failCount: number;
1233
- readonly skipCount: number;
1234
- readonly durationMs: number;
1235
- readonly projectName?: string | undefined;
1236
- readonly timeoutCount?: number | undefined;
1237
- readonly tagCounts?: {
1238
- readonly [x: string]: number;
1239
- } | undefined;
1240
- } | {
1241
- readonly _tag: "ModuleCollected";
1242
- readonly modulePath: string;
1243
- readonly testCount: number;
1244
- readonly suiteCount: number;
1245
- } | {
1246
- readonly _tag: "SuiteStarted";
1247
- readonly modulePath: string;
1248
- readonly suitePath: readonly string[];
1249
- readonly suiteName: string;
1250
- } | {
1251
- readonly _tag: "SuiteFinished";
1252
- readonly modulePath: string;
1253
- readonly suitePath: readonly string[];
1254
- readonly suiteName: string;
1255
- readonly passCount: number;
1256
- readonly failCount: number;
1257
- readonly skipCount: number;
1258
- } | {
1259
- readonly _tag: "HookStarted";
1260
- readonly modulePath: string;
1261
- readonly hookType: "afterAll" | "afterEach" | "beforeAll" | "beforeEach";
1262
- readonly scopeName: string;
1263
- } | {
1264
- readonly _tag: "HookFinished";
1265
- readonly modulePath: string;
1266
- readonly hookType: "afterAll" | "afterEach" | "beforeAll" | "beforeEach";
1267
- readonly scopeName: string;
1268
- readonly durationMs: number;
1269
- readonly status: "failed" | "passed";
1270
- readonly error?: {
1271
- readonly message: string;
1272
- readonly stack?: string | undefined;
1273
- readonly diff?: string | undefined;
1274
- readonly expected?: string | undefined;
1275
- readonly received?: string | undefined;
1276
- } | undefined;
1277
- } | {
1278
- readonly _tag: "ConsoleLog";
1279
- readonly modulePath?: string | undefined;
1280
- readonly testName?: string | undefined;
1281
- readonly level: "stderr" | "stdout";
1282
- readonly content: string;
1283
- readonly time: number;
1284
- } | {
1285
- readonly _tag: "RunTimedOut";
1286
- readonly message: string;
1287
- } | {
1288
- readonly _tag: "TestAnnotated";
1289
- readonly modulePath: string;
1290
- readonly testName: string;
1291
- readonly suitePath: readonly string[];
1292
- readonly annotation: string;
1293
- readonly annotationType: string;
1294
- readonly location?: {
1295
- readonly file: string;
1296
- readonly line: number;
1297
- readonly column: number;
1298
- } | undefined;
1299
- readonly attachments: readonly {
1300
- readonly contentType?: string | undefined;
1301
- readonly path?: string | undefined;
1302
- readonly body?: string | undefined;
1303
- readonly bodyEncoding?: "base64" | "utf-8" | undefined;
1304
- readonly byteSize: number;
1305
- }[];
1306
- } | {
1307
- readonly _tag: "TestArtifactRecorded";
1308
- readonly modulePath: string;
1309
- readonly testName: string;
1310
- readonly suitePath: readonly string[];
1311
- readonly artifact: string;
1312
- readonly location?: {
1313
- readonly file: string;
1314
- readonly line: number;
1315
- readonly column: number;
1316
- } | undefined;
1317
- readonly attachments: readonly {
1318
- readonly contentType?: string | undefined;
1319
- readonly path?: string | undefined;
1320
- readonly body?: string | undefined;
1321
- readonly bodyEncoding?: "base64" | "utf-8" | undefined;
1322
- readonly byteSize: number;
1323
- }[];
1324
- } | {
1325
- readonly _tag: "WatcherReady";
1326
- } | {
1327
- readonly _tag: "WatcherRerun";
1328
- readonly triggerFiles: readonly string[];
1329
- readonly reason?: string | undefined;
1330
- } | {
1331
- readonly _tag: "TrendComputed";
1332
- readonly direction: "improving" | "regressing" | "stable";
1333
- readonly runCount: number;
1334
- } | {
1335
- readonly _tag: "CoverageReady";
1336
- readonly metrics: {
1337
- readonly statements: number;
1338
- readonly branches: number;
1339
- readonly functions: number;
1340
- readonly lines: number;
1341
- };
1342
- readonly thresholds: {
1343
- readonly lines?: number | undefined;
1344
- readonly functions?: number | undefined;
1345
- readonly branches?: number | undefined;
1346
- readonly statements?: number | undefined;
1347
- };
1348
- readonly gaps: readonly {
1349
- readonly file: string;
1350
- readonly missing: {
1351
- readonly statements: number;
1352
- readonly branches: number;
1353
- readonly functions: number;
1354
- readonly lines: number;
1355
- };
1356
- readonly uncoveredLines?: string | undefined;
1357
- }[];
1358
- readonly scoped?: boolean | undefined;
1359
- readonly scopedFiles?: number | undefined;
1360
- readonly totalFiles?: number | undefined;
1361
- } | {
1362
- readonly _tag: "ThresholdViolation";
1363
- readonly metric: "branches" | "functions" | "lines" | "statements";
1364
- readonly expected: number;
1365
- readonly actual: number;
1366
- } | {
1367
- readonly _tag: "FailureClassified";
1368
- readonly modulePath: string;
1369
- readonly testName: string;
1370
- readonly classification: "flaky" | "new-failure" | "persistent" | "recovered" | "stable";
1371
- } | {
1372
- readonly _tag: "SuggestedAction";
1373
- readonly severity: "blocker" | "info" | "warn";
1374
- readonly title: string;
1375
- readonly detail: string;
1376
- readonly targetTool?: string | undefined;
1377
- } | {
1378
- readonly _tag: "RunFinished";
1379
- readonly runId: string;
1380
- readonly finishedAt: string;
1381
- readonly passCount: number;
1382
- readonly failCount: number;
1383
- readonly skipCount: number;
1384
- readonly durationMs: number;
1385
- readonly timeoutCount?: number | undefined;
1386
- readonly collectedModules?: number | undefined;
1387
- readonly unhandledErrors?: readonly {
1388
- readonly message: string;
1389
- readonly stack?: string | undefined;
1390
- readonly diff?: string | undefined;
1391
- readonly expected?: string | undefined;
1392
- readonly received?: string | undefined;
1393
- }[] | undefined;
1394
- }>>;
1395
- /**
1396
- * Service tag for the run-event channel. Consumers depend on this tag;
1397
- * the {@link RunEventChannelLive} layer is the single point at which
1398
- * the underlying Effect `PubSub` is constructed.
1399
- *
1400
- * @public
1401
- */
1402
- export declare class RunEventChannel extends RunEventChannel_base {}
1403
- /**
1404
- * Default live layer providing an unbounded Effect `PubSub` for
1405
- * the run-event channel. The PubSub is scoped — when the surrounding
1406
- * scope closes, the channel shuts down and any pending subscribers
1407
- * receive their dequeue closure.
1408
- *
1409
- * Unbounded is the right default for the plugin and CLI: events arrive
1410
- * faster than a slow renderer can drain (e.g., several `TestFinished`
1411
- * per millisecond during a large suite), and dropping events would
1412
- * leave the rendered state inconsistent with the runner's truth.
1413
- * If memory pressure becomes a concern, swap in `PubSub.sliding`
1414
- * with a tuned capacity at the call site.
1415
- *
1416
- * @public
1417
- */
1418
- export declare const RunEventChannelLive: Layer.Layer<RunEventChannel>;
1419
- //#endregion
1420
- //#region src/pubsub/Publisher.d.ts
1421
- /**
1422
- * Emit one event onto the channel.
1423
- *
1424
- * Resolves when the event is enqueued. Returns the success boolean
1425
- * from `PubSub.publish` so callers can detect a shutdown
1426
- * channel if needed; in normal operation the result is always `true`.
1427
- *
1428
- * @param event - the run event to publish
1429
- * @returns an Effect that resolves to the publish success boolean
1430
- * @public
1431
- */
1432
- export declare const publish: (event: RunEvent) => Effect.Effect<boolean, never, RunEventChannel>;
1433
- /**
1434
- * Emit a batch of events onto the channel in order.
1435
- *
1436
- * Useful for the CLI replay path where the entire event sequence is
1437
- * materialized synchronously from a database query before any
1438
- * subscriber needs to read it.
1439
- *
1440
- * @param events - iterable of run events to publish in order
1441
- * @returns an Effect that resolves when all events are enqueued
1442
- * @public
1443
- */
1444
- export declare const publishAll: (events: Iterable<RunEvent>) => Effect.Effect<void, never, RunEventChannel>;
1445
- //#endregion
1446
- //#region src/pubsub/Subscriber.d.ts
1447
- /**
1448
- * Subscribe, fold the run-event stream into a terminal
1449
- * `RenderState`, and return when `RunFinished` arrives.
1450
- *
1451
- * The subscription is scoped — when this effect completes (or is
1452
- * interrupted), the underlying PubSub releases its slot.
1453
- *
1454
- * @param initial - the initial render state to fold from
1455
- * @returns an Effect that resolves to the terminal render state
1456
- * @public
1457
- */
1458
- export declare const accumulateUntilFinished: (initial?: RenderState) => Effect.Effect<RenderState, never, RunEventChannel>;
1459
- /**
1460
- * Run a callback for every projected `RenderState` as events
1461
- * arrive. The stream terminates when the PubSub shuts down (typically
1462
- * when the surrounding scope closes).
1463
- *
1464
- * The host runs this in a forked fiber so the publisher and the
1465
- * renderer can make progress concurrently. Returning an Effect from
1466
- * the callback lets the host suspend further rendering on backpressure
1467
- * (e.g. throttling redraws to the next animation frame).
1468
- *
1469
- * @param onState - callback invoked with each projected render state
1470
- * @param initial - the initial render state to fold from
1471
- * @returns an Effect that completes when the PubSub shuts down
1472
- * @public
1473
- */
1474
- export declare const forEachRenderState: <R, E>(onState: (state: RenderState) => Effect.Effect<void, E, R>, initial?: RenderState) => Effect.Effect<void, E, R | RunEventChannel>;
1475
- /**
1476
- * Build an Effect `Stream` of accumulated states over the channel.
1477
- *
1478
- * Lower-level than {@link forEachRenderState} — useful when the host
1479
- * wants to compose with other stream operators (debouncing, throttling,
1480
- * tee-to-file) before running the terminal sink.
1481
- *
1482
- * @param initial - the initial render state to fold from
1483
- * @returns an Effect that resolves to a Stream of render states
1484
- * @public
1485
- */
1486
- export declare const renderStateStream: (initial?: RenderState) => Effect.Effect<Stream.Stream<RenderState>, never, RunEventChannel>;
1487
- /**
1488
- * Convenience: subscribe and produce a low-level dequeue of raw
1489
- * `RunEvent` values. Mostly for tests and ad-hoc consumers; most
1490
- * application code should prefer {@link forEachRenderState} or
1491
- * {@link renderStateStream}.
1492
- *
1493
- * @returns an Effect that resolves to a dequeue of raw run events
1494
- * @public
1495
- */
1496
- export declare const subscribeRaw: () => Effect.Effect<PubSub.Subscription<RunEvent>, never, RunEventChannel | Scope.Scope>;
1497
- //#endregion
1498
1196
  //#region src/reducer.d.ts
1499
1197
  /**
1500
1198
  * Apply a single event to the previous state and return the next.
@@ -1588,7 +1286,7 @@ interface CountColumnsProps {
1588
1286
  /**
1589
1287
  * Fixed width of the duration cell that follows the count columns on an
1590
1288
  * aggregate row — sized for the formatter's widest common output
1591
- * (`999.9ms`). Longer values overflow their row rather than truncate.
1289
+ * (`59m 59s`). Longer values overflow their row rather than truncate.
1592
1290
  *
1593
1291
  * @public
1594
1292
  */
@@ -1597,7 +1295,8 @@ export declare const DURATION_CELL_WIDTH = 7;
1597
1295
  * Renders four colored count columns (pass ✓, fail ✗, skip ↷, timeout ⧖)
1598
1296
  * for an aggregate row. Counts render right-aligned in fixed 4-digit cells so
1599
1297
  * columns align across rows; counts of 10,000+ overflow their row without
1600
- * truncation. Zeros are dimmed; all four columns always appear.
1298
+ * truncation. Zeros are greyed; all four columns always appear. Glyphs and
1299
+ * colours come from `VitestAgentStatus` (skip is `muted`).
1601
1300
  *
1602
1301
  * @public
1603
1302
  */
@@ -1759,7 +1458,7 @@ export declare const StatusIcon: FC<StatusIconProps>;
1759
1458
  interface StreamAppProps {
1760
1459
  /** The current reduced render state to display. */
1761
1460
  readonly state: RenderState;
1762
- /** Current spinner frame index, derived from wall-clock time. */
1461
+ /** Current spinner frame index (the live view's `frame`: wall-clock ticks of `SPINNER_FRAME_MS`). */
1763
1462
  readonly frameIndex: number;
1764
1463
  /** Current wall-clock time in milliseconds; defaults to `Date.now()`. */
1765
1464
  readonly nowMs?: number;
@@ -1792,49 +1491,29 @@ export declare const SuggestedActions: FC<SuggestedActionsProps>;
1792
1491
  //#endregion
1793
1492
  //#region src/render-ink/spinner.d.ts
1794
1493
  /**
1795
- * Hand-rolled Braille spinner for the `stream` live renderer.
1796
- *
1797
- * No `ink-spinner` dependency — that package is a thin wrapper over the
1798
- * same ten Braille characters plus a timer. The `stream` renderer
1799
- * already needs a frame clock for the ticking elapsed column, so the
1800
- * timer is shared and only the frame array lives here.
1801
- *
1802
- * The frame index is presentation state: it is derived from wall-clock
1803
- * time by `createLiveInk` and passed to `StreamApp` as a prop. It never
1804
- * enters the event-sourced `RenderState`.
1805
- */
1806
- /**
1807
- * The ten Braille spinner frames, in animation order.
1494
+ * The Unicode spinner frames, in animation order (`Glyphs.unicode.spinner`).
1808
1495
  *
1809
1496
  * @public
1810
1497
  */
1811
- export declare const SPINNER_FRAMES: readonly ["⠋", "⠙", "⠹", "⠸", "⠼", "⠴", "⠦", "⠧", "⠇", "⠏"];
1498
+ export declare const SPINNER_FRAMES: ReadonlyArray<string>;
1812
1499
  /**
1813
- * How long each spinner frame is held, in milliseconds.
1500
+ * How long each spinner frame is held, in milliseconds
1501
+ * (`Glyphs.unicode.spinnerIntervalMs`).
1814
1502
  *
1815
1503
  * @public
1816
1504
  */
1817
- export declare const SPINNER_FRAME_MS = 80;
1505
+ export declare const SPINNER_FRAME_MS: number;
1818
1506
  /**
1819
1507
  * Resolve the spinner glyph for a frame index. The index wraps modulo
1820
1508
  * the frame count and tolerates negative values, so a wall-clock-derived
1821
1509
  * index is always valid.
1822
1510
  *
1823
1511
  * @param index - the frame index (wraps modulo frame count)
1824
- * @returns the Braille glyph for the given frame
1512
+ * @param glyphs - the glyph set whose frames to draw; Unicode by default
1513
+ * @returns the spinner glyph for the given frame
1825
1514
  * @public
1826
1515
  */
1827
- export declare const spinnerFrame: (index: number) => string;
1828
- /**
1829
- * Derive the spinner frame index from a wall-clock timestamp. Using the
1830
- * clock — rather than a monotonic counter — keeps the animation correct
1831
- * across watch-mode remounts with no extra closure state to reset.
1832
- *
1833
- * @param nowMs - current wall-clock time in milliseconds
1834
- * @returns the frame index for the given timestamp
1835
- * @public
1836
- */
1837
- export declare const spinnerFrameForTime: (nowMs: number) => number;
1516
+ export declare const spinnerFrame: (index: number, glyphs?: GlyphSet) => string;
1838
1517
  //#endregion
1839
1518
  //#region src/render-ink/TagColumns.d.ts
1840
1519
  /**
@@ -2003,6 +1682,82 @@ interface SynthesizeFromAgentReportOptions {
2003
1682
  */
2004
1683
  export declare const synthesizeFromAgentReport: (report: AgentReport, options?: SynthesizeFromAgentReportOptions) => RunEvent[];
2005
1684
  //#endregion
1685
+ //#region src/theme.d.ts
1686
+ /**
1687
+ * The status vocabulary every vitest-agent render path draws from.
1688
+ *
1689
+ * @remarks
1690
+ * Ranks slot the run statuses into the core ladder: `queued` (25) and
1691
+ * `running` (35) sit among the not-yet-decided statuses, and `timeout` (85)
1692
+ * is just under `failure` (90), so `Status.worst` over a project's
1693
+ * outcomes reads failure, then timeout, then warning.
1694
+ *
1695
+ * @public
1696
+ */
1697
+ export declare const VitestAgentStatus: Status<VitestAgentStatusName>;
1698
+ /**
1699
+ * A status name in {@link VitestAgentStatus}.
1700
+ *
1701
+ * @public
1702
+ */
1703
+ type VitestAgentStatusName = CoreStatusName | "timeout" | "running" | "queued";
1704
+ /**
1705
+ * Named accents that are not statuses.
1706
+ *
1707
+ * @public
1708
+ */
1709
+ export declare const VitestAgentTokens: {
1710
+ /** The `[flaky]` / `[new-failure]` classification tag on a failure line. */
1711
+ readonly classification: Style;
1712
+ /** A zero in a count column: present for alignment, not signal. */
1713
+ readonly zero: Style;
1714
+ /** The `stable` trend direction. */
1715
+ readonly stable: Style;
1716
+ /** A non-zero tag count. */
1717
+ readonly tag: Style;
1718
+ };
1719
+ /**
1720
+ * The subset of Ink's `<Text>` props a `Style` maps onto.
1721
+ *
1722
+ * @public
1723
+ */
1724
+ interface InkTextStyle {
1725
+ readonly color?: string;
1726
+ readonly bold?: boolean;
1727
+ readonly dimColor?: boolean;
1728
+ readonly italic?: boolean;
1729
+ readonly underline?: boolean;
1730
+ }
1731
+ /**
1732
+ * Ink `<Text>` props for a semantic token or an explicit style.
1733
+ *
1734
+ * @remarks
1735
+ * Resolves the token through the kit's pure `Token.resolve` and maps the
1736
+ * `Style` with the kit's `inkProps`. No colour level reaches this call
1737
+ * site, so `inkProps` with no level emits every prop and Ink's own chalk
1738
+ * level, set by `CliUi.live` or `CliUi.context`, gates what is drawn.
1739
+ *
1740
+ * @param token - a token name or a `Style`
1741
+ * @public
1742
+ */
1743
+ export declare const inkStyle: (token: TokenName | Style) => InkTextStyle;
1744
+ /**
1745
+ * The glyph of a status in a glyph set: its Unicode glyph, or its ASCII
1746
+ * fallback when `glyphs` is the kit's ASCII set (the kit's `Status.glyph`).
1747
+ *
1748
+ * @param name - a status in {@link VitestAgentStatus}
1749
+ * @param glyphs - the glyph set, from `Glyphs.select`; Unicode by default
1750
+ * @public
1751
+ */
1752
+ export declare const statusGlyph: (name: VitestAgentStatusName, glyphs?: GlyphSet) => string;
1753
+ /**
1754
+ * Ink `<Text>` props for a status's glyph.
1755
+ *
1756
+ * @param name - a status in {@link VitestAgentStatus}
1757
+ * @public
1758
+ */
1759
+ export declare const statusInkStyle: (name: VitestAgentStatusName) => InkTextStyle;
1760
+ //#endregion
2006
1761
  //#region src/index.d.ts
2007
1762
  /**
2008
1763
  * The version of this package, inlined at build time from
@@ -2013,5 +1768,5 @@ export declare const synthesizeFromAgentReport: (report: AgentReport, options?:
2013
1768
  */
2014
1769
  export declare const CURRENT_UI_VERSION: string;
2015
1770
  //#endregion
2016
- 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 };
1771
+ 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 InkTextStyle, 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 VitestAgentStatusName, type VitestModuleDiagnostic, type VitestModuleError, type VitestParsedStack, type VitestTestCase, type VitestTestDiagnostic, type VitestTestError, type VitestTestModule, type VitestTestResult, type VitestTestSuite };
2017
1772
  //# sourceMappingURL=index.d.ts.map
package/index.js CHANGED
@@ -1,12 +1,9 @@
1
1
  import { classifyOutcome, classifyRunShape } from "./dispatcher/classify.js";
2
2
  import { buildFooter, dominantClassification } from "./dispatcher/footer.js";
3
+ import { VitestAgentStatus, VitestAgentTokens, inkStyle, statusGlyph, statusInkStyle } from "./theme.js";
3
4
  import { formatDisplayDuration } from "./format-duration.js";
4
5
  import { dispatch, dispatchInk, dispatcherTable } from "./dispatcher/dispatch.js";
5
- import { RunEventChannel, RunEventChannelLive } from "./pubsub/Channel.js";
6
- import { publish, publishAll } from "./pubsub/Publisher.js";
7
6
  import { reduceRenderState, reduceRenderStateAll } from "./reducer.js";
8
- import { accumulateUntilFinished, forEachRenderState, renderStateStream, subscribeRaw } from "./pubsub/Subscriber.js";
9
- import "./pubsub/index.js";
10
7
  import { renderAgent } from "./render-agent.js";
11
8
  import { CountColumns, DURATION_CELL_WIDTH } from "./render-ink/CountColumns.js";
12
9
  import { CoverageBlock } from "./render-ink/CoverageBlock.js";
@@ -16,7 +13,7 @@ import { StatusIcon } from "./render-ink/StatusIcon.js";
16
13
  import { ModuleHeader } from "./render-ink/ModuleHeader.js";
17
14
  import { TagColumns, tagUnion } from "./render-ink/TagColumns.js";
18
15
  import { ProjectRow } from "./render-ink/ProjectRow.js";
19
- import { SPINNER_FRAMES, SPINNER_FRAME_MS, spinnerFrame, spinnerFrameForTime } from "./render-ink/spinner.js";
16
+ import { SPINNER_FRAMES, SPINNER_FRAME_MS, spinnerFrame } from "./render-ink/spinner.js";
20
17
  import { TestRow } from "./render-ink/TestRow.js";
21
18
  import { TrendLine } from "./render-ink/TrendLine.js";
22
19
  import { StreamApp } from "./render-ink/StreamApp.js";
@@ -33,7 +30,7 @@ import { ActionSeverity, CoverageFile, CoverageGap, CoverageMetric, CoverageRend
33
30
  *
34
31
  * @public
35
32
  */
36
- const CURRENT_UI_VERSION = "2.5.3";
33
+ const CURRENT_UI_VERSION = "4.0.0";
37
34
 
38
35
  //#endregion
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 };
36
+ export { ActionSeverity, CURRENT_UI_VERSION, CountColumns, CoverageBlock, CoverageFile, CoverageGap, CoverageMetric, CoverageRenderState, DURATION_CELL_WIDTH, FailureRecord, FailureSection, FailuresSection, ModuleHeader, ModuleRecord, ProjectRow, RenderState, RenderTotals, RunEvent, SPINNER_FRAMES, SPINNER_FRAME_MS, SUITE_LOAD_FAILURE_LABEL, StatusIcon, StreamApp, SuggestedActionRecord, SuggestedActions, TagColumns, TestRecord, TestRow, TrendLine, VitestAgentStatus, VitestAgentTokens, buildFooter, classifyOutcome, classifyRunShape, dispatch, dispatchInk, dispatcherTable, dominantClassification, formatDisplayDuration, initialRenderState, inkStyle, reduceRenderState, reduceRenderStateAll, renderAgent, spinnerFrame, statusGlyph, statusInkStyle, synthesizeFromAgentReport, synthesizeRunEvents, tagUnion };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vitest-agent/ui",
3
- "version": "2.5.3",
3
+ "version": "4.0.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,10 +39,14 @@
39
39
  "./package.json": "./package.json"
40
40
  },
41
41
  "dependencies": {
42
- "@vitest-agent/sdk": "5.1.3",
43
- "effect": "4.0.0-rc.118"
42
+ "@vitest-agent/sdk": "6.0.0",
43
+ "effect": "^4.0.0"
44
44
  },
45
45
  "peerDependencies": {
46
+ "@effected/cli": "^0.11.0",
47
+ "@effected/env": "^0.1.0",
48
+ "@effected/glob": "^0.10.0",
49
+ "@effected/walker": "^0.15.0",
46
50
  "ink": "^7.1.0",
47
51
  "react": "^19.3.0"
48
52
  },