apple-mail-mcp 2.10.29 → 2.10.30

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 (2) hide show
  1. package/build/index.js +10 -1
  2. package/package.json +1 -1
package/build/index.js CHANGED
@@ -78371,8 +78371,17 @@ function countDeltaWarning(d) {
78371
78371
  const where = d.account ? `"${d.mailbox}" in account "${d.account}"` : `"${d.mailbox}"`;
78372
78372
  return `\u26A0\uFE0F Effect mismatch in ${where}: ${d.observed} message(s) left the mailbox but only ${d.expected} were operated on (count ${d.before} \u2192 ${d.after}). ${extra} message(s) are unaccounted for. Anything else removing mail from this mailbox at the same moment \u2014 a Mail rule, a server-side filter, another client, an IMAP expunge \u2014 reads the same way, so rule that out first. If nothing else was touching it, this is the signature of https://github.com/sweetrb/apple-mail-mcp/issues/155 \u2014 please report it there, and set ${AUDIT_LOG_ENV}=/path/to/audit.ndjson to capture which messages disappeared.`;
78373
78373
  }
78374
+ function falseOkWarning(d, collateral) {
78375
+ if (d.status !== "under" || d.expected === null) return null;
78376
+ if (d.observed !== 0 || d.expected <= 0) return null;
78377
+ if (!collateral || collateral.snapshot !== "ok") return null;
78378
+ if ((collateral.disappeared?.length ?? 0) !== 0) return null;
78379
+ const where = d.account ? `"${d.mailbox}" in account "${d.account}"` : `"${d.mailbox}"`;
78380
+ return `\u26A0\uFE0F Reported success with no observed effect in ${where}: ${d.expected} message(s) were operated on and reported ok, but the mailbox count did not move (${d.before} \u2192 ${d.after}) and the collateral snapshot \u2014 which read this mailbox successfully \u2014 shows no message left it. Either the operation silently did nothing, or Mail's count and listing are both stale and the messages did move. Check the destination (Trash for a delete) before assuming either: if they are there, this is a measurement-timing bug; if they are still in the source mailbox minutes later, the operation failed while reporting success. Please report at https://github.com/sweetrb/apple-mail-mcp/issues/155 with ${AUDIT_LOG_ENV}=/path/to/audit.ndjson set.`;
78381
+ }
78374
78382
  function reconciliationWarnings(report) {
78375
- return report.countDeltas.map(countDeltaWarning).filter((w) => w !== null);
78383
+ const collateralFor = (d) => report.collateral.find((c) => c.account === d.account && c.mailbox === d.mailbox);
78384
+ return report.countDeltas.flatMap((d) => [countDeltaWarning(d), falseOkWarning(d, collateralFor(d))]).filter((w) => w !== null);
78376
78385
  }
78377
78386
 
78378
78387
  // src/services/appleMailManager.ts
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "apple-mail-mcp",
3
- "version": "2.10.29",
3
+ "version": "2.10.30",
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",