UNPKG

ai-debug-local-mcp

Version:

🎯 ENHANCED AI GUIDANCE v4.1.2: Dramatically improved tool descriptions help AI users choose the right tools instead of 'close enough' options. Ultra-fast keyboard automation (10x speed), universal recording, multi-ecosystem debugging support, and compreh

117 lines • 2.96 kB
/** * Refactoring Safety Net * Provides before/after comparison capabilities for safe refactoring * Supporting utility for Code Quality Integration */ export interface RefactoringBaseline { baselineId: string; refactoringName: string; timestamp: number; screenshots: Array<{ page: string; path: string; url: string; }>; applicationState?: any; performanceMetrics?: { loadTime: number; memoryUsage: number; networkRequests: number; }; } export interface RefactoringValidation { baseline: RefactoringBaseline | null; overallScore: number; visualComparison: Array<{ page: string; similarity: number; differences: number; critical: boolean; }>; performanceImpact?: { loadTimeChange: number; memoryChange: number; networkChange: number; }; issuesFound: Array<{ severity: 'critical' | 'warning' | 'info'; description: string; page?: string; }>; recommendations: string[]; } export declare class RefactoringSafetyNet { private baselines; /** * Capture baseline before refactoring */ captureBaseline(config: { sessionId: string; refactoringName: string; criticalPages: string[]; includeState: boolean; session: any; }): Promise<RefactoringBaseline>; /** * Validate after refactoring completion */ validateAfterRefactoring(config: { sessionId: string; baselineId: string; toleranceLevel: 'strict' | 'moderate' | 'loose'; session: any; }): Promise<RefactoringValidation>; /** * Capture screenshot of a specific page */ private capturePageScreenshot; /** * Capture application state */ private captureApplicationState; /** * Capture performance metrics */ private capturePerformanceMetrics; /** * Perform visual comparison between baseline and current state */ private performVisualComparison; /** * Compare images (simplified implementation) */ private compareImages; /** * Compare performance metrics */ private comparePerformanceMetrics; /** * Analyze state changes */ private analyzeStateChanges; /** * Calculate overall validation score */ private calculateOverallScore; /** * Generate recommendations based on validation results */ private generateRecommendations; /** * Get page name from URL */ private getPageNameFromUrl; /** * Get baseline by ID */ getBaseline(baselineId: string): RefactoringBaseline | undefined; /** * List all baselines */ listBaselines(): RefactoringBaseline[]; /** * Cleanup old baselines */ cleanup(olderThanMs?: number): void; } //# sourceMappingURL=refactoring-safety-net.d.ts.map