/**
 * @fileoverview AI Error Classifier
 * @description Classifies Anthropic API errors into actionable categories
 * for structured error responses in edge functions.
 *
 * @version 0.1.0
 * @since 0.6.0
 * @author AMBROISE PARK Consulting
 */
/** Actionable error category for AI provider failures. */
export type AIErrorCode = 'rate_limited' | 'overloaded' | 'auth_error' | 'credits_exhausted' | 'network' | 'internal';
/** Result of classifying an AI provider error with retry and severity metadata. */
export interface ClassifiedAIError {
    code: AIErrorCode;
    retryable: boolean;
    retryAfterMs?: number;
    severity: 'transient' | 'critical';
}
/**
 * Classify an error from an Anthropic API call into an actionable category.
 *
 * | HTTP/Error       | Category           | Retryable | Severity   |
 * |------------------|--------------------|-----------|------------|
 * | 429              | rate_limited       | yes       | transient  |
 * | 529 / 503        | overloaded         | yes       | transient  |
 * | 401              | auth_error         | no        | critical   |
 * | 402 / credits    | credits_exhausted  | no        | critical   |
 * | Network/timeout  | network            | yes       | transient  |
 * | Other 5xx        | internal           | no        | critical   |
 */
export declare function classifyAIError(err: unknown): ClassifiedAIError;
/**
 * Map a classified error code to an HTTP status for the edge function response.
 */
export declare function mapClassifiedToHTTP(code: AIErrorCode): number;
