/**
 * Claude Code Runner — ADR-006 Implementation
 *
 * Enterprise-grade subprocess invocation of the Claude Code CLI binary.
 * Single synchronous invocation per decision-grade command.
 * Contract-validated output against agentics-contracts response schemas.
 *
 * INVARIANTS:
 * - Exactly one subprocess invocation per call to invoke()
 * - Output is ALWAYS validated against the contract schema before return
 * - SYNTHESIS_FORBIDDEN commands NEVER reach this module
 * - Binary resolution is cached for the lifetime of the singleton
 * - All errors are structured CLIError instances with correlation IDs
 * - No user input reaches the subprocess without sanitization
 *
 * FORBIDDEN:
 * - Async/streaming invocation (one call, one result)
 * - Bypassing contract validation
 * - Invoking for SYNTHESIS_FORBIDDEN commands
 * - Swallowing stderr diagnostics
 */
import { CLIError } from '../errors/index.js';
import type { ClaudeCodeRunnerOptions, ClaudeCodeRunnerResult, IClaudeCodeRunner } from '../contracts/adr-006-claude-code-synthesis-runner.js';
/**
 * Structured error for synthesis-specific failures.
 * Carries the run-id, model, duration, and raw output preview
 * for comprehensive diagnostics without leaking full prompt content.
 */
export declare class SynthesisError extends CLIError {
    readonly synthesisRunId: string;
    readonly synthesisModel: string;
    readonly synthesisDurationMs: number;
    constructor(options: {
        code: string;
        message: string;
        runId: string;
        model: string;
        durationMs: number;
        category: 'CONFIG_ERROR' | 'DOWNSTREAM_ERROR' | 'NETWORK_ERROR' | 'INTERNAL_ERROR';
        exitCode: 1 | 69 | 70 | 78 | 120 | 140 | 150;
        recoverable: boolean;
        details?: Record<string, unknown>;
        correlationId?: string;
        cause?: Error;
    });
}
export declare class ClaudeCodeRunner implements IClaudeCodeRunner {
    /** Cached binary path after first successful resolution */
    private resolvedBinary;
    /**
     * Resolve the Claude Code binary path.
     *
     * Resolution order:
     * 1. AGENTICS_CLAUDE_BIN env var (explicit override)
     * 2. `claude` on PATH
     * 3. `claude-code` on PATH
     *
     * Caches the result for the lifetime of this instance.
     *
     * @throws CLIError (ECLI-SYNTH-001) if no usable binary is found.
     */
    resolve(): string;
    /**
     * Invoke Claude Code with a prompt and return contract-validated output.
     *
     * Flow:
     * 1. Resolve binary (cached)
     * 2. Resolve model and timeout from options → env → defaults
     * 3. Sanitize prompt
     * 4. Spawn subprocess: `<binary> --print --output-format json --model <model> <prompt>`
     * 5. Capture stdout + stderr
     * 6. Strip code fences from stdout
     * 7. Parse as JSON (throw ECLI-SYNTH-003 on failure)
     * 8. Validate against contract response schema (throw ECLI-SYNTH-004 on failure)
     * 9. Return validated result
     *
     * @throws SynthesisError on any failure (see ADR-006 error code table)
     */
    invoke<T>(prompt: string, options: ClaudeCodeRunnerOptions): ClaudeCodeRunnerResult<T>;
}
/**
 * Get or create the singleton ClaudeCodeRunner.
 *
 * Uses a singleton so binary resolution (which spawns `which`/`where`)
 * only happens once per process lifetime.
 */
export declare function createClaudeCodeRunner(): IClaudeCodeRunner;
/**
 * Reset the singleton (for testing only).
 * Clears cached binary resolution so the next call re-resolves.
 */
export declare function resetClaudeCodeRunnerForTesting(): void;
//# sourceMappingURL=claude-code-runner.d.ts.map