@agent-nexus/driftbench-vitest
v0.1.0
Published
Run a driftbench spec inside a vitest suite: describeSpec(path, target) registers one test per block, with the evidence of each failing verdict.
Readme
@agent-nexus/driftbench-vitest
Run a driftbench spec inside a vitest suite: describeSpec(path, target) registers one test per block, with the evidence of each failing verdict.
Part of driftbench, block-level evaluation for AI agents: every exchange is a unit test with a Given, a When and a Then.
Install
npm install --save-dev @agent-nexus/driftbench-vitest @agent-nexus/driftbench-adapters vitestNode.js 22 or newer, vitest 3 or newer. ESM only, with TypeScript types.
Use
import { functionAdapter } from '@agent-nexus/driftbench-adapters';
import { describeSpec } from '@agent-nexus/driftbench-vitest';
import { respond } from './my-agent';
describeSpec('specs/plan-upgrade.yaml', functionAdapter({ respond }));The spec runs once, free-running, with the scripted driver and the default machine checks, when its first test runs. Each test then passes or fails on its own block, and a failing block lists each gating verdict that did not pass, with its evidence. Options: checks, driver, repeat, timeoutMs.
Documentation
vitest, and the docs index.
License
Apache-2.0
