@vitest-agent/mcp 1.3.2 → 1.3.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/index.js +1 -1
- package/package.json +2 -2
- package/tools/trends.js +2 -1
- package/utils/effect-to-zod.js +4 -2
package/index.js
CHANGED
|
@@ -11,7 +11,7 @@ import { startMcpServer } from "./server.js";
|
|
|
11
11
|
*
|
|
12
12
|
* @public
|
|
13
13
|
*/
|
|
14
|
-
const CURRENT_MCP_VERSION = "1.3.
|
|
14
|
+
const CURRENT_MCP_VERSION = "1.3.3";
|
|
15
15
|
|
|
16
16
|
//#endregion
|
|
17
17
|
export { CURRENT_MCP_VERSION, McpLive, appRouter, createCallerFactory, createCurrentSessionIdRef, createSessionContextRef, startMcpServer };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vitest-agent/mcp",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.3",
|
|
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": [
|
|
@@ -45,7 +45,7 @@
|
|
|
45
45
|
"@effect/sql-sqlite-node": "^0.52.0",
|
|
46
46
|
"@modelcontextprotocol/sdk": "^1.29.0",
|
|
47
47
|
"@trpc/server": "^11.18.0",
|
|
48
|
-
"@vitest-agent/sdk": "1.3.
|
|
48
|
+
"@vitest-agent/sdk": "1.3.1",
|
|
49
49
|
"effect": "^3.21.4",
|
|
50
50
|
"zod": "^4.4.3"
|
|
51
51
|
},
|
package/tools/trends.js
CHANGED
|
@@ -42,7 +42,8 @@ function toSparkline(values) {
|
|
|
42
42
|
const min = Math.min(...values);
|
|
43
43
|
const range = Math.max(...values) - min;
|
|
44
44
|
return values.map((v) => {
|
|
45
|
-
|
|
45
|
+
const index = range === 0 ? 4 : Math.round((v - min) / range * (SPARKLINE_CHARS.length - 1));
|
|
46
|
+
return SPARKLINE_CHARS[index] ?? "▄";
|
|
46
47
|
}).join("");
|
|
47
48
|
}
|
|
48
49
|
const directionIcon = (d) => d === "improving" ? "📈" : d === "regressing" ? "📉" : "➡️";
|
package/utils/effect-to-zod.js
CHANGED
|
@@ -42,7 +42,8 @@ import { z } from "zod";
|
|
|
42
42
|
* if the rich listing matters.
|
|
43
43
|
*/
|
|
44
44
|
const effectToZodSchema = (schema) => {
|
|
45
|
-
const
|
|
45
|
+
const jsonSchema = JSONSchema.make(schema);
|
|
46
|
+
const inlined = inlineAllRefs(jsonSchema);
|
|
46
47
|
const zodSchema = z.fromJSONSchema(inlined);
|
|
47
48
|
if (isObjectLike(zodSchema)) return zodSchema;
|
|
48
49
|
return z.object({}).catchall(z.unknown());
|
|
@@ -64,7 +65,8 @@ const inlineAllRefs = (root) => {
|
|
|
64
65
|
if (value === null || typeof value !== "object") return value;
|
|
65
66
|
const obj = value;
|
|
66
67
|
if (typeof obj.$ref === "string" && obj.$ref.startsWith(REF_PREFIX)) {
|
|
67
|
-
const
|
|
68
|
+
const defName = obj.$ref.slice(8);
|
|
69
|
+
const target = defs[defName];
|
|
68
70
|
if (target !== void 0) return visit(target);
|
|
69
71
|
}
|
|
70
72
|
const out = {};
|