import { ProviderHealthManager } from '../../health-manager.js';
import { ProviderRegistry } from '../../provider-registry.js';
import type { ProviderErrorEvent, ProviderFailureEvent, ProviderHealthConfig } from '../../types.js';
type DebugLike = {
    log?: (...args: unknown[]) => void;
} | Console | undefined;
export declare function resetRateLimitBackoffForProvider(providerKey: string): void;
export declare function applyAntigravityRiskPolicyImpl(event: ProviderErrorEvent, providerRegistry: ProviderRegistry, healthManager: ProviderHealthManager, markProviderCooldown: (providerKey: string, cooldownMs: number | undefined) => void, debug?: DebugLike): void;
export declare function handleProviderFailureImpl(event: ProviderFailureEvent, healthManager: ProviderHealthManager, healthConfig: Required<ProviderHealthConfig>, markProviderCooldown: (providerKey: string, cooldownMs: number | undefined) => void): void;
export declare function mapProviderErrorImpl(event: ProviderErrorEvent, healthConfig: Required<ProviderHealthConfig>): ProviderFailureEvent | null;
export declare function applySeriesCooldownImpl(event: ProviderErrorEvent, providerRegistry: ProviderRegistry, healthManager: ProviderHealthManager, markProviderCooldown: (providerKey: string, cooldownMs: number | undefined) => void, debug?: DebugLike): void;
/**
 * 处理来自 Host 侧的配额恢复事件：
 * - 清除指定 providerKey 在健康管理器中的熔断/冷却状态；
 * - 清理对应的速率退避计数；
 * - 调用调用方提供的 clearProviderCooldown 回调移除显式 cooldown TTL。
 *
 * 返回值表示是否已处理（true=已处理且后续应跳过常规错误映射逻辑）。
 */
export declare function applyQuotaRecoveryImpl(event: ProviderErrorEvent, healthManager: ProviderHealthManager, clearProviderCooldown: (providerKey: string) => void, debug?: DebugLike): boolean;
export declare function applyQuotaDepletedImpl(event: ProviderErrorEvent, healthManager: ProviderHealthManager, markProviderCooldown: (providerKey: string, cooldownMs: number | undefined) => void, debug?: DebugLike): boolean;
export declare function deriveReason(code: string, stage: string, statusCode?: number): string;
export {};
