import type { RuntimeEnv } from "../runtime.js"; /** * Options for presenting errors in CLI */ export interface ErrorPresenterOptions { /** Whether to show recovery suggestions */ showRecovery?: boolean; /** Whether to include technical details */ verbose?: boolean; /** Whether to exit after presenting error */ exit?: boolean; /** Exit code (default: 1) */ exitCode?: number; } /** * Present an error to the user in a CLI-friendly way */ export declare function presentError(error: unknown, options?: ErrorPresenterOptions, runtime?: RuntimeEnv): void; /** * Create a CLI-friendly error handler function */ export declare function createErrorHandler(runtime?: RuntimeEnv, defaultOptions?: ErrorPresenterOptions): (error: unknown, options?: ErrorPresenterOptions) => void; /** * Exit with error message (convenience function) */ export declare function exitWithError(error: unknown, options?: Omit, runtime?: RuntimeEnv): never; /** * Wrap an async function with error handling */ export declare function withErrorHandling Promise>(fn: T, options?: ErrorPresenterOptions, runtime?: RuntimeEnv): (...args: Parameters) => Promise>; /** * Wrap a CLI command with error handling */ export declare function wrapCommand(command: (runtime: RuntimeEnv, ...args: any[]) => Promise, options?: ErrorPresenterOptions): (runtime: RuntimeEnv, ...args: any[]) => Promise; /** * Format error for CLI output (backward compatibility) */ export declare function formatErrorMessage(error: unknown): string;