/**
 * Comprehensive Error Classification System
 *
 * Provides structured error handling with:
 * - Error categorization (dangerous, blocked, invalid, etc.)
 * - Severity levels (critical, error, warning, info)
 * - Auto-fixing suggestions
 * - Recovery strategies
 */
export declare enum ErrorSeverity {
    CRITICAL = "critical",// System-level failure, cannot continue
    ERROR = "error",// Operation failed, but system stable
    WARNING = "warning",// Risky but allowed
    INFO = "info"
}
export declare enum ErrorCategory {
    DANGEROUS = "dangerous",// Operation could harm system
    BLOCKED = "blocked",// Explicitly forbidden by policy
    INVALID = "invalid",// Malformed input/arguments
    PERMISSION = "permission",// Authorization issue
    RESOURCE = "resource",// Resource limit exceeded
    NETWORK = "network",// Network/connectivity issue
    TIMEOUT = "timeout",// Operation timed out
    VALIDATION = "validation",// Schema/type validation failed
    CONTEXT_OVERFLOW = "context_overflow",// Token/context limit exceeded
    NOT_FOUND = "not_found",// Resource doesn't exist
    UNKNOWN = "unknown"
}
export type ErrorSuggestion = {
    readonly action: string;
    readonly example?: string;
    readonly autoFixable: true;
    readonly autoFix: () => unknown;
} | {
    readonly action: string;
    readonly example?: string;
    readonly autoFixable: false;
};
export type StructuredErrorDetails = {
    readonly severity: ErrorSeverity;
    readonly category: ErrorCategory;
    readonly message: string;
    readonly originalInput?: string;
    readonly suggestions: readonly ErrorSuggestion[];
    readonly metadata?: Readonly<Record<string, unknown>>;
    readonly timestamp: string;
    readonly recoverable: boolean;
};
/**
 * Base class for all structured errors
 */
export declare abstract class StructuredError extends Error {
    readonly severity: ErrorSeverity;
    readonly category: ErrorCategory;
    readonly suggestions: ErrorSuggestion[];
    readonly originalInput?: string;
    readonly metadata?: Record<string, unknown>;
    readonly timestamp: string;
    readonly recoverable: boolean;
    constructor(details: StructuredErrorDetails);
    /**
   * Format error for display with suggestions
   */
    toDisplayString(): string;
    /**
   * Convert to JSON for logging/telemetry
   */
    toJSON(): Record<string, unknown>;
    /**
   * Try to auto-fix the error if possible
   */
    tryAutoFix(): {
        fixed: boolean;
        result?: any;
    };
}
/**
 * Dangerous operation error - operation could harm the system
 */
export declare class DangerousOperationError extends StructuredError {
    constructor(operation: string, reason: string, safeAlternative?: string);
}
/**
 * Blocked operation error - explicitly forbidden by policy
 */
export declare class BlockedOperationError extends StructuredError {
    constructor(operation: string, policy: string, allowedAlternatives?: string[]);
}
/**
 * Context overflow error - token/character limits exceeded
 */
export declare class ContextOverflowError extends StructuredError {
    constructor(actual: number, limit: number, unit?: 'tokens' | 'chars' | 'lines', truncatable?: boolean);
}
/**
 * Resource error - limits exceeded
 */
export declare class ResourceLimitError extends StructuredError {
    constructor(resource: string, actual: number, limit: number, reducible?: boolean);
}
/**
 * Validation error - input/schema validation failed
 */
export declare class ValidationError extends StructuredError {
    constructor(field: string, code: string, message: string);
}
/**
 * Format any error as a structured error
 */
export declare function toStructuredError(error: unknown): StructuredError;
//# sourceMappingURL=errorTypes.d.ts.map