apple-mail-mcp 2.19.4 → 2.19.5

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.
package/build/cli.js CHANGED
@@ -59094,7 +59094,12 @@ async function imapThread(id, deps = {}, limit = 50) {
59094
59094
  id: encodeImapId(ref.account, ref.path, m.uid),
59095
59095
  subject: m.envelope?.subject || "(no subject)",
59096
59096
  sender: senderName(m.envelope?.from),
59097
- date: m.envelope?.date ? new Date(m.envelope.date).toISOString() : "",
59097
+ // Was `new Date(m.envelope.date).toISOString()`, unguarded — a
59098
+ // truthy but unparseable `env.date` (e.g. a non-RFC-5322 header the
59099
+ // IMAP server's own ENVELOPE parser couldn't normalize) threw
59100
+ // `RangeError: Invalid time value` out of get-thread (#226 follow-up).
59101
+ // Same omitted-not-invented contract as `structuredRow` (2.19.2).
59102
+ date: isoOrEmpty(m.envelope?.date),
59098
59103
  isRead: m.flags?.has("\\Seen") ?? false
59099
59104
  }))
59100
59105
  };
package/build/index.js CHANGED
@@ -66564,7 +66564,12 @@ async function imapThread(id, deps = {}, limit = 50) {
66564
66564
  id: encodeImapId(ref.account, ref.path, m.uid),
66565
66565
  subject: m.envelope?.subject || "(no subject)",
66566
66566
  sender: senderName(m.envelope?.from),
66567
- date: m.envelope?.date ? new Date(m.envelope.date).toISOString() : "",
66567
+ // Was `new Date(m.envelope.date).toISOString()`, unguarded — a
66568
+ // truthy but unparseable `env.date` (e.g. a non-RFC-5322 header the
66569
+ // IMAP server's own ENVELOPE parser couldn't normalize) threw
66570
+ // `RangeError: Invalid time value` out of get-thread (#226 follow-up).
66571
+ // Same omitted-not-invented contract as `structuredRow` (2.19.2).
66572
+ date: isoOrEmpty(m.envelope?.date),
66568
66573
  isRead: m.flags?.has("\\Seen") ?? false
66569
66574
  }))
66570
66575
  };
@@ -86658,7 +86663,16 @@ function messageSummary(m) {
86658
86663
  id: m.id,
86659
86664
  subject: m.subject,
86660
86665
  sender: m.sender,
86661
- dateReceived: m.dateReceived instanceof Date ? m.dateReceived.toISOString() : m.dateReceived,
86666
+ // `m.dateReceived` can be a genuine `Date` instance that is nonetheless
86667
+ // INVALID: `parseAppleScriptDate` (appleMailManager.ts) returns `new
86668
+ // Date(NaN)` rather than `undefined` when Mail's own "date received" /
86669
+ // "date sent" property doesn't parse, and `instanceof Date` is true for an
86670
+ // invalid Date too. Calling `.toISOString()` unconditionally threw
86671
+ // `RangeError: Invalid time value` out of search-messages/list-messages for
86672
+ // any AppleScript-backed row with an unparseable arrival date (#226
86673
+ // follow-up) — omitted-as-empty, never invented, same contract as the IMAP
86674
+ // rows' `isoOrEmpty`.
86675
+ dateReceived: m.dateReceived instanceof Date ? Number.isNaN(m.dateReceived.getTime()) ? "" : m.dateReceived.toISOString() : m.dateReceived,
86662
86676
  isRead: m.isRead,
86663
86677
  isFlagged: m.isFlagged,
86664
86678
  mailbox: m.mailbox,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "apple-mail-mcp",
3
- "version": "2.19.4",
3
+ "version": "2.19.5",
4
4
  "description": "MCP server for Apple Mail - read, search, send, and manage emails via Claude and other AI assistants",
5
5
  "type": "module",
6
6
  "main": "build/index.js",