/** * In-memory pending batch between email-fetch and email-ingest. * * email-fetch pulls new IMAP messages and stashes them here. email-ingest * reads the stash, writes only the operator-approved subset, and clears it. * * State is per-MCP-server-process, keyed by (accountId, mailbox email) so two * mailboxes' pending batches never collide. The server runs for the lifetime of * a session, so the two tools share state across turns within one conversation. * Restart drops the batch — the operator just runs "check my emails" again, * which is the intended human-in-the-loop cadence. */ import type { FetchedEmail } from "./imap.js"; export interface PendingBatch { uidValidity: number; maxUid: number; /** * The login owned representative (`config.email`) the fetched batch is * attributed to. The `{login, alias}` recipient set is applied as the fetch * filter inside `email-fetch`/`fetchSinceUid`; this field records the single * owned address relayed onto `EmailData.recipientAddress`. No graph writer * currently persists that field (the conversation-archive dispatcher derives * participants from from/to/cc), so this is an in-memory contract only. */ recipientAddress: string; messages: FetchedEmail[]; } export declare function putBatch(accountId: string, email: string, batch: PendingBatch): void; export declare function takeBatch(accountId: string, email: string): PendingBatch | null; export declare function peekBatch(accountId: string, email: string): PendingBatch | null; //# sourceMappingURL=ingest-batch.d.ts.map