/**
 * Error handling utilities for the agent system
 *
 * Provides standardized error logging and suppression patterns
 * to improve debugging and production troubleshooting.
 */
import type { Logger } from '@polka-codes/core';
/**
 * Options for logAndSuppress
 */
export interface LogAndSuppressOptions {
    /** If true, completely silent (no logging) */
    silent?: boolean;
    /** Log level to use (default: debug) */
    level?: 'warn' | 'debug' | 'error';
    /** Additional context to include in log message */
    context?: Record<string, unknown>;
}
export declare function logAndSuppress(logger: Logger, error: unknown, contextMessage: string, options?: LogAndSuppressOptions): void;
/**
 * Standard error types for better error categorization
 *
 * Using createErrorClass factory for consistent error handling
 * and proper stack trace preservation.
 */
/**
 * Error thrown when a file system operation fails
 *
 * @param path - File or directory path
 * @param operation - Operation being performed (read, write, delete, etc.)
 * @param cause - Optional underlying error
 */
export declare const FileSystemAccessError: new (...args: [string, string, (Error | undefined)?] | [string, string]) => import("@polka-codes/core").BaseError;
/**
 * Error thrown when a command execution fails
 *
 * @param command - Command that was executed
 * @param exitCode - Exit code from the command
 * @param _stderr - Standard error output (not shown in message)
 * @param cause - Optional underlying error
 */
export declare const CommandExecutionError: new (...args: [string, number] | [string, number, (string | undefined)?, (Error | undefined)?]) => import("@polka-codes/core").BaseError;
/**
 * Error thrown when JSON parsing fails
 *
 * @param filePath - Path to file being parsed
 * @param _rawContent - Raw content that failed to parse (not shown in message)
 * @param cause - Optional underlying error
 */
export declare const JSONParseError: new (...args: [string] | [string, (string | undefined)?, (Error | undefined)?]) => import("@polka-codes/core").BaseError;
/**
 * Safely parse JSON with error handling
 *
 * Unlike JSON.parse, this provides a structured error with file context.
 *
 * @param content - JSON string to parse
 * @param filePath - File path for error messages
 * @returns Parsed object
 * @throws {JSONParseError} If JSON parsing fails
 */
export declare function safeJSONParse<T = unknown>(content: string, filePath: string): T;
//# sourceMappingURL=error-handling.d.ts.map