proton-mail-bridge-client 1.19.4 → 2.0.0
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 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +41 -0
- package/dist/index.js.map +1 -1
- package/dist/services/audit-service.d.ts +1 -0
- package/dist/services/audit-service.d.ts.map +1 -1
- package/dist/services/audit-service.js +18 -1
- package/dist/services/audit-service.js.map +1 -1
- package/dist/services/draft-store-service.d.ts.map +1 -1
- package/dist/services/draft-store-service.js +11 -3
- package/dist/services/draft-store-service.js.map +1 -1
- package/dist/services/local-index-service.d.ts +1 -0
- package/dist/services/local-index-service.d.ts.map +1 -1
- package/dist/services/local-index-service.js +89 -26
- package/dist/services/local-index-service.js.map +1 -1
- package/dist/services/simple-imap-service.d.ts +1 -0
- package/dist/services/simple-imap-service.d.ts.map +1 -1
- package/dist/services/simple-imap-service.js +81 -11
- package/dist/services/simple-imap-service.js.map +1 -1
- package/dist/types/index.d.ts +3 -0
- package/dist/types/index.d.ts.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -26,6 +26,8 @@
|
|
|
26
26
|
|
|
27
27
|
Give Claude Desktop (or Cline, or any MCP client) full access to your Proton Mail inbox: read, search, send, draft, triage threads, manage folders, save attachments, and more — 95 MCP tools in total. Most of the same capabilities are also available as a full CLI for scripting, cron, and piped automation — no Claude required.
|
|
28
28
|
|
|
29
|
+
> **Battle-tested at scale (v2.0.0):** full mailbox backfill validated end-to-end against a real account with 57,000+ indexed messages across 62 folders/labels — including a 22,800-message Archive folder backfilled from scratch, UID-window by UID-window, with zero data loss across restarts, transient IMAP disconnects, and connection timeouts.
|
|
30
|
+
|
|
29
31
|
## What you get
|
|
30
32
|
|
|
31
33
|
- **Claude reads and manages your Proton Mail** — triage, reply, draft, archive, search, move, batch-act on threads, pull attachments
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{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I,IAAI,OAAO,CAAC,IAAI,CAAC,CAmE1C"}
|
package/dist/index.js
CHANGED
|
@@ -4625,6 +4625,47 @@ export function createServer(config, options = {}) {
|
|
|
4625
4625
|
}));
|
|
4626
4626
|
case "sync_emails":
|
|
4627
4627
|
{
|
|
4628
|
+
const folder = optionalString(args, "folder");
|
|
4629
|
+
const full = typeof args.full === "boolean" ? args.full : undefined;
|
|
4630
|
+
const limitPerFolder = typeof args.limitPerFolder === "number" ? args.limitPerFolder : undefined;
|
|
4631
|
+
const includeAttachmentText = typeof args.includeAttachmentText === "boolean" ? args.includeAttachmentText : undefined;
|
|
4632
|
+
// backgroundSyncService.runNow() always runs the *fixed* background-
|
|
4633
|
+
// sync config (autoSyncFolder/autoSyncFull/autoSyncLimitPerFolder —
|
|
4634
|
+
// typically just "INBOX,Sent", incremental, 100/folder) and ignores
|
|
4635
|
+
// any argument entirely. This tool's own schema advertises folder/
|
|
4636
|
+
// full/limitPerFolder/includeAttachmentText as per-call overrides,
|
|
4637
|
+
// but every one of them was silently discarded — a caller asking to
|
|
4638
|
+
// sync "Archive" with full:true got back a status snapshot of the
|
|
4639
|
+
// last INBOX/Sent background run, with Archive never touched at
|
|
4640
|
+
// all. Found live: sync_emails({folder:"Archive", full:true}) did
|
|
4641
|
+
// not add an Archive entry to get_index_status's syncCheckpoints.
|
|
4642
|
+
// When the caller supplies any of these, run a one-off sync with
|
|
4643
|
+
// their actual parameters instead.
|
|
4644
|
+
if (folder !== undefined || full !== undefined || limitPerFolder !== undefined || includeAttachmentText !== undefined) {
|
|
4645
|
+
const snapshot = await imapService.collectEmailsForIndex({
|
|
4646
|
+
folder,
|
|
4647
|
+
full,
|
|
4648
|
+
limitPerFolder,
|
|
4649
|
+
includeAttachmentText,
|
|
4650
|
+
checkpoints: await localIndexService.getSyncCheckpointMap(),
|
|
4651
|
+
});
|
|
4652
|
+
const indexStatus = await localIndexService.recordSnapshot({
|
|
4653
|
+
folders: snapshot.folders,
|
|
4654
|
+
emails: snapshot.emails,
|
|
4655
|
+
syncedAt: snapshot.syncedAt,
|
|
4656
|
+
folderStats: snapshot.folderStats,
|
|
4657
|
+
});
|
|
4658
|
+
return createTextResult({
|
|
4659
|
+
checkedAt: new Date().toISOString(),
|
|
4660
|
+
synced: { folder: folder ?? "all", full: Boolean(full), folderStats: snapshot.folderStats },
|
|
4661
|
+
index: {
|
|
4662
|
+
updatedAt: indexStatus.updatedAt,
|
|
4663
|
+
storedMessageCount: indexStatus.storedMessageCount,
|
|
4664
|
+
dedupedMessageCount: indexStatus.dedupedMessageCount,
|
|
4665
|
+
path: indexStatus.path,
|
|
4666
|
+
},
|
|
4667
|
+
});
|
|
4668
|
+
}
|
|
4628
4669
|
const syncStatus = await backgroundSyncService.runNow("sync_emails");
|
|
4629
4670
|
const indexStatus = await localIndexService.getStatus();
|
|
4630
4671
|
return createTextResult({
|