apple-mail-mcp 2.10.0 → 2.10.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.
- package/README.md +2 -2
- package/build/index.js +13 -8
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -746,7 +746,7 @@ Flag or unflag a message. `flag-message` optionally takes a flag **color**; `unf
|
|
|
746
746
|
| `id` | string | Yes | Message ID |
|
|
747
747
|
| `color` | string | No | (`flag-message` only) Flag color: `red`, `orange`, `yellow`, `green`, `blue`, `purple`, `gray` (`grey` accepted). Omit for Mail's default flag. |
|
|
748
748
|
|
|
749
|
-
**Flag colors** are an Apple Mail feature
|
|
749
|
+
**Flag colors** are an Apple Mail feature — the message's `flag index` (0 red, 1 orange, 2 yellow, 3 green, 4 blue, 5 purple, 6 gray), which is the property a Mail smart mailbox can match on. **The color is applied on both routes** (since 2.10.0): AppleScript sets the flag index directly, and for an **IMAP-routed** id (`imap:…`) the color is written as Mail.app's `$MailFlagBit0/1/2` keywords — a 3-bit field holding the same palette index. `\Flagged` on its own really is colorless, but those keywords ride alongside it in an ordinary `UID STORE`, so a smart mailbox keyed on flag color matches an IMAP-flagged message too. You do **not** need to resolve to a numeric id just to color a flag.
|
|
750
750
|
|
|
751
751
|
---
|
|
752
752
|
|
|
@@ -829,7 +829,7 @@ All batch operations accept an array of message IDs (max 100 per batch) and retu
|
|
|
829
829
|
| Parameter | Type | Required | Description |
|
|
830
830
|
|-----------|------|----------|-------------|
|
|
831
831
|
| `ids` | string[] | Yes | Message IDs (max 100) |
|
|
832
|
-
| `color` | string | No | (`batch-flag-messages` only) Flag color
|
|
832
|
+
| `color` | string | No | (`batch-flag-messages` only) Flag color — see [`flag-message`](#flag-message--unflag-message). Applied on both routes, so a mixed batch of numeric and `imap:` ids all end up colored. |
|
|
833
833
|
|
|
834
834
|
---
|
|
835
835
|
|
package/build/index.js
CHANGED
|
@@ -78120,9 +78120,13 @@ var AppleMailManager = class {
|
|
|
78120
78120
|
/**
|
|
78121
78121
|
* Resolve a message's numeric Mail.app id from its RFC822 Message-ID (the
|
|
78122
78122
|
* backend-independent join key). This bridges an `imap:` id to the numeric id
|
|
78123
|
-
* required
|
|
78124
|
-
*
|
|
78125
|
-
*
|
|
78123
|
+
* required by the AppleScript-only tools — `reply-to-message` and
|
|
78124
|
+
* `forward-message`.
|
|
78125
|
+
*
|
|
78126
|
+
* Note: flag *color* no longer needs this (since 2.10.0). Mail.app stores the
|
|
78127
|
+
* color as the `$MailFlagBit0/1/2` keywords, which ride alongside `\Flagged`
|
|
78128
|
+
* in an ordinary `UID STORE`, so flag-message/batch-flag-messages color an
|
|
78129
|
+
* `imap:` id directly and a smart mailbox keyed on flag color matches it.
|
|
78126
78130
|
*
|
|
78127
78131
|
* The Message-ID is matched both bracketless and `<bracketed>` (Mail returns
|
|
78128
78132
|
* it bracketless; IMAP envelopes carry the brackets). When `accountName` is
|
|
@@ -81490,7 +81494,7 @@ var FLAG_COLOR_INDEX = {
|
|
|
81490
81494
|
grey: 6
|
|
81491
81495
|
};
|
|
81492
81496
|
var FLAG_COLOR_SCHEMA = external_exports.enum(["red", "orange", "yellow", "green", "blue", "purple", "gray", "grey"]).optional().describe(
|
|
81493
|
-
"Optional flag color (Apple Mail palette: red, orange, yellow, green, blue, purple, gray \u2014 'grey' accepted). Omit for Mail's default flag.
|
|
81497
|
+
"Optional flag color (Apple Mail palette: red, orange, yellow, green, blue, purple, gray \u2014 'grey' accepted). Omit for Mail's default flag. The color is applied on both routes: AppleScript sets the flag index, and IMAP writes the equivalent $MailFlagBit0/1/2 keywords Mail.app reads \u2014 so a smart mailbox keyed on flag color matches either way."
|
|
81494
81498
|
);
|
|
81495
81499
|
var DATE_FILTER_SCHEMA = external_exports.string().regex(
|
|
81496
81500
|
/^[a-zA-Z0-9 ,/\-:]+$/,
|
|
@@ -82315,10 +82319,11 @@ server.registerTool(
|
|
|
82315
82319
|
id,
|
|
82316
82320
|
...color ? { color, colorApplied: true } : {}
|
|
82317
82321
|
}) : errorResponse(`Failed to flag message "${id}"`),
|
|
82318
|
-
// IMAP path:
|
|
82319
|
-
|
|
82322
|
+
// IMAP path: imapFlagMessage writes the color as $MailFlagBit0/1/2 keywords,
|
|
82323
|
+
// so the outcome matches the AppleScript route above.
|
|
82324
|
+
ok: color ? `Message flagged (${color})` : "Message flagged",
|
|
82320
82325
|
fail: `Failed to flag message "${id}"`,
|
|
82321
|
-
structured: color ? { ok: true, id, color, colorApplied:
|
|
82326
|
+
structured: color ? { ok: true, id, color, colorApplied: true } : { ok: true, id }
|
|
82322
82327
|
});
|
|
82323
82328
|
}, "Error flagging message")
|
|
82324
82329
|
);
|
|
@@ -82514,7 +82519,7 @@ server.registerTool(
|
|
|
82514
82519
|
server.registerTool(
|
|
82515
82520
|
"batch-flag-messages",
|
|
82516
82521
|
{
|
|
82517
|
-
description: "Use when: flagging multiple messages (1\u2013100 ids) in one call, optionally with a color (red/orange/yellow/green/blue/purple/gray).\nReturns: counts of how many were flagged and how many failed.\nDo not use when: flagging just one (use flag-message) or removing flags (use batch-unflag-messages). Get the ids from search-messages or list-messages first.\nNote:
|
|
82522
|
+
description: "Use when: flagging multiple messages (1\u2013100 ids) in one call, optionally with a color (red/orange/yellow/green/blue/purple/gray).\nReturns: counts of how many were flagged and how many failed.\nDo not use when: flagging just one (use flag-message) or removing flags (use batch-unflag-messages). Get the ids from search-messages or list-messages first.\nNote: the color is applied on both routes \u2014 AppleScript sets the flag index, IMAP writes the equivalent $MailFlagBit0/1/2 keywords Mail.app reads \u2014 so a mixed batch of numeric and `imap:` ids all end up colored.",
|
|
82518
82523
|
inputSchema: {
|
|
82519
82524
|
ids: BATCH_IDS_SCHEMA,
|
|
82520
82525
|
color: FLAG_COLOR_SCHEMA
|
package/package.json
CHANGED