apple-mail-mcp 2.20.18 → 2.20.19
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/index.js +20 -5
- package/package.json +1 -1
package/build/index.js
CHANGED
|
@@ -85104,9 +85104,13 @@ ${indent}end try${this.sanitizeFragment("_uacct", indent)}${this.sanitizeFragmen
|
|
|
85104
85104
|
if (scoped.kind === "hit") return scoped.output;
|
|
85105
85105
|
if (scoped.kind === "done") return null;
|
|
85106
85106
|
}
|
|
85107
|
-
const
|
|
85108
|
-
|
|
85109
|
-
|
|
85107
|
+
const account = hint?.account && !hint?.mailbox ? hint.account : void 0;
|
|
85108
|
+
const result = executeAppleScript(
|
|
85109
|
+
this.unscopedByIdScript(id, innerAction, { ...opts, account }),
|
|
85110
|
+
{
|
|
85111
|
+
timeoutMs: READ_ONLY_BYID_TIMEOUT_MS
|
|
85112
|
+
}
|
|
85113
|
+
);
|
|
85110
85114
|
if (!result.success || !result.output.trim()) {
|
|
85111
85115
|
if (!result.success) {
|
|
85112
85116
|
if (result.timedOut) this.lastMessageLookupError = timedOutScanningForId(id);
|
|
@@ -85223,6 +85227,7 @@ ${indent}end try${this.sanitizeFragment("_uacct", indent)}${this.sanitizeFragmen
|
|
|
85223
85227
|
*/
|
|
85224
85228
|
unscopedByIdScript(id, innerAction, opts = {}) {
|
|
85225
85229
|
const threshold = getByIdScanThreshold();
|
|
85230
|
+
const scopeAcct = escapeForAppleScript(opts.account ?? "");
|
|
85226
85231
|
const stalledKeys = threshold > 0 ? this.stalledMailboxes.keys() : [];
|
|
85227
85232
|
const stalledList = `{${stalledKeys.map((key) => {
|
|
85228
85233
|
const i = key.indexOf(STALLED_KEY_SEP);
|
|
@@ -85282,6 +85287,8 @@ ${indent}end try${this.sanitizeFragment("_uacct", indent)}${this.sanitizeFragmen
|
|
|
85282
85287
|
set _probeStalled to false
|
|
85283
85288
|
set _stopAt to 0
|
|
85284
85289
|
set _stalledKeys to ${stalledList}
|
|
85290
|
+
set _scopeAcct to "${scopeAcct}"
|
|
85291
|
+
set _acctSeen to false
|
|
85285
85292
|
set _startedAt to current date
|
|
85286
85293
|
set _acctNames to {}
|
|
85287
85294
|
try
|
|
@@ -85298,10 +85305,14 @@ ${indent}end try${this.sanitizeFragment("_uacct", indent)}${this.sanitizeFragmen
|
|
|
85298
85305
|
set _acctName to ""
|
|
85299
85306
|
if _ai <= (length of _acctNames) then set _acctName to item _ai of _acctNames
|
|
85300
85307
|
if _acctName is "" then set _acctName to (name of acct)
|
|
85301
|
-
if
|
|
85308
|
+
if _scopeAcct is not "" and _acctName is not _scopeAcct then
|
|
85309
|
+
-- Scoped to one account: leave the others alone.
|
|
85310
|
+
set _ai to _ai + 0
|
|
85311
|
+
else if _budgetHit or _probeStalled then
|
|
85302
85312
|
-- Stopped early: name what is left without asking Mail.app.
|
|
85303
85313
|
set _unreached to _unreached & _acctName & " (every mailbox)${DIAG_ITEM_SEP}"
|
|
85304
85314
|
else
|
|
85315
|
+
set _acctSeen to true
|
|
85305
85316
|
set _mbNames to {}
|
|
85306
85317
|
try
|
|
85307
85318
|
set _mbNames to name of mailboxes of acct
|
|
@@ -85347,7 +85358,11 @@ ${indent}end try${this.sanitizeFragment("_uacct", indent)}${this.sanitizeFragmen
|
|
|
85347
85358
|
-- reach them. Collect into the SAME _hits/_names, which means an id
|
|
85348
85359
|
-- present both in an account and locally is now correctly reported as
|
|
85349
85360
|
-- ambiguous rather than silently resolving to the account copy.
|
|
85350
|
-
if
|
|
85361
|
+
if _scopeAcct is not "" and not _acctSeen then return "${LOOKUP_ERROR_MARKER}Account \\"" & _scopeAcct & "\\" not found \u2014 check the name with list-accounts."
|
|
85362
|
+
if _scopeAcct is not "" then
|
|
85363
|
+
-- Local mailboxes belong to no account.
|
|
85364
|
+
set _ai to _ai + 0
|
|
85365
|
+
else if _budgetHit or _probeStalled then
|
|
85351
85366
|
set _unreached to _unreached & "${LOCAL_STORE_LABEL} (any local mailboxes)${DIAG_ITEM_SEP}"
|
|
85352
85367
|
else if not (${hitFound}) then${localMailboxBindingFragment()}
|
|
85353
85368
|
set _mi to 0
|
package/package.json
CHANGED