@doist/todoist-ai 8.12.0 → 8.12.2

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 { McpServer as Vt } from "@modelcontextprotocol/sdk/server/mcp.js";
2
- import { createHash as Jt, randomUUID as Ae } from "node:crypto";
3
- import { readFileSync as Xt } from "node:fs";
4
- import { dirname as gt, join as Ee } from "node:path";
5
- import { fileURLToPath as Zt } from "node:url";
6
- import { registerAppResource as Qt, RESOURCE_MIME_TYPE as es, registerAppTool as ts } from "@modelcontextprotocol/ext-apps/server";
7
- import Z, { ZodError as ss, z as s } from "zod";
8
- import { AsyncLocalStorage as rs } from "node:async_hooks";
9
- import { createRequire as os } from "node:module";
10
- import { TodoistApi as ns, isWorkspaceProject as he, isPersonalProject as ne, colors as Oe, LOCATION_TRIGGERS as yt, REMINDER_TYPES as as, createCommand as z, REMINDER_DELIVERY_SERVICES as is, HEALTH_STATUSES as Me, getTaskUrl as kt, getProjectUrl as Tt, WORKSPACE_ROLES as cs, WORKSPACE_PLANS as ds } from "@doist/todoist-sdk";
11
- import { addDays as Ue, formatISO as et } from "date-fns";
12
- const tt = gt(Zt(import.meta.url)), ls = [
13
- Ee(tt, "task-list", "index.html"),
14
- Ee(tt, "mcp-apps", "index.html")
15
- ], us = `<!doctype html>
1
+ import { McpServer as Jt } from "@modelcontextprotocol/sdk/server/mcp.js";
2
+ import { createHash as Xt, randomUUID as Ee } from "node:crypto";
3
+ import { readFileSync as Zt } from "node:fs";
4
+ import { dirname as yt, join as Oe } from "node:path";
5
+ import { fileURLToPath as Qt } from "node:url";
6
+ import { registerAppResource as es, RESOURCE_MIME_TYPE as ts, registerAppTool as ss } from "@modelcontextprotocol/ext-apps/server";
7
+ import Z, { ZodError as rs, z as s } from "zod";
8
+ import { AsyncLocalStorage as os } from "node:async_hooks";
9
+ import { createRequire as ns } from "node:module";
10
+ import { TodoistApi as as, isWorkspaceProject as be, isPersonalProject as ne, colors as Ue, LOCATION_TRIGGERS as kt, REMINDER_TYPES as is, createCommand as z, REMINDER_DELIVERY_SERVICES as cs, HEALTH_STATUSES as Fe, getTaskUrl as Tt, getProjectUrl as wt, WORKSPACE_ROLES as ds, WORKSPACE_PLANS as ls } from "@doist/todoist-sdk";
11
+ import { addDays as Pe, formatISO as tt } from "date-fns";
12
+ const st = yt(Qt(import.meta.url)), us = [
13
+ Oe(st, "task-list", "index.html"),
14
+ Oe(st, "mcp-apps", "index.html")
15
+ ], ps = `<!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 ps() {
21
+ function ms() {
22
22
  const e = [];
23
- for (const t of ls)
23
+ for (const t of us)
24
24
  try {
25
- return Xt(t, "utf-8");
25
+ return Zt(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), us;
29
+ return console.error("Failed to load task list app HTML from any known path:", e), ps;
30
30
  }
31
- const wt = ps(), ms = Jt("sha256").update(wt).digest("hex").slice(0, 12), Pe = `ui://todoist/task-list@${ms}`, It = "Interactive task list widget", hs = "https://ai.todoist.net", st = {
31
+ const It = ms(), hs = Xt("sha256").update(It).digest("hex").slice(0, 12), Re = `ui://todoist/task-list@${hs}`, vt = "Interactive task list widget", fs = "https://ai.todoist.net", rt = {
32
32
  ui: {
33
33
  prefersBorder: !0,
34
34
  csp: {
@@ -37,30 +37,30 @@ const wt = ps(), ms = Jt("sha256").update(wt).digest("hex").slice(0, 12), Pe = `
37
37
  resourceDomains: []
38
38
  }
39
39
  },
40
- "openai/widgetDescription": It,
40
+ "openai/widgetDescription": vt,
41
41
  "openai/widgetPrefersBorder": !0,
42
42
  "openai/widgetCSP": {
43
43
  connect_domains: [],
44
44
  resource_domains: []
45
45
  },
46
- "openai/widgetDomain": hs
46
+ "openai/widgetDomain": fs
47
47
  };
48
- function fs(e) {
49
- Qt(
48
+ function bs(e) {
49
+ es(
50
50
  e,
51
51
  "todoist-task-list",
52
- Pe,
52
+ Re,
53
53
  {
54
- description: It,
55
- _meta: st
54
+ description: vt,
55
+ _meta: rt
56
56
  },
57
57
  async () => ({
58
58
  contents: [
59
59
  {
60
- uri: Pe,
61
- mimeType: es,
62
- text: wt,
63
- _meta: st
60
+ uri: Re,
61
+ mimeType: ts,
62
+ text: It,
63
+ _meta: rt
64
64
  }
65
65
  ]
66
66
  })
@@ -69,7 +69,7 @@ function fs(e) {
69
69
  function G(e) {
70
70
  return typeof e == "object" && e !== null;
71
71
  }
72
- function Re(...e) {
72
+ function _e(...e) {
73
73
  return e.find(G);
74
74
  }
75
75
  function _(...e) {
@@ -93,21 +93,21 @@ function Q(e) {
93
93
  const t = E(e);
94
94
  return t !== void 0 ? t : k(e);
95
95
  }
96
- function bs(e) {
96
+ function gs(e) {
97
97
  return e.replace(/\b(Bearer)\s+[A-Za-z0-9._~+/=-]+/gi, "$1 [REDACTED]").replace(
98
98
  /\b(token|api[_-]?key|authorization)\s*[:=]\s*["']?[A-Za-z0-9._~+/=-]{6,}["']?/gi,
99
99
  "$1: [REDACTED]"
100
100
  ).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]");
101
101
  }
102
102
  function U(e, t = 220) {
103
- const r = bs(e).replace(/\s+/g, " ").trim();
103
+ const r = gs(e).replace(/\s+/g, " ").trim();
104
104
  return r.length <= t ? r : `${r.slice(0, t - 3)}...`;
105
105
  }
106
- function rt(e) {
106
+ function ot(e) {
107
107
  const t = e.trim();
108
108
  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);
109
109
  }
110
- function Se(e) {
110
+ function Ce(e) {
111
111
  if (!e)
112
112
  return;
113
113
  const t = e.match(/\b(?:HTTP|status code)\s*[:#-]?\s*(\d{3})\b/i);
@@ -141,7 +141,7 @@ function Y(e) {
141
141
  }
142
142
  return o.length > 0 ? U(o.join("; ")) : void 0;
143
143
  }
144
- function gs(e) {
144
+ function ys(e) {
145
145
  if (!e)
146
146
  return [];
147
147
  const t = /* @__PURE__ */ new Set(), r = (i) => {
@@ -153,7 +153,7 @@ function gs(e) {
153
153
  k(e.path)
154
154
  );
155
155
  r(o);
156
- const n = Re(
156
+ const n = _e(
157
157
  e.details,
158
158
  e.errorDetails,
159
159
  e.errorExtra,
@@ -204,7 +204,7 @@ function gs(e) {
204
204
  }
205
205
  return Array.from(t).slice(0, 3);
206
206
  }
207
- const ys = [
207
+ const ks = [
208
208
  "error",
209
209
  "error_code",
210
210
  "error_tag",
@@ -215,14 +215,14 @@ const ys = [
215
215
  "httpCode",
216
216
  "errorExtra"
217
217
  ];
218
- function ks(e) {
219
- return e ? ys.some((t) => e[t] !== void 0) : !1;
218
+ function Ts(e) {
219
+ return e ? ks.some((t) => e[t] !== void 0) : !1;
220
220
  }
221
- function Ts(e, t) {
221
+ function ws(e, t) {
222
222
  return e === 401 || e === 403 ? "Verify your API token and access permissions, then retry." : e === 404 ? "Confirm the referenced IDs exist and are accessible, then retry." : e === 429 ? "Rate limit reached. Wait briefly and retry." : e !== void 0 && e >= 500 ? "Todoist API may be temporarily unavailable. Retry shortly." : t ? "Fix the field hints above and retry." : e === 400 || e === 422 ? "Check parameter values and formats, then retry." : "Check the request parameters and retry.";
223
223
  }
224
- function ws(e) {
225
- const t = G(e) ? e : void 0, r = e instanceof Error && G(e.cause) ? e.cause : void 0, o = Re(t?.response, r?.response), n = Re(
224
+ function Is(e) {
225
+ const t = G(e) ? e : void 0, r = e instanceof Error && G(e.cause) ? e.cause : void 0, o = _e(t?.response, r?.response), n = _e(
226
226
  t?.responseData,
227
227
  o?.data,
228
228
  t?.data,
@@ -238,9 +238,9 @@ function ws(e) {
238
238
  E(n?.status),
239
239
  E(n?.httpCode),
240
240
  E(n?.http_code),
241
- Se(k(t?.message)),
242
- Se(k(r?.message)),
243
- Se(typeof e == "string" ? e : void 0)
241
+ Ce(k(t?.message)),
242
+ Ce(k(r?.message)),
243
+ Ce(typeof e == "string" ? e : void 0)
244
244
  ), i = _(
245
245
  Q(n?.errorCode),
246
246
  Q(n?.error_code),
@@ -262,15 +262,15 @@ function ws(e) {
262
262
  k(t?.message),
263
263
  k(r?.message),
264
264
  e instanceof Error ? e.message : k(e)
265
- ].filter((h) => !!h), l = d.find((h) => !rt(h)) || d[0], u = _(
265
+ ].filter((h) => !!h), l = d.find((h) => !ot(h)) || d[0], u = _(
266
266
  Y(n?.errorExtra),
267
267
  Y(n?.error_extra),
268
268
  Y(n?.details),
269
269
  Y(n?.errorDetails),
270
270
  Y(n?.errors),
271
271
  Y(t?.details)
272
- ), p = gs(n);
273
- return a !== void 0 || ks(n) || c !== void 0 || i !== void 0 || (l ? rt(l) : !1) ? {
272
+ ), p = ys(n);
273
+ return a !== void 0 || Ts(n) || c !== void 0 || i !== void 0 || (l ? ot(l) : !1) ? {
274
274
  statusCode: a,
275
275
  code: i,
276
276
  tag: c ? U(c, 80) : void 0,
@@ -279,67 +279,67 @@ function ws(e) {
279
279
  fieldHints: p
280
280
  } : null;
281
281
  }
282
- function Is(e) {
282
+ function vs(e) {
283
283
  const t = [];
284
284
  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}`);
285
285
  const r = [
286
286
  t.length > 0 ? `Todoist API request failed (${t.join(", ")}).` : "Todoist API request failed."
287
287
  ];
288
- 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: ${Ts(e.statusCode, e.fieldHints.length > 0)}`), r.join(`
288
+ 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: ${ws(e.statusCode, e.fieldHints.length > 0)}`), r.join(`
289
289
  `);
290
290
  }
291
- function vs(e) {
291
+ function js(e) {
292
292
  return e instanceof Error ? U(e.message) : typeof e == "string" ? U(e) : "An unknown error occurred";
293
293
  }
294
- function js(e) {
295
- if (e instanceof ss)
294
+ function Ss(e) {
295
+ if (e instanceof rs)
296
296
  return e.message;
297
- const t = ws(e);
298
- return t ? Is(t) : vs(e);
299
- }
300
- const Ss = "8.12.0", Cs = {
301
- version: Ss
302
- }, $s = "todoist-ai", Fe = Cs.version, vt = new rs(), ot = os(import.meta.url);
303
- let me;
304
- const Ds = async () => {
305
- const e = ot.resolve("@doist/todoist-sdk"), t = Ee(gt(e), "transport", "http-dispatcher.js");
306
- return ot(t);
297
+ const t = Is(e);
298
+ return t ? vs(t) : js(e);
299
+ }
300
+ const Cs = "8.12.2", $s = {
301
+ version: Cs
302
+ }, Ds = "todoist-ai", He = $s.version, jt = new os(), nt = ns(import.meta.url);
303
+ let fe;
304
+ const xs = async () => {
305
+ const e = nt.resolve("@doist/todoist-sdk"), t = Oe(yt(e), "transport", "http-dispatcher.js");
306
+ return nt(t);
307
307
  };
308
- let xs = Ds;
309
- function As() {
310
- return `${$s}/${Fe}`;
308
+ let As = xs;
309
+ function Es() {
310
+ return `${Ds}/${He}`;
311
311
  }
312
- function jt(e) {
312
+ function St(e) {
313
313
  return e.trim().toLowerCase();
314
314
  }
315
- function Es(e, t) {
316
- return vt.run(jt(e), t);
315
+ function Os(e, t) {
316
+ return jt.run(St(e), t);
317
317
  }
318
- function Os({
318
+ function Us({
319
319
  label: e,
320
320
  platform: t = "mcp",
321
- sessionId: r = Ae()
321
+ sessionId: r = Ee()
322
322
  } = {}) {
323
- const o = e ? jt(e) : vt.getStore();
323
+ const o = e ? St(e) : jt.getStore();
324
324
  return {
325
- "User-Agent": As(),
325
+ "User-Agent": Es(),
326
326
  "doist-platform": t,
327
- "doist-version": Fe,
328
- "X-TD-Request-Id": Ae(),
327
+ "doist-version": He,
328
+ "X-TD-Request-Id": Ee(),
329
329
  "X-TD-Session-Id": r,
330
330
  "X-TD-MCP-Tool": o ?? "unknown"
331
331
  };
332
332
  }
333
- function Us(e, t) {
333
+ function Ps(e, t) {
334
334
  const r = new Headers(e);
335
- for (const [o, n] of Object.entries(Os(t)))
335
+ for (const [o, n] of Object.entries(Us(t)))
336
336
  r.set(o, n);
337
337
  return Object.fromEntries(r.entries());
338
338
  }
339
- function nt() {
339
+ function at() {
340
340
  return new DOMException("The operation was aborted due to timeout", "TimeoutError");
341
341
  }
342
- function Ps(e, t) {
342
+ function Rs(e, t) {
343
343
  if (!e && t === void 0)
344
344
  return {
345
345
  signal: void 0,
@@ -347,7 +347,7 @@ function Ps(e, t) {
347
347
  }
348
348
  };
349
349
  if (!e && t !== void 0) {
350
- const i = new AbortController(), c = setTimeout(() => i.abort(nt()), t);
350
+ const i = new AbortController(), c = setTimeout(() => i.abort(at()), t);
351
351
  return {
352
352
  signal: i.signal,
353
353
  cleanup: () => clearTimeout(c)
@@ -368,7 +368,7 @@ function Ps(e, t) {
368
368
  const i = () => n(e.reason);
369
369
  e.addEventListener("abort", i, { once: !0 }), o.push(() => e.removeEventListener("abort", i));
370
370
  }
371
- const a = setTimeout(() => n(nt()), t);
371
+ const a = setTimeout(() => n(at()), t);
372
372
  return o.push(() => clearTimeout(a)), {
373
373
  signal: r.signal,
374
374
  cleanup: () => {
@@ -377,20 +377,20 @@ function Ps(e, t) {
377
377
  }
378
378
  };
379
379
  }
380
- async function Rs() {
381
- if (_s())
382
- return me || (me = xs().then((e) => e.getDefaultDispatcher()).catch((e) => {
383
- throw me = void 0, e;
384
- })), me;
380
+ async function _s() {
381
+ if (Ns())
382
+ return fe || (fe = As().then((e) => e.getDefaultDispatcher()).catch((e) => {
383
+ throw fe = void 0, e;
384
+ })), fe;
385
385
  }
386
- function _s() {
386
+ function Ns() {
387
387
  return typeof process < "u" && !!process.versions?.node;
388
388
  }
389
- async function Ns(e) {
390
- const t = await Rs();
389
+ async function Ls(e) {
390
+ const t = await _s();
391
391
  t !== void 0 && (e.dispatcher = t);
392
392
  }
393
- function Ls(e) {
393
+ function Ms(e) {
394
394
  return {
395
395
  ok: e.ok,
396
396
  status: e.status,
@@ -400,35 +400,35 @@ function Ls(e) {
400
400
  json: () => e.json()
401
401
  };
402
402
  }
403
- function Ms(e = globalThis.fetch, t = {}) {
404
- const r = e === globalThis.fetch, { enabled: o = !0, platform: n = "mcp", sessionId: a = Ae() } = t;
403
+ function Fs(e = globalThis.fetch, t = {}) {
404
+ const r = e === globalThis.fetch, { enabled: o = !0, platform: n = "mcp", sessionId: a = Ee() } = t;
405
405
  return async (i, c = {}) => {
406
- const { timeout: d, headers: l, signal: u, ...p } = c, { signal: m, cleanup: h } = Ps(u, d);
406
+ const { timeout: d, headers: l, signal: u, ...p } = c, { signal: m, cleanup: h } = Rs(u, d);
407
407
  try {
408
408
  const b = {
409
409
  ...p,
410
410
  signal: m,
411
- ...o ? { headers: Us(l, { platform: n, sessionId: a }) } : l !== void 0 ? { headers: l } : {}
411
+ ...o ? { headers: Ps(l, { platform: n, sessionId: a }) } : l !== void 0 ? { headers: l } : {}
412
412
  };
413
- r && await Ns(b);
413
+ r && await Ls(b);
414
414
  const I = await e(i, b);
415
- return Ls(I);
415
+ return Ms(I);
416
416
  } finally {
417
417
  h();
418
418
  }
419
419
  };
420
420
  }
421
- function Fs(e, {
421
+ function Hs(e, {
422
422
  baseUrl: t,
423
423
  tracking: r
424
424
  } = {}) {
425
- return new ns(e, {
426
- customFetch: Ms(globalThis.fetch, r),
425
+ return new as(e, {
426
+ customFetch: Fs(globalThis.fetch, r),
427
427
  ...t ? { baseUrl: t } : {}
428
428
  });
429
429
  }
430
- const Hs = 2, Ws = 500, Bs = 2e3, Ys = /* @__PURE__ */ new Set([502, 503, 504]);
431
- function zs(e) {
430
+ const Ws = 2, Bs = 500, Ys = 2e3, zs = /* @__PURE__ */ new Set([502, 503, 504]);
431
+ function Gs(e) {
432
432
  if (e == null || typeof e != "object")
433
433
  return;
434
434
  const t = e;
@@ -444,11 +444,11 @@ function zs(e) {
444
444
  return Number(r[1]);
445
445
  }
446
446
  }
447
- function Gs(e) {
448
- const t = zs(e);
449
- return t !== void 0 && Ys.has(t);
447
+ function qs(e) {
448
+ const t = Gs(e);
449
+ return t !== void 0 && zs.has(t);
450
450
  }
451
- function qs({
451
+ function Ks({
452
452
  attempt: e,
453
453
  baseDelayMs: t,
454
454
  maxDelayMs: r
@@ -456,35 +456,35 @@ function qs({
456
456
  const o = t * 2 ** e;
457
457
  return Math.min(o, r);
458
458
  }
459
- function Ks(e) {
459
+ function Vs(e) {
460
460
  return new Promise((t) => setTimeout(t, e));
461
461
  }
462
- async function Vs(e, t = {}) {
463
- const r = t.maxRetries ?? Hs, o = t.baseDelayMs ?? Ws, n = t.maxDelayMs ?? Bs;
462
+ async function Js(e, t = {}) {
463
+ const r = t.maxRetries ?? Ws, o = t.baseDelayMs ?? Bs, n = t.maxDelayMs ?? Ys;
464
464
  let a;
465
465
  for (let i = 0; i <= r; i++)
466
466
  try {
467
467
  return await e();
468
468
  } catch (c) {
469
- if (a = c, i < r && Gs(c)) {
470
- const d = qs({ attempt: i, baseDelayMs: o, maxDelayMs: n });
471
- await Ks(d);
469
+ if (a = c, i < r && qs(c)) {
470
+ const d = Ks({ attempt: i, baseDelayMs: o, maxDelayMs: n });
471
+ await Vs(d);
472
472
  continue;
473
473
  }
474
474
  throw c;
475
475
  }
476
476
  throw a;
477
477
  }
478
- function _e(e) {
478
+ function Ne(e) {
479
479
  if (e == null)
480
480
  return e;
481
481
  if (Array.isArray(e))
482
- return e.map((t) => _e(t));
482
+ return e.map((t) => Ne(t));
483
483
  if (typeof e == "object") {
484
484
  const t = {};
485
485
  for (const [r, o] of Object.entries(e))
486
486
  if (o !== null) {
487
- const n = _e(o);
487
+ const n = Ne(o);
488
488
  if (n !== null && typeof n == "object" && !Array.isArray(n) && Object.keys(n).length === 0)
489
489
  continue;
490
490
  t[r] = n;
@@ -553,20 +553,20 @@ const f = {
553
553
  // OpenAI MCP tools
554
554
  SEARCH: "search",
555
555
  FETCH: "fetch"
556
- }, kc = {
556
+ }, Tc = {
557
557
  /**
558
558
  * Strips email addresses from tool outputs that expose user data.
559
559
  * Affects: find-project-collaborators, find-completed-tasks
560
560
  */
561
561
  STRIP_EMAILS: "strip_emails"
562
- }, Js = process.env.USE_STRUCTURED_CONTENT === "true" || process.env.NODE_ENV === "test";
563
- function Xs({
562
+ }, Xs = process.env.USE_STRUCTURED_CONTENT === "true" || process.env.NODE_ENV === "test";
563
+ function Zs({
564
564
  textContent: e,
565
565
  structuredContent: t,
566
566
  contentItems: r
567
567
  }) {
568
- const o = _e(t), n = {}, a = [];
569
- if (e && a.push({ type: "text", text: e }), r && a.push(...r), a.length > 0 && (n.content = a), t && (n.structuredContent = o), !Js && t) {
568
+ const o = Ne(t), n = {}, a = [];
569
+ if (e && a.push({ type: "text", text: e }), r && a.push(...r), a.length > 0 && (n.content = a), t && (n.structuredContent = o), !Xs && t) {
570
570
  const i = JSON.stringify(o);
571
571
  n.content || (n.content = []), n.content.push({
572
572
  type: "text",
@@ -575,42 +575,42 @@ function Xs({
575
575
  }
576
576
  return n;
577
577
  }
578
- function Zs(e) {
578
+ function Qs(e) {
579
579
  return {
580
580
  content: [{ type: "text", text: e }],
581
581
  isError: !0
582
582
  };
583
583
  }
584
- function Qs(e) {
584
+ function er(e) {
585
585
  return { ...{
586
- title: `Todoist: ${er(e.name)}`,
586
+ title: `Todoist: ${tr(e.name)}`,
587
587
  openWorldHint: !1
588
588
  }, ...e.annotations };
589
589
  }
590
- function er(e) {
590
+ function tr(e) {
591
591
  return e.split("-").filter(Boolean).map((t) => `${t.charAt(0).toUpperCase()}${t.slice(1)}`).join(" ");
592
592
  }
593
- function tr(e) {
593
+ function sr(e) {
594
594
  return e ? typeof e["ui/resourceUri"] == "string" ? !0 : typeof e.ui == "object" && e.ui !== null : !1;
595
595
  }
596
- const sr = [
596
+ const rr = [
597
597
  f.FIND_PROJECT_COLLABORATORS,
598
598
  f.FIND_COMPLETED_TASKS
599
599
  ];
600
- function Ne(e) {
600
+ function Le(e) {
601
601
  if (e == null)
602
602
  return e;
603
603
  if (Array.isArray(e))
604
- return e.map((t) => Ne(t));
604
+ return e.map((t) => Le(t));
605
605
  if (typeof e == "object") {
606
606
  const t = {};
607
607
  for (const [r, o] of Object.entries(e))
608
- r !== "email" && (t[r] = Ne(o));
608
+ r !== "email" && (t[r] = Le(o));
609
609
  return t;
610
610
  }
611
611
  return e;
612
612
  }
613
- function rr(e) {
613
+ function or(e) {
614
614
  const t = /\s*\([^)]*@[^)]+\)/g, r = /\S+@\S+\.\S+/g;
615
615
  return e.replace(t, "").replace(r, "[email hidden]");
616
616
  }
@@ -620,27 +620,27 @@ function y({
620
620
  client: r,
621
621
  features: o = []
622
622
  }) {
623
- const n = o.some((c) => c.name === "strip_emails") && sr.includes(e.name), a = async (c, d) => {
623
+ const n = o.some((c) => c.name === "strip_emails") && rr.includes(e.name), a = async (c, d) => {
624
624
  try {
625
- let { textContent: l, structuredContent: u, contentItems: p } = await Es(
625
+ let { textContent: l, structuredContent: u, contentItems: p } = await Os(
626
626
  e.name,
627
- () => Vs(
627
+ () => Js(
628
628
  () => e.execute(c, r)
629
629
  )
630
630
  );
631
- return n && (l && (l = rr(l)), u && (u = Ne(u))), Xs({ textContent: l, structuredContent: u, contentItems: p });
631
+ return n && (l && (l = or(l)), u && (u = Le(u))), Zs({ textContent: l, structuredContent: u, contentItems: p });
632
632
  } catch (l) {
633
- return console.error(`Error executing tool ${e.name}:`, { args: c, error: l }), Zs(js(l));
633
+ return console.error(`Error executing tool ${e.name}:`, { args: c, error: l }), Qs(Ss(l));
634
634
  }
635
635
  }, i = {
636
636
  description: e.description,
637
637
  inputSchema: e.parameters,
638
638
  ...e.outputSchema ? { outputSchema: e.outputSchema } : {},
639
- annotations: Qs(e),
639
+ annotations: er(e),
640
640
  ...e._meta ? { _meta: e._meta } : {}
641
641
  };
642
- if (tr(e._meta)) {
643
- ts(
642
+ if (sr(e._meta)) {
643
+ ss(
644
644
  t,
645
645
  e.name,
646
646
  {
@@ -653,7 +653,7 @@ function y({
653
653
  }
654
654
  t.registerTool(e.name, i, a);
655
655
  }
656
- const or = {
656
+ const nr = {
657
657
  period: s.enum(["today", "7d", "14d", "30d", "this-week", "this-month"]).default("7d").describe(
658
658
  '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.'
659
659
  ),
@@ -662,7 +662,7 @@ const or = {
662
662
  ),
663
663
  projectId: s.string().optional().describe("Optional project ID to scope the analysis to a specific project.")
664
664
  };
665
- function nr(e, t = /* @__PURE__ */ new Date()) {
665
+ function ar(e, t = /* @__PURE__ */ new Date()) {
666
666
  const r = (n) => n.toISOString().slice(0, 10), o = r(t);
667
667
  switch (e) {
668
668
  case "today":
@@ -709,7 +709,7 @@ function nr(e, t = /* @__PURE__ */ new Date()) {
709
709
  }
710
710
  }
711
711
  }
712
- function ar(e) {
712
+ function ir(e) {
713
713
  const t = {
714
714
  goals: `### Goal Tracking
715
715
  - Compare tasks completed today vs the daily goal
@@ -740,8 +740,8 @@ function ar(e) {
740
740
 
741
741
  `) : t[e] ?? "";
742
742
  }
743
- function ir(e) {
744
- const { since: t, until: r, periodDescription: o } = nr(e.period), n = e.projectId ? `
743
+ function cr(e) {
744
+ const { since: t, until: r, periodDescription: o } = ar(e.period), n = e.projectId ? `
745
745
  Scope this analysis to project ID: ${e.projectId}. Pass this projectId when calling find-completed-tasks and get-overview.` : "";
746
746
  return `Analyze my Todoist productivity for ${o} (${t} to ${r}).${n}
747
747
 
@@ -762,7 +762,7 @@ ${e.focus === "overall" || e.focus === "projects" ? `4. **get-overview** — Get
762
762
 
763
763
  Using the collected data, produce an analysis covering the following sections:
764
764
 
765
- ${ar(e.focus)}
765
+ ${ir(e.focus)}
766
766
 
767
767
  ### Step 3: Format
768
768
 
@@ -772,25 +772,25 @@ Present the analysis as a clear, well-structured markdown report with:
772
772
  - Specific numbers and comparisons (not vague statements)
773
773
  - Actionable takeaways highlighted clearly`;
774
774
  }
775
- function cr(e) {
775
+ function dr(e) {
776
776
  return {
777
777
  messages: [
778
778
  {
779
779
  role: "user",
780
780
  content: {
781
781
  type: "text",
782
- text: ir(e)
782
+ text: cr(e)
783
783
  }
784
784
  }
785
785
  ]
786
786
  };
787
787
  }
788
- const le = {
788
+ const ue = {
789
789
  name: "productivity-analysis",
790
790
  title: "Productivity Analysis",
791
791
  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.",
792
- argsSchema: or,
793
- callback: cr
792
+ argsSchema: nr,
793
+ callback: dr
794
794
  }, C = {
795
795
  /** Default limit for task listings */
796
796
  TASKS_DEFAULT: 10,
@@ -820,7 +820,7 @@ const le = {
820
820
  LABELS_DEFAULT: 50,
821
821
  /** Maximum limit for label listings */
822
822
  LABELS_MAX: 200
823
- }, Ce = {
823
+ }, $e = {
824
824
  /** Maximum number of failures to show in detailed error messages */
825
825
  MAX_FAILURES_SHOWN: 3
826
826
  };
@@ -829,7 +829,7 @@ class O extends Error {
829
829
  super(`Invalid duration format "${t}": ${r}`), this.name = "DurationParseError";
830
830
  }
831
831
  }
832
- function St(e) {
832
+ function Ct(e) {
833
833
  if (!e || typeof e != "string")
834
834
  throw new O(e, "Duration must be a non-empty string");
835
835
  const t = e.trim().toLowerCase().replace(/\s+/g, "");
@@ -863,20 +863,20 @@ function St(e) {
863
863
  throw new O(e, "Duration cannot exceed 24 hours (1440 minutes)");
864
864
  return { minutes: o };
865
865
  }
866
- function dr(e) {
866
+ function lr(e) {
867
867
  if (e <= 0) return "0m";
868
868
  const t = Math.floor(e / 60), r = e % 60;
869
869
  return t === 0 ? `${r}m` : r === 0 ? `${t}h` : `${t}h${r}m`;
870
870
  }
871
- const lr = ["p1", "p2", "p3", "p4"], He = '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.', We = s.enum(lr).describe(He);
872
- function Ct(e) {
871
+ const ur = ["p1", "p2", "p3", "p4"], We = '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.', Be = s.enum(ur).describe(We);
872
+ function $t(e) {
873
873
  return { p1: 4, p2: 3, p3: 2, p4: 1 }[e];
874
874
  }
875
- function ur(e) {
875
+ function pr(e) {
876
876
  return { 4: "p1", 3: "p2", 2: "p3", 1: "p4" }[e];
877
877
  }
878
- const A = /* @__PURE__ */ new Map(), ee = /* @__PURE__ */ new Map(), $e = 300 * 1e3, pr = "me";
879
- class mr {
878
+ const A = /* @__PURE__ */ new Map(), ee = /* @__PURE__ */ new Map(), De = 300 * 1e3, mr = "me";
879
+ class hr {
880
880
  /**
881
881
  * Resolve a user name or ID to a user ID by looking up collaborators across all shared projects.
882
882
  * Supports exact name matches, partial matches, email matches, and the "me" keyword.
@@ -885,9 +885,9 @@ class mr {
885
885
  if (!r || r.trim().length === 0)
886
886
  return null;
887
887
  const o = r.trim(), n = A.get(o);
888
- if (n && Date.now() - n.timestamp < $e)
888
+ if (n && Date.now() - n.timestamp < De)
889
889
  return n.result;
890
- if (o.toLowerCase() === pr)
890
+ if (o.toLowerCase() === mr)
891
891
  try {
892
892
  const a = await t.getUser();
893
893
  return {
@@ -961,7 +961,7 @@ class mr {
961
961
  */
962
962
  async getProjectCollaborators(t, r) {
963
963
  const o = `project_${r}`, n = ee.get(o);
964
- if (n && Date.now() - n.timestamp < $e)
964
+ if (n && Date.now() - n.timestamp < De)
965
965
  return n.result;
966
966
  try {
967
967
  const a = await t.getProjectCollaborators(r), c = (Array.isArray(a) ? a : a.results || []).filter((d) => d?.id && d.name && d.email);
@@ -978,7 +978,7 @@ class mr {
978
978
  */
979
979
  async getAllCollaborators(t) {
980
980
  const r = "all_collaborators", o = ee.get(r);
981
- if (o && Date.now() - o.timestamp < $e)
981
+ if (o && Date.now() - o.timestamp < De)
982
982
  return o.result;
983
983
  try {
984
984
  const a = (await q({
@@ -1011,15 +1011,15 @@ class mr {
1011
1011
  A.clear(), ee.clear();
1012
1012
  }
1013
1013
  }
1014
- const H = new mr();
1015
- async function hr(e, t) {
1014
+ const H = new hr();
1015
+ async function fr(e, t) {
1016
1016
  return H.resolveUser(e, t);
1017
1017
  }
1018
- const $t = ["assigned", "unassignedOrMe", "all"];
1019
- async function Be(e, t) {
1018
+ const Dt = ["assigned", "unassignedOrMe", "all"];
1019
+ async function Ye(e, t) {
1020
1020
  if (!t)
1021
1021
  return;
1022
- const r = await hr(e, t);
1022
+ const r = await fr(e, t);
1023
1023
  if (!r)
1024
1024
  throw new Error(
1025
1025
  `Could not find user: "${t}". Make sure the user is a collaborator on a shared project.`
@@ -1029,14 +1029,14 @@ async function Be(e, t) {
1029
1029
  function oe(e, t) {
1030
1030
  return t.length === 0 ? e : e.length === 0 ? t : `${e} & ${t}`;
1031
1031
  }
1032
- function Dt({
1032
+ function xt({
1033
1033
  resolvedAssigneeId: e,
1034
1034
  assigneeEmail: t,
1035
1035
  responsibleUserFiltering: r = "unassignedOrMe"
1036
1036
  }) {
1037
1037
  return e && t ? `assigned to: ${t}` : r === "unassignedOrMe" ? "!assigned to: others" : r === "assigned" ? "assigned to: others" : "";
1038
1038
  }
1039
- function fr({
1039
+ function br({
1040
1040
  tasks: e,
1041
1041
  resolvedAssigneeId: t,
1042
1042
  currentUserId: r,
@@ -1044,12 +1044,12 @@ function fr({
1044
1044
  }) {
1045
1045
  return t ? e.filter((n) => n.responsibleUid === t) : o === "unassignedOrMe" ? e.filter((n) => !n.responsibleUid || n.responsibleUid === r) : o === "assigned" ? e.filter((n) => n.responsibleUid && n.responsibleUid !== r) : e;
1046
1046
  }
1047
- function pe(e) {
1047
+ function me(e) {
1048
1048
  return e?.toLowerCase() === "inbox";
1049
1049
  }
1050
1050
  async function K(e) {
1051
1051
  const { projectId: t, user: r, client: o } = e;
1052
- if (!pe(t))
1052
+ if (!me(t))
1053
1053
  return t;
1054
1054
  const n = r || (o ? await o.getUser() : null);
1055
1055
  if (!n)
@@ -1069,39 +1069,39 @@ async function q(e) {
1069
1069
  } while (a !== null);
1070
1070
  return n;
1071
1071
  }
1072
- function Ye(e) {
1072
+ function ze(e) {
1073
1073
  return /(?<!\\)(?:\\\\)*\*/.test(e) ? e : `*${e.replaceAll(/\\(?!\*)/g, "\\\\")}*`;
1074
1074
  }
1075
- async function xt(e, t) {
1075
+ async function At(e, t) {
1076
1076
  return q({
1077
1077
  apiMethod: e.searchProjects.bind(e),
1078
- args: { query: Ye(t) },
1078
+ args: { query: ze(t) },
1079
1079
  limit: C.PROJECTS_MAX
1080
1080
  });
1081
1081
  }
1082
- async function br(e, t) {
1082
+ async function gr(e, t) {
1083
1083
  return q({
1084
1084
  apiMethod: e.searchLabels.bind(e),
1085
- args: { query: Ye(t) },
1085
+ args: { query: ze(t) },
1086
1086
  limit: C.LABELS_MAX
1087
1087
  });
1088
1088
  }
1089
- async function gr(e) {
1089
+ async function yr(e) {
1090
1090
  return q({
1091
1091
  apiMethod: e.getSharedLabels.bind(e),
1092
1092
  args: {},
1093
1093
  limit: C.LABELS_MAX
1094
1094
  });
1095
1095
  }
1096
- async function yr(e, t, r) {
1097
- const o = Ye(t);
1096
+ async function kr(e, t, r) {
1097
+ const o = ze(t);
1098
1098
  return q({
1099
1099
  apiMethod: e.searchSections.bind(e),
1100
1100
  args: r ? { query: o, projectId: r } : { query: o },
1101
1101
  limit: C.SECTIONS_MAX
1102
1102
  });
1103
1103
  }
1104
- function kr(e, t, r, o) {
1104
+ function Tr(e, t, r, o) {
1105
1105
  const n = [t, r, o].filter(Boolean);
1106
1106
  if (n.length > 1)
1107
1107
  throw new Error(
@@ -1124,12 +1124,12 @@ function P(e) {
1124
1124
  dueDate: e.due?.date,
1125
1125
  recurring: e.due?.isRecurring && e.due.string ? e.due.string : !1,
1126
1126
  deadlineDate: e.deadline?.date,
1127
- priority: ur(e.priority) ?? "p4",
1127
+ priority: pr(e.priority) ?? "p4",
1128
1128
  projectId: e.projectId,
1129
1129
  sectionId: e.sectionId ?? void 0,
1130
1130
  parentId: e.parentId ?? void 0,
1131
1131
  labels: e.labels,
1132
- duration: e.duration ? dr(e.duration.amount) : void 0,
1132
+ duration: e.duration ? lr(e.duration.amount) : void 0,
1133
1133
  responsibleUid: e.responsibleUid ?? void 0,
1134
1134
  assignedByUid: e.assignedByUid ?? void 0,
1135
1135
  checked: e.checked,
@@ -1146,12 +1146,12 @@ function V(e) {
1146
1146
  parentId: ne(e) ? e.parentId ?? void 0 : void 0,
1147
1147
  inboxProject: ne(e) ? e.inboxProject ?? !1 : !1,
1148
1148
  viewStyle: e.viewStyle,
1149
- workspaceId: he(e) ? e.workspaceId : void 0,
1150
- folderId: he(e) ? e.folderId ?? void 0 : void 0,
1149
+ workspaceId: be(e) ? e.workspaceId : void 0,
1150
+ folderId: be(e) ? e.folderId ?? void 0 : void 0,
1151
1151
  childOrder: e.childOrder
1152
1152
  };
1153
1153
  }
1154
- function be(e) {
1154
+ function ye(e) {
1155
1155
  return {
1156
1156
  id: e.id,
1157
1157
  taskId: e.taskId ?? void 0,
@@ -1175,7 +1175,7 @@ function be(e) {
1175
1175
  } : void 0
1176
1176
  };
1177
1177
  }
1178
- function Tr(e) {
1178
+ function wr(e) {
1179
1179
  return {
1180
1180
  id: e.id ?? void 0,
1181
1181
  objectType: e.objectType,
@@ -1188,7 +1188,7 @@ function Tr(e) {
1188
1188
  extraData: e.extraData ?? void 0
1189
1189
  };
1190
1190
  }
1191
- const wr = Z.object({
1191
+ const Ir = Z.object({
1192
1192
  httpStatusCode: Z.number(),
1193
1193
  responseData: Z.object({
1194
1194
  error: Z.string(),
@@ -1196,7 +1196,7 @@ const wr = Z.object({
1196
1196
  errorTag: Z.string()
1197
1197
  })
1198
1198
  });
1199
- async function ze({
1199
+ async function Ge({
1200
1200
  client: e,
1201
1201
  query: t,
1202
1202
  limit: r,
@@ -1206,7 +1206,7 @@ async function ze({
1206
1206
  const { results: n, nextCursor: a } = await e.getTasksByFilter({ query: t, cursor: o, limit: r });
1207
1207
  return { tasks: n.map(P), nextCursor: a };
1208
1208
  } catch (n) {
1209
- const a = wr.safeParse(n);
1209
+ const a = Ir.safeParse(n);
1210
1210
  if (!a.success)
1211
1211
  throw n;
1212
1212
  const { responseData: i } = a.data;
@@ -1215,7 +1215,7 @@ async function ze({
1215
1215
  );
1216
1216
  }
1217
1217
  }
1218
- function at(e) {
1218
+ function it(e) {
1219
1219
  return {
1220
1220
  isRecurring: e.isRecurring,
1221
1221
  string: e.string,
@@ -1224,7 +1224,7 @@ function at(e) {
1224
1224
  timezone: e.timezone ?? void 0
1225
1225
  };
1226
1226
  }
1227
- function ue(e) {
1227
+ function pe(e) {
1228
1228
  const t = {
1229
1229
  id: e.id,
1230
1230
  taskId: e.itemId,
@@ -1235,13 +1235,13 @@ function ue(e) {
1235
1235
  return {
1236
1236
  ...t,
1237
1237
  minuteOffset: e.minuteOffset,
1238
- due: e.due ? at(e.due) : void 0,
1238
+ due: e.due ? it(e.due) : void 0,
1239
1239
  isUrgent: e.isUrgent
1240
1240
  };
1241
1241
  case "absolute":
1242
1242
  return {
1243
1243
  ...t,
1244
- due: at(e.due),
1244
+ due: it(e.due),
1245
1245
  isUrgent: e.isUrgent
1246
1246
  };
1247
1247
  case "location":
@@ -1255,28 +1255,28 @@ function ue(e) {
1255
1255
  };
1256
1256
  }
1257
1257
  }
1258
- function At(e) {
1258
+ function Et(e) {
1259
1259
  const t = e.filter(
1260
1260
  (o) => o.type === "relative" || o.type === "absolute"
1261
1261
  ).length, r = e.filter((o) => o.type === "location").length;
1262
1262
  return { timeBasedCount: t, locationCount: r };
1263
1263
  }
1264
- const ge = Oe.map((e) => e.key);
1265
- function Ir(e) {
1264
+ const ke = Ue.map((e) => e.key);
1265
+ function vr(e) {
1266
1266
  if (typeof e != "string") return;
1267
1267
  const t = e.toLowerCase();
1268
- return (Oe.find((o) => o.key === t) ?? Oe.find((o) => o.displayName.toLowerCase() === t))?.key;
1268
+ return (Ue.find((o) => o.key === t) ?? Ue.find((o) => o.displayName.toLowerCase() === t))?.key;
1269
1269
  }
1270
- const vr = `Color for the entity. Accepts a color key (e.g. "berry_red") or display name (e.g. "Berry Red"). Valid colors: ${ge.join(", ")}. Unrecognized colors are omitted and charcoal will be used as the default.`, ae = s.preprocess(Ir, s.enum(ge).optional()).describe(vr);
1271
- s.enum(ge).describe("The color key of the entity.");
1272
- const ie = s.enum(ge).optional().catch(void 0).describe("The color key of the entity."), J = s.object({
1270
+ const jr = `Color for the entity. Accepts a color key (e.g. "berry_red") or display name (e.g. "Berry Red"). Valid colors: ${ke.join(", ")}. Unrecognized colors are omitted and charcoal will be used as the default.`, ie = s.preprocess(vr, s.enum(ke).optional()).describe(jr);
1271
+ s.enum(ke).describe("The color key of the entity.");
1272
+ const ce = s.enum(ke).optional().catch(void 0).describe("The color key of the entity."), J = s.object({
1273
1273
  id: s.string().describe("The unique ID of the task."),
1274
1274
  content: s.string().describe("The task title/content."),
1275
1275
  description: s.string().describe("The task description."),
1276
1276
  dueDate: s.string().optional().describe("The due date of the task (ISO 8601 format)."),
1277
1277
  recurring: s.union([s.boolean(), s.string()]).describe("Whether the task is recurring, or the recurrence string."),
1278
1278
  deadlineDate: s.string().optional().describe("The deadline date of the task (ISO 8601 format)."),
1279
- priority: We.describe(
1279
+ priority: Be.describe(
1280
1280
  "The priority level: p1 (highest), p2 (high), p3 (medium), p4 (lowest)."
1281
1281
  ),
1282
1282
  projectId: s.string().describe("The ID of the project this task belongs to."),
@@ -1289,10 +1289,10 @@ const ie = s.enum(ge).optional().catch(void 0).describe("The color key of the en
1289
1289
  assignedByUid: s.string().optional().describe("The UID of the user who assigned this task."),
1290
1290
  checked: s.boolean().describe("Whether the task is checked/completed."),
1291
1291
  completedAt: s.string().optional().describe("When the task was completed (ISO 8601 format).")
1292
- }), ce = s.object({
1292
+ }), de = s.object({
1293
1293
  id: s.string().describe("The unique ID of the project."),
1294
1294
  name: s.string().describe("The name of the project."),
1295
- color: ie,
1295
+ color: ce,
1296
1296
  isFavorite: s.boolean().describe("Whether the project is marked as favorite."),
1297
1297
  isShared: s.boolean().describe("Whether the project is shared."),
1298
1298
  parentId: s.string().optional().describe("The ID of the parent project (for sub-projects)."),
@@ -1303,10 +1303,14 @@ const ie = s.enum(ge).optional().catch(void 0).describe("The color key of the en
1303
1303
  ),
1304
1304
  folderId: s.string().optional().describe("The ID of the folder this project belongs to (workspace projects only)."),
1305
1305
  childOrder: s.number().describe("The ordering index of the project among its siblings.")
1306
- }), ye = s.object({
1306
+ }), ae = s.object({
1307
1307
  id: s.string().describe("The unique ID of the section."),
1308
1308
  name: s.string().describe("The name of the section.")
1309
- }), jr = s.object({
1309
+ });
1310
+ function he({ id: e, name: t }) {
1311
+ return { id: e, name: t };
1312
+ }
1313
+ const Sr = s.object({
1310
1314
  resourceType: s.string().describe("The type of resource (file, url, image, etc)."),
1311
1315
  fileName: s.string().optional().describe("The name of the file."),
1312
1316
  fileSize: s.number().optional().describe("The size of the file in bytes."),
@@ -1319,15 +1323,15 @@ const ie = s.enum(ge).optional().catch(void 0).describe("The color key of the en
1319
1323
  image: s.string().optional().describe("The image URL for image resource types."),
1320
1324
  imageWidth: s.number().optional().describe("The width of the image in pixels."),
1321
1325
  imageHeight: s.number().optional().describe("The height of the image in pixels.")
1322
- }), ke = s.object({
1326
+ }), Te = s.object({
1323
1327
  id: s.string().describe("The unique ID of the comment."),
1324
1328
  taskId: s.string().optional().describe("The ID of the task this comment belongs to."),
1325
1329
  projectId: s.string().optional().describe("The ID of the project this comment belongs to."),
1326
1330
  content: s.string().describe("The content of the comment."),
1327
1331
  postedAt: s.string().describe("When the comment was posted (ISO 8601 format)."),
1328
1332
  postedUid: s.string().optional().describe("The UID of the user who posted this comment."),
1329
- fileAttachment: jr.optional().describe("File attachment information, if any.")
1330
- }), Sr = s.object({
1333
+ fileAttachment: Sr.optional().describe("File attachment information, if any.")
1334
+ }), Cr = s.object({
1331
1335
  id: s.string().optional().describe("The unique ID of the activity event."),
1332
1336
  objectType: s.string().describe("The type of object this event relates to (task, project, etc)."),
1333
1337
  objectId: s.string().describe("The ID of the object this event relates to."),
@@ -1337,57 +1341,57 @@ const ie = s.enum(ge).optional().catch(void 0).describe("The color key of the en
1337
1341
  parentItemId: s.string().optional().describe("The ID of the parent item."),
1338
1342
  initiatorId: s.string().optional().describe("The ID of the user who initiated this event."),
1339
1343
  extraData: s.record(s.string(), s.unknown()).optional().describe("Additional event data.")
1340
- }), Cr = s.object({
1344
+ }), $r = s.object({
1341
1345
  id: s.string().describe("The unique ID of the user."),
1342
1346
  name: s.string().describe("The full name of the user."),
1343
1347
  email: s.string().describe("The email address of the user.")
1344
- }), de = s.object({
1348
+ }), le = s.object({
1345
1349
  id: s.string().describe("The unique ID of the label."),
1346
1350
  name: s.string().describe("The name of the label."),
1347
- color: ie,
1351
+ color: ce,
1348
1352
  order: s.number().optional().catch(void 0).describe("The display order of the label."),
1349
1353
  isFavorite: s.boolean().describe("Whether the label is marked as favorite.")
1350
- }), $r = s.object({
1354
+ }), Dr = s.object({
1351
1355
  isRecurring: s.boolean().describe("Whether this is a recurring reminder."),
1352
1356
  string: s.string().describe("Human-readable due string."),
1353
1357
  date: s.string().describe("Due date in ISO format."),
1354
1358
  datetime: s.string().optional().describe("Due datetime in ISO format."),
1355
1359
  timezone: s.string().optional().describe("Timezone of the reminder.")
1356
- }), Ge = s.object({
1360
+ }), qe = s.object({
1357
1361
  id: s.string().describe("The unique ID of the reminder."),
1358
1362
  taskId: s.string().describe("The task ID this reminder belongs to."),
1359
- type: s.enum(as).describe("The type of reminder: relative, absolute, or location."),
1363
+ type: s.enum(is).describe("The type of reminder: relative, absolute, or location."),
1360
1364
  minuteOffset: s.number().optional().describe("Minutes before due time to trigger (relative reminders only)."),
1361
- due: $r.optional().describe(
1365
+ due: Dr.optional().describe(
1362
1366
  "Due date info (absolute and sometimes relative reminders)."
1363
1367
  ),
1364
1368
  name: s.string().optional().describe("Location name (location reminders only)."),
1365
1369
  locLat: s.string().optional().describe("Latitude (location reminders only)."),
1366
1370
  locLong: s.string().optional().describe("Longitude (location reminders only)."),
1367
- locTrigger: s.enum(yt).optional().describe("Trigger type: on_enter or on_leave (location reminders only)."),
1371
+ locTrigger: s.enum(kt).optional().describe("Trigger type: on_enter or on_leave (location reminders only)."),
1368
1372
  radius: s.number().optional().describe("Geofence radius in meters (location reminders only)."),
1369
1373
  isUrgent: s.boolean().optional().describe("Whether this is an urgent reminder (relative and absolute reminders only).")
1370
- }), qe = s.object({
1374
+ }), Ke = s.object({
1371
1375
  item: s.string().describe("The item that failed (usually an ID or identifier)."),
1372
1376
  error: s.string().describe("The error message."),
1373
1377
  code: s.string().optional().describe("The error code, if available.")
1374
- }), Dr = s.object({
1378
+ }), xr = s.object({
1375
1379
  taskId: s.string().optional().describe("The ID of the task to comment on."),
1376
1380
  projectId: s.string().optional().describe(
1377
1381
  'The ID of the project to comment on. Project ID should be an ID string, or the text "inbox", for inbox tasks.'
1378
1382
  ),
1379
1383
  content: s.string().min(1).describe("The content of the comment.")
1380
- }), xr = {
1381
- comments: s.array(Dr).min(1).describe("The array of comments to add.")
1382
- }, Ar = {
1383
- comments: s.array(ke).describe("The created comments."),
1384
+ }), Ar = {
1385
+ comments: s.array(xr).min(1).describe("The array of comments to add.")
1386
+ }, Er = {
1387
+ comments: s.array(Te).describe("The created comments."),
1384
1388
  totalCount: s.number().describe("The total number of comments created."),
1385
1389
  addedCommentIds: s.array(s.string()).describe("The IDs of the added comments.")
1386
- }, Er = {
1390
+ }, Or = {
1387
1391
  name: f.ADD_COMMENTS,
1388
1392
  description: "Add multiple comments to tasks or projects. Each comment must specify either taskId or projectId.",
1389
- parameters: xr,
1390
- outputSchema: Ar,
1393
+ parameters: Ar,
1394
+ outputSchema: Er,
1391
1395
  annotations: { readOnlyHint: !1, destructiveHint: !1, idempotentHint: !1 },
1392
1396
  async execute(e, t) {
1393
1397
  const { comments: r } = e;
@@ -1401,7 +1405,7 @@ const ie = s.enum(ge).optional().catch(void 0).describe("The color key of the en
1401
1405
  `Comment ${l + 1}: Cannot provide both taskId and projectId. Choose one.`
1402
1406
  );
1403
1407
  }
1404
- const n = r.some((l) => pe(l.projectId)) ? await t.getUser() : void 0, a = r.map(async ({ content: l, taskId: u, projectId: p }) => {
1408
+ const n = r.some((l) => me(l.projectId)) ? await t.getUser() : void 0, a = r.map(async ({ content: l, taskId: u, projectId: p }) => {
1405
1409
  const m = await K({
1406
1410
  projectId: p,
1407
1411
  user: n,
@@ -1411,9 +1415,9 @@ const ie = s.enum(ge).optional().catch(void 0).describe("The color key of the en
1411
1415
  content: l,
1412
1416
  ...u ? { taskId: u } : { projectId: m }
1413
1417
  });
1414
- }), c = (await Promise.all(a)).map(be);
1418
+ }), c = (await Promise.all(a)).map(ye);
1415
1419
  return {
1416
- textContent: Or({ comments: c }),
1420
+ textContent: Ur({ comments: c }),
1417
1421
  structuredContent: {
1418
1422
  comments: c,
1419
1423
  totalCount: c.length,
@@ -1422,7 +1426,7 @@ const ie = s.enum(ge).optional().catch(void 0).describe("The color key of the en
1422
1426
  };
1423
1427
  }
1424
1428
  };
1425
- function Or({ comments: e }) {
1429
+ function Ur({ comments: e }) {
1426
1430
  const t = e.filter((a) => a.taskId).length, r = e.filter((a) => a.projectId).length, o = [];
1427
1431
  if (t > 0) {
1428
1432
  const a = t > 1 ? "comments" : "comment";
@@ -1434,25 +1438,25 @@ function Or({ comments: e }) {
1434
1438
  }
1435
1439
  return o.length > 0 ? `Added ${o.join(" and ")}` : "No comments added";
1436
1440
  }
1437
- const Ur = {
1441
+ const Pr = {
1438
1442
  search: s.string().optional().describe(
1439
1443
  "Search for a filter by name (partial and case insensitive match). If omitted, all filters are returned."
1440
1444
  )
1441
- }, Ke = s.object({
1445
+ }, Ve = s.object({
1442
1446
  id: s.string().describe("The unique ID of the filter."),
1443
1447
  name: s.string().describe("The name of the filter."),
1444
1448
  query: s.string().describe('The filter query string (e.g. "today & p1", "#Work & overdue").'),
1445
- color: ie,
1449
+ color: ce,
1446
1450
  isFavorite: s.boolean().describe("Whether the filter is marked as favorite."),
1447
1451
  itemOrder: s.number().describe("The display order of the filter.")
1448
- }), Pr = {
1449
- filters: s.array(Ke).describe("The found filters."),
1452
+ }), Rr = {
1453
+ filters: s.array(Ve).describe("The found filters."),
1450
1454
  totalCount: s.number().describe("The total number of filters returned.")
1451
- }, Rr = {
1455
+ }, _r = {
1452
1456
  name: f.FIND_FILTERS,
1453
1457
  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").',
1454
- parameters: Ur,
1455
- outputSchema: Pr,
1458
+ parameters: Pr,
1459
+ outputSchema: Rr,
1456
1460
  annotations: { readOnlyHint: !0, destructiveHint: !1, idempotentHint: !0 },
1457
1461
  async execute(e, t) {
1458
1462
  let o = ((await t.sync({ resourceTypes: ["filters"], syncToken: "*" })).filters ?? []).filter((i) => !i.isDeleted);
@@ -1465,12 +1469,12 @@ const Ur = {
1465
1469
  id: i.id,
1466
1470
  name: i.name,
1467
1471
  query: i.query,
1468
- color: ie.parse(i.color),
1472
+ color: ce.parse(i.color),
1469
1473
  isFavorite: i.isFavorite,
1470
1474
  itemOrder: i.itemOrder
1471
1475
  }));
1472
1476
  return {
1473
- textContent: _r({ filters: n, search: e.search }),
1477
+ textContent: Nr({ filters: n, search: e.search }),
1474
1478
  structuredContent: {
1475
1479
  filters: n,
1476
1480
  totalCount: n.length
@@ -1478,7 +1482,7 @@ const Ur = {
1478
1482
  };
1479
1483
  }
1480
1484
  };
1481
- function _r({
1485
+ function Nr({
1482
1486
  filters: e,
1483
1487
  search: t
1484
1488
  }) {
@@ -1499,23 +1503,23 @@ ${n.map((a) => `- ${a}`).join(`
1499
1503
  return o.join(`
1500
1504
  `);
1501
1505
  }
1502
- const Nr = s.object({
1506
+ const Lr = s.object({
1503
1507
  name: s.string().min(1).describe("The name of the filter."),
1504
1508
  query: s.string().min(1).describe(
1505
1509
  'The filter query string. Examples: "today & p1", "#Work & overdue", "@email & today", "(p1 | p2) & !assigned". Operators: | (OR), & (AND), ! (NOT), () grouping, , (multiple queries).'
1506
1510
  ),
1507
- color: ae,
1511
+ color: ie,
1508
1512
  isFavorite: s.boolean().optional().describe("Whether to mark the filter as a favorite. Defaults to false.")
1509
- }), Lr = {
1510
- filters: s.array(Nr).min(1).describe("The array of filters to add.")
1511
- }, Mr = {
1512
- filters: s.array(Ke).describe("The created filters."),
1513
- totalCount: s.number().describe("The total number of filters created.")
1513
+ }), Mr = {
1514
+ filters: s.array(Lr).min(1).describe("The array of filters to add.")
1514
1515
  }, Fr = {
1516
+ filters: s.array(Ve).describe("The created filters."),
1517
+ totalCount: s.number().describe("The total number of filters created.")
1518
+ }, Hr = {
1515
1519
  name: f.ADD_FILTERS,
1516
1520
  description: "Add one or more new personal filters. Filters are saved custom views using query syntax to organize tasks.",
1517
- parameters: Lr,
1518
- outputSchema: Mr,
1521
+ parameters: Mr,
1522
+ outputSchema: Fr,
1519
1523
  annotations: { readOnlyHint: !1, destructiveHint: !1, idempotentHint: !1 },
1520
1524
  async execute({ filters: e }, t) {
1521
1525
  const r = Date.now(), o = e.map((p, m) => `tempFilterAdd${m}${r}`), n = e.map((p, m) => z(
@@ -1530,7 +1534,7 @@ const Nr = s.object({
1530
1534
  )), i = (await t.sync({ commands: n })).tempIdMapping ?? {}, c = e.map((p, m) => {
1531
1535
  const h = o[m], b = h !== void 0 ? i[h] : void 0;
1532
1536
  if (!b) return null;
1533
- const I = p.color !== void 0 ? ie.parse(p.color) : void 0;
1537
+ const I = p.color !== void 0 ? ce.parse(p.color) : void 0;
1534
1538
  return {
1535
1539
  id: b,
1536
1540
  name: p.name,
@@ -1550,49 +1554,49 @@ ${l}`,
1550
1554
  }
1551
1555
  };
1552
1556
  }
1553
- }, Hr = s.object({
1557
+ }, Wr = s.object({
1554
1558
  name: s.string().min(1).max(128).describe("The name of the label."),
1555
- color: ae,
1559
+ color: ie,
1556
1560
  order: s.number().int().optional().describe("The position of the label in the label list."),
1557
1561
  isFavorite: s.boolean().optional().describe("Whether the label is a favorite. Defaults to false.")
1558
- }), Wr = {
1559
- labels: s.array(Hr).min(1).describe("The array of labels to add.")
1560
- }, Br = {
1561
- labels: s.array(de).describe("The created labels."),
1562
- totalCount: s.number().describe("The total number of labels created.")
1562
+ }), Br = {
1563
+ labels: s.array(Wr).min(1).describe("The array of labels to add.")
1563
1564
  }, Yr = {
1565
+ labels: s.array(le).describe("The created labels."),
1566
+ totalCount: s.number().describe("The total number of labels created.")
1567
+ }, zr = {
1564
1568
  name: f.ADD_LABELS,
1565
1569
  description: "Add one or more new personal labels.",
1566
- parameters: Wr,
1567
- outputSchema: Br,
1570
+ parameters: Br,
1571
+ outputSchema: Yr,
1568
1572
  annotations: { readOnlyHint: !1, destructiveHint: !1, idempotentHint: !1 },
1569
1573
  async execute({ labels: e }, t) {
1570
1574
  const r = await Promise.all(e.map((n) => t.addLabel(n)));
1571
1575
  return {
1572
- textContent: zr({ labels: r }),
1576
+ textContent: Gr({ labels: r }),
1573
1577
  structuredContent: {
1574
- labels: r.map((n) => de.parse(n)),
1578
+ labels: r.map((n) => le.parse(n)),
1575
1579
  totalCount: r.length
1576
1580
  }
1577
1581
  };
1578
1582
  }
1579
1583
  };
1580
- function zr({ labels: e }) {
1584
+ function Gr({ labels: e }) {
1581
1585
  const t = e.length, r = e.map((o) => `• ${o.name} (id=${o.id})`).join(`
1582
1586
  `);
1583
1587
  return `Added ${t} label${t === 1 ? "" : "s"}:
1584
1588
  ${r}`;
1585
1589
  }
1586
- const Gr = 300 * 1e3;
1587
- function qr(e) {
1590
+ const qr = 300 * 1e3;
1591
+ function Kr(e) {
1588
1592
  return /^\d+$/.test(e);
1589
1593
  }
1590
- class Kr {
1594
+ class Vr {
1591
1595
  constructor() {
1592
1596
  this.cache = null;
1593
1597
  }
1594
1598
  async getWorkspaces(t) {
1595
- if (this.cache && Date.now() - this.cache.timestamp < Gr)
1599
+ if (this.cache && Date.now() - this.cache.timestamp < qr)
1596
1600
  return this.cache.workspaces;
1597
1601
  const r = await t.getWorkspaces();
1598
1602
  return this.cache = { workspaces: r, timestamp: Date.now() }, r;
@@ -1615,7 +1619,7 @@ class Kr {
1615
1619
  const n = await this.getWorkspaces(t), a = n.find((u) => u.id === o);
1616
1620
  if (a)
1617
1621
  return { workspaceId: a.id, workspaceName: a.name };
1618
- if (qr(o))
1622
+ if (Kr(o))
1619
1623
  return { workspaceId: o, workspaceName: o };
1620
1624
  const i = o.toLowerCase(), c = n.find((u) => u.name.toLowerCase() === i);
1621
1625
  if (c)
@@ -1643,32 +1647,32 @@ ${u}` + (d.length > 5 ? `
1643
1647
  this.cache = null;
1644
1648
  }
1645
1649
  }
1646
- const Et = new Kr(), Vr = s.object({
1650
+ const Ot = new Vr(), Jr = s.object({
1647
1651
  name: s.string().min(1).describe("The name of the project."),
1648
1652
  parentId: s.string().optional().describe("The ID of the parent project. If provided, creates this as a sub-project."),
1649
1653
  isFavorite: s.boolean().optional().describe("Whether the project is a favorite. Defaults to false."),
1650
1654
  viewStyle: s.enum(["list", "board", "calendar"]).optional().describe('The project view style. Defaults to "list".'),
1651
- color: ae,
1655
+ color: ie,
1652
1656
  workspace: s.string().trim().min(1).optional().describe(
1653
1657
  "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."
1654
1658
  )
1655
- }), Jr = {
1656
- projects: s.array(Vr).min(1).describe("The array of projects to add.")
1657
- }, Xr = {
1658
- projects: s.array(ce).describe("The created projects."),
1659
- totalCount: s.number().describe("The total number of projects created.")
1659
+ }), Xr = {
1660
+ projects: s.array(Jr).min(1).describe("The array of projects to add.")
1660
1661
  }, Zr = {
1662
+ projects: s.array(de).describe("The created projects."),
1663
+ totalCount: s.number().describe("The total number of projects created.")
1664
+ }, Qr = {
1661
1665
  name: f.ADD_PROJECTS,
1662
1666
  description: "Add one or more new projects.",
1663
- parameters: Jr,
1664
- outputSchema: Xr,
1667
+ parameters: Xr,
1668
+ outputSchema: Zr,
1665
1669
  annotations: { readOnlyHint: !1, destructiveHint: !1, idempotentHint: !1 },
1666
1670
  async execute({ projects: e }, t) {
1667
1671
  const r = [
1668
1672
  ...new Set(e.map((c) => c.workspace).filter(Boolean))
1669
1673
  ], o = /* @__PURE__ */ new Map();
1670
1674
  for (const c of r) {
1671
- const d = await Et.resolveWorkspace(t, c);
1675
+ const d = await Ot.resolveWorkspace(t, c);
1672
1676
  o.set(c, d.workspaceId);
1673
1677
  }
1674
1678
  const n = await Promise.all(
@@ -1676,7 +1680,7 @@ const Et = new Kr(), Vr = s.object({
1676
1680
  const l = c ? o.get(c) : void 0;
1677
1681
  return t.addProject({ ...d, ...l ? { workspaceId: l } : {} });
1678
1682
  })
1679
- ), a = Qr({ projects: n }), i = n.map(V);
1683
+ ), a = eo({ projects: n }), i = n.map(V);
1680
1684
  return {
1681
1685
  textContent: a,
1682
1686
  structuredContent: {
@@ -1686,62 +1690,62 @@ const Et = new Kr(), Vr = s.object({
1686
1690
  };
1687
1691
  }
1688
1692
  };
1689
- function Qr({ projects: e }) {
1693
+ function eo({ projects: e }) {
1690
1694
  const t = e.length, r = e.map((n) => `• ${n.name} (id=${n.id})`).join(`
1691
1695
  `);
1692
1696
  return `Added ${t} project${t === 1 ? "" : "s"}:
1693
1697
  ${r}`;
1694
1698
  }
1695
- const fe = 25, Te = s.enum(is), Ot = s.object({
1699
+ const ge = 25, we = s.enum(cs), Ut = s.object({
1696
1700
  date: s.string().optional().describe("Due date in YYYY-MM-DD format."),
1697
1701
  string: s.string().optional().describe('Natural language due string, e.g. "tomorrow at 3pm".'),
1698
1702
  timezone: s.string().optional().describe('Timezone for the reminder, e.g. "America/New_York".'),
1699
1703
  lang: s.string().optional().describe('Language for parsing the due string, e.g. "en".')
1700
- }), Ut = s.enum(yt), we = s.boolean().optional().describe("Whether this is an urgent reminder. Applies to relative and absolute reminders."), eo = s.object({
1704
+ }), Pt = s.enum(kt), Ie = s.boolean().optional().describe("Whether this is an urgent reminder. Applies to relative and absolute reminders."), to = s.object({
1701
1705
  type: s.literal("relative"),
1702
1706
  taskId: s.string().min(1).describe("The ID of the task to set a reminder for."),
1703
1707
  minuteOffset: s.number().int().min(0).describe(
1704
1708
  "Minutes before the task due time to trigger the reminder. E.g., 30 for 30 minutes before, 60 for 1 hour before, 1440 for 1 day before."
1705
1709
  ),
1706
- service: Te.optional().describe(
1710
+ service: we.optional().describe(
1707
1711
  'Delivery method: "email" or "push" notification. Defaults to push.'
1708
1712
  ),
1709
- isUrgent: we
1710
- }), to = s.object({
1713
+ isUrgent: Ie
1714
+ }), so = s.object({
1711
1715
  type: s.literal("absolute"),
1712
1716
  taskId: s.string().min(1).describe("The ID of the task to set a reminder for."),
1713
- due: Ot.describe("The specific date/time for the reminder."),
1714
- service: Te.optional().describe(
1717
+ due: Ut.describe("The specific date/time for the reminder."),
1718
+ service: we.optional().describe(
1715
1719
  'Delivery method: "email" or "push" notification. Defaults to push.'
1716
1720
  ),
1717
- isUrgent: we
1718
- }), so = s.object({
1721
+ isUrgent: Ie
1722
+ }), ro = s.object({
1719
1723
  type: s.literal("location"),
1720
1724
  taskId: s.string().min(1).describe("The ID of the task to set a reminder for."),
1721
1725
  name: s.string().min(1).describe('Name of the location, e.g. "Office", "Home".'),
1722
1726
  locLat: s.string().describe('Latitude of the location as a string, e.g. "37.7749".'),
1723
1727
  locLong: s.string().describe('Longitude of the location as a string, e.g. "-122.4194".'),
1724
- locTrigger: Ut.describe(
1728
+ locTrigger: Pt.describe(
1725
1729
  'When to trigger: "on_enter" (arriving) or "on_leave" (departing).'
1726
1730
  ),
1727
1731
  radius: s.number().int().optional().describe("Radius in meters for the geofence. Defaults to server default.")
1728
- }), ro = s.discriminatedUnion("type", [
1729
- eo,
1732
+ }), oo = s.discriminatedUnion("type", [
1730
1733
  to,
1731
- so
1732
- ]), oo = {
1733
- reminders: s.array(ro).min(1).max(fe).describe(
1734
- `Array of reminders to create (max ${fe}). Each reminder must specify a type: "relative" (minutes before due), "absolute" (specific date/time), or "location" (geofence trigger).`
1734
+ so,
1735
+ ro
1736
+ ]), no = {
1737
+ reminders: s.array(oo).min(1).max(ge).describe(
1738
+ `Array of reminders to create (max ${ge}). Each reminder must specify a type: "relative" (minutes before due), "absolute" (specific date/time), or "location" (geofence trigger).`
1735
1739
  )
1736
- }, no = {
1737
- reminders: s.array(Ge).describe("The created reminders."),
1740
+ }, ao = {
1741
+ reminders: s.array(qe).describe("The created reminders."),
1738
1742
  totalCount: s.number().describe("Total number of reminders created."),
1739
1743
  addedReminderIds: s.array(s.string()).describe("IDs of the created reminders.")
1740
- }, ao = {
1744
+ }, io = {
1741
1745
  name: f.ADD_REMINDERS,
1742
1746
  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.',
1743
- parameters: oo,
1744
- outputSchema: no,
1747
+ parameters: no,
1748
+ outputSchema: ao,
1745
1749
  annotations: { readOnlyHint: !1, destructiveHint: !1, idempotentHint: !1 },
1746
1750
  async execute(e, t) {
1747
1751
  const { reminders: r } = e, o = r.map(async (c) => {
@@ -1772,9 +1776,9 @@ const fe = 25, Te = s.enum(is), Ot = s.object({
1772
1776
  radius: c.radius
1773
1777
  });
1774
1778
  }
1775
- }), a = (await Promise.all(o)).map(ue);
1779
+ }), a = (await Promise.all(o)).map(pe);
1776
1780
  return {
1777
- textContent: io(a),
1781
+ textContent: co(a),
1778
1782
  structuredContent: {
1779
1783
  reminders: a,
1780
1784
  totalCount: a.length,
@@ -1783,8 +1787,8 @@ const fe = 25, Te = s.enum(is), Ot = s.object({
1783
1787
  };
1784
1788
  }
1785
1789
  };
1786
- function io(e) {
1787
- const { timeBasedCount: t, locationCount: r } = At(e), o = [];
1790
+ function co(e) {
1791
+ const { timeBasedCount: t, locationCount: r } = Et(e), o = [];
1788
1792
  if (t > 0) {
1789
1793
  const n = t > 1 ? "reminders" : "reminder";
1790
1794
  o.push(`${t} time-based ${n}`);
@@ -1795,24 +1799,24 @@ function io(e) {
1795
1799
  }
1796
1800
  return o.length > 0 ? `Added ${o.join(" and ")}` : "No reminders added";
1797
1801
  }
1798
- const co = s.object({
1802
+ const lo = s.object({
1799
1803
  name: s.string().min(1).describe("The name of the section."),
1800
1804
  projectId: s.string().min(1).describe(
1801
1805
  'The ID of the project to add the section to. Project ID should be an ID string, or the text "inbox", for inbox tasks.'
1802
1806
  )
1803
- }), lo = {
1804
- sections: s.array(co).min(1).describe("The array of sections to add.")
1805
- }, uo = {
1806
- sections: s.array(ye).describe("The created sections."),
1807
- totalCount: s.number().describe("The total number of sections created.")
1807
+ }), uo = {
1808
+ sections: s.array(lo).min(1).describe("The array of sections to add.")
1808
1809
  }, po = {
1810
+ sections: s.array(ae).describe("The created sections."),
1811
+ totalCount: s.number().describe("The total number of sections created.")
1812
+ }, mo = {
1809
1813
  name: f.ADD_SECTIONS,
1810
1814
  description: "Add one or more new sections to projects.",
1811
- parameters: lo,
1812
- outputSchema: uo,
1815
+ parameters: uo,
1816
+ outputSchema: po,
1813
1817
  annotations: { readOnlyHint: !1, destructiveHint: !1, idempotentHint: !1 },
1814
1818
  async execute({ sections: e }, t) {
1815
- const o = e.some((c) => pe(c.projectId)) ? await t.getUser() : void 0, n = await Promise.all(
1819
+ const o = e.some((c) => me(c.projectId)) ? await t.getUser() : void 0, n = await Promise.all(
1816
1820
  e.map(async (c) => ({
1817
1821
  ...c,
1818
1822
  projectId: await K({
@@ -1825,15 +1829,15 @@ const co = s.object({
1825
1829
  n.map((c) => t.addSection(c))
1826
1830
  );
1827
1831
  return {
1828
- textContent: mo({ sections: a }),
1832
+ textContent: ho({ sections: a }),
1829
1833
  structuredContent: {
1830
- sections: a,
1834
+ sections: a.map(he),
1831
1835
  totalCount: a.length
1832
1836
  }
1833
1837
  };
1834
1838
  }
1835
1839
  };
1836
- function mo({ sections: e }) {
1840
+ function ho({ sections: e }) {
1837
1841
  const t = e.length, r = e.map((n) => `• ${n.name} (id=${n.id}, projectId=${n.projectId})`).join(`
1838
1842
  `);
1839
1843
  return `Added ${t} section${t === 1 ? "" : "s"}:
@@ -1848,7 +1852,7 @@ const te = {
1848
1852
  PROJECT_NOT_FOUND: "PROJECT_NOT_FOUND",
1849
1853
  TASK_NOT_FOUND: "TASK_NOT_FOUND"
1850
1854
  };
1851
- class ho {
1855
+ class fo {
1852
1856
  /**
1853
1857
  * Validate a single assignment operation
1854
1858
  */
@@ -2057,17 +2061,17 @@ class ho {
2057
2061
  };
2058
2062
  }
2059
2063
  }
2060
- const Ve = new ho();
2064
+ const Je = new fo();
2061
2065
  function re(e = /* @__PURE__ */ new Date()) {
2062
2066
  const t = e.getFullYear(), r = String(e.getMonth() + 1).padStart(2, "0"), o = String(e.getDate()).padStart(2, "0");
2063
2067
  return `${t}-${r}-${o}`;
2064
2068
  }
2065
- function Je(e, t, r = {}) {
2069
+ function Xe(e, t, r = {}) {
2066
2070
  const { context: o, showDetails: n = !1 } = r, a = t.length, i = [], d = `${e} ${a} ${a === 1 ? "task" : "tasks"}${o ? ` ${o}` : ""}.`;
2067
2071
  i.push(d);
2068
2072
  const l = 5;
2069
2073
  if (n || a <= l) {
2070
- const u = Ie(t, l);
2074
+ const u = ve(t, l);
2071
2075
  if (u.length > 0) {
2072
2076
  const p = a > l ? `, +${a - l} more` : "";
2073
2077
  i.push(`Tasks:
@@ -2077,35 +2081,35 @@ ${u}${p}.`);
2077
2081
  return i.join(`
2078
2082
  `);
2079
2083
  }
2080
- function Xe(e) {
2084
+ function Ze(e) {
2081
2085
  const { action: t, success: r, total: o, successItems: n, successLabel: a = "Completed", failures: i } = e, c = [], d = `${t}: ${r}/${o} successful.`;
2082
2086
  if (c.push(d), n?.length && n.length <= 5 && c.push(`${a}:
2083
2087
  ${n.map((l) => ` ${l}`).join(`
2084
2088
  `)}.`), i?.length) {
2085
2089
  const l = i.length, u = `Failed (${l}):
2086
- ${i.slice(0, Ce.MAX_FAILURES_SHOWN).map((p) => ` ${p.item} (Error: ${p.error}${p.code ? ` [${p.code}]` : ""})`).join(
2090
+ ${i.slice(0, $e.MAX_FAILURES_SHOWN).map((p) => ` ${p.item} (Error: ${p.error}${p.code ? ` [${p.code}]` : ""})`).join(
2087
2091
  `
2088
2092
  `
2089
- )}${l > Ce.MAX_FAILURES_SHOWN ? `, +${l - Ce.MAX_FAILURES_SHOWN} more` : ""}.`;
2093
+ )}${l > $e.MAX_FAILURES_SHOWN ? `, +${l - $e.MAX_FAILURES_SHOWN} more` : ""}.`;
2090
2094
  c.push(u);
2091
2095
  }
2092
2096
  return c.join(`
2093
2097
  `);
2094
2098
  }
2095
- function fo(e) {
2099
+ function bo(e) {
2096
2100
  const t = e.content || e.title || "Untitled", r = e.dueDate ? ` • due ${e.dueDate}` : "", o = e.priority ? ` • ${e.priority.toUpperCase()}` : "", n = e.projectName ? ` • ${e.projectName}` : "", a = e.id ? ` • id=${e.id}` : "";
2097
2101
  return ` ${t}${r}${o}${n}${a}`;
2098
2102
  }
2099
- function bo(e) {
2103
+ function go(e) {
2100
2104
  const t = ` (${e.color})`, r = e.isFavorite ? " • ⭐" : "", o = ` • id=${e.id}`;
2101
2105
  return ` ${e.name}${t}${r}${o}`;
2102
2106
  }
2103
- function go(e) {
2107
+ function yo(e) {
2104
2108
  const t = e.inboxProject ? " • Inbox" : "", r = e.isFavorite ? " • ⭐" : "", o = e.isShared ? " • Shared" : "", n = e.viewStyle && e.viewStyle !== "list" ? ` • ${e.viewStyle}` : "", a = ` • id=${e.id}`;
2105
2109
  return ` ${e.name}${t}${r}${o}${n}${a}`;
2106
2110
  }
2107
- function Ie(e, t = 5) {
2108
- const o = e.slice(0, t).map(fo).join(`
2111
+ function ve(e, t = 5) {
2112
+ const o = e.slice(0, t).map(bo).join(`
2109
2113
  `);
2110
2114
  if (e.length > t) {
2111
2115
  const n = e.length - t;
@@ -2126,10 +2130,10 @@ function W({
2126
2130
  }) {
2127
2131
  const d = [], l = `${e}: ${t}${typeof r == "number" ? ` (limit ${r})` : ""}${o ? ", more available" : ""}.`;
2128
2132
  return d.push(l), n?.length && d.push(`Filter: ${n.join("; ")}.`), a?.length && d.push(`Preview:
2129
- ${a}`), !t && i?.length && d.push(`No results. ${i.join("; ")}.`), (c?.length || o) && d.push(Pt(c || [], o)), d.join(`
2133
+ ${a}`), !t && i?.length && d.push(`No results. ${i.join("; ")}.`), (c?.length || o) && d.push(Rt(c || [], o)), d.join(`
2130
2134
  `);
2131
2135
  }
2132
- function Pt(e, t) {
2136
+ function Rt(e, t) {
2133
2137
  const r = [...e];
2134
2138
  return t && r.push(`Pass cursor '${t}' to fetch more results.`), `${r.length === 1 ? "Possible suggested next step:" : "Possible suggested next steps:"}
2135
2139
  ${r.map((n) => `- ${n}`).join(`
@@ -2138,14 +2142,14 @@ ${r.map((n) => `- ${n}`).join(`
2138
2142
  function F(e) {
2139
2143
  return s.string().transform((t) => t === "" ? void 0 : t).optional().describe(e);
2140
2144
  }
2141
- const it = 25, yo = s.object({
2145
+ const ct = 25, ko = s.object({
2142
2146
  content: s.string().min(1).describe(
2143
2147
  '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.'
2144
2148
  ),
2145
2149
  description: F(
2146
2150
  "Additional details, notes, or context for the task. Use this for longer content rather than putting it in the task name. Supports Markdown."
2147
2151
  ),
2148
- priority: We.optional().describe(He),
2152
+ priority: Be.optional().describe(We),
2149
2153
  dueString: F("The due date for the task, in natural language."),
2150
2154
  deadlineDate: F(
2151
2155
  'The deadline date for the task in ISO 8601 format (YYYY-MM-DD, e.g., "2025-12-31"). Deadlines are immovable constraints shown with a different indicator than due dates.'
@@ -2166,25 +2170,25 @@ const it = 25, yo = s.object({
2166
2170
  isUncompletable: s.boolean().optional().describe(
2167
2171
  "Whether this task should be uncompletable (organizational header). Tasks with isUncompletable: true appear as organizational headers and cannot be completed."
2168
2172
  )
2169
- }), ct = {
2170
- tasks: s.array(yo).min(1).max(it).describe(`The array of tasks to add (max ${it}).`)
2171
- }, ko = {
2173
+ }), dt = {
2174
+ tasks: s.array(ko).min(1).max(ct).describe(`The array of tasks to add (max ${ct}).`)
2175
+ }, To = {
2172
2176
  tasks: s.array(J).describe("The created tasks."),
2173
2177
  totalCount: s.number().describe("The total number of tasks created."),
2174
- failures: s.array(qe).describe("Failed task creations with error details."),
2178
+ failures: s.array(Ke).describe("Failed task creations with error details."),
2175
2179
  totalRequested: s.number().describe("The total number of tasks requested."),
2176
2180
  successCount: s.number().describe("The number of successfully created tasks."),
2177
2181
  failureCount: s.number().describe("The number of failed task creations.")
2178
- }, To = {
2182
+ }, wo = {
2179
2183
  name: f.ADD_TASKS,
2180
2184
  description: "Add one or more tasks to a project, section, or parent. Supports assignment to project collaborators.",
2181
- parameters: ct,
2182
- outputSchema: ko,
2185
+ parameters: dt,
2186
+ outputSchema: To,
2183
2187
  annotations: { readOnlyHint: !1, destructiveHint: !1, idempotentHint: !1 },
2184
2188
  async execute(e, t) {
2185
- const { tasks: r } = s.object(ct).parse(e), o = /* @__PURE__ */ new Map();
2189
+ const { tasks: r } = s.object(dt).parse(e), o = /* @__PURE__ */ new Map();
2186
2190
  r.forEach((u, p) => {
2187
- const m = wo(u), h = o.get(m);
2191
+ const m = Io(u), h = o.get(m);
2188
2192
  h ? h.push({ task: u, index: p }) : o.set(m, [{ task: u, index: p }]);
2189
2193
  });
2190
2194
  const a = (await Promise.all(
@@ -2192,7 +2196,7 @@ const it = 25, yo = s.object({
2192
2196
  const p = [];
2193
2197
  for (const { task: m, index: h } of u)
2194
2198
  try {
2195
- const b = await Io(m, t);
2199
+ const b = await vo(m, t);
2196
2200
  p.push({ index: h, result: { status: "fulfilled", value: b } });
2197
2201
  } catch (b) {
2198
2202
  p.push({
@@ -2214,7 +2218,7 @@ const it = 25, yo = s.object({
2214
2218
  }
2215
2219
  const d = i.map(P);
2216
2220
  return {
2217
- textContent: vo({
2221
+ textContent: jo({
2218
2222
  tasks: d,
2219
2223
  failures: c,
2220
2224
  args: { tasks: r }
@@ -2230,10 +2234,10 @@ const it = 25, yo = s.object({
2230
2234
  };
2231
2235
  }
2232
2236
  };
2233
- function wo(e) {
2237
+ function Io(e) {
2234
2238
  return `${e.projectId ?? ""}|${e.sectionId ?? ""}|${e.parentId ?? ""}`;
2235
2239
  }
2236
- async function Io(e, t) {
2240
+ async function vo(e, t) {
2237
2241
  const {
2238
2242
  duration: r,
2239
2243
  projectId: o,
@@ -2245,7 +2249,7 @@ async function Io(e, t) {
2245
2249
  labels: l,
2246
2250
  deadlineDate: u,
2247
2251
  ...p
2248
- } = e, m = pe(o) ? void 0 : o;
2252
+ } = e, m = me(o) ? void 0 : o;
2249
2253
  if (m) {
2250
2254
  const b = await t.getProject(m);
2251
2255
  if (b.isArchived)
@@ -2262,13 +2266,13 @@ async function Io(e, t) {
2262
2266
  labels: l,
2263
2267
  deadlineDate: u
2264
2268
  };
2265
- if (d && (h.priority = Ct(d)), c && !m && !n && !a)
2269
+ if (d && (h.priority = $t(d)), c && !m && !n && !a)
2266
2270
  throw new Error(
2267
2271
  `Task "${e.content}": Cannot assign tasks without specifying project context. Please specify a projectId, sectionId, or parentId.`
2268
2272
  );
2269
2273
  if (r)
2270
2274
  try {
2271
- const { minutes: b } = St(r);
2275
+ const { minutes: b } = Ct(r);
2272
2276
  h = {
2273
2277
  ...h,
2274
2278
  duration: b,
@@ -2293,7 +2297,7 @@ async function Io(e, t) {
2293
2297
  throw new Error(
2294
2298
  `Task "${e.content}": Cannot determine target project for assignment validation`
2295
2299
  );
2296
- const I = await Ve.validateTaskCreationAssignment(
2300
+ const I = await Je.validateTaskCreationAssignment(
2297
2301
  t,
2298
2302
  b,
2299
2303
  c
@@ -2308,48 +2312,48 @@ async function Io(e, t) {
2308
2312
  }
2309
2313
  return await t.addTask(h);
2310
2314
  }
2311
- function vo({
2315
+ function jo({
2312
2316
  tasks: e,
2313
2317
  failures: t,
2314
2318
  args: r
2315
2319
  }) {
2316
2320
  const o = /* @__PURE__ */ new Set();
2317
2321
  for (const a of r.tasks)
2318
- a.projectId && !pe(a.projectId) ? o.add("projects") : a.sectionId ? o.add("sections") : a.parentId ? o.add("subtasks") : o.add("inbox");
2322
+ a.projectId && !me(a.projectId) ? o.add("projects") : a.sectionId ? o.add("sections") : a.parentId ? o.add("subtasks") : o.add("inbox");
2319
2323
  let n = "";
2320
2324
  if (o.size === 1) {
2321
2325
  const a = Array.from(o)[0];
2322
2326
  n = a === "inbox" ? "" : `to ${a}`;
2323
2327
  } else o.size > 1 && (n = "to multiple contexts");
2324
- return t.length > 0 ? Xe({
2328
+ return t.length > 0 ? Ze({
2325
2329
  action: `Added tasks${n ? ` ${n}` : ""}`,
2326
2330
  success: e.length,
2327
2331
  total: r.tasks.length,
2328
2332
  successItems: e.map((a) => a.content ?? "Untitled"),
2329
2333
  successLabel: "Created",
2330
2334
  failures: t
2331
- }) : Je("Added", e, {
2335
+ }) : Xe("Added", e, {
2332
2336
  context: n,
2333
2337
  showDetails: !0
2334
2338
  });
2335
2339
  }
2336
- const jo = {
2340
+ const So = {
2337
2341
  projectId: s.string().min(1).describe(
2338
2342
  "The ID of the project to analyze. This triggers a new health analysis which may take some time to complete."
2339
2343
  )
2340
- }, So = {
2344
+ }, Co = {
2341
2345
  projectId: s.string().describe("The project ID."),
2342
2346
  health: s.object({
2343
- status: s.enum(Me).describe("The health status after triggering analysis."),
2347
+ status: s.enum(Fe).describe("The health status after triggering analysis."),
2344
2348
  isStale: s.boolean().describe("Whether the health data is still stale after the request."),
2345
2349
  updateInProgress: s.boolean().describe("Whether an analysis update is currently in progress.")
2346
2350
  }).describe("The health response returned after triggering analysis."),
2347
2351
  message: s.string().describe("A human-readable message about the analysis status.")
2348
- }, Co = {
2352
+ }, $o = {
2349
2353
  name: f.ANALYZE_PROJECT_HEALTH,
2350
2354
  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.",
2351
- parameters: jo,
2352
- outputSchema: So,
2355
+ parameters: So,
2356
+ outputSchema: Co,
2353
2357
  annotations: {
2354
2358
  readOnlyHint: !1,
2355
2359
  destructiveHint: !1,
@@ -2372,19 +2376,19 @@ ${n}`,
2372
2376
  }
2373
2377
  };
2374
2378
  }
2375
- }, $o = {
2376
- ids: s.array(s.string().min(1)).min(1).describe("The IDs of the tasks to complete.")
2377
2379
  }, Do = {
2380
+ ids: s.array(s.string().min(1)).min(1).describe("The IDs of the tasks to complete.")
2381
+ }, xo = {
2378
2382
  completed: s.array(s.string()).describe("The IDs of successfully completed tasks."),
2379
- failures: s.array(qe).describe("Failed task completions with error details."),
2383
+ failures: s.array(Ke).describe("Failed task completions with error details."),
2380
2384
  totalRequested: s.number().describe("The total number of tasks requested to complete."),
2381
2385
  successCount: s.number().describe("The number of successfully completed tasks."),
2382
2386
  failureCount: s.number().describe("The number of failed task completions.")
2383
- }, xo = {
2387
+ }, Ao = {
2384
2388
  name: f.COMPLETE_TASKS,
2385
2389
  description: "Complete one or more tasks by their IDs.",
2386
- parameters: $o,
2387
- outputSchema: Do,
2390
+ parameters: Do,
2391
+ outputSchema: xo,
2388
2392
  annotations: { readOnlyHint: !1, destructiveHint: !0, idempotentHint: !1 },
2389
2393
  async execute(e, t) {
2390
2394
  const r = [], o = [];
@@ -2399,7 +2403,7 @@ ${n}`,
2399
2403
  });
2400
2404
  }
2401
2405
  return {
2402
- textContent: Ao({
2406
+ textContent: Eo({
2403
2407
  completed: r,
2404
2408
  failures: o,
2405
2409
  args: e
@@ -2414,12 +2418,12 @@ ${n}`,
2414
2418
  };
2415
2419
  }
2416
2420
  };
2417
- function Ao({
2421
+ function Eo({
2418
2422
  completed: e,
2419
2423
  failures: t,
2420
2424
  args: r
2421
2425
  }) {
2422
- return Xe({
2426
+ return Ze({
2423
2427
  action: "Completed tasks",
2424
2428
  success: e.length,
2425
2429
  total: r.ids.length,
@@ -2427,7 +2431,7 @@ function Ao({
2427
2431
  failures: t
2428
2432
  });
2429
2433
  }
2430
- const Rt = [
2434
+ const _t = [
2431
2435
  "project",
2432
2436
  "section",
2433
2437
  "task",
@@ -2436,26 +2440,26 @@ const Rt = [
2436
2440
  "filter",
2437
2441
  "reminder",
2438
2442
  "location_reminder"
2439
- ], Eo = {
2440
- type: s.enum(Rt).describe("The type of entity to delete."),
2443
+ ], Oo = {
2444
+ type: s.enum(_t).describe("The type of entity to delete."),
2441
2445
  id: s.string().min(1).describe("The ID of the entity to delete.")
2442
- }, Oo = {
2446
+ }, Uo = {
2443
2447
  deletedEntity: s.object({
2444
- type: s.enum(Rt).describe("The type of deleted entity."),
2448
+ type: s.enum(_t).describe("The type of deleted entity."),
2445
2449
  id: s.string().describe("The ID of the deleted entity.")
2446
2450
  }).describe("Information about the deleted entity."),
2447
2451
  success: s.boolean().describe("Whether the deletion was successful.")
2448
- }, Uo = {
2452
+ }, Po = {
2449
2453
  name: f.DELETE_OBJECT,
2450
2454
  description: "Delete a project, section, task, comment, label, filter, reminder, or location_reminder by its ID.",
2451
- parameters: Eo,
2452
- outputSchema: Oo,
2455
+ parameters: Oo,
2456
+ outputSchema: Uo,
2453
2457
  annotations: { readOnlyHint: !1, destructiveHint: !0, idempotentHint: !0 },
2454
2458
  async execute(e, t) {
2455
2459
  switch (e.type) {
2456
2460
  case "project": {
2457
2461
  const r = await t.getProject(e.id);
2458
- if (he(r) && !r.isArchived)
2462
+ if (be(r) && !r.isArchived)
2459
2463
  throw new Error(
2460
2464
  `Workspace project "${r.name}" must be archived before it can be deleted. Archive the project first, then delete it.`
2461
2465
  );
@@ -2494,18 +2498,18 @@ const Rt = [
2494
2498
  }
2495
2499
  };
2496
2500
  }
2497
- }, _t = ["task", "project", "comment", "section"], Po = {
2498
- type: s.enum(_t).describe("The type of object to fetch."),
2501
+ }, Nt = ["task", "project", "comment", "section"], Ro = {
2502
+ type: s.enum(Nt).describe("The type of object to fetch."),
2499
2503
  id: s.string().min(1).describe("The unique ID of the object to fetch.")
2500
- }, Ro = {
2501
- type: s.enum(_t).describe("The type of object fetched."),
2502
- id: s.string().describe("The ID of the fetched object."),
2503
- object: s.union([J, ce, ke, ye]).describe("The fetched object data.")
2504
2504
  }, _o = {
2505
+ type: s.enum(Nt).describe("The type of object fetched."),
2506
+ id: s.string().describe("The ID of the fetched object."),
2507
+ object: s.union([J, de, Te, ae]).describe("The fetched object data.")
2508
+ }, No = {
2505
2509
  name: f.FETCH_OBJECT,
2506
2510
  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.",
2507
- parameters: Po,
2508
- outputSchema: Ro,
2511
+ parameters: Ro,
2512
+ outputSchema: _o,
2509
2513
  annotations: { readOnlyHint: !0, destructiveHint: !1, idempotentHint: !0 },
2510
2514
  async execute(e, t) {
2511
2515
  const { type: r, id: o } = e;
@@ -2534,7 +2538,7 @@ const Rt = [
2534
2538
  };
2535
2539
  }
2536
2540
  case "comment": {
2537
- const n = await t.getComment(o), a = be(n), i = a.content.length > 50 ? `${a.content.substring(0, 50)}...` : a.content;
2541
+ const n = await t.getComment(o), a = ye(n), i = a.content.length > 50 ? `${a.content.substring(0, 50)}...` : a.content;
2538
2542
  return {
2539
2543
  textContent: `Found comment • id=${a.id} • content="${i}" • posted=${a.postedAt}`,
2540
2544
  structuredContent: {
@@ -2568,21 +2572,21 @@ const Rt = [
2568
2572
  );
2569
2573
  }
2570
2574
  }
2571
- }, No = {
2575
+ }, Lo = {
2572
2576
  id: s.string().min(1).describe(
2573
2577
  'A unique identifier for the document in the format "task:{id}" or "project:{id}".'
2574
2578
  )
2575
- }, Lo = {
2579
+ }, Mo = {
2576
2580
  id: s.string().describe("The ID of the fetched document."),
2577
2581
  title: s.string().describe("The title of the document."),
2578
2582
  text: s.string().describe("The text content of the document."),
2579
2583
  url: s.string().describe("The URL of the document."),
2580
2584
  metadata: s.record(s.string(), s.unknown()).optional().describe("Additional metadata about the document.")
2581
- }, Mo = {
2585
+ }, Fo = {
2582
2586
  name: f.FETCH,
2583
2587
  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}".',
2584
- parameters: No,
2585
- outputSchema: Lo,
2588
+ parameters: Lo,
2589
+ outputSchema: Mo,
2586
2590
  annotations: { readOnlyHint: !0, destructiveHint: !1, idempotentHint: !0 },
2587
2591
  async execute(e, t) {
2588
2592
  const { id: r } = e, [o, n] = r.split(":", 2);
@@ -2601,7 +2605,7 @@ Labels: ${c.labels.join(", ")}`), a = {
2601
2605
  id: `task:${c.id}`,
2602
2606
  title: c.content,
2603
2607
  text: d.join(""),
2604
- url: kt(c.id),
2608
+ url: Tt(c.id),
2605
2609
  metadata: {
2606
2610
  priority: c.priority,
2607
2611
  projectId: c.projectId,
@@ -2624,7 +2628,7 @@ Favorite: Yes`), a = {
2624
2628
  id: `project:${c.id}`,
2625
2629
  title: c.name,
2626
2630
  text: d.join(""),
2627
- url: Tt(c.id),
2631
+ url: wt(c.id),
2628
2632
  metadata: {
2629
2633
  color: c.color,
2630
2634
  isFavorite: c.isFavorite,
@@ -2640,7 +2644,7 @@ Favorite: Yes`), a = {
2640
2644
  structuredContent: a
2641
2645
  };
2642
2646
  }
2643
- }, Fo = {
2647
+ }, Ho = {
2644
2648
  objectType: s.enum(["task", "project", "comment"]).optional().describe("Type of object to filter by."),
2645
2649
  objectId: s.string().optional().describe("Filter by specific object ID (task, project, or comment)."),
2646
2650
  eventType: s.enum([
@@ -2659,17 +2663,17 @@ Favorite: Yes`), a = {
2659
2663
  initiatorId: s.string().optional().describe("Filter by the user ID who initiated the event."),
2660
2664
  limit: s.number().int().min(1).max(C.ACTIVITY_MAX).default(C.ACTIVITY_DEFAULT).describe("Maximum number of activity events to return."),
2661
2665
  cursor: s.string().optional().describe("Pagination cursor for retrieving the next page of results.")
2662
- }, Ho = {
2663
- events: s.array(Sr).describe("The activity events."),
2666
+ }, Wo = {
2667
+ events: s.array(Cr).describe("The activity events."),
2664
2668
  nextCursor: s.string().optional().describe("Cursor for the next page of results."),
2665
2669
  totalCount: s.number().describe("The total number of events in this page."),
2666
2670
  hasMore: s.boolean().describe("Whether there are more results available."),
2667
2671
  appliedFilters: s.record(s.string(), s.unknown()).describe("The filters that were applied to the search.")
2668
- }, Wo = {
2672
+ }, Bo = {
2669
2673
  name: f.FIND_ACTIVITY,
2670
2674
  description: "Retrieve recent activity logs to monitor and audit changes in Todoist. Shows events from all users by default (use initiatorId to filter by specific user). Track task completions, updates, deletions, project changes, and more with flexible filtering. Note: Date-based filtering is not supported by the Todoist API.",
2671
- parameters: Fo,
2672
- outputSchema: Ho,
2675
+ parameters: Ho,
2676
+ outputSchema: Wo,
2673
2677
  annotations: { readOnlyHint: !0, destructiveHint: !1, idempotentHint: !0 },
2674
2678
  async execute(e, t) {
2675
2679
  const { objectType: r, objectId: o, eventType: n, projectId: a, taskId: i, initiatorId: c, limit: d, cursor: l } = e, u = {
@@ -2677,9 +2681,9 @@ Favorite: Yes`), a = {
2677
2681
  cursor: l ?? null
2678
2682
  };
2679
2683
  r && n ? u.objectEventTypes = `${r}:${n}` : r ? u.objectEventTypes = `${r}:` : n && (u.objectEventTypes = `:${n}`), o && o !== "remove" && (u.objectId = o), a && (u.parentProjectId = a), i && (u.parentItemId = i), c && (u.initiatorId = c);
2680
- const { results: p, nextCursor: m } = await t.getActivityLogs(u), h = p.map(Tr);
2684
+ const { results: p, nextCursor: m } = await t.getActivityLogs(u), h = p.map(wr);
2681
2685
  return {
2682
- textContent: Bo({ events: h, args: e, nextCursor: m }),
2686
+ textContent: Yo({ events: h, args: e, nextCursor: m }),
2683
2687
  structuredContent: {
2684
2688
  events: h,
2685
2689
  nextCursor: m ?? void 0,
@@ -2690,7 +2694,7 @@ Favorite: Yes`), a = {
2690
2694
  };
2691
2695
  }
2692
2696
  };
2693
- function Bo({
2697
+ function Yo({
2694
2698
  events: e,
2695
2699
  args: t,
2696
2700
  nextCursor: r
@@ -2711,12 +2715,12 @@ function Bo({
2711
2715
  limit: t.limit,
2712
2716
  nextCursor: r ?? void 0,
2713
2717
  filterHints: a,
2714
- previewLines: Yo(e, Math.min(e.length, t.limit)),
2718
+ previewLines: zo(e, Math.min(e.length, t.limit)),
2715
2719
  zeroReasonHints: i
2716
2720
  });
2717
2721
  }
2718
- function Yo(e, t = 10) {
2719
- const o = e.slice(0, t).map(zo).join(`
2722
+ function zo(e, t = 10) {
2723
+ const o = e.slice(0, t).map(Go).join(`
2720
2724
  `);
2721
2725
  if (e.length > t) {
2722
2726
  const n = e.length - t;
@@ -2725,8 +2729,8 @@ function Yo(e, t = 10) {
2725
2729
  }
2726
2730
  return o;
2727
2731
  }
2728
- function zo(e) {
2729
- const t = Go(e.eventDate), r = `${e.eventType} ${e.objectType}`;
2732
+ function Go(e) {
2733
+ const t = qo(e.eventDate), r = `${e.eventType} ${e.objectType}`;
2730
2734
  let o = "";
2731
2735
  if (e.extraData) {
2732
2736
  const c = e.extraData.content || e.extraData.name || e.extraData.last_content;
@@ -2735,7 +2739,7 @@ function zo(e) {
2735
2739
  const n = e.objectId ? ` • id=${e.objectId}` : "", a = e.initiatorId ? ` • by=${e.initiatorId}` : " • system", i = e.parentProjectId ? ` • project=${e.parentProjectId}` : "";
2736
2740
  return ` [${t}] ${r}${o}${n}${a}${i}`;
2737
2741
  }
2738
- function Go(e) {
2742
+ function qo(e) {
2739
2743
  try {
2740
2744
  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", {
2741
2745
  hour: "2-digit",
@@ -2748,7 +2752,7 @@ function Go(e) {
2748
2752
  return e;
2749
2753
  }
2750
2754
  }
2751
- const qo = {
2755
+ const Ko = {
2752
2756
  taskId: s.string().optional().describe("Find comments for a specific task."),
2753
2757
  projectId: s.string().optional().describe(
2754
2758
  'Find comments for a specific project. Project ID should be an ID string, or the text "inbox", for inbox tasks.'
@@ -2756,8 +2760,8 @@ const qo = {
2756
2760
  commentId: s.string().optional().describe("Get a specific comment by ID."),
2757
2761
  cursor: s.string().optional().describe("Pagination cursor for retrieving more results."),
2758
2762
  limit: s.number().int().min(1).max(C.COMMENTS_MAX).optional().describe("Maximum number of comments to return")
2759
- }, Ko = {
2760
- comments: s.array(ke).describe("The found comments."),
2763
+ }, Vo = {
2764
+ comments: s.array(Te).describe("The found comments."),
2761
2765
  searchType: s.string().describe(
2762
2766
  'The type of search performed: "single" (comment ID), "task" (task ID), or "project" (project ID).'
2763
2767
  ),
@@ -2765,11 +2769,11 @@ const qo = {
2765
2769
  hasMore: s.boolean().describe("Whether there are more results available."),
2766
2770
  nextCursor: s.string().optional().describe("Cursor for the next page of results."),
2767
2771
  totalCount: s.number().describe("The total number of comments in this page.")
2768
- }, Vo = {
2772
+ }, Jo = {
2769
2773
  name: f.FIND_COMMENTS,
2770
2774
  description: "Find comments by task, project, or get a specific comment by ID. Exactly one of taskId, projectId, or commentId must be provided.",
2771
- parameters: qo,
2772
- outputSchema: Ko,
2775
+ parameters: Ko,
2776
+ outputSchema: Vo,
2773
2777
  annotations: { readOnlyHint: !0, destructiveHint: !1, idempotentHint: !0 },
2774
2778
  async execute(e, t) {
2775
2779
  const r = [e.taskId, e.projectId, e.commentId].filter(Boolean);
@@ -2802,9 +2806,9 @@ const qo = {
2802
2806
  i = l.results, n = l.nextCursor !== null, a = l.nextCursor;
2803
2807
  } else
2804
2808
  throw new Error("Invalid state: no search parameter provided");
2805
- const c = i.map(be);
2809
+ const c = i.map(ye);
2806
2810
  return {
2807
- textContent: Jo({
2811
+ textContent: Xo({
2808
2812
  comments: c,
2809
2813
  searchType: e.commentId ? "single" : e.taskId ? "task" : "project",
2810
2814
  searchId: e.commentId || e.taskId || e.projectId || "",
@@ -2822,7 +2826,7 @@ const qo = {
2822
2826
  };
2823
2827
  }
2824
2828
  };
2825
- function Jo({
2829
+ function Xo({
2826
2830
  comments: e,
2827
2831
  searchType: t,
2828
2832
  searchId: r,
@@ -2842,59 +2846,59 @@ function Jo({
2842
2846
  a = `Found ${e.length} ${d} for ${t} ${r}${c}`, o && (a += " • More available");
2843
2847
  }
2844
2848
  if (n) {
2845
- const i = Pt([], n);
2849
+ const i = Rt([], n);
2846
2850
  return `${a}
2847
2851
  ${i}`;
2848
2852
  }
2849
2853
  return a;
2850
2854
  }
2851
- function Nt(e) {
2855
+ function Lt(e) {
2852
2856
  const t = e.getUTCFullYear(), r = String(e.getUTCMonth() + 1).padStart(2, "0"), o = String(e.getUTCDate()).padStart(2, "0");
2853
2857
  return `${t}-${r}-${o}`;
2854
2858
  }
2855
- function Xo(e) {
2859
+ function Zo(e) {
2856
2860
  const t = /^([+-])(\d{2}):(\d{2})$/.exec(e);
2857
2861
  if (!t)
2858
2862
  return 0;
2859
2863
  const [, r, o, n] = t, a = Number(o) * 60 + Number(n);
2860
2864
  return r === "-" ? -a : a;
2861
2865
  }
2862
- function Zo(e, t) {
2866
+ function Qo(e, t) {
2863
2867
  const r = new Date(e.getTime() + t * 60 * 1e3);
2864
- return Nt(r);
2868
+ return Lt(r);
2865
2869
  }
2866
- function dt(e, t) {
2870
+ function lt(e, t) {
2867
2871
  const [r, o, n] = e.split("-"), a = Number(r), i = Number(o), c = Number(n);
2868
2872
  if (!Number.isFinite(a) || !Number.isFinite(i) || !Number.isFinite(c))
2869
2873
  throw new Error(`Invalid date format: ${e}. Expected YYYY-MM-DD.`);
2870
2874
  const d = new Date(Date.UTC(a, i - 1, c));
2871
- return d.setUTCDate(d.getUTCDate() + t), Nt(d);
2875
+ return d.setUTCDate(d.getUTCDate() + t), Lt(d);
2872
2876
  }
2873
- const Qo = ["and", "or"], Ze = {
2877
+ const en = ["and", "or"], Qe = {
2874
2878
  labels: s.string().array().optional().describe("The labels to filter the tasks by"),
2875
- labelsOperator: s.enum(Qo).optional().describe(
2879
+ labelsOperator: s.enum(en).optional().describe(
2876
2880
  'The operator to use when filtering by labels. This will dictate whether a task has all labels, or some of them. Default is "or".'
2877
2881
  )
2878
2882
  };
2879
- function Qe(e = [], t = "or") {
2883
+ function et(e = [], t = "or") {
2880
2884
  if (e.length === 0) return "";
2881
2885
  const r = t === "and" ? " & " : " | ";
2882
2886
  return `(${e.map((a) => a.startsWith("@") ? a : `@${a}`).join(` ${r} `)})`;
2883
2887
  }
2884
- const en = 7;
2885
- function tn({
2888
+ const tn = 7;
2889
+ function sn({
2886
2890
  since: e,
2887
2891
  until: t,
2888
2892
  userGmtOffset: r,
2889
2893
  now: o = /* @__PURE__ */ new Date()
2890
2894
  }) {
2891
- const n = Xo(r), a = Zo(o, n), i = en - 1, c = t ?? (e ? dt(e, i) : a);
2895
+ const n = Zo(r), a = Qo(o, n), i = tn - 1, c = t ?? (e ? lt(e, i) : a);
2892
2896
  return {
2893
- since: e ?? dt(c, -i),
2897
+ since: e ?? lt(c, -i),
2894
2898
  until: c
2895
2899
  };
2896
2900
  }
2897
- const sn = {
2901
+ const rn = {
2898
2902
  getBy: s.enum(["completion", "due"]).default("completion").describe(
2899
2903
  '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).'
2900
2904
  ),
@@ -2917,18 +2921,18 @@ const sn = {
2917
2921
  cursor: s.string().optional().describe(
2918
2922
  "The cursor to get the next page of tasks (cursor is obtained from the previous call to this tool, with the same parameters)."
2919
2923
  ),
2920
- ...Ze
2921
- }, rn = {
2924
+ ...Qe
2925
+ }, on = {
2922
2926
  tasks: s.array(J).describe("The found completed tasks."),
2923
2927
  nextCursor: s.string().optional().describe("Cursor for the next page of results."),
2924
2928
  totalCount: s.number().describe("The total number of tasks in this page."),
2925
2929
  hasMore: s.boolean().describe("Whether there are more results available."),
2926
2930
  appliedFilters: s.record(s.string(), s.unknown()).describe("The filters that were applied to the search.")
2927
- }, on = {
2931
+ }, nn = {
2928
2932
  name: f.FIND_COMPLETED_TASKS,
2929
2933
  description: "Get completed tasks. 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.",
2930
- parameters: sn,
2931
- outputSchema: rn,
2934
+ parameters: rn,
2935
+ outputSchema: on,
2932
2936
  annotations: { readOnlyHint: !0, destructiveHint: !1, idempotentHint: !0 },
2933
2937
  async execute(e, t) {
2934
2938
  const { getBy: r, labels: o, labelsOperator: n, since: a, until: i, responsibleUser: c, projectId: d, ...l } = e;
@@ -2936,13 +2940,13 @@ const sn = {
2936
2940
  throw new Error(
2937
2941
  "Cursor pagination requires explicit since and until. Reuse structuredContent.appliedFilters.since and structuredContent.appliedFilters.until from the previous page."
2938
2942
  );
2939
- const u = await Be(t, c), p = u?.email;
2940
- let h = Qe(o, n);
2943
+ const u = await Ye(t, c), p = u?.email;
2944
+ let h = et(o, n);
2941
2945
  u && p && (h = oe(h, `assigned to: ${p}`));
2942
2946
  const b = await t.getUser(), I = b.tzInfo?.gmtString || "+00:00", $ = await K({
2943
2947
  projectId: d,
2944
2948
  user: b
2945
- }), D = tn({
2949
+ }), D = sn({
2946
2950
  since: a,
2947
2951
  until: i,
2948
2952
  userGmtOffset: I
@@ -2964,7 +2968,7 @@ const sn = {
2964
2968
  ...h ? { filterQuery: h, filterLang: "en" } : {}
2965
2969
  }), v = w.map(P);
2966
2970
  return {
2967
- textContent: nn({
2971
+ textContent: an({
2968
2972
  tasks: v,
2969
2973
  args: R,
2970
2974
  nextCursor: j,
@@ -2980,7 +2984,7 @@ const sn = {
2980
2984
  };
2981
2985
  }
2982
2986
  };
2983
- function nn({
2987
+ function an({
2984
2988
  tasks: e,
2985
2989
  args: t,
2986
2990
  nextCursor: r,
@@ -3002,11 +3006,11 @@ function nn({
3002
3006
  limit: t.limit,
3003
3007
  nextCursor: r ?? void 0,
3004
3008
  filterHints: i,
3005
- previewLines: Ie(e, Math.min(e.length, t.limit)),
3009
+ previewLines: ve(e, Math.min(e.length, t.limit)),
3006
3010
  zeroReasonHints: c
3007
3011
  });
3008
3012
  }
3009
- const an = {
3013
+ const cn = {
3010
3014
  searchText: s.string().optional().describe(
3011
3015
  '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.'
3012
3016
  ),
@@ -3014,8 +3018,8 @@ const an = {
3014
3018
  cursor: s.string().optional().describe(
3015
3019
  "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."
3016
3020
  )
3017
- }, cn = {
3018
- labels: s.array(de).describe("The found personal labels."),
3021
+ }, dn = {
3022
+ labels: s.array(le).describe("The found personal labels."),
3019
3023
  nextCursor: s.string().optional().describe("Cursor for the next page of results."),
3020
3024
  totalCount: s.number().describe("The total number of labels in this page."),
3021
3025
  hasMore: s.boolean().describe("Whether there are more results available."),
@@ -3023,24 +3027,24 @@ const an = {
3023
3027
  "Names of all shared labels visible to you. These have no IDs or metadata — use their names directly when filtering tasks."
3024
3028
  ),
3025
3029
  appliedFilters: s.record(s.string(), s.unknown()).describe("The filters that were applied to the search.")
3026
- }, dn = {
3030
+ }, ln = {
3027
3031
  name: f.FIND_LABELS,
3028
3032
  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.",
3029
- parameters: an,
3030
- outputSchema: cn,
3033
+ parameters: cn,
3034
+ outputSchema: dn,
3031
3035
  annotations: { readOnlyHint: !0, destructiveHint: !1, idempotentHint: !0 },
3032
3036
  async execute(e, t) {
3033
3037
  const [r, o] = await Promise.all([
3034
- e.searchText ? br(t, e.searchText).then((c) => ({
3038
+ e.searchText ? gr(t, e.searchText).then((c) => ({
3035
3039
  results: c,
3036
3040
  nextCursor: null
3037
3041
  })) : t.getLabels({ limit: e.limit, cursor: e.cursor ?? null }),
3038
- gr(t)
3042
+ yr(t)
3039
3043
  ]), { results: n, nextCursor: a } = r, i = e.searchText ? { searchText: e.searchText } : { limit: e.limit, cursor: e.cursor };
3040
3044
  return {
3041
- textContent: ln({ labels: n, args: e, nextCursor: a, sharedLabels: o }),
3045
+ textContent: un({ labels: n, args: e, nextCursor: a, sharedLabels: o }),
3042
3046
  structuredContent: {
3043
- labels: n.map((c) => de.parse(c)),
3047
+ labels: n.map((c) => le.parse(c)),
3044
3048
  nextCursor: a ?? void 0,
3045
3049
  totalCount: n.length,
3046
3050
  hasMore: !!a,
@@ -3050,7 +3054,7 @@ const an = {
3050
3054
  };
3051
3055
  }
3052
3056
  };
3053
- function ln({
3057
+ function un({
3054
3058
  labels: e,
3055
3059
  args: t,
3056
3060
  nextCursor: r,
@@ -3058,7 +3062,7 @@ function ln({
3058
3062
  }) {
3059
3063
  const n = t.searchText ? `All labels matching "${t.searchText}"` : "Labels", a = [];
3060
3064
  t.searchText && a.push(`searchText: "${t.searchText}"`);
3061
- const i = 10, d = e.slice(0, i).map(bo).join(`
3065
+ const i = 10, d = e.slice(0, i).map(go).join(`
3062
3066
  `), l = e.length - i, u = l > 0 ? `${d}
3063
3067
  …and ${l} more` : d, p = [];
3064
3068
  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"));
@@ -3075,15 +3079,15 @@ No shared labels.`;
3075
3079
  zeroReasonHints: p
3076
3080
  }) + m;
3077
3081
  }
3078
- const { FIND_PROJECTS: Lt, ADD_TASKS: Mt, UPDATE_TASKS: Ft } = f, un = {
3082
+ const { FIND_PROJECTS: Mt, ADD_TASKS: Ft, UPDATE_TASKS: Ht } = f, pn = {
3079
3083
  projectId: s.string().min(1).optional().describe(
3080
3084
  '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.'
3081
3085
  ),
3082
3086
  searchTerm: s.string().optional().describe(
3083
3087
  "Search for a user by name or email (partial and case insensitive match). If omitted, all users are returned."
3084
3088
  )
3085
- }, pn = {
3086
- collaborators: s.array(Cr).describe("The found users."),
3089
+ }, mn = {
3090
+ collaborators: s.array($r).describe("The found users."),
3087
3091
  projectInfo: s.object({
3088
3092
  id: s.string().describe("The project ID."),
3089
3093
  name: s.string().describe("The project name."),
@@ -3092,16 +3096,16 @@ const { FIND_PROJECTS: Lt, ADD_TASKS: Mt, UPDATE_TASKS: Ft } = f, un = {
3092
3096
  totalCount: s.number().describe("The total number of users found."),
3093
3097
  totalAvailable: s.number().optional().describe("The total number of available users before the search filter was applied."),
3094
3098
  appliedFilters: s.record(s.string(), s.unknown()).describe("The filters that were applied to the search.")
3095
- }, mn = {
3099
+ }, hn = {
3096
3100
  name: f.FIND_PROJECT_COLLABORATORS,
3097
3101
  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.`,
3098
- parameters: un,
3099
- outputSchema: pn,
3102
+ parameters: pn,
3103
+ outputSchema: mn,
3100
3104
  annotations: { readOnlyHint: !0, destructiveHint: !1, idempotentHint: !0 },
3101
3105
  async execute(e, t) {
3102
3106
  const { projectId: r, searchTerm: o } = e;
3103
3107
  if (!r)
3104
- return hn({ searchTerm: o, client: t, appliedFilters: e });
3108
+ return fn({ searchTerm: o, client: t, appliedFilters: e });
3105
3109
  let n = r, a;
3106
3110
  try {
3107
3111
  if (a = await t.getProject(r), !a)
@@ -3112,7 +3116,7 @@ const { FIND_PROJECTS: Lt, ADD_TASKS: Mt, UPDATE_TASKS: Ft } = f, un = {
3112
3116
 
3113
3117
  **Next steps:**
3114
3118
  • Share the project to enable collaboration
3115
- • Use ${Mt} and ${Ft} for assignment features once shared`,
3119
+ • Use ${Ft} and ${Ht} for assignment features once shared`,
3116
3120
  structuredContent: {
3117
3121
  collaborators: [],
3118
3122
  projectInfo: {
@@ -3149,9 +3153,9 @@ const { FIND_PROJECTS: Lt, ADD_TASKS: Mt, UPDATE_TASKS: Ft } = f, un = {
3149
3153
  appliedFilters: e
3150
3154
  }
3151
3155
  };
3152
- const c = Ht(i, o);
3156
+ const c = Wt(i, o);
3153
3157
  return {
3154
- textContent: Wt({
3158
+ textContent: Bt({
3155
3159
  collaborators: c,
3156
3160
  projectName: n,
3157
3161
  searchTerm: o,
@@ -3171,18 +3175,18 @@ const { FIND_PROJECTS: Lt, ADD_TASKS: Mt, UPDATE_TASKS: Ft } = f, un = {
3171
3175
  };
3172
3176
  }
3173
3177
  };
3174
- async function hn({
3178
+ async function fn({
3175
3179
  searchTerm: e,
3176
3180
  client: t,
3177
3181
  appliedFilters: r
3178
3182
  }) {
3179
- const o = await H.getAllCollaborators(t), n = await fn(t, o);
3183
+ const o = await H.getAllCollaborators(t), n = await bn(t, o);
3180
3184
  if (n.length === 0)
3181
3185
  return {
3182
3186
  textContent: `No users found. You may have no shared projects, or collaborator data is not accessible.
3183
3187
 
3184
3188
  **Next steps:**
3185
- • Use ${Lt} to find shared projects
3189
+ • Use ${Mt} to find shared projects
3186
3190
  • Share a project to add collaborators
3187
3191
  • Ensure you have permission to view collaborators`,
3188
3192
  structuredContent: {
@@ -3193,9 +3197,9 @@ async function hn({
3193
3197
  appliedFilters: r
3194
3198
  }
3195
3199
  };
3196
- const a = Ht(n, e);
3200
+ const a = Wt(n, e);
3197
3201
  return {
3198
- textContent: Wt({
3202
+ textContent: Bt({
3199
3203
  collaborators: a,
3200
3204
  projectName: void 0,
3201
3205
  searchTerm: e,
@@ -3210,7 +3214,7 @@ async function hn({
3210
3214
  }
3211
3215
  };
3212
3216
  }
3213
- async function fn(e, t) {
3217
+ async function bn(e, t) {
3214
3218
  try {
3215
3219
  const r = await e.getUser();
3216
3220
  return !r || t.some((o) => o.id === r.id) ? t : [
@@ -3221,7 +3225,7 @@ async function fn(e, t) {
3221
3225
  return t;
3222
3226
  }
3223
3227
  }
3224
- function Ht(e, t) {
3228
+ function Wt(e, t) {
3225
3229
  if (!t)
3226
3230
  return e;
3227
3231
  const r = t.toLowerCase().trim();
@@ -3229,7 +3233,7 @@ function Ht(e, t) {
3229
3233
  (o) => o.name.toLowerCase().includes(r) || o.email.toLowerCase().includes(r)
3230
3234
  );
3231
3235
  }
3232
- function Wt({
3236
+ function Bt({
3233
3237
  collaborators: e,
3234
3238
  projectName: t,
3235
3239
  searchTerm: r,
@@ -3245,7 +3249,7 @@ function Wt({
3245
3249
  const l = [];
3246
3250
  e.length === 0 && r && (l.push(`No users match "${r}"`), l.push("Try a broader search term or check spelling"), o > 0 && l.push(`${o} users available without filter`));
3247
3251
  const u = [];
3248
- return e.length > 0 ? (u.push(`Use ${Mt} with responsibleUser to assign new tasks`), u.push(`Use ${Ft} with responsibleUser to reassign existing tasks`), u.push("Use user names, emails, or IDs for assignments")) : (u.push(`Use ${Lt} to find other projects`), r && o > 0 && u.push("Try searching without filters to see all users")), W({
3252
+ return e.length > 0 ? (u.push(`Use ${Ft} with responsibleUser to assign new tasks`), u.push(`Use ${Ht} with responsibleUser to reassign existing tasks`), u.push("Use user names, emails, or IDs for assignments")) : (u.push(`Use ${Mt} to find other projects`), r && o > 0 && u.push("Try searching without filters to see all users")), W({
3249
3253
  subject: i,
3250
3254
  count: e.length,
3251
3255
  filterHints: c,
@@ -3255,7 +3259,7 @@ function Wt({
3255
3259
  nextSteps: u
3256
3260
  });
3257
3261
  }
3258
- const { ADD_PROJECTS: bn } = f, gn = {
3262
+ const { ADD_PROJECTS: gn } = f, yn = {
3259
3263
  searchText: s.string().optional().describe(
3260
3264
  '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.'
3261
3265
  ),
@@ -3263,22 +3267,22 @@ const { ADD_PROJECTS: bn } = f, gn = {
3263
3267
  cursor: s.string().optional().describe(
3264
3268
  "The cursor to get the next page of projects (cursor is obtained from the previous call to this tool, with the same parameters)."
3265
3269
  )
3266
- }, yn = {
3267
- projects: s.array(ce).describe("The found projects."),
3270
+ }, kn = {
3271
+ projects: s.array(de).describe("The found projects."),
3268
3272
  nextCursor: s.string().optional().describe("Cursor for the next page of results."),
3269
3273
  totalCount: s.number().describe("The total number of projects in this page."),
3270
3274
  hasMore: s.boolean().describe("Whether there are more results available."),
3271
3275
  appliedFilters: s.record(s.string(), s.unknown()).describe("The filters that were applied to the search.")
3272
- }, kn = {
3276
+ }, Tn = {
3273
3277
  name: f.FIND_PROJECTS,
3274
3278
  description: "List all projects or search for projects by name. When searching, all matching projects are returned (pagination is ignored). When not searching, projects are returned with pagination.",
3275
- parameters: gn,
3276
- outputSchema: yn,
3279
+ parameters: yn,
3280
+ outputSchema: kn,
3277
3281
  annotations: { readOnlyHint: !0, destructiveHint: !1, idempotentHint: !0 },
3278
3282
  async execute(e, t) {
3279
3283
  let r, o = null;
3280
3284
  if (e.searchText)
3281
- r = await xt(t, e.searchText), o = null;
3285
+ r = await At(t, e.searchText), o = null;
3282
3286
  else {
3283
3287
  const a = await t.getProjects({
3284
3288
  limit: e.limit,
@@ -3288,7 +3292,7 @@ const { ADD_PROJECTS: bn } = f, gn = {
3288
3292
  }
3289
3293
  const n = r.map(V);
3290
3294
  return {
3291
- textContent: Tn({ projects: n, args: e, nextCursor: o }),
3295
+ textContent: wn({ projects: n, args: e, nextCursor: o }),
3292
3296
  structuredContent: {
3293
3297
  projects: n,
3294
3298
  nextCursor: o ?? void 0,
@@ -3299,17 +3303,17 @@ const { ADD_PROJECTS: bn } = f, gn = {
3299
3303
  };
3300
3304
  }
3301
3305
  };
3302
- function Tn({
3306
+ function wn({
3303
3307
  projects: e,
3304
3308
  args: t,
3305
3309
  nextCursor: r
3306
3310
  }) {
3307
3311
  const o = t.searchText ? `All projects matching "${t.searchText}"` : "Projects", n = [];
3308
3312
  t.searchText && n.push(`searchText: "${t.searchText}"`);
3309
- const a = 10, c = e.slice(0, a).map(go).join(`
3313
+ const a = 10, c = e.slice(0, a).map(yo).join(`
3310
3314
  `), d = e.length - a, l = d > 0 ? `${c}
3311
3315
  …and ${d} more` : c, u = [];
3312
- return e.length === 0 && (t.searchText ? (u.push("Try broader search terms"), u.push("Check spelling"), u.push("Remove searchText to see all projects")) : (u.push("No projects created yet"), u.push(`Use ${bn} to create a project`))), W({
3316
+ return e.length === 0 && (t.searchText ? (u.push("Try broader search terms"), u.push("Check spelling"), u.push("Remove searchText to see all projects")) : (u.push("No projects created yet"), u.push(`Use ${gn} to create a project`))), W({
3313
3317
  subject: o,
3314
3318
  count: e.length,
3315
3319
  limit: t.searchText ? void 0 : t.limit,
@@ -3319,22 +3323,22 @@ function Tn({
3319
3323
  zeroReasonHints: u
3320
3324
  });
3321
3325
  }
3322
- const wn = {
3326
+ const In = {
3323
3327
  taskId: s.string().optional().describe(
3324
3328
  "Find all reminders for a specific task. Returns both time-based and location reminders."
3325
3329
  ),
3326
3330
  reminderId: s.string().optional().describe("Get a specific time-based reminder (relative or absolute) by its ID."),
3327
3331
  locationReminderId: s.string().optional().describe("Get a specific location reminder by its ID.")
3328
- }, In = {
3329
- reminders: s.array(Ge).describe("The found reminders (time-based and location)."),
3332
+ }, vn = {
3333
+ reminders: s.array(qe).describe("The found reminders (time-based and location)."),
3330
3334
  searchType: s.string().describe('The search type used: "task", "reminder", or "location_reminder".'),
3331
3335
  searchId: s.string().describe("The ID used for the search."),
3332
3336
  totalCount: s.number().describe("Total reminders in this response.")
3333
- }, vn = {
3337
+ }, jn = {
3334
3338
  name: f.FIND_REMINDERS,
3335
3339
  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.",
3336
- parameters: wn,
3337
- outputSchema: In,
3340
+ parameters: In,
3341
+ outputSchema: vn,
3338
3342
  annotations: { readOnlyHint: !0, destructiveHint: !1, idempotentHint: !0 },
3339
3343
  async execute(e, t) {
3340
3344
  const { taskId: r, reminderId: o, locationReminderId: n } = e, a = [r, o, n].filter(Boolean);
@@ -3345,7 +3349,7 @@ const wn = {
3345
3349
  "Only one of taskId, reminderId, or locationReminderId can be provided at a time."
3346
3350
  );
3347
3351
  if (o) {
3348
- const i = await t.getReminder(o), c = ue(i);
3352
+ const i = await t.getReminder(o), c = pe(i);
3349
3353
  return {
3350
3354
  textContent: `Found ${i.type} reminder (id=${o})`,
3351
3355
  structuredContent: {
@@ -3357,7 +3361,7 @@ const wn = {
3357
3361
  };
3358
3362
  }
3359
3363
  if (n) {
3360
- const i = await t.getLocationReminder(n), c = ue(i);
3364
+ const i = await t.getLocationReminder(n), c = pe(i);
3361
3365
  return {
3362
3366
  textContent: `Found location reminder (id=${n})`,
3363
3367
  structuredContent: {
@@ -3378,9 +3382,9 @@ const wn = {
3378
3382
  apiMethod: (p) => t.getLocationReminders(p),
3379
3383
  args: { taskId: r }
3380
3384
  })
3381
- ]), l = [...i, ...c].map(ue);
3385
+ ]), l = [...i, ...c].map(pe);
3382
3386
  return {
3383
- textContent: jn(l, r),
3387
+ textContent: Sn(l, r),
3384
3388
  structuredContent: {
3385
3389
  reminders: l,
3386
3390
  searchType: "task",
@@ -3392,10 +3396,10 @@ const wn = {
3392
3396
  throw new Error("One of taskId, reminderId, or locationReminderId must be provided.");
3393
3397
  }
3394
3398
  };
3395
- function jn(e, t) {
3399
+ function Sn(e, t) {
3396
3400
  if (e.length === 0)
3397
3401
  return `No reminders found for task ${t}`;
3398
- const { timeBasedCount: r, locationCount: o } = At(e), n = [];
3402
+ const { timeBasedCount: r, locationCount: o } = Et(e), n = [];
3399
3403
  if (r > 0) {
3400
3404
  const a = r > 1 ? "time-based reminders" : "time-based reminder";
3401
3405
  n.push(`${r} ${a}`);
@@ -3406,22 +3410,22 @@ function jn(e, t) {
3406
3410
  }
3407
3411
  return `Found ${n.join(" and ")} for task ${t}`;
3408
3412
  }
3409
- const { ADD_SECTIONS: Sn } = f, Cn = {
3413
+ const { ADD_SECTIONS: Cn } = f, $n = {
3410
3414
  projectId: s.string().min(1).describe(
3411
3415
  'The ID of the project to search sections in. Project ID should be an ID string, or the text "inbox", for inbox tasks.'
3412
3416
  ),
3413
3417
  searchText: s.string().optional().describe(
3414
3418
  '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.'
3415
3419
  )
3416
- }, $n = {
3417
- sections: s.array(ye).describe("The found sections."),
3420
+ }, Dn = {
3421
+ sections: s.array(ae).describe("The found sections."),
3418
3422
  totalCount: s.number().describe("The total number of sections found."),
3419
3423
  appliedFilters: s.record(s.string(), s.unknown()).describe("The filters that were applied to the search.")
3420
- }, Dn = {
3424
+ }, xn = {
3421
3425
  name: f.FIND_SECTIONS,
3422
3426
  description: "Search for sections by name or other criteria in a project. When searching, uses server-side search to avoid fetching all sections.",
3423
- parameters: Cn,
3424
- outputSchema: $n,
3427
+ parameters: $n,
3428
+ outputSchema: Dn,
3425
3429
  annotations: { readOnlyHint: !0, destructiveHint: !1, idempotentHint: !0 },
3426
3430
  async execute(e, t) {
3427
3431
  const r = await K({
@@ -3429,12 +3433,12 @@ const { ADD_SECTIONS: Sn } = f, Cn = {
3429
3433
  client: t
3430
3434
  });
3431
3435
  let o;
3432
- e.searchText ? o = await yr(t, e.searchText, r) : o = (await t.getSections({
3436
+ e.searchText ? o = await kr(t, e.searchText, r) : o = (await t.getSections({
3433
3437
  projectId: r
3434
3438
  })).results;
3435
3439
  const n = o.map(({ id: i, name: c }) => ({ id: i, name: c }));
3436
3440
  return {
3437
- textContent: xn({
3441
+ textContent: An({
3438
3442
  sections: n,
3439
3443
  projectId: e.projectId,
3440
3444
  searchText: e.searchText
@@ -3447,13 +3451,13 @@ const { ADD_SECTIONS: Sn } = f, Cn = {
3447
3451
  };
3448
3452
  }
3449
3453
  };
3450
- function xn({
3454
+ function An({
3451
3455
  sections: e,
3452
3456
  projectId: t,
3453
3457
  searchText: r
3454
3458
  }) {
3455
3459
  const o = [];
3456
- 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 ${Sn} to create sections`));
3460
+ 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 ${Cn} to create sections`));
3457
3461
  const n = r ? `Sections in project ${t} matching "${r}"` : `Sections in project ${t}`, a = e.length > 0 ? e.map((i) => ` ${i.name} • id=${i.id}`).join(`
3458
3462
  `) : void 0;
3459
3463
  return W({
@@ -3463,10 +3467,10 @@ function xn({
3463
3467
  zeroReasonHints: o
3464
3468
  });
3465
3469
  }
3466
- function Bt(e) {
3470
+ function Yt(e) {
3467
3471
  return /* @__PURE__ */ new Date(`${e}T00:00:00`);
3468
3472
  }
3469
- const An = {
3473
+ const En = {
3470
3474
  startDate: s.string().regex(/^(\d{4}-\d{2}-\d{2}|today)$/).optional().describe("The start date to get the tasks for. Format: YYYY-MM-DD or 'today'."),
3471
3475
  overdueOption: s.enum(["overdue-only", "include-overdue", "exclude-overdue"]).optional().describe(
3472
3476
  "How to handle overdue tasks. 'overdue-only' to get only overdue tasks, 'include-overdue' to include overdue tasks along with tasks for the specified date(s), and 'exclude-overdue' to exclude overdue tasks. Default is 'include-overdue'."
@@ -3481,57 +3485,57 @@ const An = {
3481
3485
  responsibleUser: s.string().optional().describe(
3482
3486
  "Filter tasks assigned to this user. User ID, name, or email. For personal queries (summaries, plans, reports), set to current user from user-info to exclude collaborators."
3483
3487
  ),
3484
- responsibleUserFiltering: s.enum($t).optional().describe(
3488
+ responsibleUserFiltering: s.enum(Dt).optional().describe(
3485
3489
  "Filter when responsibleUser is omitted. 'assigned'=assigned to others; 'unassignedOrMe'=unassigned+mine; 'all'=everyone. Default: 'unassignedOrMe'."
3486
3490
  ),
3487
- ...Ze
3488
- }, En = {
3491
+ ...Qe
3492
+ }, On = {
3489
3493
  tasks: s.array(J).describe("The found tasks."),
3490
3494
  nextCursor: s.string().optional().describe("Cursor for the next page of results."),
3491
3495
  totalCount: s.number().describe("The total number of tasks in this page."),
3492
3496
  hasMore: s.boolean().describe("Whether there are more results available."),
3493
3497
  appliedFilters: s.record(s.string(), s.unknown()).describe("The filters that were applied to the search.")
3494
- }, On = {
3498
+ }, Un = {
3495
3499
  name: f.FIND_TASKS_BY_DATE,
3496
3500
  description: "Get tasks by date range. startDate='today' includes overdue items. Default responsibleUserFiltering='unassignedOrMe' excludes others' tasks. Person-specific queries (summaries, plans, reports) require responsibleUser.",
3497
- parameters: An,
3498
- outputSchema: En,
3501
+ parameters: En,
3502
+ outputSchema: On,
3499
3503
  annotations: { readOnlyHint: !0, destructiveHint: !1, idempotentHint: !0 },
3500
3504
  async execute(e, t) {
3501
3505
  if (!e.startDate && e.overdueOption !== "overdue-only")
3502
3506
  throw new Error(
3503
3507
  "Either startDate must be provided or overdueOption must be set to overdue-only"
3504
3508
  );
3505
- const r = await Be(t, e.responsibleUser), o = r?.userId, n = r?.email;
3509
+ const r = await Ye(t, e.responsibleUser), o = r?.userId, n = r?.email;
3506
3510
  let a = "";
3507
3511
  if (e.overdueOption === "overdue-only")
3508
3512
  a = "overdue";
3509
3513
  else if (e.startDate === "today")
3510
3514
  if (e.daysCount > 1) {
3511
- const p = /* @__PURE__ */ new Date(), m = re(p), h = Ue(p, e.daysCount), b = et(h, { representation: "date" }), I = `(due after: ${m} | due: ${m}) & due before: ${b}`;
3515
+ const p = /* @__PURE__ */ new Date(), m = re(p), h = Pe(p, e.daysCount), b = tt(h, { representation: "date" }), I = `(due after: ${m} | due: ${m}) & due before: ${b}`;
3512
3516
  a = e.overdueOption === "exclude-overdue" ? I : `(${I} | overdue)`;
3513
3517
  } else
3514
3518
  a = e.overdueOption === "exclude-overdue" ? "today" : "(today | overdue)";
3515
3519
  else if (e.startDate) {
3516
- const p = e.startDate, m = Ue(Bt(p), e.daysCount), h = et(m, { representation: "date" });
3520
+ const p = e.startDate, m = Pe(Yt(p), e.daysCount), h = tt(m, { representation: "date" });
3517
3521
  a = `(due after: ${p} | due: ${p}) & due before: ${h}`;
3518
3522
  }
3519
- const i = Qe(e.labels, e.labelsOperator);
3523
+ const i = et(e.labels, e.labelsOperator);
3520
3524
  i.length > 0 && (a = oe(a, `(${i})`));
3521
- const c = Dt({
3525
+ const c = xt({
3522
3526
  resolvedAssigneeId: o,
3523
3527
  assigneeEmail: n,
3524
3528
  responsibleUserFiltering: e.responsibleUserFiltering
3525
3529
  });
3526
3530
  a = oe(a, c);
3527
- const { tasks: d, nextCursor: l } = await ze({
3531
+ const { tasks: d, nextCursor: l } = await Ge({
3528
3532
  client: t,
3529
3533
  query: a,
3530
3534
  cursor: e.cursor,
3531
3535
  limit: e.limit
3532
3536
  });
3533
3537
  return {
3534
- textContent: Un({ tasks: d, args: e, nextCursor: l, assigneeEmail: n }),
3538
+ textContent: Pn({ tasks: d, args: e, nextCursor: l, assigneeEmail: n }),
3535
3539
  structuredContent: {
3536
3540
  tasks: d,
3537
3541
  nextCursor: l ?? void 0,
@@ -3542,7 +3546,7 @@ const An = {
3542
3546
  };
3543
3547
  }
3544
3548
  };
3545
- function Un({
3549
+ function Pn({
3546
3550
  tasks: e,
3547
3551
  args: t,
3548
3552
  nextCursor: r,
@@ -3557,7 +3561,7 @@ function Un({
3557
3561
  `today${c}${t.daysCount > 1 ? ` + ${t.daysCount - 1} more days` : ""}`
3558
3562
  );
3559
3563
  } else if (t.startDate) {
3560
- const c = t.daysCount > 1 ? ` to ${re(Ue(Bt(t.startDate), t.daysCount))}` : "";
3564
+ const c = t.daysCount > 1 ? ` to ${re(Pe(Yt(t.startDate), t.daysCount))}` : "";
3561
3565
  n.push(`${t.startDate}${c}`);
3562
3566
  }
3563
3567
  if (t.labels && t.labels.length > 0) {
@@ -3588,17 +3592,17 @@ function Un({
3588
3592
  limit: t.limit,
3589
3593
  nextCursor: r ?? void 0,
3590
3594
  filterHints: n,
3591
- previewLines: Ie(e, Math.min(e.length, t.limit)),
3595
+ previewLines: ve(e, Math.min(e.length, t.limit)),
3592
3596
  zeroReasonHints: i
3593
3597
  });
3594
3598
  }
3595
- const Pn = 300 * 1e3;
3596
- class Rn {
3599
+ const Rn = 300 * 1e3;
3600
+ class _n {
3597
3601
  constructor() {
3598
3602
  this.cache = null;
3599
3603
  }
3600
3604
  async getFilters(t) {
3601
- if (this.cache && Date.now() - this.cache.timestamp < Pn)
3605
+ if (this.cache && Date.now() - this.cache.timestamp < Rn)
3602
3606
  return this.cache.filters;
3603
3607
  const o = ((await t.sync({
3604
3608
  resourceTypes: ["filters"],
@@ -3655,7 +3659,7 @@ ${u}` + (d.length > 5 ? `
3655
3659
  this.cache = null;
3656
3660
  }
3657
3661
  }
3658
- const _n = new Rn(), { FIND_COMPLETED_TASKS: lt, ADD_TASKS: ut } = f, Nn = {
3662
+ const Nn = new _n(), { FIND_COMPLETED_TASKS: ut, ADD_TASKS: pt } = f, Ln = {
3659
3663
  searchText: s.string().optional().describe("The text to search for in tasks."),
3660
3664
  projectId: s.string().optional().describe(
3661
3665
  'Find tasks in this project. Project ID should be an ID string, or the text "inbox", for inbox tasks.'
@@ -3663,7 +3667,7 @@ const _n = new Rn(), { FIND_COMPLETED_TASKS: lt, ADD_TASKS: ut } = f, Nn = {
3663
3667
  sectionId: s.string().optional().describe("Find tasks in this section."),
3664
3668
  parentId: s.string().optional().describe("Find subtasks of this parent task."),
3665
3669
  responsibleUser: s.string().optional().describe("Find tasks assigned to this user. Can be a user ID, name, or email address."),
3666
- responsibleUserFiltering: s.enum($t).optional().describe(
3670
+ responsibleUserFiltering: s.enum(Dt).optional().describe(
3667
3671
  '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`.'
3668
3672
  ),
3669
3673
  limit: s.number().int().min(1).max(C.TASKS_MAX).default(C.TASKS_DEFAULT).describe("The maximum number of tasks to return."),
@@ -3676,18 +3680,18 @@ const _n = new Rn(), { FIND_COMPLETED_TASKS: lt, ADD_TASKS: ut } = f, Nn = {
3676
3680
  filterIdOrName: s.string().optional().describe(
3677
3681
  "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."
3678
3682
  ),
3679
- ...Ze
3680
- }, Ln = {
3683
+ ...Qe
3684
+ }, Mn = {
3681
3685
  tasks: s.array(J).describe("The found tasks."),
3682
3686
  nextCursor: s.string().optional().describe("Cursor for the next page of results."),
3683
3687
  totalCount: s.number().describe("The total number of tasks in this page."),
3684
3688
  hasMore: s.boolean().describe("Whether there are more results available."),
3685
3689
  appliedFilters: s.record(s.string(), s.unknown()).describe("The filters that were applied to the search.")
3686
- }, Mn = {
3690
+ }, Fn = {
3687
3691
  name: f.FIND_TASKS,
3688
3692
  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.",
3689
- parameters: Nn,
3690
- outputSchema: Ln,
3693
+ parameters: Ln,
3694
+ outputSchema: Mn,
3691
3695
  annotations: { readOnlyHint: !0, destructiveHint: !1, idempotentHint: !0 },
3692
3696
  async execute(e, t) {
3693
3697
  const {
@@ -3717,29 +3721,29 @@ const _n = new Rn(), { FIND_COMPLETED_TASKS: lt, ADD_TASKS: ut } = f, Nn = {
3717
3721
  'The `filter`/`filterIdOrName` parameter cannot be combined with projectId, sectionId, or parentId. Use filter syntax instead (e.g. "##ProjectName").'
3718
3722
  );
3719
3723
  let $ = m;
3720
- h && ($ = (await _n.resolveFilter(t, h)).filterQuery);
3721
- const D = await Be(t, i), N = D?.userId, T = D?.email;
3724
+ h && ($ = (await Nn.resolveFilter(t, h)).filterQuery);
3725
+ const D = await Ye(t, i), N = D?.userId, T = D?.email;
3722
3726
  if (o || n || a) {
3723
3727
  const x = {
3724
3728
  limit: d,
3725
3729
  cursor: l ?? null
3726
3730
  };
3727
3731
  o && (x.projectId = await K({ projectId: o, user: b })), n && (x.sectionId = n), a && (x.parentId = a);
3728
- const { results: L, nextCursor: B } = await t.getTasks(x), ve = L.map(P);
3729
- let M = r ? ve.filter(
3732
+ const { results: L, nextCursor: B } = await t.getTasks(x), je = L.map(P);
3733
+ let M = r ? je.filter(
3730
3734
  (X) => X.content.toLowerCase().includes(r.toLowerCase()) || X.description?.toLowerCase().includes(r.toLowerCase())
3731
- ) : ve;
3732
- return M = fr({
3735
+ ) : je;
3736
+ return M = br({
3733
3737
  tasks: M,
3734
3738
  resolvedAssigneeId: N,
3735
3739
  currentUserId: b.id,
3736
3740
  responsibleUserFiltering: c
3737
3741
  }), u && u.length > 0 && (M = p === "and" ? M.filter(
3738
- (X) => u.every((je) => X.labels.includes(je))
3742
+ (X) => u.every((Se) => X.labels.includes(Se))
3739
3743
  ) : M.filter(
3740
- (X) => u.some((je) => X.labels.includes(je))
3744
+ (X) => u.some((Se) => X.labels.includes(Se))
3741
3745
  )), {
3742
- textContent: De({
3746
+ textContent: xe({
3743
3747
  tasks: M,
3744
3748
  args: e,
3745
3749
  nextCursor: B,
@@ -3763,7 +3767,7 @@ const _n = new Rn(), { FIND_COMPLETED_TASKS: lt, ADD_TASKS: ut } = f, Nn = {
3763
3767
  cursor: l ?? null
3764
3768
  }), B = x.map(P);
3765
3769
  return {
3766
- textContent: De({
3770
+ textContent: xe({
3767
3771
  tasks: B,
3768
3772
  args: e,
3769
3773
  nextCursor: L,
@@ -3781,23 +3785,23 @@ const _n = new Rn(), { FIND_COMPLETED_TASKS: lt, ADD_TASKS: ut } = f, Nn = {
3781
3785
  }
3782
3786
  let g = $ ? `(${$})` : "";
3783
3787
  r && (g = oe(g, `search: ${r}`));
3784
- const S = Qe(u, p);
3788
+ const S = et(u, p);
3785
3789
  if (g = oe(g, S), !(h && !i && !c)) {
3786
- const x = Dt({
3790
+ const x = xt({
3787
3791
  resolvedAssigneeId: N,
3788
3792
  assigneeEmail: T,
3789
3793
  responsibleUserFiltering: c
3790
3794
  });
3791
3795
  g = oe(g, x);
3792
3796
  }
3793
- const { tasks: w, nextCursor: j } = await ze({
3797
+ const { tasks: w, nextCursor: j } = await Ge({
3794
3798
  client: t,
3795
3799
  query: g,
3796
3800
  cursor: e.cursor,
3797
3801
  limit: e.limit
3798
3802
  });
3799
3803
  return {
3800
- textContent: De({
3804
+ textContent: xe({
3801
3805
  tasks: w,
3802
3806
  args: e,
3803
3807
  nextCursor: j,
@@ -3814,12 +3818,12 @@ const _n = new Rn(), { FIND_COMPLETED_TASKS: lt, ADD_TASKS: ut } = f, Nn = {
3814
3818
  };
3815
3819
  }
3816
3820
  };
3817
- function Fn(e) {
3821
+ function Hn(e) {
3818
3822
  if (e.projectId) {
3819
3823
  const t = [
3820
3824
  e.searchText ? "No tasks in project match search" : "Project has no tasks yet"
3821
3825
  ];
3822
- return e.searchText || t.push(`Use ${ut} to create tasks`), t;
3826
+ return e.searchText || t.push(`Use ${pt} to create tasks`), t;
3823
3827
  }
3824
3828
  if (e.sectionId) {
3825
3829
  const t = [e.searchText ? "No tasks in section match search" : "Section is empty"];
@@ -3827,11 +3831,11 @@ function Fn(e) {
3827
3831
  }
3828
3832
  if (e.parentId) {
3829
3833
  const t = [e.searchText ? "No subtasks match search" : "No subtasks created yet"];
3830
- return e.searchText || t.push(`Use ${ut} with parentId to add subtasks`), t;
3834
+ return e.searchText || t.push(`Use ${pt} with parentId to add subtasks`), t;
3831
3835
  }
3832
3836
  return [];
3833
3837
  }
3834
- function De({
3838
+ function xe({
3835
3839
  tasks: e,
3836
3840
  args: t,
3837
3841
  nextCursor: r,
@@ -3849,7 +3853,7 @@ function De({
3849
3853
  const d = t.labels.map((l) => `@${l}`).join(t.labelsOperator === "and" ? " & " : " | ");
3850
3854
  i.push(`labels: ${d}`);
3851
3855
  }
3852
- e.length === 0 && c.push(...Fn(t));
3856
+ e.length === 0 && c.push(...Hn(t));
3853
3857
  } else {
3854
3858
  const d = n || t.responsibleUser, l = [];
3855
3859
  if (t.filter && l.push(`filter: ${t.filter}`), t.searchText && l.push(`"${t.searchText}"`), t.responsibleUser && l.push(`assigned to ${d}`), t.labels && t.labels.length > 0) {
@@ -3863,9 +3867,9 @@ function De({
3863
3867
  if (e.length === 0) {
3864
3868
  if (t.responsibleUser) {
3865
3869
  const u = n || t.responsibleUser;
3866
- c.push(`No tasks assigned to ${u}`), c.push("Check if the user name is correct"), c.push(`Check completed tasks with ${lt}`);
3870
+ c.push(`No tasks assigned to ${u}`), c.push("Check if the user name is correct"), c.push(`Check completed tasks with ${ut}`);
3867
3871
  }
3868
- t.searchText && (c.push("Try broader search terms"), c.push("Verify spelling and try partial words"), t.responsibleUser || c.push(`Check completed tasks with ${lt}`));
3872
+ t.searchText && (c.push("Try broader search terms"), c.push("Verify spelling and try partial words"), t.responsibleUser || c.push(`Check completed tasks with ${ut}`));
3869
3873
  }
3870
3874
  }
3871
3875
  return W({
@@ -3874,15 +3878,15 @@ function De({
3874
3878
  limit: t.limit,
3875
3879
  nextCursor: r ?? void 0,
3876
3880
  filterHints: i,
3877
- previewLines: Ie(e, Math.min(e.length, t.limit)),
3881
+ previewLines: ve(e, Math.min(e.length, t.limit)),
3878
3882
  zeroReasonHints: c
3879
3883
  });
3880
3884
  }
3881
- const Hn = {
3885
+ const Wn = {
3882
3886
  projectId: s.string().min(1).optional().describe(
3883
3887
  "Optional project ID. If provided, shows detailed overview of that project. If omitted, shows overview of all projects."
3884
3888
  )
3885
- }, Yt = s.lazy(
3889
+ }, zt = s.lazy(
3886
3890
  () => s.object({
3887
3891
  id: s.string().describe("The project ID."),
3888
3892
  name: s.string().describe("The project name."),
@@ -3895,9 +3899,9 @@ const Hn = {
3895
3899
  name: s.string()
3896
3900
  })
3897
3901
  ),
3898
- children: s.array(Yt).describe("Nested child projects.")
3902
+ children: s.array(zt).describe("Nested child projects.")
3899
3903
  })
3900
- ), Wn = {
3904
+ ), Bn = {
3901
3905
  type: s.enum(["account_overview", "project_overview"]).describe("The type of overview returned."),
3902
3906
  totalProjects: s.number().optional().describe("Total number of projects (account overview only)."),
3903
3907
  totalTasks: s.number().optional().describe("Total number of tasks."),
@@ -3914,26 +3918,16 @@ const Hn = {
3914
3918
  inbox: s.object({
3915
3919
  id: s.string().describe("The inbox project ID."),
3916
3920
  name: s.string().describe("The inbox project name."),
3917
- sections: s.array(
3918
- s.object({
3919
- id: s.string(),
3920
- name: s.string()
3921
- })
3922
- ).describe("Sections in the inbox project.")
3921
+ sections: s.array(ae).describe("Sections in the inbox project.")
3923
3922
  }).nullable().optional().describe("Inbox information (account overview only)."),
3924
- projects: s.array(s.lazy(() => Yt)).optional().describe(
3923
+ projects: s.array(s.lazy(() => zt)).optional().describe(
3925
3924
  "List of projects with hierarchy, folders, and ordering (account overview only)."
3926
3925
  ),
3927
3926
  project: s.object({
3928
3927
  id: s.string().describe("The project ID."),
3929
3928
  name: s.string().describe("The project name.")
3930
3929
  }).optional().describe("Project details (project overview only)."),
3931
- sections: s.array(
3932
- s.object({
3933
- id: s.string(),
3934
- name: s.string()
3935
- })
3936
- ).optional().describe("List of sections (project overview only)."),
3930
+ sections: s.array(ae).optional().describe("List of sections (project overview only)."),
3937
3931
  tasks: s.array(s.any()).optional().describe("List of tasks (project overview only)."),
3938
3932
  stats: s.object({
3939
3933
  totalTasks: s.number(),
@@ -3941,7 +3935,7 @@ const Hn = {
3941
3935
  tasksWithoutSection: s.number()
3942
3936
  }).optional().describe("Statistics object (project overview only).")
3943
3937
  };
3944
- function Bn(e) {
3938
+ function Yn(e) {
3945
3939
  const t = {};
3946
3940
  for (const n of e)
3947
3941
  t[n.id] = {
@@ -3966,7 +3960,7 @@ function Bn(e) {
3966
3960
  }
3967
3961
  return o(r), r;
3968
3962
  }
3969
- async function Yn(e, t) {
3963
+ async function zn(e, t) {
3970
3964
  const r = {};
3971
3965
  return await Promise.all(
3972
3966
  t.map(async (o) => {
@@ -3975,17 +3969,17 @@ async function Yn(e, t) {
3975
3969
  })
3976
3970
  ), r;
3977
3971
  }
3978
- function zt(e, t, r = "") {
3972
+ function Gt(e, t, r = "") {
3979
3973
  const o = [];
3980
3974
  o.push(`${r}- Project: ${e.name} (id=${e.id})`);
3981
3975
  const n = t[e.id] || [];
3982
3976
  for (const a of n)
3983
3977
  o.push(`${r} - Section: ${a.name} (id=${a.id})`);
3984
3978
  for (const a of e.children)
3985
- o.push(...zt(a, t, `${r} `));
3979
+ o.push(...Gt(a, t, `${r} `));
3986
3980
  return o;
3987
3981
  }
3988
- function pt(e) {
3982
+ function mt(e) {
3989
3983
  const t = {};
3990
3984
  for (const o of e)
3991
3985
  t[o.id] = { ...o, children: [] };
@@ -4002,28 +3996,28 @@ function pt(e) {
4002
3996
  }
4003
3997
  return r;
4004
3998
  }
4005
- function Le(e, t = "") {
3999
+ function Me(e, t = "") {
4006
4000
  const r = [];
4007
4001
  for (const o of e) {
4008
4002
  const n = `id=${o.id}`, a = o.dueDate ? `; due=${o.dueDate}` : "", i = `; content=${o.content}`;
4009
- r.push(`${t}- ${n}${a}${i}`), o.children.length > 0 && r.push(...Le(o.children, `${t} `));
4003
+ r.push(`${t}- ${n}${a}${i}`), o.children.length > 0 && r.push(...Me(o.children, `${t} `));
4010
4004
  }
4011
4005
  return r;
4012
4006
  }
4013
- function Gt(e, t) {
4007
+ function qt(e, t) {
4014
4008
  return {
4015
4009
  id: e.id,
4016
4010
  name: e.name,
4017
4011
  parentId: ne(e) ? e.parentId ?? void 0 : void 0,
4018
- folderId: he(e) ? e.folderId ?? void 0 : void 0,
4012
+ folderId: be(e) ? e.folderId ?? void 0 : void 0,
4019
4013
  childOrder: e.childOrder,
4020
- sections: t[e.id] || [],
4014
+ sections: (t[e.id] || []).map(he),
4021
4015
  children: e.children.map(
4022
- (r) => Gt(r, t)
4016
+ (r) => qt(r, t)
4023
4017
  )
4024
4018
  };
4025
4019
  }
4026
- async function zn(e, t) {
4020
+ async function Gn(e, t) {
4027
4021
  let r = [], o;
4028
4022
  do {
4029
4023
  const { results: n, nextCursor: a } = await e.getTasks({
@@ -4035,12 +4029,12 @@ async function zn(e, t) {
4035
4029
  } while (o);
4036
4030
  return r;
4037
4031
  }
4038
- async function Gn(e, t) {
4032
+ async function qn(e, t) {
4039
4033
  const { results: r } = await e.getSections({ projectId: t });
4040
4034
  return r;
4041
4035
  }
4042
- async function qn(e) {
4043
- const { results: t } = await e.getProjects({}), r = t.find((p) => ne(p) && p.inboxProject === !0), o = t.filter((p) => !ne(p) || p.inboxProject !== !0), n = Bn(o), a = t.map((p) => p.id), i = await Yn(e, a), c = ["# Personal Projects", ""];
4036
+ async function Kn(e) {
4037
+ const { results: t } = await e.getProjects({}), r = t.find((p) => ne(p) && p.inboxProject === !0), o = t.filter((p) => !ne(p) || p.inboxProject !== !0), n = Yn(o), a = t.map((p) => p.id), i = await zn(e, a), c = ["# Personal Projects", ""];
4044
4038
  if (r) {
4045
4039
  c.push(`- Inbox Project: ${r.name} (id=${r.id})`);
4046
4040
  for (const p of i[r.id] || [])
@@ -4048,7 +4042,7 @@ async function qn(e) {
4048
4042
  }
4049
4043
  if (n.length)
4050
4044
  for (const p of n)
4051
- c.push(...zt(p, i));
4045
+ c.push(...Gt(p, i));
4052
4046
  else
4053
4047
  c.push("_No projects found._");
4054
4048
  c.push("");
@@ -4063,10 +4057,10 @@ async function qn(e) {
4063
4057
  inbox: r ? {
4064
4058
  id: r.id,
4065
4059
  name: r.name,
4066
- sections: i[r.id] || []
4060
+ sections: (i[r.id] || []).map(he)
4067
4061
  } : null,
4068
4062
  projects: n.map(
4069
- (p) => Gt(p, i)
4063
+ (p) => qt(p, i)
4070
4064
  ),
4071
4065
  totalProjects: t.length,
4072
4066
  totalSections: a.reduce(
@@ -4077,11 +4071,11 @@ async function qn(e) {
4077
4071
  };
4078
4072
  return { textContent: l, structuredContent: u };
4079
4073
  }
4080
- async function Kn(e, t) {
4074
+ async function Vn(e, t) {
4081
4075
  const [r, o, n] = await Promise.all([
4082
4076
  e.getProject(t),
4083
- Gn(e, t),
4084
- zn(e, t)
4077
+ qn(e, t),
4078
+ Gn(e, t)
4085
4079
  ]), a = {};
4086
4080
  for (const u of o)
4087
4081
  a[u.id] = [];
@@ -4091,16 +4085,16 @@ async function Kn(e, t) {
4091
4085
  const c = [`# ${r.name}`];
4092
4086
  if (i.length > 0) {
4093
4087
  c.push("");
4094
- const u = pt(i);
4095
- c.push(...Le(u));
4088
+ const u = mt(i);
4089
+ c.push(...Me(u));
4096
4090
  }
4097
4091
  for (const u of o) {
4098
4092
  c.push(""), c.push(`## ${u.name}`);
4099
4093
  const p = a[u.id];
4100
4094
  if (!p?.length)
4101
4095
  continue;
4102
- const m = pt(p);
4103
- c.push(...Le(m));
4096
+ const m = mt(p);
4097
+ c.push(...Me(m));
4104
4098
  }
4105
4099
  const d = c.join(`
4106
4100
  `), l = {
@@ -4109,7 +4103,7 @@ async function Kn(e, t) {
4109
4103
  id: r.id,
4110
4104
  name: r.name
4111
4105
  },
4112
- sections: o,
4106
+ sections: o.map(he),
4113
4107
  tasks: n.map((u) => ({
4114
4108
  ...u,
4115
4109
  children: []
@@ -4123,33 +4117,33 @@ async function Kn(e, t) {
4123
4117
  };
4124
4118
  return { textContent: d, structuredContent: l };
4125
4119
  }
4126
- const Vn = {
4120
+ const Jn = {
4127
4121
  name: f.GET_OVERVIEW,
4128
4122
  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.",
4129
- parameters: Hn,
4130
- outputSchema: Wn,
4123
+ parameters: Wn,
4124
+ outputSchema: Bn,
4131
4125
  annotations: { readOnlyHint: !0, destructiveHint: !1, idempotentHint: !0 },
4132
4126
  async execute(e, t) {
4133
- const r = e.projectId ? await Kn(t, e.projectId) : await qn(t);
4127
+ const r = e.projectId ? await Vn(t, e.projectId) : await Kn(t);
4134
4128
  return {
4135
4129
  textContent: r.textContent,
4136
4130
  structuredContent: r.structuredContent
4137
4131
  };
4138
4132
  }
4139
- }, Jn = {}, se = s.object({
4133
+ }, Xn = {}, se = s.object({
4140
4134
  count: s.number().describe("Number of consecutive periods in this streak."),
4141
4135
  start: s.string().describe("Start date of the streak."),
4142
4136
  end: s.string().describe("End date of the streak.")
4143
- }), mt = s.object({
4137
+ }), ht = s.object({
4144
4138
  id: s.string().describe("Project ID."),
4145
4139
  completed: s.number().describe("Number of tasks completed in this project.")
4146
- }), Xn = {
4140
+ }), Zn = {
4147
4141
  completedCount: s.number().describe("Total number of completed tasks (all-time)."),
4148
4142
  daysItems: s.array(
4149
4143
  s.object({
4150
4144
  date: s.string().describe("Date string (YYYY-MM-DD)."),
4151
4145
  totalCompleted: s.number().describe("Total tasks completed on this day."),
4152
- items: s.array(mt).describe("Per-project completion breakdown for this day.")
4146
+ items: s.array(ht).describe("Per-project completion breakdown for this day.")
4153
4147
  })
4154
4148
  ).describe("Daily completion breakdown (most recent days)."),
4155
4149
  weekItems: s.array(
@@ -4157,7 +4151,7 @@ const Vn = {
4157
4151
  from: s.string().describe("Start date of the week."),
4158
4152
  to: s.string().describe("End date of the week."),
4159
4153
  totalCompleted: s.number().describe("Total tasks completed in this week."),
4160
- items: s.array(mt).describe("Per-project completion breakdown for this week.")
4154
+ items: s.array(ht).describe("Per-project completion breakdown for this week.")
4161
4155
  })
4162
4156
  ).describe("Weekly completion breakdown (most recent weeks)."),
4163
4157
  goals: s.object({
@@ -4192,11 +4186,11 @@ const Vn = {
4192
4186
  })
4193
4187
  ).describe("Recent karma change events with reasons."),
4194
4188
  projectColors: s.record(s.string(), s.string()).describe("Map of project ID to color key.")
4195
- }, Zn = {
4189
+ }, Qn = {
4196
4190
  name: f.GET_PRODUCTIVITY_STATS,
4197
4191
  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.",
4198
- parameters: Jn,
4199
- outputSchema: Xn,
4192
+ parameters: Xn,
4193
+ outputSchema: Zn,
4200
4194
  annotations: {
4201
4195
  readOnlyHint: !0,
4202
4196
  destructiveHint: !1,
@@ -4205,7 +4199,7 @@ const Vn = {
4205
4199
  async execute(e, t) {
4206
4200
  const r = await t.getProductivityStats();
4207
4201
  return {
4208
- textContent: Qn(r),
4202
+ textContent: ea(r),
4209
4203
  structuredContent: {
4210
4204
  completedCount: r.completedCount,
4211
4205
  daysItems: r.daysItems,
@@ -4232,7 +4226,7 @@ const Vn = {
4232
4226
  };
4233
4227
  }
4234
4228
  };
4235
- function Qn(e) {
4229
+ function ea(e) {
4236
4230
  const t = [
4237
4231
  "# Productivity Statistics",
4238
4232
  "",
@@ -4262,11 +4256,11 @@ function Qn(e) {
4262
4256
  return t.join(`
4263
4257
  `);
4264
4258
  }
4265
- const ea = {
4259
+ const ta = {
4266
4260
  projectId: s.string().min(1).describe("The ID of the project to get activity stats for."),
4267
4261
  weeks: s.number().int().min(1).max(12).optional().describe("Number of weeks of activity data to retrieve (1-12, default 2)."),
4268
4262
  includeWeeklyCounts: s.boolean().optional().describe("Include weekly rollup counts alongside daily counts.")
4269
- }, ta = {
4263
+ }, sa = {
4270
4264
  projectId: s.string().describe("The project ID."),
4271
4265
  dayItems: s.array(
4272
4266
  s.object({
@@ -4282,7 +4276,7 @@ const ea = {
4282
4276
  })
4283
4277
  ).nullable().describe("Weekly completion rollups. Only included when includeWeeklyCounts is true.")
4284
4278
  };
4285
- function sa(e, t) {
4279
+ function ra(e, t) {
4286
4280
  const r = [`# Activity Stats: Project ${e}`, ""];
4287
4281
  if (t.dayItems.length > 0) {
4288
4282
  r.push("## Daily Activity");
@@ -4298,11 +4292,11 @@ function sa(e, t) {
4298
4292
  return r.join(`
4299
4293
  `);
4300
4294
  }
4301
- const ra = {
4295
+ const oa = {
4302
4296
  name: f.GET_PROJECT_ACTIVITY_STATS,
4303
4297
  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.",
4304
- parameters: ea,
4305
- outputSchema: ta,
4298
+ parameters: ta,
4299
+ outputSchema: sa,
4306
4300
  annotations: {
4307
4301
  readOnlyHint: !0,
4308
4302
  destructiveHint: !1,
@@ -4314,7 +4308,7 @@ const ra = {
4314
4308
  includeWeeklyCounts: n
4315
4309
  });
4316
4310
  return {
4317
- textContent: sa(r, a),
4311
+ textContent: ra(r, a),
4318
4312
  structuredContent: {
4319
4313
  projectId: r,
4320
4314
  dayItems: a.dayItems,
@@ -4322,15 +4316,15 @@ const ra = {
4322
4316
  }
4323
4317
  };
4324
4318
  }
4325
- }, oa = {
4319
+ }, na = {
4326
4320
  projectId: s.string().min(1).describe("The ID of the project to check health for."),
4327
4321
  includeContext: s.boolean().default(!1).describe(
4328
4322
  "Include detailed health context with project metrics and task-level data. May produce large output for projects with many tasks."
4329
4323
  )
4330
- }, na = s.object({
4324
+ }, aa = s.object({
4331
4325
  taskId: s.string().describe("The ID of the task this recommendation is for."),
4332
4326
  recommendation: s.string().describe("The recommendation for this task.")
4333
- }), aa = s.object({
4327
+ }), ia = s.object({
4334
4328
  id: s.string().describe("The task ID."),
4335
4329
  content: s.string().describe("The task content/title."),
4336
4330
  priority: s.string().describe("The task priority (1-4)."),
@@ -4338,7 +4332,7 @@ const ra = {
4338
4332
  deadline: s.string().nullable().optional().describe("The deadline date string, if set."),
4339
4333
  isCompleted: s.boolean().describe("Whether the task is completed."),
4340
4334
  labels: s.array(s.string()).describe("Labels applied to this task.")
4341
- }), ia = {
4335
+ }), ca = {
4342
4336
  projectId: s.string().describe("The project ID."),
4343
4337
  projectName: s.string().describe("The project name."),
4344
4338
  progress: s.object({
@@ -4347,10 +4341,10 @@ const ra = {
4347
4341
  progressPercent: s.number().describe("Completion percentage (0-100).")
4348
4342
  }).describe("Project completion progress."),
4349
4343
  health: s.object({
4350
- status: s.enum(Me).describe("The overall health status of the project."),
4344
+ status: s.enum(Fe).describe("The overall health status of the project."),
4351
4345
  description: s.string().nullable().optional().describe("Detailed description of the health assessment."),
4352
4346
  descriptionSummary: s.string().nullable().optional().describe("Brief summary of the health assessment."),
4353
- taskRecommendations: s.array(na).nullable().optional().describe("Specific recommendations for individual tasks."),
4347
+ taskRecommendations: s.array(aa).nullable().optional().describe("Specific recommendations for individual tasks."),
4354
4348
  isStale: s.boolean().describe("Whether the health data is stale and may need refreshing."),
4355
4349
  updateInProgress: s.boolean().describe("Whether a health analysis update is currently in progress."),
4356
4350
  updatedAt: s.string().nullable().optional().describe("When the health assessment was last updated.")
@@ -4365,12 +4359,12 @@ const ra = {
4365
4359
  tasksCompletedThisWeek: s.number().describe("Tasks completed in the current week."),
4366
4360
  averageCompletionTime: s.number().nullable().describe("Average task completion time in days, if available.")
4367
4361
  }).describe("Aggregated project metrics."),
4368
- tasks: s.array(aa).describe("Tasks in the project.")
4362
+ tasks: s.array(ia).describe("Tasks in the project.")
4369
4363
  }).optional().describe(
4370
4364
  "Detailed project context with metrics and task data. Only included when includeContext is true."
4371
4365
  )
4372
4366
  };
4373
- async function ca(e, t, r) {
4367
+ async function da(e, t, r) {
4374
4368
  if (r) {
4375
4369
  const [a, i, c] = await Promise.all([
4376
4370
  e.getProjectProgress(t),
@@ -4385,7 +4379,7 @@ async function ca(e, t, r) {
4385
4379
  ]);
4386
4380
  return { progress: o, health: n };
4387
4381
  }
4388
- function da(e, { progress: t, health: r, context: o }) {
4382
+ function la(e, { progress: t, health: r, context: o }) {
4389
4383
  const n = [`# Project Health: ${e}`, ""];
4390
4384
  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(
4391
4385
  `**Completed:** ${t.completedCount} | **Active:** ${t.activeCount} | **Progress:** ${t.progressPercent}%`
@@ -4408,18 +4402,18 @@ function da(e, { progress: t, health: r, context: o }) {
4408
4402
  return n.join(`
4409
4403
  `);
4410
4404
  }
4411
- const la = {
4405
+ const ua = {
4412
4406
  name: f.GET_PROJECT_HEALTH,
4413
4407
  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 recommendations. Use includeContext=true for full detail including task data.",
4414
- parameters: oa,
4415
- outputSchema: ia,
4408
+ parameters: na,
4409
+ outputSchema: ca,
4416
4410
  annotations: {
4417
4411
  readOnlyHint: !0,
4418
4412
  destructiveHint: !1,
4419
4413
  idempotentHint: !0
4420
4414
  },
4421
4415
  async execute(e, t) {
4422
- const { projectId: r, includeContext: o } = e, n = await ca(t, r, o), a = n.context?.projectName ?? `Project ${r}`, i = da(a, n), c = n.context ? {
4416
+ const { projectId: r, includeContext: o } = e, n = await da(t, r, o), a = n.context?.projectName ?? `Project ${r}`, i = la(a, n), c = n.context ? {
4423
4417
  projectDescription: n.context.projectDescription,
4424
4418
  projectMetrics: n.context.projectMetrics,
4425
4419
  tasks: n.context.tasks.map((d) => ({
@@ -4455,15 +4449,15 @@ const la = {
4455
4449
  }
4456
4450
  };
4457
4451
  }
4458
- }, ua = {
4452
+ }, pa = {
4459
4453
  workspaceIdOrName: s.string().min(1).describe(
4460
4454
  "The workspace ID or name. Supports exact ID, exact name match (case-insensitive), or unique partial name match."
4461
4455
  ),
4462
4456
  projectIds: s.array(s.string().min(1)).min(1).optional().describe("Optional list of project IDs to scope insights to specific projects.")
4463
- }, pa = s.object({
4457
+ }, ma = s.object({
4464
4458
  projectId: s.string().describe("The project ID."),
4465
4459
  health: s.object({
4466
- status: s.enum(Me).describe("The health status of the project."),
4460
+ status: s.enum(Fe).describe("The health status of the project."),
4467
4461
  isStale: s.boolean().describe("Whether the health data is stale."),
4468
4462
  updateInProgress: s.boolean().describe("Whether a health analysis update is in progress.")
4469
4463
  }).nullable().describe("Health data for this project, if available."),
@@ -4472,23 +4466,23 @@ const la = {
4472
4466
  activeCount: s.number().describe("Number of active tasks."),
4473
4467
  progressPercent: s.number().describe("Completion percentage (0-100).")
4474
4468
  }).nullable().describe("Progress data for this project, if available.")
4475
- }), ma = {
4469
+ }), ha = {
4476
4470
  workspaceId: s.string().describe("The resolved workspace ID."),
4477
4471
  workspaceName: s.string().describe("The resolved workspace name."),
4478
4472
  folderId: s.string().nullable().describe("The folder ID, if applicable."),
4479
- projectInsights: s.array(pa).describe("Health and progress insights for each project in the workspace.")
4480
- }, ha = {
4473
+ projectInsights: s.array(ma).describe("Health and progress insights for each project in the workspace.")
4474
+ }, fa = {
4481
4475
  name: f.GET_WORKSPACE_INSIGHTS,
4482
4476
  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.",
4483
- parameters: ua,
4484
- outputSchema: ma,
4477
+ parameters: pa,
4478
+ outputSchema: ha,
4485
4479
  annotations: {
4486
4480
  readOnlyHint: !0,
4487
4481
  destructiveHint: !1,
4488
4482
  idempotentHint: !0
4489
4483
  },
4490
4484
  async execute(e, t) {
4491
- const { workspaceIdOrName: r, projectIds: o } = e, n = await Et.resolveWorkspace(t, r), a = await t.getWorkspaceInsights(n.workspaceId, { projectIds: o }), i = a.projectInsights.map((d) => ({
4485
+ const { workspaceIdOrName: r, projectIds: o } = e, n = await Ot.resolveWorkspace(t, r), a = await t.getWorkspaceInsights(n.workspaceId, { projectIds: o }), i = a.projectInsights.map((d) => ({
4492
4486
  projectId: d.projectId,
4493
4487
  health: d.health ? {
4494
4488
  status: d.health.status,
@@ -4521,21 +4515,21 @@ const la = {
4521
4515
  }
4522
4516
  };
4523
4517
  }
4524
- }, fa = {}, ba = {
4518
+ }, ba = {}, ga = {
4525
4519
  id: s.string().describe("The unique identifier for the workspace."),
4526
4520
  name: s.string().describe("The name of the workspace."),
4527
- plan: s.enum(ds).describe("The workspace plan type."),
4528
- role: s.enum(cs).optional().describe("The user's role in the workspace, if available."),
4521
+ plan: s.enum(ls).describe("The workspace plan type."),
4522
+ role: s.enum(ds).optional().describe("The user's role in the workspace, if available."),
4529
4523
  isLinkSharingEnabled: s.boolean().describe("Whether link sharing is enabled for the workspace."),
4530
4524
  isGuestAllowed: s.boolean().describe("Whether guests are allowed in the workspace."),
4531
4525
  createdAt: s.string().optional().describe("The ISO 8601 timestamp when the workspace was created."),
4532
4526
  creatorId: s.string().describe("The ID of the user who created the workspace.")
4533
- }, ga = {
4527
+ }, ya = {
4534
4528
  type: s.literal("workspaces").describe("The type of the response."),
4535
- workspaces: s.array(s.object(ba)).describe("List of workspaces."),
4529
+ workspaces: s.array(s.object(ga)).describe("List of workspaces."),
4536
4530
  count: s.number().describe("The total number of workspaces.")
4537
4531
  };
4538
- async function ya(e) {
4532
+ async function ka(e) {
4539
4533
  const r = (await e.getWorkspaces()).map((i) => ({
4540
4534
  id: i.id,
4541
4535
  name: i.name,
@@ -4566,22 +4560,22 @@ async function ya(e) {
4566
4560
  };
4567
4561
  return { textContent: n, structuredContent: a };
4568
4562
  }
4569
- const ka = {
4563
+ const Ta = {
4570
4564
  name: f.LIST_WORKSPACES,
4571
4565
  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.",
4572
- parameters: fa,
4573
- outputSchema: ga,
4566
+ parameters: ba,
4567
+ outputSchema: ya,
4574
4568
  annotations: { readOnlyHint: !0, destructiveHint: !1, idempotentHint: !0 },
4575
4569
  async execute(e, t) {
4576
- const r = await ya(t);
4570
+ const r = await ka(t);
4577
4571
  return {
4578
4572
  textContent: r.textContent,
4579
4573
  structuredContent: r.structuredContent
4580
4574
  };
4581
4575
  }
4582
- }, { FIND_TASKS: Ta, FIND_PROJECT_COLLABORATORS: ht, UPDATE_TASKS: wa } = f, Ia = 50, va = {
4576
+ }, { FIND_TASKS: wa, FIND_PROJECT_COLLABORATORS: ft, UPDATE_TASKS: Ia } = f, va = 50, ja = {
4583
4577
  operation: s.enum(["assign", "unassign", "reassign"]).describe("The assignment operation to perform."),
4584
- taskIds: s.array(s.string()).min(1).max(Ia).describe("The IDs of the tasks to operate on (max 50)."),
4578
+ taskIds: s.array(s.string()).min(1).max(va).describe("The IDs of the tasks to operate on (max 50)."),
4585
4579
  responsibleUser: s.string().optional().describe(
4586
4580
  '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.'
4587
4581
  ),
@@ -4589,7 +4583,7 @@ const ka = {
4589
4583
  "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."
4590
4584
  ),
4591
4585
  dryRun: s.boolean().optional().default(!1).describe("If true, validates operations without executing them.")
4592
- }, ja = {
4586
+ }, Sa = {
4593
4587
  results: s.array(
4594
4588
  s.object({
4595
4589
  taskId: s.string().describe("The ID of the task."),
@@ -4605,11 +4599,11 @@ const ka = {
4605
4599
  failed: s.number().describe("Number of failed operations."),
4606
4600
  dryRun: s.boolean().describe("Whether this was a dry run.")
4607
4601
  }).optional().describe("Summary of the operation.")
4608
- }, Sa = {
4602
+ }, Ca = {
4609
4603
  name: f.MANAGE_ASSIGNMENTS,
4610
4604
  description: "Bulk assignment operations for multiple tasks. Supports assign, unassign, and reassign operations with atomic rollback on failures.",
4611
- parameters: va,
4612
- outputSchema: ja,
4605
+ parameters: ja,
4606
+ outputSchema: Sa,
4613
4607
  annotations: { readOnlyHint: !1, destructiveHint: !0, idempotentHint: !1 },
4614
4608
  async execute(e, t) {
4615
4609
  const { operation: r, taskIds: o, responsibleUser: n, fromAssigneeUser: a, dryRun: i } = e;
@@ -4659,7 +4653,7 @@ const ka = {
4659
4653
  newAssigneeId: void 0
4660
4654
  }));
4661
4655
  return {
4662
- textContent: xe({
4656
+ textContent: Ae({
4663
4657
  operation: r,
4664
4658
  results: w,
4665
4659
  dryRun: !0
@@ -4696,7 +4690,7 @@ const ka = {
4696
4690
  throw new Error(`All ${S.length} unassign operation(s) failed: ${w}`);
4697
4691
  }
4698
4692
  return {
4699
- textContent: xe({
4693
+ textContent: Ae({
4700
4694
  operation: r,
4701
4695
  results: S,
4702
4696
  dryRun: !1
@@ -4711,7 +4705,7 @@ const ka = {
4711
4705
  }
4712
4706
  };
4713
4707
  }
4714
- const m = await Ve.validateBulkAssignment(
4708
+ const m = await Je.validateBulkAssignment(
4715
4709
  t,
4716
4710
  p
4717
4711
  ), h = [], b = [];
@@ -4778,7 +4772,7 @@ const ka = {
4778
4772
  throw new Error(`All ${D.length} ${r} operation(s) failed: ${T}`);
4779
4773
  }
4780
4774
  return {
4781
- textContent: xe({
4775
+ textContent: Ae({
4782
4776
  operation: r,
4783
4777
  results: D,
4784
4778
  dryRun: i
@@ -4794,7 +4788,7 @@ const ka = {
4794
4788
  };
4795
4789
  }
4796
4790
  };
4797
- function xe({
4791
+ function Ae({
4798
4792
  operation: e,
4799
4793
  results: t,
4800
4794
  dryRun: r
@@ -4832,30 +4826,30 @@ function xe({
4832
4826
  `;
4833
4827
  }
4834
4828
  return !r && o.length > 0 ? (c += `**Next steps:**
4835
- `, c += `• Use ${Ta} with responsibleUser to see ${e === "unassign" ? "unassigned" : "newly assigned"} tasks
4836
- `, c += `• Use ${wa} for individual assignment changes
4837
- `, n.length > 0 && (c += `• Check failed tasks and use ${ht} to verify collaborator access
4829
+ `, c += `• Use ${wa} with responsibleUser to see ${e === "unassign" ? "unassigned" : "newly assigned"} tasks
4830
+ `, c += `• Use ${Ia} for individual assignment changes
4831
+ `, n.length > 0 && (c += `• Check failed tasks and use ${ft} to verify collaborator access
4838
4832
  `)) : r ? (c += `**To execute:**
4839
4833
  `, c += `• Remove dryRun parameter and run again to execute changes
4840
4834
  `, o.length > 0 && (c += `• ${o.length} task${o.length === 1 ? "" : "s"} ready for ${e} operation
4841
4835
  `), n.length > 0 && (c += `• Fix ${n.length} validation error${n.length === 1 ? "" : "s"} before executing
4842
4836
  `)) : o.length === 0 && (c += `**Suggestions:**
4843
- `, c += `• Use ${ht} to find valid assignees
4837
+ `, c += `• Use ${ft} to find valid assignees
4844
4838
  `, c += `• Check task IDs and assignee permissions
4845
4839
  `, c += `• Use dryRun=true to validate before executing
4846
4840
  `), c;
4847
4841
  }
4848
- const Ca = {
4842
+ const $a = {
4849
4843
  action: s.enum(["archive", "unarchive"]).describe("The action to perform on the project."),
4850
4844
  projectId: s.string().min(1).describe("The ID of the project.")
4851
- }, $a = {
4852
- project: ce.describe("The updated project."),
4853
- success: s.boolean().describe("Whether the action was successful.")
4854
4845
  }, Da = {
4846
+ project: de.describe("The updated project."),
4847
+ success: s.boolean().describe("Whether the action was successful.")
4848
+ }, xa = {
4855
4849
  name: f.PROJECT_MANAGEMENT,
4856
4850
  description: "Archive or unarchive a project by its ID.",
4857
- parameters: Ca,
4858
- outputSchema: $a,
4851
+ parameters: $a,
4852
+ outputSchema: Da,
4859
4853
  annotations: { readOnlyHint: !1, destructiveHint: !1, idempotentHint: !0 },
4860
4854
  async execute(e, t) {
4861
4855
  const r = e.action === "archive" ? await t.archiveProject(e.projectId) : await t.unarchiveProject(e.projectId), o = V(r);
@@ -4867,7 +4861,7 @@ const Ca = {
4867
4861
  }
4868
4862
  };
4869
4863
  }
4870
- }, xa = {
4864
+ }, Aa = {
4871
4865
  action: s.enum(["move-to-workspace", "move-to-personal"]).describe("The action to perform on the project."),
4872
4866
  projectId: s.string().min(1).describe("The ID of the project to move."),
4873
4867
  workspaceId: s.string().min(1).optional().describe("The target workspace ID. Required when action is move-to-workspace."),
@@ -4875,14 +4869,14 @@ const Ca = {
4875
4869
  visibility: s.enum(["restricted", "team", "public"]).optional().describe(
4876
4870
  "Optional access visibility for the project in the workspace (restricted, team, or public)."
4877
4871
  )
4878
- }, Aa = {
4879
- project: ce.describe("The moved project."),
4880
- success: s.boolean().describe("Whether the move was successful.")
4881
4872
  }, Ea = {
4873
+ project: de.describe("The moved project."),
4874
+ success: s.boolean().describe("Whether the move was successful.")
4875
+ }, Oa = {
4882
4876
  name: f.PROJECT_MOVE,
4883
4877
  description: "Move a project between personal and workspace contexts.",
4884
- parameters: xa,
4885
- outputSchema: Aa,
4878
+ parameters: Aa,
4879
+ outputSchema: Ea,
4886
4880
  annotations: { readOnlyHint: !1, destructiveHint: !1, idempotentHint: !0 },
4887
4881
  async execute(e, t) {
4888
4882
  let r;
@@ -4905,8 +4899,8 @@ const Ca = {
4905
4899
  }
4906
4900
  };
4907
4901
  }
4908
- }, qt = ["project", "section"], Oa = {
4909
- type: s.enum(qt).describe(
4902
+ }, Kt = ["project", "section"], Ua = {
4903
+ type: s.enum(Kt).describe(
4910
4904
  '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.'
4911
4905
  ),
4912
4906
  items: s.array(
@@ -4922,17 +4916,17 @@ const Ca = {
4922
4916
  ).min(1).describe(
4923
4917
  "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."
4924
4918
  )
4925
- }, Ua = {
4926
- type: s.enum(qt).describe("The type of entity that was reordered/moved."),
4919
+ }, Pa = {
4920
+ type: s.enum(Kt).describe("The type of entity that was reordered/moved."),
4927
4921
  movedCount: s.number().describe("The number of entities moved to a new parent."),
4928
4922
  reorderedCount: s.number().describe("The number of entities reordered."),
4929
4923
  affectedIds: s.array(s.string()).describe("The IDs of all affected entities."),
4930
4924
  success: s.boolean().describe("Whether the operation was successful.")
4931
- }, Pa = {
4925
+ }, Ra = {
4932
4926
  name: f.REORDER_OBJECTS,
4933
4927
  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.',
4934
- parameters: Oa,
4935
- outputSchema: Ua,
4928
+ parameters: Ua,
4929
+ outputSchema: Pa,
4936
4930
  annotations: { readOnlyHint: !1, destructiveHint: !1, idempotentHint: !0 },
4937
4931
  async execute(e, t) {
4938
4932
  const { type: r, items: o } = e, n = /* @__PURE__ */ new Set();
@@ -4994,22 +4988,22 @@ const Ca = {
4994
4988
  }
4995
4989
  };
4996
4990
  }
4997
- }, Ra = s.object({
4991
+ }, _a = s.object({
4998
4992
  id: s.string().min(1).describe("The ID of the task to reschedule."),
4999
4993
  date: s.string().min(1).describe(
5000
4994
  "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."
5001
4995
  )
5002
- }), _a = {
5003
- tasks: s.array(Ra).min(1).describe("The tasks to reschedule with their new dates.")
5004
- }, Na = {
4996
+ }), Na = {
4997
+ tasks: s.array(_a).min(1).describe("The tasks to reschedule with their new dates.")
4998
+ }, La = {
5005
4999
  tasks: s.array(J).describe("The rescheduled tasks."),
5006
5000
  totalCount: s.number().describe("The total number of tasks rescheduled."),
5007
5001
  rescheduledTaskIds: s.array(s.string()).describe("The IDs of the rescheduled tasks.")
5008
- }, La = {
5002
+ }, Ma = {
5009
5003
  name: f.RESCHEDULE_TASKS,
5010
5004
  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.",
5011
- parameters: _a,
5012
- outputSchema: Na,
5005
+ parameters: Na,
5006
+ outputSchema: La,
5013
5007
  annotations: { readOnlyHint: !1, destructiveHint: !0, idempotentHint: !1 },
5014
5008
  async execute(e, t) {
5015
5009
  const { tasks: r } = e, n = (await Promise.all(
@@ -5022,7 +5016,7 @@ const Ca = {
5022
5016
  throw new Error(
5023
5017
  `Task "${l.content}" (${l.id}) has no due date. Rescheduling requires an existing due date.`
5024
5018
  );
5025
- const u = Ma(d.date, l.due);
5019
+ const u = Fa(d.date, l.due);
5026
5020
  return z("item_update", {
5027
5021
  id: d.id,
5028
5022
  due: {
@@ -5042,7 +5036,7 @@ const Ca = {
5042
5036
  }
5043
5037
  const a = await Promise.all(r.map((d) => t.getTask(d.id))), i = a.map(P);
5044
5038
  return {
5045
- textContent: Je("Rescheduled", i, {
5039
+ textContent: Xe("Rescheduled", i, {
5046
5040
  showDetails: i.length <= 5
5047
5041
  }),
5048
5042
  structuredContent: {
@@ -5053,16 +5047,16 @@ const Ca = {
5053
5047
  };
5054
5048
  }
5055
5049
  };
5056
- function Ma(e, t) {
5050
+ function Fa(e, t) {
5057
5051
  if (/^\d{4}-\d{2}-\d{2}$/.test(e) && t.datetime) {
5058
5052
  const o = t.datetime.substring(10);
5059
5053
  return e + o;
5060
5054
  }
5061
5055
  return e;
5062
5056
  }
5063
- const Fa = {
5057
+ const Ha = {
5064
5058
  query: s.string().min(1).describe("The search query string to find tasks and projects.")
5065
- }, Ha = {
5059
+ }, Wa = {
5066
5060
  results: s.array(
5067
5061
  s.object({
5068
5062
  id: s.string().describe("The ID of the result."),
@@ -5071,52 +5065,52 @@ const Fa = {
5071
5065
  })
5072
5066
  ).describe("The search results."),
5073
5067
  totalCount: s.number().describe("Total number of results found.")
5074
- }, Wa = {
5068
+ }, Ba = {
5075
5069
  name: f.SEARCH,
5076
5070
  description: "Search across tasks and projects in Todoist. Returns a list of relevant results with IDs, titles, and URLs.",
5077
- parameters: Fa,
5078
- outputSchema: Ha,
5071
+ parameters: Ha,
5072
+ outputSchema: Wa,
5079
5073
  annotations: { readOnlyHint: !0, destructiveHint: !1, idempotentHint: !0 },
5080
5074
  async execute(e, t) {
5081
5075
  const { query: r } = e, [o, n] = await Promise.all([
5082
- ze({
5076
+ Ge({
5083
5077
  client: t,
5084
5078
  query: `search: ${r}`,
5085
5079
  limit: C.TASKS_MAX,
5086
5080
  cursor: void 0
5087
5081
  }),
5088
- xt(t, r)
5082
+ At(t, r)
5089
5083
  ]), a = [];
5090
5084
  for (const i of o.tasks)
5091
5085
  a.push({
5092
5086
  id: `task:${i.id}`,
5093
5087
  title: i.content,
5094
- url: kt(i.id)
5088
+ url: Tt(i.id)
5095
5089
  });
5096
5090
  for (const i of n)
5097
5091
  a.push({
5098
5092
  id: `project:${i.id}`,
5099
5093
  title: i.name,
5100
- url: Tt(i.id)
5094
+ url: wt(i.id)
5101
5095
  });
5102
5096
  return {
5103
5097
  textContent: JSON.stringify({ results: a }),
5104
5098
  structuredContent: { results: a, totalCount: a.length }
5105
5099
  };
5106
5100
  }
5107
- }, Ba = {
5108
- ids: s.array(s.string().min(1)).min(1).describe("The IDs of the tasks to uncomplete.")
5109
5101
  }, Ya = {
5102
+ ids: s.array(s.string().min(1)).min(1).describe("The IDs of the tasks to uncomplete.")
5103
+ }, za = {
5110
5104
  uncompleted: s.array(s.string()).describe("The IDs of successfully uncompleted tasks."),
5111
- failures: s.array(qe).describe("Failed task uncompletion with error details."),
5105
+ failures: s.array(Ke).describe("Failed task uncompletion with error details."),
5112
5106
  totalRequested: s.number().describe("The total number of tasks requested to uncomplete."),
5113
5107
  successCount: s.number().describe("The number of successfully uncompleted tasks."),
5114
5108
  failureCount: s.number().describe("The number of failed task uncompletions.")
5115
- }, za = {
5109
+ }, Ga = {
5116
5110
  name: f.UNCOMPLETE_TASKS,
5117
5111
  description: "Uncomplete (reopen) one or more completed tasks by their IDs.",
5118
- parameters: Ba,
5119
- outputSchema: Ya,
5112
+ parameters: Ya,
5113
+ outputSchema: za,
5120
5114
  annotations: { readOnlyHint: !1, destructiveHint: !1, idempotentHint: !1 },
5121
5115
  async execute(e, t) {
5122
5116
  const r = [], o = [];
@@ -5131,7 +5125,7 @@ const Fa = {
5131
5125
  });
5132
5126
  }
5133
5127
  return {
5134
- textContent: Ga({
5128
+ textContent: qa({
5135
5129
  uncompleted: r,
5136
5130
  failures: o,
5137
5131
  args: e
@@ -5146,12 +5140,12 @@ const Fa = {
5146
5140
  };
5147
5141
  }
5148
5142
  };
5149
- function Ga({
5143
+ function qa({
5150
5144
  uncompleted: e,
5151
5145
  failures: t,
5152
5146
  args: r
5153
5147
  }) {
5154
- return Xe({
5148
+ return Ze({
5155
5149
  action: "Uncompleted tasks",
5156
5150
  success: e.length,
5157
5151
  total: r.ids.length,
@@ -5160,28 +5154,28 @@ function Ga({
5160
5154
  failures: t
5161
5155
  });
5162
5156
  }
5163
- const qa = s.object({
5157
+ const Ka = s.object({
5164
5158
  id: s.string().min(1).describe("The ID of the comment to update."),
5165
5159
  content: s.string().min(1).describe("The new content for the comment.")
5166
- }), Ka = {
5167
- comments: s.array(qa).min(1).describe("The comments to update.")
5168
- }, Va = {
5169
- comments: s.array(ke).describe("The updated comments."),
5160
+ }), Va = {
5161
+ comments: s.array(Ka).min(1).describe("The comments to update.")
5162
+ }, Ja = {
5163
+ comments: s.array(Te).describe("The updated comments."),
5170
5164
  totalCount: s.number().describe("The total number of comments updated."),
5171
5165
  updatedCommentIds: s.array(s.string()).describe("The IDs of the updated comments."),
5172
5166
  appliedOperations: s.object({
5173
5167
  updateCount: s.number().describe("The number of comments updated.")
5174
5168
  }).describe("Summary of operations performed.")
5175
- }, Ja = {
5169
+ }, Xa = {
5176
5170
  name: f.UPDATE_COMMENTS,
5177
5171
  description: "Update multiple existing comments with new content.",
5178
- parameters: Ka,
5179
- outputSchema: Va,
5172
+ parameters: Va,
5173
+ outputSchema: Ja,
5180
5174
  annotations: { readOnlyHint: !1, destructiveHint: !0, idempotentHint: !1 },
5181
5175
  async execute(e, t) {
5182
- const { comments: r } = e, o = r.map(async (c) => await t.updateComment(c.id, { content: c.content })), a = (await Promise.all(o)).map(be);
5176
+ const { comments: r } = e, o = r.map(async (c) => await t.updateComment(c.id, { content: c.content })), a = (await Promise.all(o)).map(ye);
5183
5177
  return {
5184
- textContent: Xa({
5178
+ textContent: Za({
5185
5179
  comments: a
5186
5180
  }),
5187
5181
  structuredContent: {
@@ -5195,7 +5189,7 @@ const qa = s.object({
5195
5189
  };
5196
5190
  }
5197
5191
  };
5198
- function Xa({ comments: e }) {
5192
+ function Za({ comments: e }) {
5199
5193
  const t = e.filter((a) => a.taskId).length, r = e.filter((a) => a.projectId).length, o = [];
5200
5194
  if (t > 0) {
5201
5195
  const a = t > 1 ? "comments" : "comment";
@@ -5207,33 +5201,33 @@ function Xa({ comments: e }) {
5207
5201
  }
5208
5202
  return o.length > 0 ? `Updated ${o.join(" and ")}` : "No comments updated";
5209
5203
  }
5210
- const Za = s.object({
5204
+ const Qa = s.object({
5211
5205
  id: s.string().min(1).describe("The ID of the filter to update."),
5212
5206
  name: s.string().min(1).optional().describe("The new name of the filter."),
5213
5207
  query: s.string().min(1).optional().describe(
5214
5208
  'The new filter query string. Examples: "today & p1", "#Work & overdue", "@email & today".'
5215
5209
  ),
5216
- color: ae,
5210
+ color: ie,
5217
5211
  isFavorite: s.boolean().optional().describe("Whether to mark the filter as a favorite.")
5218
- }), Qa = {
5219
- filters: s.array(Za).min(1).describe("The filters to update.")
5220
- }, ei = {
5221
- filters: s.array(Ke).describe("The updated filters."),
5212
+ }), ei = {
5213
+ filters: s.array(Qa).min(1).describe("The filters to update.")
5214
+ }, ti = {
5215
+ filters: s.array(Ve).describe("The updated filters."),
5222
5216
  totalCount: s.number().describe("The total number of filters updated."),
5223
5217
  updatedFilterIds: s.array(s.string()).describe("The IDs of the updated filters."),
5224
5218
  appliedOperations: s.object({
5225
5219
  updateCount: s.number().describe("The number of filters actually updated."),
5226
5220
  skippedCount: s.number().describe("The number of filters skipped (no changes).")
5227
5221
  }).describe("Summary of operations performed.")
5228
- }, ti = {
5222
+ }, si = {
5229
5223
  name: f.UPDATE_FILTERS,
5230
5224
  description: "Update one or more existing personal filters with new values.",
5231
- parameters: Qa,
5232
- outputSchema: ei,
5225
+ parameters: ei,
5226
+ outputSchema: ti,
5233
5227
  annotations: { readOnlyHint: !1, destructiveHint: !0, idempotentHint: !1 },
5234
5228
  async execute(e, t) {
5235
5229
  const { filters: r } = e, o = [], a = r.map((m) => {
5236
- const h = ri(m);
5230
+ const h = oi(m);
5237
5231
  return h !== null ? { kind: "skipped", reason: h } : (o.push(m), { kind: "updated", filter: m });
5238
5232
  }).filter((m) => m.kind === "skipped").length;
5239
5233
  if (o.length === 0)
@@ -5259,12 +5253,12 @@ const Za = s.object({
5259
5253
  id: m.id,
5260
5254
  name: m.name,
5261
5255
  query: m.query,
5262
- color: ie.parse(m.color),
5256
+ color: ce.parse(m.color),
5263
5257
  isFavorite: m.isFavorite,
5264
5258
  itemOrder: m.itemOrder
5265
5259
  }));
5266
5260
  return {
5267
- textContent: si({ filters: u, skippedCount: a }),
5261
+ textContent: ri({ filters: u, skippedCount: a }),
5268
5262
  structuredContent: {
5269
5263
  filters: u,
5270
5264
  totalCount: u.length,
@@ -5277,7 +5271,7 @@ const Za = s.object({
5277
5271
  };
5278
5272
  }
5279
5273
  };
5280
- function si({
5274
+ function ri({
5281
5275
  filters: e,
5282
5276
  skippedCount: t
5283
5277
  }) {
@@ -5291,52 +5285,52 @@ ${n}`;
5291
5285
  }
5292
5286
  return o;
5293
5287
  }
5294
- function ri({ id: e, ...t }) {
5288
+ function oi({ id: e, ...t }) {
5295
5289
  return Object.values(t).every((o) => o === void 0) ? "no-fields" : null;
5296
5290
  }
5297
- const oi = s.object({
5291
+ const ni = s.object({
5298
5292
  labelType: s.literal("personal").describe("Update a personal label, identified by its ID."),
5299
5293
  id: s.string().min(1).describe("The ID of the personal label to update."),
5300
5294
  name: s.string().min(1).max(128).optional().describe("The new name of the label."),
5301
- color: ae,
5295
+ color: ie,
5302
5296
  order: s.number().int().optional().describe("The new position of the label in the label list."),
5303
5297
  isFavorite: s.boolean().optional().describe("Whether to mark the label as a favorite.")
5304
- }), ni = s.object({
5298
+ }), ai = s.object({
5305
5299
  labelType: s.literal("shared").describe(
5306
5300
  "Rename a shared label across all tasks. Shared labels are identified by name; only renaming is supported (no color, order, or favorite)."
5307
5301
  ),
5308
5302
  name: s.string().min(1).describe("The current name of the shared label."),
5309
5303
  newName: s.string().min(1).describe("The new name for the shared label.")
5310
- }), ai = s.discriminatedUnion("labelType", [
5311
- oi,
5312
- ni
5313
- ]), ii = {
5314
- labels: s.array(ai).min(1).describe(
5304
+ }), ii = s.discriminatedUnion("labelType", [
5305
+ ni,
5306
+ ai
5307
+ ]), ci = {
5308
+ labels: s.array(ii).min(1).describe(
5315
5309
  '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.'
5316
5310
  )
5317
- }, ci = s.object({
5311
+ }, di = s.object({
5318
5312
  name: s.string().describe("The previous name of the shared label."),
5319
5313
  newName: s.string().describe("The new name of the shared label.")
5320
- }), di = {
5321
- updatedLabels: s.array(de).describe("The updated personal labels."),
5322
- renamedSharedLabels: s.array(ci).describe("The shared labels that were renamed."),
5314
+ }), li = {
5315
+ updatedLabels: s.array(le).describe("The updated personal labels."),
5316
+ renamedSharedLabels: s.array(di).describe("The shared labels that were renamed."),
5323
5317
  totalCount: s.number().describe("The total number of successful operations (personal + shared)."),
5324
5318
  appliedOperations: s.object({
5325
5319
  updateCount: s.number().describe("Number of personal labels updated."),
5326
5320
  renameCount: s.number().describe("Number of shared labels renamed."),
5327
5321
  skippedCount: s.number().describe("Number of operations skipped (no changes or shared label not found).")
5328
5322
  }).describe("Summary of operations performed.")
5329
- }, li = {
5323
+ }, ui = {
5330
5324
  name: f.UPDATE_LABELS,
5331
5325
  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.",
5332
- parameters: ii,
5333
- outputSchema: di,
5326
+ parameters: ci,
5327
+ outputSchema: li,
5334
5328
  annotations: { readOnlyHint: !1, destructiveHint: !0, idempotentHint: !1 },
5335
5329
  async execute(e, t) {
5336
5330
  const { labels: r } = e, o = await Promise.all(
5337
5331
  r.map(async (u) => {
5338
5332
  if (u.labelType === "personal") {
5339
- const m = pi(u);
5333
+ const m = mi(u);
5340
5334
  if (m !== null) return { kind: "skipped", reason: m };
5341
5335
  const { id: h, labelType: b, ...I } = u;
5342
5336
  return { kind: "updated", label: await t.updateLabel(h, I) };
@@ -5346,7 +5340,7 @@ const oi = s.object({
5346
5340
  newName: u.newName
5347
5341
  }) ? { kind: "renamed", name: u.name, newName: u.newName } : { kind: "skipped", reason: "not-found" };
5348
5342
  })
5349
- ), n = o.filter((u) => u.kind === "updated").map((u) => de.parse(u.label)), a = o.filter(
5343
+ ), n = o.filter((u) => u.kind === "updated").map((u) => le.parse(u.label)), a = o.filter(
5350
5344
  (u) => u.kind === "renamed"
5351
5345
  ).map(({ name: u, newName: p }) => ({ name: u, newName: p })), i = o.filter((u) => u.kind === "skipped").length, c = o.filter(
5352
5346
  (u) => u.kind === "skipped" && u.reason === "no-fields"
@@ -5354,7 +5348,7 @@ const oi = s.object({
5354
5348
  (u) => u.kind === "skipped" && u.reason === "not-found"
5355
5349
  ).length;
5356
5350
  return {
5357
- textContent: ui({
5351
+ textContent: pi({
5358
5352
  updatedLabels: n,
5359
5353
  renamedSharedLabels: a,
5360
5354
  skippedNoFields: c,
@@ -5373,7 +5367,7 @@ const oi = s.object({
5373
5367
  };
5374
5368
  }
5375
5369
  };
5376
- function ui({
5370
+ function pi({
5377
5371
  updatedLabels: e,
5378
5372
  renamedSharedLabels: t,
5379
5373
  skippedNoFields: r,
@@ -5395,39 +5389,39 @@ function ui({
5395
5389
  return c.join(`
5396
5390
  `);
5397
5391
  }
5398
- function pi({
5392
+ function mi({
5399
5393
  id: e,
5400
5394
  labelType: t,
5401
5395
  ...r
5402
5396
  }) {
5403
5397
  return Object.values(r).every((n) => n === void 0) ? "no-fields" : null;
5404
5398
  }
5405
- const mi = s.object({
5399
+ const hi = s.object({
5406
5400
  id: s.string().min(1).describe("The ID of the project to update."),
5407
5401
  name: s.string().min(1).optional().describe("The new name of the project."),
5408
5402
  isFavorite: s.boolean().optional().describe("Whether the project is a favorite."),
5409
5403
  viewStyle: s.enum(["list", "board", "calendar"]).optional().describe("The project view style."),
5410
- color: ae
5411
- }), hi = {
5412
- projects: s.array(mi).min(1).describe("The projects to update.")
5413
- }, fi = {
5414
- projects: s.array(ce).describe("The updated projects."),
5404
+ color: ie
5405
+ }), fi = {
5406
+ projects: s.array(hi).min(1).describe("The projects to update.")
5407
+ }, bi = {
5408
+ projects: s.array(de).describe("The updated projects."),
5415
5409
  totalCount: s.number().describe("The total number of projects updated."),
5416
5410
  updatedProjectIds: s.array(s.string()).describe("The IDs of the updated projects."),
5417
5411
  appliedOperations: s.object({
5418
5412
  updateCount: s.number().describe("The number of projects actually updated."),
5419
5413
  skippedCount: s.number().describe("The number of projects skipped (no changes).")
5420
5414
  }).describe("Summary of operations performed.")
5421
- }, bi = {
5415
+ }, gi = {
5422
5416
  name: f.UPDATE_PROJECTS,
5423
5417
  description: "Update multiple existing projects with new values.",
5424
- parameters: hi,
5425
- outputSchema: fi,
5418
+ parameters: fi,
5419
+ outputSchema: bi,
5426
5420
  annotations: { readOnlyHint: !1, destructiveHint: !0, idempotentHint: !1 },
5427
5421
  async execute(e, t) {
5428
5422
  const { projects: r } = e, o = await Promise.all(
5429
5423
  r.map(async (d) => {
5430
- const l = yi(d);
5424
+ const l = ki(d);
5431
5425
  if (l !== null) return { kind: "skipped", reason: l };
5432
5426
  const { id: u, ...p } = d;
5433
5427
  return { kind: "updated", project: await t.updateProject(u, p) };
@@ -5440,7 +5434,7 @@ const mi = s.object({
5440
5434
  (d) => d.kind === "skipped" && d.reason === "no-valid-values"
5441
5435
  ).length;
5442
5436
  return {
5443
- textContent: gi({
5437
+ textContent: yi({
5444
5438
  projects: n,
5445
5439
  skippedNoFields: a,
5446
5440
  skippedNoValidValues: i
@@ -5457,7 +5451,7 @@ const mi = s.object({
5457
5451
  };
5458
5452
  }
5459
5453
  };
5460
- function gi({
5454
+ function yi({
5461
5455
  projects: e,
5462
5456
  skippedNoFields: t,
5463
5457
  skippedNoValidValues: r
@@ -5469,49 +5463,49 @@ function gi({
5469
5463
  return t > 0 && i.push(`${t} skipped - no changes`), r > 0 && i.push(`${r} skipped - no valid field values`), i.length > 0 && (a += ` (${i.join(", ")})`), o > 0 && (a += `:
5470
5464
  ${n}`), a;
5471
5465
  }
5472
- function yi({ id: e, ...t }) {
5466
+ function ki({ id: e, ...t }) {
5473
5467
  const r = Object.values(t);
5474
5468
  return r.length === 0 ? "no-fields" : r.every((o) => o === void 0) ? "no-valid-values" : null;
5475
5469
  }
5476
- const ki = s.object({
5470
+ const Ti = s.object({
5477
5471
  type: s.literal("relative"),
5478
5472
  id: s.string().min(1).describe("The ID of the relative reminder to update."),
5479
5473
  minuteOffset: s.number().int().min(0).optional().describe("New minute offset before task due time."),
5480
- service: Te.optional().describe('New delivery method: "email" or "push".'),
5481
- isUrgent: we
5482
- }), Ti = s.object({
5474
+ service: we.optional().describe('New delivery method: "email" or "push".'),
5475
+ isUrgent: Ie
5476
+ }), wi = s.object({
5483
5477
  type: s.literal("absolute"),
5484
5478
  id: s.string().min(1).describe("The ID of the absolute reminder to update."),
5485
- due: Ot.optional().describe("New due date/time for the reminder."),
5486
- service: Te.optional().describe('New delivery method: "email" or "push".'),
5487
- isUrgent: we
5488
- }), wi = s.object({
5479
+ due: Ut.optional().describe("New due date/time for the reminder."),
5480
+ service: we.optional().describe('New delivery method: "email" or "push".'),
5481
+ isUrgent: Ie
5482
+ }), Ii = s.object({
5489
5483
  type: s.literal("location"),
5490
5484
  id: s.string().min(1).describe("The ID of the location reminder to update."),
5491
5485
  name: s.string().optional().describe("New location name."),
5492
5486
  locLat: s.string().optional().describe("New latitude."),
5493
5487
  locLong: s.string().optional().describe("New longitude."),
5494
- locTrigger: Ut.optional().describe(
5488
+ locTrigger: Pt.optional().describe(
5495
5489
  'New trigger condition: "on_enter" or "on_leave".'
5496
5490
  ),
5497
5491
  radius: s.number().int().optional().describe("New radius in meters.")
5498
- }), Ii = s.discriminatedUnion("type", [
5499
- ki,
5492
+ }), vi = s.discriminatedUnion("type", [
5500
5493
  Ti,
5501
- wi
5502
- ]), vi = {
5503
- reminders: s.array(Ii).min(1).max(fe).describe(
5504
- `Array of reminders to update (max ${fe}). Each must include the reminder type and ID. Only include fields that need to change.`
5494
+ wi,
5495
+ Ii
5496
+ ]), ji = {
5497
+ reminders: s.array(vi).min(1).max(ge).describe(
5498
+ `Array of reminders to update (max ${ge}). Each must include the reminder type and ID. Only include fields that need to change.`
5505
5499
  )
5506
- }, ji = {
5507
- reminders: s.array(Ge).describe("The updated reminders."),
5500
+ }, Si = {
5501
+ reminders: s.array(qe).describe("The updated reminders."),
5508
5502
  totalCount: s.number().describe("Total reminders updated."),
5509
5503
  updatedReminderIds: s.array(s.string()).describe("IDs of updated reminders.")
5510
- }, Si = {
5504
+ }, Ci = {
5511
5505
  name: f.UPDATE_REMINDERS,
5512
5506
  description: 'Update existing reminders. Each reminder must specify its type ("relative", "absolute", or "location") and ID. Only include fields that need to change.',
5513
- parameters: vi,
5514
- outputSchema: ji,
5507
+ parameters: ji,
5508
+ outputSchema: Si,
5515
5509
  annotations: { readOnlyHint: !1, destructiveHint: !0, idempotentHint: !0 },
5516
5510
  async execute(e, t) {
5517
5511
  const { reminders: r } = e, o = r.map(async (d) => {
@@ -5535,7 +5529,7 @@ const ki = s.object({
5535
5529
  return await t.updateLocationReminder(l, p);
5536
5530
  }
5537
5531
  }
5538
- }), a = (await Promise.all(o)).map(ue), i = a.length === 1 ? "reminder" : "reminders";
5532
+ }), a = (await Promise.all(o)).map(pe), i = a.length === 1 ? "reminder" : "reminders";
5539
5533
  return {
5540
5534
  textContent: `Updated ${a.length} ${i}`,
5541
5535
  structuredContent: {
@@ -5545,44 +5539,44 @@ const ki = s.object({
5545
5539
  }
5546
5540
  };
5547
5541
  }
5548
- }, Ci = s.object({
5542
+ }, $i = s.object({
5549
5543
  id: s.string().min(1).describe("The ID of the section to update."),
5550
5544
  name: s.string().min(1).describe("The new name of the section.")
5551
- }), $i = {
5552
- sections: s.array(Ci).min(1).describe("The sections to update.")
5553
- }, Di = {
5554
- sections: s.array(ye).describe("The updated sections."),
5545
+ }), Di = {
5546
+ sections: s.array($i).min(1).describe("The sections to update.")
5547
+ }, xi = {
5548
+ sections: s.array(ae).describe("The updated sections."),
5555
5549
  totalCount: s.number().describe("The total number of sections updated."),
5556
5550
  updatedSectionIds: s.array(s.string()).describe("The IDs of the updated sections.")
5557
- }, xi = {
5551
+ }, Ai = {
5558
5552
  name: f.UPDATE_SECTIONS,
5559
5553
  description: "Update multiple existing sections with new values.",
5560
- parameters: $i,
5561
- outputSchema: Di,
5554
+ parameters: Di,
5555
+ outputSchema: xi,
5562
5556
  annotations: { readOnlyHint: !1, destructiveHint: !0, idempotentHint: !1 },
5563
5557
  async execute({ sections: e }, t) {
5564
5558
  const r = await Promise.all(
5565
5559
  e.map((n) => t.updateSection(n.id, { name: n.name }))
5566
5560
  );
5567
5561
  return {
5568
- textContent: Ai({
5562
+ textContent: Ei({
5569
5563
  sections: r
5570
5564
  }),
5571
5565
  structuredContent: {
5572
- sections: r,
5566
+ sections: r.map(he),
5573
5567
  totalCount: r.length,
5574
5568
  updatedSectionIds: r.map((n) => n.id)
5575
5569
  }
5576
5570
  };
5577
5571
  }
5578
5572
  };
5579
- function Ai({ sections: e }) {
5573
+ function Ei({ sections: e }) {
5580
5574
  const t = e.length, r = e.map((n) => `• ${n.name} (id=${n.id}, projectId=${n.projectId})`).join(`
5581
5575
  `);
5582
5576
  return `Updated ${t} section${t === 1 ? "" : "s"}:
5583
5577
  ${r}`;
5584
5578
  }
5585
- const Ei = s.object({
5579
+ const Oi = s.object({
5586
5580
  id: s.string().min(1).describe("The ID of the task to update."),
5587
5581
  content: s.string().optional().describe(
5588
5582
  '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.'
@@ -5596,7 +5590,7 @@ const Ei = s.object({
5596
5590
  sectionId: s.string().optional().describe("The new section ID for the task."),
5597
5591
  parentId: s.string().optional().describe("The new parent task ID (for subtasks)."),
5598
5592
  order: s.number().optional().describe("The new order of the task within its parent/section."),
5599
- priority: We.optional().describe(He),
5593
+ priority: Be.optional().describe(We),
5600
5594
  dueString: s.preprocess(
5601
5595
  // Keep accepting legacy null while exposing a Gemini-compatible string schema.
5602
5596
  (e) => e === null ? "remove" : e,
@@ -5621,9 +5615,9 @@ const Ei = s.object({
5621
5615
  isUncompletable: s.boolean().optional().describe(
5622
5616
  "Whether this task should be uncompletable (organizational header). Tasks with isUncompletable: true appear as organizational headers and cannot be completed."
5623
5617
  )
5624
- }), Oi = ["remove", "no date"], Ui = ["remove", "no date", "no deadline"], Pi = "no date", Ri = {
5625
- tasks: s.array(Ei).min(1).describe("The tasks to update.")
5626
- }, _i = {
5618
+ }), Ui = ["remove", "no date"], Pi = ["remove", "no date", "no deadline"], Ri = "no date", _i = {
5619
+ tasks: s.array(Oi).min(1).describe("The tasks to update.")
5620
+ }, Ni = {
5627
5621
  tasks: s.array(J).describe("The updated tasks."),
5628
5622
  totalCount: s.number().describe("The total number of tasks updated."),
5629
5623
  updatedTaskIds: s.array(s.string()).describe("The IDs of the updated tasks."),
@@ -5631,15 +5625,15 @@ const Ei = s.object({
5631
5625
  updateCount: s.number().describe("The number of tasks actually updated."),
5632
5626
  skippedCount: s.number().describe("The number of tasks skipped (no changes).")
5633
5627
  }).describe("Summary of operations performed.")
5634
- }, Ni = {
5628
+ }, Li = {
5635
5629
  name: f.UPDATE_TASKS,
5636
5630
  description: "Update existing tasks including content, dates, priorities, and assignments.",
5637
- parameters: Ri,
5638
- outputSchema: _i,
5631
+ parameters: _i,
5632
+ outputSchema: Ni,
5639
5633
  annotations: { readOnlyHint: !1, destructiveHint: !0, idempotentHint: !1 },
5640
5634
  async execute(e, t) {
5641
5635
  const { tasks: r } = e, o = r.map(async (c) => {
5642
- if (!Mi(c))
5636
+ if (!Fi(c))
5643
5637
  return;
5644
5638
  const {
5645
5639
  id: d,
@@ -5661,21 +5655,21 @@ const Ei = s.object({
5661
5655
  ...N,
5662
5656
  ...$ !== void 0 && { labels: $ }
5663
5657
  };
5664
- I && (g.priority = Ct(I));
5665
- const S = ft(
5658
+ I && (g.priority = $t(I));
5659
+ const S = bt(
5666
5660
  m,
5667
- Oi,
5668
- Pi
5661
+ Ui,
5662
+ Ri
5669
5663
  );
5670
5664
  S !== void 0 && (g = { ...g, dueString: S });
5671
- const R = ft(
5665
+ const R = bt(
5672
5666
  D,
5673
- Ui,
5667
+ Pi,
5674
5668
  null
5675
5669
  );
5676
5670
  if (R !== void 0 && (g = { ...g, deadlineDate: R }), h)
5677
5671
  try {
5678
- const { minutes: v } = St(h);
5672
+ const { minutes: v } = Ct(h);
5679
5673
  g = {
5680
5674
  ...g,
5681
5675
  duration: v,
@@ -5688,7 +5682,7 @@ const Ei = s.object({
5688
5682
  if (b === null || b === "unassign")
5689
5683
  g = { ...g, assigneeId: null };
5690
5684
  else {
5691
- const v = await Ve.validateTaskUpdateAssignment(
5685
+ const v = await Je.validateTaskUpdateAssignment(
5692
5686
  t,
5693
5687
  d,
5694
5688
  b
@@ -5703,13 +5697,13 @@ const Ei = s.object({
5703
5697
  }
5704
5698
  if (!T && !u && !p)
5705
5699
  return await t.updateTask(d, g);
5706
- const w = kr(d, T, u, p), j = await t.moveTask(d, w);
5700
+ const w = Tr(d, T, u, p), j = await t.moveTask(d, w);
5707
5701
  return Object.keys(g).length > 0 ? await t.updateTask(d, g) : j;
5708
5702
  }), n = (await Promise.all(o)).filter(
5709
5703
  (c) => c !== void 0
5710
5704
  ), a = n.map(P);
5711
5705
  return {
5712
- textContent: Li({
5706
+ textContent: Mi({
5713
5707
  tasks: a,
5714
5708
  args: e
5715
5709
  }),
@@ -5725,21 +5719,21 @@ const Ei = s.object({
5725
5719
  };
5726
5720
  }
5727
5721
  };
5728
- function Li({
5722
+ function Mi({
5729
5723
  tasks: e,
5730
5724
  args: t
5731
5725
  }) {
5732
5726
  const r = t.tasks.length, o = e.length, n = r - o;
5733
5727
  let a = "";
5734
- return n > 0 && (a = ` (${n} skipped - no changes)`), Je("Updated", e, {
5728
+ return n > 0 && (a = ` (${n} skipped - no changes)`), Xe("Updated", e, {
5735
5729
  context: a,
5736
5730
  showDetails: e.length <= 5
5737
5731
  });
5738
5732
  }
5739
- function Mi({ id: e, ...t }) {
5733
+ function Fi({ id: e, ...t }) {
5740
5734
  return Object.keys(t).length > 0;
5741
5735
  }
5742
- function ft(e, t, r) {
5736
+ function bt(e, t, r) {
5743
5737
  if (e === void 0)
5744
5738
  return e;
5745
5739
  if (e === null)
@@ -5747,7 +5741,7 @@ function ft(e, t, r) {
5747
5741
  const o = e.trim().toLowerCase();
5748
5742
  return t.includes(o) ? r : e;
5749
5743
  }
5750
- const Fi = {}, Hi = {
5744
+ const Hi = {}, Wi = {
5751
5745
  type: s.literal("user_info").describe("The type of the response."),
5752
5746
  userId: s.string().describe("The user ID."),
5753
5747
  fullName: s.string().describe("The full name of the user."),
@@ -5764,36 +5758,36 @@ const Fi = {}, Hi = {
5764
5758
  email: s.string().describe("The email address of the user."),
5765
5759
  plan: s.enum(["Todoist Free", "Todoist Pro", "Todoist Business"]).describe("The user plan.")
5766
5760
  };
5767
- function Wi(e) {
5761
+ function Bi(e) {
5768
5762
  return e.businessAccountId ? "Todoist Business" : e.isPremium ? "Todoist Pro" : "Todoist Free";
5769
5763
  }
5770
- function Bi(e, t) {
5764
+ function Yi(e, t) {
5771
5765
  const o = ((e.getDay() || 7) - t + 7) % 7, n = new Date(e);
5772
5766
  return n.setDate(e.getDate() - o), n;
5773
5767
  }
5774
- function Yi(e) {
5768
+ function zi(e) {
5775
5769
  const t = new Date(e);
5776
5770
  return t.setDate(e.getDate() + 6), t;
5777
5771
  }
5778
- function zi(e) {
5772
+ function Gi(e) {
5779
5773
  const t = new Date(e.getFullYear(), 0, 1), r = (e.getTime() - t.getTime()) / 864e5;
5780
5774
  return Math.ceil((r + t.getDay() + 1) / 7);
5781
5775
  }
5782
- function Gi(e) {
5776
+ function qi(e) {
5783
5777
  return ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"][e === 7 ? 0 : e] ?? "Unknown";
5784
5778
  }
5785
- function qi(e) {
5779
+ function Ki(e) {
5786
5780
  try {
5787
5781
  return new Intl.DateTimeFormat("en-US", { timeZone: e }), !0;
5788
5782
  } catch {
5789
5783
  return !1;
5790
5784
  }
5791
5785
  }
5792
- function Kt(e) {
5793
- return qi(e) ? e : "UTC";
5786
+ function Vt(e) {
5787
+ return Ki(e) ? e : "UTC";
5794
5788
  }
5795
- function Ki(e, t) {
5796
- const r = Kt(t);
5789
+ function Vi(e, t) {
5790
+ const r = Vt(t);
5797
5791
  return e.toLocaleString("en-US", {
5798
5792
  timeZone: r,
5799
5793
  year: "numeric",
@@ -5805,8 +5799,8 @@ function Ki(e, t) {
5805
5799
  hour12: !1
5806
5800
  });
5807
5801
  }
5808
- async function Vi(e) {
5809
- const t = await e.getUser(), r = t.tzInfo?.timezone ?? "UTC", o = Kt(r), n = /* @__PURE__ */ new Date(), a = Ki(n, o), i = t.startDay ?? 1, c = Gi(i), d = Wi(t), l = new Date(n.toLocaleString("en-US", { timeZone: o })), u = Bi(l, i), p = Yi(u), m = zi(l), b = [
5802
+ async function Ji(e) {
5803
+ const t = await e.getUser(), r = t.tzInfo?.timezone ?? "UTC", o = Vt(r), n = /* @__PURE__ */ new Date(), a = Vi(n, o), i = t.startDay ?? 1, c = qi(i), d = Bi(t), l = new Date(n.toLocaleString("en-US", { timeZone: o })), u = Yi(l, i), p = zi(u), m = Gi(l), b = [
5810
5804
  "# User Information",
5811
5805
  "",
5812
5806
  `**User ID:** ${t.id}`,
@@ -5848,26 +5842,26 @@ async function Vi(e) {
5848
5842
  };
5849
5843
  return { textContent: b, structuredContent: I };
5850
5844
  }
5851
- const Ji = {
5845
+ const Xi = {
5852
5846
  name: f.USER_INFO,
5853
5847
  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).",
5854
- parameters: Fi,
5855
- outputSchema: Hi,
5848
+ parameters: Hi,
5849
+ outputSchema: Wi,
5856
5850
  annotations: { readOnlyHint: !0, destructiveHint: !1, idempotentHint: !0 },
5857
5851
  async execute(e, t) {
5858
- const r = await Vi(t);
5852
+ const r = await Ji(t);
5859
5853
  return {
5860
5854
  textContent: r.textContent,
5861
5855
  structuredContent: r.structuredContent
5862
5856
  };
5863
5857
  }
5864
- }, bt = 10 * 1024 * 1024, Xi = /* @__PURE__ */ new Set([
5858
+ }, gt = 10 * 1024 * 1024, Zi = /* @__PURE__ */ new Set([
5865
5859
  "image/png",
5866
5860
  "image/jpeg",
5867
5861
  "image/gif",
5868
5862
  "image/webp",
5869
5863
  "image/svg+xml"
5870
- ]), Zi = /* @__PURE__ */ new Set([
5864
+ ]), Qi = /* @__PURE__ */ new Set([
5871
5865
  "text/plain",
5872
5866
  "text/csv",
5873
5867
  "text/html",
@@ -5875,7 +5869,7 @@ const Ji = {
5875
5869
  "application/json",
5876
5870
  "application/xml",
5877
5871
  "text/xml"
5878
- ]), Qi = {
5872
+ ]), ec = {
5879
5873
  ".png": "image/png",
5880
5874
  ".jpg": "image/jpeg",
5881
5875
  ".jpeg": "image/jpeg",
@@ -5890,23 +5884,23 @@ const Ji = {
5890
5884
  ".xml": "application/xml",
5891
5885
  ".pdf": "application/pdf"
5892
5886
  };
5893
- function ec(e) {
5894
- return Xi.has(e) ? "image" : Zi.has(e) || e.startsWith("text/") ? "text" : "binary";
5895
- }
5896
5887
  function tc(e) {
5897
- return (e.split(";")[0] ?? e).trim().toLowerCase();
5888
+ return Zi.has(e) ? "image" : Qi.has(e) || e.startsWith("text/") ? "text" : "binary";
5898
5889
  }
5899
5890
  function sc(e) {
5891
+ return (e.split(";")[0] ?? e).trim().toLowerCase();
5892
+ }
5893
+ function rc(e) {
5900
5894
  try {
5901
5895
  const t = new URL(e).pathname, r = t.lastIndexOf(".");
5902
5896
  if (r === -1) return;
5903
5897
  const o = t.slice(r).toLowerCase();
5904
- return Qi[o];
5898
+ return ec[o];
5905
5899
  } catch {
5906
5900
  return;
5907
5901
  }
5908
5902
  }
5909
- function rc(e) {
5903
+ function oc(e) {
5910
5904
  try {
5911
5905
  const t = new URL(e).pathname, r = t.lastIndexOf("/");
5912
5906
  return r === -1 ? void 0 : t.slice(r + 1) || void 0;
@@ -5914,31 +5908,31 @@ function rc(e) {
5914
5908
  return;
5915
5909
  }
5916
5910
  }
5917
- const oc = {
5911
+ const nc = {
5918
5912
  fileUrl: s.url().describe(
5919
5913
  "The URL of the attachment file to view. Get this from the fileUrl field in a comment's fileAttachment."
5920
5914
  )
5921
- }, nc = {
5915
+ }, ac = {
5922
5916
  name: f.VIEW_ATTACHMENT,
5923
5917
  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).",
5924
- parameters: oc,
5918
+ parameters: nc,
5925
5919
  annotations: {
5926
5920
  readOnlyHint: !0,
5927
5921
  destructiveHint: !1,
5928
5922
  idempotentHint: !0
5929
5923
  },
5930
5924
  async execute({ fileUrl: e }, t) {
5931
- const r = await t.viewAttachment(e), o = r.headers["content-length"], n = o ? Number.parseInt(o, 10) : void 0, a = rc(e), i = r.headers["content-type"], c = i ? tc(i) : void 0, d = c && c !== "application/octet-stream" ? c : sc(e) ?? c ?? "application/octet-stream";
5932
- if (n && n > bt)
5925
+ const r = await t.viewAttachment(e), o = r.headers["content-length"], n = o ? Number.parseInt(o, 10) : void 0, a = oc(e), i = r.headers["content-type"], c = i ? sc(i) : void 0, d = c && c !== "application/octet-stream" ? c : rc(e) ?? c ?? "application/octet-stream";
5926
+ if (n && n > gt)
5933
5927
  return {
5934
5928
  textContent: `Attachment "${a ?? e}" is too large to display inline (${(n / 1024 / 1024).toFixed(1)}MB, limit is 10MB). File type: ${d}`
5935
5929
  };
5936
5930
  const l = Buffer.from(await r.arrayBuffer()), u = l.byteLength;
5937
- if (u > bt)
5931
+ if (u > gt)
5938
5932
  return {
5939
5933
  textContent: `Attachment "${a ?? e}" is too large to display inline (${(u / 1024 / 1024).toFixed(1)}MB, limit is 10MB). File type: ${d}`
5940
5934
  };
5941
- const p = ec(d), m = [];
5935
+ const p = tc(d), m = [];
5942
5936
  return p === "image" ? m.push({
5943
5937
  type: "image",
5944
5938
  data: l.toString("base64"),
@@ -5958,7 +5952,7 @@ const oc = {
5958
5952
  contentItems: m
5959
5953
  };
5960
5954
  }
5961
- }, ac = `
5955
+ }, ic = `
5962
5956
  ## Todoist Task and Project Management Tools
5963
5957
 
5964
5958
  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.
@@ -6056,83 +6050,83 @@ You have access to comprehensive Todoist management tools for personal productiv
6056
6050
 
6057
6051
  Always provide clear, actionable task titles and descriptions. Use the overview tools to give users context about their workload and project status.
6058
6052
  `;
6059
- function Tc({
6053
+ function wc({
6060
6054
  todoistApiKey: e,
6061
6055
  baseUrl: t,
6062
6056
  features: r = []
6063
6057
  }) {
6064
- const o = new Vt(
6065
- { name: "todoist-mcp-server", version: Fe },
6058
+ const o = new Jt(
6059
+ { name: "todoist-mcp-server", version: He },
6066
6060
  {
6067
6061
  capabilities: {
6068
6062
  tools: { listChanged: !0 },
6069
6063
  prompts: { listChanged: !0 }
6070
6064
  },
6071
- instructions: ac
6065
+ instructions: ic
6072
6066
  }
6073
- ), n = Fs(e, { baseUrl: t }), a = {
6074
- ...On,
6067
+ ), n = Hs(e, { baseUrl: t }), a = {
6068
+ ...Un,
6075
6069
  _meta: {
6076
6070
  ui: {
6077
- resourceUri: Pe
6071
+ resourceUri: Re
6078
6072
  }
6079
6073
  }
6080
6074
  };
6081
- fs(o);
6075
+ bs(o);
6082
6076
  const i = { server: o, client: n, features: r };
6083
- return y({ tool: To, ...i }), y({ tool: xo, ...i }), y({ tool: za, ...i }), y({ tool: Ni, ...i }), y({ tool: La, ...i }), y({ tool: Mn, ...i }), y({ tool: a, ...i }), y({ tool: on, ...i }), y({ tool: Zr, ...i }), y({ tool: bi, ...i }), y({ tool: kn, ...i }), y({ tool: Da, ...i }), y({ tool: Ea, ...i }), y({ tool: po, ...i }), y({ tool: xi, ...i }), y({ tool: Dn, ...i }), y({ tool: Er, ...i }), y({ tool: Vo, ...i }), y({ tool: Ja, ...i }), y({ tool: ao, ...i }), y({ tool: vn, ...i }), y({ tool: Si, ...i }), y({ tool: nc, ...i }), y({ tool: Yr, ...i }), y({ tool: li, ...i }), y({ tool: dn, ...i }), y({ tool: Rr, ...i }), y({ tool: Fr, ...i }), y({ tool: ti, ...i }), y({ tool: Wo, ...i }), y({ tool: Zn, ...i }), y({ tool: la, ...i }), y({ tool: ra, ...i }), y({ tool: Co, ...i }), y({ tool: ha, ...i }), y({ tool: Vn, ...i }), y({ tool: Uo, ...i }), y({ tool: _o, ...i }), y({ tool: Pa, ...i }), y({ tool: Ji, ...i }), y({ tool: mn, ...i }), y({ tool: Sa, ...i }), y({ tool: ka, ...i }), y({ tool: Wa, ...i }), y({ tool: Mo, ...i }), o.registerPrompt(
6084
- le.name,
6077
+ return y({ tool: wo, ...i }), y({ tool: Ao, ...i }), y({ tool: Ga, ...i }), y({ tool: Li, ...i }), y({ tool: Ma, ...i }), y({ tool: Fn, ...i }), y({ tool: a, ...i }), y({ tool: nn, ...i }), y({ tool: Qr, ...i }), y({ tool: gi, ...i }), y({ tool: Tn, ...i }), y({ tool: xa, ...i }), y({ tool: Oa, ...i }), y({ tool: mo, ...i }), y({ tool: Ai, ...i }), y({ tool: xn, ...i }), y({ tool: Or, ...i }), y({ tool: Jo, ...i }), y({ tool: Xa, ...i }), y({ tool: io, ...i }), y({ tool: jn, ...i }), y({ tool: Ci, ...i }), y({ tool: ac, ...i }), y({ tool: zr, ...i }), y({ tool: ui, ...i }), y({ tool: ln, ...i }), y({ tool: _r, ...i }), y({ tool: Hr, ...i }), y({ tool: si, ...i }), y({ tool: Bo, ...i }), y({ tool: Qn, ...i }), y({ tool: ua, ...i }), y({ tool: oa, ...i }), y({ tool: $o, ...i }), y({ tool: fa, ...i }), y({ tool: Jn, ...i }), y({ tool: Po, ...i }), y({ tool: No, ...i }), y({ tool: Ra, ...i }), y({ tool: Xi, ...i }), y({ tool: hn, ...i }), y({ tool: Ca, ...i }), y({ tool: Ta, ...i }), y({ tool: Ba, ...i }), y({ tool: Fo, ...i }), o.registerPrompt(
6078
+ ue.name,
6085
6079
  {
6086
- title: le.title,
6087
- description: le.description,
6088
- argsSchema: le.argsSchema
6080
+ title: ue.title,
6081
+ description: ue.description,
6082
+ argsSchema: ue.argsSchema
6089
6083
  },
6090
- le.callback
6084
+ ue.callback
6091
6085
  ), o;
6092
6086
  }
6093
6087
  export {
6094
- Dn as A,
6095
- xi as B,
6096
- po as C,
6097
- kn as D,
6098
- bi as E,
6099
- Zr as F,
6100
- La as G,
6101
- on as H,
6102
- On as I,
6103
- Mn as J,
6104
- Ni as K,
6105
- za as L,
6106
- xo as M,
6107
- To as N,
6108
- kc as O,
6109
- Fs as P,
6110
- Es as Q,
6111
- zs as R,
6112
- mn as a,
6113
- Vn as b,
6114
- ha as c,
6115
- Uo as d,
6116
- Co as e,
6117
- Mo as f,
6118
- Tc as g,
6119
- ra as h,
6120
- la as i,
6121
- Zn as j,
6122
- Wo as k,
6123
- ka as l,
6124
- Sa as m,
6125
- ti as n,
6126
- Fr as o,
6127
- Rr as p,
6128
- dn as q,
6129
- Pa as r,
6130
- Wa as s,
6131
- li as t,
6132
- Ji as u,
6133
- Yr as v,
6134
- nc as w,
6135
- Vo as x,
6136
- Ja as y,
6137
- Er as z
6088
+ xn as A,
6089
+ Ai as B,
6090
+ mo as C,
6091
+ Tn as D,
6092
+ gi as E,
6093
+ Qr as F,
6094
+ Ma as G,
6095
+ nn as H,
6096
+ Un as I,
6097
+ Fn as J,
6098
+ Li as K,
6099
+ Ga as L,
6100
+ Ao as M,
6101
+ wo as N,
6102
+ Tc as O,
6103
+ Hs as P,
6104
+ Os as Q,
6105
+ Gs as R,
6106
+ hn as a,
6107
+ Jn as b,
6108
+ fa as c,
6109
+ Po as d,
6110
+ $o as e,
6111
+ Fo as f,
6112
+ wc as g,
6113
+ oa as h,
6114
+ ua as i,
6115
+ Qn as j,
6116
+ Bo as k,
6117
+ Ta as l,
6118
+ Ca as m,
6119
+ si as n,
6120
+ Hr as o,
6121
+ _r as p,
6122
+ ln as q,
6123
+ Ra as r,
6124
+ Ba as s,
6125
+ ui as t,
6126
+ Xi as u,
6127
+ zr as v,
6128
+ ac as w,
6129
+ Jo as x,
6130
+ Xa as y,
6131
+ Or as z
6138
6132
  };