apple-mail-mcp 2.13.0 → 2.13.1

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 +29 -0
  2. package/package.json +1 -1
package/build/index.js CHANGED
@@ -79503,6 +79503,35 @@ ${indent}end try${this.sanitizeFragment("_uacct", indent)}${this.sanitizeFragmen
79503
79503
  end if
79504
79504
  set _sLo to _sHi + 1
79505
79505
  end repeat
79506
+ -- #179: the loop above is bounded by the count Mail JUST reported,
79507
+ -- and that count can lag the mailbox (#155). Positions past the bound
79508
+ -- are never requested, so \u2014 unlike a slice that failed \u2014 they leave
79509
+ -- no trace in _sMiss, and the record would claim a complete
79510
+ -- observation while every message past the bound looks like it
79511
+ -- disappeared. That is a FABRICATED finding with names attached,
79512
+ -- which is worse than the gap it papers over.
79513
+ --
79514
+ -- Probe exactly ONE position past the bound. One, not a slice: an
79515
+ -- out-of-range RANGE raises as a whole, so an over-requested slice
79516
+ -- could not distinguish "nothing there" from "count was low by more
79517
+ -- than a chunk". If a message is there, the count was low and the
79518
+ -- unread tail is recorded as a hole, which makes this snapshot
79519
+ -- PARTIAL under the existing rules and withholds the halves a
79520
+ -- truncation would poison.
79521
+ try
79522
+ set _sOverId to ((id of message (${countVar} + 1) of ${mbVar}) as string)
79523
+ -- A specifier that CLAMPS rather than raising hands back the LAST
79524
+ -- message instead of failing. That is not evidence of a truncation,
79525
+ -- so only an id this enumeration did not already record counts.
79526
+ set _sSeen to false
79527
+ repeat with _sP in _sPairs
79528
+ if (contents of _sP) starts with (_sOverId & "${SNAP_PAIR}") then set _sSeen to true
79529
+ end repeat
79530
+ if not _sSeen then
79531
+ if _sMiss is not "" then set _sMiss to _sMiss & ","
79532
+ set _sMiss to _sMiss & ((${countVar} + 1) as string) & "-end"
79533
+ end if
79534
+ end try
79506
79535
  if _sMiss is not "" then
79507
79536
  if (count of _sPairs) is 0 then
79508
79537
  set _sStatus to "unavailable"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "apple-mail-mcp",
3
- "version": "2.13.0",
3
+ "version": "2.13.1",
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",