/**
 * CLEO error types with exit code integration, LAFS error shape,
 * and RFC 9457 Problem Details support.
 *
 * @epic T4654
 * @task T4655
 * @task T5240
 */
import { ExitCode } from '@cleocode/contracts';
import type { LAFSError } from '@cleocode/lafs';
/**
 * RFC 9457 Problem Details object.
 * Structured error representation for API responses.
 *
 * @task T5240
 */
export interface ProblemDetails {
    type: string;
    title: string;
    status: number;
    detail: string;
    instance?: string;
    extensions?: Record<string, unknown>;
}
/**
 * Structured field-level details for constraint-violation errors.
 * Surfaces in the LAFS envelope so agents can recover programmatically.
 *
 * @task T341
 */
export interface CleoErrorDetails {
    /** The specific field that failed validation. */
    field: string;
    /** The expected value or constraint (e.g. max length, valid enum members). */
    expected?: unknown;
    /** The actual value that was provided. */
    actual?: unknown;
    /** Additional context keys. */
    [key: string]: unknown;
}
/**
 * Structured error class for CLEO operations.
 * Carries an exit code, human-readable message, and optional fix suggestions.
 * Produces LAFS-conformant error shapes via toLAFSError() and RFC 9457
 * Problem Details via toProblemDetails().
 */
export declare class CleoError extends Error {
    readonly code: ExitCode;
    readonly fix?: string;
    readonly alternatives?: Array<{
        action: string;
        command: string;
    }>;
    /** Field-level details for constraint-violation errors. @task T341 */
    readonly details?: CleoErrorDetails;
    constructor(code: ExitCode, message: string, options?: {
        fix?: string;
        alternatives?: Array<{
            action: string;
            command: string;
        }>;
        details?: CleoErrorDetails;
        cause?: unknown;
    });
    /**
     * Produce a LAFS-conformant error object.
     *
     * @task T4655
     */
    toLAFSError(): LAFSError;
    /**
     * Produce an RFC 9457 Problem Details object.
     *
     * @task T5240
     */
    toProblemDetails(): ProblemDetails;
    /** Structured JSON representation for LAFS output (backward compatible). */
    toJSON(): Record<string, unknown>;
    /**
     * Derive HTTP status from exit code range.
     * Used as fallback when catalog lookup misses.
     */
    private getHttpStatus;
}
//# sourceMappingURL=errors.d.ts.map