/** * StackError — a typed error taxonomy so scripts and AI agents can branch on * WHY a command failed via a stable code + exit code, instead of scraping prose. * * Exit codes (read by wrapping scripts / CI / agents): * 1 FAILED generic failure * 2 NEEDS_INPUT a value is required but none was supplied (and we're non-interactive) * 3 UNREACHABLE a target (staging/prod server, AWS, network) could not be reached * 4 VALIDATION config / input / scan findings block the operation * * CLI-layer only. Never thrown from inside a scanfix `scan`/`fix` (per STANDARDS). */ export type StackErrorCode = 'FAILED' | 'NEEDS_INPUT' | 'UNREACHABLE' | 'VALIDATION'; export declare class StackError extends Error { readonly code: StackErrorCode; readonly exitCode: number; /** One-line actionable next step (e.g. which env var / flag to supply). */ readonly hint?: string; /** Optional machine-readable context for --json consumers. */ readonly details?: Record; constructor(code: StackErrorCode, message: string, opts?: { hint?: string; details?: Record; }); /** A required value was not supplied and we cannot prompt for it. */ static needsInput(message: string, hint?: string): StackError; static unreachable(message: string, hint?: string): StackError; static validation(message: string, hint?: string): StackError; toJSON(): Record; } export declare function isStackError(e: unknown): e is StackError; //# sourceMappingURL=stack-error.d.ts.map