@mgcrea/mcp-apple-mail 1.36.1 → 1.36.2

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-BcVfuC1E.js";
2
+ import { a as loadConfig, b as MAIL_SURFACE, j as BUILD_INFO, r as createServer } from "./server-ynr059Dx.js";
3
3
  import { runStdioServer } from "@mgcrea/mcp-apple-core";
4
4
  //#region src/cli.ts
5
5
  const LOG_PREFIX = "apple-mail-mcp";
@@ -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/ax.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/client/watch.ts","../src/tools/watch.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;;;;;;;;;;;;;;;;;;;;;;;;;;GAyFP,EAAA,KAAA;KAEC,SAAS,EAAE,aAAa;;;;;cAMvB,aAAU,MAAS,OAAO,eAA2B;;;KCxCtD;EAAgB;EAAgB;EAAc;;;KAG9C;;;;;;;;;EASV;;;;;;;;;;;EAWA;;EAEA;;;;;;;;EAQA;;EAEA;;EAEA;;EAEA;EACA;EACA;;EAEA;;EAEA;EACA;;;;;;EAMA;;EAEA;;EAEA;;;;;;EAMA;;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ET,YAAY;;EAEZ,MAAM;;EAEN,UAAU;;EAEV,sBAAsB;;KAGZ;EACV,QAAQ;EACR,QAAQ;;EAER,UAAU;;EAEV,SAAS;;;;;;;cAQE,eAAY,MAAU,wBAAsB;;;KCvC7C;;;;;EAKV;;;;;EAKA,UAAU;;;;;;;;;;;;;cAcC,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/ax.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/client/watch.ts","../src/tools/watch.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;;;;;;;;;;;;;;;;;;;;;;;;;;GAyFP,EAAA,KAAA;KAEC,SAAS,EAAE,aAAa;;;;;cAMvB,aAAU,MAAS,OAAO,eAA2B;;;KCxCtD;EAAgB;EAAgB;EAAc;;;KAG9C;;;;;;;;;EASV;;;;;;;;;;;EAWA;;EAEA;;;;;;;;EAQA;;EAEA;;EAEA;;EAEA;EACA;EACA;;EAEA;;EAEA;EACA;;;;;;EAMA;;EAEA;;EAEA;;;;;;EAMA;;EAEA;;KAGU;EACV;EACA;;;;;;;EAOA;EACA;EACA;IAAU;IAAc;;EACxB;EACA;EACA;;KAGU;EACV;;EAEA;EACA;;KAiBU;EACV;EACA;;cAGW;;UAUJ;;SAOA,KACL,MAAK,OAAO,YACZ,OAAM,oBACL;EAKH;;EAKA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;;;;;;;cAcC,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-BcVfuC1E.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-ynr059Dx.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 };
@@ -14,8 +14,8 @@ const pkg = readPackageIdentity(new URL("../package.json", import.meta.url), {
14
14
  const BUILD_INFO = {
15
15
  name: pkg.name,
16
16
  version: pkg.version,
17
- gitCommit: "b82ad61",
18
- gitCommitDate: "2026-11-03T12:29:16+01:00"
17
+ gitCommit: "64f8fc3",
18
+ gitCommitDate: "2026-11-03T23:19:14+01:00"
19
19
  };
20
20
  //#endregion
21
21
  //#region src/client/errors.ts
@@ -3457,10 +3457,11 @@ const sameHead = (a, b) => {
3457
3457
  const n = Math.min(x.length, y.length, HEAD_CHARS$1);
3458
3458
  return x.slice(0, n) === y.slice(0, n);
3459
3459
  };
3460
- /** A composer taken as the new one, with the own text it was listed with. */
3460
+ /** A composer taken as the new one, with the own text and the title it was listed with. */
3461
3461
  const taken = (c) => ({
3462
3462
  handle: c.composer,
3463
- text: c.text ?? null
3463
+ text: c.text ?? null,
3464
+ subject: c.subject
3464
3465
  });
3465
3466
  /**
3466
3467
  * Wait for a composer that was not there before, and return its handle.
@@ -3473,7 +3474,9 @@ const taken = (c) => ({
3473
3474
  * is the one this call opened, whatever it is titled.
3474
3475
  *
3475
3476
  * A person can open a window by hand during the poll, and an empty composer
3476
- * gives nothing to tell theirs from ours. So the candidates are every fresh
3477
+ * gives nothing to tell theirs from ours. Without a subject that holds for any
3478
+ * new composer they open: theirs, listed before ours, is taken, and our body
3479
+ * goes above its signature. Nothing of theirs is replaced, since it is new. So the candidates are every fresh
3477
3480
  * handle, narrowed to those titled `subject` when it is given (the subject
3478
3481
  * `OPEN_COMPOSER` returned). Exactly one candidate is returned as `{ handle }`;
3479
3482
  * more than one is `{ ambiguous }` and nothing is picked, because filling the
@@ -3520,11 +3523,19 @@ const taken = (c) => ({
3520
3523
  const awaitNewComposer = async (lane, before, timeoutMs, subject) => {
3521
3524
  const known = new Set(before.map((c) => typeof c === "string" ? c : c.composer));
3522
3525
  const counted = before.every((c) => typeof c !== "string");
3523
- const sameSubject = before.filter((c) => typeof c !== "string" && c.subject === subject);
3524
- const had = sameSubject.length;
3525
- const held = sameSubject.map((c) => c.text);
3526
- const unread = held.some((t) => typeof t !== "string");
3527
- const isOld = (text) => typeof text !== "string" || unread || held.some((t) => typeof t === "string" && sameHead(t, text));
3526
+ const under = (title) => {
3527
+ const same = before.filter((c) => typeof c !== "string" && c.subject === title);
3528
+ const held = same.map((c) => c.text);
3529
+ const unread = held.some((t) => typeof t !== "string");
3530
+ const isOld = (text) => typeof text !== "string" || unread || held.some((t) => typeof t === "string" && sameHead(t, text));
3531
+ return {
3532
+ had: same.length,
3533
+ unread,
3534
+ isOld
3535
+ };
3536
+ };
3537
+ const bySubject = under(subject);
3538
+ const { had, unread, isOld } = bySubject;
3528
3539
  const deadline = Date.now() + timeoutMs;
3529
3540
  let waitedOn;
3530
3541
  for (;;) {
@@ -3533,10 +3544,12 @@ const awaitNewComposer = async (lane, before, timeoutMs, subject) => {
3533
3544
  const fresh = listed.filter((c) => !known.has(c.composer));
3534
3545
  const candidates = subject === void 0 ? fresh : fresh.filter((c) => c.subject === subject);
3535
3546
  const only = candidates.length === 1 ? candidates[0] : void 0;
3536
- if (only && had === 0) return taken(only);
3537
- if (only && !isOld(only.text)) return taken(only);
3547
+ if (only && subject === void 0 && !counted) return { ambiguous: [only.composer] };
3548
+ const lone = only && subject === void 0 ? under(only.subject) : bySubject;
3549
+ if (only && lone.had === 0) return taken(only);
3550
+ if (only && !lone.isOld(only.text)) return taken(only);
3538
3551
  if (only) {
3539
- if (!(!unread && typeof only.text !== "string") || Date.now() >= deadline) return { ambiguous: [only.composer] };
3552
+ if (!(!lone.unread && typeof only.text !== "string") || Date.now() >= deadline) return { ambiguous: [only.composer] };
3540
3553
  waitedOn = [only.composer];
3541
3554
  }
3542
3555
  if (candidates.length > 1) {
@@ -3566,19 +3579,31 @@ const composeNatively = async (lane, runner, params, opts = {}) => {
3566
3579
  const sendTimeoutMs = opts.sendTimeoutMs ?? SEND_TIMEOUT_MS;
3567
3580
  const watch = lane.watch();
3568
3581
  const startedAt = Date.now();
3582
+ if (!params.subject?.trim() && params.mode === "new") {
3583
+ if (params.sendNow || !params.body && !params.attachments?.length) return {
3584
+ ok: false,
3585
+ subject: params.subject ?? "",
3586
+ bodyVerified: null,
3587
+ verifiedChars: 0,
3588
+ sent: false,
3589
+ note: (params.sendNow ? "A new message with no subject cannot be sent from here: Mail asks before sending one, and its buttons are named in the Mac's language." : "A new message with no subject and nothing to fill cannot be saved from here: the only way to save it is a keystroke aimed by its title, and it has none.") + " Nothing was opened. Give it a subject, or leave out sendNow and give it a body."
3590
+ };
3591
+ }
3569
3592
  const reach = await lane.reach();
3570
3593
  if (!reach.ok) throw new Error(`${MailAxLane.grantMessage(params.mode)} ${MailAxLane.nothingWritten}`);
3571
3594
  const { attachments: files = [], ...toOpen } = params;
3572
3595
  const before = await lane.composers();
3573
3596
  const subject = (await runner.run(OPEN_COMPOSER, toOpen)).subject;
3574
- const found = await awaitNewComposer(lane, before, composerTimeoutMs, subject);
3597
+ const keyed = subject.trim() !== "";
3598
+ const titled = keyed ? `for "${subject}"` : "with no subject";
3599
+ const found = await awaitNewComposer(lane, before, composerTimeoutMs, keyed ? subject : void 0);
3575
3600
  if (found && "ambiguous" in found) return {
3576
3601
  ok: false,
3577
3602
  subject,
3578
3603
  bodyVerified: null,
3579
3604
  verifiedChars: 0,
3580
3605
  sent: false,
3581
- note: `Mail was asked to open a ${params.mode} window for "${subject}", and ` + (found.ambiguous.length === 1 ? `the one new composer under that title (${found.ambiguous[0]}) could not be told from the draft already open under it: its text reads as that draft's, or could not be read. Nothing was filled, pressed or sent, and every window is left open in Mail. Close the extra one, finish the other by hand, then retry.` : `${found.ambiguous.length} new composers titled that appeared (${found.ambiguous.join(", ")}), so this path cannot tell which one it opened. Nothing was filled, pressed or sent, and all of them are left open in Mail. Close the extra one, finish the other by hand, then retry.`) + interferenceNote(await watch.check())
3606
+ note: `Mail was asked to open a ${params.mode} window ${titled}, and ` + (found.ambiguous.length === 1 ? `the one new composer under that title (${found.ambiguous[0]}) could not be told from the draft already open under it: its text reads as that draft's, or could not be read. Nothing was filled, pressed or sent, and every window is left open in Mail. Close the extra one, finish the other by hand, then retry.` : `${found.ambiguous.length} new composers${keyed ? " titled that" : ""} appeared (${found.ambiguous.join(", ")}), so this path cannot tell which one it opened. Nothing was filled, pressed or sent, and all of them are left open in Mail. Close the extra one, finish the other by hand, then retry.`) + interferenceNote(await watch.check())
3582
3607
  };
3583
3608
  const handle = found?.handle ?? null;
3584
3609
  const expectHead = found?.text ? found.text : null;
@@ -3588,7 +3613,7 @@ const composeNatively = async (lane, runner, params, opts = {}) => {
3588
3613
  bodyVerified: null,
3589
3614
  verifiedChars: 0,
3590
3615
  sent: false,
3591
- note: `Mail was asked to open a ${params.mode} window for "${subject}" and no such window was readable within ${composerTimeoutMs / 1e3}s, ` + ((reach.windows ?? []).length > 0 ? `although Mail's other windows read fine — so this is not a permission. ` : "and no Mail window could be read at all, on any desktop. Run apple_mail_diagnostics before retrying. ") + `Nothing was written. The window may still be on screen: look for an empty ${params.mode} in Mail before retrying, because a retry would leave a second one behind. Windows visible at the time: ${JSON.stringify(reach.windows)}.` + interferenceNote(await watch.check())
3616
+ note: `Mail was asked to open a ${params.mode} window ${titled} and no such window was readable within ${composerTimeoutMs / 1e3}s, ` + ((reach.windows ?? []).length > 0 ? `although Mail's other windows read fine — so this is not a permission. ` : "and no Mail window could be read at all, on any desktop. Run apple_mail_diagnostics before retrying. ") + `Nothing was written. The window may still be on screen: look for an empty ${params.mode} in Mail before retrying, because a retry would leave a second one behind. Windows visible at the time: ${JSON.stringify(reach.windows)}.` + interferenceNote(await watch.check())
3592
3617
  };
3593
3618
  /**
3594
3619
  * The composer is no longer on screen, and nothing here closed it.
@@ -3600,16 +3625,21 @@ const composeNatively = async (lane, runner, params, opts = {}) => {
3600
3625
  * on double-paste grounds when the real hazard was sending the mail twice.
3601
3626
  */
3602
3627
  const vanished = async (knownBody = null) => {
3603
- const verdict = await sentVerdict(runner, params.accountUuid, subject, startedAt);
3628
+ const verdict = keyed ? await sentVerdict(runner, params.accountUuid, subject, startedAt) : {
3629
+ sent: null,
3630
+ sentence: "Nothing here sends a message with no subject, so it was closed or sent by hand, and Sent cannot tell which from here: look in Drafts and in Sent before retrying."
3631
+ };
3604
3632
  return {
3605
3633
  ok: false,
3606
3634
  subject,
3607
3635
  bodyVerified: knownBody?.verified ?? null,
3608
3636
  verifiedChars: knownBody?.chars ?? 0,
3609
3637
  sent: verdict.sent,
3610
- note: `The ${params.mode} window for "${subject}" is GONE. Nothing here closed it — this path never discards a composer — so someone using the Mac sent it or closed it while this was running. ${verdict.sentence}` + interferenceNote(await watch.check())
3638
+ note: `The ${params.mode} window ${titled} is GONE. Nothing here closed it — this path never discards a composer — so someone using the Mac sent it or closed it while this was running. ${verdict.sentence}` + interferenceNote(await watch.check())
3611
3639
  };
3612
3640
  };
3641
+ const listedTitle = found && "handle" in found ? found.subject : void 0;
3642
+ const gone = () => keyed ? lane.composerGone(subject, 0) : lane.composers().then((listed) => !listed.some((c) => c.composer === handle || listedTitle !== void 0 && c.subject === listedTitle), () => false);
3613
3643
  const body = params.body ?? "";
3614
3644
  const filling = body !== "" || files.length > 0;
3615
3645
  let bodyVerified = null;
@@ -3628,7 +3658,7 @@ const composeNatively = async (lane, runner, params, opts = {}) => {
3628
3658
  save: !params.sendNow
3629
3659
  });
3630
3660
  } catch (error) {
3631
- if (await lane.composerGone(subject, 0)) return vanished();
3661
+ if (await gone()) return vanished();
3632
3662
  return {
3633
3663
  ok: false,
3634
3664
  degraded: true,
@@ -3636,11 +3666,11 @@ const composeNatively = async (lane, runner, params, opts = {}) => {
3636
3666
  bodyVerified: null,
3637
3667
  verifiedChars: 0,
3638
3668
  sent: false,
3639
- note: `The ${params.mode} window for "${subject}" was opened and addressed, but filling it failed: ${error instanceof Error ? error.message : String(error)} Its window is still open in Mail: finish it there, or close it without saving and retry.` + interferenceNote(await watch.check())
3669
+ note: `The ${params.mode} window ${titled} was opened and addressed, but filling it failed: ${error instanceof Error ? error.message : String(error)} Its window is still open in Mail: finish it there, or close it without saving and retry.` + interferenceNote(await watch.check())
3640
3670
  };
3641
3671
  }
3642
3672
  if (edit["replaced"] !== true) {
3643
- if (await lane.composerGone(subject, 0)) return vanished();
3673
+ if (await gone()) return vanished();
3644
3674
  return {
3645
3675
  ok: false,
3646
3676
  degraded: true,
@@ -3648,7 +3678,7 @@ const composeNatively = async (lane, runner, params, opts = {}) => {
3648
3678
  bodyVerified: null,
3649
3679
  verifiedChars: 0,
3650
3680
  sent: false,
3651
- note: `${typeof edit["reason"] === "string" ? edit["reason"] : "The edit was refused."}${typeof edit["hint"] === "string" ? ` ${edit["hint"]}` : ""} The ${params.mode} window for "${subject}" is still open in Mail.` + interferenceNote(await watch.check())
3681
+ note: `${typeof edit["reason"] === "string" ? edit["reason"] : "The edit was refused."}${typeof edit["hint"] === "string" ? ` ${edit["hint"]}` : ""} The ${params.mode} window ${titled} is still open in Mail.` + interferenceNote(await watch.check())
3652
3682
  };
3653
3683
  }
3654
3684
  const text = typeof edit["text"] === "string" ? edit["text"] : "";
@@ -3662,7 +3692,7 @@ const composeNatively = async (lane, runner, params, opts = {}) => {
3662
3692
  bodyVerified: false,
3663
3693
  verifiedChars,
3664
3694
  sent: false,
3665
- note: `The ${params.mode} window for "${subject}" was opened and correctly addressed, but reading the composer back does not show the text that was sent. It MUST NOT be described to the user as ready. It was left open rather than discarded, and may already be saved as it stands: look at it in Mail, then fix or close it.` + interferenceNote(await watch.check())
3695
+ note: `The ${params.mode} window ${titled} was opened and correctly addressed, but reading the composer back does not show the text that was sent. It MUST NOT be described to the user as ready. It was left open rather than discarded, and may already be saved as it stands: look at it in Mail, then fix or close it.` + interferenceNote(await watch.check())
3666
3696
  };
3667
3697
  }
3668
3698
  if (!params.sendNow && edit["saved"] === false) return {
@@ -3673,7 +3703,7 @@ const composeNatively = async (lane, runner, params, opts = {}) => {
3673
3703
  verifiedChars,
3674
3704
  sent: false,
3675
3705
  ...files.length > 0 ? { attachments: files.length } : {},
3676
- note: `The ${params.mode} window for "${subject}" was filled` + (bodyVerified ? " and its body verified" : "") + `, but it was NOT saved. Its window is still open in Mail: save it there.` + interferenceNote(await watch.check())
3706
+ note: `The ${params.mode} window ${titled} was filled` + (bodyVerified ? " and its body verified" : "") + `, but it was NOT saved. Its window is still open in Mail: save it there.` + interferenceNote(await watch.check())
3677
3707
  };
3678
3708
  }
3679
3709
  const known = () => bodyVerified === true ? {
@@ -3710,7 +3740,7 @@ const composeNatively = async (lane, runner, params, opts = {}) => {
3710
3740
  verifiedChars,
3711
3741
  sent: false,
3712
3742
  ...files.length > 0 ? { attachments: files.length } : {},
3713
- note: `The ${params.mode} for "${subject}" was ${filling ? "filled" : "opened"}` + (bodyVerified ? " and its body verified" : "") + `, but it was NOT ${action}: ` + (sharing === null ? `Mail's composers could not be listed, so it is not known that the title picks out one.` : moved ? "its handle was re-bound: Mail rebuilt its window's tabs since the draft was filled, so the handle may now name another draft under this title, which the shortcut could reach." : `${sharing.length} composers in Mail carry this title, and the shortcut is aimed by title, so it could reach the wrong one.`) + ` The draft is open in Mail for review: ${params.sendNow ? "send" : "save"} it from there.` + interferenceNote(await watch.check())
3743
+ note: `The ${params.mode} ${titled} was ${filling ? "filled" : "opened"}` + (bodyVerified ? " and its body verified" : "") + `, but it was NOT ${action}: ` + (sharing === null ? `Mail's composers could not be listed, so it is not known that the title picks out one.` : moved ? "its handle was re-bound: Mail rebuilt its window's tabs since the draft was filled, so the handle may now name another draft under this title, which the shortcut could reach." : `${sharing.length} composers in Mail carry this title, and the shortcut is aimed by title, so it could reach the wrong one.`) + ` The draft is open in Mail for review: ${params.sendNow ? "send" : "save"} it from there.` + interferenceNote(await watch.check())
3714
3744
  };
3715
3745
  const ref = await lane.findComposer(subject, composerTimeoutMs);
3716
3746
  if (!ref) {
@@ -3722,7 +3752,7 @@ const composeNatively = async (lane, runner, params, opts = {}) => {
3722
3752
  bodyVerified,
3723
3753
  verifiedChars,
3724
3754
  sent: false,
3725
- note: `The ${params.mode} for "${subject}" was composed, but its window could not be read to press anything, so it was NOT ${action}. It is open in Mail for review.` + interferenceNote(await watch.check())
3755
+ note: `The ${params.mode} ${titled} was composed, but its window could not be read to press anything, so it was NOT ${action}. It is open in Mail for review.` + interferenceNote(await watch.check())
3726
3756
  };
3727
3757
  }
3728
3758
  let rebound = false;
@@ -3742,7 +3772,7 @@ const composeNatively = async (lane, runner, params, opts = {}) => {
3742
3772
  verifiedChars,
3743
3773
  sent: false,
3744
3774
  ...files.length > 0 ? { attachments: files.length } : {},
3745
- note: `The ${params.mode} for "${subject}" was ${filling ? "filled" : "opened"}` + (bodyVerified ? " and its body verified" : "") + `, but it was NOT ${action}: ` + (rebound ? "right before the shortcut its handle read as re-bound: Mail rebuilt its window's tabs since the draft was filled, so the handle may now name another draft under this title, which the shortcut could have reached." : "its window holds several drafts as tabs, and right before the shortcut this draft's tab was not the one shown (or could not be confirmed to be), so the shortcut could have reached another draft.") + ` Nothing was pressed. The draft is open in Mail for review: ${params.sendNow ? "send" : "save"} it from there.` + interferenceNote(await watch.check())
3775
+ note: `The ${params.mode} ${titled} was ${filling ? "filled" : "opened"}` + (bodyVerified ? " and its body verified" : "") + `, but it was NOT ${action}: ` + (rebound ? "right before the shortcut its handle read as re-bound: Mail rebuilt its window's tabs since the draft was filled, so the handle may now name another draft under this title, which the shortcut could have reached." : "its window holds several drafts as tabs, and right before the shortcut this draft's tab was not the one shown (or could not be confirmed to be), so the shortcut could have reached another draft.") + ` Nothing was pressed. The draft is open in Mail for review: ${params.sendNow ? "send" : "save"} it from there.` + interferenceNote(await watch.check())
3746
3776
  };
3747
3777
  }
3748
3778
  if (finished === "refused") return {
@@ -3751,7 +3781,7 @@ const composeNatively = async (lane, runner, params, opts = {}) => {
3751
3781
  bodyVerified,
3752
3782
  verifiedChars,
3753
3783
  sent: false,
3754
- note: `The ${params.mode} for "${subject}" was composed, but Mail could not be brought to the front, so nothing was pressed and it was not ${action}. Its window is still open in Mail. Someone is probably using the Mac; retry once it is free, or finish it in Mail.` + interferenceNote(await watch.check())
3784
+ note: `The ${params.mode} ${titled} was composed, but Mail could not be brought to the front, so nothing was pressed and it was not ${action}. Its window is still open in Mail. Someone is probably using the Mac; retry once it is free, or finish it in Mail.` + interferenceNote(await watch.check())
3755
3785
  };
3756
3786
  const sent = params.sendNow ? await lane.composerGone(subject, sendTimeoutMs) : false;
3757
3787
  if (!params.sendNow) await lane.release();
@@ -6443,7 +6473,8 @@ var AppleMailClient = class {
6443
6473
  async sendMessage(opts) {
6444
6474
  const attachments = this.#resolveAttachments(opts.attachments, opts.sendNow);
6445
6475
  const account = opts.account ? await this.mailboxes.resolveAccount(opts.account) : null;
6446
- if (this.#ax && opts.subject.trim()) return composeNatively(this.#ax, this.runner, {
6476
+ const native = opts.subject.trim() !== "" || !opts.sendNow && (opts.body !== "" || attachments.length > 0);
6477
+ if (this.#ax && native) return composeNatively(this.#ax, this.runner, {
6447
6478
  mode: "new",
6448
6479
  accountUuid: account?.id ?? null,
6449
6480
  subject: opts.subject,
@@ -6937,7 +6968,7 @@ const buildDiagnostics = async (client, ctx) => {
6937
6968
  composerAxRead: axReach.ok ? "granted" : "denied",
6938
6969
  ...axReach.windows ? { composerAxWindowsSeen: axReach.windows } : {}
6939
6970
  } : {},
6940
- ...client.composerLane === "accessibility" ? { composerLaneNote: "This server is hosted by Cupertino, so a composer is driven through the app's own Accessibility driver, for a new message as for a reply or forward: the body is pasted, never assigned. Automation to System Events is NOT required for it, and `automationSystemEvents` above can be denied. The one exception is a new message with no subject, which still has its body assigned and then needs System Events to take off the quotation Mail wraps an assigned body in; without it, the result says `quoted: true` and the message is not sent." } : {},
6971
+ ...client.composerLane === "accessibility" ? { composerLaneNote: "This server is hosted by Cupertino, so a composer is driven through the app's own Accessibility driver, for a new message as for a reply or forward: the body is pasted, never assigned. Automation to System Events is NOT required for it, and `automationSystemEvents` above can be denied. The one exception is a new message with no subject that is sent at once, or saved with no body or files: it still has its body assigned and then needs System Events to take off the quotation Mail wraps an assigned body in; without it, the result says `quoted: true` and the message is not sent." } : {},
6941
6972
  ...composer.uiRead === "granted" && composer.systemEvents === "granted" || client.composerLane === "accessibility" ? {} : { 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, and apple_mail_send_message leaves its body wrapped as a QUOTATION that recipients see — reported as `quoted: true`, and never sent that way. 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." },
6942
6973
  fullDiskAccess: located.readable ? "granted" : located.exists ? "denied" : "unknown (no index file found)",
6943
6974
  ...located.readable ? {} : { howToGrant: [
@@ -8382,4 +8413,4 @@ const createServer = (opts) => {
8382
8413
  //#endregion
8383
8414
  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 };
8384
8415
 
8385
- //# sourceMappingURL=server-BcVfuC1E.js.map
8416
+ //# sourceMappingURL=server-ynr059Dx.js.map