/** * Creates a command failure whose human message can stay concise while its * redacted command and output remain available to logs and classifiers. * * @param {{command: string, output?: string, diagnostics?: string, exitCode?: number, signal?: string, cause?: unknown, concise?: boolean}} opts * @returns {Error & {command: string, output: string, diagnostics?: string, exitCode?: number, signal?: string}} */ export function commandError({ command, output, diagnostics, exitCode, signal, cause, concise }: { command: string; output?: string; diagnostics?: string; exitCode?: number; signal?: string; cause?: unknown; concise?: boolean; }): Error & { command: string; output: string; diagnostics?: string; exitCode?: number; signal?: string; }; /** * Wraps an error with domain context without losing command diagnostics, * process status, the failed step, or the causal chain. * * @param {string} message * @param {unknown} cause * @returns {Error & {command?: string, output?: string, diagnostics?: string, exitCode?: number, signal?: string, step?: string}} */ export function wrapError(message: string, cause: unknown): Error & { command?: string; output?: string; diagnostics?: string; exitCode?: number; signal?: string; step?: string; }; /** * Finds structured command/process metadata through wrapper causes. * * @param {unknown} error * @returns {{command?: string, output?: string, diagnostics?: string, exitCode?: number, signal?: string, step?: string}} */ export function errorMetadata(error: unknown): { command?: string; output?: string; diagnostics?: string; exitCode?: number; signal?: string; step?: string; }; /** * Returns all redacted failure text available to internal classifiers. * * @param {unknown} error * @returns {string} */ export function errorDiagnostics(error: unknown): string; //# sourceMappingURL=command-error.d.ts.map