/** * AN-17: every infra failure used to surface as " command failed: ...", which made * the 33% infrastructure error rate (okd_status 9/16) undiagnosable — tool, credentials, * network and cluster failures were indistinguishable in `is_error` and in the 100-char * onToolCall error strings. These helpers classify at the only point where the signal * still exists (errno, signal, status code, stderr text) and prefix every error as * `[:]`, so future failures aggregate into a cause histogram instead of * one opaque bucket. Pure functions + thin wrappers: fully unit-testable, no I/O here. */ export type InfraErrorCause = 'tool-missing' | 'timeout' | 'unreachable' | 'auth' | 'config' | 'remote'; export interface ClassifiedInfraError { cause: InfraErrorCause; /** Short human-readable cause label for the message prefix. */ label: string; /** What to do about it — the part that turns a failure into an actionable error. */ nextStep: string; } /** * Classify a child_process exec failure (execSync/execFileSync error shape). * Precedence matters: a missing binary also matches nothing else, but a timeout that * mentions a host must read as timeout, not unreachable — check in this order. */ export declare function classifyExecError(bin: string, err: any): ClassifiedInfraError; /** * Classify an axios-style HTTP failure (err.response?.status / err.code / message). */ export declare function classifyHttpError(bin: string, err: any): ClassifiedInfraError; /** * Build the error every infra provider throws: `[:] . Next: `. * The bracket prefix is deliberately first — onToolCall truncates errors to 100 chars, * so the cause must survive truncation for the cause histogram to work. */ export declare function infraError(bin: string, err: any, opts?: { http?: boolean; }): Error; //# sourceMappingURL=errorCause.d.ts.map