/**
 * Centralized error handler for CCS CLI
 *
 * Provides unified error handling with:
 * - Consistent error formatting
 * - Exit code management
 * - Cleanup callback execution
 * - Debug mode support
 */
import { ExitCode } from './exit-codes';
/**
 * Central error handler
 * Formats error, runs cleanup, and exits with appropriate code
 *
 * @param error - The error to handle
 * @returns never - Always exits the process
 */
export declare function handleError(error: unknown): never;
/**
 * Exit with an error message and code
 * Convenience function for simple error exits
 *
 * @param message - Error message to display
 * @param code - Exit code (defaults to GENERAL_ERROR)
 * @returns never - Always exits the process
 */
export declare function exitWithError(message: string, code?: ExitCode): never;
/**
 * Exit with success
 * Runs cleanup and exits with SUCCESS code
 *
 * @param message - Optional success message to display
 * @returns never - Always exits the process
 */
export declare function exitWithSuccess(message?: string): never;
/**
 * Create a wrapped error handler for async operations
 * Wraps an async function to catch and handle errors
 */
export declare function withErrorHandling<T extends unknown[]>(fn: (...args: T) => Promise<void>): (...args: T) => Promise<void>;
/**
 * Assert a condition, throwing a CCSError if false
 */
export declare function assertOrExit(condition: boolean, message: string, code?: ExitCode): asserts condition;
//# sourceMappingURL=error-handler.d.ts.map