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
68 lines • 2.01 kB
TypeScript
/**
* Enhanced Error Handler
* Addresses Flutter feedback: "Generic error messages don't help diagnose root causes"
* Provides specific, actionable error messages with root cause analysis
*/
export interface DetailedError {
errorType: string;
rootCause: string;
specificMessage: string;
actionableSteps: string[];
diagnosticCommands: string[];
relatedDocumentation: string[];
severity: 'critical' | 'high' | 'medium' | 'low';
category: 'session' | 'tool' | 'framework' | 'configuration' | 'network';
recoverable: boolean;
estimatedFixTime: number;
}
export interface ErrorPattern {
pattern: RegExp;
errorType: string;
category: string;
analyzer: (error: Error, context?: any) => DetailedError;
}
export declare class EnhancedErrorHandler {
private errorPatterns;
constructor();
/**
* Analyze error and provide detailed, actionable information
* Replaces generic "try starting new session" messages
*/
analyzeError(error: Error, context?: {
tool?: string;
sessionId?: string;
framework?: string;
sessionState?: any;
}): DetailedError;
/**
* Format error for user display with clear sections
*/
formatError(detailedError: DetailedError, context?: {
sessionId?: string;
}): string;
/**
* Initialize comprehensive error patterns based on user feedback
*/
private initializeErrorPatterns;
/**
* Create analysis for unknown errors
*/
private createGenericErrorAnalysis;
/**
* Add custom error pattern for specific use cases
*/
addErrorPattern(pattern: ErrorPattern): void;
/**
* Get error statistics for monitoring
*/
getErrorStats(): {
totalPatterns: number;
categoryCounts: {
[category: string]: number;
};
severityCounts: {
[severity: string]: number;
};
};
}
//# sourceMappingURL=enhanced-error-handler.d.ts.map