proton-mail-bridge-client 2.19.7 → 2.20.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.
Files changed (52) hide show
  1. package/README.md +8 -3
  2. package/dist/config-env.d.ts +1 -0
  3. package/dist/config-env.d.ts.map +1 -1
  4. package/dist/config-env.js +15 -1
  5. package/dist/config-env.js.map +1 -1
  6. package/dist/index.d.ts.map +1 -1
  7. package/dist/index.js +3 -0
  8. package/dist/index.js.map +1 -1
  9. package/dist/services/account-manager.d.ts +3 -0
  10. package/dist/services/account-manager.d.ts.map +1 -1
  11. package/dist/services/account-manager.js +3 -0
  12. package/dist/services/account-manager.js.map +1 -1
  13. package/dist/services/local-index-service.d.ts +2 -0
  14. package/dist/services/local-index-service.d.ts.map +1 -1
  15. package/dist/services/local-index-service.js +76 -4
  16. package/dist/services/local-index-service.js.map +1 -1
  17. package/dist/services/simple-imap-service.d.ts +6 -0
  18. package/dist/services/simple-imap-service.d.ts.map +1 -1
  19. package/dist/services/simple-imap-service.js +49 -3
  20. package/dist/services/simple-imap-service.js.map +1 -1
  21. package/dist/services/undo-journal-service.d.ts +63 -0
  22. package/dist/services/undo-journal-service.d.ts.map +1 -0
  23. package/dist/services/undo-journal-service.js +119 -0
  24. package/dist/services/undo-journal-service.js.map +1 -0
  25. package/dist/tools/bulk.d.ts.map +1 -1
  26. package/dist/tools/bulk.js +6 -1
  27. package/dist/tools/bulk.js.map +1 -1
  28. package/dist/tools/definitions.d.ts +12 -9
  29. package/dist/tools/definitions.d.ts.map +1 -1
  30. package/dist/tools/definitions.js +18 -34
  31. package/dist/tools/definitions.js.map +1 -1
  32. package/dist/tools/message-actions.d.ts.map +1 -1
  33. package/dist/tools/message-actions.js +10 -6
  34. package/dist/tools/message-actions.js.map +1 -1
  35. package/dist/tools/rules-runner.d.ts +3 -1
  36. package/dist/tools/rules-runner.d.ts.map +1 -1
  37. package/dist/tools/rules-runner.js +44 -6
  38. package/dist/tools/rules-runner.js.map +1 -1
  39. package/dist/tools/triage.d.ts.map +1 -1
  40. package/dist/tools/triage.js +21 -0
  41. package/dist/tools/triage.js.map +1 -1
  42. package/dist/tools/undo.d.ts +36 -0
  43. package/dist/tools/undo.d.ts.map +1 -0
  44. package/dist/tools/undo.js +175 -0
  45. package/dist/tools/undo.js.map +1 -0
  46. package/dist/types/index.d.ts +16 -0
  47. package/dist/types/index.d.ts.map +1 -1
  48. package/dist/utils/helpers.d.ts +2 -0
  49. package/dist/utils/helpers.d.ts.map +1 -1
  50. package/dist/utils/helpers.js +5 -1
  51. package/dist/utils/helpers.js.map +1 -1
  52. package/package.json +6 -6
