/** * Error Helper Functions * Provides structured error responses with helpful suggestions */ import type { CDPManager } from './cdp-manager.js'; import type { PuppeteerManager } from './puppeteer-manager.js'; import type { ChromeLauncher } from './chrome-launcher.js'; /** * Set the ChromeLauncher reference for process liveness checks * Called once during initialization from index.ts */ export declare function setChromeLauncher(launcher: ChromeLauncher): void; /** * Check if browser automation is available and return error if not * Returns an MCP error response or null if browser automation is available */ export declare function checkBrowserAutomation(cdpManager: CDPManager, puppeteerManager: PuppeteerManager, toolName: string, debugPort?: number, requirePageLoad?: boolean): { content: Array<{ type: 'text'; text: string; }>; isError?: boolean; } | null; /** * Error category for automatic error handling */ export interface ErrorCategory { category: 'connection' | 'execution' | 'validation' | 'unknown'; suggestion: string; } /** * Enhance error messages with helpful context and suggestions */ export declare function enhanceErrorMessage(error: any, context: string): string; /** * Categorize errors to help determine appropriate recovery actions */ export declare function categorizeError(error: any): ErrorCategory; /** * Create a detailed error response object for MCP tools */ export declare function createDetailedErrorResponse(error: any, context: string): object; //# sourceMappingURL=error-helpers.d.ts.map