/**
 * ErrorStage - Error categorization and ExecResult construction.
 *
 * This is not a normal pipeline stage but a utility used by the pipeline
 * runner to convert thrown errors into structured BashExecResult objects.
 * It categorizes errors by type and assigns appropriate exit codes.
 */
import type { InterpreterState } from "../../interpreter/types.js";
import type { BashExecResult } from "../../types.js";
/**
 * Convert a caught error into a structured BashExecResult.
 * Returns undefined if the error is not recognized (should be re-thrown).
 */
export declare function categorizeError(error: unknown, state: InterpreterState, optionsEnv: Record<string, string> | undefined): BashExecResult | undefined;