@@ -0,0 +1,63 @@
1
+ export type UndoTool = "bulk_move" | "bulk_update_flags" | "bulk_delete" | "apply_rules";
2
+ export interface JournalItem {
3
+ /** Id of the message before the operation: its folder, UID and the folder's UIDVALIDITY. */
4
+ emailId: string;
5
+ folder: string;
6
+ /** The Message-ID header: finds the message again when a move gave it a new UID. */
7
+ messageId?: string;
8
+ flagsBefore?: string[];
9
+ /** Set when the operation finished. Absent: the outcome is unknown (the server stopped during the run). */
10
+ ok?: boolean;
11
+ error?: string;
12
+ movedTo?: {
13
+ folder: string;
14
+ emailId?: string;
15
+ };
16
+ /** Flags the operation really set (they were not there before) and really cleared (they were there before). */
17
+ flagsAdded?: string[];
18
+ flagsRemoved?: string[];
19
+ labelsAdded?: string[];
20
+ /** What was done to this message and cannot be put back ("forwarded to x", "deleted for good"). */
21
+ irreversible?: string[];
22
+ undone?: boolean;
23
+ undoError?: string;
24
+ }
25
+ export interface UndoJournal {
26
+ id: string;
27
+ tool: UndoTool;
28
+ createdAt: string;
29
+ /** pending: the operation was started, not finished. done: finished. undoing: an undo is running. undone: everything reversible was put back. */
30
+ status: "pending" | "done" | "undoing" | "undone";
31
+ undoStartedAt?: string;
32
+ undoneAt?: string;
33
+ /** Set when the whole operation cannot be undone (a permanent delete). */
34
+ irreversible?: string;
35
+ items: JournalItem[];
36
+ }
37
+ export declare const DEFAULT_UNDO_TTL_MS: number;
38
+ export declare const MAX_UNDO_JOURNALS = 100;
39
+ /** Whether undo has something to put back for this item. */
40
+ export declare function isReversible(item: JournalItem): boolean;
41
+ export declare class UndoJournalService {
42
+ private readonly storePath;
43
+ readonly ttlMs: number;
44
+ constructor(options: {
45
+ dataDir: string;
46
+ ttlMs?: number;
47
+ });
48
+ expiresAt(journal: UndoJournal): string;
49
+ isExpired(journal: UndoJournal, now?: number): boolean;
50
+ /** Stored before the operation runs. Expired journals are dropped, and the oldest beyond the cap. */
51
+ begin(tool: UndoTool, items: JournalItem[], irreversible?: string, now?: Date): Promise<UndoJournal>;
52
+ complete(id: string, items: JournalItem[]): Promise<UndoJournal>;
53
+ get(id: string): Promise<UndoJournal | undefined>;
54
+ list(): Promise<UndoJournal[]>;
55
+ /** done (or a stale undoing) -> undoing, in one locked step: a retry of the same undo must not run it twice. */
56
+ beginUndo(id: string, now?: Date): Promise<UndoJournal>;
57
+ finishUndo(id: string, items: JournalItem[], now?: Date): Promise<UndoJournal>;
58
+ private find;
59
+ private withLock;
60
+ private load;
61
+ private save;
62
+ }
63
+ //# sourceMappingURL=undo-journal-service.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"undo-journal-service.d.ts","sourceRoot":"","sources":["../../src/services/undo-journal-service.ts"],"names":[],"mappings":"AAaA,MAAM,MAAM,QAAQ,GAAG,WAAW,GAAG,mBAAmB,GAAG,aAAa,GAAG,aAAa,CAAC;AAEzF,MAAM,WAAW,WAAW;IAC1B,4FAA4F;IAC5F,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,MAAM,CAAC;IACf,oFAAoF;IACpF,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,WAAW,CAAC,EAAE,MAAM,EAAE,CAAC;IACvB,2GAA2G;IAC3G,EAAE,CAAC,EAAE,OAAO,CAAC;IACb,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE;QAAE,MAAM,EAAE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AC,IAAI,EAAE,QAAQ,EAAE,KAAK,EAAE,WAAW,EAAE,EAAE,YAAY,CAAC,EAAE,MAAM,EAAE,GAAG,OAAa,GAAG,OAAO,CAAC,WAAW,CAAC,CAS/G;IAEK,QAAQ,CAAC,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,WAAW,EAAE,GAAG,OAAO,CAAC,WAAW,CAAC,CASrE;IAEK,GAAG,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,WAAW,GAAG,SAAS,CAAC,CAEtD;IAEK,IAAI,IAAI,OAAO,CAAC,WAAW,EAAE,CAAC,CAEnC;IAED,gHAAgH;IAC1G,SAAS,CAAC,EAAE,EAAE,MAAM,EAAE,GAAG,OAAa,GAAG,OAAO,CAAC,WAAW,CAAC,CAelE;IAEK,UAAU,CAAC,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,WAAW,EAAE,EAAE,GAAG,OAAa,GAAG,OAAO,CAAC,WAAW,CAAC,CAWzF;IAED,OAAO,CAAC,IAAI;YAME,QAAQ;YAKR,IAAI;YAWJ,IAAI;CAGnB"}
@@ -0,0 +1,119 @@
1
+ import { randomUUID } from "node:crypto";
2
+ import { mkdir } from "node:fs/promises";
3
+ import { dirname, join } from "node:path";
4
+ import { writeFileAtomic } from "../utils/atomic-write.js";
5
+ import { isFileNotFound, setAsideCorruptStore } from "../utils/corrupt-store.js";
6
+ import { withFileLock } from "../utils/file-lock.js";
7
+ import { logger } from "../utils/logger.js";
8
+ import { readRegularFile } from "../utils/regular-file.js";
9
+ export const DEFAULT_UNDO_TTL_MS = 7 * 24 * 60 * 60 * 1000;
10
+ export const MAX_UNDO_JOURNALS = 100;
11
+ // An undo that has been "running" this long was cut short (the process stopped): it may be claimed again.
12
+ const STALE_UNDO_MS = 5 * 60 * 1000;
13
+ /** Whether undo has something to put back for this item. */
14
+ export function isReversible(item) {
15
+ return item.ok === true && !item.undone && Boolean(item.movedTo || item.flagsAdded?.length || item.flagsRemoved?.length || item.labelsAdded?.length);
16
+ }
17
+ export class UndoJournalService {
18
+ storePath;
19
+ ttlMs;
20
+ constructor(options) {
21
+ this.storePath = join(options.dataDir, "undo-journals.json");
22
+ this.ttlMs = options.ttlMs ?? DEFAULT_UNDO_TTL_MS;
23
+ }
24
+ expiresAt(journal) {
25
+ return new Date(Date.parse(journal.createdAt) + this.ttlMs).toISOString();
26
+ }
27
+ isExpired(journal, now = Date.now()) {
28
+ return now > Date.parse(journal.createdAt) + this.ttlMs;
29
+ }
30
+ /** Stored before the operation runs. Expired journals are dropped, and the oldest beyond the cap. */
31
+ async begin(tool, items, irreversible, now = new Date()) {
32
+ return this.withLock(async () => {
33
+ const state = await this.load();
34
+ const journal = { id: `undo-${randomUUID().slice(0, 8)}`, tool, createdAt: now.toISOString(), status: "pending", items, ...(irreversible ? { irreversible } : {}) };
35
+ const kept = state.journals.filter((entry) => !this.isExpired(entry, now.getTime()));
36
+ state.journals = [...kept, journal].slice(-MAX_UNDO_JOURNALS);
37
+ await this.save(state);
38
+ return journal;
39
+ });
40
+ }
41
+ async complete(id, items) {
42
+ return this.withLock(async () => {
43
+ const state = await this.load();
44
+ const journal = this.find(state, id);
45
+ journal.items = items;
46
+ journal.status = "done";
47
+ await this.save(state);
48
+ return journal;
49
+ });
50
+ }
51
+ async get(id) {
52
+ return (await this.load()).journals.find((journal) => journal.id === id);
53
+ }
54
+ async list() {
55
+ return (await this.load()).journals;
56
+ }
57
+ /** done (or a stale undoing) -> undoing, in one locked step: a retry of the same undo must not run it twice. */
58
+ async beginUndo(id, now = new Date()) {
59
+ return this.withLock(async () => {
60
+ const state = await this.load();
61
+ const journal = state.journals.find((entry) => entry.id === id);
62
+ if (!journal)
63
+ throw new Error(`No undo journal ${id}. Journals are kept for ${Math.round(this.ttlMs / 86_400_000)} days.`);
64
+ if (journal.irreversible)
65
+ throw new Error(`${id} cannot be undone: ${journal.irreversible}.`);
66
+ if (this.isExpired(journal, now.getTime()))
67
+ throw new Error(`Undo journal ${id} expired at ${this.expiresAt(journal)}: undo data is kept for ${Math.round(this.ttlMs / 86_400_000)} days.`);
68
+ if (journal.status === "pending")
69
+ throw new Error(`${id} was never finished (the server stopped while the operation ran), so what it did is not known and it cannot be undone safely. Check the folders.`);
70
+ if (journal.status === "undone")
71
+ throw new Error(`${id} was already undone.`);
72
+ if (journal.status === "undoing" && now.getTime() - Date.parse(journal.undoStartedAt ?? journal.createdAt) < STALE_UNDO_MS)
73
+ throw new Error(`${id} is being undone right now.`);
74
+ journal.status = "undoing";
75
+ journal.undoStartedAt = now.toISOString();
76
+ await this.save(state);
77
+ return journal;
78
+ });
79
+ }
80
+ async finishUndo(id, items, now = new Date()) {
81
+ return this.withLock(async () => {
82
+ const state = await this.load();
83
+ const journal = this.find(state, id);
84
+ journal.items = items;
85
+ const allBack = !items.some(isReversible);
86
+ journal.status = allBack ? "undone" : "done";
87
+ if (allBack)
88
+ journal.undoneAt = now.toISOString();
89
+ await this.save(state);
90
+ return journal;
91
+ });
92
+ }
93
+ find(state, id) {
94
+ const journal = state.journals.find((entry) => entry.id === id);
95
+ if (!journal)
96
+ throw new Error(`No undo journal ${id}.`);
97
+ return journal;
98
+ }
99
+ async withLock(fn) {
100
+ await mkdir(dirname(this.storePath), { recursive: true, mode: 0o700 });
101
+ return withFileLock(this.storePath, fn);
102
+ }
103
+ async load() {
104
+ try {
105
+ const parsed = JSON.parse(await readRegularFile(this.storePath));
106
+ return { journals: Array.isArray(parsed.journals) ? parsed.journals : [] };
107
+ }
108
+ catch (error) {
109
+ if (isFileNotFound(error))
110
+ return { journals: [] };
111
+ setAsideCorruptStore(this.storePath, error, logger, "UndoJournalService");
112
+ return { journals: [] };
113
+ }
114
+ }
115
+ async save(state) {
116
+ await writeFileAtomic(this.storePath, JSON.stringify(state, null, 2));
117
+ }
118
+ }
119
+ //# sourceMappingURL=undo-journal-service.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"undo-journal-service.js","sourceRoot":"","sources":["../../src/services/undo-journal-service.ts"],"names":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AED,wBAAgB,cAAc,CAAC,QAAQ,EAAE,mBAAmB,EAAE,EAAE,IAAI,EAAE,MAAM,GAAG,SAAS,GAAG,mBAAmB,EAAE,CAK/G;AAID,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,mBAAmB,EAAE,GAAG,mBAAmB,CASpF"}
@@ -158,7 +158,12 @@ export function prefixBulkResult(result, slug) {
158
158
  }
