Every reader now stops at the read's character budget, a cell at 4,000
characters, one Office XML part at 12 MB, and parts with a DTD are
refused. A compound file named .docx is encrypted only when it holds an
EncryptedPackage stream, else unsupported; .eml files are unsupported
instead of raw MIME; maxChars that isn't a number falls back to 20,000.
attachment-text.test.ts: the zip bomb test passes the cap as an option
now, and a bare compound file named secret.docx is expected unsupported
(it is a legacy file under a new name; limits.test.ts covers the
password-protected one).
api.email.getAttachmentText reads PDF (pdf.js), Word, Excel, PowerPoint
and OpenDocument files (own reader over fflate and DOMParser, unpacking
capped at 50 MB), text, CSV, HTML, calendar and address files, and
answers with a status for what it can't read. The extraction lives in
lib/attachment-text so Files can use it too.
The sandbox runtime now copies every flag the host sends into
api.host.features; before, it kept only the three core flags, so the
assistant's flags never reached a plugin. The host bridge assertions in
plugin-host-features.test.ts compare against the core flags plus the
assistant's (withAssistant), since the init payload and host-change now
carry attachmentText too.