Test matchers

Experimental Vitest/Jest TraceContract matchers.

Experimental test matchers

@agent-inspect/vitest and @agent-inspect/jest export experimental matchers toPassTraceContract and toHaveRequiredTool. Reporters remain the primary failure-artifact path.

ts
import { expect } from "vitest";
import { agentInspectVitestMatchers } from "@agent-inspect/vitest";

expect.extend(agentInspectVitestMatchers);
expect(read).toPassTraceContract(contract);
expect(read).toHaveRequiredTool("lookup_orders");

Trace contracts on GitHub

Full reference remains in GitHub docs during the docs migration.