159
159
  return {
160
160
  ...result,
161
- results: result.results.map((entry) => ({ ...entry, emailId: withAccountPrefix(slug, entry.emailId) })),
161
+ ...(result.undo ? { undo: { ...result.undo, undoId: withAccountPrefix(slug, result.undo.undoId) } } : {}),
162
+ results: result.results.map((entry) => ({
163
+ ...entry,
164
+ emailId: withAccountPrefix(slug, entry.emailId),
165
+ ...(entry.targetEmailId ? { targetEmailId: withAccountPrefix(slug, entry.targetEmailId) } : {}),
166
+ })),
162
167
  };
163
168
  }
164
169
  export function prefixNotFound(excluded, slug) {
@@ -1 +1 @@
1
- {"version":3,"file":"bulk.js","sourceRoot":"","sources":["../../src/tools/bulk.ts"],"names":[],"mappings":"AAAA,4HAA4H;AAI5H,OAAO,EAAE,2BAA2B,EAAE,MAAM,oCAAoC,CAAC;AACjF,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,oCAAoC,CAAC;AACzE,OAAO,EAAE,oBAAoB,EAAE,cAAc,EAAE,YAAY,EAAE,kBAAkB,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAChI,MAAM,UAAU,mBAAmB,CAAC,IAA6B;IAC/D,OAAO,cAAc,CAAC,IAAI,CAAC,YAAY,EAAE,GAAG,EAAE,CAAC,EAAE,IAAI,CAAC,CAAC;AACzD,CAAC;AAED,MAAM,UAAU,mBAAmB,CAAC,UAAkB,EAAE,GAAW;IACjE,IAAI,UAAU,GAAG,GAAG,EAAE,CAAC;QACrB,MAAM,IAAI,QAAQ,CAChB,SAAS,CAAC,aAAa,EACvB,aAAa,GAAG,UAAU,GAAG,iBAAiB,GAAG,G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AAM;QAClC,QAAQ,EAAE,GAAG,CAAC,QAAQ,GAAG,MAAM,CAAC,QAAQ;QACxC,OAAO,EAAE,CAAC,GAAG,GAAG,CAAC,OAAO,EAAE,GAAG,MAAM,CAAC,OAAO,CAAC;KAC7C,CAAC,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,KAAK,EAAE,CAAC,EAAE,SAAS,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,QAAQ,EAAE,CAAC,EAAE,OAAO,EAAE,EAAE,EAAyB,CAAC,CAAC;AAC7G,CAAC"}
@@ -639,7 +639,7 @@ export declare const TOOLS: readonly [{
639
639
  };
640
640
  }, {
641
641
  readonly name: "create_draft";
642
- readonly description: "Save a new outbound message as a local draft in SQLite, optionally syncing it to the Proton Drafts IMAP folder. Use to compose and review before sending. Prefer create_reply_draft when replying to a specific emailId, or create_forward_draft when forwarding. Returns a draftId for later update, sync, or send via send_draft.";
642
+ readonly description: "Save a new outbound message as a local draft (stored in drafts.json in the data directory), optionally syncing it to the Proton Drafts IMAP folder. Use to compose and review before sending. Prefer create_reply_draft when replying to a specific emailId, or create_forward_draft when forwarding. Returns a draftId for later update, sync, or send via send_draft.";
643
643
  readonly annotations: {
644
644
  readonly destructiveHint: false;
645
645
  };
@@ -1130,7 +1130,7 @@ export declare const TOOLS: readonly [{
1130
1130
  };
1131
1131
  }, {
1132
1132
  readonly name: "delete_draft";
1133
- readonly description: "Permanently delete a locally saved draft from SQLite. Use to discard a draft you no longer need. Does NOT remove a matching draft from the Proton Drafts IMAP folder — that requires a separate mailbox action. Irreversible; requires confirmed:true when PROTONMAIL_CONFIRM_DESTRUCTIVE is enabled.";
1133
+ readonly description: "Permanently delete a locally saved draft (from drafts.json in the data directory). Use to discard a draft you no longer need. Does NOT remove a matching draft from the Proton Drafts IMAP folder — that requires a separate mailbox action. Irreversible; requires confirmed:true when PROTONMAIL_CONFIRM_DESTRUCTIVE is enabled.";
1134
1134
  readonly annotations: {
1135
1135
  readonly destructiveHint: true;
1136
1136
  };
@@ -1962,7 +1962,7 @@ export declare const TOOLS: readonly [{
1962
1962
  };
1963
1963
  }, {
1964
1964
  readonly name: "undo_plan";
1965
- readonly description: "Put back what approve_plan changed: moved and archived mail returns to its folder, marked-read mail becomes unread, added labels are removed. Items that cannot be put back (the message was moved or deleted since) are reported.";
1965
+ readonly description: "Put back what approve_plan changed: moved and archived mail returns to its folder, marked-read mail becomes unread, added labels are removed. Or, with undoId (from bulk_move, bulk_update_flags or apply_rules), put back what that bulk operation really did: moved mail returns to its folder (found again by its new id, else by Message-ID), flags are restored as they were before. Undo data is kept for 7 days and the runtime policy applies as for the original action. Items that cannot be put back (the message was moved or deleted since) are reported, and a permanent delete or a forward is never undoable. list_plans shows the stored undoIds.";
1966
1966
  readonly annotations: {
1967
1967
  readonly readOnlyHint: false;
1968
1968
  readonly destructiveHint: false;
@@ -1972,14 +1972,17 @@ export declare const TOOLS: readonly [{
1972
1972
  readonly properties: {
1973
1973
  readonly planId: {
1974
1974
  readonly type: "string";
1975
- readonly description: "The planId of an approved plan.";
1975
+ readonly description: "The planId of an approved plan. Give this or undoId.";
1976
+ };
1977
+ readonly undoId: {
1978
+ readonly type: "string";
1979
+ readonly description: "The undoId a bulk operation returned (a non-primary account's id starts with its '<slug>::'). Give this or planId.";
1976
1980
  };
1977
1981
  readonly account: {
1978
1982
  readonly type: "string";
1979
1983
  readonly description: "Address or slug of the account the plan was made for.";
1980
1984
  };
1981
1985
  };
1982
- readonly required: readonly ["planId"];
1983
1986
  };
1984
1987
  }, {
1985
1988
  readonly name: "define_category";
@@ -2477,7 +2480,7 @@ export declare const TOOLS: readonly [{
2477
2480
  };
2478
2481
  }, {
2479
2482
  readonly name: "apply_rules";
2480
- readonly description: "Run the enabled rules (or one, ruleId) on mail that is already in the index. By default a PREVIEW (dryRun true): it lists what would be done to which message and changes nothing. With dryRun false it marks, labels, archives, moves, trashes, deletes and forwards through the same permissions as the other tools; deleting for good needs confirmed: true. It works from the local index, so run sync_emails first if it may be stale.";
2483
+ readonly description: "Run the enabled rules (or one, ruleId) on mail that is already in the index. By default a PREVIEW (dryRun true): it lists what would be done to which message and changes nothing. With dryRun false it marks, labels, archives, moves, trashes, deletes and forwards through the same permissions as the other tools; deleting for good needs confirmed: true. It works from the local index, so run sync_emails first if it may be stale. A real run returns an undoId: undo_plan with it puts back moves, archiving, labels and mark-read (not forwards or deletes, which the response counts as irreversible), for 7 days.";
2481
2484
  readonly annotations: {
2482
2485
  readonly destructiveHint: true;
2483
2486
  };
@@ -2780,7 +2783,7 @@ export declare const TOOLS: readonly [{
2780
2783
  };
2781
2784
  }, {
2782
2785
  readonly name: "bulk_move";
2783
- readonly description: "Move multiple emails to a target folder in one IMAP pass. Accepts either explicit emailIds[] or a match criteria object (XOR). Supports dryRun to preview. For single-message moves use move_email. With `match`, run dryRun first and pass the count as `expectedCount` so a filter that matches more than intended is refused.";
2786
+ readonly description: "Move multiple emails to a target folder in one IMAP pass. Accepts either explicit emailIds[] or a match criteria object (XOR). Supports dryRun to preview. For single-message moves use move_email. With `match`, run dryRun first and pass the count as `expectedCount` so a filter that matches more than intended is refused. A real run returns an undoId (the new ids are in results[].targetEmailId): undo_plan with it moves the messages back, for 7 days.";
2784
2787
  readonly annotations: {
2785
2788
  readonly destructiveHint: false;
2786
2789
  };
@@ -2852,7 +2855,7 @@ export declare const TOOLS: readonly [{
2852
2855
  };
2853
2856
  }, {
2854
2857
  readonly name: "bulk_delete";
2855
- readonly description: "Delete multiple emails by explicit ID list or by search criteria (from/subject/date/flags). Prefer empty_folder to clear an entire folder. Prefer delete_email for a single message. Prefer batch_email_action when the same set of IDs needs a mix of actions, not just deletion. Use when you have specific IDs to delete or want to filter by sender, subject, or date range. Accepts emailIds[] OR match criteria (XOR). permanent:true permanently expunges; false moves to Trash. Use dryRun to preview. With `match`, run dryRun first and pass the count as `expectedCount` so a filter that matches more than intended is refused.";
2858
+ readonly description: "Delete multiple emails by explicit ID list or by search criteria (from/subject/date/flags). Prefer empty_folder to clear an entire folder. Prefer delete_email for a single message. Prefer batch_email_action when the same set of IDs needs a mix of actions, not just deletion. Use when you have specific IDs to delete or want to filter by sender, subject, or date range. Accepts emailIds[] OR match criteria (XOR). permanent:true permanently expunges; false moves to Trash. Use dryRun to preview. With `match`, run dryRun first and pass the count as `expectedCount` so a filter that matches more than intended is refused. With permanent:true the response carries an undoId only to say, in its note, that this cannot be undone; a move to Trash is not journaled yet.";
2856
2859
  readonly annotations: {
2857
2860
  readonly destructiveHint: true;
2858
2861
  };
@@ -2927,7 +2930,7 @@ export declare const TOOLS: readonly [{
2927
2930
  };
2928
2931
  }, {
2929
2932
  readonly name: "bulk_update_flags";
2930
- readonly description: "Add or remove IMAP flags on multiple messages simultaneously. Prefer update_message_flags for a single message when you need per-flag server verification. Use when the same flag change (e.g. \\\\Seen, \\\\Flagged) should apply to several messages. Accepts emailIds[] OR match+folder (XOR). Returns notApplied[] per message for flags the server silently dropped. \\\\Seen/\\\\Flagged/\\\\Deleted are gated the same as mark_email_read/star_email/bulk_delete: each requires the matching action in PROTONMAIL_ALLOWED_ACTIONS, and setting \\\\Deleted also requires confirmed:true when PROTONMAIL_CONFIRM_DESTRUCTIVE is enabled. With `match`, run dryRun first and pass the count as `expectedCount` so a filter that matches more than intended is refused.";
2933
+ readonly description: "Add or remove IMAP flags on multiple messages simultaneously. Prefer update_message_flags for a single message when you need per-flag server verification. Use when the same flag change (e.g. \\\\Seen, \\\\Flagged) should apply to several messages. Accepts emailIds[] OR match+folder (XOR). Returns notApplied[] per message for flags the server silently dropped. \\\\Seen/\\\\Flagged/\\\\Deleted are gated the same as mark_email_read/star_email/bulk_delete: each requires the matching action in PROTONMAIL_ALLOWED_ACTIONS, and setting \\\\Deleted also requires confirmed:true when PROTONMAIL_CONFIRM_DESTRUCTIVE is enabled. With `match`, run dryRun first and pass the count as `expectedCount` so a filter that matches more than intended is refused. A real run returns an undoId: undo_plan with it restores the flags the call really changed, for 7 days.";
2931
2934
  readonly annotations: {
2932
2935
  readonly destructiveHint: false;
2933
2936
  };