/** * InboxPoller - Background polling for the MCP server. * * Uses the AgentDrop SDK's inbox() to check for new transfers, * and fires a callback when unseen ones arrive. The MCP server * uses this to push `notifications/message` to the client. */ import type { AgentDrop, Transfer, Broadcast } from "agentdrop-sdk"; export interface InboxPollerOptions { client: AgentDrop; /** Milliseconds between polls. Default: 30 000 */ pollInterval?: number; /** Called for each new incoming transfer. */ onNewTransfer: (transfer: Transfer) => void; /** Called for each new platform broadcast. */ onBroadcast?: (broadcast: Broadcast) => void; } export declare class InboxPoller { private client; private pollInterval; private onNewTransfer; private onBroadcast?; private seenIds; private seenBroadcastIds; private timer; isRunning: boolean; constructor(opts: InboxPollerOptions); /** * Snapshot current inbox so we don't alert on pre-existing transfers. */ seedSeen(): Promise; /** * Single poll cycle: fetch inbox, notify on new transfers and broadcasts. */ checkInbox(): Promise; /** * Start background polling. Seeds seen IDs first, then polls on interval. */ start(): Promise; stop(): void; }