import type { EmailConfig } from "./credentials.js"; /** * Standing reconciliation of sends against copies actually present in \Sent. * * Post-condition reporting on each tool only covers sends the agent was * present for. A mailbox that silently stops filing copies emits nothing at * all — that no-event blind spot is what let four days pass before an operator * noticed by hand (Task 1822). * * The copy status comes from reading \Sent, not from the ledger's own recorded * outcome. Trusting the recorded flag would only replay what the tool already * said; re-reading the folder is what makes this independent evidence, and it * is the only way a copy that was filed and later removed shows up. * * Presence is tested per Message-ID, never by comparing bulk counts. \Sent * holds everything the mailbox owner sends from any client, so a total count * is dominated by messages this plugin never sent: a mailbox filing none of * our sends still reads as healthy the moment its owner sends a few from their * phone. Bulk comparison would report clean on precisely the incident this * task exists to catch. */ export declare const SWEEP_WINDOW_MS: number; export interface MailboxSweepResult { accountId: string; mailbox: string; sends: number; copies: number; shortfall: number; status: "clean" | "shortfall" | "check-failed"; detail?: string; } export interface SweepDeps { listConfigs: (accountId: string) => Promise; loadPassword: (email: string) => Promise; readLedger: (sinceMs: number) => Array<{ at: string; mailbox: string; messageId: string; }>; /** Which of `messageIds` are absent from the mailbox's \Sent folder. */ findMissingInSent: (config: EmailConfig, password: string, messageIds: string[]) => Promise<{ folder: string; missing: string[]; }>; } export declare function formatSweepLine(r: MailboxSweepResult): string; export declare function sweepAccount(accountId: string, nowMs: number, deps: SweepDeps): Promise; //# sourceMappingURL=sent-copy-sweep.d.ts.map