/** * AI provider routing — unified source of truth. * * Resolution order (first match wins): * 1. CLI flag (--provider) — passed via SLAMINAR_AI_PROVIDER env (runtime) * 2. Environment variables (CLOUDFLARE_*, ANTHROPIC_API_KEY) — CI/ad-hoc override * 3. User auth config (~/.config/slaminar/auth.json) — set by `slaminar login` * 4. Local fallback (no AI) */ import type { ProjectProfile } from '../types/index.js'; export type AiMode = 'ai' | 'local'; export type AiProvider = 'anthropic' | 'cloudflare' | 'local'; export interface AiProviderStatus { available: boolean; mode: AiMode; provider: AiProvider; reason: string; model?: string; source?: 'env' | 'config' | 'cli'; } export declare function detectAiProvider(): AiProviderStatus; /** * Enhance a CLAUDE.md draft using the resolved AI provider. * Returns the draft unchanged if no AI is available or on any error. */ export declare function enhanceWithAI(localDraft: string, profile: ProjectProfile, context?: string): Promise;