/** * Domain-aware rate limiter — ensures the crawler respects per-domain rate limits. * * Uses a token bucket algorithm per domain. When the bucket is empty, requests * wait until a token is available. Tokens refill at a configurable rate. * * Default: 2 requests/second per domain, burst of 5. * Can be configured per-domain via the rateMap (domain → requests/second). */ export interface RateLimiterOpts { defaultRps?: number; burstSize?: number; rateMap?: Record; } export declare class DomainRateLimiter { private buckets; private readonly defaultRps; private readonly burstSize; private readonly rateMap; constructor(opts?: RateLimiterOpts); private getBucket; private refill; /** Wait until a token is available for the given URL's domain. */ throttle(url: string): Promise; /** Override rate for a specific domain at runtime (e.g. after seeing 429). */ setRate(domain: string, rps: number): void; stats(): Record; }