export interface AccountGuards { readOnly?: boolean; draftsOnly?: boolean; allowedRecipients?: string[]; dailySendLimit?: number; /** "external": sends are queued to disk and only leave after `mailbox-mcp approve ` in a terminal. */ approval?: "external"; /** What happens to sends once this session has read mail from a sender the account never wrote to. */ untrustedReadLock?: "approval" | "refuse"; /** authserv-id of the account's own mail server in Authentication-Results, needed for the lock to trust any received mail. Gmail defaults to mx.google.com. Only settable in accounts.json. */ authservId?: string; /** Senders (exact addresses and @domain patterns) the untrusted-read lock may trust, and only when their mail passes DMARC. Empty means every third-party message taints. Only settable in accounts.json. */ trustedSenders?: string[]; } export interface GmailAccountConfig extends AccountGuards { provider: "gmail"; email: string; } export interface ImapAccountConfig extends AccountGuards { provider: "imap"; email: string; host: string; port: number; smtpHost: string; smtpPort: number; } export interface JmapAccountConfig extends AccountGuards { provider: "jmap"; email: string; host: string; sessionUrl?: string; } export type AccountConfig = GmailAccountConfig | ImapAccountConfig | JmapAccountConfig; export declare function validateGuards(guards: AccountGuards): void; export declare const GUARD_KEYS: readonly ["readOnly", "draftsOnly", "allowedRecipients", "dailySendLimit", "approval", "untrustedReadLock", "authservId", "trustedSenders"]; export declare function hasGuards(config: AccountGuards): boolean; export declare function guardNames(config: AccountGuards): string; export declare class AccountManager { private configDir; private configPath; private data; constructor(configDir?: string); private load; private save; listAccounts(): Record; getAccount(alias: string): AccountConfig; addAccount(alias: string, config: AccountConfig): void; removeAccount(alias: string): void; getAccountDir(alias: string): string; getConfigDir(): string; }