/** * Sliding-window duplicate guard for inbound messages. * * Channel SDKs can re-deliver the same event after a reconnect (the Feishu * WebSocket dispatcher does this), which would otherwise queue the same user * message twice. Each inbound message carries a stable per-message id in * `replyRef`; keys are (channel, chatKey, messageId) within a recency window. * Messages without an id (not all channels set one) are never deduplicated. * @module dsh-connect/dedup */ export declare class InboundDedup { /** Re-delivery of the same id inside this window is a duplicate (default 5 min). */ private readonly windowMs; /** Hard cap on remembered ids; oldest entries are dropped beyond it. */ private readonly maxEntries; /** key → last-seen timestamp */ private readonly seen; constructor( /** Re-delivery of the same id inside this window is a duplicate (default 5 min). */ windowMs?: number, /** Hard cap on remembered ids; oldest entries are dropped beyond it. */ maxEntries?: number); /** * Record the message and report whether an identical id was already seen * within the window. Side-effect free for messages without an id. */ isDuplicate(channel: string, chatKey: string, messageId: string | undefined, now?: number): boolean; /** Forget ids older than the window, then the oldest beyond the cap. */ private prune; } //# sourceMappingURL=dedup.d.ts.map