import { type AiConfig } from './config/schema.js'; export interface AiResolved { readonly enabled: boolean; readonly provider: 'anthropic' | 'openai'; readonly model: string; readonly apiKeyEnv: string; readonly baseUrl: string | undefined; readonly headers: Readonly>; readonly requireApiKey: boolean; readonly logLines: number; readonly maxDiffBytes: number; } export declare class AiError extends Error { constructor(message: string); } export type AnthropicAuthKind = 'api-key' | 'oauth'; export interface AnthropicAuth { readonly token: string; readonly kind: AnthropicAuthKind; readonly sourceEnv: string; } export declare const ANTHROPIC_OAUTH_ENVS: ReadonlyArray; export declare function classifyAnthropicToken(token: string): AnthropicAuthKind; export declare function lookupAnthropicAuth(env: NodeJS.ProcessEnv, apiKeyEnv: string): AnthropicAuth | undefined; export declare const ANTHROPIC_OAUTH_BETA = "oauth-2025-04-20"; export declare function resolveAiConfig(user: AiConfig | undefined): AiResolved; export declare function autoDetectProvider(env?: NodeJS.ProcessEnv): AiResolved | undefined; export declare function buildPrompt(opts: { readonly diff: string; readonly log: string; readonly maxDiffBytes: number; readonly file?: string; }): string; export declare function generateCommitMessage(opts: { readonly resolved: AiResolved; readonly env?: NodeJS.ProcessEnv; readonly cwd?: string; readonly diff?: string; readonly file?: string; }): Promise; export declare function extractFirstLine(text: string): string; //# sourceMappingURL=ai.d.ts.map