export declare class RateLimiter {
    private buckets;
    private rate;
    private intervalMs;
    private burst;
    private lastSweepAt;
    constructor(rate?: number, intervalMs?: number, burst?: number);
    /** Check if a request is allowed. Returns true if within limit. */
    allow(key: string): boolean;
    /** Get remaining tokens for a key. */
    remaining(key: string): number;
    /** Get status for display. */
    status(key: string): {
        remaining: number;
        rate: number;
        intervalSec: number;
    };
    /** Read the bucket's static configuration (no key required). */
    config(): {
        rate: number;
        intervalSec: number;
        burst: number;
    };
    /**
     * Best-effort estimate (epoch ms) of when the next token will be available
     * for `key`. If the bucket already has tokens, returns now.
     */
    nextAllowAt(key: string): number;
    /**
     * Drop buckets that have been idle for at least `idleMs` milliseconds.
     * Run periodically to bound memory under bursty workloads.
     *
     * Called automatically by {@link allow} every {@link AUTO_CLEANUP_EVERY_MS},
     * but exposed publicly so ops / tests can force a sweep.
     */
    cleanup(idleMs?: number): number;
    /** Test/diagnostic accessor: how many distinct keys are tracked. */
    size(): number;
    private maybeSweep;
    private getBucket;
}
export declare const userLimiter: RateLimiter;
export declare const agentLimiter: RateLimiter;
//# sourceMappingURL=rate-limiter.d.ts.map