/** * Agentic QE v3 - Defect Intelligence MCP Tool * * qe/defects/predict - Predict defect probability using ML models * * This tool wraps the REAL defect-intelligence domain service. * Uses actual code analysis, git history, and weighted feature prediction. */ import { MCPToolBase, MCPToolConfig, MCPToolContext } from '../base'; import { ToolResult } from '../../types'; export interface DefectPredictParams { files?: string[]; target?: string; lookback?: number; minConfidence?: number; threshold?: number; features?: PredictionFeature[]; [key: string]: unknown; } export interface PredictionFeature { name: string; weight?: number; } export interface DefectPredictResult { predictions: FilePrediction[]; modelConfidence: number; topRiskFactors: RiskFactor[]; recommendations: string[]; modelMetrics: { accuracy: number; precision: number; recall: number; f1Score: number; }; } export interface FilePrediction { file: string; probability: number; riskLevel: 'critical' | 'high' | 'medium' | 'low'; factors: ContributingFactor[]; recommendations: string[]; } export interface ContributingFactor { name: string; contribution: number; description: string; } export interface RiskFactor { name: string; impact: number; affectedFiles: number; } export declare class DefectPredictTool extends MCPToolBase { readonly config: MCPToolConfig; private predictorService; /** * Get or create the defect predictor service */ private getService; execute(params: DefectPredictParams, context: MCPToolContext): Promise>; /** * Return demo defect prediction data when no real data available. * Only used when demoMode is explicitly requested or as fallback with warning. */ private getDemoResult; } //# sourceMappingURL=predict.d.ts.map