@mgcrea/mcp-apple-mail 1.3.1 → 1.6.0

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/dist/cli.js CHANGED
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import { a as loadConfig, b as MAIL_SURFACE, j as BUILD_INFO, r as createServer } from "./server-Cs0iy6g6.js";
2
+ import { a as loadConfig, b as MAIL_SURFACE, j as BUILD_INFO, r as createServer } from "./server-C1JZDY5c.js";
3
3
  import { runStdioServer } from "@mgcrea/mcp-apple-core";
4
4
  //#region src/cli.ts
5
5
  const LOG_PREFIX = "apple-mail-mcp";
package/dist/index.d.ts CHANGED
@@ -375,9 +375,10 @@ declare class AppleMailClient {
375
375
  /**
376
376
  * Whether Mail's UI could actually be read, which is the only one of these
377
377
  * three that is evidence rather than a claim. The flag above answers for an
378
- * identity and has been caught disagreeing with what the same process can
379
- * do; `inconclusive` is Mail with no windows open, where nothing can be
380
- * concluded either way.
378
+ * identity, and an identity can be ambiguous: one bundle id was measured
379
+ * holding four Accessibility entries at once, with the app's own check and
380
+ * its servers' checks matching different ones. `inconclusive` is Mail with
381
+ * no windows open, where nothing can be concluded either way.
381
382
  */
382
383
  uiRead: "granted" | "denied" | "inconclusive" | "unknown";
383
384
  windows: (string | null)[] | null;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","names":[],"sources":["../src/build-info.ts","../src/client/errors.ts","../src/client/locate.ts","../src/config.ts","../src/client/mime.ts","../src/client/emlx.ts","../src/client/schema.ts","../src/client/envelope.ts","../src/client/mailbox-map.ts","../src/client/mail.ts","../src/client/ref.ts","../src/server.ts","../src/tools/index.ts"],"mappings":";;;;;cAkBa,YAAY;;;;cCWZ,6BAA6B;WACtB;EAElB,YAAY;;;;;;;;;;;;;;;;;;;;KCTF;;EAEV;;EAEA;EACA;;EAEA;EACA;EACA;EACA;EACA;;EAEA;EACA;EACA;;KAKU;;EAEV;;EAEA;;EAEA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IACA;IACA;;;;;;;;;;;;;;EAuCI,cACJ,cACA,mBACC;IACD;IACA;IACA;IACA;IACA;;;;;;;;;;;;;;;EAkDI,YACJ,aACA;IAAQ;IAAc;MACrB,QAAQ;EAoBL,gBAAgB,mBAAmB;EAKnC,YAAY;IAChB;IACA;IACA;IACA;IACA;IACA;IACA;MACE;EAaE,eACJ,aACA;IACE;IACA;IACA;IACA;IACA;MAED;;;;;;;;;;;;;;;;;;;;;cC/mCQ;KAED;EACV;EACA;EACA;;cAKW,YAAS,KAAS;cAGlB,YAAS,gBAAkB;;cA2B3B,qBAAkB,MAAU,iBAAe,YAAY;;;cChDvD;cACA;KAED;EACV,QAAQ;EACR,SAAS;;EAET,YAAY;;KAGF;EACV,QAAQ;EACR,QAAQ;;;;;;;cAQG,eAAY,MAAU,wBAAsB;;;KCtB7C;;;;;EAKV;;;;;;;;;;;;cAaW,gBAAa,QAChB,WAAS,QACT,iBAAe,KAClB"}
1
+ {"version":3,"file":"index.d.ts","names":[],"sources":["../src/build-info.ts","../src/client/errors.ts","../src/client/locate.ts","../src/config.ts","../src/client/mime.ts","../src/client/emlx.ts","../src/client/schema.ts","../src/client/envelope.ts","../src/client/mailbox-map.ts","../src/client/mail.ts","../src/client/ref.ts","../src/server.ts","../src/tools/index.ts"],"mappings":";;;;;cAkBa,YAAY;;;;cCWZ,6BAA6B;WACtB;EAElB,YAAY;;;;;;;;;;;;;;;;;;;;KCTF;;EAEV;;EAEA;EACA;;EAEA;EACA;EACA;EACA;EACA;;EAEA;EACA;EACA;;KAKU;;EAEV;;EAEA;;EAEA;;EAEA;;cAiBW,sBAAmB,OAAU,kBAAqB;;;;;;;;;;;;;;;cC3CzD,cAAY,EAAA;;;;;;;;;;;;;;;;;;;;;;GA8CP,EAAA,KAAA;KAEC,SAAS,EAAE,aAAa;;;;;cAMvB,aAAU,MAAS,OAAO,eAA2B;;;KCvDtD;EACV;EACA;EACA;;;;;;;;;EASA;;EAEA;;;;;;;;;;;;;;;;;;;;;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AED;;;;;;;;;;;;;;;;;;;;;cChnCQ;KAED;EACV;EACA;EACA;;cAKW,YAAS,KAAS;cAGlB,YAAS,gBAAkB;;cA2B3B,qBAAkB,MAAU,iBAAe,YAAY;;;cChDvD;cACA;KAED;EACV,QAAQ;EACR,SAAS;;EAET,YAAY;;KAGF;EACV,QAAQ;EACR,QAAQ;;;;;;;cAQG,eAAY,MAAU,wBAAsB;;;KCtB7C;;;;;EAKV;;;;;;;;;;;;cAaW,gBAAa,QAChB,WAAS,QACT,iBAAe,KAClB"}
package/dist/index.js CHANGED
@@ -1,2 +1,2 @@
1
- import { A as WritesDisabledError, C as MessageNotFoundError, D as ProtocolError, E as PreconditionError, O as SchemaDriftError, S as MailNotRunningError, T as PlatformError, _ as locateEnvelopeIndex, a as loadConfig, c as decodeRef, d as assertStaticScript, f as createOsascriptRunner, g as inspectFile, h as MailboxMap, i as registerTools, j as BUILD_INFO, k as TccDeniedError, l as encodeRef, m as withBusyRetry, n as SERVER_VERSION, o as AppleMailClient, p as mapOsaError, r as createServer, s as REF_VERSION, t as SERVER_NAME, u as groupRefsByMailbox, v as AppleMailError, w as OsascriptTimeoutError, x as MailBusyError, y as IndexUnavailableError } from "./server-Cs0iy6g6.js";
1
+ import { A as WritesDisabledError, C as MessageNotFoundError, D as ProtocolError, E as PreconditionError, O as SchemaDriftError, S as MailNotRunningError, T as PlatformError, _ as locateEnvelopeIndex, a as loadConfig, c as decodeRef, d as assertStaticScript, f as createOsascriptRunner, g as inspectFile, h as MailboxMap, i as registerTools, j as BUILD_INFO, k as TccDeniedError, l as encodeRef, m as withBusyRetry, n as SERVER_VERSION, o as AppleMailClient, p as mapOsaError, r as createServer, s as REF_VERSION, t as SERVER_NAME, u as groupRefsByMailbox, v as AppleMailError, w as OsascriptTimeoutError, x as MailBusyError, y as IndexUnavailableError } from "./server-C1JZDY5c.js";
2
2
  export { AppleMailClient, AppleMailError, BUILD_INFO, IndexUnavailableError, MailBusyError, MailNotRunningError, MailboxMap, MessageNotFoundError, OsascriptTimeoutError, PlatformError, PreconditionError, ProtocolError, REF_VERSION, SERVER_NAME, SERVER_VERSION, SchemaDriftError, TccDeniedError, WritesDisabledError, assertStaticScript, createOsascriptRunner, createServer, decodeRef, encodeRef, groupRefsByMailbox, inspectFile, loadConfig, locateEnvelopeIndex, mapOsaError, registerTools, withBusyRetry };
@@ -12,8 +12,8 @@ const pkg = readPackageIdentity(new URL("../package.json", import.meta.url), {
12
12
  const BUILD_INFO = {
13
13
  name: pkg.name,
14
14
  version: pkg.version,
15
- gitCommit: "312147f",
16
- gitCommitDate: "2026-08-27T16:06:37+02:00"
15
+ gitCommit: "90f269d",
16
+ gitCommitDate: "2026-09-01T00:21:33+02:00"
17
17
  };
18
18
  //#endregion
19
19
  //#region src/client/errors.ts
@@ -1113,12 +1113,23 @@ function composerBodySize(body) {
1113
1113
  * hand. Every retry left another one. Nothing about that failure needed the
1114
1114
  * window to exist first -- the grants it depends on can be read in one event.
1115
1115
  *
1116
- * Ground truth here is the functional read, not AXIsProcessTrusted. The two
1117
- * disagree: MEASURED on macOS 26.6, Cupertino.app's own process reports trusted
1118
- * while an osascript grandchild of it reports the opposite, so a gate that
1119
- * believed the flag alone would refuse replies on a Mac where the mechanism
1120
- * works. A window list that comes back named is proof regardless of what the
1121
- * flag says; the flag only breaks the tie when Mail has no windows at all.
1116
+ * Ground truth here is the functional read, not AXIsProcessTrusted. The two do
1117
+ * disagree. MEASURED, macOS 26.6: Cupertino.app's own process reported trusted
1118
+ * while an osascript grandchild of it reported the opposite and could not name
1119
+ * a single Mail window -- a green Accessibility row in System Settings beside a
1120
+ * reply that failed every time.
1121
+ *
1122
+ * The cause was not attribution, which was correct throughout (launchctl put
1123
+ * the responsible pid of the node server at the app). It was that ONE BUNDLE
1124
+ * IDENTIFIER CAN HOLD SEVERAL ACCESSIBILITY ENTRIES AT ONCE, one per path and
1125
+ * signature it has been granted at -- an installed copy, a debug build, each
1126
+ * earlier reinstall. tccutil reported resetting four of them for
1127
+ * io.mgcrea.cupertino. The app's own check matched one and the requests made on
1128
+ * its behalf were resolved against another.
1129
+ *
1130
+ * So the flag is a claim about an identity that may be ambiguous, and this is
1131
+ * the thing itself. A window list that comes back named is proof regardless of
1132
+ * what the flag says; the flag only breaks the tie when Mail has no windows.
1122
1133
  *
1123
1134
  * Returns { ok, reason, windows }. The reason separates the two grants that fail
1124
1135
  * identically once inside a composer: "systemEvents" when System Events cannot
@@ -1324,7 +1335,15 @@ function maxQuoteLevel(el, depth) {
1324
1335
  * composer to its minimum and push it off-screen first (macOS clamps it back to
1325
1336
  * leave a 40px sliver — that residue is not removable from outside Mail's
1326
1337
  * process, as the window server ignores alpha changes from a foreign
1327
- * connection), then hand the user's app back before sending.
1338
+ * connection), then put the window back exactly where it was found before the
1339
+ * user's app is handed back.
1340
+ *
1341
+ * Restoring is NOT cosmetic. Mail persists the compose window's frame, so a
1342
+ * composer left at [1, 1] off-screen is inherited by the next one the user
1343
+ * opens by hand -- and on a send that only saves a draft, the window this
1344
+ * shrank is the very window the caller is told is "open in Mail for review".
1345
+ * So a window whose geometry cannot be read back is not moved at all: the flash
1346
+ * of a composer coming forward is worth less than a window stuck at [1, 1].
1328
1347
  *
1329
1348
  * Failure is reported, never fatal: a quoted send still beats a lost one.
1330
1349
  */
@@ -1342,9 +1361,24 @@ function stripCitation(windowName) {
1342
1361
  // An empty subject names the window something else; the composer is frontmost regardless.
1343
1362
  if (!win) win = wins[0];
1344
1363
 
1345
- // Out of sight before Mail comes forward, so the user sees as little as possible.
1346
- try { win.size = [1, 1]; } catch (e) {}
1347
- try { win.position = [-100000, -100000]; } catch (e) {}
1364
+ // Read the real geometry BEFORE moving: once the window is off-screen the
1365
+ // window server answers with what it clamped to, not what the user chose.
1366
+ var was = null;
1367
+ try { was = { size: win.size(), position: win.position() }; } catch (e) { was = null; }
1368
+ var unhide = function () {
1369
+ if (!was) return;
1370
+ // Position first, so the window grows back from the right top-left corner.
1371
+ try { win.position = was.position; } catch (e) {}
1372
+ try { win.size = was.size; } catch (e) {}
1373
+ };
1374
+
1375
+ // Out of sight before Mail comes forward, so the user sees as little as
1376
+ // possible -- and only when the geometry came back, because hiding a window
1377
+ // we have no way to put back is how it stays hidden.
1378
+ if (was) {
1379
+ try { win.size = [1, 1]; } catch (e) {}
1380
+ try { win.position = [-100000, -100000]; } catch (e) {}
1381
+ }
1348
1382
 
1349
1383
  var previous = prop(function () {
1350
1384
  return SE.applicationProcesses.whose({ frontmost: true })[0].name();
@@ -1377,6 +1411,10 @@ function stripCitation(windowName) {
1377
1411
  stripped = false;
1378
1412
  }
1379
1413
 
1414
+ // Before the caller sends, saves, or leaves this window on screen, and on the
1415
+ // failure path too: a strip that threw must not cost the user their composer.
1416
+ unhide();
1417
+
1380
1418
  if (previous && previous !== "Mail") {
1381
1419
  try { SE.processes.byName(previous).frontmost = true; } catch (e) {}
1382
1420
  }
@@ -1630,10 +1668,13 @@ function run() {
1630
1668
 
1631
1669
  // The functional read, which outranks both flags above.
1632
1670
  //
1633
- // MEASURED, macOS 26.6: Cupertino.app's own process answers AXIsProcessTrusted
1634
- // true while an osascript grandchild of it answers false, so the flag
1635
- // alone cannot say whether a composer is reachable -- it is a claim about an
1636
- // identity, and this is the thing itself. Naming a window of Mail's needs
1671
+ // MEASURED, macOS 26.6: Cupertino.app's own process answered
1672
+ // AXIsProcessTrusted true while an osascript grandchild of it answered false,
1673
+ // because the same bundle identifier held four separate Accessibility entries
1674
+ // -- one per path and signature it had been granted at -- and the two checks
1675
+ // matched different ones. The flag alone therefore cannot say whether a
1676
+ // composer is reachable: it is a claim about an identity that may be
1677
+ // ambiguous, and this is the thing itself. Naming a window of Mail's needs
1637
1678
  // exactly the grants a composer needs, and opens nothing.
1638
1679
  var uiRead = "unknown";
1639
1680
  var windows = null;
@@ -3614,7 +3655,7 @@ const buildDiagnostics = async (client, ctx) => {
3614
3655
  automationSystemEvents: composer.systemEvents,
3615
3656
  composerUiRead: composer.uiRead,
3616
3657
  ...composer.windows ? { composerWindowsSeen: composer.windows } : {},
3617
- ...composer.uiRead === "granted" && composer.systemEvents === "granted" ? {} : { composerNote: "Filling a Mail composer goes through System Events, which needs BOTH of the above: Automation to System Events (a different grant from Automation to Mail) and Accessibility. Until both are granted, apple_mail_reply_to_message and apple_mail_forward_message fail with COMPOSER_NOT_FOUND while every other tool works. Grant them to the Cupertino bundle that is RUNNING — not to your terminal and not to node. Automation and Full Disk Access are inherited by the servers from it; Accessibility has been measured NOT to be, so a green row is necessary and not sufficient, and `composerUiRead` above is the only line that settles it. A development build at another path does not stand in for the installed one even though they share a bundle identifier — measured. Accessibility is in System Settings > Privacy & Security > Accessibility; Automation is under Automation. If the app is already listed, toggle it off and on — the grant goes stale when the bundle is reinstalled. Then quit Cupertino and open it again: the servers are children of the running app, and a child started before the grant does not see it — which is what `accessibility: denied` beside a green Accessibility row in Cupertino's own Settings means." },
3658
+ ...composer.uiRead === "granted" && composer.systemEvents === "granted" ? {} : { composerNote: "Filling a Mail composer goes through System Events, which needs BOTH of the above: Automation to System Events (a different grant from Automation to Mail) and Accessibility. Until both are granted, apple_mail_reply_to_message and apple_mail_forward_message fail with COMPOSER_NOT_FOUND while every other tool works. Grant them to the Cupertino bundle that is RUNNING — not to your terminal and not to node: the app is the process macOS holds responsible, and the servers do inherit its identity. If Cupertino's own Settings shows a GREEN Accessibility row while `composerUiRead` above says denied, believe this line and not the row: one bundle identifier can hold several Accessibility entries at once, one per path and signature it has been granted at (an installed copy, a development build, each earlier reinstall), and the two checks can match different ones. The cure is to clear them all and grant once, from the bundle that is running: `tccutil reset Accessibility io.mgcrea.cupertino`, then Ask… in Cupertino's Settings — it reported resetting FOUR entries the first time this was hit. Accessibility is in System Settings > Privacy & Security > Accessibility; Automation is under Automation. If the app is already listed, toggle it off and on — the grant goes stale when the bundle is reinstalled. Then quit Cupertino and open it again: the servers are children of the running app, and a child started before the grant does not see it — which is what `accessibility: denied` beside a green Accessibility row in Cupertino's own Settings means." },
3618
3659
  fullDiskAccess: located.readable ? "granted" : located.exists ? "denied" : "unknown (no index file found)",
3619
3660
  ...located.readable ? {} : { howToGrant: [
3620
3661
  "System Settings > Privacy & Security > Full Disk Access",
@@ -4204,4 +4245,4 @@ const createServer = (opts) => {
4204
4245
  //#endregion
4205
4246
  export { WritesDisabledError as A, MessageNotFoundError as C, ProtocolError as D, PreconditionError as E, SchemaDriftError as O, MailNotRunningError as S, PlatformError as T, locateEnvelopeIndex as _, loadConfig as a, MAIL_SURFACE as b, decodeRef as c, assertStaticScript as d, createOsascriptRunner as f, inspectFile as g, MailboxMap as h, registerTools as i, BUILD_INFO as j, TccDeniedError as k, encodeRef as l, withBusyRetry as m, SERVER_VERSION as n, AppleMailClient as o, mapOsaError as p, createServer as r, REF_VERSION as s, SERVER_NAME as t, groupRefsByMailbox as u, AppleMailError as v, OsascriptTimeoutError as w, MailBusyError as x, IndexUnavailableError as y };
4206
4247
 
4207
- //# sourceMappingURL=server-Cs0iy6g6.js.map
4248
+ //# sourceMappingURL=server-C1JZDY5c.js.map