@vitest-agent/mcp 4.3.1 → 5.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/README.md +5 -4
- package/idempotency.js +1 -1
- package/index.d.ts +2235 -2128
- package/index.js +2 -2
- package/main.d.ts +15 -16
- package/main.js +58 -96
- package/package.json +5 -3
- package/server.js +16 -28
- package/toolkit.js +12 -8
- package/tools/_tdd-error-envelope.js +5 -14
- package/tools/cache-health.js +2 -1
- package/tools/configure.js +2 -1
- package/tools/coverage.js +2 -1
- package/tools/failure-signature-get.js +2 -1
- package/tools/file-coverage.js +3 -2
- package/tools/hypothesis.js +33 -23
- package/tools/inventory.js +6 -5
- package/tools/note.js +6 -5
- package/tools/overview.js +2 -1
- package/tools/ping.js +15 -5
- package/tools/register-agent.js +2 -1
- package/tools/run-tests.js +18 -8
- package/tools/status.js +2 -1
- package/tools/tdd-behavior.js +8 -10
- package/tools/tdd-goal.js +8 -10
- package/tools/tdd-phase-transition-request.js +21 -14
- package/tools/tdd-task.js +25 -13
- package/tools/test.js +6 -5
- package/tools/trends.js +2 -1
- package/version.js +1 -1
- package/register-toolkit.js +0 -328
- package/utils/crash-guards.js +0 -13
- package/utils/tool-error-envelope.js +0 -61
package/README.md
CHANGED
|
@@ -10,12 +10,13 @@ The `vitest-agent-mcp` MCP server bin, built on Effect's native `McpServer` (`ef
|
|
|
10
10
|
|
|
11
11
|
## Features
|
|
12
12
|
|
|
13
|
-
- **30 action-keyed tools** — one
|
|
13
|
+
- **30 action-keyed tools** — one tool per file, assembled into a single `Toolkit`; per-CRUD families collapse into single tools dispatching on an `action` discriminator; covers `test_status`, `test_overview`, `test_coverage`, `test_errors`, `run_tests`, `note`, `hypothesis`, `tdd_task`, `tdd_goal`, `tdd_behavior`, `tdd_progress_push` and more
|
|
14
14
|
- **Six framing prompts** — `triage`, `why-flaky`, `regression-since-pass`, `explain-failure`, `tdd-resume`, `wrapup`
|
|
15
15
|
- **Idempotent writes** — `tdd_task`, `tdd_goal`, `tdd_behavior` and `hypothesis` create-actions are idempotent on derived keys via the `withIdempotency` combinator; a replay carries `_idempotentReplay: true`
|
|
16
|
-
- **Strict tool inputs** — every served `inputSchema` is strict at every object level; an unknown key is rejected with an error naming
|
|
17
|
-
- **
|
|
18
|
-
- **
|
|
16
|
+
- **Strict tool inputs** — every served `inputSchema` is strict at every object level; an unknown key is rejected with an error naming every unrecognized key and the accepted params, instead of being stripped and running a wider query than the caller asked for
|
|
17
|
+
- **Typed results** — every tool serves an object-rooted `outputSchema`, and every successful result carries the typed object in `structuredContent`
|
|
18
|
+
- **Session-surviving error handling** — a handler that dies returns a generic `isError` result (the detail is logged on stderr, never on stdout, the JSON-RPC wire), and a stray unhandled rejection after the transport connects is logged rather than killing the server mid-session
|
|
19
|
+
- **Programmatic API** — `ServerLayer({ version })` is the whole server as an Effect `Layer` over any `Stdio` implementation (the test harness runs it over in-memory queues); `Kit`, `toolHandlers`, `PromptsLayer` and `McpSession` are exported for embedding or extension. Built on [`@effected/mcp`](https://github.com/spencerbeggs/effected)'s `McpStdio` and `McpToolkit`
|
|
19
20
|
- **No MCP SDK, tRPC or zod** — the wire protocol, JSON Schema generation and input validation all come from `effect`; tool inputs and outputs are Effect `Schema` values end to end
|
|
20
21
|
|
|
21
22
|
## Install
|
package/idempotency.js
CHANGED
|
@@ -93,7 +93,7 @@ const withReplayMarker = (parsed) => parsed !== null && typeof parsed === "objec
|
|
|
93
93
|
* `DataStore.recordIdempotentResponse` best-effort: a persistence
|
|
94
94
|
* failure (or a cache-lookup failure) never surfaces to the caller, it
|
|
95
95
|
* is swallowed so a transient DB failure doesn't turn into a tool
|
|
96
|
-
* error.
|
|
96
|
+
* error. A failed `handler` persists nothing, so a retry re-runs it.
|
|
97
97
|
*
|
|
98
98
|
* The combinator reads no ambient state — `path` and `params` are its
|
|
99
99
|
* only inputs beyond the `DataReader` / `DataStore` services it adds to
|