apple-mail-mcp 2.19.10 → 2.19.11

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
@@ -58409,6 +58409,12 @@ async function fetchMailboxMatches(client, path, criteria, newestCount) {
58409
58409
  const found = await client.search(criteria, { uid: true });
58410
58410
  const uids = Array.isArray(found) ? found : [];
58411
58411
  if (uids.length === 0 || newestCount === 0) return { messages: [], total: uids.length };
58412
+ const status = await client.status(path, { messages: true });
58413
+ if (typeof status.messages === "number" && uids.length > status.messages) {
58414
+ throw new Error(
58415
+ `IMAP SEARCH on "${path}" reported ${uids.length} matches, more than the mailbox's own ${status.messages} messages \u2014 discarding as corrupted rather than trusting it (see #246).`
58416
+ );
58417
+ }
58412
58418
  const newest = uids.slice().reverse().slice(0, newestCount);
58413
58419
  const byUid = /* @__PURE__ */ new Map();
58414
58420
  for await (const msg of client.fetch(
package/build/index.js CHANGED
@@ -65738,6 +65738,12 @@ async function fetchMailboxMatches(client, path, criteria, newestCount) {
65738
65738
  const found = await client.search(criteria, { uid: true });
65739
65739
  const uids = Array.isArray(found) ? found : [];
65740
65740
  if (uids.length === 0 || newestCount === 0) return { messages: [], total: uids.length };
65741
+ const status = await client.status(path, { messages: true });
65742
+ if (typeof status.messages === "number" && uids.length > status.messages) {
65743
+ throw new Error(
65744
+ `IMAP SEARCH on "${path}" reported ${uids.length} matches, more than the mailbox's own ${status.messages} messages \u2014 discarding as corrupted rather than trusting it (see #246).`
65745
+ );
65746
+ }
65741
65747
  const newest = uids.slice().reverse().slice(0, newestCount);
65742
65748
  const byUid = /* @__PURE__ */ new Map();
65743
65749
  for await (const msg of client.fetch(
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "apple-mail-mcp",
3
- "version": "2.19.10",
3
+ "version": "2.19.11",
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",