@rndmjoker/proton-mcp 0.4.5 → 0.4.11
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 +21 -14
- package/dist/in-flight.d.ts +6 -3
- package/dist/in-flight.js +6 -3
- package/dist/in-flight.js.map +1 -1
- package/dist/mail/actions.d.ts +0 -2
- package/dist/mail/actions.js +8 -7
- package/dist/mail/actions.js.map +1 -1
- package/dist/mail/compose.d.ts +23 -26
- package/dist/mail/compose.js +21 -27
- package/dist/mail/compose.js.map +1 -1
- package/dist/mail/drafts.d.ts +15 -0
- package/dist/mail/drafts.js +24 -5
- package/dist/mail/drafts.js.map +1 -1
- package/dist/mail/ids.d.ts +15 -1
- package/dist/mail/ids.js +10 -0
- package/dist/mail/ids.js.map +1 -1
- package/dist/mail/labels.js +9 -4
- package/dist/mail/labels.js.map +1 -1
- package/dist/mail/markup.d.ts +8 -2
- package/dist/mail/markup.js +111 -7
- package/dist/mail/markup.js.map +1 -1
- package/dist/mail/messages.d.ts +30 -9
- package/dist/mail/messages.js +57 -2
- package/dist/mail/messages.js.map +1 -1
- package/dist/mail/search.d.ts +14 -4
- package/dist/mail/search.js +17 -5
- package/dist/mail/search.js.map +1 -1
- package/dist/server.js +4 -2
- package/dist/server.js.map +1 -1
- package/dist/tools/actions.js +2 -1
- package/dist/tools/actions.js.map +1 -1
- package/dist/tools/confirm.d.ts +5 -2
- package/dist/tools/confirm.js +13 -2
- package/dist/tools/confirm.js.map +1 -1
- package/dist/tools/drafts.js +24 -13
- package/dist/tools/drafts.js.map +1 -1
- package/dist/tools/format.d.ts +4 -0
- package/dist/tools/format.js +91 -12
- package/dist/tools/format.js.map +1 -1
- package/dist/tools/guidance.js +11 -4
- package/dist/tools/guidance.js.map +1 -1
- package/dist/tools/messages.js +34 -11
- package/dist/tools/messages.js.map +1 -1
- package/dist/tools/pending-view.d.ts +1 -1
- package/dist/tools/preview.d.ts +6 -1
- package/dist/tools/preview.js +6 -1
- package/dist/tools/preview.js.map +1 -1
- package/dist/tools/send.js +23 -12
- package/dist/tools/send.js.map +1 -1
- package/dist/web/pending.d.ts +1 -1
- package/dist/web/pending.js +1 -1
- package/dist/web/pending.js.map +1 -1
- package/dist/web/sections.js +6 -1
- package/dist/web/sections.js.map +1 -1
- package/dist/web/server.d.ts +5 -1
- package/dist/web/server.js.map +1 -1
- package/package.json +8 -10
package/README.md
CHANGED
|
@@ -17,8 +17,8 @@ This server therefore runs on your machine as well, started by the AI client as
|
|
|
17
17
|
| Tool | What it does |
|
|
18
18
|
| :--- | :--- |
|
|
19
19
|
| `list_folders` | Lists folders and labels, grouped by kind |
|
|
20
|
-
| `list_messages` | Headers of a mailbox, newest first, with paging |
|
|
21
|
-
| `search_messages` | Full text, subject, sender, recipient, date range, read state, star, size |
|
|
20
|
+
| `list_messages` | Headers of a mailbox, newest first, with paging. In "All Mail" the discarded ones are marked as such |
|
|
21
|
+
| `search_messages` | Full text, subject, sender, recipient, date range, read state, star, size. Dates are the sender's, matching what the results show |
|
|
22
22
|
| `get_message` | One message as readable text, HTML converted, budgeted |
|
|
23
23
|
| `get_attachment` | One attachment by index, textual types only |
|
|
24
24
|
| `add_label` | Applies an existing label. The message stays in its folder |
|
|
@@ -35,6 +35,7 @@ This server therefore runs on your machine as well, started by the AI client as
|
|
|
35
35
|
| `send_reply` | Replies and sends, keeping the conversation intact |
|
|
36
36
|
| `send_forward` | Forwards and sends, attachments and all |
|
|
37
37
|
| `send_draft` | Sends a draft that is already written |
|
|
38
|
+
| `open_configuration` | Hands back the address of the local web interface, with the token that opens it |
|
|
38
39
|
| `check_for_updates` | Asks npm whether a newer version exists. The only thing here that contacts anything but your own machine, and only when called |
|
|
39
40
|
|
|
40
41
|
Every tool that composes a message takes either `text` or `html`, never both: Proton drops the plain text half of a message that carries markup, so the half you confirmed would be the half that never arrived.
|
|
@@ -71,7 +72,7 @@ This table says what the server cannot do today. The issue behind each entry say
|
|
|
71
72
|
| :--- | :--- |
|
|
72
73
|
| Attachments composed from files on this machine | [#17](https://github.com/RndmJoker/proton-mcp/issues/17) |
|
|
73
74
|
| Choosing per tool what an assistant may do | [#19](https://github.com/RndmJoker/proton-mcp/issues/19) |
|
|
74
|
-
| Choosing how much markup a message may carry | [#24](https://github.com/RndmJoker/proton-mcp/issues/24) |
|
|
75
|
+
| Choosing in the interface how much markup a message may carry. The levels exist and a caller picks one per message; what is missing is a ceiling the caller cannot raise | [#24](https://github.com/RndmJoker/proton-mcp/issues/24) |
|
|
75
76
|
| A fixed extra recipient the assistant cannot remove | [#18](https://github.com/RndmJoker/proton-mcp/issues/18) |
|
|
76
77
|
|
|
77
78
|
**Binary attachments** are missing from that table on purpose. They are not an unfinished feature waiting for its turn: `get_attachment` refuses anything that is not text and says why. Handing one over would mean either base64 in the context window, which is unusable, or writing decrypted content to your disk, which this server does not do. Changing that needs a decision first, not an implementation, so there is nothing to track yet.
|
|
@@ -240,22 +241,26 @@ Use an absolute path; `~` is not expanded by every client. The setup script prin
|
|
|
240
241
|
Without any client, by speaking the protocol directly:
|
|
241
242
|
|
|
242
243
|
```bash
|
|
243
|
-
|
|
244
|
-
'
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
244
|
+
{
|
|
245
|
+
printf '%s\n' \
|
|
246
|
+
'{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2025-06-18","capabilities":{},"clientInfo":{"name":"check","version":"1"}}}' \
|
|
247
|
+
'{"jsonrpc":"2.0","method":"notifications/initialized"}' \
|
|
248
|
+
'{"jsonrpc":"2.0","id":2,"method":"tools/call","params":{"name":"list_folders","arguments":{"kind":"system"}}}'
|
|
249
|
+
sleep 5
|
|
250
|
+
} | node dist/server.js
|
|
248
251
|
```
|
|
249
252
|
|
|
253
|
+
The `sleep` keeps the input open while the answer is on its way. A client signals that it is leaving by closing the server's input, and from that moment no further answer is written, so a plain `printf ... |` only ever gets the reply to `initialize`.
|
|
254
|
+
|
|
250
255
|
You should see your system mailboxes. If instead you get a message saying the Bridge is probably not running, start and unlock the Bridge and try again. The server explains what to do in its error messages rather than printing error codes.
|
|
251
256
|
|
|
252
257
|
## Security
|
|
253
258
|
|
|
254
259
|
The content of someone else's email is text written by strangers, and it is handed to a language model that can call tools. A crafted message may try to instruct the assistant. This server assumes that will happen:
|
|
255
260
|
|
|
256
|
-
- **Message content is marked as untrusted** in every answer, enclosed in
|
|
261
|
+
- **Message content is marked as untrusted** in every answer, enclosed in markers and separated from anything the server itself says. The markers carry a label drawn per answer, because a fixed one is written down in this repository: a sender could put the closing marker in the body and have everything after it read as though the server wrote it. A label that changes every time cannot be copied. For the same reason a subject, a display name or an attachment name never breaks across lines, however many line breaks it was sent with; the break is shown, not removed.
|
|
257
262
|
- **Nothing is filtered out of the content** and no attempt is made to detect attacks. Such filters pretend to offer safety they cannot deliver.
|
|
258
|
-
- **Sending
|
|
263
|
+
- **Sending always requires your confirmation**, enforced in the server rather than in a system prompt. There is no switch to turn it off, and a client that cannot ask the question cannot send.
|
|
259
264
|
- **There will be no permanent deletion**, and no tools for filters, forwarding, account or key settings. A hijacked session must not be able to leave behind lasting access.
|
|
260
265
|
- **HTML is never passed through raw** and external content is never fetched. Tracking pixels stay ineffective.
|
|
261
266
|
- **No message ever touches your disk.** No cache, no index, no copies. Anything this server wrote down would be your mail in plain text, outside the encryption you pay Proton for.
|
|
@@ -283,7 +288,7 @@ Formatting changes what a confirmation has to show, and that is the interesting
|
|
|
283
288
|
- **Text a recipient can read that the body does not show.** Measured: an image's alt text never appears in the converted body, and mail clients block remote images by default, so the alt text is frequently what the recipient actually reads. That was a way past the confirmation, and it is closed.
|
|
284
289
|
- **Every property beyond ordinary formatting**, when `extended` was used, with the ones that really put something out of sight marked as such.
|
|
285
290
|
|
|
286
|
-
What no level permits is `style` blocks, `script`, event handlers
|
|
291
|
+
What no level permits is `style` blocks, `script`, event handlers, `data:` addresses and comments. Comments look inert and are not: Outlook runs conditional ones, so a `<style>` block inside a comment reaches those recipients as markup while the confirmation and the preview see a comment. Addresses are checked wherever they appear, a CSS `background: url(...)` included, and every one of them is listed on the preview page. The line runs between describing a document and running inside it or reaching out of it: a `<style>` in the quote of a reply restyles the answer written above it, and 66 percent of real formatted mail carries one. Attachments from files on this machine are deliberately not supported either: a path named by a model, read by the server and carried out by the next confirmation is not a feature, it is a way out for anything on your disk. Forwarding loses nothing all the same, because the original message travels along whole, embedded images included.
|
|
287
292
|
|
|
288
293
|
One thing worth knowing about drafts: Proton rewrites the thread headers of anything it stores. A reply is built with `In-Reply-To` and `References`, and what comes back has neither, only Proton's own internal thread id. Threading a stored draft is therefore Proton's business rather than this server's.
|
|
289
294
|
|
|
@@ -363,14 +368,14 @@ The one moment this cannot protect you is the very first connection, which is wh
|
|
|
363
368
|
| Area | Choice |
|
|
364
369
|
| :--- | :--- |
|
|
365
370
|
| Language | TypeScript, Node.js 24 or newer |
|
|
366
|
-
| MCP | `@modelcontextprotocol/server` v2
|
|
371
|
+
| MCP | `@modelcontextprotocol/server` v2. Its newest protocol revision is 2025-11-25; the parts of 2026-07-28 this server prepares for are read defensively, see the comment in `src/tools/capabilities.ts` |
|
|
367
372
|
| IMAP | `imapflow` |
|
|
368
373
|
| MIME | `mailparser`, `html-to-text` |
|
|
369
|
-
| SMTP | `nodemailer
|
|
374
|
+
| SMTP | `nodemailer` |
|
|
370
375
|
| Schemas | `zod` |
|
|
371
376
|
| Tests | Vitest, `node` environment |
|
|
372
377
|
|
|
373
|
-
Every dependency is MIT
|
|
378
|
+
Every dependency that ships is permissive: mostly MIT, with Apache-2.0 (`@modelcontextprotocol/server` and `@modelcontextprotocol/core`, which are moving from MIT and keep it for older contributions), MIT-0 (`nodemailer`), BSD-2-Clause (the `htmlparser2` family), BSD-3-Clause (`deepmerge-ts`), ISC (`split2`) and one dual `MIT OR EUPL-1.1+` (`@zone-eu/mailsplit`). Development dependencies add MPL-2.0.
|
|
374
379
|
|
|
375
380
|
```bash
|
|
376
381
|
npm run build # compile into dist/
|
|
@@ -393,6 +398,8 @@ src/
|
|
|
393
398
|
├── tools/ the MCP tools and their output formatting
|
|
394
399
|
├── web/ the local interface and its security layer
|
|
395
400
|
├── activity.ts what is running and what ran, in memory only
|
|
401
|
+
├── config.ts the environment variables, read once at startup
|
|
402
|
+
├── in-flight.ts the counter that holds shutdown until answers are out
|
|
396
403
|
├── session.ts whether we are signed in, and where from
|
|
397
404
|
├── settings.ts the Bridge ports, when changed in the interface
|
|
398
405
|
└── server.ts entry point and transport
|
package/dist/in-flight.d.ts
CHANGED
|
@@ -2,9 +2,12 @@
|
|
|
2
2
|
* Bookkeeping for tool calls that are still running.
|
|
3
3
|
*
|
|
4
4
|
* Background: a stdio server learns that its client is gone by its input
|
|
5
|
-
* stream ending.
|
|
6
|
-
*
|
|
7
|
-
* call
|
|
5
|
+
* stream ending. The MCP SDK closes the transport at that point, so a call
|
|
6
|
+
* still in progress no longer gets its answer written; the client has said it
|
|
7
|
+
* is leaving and is not waiting for one. The work behind the call is another
|
|
8
|
+
* matter. Exiting right away would cut it off halfway, a message in the middle
|
|
9
|
+
* of being handed to the Bridge or a draft half replaced. Waiting forever would
|
|
10
|
+
* hang whenever a call never returns.
|
|
8
11
|
*
|
|
9
12
|
* Hence: keep count, and wait for a bounded grace period on shutdown.
|
|
10
13
|
*/
|
package/dist/in-flight.js
CHANGED
|
@@ -2,9 +2,12 @@
|
|
|
2
2
|
* Bookkeeping for tool calls that are still running.
|
|
3
3
|
*
|
|
4
4
|
* Background: a stdio server learns that its client is gone by its input
|
|
5
|
-
* stream ending.
|
|
6
|
-
*
|
|
7
|
-
* call
|
|
5
|
+
* stream ending. The MCP SDK closes the transport at that point, so a call
|
|
6
|
+
* still in progress no longer gets its answer written; the client has said it
|
|
7
|
+
* is leaving and is not waiting for one. The work behind the call is another
|
|
8
|
+
* matter. Exiting right away would cut it off halfway, a message in the middle
|
|
9
|
+
* of being handed to the Bridge or a draft half replaced. Waiting forever would
|
|
10
|
+
* hang whenever a call never returns.
|
|
8
11
|
*
|
|
9
12
|
* Hence: keep count, and wait for a bounded grace period on shutdown.
|
|
10
13
|
*/
|
package/dist/in-flight.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"in-flight.js","sourceRoot":"","sources":["../src/in-flight.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"in-flight.js","sourceRoot":"","sources":["../src/in-flight.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,KAAK,QAAQ,MAAM,eAAe,CAAA;AAEzC,IAAI,QAAQ,GAAG,CAAC,CAAA;AAChB,IAAI,aAAa,GAAsB,EAAE,CAAA;AAEzC,4EAA4E;AAC5E,MAAM,UAAU,aAAa;IAC3B,OAAO,QAAQ,CAAA;AACjB,CAAC;AAED;;;;;;;;;GASG;AACH,MAAM,CAAC,KAAK,UAAU,KAAK,CAAI,EAAoB,EAAE,IAAa;IAChE,QAAQ,EAAE,CAAA;IACV,MAAM,MAAM,GAAG,IAAI,KAAK,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,QAAQ,CAAC,KAAK,CAAC,IAAI,CAAC,CAAA;IACpE,IAAI,MAAM,GAAG,KAAK,CAAA;IAClB,IAAI,CAAC;QACH,OAAO,MAAM,EAAE,EAAE,CAAA;IACnB,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,MAAM,GAAG,IAAI,CAAA;QACb,MAAM,KAAK,CAAA;IACb,CAAC;YAAS,CAAC;QACT,IAAI,MAAM,KAAK,SAAS;YAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,CAAA;QAC3E,QAAQ,EAAE,CAAA;QACV,IAAI,QAAQ,KAAK,CAAC,EAAE,CAAC;YACnB,MAAM,OAAO,GAAG,aAAa,CAAA;YAC7B,aAAa,GAAG,EAAE,CAAA;YAClB,KAAK,MAAM,OAAO,IAAI,OAAO;gBAAE,OAAO,EAAE,CAAA;QAC1C,CAAC;IACH,CAAC;AACH,CAAC;AAED;;;;;;GAMG;AACH,MAAM,UAAU,WAAW,CAAC,KAAK,GAAG,IAAI;IACtC,IAAI,QAAQ,KAAK,CAAC;QAAE,OAAO,OAAO,CAAC,OAAO,CAAC,IAAI,CAAC,CAAA;IAEhD,OAAO,IAAI,OAAO,CAAU,CAAC,OAAO,EAAE,EAAE;QACtC,MAAM,KAAK,GAAG,UAAU,CAAC,GAAG,EAAE;YAC5B,aAAa,GAAG,aAAa,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,KAAK,MAAM,CAAC,CAAA;YACzD,OAAO,CAAC,KAAK,CAAC,CAAA;QAChB,CAAC,EAAE,KAAK,CAAC,CAAA;QAET,MAAM,MAAM,GAAG,GAAG,EAAE;YAClB,YAAY,CAAC,KAAK,CAAC,CAAA;YACnB,OAAO,CAAC,IAAI,CAAC,CAAA;QACf,CAAC,CAAA;QACD,aAAa,CAAC,IAAI,CAAC,MAAM,CAAC,CAAA;IAC5B,CAAC,CAAC,CAAA;AACJ,CAAC;AAED,wCAAwC;AACxC,MAAM,UAAU,MAAM;IACpB,QAAQ,GAAG,CAAC,CAAA;IACZ,aAAa,GAAG,EAAE,CAAA;AACpB,CAAC"}
|
package/dist/mail/actions.d.ts
CHANGED
|
@@ -102,8 +102,6 @@ export interface FlagChanges {
|
|
|
102
102
|
* were correct immediately and unchanged twenty seconds later.
|
|
103
103
|
*/
|
|
104
104
|
export declare function setFlags(connection: Connection, readOnly: boolean, messageIds: string[], changes: FlagChanges, hint?: string): Promise<BatchResult>;
|
|
105
|
-
/** The mailbox Proton puts discarded messages in. Nothing here empties it. */
|
|
106
|
-
export declare const TRASH = "Trash";
|
|
107
105
|
/**
|
|
108
106
|
* Moves messages to the trash.
|
|
109
107
|
*
|
package/dist/mail/actions.js
CHANGED
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
* keeps it in "All Mail", which the measurement confirmed.
|
|
31
31
|
*/
|
|
32
32
|
import { BridgeError } from '../bridge/errors.js';
|
|
33
|
-
import { normaliseMessageId, ALL_MAIL } from './ids.js';
|
|
33
|
+
import { normaliseMessageId, findByMessageId, ALL_MAIL, TRASH } from './ids.js';
|
|
34
34
|
import { LABEL_PREFIX } from './labels.js';
|
|
35
35
|
/**
|
|
36
36
|
* How many messages one call may touch.
|
|
@@ -104,10 +104,13 @@ export async function findHomeFolder(connection, rawId, hint) {
|
|
|
104
104
|
// The Bridge answers a fetch on an empty mailbox with BAD.
|
|
105
105
|
if (status.messages === 0)
|
|
106
106
|
return undefined;
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
107
|
+
// findByMessageId rather than a search written out here. It makes the
|
|
108
|
+
// second attempt without the angle brackets and verifies every hit of
|
|
109
|
+
// it, which real mail needs: an identifier is not always bracketed, and
|
|
110
|
+
// the incident behind that fallback was "marking 67 messages left that
|
|
111
|
+
// one behind" - marking goes through setFlags to this function, so the
|
|
112
|
+
// path the incident happened in was the one without the fallback.
|
|
113
|
+
return findByMessageId(client, messageId);
|
|
111
114
|
})
|
|
112
115
|
.catch(() => undefined);
|
|
113
116
|
return found;
|
|
@@ -250,8 +253,6 @@ export async function setFlags(connection, readOnly, messageIds, changes, hint)
|
|
|
250
253
|
}
|
|
251
254
|
return summarise(outcomes);
|
|
252
255
|
}
|
|
253
|
-
/** The mailbox Proton puts discarded messages in. Nothing here empties it. */
|
|
254
|
-
export const TRASH = 'Trash';
|
|
255
256
|
/**
|
|
256
257
|
* Moves messages to the trash.
|
|
257
258
|
*
|
package/dist/mail/actions.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"actions.js","sourceRoot":"","sources":["../../src/mail/actions.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AAGH,OAAO,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAA;AACjD,O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
34
34
|
* How much markup this message may carry. Absent means `standard`.
|
|
35
35
|
*
|
|
36
36
|
* Part of the draft rather than a parameter beside it, because it decides
|
|
37
|
-
* what the message is allowed to contain
|
|
38
|
-
*
|
|
39
|
-
*
|
|
37
|
+
* what the message is allowed to contain.
|
|
38
|
+
*
|
|
39
|
+
* Covered by the digest, alongside the markup itself. The level does not
|
|
40
|
+
* change the bytes that go out, but it changes what the question says: at
|
|
41
|
+
* `extended` the confirmation warns and the preview lists every property
|
|
42
|
+
* used. Binding it means a yes given to the warned version cannot be
|
|
43
|
+
* replayed for the unwarned one.
|
|
40
44
|
*/
|
|
41
45
|
markupLevel?: MarkupLevel;
|
|
42
46
|
/** A whole message carried along, used when forwarding. */
|
|
@@ -132,29 +136,15 @@ export declare function quote(original: {
|
|
|
132
136
|
subject: string;
|
|
133
137
|
text: string;
|
|
134
138
|
}, limit?: number): string;
|
|
135
|
-
/** Turns text into markup that says exactly what the text said. */
|
|
136
|
-
export declare function escapeHtml(text: string): string;
|
|
137
139
|
/**
|
|
138
|
-
*
|
|
139
|
-
*
|
|
140
|
-
* **The quote is built from the original's text, never from its markup**, and
|
|
141
|
-
* that is the whole design rather than a shortcut. Two reasons, and the second
|
|
142
|
-
* is the one that matters:
|
|
140
|
+
* Turns text into markup that says exactly what the text said.
|
|
143
141
|
*
|
|
144
|
-
*
|
|
145
|
-
*
|
|
146
|
-
*
|
|
147
|
-
*
|
|
148
|
-
* 2. It would put markup written by somebody else into a message sent under
|
|
149
|
-
* this account's name. A link in the quote could show one thing and go
|
|
150
|
-
* somewhere else, and it would ride along into the reply without anybody
|
|
151
|
-
* having written it.
|
|
152
|
-
*
|
|
153
|
-
* The text comes from the same conversion this server uses to read a message,
|
|
154
|
-
* so a link in the original appears as its address in the quote. A phishing
|
|
155
|
-
* mail quoted in a reply arrives with its targets in plain sight. It is then
|
|
156
|
-
* escaped, because text that happens to contain angle brackets must stay text.
|
|
142
|
+
* For element content. It does not escape the apostrophe, so it is not safe for
|
|
143
|
+
* a single-quoted attribute value; every caller here puts the result between
|
|
144
|
+
* tags. The interface has its own escapeHtml which does cover it, for markup it
|
|
145
|
+
* builds with attributes.
|
|
157
146
|
*/
|
|
147
|
+
export declare function escapeHtml(text: string): string;
|
|
158
148
|
/**
|
|
159
149
|
* The quoted body alone, without the "wrote:" line.
|
|
160
150
|
*
|
|
@@ -265,14 +255,21 @@ export interface QuoteSummary {
|
|
|
265
255
|
* message on average and up to thirty links. Listing those would bury the two
|
|
266
256
|
* addresses that matter under thirty that arrived in the sender's mailbox
|
|
267
257
|
* anyway, and a confirmation nobody reads to the end protects nobody.
|
|
258
|
+
*
|
|
259
|
+
* Worth knowing about the trade: because the quote keeps the original's markup,
|
|
260
|
+
* a link in it shows its text and hides its target, the same as in the message
|
|
261
|
+
* that arrived. An earlier version quoted as text, where every target was
|
|
262
|
+
* spelled out. What replaces that is the rendered preview page, where the quote
|
|
263
|
+
* is visible as the recipient will see it.
|
|
268
264
|
*/
|
|
269
265
|
export declare function summariseQuote(draft: Draft): QuoteSummary | undefined;
|
|
270
266
|
/**
|
|
271
267
|
* Everything the message points at or carries, for the confirmation.
|
|
272
268
|
*
|
|
273
|
-
* Kept whole and never shortened. The
|
|
274
|
-
*
|
|
275
|
-
*
|
|
269
|
+
* Kept whole and never shortened. The confirmation carries counts and the
|
|
270
|
+
* preview page carries the detail, so this is the list a person reads before
|
|
271
|
+
* answering. Shortening it would hide the entry on line thirty, which is
|
|
272
|
+
* precisely where one would be put to avoid being read.
|
|
276
273
|
*/
|
|
277
274
|
export declare function describeAttachments(draft: Draft): string[];
|
|
278
275
|
/** The addresses in a message's markup, with the text they are shown as. */
|
package/dist/mail/compose.js
CHANGED
|
@@ -188,7 +188,14 @@ function quoteHeader(original) {
|
|
|
188
188
|
: 'an unknown date';
|
|
189
189
|
return `On ${escapeHtml(when)}, ${escapeHtml(who)} wrote:`;
|
|
190
190
|
}
|
|
191
|
-
/**
|
|
191
|
+
/**
|
|
192
|
+
* Turns text into markup that says exactly what the text said.
|
|
193
|
+
*
|
|
194
|
+
* For element content. It does not escape the apostrophe, so it is not safe for
|
|
195
|
+
* a single-quoted attribute value; every caller here puts the result between
|
|
196
|
+
* tags. The interface has its own escapeHtml which does cover it, for markup it
|
|
197
|
+
* builds with attributes.
|
|
198
|
+
*/
|
|
192
199
|
export function escapeHtml(text) {
|
|
193
200
|
return text
|
|
194
201
|
.replace(/&/g, '&')
|
|
@@ -196,27 +203,6 @@ export function escapeHtml(text) {
|
|
|
196
203
|
.replace(/>/g, '>')
|
|
197
204
|
.replace(/"/g, '"');
|
|
198
205
|
}
|
|
199
|
-
/**
|
|
200
|
-
* Quotes a message inside a formatted reply.
|
|
201
|
-
*
|
|
202
|
-
* **The quote is built from the original's text, never from its markup**, and
|
|
203
|
-
* that is the whole design rather than a shortcut. Two reasons, and the second
|
|
204
|
-
* is the one that matters:
|
|
205
|
-
*
|
|
206
|
-
* 1. Carrying the original's markup would mean checking a stranger's HTML
|
|
207
|
-
* against the permitted set and refusing the reply when it fails. Ordinary
|
|
208
|
-
* mail is full of `<style>` blocks, so replying to real messages would
|
|
209
|
-
* mostly not work.
|
|
210
|
-
* 2. It would put markup written by somebody else into a message sent under
|
|
211
|
-
* this account's name. A link in the quote could show one thing and go
|
|
212
|
-
* somewhere else, and it would ride along into the reply without anybody
|
|
213
|
-
* having written it.
|
|
214
|
-
*
|
|
215
|
-
* The text comes from the same conversion this server uses to read a message,
|
|
216
|
-
* so a link in the original appears as its address in the quote. A phishing
|
|
217
|
-
* mail quoted in a reply arrives with its targets in plain sight. It is then
|
|
218
|
-
* escaped, because text that happens to contain angle brackets must stay text.
|
|
219
|
-
*/
|
|
220
206
|
/**
|
|
221
207
|
* The quoted body alone, without the "wrote:" line.
|
|
222
208
|
*
|
|
@@ -313,8 +299,9 @@ export const MARKUP_NOTE = 'A message may instead be written as markup, in the h
|
|
|
313
299
|
'arrive. Permitted are headings, paragraphs, line breaks, rules, quotes, emphasis, lists, ' +
|
|
314
300
|
'tables, links and images, with colour, font, alignment, spacing and borders. Anything else ' +
|
|
315
301
|
'is refused rather than quietly removed, and the answer names what and why. Note that the ' +
|
|
316
|
-
'confirmation
|
|
317
|
-
'images, and every alt text, because those are what a
|
|
302
|
+
'preview page linked from the confirmation lists every address in the message in full, ' +
|
|
303
|
+
'including the ones behind links and images, and every alt text, because those are what a ' +
|
|
304
|
+
'recipient reads. The question in the client stays short and carries counts instead.';
|
|
318
305
|
/**
|
|
319
306
|
* What a caller is told about the two levels.
|
|
320
307
|
*
|
|
@@ -372,6 +359,12 @@ export function composedBody(draft) {
|
|
|
372
359
|
* message on average and up to thirty links. Listing those would bury the two
|
|
373
360
|
* addresses that matter under thirty that arrived in the sender's mailbox
|
|
374
361
|
* anyway, and a confirmation nobody reads to the end protects nobody.
|
|
362
|
+
*
|
|
363
|
+
* Worth knowing about the trade: because the quote keeps the original's markup,
|
|
364
|
+
* a link in it shows its text and hides its target, the same as in the message
|
|
365
|
+
* that arrived. An earlier version quoted as text, where every target was
|
|
366
|
+
* spelled out. What replaces that is the rendered preview page, where the quote
|
|
367
|
+
* is visible as the recipient will see it.
|
|
375
368
|
*/
|
|
376
369
|
export function summariseQuote(draft) {
|
|
377
370
|
if (!draft.quotedHtml)
|
|
@@ -386,9 +379,10 @@ export function summariseQuote(draft) {
|
|
|
386
379
|
/**
|
|
387
380
|
* Everything the message points at or carries, for the confirmation.
|
|
388
381
|
*
|
|
389
|
-
* Kept whole and never shortened. The
|
|
390
|
-
*
|
|
391
|
-
*
|
|
382
|
+
* Kept whole and never shortened. The confirmation carries counts and the
|
|
383
|
+
* preview page carries the detail, so this is the list a person reads before
|
|
384
|
+
* answering. Shortening it would hide the entry on line thirty, which is
|
|
385
|
+
* precisely where one would be put to avoid being read.
|
|
392
386
|
*/
|
|
393
387
|
export function describeAttachments(draft) {
|
|
394
388
|
const lines = [];
|
package/dist/mail/compose.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"compose.js","s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OAAO,oBAAoB,CAAC,KAAK,CAAC,IAAI,EAAE,KAAK,CAAC,WAAW,IAAI,UAAU,CAAC,CAAC,UAAU,CAAA;AACrF,CAAC"}
|
package/dist/mail/drafts.d.ts
CHANGED
|
@@ -40,6 +40,7 @@
|
|
|
40
40
|
*/
|
|
41
41
|
import type { Connection } from '../bridge/connection.js';
|
|
42
42
|
import { type ListResult } from './messages.js';
|
|
43
|
+
import type { MarkupLevel } from './markup.js';
|
|
43
44
|
import { type Draft, type Recipient } from './compose.js';
|
|
44
45
|
/** The one mailbox this module writes to. */
|
|
45
46
|
export declare const DRAFTS = "Drafts";
|
|
@@ -57,6 +58,16 @@ export interface DraftInput {
|
|
|
57
58
|
subject?: string | undefined;
|
|
58
59
|
text?: string | undefined;
|
|
59
60
|
html?: string | undefined;
|
|
61
|
+
/**
|
|
62
|
+
* How much markup the body may carry. Absent means `standard`.
|
|
63
|
+
*
|
|
64
|
+
* This field was missing while every draft tool already declared it in its
|
|
65
|
+
* input schema, so a caller asking for `extended` was validated against
|
|
66
|
+
* `standard` and refused with a message naming the level it had just asked
|
|
67
|
+
* for. Because a variable rather than an object literal is passed in, excess
|
|
68
|
+
* property checking never flagged it.
|
|
69
|
+
*/
|
|
70
|
+
markupLevel?: MarkupLevel | undefined;
|
|
60
71
|
}
|
|
61
72
|
export interface DraftResult {
|
|
62
73
|
messageId: string;
|
|
@@ -94,12 +105,14 @@ export declare function buildReplyDraft(connection: Connection, fromAddress: str
|
|
|
94
105
|
all?: boolean;
|
|
95
106
|
mailbox?: string;
|
|
96
107
|
html?: string;
|
|
108
|
+
markupLevel?: MarkupLevel;
|
|
97
109
|
}): Promise<Draft>;
|
|
98
110
|
/** Prepares a reply and stores it as a draft. */
|
|
99
111
|
export declare function replyDraft(connection: Connection, readOnly: boolean, fromAddress: string, messageId: string, text: string, options?: {
|
|
100
112
|
all?: boolean;
|
|
101
113
|
mailbox?: string;
|
|
102
114
|
html?: string;
|
|
115
|
+
markupLevel?: MarkupLevel;
|
|
103
116
|
}): Promise<DraftResult>;
|
|
104
117
|
/**
|
|
105
118
|
* Prepares a forward as a draft.
|
|
@@ -112,11 +125,13 @@ export declare function replyDraft(connection: Connection, readOnly: boolean, fr
|
|
|
112
125
|
export declare function buildForwardDraft(connection: Connection, fromAddress: string, messageId: string, to: string[], text: string, options?: {
|
|
113
126
|
mailbox?: string;
|
|
114
127
|
html?: string;
|
|
128
|
+
markupLevel?: MarkupLevel;
|
|
115
129
|
}): Promise<Draft>;
|
|
116
130
|
/** Prepares a forward and stores it as a draft. */
|
|
117
131
|
export declare function forwardDraft(connection: Connection, readOnly: boolean, fromAddress: string, messageId: string, to: string[], text: string, options?: {
|
|
118
132
|
mailbox?: string;
|
|
119
133
|
html?: string;
|
|
134
|
+
markupLevel?: MarkupLevel;
|
|
120
135
|
}): Promise<DraftResult>;
|
|
121
136
|
/** The drafts that are there. Reading only. */
|
|
122
137
|
export declare function listDrafts(connection: Connection, options?: {
|
package/dist/mail/drafts.js
CHANGED
|
@@ -134,6 +134,7 @@ export async function createDraft(connection, readOnly, fromAddress, input) {
|
|
|
134
134
|
text: input.html !== undefined ? htmlToText(input.html) : (input.text ?? ''),
|
|
135
135
|
messageId: mintMessageId(from.address),
|
|
136
136
|
...(input.html !== undefined ? { html: input.html } : {}),
|
|
137
|
+
...(input.markupLevel !== undefined ? { markupLevel: input.markupLevel } : {}),
|
|
137
138
|
};
|
|
138
139
|
const raw = await buildMessage(draft, { keepBcc: true });
|
|
139
140
|
const uid = await appendDraft(connection, raw);
|
|
@@ -211,13 +212,23 @@ export async function updateDraft(connection, readOnly, fromAddress, messageId,
|
|
|
211
212
|
* what was there, markup included, which is what makes changing only the
|
|
212
213
|
* subject of a formatted draft leave the formatting alone.
|
|
213
214
|
*/
|
|
215
|
+
/**
|
|
216
|
+
* The body of an updated draft, and the level it is held to.
|
|
217
|
+
*
|
|
218
|
+
* The level travels with the body rather than beside it: a caller replacing the
|
|
219
|
+
* markup states which level the new markup is meant for, and one that only
|
|
220
|
+
* changes the subject keeps the stored body without a level, which means
|
|
221
|
+
* `standard`. A level carried over onto markup nobody re-stated would be a
|
|
222
|
+
* permission granted by an earlier call.
|
|
223
|
+
*/
|
|
214
224
|
function markupOf(changes, current) {
|
|
225
|
+
const level = changes.markupLevel !== undefined ? { markupLevel: changes.markupLevel } : {};
|
|
215
226
|
if (changes.html !== undefined)
|
|
216
|
-
return { text: htmlToText(changes.html), html: changes.html };
|
|
227
|
+
return { text: htmlToText(changes.html), html: changes.html, ...level };
|
|
217
228
|
if (changes.text !== undefined)
|
|
218
229
|
return { text: changes.text };
|
|
219
230
|
return current.html !== undefined
|
|
220
|
-
? { text: current.text, html: current.html }
|
|
231
|
+
? { text: current.text, html: current.html, ...level }
|
|
221
232
|
: { text: current.text };
|
|
222
233
|
}
|
|
223
234
|
/**
|
|
@@ -298,6 +309,7 @@ export async function buildReplyDraft(connection, fromAddress, messageId, text,
|
|
|
298
309
|
subject: prefixSubject(original.subject, 'Re'),
|
|
299
310
|
...body,
|
|
300
311
|
messageId: mintMessageId(from.address),
|
|
312
|
+
...(options.markupLevel !== undefined ? { markupLevel: options.markupLevel } : {}),
|
|
301
313
|
...(thread.messageId ? { inReplyTo: thread.messageId } : {}),
|
|
302
314
|
references: [...thread.references, ...(thread.messageId ? [thread.messageId] : [])],
|
|
303
315
|
};
|
|
@@ -309,13 +321,19 @@ export async function replyDraft(connection, readOnly, fromAddress, messageId, t
|
|
|
309
321
|
const draft = await buildReplyDraft(connection, fromAddress, messageId, text, options);
|
|
310
322
|
return store(connection, draft);
|
|
311
323
|
}
|
|
312
|
-
/**
|
|
324
|
+
/**
|
|
325
|
+
* The uid of a message inside one mailbox.
|
|
326
|
+
*
|
|
327
|
+
* findByMessageId rather than a search written out here, because it makes the
|
|
328
|
+
* second attempt without the angle brackets and verifies every hit of it. Real
|
|
329
|
+
* mail carries unbracketed identifiers, and without the fallback this threw
|
|
330
|
+
* "the message is no longer in Drafts" for a message that had not moved.
|
|
331
|
+
*/
|
|
313
332
|
async function uidOf(connection, path, messageId) {
|
|
314
333
|
const uid = await connection.withMailbox(path, async (client, status) => {
|
|
315
334
|
if (status.messages === 0)
|
|
316
335
|
return undefined;
|
|
317
|
-
|
|
318
|
-
return Array.isArray(hits) && hits.length ? Math.max(...hits) : undefined;
|
|
336
|
+
return findByMessageId(client, messageId);
|
|
319
337
|
});
|
|
320
338
|
if (uid === undefined) {
|
|
321
339
|
throw new BridgeError(`The message ${messageId} is no longer in "${path}".`);
|
|
@@ -372,6 +390,7 @@ export async function buildForwardDraft(connection, fromAddress, messageId, to,
|
|
|
372
390
|
};
|
|
373
391
|
})()),
|
|
374
392
|
messageId: mintMessageId(from.address),
|
|
393
|
+
...(options.markupLevel !== undefined ? { markupLevel: options.markupLevel } : {}),
|
|
375
394
|
};
|
|
376
395
|
// Only when there is something a quoted body would lose.
|
|
377
396
|
if (original.attachments.length > 0) {
|