/**
 * Typed Codex CLI timeout. Callers (Gateway, Gatekeeper) can distinguish a
 * real timeout from a generic provider failure and present a clearer message.
 * The `depth` attribute marks whether the fast or deep budget fired.
 */
/**
 * Optional knobs callers can pass to think()/thinkFast().
 * onReasoning fires when Brain decides which model to try, when one fails,
 * and when fallback rotation kicks in. The TUI uses this to stream live
 * thinking lines into the Matrix-rain region.
 *
 * Additive — undefined opts preserves the historical call shape. The
 * callback is wrapped in try/catch so a buggy listener can never corrupt
 * the model chain itself.
 */
export interface ThinkOptions {
    onReasoning?: (chunk: string) => void;
}
export declare class CodexTimeoutError extends Error {
    readonly depth: 'fast' | 'deep';
    readonly timeoutMs: number;
    readonly model: string;
    constructor(depth: 'fast' | 'deep', timeoutMs: number, model: string);
}
export declare class Brain {
    private static codexQueue;
    private openai;
    private anthropic;
    private geminiApi;
    private modelManager;
    constructor();
    /**
     * Story 8.1 — public probe for v1.4 creators.
     *
     * Returns true iff at least one API-key-backed provider is configured
     * (OpenAI, Anthropic, Gemini, OpenRouter, or Ollama URL). Used by
     * SquadCreator.design() / SkillCreator.design() to decide between
     * LLM-driven proposal and heuristic fallback without forcing the
     * caller to know about the provider table.
     */
    isAnyProviderAvailable(): boolean;
    think(systemPrompt: string, userMessage: string, opts?: ThinkOptions): Promise<string>;
    /** Fast conversational path. Keeps the configured model chain order intact. */
    thinkFast(systemPrompt: string, userMessage: string, opts?: ThinkOptions): Promise<string>;
    private runModelChain;
    formatProviderError(provider: string, model: string, error: unknown, opts?: {
        keyEnvVar?: string;
        expectedKeyPrefix?: string;
    }): Error;
    private thinkWithOpenAIAPI;
    private thinkWithOpenAICLI;
    private thinkWithAnthropic;
    private thinkWithGeminiAPI;
    private thinkWithOpenRouter;
    private thinkWithOllama;
    private thinkWithGeminiCLI;
}
