export interface BillingAlert { provider: string; /** What the user loses while this is broken, e.g. "live hearing (speech-to-text)". */ capability: string; kind: "payment" | "quota"; detail: string; /** Where to fix it. */ url: string; firstSeen: number; lastSeen: number; count: number; } /** An alert with errors older than this is considered resolved. */ export declare const BILLING_ALERT_FRESH_MS: number; export declare const PROVIDER_BILLING_URLS: Record; /** * Does this error text indicate a billing problem (needs payment) or an * account-level quota exhaustion (usually also a plan/balance issue)? * Transient per-request rate limits deliberately do NOT match. */ export declare function classifyBillingFailure(text: string): "payment" | "quota" | null; /** Record a billing/quota failure for a provider (gateway-side only). */ export declare function reportBillingAlert(params: { provider: string; capability: string; detail: string; kind?: "payment" | "quota"; url?: string; }): void; /** Clear a provider's alert because the capability demonstrably works again. */ export declare function clearBillingAlert(provider: string): void; /** Fresh alerts, most recent failure first. Safe to call from any process. */ export declare function activeBillingAlerts(maxAgeMs?: number): BillingAlert[]; /** One-line human summary for banners: what broke and what to do. */ export declare function formatBillingAlertLine(a: BillingAlert): string;