@vitest-agent/mcp 5.1.9 → 5.2.1
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 +30 -0
- package/package.json +8 -8
- package/tools/run-tests.js +6 -4
- package/version.js +1 -1
package/index.d.ts
CHANGED
|
@@ -1423,6 +1423,16 @@ export declare const RunTestsResult: Schema.Union<readonly [Schema.Struct<{
|
|
|
1423
1423
|
readonly files: Schema.Number;
|
|
1424
1424
|
}>>;
|
|
1425
1425
|
}>>;
|
|
1426
|
+
readonly strayOutput: Schema.optional<Schema.Struct<{
|
|
1427
|
+
readonly total: Schema.Number;
|
|
1428
|
+
readonly stdout: Schema.Number;
|
|
1429
|
+
readonly stderr: Schema.Number;
|
|
1430
|
+
readonly bytes: Schema.Number;
|
|
1431
|
+
readonly samples: Schema.$Array<Schema.Struct<{
|
|
1432
|
+
readonly stream: Schema.Literals<readonly ["stdout", "stderr"]>;
|
|
1433
|
+
readonly text: Schema.String;
|
|
1434
|
+
}>>;
|
|
1435
|
+
}>>;
|
|
1426
1436
|
}>;
|
|
1427
1437
|
readonly classifications: Schema.$Record<Schema.String, Schema.String>;
|
|
1428
1438
|
readonly discoveryLastScannedAt: Schema.optional<Schema.NullOr<Schema.String>>;
|
|
@@ -2170,6 +2180,16 @@ export declare const Kit: Toolkit.Toolkit<{
|
|
|
2170
2180
|
readonly files: import("effect/Schema").Number;
|
|
2171
2181
|
}>>;
|
|
2172
2182
|
}>>;
|
|
2183
|
+
readonly strayOutput: import("effect/Schema").optional<import("effect/Schema").Struct<{
|
|
2184
|
+
readonly total: import("effect/Schema").Number;
|
|
2185
|
+
readonly stdout: import("effect/Schema").Number;
|
|
2186
|
+
readonly stderr: import("effect/Schema").Number;
|
|
2187
|
+
readonly bytes: import("effect/Schema").Number;
|
|
2188
|
+
readonly samples: import("effect/Schema").$Array<import("effect/Schema").Struct<{
|
|
2189
|
+
readonly stream: import("effect/Schema").Literals<readonly ["stdout", "stderr"]>;
|
|
2190
|
+
readonly text: import("effect/Schema").String;
|
|
2191
|
+
}>>;
|
|
2192
|
+
}>>;
|
|
2173
2193
|
}>;
|
|
2174
2194
|
readonly classifications: import("effect/Schema").$Record<import("effect/Schema").String, import("effect/Schema").String>;
|
|
2175
2195
|
readonly discoveryLastScannedAt: import("effect/Schema").optional<import("effect/Schema").NullOr<import("effect/Schema").String>>;
|
|
@@ -4659,6 +4679,16 @@ export declare const ToolsLayer: import("effect/Layer").Layer<import("effect/ai/
|
|
|
4659
4679
|
readonly files: import("effect/Schema").Number;
|
|
4660
4680
|
}>>;
|
|
4661
4681
|
}>>;
|
|
4682
|
+
readonly strayOutput: import("effect/Schema").optional<import("effect/Schema").Struct<{
|
|
4683
|
+
readonly total: import("effect/Schema").Number;
|
|
4684
|
+
readonly stdout: import("effect/Schema").Number;
|
|
4685
|
+
readonly stderr: import("effect/Schema").Number;
|
|
4686
|
+
readonly bytes: import("effect/Schema").Number;
|
|
4687
|
+
readonly samples: import("effect/Schema").$Array<import("effect/Schema").Struct<{
|
|
4688
|
+
readonly stream: import("effect/Schema").Literals<readonly ["stdout", "stderr"]>;
|
|
4689
|
+
readonly text: import("effect/Schema").String;
|
|
4690
|
+
}>>;
|
|
4691
|
+
}>>;
|
|
4662
4692
|
}>;
|
|
4663
4693
|
readonly classifications: import("effect/Schema").$Record<import("effect/Schema").String, import("effect/Schema").String>;
|
|
4664
4694
|
readonly discoveryLastScannedAt: import("effect/Schema").optional<import("effect/Schema").NullOr<import("effect/Schema").String>>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vitest-agent/mcp",
|
|
3
|
-
"version": "5.1
|
|
3
|
+
"version": "5.2.1",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "Model Context Protocol server for vitest-agent. Exposes 30 tools for agent access to test data, TDD lifecycle, and session management.",
|
|
6
6
|
"keywords": [
|
|
@@ -43,15 +43,15 @@
|
|
|
43
43
|
"vitest-agent-mcp": "bin/vitest-agent-mcp.js"
|
|
44
44
|
},
|
|
45
45
|
"dependencies": {
|
|
46
|
-
"@effect/platform-node": "^4.0.
|
|
47
|
-
"@effect/sql-sqlite-node": "^4.0.
|
|
48
|
-
"@effected/engine": "^0.
|
|
46
|
+
"@effect/platform-node": "^4.0.2",
|
|
47
|
+
"@effect/sql-sqlite-node": "^4.0.2",
|
|
48
|
+
"@effected/engine": "^0.4.0",
|
|
49
49
|
"@effected/git": "^0.20.0",
|
|
50
|
-
"@effected/mcp": "^0.
|
|
50
|
+
"@effected/mcp": "^0.5.0",
|
|
51
51
|
"@effected/walker": "^0.15.0",
|
|
52
|
-
"@vitest-agent/engine": "0.
|
|
53
|
-
"@vitest-agent/sdk": "
|
|
54
|
-
"effect": "^4.0.
|
|
52
|
+
"@vitest-agent/engine": "1.0.1",
|
|
53
|
+
"@vitest-agent/sdk": "7.0.0",
|
|
54
|
+
"effect": "^4.0.2"
|
|
55
55
|
},
|
|
56
56
|
"peerDependencies": {
|
|
57
57
|
"vitest": "^5.0.0"
|
package/tools/run-tests.js
CHANGED
|
@@ -4,7 +4,7 @@ import { ToolOutputSchema } from "@effected/mcp";
|
|
|
4
4
|
import { Data, Effect, Layer, Option, Path, Result, Schema, Semaphore } from "effect";
|
|
5
5
|
import { DataReader, DataStore } from "@vitest-agent/engine";
|
|
6
6
|
import { Tool } from "effect/ai";
|
|
7
|
-
import { AgentReport, buildAgentReport, buildConsoleLeaks, coerceErrorField, collectConsoleLeakEntries, formatScopedCoverageNote } from "@vitest-agent/sdk";
|
|
7
|
+
import { AgentReport, buildAgentReport, buildConsoleLeaks, coerceErrorField, collectConsoleLeakEntries, formatScopedCoverageNote, readStrayOutput } from "@vitest-agent/sdk";
|
|
8
8
|
import { AsyncLocalStorage } from "node:async_hooks";
|
|
9
9
|
import { existsSync, mkdtempSync, rmSync } from "node:fs";
|
|
10
10
|
import { stat } from "node:fs/promises";
|
|
@@ -603,10 +603,12 @@ const runTestsBody = async (input, ctx) => {
|
|
|
603
603
|
const preliminaryReason = unhandledErrors.length > 0 || result.testModules.some((m) => m.state() === "failed") ? "failed" : "passed";
|
|
604
604
|
const baseReport = buildAgentReport(testModules, unhandledErrors, preliminaryReason, { omitPassingTests: true });
|
|
605
605
|
const leaks = buildConsoleLeaks(collectConsoleLeakEntries(localVitest.state.getFiles()));
|
|
606
|
-
const
|
|
606
|
+
const strayOutput = readStrayOutput(localVitest.logger);
|
|
607
|
+
const report = {
|
|
607
608
|
...baseReport,
|
|
608
|
-
consoleLeaks: leaks
|
|
609
|
-
|
|
609
|
+
...leaks !== void 0 && { consoleLeaks: leaks },
|
|
610
|
+
...strayOutput !== void 0 && { strayOutput }
|
|
611
|
+
};
|
|
610
612
|
let classifications;
|
|
611
613
|
try {
|
|
612
614
|
classifications = await ctx.runPromise(Effect.gen(function* () {
|