Skip to main content
Mock dependencies are declarative TypeScript objects. Schemas infer handler types and validate requests and responses at runtime. Anpord compiles the fixtures, MCP servers, and CLIs into every task and isolated trial in the suite.

Share fixtures

Keep fixture data and schemas separate from each interface:
fixtures/users.ts

MCP

mcp/users.ts
MCP supports tools and fixed-URI resources. Its schemas must implement Standard Schema and expose JSON Schema; the examples use Zod 4.

CLI

cli/users.ts
cli.path is the executable. command.path is a non-empty argv segment tuple. Each input key needs an options entry. Its flag defaults to the key in kebab case. Set name, including the leading --, to override it. String options accept --id value or --id=value. Boolean options are true when present and should be optional or have a schema default. The runtime generates help and version output, validates output, prints JSON to stdout, and returns a nonzero exit code on failure. Positional arguments are not supported.

Attach and validate

users.eval.ts
Validators should check both the recorded call and the task outcome. Journal inputs and outputs are unknown, so parse them with the shared schema before asserting values. Definitions apply to every task in the suite. Split tasks into separate eval files when they need different interfaces. Anpord installs CLI mocks into every harness profile. It configures MCP mocks for every built-in agent, not the custom command harness. Mock handlers need no credentials for the service they simulate. Fixture data is bundled into the sandbox and must contain no secrets. Running the hosted eval still requires ANPORD_API_KEY and a model connection.