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
112 lines • 3.25 kB
TypeScript
/**
* AI-Debug Diagnostics & Recovery System
*
* Addresses critical browser session initialization failures and provides
* comprehensive diagnostic capabilities to restore AI-Debug functionality.
*
* Fixes:
* - Browser session initialization failures
* - Framework misdetection (Phoenix LiveView vs Flutter)
* - Circuit breaker states and recovery
* - Connection timeout and retry logic
* - Infrastructure connectivity issues
*/
export interface DiagnosticResult {
category: 'browser' | 'framework' | 'network' | 'infrastructure';
issue: string;
severity: 'critical' | 'high' | 'medium' | 'low';
detected: boolean;
fix?: {
description: string;
automated: boolean;
action: () => Promise<boolean>;
};
details: any;
}
export interface AIDebugHealthCheck {
browserSession: {
canInitialize: boolean;
playwrightAvailable: boolean;
chromeAvailable: boolean;
portConflicts: number[];
};
frameworkDetection: {
phoenixLiveViewDetected: boolean;
incorrectFlutterDetection: boolean;
detectionAccuracy: number;
};
networkConnectivity: {
localhostReachable: boolean;
portsListening: Map<number, boolean>;
responseTime: number;
};
infrastructure: {
nodeVersion: string;
memoryAvailable: number;
diskSpace: number;
processLimits: boolean;
};
overallHealth: 'healthy' | 'degraded' | 'critical';
}
export declare class AIDebugDiagnostics {
private logger;
private diagnosticHistory;
private healthCheckCache;
constructor();
/**
* Comprehensive AI-Debug health check and diagnostics
*/
runComprehensiveDiagnostics(targetUrl?: string): Promise<{
healthCheck: AIDebugHealthCheck;
diagnostics: DiagnosticResult[];
recommendations: string[];
autoFixesApplied: number;
}>;
/**
* Diagnose browser session initialization issues
*/
private diagnoseBrowserSession;
/**
* Diagnose framework detection issues (especially Phoenix LiveView vs Flutter)
*/
private diagnoseFrameworkDetection;
/**
* Diagnose network connectivity issues
*/
private diagnoseNetworkConnectivity;
/**
* Diagnose infrastructure requirements
*/
private diagnoseInfrastructure;
/**
* Generate health check summary from diagnostics
*/
private generateHealthCheckSummary;
/**
* Generate actionable recommendations
*/
private generateRecommendations;
private isPortListening;
private detectPortConflicts;
private checkForPhoenixFiles;
private checkForFlutterFiles;
/**
* Emergency recovery mode - attempt to restore AI-Debug functionality
*/
emergencyRecovery(): Promise<{
success: boolean;
actionsPerformed: string[];
remainingIssues: string[];
}>;
/**
* Get diagnostic summary report
*/
getDiagnosticReport(): {
totalDiagnostics: number;
criticalIssues: number;
highIssues: number;
autoFixesAvailable: number;
lastDiagnosticTime: number;
};
}
//# sourceMappingURL=ai-debug-diagnostics.d.ts.map