@doist/todoist-mcp 13.2.4 → 13.2.6

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,34 +1,34 @@
1
- import { ResourceTemplate as Bs, McpServer as zs } from "@modelcontextprotocol/server";
1
+ import { ResourceTemplate as zs, McpServer as Ks } from "@modelcontextprotocol/server";
2
2
  import { createHash as Gt, randomUUID as Ne } from "node:crypto";
3
- import { readFileSync as Ks } from "node:fs";
3
+ import { readFileSync as qs } from "node:fs";
4
4
  import { dirname as Vt, join as Me } from "node:path";
5
- import { fileURLToPath as qs } from "node:url";
5
+ import { fileURLToPath as Ys } from "node:url";
6
6
  import { RESOURCE_MIME_TYPE as Fe } from "@modelcontextprotocol/ext-apps/server";
7
- import ce, { ZodError as Ys, z as s } from "zod";
8
- import { AsyncLocalStorage as Gs } from "node:async_hooks";
9
- import { createRequire as Vs } from "node:module";
10
- import { TodoistApi as Js, isWorkspaceProject as Ce, isPersonalProject as q, colors as He, LOCATION_TRIGGERS as Jt, REMINDER_TYPES as Xs, createCommand as Q, REMINDER_DELIVERY_SERVICES as Qs, HEALTH_STATUSES as tt, getTaskUrl as Xt, getProjectUrl as Qt, parseTodoistUrl as Zs, WORKSPACE_ROLES as er, WORKSPACE_PLANS as tr } from "@doist/todoist-sdk";
7
+ import ce, { ZodError as Gs, z as s } from "zod";
8
+ import { AsyncLocalStorage as Vs } from "node:async_hooks";
9
+ import { createRequire as Js } from "node:module";
10
+ import { TodoistApi as Xs, isWorkspaceProject as Ce, isPersonalProject as q, colors as He, LOCATION_TRIGGERS as Jt, REMINDER_TYPES as Qs, createCommand as Q, REMINDER_DELIVERY_SERVICES as Zs, HEALTH_STATUSES as tt, getTaskUrl as Xt, getProjectUrl as Qt, escapeFilterToken as Zt, parseTodoistUrl as er, WORKSPACE_ROLES as tr, WORKSPACE_PLANS as sr } from "@doist/todoist-sdk";
11
11
  import { addDays as We, formatISO as yt } from "date-fns";
