import type { ProviderErrorEvent, ProviderSuccessEvent, ProviderQuotaView } from '../router/virtual-router/types.js';
import type { QuotaState, QuotaStore, StaticQuotaConfig } from './types.js';
export declare class QuotaManager {
    private readonly staticConfigs;
    private readonly states;
    private readonly store;
    private persistTimer;
    private dirty;
    constructor(options?: {
        store?: QuotaStore | null;
    });
    hydrateFromStore(): Promise<void>;
    registerProviderStaticConfig(providerKey: string, cfg: StaticQuotaConfig): void;
    ensureProvider(providerKey: string): QuotaState;
    disableProvider(options: {
        providerKey: string;
        mode: 'cooldown' | 'blacklist';
        durationMs: number;
        reason?: string;
    }): void;
    recoverProvider(providerKey: string): void;
    resetProvider(providerKey: string): void;
    onProviderError(ev: ProviderErrorEvent): void;
    onProviderSuccess(ev: ProviderSuccessEvent): void;
    /**
     * External quota snapshot ingestion hook (host-driven).
     * This API is intentionally small: the host adapter translates provider-specific
     * quota responses into a normalized per-providerKey inPool/cooldown/blacklist update.
     */
    updateProviderPoolState(options: {
        providerKey: string;
        inPool: boolean;
        reason?: string | null;
        cooldownUntil?: number | null;
        blacklistUntil?: number | null;
    }): void;
    getQuotaView(): ProviderQuotaView;
    getSnapshot(): {
        updatedAtMs: number;
        providers: Record<string, QuotaState>;
    };
    private markDirty;
    persistNow(): Promise<void>;
}
