apple-mail-mcp 2.20.0 → 2.20.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (4) hide show
  1. package/README.md +16 -2
  2. package/build/cli.js +616 -361
  3. package/build/index.js +642 -385
  4. package/package.json +1 -1
package/README.md CHANGED
@@ -813,7 +813,10 @@ Save an email to Drafts without sending.
813
813
  so a draft with `inReplyTo`/`references` cannot go through AppleScript. Instead the
814
814
  server composes it with the same MIME builder as the SMTP send (attachments included) and
815
815
  files it over IMAP into the account's Drafts mailbox (SPECIAL-USE `\Drafts`), flagged
816
- `\Draft`. The account is `account` when given (it must be a configured IMAP account);
816
+ `\Draft`. The account is `account` when given (it must be a configured IMAP account —
817
+ pass the exact `accountLabel` or login from `list-accounts`/your `APPLE_MAIL_MCP_IMAP_*`
818
+ config, e.g. `"user@icloud.com"`; a generic provider name like `"iCloud"` is not a
819
+ recognized alias and is refused);
817
820
  otherwise the IMAP account whose login is the SMTP identity, else the only configured
818
821
  IMAP account. When none qualifies — IMAP unconfigured, an unknown `account`, or several
819
822
  accounts and no way to choose — the call **fails and files nothing**; it never falls back
@@ -1024,7 +1027,18 @@ List attachments on a message.
1024
1027
  | --------- | ------ | -------- | ----------- |
1025
1028
  | `id` | string | Yes | Message ID |
1026
1029
 
1027
- **Returns:** List of attachments with name, MIME type, and size.
1030
+ **Returns:** List of attachments with name, MIME type, and `size` — the **decoded** byte count,
1031
+ i.e. what `fetch-attachment` returns.
1032
+
1033
+ **Sizes over IMAP.** `BODYSTRUCTURE` reports a part's size in its transfer encoding, so a
1034
+ base64 attachment's raw figure is ~4/3 of the file. `list-attachments` converts it: a
1035
+ `Content-Disposition` `size=` parameter wins when present; 7bit/8bit/binary parts are exact
1036
+ as reported; base64 parts are measured exactly from a short tail of each part (padding and
1037
+ line wrap), fetched in one batched `FETCH` for the whole message; quoted-printable parts up
1038
+ to 64 KiB are fetched and counted exactly. If a part can't be measured (the probe fails, the
1039
+ wrap is irregular, or a quoted-printable part is larger), the size is an estimate within a
1040
+ few bytes for base64 — an upper bound for quoted-printable — and the entry carries
1041
+ `sizeApproximate: true`. `fetch-attachment` always reports the exact `bytes`.
1028
1042
 
1029
1043
  ---
1030
1044