12
- const Tt = Vt(qs(import.meta.url)), sr = [
12
+ const Tt = Vt(Ys(import.meta.url)), rr = [
13
13
  Me(Tt, "task-list", "index.html"),
14
14
  Me(Tt, "mcp-apps", "index.html")
15
- ], rr = `<!doctype html>
15
+ ], or = `<!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 or() {
21
+ function nr() {
22
22
  const e = [];
23
- for (const t of sr)
23
+ for (const t of rr)
24
24
  try {
25
- return Ks(t, "utf-8");
25
+ return qs(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), rr;
29
+ return console.error("Failed to load task list app HTML from any known path:", e), or;
30
30
  }
31
- const Zt = or(), nr = Gt("sha256").update(Zt).digest("hex").slice(0, 12), Be = `ui://todoist/task-list@${nr}`, ir = "ui://todoist/task-list@{hash}", ze = "Interactive task list widget", ar = "https://ai.todoist.net", Ke = {
31
+ const es = nr(), ir = Gt("sha256").update(es).digest("hex").slice(0, 12), Be = `ui://todoist/task-list@${ir}`, ar = "ui://todoist/task-list@{hash}", ze = "Interactive task list widget", cr = "https://ai.todoist.net", Ke = {
32
32
  ui: {
33
33
  prefersBorder: !0,
34
34
  csp: {
@@ -43,7 +43,7 @@ const Zt = or(), nr = Gt("sha256").update(Zt).digest("hex").slice(0, 12), Be = `
43
43
  connect_domains: [],
44
44
  resource_domains: []
45
45
  },
46
- "openai/widgetDomain": ar
46
+ "openai/widgetDomain": cr
47
47
  };
48
48
  function kt(e) {
49
49
  return {
@@ -51,13 +51,13 @@ function kt(e) {
51
51
  {
52
52
  uri: e,
53
53
  mimeType: Fe,
54
- text: Zt,
54
+ text: es,
55
55
  _meta: Ke
56
56
  }
57
57
  ]
58
58
  };
59
59
  }
60
- function cr(e) {
60
+ function dr(e) {
61
61
  e.registerResource(
62
62
  "todoist-task-list",
63
63
  Be,
@@ -69,7 +69,7 @@ function cr(e) {
69
69
  async () => kt(Be)
70
70
  ), e.registerResource(
71
71
  "todoist-task-list-hash-fallback",
72
- new Bs(ir, { list: void 0 }),
72
+ new zs(ar, { list: void 0 }),
73
73
  {
74
74
  description: `${ze} compatibility fallback`,
75
75
  mimeType: Fe,
@@ -105,21 +105,21 @@ function de(e) {
105
105
  const t = O(e);
106
106
  return t !== void 0 ? t : v(e);
107
107
  }
108
- function dr(e) {
108
+ function lr(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 = dr(e).replace(/\s+/g, " ").trim();
115
+ const r = lr(e).replace(/\s+/g, " ").trim();
116
116
  return r.length <= t ? r : `${r.slice(0, t - 3)}...`;
117
117
  }
118
118
  function Ye(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
  }
122
- function _e(e) {
122
+ function Pe(e) {
123
123
  if (!e)
124
124
  return;
125
125
  const t = e.match(/\b(?:HTTP|status code)\s*[:#-]?\s*(\d{3})\b/i);
@@ -153,7 +153,7 @@ function X(e) {
153
153
  }
154
154
  return o.length > 0 ? L(o.join("; ")) : void 0;
155
155
  }
156
- function lr(e) {
156
+ function ur(e) {
157
157
  if (!e)
158
158
  return [];
159
159
  const t = /* @__PURE__ */ new Set(), r = (a) => {
@@ -216,7 +216,7 @@ function lr(e) {
216
216
  }
217
217
  return Array.from(t).slice(0, 3);
218
218
  }
219
- const ur = [
219
+ const pr = [
220
220
  "error",
221
221
  "error_code",
222
222
  "error_tag",
@@ -227,14 +227,14 @@ const ur = [
227
227
  "httpCode",
228
228
  "errorExtra"
229
229
  ];
230
- function pr(e) {
231
- return e ? ur.some((t) => e[t] !== void 0) : !1;
230
+ function hr(e) {
231
+ return e ? pr.some((t) => e[t] !== void 0) : !1;
232
232
  }
233
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 hr(...e) {
237
+ function mr(...e) {
238
238
  for (const t of e) {
239
239
  if (!t)
240
240
  continue;
@@ -245,16 +245,16 @@ function hr(...e) {
245
245
  return Ge[o];
246
246
  }
247
247
  }
248
- function mr(e) {
248
+ function fr(e) {
249
249
  if (e.tag) {
250
250
  const t = Ge[e.tag.toUpperCase()];
251
251
  if (t)
252
252
  return t;
253
253
  }
254
- return hr(...e.rawText ?? [], e.message, e.details);
254
+ return mr(...e.rawText ?? [], e.message, e.details);
255
255
  }
256
- function fr(e) {
257
- const t = mr(e);
256
+ function br(e) {
257
+ const t = fr(e);
258
258
  if (t)
259
259
  return t;
260
260
  const { statusCode: r } = e, o = e.fieldHints.length > 0;
@@ -277,9 +277,9 @@ function st(e) {
277
277
  O(n?.status),
278
278
  O(n?.httpCode),
279
279
  O(n?.http_code),
280
- _e(v(t?.message)),
281
- _e(v(r?.message)),
282
- _e(typeof e == "string" ? e : void 0)
280
+ Pe(v(t?.message)),
281
+ Pe(v(r?.message)),
282
+ Pe(typeof e == "string" ? e : void 0)
283
283
  ), a = F(
284
284
  de(n?.errorCode),
285
285
  de(n?.error_code),
@@ -308,8 +308,8 @@ function st(e) {
308
308
  X(n?.errorDetails),
309
309
  X(n?.errors),
310
310
  X(t?.details)
311
- ), p = lr(n);
312
- return i !== void 0 || pr(n) || c !== void 0 || a !== void 0 || (u ? Ye(u) : !1) ? {
311
+ ), p = ur(n);
312
+ return i !== void 0 || hr(n) || c !== void 0 || a !== void 0 || (u ? Ye(u) : !1) ? {
313
313
  statusCode: i,
314
314
  code: a,
315
315
  tag: c ? L(c, 80) : void 0,
@@ -319,18 +319,18 @@ function st(e) {
319
319
  fieldHints: p
320
320
  } : null;
321
321
  }
322
- function es(e) {
322
+ function ts(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 br(e) {
327
- const t = es(e), r = [
326
+ function gr(e) {
327
+ const t = ts(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: ${fr(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: ${br(e)}`), r.join(`
331
331
  `);
332
332
  }
333
- function ts(e) {
333
+ function ss(e) {
334
334
  return e instanceof Error ? L(e.message) : typeof e == "string" ? L(e) : "An unknown error occurred";
335
335
  }
336
336
  class $e extends Error {
@@ -338,7 +338,7 @@ class $e extends Error {
338
338
  super(t), this.name = "DueStringParseError";
339
339
  }
340
340
  }
341
- class ss extends Error {
341
+ class rs extends Error {
342
342
  constructor(t) {
343
343
  super(t), this.name = "BatchDueStringParseError";
344
344
  }
@@ -348,11 +348,11 @@ function N(e) {
348
348
  return e.message;
349
349
  const t = st(e);
350
350
  if (!t)
351
- return ts(e);
352
- const r = es(t), o = t.message && !(r.length > 0 && Ye(t.message)) ? t.message : "Todoist API request failed";
351
+ return ss(e);
352
+ const r = ts(t), o = t.message && !(r.length > 0 && Ye(t.message)) ? t.message : "Todoist API request failed";
353
353
  return r.length > 0 ? `${o} (${r.join(", ")})` : o;
354
354
  }
355
- function gr(e, {
355
+ function yr(e, {
356
356
  taskContent: t,
357
357
  dueString: r,
358
358
  deadlineDate: o
@@ -365,14 +365,14 @@ function gr(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 yr(e) {
369
- if (e instanceof Ys || e instanceof $e || e instanceof ss)
368
+ function Tr(e) {
369
+ if (e instanceof Gs || e instanceof $e || e instanceof rs)
370
370
  return e.message;
371
371
  const t = st(e);
372
- return t ? br(t) : ts(e);
372
+ return t ? gr(t) : ss(e);
373
373
  }
374
- const Tr = "13.2.4", kr = {
375
- version: Tr
374
+ const kr = "13.2.6", wr = {
375
+ version: kr
376
376
  }, j = {
377
377
  /** Default limit for task listings */
378
378
  TASKS_DEFAULT: 10,
@@ -409,10 +409,10 @@ const Tr = "13.2.4", kr = {
409
409
  }, Te = {
410
410
  /** Maximum number of failures to show in detailed error messages */
411
411
  MAX_FAILURES_SHOWN: 3
412
- }, wr = {
412
+ }, vr = {
413
413
  /** Maximum number of failed items named in one log line */
414
414
  MAX_FAILURES_LOGGED: 5
415
- }, rs = {
415
+ }, os = {
416
416
  /** Maximum tasks accepted by one task create or update operation */
417
417
  TASKS_PER_OPERATION: 25
418
418
  }, Ve = {
@@ -487,60 +487,60 @@ function rt() {
487
487
  writes: wt(Ve.WRITES)
488
488
  };
489
489
  }
490
- const vr = 1e4, Ir = 5 * 6e4, W = /* @__PURE__ */ new Map();
491
- let Sr = vr;
492
- const os = /* @__PURE__ */ new WeakMap(), Z = /* @__PURE__ */ new Map();
490
+ const Ir = 1e4, Sr = 5 * 6e4, W = /* @__PURE__ */ new Map();
491
+ let Cr = Ir;
492
+ const ns = /* @__PURE__ */ new WeakMap(), Z = /* @__PURE__ */ new Map();
493
493
  let vt, It;
494
- function Cr() {
494
+ function jr() {
495
495
  return vt ??= rt(), vt;
496
496
  }
497
497
  function St() {
498
498
  return It ??= rt(), It;
499
499
  }
500
- function jr(e) {
500
+ function $r(e) {
501
501
  return Gt("sha256").update(e).digest("hex");
502
502
  }
503
- function $r({ moves: e, writes: t }) {
503
+ function Ar({ moves: e, writes: t }) {
504
504
  return e.isIdle() && t.isIdle();
505
505
  }
506
- function ns(e) {
507
- return e.leases === 0 && $r(e.limiters);
506
+ function is(e) {
507
+ return e.leases === 0 && Ar(e.limiters);
508
508
  }
509
- function Ar(e, t, r) {
509
+ function Dr(e, t, r) {
510
510
  W.delete(e), t.lastUsedAt = r, W.set(e, t);
511
511
  }
512
- function Dr(e) {
512
+ function xr(e) {
513
513
  for (const [t, r] of W) {
514
- if (e - r.lastUsedAt < Ir)
514
+ if (e - r.lastUsedAt < Sr)
515
515
  break;
516
- ns(r) && W.delete(t);
516
+ is(r) && W.delete(t);
517
517
  }
518
518
  }
519
- function xr() {
519
+ function Er() {
520
520
  for (const [e, t] of W)
521
- if (ns(t))
521
+ if (is(t))
522
522
  return W.delete(e), !0;
523
523
  return !1;
524
524
  }
525
- function is(e, t) {
525
+ function as(e, t) {
526
526
  if (Z.has(e))
527
527
  return;
528
528
  const r = W.get(e);
529
529
  if (r)
530
- return Ar(e, r, t), r;
531
- if (Dr(t), W.size >= Sr && !xr())
530
+ return Dr(e, r, t), r;
531
+ if (xr(t), W.size >= Cr && !Er())
532
532
  return;
533
533
  const o = { limiters: rt(), lastUsedAt: t, leases: 0 };
534
534
  return W.set(e, o), o;
535
535
  }
536
- function Er(e) {
536
+ function Or(e) {
537
537
  const t = Z.get(e);
538
538
  if (t !== void 0)
539
539
  return Z.set(e, t + 1), {
540
540
  limiters: St(),
541
541
  release: () => Ct(e)
542
542
  };
543
- const r = is(e, Date.now());
543
+ const r = as(e, Date.now());
544
544
  return r ? (r.leases++, {
545
545
  limiters: r.limiters,
546
546
  release: () => {
@@ -559,51 +559,51 @@ function Ct(e) {
559
559
  }
560
560
  Z.set(e, t - 1);
561
561
  }
562
- function Or(e, t) {
563
- const r = jr(t);
564
- os.set(e, r);
562
+ function _r(e, t) {
563
+ const r = $r(t);
564
+ ns.set(e, r);
565
565
  }
566
- function as(e, t) {
567
- const r = os.get(e);
568
- return r ? (is(r, Date.now()), async (o) => {
569
- const n = Er(r);
566
+ function cs(e, t) {
567
+ const r = ns.get(e);
568
+ return r ? (as(r, Date.now()), async (o) => {
569
+ const n = Or(r);
570
570
  try {
571
571
  return await n.limiters[t](o);
572
572
  } finally {
573
573
  n.release();
574
574
  }
575
- }) : Cr()[t];
575
+ }) : jr()[t];
576
576
  }
577
577
  function Pr(e) {
578
- return as(e, "moves");
578
+ return cs(e, "moves");
579
579
  }
580
- function _r(e) {
581
- return as(e, "writes");
580
+ function Ur(e) {
581
+ return cs(e, "writes");
582
582
  }
583
- const Ur = "todoist-mcp", ot = kr.version, cs = new Gs(), jt = Vs(import.meta.url);
583
+ const Rr = "todoist-mcp", ot = wr.version, ds = new Vs(), jt = Js(import.meta.url);
584
584
  let Se;
585
- const Rr = async () => {
585
+ const Lr = async () => {
586
586
  const e = jt.resolve("@doist/todoist-sdk"), t = Me(Vt(e), "transport", "http-dispatcher.js");
587
587
  return jt(t);
588
588
  };
589
- let Lr = Rr;
590
- function Nr() {
591
- return `${Ur}/${ot}`;
589
+ let Nr = Lr;
590
+ function Mr() {
591
+ return `${Rr}/${ot}`;
592
592
  }
593
- function ds(e) {
593
+ function ls(e) {
594
594
  return e.trim().toLowerCase();
595
595
  }
596
- function Mr(e, t) {
597
- return cs.run(ds(e), t);
596
+ function Fr(e, t) {
597
+ return ds.run(ls(e), t);
598
598
  }
599
- function Fr({
599
+ function Hr({
600
600
  label: e,
601
601
  platform: t = "mcp",
602
602
  sessionId: r = Ne()
603
603
  } = {}) {
604
- const o = e ? ds(e) : cs.getStore();
604
+ const o = e ? ls(e) : ds.getStore();
605
605
  return {
606
- "User-Agent": Nr(),
606
+ "User-Agent": Mr(),
607
607
  "doist-platform": t,
608
608
  "doist-version": ot,
609
609
  "request-id": Ne(),
@@ -611,16 +611,16 @@ function Fr({
611
611
  "mcp-tool": o ?? "unknown"
612
612
  };
613
613
  }
614
- function Hr(e, t) {
614
+ function Wr(e, t) {
615
615
  const r = new Headers(e);
616
- for (const [o, n] of Object.entries(Fr(t)))
616
+ for (const [o, n] of Object.entries(Hr(t)))
617
617
  r.set(o, n);
618
618
  return Object.fromEntries(r.entries());
619
619
  }
620
620
  function $t() {
621
621
  return new DOMException("The operation was aborted due to timeout", "TimeoutError");
622
622
  }
623
- function Wr(e, t) {
623
+ function Br(e, t) {
624
624
  if (!e && t === void 0)
625
625
  return {
626
626
  signal: void 0,
@@ -658,22 +658,22 @@ function Wr(e, t) {
658
658
  }
659
659
  };
660
660
  }
661
- async function Br() {
662
- if (zr())
663
- return Se || (Se = Lr().then((e) => e.getDefaultTransport()).catch((e) => {
661
+ async function zr() {
662
+ if (Kr())
663
+ return Se || (Se = Nr().then((e) => e.getDefaultTransport()).catch((e) => {
664
664
  throw Se = void 0, e;
665
665
  })), Se;
666
666
  }
667
- function zr() {
667
+ function Kr() {
668
668
  return typeof process < "u" && !!process.versions?.node;
669
669
  }
670
- async function Kr(e, t) {
670
+ async function qr(e, t) {
671
671
  if ("dispatcher" in t)
672
672
  return e;
673
- const r = await Br();
673
+ const r = await zr();
674
674
  return r ? (t.dispatcher = r.dispatcher, r.fetch ?? e) : e;
675
675
  }
676
- function qr(e) {
676
+ function Yr(e) {
677
677
  return {
678
678
  ok: e.ok,
679
679
  status: e.status,
@@ -684,34 +684,34 @@ function qr(e) {
684
684
  arrayBuffer: () => e.arrayBuffer()
685
685
  };
686
686
  }
687
- function Yr(e = globalThis.fetch, t = {}) {
687
+ function Gr(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 } = Wr(l, d);
690
+ const { timeout: d, headers: u, signal: l, ...p } = c, { signal: h, cleanup: m } = Br(l, d);
691
691
  try {
692
692
  const y = {
693
693
  ...p,
694
694
  signal: h,
695
- ...o ? { headers: Hr(u, { platform: n, sessionId: i }) } : u !== void 0 ? { headers: u } : {}
696
- }, w = await (r ? await Kr(e, y) : e)(a, y);
697
- return qr(w);
695
+ ...o ? { headers: Wr(u, { platform: n, sessionId: i }) } : u !== void 0 ? { headers: u } : {}
696
+ }, w = await (r ? await qr(e, y) : e)(a, y);
697
+ return Yr(w);
698
698
  } finally {
699
699
  m();
700
700
  }
701
701
  };
702
702
  }
703
- function Gr(e, {
703
+ function Vr(e, {
704
704
  baseUrl: t,
705
705
  tracking: r
706
706
  } = {}) {
707
- const o = new Js(e, {
708
- customFetch: Yr(globalThis.fetch, r),
707
+ const o = new Xs(e, {
708
+ customFetch: Gr(globalThis.fetch, r),
709
709
  ...t ? { baseUrl: t } : {}
710
710
  });
711
- return Or(o, e), o;
711
+ return _r(o, e), o;
712
712
  }
713
- const Vr = 2, Jr = 500, Xr = 2e3, Qr = 50, Zr = /* @__PURE__ */ new Set([502, 503, 504]);
714
- function eo(e) {
713
+ const Jr = 2, Xr = 500, Qr = 2e3, Zr = 50, eo = /* @__PURE__ */ new Set([502, 503, 504]);
714
+ function to(e) {
715
715
  if (e == null || typeof e != "object")
716
716
  return;
717
717
  const t = e;
@@ -727,32 +727,32 @@ function eo(e) {
727
727
  return Number(r[1]);
728
728
  }
729
729
  }
730
- function to(e) {
731
- const t = eo(e);
732
- return t !== void 0 && Zr.has(t);
730
+ function so(e) {
731
+ const t = to(e);
732
+ return t !== void 0 && eo.has(t);
733
733
  }
734
- function so({
734
+ function ro({
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(Qr, i));
741
+ return Math.min(n, Math.max(Zr, i));
742
742
  }
743
- function ro(e) {
743
+ function oo(e) {
744
744
  return new Promise((t) => setTimeout(t, e));
745
745
  }
746
- async function P(e, t = {}) {
747
- const r = t.maxRetries ?? Vr, o = t.baseDelayMs ?? Jr, n = t.maxDelayMs ?? Xr, i = t.random;
746
+ async function _(e, t = {}) {
747
+ const r = t.maxRetries ?? Jr, o = t.baseDelayMs ?? Xr, n = t.maxDelayMs ?? Qr, 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 && to(d)) {
754
- const u = so({ attempt: c, baseDelayMs: o, maxDelayMs: n, random: i });
755
- await ro(u);
753
+ if (a = d, c < r && so(d)) {
754
+ const u = ro({ attempt: c, baseDelayMs: o, maxDelayMs: n, random: i });
755
+ await oo(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
- }, fl = {
843
+ }, bl = {
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
- }, oo = process.env.USE_STRUCTURED_CONTENT === "true" || process.env.NODE_ENV === "test", At = /* @__PURE__ */ new WeakMap();
849
+ }, no = process.env.USE_STRUCTURED_CONTENT === "true" || process.env.NODE_ENV === "test", At = /* @__PURE__ */ new WeakMap();
850
850
  function Dt(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 Dt(e, t) {
859
859
  }
860
860
  };
861
861
  }
862
- function no(e) {
862
+ function io(e) {
863
863
  const t = At.get(e);
864
864
  if (t)
865
865
  return t;
@@ -869,48 +869,48 @@ function no(e) {
869
869
  };
870
870
  return At.set(e, r), r;
871
871
  }
872
- function io({
872
+ function ao({
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), !oo && t && i.push({
878
+ return r && i.push(...r), !no && 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 ao(e) {
883
+ function co(e) {
884
884
  return {
885
885
  content: [{ type: "text", text: e }],
886
886
  isError: !0
887
887
  };
888
888
  }
889
- const co = /* @__PURE__ */ new Set(["file"]);
890
- function lo(e) {
889
+ const lo = /* @__PURE__ */ new Set(["file"]);
890
+ function uo(e) {
891
891
  return !e || typeof e != "object" || Array.isArray(e) ? e : Object.fromEntries(
892
892
  Object.entries(e).map(
893
- ([t, r]) => co.has(t) && r !== void 0 ? [t, "[redacted]"] : [t, r]
893
+ ([t, r]) => lo.has(t) && r !== void 0 ? [t, "[redacted]"] : [t, r]
894
894
  )
895
895
  );
896
896
  }
897
- function uo(e) {
897
+ function po(e) {
898
898
  return { ...{
899
- title: `Todoist: ${po(e.name)}`,
899
+ title: `Todoist: ${ho(e.name)}`,
900
900
  openWorldHint: !1
901
901
  }, ...e.annotations };
902
902
  }
903
- function po(e) {
903
+ function ho(e) {
904
904
  return e.split("-").filter(Boolean).map((t) => `${t.charAt(0).toUpperCase()}${t.slice(1)}`).join(" ");
905
905
  }
906
- function ho(e) {
906
+ function mo(e) {
907
907
  return e ? typeof e["ui/resourceUri"] == "string" ? !0 : typeof e.ui == "object" && e.ui !== null : !1;
908
908
  }
909
- function mo(e) {
909
+ function fo(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 fo = [
913
+ const bo = [
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 bo(e) {
930
+ function go(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 go({
934
+ function yo({
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") && fo.includes(e.name), i = e.execute, { input: a, output: c } = no(e), d = async (l, p) => {
940
+ const n = o.some((l) => l.name === "strip_emails") && bo.includes(e.name), i = e.execute, { input: a, output: c } = io(e), d = async (l, p) => {
941
941
  try {
942
- let { textContent: h, structuredContent: m, contentItems: y } = await Mr(
942
+ let { textContent: h, structuredContent: m, contentItems: y } = await Fr(
943
943
  e.name,
944
- () => P(() => i(l, r))
944
+ () => _(() => i(l, r))
945
945
  );
946
- return n && (h && (h = bo(h)), m && (m = Xe(m))), io({ textContent: h, structuredContent: m, contentItems: y });
946
+ return n && (h && (h = go(h)), m && (m = Xe(m))), ao({ textContent: h, structuredContent: m, contentItems: y });
947
947
  } catch (h) {
948
- return console.error(`Error executing tool ${e.name}:`, { args: lo(l), error: h }), ao(yr(h));
948
+ return console.error(`Error executing tool ${e.name}:`, { args: uo(l), error: h }), co(Tr(h));
949
949
  }
950
950
  }, u = {
951
951
  description: e.description,
952
952
  inputSchema: a,
953
953
  ...c ? { outputSchema: c } : {},
954
- annotations: uo(e),
955
- ...e._meta ? { _meta: ho(e._meta) ? mo(e._meta) : e._meta } : {}
954
+ annotations: po(e),
955
+ ...e._meta ? { _meta: mo(e._meta) ? fo(e._meta) : e._meta } : {}
956
956
  };
957
957
  t.registerTool(e.name, u, d);
958
958
  }
959
- const yo = s.object({
959
+ const To = 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 yo = 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 To(e, t = /* @__PURE__ */ new Date()) {
968
+ function ko(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 To(e, t = /* @__PURE__ */ new Date()) {
1012
1012
  }
1013
1013
  }
1014
1014
  }
1015
- function ko(e) {
1015
+ function wo(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 ko(e) {
1043
1043
 
1044
1044
  `) : t[e] ?? "";
1045
1045
  }
1046
- function wo(e) {
1047
- const { since: t, until: r, periodDescription: o } = To(e.period), n = e.projectId ? `
1046
+ function vo(e) {
1047
+ const { since: t, until: r, periodDescription: o } = ko(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
- ${ko(e.focus)}
1068
+ ${wo(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 vo(e) {
1078
+ function Io(e) {
1079
1079
  return {
1080
1080
  messages: [
1081
1081
  {
1082
1082
  role: "user",
1083
1083
  content: {
1084
1084
  type: "text",
1085
- text: wo(e)
1085
+ text: vo(e)
1086
1086
  }
1087
1087
  }
1088
1088
  ]
@@ -1092,15 +1092,15 @@ 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: yo,
1096
- callback: vo
1095
+ argsSchema: To,
1096
+ callback: Io
1097
1097
  };
1098
1098
  class U extends Error {
1099
1099
  constructor(t, r) {
1100
1100
  super(`Invalid duration format "${t}": ${r}`), this.name = "DurationParseError";
1101
1101
  }
1102
1102
  }
1103
- function ls(e) {
1103
+ function us(e) {
1104
1104
  if (!e || typeof e != "string")
1105
1105
  throw new U(e, "Duration must be a non-empty string");
1106
1106
  const t = e.trim().toLowerCase().replace(/\s+/g, "");
@@ -1134,20 +1134,20 @@ function ls(e) {
1134
1134
  throw new U(e, "Duration cannot exceed 24 hours (1440 minutes)");
1135
1135
  return { minutes: o };
1136
1136
  }
1137
- function Io(e) {
1137
+ function So(e) {
1138
1138
  if (e <= 0) return "0m";
1139
1139
  const t = Math.floor(e / 60), r = e % 60;
1140
1140
  return t === 0 ? `${r}m` : r === 0 ? `${t}h` : `${t}h${r}m`;
1141
1141
  }
1142
- const So = ["p1", "p2", "p3", "p4"], nt = '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.', it = s.enum(So).describe(nt);
1143
- function us(e) {
1142
+ const Co = ["p1", "p2", "p3", "p4"], nt = '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.', it = s.enum(Co).describe(nt);
1143
+ function ps(e) {
1144
1144
  return { p1: 4, p2: 3, p3: 2, p4: 1 }[e];
1145
1145
  }
1146
- function Co(e) {
1146
+ function jo(e) {
1147
1147
  return { 4: "p1", 3: "p2", 2: "p3", 1: "p4" }[e];
1148
1148
  }
1149
- const ps = 300 * 1e3, jo = 1e4, $o = 1e3;
1150
- class hs {
1149
+ const hs = 300 * 1e3, $o = 1e4, Ao = 1e3;
1150
+ class ms {
1151
1151
  constructor(t, r) {
1152
1152
  this.maxEntries = t, this.ttl = r, this.entries = /* @__PURE__ */ new Map();
1153
1153
  }
@@ -1180,14 +1180,14 @@ class hs {
1180
1180
  t - o.timestamp >= this.ttl && this.entries.delete(r);
1181
1181
  }
1182
1182
  }
1183
- const Ue = new hs(
1184
- jo,
1185
- ps
1186
- ), le = new hs(
1183
+ const Ue = new ms(
1187
1184
  $o,
1188
- ps
1189
- ), ms = "me";
1190
- class Ao {
1185
+ hs
1186
+ ), le = new ms(
1187
+ Ao,
1188
+ hs
1189
+ ), fs = "me";
1190
+ class Do {
1191
1191
  /**
1192
1192
  * Resolve a user name or ID to a user ID by looking up collaborators across all shared projects.
1193
1193
  * Supports exact name matches, partial matches, email matches, and the "me" keyword.
@@ -1196,7 +1196,7 @@ class Ao {
1196
1196
  if (!r || r.trim().length === 0)
1197
1197
  return null;
1198
1198
  const o = r.trim();
1199
- if (o.toLowerCase() === ms)
1199
+ if (o.toLowerCase() === fs)
1200
1200
  try {
1201
1201
  const d = await t.getUser();
1202
1202
  return {
@@ -1322,11 +1322,11 @@ class Ao {
1322
1322
  Ue.clear(), le.clear();
1323
1323
  }
1324
1324
  }
1325
- const H = new Ao();
1326
- async function Do(e, t) {
1325
+ const H = new Do();
1326
+ async function xo(e, t) {
1327
1327
  return H.resolveUser(e, t);
1328
1328
  }
1329
- async function xo(e, t) {
1329
+ async function Eo(e, t) {
1330
1330
  const r = /* @__PURE__ */ new Set(), o = /* @__PURE__ */ new Set(), n = [], i = [];
1331
1331
  for (const a of t) {
1332
1332
  const c = a.trim().toLowerCase();
@@ -1347,11 +1347,11 @@ async function xo(e, t) {
1347
1347
  }
1348
1348
  return n;
1349
1349
  }
1350
- const fs = ["assigned", "unassignedOrMe", "all"];
1350
+ const bs = ["assigned", "unassignedOrMe", "all"];
1351
1351
  async function at(e, t) {
1352
1352
  if (!t)
1353
1353
  return;
1354
- const r = await Do(e, t);
1354
+ const r = await xo(e, t);
1355
1355
  if (!r)
1356
1356
  throw new Error(
1357
1357
  `Could not find user: "${t}". Make sure the user is a collaborator on a shared project.`
@@ -1370,7 +1370,7 @@ function Qe({
1370
1370
  const n = !!(e && t) && e === r;
1371
1371
  return e && t && !n ? `assigned to: ${t}` : n || o === "unassignedOrMe" ? "!assigned to: others" : o === "assigned" ? "assigned to: others" : "";
1372
1372
  }
1373
- function Eo({
1373
+ function Oo({
1374
1374
  tasks: e,
1375
1375
  resolvedAssigneeId: t,
1376
1376
  currentUserId: r,
@@ -1407,21 +1407,21 @@ async function z(e) {
1407
1407
  function ct(e) {
1408
1408
  return /(?<!\\)(?:\\\\)*\*/.test(e) ? e : `*${e.replaceAll(/\\(?!\*)/g, "\\\\")}*`;
1409
1409
  }
1410
- async function bs(e, t) {
1410
+ async function gs(e, t) {
1411
1411
  return z({
1412
1412
  apiMethod: e.searchProjects.bind(e),
1413
1413
  args: { query: ct(t) },
1414
1414
  limit: j.PROJECTS_MAX
1415
1415
  });
1416
1416
  }
1417
- async function gs(e) {
1417
+ async function ys(e) {
1418
1418
  return z({
1419
1419
  apiMethod: e.getProjects.bind(e),
1420
1420
  args: {},
1421
1421
  limit: j.PROJECTS_MAX
1422
1422
  });
1423
1423
  }
1424
- async function Oo(e) {
1424
+ async function _o(e) {
1425
1425
  return z({
1426
1426
  apiMethod: e.getArchivedProjects.bind(e),
1427
1427
  args: {},
@@ -1437,21 +1437,21 @@ function Po(e) {
1437
1437
  }
1438
1438
  return new RegExp(r ? `^${n}$` : n, "iu");
1439
1439
  }
1440
- async function _o(e, t) {
1440
+ async function Uo(e, t) {
1441
1441
  return z({
1442
1442
  apiMethod: e.searchLabels.bind(e),
1443
1443
  args: { query: ct(t) },
1444
1444
  limit: j.LABELS_MAX
1445
1445
  });
1446
1446
  }
1447
- async function Uo(e) {
1447
+ async function Ro(e) {
1448
1448
  return z({
1449
1449
  apiMethod: e.getSharedLabels.bind(e),
1450
1450
  args: {},
1451
1451
  limit: j.LABELS_MAX
1452
1452
  });
1453
1453
  }
1454
- async function Ro(e, t, r) {
1454
+ async function Lo(e, t, r) {
1455
1455
  const o = ct(t);
1456
1456
  return z({
1457
1457
  apiMethod: e.searchSections.bind(e),
@@ -1459,7 +1459,7 @@ async function Ro(e, t, r) {
1459
1459
  limit: j.SECTIONS_MAX
1460
1460
  });
1461
1461
  }
1462
- function _(e) {
1462
+ function P(e) {
1463
1463
  return {
1464
1464
  id: e.id,
1465
1465
  content: e.content,
@@ -1467,12 +1467,12 @@ function _(e) {
1467
1467
  dueDate: e.due?.date,
1468
1468
  recurring: e.due?.isRecurring && e.due.string ? e.due.string : !1,
1469
1469
  deadlineDate: e.deadline?.date,
1470
- priority: Co(e.priority) ?? "p4",
1470
+ priority: jo(e.priority) ?? "p4",
1471
1471
  projectId: e.projectId,
1472
1472
  sectionId: e.sectionId ?? void 0,
1473
1473
  parentId: e.parentId ?? void 0,
1474
1474
  labels: e.labels,
1475
- duration: e.duration ? Io(e.duration.amount) : void 0,
1475
+ duration: e.duration ? So(e.duration.amount) : void 0,
1476
1476
  responsibleUid: e.responsibleUid ?? void 0,
1477
1477
  assignedByUid: e.assignedByUid ?? void 0,
1478
1478
  checked: e.checked,
@@ -1522,7 +1522,7 @@ function we(e) {
1522
1522
  } : void 0
1523
1523
  };
1524
1524
  }
1525
- function Lo(e) {
1525
+ function No(e) {
1526
1526
  return {
1527
1527
  id: e.id ?? void 0,
1528
1528
  objectType: e.objectType,
@@ -1535,7 +1535,7 @@ function Lo(e) {
1535
1535
  extraData: e.extraData ?? void 0
1536
1536
  };
1537
1537
  }
1538
- const No = ce.object({
1538
+ const Mo = ce.object({
1539
1539
  httpStatusCode: ce.number(),
1540
1540
  responseData: ce.object({
1541
1541
  error: ce.string(),
@@ -1555,9 +1555,9 @@ async function dt({
1555
1555
  }) {
1556
1556
  try {
1557
1557
  const { results: n, nextCursor: i } = await e.getTasksByFilter({ query: t, cursor: o, limit: r });
1558
- return { tasks: n.map(_), nextCursor: i };
1558
+ return { tasks: n.map(P), nextCursor: i };
1559
1559
  } catch (n) {
1560
- const i = No.safeParse(n);
1560
+ const i = Mo.safeParse(n);
1561
1561
  if (!i.success)
1562
1562
  throw n;
1563
1563
  const { responseData: a } = i.data;
@@ -1606,18 +1606,18 @@ function ke(e) {
1606
1606
  };
1607
1607
  }
1608
1608
  }
1609
- function ys(e) {
1609
+ function Ts(e) {
1610
1610
  const t = e.filter(
1611
1611
  (o) => o.type === "relative" || o.type === "absolute"
1612
1612
  ).length, r = e.filter((o) => o.type === "location").length;
1613
1613
  return { timeBasedCount: t, locationCount: r };
1614
1614
  }
1615
- const Ts = "none";
1616
- function Mo(e) {
1617
- return e.length === 1 && e[0]?.trim().toLowerCase() === Ts;
1615
+ const ks = "none";
1616
+ function Fo(e) {
1617
+ return e.length === 1 && e[0]?.trim().toLowerCase() === ks;
1618
1618
  }
1619
- async function Fo(e, t, r) {
1620
- const o = await Ho(e, t);
1619
+ async function Ho(e, t, r) {
1620
+ const o = await Wo(e, t);
1621
1621
  if (o)
1622
1622
  return Et(
1623
1623
  [...o.uidsToNotify ?? [], o.postedUid],
@@ -1628,7 +1628,7 @@ async function Fo(e, t, r) {
1628
1628
  const n = await e.getTask(t.taskId);
1629
1629
  return Et([n.responsibleUid, n.assignedByUid, n.addedByUid], r);
1630
1630
  }
1631
- async function Ho(e, t) {
1631
+ async function Wo(e, t) {
1632
1632
  let r, o = null;
1633
1633
  do {
1634
1634
  const n = await e.getComments({
@@ -1648,12 +1648,12 @@ function Et(e, t) {
1648
1648
  return [...r];
1649
1649
  }
1650
1650
  const De = He.map((e) => e.key);
1651
- function Wo(e) {
1651
+ function Bo(e) {
1652
1652
  if (typeof e != "string") return;
1653
1653
  const t = e.toLowerCase();
1654
1654
  return (He.find((o) => o.key === t) ?? He.find((o) => o.displayName.toLowerCase() === t))?.key;
1655
1655
  }
1656
- const Bo = `Color for the entity. Accepts a color key (e.g. "berry_red") or display name (e.g. "Berry Red"). Valid colors: ${De.join(", ")}. Unrecognized colors are omitted and charcoal will be used as the default.`, fe = s.preprocess(Wo, s.enum(De).optional()).describe(Bo);
1656
+ const zo = `Color for the entity. Accepts a color key (e.g. "berry_red") or display name (e.g. "Berry Red"). Valid colors: ${De.join(", ")}. Unrecognized colors are omitted and charcoal will be used as the default.`, fe = s.preprocess(Bo, s.enum(De).optional()).describe(zo);
1657
1657
  s.enum(De);
1658
1658
  const be = s.enum(De).optional().catch(void 0), K = s.object({
1659
1659
  id: s.string(),
@@ -1697,7 +1697,7 @@ const be = s.enum(De).optional().catch(void 0), K = s.object({
1697
1697
  function G({ id: e, name: t, sectionOrder: r, description: o }) {
1698
1698
  return { id: e, name: t, sectionOrder: r, description: o ?? void 0 };
1699
1699
  }
1700
- const zo = s.object({
1700
+ const Ko = s.object({
1701
1701
  resourceType: s.string().describe("file, url, image, etc."),
1702
1702
  fileName: s.string().optional(),
1703
1703
  fileSize: s.number().optional().describe("Bytes."),
@@ -1718,8 +1718,8 @@ const zo = s.object({
1718
1718
  postedAt: s.string().describe("ISO 8601."),
1719
1719
  postedUid: s.string().optional(),
1720
1720
  notifiedUserIds: s.array(s.string()).optional().describe("Users notified about this comment. Absent when nobody was notified."),
1721
- fileAttachment: zo.optional()
1722
- }), Ko = s.object({
1721
+ fileAttachment: Ko.optional()
1722
+ }), qo = s.object({
1723
1723
  id: s.string().optional(),
1724
1724
  objectType: s.string().describe("task, project, etc."),
1725
1725
  objectId: s.string(),
@@ -1729,7 +1729,7 @@ const zo = s.object({
1729
1729
  parentItemId: s.string().optional(),
1730
1730
  initiatorId: s.string().optional().describe("User who initiated the event."),
1731
1731
  extraData: s.record(s.string(), s.unknown()).optional()
1732
- }), qo = s.object({
1732
+ }), Yo = s.object({
1733
1733
  id: s.string(),
1734
1734
  name: s.string(),
1735
1735
  email: s.string()
@@ -1739,7 +1739,7 @@ const zo = s.object({
1739
1739
  color: be,
1740
1740
  order: s.number().optional().catch(void 0).describe("Display order."),
1741
1741
  isFavorite: s.boolean()
1742
- }), Yo = s.object({
1742
+ }), Go = s.object({
1743
1743
  isRecurring: s.boolean(),
1744
1744
  string: s.string().describe("Human-readable due string."),
1745
1745
  date: s.string().describe("ISO 8601."),
@@ -1748,9 +1748,9 @@ const zo = s.object({
1748
1748
  }), lt = s.object({
1749
1749
  id: s.string(),
1750
1750
  taskId: s.string(),
1751
- type: s.enum(Xs),
1751
+ type: s.enum(Qs),
1752
1752
  minuteOffset: s.number().optional().describe("Minutes before due. Relative reminders only."),
1753
- due: Yo.optional().describe("Absolute, and sometimes relative, reminders."),
1753
+ due: Go.optional().describe("Absolute, and sometimes relative, reminders."),
1754
1754
  name: s.string().optional().describe("Location name. Location reminders only."),
1755
1755
  locLat: s.string().optional().describe("Location reminders only."),
1756
1756
  locLong: s.string().optional().describe("Location reminders only."),
@@ -1761,26 +1761,26 @@ const zo = s.object({
1761
1761
  item: s.string().describe("Usually the ID of the item that failed."),
1762
1762
  error: s.string(),
1763
1763
  code: s.string().optional()
1764
- }), Go = s.object({
1764
+ }), Vo = s.object({
1765
1765
  taskId: s.string().optional().describe("The ID of the task to comment on."),
1766
1766
  projectId: s.string().optional().describe(
1767
1767
  'The ID of the project to comment on. Project ID should be an ID string, or the text "inbox", for inbox tasks.'
1768
1768
  ),
1769
1769
  content: s.string().min(1).describe("The content of the comment."),
1770
1770
  notifyUsers: s.array(s.string().min(1)).min(1).max(j.NOTIFY_USERS_MAX).optional().describe(
1771
- `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 ["${Ts}"] to notify nobody.`
1771
+ `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 ["${ks}"] to notify nobody.`
1772
1772
  )
1773
- }), Vo = {
1774
- comments: s.array(Go).min(1).describe("The array of comments to add.")
1775
- }, Jo = {
1773
+ }), Jo = {
1774
+ comments: s.array(Vo).min(1).describe("The array of comments to add.")
1775
+ }, Xo = {
1776
1776
  comments: s.array(ve).describe("The created comments."),
1777
1777
  totalCount: s.number().describe("The total number of comments created."),
1778
1778
  addedCommentIds: s.array(s.string()).describe("The IDs of the added comments.")
1779
- }, Xo = {
1779
+ }, Qo = {
1780
1780
  name: g.ADD_COMMENTS,
1781
1781
  description: "Add multiple comments to tasks or projects, optionally notifying collaborators. Each comment must specify either taskId or projectId.",
1782
- parameters: Vo,
1783
- outputSchema: Jo,
1782
+ parameters: Jo,
1783
+ outputSchema: Xo,
1784
1784
  annotations: { readOnlyHint: !1, destructiveHint: !1, idempotentHint: !1 },
1785
1785
  async execute(e, t) {
1786
1786
  const { comments: r } = e;
@@ -1803,7 +1803,7 @@ const zo = s.object({
1803
1803
  });
1804
1804
  return p.taskId ? { taskId: p.taskId } : { projectId: h };
1805
1805
  })
1806
- ), c = await Qo({
1806
+ ), c = await Zo({
1807
1807
  comments: r,
1808
1808
  targets: a,
1809
1809
  client: t,
@@ -1821,7 +1821,7 @@ const zo = s.object({
1821
1821
  })
1822
1822
  )).map(we);
1823
1823
  return {
1824
- textContent: Zo({ comments: u }),
1824
+ textContent: en({ comments: u }),
1825
1825
  structuredContent: {
1826
1826
  comments: u,
1827
1827
  totalCount: u.length,
@@ -1830,7 +1830,7 @@ const zo = s.object({
1830
1830
  };
1831
1831
  }
1832
1832
  };
1833
- async function Qo({
1833
+ async function Zo({
1834
1834
  comments: e,
1835
1835
  targets: t,
1836
1836
  client: r,
@@ -1840,15 +1840,15 @@ async function Qo({
1840
1840
  return await Promise.all(
1841
1841
  e.map(async ({ notifyUsers: i }, a) => {
1842
1842
  if (i)
1843
- return Mo(i) ? [] : (await xo(r, i)).map((p) => p.userId);
1843
+ return Fo(i) ? [] : (await Eo(r, i)).map((p) => p.userId);
1844
1844
  const c = t[a];
1845
1845
  if (!c || !o) return [];
1846
- const d = c.taskId ? `task:${c.taskId}` : `project:${c.projectId}`, u = n.get(d) ?? Fo(r, c, o.id);
1846
+ const d = c.taskId ? `task:${c.taskId}` : `project:${c.projectId}`, u = n.get(d) ?? Ho(r, c, o.id);
1847
1847
  return n.set(d, u), await u;
1848
1848
  })
1849
1849
  );
1850
1850
  }
1851
- function Zo({ comments: e }) {
1851
+ function en({ comments: e }) {
1852
1852
  const t = e.filter((c) => c.taskId).length, r = e.filter((c) => c.projectId).length, o = [];
1853
1853
  if (t > 0) {
1854
1854
  const c = t > 1 ? "comments" : "comment";
@@ -1867,10 +1867,10 @@ function Zo({ comments: e }) {
1867
1867
  function R(e) {
1868
1868
  return s.string().transform((t) => t === "" ? void 0 : t).optional().describe(e);
1869
1869
  }
1870
- function ks(e) {
1870
+ function ws(e) {
1871
1871
  return e.description || void 0;
1872
1872
  }
1873
- const en = {
1873
+ const tn = {
1874
1874
  search: s.string().optional().describe(
1875
1875
  "Search for a filter by name (partial and case insensitive match). If omitted, all filters are returned."
1876
1876
  )
@@ -1884,14 +1884,14 @@ const en = {
1884
1884
  color: be,
1885
1885
  isFavorite: s.boolean().describe("Whether the filter is marked as favorite."),
1886
1886
  itemOrder: s.number().describe("The display order of the filter.")
1887
- }), tn = {
1887
+ }), sn = {
1888
1888
  filters: s.array(ut).describe("The found filters."),
1889
1889
  totalCount: s.number().describe("The total number of filters returned.")
1890
- }, sn = {
1890
+ }, rn = {
1891
1891
  name: g.FIND_FILTERS,
1892
1892
  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").',
1893
- parameters: en,
1894
- outputSchema: tn,
1893
+ parameters: tn,
1894
+ outputSchema: sn,
1895
1895
  annotations: { readOnlyHint: !0, destructiveHint: !1, idempotentHint: !0 },
1896
1896
  async execute(e, t) {
1897
1897
  let o = ((await t.sync({ resourceTypes: ["filters"], syncToken: "*" })).filters ?? []).filter((a) => !a.isDeleted);
@@ -1904,13 +1904,13 @@ const en = {
1904
1904
  id: a.id,
1905
1905
  name: a.name,
1906
1906
  query: a.query,
1907
- description: ks(a),
1907
+ description: ws(a),
1908
1908
  color: be.parse(a.color),
1909
1909
  isFavorite: a.isFavorite,
1910
1910
  itemOrder: a.itemOrder
1911
1911
  }));
1912
1912
  return {
1913
- textContent: rn({ filters: n, search: e.search }),
1913
+ textContent: on({ filters: n, search: e.search }),
1914
1914
  structuredContent: {
1915
1915
  filters: n,
1916
1916
  totalCount: n.length
@@ -1918,7 +1918,7 @@ const en = {
1918
1918
  };
1919
1919
  }
1920
1920
  };
1921
- function rn({
1921
+ function on({
1922
1922
  filters: e,
1923
1923
  search: t
1924
1924
  }) {
@@ -1939,7 +1939,7 @@ ${n.map((i) => `- ${i}`).join(`
1939
1939
  return o.join(`
1940
1940
  `);
1941
1941
  }
1942
- const on = s.object({
1942
+ const nn = s.object({
1943
1943
  name: s.string().min(1).describe("The name of the filter."),
1944
1944
  query: s.string().min(1).describe(
1945
1945
  'The filter query string. Examples: "today & p1", "#Work & overdue", "@email & today", "(p1 | p2) & !assigned". Operators: | (OR), & (AND), ! (NOT), () grouping, , (multiple queries).'
@@ -1947,16 +1947,16 @@ const on = s.object({
1947
1947
  description: R("A markdown description explaining what the filter is for."),
1948
1948
  color: fe,
1949
1949
  isFavorite: s.boolean().optional().describe("Whether to mark the filter as a favorite. Defaults to false.")
1950
- }), nn = {
1951
- filters: s.array(on).min(1).describe("The array of filters to add.")
1952
- }, an = {
1950
+ }), an = {
1951
+ filters: s.array(nn).min(1).describe("The array of filters to add.")
1952
+ }, cn = {
1953
1953
  filters: s.array(ut).describe("The created filters."),
1954
1954
  totalCount: s.number().describe("The total number of filters created.")
1955
- }, cn = {
1955
+ }, dn = {
1956
1956
  name: g.ADD_FILTERS,
1957
1957
  description: "Add one or more new personal filters. Filters are saved custom views using query syntax to organize tasks.",
1958
- parameters: nn,
1959
- outputSchema: an,
1958
+ parameters: an,
1959
+ outputSchema: cn,
1960
1960
  annotations: { readOnlyHint: !1, destructiveHint: !1, idempotentHint: !1 },
1961
1961
  async execute({ filters: e }, t) {
1962
1962
  const r = Date.now(), o = e.map((p, h) => `tempFilterAdd${h}${r}`), n = e.map((p, h) => Q(
@@ -1996,26 +1996,26 @@ ${u}`,
1996
1996
  }
1997
1997
  };
1998
1998
  }
1999
- }, dn = s.object({
1999
+ }, ln = s.object({
2000
2000
  name: s.string().min(1).max(128).describe("The name of the label."),
2001
2001
  color: fe,
2002
2002
  order: s.number().int().optional().describe("The position of the label in the label list."),
2003
2003
  isFavorite: s.boolean().optional().describe("Whether the label is a favorite. Defaults to false.")
2004
- }), ln = {
2005
- labels: s.array(dn).min(1).describe("The array of labels to add.")
2006
- }, un = {
2004
+ }), un = {
2005
+ labels: s.array(ln).min(1).describe("The array of labels to add.")
2006
+ }, pn = {
2007
2007
  labels: s.array(ge).describe("The created labels."),
2008
2008
  totalCount: s.number().describe("The total number of labels created.")
2009
- }, pn = {
2009
+ }, hn = {
2010
2010
  name: g.ADD_LABELS,
2011
2011
  description: "Add one or more new personal labels.",
2012
- parameters: ln,
2013
- outputSchema: un,
2012
+ parameters: un,
2013
+ outputSchema: pn,
2014
2014
  annotations: { readOnlyHint: !1, destructiveHint: !1, idempotentHint: !1 },
2015
2015
  async execute({ labels: e }, t) {
2016
2016
  const r = await Promise.all(e.map((n) => t.addLabel(n)));
2017
2017
  return {
2018
- textContent: hn({ labels: r }),
2018
+ textContent: mn({ labels: r }),
2019
2019
  structuredContent: {
2020
2020
  labels: r.map((n) => ge.parse(n)),
2021
2021
  totalCount: r.length
@@ -2023,21 +2023,21 @@ ${u}`,
2023
2023
  };
2024
2024
  }
2025
2025
  };
2026
- function hn({ labels: e }) {
2026
+ function mn({ labels: e }) {
2027
2027
  const t = e.length, r = e.map((o) => `• ${o.name} (id=${o.id})`).join(`
2028
2028
  `);
2029
2029
  return `Added ${t} label${t === 1 ? "" : "s"}:
2030
2030
  ${r}`;
2031
2031
  }
2032
- const mn = "[redacted]";
2032
+ const fn = "[redacted]";
2033
2033
  function ne(e, t, r, o = {}) {
2034
2034
  if (r.length === 0)
2035
2035
  return;
2036
- const n = r.slice(0, wr.MAX_FAILURES_LOGGED);
2036
+ const n = r.slice(0, vr.MAX_FAILURES_LOGGED);
2037
2037
  console.error(`${e}: items failed`, {
2038
2038
  failed: r.length,
2039
2039
  of: t,
2040
- sample: o.redactItems ? n.map((i) => ({ ...i, item: mn })) : n
2040
+ sample: o.redactItems ? n.map((i) => ({ ...i, item: fn })) : n
2041
2041
  });
2042
2042
  }
2043
2043
  function he(e = /* @__PURE__ */ new Date()) {
@@ -2084,20 +2084,20 @@ function mt(e, t) {
2084
2084
  Failed (${t.length}) - address or drop these items:
2085
2085
  ${n}${i}`;
2086
2086
  }
2087
- function fn(e) {
2087
+ function bn(e) {
2088
2088
  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}` : "";
2089
2089
  return ` ${t}${r}${o}${n}${i}`;
2090
2090
  }
2091
- function bn(e) {
2091
+ function gn(e) {
2092
2092
  const t = ` (${e.color})`, r = e.isFavorite ? " • ⭐" : "", o = ` • id=${e.id}`;
2093
2093
  return ` ${e.name}${t}${r}${o}`;
2094
2094
  }
2095
- function gn(e) {
2095
+ function yn(e) {
2096
2096
  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}`;
2097
2097
  return ` ${e.name}${t}${r}${o}${n}${i}${a}`;
2098
2098
  }
2099
2099
  function xe(e, t = 5) {
2100
- const o = e.slice(0, t).map(fn).join(`
2100
+ const o = e.slice(0, t).map(bn).join(`
2101
2101
  `);
2102
2102
  if (e.length > t) {
2103
2103
  const n = e.length - t;
@@ -2118,25 +2118,25 @@ function V({
2118
2118
  }) {
2119
2119
  const d = [], u = `${e}: ${t}${typeof r == "number" ? ` (limit ${r})` : ""}${o ? ", more available" : ""}.`;
2120
2120
  return d.push(u), n?.length && d.push(`Filter: ${n.join("; ")}.`), i?.length && d.push(`Preview:
2121
- ${i}`), !t && a?.length && d.push(`No results. ${a.join("; ")}.`), (c?.length || o) && d.push(ws(c || [], o)), d.join(`
2121
+ ${i}`), !t && a?.length && d.push(`No results. ${a.join("; ")}.`), (c?.length || o) && d.push(vs(c || [], o)), d.join(`
2122
2122
  `);
2123
2123
  }
2124
- function ws(e, t) {
2124
+ function vs(e, t) {
2125
2125
  const r = [...e];
2126
2126
  return t && r.push(`Pass cursor '${t}' to fetch more results.`), `${r.length === 1 ? "Possible suggested next step:" : "Possible suggested next steps:"}
2127
2127
  ${r.map((n) => `- ${n}`).join(`
2128
2128
  `)}`;
2129
2129
  }
2130
- const yn = 300 * 1e3;
2131
- function Tn(e) {
2130
+ const Tn = 300 * 1e3;
2131
+ function kn(e) {
2132
2132
  return /^\d+$/.test(e);
2133
2133
  }
2134
- class kn {
2134
+ class wn {
2135
2135
  constructor() {
2136
2136
  this.cache = null, this.inFlightWorkspaces = null;
2137
2137
  }
2138
2138
  async getWorkspaces(t) {
2139
- if (this.cache && Date.now() - this.cache.timestamp < yn)
2139
+ if (this.cache && Date.now() - this.cache.timestamp < Tn)
2140
2140
  return this.cache.workspaces;
2141
2141
  if (this.inFlightWorkspaces)
2142
2142
  return this.inFlightWorkspaces;
@@ -2163,7 +2163,7 @@ class kn {
2163
2163
  const n = await this.getWorkspaces(t), i = n.find((l) => l.id === o);
2164
2164
  if (i)
2165
2165
  return { workspaceId: i.id, workspaceName: i.name };
2166
- if (Tn(o))
2166
+ if (kn(o))
2167
2167
  return { workspaceId: o, workspaceName: o };
2168
2168
  const a = o.toLowerCase(), c = n.find((l) => l.name.toLowerCase() === a);
2169
2169
  if (c)
@@ -2191,7 +2191,7 @@ ${l}` + (d.length > 5 ? `
2191
2191
  this.cache = null;
2192
2192
  }
2193
2193
  }
2194
- const vs = new kn(), wn = s.object({
2194
+ const Is = new wn(), vn = s.object({
2195
2195
  name: s.string().min(1).describe("The name of the project."),
2196
2196
  parentId: s.string().optional().describe("The ID of the parent project. If provided, creates this as a sub-project."),
2197
2197
  isFavorite: s.boolean().optional().describe("Whether the project is a favorite. Defaults to false."),
@@ -2201,9 +2201,9 @@ const vs = new kn(), wn = s.object({
2201
2201
  workspace: s.string().trim().min(1).optional().describe(
2202
2202
  "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."
2203
2203
  )
2204
- }), vn = {
2205
- projects: s.array(wn).min(1).describe("The array of projects to add.")
2206
- }, In = {
2204
+ }), In = {
2205
+ projects: s.array(vn).min(1).describe("The array of projects to add.")
2206
+ }, Sn = {
2207
2207
  projects: s.array(re).describe("The created projects."),
2208
2208
  totalCount: s.number().describe("The total number of projects created."),
2209
2209
  failures: s.array(oe).describe(
@@ -2212,24 +2212,24 @@ const vs = new kn(), wn = s.object({
2212
2212
  totalRequested: s.number().describe("The total number of projects requested."),
2213
2213
  successCount: s.number().describe("The number of successfully created projects."),
2214
2214
  failureCount: s.number().describe("The number of failed project creations.")
2215
- }, Sn = {
2215
+ }, Cn = {
2216
2216
  name: g.ADD_PROJECTS,
2217
2217
  description: "Add one or more new projects.",
2218
- parameters: vn,
2219
- outputSchema: In,
2218
+ parameters: In,
2219
+ outputSchema: Sn,
2220
2220
  annotations: { readOnlyHint: !1, destructiveHint: !1, idempotentHint: !1 },
2221
2221
  async execute({ projects: e }, t) {
2222
2222
  const r = /* @__PURE__ */ new Map(), o = (u) => {
2223
2223
  if (!u)
2224
2224
  return Promise.resolve(void 0);
2225
2225
  let l = r.get(u);
2226
- return l || (l = P(
2227
- () => vs.resolveWorkspace(t, u)
2226
+ return l || (l = _(
2227
+ () => Is.resolveWorkspace(t, u)
2228
2228
  ).then(({ workspaceId: p }) => p), r.set(u, l)), l;
2229
2229
  }, n = await Promise.allSettled(
2230
2230
  e.map(async ({ workspace: u, ...l }) => {
2231
2231
  const p = await o(u);
2232
- return await P(
2232
+ return await _(
2233
2233
  () => t.addProject({ ...l, ...p ? { workspaceId: p } : {} })
2234
2234
  );
2235
2235
  })
@@ -2242,7 +2242,7 @@ const vs = new kn(), wn = s.object({
2242
2242
  });
2243
2243
  const c = i.map(se);
2244
2244
  return ne(g.ADD_PROJECTS, e.length, a, { redactItems: !0 }), {
2245
- textContent: Cn({ projects: i, failures: a }),
2245
+ textContent: jn({ projects: i, failures: a }),
2246
2246
  structuredContent: {
2247
2247
  projects: c,
2248
2248
  totalCount: c.length,
@@ -2254,7 +2254,7 @@ const vs = new kn(), wn = s.object({
2254
2254
  };
2255
2255
  }
2256
2256
  };
2257
- function Cn({
2257
+ function jn({
2258
2258
  projects: e,
2259
2259
  failures: t
2260
2260
  }) {
@@ -2263,12 +2263,12 @@ function Cn({
2263
2263
  ${o}` : "Added 0 projects";
2264
2264
  return mt(n, t);
2265
2265
  }
2266
- const je = 25, Ee = s.enum(Qs), Is = s.object({
2266
+ const je = 25, Ee = s.enum(Zs), Ss = s.object({
2267
2267
  date: s.string().optional().describe("Due date in YYYY-MM-DD format."),
2268
2268
  string: s.string().optional().describe('Natural language due string, e.g. "tomorrow at 3pm".'),
2269
2269
  timezone: s.string().optional().describe('Timezone for the reminder, e.g. "America/New_York".'),
2270
2270
  lang: s.string().optional().describe('Language for parsing the due string, e.g. "en".')
2271
- }), Ss = s.enum(Jt), Oe = s.boolean().optional().describe("Whether this is an urgent reminder. Applies to relative and absolute reminders."), jn = s.object({
2271
+ }), Cs = s.enum(Jt), Oe = s.boolean().optional().describe("Whether this is an urgent reminder. Applies to relative and absolute reminders."), $n = s.object({
2272
2272
  type: s.literal("relative"),
2273
2273
  taskId: s.string().min(1).describe("The ID of the task to set a reminder for."),
2274
2274
  minuteOffset: s.number().int().min(0).describe(
@@ -2278,41 +2278,41 @@ const je = 25, Ee = s.enum(Qs), Is = s.object({
2278
2278
  'Delivery method: "email" or "push" notification. Defaults to push.'
2279
2279
  ),
2280
2280
  isUrgent: Oe
2281
- }), $n = s.object({
2281
+ }), An = s.object({
2282
2282
  type: s.literal("absolute"),
2283
2283
  taskId: s.string().min(1).describe("The ID of the task to set a reminder for."),
2284
- due: Is.describe("The specific date/time for the reminder."),
2284
+ due: Ss.describe("The specific date/time for the reminder."),
2285
2285
  service: Ee.optional().describe(
2286
2286
  'Delivery method: "email" or "push" notification. Defaults to push.'
2287
2287
  ),
2288
2288
  isUrgent: Oe
2289
- }), An = s.object({
2289
+ }), Dn = s.object({
2290
2290
  type: s.literal("location"),
2291
2291
  taskId: s.string().min(1).describe("The ID of the task to set a reminder for."),
2292
2292
  name: s.string().min(1).describe('Name of the location, e.g. "Office", "Home".'),
2293
2293
  locLat: s.string().describe('Latitude of the location as a string, e.g. "37.7749".'),
2294
2294
  locLong: s.string().describe('Longitude of the location as a string, e.g. "-122.4194".'),
2295
- locTrigger: Ss.describe(
2295
+ locTrigger: Cs.describe(
2296
2296
  'When to trigger: "on_enter" (arriving) or "on_leave" (departing).'
2297
2297
  ),
2298
2298
  radius: s.number().int().optional().describe("Radius in meters for the geofence. Defaults to server default.")
2299
- }), Dn = s.discriminatedUnion("type", [
2300
- jn,
2299
+ }), xn = s.discriminatedUnion("type", [
2301
2300
  $n,
2302
- An
2303
- ]), xn = {
2304
- reminders: s.array(Dn).min(1).max(je).describe(
2301
+ An,
2302
+ Dn
2303
+ ]), En = {
2304
+ reminders: s.array(xn).min(1).max(je).describe(
2305
2305
  `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).`
2306
2306
  )
2307
- }, En = {
2307
+ }, On = {
2308
2308
  reminders: s.array(lt).describe("The created reminders."),
2309
2309
  totalCount: s.number().describe("Total number of reminders created."),
2310
2310
  addedReminderIds: s.array(s.string()).describe("IDs of the created reminders.")
2311
- }, On = {
2311
+ }, _n = {
2312
2312
  name: g.ADD_REMINDERS,
2313
2313
  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.',
2314
- parameters: xn,
2315
- outputSchema: En,
2314
+ parameters: En,
2315
+ outputSchema: On,
2316
2316
  annotations: { readOnlyHint: !1, destructiveHint: !1, idempotentHint: !1 },
2317
2317
  async execute(e, t) {
2318
2318
  const { reminders: r } = e, o = r.map(async (c) => {
@@ -2355,7 +2355,7 @@ const je = 25, Ee = s.enum(Qs), Is = s.object({
2355
2355
  }
2356
2356
  };
2357
2357
  function Pn(e) {
2358
- const { timeBasedCount: t, locationCount: r } = ys(e), o = [];
2358
+ const { timeBasedCount: t, locationCount: r } = Ts(e), o = [];
2359
2359
  if (t > 0) {
2360
2360
  const n = t > 1 ? "reminders" : "reminder";
2361
2361
  o.push(`${t} time-based ${n}`);
@@ -2366,15 +2366,15 @@ function Pn(e) {
2366
2366
  }
2367
2367
  return o.length > 0 ? `Added ${o.join(" and ")}` : "No reminders added";
2368
2368
  }
2369
- const _n = s.object({
2369
+ const Un = s.object({
2370
2370
  name: s.string().min(1).describe("The name of the section."),
2371
2371
  projectId: s.string().min(1).describe(
2372
2372
  'The ID of the project to add the section to. Project ID should be an ID string, or the text "inbox", for inbox tasks.'
2373
2373
  ),
2374
2374
  description: s.string().optional().describe("The description of the section. Supports Markdown.")
2375
- }), Un = {
2376
- sections: s.array(_n).min(1).describe("The array of sections to add.")
2377
- }, Rn = {
2375
+ }), Rn = {
2376
+ sections: s.array(Un).min(1).describe("The array of sections to add.")
2377
+ }, Ln = {
2378
2378
  sections: s.array(Y).describe("The created sections."),
2379
2379
  totalCount: s.number().describe("The total number of sections created."),
2380
2380
  failures: s.array(oe).describe(
@@ -2383,21 +2383,21 @@ const _n = s.object({
2383
2383
  totalRequested: s.number().describe("The total number of sections requested."),
2384
2384
  successCount: s.number().describe("The number of successfully created sections."),
2385
2385
  failureCount: s.number().describe("The number of failed section creations.")
2386
- }, Ln = {
2386
+ }, Nn = {
2387
2387
  name: g.ADD_SECTIONS,
2388
2388
  description: "Add one or more new sections to projects.",
2389
- parameters: Un,
2390
- outputSchema: Rn,
2389
+ parameters: Rn,
2390
+ outputSchema: Ln,
2391
2391
  annotations: { readOnlyHint: !1, destructiveHint: !1, idempotentHint: !1 },
2392
2392
  async execute({ sections: e }, t) {
2393
- const r = e.some((c) => B(c.projectId)) ? P(() => t.getUser()) : void 0, o = await Promise.allSettled(
2393
+ const r = e.some((c) => B(c.projectId)) ? _(() => t.getUser()) : void 0, o = await Promise.allSettled(
2394
2394
  e.map(async (c) => {
2395
2395
  const d = B(c.projectId) ? await r : void 0, u = await te({
2396
2396
  projectId: c.projectId,
2397
2397
  user: d,
2398
2398
  client: void 0
2399
2399
  }) ?? c.projectId;
2400
- return P(() => t.addSection({ ...c, projectId: u }));
2400
+ return _(() => t.addSection({ ...c, projectId: u }));
2401
2401
  })
2402
2402
  ), n = [], i = [];
2403
2403
  return o.forEach((c, d) => {
@@ -2406,7 +2406,7 @@ const _n = s.object({
2406
2406
  error: N(c.reason)
2407
2407
  });
2408
2408
  }), ne(g.ADD_SECTIONS, e.length, i, { redactItems: !0 }), {
2409
- textContent: Nn({ sections: n, failures: i }),
2409
+ textContent: Mn({ sections: n, failures: i }),
2410
2410
  structuredContent: {
2411
2411
  sections: n.map(G),
2412
2412
  totalCount: n.length,
@@ -2418,7 +2418,7 @@ const _n = s.object({
2418
2418
  };
2419
2419
  }
2420
2420
  };
2421
- function Nn({
2421
+ function Mn({
2422
2422
  sections: e,
2423
2423
  failures: t
2424
2424
  }) {
@@ -2436,7 +2436,7 @@ const ue = {
2436
2436
  PROJECT_NOT_FOUND: "PROJECT_NOT_FOUND",
2437
2437
  TASK_NOT_FOUND: "TASK_NOT_FOUND"
2438
2438
  };
2439
- class Mn {
2439
+ class Fn {
2440
2440
  /**
2441
2441
  * Validate a single assignment operation
2442
2442
  */
@@ -2645,7 +2645,7 @@ class Mn {
2645
2645
  };
2646
2646
  }
2647
2647
  }
2648
- const ft = new Mn(), Ot = rs.TASKS_PER_OPERATION, Fn = s.object({
2648
+ const ft = new Fn(), Ot = os.TASKS_PER_OPERATION, Hn = s.object({
2649
2649
  content: s.string().min(1).describe(
2650
2650
  '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.'
2651
2651
  ),
@@ -2675,25 +2675,25 @@ const ft = new Mn(), Ot = rs.TASKS_PER_OPERATION, Fn = s.object({
2675
2675
  isUncompletable: s.boolean().optional().describe(
2676
2676
  "Whether this task should be uncompletable (organizational header). Tasks with isUncompletable: true appear as organizational headers and cannot be completed."
2677
2677
  )
2678
- }), Pt = {
2679
- tasks: s.array(Fn).min(1).max(Ot).describe(`The array of tasks to add (max ${Ot}).`)
2680
- }, Hn = {
2678
+ }), _t = {
2679
+ tasks: s.array(Hn).min(1).max(Ot).describe(`The array of tasks to add (max ${Ot}).`)
2680
+ }, Wn = {
2681
2681
  tasks: s.array(K).describe("The created tasks."),
2682
2682
  totalCount: s.number().describe("The total number of tasks created."),
2683
2683
  failures: s.array(oe).describe("Failed task creations with error details."),
2684
2684
  totalRequested: s.number().describe("The total number of tasks requested."),
2685
2685
  successCount: s.number().describe("The number of successfully created tasks."),
2686
2686
  failureCount: s.number().describe("The number of failed task creations.")
2687
- }, Wn = {
2687
+ }, Bn = {
2688
2688
  name: g.ADD_TASKS,
2689
2689
  description: "Add one or more tasks to a project, section, or parent. Supports assignment to project collaborators.",
2690
- parameters: Pt,
2691
- outputSchema: Hn,
2690
+ parameters: _t,
2691
+ outputSchema: Wn,
2692
2692
  annotations: { readOnlyHint: !1, destructiveHint: !1, idempotentHint: !1 },
2693
2693
  async execute(e, t) {
2694
- const { tasks: r } = s.object(Pt).parse(e), o = /* @__PURE__ */ new Map();
2694
+ const { tasks: r } = s.object(_t).parse(e), o = /* @__PURE__ */ new Map();
2695
2695
  r.forEach((h, m) => {
2696
- const y = Bn(h), f = o.get(y);
2696
+ const y = zn(h), f = o.get(y);
2697
2697
  f ? f.push({ task: h, index: m }) : o.set(y, [{ task: h, index: m }]);
2698
2698
  });
2699
2699
  const n = /* @__PURE__ */ new Map(), a = (await Promise.all(
@@ -2701,7 +2701,7 @@ const ft = new Mn(), Ot = rs.TASKS_PER_OPERATION, Fn = s.object({
2701
2701
  const m = [];
2702
2702
  for (const { task: y, index: f } of h)
2703
2703
  try {
2704
- const w = await zn(y, t, n);
2704
+ const w = await Kn(y, t, n);
2705
2705
  m.push({ index: f, result: { status: "fulfilled", value: w } });
2706
2706
  } catch (w) {
2707
2707
  m.push({
@@ -2723,11 +2723,11 @@ const ft = new Mn(), Ot = rs.TASKS_PER_OPERATION, Fn = s.object({
2723
2723
  }));
2724
2724
  if (c.length === 0 && d.length > 0) {
2725
2725
  const h = d.map((y) => `"${y.item}": ${y.error}`).join("; "), m = `All ${d.length} task(s) failed to create: ${h}`;
2726
- throw u ? new ss(m) : new Error(m);
2726
+ throw u ? new rs(m) : new Error(m);
2727
2727
  }
2728
- const l = c.map(_);
2728
+ const l = c.map(P);
2729
2729
  return ne(g.ADD_TASKS, r.length, d, { redactItems: !0 }), {
2730
- textContent: Kn({
2730
+ textContent: qn({
2731
2731
  tasks: l,
2732
2732
  failures: d,
2733
2733
  args: { tasks: r }
@@ -2743,10 +2743,10 @@ const ft = new Mn(), Ot = rs.TASKS_PER_OPERATION, Fn = s.object({
2743
2743
  };
2744
2744
  }
2745
2745
  };
2746
- function Bn(e) {
2746
+ function zn(e) {
2747
2747
  return `${e.projectId ?? ""}|${e.sectionId ?? ""}|${e.parentId ?? ""}`;
2748
2748
  }
2749
- async function zn(e, t, r) {
2749
+ async function Kn(e, t, r) {
2750
2750
  const {
2751
2751
  duration: o,
2752
2752
  projectId: n,
@@ -2775,13 +2775,13 @@ async function zn(e, t, r) {
2775
2775
  labels: l,
2776
2776
  deadlineDate: p
2777
2777
  };
2778
- if (u && (y.priority = us(u)), d && !m && !i && !a)
2778
+ if (u && (y.priority = ps(u)), d && !m && !i && !a)
2779
2779
  throw new Error(
2780
2780
  `Task "${e.content}": Cannot assign tasks without specifying project context. Please specify a projectId, sectionId, or parentId.`
2781
2781
  );
2782
2782
  if (o)
2783
2783
  try {
2784
- const { minutes: f } = ls(o);
2784
+ const { minutes: f } = us(o);
2785
2785
  y = {
2786
2786
  ...y,
2787
2787
  duration: f,
@@ -2824,7 +2824,7 @@ async function zn(e, t, r) {
2824
2824
  try {
2825
2825
  return await t.addTask(y);
2826
2826
  } catch (f) {
2827
- const w = gr(f, {
2827
+ const w = yr(f, {
2828
2828
  taskContent: e.content,
2829
2829
  dueString: e.dueString,
2830
2830
  deadlineDate: e.deadlineDate
@@ -2832,7 +2832,7 @@ async function zn(e, t, r) {
2832
2832
  throw w ? new $e(w) : f;
2833
2833
  }
2834
2834
  }
2835
- function Kn({
2835
+ function qn({
2836
2836
  tasks: e,
2837
2837
  failures: t,
2838
2838
  args: r
@@ -2857,11 +2857,11 @@ function Kn({
2857
2857
  showDetails: !0
2858
2858
  });
2859
2859
  }
2860
- const qn = {
2860
+ const Yn = {
2861
2861
  projectId: s.string().min(1).describe(
2862
2862
  "The ID of the project to analyze. This triggers a new health analysis which may take some time to complete."
2863
2863
  )
2864
- }, Yn = {
2864
+ }, Gn = {
2865
2865
  projectId: s.string().describe("The project ID."),
2866
2866
  health: s.object({
2867
2867
  status: s.enum(tt).describe("The health status after triggering analysis."),
@@ -2869,11 +2869,11 @@ const qn = {
2869
2869
  updateInProgress: s.boolean().describe("Whether an analysis update is currently in progress.")
2870
2870
  }).describe("The health response returned after triggering analysis."),
2871
2871
  message: s.string().describe("A human-readable message about the analysis status.")
2872
- }, Gn = {
2872
+ }, Vn = {
2873
2873
  name: g.ANALYZE_PROJECT_HEALTH,
2874
2874
  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.",
2875
- parameters: qn,
2876
- outputSchema: Yn,
2875
+ parameters: Yn,
2876
+ outputSchema: Gn,
2877
2877
  annotations: {
2878
2878
  readOnlyHint: !1,
2879
2879
  destructiveHint: !1,
@@ -2896,19 +2896,19 @@ ${n}`,
2896
2896
  }
2897
2897
  };
2898
2898
  }
2899
- }, Vn = {
2900
- ids: s.array(s.string().min(1)).min(1).describe("The IDs of the tasks to complete.")
2901
2899
  }, Jn = {
2900
+ ids: s.array(s.string().min(1)).min(1).describe("The IDs of the tasks to complete.")
2901
+ }, Xn = {
2902
2902
  completed: s.array(s.string()).describe("The IDs of successfully completed tasks."),
2903
2903
  failures: s.array(oe).describe("Failed task completions with error details."),
2904
2904
  totalRequested: s.number().describe("The total number of tasks requested to complete."),
2905
2905
  successCount: s.number().describe("The number of successfully completed tasks."),
2906
2906
  failureCount: s.number().describe("The number of failed task completions.")
2907
- }, Xn = {
2907
+ }, Qn = {
2908
2908
  name: g.COMPLETE_TASKS,
2909
2909
  description: "Complete one or more tasks by their IDs.",
2910
- parameters: Vn,
2911
- outputSchema: Jn,
2910
+ parameters: Jn,
2911
+ outputSchema: Xn,
2912
2912
  annotations: { readOnlyHint: !1, destructiveHint: !0, idempotentHint: !1 },
2913
2913
  async execute(e, t) {
2914
2914
  const r = [], o = [];
@@ -2922,7 +2922,7 @@ ${n}`,
2922
2922
  });
2923
2923
  }
2924
2924
  return ne(g.COMPLETE_TASKS, e.ids.length, o), {
2925
- textContent: Qn({
2925
+ textContent: Zn({
2926
2926
  completed: r,
2927
2927
  failures: o,
2928
2928
  args: e
@@ -2937,7 +2937,7 @@ ${n}`,
2937
2937
  };
2938
2938
  }
2939
2939
  };
2940
- function Qn({
2940
+ function Zn({
2941
2941
  completed: e,
2942
2942
  failures: t,
2943
2943
  args: r
@@ -2950,7 +2950,7 @@ function Qn({
2950
2950
  failures: t
2951
2951
  });
2952
2952
  }
2953
- const Cs = [
2953
+ const js = [
2954
2954
  "project",
2955
2955
  "section",
2956
2956
  "task",
@@ -2959,20 +2959,20 @@ const Cs = [
2959
2959
  "filter",
2960
2960
  "reminder",
2961
2961
  "location_reminder"
2962
- ], Zn = {
2963
- type: s.enum(Cs).describe("The type of entity to delete."),
2962
+ ], ei = {
2963
+ type: s.enum(js).describe("The type of entity to delete."),
2964
2964
  id: s.string().min(1).describe("The ID of the entity to delete.")
2965
- }, ei = {
2965
+ }, ti = {
2966
2966
  deletedEntity: s.object({
2967
- type: s.enum(Cs).describe("The type of deleted entity."),
2967
+ type: s.enum(js).describe("The type of deleted entity."),
2968
2968
  id: s.string().describe("The ID of the deleted entity.")
2969
2969
  }).describe("Information about the deleted entity."),
2970
2970
  success: s.boolean().describe("Whether the deletion was successful.")
2971
- }, ti = {
2971
+ }, si = {
2972
2972
  name: g.DELETE_OBJECT,
2973
2973
  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.",
2974
- parameters: Zn,
2975
- outputSchema: ei,
2974
+ parameters: ei,
2975
+ outputSchema: ti,
2976
2976
  annotations: { readOnlyHint: !1, destructiveHint: !0, idempotentHint: !0 },
2977
2977
  async execute(e, t) {
2978
2978
  switch (e.type) {
@@ -3017,25 +3017,25 @@ const Cs = [
3017
3017
  }
3018
3018
  };
3019
3019
  }
3020
- }, _t = 5, js = ["file", "url"], si = {
3020
+ }, Pt = 5, $s = ["file", "url"], ri = {
3021
3021
  projectId: s.string().min(1).describe("The ID of the project to export as a template."),
3022
- format: s.enum(js).default("file").describe(
3022
+ format: s.enum($s).default("file").describe(
3023
3023
  '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.'
3024
3024
  ),
3025
3025
  useRelativeDates: s.boolean().optional().describe(
3026
3026
  'Export due dates relative to the import date (e.g. "day 3") instead of absolute dates. Defaults to false.'
3027
3027
  )
3028
- }, ri = {
3029
- format: s.enum(js).describe("The format the template was exported in."),
3028
+ }, oi = {
3029
+ format: s.enum($s).describe("The format the template was exported in."),
3030
3030
  content: s.string().optional().describe('The template as CSV content. Only present when format is "file".'),
3031
3031
  lineCount: s.number().optional().describe('Number of rows in the exported CSV. Only present when format is "file".'),
3032
3032
  fileName: s.string().optional().describe('The generated template file name. Only present when format is "url".'),
3033
3033
  fileUrl: s.string().optional().describe('The shareable download URL. Only present when format is "url".')
3034
- }, oi = {
3034
+ }, ni = {
3035
3035
  name: g.EXPORT_PROJECT_TEMPLATE,
3036
3036
  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.",
3037
- parameters: si,
3038
- outputSchema: ri,
3037
+ parameters: ri,
3038
+ outputSchema: oi,
3039
3039
  annotations: { readOnlyHint: !0, destructiveHint: !1, idempotentHint: !0 },
3040
3040
  // `format` is defaulted here as well as in the schema: scripts/run-tool.ts calls
3041
3041
  // execute() with raw JSON, so schema defaults are not applied on that path.
@@ -3056,14 +3056,14 @@ ${c}`,
3056
3056
  return {
3057
3057
  // The full CSV already ships in structuredContent; a preview here keeps a large
3058
3058
  // project from being spelled out twice in the response.
3059
- textContent: ni({ projectId: e, lines: i }),
3059
+ textContent: ii({ projectId: e, lines: i }),
3060
3060
  structuredContent: { format: t, content: n, lineCount: i.length }
3061
3061
  };
3062
3062
  }
3063
3063
  };
3064
- function ni({ projectId: e, lines: t }) {
3065
- const r = `Exported project (id=${e}) as a template file (${t.length} row${t.length === 1 ? "" : "s"}).`, o = t.slice(0, _t).join(`
3066
- `), n = t.length - _t;
3064
+ function ii({ projectId: e, lines: t }) {
3065
+ const r = `Exported project (id=${e}) as a template file (${t.length} row${t.length === 1 ? "" : "s"}).`, o = t.slice(0, Pt).join(`
3066
+ `), n = t.length - Pt;
3067
3067
  return n > 0 ? `${r}
3068
3068
 
3069
3069
  ${o}
@@ -3071,7 +3071,7 @@ ${o}
3071
3071
 
3072
3072
  ${o}`;
3073
3073
  }
3074
- const ii = K.pick({
3074
+ const ai = K.pick({
3075
3075
  id: !0,
3076
3076
  content: !0,
3077
3077
  dueDate: !0,
@@ -3080,15 +3080,15 @@ const ii = K.pick({
3080
3080
  hasChildren: s.boolean().describe(
3081
3081
  "Whether this subtask has subtasks of its own. Fetch it with includeChildren to expand."
3082
3082
  )
3083
- }), ai = re.pick({ id: !0, name: !0 }).extend({
3083
+ }), ci = re.pick({ id: !0, name: !0 }).extend({
3084
3084
  hasChildren: s.boolean().describe(
3085
3085
  "Whether this sub-project has sub-projects of its own. Fetch it with includeChildren to expand."
3086
3086
  )
3087
- }), ci = {
3087
+ }), di = {
3088
3088
  childCount: s.number().optional().describe(
3089
3089
  "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."
3090
3090
  ),
3091
- children: s.array(s.union([ii, ai])).optional().describe(
3091
+ children: s.array(s.union([ai, ci])).optional().describe(
3092
3092
  "Direct children only: subtasks for a task, sub-projects for a project. Completed subtasks and archived sub-projects are excluded."
3093
3093
  ),
3094
3094
  hasMoreChildren: s.boolean().optional().describe(
@@ -3098,7 +3098,7 @@ const ii = K.pick({
3098
3098
  '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".'
3099
3099
  )
3100
3100
  };
3101
- async function di(e, t) {
3101
+ async function li(e, t) {
3102
3102
  const { results: r, nextCursor: o } = await e.getTasks({
3103
3103
  parentId: t,
3104
3104
  limit: j.CHILDREN_MAX
@@ -3121,10 +3121,10 @@ async function di(e, t) {
3121
3121
  childrenError: i ? `Could not check ${i} of ${r.length} subtasks for subtasks of their own; those are reported as hasChildren=false.` : void 0
3122
3122
  };
3123
3123
  }
3124
- async function li(e, t) {
3124
+ async function ui(e, t) {
3125
3125
  if (!q(t))
3126
3126
  return { childCount: 0, children: [] };
3127
- const r = await gs(e), o = /* @__PURE__ */ new Map();
3127
+ const r = await ys(e), o = /* @__PURE__ */ new Map();
3128
3128
  for (const a of r) {
3129
3129
  if (!q(a) || !a.parentId) continue;
3130
3130
  const c = o.get(a.parentId) ?? [];
@@ -3154,22 +3154,22 @@ function Rt(e, t) {
3154
3154
  const r = t.hasMoreChildren ? "+" : "", o = t.childrenError ? " (partial)" : "";
3155
3155
  return ` • ${e}=${t.childCount}${r}${o}`;
3156
3156
  }
3157
- const $s = ["task", "project", "comment", "section"], ui = {
3158
- type: s.enum($s).describe("The type of object to fetch."),
3157
+ const As = ["task", "project", "comment", "section"], pi = {
3158
+ type: s.enum(As).describe("The type of object to fetch."),
3159
3159
  id: s.string().min(1).describe("The unique ID of the object to fetch."),
3160
3160
  includeChildren: s.boolean().optional().describe(
3161
3161
  "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."
3162
3162
  )
3163
- }, pi = {
3164
- type: s.enum($s).describe("The type of object fetched."),
3163
+ }, hi = {
3164
+ type: s.enum(As).describe("The type of object fetched."),
3165
3165
  id: s.string().describe("The ID of the fetched object."),
3166
3166
  object: s.union([K, re, ve, Y]).describe("The fetched object data."),
3167
- ...ci
3168
- }, hi = {
3167
+ ...di
3168
+ }, mi = {
3169
3169
  name: g.FETCH_OBJECT,
3170
3170
  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.",
3171
- parameters: ui,
3172
- outputSchema: pi,
3171
+ parameters: pi,
3172
+ outputSchema: hi,
3173
3173
  annotations: { readOnlyHint: !0, destructiveHint: !1, idempotentHint: !0 },
3174
3174
  async execute(e, t) {
3175
3175
  const { type: r, id: o, includeChildren: n } = e;
@@ -3178,8 +3178,8 @@ const $s = ["task", "project", "comment", "section"], ui = {
3178
3178
  case "task": {
3179
3179
  const [i, a] = await Promise.all([
3180
3180
  t.getTask(o),
3181
- n ? Ut(() => di(t, o)) : Promise.resolve({})
3182
- ]), c = _(i);
3181
+ n ? Ut(() => li(t, o)) : Promise.resolve({})
3182
+ ]), c = P(i);
3183
3183
  return {
3184
3184
  textContent: `Found task: ${c.content} • id=${c.id} • priority=${c.priority} • project=${c.projectId}${Rt("subtasks", a)}`,
3185
3185
  structuredContent: {
@@ -3191,7 +3191,7 @@ const $s = ["task", "project", "comment", "section"], ui = {
3191
3191
  };
3192
3192
  }
3193
3193
  case "project": {
3194
- const i = await t.getProject(o), a = se(i), c = n ? await Ut(() => li(t, i)) : {};
3194
+ const i = await t.getProject(o), a = se(i), c = n ? await Ut(() => ui(t, i)) : {};
3195
3195
  return {
3196
3196
  textContent: `Found project: ${a.name} • id=${a.id} • color=${a.color} • viewStyle=${a.viewStyle}${Rt("subProjects", c)}`,
3197
3197
  structuredContent: {
@@ -3234,21 +3234,21 @@ const $s = ["task", "project", "comment", "section"], ui = {
3234
3234
  );
3235
3235
  }
3236
3236
  }
3237
- }, mi = {
3237
+ }, fi = {
3238
3238
  id: s.string().min(1).describe(
3239
3239
  'A unique identifier for the document in the format "task:{id}" or "project:{id}".'
3240
3240
  )
3241
- }, fi = {
3241
+ }, bi = {
3242
3242
  id: s.string().describe("The ID of the fetched document."),
3243
3243
  title: s.string().describe("The title of the document."),
3244
3244
  text: s.string().describe("The text content of the document."),
3245
3245
  url: s.string().describe("The URL of the document."),
3246
3246
  metadata: s.record(s.string(), s.unknown()).optional().describe("Additional metadata about the document.")
3247
- }, bi = {
3247
+ }, gi = {
3248
3248
  name: g.FETCH,
3249
3249
  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}".',
3250
- parameters: mi,
3251
- outputSchema: fi,
3250
+ parameters: fi,
3251
+ outputSchema: bi,
3252
3252
  annotations: { readOnlyHint: !0, destructiveHint: !1, idempotentHint: !0 },
3253
3253
  async execute(e, t) {
3254
3254
  const { id: r } = e, [o, n] = r.split(":", 2);
@@ -3258,7 +3258,7 @@ const $s = ["task", "project", "comment", "section"], ui = {
3258
3258
  );
3259
3259
  let i;
3260
3260
  if (o === "task") {
3261
- const a = await t.getTask(n), c = _(a), d = [c.content];
3261
+ const a = await t.getTask(n), c = P(a), d = [c.content];
3262
3262
  c.description && d.push(`
3263
3263
 
3264
3264
  Description: ${c.description}`), c.dueDate && d.push(`
@@ -3308,11 +3308,11 @@ Favorite: Yes`), i = {
3308
3308
  structuredContent: i
3309
3309
  };
3310
3310
  }
3311
- }, gi = s.union([s.iso.date(), s.iso.datetime({ offset: !0 })]);
3311
+ }, yi = s.union([s.iso.date(), s.iso.datetime({ offset: !0 })]);
3312
3312
  function Lt(e) {
3313
- return R(e).pipe(gi.optional());
3313
+ return R(e).pipe(yi.optional());
3314
3314
  }
3315
- const yi = {
3315
+ const Ti = {
3316
3316
  objectType: s.enum(["task", "project", "comment"]).optional().describe("Type of object to filter by."),
3317
3317
  objectId: s.string().optional().describe("Filter by specific object ID (task, project, or comment)."),
3318
3318
  eventType: s.enum([
@@ -3339,17 +3339,17 @@ const yi = {
3339
3339
  ),
3340
3340
  limit: s.number().int().min(1).max(j.ACTIVITY_MAX).default(j.ACTIVITY_DEFAULT).describe("Maximum number of activity events to return."),
3341
3341
  cursor: s.string().optional().describe("Pagination cursor for retrieving the next page of results.")
3342
- }, Ti = {
3343
- events: s.array(Ko).describe("The activity events."),
3342
+ }, ki = {
3343
+ events: s.array(qo).describe("The activity events."),
3344
3344
  nextCursor: s.string().optional(),
3345
3345
  totalCount: s.number().describe("The total number of events in this page."),
3346
3346
  hasMore: s.boolean(),
3347
3347
  appliedFilters: s.record(s.string(), s.unknown())
3348
- }, ki = {
3348
+ }, wi = {
3349
3349
  name: g.FIND_ACTIVITY,
3350
3350
  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.`,
3351
- parameters: yi,
3352
- outputSchema: Ti,
3351
+ parameters: Ti,
3352
+ outputSchema: ki,
3353
3353
  annotations: { readOnlyHint: !0, destructiveHint: !1, idempotentHint: !0 },
3354
3354
  async execute(e, t) {
3355
3355
  const {
@@ -3368,9 +3368,9 @@ const yi = {
3368
3368
  cursor: p ?? null
3369
3369
  };
3370
3370
  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);
3371
- const { results: m, nextCursor: y } = await t.getActivityLogs(h), f = m.map(Lo);
3371
+ const { results: m, nextCursor: y } = await t.getActivityLogs(h), f = m.map(No);
3372
3372
  return {
3373
- textContent: wi({ events: f, args: e, nextCursor: y }),
3373
+ textContent: vi({ events: f, args: e, nextCursor: y }),
3374
3374
  structuredContent: {
3375
3375
  events: f,
3376
3376
  nextCursor: y ?? void 0,
@@ -3381,7 +3381,7 @@ const yi = {
3381
3381
  };
3382
3382
  }
3383
3383
  };
3384
- function wi({
3384
+ function vi({
3385
3385
  events: e,
3386
3386
  args: t,
3387
3387
  nextCursor: r
@@ -3402,12 +3402,12 @@ function wi({
3402
3402
  limit: t.limit,
3403
3403
  nextCursor: r ?? void 0,
3404
3404
  filterHints: i,
3405
- previewLines: vi(e, Math.min(e.length, t.limit)),
3405
+ previewLines: Ii(e, Math.min(e.length, t.limit)),
3406
3406
  zeroReasonHints: a
3407
3407
  });
3408
3408
  }
3409
- function vi(e, t = 10) {
3410
- const o = e.slice(0, t).map(Ii).join(`
3409
+ function Ii(e, t = 10) {
3410
+ const o = e.slice(0, t).map(Si).join(`
3411
3411
  `);
3412
3412
  if (e.length > t) {
3413
3413
  const n = e.length - t;
@@ -3416,8 +3416,8 @@ function vi(e, t = 10) {
3416
3416
  }
3417
3417
  return o;
3418
3418
  }
3419
- function Ii(e) {
3420
- const t = Si(e.eventDate), r = `${e.eventType} ${e.objectType}`;
3419
+ function Si(e) {
3420
+ const t = Ci(e.eventDate), r = `${e.eventType} ${e.objectType}`;
3421
3421
  let o = "";
3422
3422
  if (e.extraData) {
3423
3423
  const c = e.extraData.content || e.extraData.name || e.extraData.last_content;
@@ -3426,7 +3426,7 @@ function Ii(e) {
3426
3426
  const n = e.objectId ? ` • id=${e.objectId}` : "", i = e.initiatorId ? ` • by=${e.initiatorId}` : " • system", a = e.parentProjectId ? ` • project=${e.parentProjectId}` : "";
3427
3427
  return ` [${t}] ${r}${o}${n}${i}${a}`;
3428
3428
  }
3429
- function Si(e) {
3429
+ function Ci(e) {
3430
3430
  try {
3431
3431
  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", {
3432
3432
  hour: "2-digit",
@@ -3439,7 +3439,7 @@ function Si(e) {
3439
3439
  return e;
3440
3440
  }
3441
3441
  }
3442
- const Ci = {
3442
+ const ji = {
3443
3443
  taskId: s.string().optional().describe("Find comments for a specific task."),
3444
3444
  projectId: s.string().optional().describe(
3445
3445
  'Find comments for a specific project. Project ID should be an ID string, or the text "inbox", for inbox tasks.'
@@ -3447,7 +3447,7 @@ const Ci = {
3447
3447
  commentId: s.string().optional().describe("Get a specific comment by ID."),
3448
3448
  cursor: s.string().optional().describe("Pagination cursor for retrieving more results."),
3449
3449
  limit: s.number().int().min(1).max(j.COMMENTS_MAX).optional().describe("Maximum number of comments to return")
3450
- }, ji = {
3450
+ }, $i = {
3451
3451
  comments: s.array(ve).describe("The found comments."),
3452
3452
  searchType: s.string().describe(
3453
3453
  'The type of search performed: "single" (comment ID), "task" (task ID), or "project" (project ID).'
@@ -3456,11 +3456,11 @@ const Ci = {
3456
3456
  hasMore: s.boolean(),
3457
3457
  nextCursor: s.string().optional(),
3458
3458
  totalCount: s.number().describe("The total number of comments in this page.")
3459
- }, $i = {
3459
+ }, Ai = {
3460
3460
  name: g.FIND_COMMENTS,
3461
3461
  description: "Find comments by task, project, or get a specific comment by ID. Exactly one of taskId, projectId, or commentId must be provided.",
3462
- parameters: Ci,
3463
- outputSchema: ji,
3462
+ parameters: ji,
3463
+ outputSchema: $i,
3464
3464
  annotations: { readOnlyHint: !0, destructiveHint: !1, idempotentHint: !0 },
3465
3465
  async execute(e, t) {
3466
3466
  const r = Ae(e.cursor), o = [e.taskId, e.projectId, e.commentId].filter(Boolean);
@@ -3495,7 +3495,7 @@ const Ci = {
3495
3495
  throw new Error("Invalid state: no search parameter provided");
3496
3496
  const d = c.map(we);
3497
3497
  return {
3498
- textContent: Ai({
3498
+ textContent: Di({
3499
3499
  comments: d,
3500
3500
  searchType: e.commentId ? "single" : e.taskId ? "task" : "project",
3501
3501
  searchId: e.commentId || e.taskId || e.projectId || "",
@@ -3513,7 +3513,7 @@ const Ci = {
3513
3513
  };
3514
3514
  }
3515
3515
  };
3516
- function Ai({
3516
+ function Di({
3517
3517
  comments: e,
3518
3518
  searchType: t,
3519
3519
  searchId: r,
@@ -3533,37 +3533,37 @@ function Ai({
3533
3533
  i = `Found ${e.length} ${d} for ${t} ${r}${c}`, o && (i += " • More available");
3534
3534
  }
3535
3535
  if (n) {
3536
- const a = ws([], n);
3536
+ const a = vs([], n);
3537
3537
  return `${i}
3538
3538
  ${a}`;
3539
3539
  }
3540
3540
  return i;
3541
3541
  }
3542
- function As(e) {
3542
+ function Ds(e) {
3543
3543
  const t = e.getUTCFullYear(), r = String(e.getUTCMonth() + 1).padStart(2, "0"), o = String(e.getUTCDate()).padStart(2, "0");
3544
3544
  return `${t}-${r}-${o}`;
3545
3545
  }
3546
- function Di(e) {
3546
+ function xi(e) {
3547
3547
  const t = /^([+-])(\d{2}):(\d{2})$/.exec(e);
3548
3548
  if (!t)
3549
3549
  return 0;
3550
3550
  const [, r, o, n] = t, i = Number(o) * 60 + Number(n);
3551
3551
  return r === "-" ? -i : i;
3552
3552
  }
3553
- function xi(e, t) {
3553
+ function Ei(e, t) {
3554
3554
  const r = new Date(e.getTime() + t * 60 * 1e3);
3555
- return As(r);
3555
+ return Ds(r);
3556
3556
  }
3557
3557
  function Nt(e, t) {
3558
3558
  const [r, o, n] = e.split("-"), i = Number(r), a = Number(o), c = Number(n);
3559
3559
  if (!Number.isFinite(i) || !Number.isFinite(a) || !Number.isFinite(c))
3560
3560
  throw new Error(`Invalid date format: ${e}. Expected YYYY-MM-DD.`);
3561
3561
  const d = new Date(Date.UTC(i, a - 1, c));
3562
- return d.setUTCDate(d.getUTCDate() + t), As(d);
3562
+ return d.setUTCDate(d.getUTCDate() + t), Ds(d);
3563
3563
  }
3564
- const Ei = ["and", "or"], bt = {
3564
+ const Oi = ["and", "or"], bt = {
3565
3565
  labels: s.string().array().optional().describe("The labels to filter the tasks by"),
3566
- labelsOperator: s.enum(Ei).optional().describe(
3566
+ labelsOperator: s.enum(Oi).optional().describe(
3567
3567
  'The operator to use when filtering by labels. This will dictate whether a task has all labels, or some of them. Default is "or".'
3568
3568
  )
3569
3569
  };
@@ -3572,20 +3572,20 @@ function gt(e = [], t = "or") {
3572
3572
  const r = t === "and" ? " & " : " | ";
3573
3573
  return `(${e.map((i) => i.startsWith("@") ? i : `@${i}`).join(` ${r} `)})`;
3574
3574
  }
3575
- const Oi = 7;
3575
+ const _i = 7;
3576
3576
  function Pi({
3577
3577
  since: e,
3578
3578
  until: t,
3579
3579
  userGmtOffset: r,
3580
3580
  now: o = /* @__PURE__ */ new Date()
3581
3581
  }) {
3582
- const n = Di(r), i = xi(o, n), a = Oi - 1, c = t ?? (e ? Nt(e, a) : i);
3582
+ const n = xi(r), i = Ei(o, n), a = _i - 1, c = t ?? (e ? Nt(e, a) : i);
3583
3583
  return {
3584
3584
  since: e ?? Nt(c, -a),
3585
3585
  until: c
3586
3586
  };
3587
3587
  }
3588
- const _i = {
3588
+ const Ui = {
3589
3589
  getBy: s.enum(["completion", "due"]).default("completion").describe(
3590
3590
  '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).'
3591
3591
  ),
@@ -3609,17 +3609,17 @@ const _i = {
3609
3609
  "The cursor to get the next page of tasks (cursor is obtained from the previous call to this tool, with the same parameters)."
3610
3610
  ),
3611
3611
  ...bt
3612
- }, Ui = {
3612
+ }, Ri = {
3613
3613
  tasks: s.array(K).describe("The found completed tasks."),
3614
3614
  nextCursor: s.string().optional(),
3615
3615
  totalCount: s.number().describe("The total number of tasks in this page."),
3616
3616
  hasMore: s.boolean(),
3617
3617
  appliedFilters: s.record(s.string(), s.unknown())
3618
- }, Ri = {
3618
+ }, Li = {
3619
3619
  name: g.FIND_COMPLETED_TASKS,
3620
3620
  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.',
3621
- parameters: _i,
3622
- outputSchema: Ui,
3621
+ parameters: Ui,
3622
+ outputSchema: Ri,
3623
3623
  annotations: { readOnlyHint: !0, destructiveHint: !1, idempotentHint: !0 },
3624
3624
  async execute(e, t) {
3625
3625
  const {
@@ -3665,9 +3665,9 @@ const _i = {
3665
3665
  since: k,
3666
3666
  until: b,
3667
3667
  ...f ? { filterQuery: f, filterLang: "en" } : {}
3668
- }), E = A.map(_);
3668
+ }), E = A.map(P);
3669
3669
  return {
3670
- textContent: Li({
3670
+ textContent: Ni({
3671
3671
  tasks: E,
3672
3672
  args: S,
3673
3673
  nextCursor: x,
@@ -3683,7 +3683,7 @@ const _i = {
3683
3683
  };
3684
3684
  }
3685
3685
  };
3686
- function Li({
3686
+ function Ni({
3687
3687
  tasks: e,
3688
3688
  args: t,
3689
3689
  nextCursor: r,
@@ -3709,7 +3709,7 @@ function Li({
3709
3709
  zeroReasonHints: c
3710
3710
  });
3711
3711
  }
3712
- const Ni = {
3712
+ const Mi = {
3713
3713
  searchText: s.string().optional().describe(
3714
3714
  '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.'
3715
3715
  ),
@@ -3717,7 +3717,7 @@ const Ni = {
3717
3717
  cursor: s.string().optional().describe(
3718
3718
  "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."
3719
3719
  )
3720
- }, Mi = {
3720
+ }, Fi = {
3721
3721
  labels: s.array(ge).describe("The found personal labels."),
3722
3722
  nextCursor: s.string().optional(),
3723
3723
  totalCount: s.number().describe("The total number of labels in this page."),
@@ -3726,22 +3726,22 @@ const Ni = {
3726
3726
  "Names of all shared labels visible to you. These have no IDs or metadata — use their names directly when filtering tasks."
3727
3727
  ),
3728
3728
  appliedFilters: s.record(s.string(), s.unknown())
3729
- }, Fi = {
3729
+ }, Hi = {
3730
3730
  name: g.FIND_LABELS,
3731
3731
  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.",
3732
- parameters: Ni,
3733
- outputSchema: Mi,
3732
+ parameters: Mi,
3733
+ outputSchema: Fi,
3734
3734
  annotations: { readOnlyHint: !0, destructiveHint: !1, idempotentHint: !0 },
3735
3735
  async execute(e, t) {
3736
3736
  const [r, o] = await Promise.all([
3737
- e.searchText ? _o(t, e.searchText).then((c) => ({
3737
+ e.searchText ? Uo(t, e.searchText).then((c) => ({
3738
3738
  results: c,
3739
3739
  nextCursor: null
3740
3740
  })) : t.getLabels({ limit: e.limit, cursor: e.cursor ?? null }),
3741
- Uo(t)
3741
+ Ro(t)
3742
3742
  ]), { results: n, nextCursor: i } = r, a = e.searchText ? { searchText: e.searchText } : { limit: e.limit, cursor: e.cursor };
3743
3743
  return {
3744
- textContent: Hi({ labels: n, args: e, nextCursor: i, sharedLabels: o }),
3744
+ textContent: Wi({ labels: n, args: e, nextCursor: i, sharedLabels: o }),
3745
3745
  structuredContent: {
3746
3746
  labels: n.map((c) => ge.parse(c)),
3747
3747
  nextCursor: i ?? void 0,
@@ -3753,7 +3753,7 @@ const Ni = {
3753
3753
  };
3754
3754
  }
3755
3755
  };
3756
- function Hi({
3756
+ function Wi({
3757
3757
  labels: e,
3758
3758
  args: t,
3759
3759
  nextCursor: r,
@@ -3761,7 +3761,7 @@ function Hi({
3761
3761
  }) {
3762
3762
  const n = t.searchText ? `All labels matching "${t.searchText}"` : "Labels", i = [];
3763
3763
  t.searchText && i.push(`searchText: "${t.searchText}"`);
3764
- const a = 10, d = e.slice(0, a).map(bn).join(`
3764
+ const a = 10, d = e.slice(0, a).map(gn).join(`
3765
3765
  `), u = e.length - a, l = u > 0 ? `${d}
3766
3766
  …and ${u} more` : d, p = [];
3767
3767
  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"));
@@ -3778,15 +3778,15 @@ No shared labels.`;
3778
3778
  zeroReasonHints: p
3779
3779
  }) + h;
3780
3780
  }
3781
- const { FIND_PROJECTS: Ds, ADD_TASKS: xs, UPDATE_TASKS: Es } = g, Wi = {
3781
+ const { FIND_PROJECTS: xs, ADD_TASKS: Es, UPDATE_TASKS: Os } = g, Bi = {
3782
3782
  projectId: s.string().min(1).optional().describe(
3783
3783
  '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.'
3784
3784
  ),
3785
3785
  searchTerm: s.string().optional().describe(
3786
3786
  "Search for a user by name or email (partial and case insensitive match). If omitted, all users are returned."
3787
3787
  )
3788
- }, Bi = {
3789
- collaborators: s.array(qo).describe("The found users."),
3788
+ }, zi = {
3789
+ collaborators: s.array(Yo).describe("The found users."),
3790
3790
  projectInfo: s.object({
3791
3791
  id: s.string().describe("The project ID."),
3792
3792
  name: s.string().describe("The project name."),
@@ -3795,16 +3795,16 @@ const { FIND_PROJECTS: Ds, ADD_TASKS: xs, UPDATE_TASKS: Es } = g, Wi = {
3795
3795
  totalCount: s.number().describe("The total number of users found."),
3796
3796
  totalAvailable: s.number().optional().describe("The total number of available users before the search filter was applied."),
3797
3797
  appliedFilters: s.record(s.string(), s.unknown())
3798
- }, zi = {
3798
+ }, Ki = {
3799
3799
  name: g.FIND_PROJECT_COLLABORATORS,
3800
3800
  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.`,
3801
- parameters: Wi,
3802
- outputSchema: Bi,
3801
+ parameters: Bi,
3802
+ outputSchema: zi,
3803
3803
  annotations: { readOnlyHint: !0, destructiveHint: !1, idempotentHint: !0 },
3804
3804
  async execute(e, t) {
3805
3805
  const { projectId: r, searchTerm: o } = e;
3806
3806
  if (!r)
3807
- return Ki({ searchTerm: o, client: t, appliedFilters: e });
3807
+ return qi({ searchTerm: o, client: t, appliedFilters: e });
3808
3808
  let n = r, i;
3809
3809
  try {
3810
3810
  if (i = await t.getProject(r), !i)
@@ -3815,7 +3815,7 @@ const { FIND_PROJECTS: Ds, ADD_TASKS: xs, UPDATE_TASKS: Es } = g, Wi = {
3815
3815
 
3816
3816
  **Next steps:**
3817
3817
  • Share the project to enable collaboration
3818
- • Use ${xs} and ${Es} for assignment features once shared`,
3818
+ • Use ${Es} and ${Os} for assignment features once shared`,
3819
3819
  structuredContent: {
3820
3820
  collaborators: [],
3821
3821
  projectInfo: {
@@ -3852,7 +3852,7 @@ const { FIND_PROJECTS: Ds, ADD_TASKS: xs, UPDATE_TASKS: Es } = g, Wi = {
3852
3852
  appliedFilters: e
3853
3853
  }
3854
3854
  };
3855
- const c = Os(a, o);
3855
+ const c = _s(a, o);
3856
3856
  return {
3857
3857
  textContent: Ps({
3858
3858
  collaborators: c,
@@ -3874,18 +3874,18 @@ const { FIND_PROJECTS: Ds, ADD_TASKS: xs, UPDATE_TASKS: Es } = g, Wi = {
3874
3874
  };
3875
3875
  }
3876
3876
  };
3877
- async function Ki({
3877
+ async function qi({
3878
3878
  searchTerm: e,
3879
3879
  client: t,
3880
3880
  appliedFilters: r
3881
3881
  }) {
3882
- const o = await H.getAllCollaborators(t), n = await qi(t, o);
3882
+ const o = await H.getAllCollaborators(t), n = await Yi(t, o);
3883
3883
  if (n.length === 0)
3884
3884
  return {
3885
3885
  textContent: `No users found. You may have no shared projects, or collaborator data is not accessible.
3886
3886
 
3887
3887
  **Next steps:**
3888
- • Use ${Ds} to find shared projects
3888
+ • Use ${xs} to find shared projects
3889
3889
  • Share a project to add collaborators
3890
3890
  • Ensure you have permission to view collaborators`,
3891
3891
  structuredContent: {
@@ -3896,7 +3896,7 @@ async function Ki({
3896
3896
  appliedFilters: r
3897
3897
  }
3898
3898
  };
3899
- const i = Os(n, e);
3899
+ const i = _s(n, e);
3900
3900
  return {
3901
3901
  textContent: Ps({
3902
3902
  collaborators: i,
@@ -3913,7 +3913,7 @@ async function Ki({
3913
3913
  }
3914
3914
  };
3915
3915
  }
3916
- async function qi(e, t) {
3916
+ async function Yi(e, t) {
3917
3917
  try {
3918
3918
  const r = await e.getUser();
3919
3919
  return !r || t.some((o) => o.id === r.id) ? t : [
@@ -3924,7 +3924,7 @@ async function qi(e, t) {
3924
3924
  return t;
3925
3925
  }
3926
3926
  }
3927
- function Os(e, t) {
3927
+ function _s(e, t) {
3928
3928
  if (!t)
3929
3929
  return e;
3930
3930
  const r = t.toLowerCase().trim();
@@ -3948,7 +3948,7 @@ function Ps({
3948
3948
  const u = [];
3949
3949
  e.length === 0 && r && (u.push(`No users match "${r}"`), u.push("Try a broader search term or check spelling"), o > 0 && u.push(`${o} users available without filter`));
3950
3950
  const l = [];
3951
- return e.length > 0 ? (l.push(`Use ${xs} with responsibleUser to assign new tasks`), l.push(`Use ${Es} with responsibleUser to reassign existing tasks`), l.push("Use user names, emails, or IDs for assignments")) : (l.push(`Use ${Ds} to find other projects`), r && o > 0 && l.push("Try searching without filters to see all users")), V({
3951
+ return e.length > 0 ? (l.push(`Use ${Es} with responsibleUser to assign new tasks`), l.push(`Use ${Os} with responsibleUser to reassign existing tasks`), l.push("Use user names, emails, or IDs for assignments")) : (l.push(`Use ${xs} to find other projects`), r && o > 0 && l.push("Try searching without filters to see all users")), V({
3952
3952
  subject: a,
3953
3953
  count: e.length,
3954
3954
  filterHints: c,
@@ -3958,11 +3958,11 @@ function Ps({
3958
3958
  nextSteps: l
3959
3959
  });
3960
3960
  }
3961
- const { ADD_PROJECTS: Mt } = g, Yi = {
3961
+ const { ADD_PROJECTS: Mt } = g, Gi = {
3962
3962
  active: "projects",
3963
3963
  archived: "archived projects",
3964
3964
  all: "projects (active and archived)"
3965
- }, Gi = {
3965
+ }, Vi = {
3966
3966
  searchText: s.string().optional().describe(
3967
3967
  '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.'
3968
3968
  ),
@@ -3973,25 +3973,25 @@ const { ADD_PROJECTS: Mt } = g, Yi = {
3973
3973
  archivedStatus: s.enum(["active", "archived", "all"]).optional().describe(
3974
3974
  "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')."
3975
3975
  )
3976
- }, Vi = {
3976
+ }, Ji = {
3977
3977
  projects: s.array(re).describe("The found projects."),
3978
3978
  nextCursor: s.string().optional(),
3979
3979
  totalCount: s.number().describe("The total number of projects in this page."),
3980
3980
  hasMore: s.boolean(),
3981
3981
  appliedFilters: s.record(s.string(), s.unknown())
3982
- }, Ji = {
3982
+ }, Xi = {
3983
3983
  name: g.FIND_PROJECTS,
3984
3984
  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.",
3985
- parameters: Gi,
3986
- outputSchema: Vi,
3985
+ parameters: Vi,
3986
+ outputSchema: Ji,
3987
3987
  annotations: { readOnlyHint: !0, destructiveHint: !1, idempotentHint: !0 },
3988
3988
  async execute(e, t) {
3989
3989
  const { searchText: r } = e, o = e.archivedStatus ?? "active";
3990
3990
  let n, i = null;
3991
3991
  if (r || o === "all") {
3992
3992
  const c = Promise.resolve([]), [d, u] = await Promise.all([
3993
- o === "archived" ? c : r ? bs(t, r) : gs(t),
3994
- o === "active" ? c : Oo(t)
3993
+ o === "archived" ? c : r ? gs(t, r) : ys(t),
3994
+ o === "active" ? c : _o(t)
3995
3995
  ]), l = r ? Po(r) : null, p = l ? u.filter((h) => l.test(h.name)) : u;
3996
3996
  n = [...d, ...p];
3997
3997
  } else {
@@ -4003,7 +4003,7 @@ const { ADD_PROJECTS: Mt } = g, Yi = {
4003
4003
  }
4004
4004
  const a = n.map(se);
4005
4005
  return {
4006
- textContent: Xi({ projects: a, args: e, nextCursor: i }),
4006
+ textContent: Qi({ projects: a, args: e, nextCursor: i }),
4007
4007
  structuredContent: {
4008
4008
  projects: a,
4009
4009
  nextCursor: i ?? void 0,
@@ -4014,14 +4014,14 @@ const { ADD_PROJECTS: Mt } = g, Yi = {
4014
4014
  };
4015
4015
  }
4016
4016
  };
4017
- function Xi({
4017
+ function Qi({
4018
4018
  projects: e,
4019
4019
  args: t,
4020
4020
  nextCursor: r
4021
4021
  }) {
4022
- const o = Yi[t.archivedStatus ?? "active"], n = t.searchText ? `All ${o} matching "${t.searchText}"` : `${o.charAt(0).toUpperCase()}${o.slice(1)}`, i = [];
4022
+ const o = Gi[t.archivedStatus ?? "active"], n = t.searchText ? `All ${o} matching "${t.searchText}"` : `${o.charAt(0).toUpperCase()}${o.slice(1)}`, i = [];
4023
4023
  t.searchText && i.push(`searchText: "${t.searchText}"`), t.archivedStatus && t.archivedStatus !== "active" && i.push(`archivedStatus: "${t.archivedStatus}"`);
4024
- const a = 10, d = e.slice(0, a).map(gn).join(`
4024
+ const a = 10, d = e.slice(0, a).map(yn).join(`
4025
4025
  `), u = e.length - a, l = u > 0 ? `${d}
4026
4026
  …and ${u} more` : d, p = [];
4027
4027
  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 ${Mt} to create a project`)) : (p.push("No active projects"), p.push("Use archivedStatus: 'all' to include archived projects"), p.push(`Use ${Mt} to create a project`))), V({
@@ -4034,22 +4034,22 @@ function Xi({
4034
4034
  zeroReasonHints: p
4035
4035
  });
4036
4036
  }
4037
- const Qi = {
4037
+ const Zi = {
4038
4038
  taskId: s.string().optional().describe(
4039
4039
  "Find all reminders for a specific task. Returns both time-based and location reminders."
4040
4040
  ),
4041
4041
  reminderId: s.string().optional().describe("Get a specific time-based reminder (relative or absolute) by its ID."),
4042
4042
  locationReminderId: s.string().optional().describe("Get a specific location reminder by its ID.")
4043
- }, Zi = {
4043
+ }, ea = {
4044
4044
  reminders: s.array(lt).describe("The found reminders (time-based and location)."),
4045
4045
  searchType: s.string().describe('The search type used: "task", "reminder", or "location_reminder".'),
4046
4046
  searchId: s.string().describe("The ID used for the search."),
4047
4047
  totalCount: s.number().describe("Total reminders in this response.")
4048
- }, ea = {
4048
+ }, ta = {
4049
4049
  name: g.FIND_REMINDERS,
4050
4050
  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.",
4051
- parameters: Qi,
4052
- outputSchema: Zi,
4051
+ parameters: Zi,
4052
+ outputSchema: ea,
4053
4053
  annotations: { readOnlyHint: !0, destructiveHint: !1, idempotentHint: !0 },
4054
4054
  async execute(e, t) {
4055
4055
  const { taskId: r, reminderId: o, locationReminderId: n } = e, i = [r, o, n].filter(Boolean);
@@ -4095,7 +4095,7 @@ const Qi = {
4095
4095
  })
4096
4096
  ]), u = [...a, ...c].map(ke);
4097
4097
  return {
4098
- textContent: ta(u, r),
4098
+ textContent: sa(u, r),
4099
4099
  structuredContent: {
4100
4100
  reminders: u,
4101
4101
  searchType: "task",
@@ -4107,10 +4107,10 @@ const Qi = {
4107
4107
  throw new Error("One of taskId, reminderId, or locationReminderId must be provided.");
4108
4108
  }
4109
4109
  };
4110
- function ta(e, t) {
4110
+ function sa(e, t) {
4111
4111
  if (e.length === 0)
4112
4112
  return `No reminders found for task ${t}`;
4113
- const { timeBasedCount: r, locationCount: o } = ys(e), n = [];
4113
+ const { timeBasedCount: r, locationCount: o } = Ts(e), n = [];
4114
4114
  if (r > 0) {
4115
4115
  const i = r > 1 ? "time-based reminders" : "time-based reminder";
4116
4116
  n.push(`${r} ${i}`);
@@ -4121,22 +4121,22 @@ function ta(e, t) {
4121
4121
  }
4122
4122
  return `Found ${n.join(" and ")} for task ${t}`;
4123
4123
  }
4124
- const { ADD_SECTIONS: sa } = g, ra = {
4124
+ const { ADD_SECTIONS: ra } = g, oa = {
4125
4125
  projectId: s.string().min(1).describe(
4126
4126
  'The ID of the project to search sections in. Project ID should be an ID string, or the text "inbox", for inbox tasks.'
4127
4127
  ),
4128
4128
  searchText: s.string().optional().describe(
4129
4129
  '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.'
4130
4130
  )
4131
- }, oa = {
4131
+ }, na = {
4132
4132
  sections: s.array(Y).describe("The found sections."),
4133
4133
  totalCount: s.number().describe("The total number of sections found."),
4134
4134
  appliedFilters: s.record(s.string(), s.unknown())
4135
- }, na = {
4135
+ }, ia = {
4136
4136
  name: g.FIND_SECTIONS,
4137
4137
  description: "Search for sections by name or other criteria in a project. When searching, uses server-side search to avoid fetching all sections.",
4138
- parameters: ra,
4139
- outputSchema: oa,
4138
+ parameters: oa,
4139
+ outputSchema: na,
4140
4140
  annotations: { readOnlyHint: !0, destructiveHint: !1, idempotentHint: !0 },
4141
4141
  async execute(e, t) {
4142
4142
  const r = await te({
@@ -4144,12 +4144,12 @@ const { ADD_SECTIONS: sa } = g, ra = {
4144
4144
  client: t
4145
4145
  });
4146
4146
  let o;
4147
- e.searchText ? o = await Ro(t, e.searchText, r) : o = (await t.getSections({
4147
+ e.searchText ? o = await Lo(t, e.searchText, r) : o = (await t.getSections({
4148
4148
  projectId: r
4149
4149
  })).results;
4150
4150
  const n = o.map(G);
4151
4151
  return {
4152
- textContent: ia({
4152
+ textContent: aa({
4153
4153
  sections: n,
4154
4154
  projectId: e.projectId,
4155
4155
  searchText: e.searchText
@@ -4162,13 +4162,13 @@ const { ADD_SECTIONS: sa } = g, ra = {
4162
4162
  };
4163
4163
  }
4164
4164
  };
4165
- function ia({
4165
+ function aa({
4166
4166
  sections: e,
4167
4167
  projectId: t,
4168
4168
  searchText: r
4169
4169
  }) {
4170
4170
  const o = [];
4171
- 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 ${sa} to create sections`));
4171
+ 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 ${ra} to create sections`));
4172
4172
  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(`
4173
4173
  `) : void 0;
4174
4174
  return V({
@@ -4178,10 +4178,10 @@ function ia({
4178
4178
  zeroReasonHints: o
4179
4179
  });
4180
4180
  }
4181
- function _s(e) {
4181
+ function Us(e) {
4182
4182
  return /* @__PURE__ */ new Date(`${e}T00:00:00`);
4183
4183
  }
4184
- const aa = {
4184
+ const ca = {
4185
4185
  startDate: s.string().regex(/^(\d{4}-\d{2}-\d{2}|today)$/).optional().describe(
4186
4186
  "The start date to get the tasks for. Format: YYYY-MM-DD, or 'today', which by default also includes overdue tasks."
4187
4187
  ),
@@ -4198,21 +4198,21 @@ const aa = {
4198
4198
  responsibleUser: s.string().optional().describe(
4199
4199
  "Filter tasks assigned to this user. User ID, name, or email. The current user also includes unassigned tasks."
4200
4200
  ),
4201
- responsibleUserFiltering: s.enum(fs).optional().describe(
4201
+ responsibleUserFiltering: s.enum(bs).optional().describe(
4202
4202
  "Filter when responsibleUser is omitted. 'assigned'=assigned to others; 'unassignedOrMe'=unassigned+mine; 'all'=everyone. Default: 'unassignedOrMe'."
4203
4203
  ),
4204
4204
  ...bt
4205
- }, ca = {
4205
+ }, da = {
4206
4206
  tasks: s.array(K).describe("The found tasks."),
4207
4207
  nextCursor: s.string().optional(),
4208
4208
  totalCount: s.number().describe("The total number of tasks in this page."),
4209
4209
  hasMore: s.boolean(),
4210
4210
  appliedFilters: s.record(s.string(), s.unknown())
4211
- }, da = {
4211
+ }, la = {
4212
4212
  name: g.FIND_TASKS_BY_DATE,
4213
4213
  description: "Get tasks by date range. startDate='today' includes overdue items. Default responsibleUserFiltering='unassignedOrMe' excludes others' tasks.",
4214
- parameters: aa,
4215
- outputSchema: ca,
4214
+ parameters: ca,
4215
+ outputSchema: da,
4216
4216
  annotations: { readOnlyHint: !0, destructiveHint: !1, idempotentHint: !0 },
4217
4217
  async execute(e, t) {
4218
4218
  const r = Ae(e.cursor);
@@ -4220,7 +4220,7 @@ const aa = {
4220
4220
  throw new Error(
4221
4221
  "Either startDate must be provided or overdueOption must be set to overdue-only"
4222
4222
  );
4223
- const o = await at(t, e.responsibleUser), n = o?.userId, i = o?.email, c = e.responsibleUser?.trim().toLowerCase() === ms ? n : n ? (await t.getUser()).id : void 0;
4223
+ const o = await at(t, e.responsibleUser), n = o?.userId, i = o?.email, c = e.responsibleUser?.trim().toLowerCase() === fs ? n : n ? (await t.getUser()).id : void 0;
4224
4224
  let d = "";
4225
4225
  if (e.overdueOption === "overdue-only")
4226
4226
  d = "overdue";
@@ -4231,7 +4231,7 @@ const aa = {
4231
4231
  } else
4232
4232
  d = e.overdueOption === "exclude-overdue" ? "today" : "(today | overdue)";
4233
4233
  else if (e.startDate) {
4234
- const y = e.startDate, f = We(_s(y), e.daysCount), w = yt(f, { representation: "date" });
4234
+ const y = e.startDate, f = We(Us(y), e.daysCount), w = yt(f, { representation: "date" });
4235
4235
  d = `(due after: ${y} | due: ${y}) & due before: ${w}`;
4236
4236
  }
4237
4237
  const u = gt(e.labels, e.labelsOperator);
@@ -4250,7 +4250,7 @@ const aa = {
4250
4250
  limit: e.limit
4251
4251
  });
4252
4252
  return {
4253
- textContent: la({ tasks: p, args: e, nextCursor: h, assigneeEmail: i }),
4253
+ textContent: ua({ tasks: p, args: e, nextCursor: h, assigneeEmail: i }),
4254
4254
  structuredContent: {
4255
4255
  tasks: p,
4256
4256
  nextCursor: h ?? void 0,
@@ -4261,7 +4261,7 @@ const aa = {
4261
4261
  };
4262
4262
  }
4263
4263
  };
4264
- function la({
4264
+ function ua({
4265
4265
  tasks: e,
4266
4266
  args: t,
4267
4267
  nextCursor: r,
@@ -4276,7 +4276,7 @@ function la({
4276
4276
  `today${c}${t.daysCount > 1 ? ` + ${t.daysCount - 1} more days` : ""}`
4277
4277
  );
4278
4278
  } else if (t.startDate) {
4279
- const c = t.daysCount > 1 ? ` to ${he(We(_s(t.startDate), t.daysCount))}` : "";
4279
+ const c = t.daysCount > 1 ? ` to ${he(We(Us(t.startDate), t.daysCount))}` : "";
4280
4280
  n.push(`${t.startDate}${c}`);
4281
4281
  }
4282
4282
  if (t.labels && t.labels.length > 0) {
@@ -4311,13 +4311,13 @@ function la({
4311
4311
  zeroReasonHints: a
4312
4312
  });
4313
4313
  }
4314
- const ua = 300 * 1e3;
4315
- class pa {
4314
+ const pa = 300 * 1e3;
4315
+ class ha {
4316
4316
  constructor() {
4317
4317
  this.cache = null;
4318
4318
  }
4319
4319
  async getFilters(t) {
4320
- if (this.cache && Date.now() - this.cache.timestamp < ua)
4320
+ if (this.cache && Date.now() - this.cache.timestamp < pa)
4321
4321
  return this.cache.filters;
4322
4322
  const o = ((await t.sync({
4323
4323
  resourceTypes: ["filters"],
@@ -4374,7 +4374,7 @@ ${l}` + (d.length > 5 ? `
4374
4374
  this.cache = null;
4375
4375
  }
4376
4376
  }
4377
- const ha = new pa(), { FIND_COMPLETED_TASKS: Ft, ADD_TASKS: Ht } = g, ma = {
4377
+ const ma = new ha(), { FIND_COMPLETED_TASKS: Ft, ADD_TASKS: Ht } = g, fa = {
4378
4378
  searchText: s.string().optional().describe("The text to search for in tasks."),
4379
4379
  projectId: s.string().optional().describe(
4380
4380
  'Find tasks in this project. Project ID should be an ID string, or the text "inbox", for inbox tasks.'
@@ -4384,7 +4384,7 @@ const ha = new pa(), { FIND_COMPLETED_TASKS: Ft, ADD_TASKS: Ht } = g, ma = {
4384
4384
  responsibleUser: s.string().optional().describe(
4385
4385
  "Find tasks assigned to this user. Can be a user ID, name, or email address. The current user also includes unassigned tasks."
4386
4386
  ),
4387
- responsibleUserFiltering: s.enum(fs).optional().describe(
4387
+ responsibleUserFiltering: s.enum(bs).optional().describe(
4388
4388
  'How to filter by responsible user when responsibleUser is not provided. "assigned" = only tasks assigned to others; "unassignedOrMe" = only unassigned tasks or tasks assigned to me; "all" = all tasks regardless of assignment. Default value will be `unassignedOrMe`.'
4389
4389
  ),
4390
4390
  limit: s.number().int().min(1).max(j.TASKS_MAX).default(j.TASKS_DEFAULT).describe("The maximum number of tasks to return."),
@@ -4398,17 +4398,17 @@ const ha = new pa(), { FIND_COMPLETED_TASKS: Ft, ADD_TASKS: Ht } = g, ma = {
4398
4398
  "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."
4399
4399
  ),
4400
4400
  ...bt
4401
- }, fa = {
4401
+ }, ba = {
4402
4402
  tasks: s.array(K).describe("The found tasks."),
4403
4403
  nextCursor: s.string().optional(),
4404
4404
  totalCount: s.number().describe("The total number of tasks in this page."),
4405
4405
  hasMore: s.boolean(),
4406
4406
  appliedFilters: s.record(s.string(), s.unknown())
4407
- }, ba = {
4407
+ }, ga = {
4408
4408
  name: g.FIND_TASKS,
4409
4409
  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.",
4410
- parameters: ma,
4411
- outputSchema: fa,
4410
+ parameters: fa,
4411
+ outputSchema: ba,
4412
4412
  annotations: { readOnlyHint: !0, destructiveHint: !1, idempotentHint: !0 },
4413
4413
  async execute(e, t) {
4414
4414
  const {
@@ -4438,7 +4438,7 @@ const ha = new pa(), { FIND_COMPLETED_TASKS: Ft, ADD_TASKS: Ht } = g, ma = {
4438
4438
  'The `filter`/`filterIdOrName` parameter cannot be combined with projectId, sectionId, or parentId. Use filter syntax instead (e.g. "##ProjectName").'
4439
4439
  );
4440
4440
  let C = h;
4441
- m && (C = (await ha.resolveFilter(t, m)).filterQuery);
4441
+ m && (C = (await ma.resolveFilter(t, m)).filterQuery);
4442
4442
  const D = await at(t, a), T = D?.userId, I = D?.email;
4443
4443
  if (o || n || i) {
4444
4444
  const E = {
@@ -4446,19 +4446,19 @@ const ha = new pa(), { FIND_COMPLETED_TASKS: Ft, ADD_TASKS: Ht } = g, ma = {
4446
4446
  cursor: y ?? null
4447
4447
  };
4448
4448
  o && (E.projectId = await te({ projectId: o, user: f })), n && (E.sectionId = n), i && (E.parentId = i);
4449
- const { results: Ie, nextCursor: J } = await t.getTasks(E), ie = Ie.map(_);
4449
+ const { results: Ie, nextCursor: J } = await t.getTasks(E), ie = Ie.map(P);
4450
4450
  let M = r ? ie.filter(
4451
4451
  (ae) => ae.content.toLowerCase().includes(r.toLowerCase()) || ae.description?.toLowerCase().includes(r.toLowerCase())
4452
4452
  ) : ie;
4453
- return M = Eo({
4453
+ return M = Oo({
4454
4454
  tasks: M,
4455
4455
  resolvedAssigneeId: T,
4456
4456
  currentUserId: f.id,
4457
4457
  responsibleUserFiltering: c
4458
4458
  }), l && l.length > 0 && (M = p === "and" ? M.filter(
4459
- (ae) => l.every((Pe) => ae.labels.includes(Pe))
4459
+ (ae) => l.every((_e) => ae.labels.includes(_e))
4460
4460
  ) : M.filter(
4461
- (ae) => l.some((Pe) => ae.labels.includes(Pe))
4461
+ (ae) => l.some((_e) => ae.labels.includes(_e))
4462
4462
  )), {
4463
4463
  textContent: Re({
4464
4464
  tasks: M,
@@ -4487,7 +4487,7 @@ const ha = new pa(), { FIND_COMPLETED_TASKS: Ft, ADD_TASKS: Ht } = g, ma = {
4487
4487
  lang: "en",
4488
4488
  limit: d,
4489
4489
  cursor: y ?? null
4490
- }), ie = Ie.map(_);
4490
+ }), ie = Ie.map(P);
4491
4491
  return {
4492
4492
  textContent: Re({
4493
4493
  tasks: ie,
@@ -4506,7 +4506,7 @@ const ha = new pa(), { FIND_COMPLETED_TASKS: Ft, ADD_TASKS: Ht } = g, ma = {
4506
4506
  };
4507
4507
  }
4508
4508
  let $ = C ? `(${C})` : "";
4509
- r && ($ = me($, `search: ${r}`));
4509
+ r && ($ = me($, `search: ${Zt(r)}`));
4510
4510
  const k = gt(l, p);
4511
4511
  if ($ = me($, k), !(m && !a && !c)) {
4512
4512
  const E = Qe({
@@ -4541,7 +4541,7 @@ const ha = new pa(), { FIND_COMPLETED_TASKS: Ft, ADD_TASKS: Ht } = g, ma = {
4541
4541
  };
4542
4542
  }
4543
4543
  };
4544
- function ga(e) {
4544
+ function ya(e) {
4545
4545
  if (e.projectId) {
4546
4546
  const t = [
4547
4547
  e.searchText ? "No tasks in project match search" : "Project has no tasks yet"
@@ -4576,7 +4576,7 @@ function Re({
4576
4576
  const d = t.labels.map((u) => `@${u}`).join(t.labelsOperator === "and" ? " & " : " | ");
4577
4577
  a.push(`labels: ${d}`);
4578
4578
  }
4579
- e.length === 0 && c.push(...ga(t));
4579
+ e.length === 0 && c.push(...ya(t));
4580
4580
  } else {
4581
4581
  const d = n || t.responsibleUser, u = [];
4582
4582
  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) {
@@ -4605,11 +4605,11 @@ function Re({
4605
4605
  zeroReasonHints: c
4606
4606
  });
4607
4607
  }
4608
- const ya = {
4608
+ const Ta = {
4609
4609
  projectId: s.string().min(1).optional().describe(
4610
- 'Optional project ID. Use "inbox" for the Inbox. If provided, shows detailed overview of that project. If omitted, shows overview of all projects.'
4610
+ `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.`
4611
4611
  )
4612
- }, Us = s.lazy(
4612
+ }, Rs = s.lazy(
4613
4613
  () => s.object({
4614
4614
  id: s.string().describe("The project ID."),
4615
4615
  name: s.string().describe("The project name."),
@@ -4617,9 +4617,9 @@ const ya = {
4617
4617
  folderId: s.string().optional().describe("The folder ID this project belongs to (workspace projects only)."),
4618
4618
  childOrder: s.number().describe("The ordering index among siblings."),
4619
4619
  sections: s.array(Y),
4620
- children: s.array(Us).describe("Nested child projects.")
4620
+ children: s.array(Rs).describe("Nested child projects.")
4621
4621
  })
4622
- ), Ta = {
4622
+ ), ka = {
4623
4623
  type: s.enum(["account_overview", "project_overview"]).describe("The type of overview returned."),
4624
4624
  totalProjects: s.number().optional().describe("Total number of projects (account overview only)."),
4625
4625
  totalTasks: s.number().optional().describe("Total number of tasks."),
@@ -4638,7 +4638,7 @@ const ya = {
4638
4638
  name: s.string().describe("The inbox project name."),
4639
4639
  sections: s.array(Y).describe("Sections in the inbox project.")
4640
4640
  }).optional().describe("Inbox information (account overview only)."),
4641
- projects: s.array(s.lazy(() => Us)).optional().describe(
4641
+ projects: s.array(s.lazy(() => Rs)).optional().describe(
4642
4642
  "List of projects with hierarchy, folders, and ordering (account overview only)."
4643
4643
  ),
4644
4644
  project: s.object({
@@ -4653,7 +4653,7 @@ const ya = {
4653
4653
  tasksWithoutSection: s.number()
4654
4654
  }).optional().describe("Statistics object (project overview only).")
4655
4655
  };
4656
- function ka(e) {
4656
+ function wa(e) {
4657
4657
  const t = {};
4658
4658
  for (const n of e)
4659
4659
  t[n.id] = {
@@ -4678,7 +4678,7 @@ function ka(e) {
4678
4678
  }
4679
4679
  return o(r), r;
4680
4680
  }
4681
- async function wa(e, t) {
4681
+ async function va(e, t) {
4682
4682
  const r = {};
4683
4683
  return await Promise.all(
4684
4684
  t.map(async (o) => {
@@ -4687,14 +4687,14 @@ async function wa(e, t) {
4687
4687
  })
4688
4688
  ), r;
4689
4689
  }
4690
- function Rs(e, t, r = "") {
4690
+ function Ls(e, t, r = "") {
4691
4691
  const o = [];
4692
4692
  o.push(`${r}- Project: ${e.name} (id=${e.id})`);
4693
4693
  const n = t[e.id] || [];
4694
4694
  for (const i of n)
4695
4695
  o.push(`${r} - Section: ${i.name} (id=${i.id})`);
4696
4696
  for (const i of e.children)
4697
- o.push(...Rs(i, t, `${r} `));
4697
+ o.push(...Ls(i, t, `${r} `));
4698
4698
  return o;
4699
4699
  }
4700
4700
  function Wt(e) {
@@ -4722,7 +4722,7 @@ function Ze(e, t = "") {
4722
4722
  }
4723
4723
  return r;
4724
4724
  }
4725
- function Ls(e, t) {
4725
+ function Ns(e, t) {
4726
4726
  return {
4727
4727
  id: e.id,
4728
4728
  name: e.name,
@@ -4731,11 +4731,11 @@ function Ls(e, t) {
4731
4731
  childOrder: e.childOrder,
4732
4732
  sections: (t[e.id] || []).map(G),
4733
4733
  children: e.children.map(
4734
- (r) => Ls(r, t)
4734
+ (r) => Ns(r, t)
4735
4735
  )
4736
4736
  };
4737
4737
  }
4738
- async function va(e, t) {
4738
+ async function Ia(e, t) {
4739
4739
  let r = [], o;
4740
4740
  do {
4741
4741
  const { results: n, nextCursor: i } = await e.getTasks({
@@ -4743,16 +4743,16 @@ async function va(e, t) {
4743
4743
  limit: j.TASKS_BATCH_SIZE,
4744
4744
  cursor: o ?? void 0
4745
4745
  });
4746
- r = r.concat(n.map(_)), o = i ?? void 0;
4746
+ r = r.concat(n.map(P)), o = i ?? void 0;
4747
4747
  } while (o);
4748
4748
  return r;
4749
4749
  }
4750
- async function Ia(e, t) {
4750
+ async function Sa(e, t) {
4751
4751
  const { results: r } = await e.getSections({ projectId: t });
4752
4752
  return r;
4753
4753
  }
4754
- async function Sa(e) {
4755
- 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 = ka(o), i = t.map((p) => p.id), a = await wa(e, i), c = ["# Personal Projects", ""];
4754
+ async function Ca(e) {
4755
+ 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 = wa(o), i = t.map((p) => p.id), a = await va(e, i), c = ["# Personal Projects", ""];
4756
4756
  if (r) {
4757
4757
  c.push(`- Inbox Project: ${r.name} (id=${r.id})`);
4758
4758
  for (const p of a[r.id] || [])
@@ -4760,10 +4760,13 @@ async function Sa(e) {
4760
4760
  }
4761
4761
  if (n.length)
4762
4762
  for (const p of n)
4763
- c.push(...Rs(p, a));
4763
+ c.push(...Ls(p, a));
4764
4764
  else
4765
4765
  c.push("_No projects found._");
4766
- c.push("");
4766
+ c.push(""), c.push(
4767
+ `_Note: This overview lists projects and sections only; tasks are not included. Call ${g.GET_OVERVIEW} with a projectId (or "inbox") to see a project's tasks._`,
4768
+ ""
4769
+ );
4767
4770
  const d = n.some((p) => p.children.length > 0);
4768
4771
  d && c.push(
4769
4772
  "_Note: Indentation indicates that a project is a sub-project of the one above it. This allows for organizing projects hierarchically, with parent projects containing related sub-projects._",
@@ -4778,7 +4781,7 @@ async function Sa(e) {
4778
4781
  sections: (a[r.id] || []).map(G)
4779
4782
  } : void 0,
4780
4783
  projects: n.map(
4781
- (p) => Ls(p, a)
4784
+ (p) => Ns(p, a)
4782
4785
  ),
4783
4786
  totalProjects: t.length,
4784
4787
  totalSections: i.reduce(
@@ -4789,11 +4792,11 @@ async function Sa(e) {
4789
4792
  };
4790
4793
  return { textContent: u, structuredContent: l };
4791
4794
  }
4792
- async function Ca(e, t) {
4795
+ async function ja(e, t) {
4793
4796
  const [r, o, n] = await Promise.all([
4794
4797
  e.getProject(t),
4795
- Ia(e, t),
4796
- va(e, t)
4798
+ Sa(e, t),
4799
+ Ia(e, t)
4797
4800
  ]), i = {};
4798
4801
  for (const l of o)
4799
4802
  i[l.id] = [];
@@ -4835,27 +4838,27 @@ async function Ca(e, t) {
4835
4838
  };
4836
4839
  return { textContent: d, structuredContent: u };
4837
4840
  }
4838
- const ja = {
4841
+ const $a = {
4839
4842
  name: g.GET_OVERVIEW,
4840
- description: "Get a Markdown overview. If no projectId is provided, shows all projects with hierarchy and sections (useful for navigation). If projectId is provided, shows detailed overview of that specific project including all tasks grouped by sections.",
4841
- parameters: ya,
4842
- outputSchema: Ta,
4843
+ 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.`,
4844
+ parameters: Ta,
4845
+ outputSchema: ka,
4843
4846
  annotations: { readOnlyHint: !0, destructiveHint: !1, idempotentHint: !0 },
4844
4847
  async execute(e, t) {
4845
- const r = await te({ projectId: e.projectId, client: t }), o = r ? await Ca(t, r) : await Sa(t);
4848
+ const r = await te({ projectId: e.projectId, client: t }), o = r ? await ja(t, r) : await Ca(t);
4846
4849
  return {
4847
4850
  textContent: o.textContent,
4848
4851
  structuredContent: o.structuredContent
4849
4852
  };
4850
4853
  }
4851
- }, $a = {}, pe = s.object({
4854
+ }, Aa = {}, pe = s.object({
4852
4855
  count: s.number().describe("Number of consecutive periods in this streak."),
4853
4856
  start: s.string().describe("Start date of the streak."),
4854
4857
  end: s.string().describe("End date of the streak.")
4855
4858
  }), Bt = s.object({
4856
4859
  id: s.string().describe("Project ID."),
4857
4860
  completed: s.number().describe("Number of tasks completed in this project.")
4858
- }), Aa = {
4861
+ }), Da = {
4859
4862
  completedCount: s.number().describe("Total number of completed tasks (all-time)."),
4860
4863
  daysItems: s.array(
4861
4864
  s.object({
@@ -4904,11 +4907,11 @@ const ja = {
4904
4907
  })
4905
4908
  ).describe("Recent karma change events with reasons."),
4906
4909
  projectColors: s.record(s.string(), s.string()).describe("Map of project ID to color key.")
4907
- }, Da = {
4910
+ }, xa = {
4908
4911
  name: g.GET_PRODUCTIVITY_STATS,
4909
4912
  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.',
4910
- parameters: $a,
4911
- outputSchema: Aa,
4913
+ parameters: Aa,
4914
+ outputSchema: Da,
4912
4915
  annotations: {
4913
4916
  readOnlyHint: !0,
4914
4917
  destructiveHint: !1,
@@ -4917,7 +4920,7 @@ const ja = {
4917
4920
  async execute(e, t) {
4918
4921
  const r = await t.getProductivityStats();
4919
4922
  return {
4920
- textContent: xa(r),
4923
+ textContent: Ea(r),
4921
4924
  structuredContent: {
4922
4925
  completedCount: r.completedCount,
4923
4926
  daysItems: r.daysItems,
@@ -4944,7 +4947,7 @@ const ja = {
4944
4947
  };
4945
4948
  }
4946
4949
  };
4947
- function xa(e) {
4950
+ function Ea(e) {
4948
4951
  const t = [
4949
4952
  "# Productivity Statistics",
4950
4953
  "",
@@ -4974,11 +4977,11 @@ function xa(e) {
4974
4977
  return t.join(`
4975
4978
  `);
4976
4979
  }
4977
- const Ea = {
4980
+ const Oa = {
4978
4981
  projectId: s.string().min(1).describe("The ID of the project to get activity stats for."),
4979
4982
  weeks: s.number().int().min(1).max(12).optional().describe("Number of weeks of activity data to retrieve (1-12, default 2)."),
4980
4983
  includeWeeklyCounts: s.boolean().optional().describe("Include weekly rollup counts alongside daily counts.")
4981
- }, Oa = {
4984
+ }, _a = {
4982
4985
  projectId: s.string().describe("The project ID."),
4983
4986
  dayItems: s.array(
4984
4987
  s.object({
@@ -5010,11 +5013,11 @@ function Pa(e, t) {
5010
5013
  return r.join(`
5011
5014
  `);
5012
5015
  }
5013
- const _a = {
5016
+ const Ua = {
5014
5017
  name: g.GET_PROJECT_ACTIVITY_STATS,
5015
5018
  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.",
5016
- parameters: Ea,
5017
- outputSchema: Oa,
5019
+ parameters: Oa,
5020
+ outputSchema: _a,
5018
5021
  annotations: {
5019
5022
  readOnlyHint: !0,
5020
5023
  destructiveHint: !1,
@@ -5034,12 +5037,12 @@ const _a = {
5034
5037
  }
5035
5038
  };
5036
5039
  }
5037
- }, Ua = {
5040
+ }, Ra = {
5038
5041
  projectId: s.string().min(1).describe("The ID of the project to check health for."),
5039
5042
  includeContext: s.boolean().default(!1).describe(
5040
5043
  "Include detailed health context with project metrics and task-level data. May produce large output for projects with many tasks."
5041
5044
  )
5042
- }, Ra = s.object({
5045
+ }, La = s.object({
5043
5046
  id: s.string().describe("The task ID."),
5044
5047
  content: s.string().describe("The task content/title."),
5045
5048
  priority: s.string().describe("The task priority (1-4)."),
@@ -5047,7 +5050,7 @@ const _a = {
5047
5050
  deadline: s.string().optional().describe("The deadline date string, if set."),
5048
5051
  isCompleted: s.boolean().describe("Whether the task is completed."),
5049
5052
  labels: s.array(s.string()).describe("Labels applied to this task.")
5050
- }), La = {
5053
+ }), Na = {
5051
5054
  projectId: s.string().describe("The project ID."),
5052
5055
  projectName: s.string().describe("The project name."),
5053
5056
  progress: s.object({
@@ -5073,12 +5076,12 @@ const _a = {
5073
5076
  tasksCompletedThisWeek: s.number().describe("Tasks completed in the current week."),
5074
5077
  averageCompletionTime: s.number().optional().describe("Average task completion time in days, if available.")
5075
5078
  }).describe("Aggregated project metrics."),
5076
- tasks: s.array(Ra).describe("Tasks in the project.")
5079
+ tasks: s.array(La).describe("Tasks in the project.")
5077
5080
  }).optional().describe(
5078
5081
  "Detailed project context with metrics and task data. Only included when includeContext is true."
5079
5082
  )
5080
5083
  };
5081
- async function Na(e, t, r) {
5084
+ async function Ma(e, t, r) {
5082
5085
  if (r) {
5083
5086
  const [i, a, c] = await Promise.all([
5084
5087
  e.getProjectProgress(t),
@@ -5093,7 +5096,7 @@ async function Na(e, t, r) {
5093
5096
  ]);
5094
5097
  return { progress: o, health: n };
5095
5098
  }
5096
- function Ma(e, { progress: t, health: r, context: o }) {
5099
+ function Fa(e, { progress: t, health: r, context: o }) {
5097
5100
  const n = [`# Project Health: ${e}`, ""];
5098
5101
  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(
5099
5102
  `**Completed:** ${t.completedCount} | **Active:** ${t.activeCount} | **Progress:** ${t.progressPercent}%`
@@ -5111,18 +5114,18 @@ function Ma(e, { progress: t, health: r, context: o }) {
5111
5114
  return n.join(`
5112
5115
  `);
5113
5116
  }
5114
- const Fa = {
5117
+ const Ha = {
5115
5118
  name: g.GET_PROJECT_HEALTH,
5116
5119
  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.",
5117
- parameters: Ua,
5118
- outputSchema: La,
5120
+ parameters: Ra,
5121
+ outputSchema: Na,
5119
5122
  annotations: {
5120
5123
  readOnlyHint: !0,
5121
5124
  destructiveHint: !1,
5122
5125
  idempotentHint: !0
5123
5126
  },
5124
5127
  async execute(e, t) {
5125
- const { projectId: r, includeContext: o } = e, n = await Na(t, r, o), i = n.context?.projectName ?? `Project ${r}`, a = Ma(i, n), c = n.context ? {
5128
+ const { projectId: r, includeContext: o } = e, n = await Ma(t, r, o), i = n.context?.projectName ?? `Project ${r}`, a = Fa(i, n), c = n.context ? {
5126
5129
  projectDescription: n.context.projectDescription ?? void 0,
5127
5130
  projectMetrics: {
5128
5131
  ...n.context.projectMetrics,
@@ -5160,12 +5163,12 @@ const Fa = {
5160
5163
  }
5161
5164
  };
5162
5165
  }
5163
- }, Ha = {
5166
+ }, Wa = {
5164
5167
  workspaceIdOrName: s.string().min(1).describe(
5165
5168
  "The workspace ID or name. Supports exact ID, exact name match (case-insensitive), or unique partial name match."
5166
5169
  ),
5167
5170
  projectIds: s.array(s.string().min(1)).min(1).optional().describe("Optional list of project IDs to scope insights to specific projects.")
5168
- }, Wa = s.object({
5171
+ }, Ba = s.object({
5169
5172
  projectId: s.string().describe("The project ID."),
5170
5173
  health: s.object({
5171
5174
  status: s.enum(tt).describe("The health status of the project."),
@@ -5177,22 +5180,22 @@ const Fa = {
5177
5180
  activeCount: s.number().describe("Number of active tasks."),
5178
5181
  progressPercent: s.number().describe("Completion percentage (0-100).")
5179
5182
  }).optional().describe("Progress data for this project. Omitted when the project has none.")
5180
- }), Ba = {
5183
+ }), za = {
5181
5184
  workspaceId: s.string().describe("The resolved workspace ID."),
5182
5185
  workspaceName: s.string().describe("The resolved workspace name."),
5183
- projectInsights: s.array(Wa).describe("Health and progress insights for each project in the workspace.")
5184
- }, za = {
5186
+ projectInsights: s.array(Ba).describe("Health and progress insights for each project in the workspace.")
5187
+ }, Ka = {
5185
5188
  name: g.GET_WORKSPACE_INSIGHTS,
5186
5189
  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.",
5187
- parameters: Ha,
5188
- outputSchema: Ba,
5190
+ parameters: Wa,
5191
+ outputSchema: za,
5189
5192
  annotations: {
5190
5193
  readOnlyHint: !0,
5191
5194
  destructiveHint: !1,
5192
5195
  idempotentHint: !0
5193
5196
  },
5194
5197
  async execute(e, t) {
5195
- const { workspaceIdOrName: r, projectIds: o } = e, n = await vs.resolveWorkspace(t, r), a = (await t.getWorkspaceInsights(n.workspaceId, { projectIds: o })).projectInsights.map((d) => ({
5198
+ const { workspaceIdOrName: r, projectIds: o } = e, n = await Is.resolveWorkspace(t, r), a = (await t.getWorkspaceInsights(n.workspaceId, { projectIds: o })).projectInsights.map((d) => ({
5196
5199
  projectId: d.projectId,
5197
5200
  health: d.health ? {
5198
5201
  status: d.health.status,
@@ -5225,7 +5228,7 @@ const Fa = {
5225
5228
  };
5226
5229
  }
5227
5230
  };
5228
- function Ka(e) {
5231
+ function qa(e) {
5229
5232
  const t = e.trim();
5230
5233
  if (!/^https?:\/\//i.test(t))
5231
5234
  return t;
@@ -5235,21 +5238,21 @@ function Ka(e) {
5235
5238
  } catch {
5236
5239
  throw new Error(`Could not read a template ID from "${t}".`);
5237
5240
  }
5238
- if (!qa(r.hostname))
5241
+ if (!Ya(r.hostname))
5239
5242
  throw new Error(
5240
5243
  `"${r.hostname}" is not a Todoist domain. Pass a todoist.com template URL or the template ID itself.`
5241
5244
  );
5242
5245
  r.hostname = "todoist.com";
5243
- const o = Zs(r.toString());
5246
+ const o = er(r.toString());
5244
5247
  if (o?.type !== "template")
5245
5248
  throw new Error(`"${t}" is not a Todoist template URL.`);
5246
5249
  return o.id;
5247
5250
  }
5248
- function qa(e) {
5251
+ function Ya(e) {
5249
5252
  const t = e.toLowerCase();
5250
5253
  return t === "todoist.com" || t.endsWith(".todoist.com");
5251
5254
  }
5252
- const Ya = {
5255
+ const Ga = {
5253
5256
  projectId: s.string().min(1).describe("The ID of the existing project to import the template into."),
5254
5257
  templateId: s.string().optional().describe(
5255
5258
  '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.'
@@ -5258,16 +5261,16 @@ const Ya = {
5258
5261
  "Raw CSV template content, as produced by export-project-template. Provide either this or `templateId`, not both."
5259
5262
  ),
5260
5263
  locale: s.string().optional().describe('Locale for the imported content when using `templateId`. Defaults to "en".')
5261
- }, Ga = {
5264
+ }, Va = {
5262
5265
  sections: s.array(Y).describe("Sections created by the import."),
5263
5266
  tasks: s.array(K).describe("Tasks created by the import."),
5264
5267
  comments: s.array(ve).describe("Comments created by the import."),
5265
5268
  totalCount: s.number().describe("The total number of objects created by the import.")
5266
- }, Va = {
5269
+ }, Ja = {
5267
5270
  name: g.IMPORT_PROJECT_TEMPLATE,
5268
5271
  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.",
5269
- parameters: Ya,
5270
- outputSchema: Ga,
5272
+ parameters: Ga,
5273
+ outputSchema: Va,
5271
5274
  annotations: { readOnlyHint: !1, destructiveHint: !1, idempotentHint: !1 },
5272
5275
  async execute({ projectId: e, templateId: t, csvFileContent: r, locale: o }, n) {
5273
5276
  if (!!t == !!r)
@@ -5276,15 +5279,15 @@ const Ya = {
5276
5279
  );
5277
5280
  const i = t ? await n.importTemplateFromId({
5278
5281
  projectId: e,
5279
- templateId: Ka(t),
5282
+ templateId: qa(t),
5280
5283
  locale: o
5281
5284
  }) : await n.importTemplateIntoProject({
5282
5285
  projectId: e,
5283
5286
  file: r ?? "",
5284
5287
  fileName: "template.csv"
5285
- }), a = i.sections.map(G), c = i.tasks.map(_), d = i.comments.map(we), u = i.projects.length + a.length + c.length + d.length;
5288
+ }), a = i.sections.map(G), c = i.tasks.map(P), d = i.comments.map(we), u = i.projects.length + a.length + c.length + d.length;
5286
5289
  return {
5287
- textContent: Ja({
5290
+ textContent: Xa({
5288
5291
  projectId: e,
5289
5292
  counts: {
5290
5293
  projects: i.projects.length,
@@ -5298,7 +5301,7 @@ const Ya = {
5298
5301
  };
5299
5302
  }
5300
5303
  };
5301
- function Ja({
5304
+ function Xa({
5302
5305
  projectId: e,
5303
5306
  counts: t,
5304
5307
  totalCount: r
@@ -5308,21 +5311,21 @@ function Ja({
5308
5311
  const o = Object.entries(t).filter(([, n]) => n > 0).map(([n, i]) => `${i} ${i === 1 ? n.replace(/s$/, "") : n}`);
5309
5312
  return `Imported template into project (id=${e}): ${o.join(", ")}.`;
5310
5313
  }
5311
- const Xa = {}, Qa = {
5314
+ const Qa = {}, Za = {
5312
5315
  id: s.string().describe("The unique identifier for the workspace."),
5313
5316
  name: s.string().describe("The name of the workspace."),
5314
- plan: s.enum(tr).describe("The workspace plan type."),
5315
- role: s.enum(er).optional().describe("The user's role in the workspace, if available."),
5317
+ plan: s.enum(sr).describe("The workspace plan type."),
5318
+ role: s.enum(tr).optional().describe("The user's role in the workspace, if available."),
5316
5319
  isLinkSharingEnabled: s.boolean().describe("Whether link sharing is enabled for the workspace."),
5317
5320
  isGuestAllowed: s.boolean().describe("Whether guests are allowed in the workspace."),
5318
5321
  createdAt: s.string().optional().describe("The ISO 8601 timestamp when the workspace was created."),
5319
5322
  creatorId: s.string().describe("The ID of the user who created the workspace.")
5320
- }, Za = {
5323
+ }, ec = {
5321
5324
  type: s.literal("workspaces").describe("The type of the response."),
5322
- workspaces: s.array(s.object(Qa)).describe("List of workspaces."),
5325
+ workspaces: s.array(s.object(Za)).describe("List of workspaces."),
5323
5326
  count: s.number().describe("The total number of workspaces.")
5324
5327
  };
5325
- async function ec(e) {
5328
+ async function tc(e) {
5326
5329
  const r = (await e.getWorkspaces()).map((a) => ({
5327
5330
  id: a.id,
5328
5331
  name: a.name,
@@ -5353,22 +5356,22 @@ async function ec(e) {
5353
5356
  };
5354
5357
  return { textContent: n, structuredContent: i };
5355
5358
  }
5356
- const tc = {
5359
+ const sc = {
5357
5360
  name: g.LIST_WORKSPACES,
5358
5361
  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.",
5359
- parameters: Xa,
5360
- outputSchema: Za,
5362
+ parameters: Qa,
5363
+ outputSchema: ec,
5361
5364
  annotations: { readOnlyHint: !0, destructiveHint: !1, idempotentHint: !0 },
5362
5365
  async execute(e, t) {
5363
- const r = await ec(t);
5366
+ const r = await tc(t);
5364
5367
  return {
5365
5368
  textContent: r.textContent,
5366
5369
  structuredContent: r.structuredContent
5367
5370
  };
5368
5371
  }
5369
- }, { FIND_TASKS: sc, FIND_PROJECT_COLLABORATORS: zt, UPDATE_TASKS: rc } = g, oc = 50, nc = {
5372
+ }, { FIND_TASKS: rc, FIND_PROJECT_COLLABORATORS: zt, UPDATE_TASKS: oc } = g, nc = 50, ic = {
5370
5373
  operation: s.enum(["assign", "unassign", "reassign"]).describe("The assignment operation to perform."),
5371
- taskIds: s.array(s.string()).min(1).max(oc).describe("The IDs of the tasks to operate on (max 50)."),
5374
+ taskIds: s.array(s.string()).min(1).max(nc).describe("The IDs of the tasks to operate on (max 50)."),
5372
5375
  responsibleUser: s.string().optional().describe(
5373
5376
  '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.'
5374
5377
  ),
@@ -5376,7 +5379,7 @@ const tc = {
5376
5379
  "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."
5377
5380
  ),
5378
5381
  dryRun: s.boolean().optional().default(!1).describe("If true, validates operations without executing them.")
5379
- }, ic = {
5382
+ }, ac = {
5380
5383
  results: s.array(
5381
5384
  s.object({
5382
5385
  taskId: s.string().describe("The ID of the task."),
@@ -5392,11 +5395,11 @@ const tc = {
5392
5395
  failed: s.number().describe("Number of failed operations."),
5393
5396
  dryRun: s.boolean().describe("Whether this was a dry run.")
5394
5397
  }).optional().describe("Summary of the operation.")
5395
- }, ac = {
5398
+ }, cc = {
5396
5399
  name: g.MANAGE_ASSIGNMENTS,
5397
5400
  description: "Bulk assignment operations for multiple tasks. Supports assign, unassign, and reassign operations with atomic rollback on failures.",
5398
- parameters: nc,
5399
- outputSchema: ic,
5401
+ parameters: ic,
5402
+ outputSchema: ac,
5400
5403
  annotations: { readOnlyHint: !1, destructiveHint: !0, idempotentHint: !1 },
5401
5404
  async execute(e, t) {
5402
5405
  const { operation: r, taskIds: o, responsibleUser: n, fromAssigneeUser: i, dryRun: a } = e;
@@ -5619,8 +5622,8 @@ function Le({
5619
5622
  `;
5620
5623
  }
5621
5624
  return !r && o.length > 0 ? (c += `**Next steps:**
5622
- `, c += `• Use ${sc} with responsibleUser to see ${e === "unassign" ? "unassigned" : "newly assigned"} tasks
5623
- `, c += `• Use ${rc} for individual assignment changes
5625
+ `, c += `• Use ${rc} with responsibleUser to see ${e === "unassign" ? "unassigned" : "newly assigned"} tasks
5626
+ `, c += `• Use ${oc} for individual assignment changes
5624
5627
  `, n.length > 0 && (c += `• Check failed tasks and use ${zt} to verify collaborator access
5625
5628
  `)) : r ? (c += `**To execute:**
5626
5629
  `, c += `• Remove dryRun parameter and run again to execute changes
@@ -5632,17 +5635,17 @@ function Le({
5632
5635
  `, c += `• Use dryRun=true to validate before executing
5633
5636
  `), c;
5634
5637
  }
5635
- const cc = {
5638
+ const dc = {
5636
5639
  action: s.enum(["archive", "unarchive"]).describe("The action to perform on the project."),
5637
5640
  projectId: s.string().min(1).describe("The ID of the project.")
5638
- }, dc = {
5641
+ }, lc = {
5639
5642
  project: re.describe("The updated project."),
5640
5643
  success: s.boolean().describe("Whether the action was successful.")
5641
- }, lc = {
5644
+ }, uc = {
5642
5645
  name: g.PROJECT_MANAGEMENT,
5643
5646
  description: "Archive or unarchive a project by its ID.",
5644
- parameters: cc,
5645
- outputSchema: dc,
5647
+ parameters: dc,
5648
+ outputSchema: lc,
5646
5649
  annotations: { readOnlyHint: !1, destructiveHint: !1, idempotentHint: !0 },
5647
5650
  async execute(e, t) {
5648
5651
  const r = e.action === "archive" ? await t.archiveProject(e.projectId) : await t.unarchiveProject(e.projectId), o = se(r);
@@ -5654,7 +5657,7 @@ const cc = {
5654
5657
  }
5655
5658
  };
5656
5659
  }
5657
- }, uc = {
5660
+ }, pc = {
5658
5661
  action: s.enum(["move-to-workspace", "move-to-personal"]).describe("The action to perform on the project."),
5659
5662
  projectId: s.string().min(1).describe("The ID of the project to move."),
5660
5663
  workspaceId: s.string().min(1).optional().describe("The target workspace ID. Required when action is move-to-workspace."),
@@ -5662,14 +5665,14 @@ const cc = {
5662
5665
  visibility: s.enum(["restricted", "team", "public"]).optional().describe(
5663
5666
  "Optional access visibility for the project in the workspace (restricted, team, or public)."
5664
5667
  )
5665
- }, pc = {
5668
+ }, hc = {
5666
5669
  project: re.describe("The moved project."),
5667
5670
  success: s.boolean().describe("Whether the move was successful.")
5668
- }, hc = {
5671
+ }, mc = {
5669
5672
  name: g.PROJECT_MOVE,
5670
5673
  description: "Move a project between personal and workspace contexts.",
5671
- parameters: uc,
5672
- outputSchema: pc,
5674
+ parameters: pc,
5675
+ outputSchema: hc,
5673
5676
  annotations: { readOnlyHint: !1, destructiveHint: !1, idempotentHint: !0 },
5674
5677
  async execute(e, t) {
5675
5678
  let r;
@@ -5692,8 +5695,8 @@ const cc = {
5692
5695
  }
5693
5696
  };
5694
5697
  }
5695
- }, Ns = ["project", "section"], mc = {
5696
- type: s.enum(Ns).describe(
5698
+ }, Ms = ["project", "section"], fc = {
5699
+ type: s.enum(Ms).describe(
5697
5700
  '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.'
5698
5701
  ),
5699
5702
  items: s.array(
@@ -5709,17 +5712,17 @@ const cc = {
5709
5712
  ).min(1).describe(
5710
5713
  "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."
5711
5714
  )
5712
- }, fc = {
5713
- type: s.enum(Ns).describe("The type of entity that was reordered/moved."),
5715
+ }, bc = {
5716
+ type: s.enum(Ms).describe("The type of entity that was reordered/moved."),
5714
5717
  movedCount: s.number().describe("The number of entities moved to a new parent."),
5715
5718
  reorderedCount: s.number().describe("The number of entities reordered."),
5716
5719
  affectedIds: s.array(s.string()).describe("The IDs of all affected entities."),
5717
5720
  success: s.boolean().describe("Whether the operation was successful.")
5718
- }, bc = {
5721
+ }, gc = {
5719
5722
  name: g.REORDER_OBJECTS,
5720
5723
  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.',
5721
- parameters: mc,
5722
- outputSchema: fc,
5724
+ parameters: fc,
5725
+ outputSchema: bc,
5723
5726
  annotations: { readOnlyHint: !1, destructiveHint: !1, idempotentHint: !0 },
5724
5727
  async execute(e, t) {
5725
5728
  const { type: r, items: o } = e, n = /* @__PURE__ */ new Set();
@@ -5781,22 +5784,22 @@ const cc = {
5781
5784
  }
5782
5785
  };
5783
5786
  }
5784
- }, gc = s.object({
5787
+ }, yc = s.object({
5785
5788
  id: s.string().min(1).describe("The ID of the task to reschedule."),
5786
5789
  date: s.string().min(1).describe(
5787
5790
  "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."
5788
5791
  )
5789
- }), yc = {
5790
- tasks: s.array(gc).min(1).describe("The tasks to reschedule with their new dates.")
5791
- }, Tc = {
5792
+ }), Tc = {
5793
+ tasks: s.array(yc).min(1).describe("The tasks to reschedule with their new dates.")
5794
+ }, kc = {
5792
5795
  tasks: s.array(K).describe("The rescheduled tasks."),
5793
5796
  totalCount: s.number().describe("The total number of tasks rescheduled."),
5794
5797
  rescheduledTaskIds: s.array(s.string()).describe("The IDs of the rescheduled tasks.")
5795
- }, kc = {
5798
+ }, wc = {
5796
5799
  name: g.RESCHEDULE_TASKS,
5797
5800
  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.",
5798
- parameters: yc,
5799
- outputSchema: Tc,
5801
+ parameters: Tc,
5802
+ outputSchema: kc,
5800
5803
  annotations: { readOnlyHint: !1, destructiveHint: !0, idempotentHint: !1 },
5801
5804
  async execute(e, t) {
5802
5805
  const { tasks: r } = e, n = (await Promise.all(
@@ -5809,7 +5812,7 @@ const cc = {
5809
5812
  throw new Error(
5810
5813
  `Task "${u.content}" (${u.id}) has no due date. Rescheduling requires an existing due date.`
5811
5814
  );
5812
- const l = wc(d.date, u.due);
5815
+ const l = vc(d.date, u.due);
5813
5816
  return Q("item_update", {
5814
5817
  id: d.id,
5815
5818
  due: {
@@ -5827,7 +5830,7 @@ const cc = {
5827
5830
  const u = d instanceof Error ? d.message : String(d);
5828
5831
  throw new Error(`Reschedule failed: ${u}`);
5829
5832
  }
5830
- const i = await Promise.all(r.map((d) => t.getTask(d.id))), a = i.map(_);
5833
+ const i = await Promise.all(r.map((d) => t.getTask(d.id))), a = i.map(P);
5831
5834
  return {
5832
5835
  textContent: pt("Rescheduled", a, {
5833
5836
  showDetails: a.length <= 5
@@ -5840,16 +5843,16 @@ const cc = {
5840
5843
  };
5841
5844
  }
5842
5845
  };
5843
- function wc(e, t) {
5846
+ function vc(e, t) {
5844
5847
  if (/^\d{4}-\d{2}-\d{2}$/.test(e) && t.datetime) {
5845
5848
  const o = t.datetime.substring(10);
5846
5849
  return e + o;
5847
5850
  }
5848
5851
  return e;
5849
5852
  }
5850
- const vc = {
5853
+ const Ic = {
5851
5854
  query: s.string().min(1).describe("The search query string to find tasks and projects.")
5852
- }, Ic = {
5855
+ }, Sc = {
5853
5856
  results: s.array(
5854
5857
  s.object({
5855
5858
  id: s.string().describe("The ID of the result."),
@@ -5858,21 +5861,21 @@ const vc = {
5858
5861
  })
5859
5862
  ).describe("The search results."),
5860
5863
  totalCount: s.number().describe("Total number of results found.")
5861
- }, Sc = {
5864
+ }, Cc = {
5862
5865
  name: g.SEARCH,
5863
5866
  description: "Search across tasks and projects in Todoist. Returns a list of relevant results with IDs, titles, and URLs.",
5864
- parameters: vc,
5865
- outputSchema: Ic,
5867
+ parameters: Ic,
5868
+ outputSchema: Sc,
5866
5869
  annotations: { readOnlyHint: !0, destructiveHint: !1, idempotentHint: !0 },
5867
5870
  async execute(e, t) {
5868
5871
  const { query: r } = e, [o, n] = await Promise.all([
5869
5872
  dt({
5870
5873
  client: t,
5871
- query: `search: ${r}`,
5874
+ query: `search: ${Zt(r)}`,
5872
5875
  limit: j.TASKS_MAX,
5873
5876
  cursor: void 0
5874
5877
  }),
5875
- bs(t, r)
5878
+ gs(t, r)
5876
5879
  ]), i = [];
5877
5880
  for (const a of o.tasks)
5878
5881
  i.push({
@@ -5891,19 +5894,19 @@ const vc = {
5891
5894
  structuredContent: { results: i, totalCount: i.length }
5892
5895
  };
5893
5896
  }
5894
- }, Cc = {
5895
- ids: s.array(s.string().min(1)).min(1).describe("The IDs of the tasks to uncomplete.")
5896
5897
  }, jc = {
5898
+ ids: s.array(s.string().min(1)).min(1).describe("The IDs of the tasks to uncomplete.")
5899
+ }, $c = {
5897
5900
  uncompleted: s.array(s.string()).describe("The IDs of successfully uncompleted tasks."),
5898
5901
  failures: s.array(oe).describe("Failed task uncompletion with error details."),
5899
5902
  totalRequested: s.number().describe("The total number of tasks requested to uncomplete."),
5900
5903
  successCount: s.number().describe("The number of successfully uncompleted tasks."),
5901
5904
  failureCount: s.number().describe("The number of failed task uncompletions.")
5902
- }, $c = {
5905
+ }, Ac = {
5903
5906
  name: g.UNCOMPLETE_TASKS,
5904
5907
  description: "Uncomplete (reopen) one or more completed tasks by their IDs.",
5905
- parameters: Cc,
5906
- outputSchema: jc,
5908
+ parameters: jc,
5909
+ outputSchema: $c,
5907
5910
  annotations: { readOnlyHint: !1, destructiveHint: !1, idempotentHint: !1 },
5908
5911
  async execute(e, t) {
5909
5912
  const r = [], o = [];
@@ -5917,7 +5920,7 @@ const vc = {
5917
5920
  });
5918
5921
  }
5919
5922
  return ne(g.UNCOMPLETE_TASKS, e.ids.length, o), {
5920
- textContent: Ac({
5923
+ textContent: Dc({
5921
5924
  uncompleted: r,
5922
5925
  failures: o,
5923
5926
  args: e
@@ -5932,7 +5935,7 @@ const vc = {
5932
5935
  };
5933
5936
  }
5934
5937
  };
5935
- function Ac({
5938
+ function Dc({
5936
5939
  uncompleted: e,
5937
5940
  failures: t,
5938
5941
  args: r
@@ -5946,23 +5949,23 @@ function Ac({
5946
5949
  failures: t
5947
5950
  });
5948
5951
  }
5949
- const Dc = s.object({
5952
+ const xc = s.object({
5950
5953
  id: s.string().min(1).describe("The ID of the comment to update."),
5951
5954
  content: s.string().min(1).describe("The new content for the comment.")
5952
- }), xc = {
5953
- comments: s.array(Dc).min(1).describe("The comments to update.")
5954
- }, Ec = {
5955
+ }), Ec = {
5956
+ comments: s.array(xc).min(1).describe("The comments to update.")
5957
+ }, Oc = {
5955
5958
  comments: s.array(ve).describe("The updated comments."),
5956
5959
  totalCount: s.number().describe("The total number of comments updated."),
5957
5960
  updatedCommentIds: s.array(s.string()).describe("The IDs of the updated comments."),
5958
5961
  appliedOperations: s.object({
5959
5962
  updateCount: s.number().describe("The number of comments updated.")
5960
5963
  }).describe("Summary of operations performed.")
5961
- }, Oc = {
5964
+ }, _c = {
5962
5965
  name: g.UPDATE_COMMENTS,
5963
5966
  description: "Update multiple existing comments with new content.",
5964
- parameters: xc,
5965
- outputSchema: Ec,
5967
+ parameters: Ec,
5968
+ outputSchema: Oc,
5966
5969
  annotations: { readOnlyHint: !1, destructiveHint: !0, idempotentHint: !1 },
5967
5970
  async execute(e, t) {
5968
5971
  const { comments: r } = e, o = r.map(async (c) => await t.updateComment(c.id, { content: c.content })), i = (await Promise.all(o)).map(we);
@@ -5993,7 +5996,7 @@ function Pc({ comments: e }) {
5993
5996
  }
5994
5997
  return o.length > 0 ? `Updated ${o.join(" and ")}` : "No comments updated";
5995
5998
  }
5996
- const _c = s.object({
5999
+ const Uc = s.object({
5997
6000
  id: s.string().min(1).describe("The ID of the filter to update."),
5998
6001
  name: s.string().min(1).optional().describe("The new name of the filter."),
5999
6002
  query: s.string().min(1).optional().describe(
@@ -6008,9 +6011,9 @@ const _c = s.object({
6008
6011
  ).optional(),
6009
6012
  color: fe,
6010
6013
  isFavorite: s.boolean().optional().describe("Whether to mark the filter as a favorite.")
6011
- }), Uc = {
6012
- filters: s.array(_c).min(1).describe("The filters to update.")
6013
- }, Rc = {
6014
+ }), Rc = {
6015
+ filters: s.array(Uc).min(1).describe("The filters to update.")
6016
+ }, Lc = {
6014
6017
  filters: s.array(ut).describe("The updated filters."),
6015
6018
  totalCount: s.number().describe("The total number of filters updated."),
6016
6019
  updatedFilterIds: s.array(s.string()).describe("The IDs of the updated filters."),
@@ -6018,15 +6021,15 @@ const _c = s.object({
6018
6021
  updateCount: s.number().describe("The number of filters actually updated."),
6019
6022
  skippedCount: s.number().describe("The number of filters skipped (no changes).")
6020
6023
  }).describe("Summary of operations performed.")
6021
- }, Lc = {
6024
+ }, Nc = {
6022
6025
  name: g.UPDATE_FILTERS,
6023
6026
  description: "Update one or more existing personal filters with new values.",
6024
- parameters: Uc,
6025
- outputSchema: Rc,
6027
+ parameters: Rc,
6028
+ outputSchema: Lc,
6026
6029
  annotations: { readOnlyHint: !1, destructiveHint: !0, idempotentHint: !1 },
6027
6030
  async execute(e, t) {
6028
6031
  const { filters: r } = e, o = [], i = r.map((h) => {
6029
- const m = Mc(h);
6032
+ const m = Fc(h);
6030
6033
  return m !== null ? { kind: "skipped", reason: m } : (o.push(h), { kind: "updated", filter: h });
6031
6034
  }).filter((h) => h.kind === "skipped").length;
6032
6035
  if (o.length === 0)
@@ -6054,13 +6057,13 @@ const _c = s.object({
6054
6057
  id: h.id,
6055
6058
  name: h.name,
6056
6059
  query: h.query,
6057
- description: ks(h),
6060
+ description: ws(h),
6058
6061
  color: be.parse(h.color),
6059
6062
  isFavorite: h.isFavorite,
6060
6063
  itemOrder: h.itemOrder
6061
6064
  }));
6062
6065
  return {
6063
- textContent: Nc({ filters: l, skippedCount: i }),
6066
+ textContent: Mc({ filters: l, skippedCount: i }),
6064
6067
  structuredContent: {
6065
6068
  filters: l,
6066
6069
  totalCount: l.length,
@@ -6073,7 +6076,7 @@ const _c = s.object({
6073
6076
  };
6074
6077
  }
6075
6078
  };
6076
- function Nc({
6079
+ function Mc({
6077
6080
  filters: e,
6078
6081
  skippedCount: t
6079
6082
  }) {
@@ -6087,52 +6090,52 @@ ${n}`;
6087
6090
  }
6088
6091
  return o;
6089
6092
  }
6090
- function Mc({ id: e, ...t }) {
6093
+ function Fc({ id: e, ...t }) {
6091
6094
  return Object.values(t).every((o) => o === void 0) ? "no-fields" : null;
6092
6095
  }
6093
- const Fc = s.object({
6096
+ const Hc = s.object({
6094
6097
  labelType: s.literal("personal").describe("Update a personal label, identified by its ID."),
6095
6098
  id: s.string().min(1).describe("The ID of the personal label to update."),
6096
6099
  name: s.string().min(1).max(128).optional().describe("The new name of the label."),
6097
6100
  color: fe,
6098
6101
  order: s.number().int().optional().describe("The new position of the label in the label list."),
6099
6102
  isFavorite: s.boolean().optional().describe("Whether to mark the label as a favorite.")
6100
- }), Hc = s.object({
6103
+ }), Wc = s.object({
6101
6104
  labelType: s.literal("shared").describe(
6102
6105
  "Rename a shared label across all tasks. Shared labels are identified by name; only renaming is supported (no color, order, or favorite)."
6103
6106
  ),
6104
6107
  name: s.string().min(1).describe("The current name of the shared label."),
6105
6108
  newName: s.string().min(1).describe("The new name for the shared label.")
6106
- }), Wc = s.discriminatedUnion("labelType", [
6107
- Fc,
6108
- Hc
6109
- ]), Bc = {
6110
- labels: s.array(Wc).min(1).describe(
6109
+ }), Bc = s.discriminatedUnion("labelType", [
6110
+ Hc,
6111
+ Wc
6112
+ ]), zc = {
6113
+ labels: s.array(Bc).min(1).describe(
6111
6114
  '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.'
6112
6115
  )
6113
- }, zc = s.object({
6116
+ }, Kc = s.object({
6114
6117
  name: s.string().describe("The previous name of the shared label."),
6115
6118
  newName: s.string().describe("The new name of the shared label.")
6116
- }), Kc = {
6119
+ }), qc = {
6117
6120
  updatedLabels: s.array(ge).describe("The updated personal labels."),
6118
- renamedSharedLabels: s.array(zc).describe("The shared labels that were renamed."),
6121
+ renamedSharedLabels: s.array(Kc).describe("The shared labels that were renamed."),
6119
6122
  totalCount: s.number().describe("The total number of successful operations (personal + shared)."),
6120
6123
  appliedOperations: s.object({
6121
6124
  updateCount: s.number().describe("Number of personal labels updated."),
6122
6125
  renameCount: s.number().describe("Number of shared labels renamed."),
6123
6126
  skippedCount: s.number().describe("Number of operations skipped (no changes or shared label not found).")
6124
6127
  }).describe("Summary of operations performed.")
6125
- }, qc = {
6128
+ }, Yc = {
6126
6129
  name: g.UPDATE_LABELS,
6127
6130
  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.",
6128
- parameters: Bc,
6129
- outputSchema: Kc,
6131
+ parameters: zc,
6132
+ outputSchema: qc,
6130
6133
  annotations: { readOnlyHint: !1, destructiveHint: !0, idempotentHint: !1 },
6131
6134
  async execute(e, t) {
6132
6135
  const { labels: r } = e, o = await Promise.all(
6133
6136
  r.map(async (l) => {
6134
6137
  if (l.labelType === "personal") {
6135
- const h = Gc(l);
6138
+ const h = Vc(l);
6136
6139
  if (h !== null) return { kind: "skipped", reason: h };
6137
6140
  const { id: m, labelType: y, ...f } = l;
6138
6141
  return { kind: "updated", label: await t.updateLabel(m, f) };
@@ -6150,7 +6153,7 @@ const Fc = s.object({
6150
6153
  (l) => l.kind === "skipped" && l.reason === "not-found"
6151
6154
  ).length;
6152
6155
  return {
6153
- textContent: Yc({
6156
+ textContent: Gc({
6154
6157
  updatedLabels: n,
6155
6158
  renamedSharedLabels: i,
6156
6159
  skippedNoFields: c,
@@ -6169,7 +6172,7 @@ const Fc = s.object({
6169
6172
  };
6170
6173
  }
6171
6174
  };
6172
- function Yc({
6175
+ function Gc({
6173
6176
  updatedLabels: e,
6174
6177
  renamedSharedLabels: t,
6175
6178
  skippedNoFields: r,
@@ -6191,14 +6194,14 @@ function Yc({
6191
6194
  return c.join(`
6192
6195
  `);
6193
6196
  }
6194
- function Gc({
6197
+ function Vc({
6195
6198
  id: e,
6196
6199
  labelType: t,
6197
6200
  ...r
6198
6201
  }) {
6199
6202
  return Object.values(r).every((n) => n === void 0) ? "no-fields" : null;
6200
6203
  }
6201
- const Vc = s.object({
6204
+ const Jc = s.object({
6202
6205
  id: s.string().min(1).describe("The ID of the project to update."),
6203
6206
  name: s.string().min(1).optional().describe("The new name of the project."),
6204
6207
  isFavorite: s.boolean().optional().describe("Whether the project is a favorite."),
@@ -6213,9 +6216,9 @@ const Vc = s.object({
6213
6216
  )
6214
6217
  ).optional(),
6215
6218
  color: fe
6216
- }), Jc = {
6217
- projects: s.array(Vc).min(1).describe("The projects to update.")
6218
- }, Xc = {
6219
+ }), Xc = {
6220
+ projects: s.array(Jc).min(1).describe("The projects to update.")
6221
+ }, Qc = {
6219
6222
  projects: s.array(re).describe("The updated projects."),
6220
6223
  totalCount: s.number().describe("The total number of projects updated."),
6221
6224
  updatedProjectIds: s.array(s.string()).describe("The IDs of the updated projects."),
@@ -6227,19 +6230,19 @@ const Vc = s.object({
6227
6230
  skippedCount: s.number().describe("The number of projects skipped (no changes)."),
6228
6231
  failureCount: s.number().describe("The number of projects that failed to update.")
6229
6232
  }).describe("Summary of operations performed.")
6230
- }, Qc = {
6233
+ }, Zc = {
6231
6234
  name: g.UPDATE_PROJECTS,
6232
6235
  description: "Update multiple existing projects with new values.",
6233
- parameters: Jc,
6234
- outputSchema: Xc,
6236
+ parameters: Xc,
6237
+ outputSchema: Qc,
6235
6238
  annotations: { readOnlyHint: !1, destructiveHint: !0, idempotentHint: !1 },
6236
6239
  async execute(e, t) {
6237
6240
  const { projects: r } = e, o = await Promise.allSettled(
6238
6241
  r.map(async (u) => {
6239
- const l = ed(u);
6242
+ const l = td(u);
6240
6243
  if (l !== null) return { kind: "skipped", reason: l };
6241
6244
  const { id: p, ...h } = u;
6242
- return { kind: "updated", project: await P(() => t.updateProject(p, h)) };
6245
+ return { kind: "updated", project: await _(() => t.updateProject(p, h)) };
6243
6246
  })
6244
6247
  ), n = [], i = [];
6245
6248
  let a = 0, c = 0;
@@ -6254,7 +6257,7 @@ const Vc = s.object({
6254
6257
  l.value.kind === "updated" ? n.push(se(l.value.project)) : l.value.reason === "no-fields" ? a++ : c++;
6255
6258
  }
6256
6259
  return ne(g.UPDATE_PROJECTS, r.length, i), {
6257
- textContent: Zc({
6260
+ textContent: ed({
6258
6261
  projects: n,
6259
6262
  skippedNoFields: a,
6260
6263
  skippedNoValidValues: c,
@@ -6274,7 +6277,7 @@ const Vc = s.object({
6274
6277
  };
6275
6278
  }
6276
6279
  };
6277
- function Zc({
6280
+ function ed({
6278
6281
  projects: e,
6279
6282
  skippedNoFields: t,
6280
6283
  skippedNoValidValues: r,
@@ -6287,49 +6290,49 @@ function Zc({
6287
6290
  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 += `:
6288
6291
  ${i}`), mt(a, o);
6289
6292
  }
6290
- function ed({ id: e, ...t }) {
6293
+ function td({ id: e, ...t }) {
6291
6294
  const r = Object.values(t);
6292
6295
  return r.length === 0 ? "no-fields" : r.every((o) => o === void 0) ? "no-valid-values" : null;
6293
6296
  }
6294
- const td = s.object({
6297
+ const sd = s.object({
6295
6298
  type: s.literal("relative"),
6296
6299
  id: s.string().min(1).describe("The ID of the relative reminder to update."),
6297
6300
  minuteOffset: s.number().int().min(0).optional().describe("New minute offset before task due time."),
6298
6301
  service: Ee.optional().describe('New delivery method: "email" or "push".'),
6299
6302
  isUrgent: Oe
6300
- }), sd = s.object({
6303
+ }), rd = s.object({
6301
6304
  type: s.literal("absolute"),
6302
6305
  id: s.string().min(1).describe("The ID of the absolute reminder to update."),
6303
- due: Is.optional().describe("New due date/time for the reminder."),
6306
+ due: Ss.optional().describe("New due date/time for the reminder."),
6304
6307
  service: Ee.optional().describe('New delivery method: "email" or "push".'),
6305
6308
  isUrgent: Oe
6306
- }), rd = s.object({
6309
+ }), od = s.object({
6307
6310
  type: s.literal("location"),
6308
6311
  id: s.string().min(1).describe("The ID of the location reminder to update."),
6309
6312
  name: s.string().optional().describe("New location name."),
6310
6313
  locLat: s.string().optional().describe("New latitude."),
6311
6314
  locLong: s.string().optional().describe("New longitude."),
6312
- locTrigger: Ss.optional().describe(
6315
+ locTrigger: Cs.optional().describe(
6313
6316
  'New trigger condition: "on_enter" or "on_leave".'
6314
6317
  ),
6315
6318
  radius: s.number().int().optional().describe("New radius in meters.")
6316
- }), od = s.discriminatedUnion("type", [
6317
- td,
6319
+ }), nd = s.discriminatedUnion("type", [
6318
6320
  sd,
6319
- rd
6320
- ]), nd = {
6321
- reminders: s.array(od).min(1).max(je).describe(
6321
+ rd,
6322
+ od
6323
+ ]), id = {
6324
+ reminders: s.array(nd).min(1).max(je).describe(
6322
6325
  `Array of reminders to update (max ${je}). Each must include the reminder type and ID. Only include fields that need to change.`
6323
6326
  )
6324
- }, id = {
6327
+ }, ad = {
6325
6328
  reminders: s.array(lt).describe("The updated reminders."),
6326
6329
  totalCount: s.number().describe("Total reminders updated."),
6327
6330
  updatedReminderIds: s.array(s.string()).describe("IDs of updated reminders.")
6328
- }, ad = {
6331
+ }, cd = {
6329
6332
  name: g.UPDATE_REMINDERS,
6330
6333
  description: 'Update existing reminders. Each reminder must specify its type ("relative", "absolute", or "location") and ID. Only include fields that need to change.',
6331
- parameters: nd,
6332
- outputSchema: id,
6334
+ parameters: id,
6335
+ outputSchema: ad,
6333
6336
  annotations: { readOnlyHint: !1, destructiveHint: !0, idempotentHint: !0 },
6334
6337
  async execute(e, t) {
6335
6338
  const { reminders: r } = e, o = r.map(async (d) => {
@@ -6363,7 +6366,7 @@ const td = s.object({
6363
6366
  }
6364
6367
  };
6365
6368
  }
6366
- }, cd = s.object({
6369
+ }, dd = s.object({
6367
6370
  id: s.string().min(1).describe("The ID of the section to update."),
6368
6371
  name: s.string().min(1).optional().describe("The new name of the section."),
6369
6372
  description: s.preprocess(
@@ -6378,17 +6381,17 @@ const td = s.object({
6378
6381
  ).optional()
6379
6382
  }).refine((e) => e.name !== void 0 || e.description !== void 0, {
6380
6383
  message: 'Provide at least one of "name" or "description" to update.'
6381
- }), dd = {
6382
- sections: s.array(cd).min(1).describe("The sections to update.")
6383
- }, ld = {
6384
+ }), ld = {
6385
+ sections: s.array(dd).min(1).describe("The sections to update.")
6386
+ }, ud = {
6384
6387
  sections: s.array(Y).describe("The updated sections."),
6385
6388
  totalCount: s.number().describe("The total number of sections updated."),
6386
6389
  updatedSectionIds: s.array(s.string()).describe("The IDs of the updated sections.")
6387
- }, ud = {
6390
+ }, pd = {
6388
6391
  name: g.UPDATE_SECTIONS,
6389
6392
  description: "Update multiple existing sections with new values.",
6390
- parameters: dd,
6391
- outputSchema: ld,
6393
+ parameters: ld,
6394
+ outputSchema: ud,
6392
6395
  annotations: { readOnlyHint: !1, destructiveHint: !0, idempotentHint: !1 },
6393
6396
  async execute({ sections: e }, t) {
6394
6397
  const r = await Promise.all(
@@ -6401,7 +6404,7 @@ const td = s.object({
6401
6404
  })
6402
6405
  );
6403
6406
  return {
6404
- textContent: pd({
6407
+ textContent: hd({
6405
6408
  sections: r
6406
6409
  }),
6407
6410
  structuredContent: {
@@ -6412,36 +6415,36 @@ const td = s.object({
6412
6415
  };
6413
6416
  }
6414
6417
  };
6415
- function pd({ sections: e }) {
6418
+ function hd({ sections: e }) {
6416
6419
  const t = e.length, r = e.map((n) => `• ${n.name} (id=${n.id}, projectId=${n.projectId})`).join(`
6417
6420
  `);
6418
6421
  return `Updated ${t} section${t === 1 ? "" : "s"}:
6419
6422
  ${r}`;
6420
6423
  }
6421
- function Ms(e, t) {
6424
+ function Fs(e, t) {
6422
6425
  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;
6423
6426
  }
6424
- function hd(e, t) {
6427
+ function md(e, t) {
6425
6428
  return t.projectId !== void 0 ? e.projectId === t.projectId : t.sectionId !== void 0 ? e.sectionId === t.sectionId : e.parentId === t.parentId;
6426
6429
  }
6427
- function md(e) {
6430
+ function fd(e) {
6428
6431
  return e.projectId !== void 0 ? `project:${e.projectId}` : e.sectionId !== void 0 ? `section:${e.sectionId}` : `parent:${e.parentId}`;
6429
6432
  }
6430
- function fd(e) {
6433
+ function bd(e) {
6431
6434
  const t = [];
6432
6435
  return e.projectId && t.push({ projectId: e.projectId }), e.sectionId && t.push({ sectionId: e.sectionId }), e.parentId && t.push({ parentId: e.parentId }), t;
6433
6436
  }
6434
- function bd({
6437
+ function gd({
6435
6438
  taskId: e,
6436
6439
  request: t,
6437
6440
  current: r
6438
6441
  }) {
6439
- const o = fd(t);
6442
+ const o = bd(t);
6440
6443
  if (o.length === 0)
6441
6444
  return { redundantMoveSkipped: !1 };
6442
6445
  let n = o, i = !1;
6443
6446
  if (r) {
6444
- const a = o.length === 1 ? (c) => Ms(r, c) : (c) => hd(r, c);
6447
+ const a = o.length === 1 ? (c) => Fs(r, c) : (c) => md(r, c);
6445
6448
  n = o.filter((c) => !a(c)), i = n.length < o.length;
6446
6449
  }
6447
6450
  if (n.length === 0)
@@ -6452,7 +6455,7 @@ function bd({
6452
6455
  );
6453
6456
  return { move: n[0], redundantMoveSkipped: i };
6454
6457
  }
6455
- const gd = s.object({
6458
+ const yd = s.object({
6456
6459
  id: s.string().min(1).describe("The ID of the task to update."),
6457
6460
  content: s.string().optional().describe(
6458
6461
  '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.'
@@ -6497,9 +6500,9 @@ const gd = s.object({
6497
6500
  isUncompletable: s.boolean().optional().describe(
6498
6501
  "Whether this task should be uncompletable (organizational header). Tasks with isUncompletable: true appear as organizational headers and cannot be completed."
6499
6502
  )
6500
- }), yd = (e) => !!(e.projectId || e.sectionId || e.parentId), Fs = (e) => Object.keys(e).length > 0, Td = ["remove", "no date"], kd = ["remove", "no date", "no deadline"], wd = "no date", et = rs.TASKS_PER_OPERATION, Kt = {
6501
- tasks: s.array(gd).min(1).max(et).describe(`The tasks to update (max ${et}).`)
6502
- }, vd = {
6503
+ }), Td = (e) => !!(e.projectId || e.sectionId || e.parentId), Hs = (e) => Object.keys(e).length > 0, kd = ["remove", "no date"], wd = ["remove", "no date", "no deadline"], vd = "no date", et = os.TASKS_PER_OPERATION, Kt = {
6504
+ tasks: s.array(yd).min(1).max(et).describe(`The tasks to update (max ${et}).`)
6505
+ }, Id = {
6503
6506
  tasks: s.array(K).describe("The updated tasks."),
6504
6507
  totalCount: s.number().describe("The total number of tasks updated."),
6505
6508
  updatedTaskIds: s.array(s.string()).describe("The IDs of the updated tasks."),
@@ -6514,38 +6517,38 @@ const gd = s.object({
6514
6517
  "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."
6515
6518
  )
6516
6519
  }).describe("Summary of operations performed.")
6517
- }, Id = {
6520
+ }, Sd = {
6518
6521
  name: g.UPDATE_TASKS,
6519
6522
  description: "Update existing tasks including content, dates, priorities, and assignments. Send only the fields that change.",
6520
6523
  parameters: Kt,
6521
- outputSchema: vd,
6524
+ outputSchema: Id,
6522
6525
  annotations: { readOnlyHint: !1, destructiveHint: !0, idempotentHint: !1 },
6523
6526
  async execute(e, t) {
6524
6527
  const { tasks: r } = s.object(Kt).parse(e), o = r.map(() => ({ kind: "skipped" })), n = (k, b) => {
6525
6528
  o[k] = { kind: "failed", error: b };
6526
6529
  }, i = (k, b) => {
6527
6530
  n(k, N(b));
6528
- }, a = r.map((k, b) => ({ task: k, index: b })).filter(({ task: k }) => Od(k)), c = await Cd(
6531
+ }, a = r.map((k, b) => ({ task: k, index: b })).filter(({ task: k }) => _d(k)), c = await jd(
6529
6532
  a.map(({ task: k }) => k),
6530
6533
  t
6531
6534
  ), d = await Promise.allSettled(
6532
- a.map(({ task: k, index: b }) => Dd({ task: k, index: b, client: t, inbox: c }))
6535
+ a.map(({ task: k, index: b }) => xd({ task: k, index: b, client: t, inbox: c }))
6533
6536
  ), u = [];
6534
6537
  for (const [k, b] of d.entries()) {
6535
6538
  const S = a[k]?.index ?? k;
6536
6539
  b.status === "fulfilled" ? u.push(b.value) : i(S, b.reason);
6537
6540
  }
6538
- const l = await Hs({
6541
+ const l = await Ws({
6539
6542
  client: t,
6540
6543
  ids: [
6541
6544
  ...new Set(
6542
- u.filter((k) => yd(k.moveRequest)).map((k) => k.id)
6545
+ u.filter((k) => Td(k.moveRequest)).map((k) => k.id)
6543
6546
  )
6544
6547
  ]
6545
6548
  }), p = [];
6546
6549
  for (const k of u)
6547
6550
  try {
6548
- const b = bd({
6551
+ const b = gd({
6549
6552
  taskId: k.id,
6550
6553
  request: k.moveRequest,
6551
6554
  current: l.get(k.id)
@@ -6557,7 +6560,7 @@ const gd = s.object({
6557
6560
  const h = /* @__PURE__ */ new Map(), m = [], y = (k) => {
6558
6561
  const b = k.filter((S) => !S.failed);
6559
6562
  b.length !== 0 && m.push(
6560
- Ad({
6563
+ Dd({
6561
6564
  client: t,
6562
6565
  items: b,
6563
6566
  onUpdated: (S, A) => {
@@ -6578,7 +6581,7 @@ const gd = s.object({
6578
6581
  })
6579
6582
  );
6580
6583
  }, f = new Set(p.map(({ item: k }) => k.index));
6581
- y(u.filter((k) => !f.has(k.index))), await jd({
6584
+ y(u.filter((k) => !f.has(k.index))), await $d({
6582
6585
  client: t,
6583
6586
  moving: p,
6584
6587
  results: h,
@@ -6596,14 +6599,14 @@ const gd = s.object({
6596
6599
  }
6597
6600
  }), await Promise.all(m);
6598
6601
  for (const k of u) {
6599
- if (k.failed || Fs(k.updateArgs))
6602
+ if (k.failed || Hs(k.updateArgs))
6600
6603
  continue;
6601
6604
  const b = h.get(k.index);
6602
6605
  b && "task" in b && (o[k.index] = { kind: "updated", task: b.task });
6603
6606
  }
6604
- const { updatedTasks: w, failures: C, skippedCount: D } = Sd({ tasks: r, outcomes: o }), T = u.filter((k) => k.redundantMoveSkipped).length, I = w.map(_);
6607
+ const { updatedTasks: w, failures: C, skippedCount: D } = Cd({ tasks: r, outcomes: o }), T = u.filter((k) => k.redundantMoveSkipped).length, I = w.map(P);
6605
6608
  return ne(g.UPDATE_TASKS, r.length, C), {
6606
- textContent: Ed({
6609
+ textContent: Od({
6607
6610
  tasks: I,
6608
6611
  failures: C,
6609
6612
  skippedCount: D,
@@ -6624,7 +6627,7 @@ const gd = s.object({
6624
6627
  };
6625
6628
  }
6626
6629
  };
6627
- function Sd({ tasks: e, outcomes: t }) {
6630
+ function Cd({ tasks: e, outcomes: t }) {
6628
6631
  const r = [], o = [];
6629
6632
  let n = 0;
6630
6633
  for (const [i, a] of t.entries()) {
@@ -6641,16 +6644,16 @@ function Sd({ tasks: e, outcomes: t }) {
6641
6644
  }
6642
6645
  return { updatedTasks: r, failures: o, skippedCount: n };
6643
6646
  }
6644
- async function Cd(e, t) {
6647
+ async function jd(e, t) {
6645
6648
  if (!e.some((r) => B(r.projectId)))
6646
6649
  return {};
6647
6650
  try {
6648
- return { projectId: (await P(() => t.getUser())).inboxProjectId };
6651
+ return { projectId: (await _(() => t.getUser())).inboxProjectId };
6649
6652
  } catch (r) {
6650
6653
  return { error: r };
6651
6654
  }
6652
6655
  }
6653
- async function Hs({
6656
+ async function Ws({
6654
6657
  client: e,
6655
6658
  ids: t
6656
6659
  }) {
@@ -6661,14 +6664,14 @@ async function Hs({
6661
6664
  const o = new Set(t), n = {
6662
6665
  ids: t.join(","),
6663
6666
  limit: et
6664
- }, { results: i } = await P(() => e.getTasks(n));
6667
+ }, { results: i } = await _(() => e.getTasks(n));
6665
6668
  for (const a of i)
6666
6669
  o.has(a.id) && r.set(a.id, a);
6667
6670
  } catch {
6668
6671
  }
6669
6672
  return r;
6670
6673
  }
6671
- async function jd({
6674
+ async function $d({
6672
6675
  client: e,
6673
6676
  moving: t,
6674
6677
  results: r,
@@ -6678,7 +6681,7 @@ async function jd({
6678
6681
  return;
6679
6682
  const n = /* @__PURE__ */ new Map();
6680
6683
  for (const c of t) {
6681
- const d = md(c.move), u = n.get(d);
6684
+ const d = fd(c.move), u = n.get(d);
6682
6685
  u ? u.push(c) : n.set(d, [c]);
6683
6686
  }
6684
6687
  const i = Pr(e), a = [];
@@ -6687,13 +6690,13 @@ async function jd({
6687
6690
  try {
6688
6691
  if (l) {
6689
6692
  const f = await i(
6690
- () => P(() => e.moveTask(l.item.id, u))
6693
+ () => _(() => e.moveTask(l.item.id, u))
6691
6694
  );
6692
6695
  r.set(l.item.index, { task: f }), o(c);
6693
6696
  continue;
6694
6697
  }
6695
6698
  const p = await i(
6696
- () => P(() => e.moveTasks(d, u))
6699
+ () => _(() => e.moveTasks(d, u))
6697
6700
  ), h = new Map(p.map((f) => [f.id, f])), m = [], y = [];
6698
6701
  for (const f of c) {
6699
6702
  const w = h.get(f.item.id);
@@ -6709,22 +6712,22 @@ async function jd({
6709
6712
  }
6710
6713
  }
6711
6714
  if (a.length > 0) {
6712
- await $d({ client: e, unresolved: a, results: r });
6715
+ await Ad({ client: e, unresolved: a, results: r });
6713
6716
  for (const { group: c } of a)
6714
6717
  o(c);
6715
6718
  }
6716
6719
  }
6717
- async function $d({
6720
+ async function Ad({
6718
6721
  client: e,
6719
6722
  unresolved: t,
6720
6723
  results: r
6721
6724
  }) {
6722
- const o = [...new Set(t.flatMap(({ group: i }) => i.map(({ item: a }) => a.id)))], n = await Hs({ client: e, ids: o });
6725
+ const o = [...new Set(t.flatMap(({ group: i }) => i.map(({ item: a }) => a.id)))], n = await Ws({ client: e, ids: o });
6723
6726
  for (const { group: i, destination: a, error: c } of t) {
6724
6727
  const d = c === void 0 ? "Task not returned by the move" : N(c);
6725
6728
  for (const { item: u } of i) {
6726
6729
  const l = n.get(u.id);
6727
- if (l && Ms(l, a)) {
6730
+ if (l && Fs(l, a)) {
6728
6731
  r.set(u.index, { task: l });
6729
6732
  continue;
6730
6733
  }
@@ -6732,18 +6735,18 @@ async function $d({
6732
6735
  }
6733
6736
  }
6734
6737
  }
6735
- async function Ad({
6738
+ async function Dd({
6736
6739
  client: e,
6737
6740
  items: t,
6738
6741
  onUpdated: r,
6739
6742
  onFailed: o
6740
6743
  }) {
6741
- const n = _r(e);
6744
+ const n = Ur(e);
6742
6745
  await Promise.all(
6743
- t.filter((i) => Fs(i.updateArgs)).map(async (i) => {
6746
+ t.filter((i) => Hs(i.updateArgs)).map(async (i) => {
6744
6747
  try {
6745
6748
  const a = await n(
6746
- () => P(() => e.updateTask(i.id, i.updateArgs))
6749
+ () => _(() => e.updateTask(i.id, i.updateArgs))
6747
6750
  );
6748
6751
  r(i, a);
6749
6752
  } catch (a) {
@@ -6752,7 +6755,7 @@ async function Ad({
6752
6755
  })
6753
6756
  );
6754
6757
  }
6755
- async function Dd({
6758
+ async function xd({
6756
6759
  task: e,
6757
6760
  index: t,
6758
6761
  client: r,
@@ -6778,17 +6781,17 @@ async function Dd({
6778
6781
  ...y,
6779
6782
  ...h !== void 0 && { labels: h }
6780
6783
  };
6781
- p && (w.priority = us(p));
6784
+ p && (w.priority = ps(p));
6782
6785
  const C = qt(
6783
6786
  d,
6784
- Td,
6785
- wd
6787
+ kd,
6788
+ vd
6786
6789
  );
6787
6790
  C !== void 0 && (w = { ...w, dueString: C });
6788
- const D = qt(m, kd, null);
6791
+ const D = qt(m, wd, null);
6789
6792
  if (D !== void 0 && (w = { ...w, deadlineDate: D }), u)
6790
6793
  try {
6791
- const { minutes: T } = ls(u);
6794
+ const { minutes: T } = us(u);
6792
6795
  w = {
6793
6796
  ...w,
6794
6797
  duration: T,
@@ -6799,7 +6802,7 @@ async function Dd({
6799
6802
  }
6800
6803
  return l !== void 0 && (w = {
6801
6804
  ...w,
6802
- assigneeId: await xd(r, n, l)
6805
+ assigneeId: await Ed(r, n, l)
6803
6806
  }), {
6804
6807
  index: t,
6805
6808
  id: n,
@@ -6813,7 +6816,7 @@ async function Dd({
6813
6816
  failed: !1
6814
6817
  };
6815
6818
  }
6816
- async function xd(e, t, r) {
6819
+ async function Ed(e, t, r) {
6817
6820
  if (r === null || r === "unassign")
6818
6821
  return null;
6819
6822
  const o = await ft.validateTaskUpdateAssignment(
@@ -6827,7 +6830,7 @@ async function xd(e, t, r) {
6827
6830
  }
6828
6831
  return o.resolvedUser?.userId;
6829
6832
  }
6830
- function Ed({
6833
+ function Od({
6831
6834
  tasks: e,
6832
6835
  failures: t,
6833
6836
  skippedCount: r,
@@ -6848,7 +6851,7 @@ function Ed({
6848
6851
  Failed (${t.length}) - address or drop these items:
6849
6852
  ${u}${l}`;
6850
6853
  }
6851
- function Od({ id: e, ...t }) {
6854
+ function _d({ id: e, ...t }) {
6852
6855
  return Object.keys(t).length > 0;
6853
6856
  }
6854
6857
  function qt(e, t, r) {
@@ -6859,7 +6862,7 @@ function qt(e, t, r) {
6859
6862
  const o = e.trim().toLowerCase();
6860
6863
  return t.includes(o) ? r : e;
6861
6864
  }
6862
- const Pd = {}, _d = {
6865
+ const Pd = {}, Ud = {
6863
6866
  type: s.literal("user_info").describe("The type of the response."),
6864
6867
  userId: s.string().describe("The user ID."),
6865
6868
  fullName: s.string().describe("The full name of the user."),
@@ -6876,36 +6879,36 @@ const Pd = {}, _d = {
6876
6879
  email: s.string().describe("The email address of the user."),
6877
6880
  plan: s.enum(["Todoist Free", "Todoist Pro", "Todoist Business"]).describe("The user plan.")
6878
6881
  };
6879
- function Ud(e) {
6882
+ function Rd(e) {
6880
6883
  return e.businessAccountId ? "Todoist Business" : e.isPremium ? "Todoist Pro" : "Todoist Free";
6881
6884
  }
6882
- function Rd(e, t) {
6885
+ function Ld(e, t) {
6883
6886
  const o = ((e.getDay() || 7) - t + 7) % 7, n = new Date(e);
6884
6887
  return n.setDate(e.getDate() - o), n;
6885
6888
  }
6886
- function Ld(e) {
6889
+ function Nd(e) {
6887
6890
  const t = new Date(e);
6888
6891
  return t.setDate(e.getDate() + 6), t;
6889
6892
  }
6890
- function Nd(e) {
6893
+ function Md(e) {
6891
6894
  const t = new Date(e.getFullYear(), 0, 1), r = (e.getTime() - t.getTime()) / 864e5;
6892
6895
  return Math.ceil((r + t.getDay() + 1) / 7);
6893
6896
  }
6894
- function Md(e) {
6897
+ function Fd(e) {
6895
6898
  return ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"][e === 7 ? 0 : e] ?? "Unknown";
6896
6899
  }
6897
- function Fd(e) {
6900
+ function Hd(e) {
6898
6901
  try {
6899
6902
  return new Intl.DateTimeFormat("en-US", { timeZone: e }), !0;
6900
6903
  } catch {
6901
6904
  return !1;
6902
6905
  }
6903
6906
  }
6904
- function Ws(e) {
6905
- return Fd(e) ? e : "UTC";
6907
+ function Bs(e) {
6908
+ return Hd(e) ? e : "UTC";
6906
6909
  }
6907
- function Hd(e, t) {
6908
- const r = Ws(t);
6910
+ function Wd(e, t) {
6911
+ const r = Bs(t);
6909
6912
  return e.toLocaleString("en-US", {
6910
6913
  timeZone: r,
6911
6914
  year: "numeric",
@@ -6917,8 +6920,8 @@ function Hd(e, t) {
6917
6920
  hour12: !1
6918
6921
  });
6919
6922
  }
6920
- async function Wd(e) {
6921
- const t = await e.getUser(), r = t.tzInfo?.timezone ?? "UTC", o = Ws(r), n = /* @__PURE__ */ new Date(), i = Hd(n, o), a = t.startDay ?? 1, c = Md(a), d = Ud(t), u = new Date(n.toLocaleString("en-US", { timeZone: o })), l = Rd(u, a), p = Ld(l), h = Nd(u), y = [
6923
+ async function Bd(e) {
6924
+ const t = await e.getUser(), r = t.tzInfo?.timezone ?? "UTC", o = Bs(r), n = /* @__PURE__ */ new Date(), i = Wd(n, o), a = t.startDay ?? 1, c = Fd(a), d = Rd(t), u = new Date(n.toLocaleString("en-US", { timeZone: o })), l = Ld(u, a), p = Nd(l), h = Md(u), y = [
6922
6925
  "# User Information",
6923
6926
  "",
6924
6927
  `**User ID:** ${t.id}`,
@@ -6960,26 +6963,26 @@ async function Wd(e) {
6960
6963
  };
6961
6964
  return { textContent: y, structuredContent: f };
6962
6965
  }
6963
- const Bd = {
6966
+ const zd = {
6964
6967
  name: g.USER_INFO,
6965
6968
  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).",
6966
6969
  parameters: Pd,
6967
- outputSchema: _d,
6970
+ outputSchema: Ud,
6968
6971
  annotations: { readOnlyHint: !0, destructiveHint: !1, idempotentHint: !0 },
6969
6972
  async execute(e, t) {
6970
- const r = await Wd(t);
6973
+ const r = await Bd(t);
6971
6974
  return {
6972
6975
  textContent: r.textContent,
6973
6976
  structuredContent: r.structuredContent
6974
6977
  };
6975
6978
  }
6976
- }, Yt = 10 * 1024 * 1024, zd = /* @__PURE__ */ new Set([
6979
+ }, Yt = 10 * 1024 * 1024, Kd = /* @__PURE__ */ new Set([
6977
6980
  "image/png",
6978
6981
  "image/jpeg",
6979
6982
  "image/gif",
6980
6983
  "image/webp",
6981
6984
  "image/svg+xml"
6982
- ]), Kd = /* @__PURE__ */ new Set([
6985
+ ]), qd = /* @__PURE__ */ new Set([
6983
6986
  "text/plain",
6984
6987
  "text/csv",
6985
6988
  "text/html",
@@ -6987,7 +6990,7 @@ const Bd = {
6987
6990
  "application/json",
6988
6991
  "application/xml",
6989
6992
  "text/xml"
6990
- ]), qd = {
6993
+ ]), Yd = {
6991
6994
  ".png": "image/png",
6992
6995
  ".jpg": "image/jpeg",
6993
6996
  ".jpeg": "image/jpeg",
@@ -7002,23 +7005,23 @@ const Bd = {
7002
7005
  ".xml": "application/xml",
7003
7006
  ".pdf": "application/pdf"
7004
7007
  };
7005
- function Yd(e) {
7006
- return zd.has(e) ? "image" : Kd.has(e) || e.startsWith("text/") ? "text" : "binary";
7007
- }
7008
7008
  function Gd(e) {
7009
- return (e.split(";")[0] ?? e).trim().toLowerCase();
7009
+ return Kd.has(e) ? "image" : qd.has(e) || e.startsWith("text/") ? "text" : "binary";
7010
7010
  }
7011
7011
  function Vd(e) {
7012
+ return (e.split(";")[0] ?? e).trim().toLowerCase();
7013
+ }
7014
+ function Jd(e) {
7012
7015
  try {
7013
7016
  const t = new URL(e).pathname, r = t.lastIndexOf(".");
7014
7017
  if (r === -1) return;
7015
7018
  const o = t.slice(r).toLowerCase();
7016
- return qd[o];
7019
+ return Yd[o];
7017
7020
  } catch {
7018
7021
  return;
7019
7022
  }
7020
7023
  }
7021
- function Jd(e) {
7024
+ function Xd(e) {
7022
7025
  try {
7023
7026
  const t = new URL(e).pathname, r = t.lastIndexOf("/");
7024
7027
  return r === -1 ? void 0 : t.slice(r + 1) || void 0;
@@ -7026,21 +7029,21 @@ function Jd(e) {
7026
7029
  return;
7027
7030
  }
7028
7031
  }
7029
- const Xd = {
7032
+ const Qd = {
7030
7033
  fileUrl: s.url().describe(
7031
7034
  "The URL of the attachment file to view. Get this from the fileUrl field in a comment's fileAttachment."
7032
7035
  )
7033
- }, Qd = {
7036
+ }, Zd = {
7034
7037
  name: g.VIEW_ATTACHMENT,
7035
7038
  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).",
7036
- parameters: Xd,
7039
+ parameters: Qd,
7037
7040
  annotations: {
7038
7041
  readOnlyHint: !0,
7039
7042
  destructiveHint: !1,
7040
7043
  idempotentHint: !0
7041
7044
  },
7042
7045
  async execute({ fileUrl: e }, t) {
7043
- const r = await t.viewAttachment(e), o = r.headers["content-length"], n = o ? Number.parseInt(o, 10) : void 0, i = Jd(e), a = r.headers["content-type"], c = a ? Gd(a) : void 0, d = c && c !== "application/octet-stream" ? c : Vd(e) ?? c ?? "application/octet-stream";
7046
+ const r = await t.viewAttachment(e), o = r.headers["content-length"], n = o ? Number.parseInt(o, 10) : void 0, i = Xd(e), a = r.headers["content-type"], c = a ? Vd(a) : void 0, d = c && c !== "application/octet-stream" ? c : Jd(e) ?? c ?? "application/octet-stream";
7044
7047
  if (n && n > Yt)
7045
7048
  return {
7046
7049
  textContent: `Attachment "${i ?? e}" is too large to display inline (${(n / 1024 / 1024).toFixed(1)}MB, limit is 10MB). File type: ${d}`
@@ -7050,7 +7053,7 @@ const Xd = {
7050
7053
  return {
7051
7054
  textContent: `Attachment "${i ?? e}" is too large to display inline (${(l / 1024 / 1024).toFixed(1)}MB, limit is 10MB). File type: ${d}`
7052
7055
  };
7053
- const p = Yd(d), h = [];
7056
+ const p = Gd(d), h = [];
7054
7057
  return p === "image" ? h.push({
7055
7058
  type: "image",
7056
7059
  data: u.toString("base64"),
@@ -7070,77 +7073,77 @@ const Xd = {
7070
7073
  contentItems: h
7071
7074
  };
7072
7075
  }
7073
- }, Zd = {
7074
- ...da,
7076
+ }, el = {
7077
+ ...la,
7075
7078
  _meta: {
7076
7079
  ui: {
7077
7080
  resourceUri: Be
7078
7081
  }
7079
7082
  }
7080
- }, el = {
7083
+ }, tl = {
7081
7084
  // Task management tools
7082
- addTasks: Wn,
7083
- completeTasks: Xn,
7084
- uncompleteTasks: $c,
7085
- updateTasks: Id,
7086
- rescheduleTasks: kc,
7087
- findTasks: ba,
7088
- findTasksByDate: Zd,
7089
- findCompletedTasks: Ri,
7085
+ addTasks: Bn,
7086
+ completeTasks: Qn,
7087
+ uncompleteTasks: Ac,
7088
+ updateTasks: Sd,
7089
+ rescheduleTasks: wc,
7090
+ findTasks: ga,
7091
+ findTasksByDate: el,
7092
+ findCompletedTasks: Li,
7090
7093
  // Project management tools
7091
- addProjects: Sn,
7092
- updateProjects: Qc,
7093
- findProjects: Ji,
7094
- projectManagement: lc,
7095
- projectMove: hc,
7094
+ addProjects: Cn,
7095
+ updateProjects: Zc,
7096
+ findProjects: Xi,
7097
+ projectManagement: uc,
7098
+ projectMove: mc,
7096
7099
  // Section management tools
7097
- addSections: Ln,
7098
- updateSections: ud,
7099
- findSections: na,
7100
+ addSections: Nn,
7101
+ updateSections: pd,
7102
+ findSections: ia,
7100
7103
  // Comment management tools
7101
- addComments: Xo,
7102
- findComments: $i,
7103
- updateComments: Oc,
7104
+ addComments: Qo,
7105
+ findComments: Ai,
7106
+ updateComments: _c,
7104
7107
  // Reminder management tools
7105
- addReminders: On,
7106
- findReminders: ea,
7107
- updateReminders: ad,
7108
+ addReminders: _n,
7109
+ findReminders: ta,
7110
+ updateReminders: cd,
7108
7111
  // Attachment tools
7109
- viewAttachment: Qd,
7112
+ viewAttachment: Zd,
7110
7113
  // Label management tools
7111
- addLabels: pn,
7112
- updateLabels: qc,
7113
- findLabels: Fi,
7114
+ addLabels: hn,
7115
+ updateLabels: Yc,
7116
+ findLabels: Hi,
7114
7117
  // Filter management tools
7115
- findFilters: sn,
7116
- addFilters: cn,
7117
- updateFilters: Lc,
7118
+ findFilters: rn,
7119
+ addFilters: dn,
7120
+ updateFilters: Nc,
7118
7121
  // Activity and audit tools
7119
- findActivity: ki,
7120
- getProductivityStats: Da,
7122
+ findActivity: wi,
7123
+ getProductivityStats: xa,
7121
7124
  // Health and insights tools
7122
- getProjectHealth: Fa,
7123
- getProjectActivityStats: _a,
7124
- analyzeProjectHealth: Gn,
7125
- getWorkspaceInsights: za,
7125
+ getProjectHealth: Ha,
7126
+ getProjectActivityStats: Ua,
7127
+ analyzeProjectHealth: Vn,
7128
+ getWorkspaceInsights: Ka,
7126
7129
  // General tools
7127
- getOverview: ja,
7128
- deleteObject: ti,
7129
- fetchObject: hi,
7130
- reorderObjects: bc,
7131
- userInfo: Bd,
7130
+ getOverview: $a,
7131
+ deleteObject: si,
7132
+ fetchObject: mi,
7133
+ reorderObjects: gc,
7134
+ userInfo: zd,
7132
7135
  // Assignment and collaboration tools
7133
- findProjectCollaborators: zi,
7134
- manageAssignments: ac,
7136
+ findProjectCollaborators: Ki,
7137
+ manageAssignments: cc,
7135
7138
  // Template tools
7136
- exportProjectTemplate: oi,
7137
- importProjectTemplate: Va,
7139
+ exportProjectTemplate: ni,
7140
+ importProjectTemplate: Ja,
7138
7141
  // Workspace tools
7139
- listWorkspaces: tc,
7142
+ listWorkspaces: sc,
7140
7143
  // OpenAI MCP tools
7141
- search: Sc,
7142
- fetch: bi
7143
- }, tl = Object.values(el), sl = `
7144
+ search: Cc,
7145
+ fetch: gi
7146
+ }, sl = Object.values(tl), rl = `
7144
7147
  ## Todoist Task and Project Management Tools
7145
7148
 
7146
7149
  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.
@@ -7197,25 +7200,25 @@ Use the **productivity-analysis** prompt for a combined productivity review —
7197
7200
 
7198
7201
  Always provide clear, actionable task titles and descriptions. Use the overview tools to give users context about their workload and project status.
7199
7202
  `;
7200
- function bl({
7203
+ function gl({
7201
7204
  todoistApiKey: e,
7202
7205
  baseUrl: t,
7203
7206
  features: r = []
7204
7207
  }) {
7205
- const o = new zs(
7208
+ const o = new Ks(
7206
7209
  { name: "todoist-mcp-server", version: ot },
7207
7210
  {
7208
7211
  capabilities: {
7209
7212
  tools: { listChanged: !0 },
7210
7213
  prompts: { listChanged: !0 }
7211
7214
  },
7212
- instructions: sl
7215
+ instructions: rl
7213
7216
  }
7214
- ), n = Gr(e, { baseUrl: t });
7215
- cr(o);
7217
+ ), n = Vr(e, { baseUrl: t });
7218
+ dr(o);
7216
7219
  const i = { server: o, client: n, features: r };
7217
- for (const a of tl)
7218
- go({ tool: a, ...i });
7220
+ for (const a of sl)
7221
+ yo({ tool: a, ...i });
7219
7222
  return o.registerPrompt(
7220
7223
  ye.name,
7221
7224
  {
@@ -7227,58 +7230,58 @@ function bl({
7227
7230
  ), o;
7228
7231
  }
7229
7232
  export {
7230
- eo as $,
7231
- ja as A,
7232
- Da as B,
7233
- _a as C,
7234
- Fa as D,
7235
- za as E,
7236
- fl as F,
7237
- Va as G,
7238
- tc as H,
7239
- ac as I,
7240
- lc as J,
7241
- hc as K,
7242
- tl as L,
7243
- bc as M,
7244
- kc as N,
7245
- Sc as O,
7246
- $c as P,
7247
- Oc as Q,
7248
- Lc as R,
7249
- qc as S,
7250
- Qc as T,
7251
- ad as U,
7252
- ud as V,
7253
- Id as W,
7254
- Bd as X,
7255
- Qd as Y,
7256
- Gr as Z,
7257
- Mr as _,
7258
- Xo as a,
7259
- cn as b,
7260
- pn as c,
7261
- Sn as d,
7262
- On as e,
7263
- Ln as f,
7264
- bl as g,
7265
- Wn as h,
7266
- Gn as i,
7267
- Xn as j,
7268
- ti as k,
7269
- oi as l,
7270
- bi as m,
7271
- hi as n,
7272
- ki as o,
7273
- $i as p,
7274
- Ri as q,
7275
- sn as r,
7276
- Fi as s,
7277
- el as t,
7278
- zi as u,
7279
- Ji as v,
7280
- ea as w,
7281
- na as x,
7282
- ba as y,
7283
- da as z
7233
+ to as $,
7234
+ $a as A,
7235
+ xa as B,
7236
+ Ua as C,
7237
+ Ha as D,
7238
+ Ka as E,
7239
+ bl as F,
7240
+ Ja as G,
7241
+ sc as H,
7242
+ cc as I,
7243
+ uc as J,
7244
+ mc as K,
7245
+ sl as L,
7246
+ gc as M,
7247
+ wc as N,
7248
+ Cc as O,
7249
+ Ac as P,
7250
+ _c as Q,
7251
+ Nc as R,
7252
+ Yc as S,
7253
+ Zc as T,
7254
+ cd as U,
7255
+ pd as V,
7256
+ Sd as W,
7257
+ zd as X,
7258
+ Zd as Y,
7259
+ Vr as Z,
7260
+ Fr as _,
7261
+ Qo as a,
7262
+ dn as b,
7263
+ hn as c,
7264
+ Cn as d,
7265
+ _n as e,
7266
+ Nn as f,
7267
+ gl as g,
7268
+ Bn as h,
7269
+ Vn as i,
7270
+ Qn as j,
7271
+ si as k,
7272
+ ni as l,
7273
+ gi as m,
7274
+ mi as n,
7275
+ wi as o,
7276
+ Ai as p,
7277
+ Li as q,
7278
+ rn as r,
7279
+ Hi as s,
7280
+ tl as t,
7281
+ Ki as u,
7282
+ Xi as v,
7283
+ ta as w,
7284
+ ia as x,
7285
+ ga as y,
7286
+ la as z
7284
7287
  };