@diskd-ai/email-client-mcp 0.1.5 → 0.1.7
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/imap/fetch.d.ts +15 -5
- package/dist/imap/fetch.js +70 -19
- package/dist/imap/fetch.js.map +1 -1
- package/dist/tools/getEmail.d.ts +2 -2
- package/dist/tools/getEmails.d.ts +2 -2
- package/package.json +5 -1
package/dist/imap/fetch.d.ts
CHANGED
|
@@ -3,10 +3,10 @@
|
|
|
3
3
|
* read tools (`get_email`, `get_emails`, `list_emails`). All helpers are
|
|
4
4
|
* BODY.PEEK by default so reads do not silently flip `\\Seen`.
|
|
5
5
|
*
|
|
6
|
-
* Body decoding strategy:
|
|
7
|
-
* `text/plain` and `text/html
|
|
8
|
-
*
|
|
9
|
-
*
|
|
6
|
+
* Body decoding strategy: first fetch `BODYSTRUCTURE`, then request the
|
|
7
|
+
* concrete MIME part ids for `text/plain` and `text/html`. Never pass semantic
|
|
8
|
+
* names such as `html` to imapflow: some IMAP servers (OVH) reject
|
|
9
|
+
* `BODY.PEEK[HTML]` with `BAD Command Argument Error. 11`.
|
|
10
10
|
*/
|
|
11
11
|
import type { ImapFlow } from "imapflow";
|
|
12
12
|
import type { FetchedMessageLike } from "./mapper.js";
|
|
@@ -15,6 +15,15 @@ export type FolderStatusSnapshot = {
|
|
|
15
15
|
readonly uidNext: number;
|
|
16
16
|
readonly messages: number;
|
|
17
17
|
};
|
|
18
|
+
type BodyPartCandidate = {
|
|
19
|
+
readonly textPartId: string | null;
|
|
20
|
+
readonly htmlPartId: string | null;
|
|
21
|
+
};
|
|
22
|
+
/**
|
|
23
|
+
* Find concrete IMAP body part ids for display bodies.
|
|
24
|
+
* Attachments are skipped.
|
|
25
|
+
*/
|
|
26
|
+
export declare const findDisplayBodyPartIds: (bodyStructure: unknown) => BodyPartCandidate;
|
|
18
27
|
/**
|
|
19
28
|
* Run a callback under a per-folder IMAP lock. imapflow requires this
|
|
20
29
|
* for any FETCH/STORE/MOVE operation. The lock is released even if the
|
|
@@ -29,7 +38,7 @@ export type FetchedEnvelopeBundle = {
|
|
|
29
38
|
};
|
|
30
39
|
/**
|
|
31
40
|
* UID-range fetch for the watcher. Yields envelope + flags + bodyStructure
|
|
32
|
-
*
|
|
41
|
+
* plus display body parts without setting `\\Seen`.
|
|
33
42
|
*/
|
|
34
43
|
export declare function fetchUidRange(client: ImapFlow, fromUid: number, toUid: number): AsyncIterable<FetchedEnvelopeBundle>;
|
|
35
44
|
/**
|
|
@@ -42,3 +51,4 @@ export declare const fetchOneByUid: (client: ImapFlow, uid: number) => Promise<F
|
|
|
42
51
|
* watcher's flag-reconciliation pass (no body, no bodyStructure).
|
|
43
52
|
*/
|
|
44
53
|
export declare function fetchEnvelopesUidRange(client: ImapFlow, fromUid: number, toUid: number): AsyncIterable<FetchedMessageLike>;
|
|
54
|
+
export {};
|
package/dist/imap/fetch.js
CHANGED
|
@@ -3,12 +3,51 @@
|
|
|
3
3
|
* read tools (`get_email`, `get_emails`, `list_emails`). All helpers are
|
|
4
4
|
* BODY.PEEK by default so reads do not silently flip `\\Seen`.
|
|
5
5
|
*
|
|
6
|
-
* Body decoding strategy:
|
|
7
|
-
* `text/plain` and `text/html
|
|
8
|
-
*
|
|
9
|
-
*
|
|
6
|
+
* Body decoding strategy: first fetch `BODYSTRUCTURE`, then request the
|
|
7
|
+
* concrete MIME part ids for `text/plain` and `text/html`. Never pass semantic
|
|
8
|
+
* names such as `html` to imapflow: some IMAP servers (OVH) reject
|
|
9
|
+
* `BODY.PEEK[HTML]` with `BAD Command Argument Error. 11`.
|
|
10
10
|
*/
|
|
11
|
-
const
|
|
11
|
+
const isAttachmentNode = (node) => node.disposition === "attachment" ||
|
|
12
|
+
(node.disposition === "inline" &&
|
|
13
|
+
Boolean(node.dispositionParameters?.filename ?? node.parameters?.name));
|
|
14
|
+
const fallbackSinglePartId = (type) => {
|
|
15
|
+
if (type === "text/plain" || type === "text/html")
|
|
16
|
+
return "1";
|
|
17
|
+
return null;
|
|
18
|
+
};
|
|
19
|
+
/**
|
|
20
|
+
* Find concrete IMAP body part ids for display bodies.
|
|
21
|
+
* Attachments are skipped.
|
|
22
|
+
*/
|
|
23
|
+
export const findDisplayBodyPartIds = (bodyStructure) => {
|
|
24
|
+
const result = {
|
|
25
|
+
textPartId: null,
|
|
26
|
+
htmlPartId: null,
|
|
27
|
+
};
|
|
28
|
+
const visit = (raw) => {
|
|
29
|
+
if (result.textPartId && result.htmlPartId)
|
|
30
|
+
return;
|
|
31
|
+
if (typeof raw !== "object" || raw === null || Array.isArray(raw))
|
|
32
|
+
return;
|
|
33
|
+
const node = raw;
|
|
34
|
+
if (isAttachmentNode(node))
|
|
35
|
+
return;
|
|
36
|
+
const type = node.type?.toLowerCase();
|
|
37
|
+
const partId = node.part ?? fallbackSinglePartId(type);
|
|
38
|
+
if (type === "text/plain" && partId && !result.textPartId) {
|
|
39
|
+
result.textPartId = partId;
|
|
40
|
+
}
|
|
41
|
+
else if (type === "text/html" && partId && !result.htmlPartId) {
|
|
42
|
+
result.htmlPartId = partId;
|
|
43
|
+
}
|
|
44
|
+
for (const child of node.childNodes ?? []) {
|
|
45
|
+
visit(child);
|
|
46
|
+
}
|
|
47
|
+
};
|
|
48
|
+
visit(bodyStructure);
|
|
49
|
+
return result;
|
|
50
|
+
};
|
|
12
51
|
/**
|
|
13
52
|
* Run a callback under a per-folder IMAP lock. imapflow requires this
|
|
14
53
|
* for any FETCH/STORE/MOVE operation. The lock is released even if the
|
|
@@ -42,13 +81,21 @@ const decodeBuffer = (b) => {
|
|
|
42
81
|
return null;
|
|
43
82
|
return b.toString("utf8");
|
|
44
83
|
};
|
|
45
|
-
const
|
|
46
|
-
const
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
84
|
+
const fetchDisplayBodies = async (client, uid, bodyStructure) => {
|
|
85
|
+
const { textPartId, htmlPartId } = findDisplayBodyPartIds(bodyStructure);
|
|
86
|
+
const partIds = [...new Set([textPartId, htmlPartId].filter((id) => id !== null))];
|
|
87
|
+
if (partIds.length === 0) {
|
|
88
|
+
return { bodyText: null, bodyHtml: null };
|
|
89
|
+
}
|
|
90
|
+
const bodyMsg = await client.fetchOne(String(uid), {
|
|
91
|
+
uid: true,
|
|
92
|
+
bodyParts: partIds,
|
|
93
|
+
}, { uid: true });
|
|
94
|
+
const bodyParts = bodyMsg === false ? undefined : bodyMsg.bodyParts;
|
|
95
|
+
return {
|
|
96
|
+
bodyText: textPartId ? decodeBuffer(bodyParts?.get(textPartId)) : null,
|
|
97
|
+
bodyHtml: htmlPartId ? decodeBuffer(bodyParts?.get(htmlPartId)) : null,
|
|
98
|
+
};
|
|
52
99
|
};
|
|
53
100
|
const toInternalDate = (raw) => {
|
|
54
101
|
if (raw instanceof Date)
|
|
@@ -68,22 +115,26 @@ const toLike = (msg) => ({
|
|
|
68
115
|
});
|
|
69
116
|
/**
|
|
70
117
|
* UID-range fetch for the watcher. Yields envelope + flags + bodyStructure
|
|
71
|
-
*
|
|
118
|
+
* plus display body parts without setting `\\Seen`.
|
|
72
119
|
*/
|
|
73
120
|
export async function* fetchUidRange(client, fromUid, toUid) {
|
|
74
121
|
const range = `${fromUid}:${toUid}`;
|
|
122
|
+
const messages = [];
|
|
75
123
|
for await (const msg of client.fetch(range, {
|
|
76
124
|
uid: true,
|
|
77
125
|
flags: true,
|
|
78
126
|
envelope: true,
|
|
79
127
|
bodyStructure: true,
|
|
80
|
-
bodyParts: BODY_PARTS,
|
|
81
128
|
internalDate: true,
|
|
82
129
|
}, { uid: true })) {
|
|
130
|
+
messages.push(msg);
|
|
131
|
+
}
|
|
132
|
+
for (const msg of messages) {
|
|
133
|
+
const bodies = await fetchDisplayBodies(client, msg.uid, msg.bodyStructure);
|
|
83
134
|
yield {
|
|
84
135
|
imapMessage: toLike(msg),
|
|
85
|
-
bodyText:
|
|
86
|
-
bodyHtml:
|
|
136
|
+
bodyText: bodies.bodyText,
|
|
137
|
+
bodyHtml: bodies.bodyHtml,
|
|
87
138
|
};
|
|
88
139
|
}
|
|
89
140
|
}
|
|
@@ -97,15 +148,15 @@ export const fetchOneByUid = async (client, uid) => {
|
|
|
97
148
|
flags: true,
|
|
98
149
|
envelope: true,
|
|
99
150
|
bodyStructure: true,
|
|
100
|
-
bodyParts: BODY_PARTS,
|
|
101
151
|
internalDate: true,
|
|
102
152
|
}, { uid: true });
|
|
103
153
|
if (!msg)
|
|
104
154
|
return null;
|
|
155
|
+
const bodies = await fetchDisplayBodies(client, msg.uid, msg.bodyStructure);
|
|
105
156
|
return {
|
|
106
157
|
imapMessage: toLike(msg),
|
|
107
|
-
bodyText:
|
|
108
|
-
bodyHtml:
|
|
158
|
+
bodyText: bodies.bodyText,
|
|
159
|
+
bodyHtml: bodies.bodyHtml,
|
|
109
160
|
};
|
|
110
161
|
};
|
|
111
162
|
/**
|
package/dist/imap/fetch.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fetch.js","sourceRoot":"","sources":["../../src/imap/fetch.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;
|
|
1
|
+
{"version":3,"file":"fetch.js","sourceRoot":"","sources":["../../src/imap/fetch.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAyBH,MAAM,gBAAgB,GAAG,CAAC,IAAuB,EAAW,EAAE,CAC5D,IAAI,CAAC,WAAW,KAAK,YAAY;IACjC,CAAC,IAAI,CAAC,WAAW,KAAK,QAAQ;QAC5B,OAAO,CAAC,IAAI,CAAC,qBAAqB,EAAE,QAAQ,IAAI,IAAI,CAAC,UAAU,EAAE,IAAI,CAAC,CAAC,CAAC;AAE5E,MAAM,oBAAoB,GAAG,CAAC,IAAwB,EAAiB,EAAE;IACvE,IAAI,IAAI,KAAK,YAAY,IAAI,IAAI,KAAK,WAAW;QAAE,OAAO,GAAG,CAAC;IAC9D,OAAO,IAAI,CAAC;AACd,CAAC,CAAC;AAEF;;;G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,GAAG,MAAM,MAAM,CAAC,QAAQ,CAC/B,MAAM,CAAC,GAAG,CAAC,EACX;QACE,GAAG,EAAE,IAAI;QACT,KAAK,EAAE,IAAI;QACX,QAAQ,EAAE,IAAI;QACd,aAAa,EAAE,IAAI;QACnB,YAAY,EAAE,IAAI;KACnB,EACD,EAAE,GAAG,EAAE,IAAI,EAAE,CACd,CAAC;IACF,IAAI,CAAC,GAAG;QAAE,OAAO,IAAI,CAAC;IACtB,MAAM,MAAM,GAAG,MAAM,kBAAkB,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,EAAE,GAAG,CAAC,aAAa,CAAC,CAAC;IAC5E,OAAO;QACL,WAAW,EAAE,MAAM,CAAC,GAAG,CAAC;QACxB,QAAQ,EAAE,MAAM,CAAC,QAAQ;QACzB,QAAQ,EAAE,MAAM,CAAC,QAAQ;KAC1B,CAAC;AACJ,CAAC,CAAC;AAEF;;;GAGG;AACH,MAAM,CAAC,KAAK,SAAS,CAAC,CAAC,sBAAsB,CAC3C,MAAgB,EAChB,OAAe,EACf,KAAa;IAEb,MAAM,KAAK,GAAG,GAAG,OAAO,IAAI,KAAK,EAAE,CAAC;IACpC,IAAI,KAAK,EAAE,MAAM,GAAG,IAAI,MAAM,CAAC,KAAK,CAClC,KAAK,EACL;QACE,GAAG,EAAE,IAAI;QACT,KAAK,EAAE,IAAI;QACX,QAAQ,EAAE,IAAI;QACd,aAAa,EAAE,IAAI;QACnB,YAAY,EAAE,IAAI;KACnB,EACD,EAAE,GAAG,EAAE,IAAI,EAAE,CACd,EAAE,CAAC;QACF,MAAM,MAAM,CAAC,GAAG,CAAC,CAAC;IACpB,CAAC;AACH,CAAC"}
|
package/dist/tools/getEmail.d.ts
CHANGED
|
@@ -21,14 +21,14 @@ export declare const getEmailInput: z.ZodObject<{
|
|
|
21
21
|
uid: number;
|
|
22
22
|
mailbox: string;
|
|
23
23
|
account: string;
|
|
24
|
-
format: "
|
|
24
|
+
format: "raw" | "text" | "stripped";
|
|
25
25
|
markRead: boolean;
|
|
26
26
|
maxLength?: number | undefined;
|
|
27
27
|
}, {
|
|
28
28
|
uid: number;
|
|
29
29
|
mailbox: string;
|
|
30
30
|
account: string;
|
|
31
|
-
format?: "
|
|
31
|
+
format?: "raw" | "text" | "stripped" | undefined;
|
|
32
32
|
maxLength?: number | undefined;
|
|
33
33
|
markRead?: boolean | undefined;
|
|
34
34
|
}>;
|
|
@@ -17,13 +17,13 @@ export declare const getEmailsInput: z.ZodObject<{
|
|
|
17
17
|
mailbox: string;
|
|
18
18
|
account: string;
|
|
19
19
|
uids: number[];
|
|
20
|
-
format: "
|
|
20
|
+
format: "raw" | "text" | "stripped";
|
|
21
21
|
maxLength?: number | undefined;
|
|
22
22
|
}, {
|
|
23
23
|
mailbox: string;
|
|
24
24
|
account: string;
|
|
25
25
|
uids: number[];
|
|
26
|
-
format?: "
|
|
26
|
+
format?: "raw" | "text" | "stripped" | undefined;
|
|
27
27
|
maxLength?: number | undefined;
|
|
28
28
|
}>;
|
|
29
29
|
export type GetEmailsInput = z.infer<typeof getEmailsInput>;
|
package/package.json
CHANGED
|
@@ -1,8 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@diskd-ai/email-client-mcp",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.7",
|
|
4
4
|
"description": "Drive-backed multi-account email MCP with reliable IMAP-to-mailboxes sync.",
|
|
5
5
|
"license": "LGPL-3.0-or-later",
|
|
6
|
+
"repository": {
|
|
7
|
+
"type": "git",
|
|
8
|
+
"url": "https://github.com/diskd-ai/email-client-mcp"
|
|
9
|
+
},
|
|
6
10
|
"type": "module",
|
|
7
11
|
"bin": {
|
|
8
12
|
"email-client-mcp": "dist/server.js"
|