/**
 * LspErrorHandler - Fail-fast error handling with grep fallback
 *
 * @see spec.md US-007: Error Handling
 * @satisfies AC-US7-01, AC-US7-02
 */
/**
 * Grep fallback interface for testing
 */
export interface GrepFallback {
    search(pattern: string, path: string): Promise<GrepResult[]>;
}
/**
 * Result of a grep search
 */
export interface GrepResult {
    file: string;
    line: number;
    match: string;
}
/**
 * Error type classification
 */
export type ErrorType = 'timeout' | 'crash' | 'connection' | 'unknown';
/**
 * Result of error handling
 */
export interface ErrorHandlerResult {
    /** Whether retry was attempted (always false - fail fast) */
    retried: boolean;
    /** User-friendly error message */
    errorMessage: string;
    /** Classified error type */
    errorType: ErrorType;
    /** Suggestion for fixing the issue */
    suggestion?: string;
    /** Whether grep fallback was used */
    usedFallback: boolean;
    /** Results from grep fallback (if used) */
    fallbackResults?: GrepResult[];
}
/**
 * Options for error handling
 */
export interface HandleOptions {
    /** Enable grep fallback on crash */
    enableFallback?: boolean;
    /** Pattern to search for in fallback */
    searchPattern?: string;
    /** Path to search in fallback */
    searchPath?: string;
}
/**
 * Fail-fast error handler for LSP operations
 */
export declare class LspErrorHandler {
    private readonly grepFallback?;
    constructor(grepFallback?: GrepFallback);
    /**
     * Handle an LSP error with fail-fast behavior
     *
     * @param error - The error that occurred
     * @param options - Handling options
     * @returns Promise resolving to handler result
     */
    handle(error: Error, options?: HandleOptions): Promise<ErrorHandlerResult>;
    private classifyError;
    private formatError;
    private getSuggestion;
}
//# sourceMappingURL=error-handler.d.ts.map