@vitest-agent/ui 5.2.1 → 5.2.3

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/counts.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { VitestAgentStatus } from "./theme.js";
2
- import { Doc, Render } from "@effected/cli";
2
+ import { Doc, Render } from "@effected/cli-kit";
3
3
 
4
4
  // src/counts.ts
5
5
  /** The test counters a totals line folds into its `n/total`. */
@@ -1,7 +1,7 @@
1
1
  import { buildFooter } from "../footer.js";
2
2
  import { formatDisplayDuration } from "../../format-duration.js";
3
3
  import { soleModulePath } from "../helpers.js";
4
- import { Fmt } from "@effected/cli";
4
+ import { Fmt } from "@effected/cli-kit";
5
5
 
6
6
  // src/dispatcher/cells/single-file-pass.ts
7
7
  const renderAgent = (inputs) => {
@@ -1,7 +1,7 @@
1
1
  import { buildFooter } from "../footer.js";
2
2
  import { formatDisplayDuration } from "../../format-duration.js";
3
3
  import { formatCoverageSummaryLines, soleModulePath } from "../helpers.js";
4
- import { Fmt } from "@effected/cli";
4
+ import { Fmt } from "@effected/cli-kit";
5
5
 
6
6
  // src/dispatcher/cells/single-file-threshold.ts
7
7
  const renderAgent = (inputs) => {
@@ -1,6 +1,6 @@
1
1
  import { buildFooter } from "../footer.js";
2
2
  import { formatTotals } from "../helpers.js";
3
- import { Fmt } from "@effected/cli";
3
+ import { Fmt } from "@effected/cli-kit";
4
4
 
5
5
  // src/dispatcher/cells/single-project-pass.ts
6
6
  const renderAgent = (inputs) => {
@@ -1,5 +1,5 @@
1
- import { buildFooter } from "../footer.js";
2
1
  import { statusGlyph } from "../../theme.js";
2
+ import { buildFooter } from "../footer.js";
3
3
  import { formatDisplayDuration } from "../../format-duration.js";
4
4
  import { formatFailure, formatTestName, soleTest } from "../helpers.js";
5
5
 
@@ -1,5 +1,5 @@
1
- import { buildFooter } from "../footer.js";
2
1
  import { statusGlyph } from "../../theme.js";
2
+ import { buildFooter } from "../footer.js";
3
3
  import { formatDisplayDuration } from "../../format-duration.js";
4
4
  import { formatTestName, soleTest } from "../helpers.js";
5
5
 
@@ -1,4 +1,3 @@
1
- import { formatSuggestedActionLines } from "./helpers.js";
2
1
  import { renderSingleFileFail } from "./cells/single-file-fail.js";
3
2
  import { renderSingleFilePass } from "./cells/single-file-pass.js";
4
3
  import { renderSingleFileThreshold } from "./cells/single-file-threshold.js";
@@ -11,6 +10,7 @@ import { renderSingleTestThreshold } from "./cells/single-test-threshold.js";
11
10
  import { renderWorkspaceFail } from "./cells/workspace-fail.js";
12
11
  import { renderWorkspacePass } from "./cells/workspace-pass.js";
13
12
  import { renderWorkspaceThreshold } from "./cells/workspace-threshold.js";
13
+ import { formatSuggestedActionLines } from "./helpers.js";
14
14
  import { formatConsoleLeaksNote, formatScopedCoverageNote, formatStrayOutputNote } from "@vitest-agent/sdk";
15
15
 
16
16
  // src/dispatcher/dispatch.ts
@@ -1,7 +1,7 @@
1
- import { statusGlyph } from "../theme.js";
2
1
  import { formatTotalsLine } from "../counts.js";
3
2
  import { formatDisplayDuration } from "../format-duration.js";
4
- import { Doc, Fmt, Render } from "@effected/cli";
3
+ import { statusGlyph } from "../theme.js";
4
+ import { Doc, Fmt, Render } from "@effected/cli-kit";
5
5
 
6
6
  // src/dispatcher/helpers.ts
7
7
  /**
@@ -177,12 +177,6 @@ const formatTagCountSuffix = (tagCounts) => {
177
177
  return [...entries].sort(([a], [b]) => a.localeCompare(b)).map(([tag, count]) => `${tag}:${count}`).join(" ");
178
178
  };
179
179
  /**
180
- * A render width no table reaches, so the kit never truncates a cell: a
181
- * project name or a coverage path is printed whole however long it is
182
- * (issue #237 follow-up).
183
- */
184
- const UNBOUNDED_WIDTH = Number.MAX_SAFE_INTEGER;
185
- /**
186
180
  * Format the `Projects (N):` block as an array of lines including the
187
181
  * leading header and each project row, indented two spaces.
188
182
  *
@@ -195,10 +189,7 @@ const UNBOUNDED_WIDTH = Number.MAX_SAFE_INTEGER;
195
189
  const formatProjectsTable = (projects) => {
196
190
  if (projects.length === 0) return [];
197
191
  const table = Doc.table([{ header: "" }, { header: "" }], projects.map(projectCells));
198
- const rows = Render.plain([table], Render.contextOf({
199
- audience: "agent",
200
- width: UNBOUNDED_WIDTH
201
- })).split("\n").map((row) => ` ${row}`);
192
+ const rows = Render.plain([table], Render.contextOf({ audience: "agent" })).split("\n").map((row) => ` ${row}`);
202
193
  return [`Projects (${projects.length}):`, ...rows];
203
194
  };
204
195
  /**
@@ -220,7 +211,7 @@ const sumOf = (projects, pick) => projects.reduce((sum, p) => sum + pick(p), 0);
220
211
  * array when `belowTarget` is empty.
221
212
  *
222
213
  * @remarks
223
- * The table renders at {@link UNBOUNDED_WIDTH}, so the kit never truncates a
214
+ * The table renders at the kit's default unbounded width (`Render.contextOf`'s `Infinity`), so the kit never truncates a
224
215
  * cell and a printed path is always whole (issue #237 follow-up). Columns are
225
216
  * padded by display width and the percentage cells are centred by the kit.
226
217
  * Each path is a `Doc.link` written through `link`, so a hyperlink wraps the
@@ -254,10 +245,7 @@ const formatBelowTargetTable = (belowTarget, limit, link = (_target, label) => l
254
245
  overflow: (hidden) => `… ${hidden} more (use the test_coverage MCP tool for the full list)`
255
246
  });
256
247
  return ["Files below aspirational target:", ...Render.ansi([table], {
257
- ...Render.contextOf({
258
- audience: "human",
259
- width: UNBOUNDED_WIDTH
260
- }),
248
+ ...Render.contextOf({ audience: "human" }),
261
249
  link: (target, label) => "file" in target ? link(target, label) : label
262
250
  }).split("\n")];
263
251
  };
@@ -1,4 +1,4 @@
1
- import { Fmt } from "@effected/cli";
1
+ import { Fmt } from "@effected/cli-kit";
2
2
 
3
3
  // src/format-duration.ts
4
4
  /**
@@ -9,7 +9,7 @@ import { Fmt } from "@effected/cli";
9
9
  * the single formatter every render path calls — `render-agent.ts`,
10
10
  * the `render-ink/` components, the dispatcher cells, and `StreamApp`
11
11
  * — so a duration looks the same wherever it appears. It delegates to
12
- * `@effected/cli`'s `Fmt.duration`, so it also matches every other kit
12
+ * `@effected/cli-kit`'s `Fmt.duration`, so it also matches every other kit
13
13
  * CLI's output.
14
14
  *
15
15
  * Display only. Full-precision durations continue to persist to the
package/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import { Schema } from "effect";
2
- import { CoreStatusName, GlyphSet, Status, Style, TokenName } from "@effected/cli";
2
+ import { CoreStatusName, GlyphSet, Status, Style, TokenName } from "@effected/cli-kit";
3
3
  /**
4
4
  * Aggregate coverage percentages across four istanbul metrics.
5
5
  * @public
@@ -522,7 +522,7 @@ interface DispatchInputs {
522
522
  /**
523
523
  * Where a file link points: a path, with an optional line and column.
524
524
  *
525
- * The file half of `@effected/cli`'s `LinkTarget`, spelled structurally so
525
+ * The file half of `@effected/cli-kit`'s `LinkTarget`, spelled structurally so
526
526
  * this platform-free contract names no kit type. A relative path resolves
527
527
  * against the working directory the kit's `CliLinks` layer was built with.
528
528
  * @public
@@ -546,7 +546,7 @@ interface CellOptions {
546
546
  * Writes a file path as a link for the audience and terminal the output
547
547
  * is for: the label wrapped in an OSC 8 hyperlink when the reader can
548
548
  * follow it, the label unchanged otherwise. The kit decides both halves
549
- * (`@effected/cli`'s `CliLinks.linker`, `Render.context("stdout").link`):
549
+ * (`@effected/cli-kit`'s `CliLinks.linker`, `Render.context("stdout").link`):
550
550
  * `vscode://file/<path>:<line>:<col>` under VS Code, `file://` otherwise,
551
551
  * never for an agent audience, and nothing on a terminal that cannot
552
552
  * render hyperlinks (a pipe, tmux, GNU screen, `NO_COLOR`).
@@ -1314,7 +1314,7 @@ export declare const buildFooter: (inputs: DispatchInputs) => string;
1314
1314
  * the single formatter every render path calls — `render-agent.ts`,
1315
1315
  * the `render-ink/` components, the dispatcher cells, and `StreamApp`
1316
1316
  * — so a duration looks the same wherever it appears. It delegates to
1317
- * `@effected/cli`'s `Fmt.duration`, so it also matches every other kit
1317
+ * `@effected/cli-kit`'s `Fmt.duration`, so it also matches every other kit
1318
1318
  * CLI's output.
1319
1319
  *
1320
1320
  * Display only. Full-precision durations continue to persist to the
package/index.js CHANGED
@@ -1,13 +1,13 @@
1
1
  import { classifyOutcome, classifyRunShape } from "./dispatcher/classify.js";
2
+ import { dispatch, dispatcherTable } from "./dispatcher/dispatch.js";
2
3
  import { buildFooter, dominantClassification } from "./dispatcher/footer.js";
3
- import { VitestAgentStatus, VitestAgentTokens, inkStyle, statusGlyph, statusInkStyle } from "./theme.js";
4
- import { formatDisplayDuration } from "./format-duration.js";
5
4
  import { formatSuggestedActionLines } from "./dispatcher/helpers.js";
6
- import { dispatch, dispatcherTable } from "./dispatcher/dispatch.js";
5
+ import { formatDisplayDuration } from "./format-duration.js";
7
6
  import { reduceRenderState, reduceRenderStateAll } from "./reducer.js";
8
7
  import { renderAgent } from "./render-agent.js";
9
8
  import { SPINNER_FRAMES, SPINNER_FRAME_MS, spinnerFrame } from "./spinner.js";
10
9
  import { SUITE_FAILURE_LABEL, SUITE_LOAD_FAILURE_LABEL, synthesizeFromAgentReport, synthesizeRunEvents } from "./synthesize.js";
10
+ import { VitestAgentStatus, VitestAgentTokens, inkStyle, statusGlyph, statusInkStyle } from "./theme.js";
11
11
  import { ActionSeverity, CoverageFile, CoverageGap, CoverageMetric, CoverageRenderState, FailureRecord, ModuleRecord, RenderState, RenderTotals, RunEvent, SuggestedActionRecord, TestRecord, initialRenderState } from "@vitest-agent/sdk";
12
12
 
13
13
  // src/index.ts
@@ -18,6 +18,6 @@ import { ActionSeverity, CoverageFile, CoverageGap, CoverageMetric, CoverageRend
18
18
  *
19
19
  * @public
20
20
  */
21
- const CURRENT_UI_VERSION = "5.2.1";
21
+ const CURRENT_UI_VERSION = "5.2.3";
22
22
 
23
23
  export { ActionSeverity, CURRENT_UI_VERSION, CoverageFile, CoverageGap, CoverageMetric, CoverageRenderState, FailureRecord, ModuleRecord, RenderState, RenderTotals, RunEvent, SPINNER_FRAMES, SPINNER_FRAME_MS, SUITE_FAILURE_LABEL, SUITE_LOAD_FAILURE_LABEL, SuggestedActionRecord, TestRecord, VitestAgentStatus, VitestAgentTokens, buildFooter, classifyOutcome, classifyRunShape, dispatch, dispatcherTable, dominantClassification, formatDisplayDuration, formatSuggestedActionLines, initialRenderState, inkStyle, reduceRenderState, reduceRenderStateAll, renderAgent, spinnerFrame, statusGlyph, statusInkStyle, synthesizeFromAgentReport, synthesizeRunEvents };
@@ -1,6 +1,6 @@
1
1
  import { VitestAgentTokens, inkStyle, statusGlyph, statusInkStyle } from "../theme.js";
2
- import { Fmt } from "@effected/cli";
3
- import { useGlyphs } from "@effected/cli/ui";
2
+ import { Fmt } from "@effected/cli-kit";
3
+ import { useGlyphs } from "@effected/cli-kit/ui";
4
4
  import { Text } from "ink";
5
5
  import { jsxs } from "react/jsx-runtime";
6
6
 
@@ -1,6 +1,6 @@
1
1
  import { inkStyle } from "../theme.js";
2
2
  import { useFileLink } from "./FileLink.js";
3
- import { Fmt } from "@effected/cli";
3
+ import { Fmt } from "@effected/cli-kit";
4
4
  import { Box, Text } from "ink";
5
5
  import { jsx, jsxs } from "react/jsx-runtime";
6
6
 
@@ -1,6 +1,6 @@
1
1
  import { inkStyle, statusGlyph, statusInkStyle } from "../theme.js";
2
2
  import { useFileLink } from "./FileLink.js";
3
- import { useGlyphs } from "@effected/cli/ui";
3
+ import { useGlyphs } from "@effected/cli-kit/ui";
4
4
  import { Box, Text } from "ink";
5
5
  import { jsx, jsxs } from "react/jsx-runtime";
6
6
 
@@ -1,6 +1,6 @@
1
1
  import { VitestAgentTokens, inkStyle, statusGlyph, statusInkStyle } from "../theme.js";
2
2
  import { useFileLink } from "./FileLink.js";
3
- import { useGlyphs } from "@effected/cli/ui";
3
+ import { useGlyphs } from "@effected/cli-kit/ui";
4
4
  import { Box, Text } from "ink";
5
5
  import { jsx, jsxs } from "react/jsx-runtime";
6
6
 
package/ink/ProjectRow.js CHANGED
@@ -1,9 +1,9 @@
1
- import { statusInkStyle } from "../theme.js";
2
1
  import { formatDisplayDuration } from "../format-duration.js";
2
+ import { statusInkStyle } from "../theme.js";
3
3
  import { CountColumns, DURATION_CELL_WIDTH } from "./CountColumns.js";
4
4
  import { StatusIcon } from "./StatusIcon.js";
5
5
  import { TagColumns } from "./TagColumns.js";
6
- import { Fmt } from "@effected/cli";
6
+ import { Fmt } from "@effected/cli-kit";
7
7
  import { Box, Text } from "ink";
8
8
  import { Fragment, jsx, jsxs } from "react/jsx-runtime";
9
9
 
package/ink/StatusIcon.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { statusGlyph, statusInkStyle } from "../theme.js";
2
- import { useGlyphs } from "@effected/cli/ui";
2
+ import { useGlyphs } from "@effected/cli-kit/ui";
3
3
  import { Text } from "ink";
4
4
  import { jsx } from "react/jsx-runtime";
5
5
 
package/ink/StreamApp.js CHANGED
@@ -1,17 +1,17 @@
1
1
  import { classifyRunShape } from "../dispatcher/classify.js";
2
- import { VitestAgentTokens, inkStyle, statusGlyph, statusInkStyle } from "../theme.js";
3
2
  import { formatDisplayDuration } from "../format-duration.js";
4
3
  import { spinnerFrame } from "../spinner.js";
4
+ import { VitestAgentTokens, inkStyle, statusGlyph, statusInkStyle } from "../theme.js";
5
5
  import { CountColumns, DURATION_CELL_WIDTH } from "./CountColumns.js";
6
6
  import { useFileLink } from "./FileLink.js";
7
+ import { ProjectRow } from "./ProjectRow.js";
7
8
  import { StatusIcon } from "./StatusIcon.js";
8
9
  import { TagColumns, tagUnion } from "./TagColumns.js";
9
- import { ProjectRow } from "./ProjectRow.js";
10
10
  import { TestRow } from "./TestRow.js";
11
11
  import { TrendLine } from "./TrendLine.js";
12
12
  import { formatConsoleLeaksNote, formatStrayOutputNote } from "@vitest-agent/sdk";
13
- import { Fmt } from "@effected/cli";
14
- import { useGlyphs } from "@effected/cli/ui";
13
+ import { Fmt } from "@effected/cli-kit";
14
+ import { useGlyphs } from "@effected/cli-kit/ui";
15
15
  import { Box, Text } from "ink";
16
16
  import { Fragment, jsx, jsxs } from "react/jsx-runtime";
17
17
 
@@ -1,5 +1,5 @@
1
1
  import { inkStyle } from "../theme.js";
2
- import { Token } from "@effected/cli";
2
+ import { Token } from "@effected/cli-kit";
3
3
  import { Box, Text } from "ink";
4
4
  import { jsx, jsxs } from "react/jsx-runtime";
5
5
 
package/ink/TagColumns.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { VitestAgentTokens, inkStyle } from "../theme.js";
2
- import { Fmt } from "@effected/cli";
2
+ import { Fmt } from "@effected/cli-kit";
3
3
  import { Text } from "ink";
4
4
  import { jsx, jsxs } from "react/jsx-runtime";
5
5
 
package/ink/TrendLine.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { VitestAgentTokens, inkStyle } from "../theme.js";
2
- import { Fmt } from "@effected/cli";
2
+ import { Fmt } from "@effected/cli-kit";
3
3
  import { Text } from "ink";
4
4
  import { jsx, jsxs } from "react/jsx-runtime";
5
5
 
package/ink.d.ts CHANGED
@@ -460,7 +460,7 @@ interface DispatchInputs {
460
460
  /**
461
461
  * Where a file link points: a path, with an optional line and column.
462
462
  *
463
- * The file half of `@effected/cli`'s `LinkTarget`, spelled structurally so
463
+ * The file half of `@effected/cli-kit`'s `LinkTarget`, spelled structurally so
464
464
  * this platform-free contract names no kit type. A relative path resolves
465
465
  * against the working directory the kit's `CliLinks` layer was built with.
466
466
  * @public
@@ -484,7 +484,7 @@ interface CellOptions {
484
484
  * Writes a file path as a link for the audience and terminal the output
485
485
  * is for: the label wrapped in an OSC 8 hyperlink when the reader can
486
486
  * follow it, the label unchanged otherwise. The kit decides both halves
487
- * (`@effected/cli`'s `CliLinks.linker`, `Render.context("stdout").link`):
487
+ * (`@effected/cli-kit`'s `CliLinks.linker`, `Render.context("stdout").link`):
488
488
  * `vscode://file/<path>:<line>:<col>` under VS Code, `file://` otherwise,
489
489
  * never for an agent audience, and nothing on a terminal that cannot
490
490
  * render hyperlinks (a pipe, tmux, GNU screen, `NO_COLOR`).
package/ink.js CHANGED
@@ -1,16 +1,16 @@
1
1
  import { CountColumns, DURATION_CELL_WIDTH } from "./ink/CountColumns.js";
2
- import { FileLinkProvider, useFileLink } from "./ink/FileLink.js";
3
2
  import { CoverageBlock } from "./ink/CoverageBlock.js";
4
3
  import { dispatchInk, inkDispatcherTable } from "./ink/dispatch-ink.js";
5
4
  import { FailureSection } from "./ink/FailureSection.js";
6
5
  import { FailuresSection } from "./ink/FailuresSection.js";
7
- import { StatusIcon } from "./ink/StatusIcon.js";
6
+ import { FileLinkProvider, useFileLink } from "./ink/FileLink.js";
8
7
  import { ModuleHeader } from "./ink/ModuleHeader.js";
9
- import { TagColumns, tagUnion } from "./ink/TagColumns.js";
10
8
  import { ProjectRow } from "./ink/ProjectRow.js";
11
- import { TestRow } from "./ink/TestRow.js";
12
- import { TrendLine } from "./ink/TrendLine.js";
9
+ import { StatusIcon } from "./ink/StatusIcon.js";
13
10
  import { StreamApp } from "./ink/StreamApp.js";
14
11
  import { SuggestedActions } from "./ink/SuggestedActions.js";
12
+ import { TagColumns, tagUnion } from "./ink/TagColumns.js";
13
+ import { TestRow } from "./ink/TestRow.js";
14
+ import { TrendLine } from "./ink/TrendLine.js";
15
15
 
16
16
  export { CountColumns, CoverageBlock, DURATION_CELL_WIDTH, FailureSection, FailuresSection, FileLinkProvider, ModuleHeader, ProjectRow, StatusIcon, StreamApp, SuggestedActions, TagColumns, TestRow, TrendLine, dispatchInk, inkDispatcherTable, tagUnion, useFileLink };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vitest-agent/ui",
3
- "version": "5.2.1",
3
+ "version": "5.2.3",
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": [
@@ -44,15 +44,15 @@
44
44
  "./package.json": "./package.json"
45
45
  },
46
46
  "dependencies": {
47
- "@vitest-agent/sdk": "9.0.1",
48
- "effect": "^4.0.7"
47
+ "@vitest-agent/sdk": "9.0.3",
48
+ "effect": "~4.1.2"
49
49
  },
50
50
  "peerDependencies": {
51
- "@effected/cli": "^0.24.0",
52
- "@effected/config-file": "^0.22.0",
53
- "@effected/env": "^0.7.0",
54
- "@effected/glob": "^0.16.0",
55
- "@effected/walker": "^0.22.0",
51
+ "@effected/cli-kit": "^0.26.0",
52
+ "@effected/config-file": "^0.24.0",
53
+ "@effected/env": "^0.10.0",
54
+ "@effected/glob": "^0.18.0",
55
+ "@effected/walker": "^0.25.0",
56
56
  "ink": "^8.0.0",
57
57
  "react": "^19.3.0"
58
58
  },
package/render-agent.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import { formatTotalsLine } from "./counts.js";
2
2
  import { formatFailure as formatFailure$1, formatGlobShortfallLines, formatSuggestedActionLines } from "./dispatcher/helpers.js";
3
3
  import { formatConsoleLeaksNote, formatStrayOutputNote } from "@vitest-agent/sdk";
4
- import { Fmt } from "@effected/cli";
4
+ import { Fmt } from "@effected/cli-kit";
5
5
 
6
6
  // src/render-agent.ts
7
7
  /**
package/spinner.js CHANGED
@@ -1,4 +1,4 @@
1
- import { Glyphs } from "@effected/cli";
1
+ import { Glyphs } from "@effected/cli-kit";
2
2
 
3
3
  // src/spinner.ts
4
4
  /**
package/theme.js CHANGED
@@ -1,5 +1,5 @@
1
- import { Glyphs, Status, Token } from "@effected/cli";
2
- import { inkProps } from "@effected/cli/ui";
1
+ import { Glyphs, Status, Token } from "@effected/cli-kit";
2
+ import { inkProps } from "@effected/cli-kit/ui";
3
3
 
4
4
  // src/theme.ts
5
5
  /**
@@ -5,7 +5,7 @@
5
5
  "toolPackages": [
6
6
  {
7
7
  "packageName": "@microsoft/api-extractor",
8
- "packageVersion": "7.60.0"
8
+ "packageVersion": "7.60.1"
9
9
  }
10
10
  ]
11
11
  }