/** * @name RemoteRateLimiter * @description Per-client rolling-window limiter for hosted MCP traffic with optional Redis backing. */ /** * @name RemoteRateLimitConfig * @description Runtime configuration for hosted MCP rate limiting. */ export interface RemoteRateLimitConfig { enabled: boolean; requestsPerMinute: number; redisUrl?: string; keyPrefix: string; } /** * @name RemoteRateLimitDecision * @description Result of a remote rate-limit check. */ export interface RemoteRateLimitDecision { allowed: boolean; limit: number; remaining: number; resetSeconds: number; } /** * @name RemoteRateLimiter * @description Shared Redis-backed limiter when configured, with an in-memory fallback for single-process deployments. */ export declare class RemoteRateLimiter { private readonly config; private readonly localEntries; private readonly redis?; private readonly cleanupInterval?; constructor(config: RemoteRateLimitConfig); /** * @name initialize * @description Establishes the optional Redis connection before accepting traffic. */ initialize(): Promise; /** * @name check * @description Checks and increments the rolling counter for a caller key. */ check(clientKey: string): Promise; /** * @name close * @description Closes the optional Redis connection. */ close(): Promise; private checkRedis; private checkLocal; private cleanupLocal; } /** * @name buildRemoteRateLimitConfigFromEnv * @description Resolves hosted MCP rate-limit settings from environment variables. */ export declare function buildRemoteRateLimitConfigFromEnv(defaultPerMinute: number): RemoteRateLimitConfig; //# sourceMappingURL=rate-limiter.d.ts.map