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
62 lines • 2.23 kB
TypeScript
/**
* Enhanced Error Context Handler
*
* P2 Priority: Improve error messages with actionable context
* - Transform generic error messages into actionable guidance
* - Provide specific troubleshooting steps for common issues
* - Include recovery suggestions and next steps
* - Context-aware error categorization
*/
export interface ErrorContext {
category: 'session' | 'network' | 'browser' | 'framework' | 'configuration' | 'user_input' | 'system' | 'permission';
severity: 'low' | 'medium' | 'high' | 'critical';
recoverable: boolean;
actionableSteps: string[];
relatedTools?: string[];
documentationLinks?: string[];
estimatedFixTime?: string;
}
export interface EnhancedError {
originalError: string;
enhancedMessage: string;
context: ErrorContext;
troubleshooting: {
quickFixes: string[];
diagnosticSteps: string[];
preventionTips: string[];
};
userGuidance: {
whatHappened: string;
whyItHappened: string;
howToFix: string;
nextSteps: string[];
};
}
export declare class EnhancedErrorContext {
/**
* Transform a generic error into an enhanced error with actionable context
*/
static enhanceError(error: string | Error, toolName?: string, sessionId?: string): EnhancedError;
/**
* Create a user-friendly error response with actionable context
*/
static createActionableErrorResponse(error: string | Error, toolName: string, sessionId?: string): any;
private static categorizeError;
private static buildErrorContext;
private static generateTroubleshooting;
private static generateUserGuidance;
private static createEnhancedMessage;
/**
* Enhanced error response for common tool patterns
*/
static createToolErrorResponse(toolName: string, error: string | Error, sessionId?: string): any;
/**
* Enhanced session error response
*/
static createSessionErrorResponse(sessionId: string, error?: string): any;
/**
* Enhanced framework error response
*/
static createFrameworkErrorResponse(framework: string, error: string | Error, toolName: string): any;
}
//# sourceMappingURL=enhanced-error-context.d.ts.map