vigiles API reference
    Preparing search index...

    Interface HarnessRuntime

    HarnessRuntime — the runtime/transport PORT (hexagonal transport axis). The facts the test tiers need to actually drive a harness: the agent binary to spawn, and the env a no-key mock model is reached through (the base-URL var, the API-key var, and a dummy key the mock ignores). These were hard-coded "claude" / ANTHROPIC_* literals in harness-test.ts and eval.ts; behind this interface a second harness (Codex) supplies its own HarnessRuntime (a different binary + its model's env) and the runners spawn it the same way.

    The Claude Code implementation is claudeCodeRuntime in src/adapters/claude-code/runtime.ts.

    interface HarnessRuntime {
        agentBinary: string;
        mockApiKey: string;
        modelApiKeyEnv: string;
        modelBaseUrlEnv: string;
        name: string;
        wireMock(
            baseUrl: string,
        ): { args: readonly string[]; env: Record<string, string> };
    }
    Index

    Properties

    agentBinary: string

    The CLI binary that runs the agent, e.g. "claude".

    mockApiKey: string

    A dummy key value the mock ignores — avoids needing real auth.

    modelApiKeyEnv: string

    Env var carrying the (dummy) API key, e.g. "ANTHROPIC_API_KEY".

    modelBaseUrlEnv: string

    Env var pointing the client at the mock model, e.g. "ANTHROPIC_BASE_URL".

    name: string

    Stable identifier, e.g. "claude-code".

    Methods

    • How to point the spawned binary at a mock model served at baseUrl — the args to add to the binary's argv and the env to spawn it with. For Claude Code this is env-only (ANTHROPIC_BASE_URL + a dummy key, no args); for Codex it is the keyless -c model_providers.mock.* flag recipe plus a dummy-key env. Behind one method so the runner wires either harness the same way, without knowing which transport axis (env var vs config flags) a given harness uses.

      Parameters

      • baseUrl: string

      Returns { args: readonly string[]; env: Record<string, string> }