/**
 * Per-Account Quota Tracking
 *
 * Captures Anthropic rate-limit / utilisation headers from proxy responses
 * and persists them to ~/.neurolink/account-quotas.json so the CLI can
 * display remaining session & weekly capacity per account.
 *
 * Hot-path design: parseQuotaHeaders is pure CPU (no I/O). saveAccountQuota
 * updates an in-memory cache and debounces disk writes so the request/response
 * path is never blocked by file I/O.
 */
import type { AccountQuota } from "../types/index.js";
/** Read and normalize Anthropic's authoritative top-level unified status. */
export declare function getUnifiedRateLimitStatus(headers: Headers | Record<string, string>): string | undefined;
/**
 * Parse Anthropic rate-limit / quota headers into an `AccountQuota`.
 * Returns `null` when key headers are absent.
 * Pure computation — no I/O, no blocking.
 */
export declare function parseQuotaHeaders(headers: Headers | Record<string, string>): AccountQuota | null;
/**
 * Initialise the quota module with a custom file path.
 * When set, all reads/writes go to this path instead of the default
 * ~/.neurolink/account-quotas.json. Call before the first load/save.
 */
export declare function initAccountQuota(quotaFilePath: string): void;
export declare function loadAccountQuotas(): Promise<Record<string, AccountQuota>>;
/**
 * Load quota for a single account.
 */
export declare function loadAccountQuota(accountKey: string): Promise<AccountQuota | null>;
/**
 * Update quota for a single account.
 * Updates in-memory cache immediately (non-blocking),
 * then debounces the disk write to every 5 seconds.
 *
 * Loads the persisted file into the cache before the first write so a save
 * after a process restart merges with existing entries instead of rewriting
 * the file with only the accounts used since boot (which silently erased
 * other accounts' snapshots and blinded quota-aware routing to them).
 */
export declare function saveAccountQuota(accountKey: string, quota: AccountQuota): Promise<void>;
export declare function flushAccountQuotaStateForTests(): Promise<void>;
