andrewyng--aisuite
abb5bfb0f4
A new 'email' connector covering Gmail, iCloud, Fastmail, and custom IMAP servers: the user enters an address + app password and servers are inferred from the address domain, with advanced host/port fields for other providers. Setup is ~2 minutes for Gmail (app password) versus the Google Cloud OAuth dance the existing gmail connector requires. Implementation is stdlib-only (imaplib/smtplib/email), one fresh connection per tool call, factories injectable for tests. Five tools: list folders, search, read, download attachment, send. All mailbox reads use read-only SELECT + PEEK fetches so unread flags never flip; send and attachment download are approval-gated; no delete/move/flag tools in v1. Send is single-shot SMTP (no APPEND-to-Sent) so a post-delivery failure can never bait a retry into double-sending. Replies fetch the original's Message-ID to set In-Reply-To/References and reuse the subject. make_integration_tools gains a roots parameter: attachment downloads land in the session's primary scratch dir and outgoing attachment paths must resolve inside a granted root. Spec in platform/docs/email-connector-spec.md.