/** * Quota threshold push warnings (push spec ยง5.7, requested 2026-10-01): * the 5-hour and weekly windows each notify ONCE per tier โ€” 60% used, 80% * used, 90% used, 95% used, 98% used, exhausted โ€” edge-triggered on a * refresh DISCOVERING the first crossing (never level-triggered, precision * explicitly not required). * * Every fresh `queryQuota()` fetch funnels through here (the martty dock * refresher's 60s cadence + turn-end forceRefresh, the hub's dock cache, * `/quota`, the settings REST routes), so wherever quota data materializes, * thresholds are watched. A drop below 60 re-arms the tiers (new window, * reset card, weekly rollover). * * The per-key highest-notified tier is PERSISTED next to the user config * (`quota-push-state.json`): the hub idle-exits and re-spawns, and bridges * restart โ€” without persistence every rebirth while usage sits above a tier * would re-push it, and a hub + bridge pair could double-push one crossing. * The state advances even when the push itself is switched off or * suppressed, so re-enabling never replays old crossings. Everything here is * fire-and-forget from the caller's view: failures warn, never throw. */ import type { QuotaResult } from "./types.js"; /** Highest tier crossed by a used percentage (0 = below all). */ export declare function quotaTier(usedPercent: number): number; /** * Check one fresh quota result against the persisted tiers and push each * newly-crossed tier once. Callers fire-and-forget this; it never throws. */ export declare function checkQuotaThresholds(result: QuotaResult): Promise; /** Test hook: forget the in-memory mirror (the disk state stays). */ export declare function resetQuotaThresholdsForTest(): void; //# sourceMappingURL=thresholds.d.ts.map