@doist/todoist-mcp 13.4.1 → 13.5.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.
@@ -1,4 +1,4 @@
1
- import { ResourceTemplate as Gs, McpServer as Ys } from "@modelcontextprotocol/server";
1
+ import { ResourceTemplate as qs, McpServer as Gs } from "@modelcontextprotocol/server";
2
2
  import { createHash as Vt, randomUUID as Ne } from "node:crypto";
3
3
  import { readFileSync as Vs } from "node:fs";
4
4
  import { dirname as Jt, join as Me } from "node:path";
@@ -7,28 +7,28 @@ import { RESOURCE_MIME_TYPE as Fe } from "@modelcontextprotocol/ext-apps/server"
7
7
  import ce, { ZodError as Xs, z as s } from "zod";
8
8
  import { AsyncLocalStorage as Qs } from "node:async_hooks";
9
9
  import { createRequire as Zs } from "node:module";
10
- import { TodoistApi as er, isWorkspaceProject as Ce, isPersonalProject as q, colors as He, LOCATION_TRIGGERS as Xt, REMINDER_TYPES as tr, createCommand as Q, REMINDER_DELIVERY_SERVICES as sr, HEALTH_STATUSES as st, getTaskUrl as Qt, getProjectUrl as Zt, escapeFilterToken as es, parseTodoistUrl as rr, WORKSPACE_ROLES as or, WORKSPACE_PLANS as nr } from "@doist/todoist-sdk";
10
+ import { TodoistApi as er, isWorkspaceProject as Ce, isPersonalProject as Y, colors as He, LOCATION_TRIGGERS as Xt, REMINDER_TYPES as tr, createCommand as Q, REMINDER_DELIVERY_SERVICES as sr, HEALTH_STATUSES as st, getTaskUrl as Qt, getProjectUrl as Zt, ACTIVITY_EVENT_TYPES as rr, ACTIVITY_OBJECT_TYPES as or, escapeFilterToken as es, parseTodoistUrl as nr, WORKSPACE_ROLES as ir, WORKSPACE_PLANS as ar } from "@doist/todoist-sdk";
11
11
  import { addDays as We, formatISO as Tt } from "date-fns";
