@vitest-agent/mcp 2.4.8 → 2.4.10
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.js +1 -1
- package/package.json +2 -2
- package/tools/history.js +1 -1
- package/tools/overview.js +1 -1
- package/tools/run-tests.js +3 -5
package/index.js
CHANGED
|
@@ -12,7 +12,7 @@ import { parseSessionEnvExports, recoverSessionContextFromSessionEnv } from "./s
|
|
|
12
12
|
*
|
|
13
13
|
* @public
|
|
14
14
|
*/
|
|
15
|
-
const CURRENT_MCP_VERSION = "2.4.
|
|
15
|
+
const CURRENT_MCP_VERSION = "2.4.10";
|
|
16
16
|
|
|
17
17
|
//#endregion
|
|
18
18
|
export { CURRENT_MCP_VERSION, McpLive, appRouter, buildMcpServer, createCallerFactory, createCurrentSessionIdRef, createSessionContextRef, parseSessionEnvExports, recoverSessionContextFromSessionEnv, startMcpServer };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vitest-agent/mcp",
|
|
3
|
-
"version": "2.4.
|
|
3
|
+
"version": "2.4.10",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "Model Context Protocol server for vitest-agent. Exposes 53 tools for agent access to test data, TDD lifecycle, and session management.",
|
|
6
6
|
"keywords": [
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
"@effect/sql-sqlite-node": "4.0.0-rc.109",
|
|
43
43
|
"@modelcontextprotocol/sdk": "^1.30.0",
|
|
44
44
|
"@trpc/server": "^11.18.0",
|
|
45
|
-
"@vitest-agent/sdk": "2.4.
|
|
45
|
+
"@vitest-agent/sdk": "2.4.12",
|
|
46
46
|
"effect": "4.0.0-rc.109",
|
|
47
47
|
"zod": "^4.4.3"
|
|
48
48
|
},
|
package/tools/history.js
CHANGED
|
@@ -110,7 +110,7 @@ const testHistory = publicProcedure.input(Schema.toStandardSchemaV1(Schema.Struc
|
|
|
110
110
|
reader.getHistory(input.project, historyOptions),
|
|
111
111
|
reader.getFlaky(input.project, scopeOptions),
|
|
112
112
|
reader.getPersistentFailures(input.project, scopeOptions)
|
|
113
|
-
]);
|
|
113
|
+
], { concurrency: "unbounded" });
|
|
114
114
|
const recovered = history.tests.filter((t) => {
|
|
115
115
|
const runs = t.runs;
|
|
116
116
|
if (runs.length < 2) return false;
|
package/tools/overview.js
CHANGED
|
@@ -72,7 +72,7 @@ const TestOverviewAsMarkdown = TestOverviewResult.pipe(Schema.decodeTo(Schema.St
|
|
|
72
72
|
}));
|
|
73
73
|
const testOverview = publicProcedure.input(Schema.toStandardSchemaV1(Schema.Struct({ project: Schema.optional(Schema.String) }))).query(async ({ ctx, input }) => ctx.runtime.runPromise(Effect.gen(function* () {
|
|
74
74
|
const reader = yield* DataReader;
|
|
75
|
-
const [manifestOpt, runs] = yield* Effect.all([reader.getManifest(), reader.getRunsByProject()]);
|
|
75
|
+
const [manifestOpt, runs] = yield* Effect.all([reader.getManifest(), reader.getRunsByProject()], { concurrency: "unbounded" });
|
|
76
76
|
if (Option.isNone(manifestOpt) || runs.length === 0) return {
|
|
77
77
|
dataAvailable: false,
|
|
78
78
|
reason: "no_runs",
|
package/tools/run-tests.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { publicProcedure } from "../context.js";
|
|
2
2
|
import { createRequire } from "node:module";
|
|
3
3
|
import { AgentReport, DataReader, DataStore, buildAgentReport, buildConsoleLeaks, coerceErrorField, collectConsoleLeakEntries } from "@vitest-agent/sdk";
|
|
4
|
-
import { Effect, Schema, SchemaGetter } from "effect";
|
|
4
|
+
import { Effect, Schema, SchemaGetter, Semaphore } from "effect";
|
|
5
5
|
import { AsyncLocalStorage } from "node:async_hooks";
|
|
6
6
|
import { execFile } from "node:child_process";
|
|
7
7
|
import { existsSync, mkdtempSync, rmSync } from "node:fs";
|
|
@@ -326,11 +326,9 @@ function resolveVitestNodeEntry(root) {
|
|
|
326
326
|
* @internal exported for tests
|
|
327
327
|
*/
|
|
328
328
|
const vitestLoader = { load: (entry) => import(entry) };
|
|
329
|
-
|
|
329
|
+
const runTestsSemaphore = Effect.runSync(Semaphore.make(1));
|
|
330
330
|
function serializeRunTests(fn) {
|
|
331
|
-
|
|
332
|
-
_runTestsChain = next.catch(() => void 0);
|
|
333
|
-
return next;
|
|
331
|
+
return Effect.runPromise(Semaphore.withPermit(runTestsSemaphore, Effect.promise(() => fn())));
|
|
334
332
|
}
|
|
335
333
|
/**
|
|
336
334
|
* Coerce unknown Vitest unhandled errors into VitestModuleError shape.
|