| name | configuration |
| description | Guide @vitest-agent/plugin configuration including thresholds, targets, output format, and plugin options. Use when setting up or modifying the plugin configuration. |
| disable-model-invocation | true |
Vitest Agent Plugin Configuration
Plugin Options (vitest.config.ts)
The plugin is configured via AgentPlugin in your Vitest config:
import { AgentPlugin } from "@vitest-agent/plugin";
import { defineConfig } from "vitest/config";
export default defineConfig({
plugins: [
AgentPlugin({
format: "markdown",
console: {
human: "passthrough",
agent: "agent",
ci: "passthrough",
},
reporterOptions: {
coverageThresholds: {
lines: 80,
branches: 80,
functions: 80,
statements: 80,
},
coverageTargets: {
lines: 95,
branches: 90,
},
autoUpdate: true,
coverageConsoleLimit: 10,
},
}),
],
});
Key Options
| Option | Default | Description |
|---|
format | "markdown" | Output format for console |
console | {} | Per-executor matrix (human/agent/ci) controlling visible output |
onRunEvent | none | Live event tap; gated to console.human: "ink" mode |
coverageThresholds | {} | Enforced minimums (fail build) |
coverageTargets | none | Aspirational goals (informational) |
autoUpdate | true | Auto-ratchet baselines |
Checking Current Configuration
Use the configure MCP tool to view current settings from the
database. Settings are captured on each test run.
Common Configurations
Strict CI mode
AgentPlugin({
format: "markdown",
console: { agent: "agent" },
reporterOptions: {
coverageThresholds: { lines: 90, branches: 85 },
},
})
Development mode (quiet)
AgentPlugin({
format: "vitest-bypass",
console: { human: "passthrough" },
})
Live Ink animation for humans
import { AgentPlugin } from "@vitest-agent/plugin";
import { createLiveInk, eventSourcedReporter } from "@vitest-agent/ui";
const live = createLiveInk();
AgentPlugin({
console: { human: "ink", agent: "agent" },
reporter: eventSourcedReporter,
onRunEvent: live.event,
})