12
- const kt = Jt(Js(import.meta.url)), ir = [
12
+ const kt = Jt(Js(import.meta.url)), cr = [
13
13
  Me(kt, "task-list", "index.html"),
14
14
  Me(kt, "mcp-apps", "index.html")
15
- ], ar = `<!doctype html>
15
+ ], dr = `<!doctype html>
16
16
  <html>
17
17
  <body>
18
18
  <p>Task list app is missing. Run "npm run build" to generate it.</p>
19
19
  </body>
20
20
  </html>`;
21
- function cr() {
21
+ function lr() {
22
22
  const e = [];
23
- for (const t of ir)
23
+ for (const t of cr)
24
24
  try {
25
25
  return Vs(t, "utf-8");
26
26
  } catch (r) {
27
27
  e.push(r);
28
28
  }
29
- return console.error("Failed to load task list app HTML from any known path:", e), ar;
29
+ return console.error("Failed to load task list app HTML from any known path:", e), dr;
30
30
  }
31
- const ts = cr(), dr = Vt("sha256").update(ts).digest("hex").slice(0, 12), Be = `ui://todoist/task-list@${dr}`, lr = "ui://todoist/task-list@{hash}", ze = "Interactive task list widget", ur = "https://ai.todoist.net", Ke = {
31
+ const ts = lr(), ur = Vt("sha256").update(ts).digest("hex").slice(0, 12), Be = `ui://todoist/task-list@${ur}`, pr = "ui://todoist/task-list@{hash}", ze = "Interactive task list widget", hr = "https://ai.todoist.net", Ke = {
32
32
  ui: {
33
33
  prefersBorder: !0,
34
34
  csp: {
@@ -43,7 +43,7 @@ const ts = cr(), dr = Vt("sha256").update(ts).digest("hex").slice(0, 12), Be = `
43
43
  connect_domains: [],
44
44
  resource_domains: []
45
45
  },
46
- "openai/widgetDomain": ur
46
+ "openai/widgetDomain": hr
47
47
  };
48
48
  function wt(e) {
49
49
  return {
@@ -57,7 +57,7 @@ function wt(e) {
57
57
  ]
58
58
  };
59
59
  }
60
- function pr(e) {
60
+ function mr(e) {
61
61
  e.registerResource(
62
62
  "todoist-task-list",
63
63
  Be,
@@ -69,7 +69,7 @@ function pr(e) {
69
69
  async () => wt(Be)
70
70
  ), e.registerResource(
71
71
  "todoist-task-list-hash-fallback",
72
- new Gs(lr, { list: void 0 }),
72
+ new qs(pr, { list: void 0 }),
73
73
  {
74
74
  description: `${ze} compatibility fallback`,
75
75
  mimeType: Fe,
@@ -81,7 +81,7 @@ function pr(e) {
81
81
  function ee(e) {
82
82
  return typeof e == "object" && e !== null;
83
83
  }
84
- function qe(...e) {
84
+ function Ye(...e) {
85
85
  return e.find(ee);
86
86
  }
87
87
  function F(...e) {
@@ -93,7 +93,7 @@ function _(e) {
93
93
  if (typeof e == "string" && /^\d+$/.test(e.trim()))
94
94
  return Number(e.trim());
95
95
  }
96
- function v(e) {
96
+ function I(e) {
97
97
  if (typeof e == "string") {
98
98
  const t = e.trim();
99
99
  return t.length > 0 ? t : void 0;
@@ -103,19 +103,19 @@ function v(e) {
103
103
  }
104
104
  function de(e) {
105
105
  const t = _(e);
106
- return t !== void 0 ? t : v(e);
106
+ return t !== void 0 ? t : I(e);
107
107
  }
108
- function hr(e) {
108
+ function fr(e) {
109
109
  return e.replace(/\b(Bearer)\s+[A-Za-z0-9._~+/=-]+/gi, "$1 [REDACTED]").replace(
110
110
  /\b(token|api[_-]?key|authorization)\s*[:=]\s*["']?[A-Za-z0-9._~+/=-]{6,}["']?/gi,
111
111
  "$1: [REDACTED]"
112
112
  ).replace(/([?&](?:token|api[_-]?key|authorization)=)[^&\s]+/gi, "$1[REDACTED]").replace(/\beyJ[A-Za-z0-9_-]+\.[A-Za-z0-9_-]+\.[A-Za-z0-9_-]+\b/g, "[REDACTED]");
113
113
  }
114
114
  function L(e, t = 220) {
115
- const r = hr(e).replace(/\s+/g, " ").trim();
115
+ const r = fr(e).replace(/\s+/g, " ").trim();
116
116
  return r.length <= t ? r : `${r.slice(0, t - 3)}...`;
117
117
  }
118
- function Ge(e) {
118
+ function qe(e) {
119
119
  const t = e.trim();
120
120
  return /\bHTTP\s*\d{3}\b/i.test(t) || /\bstatus code \d{3}\b/i.test(t) || /^bad request$/i.test(t) || /^unauthorized$/i.test(t) || /^forbidden$/i.test(t) || /^not found$/i.test(t);
121
121
  }
@@ -127,45 +127,45 @@ function Pe(e) {
127
127
  return _(t[1]);
128
128
  }
129
129
  function X(e) {
130
- const t = v(e);
130
+ const t = I(e);
131
131
  if (t)
132
132
  return L(t);
133
133
  if (Array.isArray(e)) {
134
- const n = e.map((i) => ee(i) ? v(i.message) || v(i.error) : v(i)).filter((i) => !!i);
134
+ const n = e.map((i) => ee(i) ? I(i.message) || I(i.error) : I(i)).filter((i) => !!i);
135
135
  return n.length > 0 ? L(n.slice(0, 2).join("; ")) : void 0;
136
136
  }
137
137
  if (!ee(e))
138
138
  return;
139
139
  const r = F(
140
- v(e.detail),
141
- v(e.details),
142
- v(e.message),
143
- v(e.error),
144
- v(e.description)
140
+ I(e.detail),
141
+ I(e.details),
142
+ I(e.message),
143
+ I(e.error),
144
+ I(e.description)
145
145
  );
146
146
  if (r)
147
147
  return L(r);
148
148
  const o = [];
149
149
  for (const [n, i] of Object.entries(e)) {
150
- const a = v(i);
150
+ const a = I(i);
151
151
  if (a && (o.push(`${n}: ${a}`), o.length >= 2))
152
152
  break;
153
153
  }
154
154
  return o.length > 0 ? L(o.join("; ")) : void 0;
155
155
  }
156
- function mr(e) {
156
+ function br(e) {
157
157
  if (!e)
158
158
  return [];
159
159
  const t = /* @__PURE__ */ new Set(), r = (a) => {
160
160
  a && t.add(L(a, 120));
161
161
  }, o = F(
162
- v(e.field),
163
- v(e.parameter),
164
- v(e.param),
165
- v(e.path)
162
+ I(e.field),
163
+ I(e.parameter),
164
+ I(e.param),
165
+ I(e.path)
166
166
  );
167
167
  r(o);
168
- const n = qe(
168
+ const n = Ye(
169
169
  e.details,
170
170
  e.errorDetails,
171
171
  e.errorExtra,
@@ -173,11 +173,11 @@ function mr(e) {
173
173
  );
174
174
  if (n) {
175
175
  const a = F(
176
- v(n.field),
177
- v(n.parameter),
178
- v(n.param),
179
- v(n.path),
180
- v(n.argument)
176
+ I(n.field),
177
+ I(n.parameter),
178
+ I(n.param),
179
+ I(n.path),
180
+ I(n.argument)
181
181
  );
182
182
  r(a);
183
183
  }
@@ -185,38 +185,38 @@ function mr(e) {
185
185
  if (Array.isArray(i))
186
186
  for (const a of i) {
187
187
  if (!ee(a)) {
188
- r(v(a));
188
+ r(I(a));
189
189
  continue;
190
190
  }
191
191
  const c = F(
192
- v(a.field),
193
- v(a.parameter),
194
- v(a.param),
195
- v(a.path),
196
- v(a.name)
192
+ I(a.field),
193
+ I(a.parameter),
194
+ I(a.param),
195
+ I(a.path),
196
+ I(a.name)
197
197
  ), d = F(
198
- v(a.message),
199
- v(a.error),
200
- v(a.detail),
201
- v(a.description)
198
+ I(a.message),
199
+ I(a.error),
200
+ I(a.detail),
201
+ I(a.description)
202
202
  );
203
203
  r(c && d ? `${c}: ${d}` : c || d);
204
204
  }
205
205
  else if (ee(i))
206
206
  for (const [a, c] of Object.entries(i)) {
207
- const d = v(c);
207
+ const d = I(c);
208
208
  if (d) {
209
209
  r(`${a}: ${d}`);
210
210
  continue;
211
211
  }
212
212
  if (Array.isArray(c)) {
213
- const u = c.map((l) => v(l)).filter((l) => !!l).join(", ");
213
+ const u = c.map((l) => I(l)).filter((l) => !!l).join(", ");
214
214
  r(u ? `${a}: ${u}` : a);
215
215
  }
216
216
  }
217
217
  return Array.from(t).slice(0, 3);
218
218
  }
219
- const fr = [
219
+ const gr = [
220
220
  "error",
221
221
  "error_code",
222
222
  "error_tag",
@@ -227,41 +227,41 @@ const fr = [
227
227
  "httpCode",
228
228
  "errorExtra"
229
229
  ];
230
- function br(e) {
231
- return e ? fr.some((t) => e[t] !== void 0) : !1;
230
+ function yr(e) {
231
+ return e ? gr.some((t) => e[t] !== void 0) : !1;
232
232
  }
233
- const Ye = {
233
+ const Ge = {
234
234
  MAX_ITEMS_LIMIT_REACHED: "This project has reached the maximum number of active tasks per project (subtasks count toward it; completed tasks do not). The cap is the same on every Todoist plan — upgrading will not raise it — and it is not an authentication or permission problem. Complete, delete, or move existing tasks out of the project, or add the task to a different project, then retry.",
235
235
  USER_CANNOT_VIEW_TEMPLATE: "This template exists but belongs to another account. Personal templates are private to whoever saved them, and a link to one cannot be used by anyone else. Use a public gallery template instead, or ask the owner to export it with export-project-template and share the CSV."
236
236
  };
237
- function gr(...e) {
237
+ function Tr(...e) {
238
238
  for (const t of e) {
239
239
  if (!t)
240
240
  continue;
241
- const r = t.toUpperCase(), o = Object.keys(Ye).find(
241
+ const r = t.toUpperCase(), o = Object.keys(Ge).find(
242
242
  (n) => r.includes(n)
243
243
  );
244
244
  if (o)
245
- return Ye[o];
245
+ return Ge[o];
246
246
  }
247
247
  }
248
- function yr(e) {
248
+ function kr(e) {
249
249
  if (e.tag) {
250
- const t = Ye[e.tag.toUpperCase()];
250
+ const t = Ge[e.tag.toUpperCase()];
251
251
  if (t)
252
252
  return t;
253
253
  }
254
- return gr(...e.rawText ?? [], e.message, e.details);
254
+ return Tr(...e.rawText ?? [], e.message, e.details);
255
255
  }
256
- function Tr(e) {
257
- const t = yr(e);
256
+ function wr(e) {
257
+ const t = kr(e);
258
258
  if (t)
259
259
  return t;
260
260
  const { statusCode: r } = e, o = e.fieldHints.length > 0;
261
261
  return r === 401 ? "Authentication failed. Verify your API token, then retry." : r === 403 ? "Access denied. Retrying the same request will not help. If it's a scope/access problem (for example, insufficient token scope), use a token or account with the required access. Otherwise, change the request or target instead." : r === 404 ? "Confirm the referenced IDs exist and are accessible, then retry." : r === 429 ? "Rate limit reached. Wait briefly and retry." : r !== void 0 && r >= 500 ? "Todoist API may be temporarily unavailable. Retry shortly." : o ? "Fix the field hints above and retry." : r === 400 || r === 422 ? "Check parameter values and formats, then retry." : "Check the request parameters and retry.";
262
262
  }
263
263
  function rt(e) {
264
- const t = ee(e) ? e : void 0, r = e instanceof Error && ee(e.cause) ? e.cause : void 0, o = qe(t?.response, r?.response), n = qe(
264
+ const t = ee(e) ? e : void 0, r = e instanceof Error && ee(e.cause) ? e.cause : void 0, o = Ye(t?.response, r?.response), n = Ye(
265
265
  t?.responseData,
266
266
  o?.data,
267
267
  t?.data,
@@ -277,8 +277,8 @@ function rt(e) {
277
277
  _(n?.status),
278
278
  _(n?.httpCode),
279
279
  _(n?.http_code),
280
- Pe(v(t?.message)),
281
- Pe(v(r?.message)),
280
+ Pe(I(t?.message)),
281
+ Pe(I(r?.message)),
282
282
  Pe(typeof e == "string" ? e : void 0)
283
283
  ), a = F(
284
284
  de(n?.errorCode),
@@ -288,28 +288,28 @@ function rt(e) {
288
288
  de(t?.error_code),
289
289
  de(t?.code)
290
290
  ), c = F(
291
- v(n?.errorTag),
292
- v(n?.error_tag),
293
- v(n?.tag),
294
- v(t?.errorTag),
295
- v(t?.error_tag),
296
- v(t?.tag)
291
+ I(n?.errorTag),
292
+ I(n?.error_tag),
293
+ I(n?.tag),
294
+ I(t?.errorTag),
295
+ I(t?.error_tag),
296
+ I(t?.tag)
297
297
  ), d = [
298
- v(n?.error),
299
- v(n?.message),
298
+ I(n?.error),
299
+ I(n?.message),
300
300
  X(n?.message),
301
- v(t?.message),
302
- v(r?.message),
303
- e instanceof Error ? e.message : v(e)
304
- ].filter((m) => !!m), u = d.find((m) => !Ge(m)) || d[0], l = F(
301
+ I(t?.message),
302
+ I(r?.message),
303
+ e instanceof Error ? e.message : I(e)
304
+ ].filter((m) => !!m), u = d.find((m) => !qe(m)) || d[0], l = F(
305
305
  X(n?.errorExtra),
306
306
  X(n?.error_extra),
307
307
  X(n?.details),
308
308
  X(n?.errorDetails),
309
309
  X(n?.errors),
310
310
  X(t?.details)
311
- ), p = mr(n);
312
- return i !== void 0 || br(n) || c !== void 0 || a !== void 0 || (u ? Ge(u) : !1) ? {
311
+ ), p = br(n);
312
+ return i !== void 0 || yr(n) || c !== void 0 || a !== void 0 || (u ? qe(u) : !1) ? {
313
313
  statusCode: i,
314
314
  code: a,
315
315
  tag: c ? L(c, 80) : void 0,
@@ -323,11 +323,11 @@ function ss(e) {
323
323
  const t = [];
324
324
  return e.statusCode !== void 0 && t.push(`HTTP ${e.statusCode}`), e.code !== void 0 && t.push(`code ${e.code}`), e.tag && t.push(`tag ${e.tag}`), t;
325
325
  }
326
- function kr(e) {
326
+ function Ir(e) {
327
327
  const t = ss(e), r = [
328
328
  t.length > 0 ? `Todoist API request failed (${t.join(", ")}).` : "Todoist API request failed."
329
329
  ];
330
- return e.message && r.push(`Message: ${e.message}`), e.details && e.details !== e.message && r.push(`Details: ${e.details}`), e.fieldHints.length > 0 && r.push(`Field hints: ${e.fieldHints.join("; ")}`), r.push(`Try next: ${Tr(e)}`), r.join(`
330
+ return e.message && r.push(`Message: ${e.message}`), e.details && e.details !== e.message && r.push(`Details: ${e.details}`), e.fieldHints.length > 0 && r.push(`Field hints: ${e.fieldHints.join("; ")}`), r.push(`Try next: ${wr(e)}`), r.join(`
331
331
  `);
332
332
  }
333
333
  function rs(e) {
@@ -349,10 +349,10 @@ function N(e) {
349
349
  const t = rt(e);
350
350
  if (!t)
351
351
  return rs(e);
352
- const r = ss(t), o = t.message && !(r.length > 0 && Ge(t.message)) ? t.message : "Todoist API request failed";
352
+ const r = ss(t), o = t.message && !(r.length > 0 && qe(t.message)) ? t.message : "Todoist API request failed";
353
353
  return r.length > 0 ? `${o} (${r.join(", ")})` : o;
354
354
  }
355
- function wr(e, {
355
+ function vr(e, {
356
356
  taskContent: t,
357
357
  dueString: r,
358
358
  deadlineDate: o
@@ -365,14 +365,14 @@ function wr(e, {
365
365
  const d = r.trim().replace(/^recurring(?:\s+|$)/i, "").trim();
366
366
  return d !== r.trim() && d ? `Task "${t}" wasn't created because \`dueString\` could not be parsed. Use Todoist recurrence syntax, for example \`${d}\`; don't prefix it with \`recurring\`. Change only \`dueString\` and retry.` : d !== r.trim() ? `Task "${t}" wasn't created because \`dueString\` could not be parsed. Use a complete Todoist recurrence expression; \`recurring\` alone is not valid. Change only \`dueString\` and retry.` : `Task "${t}" wasn't created because \`dueString\` could not be parsed. Change only \`dueString\` and retry.`;
367
367
  }
368
- function vr(e) {
368
+ function Sr(e) {
369
369
  if (e instanceof Xs || e instanceof $e || e instanceof os)
370
370
  return e.message;
371
371
  const t = rt(e);
372
- return t ? kr(t) : rs(e);
372
+ return t ? Ir(t) : rs(e);
373
373
  }
374
- const Ir = "13.4.1", Sr = {
375
- version: Ir
374
+ const Cr = "13.5.0", jr = {
375
+ version: Cr
376
376
  }, j = {
377
377
  /** Default limit for task listings */
378
378
  TASKS_DEFAULT: 10,
@@ -409,7 +409,7 @@ const Ir = "13.4.1", Sr = {
409
409
  }, Te = {
410
410
  /** Maximum number of failures to show in detailed error messages */
411
411
  MAX_FAILURES_SHOWN: 3
412
- }, Cr = {
412
+ }, $r = {
413
413
  /** Maximum number of failed items named in one log line */
414
414
  MAX_FAILURES_LOGGED: 5
415
415
  }, ns = {
@@ -439,7 +439,7 @@ const Ir = "13.4.1", Sr = {
439
439
  */
440
440
  QUEUE_WAIT_MS: 3e4
441
441
  };
442
- function vt(e, { queueTimeoutMs: t = Ve.QUEUE_WAIT_MS } = {}) {
442
+ function It(e, { queueTimeoutMs: t = Ve.QUEUE_WAIT_MS } = {}) {
443
443
  if (!Number.isInteger(e) || e < 1)
444
444
  throw new Error(
445
445
  `maxConcurrent must be a positive integer, received ${String(e)}`
@@ -483,40 +483,40 @@ function vt(e, { queueTimeoutMs: t = Ve.QUEUE_WAIT_MS } = {}) {
483
483
  }
484
484
  function ot() {
485
485
  return {
486
- moves: vt(Ve.TASK_MOVES),
487
- writes: vt(Ve.WRITES)
486
+ moves: It(Ve.TASK_MOVES),
487
+ writes: It(Ve.WRITES)
488
488
  };
489
489
  }
490
- const jr = 1e4, $r = 5 * 6e4, W = /* @__PURE__ */ new Map();
491
- let Dr = jr;
490
+ const Dr = 1e4, Ar = 5 * 6e4, W = /* @__PURE__ */ new Map();
491
+ let xr = Dr;
492
492
  const is = /* @__PURE__ */ new WeakMap(), Z = /* @__PURE__ */ new Map();
493
- let It, St;
494
- function Ar() {
495
- return It ??= ot(), It;
493
+ let vt, St;
494
+ function Er() {
495
+ return vt ??= ot(), vt;
496
496
  }
497
497
  function Ct() {
498
498
  return St ??= ot(), St;
499
499
  }
500
- function xr(e) {
500
+ function Or(e) {
501
501
  return Vt("sha256").update(e).digest("hex");
502
502
  }
503
- function Er({ moves: e, writes: t }) {
503
+ function _r({ moves: e, writes: t }) {
504
504
  return e.isIdle() && t.isIdle();
505
505
  }
506
506
  function as(e) {
507
- return e.leases === 0 && Er(e.limiters);
507
+ return e.leases === 0 && _r(e.limiters);
508
508
  }
509
- function Or(e, t, r) {
509
+ function Pr(e, t, r) {
510
510
  W.delete(e), t.lastUsedAt = r, W.set(e, t);
511
511
  }
512
- function _r(e) {
512
+ function Ur(e) {
513
513
  for (const [t, r] of W) {
514
- if (e - r.lastUsedAt < $r)
514
+ if (e - r.lastUsedAt < Ar)
515
515
  break;
516
516
  as(r) && W.delete(t);
517
517
  }
518
518
  }
519
- function Pr() {
519
+ function Rr() {
520
520
  for (const [e, t] of W)
521
521
  if (as(t))
522
522
  return W.delete(e), !0;
@@ -527,13 +527,13 @@ function cs(e, t) {
527
527
  return;
528
528
  const r = W.get(e);
529
529
  if (r)
530
- return Or(e, r, t), r;
531
- if (_r(t), W.size >= Dr && !Pr())
530
+ return Pr(e, r, t), r;
531
+ if (Ur(t), W.size >= xr && !Rr())
532
532
  return;
533
533
  const o = { limiters: ot(), lastUsedAt: t, leases: 0 };
534
534
  return W.set(e, o), o;
535
535
  }
536
- function Ur(e) {
536
+ function Lr(e) {
537
537
  const t = Z.get(e);
538
538
  if (t !== void 0)
539
539
  return Z.set(e, t + 1), {
@@ -559,51 +559,51 @@ function jt(e) {
559
559
  }
560
560
  Z.set(e, t - 1);
561
561
  }
562
- function Rr(e, t) {
563
- const r = xr(t);
562
+ function Nr(e, t) {
563
+ const r = Or(t);
564
564
  is.set(e, r);
565
565
  }
566
566
  function ds(e, t) {
567
567
  const r = is.get(e);
568
568
  return r ? (cs(r, Date.now()), async (o) => {
569
- const n = Ur(r);
569
+ const n = Lr(r);
570
570
  try {
571
571
  return await n.limiters[t](o);
572
572
  } finally {
573
573
  n.release();
574
574
  }
575
- }) : Ar()[t];
575
+ }) : Er()[t];
576
576
  }
577
- function Lr(e) {
577
+ function Mr(e) {
578
578
  return ds(e, "moves");
579
579
  }
580
- function Nr(e) {
580
+ function Fr(e) {
581
581
  return ds(e, "writes");
582
582
  }
583
- const Mr = "todoist-mcp", nt = Sr.version, ls = new Qs(), $t = Zs(import.meta.url);
583
+ const Hr = "todoist-mcp", nt = jr.version, ls = new Qs(), $t = Zs(import.meta.url);
584
584
  let Se;
585
- const Fr = async () => {
585
+ const Wr = async () => {
586
586
  const e = $t.resolve("@doist/todoist-sdk"), t = Me(Jt(e), "transport", "http-dispatcher.js");
587
587
  return $t(t);
588
588
  };
589
- let Hr = Fr;
590
- function Wr() {
591
- return `${Mr}/${nt}`;
589
+ let Br = Wr;
590
+ function zr() {
591
+ return `${Hr}/${nt}`;
592
592
  }
593
593
  function us(e) {
594
594
  return e.trim().toLowerCase();
595
595
  }
596
- function Br(e, t) {
596
+ function Kr(e, t) {
597
597
  return ls.run(us(e), t);
598
598
  }
599
- function zr({
599
+ function Yr({
600
600
  label: e,
601
601
  platform: t = "mcp",
602
602
  sessionId: r = Ne()
603
603
  } = {}) {
604
604
  const o = e ? us(e) : ls.getStore();
605
605
  return {
606
- "User-Agent": Wr(),
606
+ "User-Agent": zr(),
607
607
  "doist-platform": t,
608
608
  "doist-version": nt,
609
609
  "request-id": Ne(),
@@ -611,16 +611,16 @@ function zr({
611
611
  "mcp-tool": o ?? "unknown"
612
612
  };
613
613
  }
614
- function Kr(e, t) {
614
+ function qr(e, t) {
615
615
  const r = new Headers(e);
616
- for (const [o, n] of Object.entries(zr(t)))
616
+ for (const [o, n] of Object.entries(Yr(t)))
617
617
  r.set(o, n);
618
618
  return Object.fromEntries(r.entries());
619
619
  }
620
620
  function Dt() {
621
621
  return new DOMException("The operation was aborted due to timeout", "TimeoutError");
622
622
  }
623
- function qr(e, t) {
623
+ function Gr(e, t) {
624
624
  if (!e && t === void 0)
625
625
  return {
626
626
  signal: void 0,
@@ -658,22 +658,22 @@ function qr(e, t) {
658
658
  }
659
659
  };
660
660
  }
661
- async function Gr() {
662
- if (Yr())
663
- return Se || (Se = Hr().then((e) => e.getDefaultTransport()).catch((e) => {
661
+ async function Vr() {
662
+ if (Jr())
663
+ return Se || (Se = Br().then((e) => e.getDefaultTransport()).catch((e) => {
664
664
  throw Se = void 0, e;
665
665
  })), Se;
666
666
  }
667
- function Yr() {
667
+ function Jr() {
668
668
  return typeof process < "u" && !!process.versions?.node;
669
669
  }
670
- async function Vr(e, t) {
670
+ async function Xr(e, t) {
671
671
  if ("dispatcher" in t)
672
672
  return e;
673
- const r = await Gr();
673
+ const r = await Vr();
674
674
  return r ? (t.dispatcher = r.dispatcher, r.fetch ?? e) : e;
675
675
  }
676
- function Jr(e) {
676
+ function Qr(e) {
677
677
  return {
678
678
  ok: e.ok,
679
679
  status: e.status,
@@ -684,34 +684,34 @@ function Jr(e) {
684
684
  arrayBuffer: () => e.arrayBuffer()
685
685
  };
686
686
  }
687
- function Xr(e = globalThis.fetch, t = {}) {
687
+ function Zr(e = globalThis.fetch, t = {}) {
688
688
  const r = e === globalThis.fetch, { enabled: o = !0, platform: n = "mcp", sessionId: i = Ne() } = t;
689
689
  return async (a, c = {}) => {
690
- const { timeout: d, headers: u, signal: l, ...p } = c, { signal: h, cleanup: m } = qr(l, d);
690
+ const { timeout: d, headers: u, signal: l, ...p } = c, { signal: h, cleanup: m } = Gr(l, d);
691
691
  try {
692
692
  const y = {
693
693
  ...p,
694
694
  signal: h,
695
- ...o ? { headers: Kr(u, { platform: n, sessionId: i }) } : u !== void 0 ? { headers: u } : {}
696
- }, T = await (r ? await Vr(e, y) : e)(a, y);
697
- return Jr(T);
695
+ ...o ? { headers: qr(u, { platform: n, sessionId: i }) } : u !== void 0 ? { headers: u } : {}
696
+ }, T = await (r ? await Xr(e, y) : e)(a, y);
697
+ return Qr(T);
698
698
  } finally {
699
699
  m();
700
700
  }
701
701
  };
702
702
  }
703
- function Qr(e, {
703
+ function eo(e, {
704
704
  baseUrl: t,
705
705
  tracking: r
706
706
  } = {}) {
707
707
  const o = new er(e, {
708
- customFetch: Xr(globalThis.fetch, r),
708
+ customFetch: Zr(globalThis.fetch, r),
709
709
  ...t ? { baseUrl: t } : {}
710
710
  });
711
- return Rr(o, e), o;
711
+ return Nr(o, e), o;
712
712
  }
713
- const Zr = 2, eo = 500, to = 2e3, so = 50, ro = /* @__PURE__ */ new Set([502, 503, 504]);
714
- function oo(e) {
713
+ const to = 2, so = 500, ro = 2e3, oo = 50, no = /* @__PURE__ */ new Set([502, 503, 504]);
714
+ function io(e) {
715
715
  if (e == null || typeof e != "object")
716
716
  return;
717
717
  const t = e;
@@ -727,32 +727,32 @@ function oo(e) {
727
727
  return Number(r[1]);
728
728
  }
729
729
  }
730
- function no(e) {
731
- const t = oo(e);
732
- return t !== void 0 && ro.has(t);
730
+ function ao(e) {
731
+ const t = io(e);
732
+ return t !== void 0 && no.has(t);
733
733
  }
734
- function io({
734
+ function co({
735
735
  attempt: e,
736
736
  baseDelayMs: t,
737
737
  maxDelayMs: r,
738
738
  random: o = Math.random
739
739
  }) {
740
740
  const n = Math.min(t * 2 ** e, r), i = Math.round(o() * n);
741
- return Math.min(n, Math.max(so, i));
741
+ return Math.min(n, Math.max(oo, i));
742
742
  }
743
- function ao(e) {
743
+ function lo(e) {
744
744
  return new Promise((t) => setTimeout(t, e));
745
745
  }
746
746
  async function P(e, t = {}) {
747
- const r = t.maxRetries ?? Zr, o = t.baseDelayMs ?? eo, n = t.maxDelayMs ?? to, i = t.random;
747
+ const r = t.maxRetries ?? to, o = t.baseDelayMs ?? so, n = t.maxDelayMs ?? ro, i = t.random;
748
748
  let a;
749
749
  for (let c = 0; c <= r; c++)
750
750
  try {
751
751
  return await e();
752
752
  } catch (d) {
753
- if (a = d, c < r && no(d)) {
754
- const u = io({ attempt: c, baseDelayMs: o, maxDelayMs: n, random: i });
755
- await ao(u);
753
+ if (a = d, c < r && ao(d)) {
754
+ const u = co({ attempt: c, baseDelayMs: o, maxDelayMs: n, random: i });
755
+ await lo(u);
756
756
  continue;
757
757
  }
758
758
  throw d;
@@ -840,13 +840,13 @@ const g = {
840
840
  // OpenAI MCP tools
841
841
  SEARCH: "search",
842
842
  FETCH: "fetch"
843
- }, vl = {
843
+ }, Sl = {
844
844
  /**
845
845
  * Strips email addresses from tool outputs that expose user data.
846
846
  * Affects: find-project-collaborators, find-completed-tasks
847
847
  */
848
848
  STRIP_EMAILS: "strip_emails"
849
- }, co = process.env.USE_STRUCTURED_CONTENT === "true" || process.env.NODE_ENV === "test", At = /* @__PURE__ */ new WeakMap();
849
+ }, uo = process.env.USE_STRUCTURED_CONTENT === "true" || process.env.NODE_ENV === "test", At = /* @__PURE__ */ new WeakMap();
850
850
  function xt(e, t) {
851
851
  const r = s.toJSONSchema(e, { target: "draft-2020-12", io: t }), o = e["~standard"];
852
852
  return {
@@ -859,7 +859,7 @@ function xt(e, t) {
859
859
  }
860
860
  };
861
861
  }
862
- function lo(e) {
862
+ function po(e) {
863
863
  const t = At.get(e);
864
864
  if (t)
865
865
  return t;
@@ -869,48 +869,48 @@ function lo(e) {
869
869
  };
870
870
  return At.set(e, r), r;
871
871
  }
872
- function uo({
872
+ function ho({
873
873
  textContent: e,
874
874
  structuredContent: t,
875
875
  contentItems: r
876
876
  }) {
877
877
  const o = Je(t), n = {}, i = [];
878
- return r && i.push(...r), !co && t && i.push({
878
+ return r && i.push(...r), !uo && t && i.push({
879
879
  type: "text",
880
880
  text: JSON.stringify(o)
881
881
  }), e && i.push({ type: "text", text: e }), i.length > 0 && (n.content = i), t && (n.structuredContent = o), n;
882
882
  }
883
- function po(e) {
883
+ function mo(e) {
884
884
  return {
885
885
  content: [{ type: "text", text: e }],
886
886
  isError: !0
887
887
  };
888
888
  }
889
- const ho = /* @__PURE__ */ new Set(["file"]);
890
- function mo(e) {
889
+ const fo = /* @__PURE__ */ new Set(["file"]);
890
+ function bo(e) {
891
891
  return !e || typeof e != "object" || Array.isArray(e) ? e : Object.fromEntries(
892
892
  Object.entries(e).map(
893
- ([t, r]) => ho.has(t) && r !== void 0 ? [t, "[redacted]"] : [t, r]
893
+ ([t, r]) => fo.has(t) && r !== void 0 ? [t, "[redacted]"] : [t, r]
894
894
  )
895
895
  );
896
896
  }
897
- function fo(e) {
897
+ function go(e) {
898
898
  return { ...{
899
- title: `Todoist: ${bo(e.name)}`,
899
+ title: `Todoist: ${yo(e.name)}`,
900
900
  openWorldHint: !1
901
901
  }, ...e.annotations };
902
902
  }
903
- function bo(e) {
903
+ function yo(e) {
904
904
  return e.split("-").filter(Boolean).map((t) => `${t.charAt(0).toUpperCase()}${t.slice(1)}`).join(" ");
905
905
  }
906
- function go(e) {
906
+ function To(e) {
907
907
  return e ? typeof e["ui/resourceUri"] == "string" ? !0 : typeof e.ui == "object" && e.ui !== null : !1;
908
908
  }
909
- function yo(e) {
909
+ function ko(e) {
910
910
  const t = typeof e.ui == "object" && e.ui !== null ? e.ui : void 0, r = t?.resourceUri, o = e["ui/resourceUri"];
911
911
  return typeof r == "string" && typeof o != "string" ? { ...e, "ui/resourceUri": r } : typeof o == "string" && typeof r != "string" ? { ...e, ui: { ...t, resourceUri: o } } : e;
912
912
  }
913
- const To = [
913
+ const wo = [
914
914
  g.FIND_PROJECT_COLLABORATORS,
915
915
  g.FIND_COMPLETED_TASKS
916
916
  ];
@@ -927,36 +927,36 @@ function Xe(e) {
927
927
  }
928
928
  return e;
929
929
  }
930
- function ko(e) {
930
+ function Io(e) {
931
931
  const t = /\s*\([^)]*@[^)]+\)/g, r = /\S+@\S+\.\S+/g;
932
932
  return e.replace(t, "").replace(r, "[email hidden]");
933
933
  }
934
- function wo({
934
+ function vo({
935
935
  tool: e,
936
936
  server: t,
937
937
  client: r,
938
938
  features: o = []
939
939
  }) {
940
- const n = o.some((l) => l.name === "strip_emails") && To.includes(e.name), i = e.execute, { input: a, output: c } = lo(e), d = async (l, p) => {
940
+ const n = o.some((l) => l.name === "strip_emails") && wo.includes(e.name), i = e.execute, { input: a, output: c } = po(e), d = async (l, p) => {
941
941
  try {
942
- let { textContent: h, structuredContent: m, contentItems: y } = await Br(
942
+ let { textContent: h, structuredContent: m, contentItems: y } = await Kr(
943
943
  e.name,
944
944
  () => P(() => i(l, r))
945
945
  );
946
- return n && (h && (h = ko(h)), m && (m = Xe(m))), uo({ textContent: h, structuredContent: m, contentItems: y });
946
+ return n && (h && (h = Io(h)), m && (m = Xe(m))), ho({ textContent: h, structuredContent: m, contentItems: y });
947
947
  } catch (h) {
948
- return console.error(`Error executing tool ${e.name}:`, { args: mo(l), error: h }), po(vr(h));
948
+ return console.error(`Error executing tool ${e.name}:`, { args: bo(l), error: h }), mo(Sr(h));
949
949
  }
950
950
  }, u = {
951
951
  description: e.description,
952
952
  inputSchema: a,
953
953
  ...c ? { outputSchema: c } : {},
954
- annotations: fo(e),
955
- ...e._meta ? { _meta: go(e._meta) ? yo(e._meta) : e._meta } : {}
954
+ annotations: go(e),
955
+ ...e._meta ? { _meta: To(e._meta) ? ko(e._meta) : e._meta } : {}
956
956
  };
957
957
  t.registerTool(e.name, u, d);
958
958
  }
959
- const vo = s.object({
959
+ const So = s.object({
960
960
  period: s.enum(["today", "7d", "14d", "30d", "this-week", "this-month"]).default("7d").describe(
961
961
  'Time period for the analysis. "today" analyzes the current day, "7d"/"14d"/"30d" analyze the last N days, "this-week" and "this-month" analyze the current week or month.'
962
962
  ),
@@ -965,7 +965,7 @@ const vo = s.object({
965
965
  ),
966
966
  projectId: s.string().optional().describe("Optional project ID to scope the analysis to a specific project.")
967
967
  });
968
- function Io(e, t = /* @__PURE__ */ new Date()) {
968
+ function Co(e, t = /* @__PURE__ */ new Date()) {
969
969
  const r = (n) => n.toISOString().slice(0, 10), o = r(t);
970
970
  switch (e) {
971
971
  case "today":
@@ -1012,7 +1012,7 @@ function Io(e, t = /* @__PURE__ */ new Date()) {
1012
1012
  }
1013
1013
  }
1014
1014
  }
1015
- function So(e) {
1015
+ function jo(e) {
1016
1016
  const t = {
1017
1017
  goals: `### Goal Tracking
1018
1018
  - Compare tasks completed today vs the daily goal
@@ -1043,8 +1043,8 @@ function So(e) {
1043
1043
 
1044
1044
  `) : t[e] ?? "";
1045
1045
  }
1046
- function Co(e) {
1047
- const { since: t, until: r, periodDescription: o } = Io(e.period), n = e.projectId ? `
1046
+ function $o(e) {
1047
+ const { since: t, until: r, periodDescription: o } = Co(e.period), n = e.projectId ? `
1048
1048
  Scope this analysis to project ID: ${e.projectId}. Pass this projectId when calling find-completed-tasks and get-overview.` : "";
1049
1049
  return `Analyze my Todoist productivity for ${o} (${t} to ${r}).${n}
1050
1050
 
@@ -1065,7 +1065,7 @@ ${e.focus === "overall" || e.focus === "projects" ? `4. **get-overview** — Get
1065
1065
 
1066
1066
  Using the collected data, produce an analysis covering the following sections:
1067
1067
 
1068
- ${So(e.focus)}
1068
+ ${jo(e.focus)}
1069
1069
 
1070
1070
  ### Step 3: Format
1071
1071
 
@@ -1075,14 +1075,14 @@ Present the analysis as a clear, well-structured markdown report with:
1075
1075
  - Specific numbers and comparisons (not vague statements)
1076
1076
  - Actionable takeaways highlighted clearly`;
1077
1077
  }
1078
- function jo(e) {
1078
+ function Do(e) {
1079
1079
  return {
1080
1080
  messages: [
1081
1081
  {
1082
1082
  role: "user",
1083
1083
  content: {
1084
1084
  type: "text",
1085
- text: Co(e)
1085
+ text: $o(e)
1086
1086
  }
1087
1087
  }
1088
1088
  ]
@@ -1092,8 +1092,8 @@ const ye = {
1092
1092
  name: "productivity-analysis",
1093
1093
  title: "Productivity Analysis",
1094
1094
  description: "Analyze your Todoist productivity with insights on completion trends, goal streaks, project distribution, and actionable recommendations. Gathers data from multiple tools and synthesizes a comprehensive report.",
1095
- argsSchema: vo,
1096
- callback: jo
1095
+ argsSchema: So,
1096
+ callback: Do
1097
1097
  }, ps = 'The duration of the task. Use format: "2h" (hours), "90m" (minutes), "2h30m" (combined), "1.5h" (decimal hours), or "3d" (whole days; days cannot be combined with hours or minutes). Todoist apps only display durations under 24 hours: a longer or day-based duration is stored and reported by this server, but the apps show the task as having no duration.', hs = 'Use format like "2h", "30m", "2h30m", "1.5h", or "3d"';
1098
1098
  class x extends Error {
1099
1099
  constructor(t, r) {
@@ -1108,19 +1108,19 @@ function ms(e) {
1108
1108
  throw new x(e, "Duration must be a non-empty string");
1109
1109
  const r = t.match(/^(\d+(?:\.\d+)?)d$/)?.[1];
1110
1110
  if (r !== void 0)
1111
- return { amount: Do(e, r), unit: "day" };
1112
- if ($o(t))
1111
+ return { amount: xo(e, r), unit: "day" };
1112
+ if (Ao(t))
1113
1113
  throw new x(
1114
1114
  e,
1115
1115
  `${hs} (days cannot be combined with hours or minutes)`
1116
1116
  );
1117
- return { amount: Ao(e, t), unit: "minute" };
1117
+ return { amount: Eo(e, t), unit: "minute" };
1118
1118
  }
1119
- function $o(e) {
1119
+ function Ao(e) {
1120
1120
  return /^(?:\d+(?:\.\d+)?[dhm])+$/.test(e) && /d/.test(e) && /[hm]/.test(e);
1121
1121
  }
1122
1122
  const Qe = "Duration is too large";
1123
- function Do(e, t) {
1123
+ function xo(e, t) {
1124
1124
  const r = Number.parseFloat(t);
1125
1125
  if (Number.isNaN(r) || r < 0)
1126
1126
  throw new x(e, "Days must be a positive number");
@@ -1132,7 +1132,7 @@ function Do(e, t) {
1132
1132
  throw new x(e, "Duration must be at least 1 day");
1133
1133
  return r;
1134
1134
  }
1135
- function Ao(e, t) {
1135
+ function Eo(e, t) {
1136
1136
  const r = t.match(/^(?:(\d+(?:\.\d+)?)h)?(?:(\d+(?:\.\d+)?)m)?$/);
1137
1137
  if (!r || !r[1] && !r[2])
1138
1138
  throw new x(e, hs);
@@ -1163,21 +1163,21 @@ function Ao(e, t) {
1163
1163
  throw new x(e, "Duration must be greater than 0 minutes");
1164
1164
  return o;
1165
1165
  }
1166
- function xo(e, t = "minute") {
1166
+ function Oo(e, t = "minute") {
1167
1167
  if (t === "day")
1168
1168
  return `${e}d`;
1169
1169
  if (e <= 0) return "0m";
1170
1170
  const r = Math.floor(e / 60), o = e % 60;
1171
1171
  return r === 0 ? `${o}m` : o === 0 ? `${r}h` : `${r}h${o}m`;
1172
1172
  }
1173
- const Eo = ["p1", "p2", "p3", "p4"], it = 'Task priority as a string: "p1" (highest), "p2" (high), "p3" (medium), or "p4" (lowest/default). Integers like 1, 2, 3, or 4 are not accepted.', at = s.enum(Eo).describe(it);
1173
+ const _o = ["p1", "p2", "p3", "p4"], it = 'Task priority as a string: "p1" (highest), "p2" (high), "p3" (medium), or "p4" (lowest/default). Integers like 1, 2, 3, or 4 are not accepted.', at = s.enum(_o).describe(it);
1174
1174
  function fs(e) {
1175
1175
  return { p1: 4, p2: 3, p3: 2, p4: 1 }[e];
1176
1176
  }
1177
- function Oo(e) {
1177
+ function Po(e) {
1178
1178
  return { 4: "p1", 3: "p2", 2: "p3", 1: "p4" }[e];
1179
1179
  }
1180
- const bs = 300 * 1e3, _o = 1e4, Po = 1e3;
1180
+ const bs = 300 * 1e3, Uo = 1e4, Ro = 1e3;
1181
1181
  class gs {
1182
1182
  constructor(t, r) {
1183
1183
  this.maxEntries = t, this.ttl = r, this.entries = /* @__PURE__ */ new Map();
@@ -1212,13 +1212,13 @@ class gs {
1212
1212
  }
1213
1213
  }
1214
1214
  const Ue = new gs(
1215
- _o,
1215
+ Uo,
1216
1216
  bs
1217
1217
  ), le = new gs(
1218
- Po,
1218
+ Ro,
1219
1219
  bs
1220
1220
  ), ys = "me";
1221
- class Uo {
1221
+ class Lo {
1222
1222
  /**
1223
1223
  * Resolve a user name or ID to a user ID by looking up collaborators across all shared projects.
1224
1224
  * Supports exact name matches, partial matches, email matches, and the "me" keyword.
@@ -1353,11 +1353,11 @@ class Uo {
1353
1353
  Ue.clear(), le.clear();
1354
1354
  }
1355
1355
  }
1356
- const H = new Uo();
1357
- async function Ro(e, t) {
1356
+ const H = new Lo();
1357
+ async function No(e, t) {
1358
1358
  return H.resolveUser(e, t);
1359
1359
  }
1360
- async function Lo(e, t) {
1360
+ async function Mo(e, t) {
1361
1361
  const r = /* @__PURE__ */ new Set(), o = /* @__PURE__ */ new Set(), n = [], i = [];
1362
1362
  for (const a of t) {
1363
1363
  const c = a.trim().toLowerCase();
@@ -1382,7 +1382,7 @@ const Ts = ["assigned", "unassignedOrMe", "all"];
1382
1382
  async function ct(e, t) {
1383
1383
  if (!t)
1384
1384
  return;
1385
- const r = await Ro(e, t);
1385
+ const r = await No(e, t);
1386
1386
  if (!r)
1387
1387
  throw new Error(
1388
1388
  `Could not find user: "${t}". Make sure the user is a collaborator on a shared project.`
@@ -1401,7 +1401,7 @@ function Ze({
1401
1401
  const n = !!(e && t) && e === r;
1402
1402
  return e && t && !n ? `assigned to: ${t}` : n || o === "unassignedOrMe" ? "!assigned to: others" : o === "assigned" ? "assigned to: others" : "";
1403
1403
  }
1404
- function No({
1404
+ function Fo({
1405
1405
  tasks: e,
1406
1406
  resolvedAssigneeId: t,
1407
1407
  currentUserId: r,
@@ -1452,14 +1452,14 @@ async function ws(e) {
1452
1452
  limit: j.PROJECTS_MAX
1453
1453
  });
1454
1454
  }
1455
- async function Mo(e) {
1455
+ async function Ho(e) {
1456
1456
  return z({
1457
1457
  apiMethod: e.getArchivedProjects.bind(e),
1458
1458
  args: {},
1459
1459
  limit: j.PROJECTS_MAX
1460
1460
  });
1461
1461
  }
1462
- function Fo(e) {
1462
+ function Wo(e) {
1463
1463
  const t = (i) => i.replaceAll(/[.*+?^${}()|[\]\\]/g, "\\$&"), r = /(?<!\\)(?:\\\\)*\*/.test(e), o = [...e];
1464
1464
  let n = "";
1465
1465
  for (let i = 0; i < o.length; i++) {
@@ -1468,21 +1468,21 @@ function Fo(e) {
1468
1468
  }
1469
1469
  return new RegExp(r ? `^${n}$` : n, "iu");
1470
1470
  }
1471
- async function Ho(e, t) {
1471
+ async function Bo(e, t) {
1472
1472
  return z({
1473
1473
  apiMethod: e.searchLabels.bind(e),
1474
1474
  args: { query: dt(t) },
1475
1475
  limit: j.LABELS_MAX
1476
1476
  });
1477
1477
  }
1478
- async function Wo(e) {
1478
+ async function zo(e) {
1479
1479
  return z({
1480
1480
  apiMethod: e.getSharedLabels.bind(e),
1481
1481
  args: {},
1482
1482
  limit: j.LABELS_MAX
1483
1483
  });
1484
1484
  }
1485
- async function Bo(e, t, r) {
1485
+ async function Ko(e, t, r) {
1486
1486
  const o = dt(t);
1487
1487
  return z({
1488
1488
  apiMethod: e.searchSections.bind(e),
@@ -1498,12 +1498,12 @@ function U(e) {
1498
1498
  dueDate: e.due?.date,
1499
1499
  recurring: e.due?.isRecurring && e.due.string ? e.due.string : !1,
1500
1500
  deadlineDate: e.deadline?.date,
1501
- priority: Oo(e.priority) ?? "p4",
1501
+ priority: Po(e.priority) ?? "p4",
1502
1502
  projectId: e.projectId,
1503
1503
  sectionId: e.sectionId ?? void 0,
1504
1504
  parentId: e.parentId ?? void 0,
1505
1505
  labels: e.labels,
1506
- duration: e.duration ? xo(e.duration.amount, e.duration.unit) : void 0,
1506
+ duration: e.duration ? Oo(e.duration.amount, e.duration.unit) : void 0,
1507
1507
  responsibleUid: e.responsibleUid ?? void 0,
1508
1508
  assignedByUid: e.assignedByUid ?? void 0,
1509
1509
  // Only emitted when true: a deleted task is the exception, and every list
@@ -1522,8 +1522,8 @@ function se(e) {
1522
1522
  color: e.color,
1523
1523
  isFavorite: e.isFavorite,
1524
1524
  isShared: e.isShared,
1525
- parentId: q(e) ? e.parentId ?? void 0 : void 0,
1526
- inboxProject: q(e) ? e.inboxProject ?? !1 : !1,
1525
+ parentId: Y(e) ? e.parentId ?? void 0 : void 0,
1526
+ inboxProject: Y(e) ? e.inboxProject ?? !1 : !1,
1527
1527
  viewStyle: e.viewStyle,
1528
1528
  workspaceId: Ce(e) ? e.workspaceId : void 0,
1529
1529
  folderId: Ce(e) ? e.folderId ?? void 0 : void 0,
@@ -1556,7 +1556,7 @@ function we(e) {
1556
1556
  } : void 0
1557
1557
  };
1558
1558
  }
1559
- function zo(e) {
1559
+ function Yo(e) {
1560
1560
  return {
1561
1561
  id: e.id ?? void 0,
1562
1562
  objectType: e.objectType,
@@ -1569,7 +1569,7 @@ function zo(e) {
1569
1569
  extraData: e.extraData ?? void 0
1570
1570
  };
1571
1571
  }
1572
- const Ko = ce.object({
1572
+ const qo = ce.object({
1573
1573
  httpStatusCode: ce.number(),
1574
1574
  responseData: ce.object({
1575
1575
  error: ce.string(),
@@ -1591,7 +1591,7 @@ async function lt({
1591
1591
  const { results: n, nextCursor: i } = await e.getTasksByFilter({ query: t, cursor: o, limit: r });
1592
1592
  return { tasks: n.map(U), nextCursor: i };
1593
1593
  } catch (n) {
1594
- const i = Ko.safeParse(n);
1594
+ const i = qo.safeParse(n);
1595
1595
  if (!i.success)
1596
1596
  throw n;
1597
1597
  const { responseData: a } = i.data;
@@ -1640,18 +1640,18 @@ function ke(e) {
1640
1640
  };
1641
1641
  }
1642
1642
  }
1643
- function vs(e) {
1643
+ function Is(e) {
1644
1644
  const t = e.filter(
1645
1645
  (o) => o.type === "relative" || o.type === "absolute"
1646
1646
  ).length, r = e.filter((o) => o.type === "location").length;
1647
1647
  return { timeBasedCount: t, locationCount: r };
1648
1648
  }
1649
- const Is = "none";
1650
- function qo(e) {
1651
- return e.length === 1 && e[0]?.trim().toLowerCase() === Is;
1649
+ const vs = "none";
1650
+ function Go(e) {
1651
+ return e.length === 1 && e[0]?.trim().toLowerCase() === vs;
1652
1652
  }
1653
- async function Go(e, t, r) {
1654
- const o = await Yo(e, t);
1653
+ async function Vo(e, t, r) {
1654
+ const o = await Jo(e, t);
1655
1655
  if (o)
1656
1656
  return Ot(
1657
1657
  [...o.uidsToNotify ?? [], o.postedUid],
@@ -1662,7 +1662,7 @@ async function Go(e, t, r) {
1662
1662
  const n = await e.getTask(t.taskId);
1663
1663
  return Ot([n.responsibleUid, n.assignedByUid, n.addedByUid], r);
1664
1664
  }
1665
- async function Yo(e, t) {
1665
+ async function Jo(e, t) {
1666
1666
  let r, o = null;
1667
1667
  do {
1668
1668
  const n = await e.getComments({
@@ -1682,12 +1682,12 @@ function Ot(e, t) {
1682
1682
  return [...r];
1683
1683
  }
1684
1684
  const Ae = He.map((e) => e.key);
1685
- function Vo(e) {
1685
+ function Xo(e) {
1686
1686
  if (typeof e != "string") return;
1687
1687
  const t = e.toLowerCase();
1688
1688
  return (He.find((o) => o.key === t) ?? He.find((o) => o.displayName.toLowerCase() === t))?.key;
1689
1689
  }
1690
- const Jo = `Color for the entity. Accepts a color key (e.g. "berry_red") or display name (e.g. "Berry Red"). Valid colors: ${Ae.join(", ")}. Unrecognized colors are omitted and charcoal will be used as the default.`, fe = s.preprocess(Vo, s.enum(Ae).optional()).describe(Jo);
1690
+ const Qo = `Color for the entity. Accepts a color key (e.g. "berry_red") or display name (e.g. "Berry Red"). Valid colors: ${Ae.join(", ")}. Unrecognized colors are omitted and charcoal will be used as the default.`, fe = s.preprocess(Xo, s.enum(Ae).optional()).describe(Qo);
1691
1691
  s.enum(Ae);
1692
1692
  const be = s.enum(Ae).optional().catch(void 0), K = s.object({
1693
1693
  id: s.string(),
@@ -1723,16 +1723,16 @@ const be = s.enum(Ae).optional().catch(void 0), K = s.object({
1723
1723
  folderId: s.string().optional().describe("Workspace projects only."),
1724
1724
  childOrder: s.number().describe("Ordering index among siblings."),
1725
1725
  isArchived: s.boolean()
1726
- }), G = s.object({
1726
+ }), q = s.object({
1727
1727
  id: s.string(),
1728
1728
  name: s.string(),
1729
1729
  sectionOrder: s.number().describe("Ordering index within the project."),
1730
1730
  description: s.string().optional().describe("Supports Markdown.")
1731
1731
  });
1732
- function Y({ id: e, name: t, sectionOrder: r, description: o }) {
1732
+ function G({ id: e, name: t, sectionOrder: r, description: o }) {
1733
1733
  return { id: e, name: t, sectionOrder: r, description: o ?? void 0 };
1734
1734
  }
1735
- const Xo = s.object({
1735
+ const Zo = s.object({
1736
1736
  resourceType: s.string().describe("file, url, image, etc."),
1737
1737
  fileName: s.string().optional(),
1738
1738
  fileSize: s.number().optional().describe("Bytes."),
@@ -1745,7 +1745,7 @@ const Xo = s.object({
1745
1745
  image: s.string().optional().describe("For image resource types."),
1746
1746
  imageWidth: s.number().optional().describe("Pixels."),
1747
1747
  imageHeight: s.number().optional().describe("Pixels.")
1748
- }), ve = s.object({
1748
+ }), Ie = s.object({
1749
1749
  id: s.string(),
1750
1750
  taskId: s.string().optional(),
1751
1751
  projectId: s.string().optional(),
@@ -1753,8 +1753,8 @@ const Xo = s.object({
1753
1753
  postedAt: s.string().describe("ISO 8601."),
1754
1754
  postedUid: s.string().optional(),
1755
1755
  notifiedUserIds: s.array(s.string()).optional().describe("Users notified about this comment. Absent when nobody was notified."),
1756
- fileAttachment: Xo.optional()
1757
- }), Qo = s.object({
1756
+ fileAttachment: Zo.optional()
1757
+ }), en = s.object({
1758
1758
  id: s.string().optional(),
1759
1759
  objectType: s.string().describe("task, project, etc."),
1760
1760
  objectId: s.string(),
@@ -1764,7 +1764,7 @@ const Xo = s.object({
1764
1764
  parentItemId: s.string().optional(),
1765
1765
  initiatorId: s.string().optional().describe("User who initiated the event."),
1766
1766
  extraData: s.record(s.string(), s.unknown()).optional()
1767
- }), Zo = s.object({
1767
+ }), tn = s.object({
1768
1768
  id: s.string(),
1769
1769
  name: s.string(),
1770
1770
  email: s.string()
@@ -1774,7 +1774,7 @@ const Xo = s.object({
1774
1774
  color: be,
1775
1775
  order: s.number().optional().catch(void 0).describe("Display order."),
1776
1776
  isFavorite: s.boolean()
1777
- }), en = s.object({
1777
+ }), sn = s.object({
1778
1778
  isRecurring: s.boolean(),
1779
1779
  string: s.string().describe("Human-readable due string."),
1780
1780
  date: s.string().describe("ISO 8601."),
@@ -1785,7 +1785,7 @@ const Xo = s.object({
1785
1785
  taskId: s.string(),
1786
1786
  type: s.enum(tr),
1787
1787
  minuteOffset: s.number().optional().describe("Minutes before due. Relative reminders only."),
1788
- due: en.optional().describe("Absolute, and sometimes relative, reminders."),
1788
+ due: sn.optional().describe("Absolute, and sometimes relative, reminders."),
1789
1789
  name: s.string().optional().describe("Location name. Location reminders only."),
1790
1790
  locLat: s.string().optional().describe("Location reminders only."),
1791
1791
  locLong: s.string().optional().describe("Location reminders only."),
@@ -1796,26 +1796,26 @@ const Xo = s.object({
1796
1796
  item: s.string().describe("Usually the ID of the item that failed."),
1797
1797
  error: s.string(),
1798
1798
  code: s.string().optional()
1799
- }), tn = s.object({
1799
+ }), rn = s.object({
1800
1800
  taskId: s.string().optional().describe("The ID of the task to comment on."),
1801
1801
  projectId: s.string().optional().describe(
1802
1802
  'The ID of the project to comment on. Project ID should be an ID string, or the text "inbox", for inbox tasks.'
1803
1803
  ),
1804
1804
  content: s.string().min(1).describe("The content of the comment."),
1805
1805
  notifyUsers: s.array(s.string().min(1)).min(1).max(j.NOTIFY_USERS_MAX).optional().describe(
1806
- `Who to notify about this comment — a user ID, email, full name, or "me" for each person. Set this whenever the comment mentions someone; the text of an @mention notifies nobody on its own. Omit to notify whoever the Todoist apps would (the task's assignee, assigner and creator on a first comment, or the previous comment's participants on a reply). Pass ["${Is}"] to notify nobody.`
1806
+ `Who to notify about this comment — a user ID, email, full name, or "me" for each person. Set this whenever the comment mentions someone; the text of an @mention notifies nobody on its own. Omit to notify whoever the Todoist apps would (the task's assignee, assigner and creator on a first comment, or the previous comment's participants on a reply). Pass ["${vs}"] to notify nobody.`
1807
1807
  )
1808
- }), sn = {
1809
- comments: s.array(tn).min(1).describe("The array of comments to add.")
1810
- }, rn = {
1811
- comments: s.array(ve).describe("The created comments."),
1808
+ }), on = {
1809
+ comments: s.array(rn).min(1).describe("The array of comments to add.")
1810
+ }, nn = {
1811
+ comments: s.array(Ie).describe("The created comments."),
1812
1812
  totalCount: s.number().describe("The total number of comments created."),
1813
1813
  addedCommentIds: s.array(s.string()).describe("The IDs of the added comments.")
1814
- }, on = {
1814
+ }, an = {
1815
1815
  name: g.ADD_COMMENTS,
1816
1816
  description: "Add multiple comments to tasks or projects, optionally notifying collaborators. Each comment must specify either taskId or projectId.",
1817
- parameters: sn,
1818
- outputSchema: rn,
1817
+ parameters: on,
1818
+ outputSchema: nn,
1819
1819
  annotations: { readOnlyHint: !1, destructiveHint: !1, idempotentHint: !1 },
1820
1820
  async execute(e, t) {
1821
1821
  const { comments: r } = e;
@@ -1838,7 +1838,7 @@ const Xo = s.object({
1838
1838
  });
1839
1839
  return p.taskId ? { taskId: p.taskId } : { projectId: h };
1840
1840
  })
1841
- ), c = await nn({
1841
+ ), c = await cn({
1842
1842
  comments: r,
1843
1843
  targets: a,
1844
1844
  client: t,
@@ -1856,7 +1856,7 @@ const Xo = s.object({
1856
1856
  })
1857
1857
  )).map(we);
1858
1858
  return {
1859
- textContent: an({ comments: u }),
1859
+ textContent: dn({ comments: u }),
1860
1860
  structuredContent: {
1861
1861
  comments: u,
1862
1862
  totalCount: u.length,
@@ -1865,7 +1865,7 @@ const Xo = s.object({
1865
1865
  };
1866
1866
  }
1867
1867
  };
1868
- async function nn({
1868
+ async function cn({
1869
1869
  comments: e,
1870
1870
  targets: t,
1871
1871
  client: r,
@@ -1875,15 +1875,15 @@ async function nn({
1875
1875
  return await Promise.all(
1876
1876
  e.map(async ({ notifyUsers: i }, a) => {
1877
1877
  if (i)
1878
- return qo(i) ? [] : (await Lo(r, i)).map((p) => p.userId);
1878
+ return Go(i) ? [] : (await Mo(r, i)).map((p) => p.userId);
1879
1879
  const c = t[a];
1880
1880
  if (!c || !o) return [];
1881
- const d = c.taskId ? `task:${c.taskId}` : `project:${c.projectId}`, u = n.get(d) ?? Go(r, c, o.id);
1881
+ const d = c.taskId ? `task:${c.taskId}` : `project:${c.projectId}`, u = n.get(d) ?? Vo(r, c, o.id);
1882
1882
  return n.set(d, u), await u;
1883
1883
  })
1884
1884
  );
1885
1885
  }
1886
- function an({ comments: e }) {
1886
+ function dn({ comments: e }) {
1887
1887
  const t = e.filter((c) => c.taskId).length, r = e.filter((c) => c.projectId).length, o = [];
1888
1888
  if (t > 0) {
1889
1889
  const c = t > 1 ? "comments" : "comment";
@@ -1905,7 +1905,7 @@ function R(e) {
1905
1905
  function Ss(e) {
1906
1906
  return e.description || void 0;
1907
1907
  }
1908
- const cn = {
1908
+ const ln = {
1909
1909
  search: s.string().optional().describe(
1910
1910
  "Search for a filter by name (partial and case insensitive match). If omitted, all filters are returned."
1911
1911
  )
@@ -1919,14 +1919,14 @@ const cn = {
1919
1919
  color: be,
1920
1920
  isFavorite: s.boolean().describe("Whether the filter is marked as favorite."),
1921
1921
  itemOrder: s.number().describe("The display order of the filter.")
1922
- }), dn = {
1922
+ }), un = {
1923
1923
  filters: s.array(pt).describe("The found filters."),
1924
1924
  totalCount: s.number().describe("The total number of filters returned.")
1925
- }, ln = {
1925
+ }, pn = {
1926
1926
  name: g.FIND_FILTERS,
1927
1927
  description: 'List all personal filters or search for filters by name. Filters are saved custom views that use query syntax to organize tasks (e.g. "today & p1", "#Work & overdue").',
1928
- parameters: cn,
1929
- outputSchema: dn,
1928
+ parameters: ln,
1929
+ outputSchema: un,
1930
1930
  annotations: { readOnlyHint: !0, destructiveHint: !1, idempotentHint: !0 },
1931
1931
  async execute(e, t) {
1932
1932
  let o = ((await t.sync({ resourceTypes: ["filters"], syncToken: "*" })).filters ?? []).filter((a) => !a.isDeleted);
@@ -1945,7 +1945,7 @@ const cn = {
1945
1945
  itemOrder: a.itemOrder
1946
1946
  }));
1947
1947
  return {
1948
- textContent: un({ filters: n, search: e.search }),
1948
+ textContent: hn({ filters: n, search: e.search }),
1949
1949
  structuredContent: {
1950
1950
  filters: n,
1951
1951
  totalCount: n.length
@@ -1953,7 +1953,7 @@ const cn = {
1953
1953
  };
1954
1954
  }
1955
1955
  };
1956
- function un({
1956
+ function hn({
1957
1957
  filters: e,
1958
1958
  search: t
1959
1959
  }) {
@@ -1974,7 +1974,7 @@ ${n.map((i) => `- ${i}`).join(`
1974
1974
  return o.join(`
1975
1975
  `);
1976
1976
  }
1977
- const pn = s.object({
1977
+ const mn = s.object({
1978
1978
  name: s.string().min(1).describe("The name of the filter."),
1979
1979
  query: s.string().min(1).describe(
1980
1980
  'The filter query string. Examples: "today & p1", "#Work & overdue", "@email & today", "(p1 | p2) & !assigned". Operators: | (OR), & (AND), ! (NOT), () grouping, , (multiple queries).'
@@ -1982,16 +1982,16 @@ const pn = s.object({
1982
1982
  description: R("A markdown description explaining what the filter is for."),
1983
1983
  color: fe,
1984
1984
  isFavorite: s.boolean().optional().describe("Whether to mark the filter as a favorite. Defaults to false.")
1985
- }), hn = {
1986
- filters: s.array(pn).min(1).describe("The array of filters to add.")
1987
- }, mn = {
1985
+ }), fn = {
1986
+ filters: s.array(mn).min(1).describe("The array of filters to add.")
1987
+ }, bn = {
1988
1988
  filters: s.array(pt).describe("The created filters."),
1989
1989
  totalCount: s.number().describe("The total number of filters created.")
1990
- }, fn = {
1990
+ }, gn = {
1991
1991
  name: g.ADD_FILTERS,
1992
1992
  description: "Add one or more new personal filters. Filters are saved custom views using query syntax to organize tasks.",
1993
- parameters: hn,
1994
- outputSchema: mn,
1993
+ parameters: fn,
1994
+ outputSchema: bn,
1995
1995
  annotations: { readOnlyHint: !1, destructiveHint: !1, idempotentHint: !1 },
1996
1996
  async execute({ filters: e }, t) {
1997
1997
  const r = Date.now(), o = e.map((p, h) => `tempFilterAdd${h}${r}`), n = e.map((p, h) => Q(
@@ -2031,26 +2031,26 @@ ${u}`,
2031
2031
  }
2032
2032
  };
2033
2033
  }
2034
- }, bn = s.object({
2034
+ }, yn = s.object({
2035
2035
  name: s.string().min(1).max(128).describe("The name of the label."),
2036
2036
  color: fe,
2037
2037
  order: s.number().int().optional().describe("The position of the label in the label list."),
2038
2038
  isFavorite: s.boolean().optional().describe("Whether the label is a favorite. Defaults to false.")
2039
- }), gn = {
2040
- labels: s.array(bn).min(1).describe("The array of labels to add.")
2041
- }, yn = {
2039
+ }), Tn = {
2040
+ labels: s.array(yn).min(1).describe("The array of labels to add.")
2041
+ }, kn = {
2042
2042
  labels: s.array(ge).describe("The created labels."),
2043
2043
  totalCount: s.number().describe("The total number of labels created.")
2044
- }, Tn = {
2044
+ }, wn = {
2045
2045
  name: g.ADD_LABELS,
2046
2046
  description: "Add one or more new personal labels.",
2047
- parameters: gn,
2048
- outputSchema: yn,
2047
+ parameters: Tn,
2048
+ outputSchema: kn,
2049
2049
  annotations: { readOnlyHint: !1, destructiveHint: !1, idempotentHint: !1 },
2050
2050
  async execute({ labels: e }, t) {
2051
2051
  const r = await Promise.all(e.map((n) => t.addLabel(n)));
2052
2052
  return {
2053
- textContent: kn({ labels: r }),
2053
+ textContent: In({ labels: r }),
2054
2054
  structuredContent: {
2055
2055
  labels: r.map((n) => ge.parse(n)),
2056
2056
  totalCount: r.length
@@ -2058,21 +2058,21 @@ ${u}`,
2058
2058
  };
2059
2059
  }
2060
2060
  };
2061
- function kn({ labels: e }) {
2061
+ function In({ labels: e }) {
2062
2062
  const t = e.length, r = e.map((o) => `• ${o.name} (id=${o.id})`).join(`
2063
2063
  `);
2064
2064
  return `Added ${t} label${t === 1 ? "" : "s"}:
2065
2065
  ${r}`;
2066
2066
  }
2067
- const wn = "[redacted]";
2067
+ const vn = "[redacted]";
2068
2068
  function ne(e, t, r, o = {}) {
2069
2069
  if (r.length === 0)
2070
2070
  return;
2071
- const n = r.slice(0, Cr.MAX_FAILURES_LOGGED);
2071
+ const n = r.slice(0, $r.MAX_FAILURES_LOGGED);
2072
2072
  console.error(`${e}: items failed`, {
2073
2073
  failed: r.length,
2074
2074
  of: t,
2075
- sample: o.redactItems ? n.map((i) => ({ ...i, item: wn })) : n
2075
+ sample: o.redactItems ? n.map((i) => ({ ...i, item: vn })) : n
2076
2076
  });
2077
2077
  }
2078
2078
  function he(e = /* @__PURE__ */ new Date()) {
@@ -2119,20 +2119,20 @@ function ft(e, t) {
2119
2119
  Failed (${t.length}) - address or drop these items:
2120
2120
  ${n}${i}`;
2121
2121
  }
2122
- function vn(e) {
2122
+ function Sn(e) {
2123
2123
  const t = e.content || e.title || "Untitled", r = e.dueDate ? ` • due ${e.dueDate}` : "", o = e.priority ? ` • ${e.priority.toUpperCase()}` : "", n = e.projectName ? ` • ${e.projectName}` : "", i = e.id ? ` • id=${e.id}` : "";
2124
2124
  return ` ${t}${r}${o}${n}${i}`;
2125
2125
  }
2126
- function In(e) {
2126
+ function Cn(e) {
2127
2127
  const t = ` (${e.color})`, r = e.isFavorite ? " • ⭐" : "", o = ` • id=${e.id}`;
2128
2128
  return ` ${e.name}${t}${r}${o}`;
2129
2129
  }
2130
- function Sn(e) {
2130
+ function jn(e) {
2131
2131
  const t = e.inboxProject ? " • Inbox" : "", r = e.isFavorite ? " • ⭐" : "", o = e.isShared ? " • Shared" : "", n = e.isArchived ? " • Archived" : "", i = e.viewStyle && e.viewStyle !== "list" ? ` • ${e.viewStyle}` : "", a = ` • id=${e.id}`;
2132
2132
  return ` ${e.name}${t}${r}${o}${n}${i}${a}`;
2133
2133
  }
2134
2134
  function xe(e, t = 5) {
2135
- const o = e.slice(0, t).map(vn).join(`
2135
+ const o = e.slice(0, t).map(Sn).join(`
2136
2136
  `);
2137
2137
  if (e.length > t) {
2138
2138
  const n = e.length - t;
@@ -2162,16 +2162,16 @@ function Cs(e, t) {
2162
2162
  ${r.map((n) => `- ${n}`).join(`
2163
2163
  `)}`;
2164
2164
  }
2165
- const Cn = 300 * 1e3;
2166
- function jn(e) {
2165
+ const $n = 300 * 1e3;
2166
+ function Dn(e) {
2167
2167
  return /^\d+$/.test(e);
2168
2168
  }
2169
- class $n {
2169
+ class An {
2170
2170
  constructor() {
2171
2171
  this.cache = null, this.inFlightWorkspaces = null;
2172
2172
  }
2173
2173
  async getWorkspaces(t) {
2174
- if (this.cache && Date.now() - this.cache.timestamp < Cn)
2174
+ if (this.cache && Date.now() - this.cache.timestamp < $n)
2175
2175
  return this.cache.workspaces;
2176
2176
  if (this.inFlightWorkspaces)
2177
2177
  return this.inFlightWorkspaces;
@@ -2198,7 +2198,7 @@ class $n {
2198
2198
  const n = await this.getWorkspaces(t), i = n.find((l) => l.id === o);
2199
2199
  if (i)
2200
2200
  return { workspaceId: i.id, workspaceName: i.name };
2201
- if (jn(o))
2201
+ if (Dn(o))
2202
2202
  return { workspaceId: o, workspaceName: o };
2203
2203
  const a = o.toLowerCase(), c = n.find((l) => l.name.toLowerCase() === a);
2204
2204
  if (c)
@@ -2226,7 +2226,7 @@ ${l}` + (d.length > 5 ? `
2226
2226
  this.cache = null;
2227
2227
  }
2228
2228
  }
2229
- const js = new $n(), Dn = s.object({
2229
+ const js = new An(), xn = s.object({
2230
2230
  name: s.string().min(1).describe("The name of the project."),
2231
2231
  parentId: s.string().optional().describe("The ID of the parent project. If provided, creates this as a sub-project."),
2232
2232
  isFavorite: s.boolean().optional().describe("Whether the project is a favorite. Defaults to false."),
@@ -2236,9 +2236,9 @@ const js = new $n(), Dn = s.object({
2236
2236
  workspace: s.string().trim().min(1).optional().describe(
2237
2237
  "The workspace to create the project in. Accepts a workspace name or workspace ID. If not provided, creates a personal project. Use list-workspaces to see available workspaces."
2238
2238
  )
2239
- }), An = {
2240
- projects: s.array(Dn).min(1).describe("The array of projects to add.")
2241
- }, xn = {
2239
+ }), En = {
2240
+ projects: s.array(xn).min(1).describe("The array of projects to add.")
2241
+ }, On = {
2242
2242
  projects: s.array(re).describe("The created projects."),
2243
2243
  totalCount: s.number().describe("The total number of projects created."),
2244
2244
  failures: s.array(oe).describe(
@@ -2247,11 +2247,11 @@ const js = new $n(), Dn = s.object({
2247
2247
  totalRequested: s.number().describe("The total number of projects requested."),
2248
2248
  successCount: s.number().describe("The number of successfully created projects."),
2249
2249
  failureCount: s.number().describe("The number of failed project creations.")
2250
- }, En = {
2250
+ }, _n = {
2251
2251
  name: g.ADD_PROJECTS,
2252
2252
  description: "Add one or more new projects.",
2253
- parameters: An,
2254
- outputSchema: xn,
2253
+ parameters: En,
2254
+ outputSchema: On,
2255
2255
  annotations: { readOnlyHint: !1, destructiveHint: !1, idempotentHint: !1 },
2256
2256
  async execute({ projects: e }, t) {
2257
2257
  const r = /* @__PURE__ */ new Map(), o = (u) => {
@@ -2277,7 +2277,7 @@ const js = new $n(), Dn = s.object({
2277
2277
  });
2278
2278
  const c = i.map(se);
2279
2279
  return ne(g.ADD_PROJECTS, e.length, a, { redactItems: !0 }), {
2280
- textContent: On({ projects: i, failures: a }),
2280
+ textContent: Pn({ projects: i, failures: a }),
2281
2281
  structuredContent: {
2282
2282
  projects: c,
2283
2283
  totalCount: c.length,
@@ -2289,7 +2289,7 @@ const js = new $n(), Dn = s.object({
2289
2289
  };
2290
2290
  }
2291
2291
  };
2292
- function On({
2292
+ function Pn({
2293
2293
  projects: e,
2294
2294
  failures: t
2295
2295
  }) {
@@ -2303,7 +2303,7 @@ const je = 25, Ee = s.enum(sr), $s = s.object({
2303
2303
  string: s.string().optional().describe('Natural language due string, e.g. "tomorrow at 3pm".'),
2304
2304
  timezone: s.string().optional().describe('Timezone for the reminder, e.g. "America/New_York".'),
2305
2305
  lang: s.string().optional().describe('Language for parsing the due string, e.g. "en".')
2306
- }), Ds = s.enum(Xt), Oe = s.boolean().optional().describe("Whether this is an urgent reminder. Applies to relative and absolute reminders."), _n = s.object({
2306
+ }), Ds = s.enum(Xt), Oe = s.boolean().optional().describe("Whether this is an urgent reminder. Applies to relative and absolute reminders."), Un = s.object({
2307
2307
  type: s.literal("relative"),
2308
2308
  taskId: s.string().min(1).describe("The ID of the task to set a reminder for."),
2309
2309
  minuteOffset: s.number().int().min(0).describe(
@@ -2313,7 +2313,7 @@ const je = 25, Ee = s.enum(sr), $s = s.object({
2313
2313
  'Delivery method: "email" or "push" notification. Defaults to push.'
2314
2314
  ),
2315
2315
  isUrgent: Oe
2316
- }), Pn = s.object({
2316
+ }), Rn = s.object({
2317
2317
  type: s.literal("absolute"),
2318
2318
  taskId: s.string().min(1).describe("The ID of the task to set a reminder for."),
2319
2319
  due: $s.describe("The specific date/time for the reminder."),
@@ -2321,7 +2321,7 @@ const je = 25, Ee = s.enum(sr), $s = s.object({
2321
2321
  'Delivery method: "email" or "push" notification. Defaults to push.'
2322
2322
  ),
2323
2323
  isUrgent: Oe
2324
- }), Un = s.object({
2324
+ }), Ln = s.object({
2325
2325
  type: s.literal("location"),
2326
2326
  taskId: s.string().min(1).describe("The ID of the task to set a reminder for."),
2327
2327
  name: s.string().min(1).describe('Name of the location, e.g. "Office", "Home".'),
@@ -2331,23 +2331,23 @@ const je = 25, Ee = s.enum(sr), $s = s.object({
2331
2331
  'When to trigger: "on_enter" (arriving) or "on_leave" (departing).'
2332
2332
  ),
2333
2333
  radius: s.number().int().optional().describe("Radius in meters for the geofence. Defaults to server default.")
2334
- }), Rn = s.discriminatedUnion("type", [
2335
- _n,
2336
- Pn,
2337
- Un
2338
- ]), Ln = {
2339
- reminders: s.array(Rn).min(1).max(je).describe(
2334
+ }), Nn = s.discriminatedUnion("type", [
2335
+ Un,
2336
+ Rn,
2337
+ Ln
2338
+ ]), Mn = {
2339
+ reminders: s.array(Nn).min(1).max(je).describe(
2340
2340
  `Array of reminders to create (max ${je}). Each reminder must specify a type: "relative" (minutes before due), "absolute" (specific date/time), or "location" (geofence trigger).`
2341
2341
  )
2342
- }, Nn = {
2342
+ }, Fn = {
2343
2343
  reminders: s.array(ut).describe("The created reminders."),
2344
2344
  totalCount: s.number().describe("Total number of reminders created."),
2345
2345
  addedReminderIds: s.array(s.string()).describe("IDs of the created reminders.")
2346
- }, Mn = {
2346
+ }, Hn = {
2347
2347
  name: g.ADD_REMINDERS,
2348
2348
  description: 'Add reminders to tasks. Supports three types: "relative" (minutes before due), "absolute" (specific date/time), or "location" (geofence-triggered). Each reminder must specify a taskId.',
2349
- parameters: Ln,
2350
- outputSchema: Nn,
2349
+ parameters: Mn,
2350
+ outputSchema: Fn,
2351
2351
  annotations: { readOnlyHint: !1, destructiveHint: !1, idempotentHint: !1 },
2352
2352
  async execute(e, t) {
2353
2353
  const { reminders: r } = e, o = r.map(async (c) => {
@@ -2380,7 +2380,7 @@ const je = 25, Ee = s.enum(sr), $s = s.object({
2380
2380
  }
2381
2381
  }), i = (await Promise.all(o)).map(ke);
2382
2382
  return {
2383
- textContent: Fn(i),
2383
+ textContent: Wn(i),
2384
2384
  structuredContent: {
2385
2385
  reminders: i,
2386
2386
  totalCount: i.length,
@@ -2389,8 +2389,8 @@ const je = 25, Ee = s.enum(sr), $s = s.object({
2389
2389
  };
2390
2390
  }
2391
2391
  };
2392
- function Fn(e) {
2393
- const { timeBasedCount: t, locationCount: r } = vs(e), o = [];
2392
+ function Wn(e) {
2393
+ const { timeBasedCount: t, locationCount: r } = Is(e), o = [];
2394
2394
  if (t > 0) {
2395
2395
  const n = t > 1 ? "reminders" : "reminder";
2396
2396
  o.push(`${t} time-based ${n}`);
@@ -2401,16 +2401,16 @@ function Fn(e) {
2401
2401
  }
2402
2402
  return o.length > 0 ? `Added ${o.join(" and ")}` : "No reminders added";
2403
2403
  }
2404
- const Hn = s.object({
2404
+ const Bn = s.object({
2405
2405
  name: s.string().min(1).describe("The name of the section."),
2406
2406
  projectId: s.string().min(1).describe(
2407
2407
  'The ID of the project to add the section to. Project ID should be an ID string, or the text "inbox", for inbox tasks.'
2408
2408
  ),
2409
2409
  description: s.string().optional().describe("The description of the section. Supports Markdown.")
2410
- }), Wn = {
2411
- sections: s.array(Hn).min(1).describe("The array of sections to add.")
2412
- }, Bn = {
2413
- sections: s.array(G).describe("The created sections."),
2410
+ }), zn = {
2411
+ sections: s.array(Bn).min(1).describe("The array of sections to add.")
2412
+ }, Kn = {
2413
+ sections: s.array(q).describe("The created sections."),
2414
2414
  totalCount: s.number().describe("The total number of sections created."),
2415
2415
  failures: s.array(oe).describe(
2416
2416
  "Sections that could not be created, with the reason for each. A failure here does not affect the other sections in the batch — do not retry the whole batch; address or drop the failed items."
@@ -2418,11 +2418,11 @@ const Hn = s.object({
2418
2418
  totalRequested: s.number().describe("The total number of sections requested."),
2419
2419
  successCount: s.number().describe("The number of successfully created sections."),
2420
2420
  failureCount: s.number().describe("The number of failed section creations.")
2421
- }, zn = {
2421
+ }, Yn = {
2422
2422
  name: g.ADD_SECTIONS,
2423
2423
  description: "Add one or more new sections to projects.",
2424
- parameters: Wn,
2425
- outputSchema: Bn,
2424
+ parameters: zn,
2425
+ outputSchema: Kn,
2426
2426
  annotations: { readOnlyHint: !1, destructiveHint: !1, idempotentHint: !1 },
2427
2427
  async execute({ sections: e }, t) {
2428
2428
  const r = e.some((c) => B(c.projectId)) ? P(() => t.getUser()) : void 0, o = await Promise.allSettled(
@@ -2441,9 +2441,9 @@ const Hn = s.object({
2441
2441
  error: N(c.reason)
2442
2442
  });
2443
2443
  }), ne(g.ADD_SECTIONS, e.length, i, { redactItems: !0 }), {
2444
- textContent: Kn({ sections: n, failures: i }),
2444
+ textContent: qn({ sections: n, failures: i }),
2445
2445
  structuredContent: {
2446
- sections: n.map(Y),
2446
+ sections: n.map(G),
2447
2447
  totalCount: n.length,
2448
2448
  failures: i,
2449
2449
  totalRequested: e.length,
@@ -2453,7 +2453,7 @@ const Hn = s.object({
2453
2453
  };
2454
2454
  }
2455
2455
  };
2456
- function Kn({
2456
+ function qn({
2457
2457
  sections: e,
2458
2458
  failures: t
2459
2459
  }) {
@@ -2471,7 +2471,7 @@ const ue = {
2471
2471
  PROJECT_NOT_FOUND: "PROJECT_NOT_FOUND",
2472
2472
  TASK_NOT_FOUND: "TASK_NOT_FOUND"
2473
2473
  };
2474
- class qn {
2474
+ class Gn {
2475
2475
  /**
2476
2476
  * Validate a single assignment operation
2477
2477
  */
@@ -2680,7 +2680,7 @@ class qn {
2680
2680
  };
2681
2681
  }
2682
2682
  }
2683
- const bt = new qn(), _t = ns.TASKS_PER_OPERATION, Gn = s.object({
2683
+ const bt = new Gn(), _t = ns.TASKS_PER_OPERATION, Vn = s.object({
2684
2684
  content: s.string().min(1).describe(
2685
2685
  'The task name/title. Should be concise and actionable (e.g., "Review PR #123", "Call dentist"). For longer content, use the description field instead. Supports Markdown.'
2686
2686
  ),
@@ -2709,24 +2709,24 @@ const bt = new qn(), _t = ns.TASKS_PER_OPERATION, Gn = s.object({
2709
2709
  "Whether this task should be uncompletable (organizational header). Tasks with isUncompletable: true appear as organizational headers and cannot be completed."
2710
2710
  )
2711
2711
  }), Pt = {
2712
- tasks: s.array(Gn).min(1).max(_t).describe(`The array of tasks to add (max ${_t}).`)
2713
- }, Yn = {
2712
+ tasks: s.array(Vn).min(1).max(_t).describe(`The array of tasks to add (max ${_t}).`)
2713
+ }, Jn = {
2714
2714
  tasks: s.array(K).describe("The created tasks."),
2715
2715
  totalCount: s.number().describe("The total number of tasks created."),
2716
2716
  failures: s.array(oe).describe("Failed task creations with error details."),
2717
2717
  totalRequested: s.number().describe("The total number of tasks requested."),
2718
2718
  successCount: s.number().describe("The number of successfully created tasks."),
2719
2719
  failureCount: s.number().describe("The number of failed task creations.")
2720
- }, Vn = {
2720
+ }, Xn = {
2721
2721
  name: g.ADD_TASKS,
2722
2722
  description: "Add one or more tasks to a project, section, or parent. Supports assignment to project collaborators.",
2723
2723
  parameters: Pt,
2724
- outputSchema: Yn,
2724
+ outputSchema: Jn,
2725
2725
  annotations: { readOnlyHint: !1, destructiveHint: !1, idempotentHint: !1 },
2726
2726
  async execute(e, t) {
2727
2727
  const { tasks: r } = s.object(Pt).parse(e), o = /* @__PURE__ */ new Map();
2728
2728
  r.forEach((h, m) => {
2729
- const y = Jn(h), f = o.get(y);
2729
+ const y = Qn(h), f = o.get(y);
2730
2730
  f ? f.push({ task: h, index: m }) : o.set(y, [{ task: h, index: m }]);
2731
2731
  });
2732
2732
  const n = /* @__PURE__ */ new Map(), a = (await Promise.all(
@@ -2734,7 +2734,7 @@ const bt = new qn(), _t = ns.TASKS_PER_OPERATION, Gn = s.object({
2734
2734
  const m = [];
2735
2735
  for (const { task: y, index: f } of h)
2736
2736
  try {
2737
- const T = await Xn(y, t, n);
2737
+ const T = await Zn(y, t, n);
2738
2738
  m.push({ index: f, result: { status: "fulfilled", value: T } });
2739
2739
  } catch (T) {
2740
2740
  m.push({
@@ -2760,7 +2760,7 @@ const bt = new qn(), _t = ns.TASKS_PER_OPERATION, Gn = s.object({
2760
2760
  }
2761
2761
  const l = c.map(U);
2762
2762
  return ne(g.ADD_TASKS, r.length, d, { redactItems: !0 }), {
2763
- textContent: Qn({
2763
+ textContent: ei({
2764
2764
  tasks: l,
2765
2765
  failures: d,
2766
2766
  args: { tasks: r }
@@ -2776,10 +2776,10 @@ const bt = new qn(), _t = ns.TASKS_PER_OPERATION, Gn = s.object({
2776
2776
  };
2777
2777
  }
2778
2778
  };
2779
- function Jn(e) {
2779
+ function Qn(e) {
2780
2780
  return `${e.projectId ?? ""}|${e.sectionId ?? ""}|${e.parentId ?? ""}`;
2781
2781
  }
2782
- async function Xn(e, t, r) {
2782
+ async function Zn(e, t, r) {
2783
2783
  const {
2784
2784
  duration: o,
2785
2785
  projectId: n,
@@ -2857,7 +2857,7 @@ async function Xn(e, t, r) {
2857
2857
  try {
2858
2858
  return await t.addTask(y);
2859
2859
  } catch (f) {
2860
- const T = wr(f, {
2860
+ const T = vr(f, {
2861
2861
  taskContent: e.content,
2862
2862
  dueString: e.dueString,
2863
2863
  deadlineDate: e.deadlineDate
@@ -2865,7 +2865,7 @@ async function Xn(e, t, r) {
2865
2865
  throw T ? new $e(T) : f;
2866
2866
  }
2867
2867
  }
2868
- function Qn({
2868
+ function ei({
2869
2869
  tasks: e,
2870
2870
  failures: t,
2871
2871
  args: r
@@ -2890,11 +2890,11 @@ function Qn({
2890
2890
  showDetails: !0
2891
2891
  });
2892
2892
  }
2893
- const Zn = {
2893
+ const ti = {
2894
2894
  projectId: s.string().min(1).describe(
2895
2895
  "The ID of the project to analyze. This triggers a new health analysis which may take some time to complete."
2896
2896
  )
2897
- }, ei = {
2897
+ }, si = {
2898
2898
  projectId: s.string().describe("The project ID."),
2899
2899
  health: s.object({
2900
2900
  status: s.enum(st).describe("The health status after triggering analysis."),
@@ -2902,11 +2902,11 @@ const Zn = {
2902
2902
  updateInProgress: s.boolean().describe("Whether an analysis update is currently in progress.")
2903
2903
  }).describe("The health response returned after triggering analysis."),
2904
2904
  message: s.string().describe("A human-readable message about the analysis status.")
2905
- }, ti = {
2905
+ }, ri = {
2906
2906
  name: g.ANALYZE_PROJECT_HEALTH,
2907
2907
  description: "Trigger a new health analysis for a project. Use this when the health data is stale or you want a fresh assessment. The analysis may take time to complete — use get-project-health afterward to see updated results.",
2908
- parameters: Zn,
2909
- outputSchema: ei,
2908
+ parameters: ti,
2909
+ outputSchema: si,
2910
2910
  annotations: {
2911
2911
  readOnlyHint: !1,
2912
2912
  destructiveHint: !1,
@@ -2929,19 +2929,19 @@ ${n}`,
2929
2929
  }
2930
2930
  };
2931
2931
  }
2932
- }, si = {
2932
+ }, oi = {
2933
2933
  ids: s.array(s.string().min(1)).min(1).describe("The IDs of the tasks to complete.")
2934
- }, ri = {
2934
+ }, ni = {
2935
2935
  completed: s.array(s.string()).describe("The IDs of successfully completed tasks."),
2936
2936
  failures: s.array(oe).describe("Failed task completions with error details."),
2937
2937
  totalRequested: s.number().describe("The total number of tasks requested to complete."),
2938
2938
  successCount: s.number().describe("The number of successfully completed tasks."),
2939
2939
  failureCount: s.number().describe("The number of failed task completions.")
2940
- }, oi = {
2940
+ }, ii = {
2941
2941
  name: g.COMPLETE_TASKS,
2942
2942
  description: "Complete one or more tasks by their IDs.",
2943
- parameters: si,
2944
- outputSchema: ri,
2943
+ parameters: oi,
2944
+ outputSchema: ni,
2945
2945
  annotations: { readOnlyHint: !1, destructiveHint: !0, idempotentHint: !1 },
2946
2946
  async execute(e, t) {
2947
2947
  const r = [], o = [];
@@ -2955,7 +2955,7 @@ ${n}`,
2955
2955
  });
2956
2956
  }
2957
2957
  return ne(g.COMPLETE_TASKS, e.ids.length, o), {
2958
- textContent: ni({
2958
+ textContent: ai({
2959
2959
  completed: r,
2960
2960
  failures: o,
2961
2961
  args: e
@@ -2970,7 +2970,7 @@ ${n}`,
2970
2970
  };
2971
2971
  }
2972
2972
  };
2973
- function ni({
2973
+ function ai({
2974
2974
  completed: e,
2975
2975
  failures: t,
2976
2976
  args: r
@@ -2992,20 +2992,20 @@ const As = [
2992
2992
  "filter",
2993
2993
  "reminder",
2994
2994
  "location_reminder"
2995
- ], ii = {
2995
+ ], ci = {
2996
2996
  type: s.enum(As).describe("The type of entity to delete."),
2997
2997
  id: s.string().min(1).describe("The ID of the entity to delete.")
2998
- }, ai = {
2998
+ }, di = {
2999
2999
  deletedEntity: s.object({
3000
3000
  type: s.enum(As).describe("The type of deleted entity."),
3001
3001
  id: s.string().describe("The ID of the deleted entity.")
3002
3002
  }).describe("Information about the deleted entity."),
3003
3003
  success: s.boolean().describe("Whether the deletion was successful.")
3004
- }, ci = {
3004
+ }, li = {
3005
3005
  name: g.DELETE_OBJECT,
3006
3006
  description: "Delete a project, section, task, comment, label, filter, reminder, or location_reminder by its ID. Projects can be deleted whether active or archived (find archived ones via find-projects with archivedStatus); note a workspace project must be archived before it can be deleted, while personal projects can be deleted regardless.",
3007
- parameters: ii,
3008
- outputSchema: ai,
3007
+ parameters: ci,
3008
+ outputSchema: di,
3009
3009
  annotations: { readOnlyHint: !1, destructiveHint: !0, idempotentHint: !0 },
3010
3010
  async execute(e, t) {
3011
3011
  switch (e.type) {
@@ -3050,7 +3050,7 @@ const As = [
3050
3050
  }
3051
3051
  };
3052
3052
  }
3053
- }, Ut = 5, xs = ["file", "url"], di = {
3053
+ }, Ut = 5, xs = ["file", "url"], ui = {
3054
3054
  projectId: s.string().min(1).describe("The ID of the project to export as a template."),
3055
3055
  format: s.enum(xs).default("file").describe(
3056
3056
  'How to return the template. "file" returns the CSV content, which can be passed straight back to import-project-template. "url" returns a shareable download link instead, and is the better choice for large projects because it does not return the whole file.'
@@ -3058,17 +3058,17 @@ const As = [
3058
3058
  useRelativeDates: s.boolean().optional().describe(
3059
3059
  'Export due dates relative to the import date (e.g. "day 3") instead of absolute dates. Defaults to false.'
3060
3060
  )
3061
- }, li = {
3061
+ }, pi = {
3062
3062
  format: s.enum(xs).describe("The format the template was exported in."),
3063
3063
  content: s.string().optional().describe('The template as CSV content. Only present when format is "file".'),
3064
3064
  lineCount: s.number().optional().describe('Number of rows in the exported CSV. Only present when format is "file".'),
3065
3065
  fileName: s.string().optional().describe('The generated template file name. Only present when format is "url".'),
3066
3066
  fileUrl: s.string().optional().describe('The shareable download URL. Only present when format is "url".')
3067
- }, ui = {
3067
+ }, hi = {
3068
3068
  name: g.EXPORT_PROJECT_TEMPLATE,
3069
3069
  description: "Export an existing project as a Todoist template, either as CSV content or as a shareable URL. Use it to duplicate a project, share its structure, or hand the CSV to import-project-template. To read a project rather than export it, use find-tasks instead — it returns structured tasks rather than raw CSV. Nothing is modified.",
3070
- parameters: di,
3071
- outputSchema: li,
3070
+ parameters: ui,
3071
+ outputSchema: pi,
3072
3072
  annotations: { readOnlyHint: !0, destructiveHint: !1, idempotentHint: !0 },
3073
3073
  // `format` is defaulted here as well as in the schema: scripts/run-tool.ts calls
3074
3074
  // execute() with raw JSON, so schema defaults are not applied on that path.
@@ -3089,12 +3089,12 @@ ${c}`,
3089
3089
  return {
3090
3090
  // The full CSV already ships in structuredContent; a preview here keeps a large
3091
3091
  // project from being spelled out twice in the response.
3092
- textContent: pi({ projectId: e, lines: i }),
3092
+ textContent: mi({ projectId: e, lines: i }),
3093
3093
  structuredContent: { format: t, content: n, lineCount: i.length }
3094
3094
  };
3095
3095
  }
3096
3096
  };
3097
- function pi({ projectId: e, lines: t }) {
3097
+ function mi({ projectId: e, lines: t }) {
3098
3098
  const r = `Exported project (id=${e}) as a template file (${t.length} row${t.length === 1 ? "" : "s"}).`, o = t.slice(0, Ut).join(`
3099
3099
  `), n = t.length - Ut;
3100
3100
  return n > 0 ? `${r}
@@ -3104,7 +3104,7 @@ ${o}
3104
3104
 
3105
3105
  ${o}`;
3106
3106
  }
3107
- const hi = K.pick({
3107
+ const fi = K.pick({
3108
3108
  id: !0,
3109
3109
  content: !0,
3110
3110
  dueDate: !0,
@@ -3113,15 +3113,15 @@ const hi = K.pick({
3113
3113
  hasChildren: s.boolean().describe(
3114
3114
  "Whether this subtask has subtasks of its own. Fetch it with includeChildren to expand."
3115
3115
  )
3116
- }), mi = re.pick({ id: !0, name: !0 }).extend({
3116
+ }), bi = re.pick({ id: !0, name: !0 }).extend({
3117
3117
  hasChildren: s.boolean().describe(
3118
3118
  "Whether this sub-project has sub-projects of its own. Fetch it with includeChildren to expand."
3119
3119
  )
3120
- }), fi = {
3120
+ }), gi = {
3121
3121
  childCount: s.number().optional().describe(
3122
3122
  "The number of direct children listed in children. Only present when children were requested and the type supports them. 0 means the object definitively has none."
3123
3123
  ),
3124
- children: s.array(s.union([hi, mi])).optional().describe(
3124
+ children: s.array(s.union([fi, bi])).optional().describe(
3125
3125
  "Direct children only: subtasks for a task, sub-projects for a project. Completed subtasks and archived sub-projects are excluded."
3126
3126
  ),
3127
3127
  hasMoreChildren: s.boolean().optional().describe(
@@ -3131,7 +3131,7 @@ const hi = K.pick({
3131
3131
  'Present when the children lookup failed or returned incomplete information. When no children are listed alongside it, childCount is unknown - do not read its absence as "no children".'
3132
3132
  )
3133
3133
  };
3134
- async function bi(e, t) {
3134
+ async function yi(e, t) {
3135
3135
  const { results: r, nextCursor: o } = await e.getTasks({
3136
3136
  parentId: t,
3137
3137
  limit: j.CHILDREN_MAX
@@ -3154,12 +3154,12 @@ async function bi(e, t) {
3154
3154
  childrenError: i ? `Could not check ${i} of ${r.length} subtasks for subtasks of their own; those are reported as hasChildren=false.` : void 0
3155
3155
  };
3156
3156
  }
3157
- async function gi(e, t) {
3158
- if (!q(t))
3157
+ async function Ti(e, t) {
3158
+ if (!Y(t))
3159
3159
  return { childCount: 0, children: [] };
3160
3160
  const r = await ws(e), o = /* @__PURE__ */ new Map();
3161
3161
  for (const a of r) {
3162
- if (!q(a) || !a.parentId) continue;
3162
+ if (!Y(a) || !a.parentId) continue;
3163
3163
  const c = o.get(a.parentId) ?? [];
3164
3164
  c.push(a), o.set(a.parentId, c);
3165
3165
  }
@@ -3187,22 +3187,22 @@ function Lt(e, t) {
3187
3187
  const r = t.hasMoreChildren ? "+" : "", o = t.childrenError ? " (partial)" : "";
3188
3188
  return ` • ${e}=${t.childCount}${r}${o}`;
3189
3189
  }
3190
- const Es = ["task", "project", "comment", "section"], yi = {
3190
+ const Es = ["task", "project", "comment", "section"], ki = {
3191
3191
  type: s.enum(Es).describe("The type of object to fetch."),
3192
3192
  id: s.string().min(1).describe("The unique ID of the object to fetch."),
3193
3193
  includeChildren: s.boolean().optional().describe(
3194
3194
  "Also return the direct children of the object: subtasks for a task, sub-projects for a project. Returns childCount plus a compact list, flagging each child that has children of its own. Use this to check whether a task hides subtasks instead of a speculative find-tasks lookup. Ignored for comments and sections."
3195
3195
  )
3196
- }, Ti = {
3196
+ }, wi = {
3197
3197
  type: s.enum(Es).describe("The type of object fetched."),
3198
3198
  id: s.string().describe("The ID of the fetched object."),
3199
- object: s.union([K, re, ve, G]).describe("The fetched object data."),
3200
- ...fi
3201
- }, ki = {
3199
+ object: s.union([K, re, Ie, q]).describe("The fetched object data."),
3200
+ ...gi
3201
+ }, Ii = {
3202
3202
  name: g.FETCH_OBJECT,
3203
3203
  description: "Fetch a single task, project, comment, or section by its ID. Use this when you have a specific object ID and want to retrieve its full details. Set includeChildren to also get its direct subtasks or sub-projects.",
3204
- parameters: yi,
3205
- outputSchema: Ti,
3204
+ parameters: ki,
3205
+ outputSchema: wi,
3206
3206
  annotations: { readOnlyHint: !0, destructiveHint: !1, idempotentHint: !0 },
3207
3207
  async execute(e, t) {
3208
3208
  const { type: r, id: o, includeChildren: n } = e;
@@ -3211,7 +3211,7 @@ const Es = ["task", "project", "comment", "section"], yi = {
3211
3211
  case "task": {
3212
3212
  const [i, a] = await Promise.all([
3213
3213
  t.getTask(o),
3214
- n ? Rt(() => bi(t, o)) : Promise.resolve({})
3214
+ n ? Rt(() => yi(t, o)) : Promise.resolve({})
3215
3215
  ]), c = U(i);
3216
3216
  return {
3217
3217
  textContent: `Found task: ${c.content} • id=${c.id} • priority=${c.priority} • project=${c.projectId}${Lt("subtasks", a)}`,
@@ -3224,7 +3224,7 @@ const Es = ["task", "project", "comment", "section"], yi = {
3224
3224
  };
3225
3225
  }
3226
3226
  case "project": {
3227
- const i = await t.getProject(o), a = se(i), c = n ? await Rt(() => gi(t, i)) : {};
3227
+ const i = await t.getProject(o), a = se(i), c = n ? await Rt(() => Ti(t, i)) : {};
3228
3228
  return {
3229
3229
  textContent: `Found project: ${a.name} • id=${a.id} • color=${a.color} • viewStyle=${a.viewStyle}${Lt("subProjects", c)}`,
3230
3230
  structuredContent: {
@@ -3250,7 +3250,7 @@ const Es = ["task", "project", "comment", "section"], yi = {
3250
3250
  const i = await t.getSection(o);
3251
3251
  if (!i)
3252
3252
  throw new Error(`Section ${o} not found.`);
3253
- const a = Y(i);
3253
+ const a = G(i);
3254
3254
  return {
3255
3255
  textContent: `Found section: ${a.name} • id=${a.id}`,
3256
3256
  structuredContent: {
@@ -3267,21 +3267,21 @@ const Es = ["task", "project", "comment", "section"], yi = {
3267
3267
  );
3268
3268
  }
3269
3269
  }
3270
- }, wi = {
3270
+ }, vi = {
3271
3271
  id: s.string().min(1).describe(
3272
3272
  'A unique identifier for the document in the format "task:{id}" or "project:{id}".'
3273
3273
  )
3274
- }, vi = {
3274
+ }, Si = {
3275
3275
  id: s.string().describe("The ID of the fetched document."),
3276
3276
  title: s.string().describe("The title of the document."),
3277
3277
  text: s.string().describe("The text content of the document."),
3278
3278
  url: s.string().describe("The URL of the document."),
3279
3279
  metadata: s.record(s.string(), s.unknown()).optional().describe("Additional metadata about the document.")
3280
- }, Ii = {
3280
+ }, Ci = {
3281
3281
  name: g.FETCH,
3282
3282
  description: 'Fetch the full contents of a task or project by its ID. The ID should be in the format "task:{id}" or "project:{id}". (Comments may exist; use find-comments to retrieve them.)',
3283
- parameters: wi,
3284
- outputSchema: vi,
3283
+ parameters: vi,
3284
+ outputSchema: Si,
3285
3285
  annotations: { readOnlyHint: !0, destructiveHint: !1, idempotentHint: !0 },
3286
3286
  async execute(e, t) {
3287
3287
  const { id: r } = e, [o, n] = r.split(":", 2);
@@ -3344,24 +3344,14 @@ Favorite: Yes`), i = {
3344
3344
  structuredContent: i
3345
3345
  };
3346
3346
  }
3347
- }, Si = s.union([s.iso.date(), s.iso.datetime({ offset: !0 })]);
3347
+ }, ji = s.union([s.iso.date(), s.iso.datetime({ offset: !0 })]);
3348
3348
  function Nt(e) {
3349
- return R(e).pipe(Si.optional());
3349
+ return R(e).pipe(ji.optional());
3350
3350
  }
3351
- const Ci = {
3352
- objectType: s.enum(["task", "project", "comment"]).optional().describe("Type of object to filter by."),
3351
+ const $i = {
3352
+ objectType: s.enum(or).optional().describe("Type of object to filter by."),
3353
3353
  objectId: s.string().optional().describe("Filter by specific object ID (task, project, or comment)."),
3354
- eventType: s.enum([
3355
- "added",
3356
- "updated",
3357
- "deleted",
3358
- "completed",
3359
- "uncompleted",
3360
- "archived",
3361
- "unarchived",
3362
- "shared",
3363
- "left"
3364
- ]).optional().describe("Type of event to filter by."),
3354
+ eventType: s.enum(rr).optional().describe("Type of event to filter by."),
3365
3355
  projectId: s.string().optional().describe("Filter events by parent project ID."),
3366
3356
  taskId: s.string().optional().describe("Filter events by parent task ID (for subtask events)."),
3367
3357
  initiatorId: s.string().optional().describe(
@@ -3375,17 +3365,17 @@ const Ci = {
3375
3365
  ),
3376
3366
  limit: s.number().int().min(1).max(j.ACTIVITY_MAX).default(j.ACTIVITY_DEFAULT).describe("Maximum number of activity events to return."),
3377
3367
  cursor: s.string().optional().describe("Pagination cursor for retrieving the next page of results.")
3378
- }, ji = {
3379
- events: s.array(Qo).describe("The activity events."),
3368
+ }, Di = {
3369
+ events: s.array(en).describe("The activity events."),
3380
3370
  nextCursor: s.string().optional(),
3381
3371
  totalCount: s.number().describe("The total number of events in this page."),
3382
3372
  hasMore: s.boolean(),
3383
3373
  appliedFilters: s.record(s.string(), s.unknown())
3384
- }, $i = {
3374
+ }, Ai = {
3385
3375
  name: g.FIND_ACTIVITY,
3386
3376
  description: `Retrieve activity logs to monitor and audit changes in Todoist. Shows events from all users by default (use initiatorId to filter by specific user). To answer what someone completed in a period, including recurring task occurrences, use objectType "task", eventType "completed", and dateFrom/dateTo. For a first-person question ("what did I get done"), also set initiatorId to the current user from user-info, or the answer includes collaborators' completions. Track task completions, updates, deletions, project changes, and more with flexible filtering. Activity history availability and retention depend on the user plan.`,
3387
- parameters: Ci,
3388
- outputSchema: ji,
3377
+ parameters: $i,
3378
+ outputSchema: Di,
3389
3379
  annotations: { readOnlyHint: !0, destructiveHint: !1, idempotentHint: !0 },
3390
3380
  async execute(e, t) {
3391
3381
  const {
@@ -3404,9 +3394,9 @@ const Ci = {
3404
3394
  cursor: p ?? null
3405
3395
  };
3406
3396
  r && n ? h.objectEventTypes = `${r}:${n}` : r ? h.objectEventTypes = `${r}:` : n && (h.objectEventTypes = `:${n}`), o && o !== "remove" && (h.objectId = o), i && (h.parentProjectId = i), a && (h.parentItemId = a), c && (h.initiatorId = c), d && (h.dateFrom = d), u && (h.dateTo = u);
3407
- const { results: m, nextCursor: y } = await t.getActivityLogs(h), f = m.map(zo);
3397
+ const { results: m, nextCursor: y } = await t.getActivityLogs(h), f = m.map(Yo);
3408
3398
  return {
3409
- textContent: Di({ events: f, args: e, nextCursor: y }),
3399
+ textContent: xi({ events: f, args: e, nextCursor: y }),
3410
3400
  structuredContent: {
3411
3401
  events: f,
3412
3402
  nextCursor: y ?? void 0,
@@ -3417,7 +3407,7 @@ const Ci = {
3417
3407
  };
3418
3408
  }
3419
3409
  };
3420
- function Di({
3410
+ function xi({
3421
3411
  events: e,
3422
3412
  args: t,
3423
3413
  nextCursor: r
@@ -3438,12 +3428,12 @@ function Di({
3438
3428
  limit: t.limit,
3439
3429
  nextCursor: r ?? void 0,
3440
3430
  filterHints: i,
3441
- previewLines: Ai(e, Math.min(e.length, t.limit)),
3431
+ previewLines: Ei(e, Math.min(e.length, t.limit)),
3442
3432
  zeroReasonHints: a
3443
3433
  });
3444
3434
  }
3445
- function Ai(e, t = 10) {
3446
- const o = e.slice(0, t).map(xi).join(`
3435
+ function Ei(e, t = 10) {
3436
+ const o = e.slice(0, t).map(Oi).join(`
3447
3437
  `);
3448
3438
  if (e.length > t) {
3449
3439
  const n = e.length - t;
@@ -3452,8 +3442,8 @@ function Ai(e, t = 10) {
3452
3442
  }
3453
3443
  return o;
3454
3444
  }
3455
- function xi(e) {
3456
- const t = Ei(e.eventDate), r = `${e.eventType} ${e.objectType}`;
3445
+ function Oi(e) {
3446
+ const t = _i(e.eventDate), r = `${e.eventType} ${e.objectType}`;
3457
3447
  let o = "";
3458
3448
  if (e.extraData) {
3459
3449
  const c = e.extraData.content || e.extraData.name || e.extraData.last_content;
@@ -3462,7 +3452,7 @@ function xi(e) {
3462
3452
  const n = e.objectId ? ` • id=${e.objectId}` : "", i = e.initiatorId ? ` • by=${e.initiatorId}` : " • system", a = e.parentProjectId ? ` • project=${e.parentProjectId}` : "";
3463
3453
  return ` [${t}] ${r}${o}${n}${i}${a}`;
3464
3454
  }
3465
- function Ei(e) {
3455
+ function _i(e) {
3466
3456
  try {
3467
3457
  const t = new Date(e), r = t.toLocaleDateString("en-US", { month: "short", timeZone: "UTC" }), o = t.toLocaleDateString("en-US", { day: "numeric", timeZone: "UTC" }), n = t.toLocaleTimeString("en-US", {
3468
3458
  hour: "2-digit",
@@ -3475,7 +3465,7 @@ function Ei(e) {
3475
3465
  return e;
3476
3466
  }
3477
3467
  }
3478
- const Oi = {
3468
+ const Pi = {
3479
3469
  taskId: s.string().optional().describe("Find comments for a specific task."),
3480
3470
  projectId: s.string().optional().describe(
3481
3471
  'Find comments for a specific project. Project ID should be an ID string, or the text "inbox", for inbox tasks.'
@@ -3483,8 +3473,8 @@ const Oi = {
3483
3473
  commentId: s.string().optional().describe("Get a specific comment by ID."),
3484
3474
  cursor: s.string().optional().describe("Pagination cursor for retrieving more results."),
3485
3475
  limit: s.number().int().min(1).max(j.COMMENTS_MAX).optional().describe("Maximum number of comments to return")
3486
- }, _i = {
3487
- comments: s.array(ve).describe("The found comments."),
3476
+ }, Ui = {
3477
+ comments: s.array(Ie).describe("The found comments."),
3488
3478
  searchType: s.string().describe(
3489
3479
  'The type of search performed: "single" (comment ID), "task" (task ID), or "project" (project ID).'
3490
3480
  ),
@@ -3492,11 +3482,11 @@ const Oi = {
3492
3482
  hasMore: s.boolean(),
3493
3483
  nextCursor: s.string().optional(),
3494
3484
  totalCount: s.number().describe("The total number of comments in this page.")
3495
- }, Pi = {
3485
+ }, Ri = {
3496
3486
  name: g.FIND_COMMENTS,
3497
3487
  description: "Find comments by task, project, or get a specific comment by ID. Exactly one of taskId, projectId, or commentId must be provided.",
3498
- parameters: Oi,
3499
- outputSchema: _i,
3488
+ parameters: Pi,
3489
+ outputSchema: Ui,
3500
3490
  annotations: { readOnlyHint: !0, destructiveHint: !1, idempotentHint: !0 },
3501
3491
  async execute(e, t) {
3502
3492
  const r = De(e.cursor), o = [e.taskId, e.projectId, e.commentId].filter(Boolean);
@@ -3531,7 +3521,7 @@ const Oi = {
3531
3521
  throw new Error("Invalid state: no search parameter provided");
3532
3522
  const d = c.map(we);
3533
3523
  return {
3534
- textContent: Ui({
3524
+ textContent: Li({
3535
3525
  comments: d,
3536
3526
  searchType: e.commentId ? "single" : e.taskId ? "task" : "project",
3537
3527
  searchId: e.commentId || e.taskId || e.projectId || "",
@@ -3549,7 +3539,7 @@ const Oi = {
3549
3539
  };
3550
3540
  }
3551
3541
  };
3552
- function Ui({
3542
+ function Li({
3553
3543
  comments: e,
3554
3544
  searchType: t,
3555
3545
  searchId: r,
@@ -3579,14 +3569,14 @@ function Os(e) {
3579
3569
  const t = e.getUTCFullYear(), r = String(e.getUTCMonth() + 1).padStart(2, "0"), o = String(e.getUTCDate()).padStart(2, "0");
3580
3570
  return `${t}-${r}-${o}`;
3581
3571
  }
3582
- function Ri(e) {
3572
+ function Ni(e) {
3583
3573
  const t = /^([+-])(\d{2}):(\d{2})$/.exec(e);
3584
3574
  if (!t)
3585
3575
  return 0;
3586
3576
  const [, r, o, n] = t, i = Number(o) * 60 + Number(n);
3587
3577
  return r === "-" ? -i : i;
3588
3578
  }
3589
- function Li(e, t) {
3579
+ function Mi(e, t) {
3590
3580
  const r = new Date(e.getTime() + t * 60 * 1e3);
3591
3581
  return Os(r);
3592
3582
  }
@@ -3597,9 +3587,9 @@ function Mt(e, t) {
3597
3587
  const d = new Date(Date.UTC(i, a - 1, c));
3598
3588
  return d.setUTCDate(d.getUTCDate() + t), Os(d);
3599
3589
  }
3600
- const Ni = ["and", "or"], gt = {
3590
+ const Fi = ["and", "or"], gt = {
3601
3591
  labels: s.string().array().optional().describe("The labels to filter the tasks by"),
3602
- labelsOperator: s.enum(Ni).optional().describe(
3592
+ labelsOperator: s.enum(Fi).optional().describe(
3603
3593
  'The operator to use when filtering by labels. This will dictate whether a task has all labels, or some of them. Default is "or".'
3604
3594
  )
3605
3595
  };
@@ -3608,20 +3598,20 @@ function yt(e = [], t = "or") {
3608
3598
  const r = t === "and" ? " & " : " | ";
3609
3599
  return `(${e.map((i) => i.startsWith("@") ? i : `@${i}`).join(` ${r} `)})`;
3610
3600
  }
3611
- const Mi = 7;
3612
- function Fi({
3601
+ const Hi = 7;
3602
+ function Wi({
3613
3603
  since: e,
3614
3604
  until: t,
3615
3605
  userGmtOffset: r,
3616
3606
  now: o = /* @__PURE__ */ new Date()
3617
3607
  }) {
3618
- const n = Ri(r), i = Li(o, n), a = Mi - 1, c = t ?? (e ? Mt(e, a) : i);
3608
+ const n = Ni(r), i = Mi(o, n), a = Hi - 1, c = t ?? (e ? Mt(e, a) : i);
3619
3609
  return {
3620
3610
  since: e ?? Mt(c, -a),
3621
3611
  until: c
3622
3612
  };
3623
3613
  }
3624
- const Hi = {
3614
+ const Bi = {
3625
3615
  getBy: s.enum(["completion", "due"]).default("completion").describe(
3626
3616
  'The method to use to get the tasks: "completion" to get tasks by completion date (ie, when the task was actually completed), "due" to get tasks by due date (ie, when the task was due to be completed by).'
3627
3617
  ),
@@ -3645,17 +3635,17 @@ const Hi = {
3645
3635
  "The cursor to get the next page of tasks (cursor is obtained from the previous call to this tool, with the same parameters)."
3646
3636
  ),
3647
3637
  ...gt
3648
- }, Wi = {
3638
+ }, zi = {
3649
3639
  tasks: s.array(K).describe("The found completed tasks."),
3650
3640
  nextCursor: s.string().optional(),
3651
3641
  totalCount: s.number().describe("The total number of tasks in this page."),
3652
3642
  hasMore: s.boolean(),
3653
3643
  appliedFilters: s.record(s.string(), s.unknown())
3654
- }, Bi = {
3644
+ }, Ki = {
3655
3645
  name: g.FIND_COMPLETED_TASKS,
3656
3646
  description: 'Get completed tasks in a date range. For "what did I complete/get done" questions, use find-activity instead — it reports completion events, including every occurrence of a recurring task, which this tool does not. since/until are optional and default to a 7-day window when omitted. Includes all collaborators by default. Person-specific queries (summaries, plans, reports) require responsibleUser.',
3657
- parameters: Hi,
3658
- outputSchema: Wi,
3647
+ parameters: Bi,
3648
+ outputSchema: zi,
3659
3649
  annotations: { readOnlyHint: !0, destructiveHint: !1, idempotentHint: !0 },
3660
3650
  async execute(e, t) {
3661
3651
  const {
@@ -3679,11 +3669,11 @@ const Hi = {
3679
3669
  const T = await t.getUser(), C = T.tzInfo?.gmtString || "+00:00", A = await te({
3680
3670
  projectId: d,
3681
3671
  user: T
3682
- }), k = Fi({
3672
+ }), k = Wi({
3683
3673
  since: i,
3684
3674
  until: a,
3685
3675
  userGmtOffset: C
3686
- }), I = `${k.since}T00:00:00${C}`, $ = `${k.until}T23:59:59${C}`, w = new Date(I).toISOString(), b = new Date($).toISOString(), S = {
3676
+ }), v = `${k.since}T00:00:00${C}`, $ = `${k.until}T23:59:59${C}`, w = new Date(v).toISOString(), b = new Date($).toISOString(), S = {
3687
3677
  ...e,
3688
3678
  since: k.since,
3689
3679
  until: k.until
@@ -3703,7 +3693,7 @@ const Hi = {
3703
3693
  ...f ? { filterQuery: f, filterLang: "en" } : {}
3704
3694
  }), O = D.map(U);
3705
3695
  return {
3706
- textContent: zi({
3696
+ textContent: Yi({
3707
3697
  tasks: O,
3708
3698
  args: S,
3709
3699
  nextCursor: E,
@@ -3719,7 +3709,7 @@ const Hi = {
3719
3709
  };
3720
3710
  }
3721
3711
  };
3722
- function zi({
3712
+ function Yi({
3723
3713
  tasks: e,
3724
3714
  args: t,
3725
3715
  nextCursor: r,
@@ -3745,7 +3735,7 @@ function zi({
3745
3735
  zeroReasonHints: c
3746
3736
  });
3747
3737
  }
3748
- const Ki = {
3738
+ const qi = {
3749
3739
  searchText: s.string().optional().describe(
3750
3740
  'Search for a label by name (partial and case insensitive match). Supports wildcards (e.g. "work*" for prefix match). Use "\\*" for a literal asterisk. If omitted, all labels are returned.'
3751
3741
  ),
@@ -3753,7 +3743,7 @@ const Ki = {
3753
3743
  cursor: s.string().optional().describe(
3754
3744
  "The cursor to get the next page of labels (cursor is obtained from the previous call to this tool, with the same parameters). Ignored when searchText is provided."
3755
3745
  )
3756
- }, qi = {
3746
+ }, Gi = {
3757
3747
  labels: s.array(ge).describe("The found personal labels."),
3758
3748
  nextCursor: s.string().optional(),
3759
3749
  totalCount: s.number().describe("The total number of labels in this page."),
@@ -3762,22 +3752,22 @@ const Ki = {
3762
3752
  "Names of all shared labels visible to you. These have no IDs or metadata — use their names directly when filtering tasks."
3763
3753
  ),
3764
3754
  appliedFilters: s.record(s.string(), s.unknown())
3765
- }, Gi = {
3755
+ }, Vi = {
3766
3756
  name: g.FIND_LABELS,
3767
3757
  description: "List personal labels and shared labels. Personal labels have full metadata (id, name, color, order, isFavorite) and support pagination and name search (partial, case insensitive). Shared labels are labels used on tasks shared with you — they are returned as names only (no IDs or metadata). When searching, all matching personal labels are fetched across all pages and returned as a single result set (limit and cursor are ignored). When not searching, personal labels are returned with pagination.",
3768
- parameters: Ki,
3769
- outputSchema: qi,
3758
+ parameters: qi,
3759
+ outputSchema: Gi,
3770
3760
  annotations: { readOnlyHint: !0, destructiveHint: !1, idempotentHint: !0 },
3771
3761
  async execute(e, t) {
3772
3762
  const [r, o] = await Promise.all([
3773
- e.searchText ? Ho(t, e.searchText).then((c) => ({
3763
+ e.searchText ? Bo(t, e.searchText).then((c) => ({
3774
3764
  results: c,
3775
3765
  nextCursor: null
3776
3766
  })) : t.getLabels({ limit: e.limit, cursor: e.cursor ?? null }),
3777
- Wo(t)
3767
+ zo(t)
3778
3768
  ]), { results: n, nextCursor: i } = r, a = e.searchText ? { searchText: e.searchText } : { limit: e.limit, cursor: e.cursor };
3779
3769
  return {
3780
- textContent: Yi({ labels: n, args: e, nextCursor: i, sharedLabels: o }),
3770
+ textContent: Ji({ labels: n, args: e, nextCursor: i, sharedLabels: o }),
3781
3771
  structuredContent: {
3782
3772
  labels: n.map((c) => ge.parse(c)),
3783
3773
  nextCursor: i ?? void 0,
@@ -3789,7 +3779,7 @@ const Ki = {
3789
3779
  };
3790
3780
  }
3791
3781
  };
3792
- function Yi({
3782
+ function Ji({
3793
3783
  labels: e,
3794
3784
  args: t,
3795
3785
  nextCursor: r,
@@ -3797,7 +3787,7 @@ function Yi({
3797
3787
  }) {
3798
3788
  const n = t.searchText ? `All labels matching "${t.searchText}"` : "Labels", i = [];
3799
3789
  t.searchText && i.push(`searchText: "${t.searchText}"`);
3800
- const a = 10, d = e.slice(0, a).map(In).join(`
3790
+ const a = 10, d = e.slice(0, a).map(Cn).join(`
3801
3791
  `), u = e.length - a, l = u > 0 ? `${d}
3802
3792
  …and ${u} more` : d, p = [];
3803
3793
  e.length === 0 && (t.searchText ? (p.push("Try broader search terms"), p.push("Check spelling"), p.push("Remove searchText to see all labels")) : p.push("No personal labels created yet"));
@@ -3814,15 +3804,15 @@ No shared labels.`;
3814
3804
  zeroReasonHints: p
3815
3805
  }) + h;
3816
3806
  }
3817
- const { FIND_PROJECTS: _s, ADD_TASKS: Ps, UPDATE_TASKS: Us } = g, Vi = {
3807
+ const { FIND_PROJECTS: _s, ADD_TASKS: Ps, UPDATE_TASKS: Us } = g, Xi = {
3818
3808
  projectId: s.string().min(1).optional().describe(
3819
3809
  'Optional. If provided, searches only collaborators of this project. If omitted, searches across the collaborators of all shared projects the authenticated user can access (plus the authenticated user themselves) — use this for general "find a user" / "who is X" lookups.'
3820
3810
  ),
3821
3811
  searchTerm: s.string().optional().describe(
3822
3812
  "Search for a user by name or email (partial and case insensitive match). If omitted, all users are returned."
3823
3813
  )
3824
- }, Ji = {
3825
- collaborators: s.array(Zo).describe("The found users."),
3814
+ }, Qi = {
3815
+ collaborators: s.array(tn).describe("The found users."),
3826
3816
  projectInfo: s.object({
3827
3817
  id: s.string().describe("The project ID."),
3828
3818
  name: s.string().describe("The project name."),
@@ -3831,16 +3821,16 @@ const { FIND_PROJECTS: _s, ADD_TASKS: Ps, UPDATE_TASKS: Us } = g, Vi = {
3831
3821
  totalCount: s.number().describe("The total number of users found."),
3832
3822
  totalAvailable: s.number().optional().describe("The total number of available users before the search filter was applied."),
3833
3823
  appliedFilters: s.record(s.string(), s.unknown())
3834
- }, Xi = {
3824
+ }, Zi = {
3835
3825
  name: g.FIND_PROJECT_COLLABORATORS,
3836
3826
  description: `Find Todoist users (collaborators, teammates) by name or email to look up their user ID. Use this whenever the user asks to find, look up, or identify a person — e.g. "find Carrie's user ID", "who is Ernesto", "look up a user". When projectId is omitted, searches across the collaborators of every shared project the authenticated user has access to, plus the authenticated user themselves — an empty result means the person is not a collaborator on any project you share with them, not necessarily that they do not exist in Todoist. When projectId is provided, searches only that project. Partial, case-insensitive match on name and email.`,
3837
- parameters: Vi,
3838
- outputSchema: Ji,
3827
+ parameters: Xi,
3828
+ outputSchema: Qi,
3839
3829
  annotations: { readOnlyHint: !0, destructiveHint: !1, idempotentHint: !0 },
3840
3830
  async execute(e, t) {
3841
3831
  const { projectId: r, searchTerm: o } = e;
3842
3832
  if (!r)
3843
- return Qi({ searchTerm: o, client: t, appliedFilters: e });
3833
+ return ea({ searchTerm: o, client: t, appliedFilters: e });
3844
3834
  let n = r, i;
3845
3835
  try {
3846
3836
  if (i = await t.getProject(r), !i)
@@ -3910,12 +3900,12 @@ const { FIND_PROJECTS: _s, ADD_TASKS: Ps, UPDATE_TASKS: Us } = g, Vi = {
3910
3900
  };
3911
3901
  }
3912
3902
  };
3913
- async function Qi({
3903
+ async function ea({
3914
3904
  searchTerm: e,
3915
3905
  client: t,
3916
3906
  appliedFilters: r
3917
3907
  }) {
3918
- const o = await H.getAllCollaborators(t), n = await Zi(t, o);
3908
+ const o = await H.getAllCollaborators(t), n = await ta(t, o);
3919
3909
  if (n.length === 0)
3920
3910
  return {
3921
3911
  textContent: `No users found. You may have no shared projects, or collaborator data is not accessible.
@@ -3949,7 +3939,7 @@ async function Qi({
3949
3939
  }
3950
3940
  };
3951
3941
  }
3952
- async function Zi(e, t) {
3942
+ async function ta(e, t) {
3953
3943
  try {
3954
3944
  const r = await e.getUser();
3955
3945
  return !r || t.some((o) => o.id === r.id) ? t : [
@@ -3994,11 +3984,11 @@ function Ls({
3994
3984
  nextSteps: l
3995
3985
  });
3996
3986
  }
3997
- const { ADD_PROJECTS: Ft } = g, ea = {
3987
+ const { ADD_PROJECTS: Ft } = g, sa = {
3998
3988
  active: "projects",
3999
3989
  archived: "archived projects",
4000
3990
  all: "projects (active and archived)"
4001
- }, ta = {
3991
+ }, ra = {
4002
3992
  searchText: s.string().optional().describe(
4003
3993
  'Search for a project by name (partial and case insensitive match). Supports wildcards (e.g. "work*" for prefix match). Use "\\*" for a literal asterisk. If omitted, all projects are returned.'
4004
3994
  ),
@@ -4009,17 +3999,17 @@ const { ADD_PROJECTS: Ft } = g, ea = {
4009
3999
  archivedStatus: s.enum(["active", "archived", "all"]).optional().describe(
4010
4000
  "Which projects to return by archive status: 'active' (default, non-archived only), 'archived' (archived only), or 'all' (both active and archived). Each project includes an isArchived field. Archived projects can be deleted via the delete-object tool (type: 'project')."
4011
4001
  )
4012
- }, sa = {
4002
+ }, oa = {
4013
4003
  projects: s.array(re).describe("The found projects."),
4014
4004
  nextCursor: s.string().optional(),
4015
4005
  totalCount: s.number().describe("The total number of projects in this page."),
4016
4006
  hasMore: s.boolean(),
4017
4007
  appliedFilters: s.record(s.string(), s.unknown())
4018
- }, ra = {
4008
+ }, na = {
4019
4009
  name: g.FIND_PROJECTS,
4020
4010
  description: "List all projects or search for projects by name. By default only active projects are returned; use archivedStatus ('archived' or 'all') to include archived projects. When searching or when archivedStatus is 'all', all matching projects are returned (pagination is ignored). Otherwise projects are returned with pagination.",
4021
- parameters: ta,
4022
- outputSchema: sa,
4011
+ parameters: ra,
4012
+ outputSchema: oa,
4023
4013
  annotations: { readOnlyHint: !0, destructiveHint: !1, idempotentHint: !0 },
4024
4014
  async execute(e, t) {
4025
4015
  const { searchText: r } = e, o = e.archivedStatus ?? "active";
@@ -4027,8 +4017,8 @@ const { ADD_PROJECTS: Ft } = g, ea = {
4027
4017
  if (r || o === "all") {
4028
4018
  const c = Promise.resolve([]), [d, u] = await Promise.all([
4029
4019
  o === "archived" ? c : r ? ks(t, r) : ws(t),
4030
- o === "active" ? c : Mo(t)
4031
- ]), l = r ? Fo(r) : null, p = l ? u.filter((h) => l.test(h.name)) : u;
4020
+ o === "active" ? c : Ho(t)
4021
+ ]), l = r ? Wo(r) : null, p = l ? u.filter((h) => l.test(h.name)) : u;
4032
4022
  n = [...d, ...p];
4033
4023
  } else {
4034
4024
  const c = o === "archived" ? await t.getArchivedProjects({
@@ -4039,7 +4029,7 @@ const { ADD_PROJECTS: Ft } = g, ea = {
4039
4029
  }
4040
4030
  const a = n.map(se);
4041
4031
  return {
4042
- textContent: oa({ projects: a, args: e, nextCursor: i }),
4032
+ textContent: ia({ projects: a, args: e, nextCursor: i }),
4043
4033
  structuredContent: {
4044
4034
  projects: a,
4045
4035
  nextCursor: i ?? void 0,
@@ -4050,14 +4040,14 @@ const { ADD_PROJECTS: Ft } = g, ea = {
4050
4040
  };
4051
4041
  }
4052
4042
  };
4053
- function oa({
4043
+ function ia({
4054
4044
  projects: e,
4055
4045
  args: t,
4056
4046
  nextCursor: r
4057
4047
  }) {
4058
- const o = ea[t.archivedStatus ?? "active"], n = t.searchText ? `All ${o} matching "${t.searchText}"` : `${o.charAt(0).toUpperCase()}${o.slice(1)}`, i = [];
4048
+ const o = sa[t.archivedStatus ?? "active"], n = t.searchText ? `All ${o} matching "${t.searchText}"` : `${o.charAt(0).toUpperCase()}${o.slice(1)}`, i = [];
4059
4049
  t.searchText && i.push(`searchText: "${t.searchText}"`), t.archivedStatus && t.archivedStatus !== "active" && i.push(`archivedStatus: "${t.archivedStatus}"`);
4060
- const a = 10, d = e.slice(0, a).map(Sn).join(`
4050
+ const a = 10, d = e.slice(0, a).map(jn).join(`
4061
4051
  `), u = e.length - a, l = u > 0 ? `${d}
4062
4052
  …and ${u} more` : d, p = [];
4063
4053
  return e.length === 0 && (t.searchText ? (p.push("Try broader search terms"), p.push("Check spelling"), p.push("Remove searchText to see all projects")) : t.archivedStatus === "archived" ? (p.push("No archived projects"), p.push("Use archivedStatus: 'all' to also see active projects")) : t.archivedStatus === "all" ? (p.push("No projects created yet"), p.push(`Use ${Ft} to create a project`)) : (p.push("No active projects"), p.push("Use archivedStatus: 'all' to include archived projects"), p.push(`Use ${Ft} to create a project`))), V({
@@ -4070,22 +4060,22 @@ function oa({
4070
4060
  zeroReasonHints: p
4071
4061
  });
4072
4062
  }
4073
- const na = {
4063
+ const aa = {
4074
4064
  taskId: s.string().optional().describe(
4075
4065
  "Find all reminders for a specific task. Returns both time-based and location reminders."
4076
4066
  ),
4077
4067
  reminderId: s.string().optional().describe("Get a specific time-based reminder (relative or absolute) by its ID."),
4078
4068
  locationReminderId: s.string().optional().describe("Get a specific location reminder by its ID.")
4079
- }, ia = {
4069
+ }, ca = {
4080
4070
  reminders: s.array(ut).describe("The found reminders (time-based and location)."),
4081
4071
  searchType: s.string().describe('The search type used: "task", "reminder", or "location_reminder".'),
4082
4072
  searchId: s.string().describe("The ID used for the search."),
4083
4073
  totalCount: s.number().describe("Total reminders in this response.")
4084
- }, aa = {
4074
+ }, da = {
4085
4075
  name: g.FIND_REMINDERS,
4086
4076
  description: "Find reminders by task ID (returns all reminder types), or get a specific reminder by its ID. Use reminderId for time-based reminders and locationReminderId for location reminders.",
4087
- parameters: na,
4088
- outputSchema: ia,
4077
+ parameters: aa,
4078
+ outputSchema: ca,
4089
4079
  annotations: { readOnlyHint: !0, destructiveHint: !1, idempotentHint: !0 },
4090
4080
  async execute(e, t) {
4091
4081
  const { taskId: r, reminderId: o, locationReminderId: n } = e, i = [r, o, n].filter(Boolean);
@@ -4131,7 +4121,7 @@ const na = {
4131
4121
  })
4132
4122
  ]), u = [...a, ...c].map(ke);
4133
4123
  return {
4134
- textContent: ca(u, r),
4124
+ textContent: la(u, r),
4135
4125
  structuredContent: {
4136
4126
  reminders: u,
4137
4127
  searchType: "task",
@@ -4143,10 +4133,10 @@ const na = {
4143
4133
  throw new Error("One of taskId, reminderId, or locationReminderId must be provided.");
4144
4134
  }
4145
4135
  };
4146
- function ca(e, t) {
4136
+ function la(e, t) {
4147
4137
  if (e.length === 0)
4148
4138
  return `No reminders found for task ${t}`;
4149
- const { timeBasedCount: r, locationCount: o } = vs(e), n = [];
4139
+ const { timeBasedCount: r, locationCount: o } = Is(e), n = [];
4150
4140
  if (r > 0) {
4151
4141
  const i = r > 1 ? "time-based reminders" : "time-based reminder";
4152
4142
  n.push(`${r} ${i}`);
@@ -4157,22 +4147,22 @@ function ca(e, t) {
4157
4147
  }
4158
4148
  return `Found ${n.join(" and ")} for task ${t}`;
4159
4149
  }
4160
- const { ADD_SECTIONS: da } = g, la = {
4150
+ const { ADD_SECTIONS: ua } = g, pa = {
4161
4151
  projectId: s.string().min(1).describe(
4162
4152
  'The ID of the project to search sections in. Project ID should be an ID string, or the text "inbox", for inbox tasks.'
4163
4153
  ),
4164
4154
  searchText: s.string().optional().describe(
4165
4155
  'Search for a section by name (partial and case insensitive match). Supports wildcards (e.g. "work*" for prefix match). Use "\\*" for a literal asterisk. If omitted, all sections in the project are returned.'
4166
4156
  )
4167
- }, ua = {
4168
- sections: s.array(G).describe("The found sections."),
4157
+ }, ha = {
4158
+ sections: s.array(q).describe("The found sections."),
4169
4159
  totalCount: s.number().describe("The total number of sections found."),
4170
4160
  appliedFilters: s.record(s.string(), s.unknown())
4171
- }, pa = {
4161
+ }, ma = {
4172
4162
  name: g.FIND_SECTIONS,
4173
4163
  description: "Search for sections by name or other criteria in a project. When searching, uses server-side search to avoid fetching all sections.",
4174
- parameters: la,
4175
- outputSchema: ua,
4164
+ parameters: pa,
4165
+ outputSchema: ha,
4176
4166
  annotations: { readOnlyHint: !0, destructiveHint: !1, idempotentHint: !0 },
4177
4167
  async execute(e, t) {
4178
4168
  const r = await te({
@@ -4180,12 +4170,12 @@ const { ADD_SECTIONS: da } = g, la = {
4180
4170
  client: t
4181
4171
  });
4182
4172
  let o;
4183
- e.searchText ? o = await Bo(t, e.searchText, r) : o = (await t.getSections({
4173
+ e.searchText ? o = await Ko(t, e.searchText, r) : o = (await t.getSections({
4184
4174
  projectId: r
4185
4175
  })).results;
4186
- const n = o.map(Y);
4176
+ const n = o.map(G);
4187
4177
  return {
4188
- textContent: ha({
4178
+ textContent: fa({
4189
4179
  sections: n,
4190
4180
  projectId: e.projectId,
4191
4181
  searchText: e.searchText
@@ -4198,13 +4188,13 @@ const { ADD_SECTIONS: da } = g, la = {
4198
4188
  };
4199
4189
  }
4200
4190
  };
4201
- function ha({
4191
+ function fa({
4202
4192
  sections: e,
4203
4193
  projectId: t,
4204
4194
  searchText: r
4205
4195
  }) {
4206
4196
  const o = [];
4207
- r ? (o.push("Try broader search terms"), o.push("Check spelling"), o.push("Remove searchText to see all sections")) : (o.push("Project has no sections yet"), o.push(`Use ${da} to create sections`));
4197
+ r ? (o.push("Try broader search terms"), o.push("Check spelling"), o.push("Remove searchText to see all sections")) : (o.push("Project has no sections yet"), o.push(`Use ${ua} to create sections`));
4208
4198
  const n = r ? `Sections in project ${t} matching "${r}"` : `Sections in project ${t}`, i = e.length > 0 ? e.map((a) => ` ${a.name} • id=${a.id}`).join(`
4209
4199
  `) : void 0;
4210
4200
  return V({
@@ -4217,7 +4207,7 @@ function ha({
4217
4207
  function Ns(e) {
4218
4208
  return /* @__PURE__ */ new Date(`${e}T00:00:00`);
4219
4209
  }
4220
- const ma = {
4210
+ const ba = {
4221
4211
  startDate: s.string().regex(/^(\d{4}-\d{2}-\d{2}|today)$/).optional().describe(
4222
4212
  "The start date to get the tasks for. Format: YYYY-MM-DD, or 'today', which by default also includes overdue tasks."
4223
4213
  ),
@@ -4238,17 +4228,17 @@ const ma = {
4238
4228
  "Filter when responsibleUser is omitted. 'assigned'=assigned to others; 'unassignedOrMe'=unassigned+mine; 'all'=everyone. Default: 'unassignedOrMe'."
4239
4229
  ),
4240
4230
  ...gt
4241
- }, fa = {
4231
+ }, ga = {
4242
4232
  tasks: s.array(K).describe("The found tasks."),
4243
4233
  nextCursor: s.string().optional(),
4244
4234
  totalCount: s.number().describe("The total number of tasks in this page."),
4245
4235
  hasMore: s.boolean(),
4246
4236
  appliedFilters: s.record(s.string(), s.unknown())
4247
- }, ba = {
4237
+ }, ya = {
4248
4238
  name: g.FIND_TASKS_BY_DATE,
4249
4239
  description: "Get tasks by date range. startDate='today' includes overdue items. Default responsibleUserFiltering='unassignedOrMe' excludes others' tasks.",
4250
- parameters: ma,
4251
- outputSchema: fa,
4240
+ parameters: ba,
4241
+ outputSchema: ga,
4252
4242
  annotations: { readOnlyHint: !0, destructiveHint: !1, idempotentHint: !0 },
4253
4243
  async execute(e, t) {
4254
4244
  const r = De(e.cursor);
@@ -4286,7 +4276,7 @@ const ma = {
4286
4276
  limit: e.limit
4287
4277
  });
4288
4278
  return {
4289
- textContent: ga({ tasks: p, args: e, nextCursor: h, assigneeEmail: i }),
4279
+ textContent: Ta({ tasks: p, args: e, nextCursor: h, assigneeEmail: i }),
4290
4280
  structuredContent: {
4291
4281
  tasks: p,
4292
4282
  nextCursor: h ?? void 0,
@@ -4297,7 +4287,7 @@ const ma = {
4297
4287
  };
4298
4288
  }
4299
4289
  };
4300
- function ga({
4290
+ function Ta({
4301
4291
  tasks: e,
4302
4292
  args: t,
4303
4293
  nextCursor: r,
@@ -4347,13 +4337,13 @@ function ga({
4347
4337
  zeroReasonHints: a
4348
4338
  });
4349
4339
  }
4350
- const ya = 300 * 1e3;
4351
- class Ta {
4340
+ const ka = 300 * 1e3;
4341
+ class wa {
4352
4342
  constructor() {
4353
4343
  this.cache = null;
4354
4344
  }
4355
4345
  async getFilters(t) {
4356
- if (this.cache && Date.now() - this.cache.timestamp < ya)
4346
+ if (this.cache && Date.now() - this.cache.timestamp < ka)
4357
4347
  return this.cache.filters;
4358
4348
  const o = ((await t.sync({
4359
4349
  resourceTypes: ["filters"],
@@ -4410,7 +4400,7 @@ ${l}` + (d.length > 5 ? `
4410
4400
  this.cache = null;
4411
4401
  }
4412
4402
  }
4413
- const ka = new Ta(), { FIND_COMPLETED_TASKS: Ht, ADD_TASKS: Wt } = g, wa = {
4403
+ const Ia = new wa(), { FIND_COMPLETED_TASKS: Ht, ADD_TASKS: Wt } = g, va = {
4414
4404
  searchText: s.string().optional().describe("The text to search for in tasks."),
4415
4405
  projectId: s.string().optional().describe(
4416
4406
  'Find tasks in this project. Project ID should be an ID string, or the text "inbox", for inbox tasks.'
@@ -4434,17 +4424,17 @@ const ka = new Ta(), { FIND_COMPLETED_TASKS: Ht, ADD_TASKS: Wt } = g, wa = {
4434
4424
  "The ID or name of a saved Todoist filter. The filter's query will be fetched and used to find tasks. Cannot be used with the `filter` parameter, projectId, sectionId, or parentId."
4435
4425
  ),
4436
4426
  ...gt
4437
- }, va = {
4427
+ }, Sa = {
4438
4428
  tasks: s.array(K).describe("The found tasks."),
4439
4429
  nextCursor: s.string().optional(),
4440
4430
  totalCount: s.number().describe("The total number of tasks in this page."),
4441
4431
  hasMore: s.boolean(),
4442
4432
  appliedFilters: s.record(s.string(), s.unknown())
4443
- }, Ia = {
4433
+ }, Ca = {
4444
4434
  name: g.FIND_TASKS,
4445
4435
  description: "Find tasks by text search, project/section/parent container, responsible user, labels, a raw Todoist filter string, or a saved filter by ID or name (filterIdOrName). At least one filter must be provided.",
4446
- parameters: wa,
4447
- outputSchema: va,
4436
+ parameters: va,
4437
+ outputSchema: Sa,
4448
4438
  annotations: { readOnlyHint: !0, destructiveHint: !1, idempotentHint: !0 },
4449
4439
  async execute(e, t) {
4450
4440
  const {
@@ -4474,19 +4464,19 @@ const ka = new Ta(), { FIND_COMPLETED_TASKS: Ht, ADD_TASKS: Wt } = g, wa = {
4474
4464
  'The `filter`/`filterIdOrName` parameter cannot be combined with projectId, sectionId, or parentId. Use filter syntax instead (e.g. "##ProjectName").'
4475
4465
  );
4476
4466
  let C = h;
4477
- m && (C = (await ka.resolveFilter(t, m)).filterQuery);
4478
- const A = await ct(t, a), k = A?.userId, I = A?.email;
4467
+ m && (C = (await Ia.resolveFilter(t, m)).filterQuery);
4468
+ const A = await ct(t, a), k = A?.userId, v = A?.email;
4479
4469
  if (o || n || i) {
4480
4470
  const O = {
4481
4471
  limit: d,
4482
4472
  cursor: y ?? null
4483
4473
  };
4484
4474
  o && (O.projectId = await te({ projectId: o, user: f })), n && (O.sectionId = n), i && (O.parentId = i);
4485
- const { results: Ie, nextCursor: J } = await t.getTasks(O), ie = Ie.map(U);
4475
+ const { results: ve, nextCursor: J } = await t.getTasks(O), ie = ve.map(U);
4486
4476
  let M = r ? ie.filter(
4487
4477
  (ae) => ae.content.toLowerCase().includes(r.toLowerCase()) || ae.description?.toLowerCase().includes(r.toLowerCase())
4488
4478
  ) : ie;
4489
- return M = No({
4479
+ return M = Fo({
4490
4480
  tasks: M,
4491
4481
  resolvedAssigneeId: k,
4492
4482
  currentUserId: f.id,
@@ -4501,7 +4491,7 @@ const ka = new Ta(), { FIND_COMPLETED_TASKS: Ht, ADD_TASKS: Wt } = g, wa = {
4501
4491
  args: e,
4502
4492
  nextCursor: J,
4503
4493
  isContainerSearch: !0,
4504
- assigneeEmail: I
4494
+ assigneeEmail: v
4505
4495
  }),
4506
4496
  structuredContent: {
4507
4497
  tasks: M,
@@ -4515,22 +4505,22 @@ const ka = new Ta(), { FIND_COMPLETED_TASKS: Ht, ADD_TASKS: Wt } = g, wa = {
4515
4505
  if (k && !r && !T && !C) {
4516
4506
  const O = Ze({
4517
4507
  resolvedAssigneeId: k,
4518
- assigneeEmail: I,
4508
+ assigneeEmail: v,
4519
4509
  currentUserId: f.id,
4520
4510
  responsibleUserFiltering: c
4521
- }), { results: Ie, nextCursor: J } = await t.getTasksByFilter({
4511
+ }), { results: ve, nextCursor: J } = await t.getTasksByFilter({
4522
4512
  query: O,
4523
4513
  lang: "en",
4524
4514
  limit: d,
4525
4515
  cursor: y ?? null
4526
- }), ie = Ie.map(U);
4516
+ }), ie = ve.map(U);
4527
4517
  return {
4528
4518
  textContent: Re({
4529
4519
  tasks: ie,
4530
4520
  args: e,
4531
4521
  nextCursor: J,
4532
4522
  isContainerSearch: !1,
4533
- assigneeEmail: I
4523
+ assigneeEmail: v
4534
4524
  }),
4535
4525
  structuredContent: {
4536
4526
  tasks: ie,
@@ -4547,7 +4537,7 @@ const ka = new Ta(), { FIND_COMPLETED_TASKS: Ht, ADD_TASKS: Wt } = g, wa = {
4547
4537
  if ($ = me($, w), !(m && !a && !c)) {
4548
4538
  const O = Ze({
4549
4539
  resolvedAssigneeId: k,
4550
- assigneeEmail: I,
4540
+ assigneeEmail: v,
4551
4541
  currentUserId: f.id,
4552
4542
  responsibleUserFiltering: c
4553
4543
  });
@@ -4565,7 +4555,7 @@ const ka = new Ta(), { FIND_COMPLETED_TASKS: Ht, ADD_TASKS: Wt } = g, wa = {
4565
4555
  args: e,
4566
4556
  nextCursor: D,
4567
4557
  isContainerSearch: !1,
4568
- assigneeEmail: I
4558
+ assigneeEmail: v
4569
4559
  }),
4570
4560
  structuredContent: {
4571
4561
  tasks: S,
@@ -4577,7 +4567,7 @@ const ka = new Ta(), { FIND_COMPLETED_TASKS: Ht, ADD_TASKS: Wt } = g, wa = {
4577
4567
  };
4578
4568
  }
4579
4569
  };
4580
- function Sa(e) {
4570
+ function ja(e) {
4581
4571
  if (e.projectId) {
4582
4572
  const t = [
4583
4573
  e.searchText ? "No tasks in project match search" : "Project has no tasks yet"
@@ -4612,7 +4602,7 @@ function Re({
4612
4602
  const d = t.labels.map((u) => `@${u}`).join(t.labelsOperator === "and" ? " & " : " | ");
4613
4603
  a.push(`labels: ${d}`);
4614
4604
  }
4615
- e.length === 0 && c.push(...Sa(t));
4605
+ e.length === 0 && c.push(...ja(t));
4616
4606
  } else {
4617
4607
  const d = n || t.responsibleUser, u = [];
4618
4608
  if (t.filter && u.push(`filter: ${t.filter}`), t.searchText && u.push(`"${t.searchText}"`), t.responsibleUser && u.push(`assigned to ${d}`), t.labels && t.labels.length > 0) {
@@ -4641,7 +4631,7 @@ function Re({
4641
4631
  zeroReasonHints: c
4642
4632
  });
4643
4633
  }
4644
- const Ca = {
4634
+ const $a = {
4645
4635
  projectId: s.string().min(1).optional().describe(
4646
4636
  `Optional project ID. Use "inbox" for the Inbox. If provided, returns that project's tasks grouped by section. If omitted, returns the project and section structure for the whole account with no tasks.`
4647
4637
  )
@@ -4652,10 +4642,10 @@ const Ca = {
4652
4642
  parentId: s.string().optional().describe("The parent project ID (for sub-projects, personal projects only)."),
4653
4643
  folderId: s.string().optional().describe("The folder ID this project belongs to (workspace projects only)."),
4654
4644
  childOrder: s.number().describe("The ordering index among siblings."),
4655
- sections: s.array(G),
4645
+ sections: s.array(q),
4656
4646
  children: s.array(Ms).describe("Nested child projects.")
4657
4647
  })
4658
- ), ja = {
4648
+ ), Da = {
4659
4649
  type: s.enum(["account_overview", "project_overview"]).describe("The type of overview returned."),
4660
4650
  totalProjects: s.number().optional().describe("Total number of projects (account overview only)."),
4661
4651
  totalTasks: s.number().optional().describe("Total number of tasks."),
@@ -4672,7 +4662,7 @@ const Ca = {
4672
4662
  inbox: s.object({
4673
4663
  id: s.string().describe("The inbox project ID."),
4674
4664
  name: s.string().describe("The inbox project name."),
4675
- sections: s.array(G).describe("Sections in the inbox project.")
4665
+ sections: s.array(q).describe("Sections in the inbox project.")
4676
4666
  }).optional().describe("Inbox information (account overview only)."),
4677
4667
  projects: s.array(s.lazy(() => Ms)).optional().describe(
4678
4668
  "List of projects with hierarchy, folders, and ordering (account overview only)."
@@ -4681,7 +4671,7 @@ const Ca = {
4681
4671
  id: s.string().describe("The project ID."),
4682
4672
  name: s.string().describe("The project name.")
4683
4673
  }).optional().describe("Project details (project overview only)."),
4684
- sections: s.array(G).optional().describe("List of sections (project overview only)."),
4674
+ sections: s.array(q).optional().describe("List of sections (project overview only)."),
4685
4675
  tasks: s.array(s.any()).optional().describe("List of tasks (project overview only)."),
4686
4676
  stats: s.object({
4687
4677
  totalTasks: s.number(),
@@ -4689,7 +4679,7 @@ const Ca = {
4689
4679
  tasksWithoutSection: s.number()
4690
4680
  }).optional().describe("Statistics object (project overview only).")
4691
4681
  };
4692
- function $a(e) {
4682
+ function Aa(e) {
4693
4683
  const t = {};
4694
4684
  for (const n of e)
4695
4685
  t[n.id] = {
@@ -4701,7 +4691,7 @@ function $a(e) {
4701
4691
  for (const n of e) {
4702
4692
  const i = t[n.id];
4703
4693
  if (i)
4704
- if (q(n) && n.parentId) {
4694
+ if (Y(n) && n.parentId) {
4705
4695
  const a = t[n.parentId];
4706
4696
  a ? a.children.push(i) : r.push(i);
4707
4697
  } else
@@ -4714,7 +4704,7 @@ function $a(e) {
4714
4704
  }
4715
4705
  return o(r), r;
4716
4706
  }
4717
- async function Da(e, t) {
4707
+ async function xa(e, t) {
4718
4708
  const r = {};
4719
4709
  return await Promise.all(
4720
4710
  t.map(async (o) => {
@@ -4762,16 +4752,16 @@ function Hs(e, t) {
4762
4752
  return {
4763
4753
  id: e.id,
4764
4754
  name: e.name,
4765
- parentId: q(e) ? e.parentId ?? void 0 : void 0,
4755
+ parentId: Y(e) ? e.parentId ?? void 0 : void 0,
4766
4756
  folderId: Ce(e) ? e.folderId ?? void 0 : void 0,
4767
4757
  childOrder: e.childOrder,
4768
- sections: (t[e.id] || []).map(Y),
4758
+ sections: (t[e.id] || []).map(G),
4769
4759
  children: e.children.map(
4770
4760
  (r) => Hs(r, t)
4771
4761
  )
4772
4762
  };
4773
4763
  }
4774
- async function Aa(e, t) {
4764
+ async function Ea(e, t) {
4775
4765
  let r = [], o;
4776
4766
  do {
4777
4767
  const { results: n, nextCursor: i } = await e.getTasks({
@@ -4783,12 +4773,12 @@ async function Aa(e, t) {
4783
4773
  } while (o);
4784
4774
  return r;
4785
4775
  }
4786
- async function xa(e, t) {
4776
+ async function Oa(e, t) {
4787
4777
  const { results: r } = await e.getSections({ projectId: t });
4788
4778
  return r;
4789
4779
  }
4790
- async function Ea(e) {
4791
- const { results: t } = await e.getProjects({}), r = t.find((p) => q(p) && p.inboxProject === !0), o = t.filter((p) => !q(p) || p.inboxProject !== !0), n = $a(o), i = t.map((p) => p.id), a = await Da(e, i), c = ["# Personal Projects", ""];
4780
+ async function _a(e) {
4781
+ const { results: t } = await e.getProjects({}), r = t.find((p) => Y(p) && p.inboxProject === !0), o = t.filter((p) => !Y(p) || p.inboxProject !== !0), n = Aa(o), i = t.map((p) => p.id), a = await xa(e, i), c = ["# Personal Projects", ""];
4792
4782
  if (r) {
4793
4783
  c.push(`- Inbox Project: ${r.name} (id=${r.id})`);
4794
4784
  for (const p of a[r.id] || [])
@@ -4814,7 +4804,7 @@ async function Ea(e) {
4814
4804
  inbox: r ? {
4815
4805
  id: r.id,
4816
4806
  name: r.name,
4817
- sections: (a[r.id] || []).map(Y)
4807
+ sections: (a[r.id] || []).map(G)
4818
4808
  } : void 0,
4819
4809
  projects: n.map(
4820
4810
  (p) => Hs(p, a)
@@ -4828,11 +4818,11 @@ async function Ea(e) {
4828
4818
  };
4829
4819
  return { textContent: u, structuredContent: l };
4830
4820
  }
4831
- async function Oa(e, t) {
4821
+ async function Pa(e, t) {
4832
4822
  const [r, o, n] = await Promise.all([
4833
4823
  e.getProject(t),
4834
- xa(e, t),
4835
- Aa(e, t)
4824
+ Oa(e, t),
4825
+ Ea(e, t)
4836
4826
  ]), i = {};
4837
4827
  for (const l of o)
4838
4828
  i[l.id] = [];
@@ -4860,7 +4850,7 @@ async function Oa(e, t) {
4860
4850
  id: r.id,
4861
4851
  name: r.name
4862
4852
  },
4863
- sections: o.map(Y),
4853
+ sections: o.map(G),
4864
4854
  tasks: n.map((l) => ({
4865
4855
  ...l,
4866
4856
  children: []
@@ -4874,27 +4864,27 @@ async function Oa(e, t) {
4874
4864
  };
4875
4865
  return { textContent: d, structuredContent: u };
4876
4866
  }
4877
- const _a = {
4867
+ const Ua = {
4878
4868
  name: g.GET_OVERVIEW,
4879
4869
  description: `Get a Markdown overview. Called without a projectId, returns the account's project and section structure only — no tasks — for navigation. Pass a projectId (or "inbox" for the Inbox) to get that project's tasks grouped by section.`,
4880
- parameters: Ca,
4881
- outputSchema: ja,
4870
+ parameters: $a,
4871
+ outputSchema: Da,
4882
4872
  annotations: { readOnlyHint: !0, destructiveHint: !1, idempotentHint: !0 },
4883
4873
  async execute(e, t) {
4884
- const r = await te({ projectId: e.projectId, client: t }), o = r ? await Oa(t, r) : await Ea(t);
4874
+ const r = await te({ projectId: e.projectId, client: t }), o = r ? await Pa(t, r) : await _a(t);
4885
4875
  return {
4886
4876
  textContent: o.textContent,
4887
4877
  structuredContent: o.structuredContent
4888
4878
  };
4889
4879
  }
4890
- }, Pa = {}, pe = s.object({
4880
+ }, Ra = {}, pe = s.object({
4891
4881
  count: s.number().describe("Number of consecutive periods in this streak."),
4892
4882
  start: s.string().describe("Start date of the streak."),
4893
4883
  end: s.string().describe("End date of the streak.")
4894
4884
  }), zt = s.object({
4895
4885
  id: s.string().describe("Project ID."),
4896
4886
  completed: s.number().describe("Number of tasks completed in this project.")
4897
- }), Ua = {
4887
+ }), La = {
4898
4888
  completedCount: s.number().describe("Total number of completed tasks (all-time)."),
4899
4889
  daysItems: s.array(
4900
4890
  s.object({
@@ -4943,11 +4933,11 @@ const _a = {
4943
4933
  })
4944
4934
  ).describe("Recent karma change events with reasons."),
4945
4935
  projectColors: s.record(s.string(), s.string()).describe("Map of project ID to color key.")
4946
- }, Ra = {
4936
+ }, Na = {
4947
4937
  name: g.GET_PRODUCTIVITY_STATS,
4948
4938
  description: 'Get comprehensive productivity statistics including daily/weekly completion breakdowns, goal streaks (current, last, max), karma score and trends, and historical karma data. Useful for productivity analysis and tracking goal progress. Reports counts, streaks and karma only, never the tasks themselves — for "what did I complete", use find-activity.',
4949
- parameters: Pa,
4950
- outputSchema: Ua,
4939
+ parameters: Ra,
4940
+ outputSchema: La,
4951
4941
  annotations: {
4952
4942
  readOnlyHint: !0,
4953
4943
  destructiveHint: !1,
@@ -4956,7 +4946,7 @@ const _a = {
4956
4946
  async execute(e, t) {
4957
4947
  const r = await t.getProductivityStats();
4958
4948
  return {
4959
- textContent: La(r),
4949
+ textContent: Ma(r),
4960
4950
  structuredContent: {
4961
4951
  completedCount: r.completedCount,
4962
4952
  daysItems: r.daysItems,
@@ -4983,7 +4973,7 @@ const _a = {
4983
4973
  };
4984
4974
  }
4985
4975
  };
4986
- function La(e) {
4976
+ function Ma(e) {
4987
4977
  const t = [
4988
4978
  "# Productivity Statistics",
4989
4979
  "",
@@ -5013,11 +5003,11 @@ function La(e) {
5013
5003
  return t.join(`
5014
5004
  `);
5015
5005
  }
5016
- const Na = {
5006
+ const Fa = {
5017
5007
  projectId: s.string().min(1).describe("The ID of the project to get activity stats for."),
5018
5008
  weeks: s.number().int().min(1).max(12).optional().describe("Number of weeks of activity data to retrieve (1-12, default 2)."),
5019
5009
  includeWeeklyCounts: s.boolean().optional().describe("Include weekly rollup counts alongside daily counts.")
5020
- }, Ma = {
5010
+ }, Ha = {
5021
5011
  projectId: s.string().describe("The project ID."),
5022
5012
  dayItems: s.array(
5023
5013
  s.object({
@@ -5033,7 +5023,7 @@ const Na = {
5033
5023
  })
5034
5024
  ).optional().describe("Weekly completion rollups. Only included when includeWeeklyCounts is true.")
5035
5025
  };
5036
- function Fa(e, t) {
5026
+ function Wa(e, t) {
5037
5027
  const r = [`# Activity Stats: Project ${e}`, ""];
5038
5028
  if (t.dayItems.length > 0) {
5039
5029
  r.push("## Daily Activity");
@@ -5049,11 +5039,11 @@ function Fa(e, t) {
5049
5039
  return r.join(`
5050
5040
  `);
5051
5041
  }
5052
- const Ha = {
5042
+ const Ba = {
5053
5043
  name: g.GET_PROJECT_ACTIVITY_STATS,
5054
5044
  description: "Get daily and optional weekly task completion counts for a project over a configurable time window (1-12 weeks). Useful for identifying completion trends and patterns.",
5055
- parameters: Na,
5056
- outputSchema: Ma,
5045
+ parameters: Fa,
5046
+ outputSchema: Ha,
5057
5047
  annotations: {
5058
5048
  readOnlyHint: !0,
5059
5049
  destructiveHint: !1,
@@ -5065,7 +5055,7 @@ const Ha = {
5065
5055
  includeWeeklyCounts: n
5066
5056
  });
5067
5057
  return {
5068
- textContent: Fa(r, i),
5058
+ textContent: Wa(r, i),
5069
5059
  structuredContent: {
5070
5060
  projectId: r,
5071
5061
  dayItems: i.dayItems,
@@ -5073,12 +5063,12 @@ const Ha = {
5073
5063
  }
5074
5064
  };
5075
5065
  }
5076
- }, Wa = {
5066
+ }, za = {
5077
5067
  projectId: s.string().min(1).describe("The ID of the project to check health for."),
5078
5068
  includeContext: s.boolean().default(!1).describe(
5079
5069
  "Include detailed health context with project metrics and task-level data. May produce large output for projects with many tasks."
5080
5070
  )
5081
- }, Ba = s.object({
5071
+ }, Ka = s.object({
5082
5072
  id: s.string().describe("The task ID."),
5083
5073
  content: s.string().describe("The task content/title."),
5084
5074
  priority: s.string().describe("The task priority (1-4)."),
@@ -5086,7 +5076,7 @@ const Ha = {
5086
5076
  deadline: s.string().optional().describe("The deadline date string, if set."),
5087
5077
  isCompleted: s.boolean().describe("Whether the task is completed."),
5088
5078
  labels: s.array(s.string()).describe("Labels applied to this task.")
5089
- }), za = {
5079
+ }), Ya = {
5090
5080
  projectId: s.string().describe("The project ID."),
5091
5081
  projectName: s.string().describe("The project name."),
5092
5082
  progress: s.object({
@@ -5112,12 +5102,12 @@ const Ha = {
5112
5102
  tasksCompletedThisWeek: s.number().describe("Tasks completed in the current week."),
5113
5103
  averageCompletionTime: s.number().optional().describe("Average task completion time in days, if available.")
5114
5104
  }).describe("Aggregated project metrics."),
5115
- tasks: s.array(Ba).describe("Tasks in the project.")
5105
+ tasks: s.array(Ka).describe("Tasks in the project.")
5116
5106
  }).optional().describe(
5117
5107
  "Detailed project context with metrics and task data. Only included when includeContext is true."
5118
5108
  )
5119
5109
  };
5120
- async function Ka(e, t, r) {
5110
+ async function qa(e, t, r) {
5121
5111
  if (r) {
5122
5112
  const [i, a, c] = await Promise.all([
5123
5113
  e.getProjectProgress(t),
@@ -5132,7 +5122,7 @@ async function Ka(e, t, r) {
5132
5122
  ]);
5133
5123
  return { progress: o, health: n };
5134
5124
  }
5135
- function qa(e, { progress: t, health: r, context: o }) {
5125
+ function Ga(e, { progress: t, health: r, context: o }) {
5136
5126
  const n = [`# Project Health: ${e}`, ""];
5137
5127
  if (n.push(`**Status:** ${r.status}`), r.isStale && n.push("**Note:** Health data is stale and may not reflect recent changes."), r.updateInProgress && n.push("**Note:** A health analysis update is currently in progress."), r.updatedAt && n.push(`**Last Updated:** ${r.updatedAt.toISOString()}`), n.push(""), n.push("## Progress"), n.push(
5138
5128
  `**Completed:** ${t.completedCount} | **Active:** ${t.activeCount} | **Progress:** ${t.progressPercent}%`
@@ -5150,18 +5140,18 @@ function qa(e, { progress: t, health: r, context: o }) {
5150
5140
  return n.join(`
5151
5141
  `);
5152
5142
  }
5153
- const Ga = {
5143
+ const Va = {
5154
5144
  name: g.GET_PROJECT_HEALTH,
5155
5145
  description: "Get a comprehensive health assessment for a project including completion progress, health status (EXCELLENT, ON_TRACK, AT_RISK, CRITICAL), and optional detailed context with project metrics and task-level data. Use includeContext=true for that full detail.",
5156
- parameters: Wa,
5157
- outputSchema: za,
5146
+ parameters: za,
5147
+ outputSchema: Ya,
5158
5148
  annotations: {
5159
5149
  readOnlyHint: !0,
5160
5150
  destructiveHint: !1,
5161
5151
  idempotentHint: !0
5162
5152
  },
5163
5153
  async execute(e, t) {
5164
- const { projectId: r, includeContext: o } = e, n = await Ka(t, r, o), i = n.context?.projectName ?? `Project ${r}`, a = qa(i, n), c = n.context ? {
5154
+ const { projectId: r, includeContext: o } = e, n = await qa(t, r, o), i = n.context?.projectName ?? `Project ${r}`, a = Ga(i, n), c = n.context ? {
5165
5155
  projectDescription: n.context.projectDescription ?? void 0,
5166
5156
  projectMetrics: {
5167
5157
  ...n.context.projectMetrics,
@@ -5199,12 +5189,12 @@ const Ga = {
5199
5189
  }
5200
5190
  };
5201
5191
  }
5202
- }, Ya = {
5192
+ }, Ja = {
5203
5193
  workspaceIdOrName: s.string().min(1).describe(
5204
5194
  "The workspace ID or name. Supports exact ID, exact name match (case-insensitive), or unique partial name match."
5205
5195
  ),
5206
5196
  projectIds: s.array(s.string().min(1)).min(1).optional().describe("Optional list of project IDs to scope insights to specific projects.")
5207
- }, Va = s.object({
5197
+ }, Xa = s.object({
5208
5198
  projectId: s.string().describe("The project ID."),
5209
5199
  health: s.object({
5210
5200
  status: s.enum(st).describe("The health status of the project."),
@@ -5216,15 +5206,15 @@ const Ga = {
5216
5206
  activeCount: s.number().describe("Number of active tasks."),
5217
5207
  progressPercent: s.number().describe("Completion percentage (0-100).")
5218
5208
  }).optional().describe("Progress data for this project. Omitted when the project has none.")
5219
- }), Ja = {
5209
+ }), Qa = {
5220
5210
  workspaceId: s.string().describe("The resolved workspace ID."),
5221
5211
  workspaceName: s.string().describe("The resolved workspace name."),
5222
- projectInsights: s.array(Va).describe("Health and progress insights for each project in the workspace.")
5223
- }, Xa = {
5212
+ projectInsights: s.array(Xa).describe("Health and progress insights for each project in the workspace.")
5213
+ }, Za = {
5224
5214
  name: g.GET_WORKSPACE_INSIGHTS,
5225
5215
  description: "Get aggregated health and progress insights across all projects in a workspace. Accepts workspace name or ID, with optional project ID filtering. Useful for a cross-project health overview.",
5226
- parameters: Ya,
5227
- outputSchema: Ja,
5216
+ parameters: Ja,
5217
+ outputSchema: Qa,
5228
5218
  annotations: {
5229
5219
  readOnlyHint: !0,
5230
5220
  destructiveHint: !1,
@@ -5264,7 +5254,7 @@ const Ga = {
5264
5254
  };
5265
5255
  }
5266
5256
  };
5267
- function Qa(e) {
5257
+ function ec(e) {
5268
5258
  const t = e.trim();
5269
5259
  if (!/^https?:\/\//i.test(t))
5270
5260
  return t;
@@ -5274,21 +5264,21 @@ function Qa(e) {
5274
5264
  } catch {
5275
5265
  throw new Error(`Could not read a template ID from "${t}".`);
5276
5266
  }
5277
- if (!Za(r.hostname))
5267
+ if (!tc(r.hostname))
5278
5268
  throw new Error(
5279
5269
  `"${r.hostname}" is not a Todoist domain. Pass a todoist.com template URL or the template ID itself.`
5280
5270
  );
5281
5271
  r.hostname = "todoist.com";
5282
- const o = rr(r.toString());
5272
+ const o = nr(r.toString());
5283
5273
  if (o?.type !== "template")
5284
5274
  throw new Error(`"${t}" is not a Todoist template URL.`);
5285
5275
  return o.id;
5286
5276
  }
5287
- function Za(e) {
5277
+ function tc(e) {
5288
5278
  const t = e.toLowerCase();
5289
5279
  return t === "todoist.com" || t.endsWith(".todoist.com");
5290
5280
  }
5291
- const ec = {
5281
+ const sc = {
5292
5282
  projectId: s.string().min(1).describe("The ID of the existing project to import the template into."),
5293
5283
  templateId: s.string().optional().describe(
5294
5284
  'The template to import — either a gallery slug ("product-launch"), a personal template ID ("UT_28Ex..."), or a full Todoist template URL, which is reduced to the ID automatically. Gallery templates work for anyone; personal templates only for the account that owns them. There is no way to list templates through this server, so only use the ID or URL the user supplied. Provide either this or `csvFileContent`, not both.'
@@ -5297,16 +5287,16 @@ const ec = {
5297
5287
  "Raw CSV template content, as produced by export-project-template. Provide either this or `templateId`, not both."
5298
5288
  ),
5299
5289
  locale: s.string().optional().describe('Locale for the imported content when using `templateId`. Defaults to "en".')
5300
- }, tc = {
5301
- sections: s.array(G).describe("Sections created by the import."),
5290
+ }, rc = {
5291
+ sections: s.array(q).describe("Sections created by the import."),
5302
5292
  tasks: s.array(K).describe("Tasks created by the import."),
5303
- comments: s.array(ve).describe("Comments created by the import."),
5293
+ comments: s.array(Ie).describe("Comments created by the import."),
5304
5294
  totalCount: s.number().describe("The total number of objects created by the import.")
5305
- }, sc = {
5295
+ }, oc = {
5306
5296
  name: g.IMPORT_PROJECT_TEMPLATE,
5307
5297
  description: "Import a template into an existing project, adding its tasks, sections and comments to whatever is already there. Source it by template ID/URL or by passing CSV content from export-project-template. To start a new project from a template, create the project with add-projects first, then import into it. This writes immediately and cannot be undone, so only run it against a project the user named.",
5308
- parameters: ec,
5309
- outputSchema: tc,
5298
+ parameters: sc,
5299
+ outputSchema: rc,
5310
5300
  annotations: { readOnlyHint: !1, destructiveHint: !1, idempotentHint: !1 },
5311
5301
  async execute({ projectId: e, templateId: t, csvFileContent: r, locale: o }, n) {
5312
5302
  if (!!t == !!r)
@@ -5315,16 +5305,16 @@ const ec = {
5315
5305
  );
5316
5306
  const i = t ? await n.importTemplateFromId({
5317
5307
  projectId: e,
5318
- templateId: Qa(t),
5308
+ templateId: ec(t),
5319
5309
  locale: o
5320
5310
  }) : await n.importTemplateIntoProject({
5321
5311
  projectId: e,
5322
5312
  // The SDK treats strings as filesystem paths, not file content.
5323
5313
  file: new Blob([r ?? ""], { type: "text/csv" }),
5324
5314
  fileName: "template.csv"
5325
- }), a = i.sections.map(Y), c = i.tasks.map(U), d = i.comments.map(we), u = i.projects.length + a.length + c.length + d.length;
5315
+ }), a = i.sections.map(G), c = i.tasks.map(U), d = i.comments.map(we), u = i.projects.length + a.length + c.length + d.length;
5326
5316
  return {
5327
- textContent: rc({
5317
+ textContent: nc({
5328
5318
  projectId: e,
5329
5319
  counts: {
5330
5320
  projects: i.projects.length,
@@ -5338,7 +5328,7 @@ const ec = {
5338
5328
  };
5339
5329
  }
5340
5330
  };
5341
- function rc({
5331
+ function nc({
5342
5332
  projectId: e,
5343
5333
  counts: t,
5344
5334
  totalCount: r
@@ -5348,21 +5338,21 @@ function rc({
5348
5338
  const o = Object.entries(t).filter(([, n]) => n > 0).map(([n, i]) => `${i} ${i === 1 ? n.replace(/s$/, "") : n}`);
5349
5339
  return `Imported template into project (id=${e}): ${o.join(", ")}.`;
5350
5340
  }
5351
- const oc = {}, nc = {
5341
+ const ic = {}, ac = {
5352
5342
  id: s.string().describe("The unique identifier for the workspace."),
5353
5343
  name: s.string().describe("The name of the workspace."),
5354
- plan: s.enum(nr).describe("The workspace plan type."),
5355
- role: s.enum(or).optional().describe("The user's role in the workspace, if available."),
5344
+ plan: s.enum(ar).describe("The workspace plan type."),
5345
+ role: s.enum(ir).optional().describe("The user's role in the workspace, if available."),
5356
5346
  isLinkSharingEnabled: s.boolean().describe("Whether link sharing is enabled for the workspace."),
5357
5347
  isGuestAllowed: s.boolean().describe("Whether guests are allowed in the workspace."),
5358
5348
  createdAt: s.string().optional().describe("The ISO 8601 timestamp when the workspace was created."),
5359
5349
  creatorId: s.string().describe("The ID of the user who created the workspace.")
5360
- }, ic = {
5350
+ }, cc = {
5361
5351
  type: s.literal("workspaces").describe("The type of the response."),
5362
- workspaces: s.array(s.object(nc)).describe("List of workspaces."),
5352
+ workspaces: s.array(s.object(ac)).describe("List of workspaces."),
5363
5353
  count: s.number().describe("The total number of workspaces.")
5364
5354
  };
5365
- async function ac(e) {
5355
+ async function dc(e) {
5366
5356
  const r = (await e.getWorkspaces()).map((a) => ({
5367
5357
  id: a.id,
5368
5358
  name: a.name,
@@ -5393,22 +5383,22 @@ async function ac(e) {
5393
5383
  };
5394
5384
  return { textContent: n, structuredContent: i };
5395
5385
  }
5396
- const cc = {
5386
+ const lc = {
5397
5387
  name: g.LIST_WORKSPACES,
5398
5388
  description: "Get all workspaces for the authenticated user. Returns workspace details including ID, name, plan type (STARTER/BUSINESS), user role (ADMIN/MEMBER/GUEST), link sharing settings, guest permissions, creation date, and creator ID.",
5399
- parameters: oc,
5400
- outputSchema: ic,
5389
+ parameters: ic,
5390
+ outputSchema: cc,
5401
5391
  annotations: { readOnlyHint: !0, destructiveHint: !1, idempotentHint: !0 },
5402
5392
  async execute(e, t) {
5403
- const r = await ac(t);
5393
+ const r = await dc(t);
5404
5394
  return {
5405
5395
  textContent: r.textContent,
5406
5396
  structuredContent: r.structuredContent
5407
5397
  };
5408
5398
  }
5409
- }, { FIND_TASKS: dc, FIND_PROJECT_COLLABORATORS: Kt, UPDATE_TASKS: lc } = g, uc = 50, pc = {
5399
+ }, { FIND_TASKS: uc, FIND_PROJECT_COLLABORATORS: Kt, UPDATE_TASKS: pc } = g, hc = 50, mc = {
5410
5400
  operation: s.enum(["assign", "unassign", "reassign"]).describe("The assignment operation to perform."),
5411
- taskIds: s.array(s.string()).min(1).max(uc).describe("The IDs of the tasks to operate on (max 50)."),
5401
+ taskIds: s.array(s.string()).min(1).max(hc).describe("The IDs of the tasks to operate on (max 50)."),
5412
5402
  responsibleUser: s.string().optional().describe(
5413
5403
  'The user to assign tasks to. Can be "me" (assigns to current user), a user ID, name, or email. Required for assign and reassign operations.'
5414
5404
  ),
@@ -5416,7 +5406,7 @@ const cc = {
5416
5406
  "For reassign operations: the current assignee to reassign from. Can be user ID, name, or email. Optional - if not provided, reassigns from any current assignee."
5417
5407
  ),
5418
5408
  dryRun: s.boolean().optional().default(!1).describe("If true, validates operations without executing them.")
5419
- }, hc = {
5409
+ }, fc = {
5420
5410
  results: s.array(
5421
5411
  s.object({
5422
5412
  taskId: s.string().describe("The ID of the task."),
@@ -5432,11 +5422,11 @@ const cc = {
5432
5422
  failed: s.number().describe("Number of failed operations."),
5433
5423
  dryRun: s.boolean().describe("Whether this was a dry run.")
5434
5424
  }).optional().describe("Summary of the operation.")
5435
- }, mc = {
5425
+ }, bc = {
5436
5426
  name: g.MANAGE_ASSIGNMENTS,
5437
5427
  description: "Bulk assignment operations for multiple tasks. Supports assign, unassign, and reassign operations with atomic rollback on failures.",
5438
- parameters: pc,
5439
- outputSchema: hc,
5428
+ parameters: mc,
5429
+ outputSchema: fc,
5440
5430
  annotations: { readOnlyHint: !1, destructiveHint: !0, idempotentHint: !1 },
5441
5431
  async execute(e, t) {
5442
5432
  const { operation: r, taskIds: o, responsibleUser: n, fromAssigneeUser: i, dryRun: a } = e;
@@ -5452,11 +5442,11 @@ const cc = {
5452
5442
  })
5453
5443
  ), d = [], u = [];
5454
5444
  for (let k = 0; k < c.length; k++) {
5455
- const I = c[k];
5456
- I && I.status === "fulfilled" ? d.push(I.value) : I && I.status === "rejected" ? u.push({
5445
+ const v = c[k];
5446
+ v && v.status === "fulfilled" ? d.push(v.value) : v && v.status === "rejected" ? u.push({
5457
5447
  taskId: o[k] || "invalid-task-id",
5458
5448
  success: !1,
5459
- error: I.reason?.message || "Task not accessible"
5449
+ error: v.reason?.message || "Task not accessible"
5460
5450
  }) : u.push({
5461
5451
  taskId: o[k] || "invalid-task-id",
5462
5452
  success: !1,
@@ -5464,7 +5454,7 @@ const cc = {
5464
5454
  });
5465
5455
  }
5466
5456
  if (d.length === 0) {
5467
- const k = u.map((I) => `"${I.taskId}": ${I.error}`).join("; ");
5457
+ const k = u.map((v) => `"${v.taskId}": ${v.error}`).join("; ");
5468
5458
  throw new Error(`All ${u.length} task(s) failed: ${k}`);
5469
5459
  }
5470
5460
  let l;
@@ -5517,7 +5507,7 @@ const cc = {
5517
5507
  originalAssigneeId: b.responsibleUid ?? void 0
5518
5508
  };
5519
5509
  }
5520
- }), I = await Promise.all(k), $ = [...I, ...u];
5510
+ }), v = await Promise.all(k), $ = [...v, ...u];
5521
5511
  if ($.length > 0 && $.every((b) => !b.success)) {
5522
5512
  const b = $.map((S) => `"${S.taskId}": ${S.error}`).join("; ");
5523
5513
  throw new Error(`All ${$.length} unassign operation(s) failed: ${b}`);
@@ -5532,7 +5522,7 @@ const cc = {
5532
5522
  operation: r,
5533
5523
  results: $,
5534
5524
  totalRequested: o.length,
5535
- successful: I.filter((b) => b.success).length,
5525
+ successful: v.filter((b) => b.success).length,
5536
5526
  failed: $.filter((b) => !b.success).length,
5537
5527
  dryRun: !1
5538
5528
  }
@@ -5543,18 +5533,18 @@ const cc = {
5543
5533
  p
5544
5534
  ), m = [], y = [];
5545
5535
  for (let k = 0; k < p.length; k++) {
5546
- const I = p[k], $ = h[k];
5547
- I && $?.isValid ? m.push({ assignment: I, validation: $ }) : I?.taskId && y.push({
5548
- taskId: I.taskId,
5536
+ const v = p[k], $ = h[k];
5537
+ v && $?.isValid ? m.push({ assignment: v, validation: $ }) : v?.taskId && y.push({
5538
+ taskId: v.taskId,
5549
5539
  success: !1,
5550
5540
  error: $?.error?.message || "Validation failed"
5551
5541
  });
5552
5542
  }
5553
- async function f(k, I) {
5543
+ async function f(k, v) {
5554
5544
  const $ = k.filter(
5555
5545
  (b) => b.assignment != null && b.validation != null
5556
5546
  );
5557
- if (!I)
5547
+ if (!v)
5558
5548
  return $.map(({ assignment: b, validation: S }) => {
5559
5549
  const D = d.find((E) => E.id === b.taskId);
5560
5550
  if (!b.taskId || !S.resolvedUser?.userId)
@@ -5601,7 +5591,7 @@ const cc = {
5601
5591
  }
5602
5592
  const T = await f(m, !a), C = [...T, ...y, ...u];
5603
5593
  if (C.length > 0 && C.every((k) => !k.success)) {
5604
- const k = C.map((I) => `"${I.taskId}": ${I.error}`).join("; ");
5594
+ const k = C.map((v) => `"${v.taskId}": ${v.error}`).join("; ");
5605
5595
  throw new Error(`All ${C.length} ${r} operation(s) failed: ${k}`);
5606
5596
  }
5607
5597
  return {
@@ -5659,8 +5649,8 @@ function Le({
5659
5649
  `;
5660
5650
  }
5661
5651
  return !r && o.length > 0 ? (c += `**Next steps:**
5662
- `, c += `• Use ${dc} with responsibleUser to see ${e === "unassign" ? "unassigned" : "newly assigned"} tasks
5663
- `, c += `• Use ${lc} for individual assignment changes
5652
+ `, c += `• Use ${uc} with responsibleUser to see ${e === "unassign" ? "unassigned" : "newly assigned"} tasks
5653
+ `, c += `• Use ${pc} for individual assignment changes
5664
5654
  `, n.length > 0 && (c += `• Check failed tasks and use ${Kt} to verify collaborator access
5665
5655
  `)) : r ? (c += `**To execute:**
5666
5656
  `, c += `• Remove dryRun parameter and run again to execute changes
@@ -5672,17 +5662,17 @@ function Le({
5672
5662
  `, c += `• Use dryRun=true to validate before executing
5673
5663
  `), c;
5674
5664
  }
5675
- const fc = {
5665
+ const gc = {
5676
5666
  action: s.enum(["archive", "unarchive"]).describe("The action to perform on the project."),
5677
5667
  projectId: s.string().min(1).describe("The ID of the project.")
5678
- }, bc = {
5668
+ }, yc = {
5679
5669
  project: re.describe("The updated project."),
5680
5670
  success: s.boolean().describe("Whether the action was successful.")
5681
- }, gc = {
5671
+ }, Tc = {
5682
5672
  name: g.PROJECT_MANAGEMENT,
5683
5673
  description: "Archive or unarchive a project by its ID.",
5684
- parameters: fc,
5685
- outputSchema: bc,
5674
+ parameters: gc,
5675
+ outputSchema: yc,
5686
5676
  annotations: { readOnlyHint: !1, destructiveHint: !1, idempotentHint: !0 },
5687
5677
  async execute(e, t) {
5688
5678
  const r = e.action === "archive" ? await t.archiveProject(e.projectId) : await t.unarchiveProject(e.projectId), o = se(r);
@@ -5694,7 +5684,7 @@ const fc = {
5694
5684
  }
5695
5685
  };
5696
5686
  }
5697
- }, yc = {
5687
+ }, kc = {
5698
5688
  action: s.enum(["move-to-workspace", "move-to-personal"]).describe("The action to perform on the project."),
5699
5689
  projectId: s.string().min(1).describe("The ID of the project to move."),
5700
5690
  workspaceId: s.string().min(1).optional().describe("The target workspace ID. Required when action is move-to-workspace."),
@@ -5702,14 +5692,14 @@ const fc = {
5702
5692
  visibility: s.enum(["restricted", "team", "public"]).optional().describe(
5703
5693
  "Optional access visibility for the project in the workspace (restricted, team, or public)."
5704
5694
  )
5705
- }, Tc = {
5695
+ }, wc = {
5706
5696
  project: re.describe("The moved project."),
5707
5697
  success: s.boolean().describe("Whether the move was successful.")
5708
- }, kc = {
5698
+ }, Ic = {
5709
5699
  name: g.PROJECT_MOVE,
5710
5700
  description: "Move a project between personal and workspace contexts.",
5711
- parameters: yc,
5712
- outputSchema: Tc,
5701
+ parameters: kc,
5702
+ outputSchema: wc,
5713
5703
  annotations: { readOnlyHint: !1, destructiveHint: !1, idempotentHint: !0 },
5714
5704
  async execute(e, t) {
5715
5705
  let r;
@@ -5732,7 +5722,7 @@ const fc = {
5732
5722
  }
5733
5723
  };
5734
5724
  }
5735
- }, Ws = ["project", "section"], wc = {
5725
+ }, Ws = ["project", "section"], vc = {
5736
5726
  type: s.enum(Ws).describe(
5737
5727
  'The type of entity to reorder. "project" reorders sibling projects within the same parent (and can move projects to a new parent). "section" reorders sections within the same project.'
5738
5728
  ),
@@ -5749,17 +5739,17 @@ const fc = {
5749
5739
  ).min(1).describe(
5750
5740
  "The items to reorder or move. Each item must have at least order or parentId. Items with parentId will be moved first, then items with order will be reordered. All items being reordered should be siblings for predictable results."
5751
5741
  )
5752
- }, vc = {
5742
+ }, Sc = {
5753
5743
  type: s.enum(Ws).describe("The type of entity that was reordered/moved."),
5754
5744
  movedCount: s.number().describe("The number of entities moved to a new parent."),
5755
5745
  reorderedCount: s.number().describe("The number of entities reordered."),
5756
5746
  affectedIds: s.array(s.string()).describe("The IDs of all affected entities."),
5757
5747
  success: s.boolean().describe("Whether the operation was successful.")
5758
- }, Ic = {
5748
+ }, Cc = {
5759
5749
  name: g.REORDER_OBJECTS,
5760
5750
  description: 'Reorder sibling projects or sections, and optionally move projects to a new parent. For projects: set order to reorder siblings, and/or set parentId to move under a new parent (use "root" for top level). For sections: set order to reorder within a project.',
5761
- parameters: wc,
5762
- outputSchema: vc,
5751
+ parameters: vc,
5752
+ outputSchema: Sc,
5763
5753
  annotations: { readOnlyHint: !1, destructiveHint: !1, idempotentHint: !0 },
5764
5754
  async execute(e, t) {
5765
5755
  const { type: r, items: o } = e, n = /* @__PURE__ */ new Set();
@@ -5821,22 +5811,22 @@ const fc = {
5821
5811
  }
5822
5812
  };
5823
5813
  }
5824
- }, Sc = s.object({
5814
+ }, jc = s.object({
5825
5815
  id: s.string().min(1).describe("The ID of the task to reschedule."),
5826
5816
  date: s.string().min(1).describe(
5827
5817
  "The new date for the task. Use YYYY-MM-DD for date-only, or YYYY-MM-DDTHH:MM:SS for datetime. If date-only is provided and the task already has a specific time, the existing time is preserved."
5828
5818
  )
5829
- }), Cc = {
5830
- tasks: s.array(Sc).min(1).describe("The tasks to reschedule with their new dates.")
5831
- }, jc = {
5819
+ }), $c = {
5820
+ tasks: s.array(jc).min(1).describe("The tasks to reschedule with their new dates.")
5821
+ }, Dc = {
5832
5822
  tasks: s.array(K).describe("The rescheduled tasks."),
5833
5823
  totalCount: s.number().describe("The total number of tasks rescheduled."),
5834
5824
  rescheduledTaskIds: s.array(s.string()).describe("The IDs of the rescheduled tasks.")
5835
- }, $c = {
5825
+ }, Ac = {
5836
5826
  name: g.RESCHEDULE_TASKS,
5837
5827
  description: "Reschedule tasks to new dates while preserving recurring schedules. Unlike update-tasks (which replaces the entire due string and can wipe recurrence), this tool changes only the date, keeping recurrence patterns intact. Use this when moving recurring tasks to a different date without altering their repeat pattern.",
5838
- parameters: Cc,
5839
- outputSchema: jc,
5828
+ parameters: $c,
5829
+ outputSchema: Dc,
5840
5830
  annotations: { readOnlyHint: !1, destructiveHint: !0, idempotentHint: !1 },
5841
5831
  async execute(e, t) {
5842
5832
  const { tasks: r } = e, n = (await Promise.all(
@@ -5849,7 +5839,7 @@ const fc = {
5849
5839
  throw new Error(
5850
5840
  `Task "${u.content}" (${u.id}) has no due date. Rescheduling requires an existing due date.`
5851
5841
  );
5852
- const l = Dc(d.date, u.due);
5842
+ const l = xc(d.date, u.due);
5853
5843
  return Q("item_update", {
5854
5844
  id: d.id,
5855
5845
  due: {
@@ -5880,16 +5870,16 @@ const fc = {
5880
5870
  };
5881
5871
  }
5882
5872
  };
5883
- function Dc(e, t) {
5873
+ function xc(e, t) {
5884
5874
  if (/^\d{4}-\d{2}-\d{2}$/.test(e) && t.datetime) {
5885
5875
  const o = t.datetime.substring(10);
5886
5876
  return e + o;
5887
5877
  }
5888
5878
  return e;
5889
5879
  }
5890
- const Ac = {
5880
+ const Ec = {
5891
5881
  query: s.string().min(1).describe("The search query string to find tasks and projects.")
5892
- }, xc = {
5882
+ }, Oc = {
5893
5883
  results: s.array(
5894
5884
  s.object({
5895
5885
  id: s.string().describe("The ID of the result."),
@@ -5898,11 +5888,11 @@ const Ac = {
5898
5888
  })
5899
5889
  ).describe("The search results."),
5900
5890
  totalCount: s.number().describe("Total number of results found.")
5901
- }, Ec = {
5891
+ }, _c = {
5902
5892
  name: g.SEARCH,
5903
5893
  description: "Search across tasks and projects in Todoist. Returns a list of relevant results with IDs, titles, and URLs.",
5904
- parameters: Ac,
5905
- outputSchema: xc,
5894
+ parameters: Ec,
5895
+ outputSchema: Oc,
5906
5896
  annotations: { readOnlyHint: !0, destructiveHint: !1, idempotentHint: !0 },
5907
5897
  async execute(e, t) {
5908
5898
  const { query: r } = e, [o, n] = await Promise.all([
@@ -5931,19 +5921,19 @@ const Ac = {
5931
5921
  structuredContent: { results: i, totalCount: i.length }
5932
5922
  };
5933
5923
  }
5934
- }, Oc = {
5924
+ }, Pc = {
5935
5925
  ids: s.array(s.string().min(1)).min(1).describe("The IDs of the tasks to uncomplete.")
5936
- }, _c = {
5926
+ }, Uc = {
5937
5927
  uncompleted: s.array(s.string()).describe("The IDs of successfully uncompleted tasks."),
5938
5928
  failures: s.array(oe).describe("Failed task uncompletion with error details."),
5939
5929
  totalRequested: s.number().describe("The total number of tasks requested to uncomplete."),
5940
5930
  successCount: s.number().describe("The number of successfully uncompleted tasks."),
5941
5931
  failureCount: s.number().describe("The number of failed task uncompletions.")
5942
- }, Pc = {
5932
+ }, Rc = {
5943
5933
  name: g.UNCOMPLETE_TASKS,
5944
5934
  description: "Uncomplete (reopen) one or more completed tasks by their IDs.",
5945
- parameters: Oc,
5946
- outputSchema: _c,
5935
+ parameters: Pc,
5936
+ outputSchema: Uc,
5947
5937
  annotations: { readOnlyHint: !1, destructiveHint: !1, idempotentHint: !1 },
5948
5938
  async execute(e, t) {
5949
5939
  const r = [], o = [];
@@ -5957,7 +5947,7 @@ const Ac = {
5957
5947
  });
5958
5948
  }
5959
5949
  return ne(g.UNCOMPLETE_TASKS, e.ids.length, o), {
5960
- textContent: Uc({
5950
+ textContent: Lc({
5961
5951
  uncompleted: r,
5962
5952
  failures: o,
5963
5953
  args: e
@@ -5972,7 +5962,7 @@ const Ac = {
5972
5962
  };
5973
5963
  }
5974
5964
  };
5975
- function Uc({
5965
+ function Lc({
5976
5966
  uncompleted: e,
5977
5967
  failures: t,
5978
5968
  args: r
@@ -5986,28 +5976,28 @@ function Uc({
5986
5976
  failures: t
5987
5977
  });
5988
5978
  }
5989
- const Rc = s.object({
5979
+ const Nc = s.object({
5990
5980
  id: s.string().min(1).describe("The ID of the comment to update."),
5991
5981
  content: s.string().min(1).describe("The new content for the comment.")
5992
- }), Lc = {
5993
- comments: s.array(Rc).min(1).describe("The comments to update.")
5994
- }, Nc = {
5995
- comments: s.array(ve).describe("The updated comments."),
5982
+ }), Mc = {
5983
+ comments: s.array(Nc).min(1).describe("The comments to update.")
5984
+ }, Fc = {
5985
+ comments: s.array(Ie).describe("The updated comments."),
5996
5986
  totalCount: s.number().describe("The total number of comments updated."),
5997
5987
  updatedCommentIds: s.array(s.string()).describe("The IDs of the updated comments."),
5998
5988
  appliedOperations: s.object({
5999
5989
  updateCount: s.number().describe("The number of comments updated.")
6000
5990
  }).describe("Summary of operations performed.")
6001
- }, Mc = {
5991
+ }, Hc = {
6002
5992
  name: g.UPDATE_COMMENTS,
6003
5993
  description: "Update multiple existing comments with new content.",
6004
- parameters: Lc,
6005
- outputSchema: Nc,
5994
+ parameters: Mc,
5995
+ outputSchema: Fc,
6006
5996
  annotations: { readOnlyHint: !1, destructiveHint: !0, idempotentHint: !1 },
6007
5997
  async execute(e, t) {
6008
5998
  const { comments: r } = e, o = r.map(async (c) => await t.updateComment(c.id, { content: c.content })), i = (await Promise.all(o)).map(we);
6009
5999
  return {
6010
- textContent: Fc({
6000
+ textContent: Wc({
6011
6001
  comments: i
6012
6002
  }),
6013
6003
  structuredContent: {
@@ -6021,7 +6011,7 @@ const Rc = s.object({
6021
6011
  };
6022
6012
  }
6023
6013
  };
6024
- function Fc({ comments: e }) {
6014
+ function Wc({ comments: e }) {
6025
6015
  const t = e.filter((i) => i.taskId).length, r = e.filter((i) => i.projectId).length, o = [];
6026
6016
  if (t > 0) {
6027
6017
  const i = t > 1 ? "comments" : "comment";
@@ -6033,7 +6023,7 @@ function Fc({ comments: e }) {
6033
6023
  }
6034
6024
  return o.length > 0 ? `Updated ${o.join(" and ")}` : "No comments updated";
6035
6025
  }
6036
- const Hc = s.object({
6026
+ const Bc = s.object({
6037
6027
  id: s.string().min(1).describe("The ID of the filter to update."),
6038
6028
  name: s.string().min(1).optional().describe("The new name of the filter."),
6039
6029
  query: s.string().min(1).optional().describe(
@@ -6048,9 +6038,9 @@ const Hc = s.object({
6048
6038
  ).optional(),
6049
6039
  color: fe,
6050
6040
  isFavorite: s.boolean().optional().describe("Whether to mark the filter as a favorite.")
6051
- }), Wc = {
6052
- filters: s.array(Hc).min(1).describe("The filters to update.")
6053
- }, Bc = {
6041
+ }), zc = {
6042
+ filters: s.array(Bc).min(1).describe("The filters to update.")
6043
+ }, Kc = {
6054
6044
  filters: s.array(pt).describe("The updated filters."),
6055
6045
  totalCount: s.number().describe("The total number of filters updated."),
6056
6046
  updatedFilterIds: s.array(s.string()).describe("The IDs of the updated filters."),
@@ -6058,15 +6048,15 @@ const Hc = s.object({
6058
6048
  updateCount: s.number().describe("The number of filters actually updated."),
6059
6049
  skippedCount: s.number().describe("The number of filters skipped (no changes).")
6060
6050
  }).describe("Summary of operations performed.")
6061
- }, zc = {
6051
+ }, Yc = {
6062
6052
  name: g.UPDATE_FILTERS,
6063
6053
  description: "Update one or more existing personal filters with new values.",
6064
- parameters: Wc,
6065
- outputSchema: Bc,
6054
+ parameters: zc,
6055
+ outputSchema: Kc,
6066
6056
  annotations: { readOnlyHint: !1, destructiveHint: !0, idempotentHint: !1 },
6067
6057
  async execute(e, t) {
6068
6058
  const { filters: r } = e, o = [], i = r.map((h) => {
6069
- const m = qc(h);
6059
+ const m = Gc(h);
6070
6060
  return m !== null ? { kind: "skipped", reason: m } : (o.push(h), { kind: "updated", filter: h });
6071
6061
  }).filter((h) => h.kind === "skipped").length;
6072
6062
  if (o.length === 0)
@@ -6100,7 +6090,7 @@ const Hc = s.object({
6100
6090
  itemOrder: h.itemOrder
6101
6091
  }));
6102
6092
  return {
6103
- textContent: Kc({ filters: l, skippedCount: i }),
6093
+ textContent: qc({ filters: l, skippedCount: i }),
6104
6094
  structuredContent: {
6105
6095
  filters: l,
6106
6096
  totalCount: l.length,
@@ -6113,7 +6103,7 @@ const Hc = s.object({
6113
6103
  };
6114
6104
  }
6115
6105
  };
6116
- function Kc({
6106
+ function qc({
6117
6107
  filters: e,
6118
6108
  skippedCount: t
6119
6109
  }) {
@@ -6127,52 +6117,52 @@ ${n}`;
6127
6117
  }
6128
6118
  return o;
6129
6119
  }
6130
- function qc({ id: e, ...t }) {
6120
+ function Gc({ id: e, ...t }) {
6131
6121
  return Object.values(t).every((o) => o === void 0) ? "no-fields" : null;
6132
6122
  }
6133
- const Gc = s.object({
6123
+ const Vc = s.object({
6134
6124
  labelType: s.literal("personal").describe("Update a personal label, identified by its ID."),
6135
6125
  id: s.string().min(1).describe("The ID of the personal label to update."),
6136
6126
  name: s.string().min(1).max(128).optional().describe("The new name of the label."),
6137
6127
  color: fe,
6138
6128
  order: s.number().int().optional().describe("The new position of the label in the label list."),
6139
6129
  isFavorite: s.boolean().optional().describe("Whether to mark the label as a favorite.")
6140
- }), Yc = s.object({
6130
+ }), Jc = s.object({
6141
6131
  labelType: s.literal("shared").describe(
6142
6132
  "Rename a shared label across all tasks. Shared labels are identified by name; only renaming is supported (no color, order, or favorite)."
6143
6133
  ),
6144
6134
  name: s.string().min(1).describe("The current name of the shared label."),
6145
6135
  newName: s.string().min(1).describe("The new name for the shared label.")
6146
- }), Vc = s.discriminatedUnion("labelType", [
6147
- Gc,
6148
- Yc
6149
- ]), Jc = {
6150
- labels: s.array(Vc).min(1).describe(
6136
+ }), Xc = s.discriminatedUnion("labelType", [
6137
+ Vc,
6138
+ Jc
6139
+ ]), Qc = {
6140
+ labels: s.array(Xc).min(1).describe(
6151
6141
  'The labels to update. Use labelType="personal" with an ID to update a personal label, or labelType="shared" with name+newName to rename a shared label.'
6152
6142
  )
6153
- }, Xc = s.object({
6143
+ }, Zc = s.object({
6154
6144
  name: s.string().describe("The previous name of the shared label."),
6155
6145
  newName: s.string().describe("The new name of the shared label.")
6156
- }), Qc = {
6146
+ }), ed = {
6157
6147
  updatedLabels: s.array(ge).describe("The updated personal labels."),
6158
- renamedSharedLabels: s.array(Xc).describe("The shared labels that were renamed."),
6148
+ renamedSharedLabels: s.array(Zc).describe("The shared labels that were renamed."),
6159
6149
  totalCount: s.number().describe("The total number of successful operations (personal + shared)."),
6160
6150
  appliedOperations: s.object({
6161
6151
  updateCount: s.number().describe("Number of personal labels updated."),
6162
6152
  renameCount: s.number().describe("Number of shared labels renamed."),
6163
6153
  skippedCount: s.number().describe("Number of operations skipped (no changes or shared label not found).")
6164
6154
  }).describe("Summary of operations performed.")
6165
- }, Zc = {
6155
+ }, td = {
6166
6156
  name: g.UPDATE_LABELS,
6167
6157
  description: "Update one or more existing labels. Personal labels (identified by ID) can have their name, color, order, and favorite flag updated. Shared labels (identified by name) can only be renamed.",
6168
- parameters: Jc,
6169
- outputSchema: Qc,
6158
+ parameters: Qc,
6159
+ outputSchema: ed,
6170
6160
  annotations: { readOnlyHint: !1, destructiveHint: !0, idempotentHint: !1 },
6171
6161
  async execute(e, t) {
6172
6162
  const { labels: r } = e, o = await Promise.all(
6173
6163
  r.map(async (l) => {
6174
6164
  if (l.labelType === "personal") {
6175
- const h = td(l);
6165
+ const h = rd(l);
6176
6166
  if (h !== null) return { kind: "skipped", reason: h };
6177
6167
  const { id: m, labelType: y, ...f } = l;
6178
6168
  return { kind: "updated", label: await t.updateLabel(m, f) };
@@ -6190,7 +6180,7 @@ const Gc = s.object({
6190
6180
  (l) => l.kind === "skipped" && l.reason === "not-found"
6191
6181
  ).length;
6192
6182
  return {
6193
- textContent: ed({
6183
+ textContent: sd({
6194
6184
  updatedLabels: n,
6195
6185
  renamedSharedLabels: i,
6196
6186
  skippedNoFields: c,
@@ -6209,7 +6199,7 @@ const Gc = s.object({
6209
6199
  };
6210
6200
  }
6211
6201
  };
6212
- function ed({
6202
+ function sd({
6213
6203
  updatedLabels: e,
6214
6204
  renamedSharedLabels: t,
6215
6205
  skippedNoFields: r,
@@ -6231,14 +6221,14 @@ function ed({
6231
6221
  return c.join(`
6232
6222
  `);
6233
6223
  }
6234
- function td({
6224
+ function rd({
6235
6225
  id: e,
6236
6226
  labelType: t,
6237
6227
  ...r
6238
6228
  }) {
6239
6229
  return Object.values(r).every((n) => n === void 0) ? "no-fields" : null;
6240
6230
  }
6241
- const sd = s.object({
6231
+ const od = s.object({
6242
6232
  id: s.string().min(1).describe("The ID of the project to update."),
6243
6233
  name: s.string().min(1).optional().describe("The new name of the project."),
6244
6234
  isFavorite: s.boolean().optional().describe("Whether the project is a favorite."),
@@ -6253,9 +6243,9 @@ const sd = s.object({
6253
6243
  )
6254
6244
  ).optional(),
6255
6245
  color: fe
6256
- }), rd = {
6257
- projects: s.array(sd).min(1).describe("The projects to update.")
6258
- }, od = {
6246
+ }), nd = {
6247
+ projects: s.array(od).min(1).describe("The projects to update.")
6248
+ }, id = {
6259
6249
  projects: s.array(re).describe("The updated projects."),
6260
6250
  totalCount: s.number().describe("The total number of projects updated."),
6261
6251
  updatedProjectIds: s.array(s.string()).describe("The IDs of the updated projects."),
@@ -6267,16 +6257,16 @@ const sd = s.object({
6267
6257
  skippedCount: s.number().describe("The number of projects skipped (no changes)."),
6268
6258
  failureCount: s.number().describe("The number of projects that failed to update.")
6269
6259
  }).describe("Summary of operations performed.")
6270
- }, nd = {
6260
+ }, ad = {
6271
6261
  name: g.UPDATE_PROJECTS,
6272
6262
  description: "Update multiple existing projects with new values.",
6273
- parameters: rd,
6274
- outputSchema: od,
6263
+ parameters: nd,
6264
+ outputSchema: id,
6275
6265
  annotations: { readOnlyHint: !1, destructiveHint: !0, idempotentHint: !1 },
6276
6266
  async execute(e, t) {
6277
6267
  const { projects: r } = e, o = await Promise.allSettled(
6278
6268
  r.map(async (u) => {
6279
- const l = ad(u);
6269
+ const l = dd(u);
6280
6270
  if (l !== null) return { kind: "skipped", reason: l };
6281
6271
  const { id: p, ...h } = u;
6282
6272
  return { kind: "updated", project: await P(() => t.updateProject(p, h)) };
@@ -6294,7 +6284,7 @@ const sd = s.object({
6294
6284
  l.value.kind === "updated" ? n.push(se(l.value.project)) : l.value.reason === "no-fields" ? a++ : c++;
6295
6285
  }
6296
6286
  return ne(g.UPDATE_PROJECTS, r.length, i), {
6297
- textContent: id({
6287
+ textContent: cd({
6298
6288
  projects: n,
6299
6289
  skippedNoFields: a,
6300
6290
  skippedNoValidValues: c,
@@ -6314,7 +6304,7 @@ const sd = s.object({
6314
6304
  };
6315
6305
  }
6316
6306
  };
6317
- function id({
6307
+ function cd({
6318
6308
  projects: e,
6319
6309
  skippedNoFields: t,
6320
6310
  skippedNoValidValues: r,
@@ -6327,23 +6317,23 @@ function id({
6327
6317
  return t > 0 && c.push(`${t} skipped - no changes`), r > 0 && c.push(`${r} skipped - no valid field values`), c.length > 0 && (a += ` (${c.join(", ")})`), n > 0 && (a += `:
6328
6318
  ${i}`), ft(a, o);
6329
6319
  }
6330
- function ad({ id: e, ...t }) {
6320
+ function dd({ id: e, ...t }) {
6331
6321
  const r = Object.values(t);
6332
6322
  return r.length === 0 ? "no-fields" : r.every((o) => o === void 0) ? "no-valid-values" : null;
6333
6323
  }
6334
- const cd = s.object({
6324
+ const ld = s.object({
6335
6325
  type: s.literal("relative"),
6336
6326
  id: s.string().min(1).describe("The ID of the relative reminder to update."),
6337
6327
  minuteOffset: s.number().int().min(0).optional().describe("New minute offset before task due time."),
6338
6328
  service: Ee.optional().describe('New delivery method: "email" or "push".'),
6339
6329
  isUrgent: Oe
6340
- }), dd = s.object({
6330
+ }), ud = s.object({
6341
6331
  type: s.literal("absolute"),
6342
6332
  id: s.string().min(1).describe("The ID of the absolute reminder to update."),
6343
6333
  due: $s.optional().describe("New due date/time for the reminder."),
6344
6334
  service: Ee.optional().describe('New delivery method: "email" or "push".'),
6345
6335
  isUrgent: Oe
6346
- }), ld = s.object({
6336
+ }), pd = s.object({
6347
6337
  type: s.literal("location"),
6348
6338
  id: s.string().min(1).describe("The ID of the location reminder to update."),
6349
6339
  name: s.string().optional().describe("New location name."),
@@ -6353,23 +6343,23 @@ const cd = s.object({
6353
6343
  'New trigger condition: "on_enter" or "on_leave".'
6354
6344
  ),
6355
6345
  radius: s.number().int().optional().describe("New radius in meters.")
6356
- }), ud = s.discriminatedUnion("type", [
6357
- cd,
6358
- dd,
6359
- ld
6360
- ]), pd = {
6361
- reminders: s.array(ud).min(1).max(je).describe(
6346
+ }), hd = s.discriminatedUnion("type", [
6347
+ ld,
6348
+ ud,
6349
+ pd
6350
+ ]), md = {
6351
+ reminders: s.array(hd).min(1).max(je).describe(
6362
6352
  `Array of reminders to update (max ${je}). Each must include the reminder type and ID. Only include fields that need to change.`
6363
6353
  )
6364
- }, hd = {
6354
+ }, fd = {
6365
6355
  reminders: s.array(ut).describe("The updated reminders."),
6366
6356
  totalCount: s.number().describe("Total reminders updated."),
6367
6357
  updatedReminderIds: s.array(s.string()).describe("IDs of updated reminders.")
6368
- }, md = {
6358
+ }, bd = {
6369
6359
  name: g.UPDATE_REMINDERS,
6370
6360
  description: 'Update existing reminders. Each reminder must specify its type ("relative", "absolute", or "location") and ID. Only include fields that need to change.',
6371
- parameters: pd,
6372
- outputSchema: hd,
6361
+ parameters: md,
6362
+ outputSchema: fd,
6373
6363
  annotations: { readOnlyHint: !1, destructiveHint: !0, idempotentHint: !0 },
6374
6364
  async execute(e, t) {
6375
6365
  const { reminders: r } = e, o = r.map(async (d) => {
@@ -6403,7 +6393,7 @@ const cd = s.object({
6403
6393
  }
6404
6394
  };
6405
6395
  }
6406
- }, fd = s.object({
6396
+ }, gd = s.object({
6407
6397
  id: s.string().min(1).describe("The ID of the section to update."),
6408
6398
  name: s.string().min(1).optional().describe("The new name of the section."),
6409
6399
  description: s.preprocess(
@@ -6418,17 +6408,17 @@ const cd = s.object({
6418
6408
  ).optional()
6419
6409
  }).refine((e) => e.name !== void 0 || e.description !== void 0, {
6420
6410
  message: 'Provide at least one of "name" or "description" to update.'
6421
- }), bd = {
6422
- sections: s.array(fd).min(1).describe("The sections to update.")
6423
- }, gd = {
6424
- sections: s.array(G).describe("The updated sections."),
6411
+ }), yd = {
6412
+ sections: s.array(gd).min(1).describe("The sections to update.")
6413
+ }, Td = {
6414
+ sections: s.array(q).describe("The updated sections."),
6425
6415
  totalCount: s.number().describe("The total number of sections updated."),
6426
6416
  updatedSectionIds: s.array(s.string()).describe("The IDs of the updated sections.")
6427
- }, yd = {
6417
+ }, kd = {
6428
6418
  name: g.UPDATE_SECTIONS,
6429
6419
  description: "Update multiple existing sections with new values.",
6430
- parameters: bd,
6431
- outputSchema: gd,
6420
+ parameters: yd,
6421
+ outputSchema: Td,
6432
6422
  annotations: { readOnlyHint: !1, destructiveHint: !0, idempotentHint: !1 },
6433
6423
  async execute({ sections: e }, t) {
6434
6424
  const r = await Promise.all(
@@ -6441,18 +6431,18 @@ const cd = s.object({
6441
6431
  })
6442
6432
  );
6443
6433
  return {
6444
- textContent: Td({
6434
+ textContent: wd({
6445
6435
  sections: r
6446
6436
  }),
6447
6437
  structuredContent: {
6448
- sections: r.map(Y),
6438
+ sections: r.map(G),
6449
6439
  totalCount: r.length,
6450
6440
  updatedSectionIds: r.map((n) => n.id)
6451
6441
  }
6452
6442
  };
6453
6443
  }
6454
6444
  };
6455
- function Td({ sections: e }) {
6445
+ function wd({ sections: e }) {
6456
6446
  const t = e.length, r = e.map((n) => `• ${n.name} (id=${n.id}, projectId=${n.projectId})`).join(`
6457
6447
  `);
6458
6448
  return `Updated ${t} section${t === 1 ? "" : "s"}:
@@ -6461,27 +6451,27 @@ ${r}`;
6461
6451
  function Bs(e, t) {
6462
6452
  return t.projectId !== void 0 ? e.projectId === t.projectId && !e.sectionId && !e.parentId : t.sectionId !== void 0 ? e.sectionId === t.sectionId && !e.parentId : e.parentId === t.parentId;
6463
6453
  }
6464
- function kd(e, t) {
6454
+ function Id(e, t) {
6465
6455
  return t.projectId !== void 0 ? e.projectId === t.projectId : t.sectionId !== void 0 ? e.sectionId === t.sectionId : e.parentId === t.parentId;
6466
6456
  }
6467
- function wd(e) {
6457
+ function vd(e) {
6468
6458
  return e.projectId !== void 0 ? `project:${e.projectId}` : e.sectionId !== void 0 ? `section:${e.sectionId}` : `parent:${e.parentId}`;
6469
6459
  }
6470
- function vd(e) {
6460
+ function Sd(e) {
6471
6461
  const t = [];
6472
6462
  return e.projectId && t.push({ projectId: e.projectId }), e.sectionId && t.push({ sectionId: e.sectionId }), e.parentId && t.push({ parentId: e.parentId }), t;
6473
6463
  }
6474
- function Id({
6464
+ function Cd({
6475
6465
  taskId: e,
6476
6466
  request: t,
6477
6467
  current: r
6478
6468
  }) {
6479
- const o = vd(t);
6469
+ const o = Sd(t);
6480
6470
  if (o.length === 0)
6481
6471
  return { redundantMoveSkipped: !1 };
6482
6472
  let n = o, i = !1;
6483
6473
  if (r) {
6484
- const a = o.length === 1 ? (c) => Bs(r, c) : (c) => kd(r, c);
6474
+ const a = o.length === 1 ? (c) => Bs(r, c) : (c) => Id(r, c);
6485
6475
  n = o.filter((c) => !a(c)), i = n.length < o.length;
6486
6476
  }
6487
6477
  if (n.length === 0)
@@ -6492,7 +6482,7 @@ function Id({
6492
6482
  );
6493
6483
  return { move: n[0], redundantMoveSkipped: i };
6494
6484
  }
6495
- const Sd = s.object({
6485
+ const jd = s.object({
6496
6486
  id: s.string().min(1).describe("The ID of the task to update."),
6497
6487
  content: s.string().optional().describe(
6498
6488
  'The new task name/title. Should be concise and actionable (e.g., "Review PR #123", "Call dentist"). For longer content, use the description field instead. Supports Markdown.'
@@ -6535,9 +6525,9 @@ const Sd = s.object({
6535
6525
  isUncompletable: s.boolean().optional().describe(
6536
6526
  "Whether this task should be uncompletable (organizational header). Tasks with isUncompletable: true appear as organizational headers and cannot be completed."
6537
6527
  )
6538
- }), Cd = (e) => !!(e.projectId || e.sectionId || e.parentId), zs = (e) => Object.keys(e).length > 0, jd = ["remove", "no date"], $d = ["remove", "no date", "no deadline"], Dd = "no date", tt = ns.TASKS_PER_OPERATION, qt = {
6539
- tasks: s.array(Sd).min(1).max(tt).describe(`The tasks to update (max ${tt}).`)
6540
- }, Ad = {
6528
+ }), $d = (e) => !!(e.projectId || e.sectionId || e.parentId), zs = (e) => Object.keys(e).length > 0, Dd = ["remove", "no date"], Ad = ["remove", "no date", "no deadline"], xd = "no date", tt = ns.TASKS_PER_OPERATION, Yt = {
6529
+ tasks: s.array(jd).min(1).max(tt).describe(`The tasks to update (max ${tt}).`)
6530
+ }, Ed = {
6541
6531
  tasks: s.array(K).describe("The updated tasks."),
6542
6532
  totalCount: s.number().describe("The total number of tasks updated."),
6543
6533
  updatedTaskIds: s.array(s.string()).describe("The IDs of the updated tasks."),
@@ -6552,22 +6542,22 @@ const Sd = s.object({
6552
6542
  "Moves not performed because the task was already in the requested destination. A non-zero count means container fields were sent that did not need to be."
6553
6543
  )
6554
6544
  }).describe("Summary of operations performed.")
6555
- }, xd = {
6545
+ }, Od = {
6556
6546
  name: g.UPDATE_TASKS,
6557
6547
  description: "Update existing tasks including content, dates, priorities, and assignments. Send only the fields that change.",
6558
- parameters: qt,
6559
- outputSchema: Ad,
6548
+ parameters: Yt,
6549
+ outputSchema: Ed,
6560
6550
  annotations: { readOnlyHint: !1, destructiveHint: !0, idempotentHint: !1 },
6561
6551
  async execute(e, t) {
6562
- const { tasks: r } = s.object(qt).parse(e), o = r.map(() => ({ kind: "skipped" })), n = (w, b) => {
6552
+ const { tasks: r } = s.object(Yt).parse(e), o = r.map(() => ({ kind: "skipped" })), n = (w, b) => {
6563
6553
  o[w] = { kind: "failed", error: b };
6564
6554
  }, i = (w, b) => {
6565
6555
  n(w, N(b));
6566
- }, a = r.map((w, b) => ({ task: w, index: b })).filter(({ task: w }) => Md(w)), c = await Od(
6556
+ }, a = r.map((w, b) => ({ task: w, index: b })).filter(({ task: w }) => Hd(w)), c = await Pd(
6567
6557
  a.map(({ task: w }) => w),
6568
6558
  t
6569
6559
  ), d = await Promise.allSettled(
6570
- a.map(({ task: w, index: b }) => Rd({ task: w, index: b, client: t, inbox: c }))
6560
+ a.map(({ task: w, index: b }) => Nd({ task: w, index: b, client: t, inbox: c }))
6571
6561
  ), u = [];
6572
6562
  for (const [w, b] of d.entries()) {
6573
6563
  const S = a[w]?.index ?? w;
@@ -6577,13 +6567,13 @@ const Sd = s.object({
6577
6567
  client: t,
6578
6568
  ids: [
6579
6569
  ...new Set(
6580
- u.filter((w) => Cd(w.moveRequest)).map((w) => w.id)
6570
+ u.filter((w) => $d(w.moveRequest)).map((w) => w.id)
6581
6571
  )
6582
6572
  ]
6583
6573
  }), p = [];
6584
6574
  for (const w of u)
6585
6575
  try {
6586
- const b = Id({
6576
+ const b = Cd({
6587
6577
  taskId: w.id,
6588
6578
  request: w.moveRequest,
6589
6579
  current: l.get(w.id)
@@ -6595,7 +6585,7 @@ const Sd = s.object({
6595
6585
  const h = /* @__PURE__ */ new Map(), m = [], y = (w) => {
6596
6586
  const b = w.filter((S) => !S.failed);
6597
6587
  b.length !== 0 && m.push(
6598
- Ud({
6588
+ Ld({
6599
6589
  client: t,
6600
6590
  items: b,
6601
6591
  onUpdated: (S, D) => {
@@ -6616,7 +6606,7 @@ const Sd = s.object({
6616
6606
  })
6617
6607
  );
6618
6608
  }, f = new Set(p.map(({ item: w }) => w.index));
6619
- y(u.filter((w) => !f.has(w.index))), await _d({
6609
+ y(u.filter((w) => !f.has(w.index))), await Ud({
6620
6610
  client: t,
6621
6611
  moving: p,
6622
6612
  results: h,
@@ -6639,21 +6629,21 @@ const Sd = s.object({
6639
6629
  const b = h.get(w.index);
6640
6630
  b && "task" in b && (o[w.index] = { kind: "updated", task: b.task });
6641
6631
  }
6642
- const { updatedTasks: T, failures: C, skippedCount: A } = Ed({ tasks: r, outcomes: o }), k = u.filter((w) => w.redundantMoveSkipped).length, I = T.map(U);
6632
+ const { updatedTasks: T, failures: C, skippedCount: A } = _d({ tasks: r, outcomes: o }), k = u.filter((w) => w.redundantMoveSkipped).length, v = T.map(U);
6643
6633
  return ne(g.UPDATE_TASKS, r.length, C), {
6644
- textContent: Nd({
6645
- tasks: I,
6634
+ textContent: Fd({
6635
+ tasks: v,
6646
6636
  failures: C,
6647
6637
  skippedCount: A,
6648
6638
  redundantMovesSkipped: k
6649
6639
  }),
6650
6640
  structuredContent: {
6651
- tasks: I,
6652
- totalCount: I.length,
6641
+ tasks: v,
6642
+ totalCount: v.length,
6653
6643
  updatedTaskIds: T.map((w) => w.id),
6654
6644
  failures: C,
6655
6645
  appliedOperations: {
6656
- updateCount: I.length,
6646
+ updateCount: v.length,
6657
6647
  skippedCount: A,
6658
6648
  failureCount: C.length,
6659
6649
  redundantMovesSkipped: k
@@ -6662,7 +6652,7 @@ const Sd = s.object({
6662
6652
  };
6663
6653
  }
6664
6654
  };
6665
- function Ed({ tasks: e, outcomes: t }) {
6655
+ function _d({ tasks: e, outcomes: t }) {
6666
6656
  const r = [], o = [];
6667
6657
  let n = 0;
6668
6658
  for (const [i, a] of t.entries()) {
@@ -6679,7 +6669,7 @@ function Ed({ tasks: e, outcomes: t }) {
6679
6669
  }
6680
6670
  return { updatedTasks: r, failures: o, skippedCount: n };
6681
6671
  }
6682
- async function Od(e, t) {
6672
+ async function Pd(e, t) {
6683
6673
  if (!e.some((r) => B(r.projectId)))
6684
6674
  return {};
6685
6675
  try {
@@ -6706,7 +6696,7 @@ async function Ks({
6706
6696
  }
6707
6697
  return r;
6708
6698
  }
6709
- async function _d({
6699
+ async function Ud({
6710
6700
  client: e,
6711
6701
  moving: t,
6712
6702
  results: r,
@@ -6716,10 +6706,10 @@ async function _d({
6716
6706
  return;
6717
6707
  const n = /* @__PURE__ */ new Map();
6718
6708
  for (const c of t) {
6719
- const d = wd(c.move), u = n.get(d);
6709
+ const d = vd(c.move), u = n.get(d);
6720
6710
  u ? u.push(c) : n.set(d, [c]);
6721
6711
  }
6722
- const i = Lr(e), a = [];
6712
+ const i = Mr(e), a = [];
6723
6713
  for (const c of n.values()) {
6724
6714
  const d = [...new Set(c.map(({ item: p }) => p.id))], u = c[0]?.move, l = c.length === 1 ? c[0] : void 0;
6725
6715
  try {
@@ -6747,12 +6737,12 @@ async function _d({
6747
6737
  }
6748
6738
  }
6749
6739
  if (a.length > 0) {
6750
- await Pd({ client: e, unresolved: a, results: r });
6740
+ await Rd({ client: e, unresolved: a, results: r });
6751
6741
  for (const { group: c } of a)
6752
6742
  o(c);
6753
6743
  }
6754
6744
  }
6755
- async function Pd({
6745
+ async function Rd({
6756
6746
  client: e,
6757
6747
  unresolved: t,
6758
6748
  results: r
@@ -6770,13 +6760,13 @@ async function Pd({
6770
6760
  }
6771
6761
  }
6772
6762
  }
6773
- async function Ud({
6763
+ async function Ld({
6774
6764
  client: e,
6775
6765
  items: t,
6776
6766
  onUpdated: r,
6777
6767
  onFailed: o
6778
6768
  }) {
6779
- const n = Nr(e);
6769
+ const n = Fr(e);
6780
6770
  await Promise.all(
6781
6771
  t.filter((i) => zs(i.updateArgs)).map(async (i) => {
6782
6772
  try {
@@ -6790,7 +6780,7 @@ async function Ud({
6790
6780
  })
6791
6781
  );
6792
6782
  }
6793
- async function Rd({
6783
+ async function Nd({
6794
6784
  task: e,
6795
6785
  index: t,
6796
6786
  client: r,
@@ -6817,27 +6807,27 @@ async function Rd({
6817
6807
  ...h !== void 0 && { labels: h }
6818
6808
  };
6819
6809
  p && (T.priority = fs(p));
6820
- const C = Gt(
6810
+ const C = qt(
6821
6811
  d,
6822
- jd,
6823
- Dd
6812
+ Dd,
6813
+ xd
6824
6814
  );
6825
6815
  C !== void 0 && (T = { ...T, dueString: C });
6826
- const A = Gt(m, $d, null);
6816
+ const A = qt(m, Ad, null);
6827
6817
  if (A !== void 0 && (T = { ...T, deadlineDate: A }), u)
6828
6818
  try {
6829
- const { amount: k, unit: I } = ms(u);
6819
+ const { amount: k, unit: v } = ms(u);
6830
6820
  T = {
6831
6821
  ...T,
6832
6822
  duration: k,
6833
- durationUnit: I
6823
+ durationUnit: v
6834
6824
  };
6835
6825
  } catch (k) {
6836
6826
  throw k instanceof x ? new Error(`Task ${n}: ${k.message}`) : k;
6837
6827
  }
6838
6828
  return l !== void 0 && (T = {
6839
6829
  ...T,
6840
- assigneeId: await Ld(r, n, l)
6830
+ assigneeId: await Md(r, n, l)
6841
6831
  }), {
6842
6832
  index: t,
6843
6833
  id: n,
@@ -6851,7 +6841,7 @@ async function Rd({
6851
6841
  failed: !1
6852
6842
  };
6853
6843
  }
6854
- async function Ld(e, t, r) {
6844
+ async function Md(e, t, r) {
6855
6845
  if (r === null || r === "unassign")
6856
6846
  return null;
6857
6847
  const o = await bt.validateTaskUpdateAssignment(
@@ -6865,7 +6855,7 @@ async function Ld(e, t, r) {
6865
6855
  }
6866
6856
  return o.resolvedUser?.userId;
6867
6857
  }
6868
- function Nd({
6858
+ function Fd({
6869
6859
  tasks: e,
6870
6860
  failures: t,
6871
6861
  skippedCount: r,
@@ -6886,10 +6876,10 @@ function Nd({
6886
6876
  Failed (${t.length}) - address or drop these items:
6887
6877
  ${u}${l}`;
6888
6878
  }
6889
- function Md({ id: e, ...t }) {
6879
+ function Hd({ id: e, ...t }) {
6890
6880
  return Object.keys(t).length > 0;
6891
6881
  }
6892
- function Gt(e, t, r) {
6882
+ function qt(e, t, r) {
6893
6883
  if (e === void 0)
6894
6884
  return e;
6895
6885
  if (e === null)
@@ -6897,7 +6887,7 @@ function Gt(e, t, r) {
6897
6887
  const o = e.trim().toLowerCase();
6898
6888
  return t.includes(o) ? r : e;
6899
6889
  }
6900
- const Fd = {}, Hd = {
6890
+ const Wd = {}, Bd = {
6901
6891
  type: s.literal("user_info").describe("The type of the response."),
6902
6892
  userId: s.string().describe("The user ID."),
6903
6893
  fullName: s.string().describe("The full name of the user."),
@@ -6914,36 +6904,36 @@ const Fd = {}, Hd = {
6914
6904
  email: s.string().describe("The email address of the user."),
6915
6905
  plan: s.enum(["Todoist Free", "Todoist Pro", "Todoist Business"]).describe("The user plan.")
6916
6906
  };
6917
- function Wd(e) {
6907
+ function zd(e) {
6918
6908
  return e.businessAccountId ? "Todoist Business" : e.isPremium ? "Todoist Pro" : "Todoist Free";
6919
6909
  }
6920
- function Bd(e, t) {
6910
+ function Kd(e, t) {
6921
6911
  const o = ((e.getDay() || 7) - t + 7) % 7, n = new Date(e);
6922
6912
  return n.setDate(e.getDate() - o), n;
6923
6913
  }
6924
- function zd(e) {
6914
+ function Yd(e) {
6925
6915
  const t = new Date(e);
6926
6916
  return t.setDate(e.getDate() + 6), t;
6927
6917
  }
6928
- function Kd(e) {
6918
+ function qd(e) {
6929
6919
  const t = new Date(e.getFullYear(), 0, 1), r = (e.getTime() - t.getTime()) / 864e5;
6930
6920
  return Math.ceil((r + t.getDay() + 1) / 7);
6931
6921
  }
6932
- function qd(e) {
6922
+ function Gd(e) {
6933
6923
  return ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"][e === 7 ? 0 : e] ?? "Unknown";
6934
6924
  }
6935
- function Gd(e) {
6925
+ function Vd(e) {
6936
6926
  try {
6937
6927
  return new Intl.DateTimeFormat("en-US", { timeZone: e }), !0;
6938
6928
  } catch {
6939
6929
  return !1;
6940
6930
  }
6941
6931
  }
6942
- function qs(e) {
6943
- return Gd(e) ? e : "UTC";
6932
+ function Ys(e) {
6933
+ return Vd(e) ? e : "UTC";
6944
6934
  }
6945
- function Yd(e, t) {
6946
- const r = qs(t);
6935
+ function Jd(e, t) {
6936
+ const r = Ys(t);
6947
6937
  return e.toLocaleString("en-US", {
6948
6938
  timeZone: r,
6949
6939
  year: "numeric",
@@ -6955,8 +6945,8 @@ function Yd(e, t) {
6955
6945
  hour12: !1
6956
6946
  });
6957
6947
  }
6958
- async function Vd(e) {
6959
- const t = await e.getUser(), r = t.tzInfo?.timezone ?? "UTC", o = qs(r), n = /* @__PURE__ */ new Date(), i = Yd(n, o), a = t.startDay ?? 1, c = qd(a), d = Wd(t), u = new Date(n.toLocaleString("en-US", { timeZone: o })), l = Bd(u, a), p = zd(l), h = Kd(u), y = [
6948
+ async function Xd(e) {
6949
+ const t = await e.getUser(), r = t.tzInfo?.timezone ?? "UTC", o = Ys(r), n = /* @__PURE__ */ new Date(), i = Jd(n, o), a = t.startDay ?? 1, c = Gd(a), d = zd(t), u = new Date(n.toLocaleString("en-US", { timeZone: o })), l = Kd(u, a), p = Yd(l), h = qd(u), y = [
6960
6950
  "# User Information",
6961
6951
  "",
6962
6952
  `**User ID:** ${t.id}`,
@@ -6998,26 +6988,26 @@ async function Vd(e) {
6998
6988
  };
6999
6989
  return { textContent: y, structuredContent: f };
7000
6990
  }
7001
- const Jd = {
6991
+ const Qd = {
7002
6992
  name: g.USER_INFO,
7003
6993
  description: "Get comprehensive user information including user ID, full name, email, timezone with current local time, week start day preferences, current week dates, daily/weekly goal progress, and user plan (Free/Pro/Business).",
7004
- parameters: Fd,
7005
- outputSchema: Hd,
6994
+ parameters: Wd,
6995
+ outputSchema: Bd,
7006
6996
  annotations: { readOnlyHint: !0, destructiveHint: !1, idempotentHint: !0 },
7007
6997
  async execute(e, t) {
7008
- const r = await Vd(t);
6998
+ const r = await Xd(t);
7009
6999
  return {
7010
7000
  textContent: r.textContent,
7011
7001
  structuredContent: r.structuredContent
7012
7002
  };
7013
7003
  }
7014
- }, Yt = 10 * 1024 * 1024, Xd = /* @__PURE__ */ new Set([
7004
+ }, Gt = 10 * 1024 * 1024, Zd = /* @__PURE__ */ new Set([
7015
7005
  "image/png",
7016
7006
  "image/jpeg",
7017
7007
  "image/gif",
7018
7008
  "image/webp",
7019
7009
  "image/svg+xml"
7020
- ]), Qd = /* @__PURE__ */ new Set([
7010
+ ]), el = /* @__PURE__ */ new Set([
7021
7011
  "text/plain",
7022
7012
  "text/csv",
7023
7013
  "text/html",
@@ -7025,7 +7015,7 @@ const Jd = {
7025
7015
  "application/json",
7026
7016
  "application/xml",
7027
7017
  "text/xml"
7028
- ]), Zd = {
7018
+ ]), tl = {
7029
7019
  ".png": "image/png",
7030
7020
  ".jpg": "image/jpeg",
7031
7021
  ".jpeg": "image/jpeg",
@@ -7040,23 +7030,23 @@ const Jd = {
7040
7030
  ".xml": "application/xml",
7041
7031
  ".pdf": "application/pdf"
7042
7032
  };
7043
- function el(e) {
7044
- return Xd.has(e) ? "image" : Qd.has(e) || e.startsWith("text/") ? "text" : "binary";
7033
+ function sl(e) {
7034
+ return Zd.has(e) ? "image" : el.has(e) || e.startsWith("text/") ? "text" : "binary";
7045
7035
  }
7046
- function tl(e) {
7036
+ function rl(e) {
7047
7037
  return (e.split(";")[0] ?? e).trim().toLowerCase();
7048
7038
  }
7049
- function sl(e) {
7039
+ function ol(e) {
7050
7040
  try {
7051
7041
  const t = new URL(e).pathname, r = t.lastIndexOf(".");
7052
7042
  if (r === -1) return;
7053
7043
  const o = t.slice(r).toLowerCase();
7054
- return Zd[o];
7044
+ return tl[o];
7055
7045
  } catch {
7056
7046
  return;
7057
7047
  }
7058
7048
  }
7059
- function rl(e) {
7049
+ function nl(e) {
7060
7050
  try {
7061
7051
  const t = new URL(e).pathname, r = t.lastIndexOf("/");
7062
7052
  return r === -1 ? void 0 : t.slice(r + 1) || void 0;
@@ -7064,31 +7054,31 @@ function rl(e) {
7064
7054
  return;
7065
7055
  }
7066
7056
  }
7067
- const ol = {
7057
+ const il = {
7068
7058
  fileUrl: s.url().describe(
7069
7059
  "The URL of the attachment file to view. Get this from the fileUrl field in a comment's fileAttachment."
7070
7060
  )
7071
- }, nl = {
7061
+ }, al = {
7072
7062
  name: g.VIEW_ATTACHMENT,
7073
7063
  description: "View a file attachment from a Todoist comment. Pass the fileUrl from a comment's fileAttachment field. Supports images (returned inline), text files (returned as text), and binary files like PDFs (returned as embedded resources).",
7074
- parameters: ol,
7064
+ parameters: il,
7075
7065
  annotations: {
7076
7066
  readOnlyHint: !0,
7077
7067
  destructiveHint: !1,
7078
7068
  idempotentHint: !0
7079
7069
  },
7080
7070
  async execute({ fileUrl: e }, t) {
7081
- const r = await t.viewAttachment(e), o = r.headers["content-length"], n = o ? Number.parseInt(o, 10) : void 0, i = rl(e), a = r.headers["content-type"], c = a ? tl(a) : void 0, d = c && c !== "application/octet-stream" ? c : sl(e) ?? c ?? "application/octet-stream";
7082
- if (n && n > Yt)
7071
+ const r = await t.viewAttachment(e), o = r.headers["content-length"], n = o ? Number.parseInt(o, 10) : void 0, i = nl(e), a = r.headers["content-type"], c = a ? rl(a) : void 0, d = c && c !== "application/octet-stream" ? c : ol(e) ?? c ?? "application/octet-stream";
7072
+ if (n && n > Gt)
7083
7073
  return {
7084
7074
  textContent: `Attachment "${i ?? e}" is too large to display inline (${(n / 1024 / 1024).toFixed(1)}MB, limit is 10MB). File type: ${d}`
7085
7075
  };
7086
7076
  const u = Buffer.from(await r.arrayBuffer()), l = u.byteLength;
7087
- if (l > Yt)
7077
+ if (l > Gt)
7088
7078
  return {
7089
7079
  textContent: `Attachment "${i ?? e}" is too large to display inline (${(l / 1024 / 1024).toFixed(1)}MB, limit is 10MB). File type: ${d}`
7090
7080
  };
7091
- const p = el(d), h = [];
7081
+ const p = sl(d), h = [];
7092
7082
  return p === "image" ? h.push({
7093
7083
  type: "image",
7094
7084
  data: u.toString("base64"),
@@ -7108,77 +7098,77 @@ const ol = {
7108
7098
  contentItems: h
7109
7099
  };
7110
7100
  }
7111
- }, il = {
7112
- ...ba,
7101
+ }, cl = {
7102
+ ...ya,
7113
7103
  _meta: {
7114
7104
  ui: {
7115
7105
  resourceUri: Be
7116
7106
  }
7117
7107
  }
7118
- }, al = {
7108
+ }, dl = {
7119
7109
  // Task management tools
7120
- addTasks: Vn,
7121
- completeTasks: oi,
7122
- uncompleteTasks: Pc,
7123
- updateTasks: xd,
7124
- rescheduleTasks: $c,
7125
- findTasks: Ia,
7126
- findTasksByDate: il,
7127
- findCompletedTasks: Bi,
7110
+ addTasks: Xn,
7111
+ completeTasks: ii,
7112
+ uncompleteTasks: Rc,
7113
+ updateTasks: Od,
7114
+ rescheduleTasks: Ac,
7115
+ findTasks: Ca,
7116
+ findTasksByDate: cl,
7117
+ findCompletedTasks: Ki,
7128
7118
  // Project management tools
7129
- addProjects: En,
7130
- updateProjects: nd,
7131
- findProjects: ra,
7132
- projectManagement: gc,
7133
- projectMove: kc,
7119
+ addProjects: _n,
7120
+ updateProjects: ad,
7121
+ findProjects: na,
7122
+ projectManagement: Tc,
7123
+ projectMove: Ic,
7134
7124
  // Section management tools
7135
- addSections: zn,
7136
- updateSections: yd,
7137
- findSections: pa,
7125
+ addSections: Yn,
7126
+ updateSections: kd,
7127
+ findSections: ma,
7138
7128
  // Comment management tools
7139
- addComments: on,
7140
- findComments: Pi,
7141
- updateComments: Mc,
7129
+ addComments: an,
7130
+ findComments: Ri,
7131
+ updateComments: Hc,
7142
7132
  // Reminder management tools
7143
- addReminders: Mn,
7144
- findReminders: aa,
7145
- updateReminders: md,
7133
+ addReminders: Hn,
7134
+ findReminders: da,
7135
+ updateReminders: bd,
7146
7136
  // Attachment tools
7147
- viewAttachment: nl,
7137
+ viewAttachment: al,
7148
7138
  // Label management tools
7149
- addLabels: Tn,
7150
- updateLabels: Zc,
7151
- findLabels: Gi,
7139
+ addLabels: wn,
7140
+ updateLabels: td,
7141
+ findLabels: Vi,
7152
7142
  // Filter management tools
7153
- findFilters: ln,
7154
- addFilters: fn,
7155
- updateFilters: zc,
7143
+ findFilters: pn,
7144
+ addFilters: gn,
7145
+ updateFilters: Yc,
7156
7146
  // Activity and audit tools
7157
- findActivity: $i,
7158
- getProductivityStats: Ra,
7147
+ findActivity: Ai,
7148
+ getProductivityStats: Na,
7159
7149
  // Health and insights tools
7160
- getProjectHealth: Ga,
7161
- getProjectActivityStats: Ha,
7162
- analyzeProjectHealth: ti,
7163
- getWorkspaceInsights: Xa,
7150
+ getProjectHealth: Va,
7151
+ getProjectActivityStats: Ba,
7152
+ analyzeProjectHealth: ri,
7153
+ getWorkspaceInsights: Za,
7164
7154
  // General tools
7165
- getOverview: _a,
7166
- deleteObject: ci,
7167
- fetchObject: ki,
7168
- reorderObjects: Ic,
7169
- userInfo: Jd,
7155
+ getOverview: Ua,
7156
+ deleteObject: li,
7157
+ fetchObject: Ii,
7158
+ reorderObjects: Cc,
7159
+ userInfo: Qd,
7170
7160
  // Assignment and collaboration tools
7171
- findProjectCollaborators: Xi,
7172
- manageAssignments: mc,
7161
+ findProjectCollaborators: Zi,
7162
+ manageAssignments: bc,
7173
7163
  // Template tools
7174
- exportProjectTemplate: ui,
7175
- importProjectTemplate: sc,
7164
+ exportProjectTemplate: hi,
7165
+ importProjectTemplate: oc,
7176
7166
  // Workspace tools
7177
- listWorkspaces: cc,
7167
+ listWorkspaces: lc,
7178
7168
  // OpenAI MCP tools
7179
- search: Ec,
7180
- fetch: Ii
7181
- }, cl = Object.values(al), dl = `
7169
+ search: _c,
7170
+ fetch: Ci
7171
+ }, ll = Object.values(dl), ul = `
7182
7172
  ## Todoist Task and Project Management Tools
7183
7173
 
7184
7174
  You have access to comprehensive Todoist management tools for personal productivity and team collaboration. Use these tools to help users manage tasks, projects, sections, comments, and assignments effectively.
@@ -7236,25 +7226,25 @@ Use the **productivity-analysis** prompt for a combined productivity review —
7236
7226
 
7237
7227
  Always provide clear, actionable task titles and descriptions. Use the overview tools to give users context about their workload and project status.
7238
7228
  `;
7239
- function Il({
7229
+ function Cl({
7240
7230
  todoistApiKey: e,
7241
7231
  baseUrl: t,
7242
7232
  features: r = []
7243
7233
  }) {
7244
- const o = new Ys(
7234
+ const o = new Gs(
7245
7235
  { name: "todoist-mcp-server", version: nt },
7246
7236
  {
7247
7237
  capabilities: {
7248
7238
  tools: { listChanged: !0 },
7249
7239
  prompts: { listChanged: !0 }
7250
7240
  },
7251
- instructions: dl
7241
+ instructions: ul
7252
7242
  }
7253
- ), n = Qr(e, { baseUrl: t });
7254
- pr(o);
7243
+ ), n = eo(e, { baseUrl: t });
7244
+ mr(o);
7255
7245
  const i = { server: o, client: n, features: r };
7256
- for (const a of cl)
7257
- wo({ tool: a, ...i });
7246
+ for (const a of ll)
7247
+ vo({ tool: a, ...i });
7258
7248
  return o.registerPrompt(
7259
7249
  ye.name,
7260
7250
  {
@@ -7266,58 +7256,58 @@ function Il({
7266
7256
  ), o;
7267
7257
  }
7268
7258
  export {
7269
- oo as $,
7270
- _a as A,
7271
- Ra as B,
7272
- Ha as C,
7273
- Ga as D,
7274
- Xa as E,
7275
- vl as F,
7276
- sc as G,
7277
- cc as H,
7278
- mc as I,
7279
- gc as J,
7280
- kc as K,
7281
- cl as L,
7282
- Ic as M,
7283
- $c as N,
7284
- Ec as O,
7285
- Pc as P,
7286
- Mc as Q,
7287
- zc as R,
7288
- Zc as S,
7289
- nd as T,
7290
- md as U,
7291
- yd as V,
7292
- xd as W,
7293
- Jd as X,
7294
- nl as Y,
7295
- Qr as Z,
7296
- Br as _,
7297
- on as a,
7298
- fn as b,
7299
- Tn as c,
7300
- En as d,
7301
- Mn as e,
7302
- zn as f,
7303
- Il as g,
7304
- Vn as h,
7305
- ti as i,
7306
- oi as j,
7307
- ci as k,
7308
- ui as l,
7309
- Ii as m,
7310
- ki as n,
7311
- $i as o,
7312
- Pi as p,
7313
- Bi as q,
7314
- ln as r,
7315
- Gi as s,
7316
- al as t,
7317
- Xi as u,
7318
- ra as v,
7319
- aa as w,
7320
- pa as x,
7321
- Ia as y,
7322
- ba as z
7259
+ io as $,
7260
+ Ua as A,
7261
+ Na as B,
7262
+ Ba as C,
7263
+ Va as D,
7264
+ Za as E,
7265
+ Sl as F,
7266
+ oc as G,
7267
+ lc as H,
7268
+ bc as I,
7269
+ Tc as J,
7270
+ Ic as K,
7271
+ ll as L,
7272
+ Cc as M,
7273
+ Ac as N,
7274
+ _c as O,
7275
+ Rc as P,
7276
+ Hc as Q,
7277
+ Yc as R,
7278
+ td as S,
7279
+ ad as T,
7280
+ bd as U,
7281
+ kd as V,
7282
+ Od as W,
7283
+ Qd as X,
7284
+ al as Y,
7285
+ eo as Z,
7286
+ Kr as _,
7287
+ an as a,
7288
+ gn as b,
7289
+ wn as c,
7290
+ _n as d,
7291
+ Hn as e,
7292
+ Yn as f,
7293
+ Cl as g,
7294
+ Xn as h,
7295
+ ri as i,
7296
+ ii as j,
7297
+ li as k,
7298
+ hi as l,
7299
+ Ci as m,
7300
+ Ii as n,
7301
+ Ai as o,
7302
+ Ri as p,
7303
+ Ki as q,
7304
+ pn as r,
7305
+ Vi as s,
7306
+ dl as t,
7307
+ Zi as u,
7308
+ na as v,
7309
+ da as w,
7310
+ ma as x,
7311
+ Ca as y,
7312
+ ya as z
7323
7313
  };