/** A single index recommendation */ export interface IndexRecommendation { /** CREATE INDEX DDL statement */ ddl: string; /** Columns covered */ columns: string[]; /** Table the index applies to */ table: string; /** Short reason why this index helps */ reason: string; } /** Query rewrite suggestion */ export interface QueryRewrite { /** Improved SQL text */ sql: string; /** Explanation of what changed */ explanation: string; } /** Full AI analysis result */ export interface OptimizationResult { /** Short label for the root issue */ issue: string; /** Human-readable improvement suggestion */ suggestion: string; /** Optimized query / code snippet */ code: string; /** Narrative estimate of improvement */ expectedImprovement: string; /** Estimated percentage reduction in duration (0-100) */ estimatedGainPct: number; /** Specific index recommendations */ indexRecommendations: IndexRecommendation[]; /** Optional alternative query rewrites */ queryRewrites?: QueryRewrite[]; /** Severity the AI assessed (independent of threshold) */ severity: 'critical' | 'high' | 'medium' | 'low'; /** Name of the model that generated this result */ model: string; /** ISO timestamp of when the AI responded */ analyzedAt: string; /** Whether the result came from cache */ fromCache?: boolean; } /** Cached entry */ export interface CachedOptimization { result: OptimizationResult; cachedAt: number; } //# sourceMappingURL=ai.d.ts.map