@lmcl/ailo-mcp-email 0.0.6 → 0.0.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.
@@ -198,6 +198,8 @@ export class EmailHandler {
198
198
  const raw = await this.fetchRaw(opts.uid, folder);
199
199
  if (!raw)
200
200
  return null;
201
+ // 读取后自动标记为已读,避免每次启动都推送相同邮件
202
+ await this.markRead({ uids: [opts.uid], read: true, folder });
201
203
  const from = raw.from?.value?.[0];
202
204
  const to = raw.to?.value?.map((v) => v.address).join(", ") ?? "";
203
205
  const atts = raw.attachments ?? [];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lmcl/ailo-mcp-email",
3
- "version": "0.0.6",
3
+ "version": "0.0.7",
4
4
  "description": "Ailo 邮件通道 MCP - IMAP 收信 + SMTP 发信",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -274,6 +274,8 @@ export class EmailHandler implements BridgeHandler {
274
274
  const folder = opts.folder ?? "INBOX";
275
275
  const raw = await this.fetchRaw(opts.uid, folder);
276
276
  if (!raw) return null;
277
+ // 读取后自动标记为已读,避免每次启动都推送相同邮件
278
+ await this.markRead({ uids: [opts.uid], read: true, folder });
277
279
  const from = raw.from?.value?.[0];
278
280
  const to = raw.to?.value?.map((v) => v.address).join(", ") ?? "";
279
281
  const atts = (raw as { attachments?: Array<{ filename?: string; contentType?: string; size?: number }> }).attachments ?? [];