export interface RateLimitDecision {
    ok: boolean;
    retryAfterMs?: number;
}
/**
 * Tiny token-bucket rate limiter.
 *
 * This is intentionally minimal: enough to prevent obvious flooding and to
 * have deterministic tests.
 */
export declare class TokenBucketRateLimiter {
    private readonly capacity;
    private readonly refillPerSec;
    private readonly nowMs;
    private buckets;
    constructor(capacity: number, refillPerSec: number, nowMs?: () => number);
    allow(key: string, cost?: number): RateLimitDecision;
}
//# sourceMappingURL=ratelimit.d.ts.map