/** * Notification throttle — coalesces MCP resource-update notifications. * * Under high parallelism, many tasks complete/update simultaneously. * Instead of sending one notification per event, we batch them over * a configurable window and send at most one per window. */ export interface ThrottleOptions { /** Coalesce window in ms (default: 500) */ intervalMs?: number; /** Callback to send the actual notification */ send: () => Promise; } export declare class NotificationThrottle { private readonly intervalMs; private readonly send; private timer; private pending; constructor(options: ThrottleOptions); /** * Request a notification. If one is already pending in the current * window, this is a no-op (coalesced). Otherwise, schedules delivery * at the end of the window. */ notify(): void; /** * Flush any pending notification immediately. * Call this during shutdown to ensure final state is delivered. */ flush(): Promise; /** * Cancel any pending notification and stop the throttle. */ dispose(): void; } //# sourceMappingURL=throttle.d.ts.map