vigiles API reference
    Preparing search index...

    Interface HarnessTestSpec

    interface HarnessTestSpec {
        allowedTools?: readonly string[];
        files?: Record<string, string>;
        model: readonly ModelTurn[];
        plugin?: string;
        pluginDir?: string;
        prompt?: string;
        sandbox?: SandboxMode;
        settings?: unknown;
        timeoutMs?: number;
        transcript?: boolean;
    }
    Index

    Properties

    allowedTools?: readonly string[]

    Tools the agent may use. Default: Read Edit Write Bash.

    files?: Record<string, string>

    Fixture files to write in a fresh temp working dir (path → contents).

    model: readonly ModelTurn[]

    The scripted model turns the agent will take.

    plugin?: string

    Path to a real plugin/repo whose harness (hooks + CLAUDE.md + skills) is loaded into the sandbox, so you test the assembled machine, not a retyped subset. Inline settings/files layer on top. See src/plugin-loader.ts.

    pluginDir?: string

    Path to a plugin dir to install NATIVELY via claude --plugin-dir, so its skills / commands / agents / hooks register and ACTIVATE the real way — a scripted Skill tool_use resolves, and the real model can trigger them. Unlike plugin (which materializes a file subset that does NOT register skills for the Skill tool), this is the real install path, so point it at a COMPLETE plugin (internal references resolve). Inline settings/files and plugin still layer on top. Resolved to an absolute path.

    prompt?: string

    The user prompt. Default: "go".

    sandbox?: SandboxMode

    Confinement policy for the code this run executes (src/sandbox.ts). Default "auto" is safe-by-default: an inline-only spec (you authored it) runs directly, but an external plugin / pluginDir brings in untrusted third-party hooks and is run under bubblewrap — or, if no sandbox is available, the run REFUSES rather than executing unconfined. Pass false to opt out and run unconfined (you audited the code, or trust the outer container); "strict" to force confinement even for trusted code.

    NOTE: confined execution is Linux only (bubblewrap is a Linux tool). On macOS / Windows no sandbox is available, so an untrusted run will REFUSE under "auto"/"strict" — use sandbox: false there if you trust the code.

    settings?: unknown

    .claude/settings.json contents — the hooks/permissions under test.

    timeoutMs?: number

    Per-run wall-clock timeout in ms. Default 60000.

    transcript?: boolean

    Capture the full event transcript (--output-format stream-json) into stdout, instead of just the final result object, so you can assert on what the agent's tools returned — e.g. the body a Skill tool_use resolved. With this on, stdout is newline-delimited JSON events, not a single object.