@doist/todoist-ai 8.8.8 → 8.9.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,32 +1,32 @@
1
- import { isWorkspaceProject as pe, isPersonalProject as oe, colors as xe, LOCATION_TRIGGERS as pt, REMINDER_TYPES as Lt, createCommand as Y, REMINDER_DELIVERY_SERVICES as Mt, HEALTH_STATUSES as Ue, getTaskUrl as mt, getProjectUrl as ht, WORKSPACE_ROLES as Ft, WORKSPACE_PLANS as Ht, TodoistApi as Wt } from "@doist/todoist-sdk";
2
- import { McpServer as Bt } from "@modelcontextprotocol/sdk/server/mcp.js";
3
- import { createHash as zt } from "node:crypto";
4
- import { readFileSync as Yt } from "node:fs";
5
- import { dirname as Gt, join as Je } from "node:path";
6
- import { fileURLToPath as qt } from "node:url";
7
- import { registerAppResource as Kt, RESOURCE_MIME_TYPE as Vt, registerAppTool as Jt } from "@modelcontextprotocol/ext-apps/server";
8
- import X, { ZodError as Xt, z as s } from "zod";
1
+ import { isWorkspaceProject as pe, isPersonalProject as ne, colors as xe, LOCATION_TRIGGERS as pt, REMINDER_TYPES as Ht, createCommand as Y, REMINDER_DELIVERY_SERVICES as Wt, HEALTH_STATUSES as Re, getTaskUrl as mt, getProjectUrl as ht, WORKSPACE_ROLES as Bt, WORKSPACE_PLANS as zt, TodoistApi as Yt } from "@doist/todoist-sdk";
2
+ import { McpServer as Gt } from "@modelcontextprotocol/sdk/server/mcp.js";
3
+ import { createHash as qt } from "node:crypto";
4
+ import { readFileSync as Kt } from "node:fs";
5
+ import { dirname as Vt, join as Je } from "node:path";
6
+ import { fileURLToPath as Jt } from "node:url";
7
+ import { registerAppResource as Xt, RESOURCE_MIME_TYPE as Zt, registerAppTool as Qt } from "@modelcontextprotocol/ext-apps/server";
8
+ import Z, { ZodError as es, z as s } from "zod";
9
9
  import { addDays as Ae, formatISO as Xe } from "date-fns";
10
- const Ze = Gt(qt(import.meta.url)), Zt = [
10
+ const Ze = Vt(Jt(import.meta.url)), ts = [
11
11
  Je(Ze, "task-list", "index.html"),
12
12
  Je(Ze, "mcp-apps", "index.html")
13
- ], Qt = `<!doctype html>
13
+ ], ss = `<!doctype html>
14
14
  <html>
15
15
  <body>
16
16
  <p>Task list app is missing. Run "npm run build" to generate it.</p>
17
17
  </body>
18
18
  </html>`;
19
- function es() {
19
+ function rs() {
20
20
  const e = [];
21
- for (const t of Zt)
21
+ for (const t of ts)
22
22
  try {
23
- return Yt(t, "utf-8");
23
+ return Kt(t, "utf-8");
24
24
  } catch (r) {
25
25
  e.push(r);
26
26
  }
27
- return console.error("Failed to load task list app HTML from any known path:", e), Qt;
27
+ return console.error("Failed to load task list app HTML from any known path:", e), ss;
28
28
  }
29
- const ft = es(), ts = zt("sha256").update(ft).digest("hex").slice(0, 12), Ee = `ui://todoist/task-list@${ts}`, bt = "Interactive task list widget", ss = "https://ai.todoist.net", Qe = {
29
+ const ft = rs(), os = qt("sha256").update(ft).digest("hex").slice(0, 12), Ee = `ui://todoist/task-list@${os}`, bt = "Interactive task list widget", ns = "https://ai.todoist.net", Qe = {
30
30
  ui: {
31
31
  prefersBorder: !0,
32
32
  csp: {
@@ -41,10 +41,10 @@ const ft = es(), ts = zt("sha256").update(ft).digest("hex").slice(0, 12), Ee = `
41
41
  connect_domains: [],
42
42
  resource_domains: []
43
43
  },
44
- "openai/widgetDomain": ss
44
+ "openai/widgetDomain": ns
45
45
  };
46
- function rs(e) {
47
- Kt(
46
+ function as(e) {
47
+ Xt(
48
48
  e,
49
49
  "todoist-task-list",
50
50
  Ee,
@@ -56,7 +56,7 @@ function rs(e) {
56
56
  contents: [
57
57
  {
58
58
  uri: Ee,
59
- mimeType: Vt,
59
+ mimeType: Zt,
60
60
  text: ft,
61
61
  _meta: Qe
62
62
  }
@@ -70,7 +70,7 @@ function G(e) {
70
70
  function Oe(...e) {
71
71
  return e.find(G);
72
72
  }
73
- function U(...e) {
73
+ function R(...e) {
74
74
  return e.find((t) => t !== void 0);
75
75
  }
76
76
  function E(e) {
@@ -87,18 +87,18 @@ function y(e) {
87
87
  if (typeof e == "number" || typeof e == "boolean")
88
88
  return String(e);
89
89
  }
90
- function Z(e) {
90
+ function Q(e) {
91
91
  const t = E(e);
92
92
  return t !== void 0 ? t : y(e);
93
93
  }
94
- function os(e) {
94
+ function is(e) {
95
95
  return e.replace(/\b(Bearer)\s+[A-Za-z0-9._~+/=-]+/gi, "$1 [REDACTED]").replace(
96
96
  /\b(token|api[_-]?key|authorization)\s*[:=]\s*["']?[A-Za-z0-9._~+/=-]{6,}["']?/gi,
97
97
  "$1: [REDACTED]"
98
98
  ).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]");
99
99
  }
100
100
  function P(e, t = 220) {
101
- const r = os(e).replace(/\s+/g, " ").trim();
101
+ const r = is(e).replace(/\s+/g, " ").trim();
102
102
  return r.length <= t ? r : `${r.slice(0, t - 3)}...`;
103
103
  }
104
104
  function et(e) {
@@ -112,7 +112,7 @@ function je(e) {
112
112
  if (t?.[1])
113
113
  return E(t[1]);
114
114
  }
115
- function B(e) {
115
+ function z(e) {
116
116
  const t = y(e);
117
117
  if (t)
118
118
  return P(t);
@@ -122,7 +122,7 @@ function B(e) {
122
122
  }
123
123
  if (!G(e))
124
124
  return;
125
- const r = U(
125
+ const r = R(
126
126
  y(e.detail),
127
127
  y(e.details),
128
128
  y(e.message),
@@ -139,12 +139,12 @@ function B(e) {
139
139
  }
140
140
  return o.length > 0 ? P(o.join("; ")) : void 0;
141
141
  }
142
- function ns(e) {
142
+ function cs(e) {
143
143
  if (!e)
144
144
  return [];
145
145
  const t = /* @__PURE__ */ new Set(), r = (i) => {
146
146
  i && t.add(P(i, 120));
147
- }, o = U(
147
+ }, o = R(
148
148
  y(e.field),
149
149
  y(e.parameter),
150
150
  y(e.param),
@@ -158,7 +158,7 @@ function ns(e) {
158
158
  e.error_extra
159
159
  );
160
160
  if (n) {
161
- const i = U(
161
+ const i = R(
162
162
  y(n.field),
163
163
  y(n.parameter),
164
164
  y(n.param),
@@ -174,13 +174,13 @@ function ns(e) {
174
174
  r(y(i));
175
175
  continue;
176
176
  }
177
- const c = U(
177
+ const c = R(
178
178
  y(i.field),
179
179
  y(i.parameter),
180
180
  y(i.param),
181
181
  y(i.path),
182
182
  y(i.name)
183
- ), d = U(
183
+ ), d = R(
184
184
  y(i.message),
185
185
  y(i.error),
186
186
  y(i.detail),
@@ -202,7 +202,7 @@ function ns(e) {
202
202
  }
203
203
  return Array.from(t).slice(0, 3);
204
204
  }
205
- const as = [
205
+ const ds = [
206
206
  "error",
207
207
  "error_code",
208
208
  "error_tag",
@@ -213,20 +213,20 @@ const as = [
213
213
  "httpCode",
214
214
  "errorExtra"
215
215
  ];
216
- function is(e) {
217
- return e ? as.some((t) => e[t] !== void 0) : !1;
216
+ function ls(e) {
217
+ return e ? ds.some((t) => e[t] !== void 0) : !1;
218
218
  }
219
- function cs(e, t) {
219
+ function us(e, t) {
220
220
  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.";
221
221
  }
222
- function ds(e) {
222
+ function ps(e) {
223
223
  const t = G(e) ? e : void 0, r = e instanceof Error && G(e.cause) ? e.cause : void 0, o = Oe(t?.response, r?.response), n = Oe(
224
224
  t?.responseData,
225
225
  o?.data,
226
226
  t?.data,
227
227
  r?.responseData,
228
228
  r?.data
229
- ), a = U(
229
+ ), a = R(
230
230
  E(t?.httpStatusCode),
231
231
  E(t?.statusCode),
232
232
  E(t?.status),
@@ -239,14 +239,14 @@ function ds(e) {
239
239
  je(y(t?.message)),
240
240
  je(y(r?.message)),
241
241
  je(typeof e == "string" ? e : void 0)
242
- ), i = U(
243
- Z(n?.errorCode),
244
- Z(n?.error_code),
245
- Z(n?.code),
246
- Z(t?.errorCode),
247
- Z(t?.error_code),
248
- Z(t?.code)
249
- ), c = U(
242
+ ), i = R(
243
+ Q(n?.errorCode),
244
+ Q(n?.error_code),
245
+ Q(n?.code),
246
+ Q(t?.errorCode),
247
+ Q(t?.error_code),
248
+ Q(t?.code)
249
+ ), c = R(
250
250
  y(n?.errorTag),
251
251
  y(n?.error_tag),
252
252
  y(n?.tag),
@@ -256,19 +256,19 @@ function ds(e) {
256
256
  ), d = [
257
257
  y(n?.error),
258
258
  y(n?.message),
259
- B(n?.message),
259
+ z(n?.message),
260
260
  y(t?.message),
261
261
  y(r?.message),
262
262
  e instanceof Error ? e.message : y(e)
263
- ].filter((h) => !!h), l = d.find((h) => !et(h)) || d[0], p = U(
264
- B(n?.errorExtra),
265
- B(n?.error_extra),
266
- B(n?.details),
267
- B(n?.errorDetails),
268
- B(n?.errors),
269
- B(t?.details)
270
- ), u = ns(n);
271
- return a !== void 0 || is(n) || c !== void 0 || i !== void 0 || (l ? et(l) : !1) ? {
263
+ ].filter((h) => !!h), l = d.find((h) => !et(h)) || d[0], p = R(
264
+ z(n?.errorExtra),
265
+ z(n?.error_extra),
266
+ z(n?.details),
267
+ z(n?.errorDetails),
268
+ z(n?.errors),
269
+ z(t?.details)
270
+ ), u = cs(n);
271
+ return a !== void 0 || ls(n) || c !== void 0 || i !== void 0 || (l ? et(l) : !1) ? {
272
272
  statusCode: a,
273
273
  code: i,
274
274
  tag: c ? P(c, 80) : void 0,
@@ -277,26 +277,26 @@ function ds(e) {
277
277
  fieldHints: u
278
278
  } : null;
279
279
  }
280
- function ls(e) {
280
+ function ms(e) {
281
281
  const t = [];
282
282
  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}`);
283
283
  const r = [
284
284
  t.length > 0 ? `Todoist API request failed (${t.join(", ")}).` : "Todoist API request failed."
285
285
  ];
286
- 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: ${cs(e.statusCode, e.fieldHints.length > 0)}`), r.join(`
286
+ 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: ${us(e.statusCode, e.fieldHints.length > 0)}`), r.join(`
287
287
  `);
288
288
  }
289
- function us(e) {
289
+ function hs(e) {
290
290
  return e instanceof Error ? P(e.message) : typeof e == "string" ? P(e) : "An unknown error occurred";
291
291
  }
292
- function ps(e) {
293
- if (e instanceof Xt)
292
+ function fs(e) {
293
+ if (e instanceof es)
294
294
  return e.message;
295
- const t = ds(e);
296
- return t ? ls(t) : us(e);
295
+ const t = ps(e);
296
+ return t ? ms(t) : hs(e);
297
297
  }
298
- const ms = 2, hs = 500, fs = 2e3, bs = /* @__PURE__ */ new Set([502, 503, 504]);
299
- function gs(e) {
298
+ const bs = 2, gs = 500, ys = 2e3, ks = /* @__PURE__ */ new Set([502, 503, 504]);
299
+ function Ts(e) {
300
300
  if (e == null || typeof e != "object")
301
301
  return;
302
302
  const t = e;
@@ -312,11 +312,11 @@ function gs(e) {
312
312
  return Number(r[1]);
313
313
  }
314
314
  }
315
- function ys(e) {
316
- const t = gs(e);
317
- return t !== void 0 && bs.has(t);
315
+ function ws(e) {
316
+ const t = Ts(e);
317
+ return t !== void 0 && ks.has(t);
318
318
  }
319
- function ks({
319
+ function Is({
320
320
  attempt: e,
321
321
  baseDelayMs: t,
322
322
  maxDelayMs: r
@@ -324,19 +324,19 @@ function ks({
324
324
  const o = t * 2 ** e;
325
325
  return Math.min(o, r);
326
326
  }
327
- function Ts(e) {
327
+ function vs(e) {
328
328
  return new Promise((t) => setTimeout(t, e));
329
329
  }
330
- async function ws(e, t = {}) {
331
- const r = t.maxRetries ?? ms, o = t.baseDelayMs ?? hs, n = t.maxDelayMs ?? fs;
330
+ async function js(e, t = {}) {
331
+ const r = t.maxRetries ?? bs, o = t.baseDelayMs ?? gs, n = t.maxDelayMs ?? ys;
332
332
  let a;
333
333
  for (let i = 0; i <= r; i++)
334
334
  try {
335
335
  return await e();
336
336
  } catch (c) {
337
- if (a = c, i < r && ys(c)) {
338
- const d = ks({ attempt: i, baseDelayMs: o, maxDelayMs: n });
339
- await Ts(d);
337
+ if (a = c, i < r && ws(c)) {
338
+ const d = Is({ attempt: i, baseDelayMs: o, maxDelayMs: n });
339
+ await vs(d);
340
340
  continue;
341
341
  }
342
342
  throw c;
@@ -420,20 +420,20 @@ const f = {
420
420
  // OpenAI MCP tools
421
421
  SEARCH: "search",
422
422
  FETCH: "fetch"
423
- }, Ri = {
423
+ }, Li = {
424
424
  /**
425
425
  * Strips email addresses from tool outputs that expose user data.
426
426
  * Affects: find-project-collaborators, find-completed-tasks
427
427
  */
428
428
  STRIP_EMAILS: "strip_emails"
429
- }, Is = process.env.USE_STRUCTURED_CONTENT === "true" || process.env.NODE_ENV === "test";
430
- function vs({
429
+ }, Ss = process.env.USE_STRUCTURED_CONTENT === "true" || process.env.NODE_ENV === "test";
430
+ function Cs({
431
431
  textContent: e,
432
432
  structuredContent: t,
433
433
  contentItems: r
434
434
  }) {
435
435
  const o = Pe(t), n = {}, a = [];
436
- if (e && a.push({ type: "text", text: e }), r && a.push(...r), a.length > 0 && (n.content = a), t && (n.structuredContent = o), !Is && t) {
436
+ if (e && a.push({ type: "text", text: e }), r && a.push(...r), a.length > 0 && (n.content = a), t && (n.structuredContent = o), !Ss && t) {
437
437
  const i = JSON.stringify(o);
438
438
  n.content || (n.content = []), n.content.push({
439
439
  type: "text",
@@ -442,42 +442,42 @@ function vs({
442
442
  }
443
443
  return n;
444
444
  }
445
- function js(e) {
445
+ function $s(e) {
446
446
  return {
447
447
  content: [{ type: "text", text: e }],
448
448
  isError: !0
449
449
  };
450
450
  }
451
- function Ss(e) {
451
+ function Ds(e) {
452
452
  return { ...{
453
- title: `Todoist: ${Cs(e.name)}`,
453
+ title: `Todoist: ${xs(e.name)}`,
454
454
  openWorldHint: !1
455
455
  }, ...e.annotations };
456
456
  }
457
- function Cs(e) {
457
+ function xs(e) {
458
458
  return e.split("-").filter(Boolean).map((t) => `${t.charAt(0).toUpperCase()}${t.slice(1)}`).join(" ");
459
459
  }
460
- function $s(e) {
460
+ function As(e) {
461
461
  return e ? typeof e["ui/resourceUri"] == "string" ? !0 : typeof e.ui == "object" && e.ui !== null : !1;
462
462
  }
463
- const Ds = [
463
+ const Es = [
464
464
  f.FIND_PROJECT_COLLABORATORS,
465
465
  f.FIND_COMPLETED_TASKS
466
466
  ];
467
- function _e(e) {
467
+ function Ue(e) {
468
468
  if (e == null)
469
469
  return e;
470
470
  if (Array.isArray(e))
471
- return e.map((t) => _e(t));
471
+ return e.map((t) => Ue(t));
472
472
  if (typeof e == "object") {
473
473
  const t = {};
474
474
  for (const [r, o] of Object.entries(e))
475
- r !== "email" && (t[r] = _e(o));
475
+ r !== "email" && (t[r] = Ue(o));
476
476
  return t;
477
477
  }
478
478
  return e;
479
479
  }
480
- function xs(e) {
480
+ function Os(e) {
481
481
  const t = /\s*\([^)]*@[^)]+\)/g, r = /\S+@\S+\.\S+/g;
482
482
  return e.replace(t, "").replace(r, "[email hidden]");
483
483
  }
@@ -487,24 +487,24 @@ function k({
487
487
  client: r,
488
488
  features: o = []
489
489
  }) {
490
- const n = o.some((c) => c.name === "strip_emails") && Ds.includes(e.name), a = async (c, d) => {
490
+ const n = o.some((c) => c.name === "strip_emails") && Es.includes(e.name), a = async (c, d) => {
491
491
  try {
492
- let { textContent: l, structuredContent: p, contentItems: u } = await ws(
492
+ let { textContent: l, structuredContent: p, contentItems: u } = await js(
493
493
  () => e.execute(c, r)
494
494
  );
495
- return n && (l && (l = xs(l)), p && (p = _e(p))), vs({ textContent: l, structuredContent: p, contentItems: u });
495
+ return n && (l && (l = Os(l)), p && (p = Ue(p))), Cs({ textContent: l, structuredContent: p, contentItems: u });
496
496
  } catch (l) {
497
- return console.error(`Error executing tool ${e.name}:`, { args: c, error: l }), js(ps(l));
497
+ return console.error(`Error executing tool ${e.name}:`, { args: c, error: l }), $s(fs(l));
498
498
  }
499
499
  }, i = {
500
500
  description: e.description,
501
501
  inputSchema: e.parameters,
502
502
  outputSchema: e.outputSchema,
503
- annotations: Ss(e),
503
+ annotations: Ds(e),
504
504
  ...e._meta ? { _meta: e._meta } : {}
505
505
  };
506
- if ($s(e._meta)) {
507
- Jt(
506
+ if (As(e._meta)) {
507
+ Qt(
508
508
  t,
509
509
  e.name,
510
510
  {
@@ -517,7 +517,7 @@ function k({
517
517
  }
518
518
  t.registerTool(e.name, i, a);
519
519
  }
520
- const As = {
520
+ const Ps = {
521
521
  period: s.enum(["today", "7d", "14d", "30d", "this-week", "this-month"]).default("7d").describe(
522
522
  '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.'
523
523
  ),
@@ -526,7 +526,7 @@ const As = {
526
526
  ),
527
527
  projectId: s.string().optional().describe("Optional project ID to scope the analysis to a specific project.")
528
528
  };
529
- function Es(e, t = /* @__PURE__ */ new Date()) {
529
+ function Us(e, t = /* @__PURE__ */ new Date()) {
530
530
  const r = (n) => n.toISOString().slice(0, 10), o = r(t);
531
531
  switch (e) {
532
532
  case "today":
@@ -573,7 +573,7 @@ function Es(e, t = /* @__PURE__ */ new Date()) {
573
573
  }
574
574
  }
575
575
  }
576
- function Os(e) {
576
+ function _s(e) {
577
577
  const t = {
578
578
  goals: `### Goal Tracking
579
579
  - Compare tasks completed today vs the daily goal
@@ -604,8 +604,8 @@ function Os(e) {
604
604
 
605
605
  `) : t[e] ?? "";
606
606
  }
607
- function Ps(e) {
608
- const { since: t, until: r, periodDescription: o } = Es(e.period), n = e.projectId ? `
607
+ function Rs(e) {
608
+ const { since: t, until: r, periodDescription: o } = Us(e.period), n = e.projectId ? `
609
609
  Scope this analysis to project ID: ${e.projectId}. Pass this projectId when calling find-completed-tasks and get-overview.` : "";
610
610
  return `Analyze my Todoist productivity for ${o} (${t} to ${r}).${n}
611
611
 
@@ -626,7 +626,7 @@ ${e.focus === "overall" || e.focus === "projects" ? `4. **get-overview** — Get
626
626
 
627
627
  Using the collected data, produce an analysis covering the following sections:
628
628
 
629
- ${Os(e.focus)}
629
+ ${_s(e.focus)}
630
630
 
631
631
  ### Step 3: Format
632
632
 
@@ -636,14 +636,14 @@ Present the analysis as a clear, well-structured markdown report with:
636
636
  - Specific numbers and comparisons (not vague statements)
637
637
  - Actionable takeaways highlighted clearly`;
638
638
  }
639
- function _s(e) {
639
+ function Ns(e) {
640
640
  return {
641
641
  messages: [
642
642
  {
643
643
  role: "user",
644
644
  content: {
645
645
  type: "text",
646
- text: Ps(e)
646
+ text: Rs(e)
647
647
  }
648
648
  }
649
649
  ]
@@ -653,8 +653,8 @@ const ce = {
653
653
  name: "productivity-analysis",
654
654
  title: "Productivity Analysis",
655
655
  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.",
656
- argsSchema: As,
657
- callback: _s
656
+ argsSchema: Ps,
657
+ callback: Ns
658
658
  }, C = {
659
659
  /** Default limit for task listings */
660
660
  TASKS_DEFAULT: 10,
@@ -727,20 +727,20 @@ function gt(e) {
727
727
  throw new O(e, "Duration cannot exceed 24 hours (1440 minutes)");
728
728
  return { minutes: o };
729
729
  }
730
- function Rs(e) {
730
+ function Ls(e) {
731
731
  if (e <= 0) return "0m";
732
732
  const t = Math.floor(e / 60), r = e % 60;
733
733
  return t === 0 ? `${r}m` : r === 0 ? `${t}h` : `${t}h${r}m`;
734
734
  }
735
- const Us = ["p1", "p2", "p3", "p4"], Ne = '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.', Le = s.enum(Us).describe(Ne);
735
+ const Ms = ["p1", "p2", "p3", "p4"], Ne = '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.', Le = s.enum(Ms).describe(Ne);
736
736
  function yt(e) {
737
737
  return { p1: 4, p2: 3, p3: 2, p4: 1 }[e];
738
738
  }
739
- function Ns(e) {
739
+ function Fs(e) {
740
740
  return { 4: "p1", 3: "p2", 2: "p3", 1: "p4" }[e];
741
741
  }
742
- const A = /* @__PURE__ */ new Map(), Q = /* @__PURE__ */ new Map(), Ce = 300 * 1e3, Ls = "me";
743
- class Ms {
742
+ const A = /* @__PURE__ */ new Map(), ee = /* @__PURE__ */ new Map(), Ce = 300 * 1e3, Hs = "me";
743
+ class Ws {
744
744
  /**
745
745
  * Resolve a user name or ID to a user ID by looking up collaborators across all shared projects.
746
746
  * Supports exact name matches, partial matches, email matches, and the "me" keyword.
@@ -751,7 +751,7 @@ class Ms {
751
751
  const o = r.trim(), n = A.get(o);
752
752
  if (n && Date.now() - n.timestamp < Ce)
753
753
  return n.result;
754
- if (o.toLowerCase() === Ls)
754
+ if (o.toLowerCase() === Hs)
755
755
  try {
756
756
  const a = await t.getUser();
757
757
  return {
@@ -824,12 +824,12 @@ class Ms {
824
824
  * Get collaborators for a specific project
825
825
  */
826
826
  async getProjectCollaborators(t, r) {
827
- const o = `project_${r}`, n = Q.get(o);
827
+ const o = `project_${r}`, n = ee.get(o);
828
828
  if (n && Date.now() - n.timestamp < Ce)
829
829
  return n.result;
830
830
  try {
831
831
  const a = await t.getProjectCollaborators(r), c = (Array.isArray(a) ? a : a.results || []).filter((d) => d?.id && d.name && d.email);
832
- return Q.set(o, {
832
+ return ee.set(o, {
833
833
  result: c,
834
834
  timestamp: Date.now()
835
835
  }), c;
@@ -838,17 +838,20 @@ class Ms {
838
838
  }
839
839
  }
840
840
  /**
841
- * Get all collaborators from all shared projects
841
+ * Get all collaborators from all shared projects, deduplicated by user ID.
842
842
  */
843
843
  async getAllCollaborators(t) {
844
- const r = "all_collaborators", o = Q.get(r);
844
+ const r = "all_collaborators", o = ee.get(r);
845
845
  if (o && Date.now() - o.timestamp < Ce)
846
846
  return o.result;
847
847
  try {
848
- const { results: n } = await t.getProjects({}), a = n.filter((p) => p.isShared);
848
+ const a = (await q({
849
+ apiMethod: t.getProjects.bind(t),
850
+ args: {}
851
+ })).filter((p) => p.isShared);
849
852
  if (a.length === 0) {
850
853
  const p = [];
851
- return Q.set(r, { result: p, timestamp: Date.now() }), p;
854
+ return ee.set(r, { result: p, timestamp: Date.now() }), p;
852
855
  }
853
856
  const i = [], c = /* @__PURE__ */ new Set(), d = a.map(
854
857
  (p) => this.getProjectCollaborators(t, p.id)
@@ -857,7 +860,7 @@ class Ms {
857
860
  if (p.status === "fulfilled")
858
861
  for (const u of p.value)
859
862
  u && !c.has(u.id) && (i.push(u), c.add(u.id));
860
- return Q.set(r, {
863
+ return ee.set(r, {
861
864
  result: i,
862
865
  timestamp: Date.now()
863
866
  }), i;
@@ -869,25 +872,25 @@ class Ms {
869
872
  * Clear all caches - useful for testing
870
873
  */
871
874
  clearCache() {
872
- A.clear(), Q.clear();
875
+ A.clear(), ee.clear();
873
876
  }
874
877
  }
875
- const z = new Ms();
876
- async function Fs(e, t) {
877
- return z.resolveUser(e, t);
878
+ const H = new Ws();
879
+ async function Bs(e, t) {
880
+ return H.resolveUser(e, t);
878
881
  }
879
882
  const kt = ["assigned", "unassignedOrMe", "all"];
880
883
  async function Me(e, t) {
881
884
  if (!t)
882
885
  return;
883
- const r = await Fs(e, t);
886
+ const r = await Bs(e, t);
884
887
  if (!r)
885
888
  throw new Error(
886
889
  `Could not find user: "${t}". Make sure the user is a collaborator on a shared project.`
887
890
  );
888
891
  return { userId: r.userId, email: r.email };
889
892
  }
890
- function re(e, t) {
893
+ function oe(e, t) {
891
894
  return t.length === 0 ? e : e.length === 0 ? t : `${e} & ${t}`;
892
895
  }
893
896
  function Tt({
@@ -897,7 +900,7 @@ function Tt({
897
900
  }) {
898
901
  return e && t ? `assigned to: ${t}` : r === "unassignedOrMe" ? "!assigned to: others" : r === "assigned" ? "assigned to: others" : "";
899
902
  }
900
- function Hs({
903
+ function zs({
901
904
  tasks: e,
902
905
  resolvedAssigneeId: t,
903
906
  currentUserId: r,
@@ -908,7 +911,7 @@ function Hs({
908
911
  function le(e) {
909
912
  return e?.toLowerCase() === "inbox";
910
913
  }
911
- async function q(e) {
914
+ async function K(e) {
912
915
  const { projectId: t, user: r, client: o } = e;
913
916
  if (!le(t))
914
917
  return t;
@@ -917,7 +920,7 @@ async function q(e) {
917
920
  throw new Error("Either user or client must be provided when resolving inbox project ID");
918
921
  return n.inboxProjectId;
919
922
  }
920
- async function ne(e) {
923
+ async function q(e) {
921
924
  const { apiMethod: t, args: r, limit: o = 100 } = e, n = [];
922
925
  let a = null;
923
926
  do {
@@ -934,35 +937,35 @@ function Fe(e) {
934
937
  return /(?<!\\)(?:\\\\)*\*/.test(e) ? e : `*${e.replaceAll(/\\(?!\*)/g, "\\\\")}*`;
935
938
  }
936
939
  async function wt(e, t) {
937
- return ne({
940
+ return q({
938
941
  apiMethod: e.searchProjects.bind(e),
939
942
  args: { query: Fe(t) },
940
943
  limit: C.PROJECTS_MAX
941
944
  });
942
945
  }
943
- async function Ws(e, t) {
944
- return ne({
946
+ async function Ys(e, t) {
947
+ return q({
945
948
  apiMethod: e.searchLabels.bind(e),
946
949
  args: { query: Fe(t) },
947
950
  limit: C.LABELS_MAX
948
951
  });
949
952
  }
950
- async function Bs(e) {
951
- return ne({
953
+ async function Gs(e) {
954
+ return q({
952
955
  apiMethod: e.getSharedLabels.bind(e),
953
956
  args: {},
954
957
  limit: C.LABELS_MAX
955
958
  });
956
959
  }
957
- async function zs(e, t, r) {
960
+ async function qs(e, t, r) {
958
961
  const o = Fe(t);
959
- return ne({
962
+ return q({
960
963
  apiMethod: e.searchSections.bind(e),
961
964
  args: r ? { query: o, projectId: r } : { query: o },
962
965
  limit: C.SECTIONS_MAX
963
966
  });
964
967
  }
965
- function Ys(e, t, r, o) {
968
+ function Ks(e, t, r, o) {
966
969
  const n = [t, r, o].filter(Boolean);
967
970
  if (n.length > 1)
968
971
  throw new Error(
@@ -977,7 +980,7 @@ function Ys(e, t, r, o) {
977
980
  if (o) return { parentId: o };
978
981
  throw new Error("Unexpected error: No valid move parameter found");
979
982
  }
980
- function _(e) {
983
+ function U(e) {
981
984
  return {
982
985
  id: e.id,
983
986
  content: e.content,
@@ -985,27 +988,27 @@ function _(e) {
985
988
  dueDate: e.due?.date,
986
989
  recurring: e.due?.isRecurring && e.due.string ? e.due.string : !1,
987
990
  deadlineDate: e.deadline?.date,
988
- priority: Ns(e.priority) ?? "p4",
991
+ priority: Fs(e.priority) ?? "p4",
989
992
  projectId: e.projectId,
990
993
  sectionId: e.sectionId ?? void 0,
991
994
  parentId: e.parentId ?? void 0,
992
995
  labels: e.labels,
993
- duration: e.duration ? Rs(e.duration.amount) : void 0,
996
+ duration: e.duration ? Ls(e.duration.amount) : void 0,
994
997
  responsibleUid: e.responsibleUid ?? void 0,
995
998
  assignedByUid: e.assignedByUid ?? void 0,
996
999
  checked: e.checked,
997
- completedAt: e.completedAt ?? void 0
1000
+ completedAt: e.completedAt?.toISOString() ?? void 0
998
1001
  };
999
1002
  }
1000
- function K(e) {
1003
+ function V(e) {
1001
1004
  return {
1002
1005
  id: e.id,
1003
1006
  name: e.name,
1004
1007
  color: e.color,
1005
1008
  isFavorite: e.isFavorite,
1006
1009
  isShared: e.isShared,
1007
- parentId: oe(e) ? e.parentId ?? void 0 : void 0,
1008
- inboxProject: oe(e) ? e.inboxProject ?? !1 : !1,
1010
+ parentId: ne(e) ? e.parentId ?? void 0 : void 0,
1011
+ inboxProject: ne(e) ? e.inboxProject ?? !1 : !1,
1009
1012
  viewStyle: e.viewStyle,
1010
1013
  workspaceId: pe(e) ? e.workspaceId : void 0,
1011
1014
  folderId: pe(e) ? e.folderId ?? void 0 : void 0,
@@ -1018,7 +1021,7 @@ function he(e) {
1018
1021
  taskId: e.taskId ?? void 0,
1019
1022
  projectId: e.projectId ?? void 0,
1020
1023
  content: e.content,
1021
- postedAt: e.postedAt,
1024
+ postedAt: e.postedAt.toISOString(),
1022
1025
  postedUid: e.postedUid ?? void 0,
1023
1026
  fileAttachment: e.fileAttachment ? {
1024
1027
  resourceType: e.fileAttachment.resourceType,
@@ -1036,25 +1039,25 @@ function he(e) {
1036
1039
  } : void 0
1037
1040
  };
1038
1041
  }
1039
- function Gs(e) {
1042
+ function Vs(e) {
1040
1043
  return {
1041
1044
  id: e.id ?? void 0,
1042
1045
  objectType: e.objectType,
1043
1046
  objectId: e.objectId,
1044
1047
  eventType: e.eventType,
1045
- eventDate: e.eventDate,
1048
+ eventDate: e.eventDate.toISOString(),
1046
1049
  parentProjectId: e.parentProjectId ?? void 0,
1047
1050
  parentItemId: e.parentItemId ?? void 0,
1048
1051
  initiatorId: e.initiatorId ?? void 0,
1049
1052
  extraData: e.extraData ?? void 0
1050
1053
  };
1051
1054
  }
1052
- const qs = X.object({
1053
- httpStatusCode: X.number(),
1054
- responseData: X.object({
1055
- error: X.string(),
1056
- errorCode: X.number(),
1057
- errorTag: X.string()
1055
+ const Js = Z.object({
1056
+ httpStatusCode: Z.number(),
1057
+ responseData: Z.object({
1058
+ error: Z.string(),
1059
+ errorCode: Z.number(),
1060
+ errorTag: Z.string()
1058
1061
  })
1059
1062
  });
1060
1063
  async function He({
@@ -1065,9 +1068,9 @@ async function He({
1065
1068
  }) {
1066
1069
  try {
1067
1070
  const { results: n, nextCursor: a } = await e.getTasksByFilter({ query: t, cursor: o, limit: r });
1068
- return { tasks: n.map(_), nextCursor: a };
1071
+ return { tasks: n.map(U), nextCursor: a };
1069
1072
  } catch (n) {
1070
- const a = qs.safeParse(n);
1073
+ const a = Js.safeParse(n);
1071
1074
  if (!a.success)
1072
1075
  throw n;
1073
1076
  const { responseData: i } = a.data;
@@ -1123,14 +1126,14 @@ function It(e) {
1123
1126
  return { timeBasedCount: t, locationCount: r };
1124
1127
  }
1125
1128
  const fe = xe.map((e) => e.key);
1126
- function Ks(e) {
1129
+ function Xs(e) {
1127
1130
  if (typeof e != "string") return;
1128
1131
  const t = e.toLowerCase();
1129
1132
  return (xe.find((o) => o.key === t) ?? xe.find((o) => o.displayName.toLowerCase() === t))?.key;
1130
1133
  }
1131
- const Vs = `Color for the entity. Accepts a color key (e.g. "berry_red") or display name (e.g. "Berry Red"). Valid colors: ${fe.join(", ")}. Unrecognized colors are omitted and charcoal will be used as the default.`, ue = s.preprocess(Ks, s.enum(fe).optional()).describe(Vs);
1134
+ const Zs = `Color for the entity. Accepts a color key (e.g. "berry_red") or display name (e.g. "Berry Red"). Valid colors: ${fe.join(", ")}. Unrecognized colors are omitted and charcoal will be used as the default.`, ue = s.preprocess(Xs, s.enum(fe).optional()).describe(Zs);
1132
1135
  s.enum(fe).describe("The color key of the entity.");
1133
- const ae = s.enum(fe).optional().catch(void 0).describe("The color key of the entity."), V = s.object({
1136
+ const ae = s.enum(fe).optional().catch(void 0).describe("The color key of the entity."), J = s.object({
1134
1137
  id: s.string().describe("The unique ID of the task."),
1135
1138
  content: s.string().describe("The task title/content."),
1136
1139
  description: s.string().describe("The task description."),
@@ -1167,7 +1170,7 @@ const ae = s.enum(fe).optional().catch(void 0).describe("The color key of the en
1167
1170
  }), be = s.object({
1168
1171
  id: s.string().describe("The unique ID of the section."),
1169
1172
  name: s.string().describe("The name of the section.")
1170
- }), Js = s.object({
1173
+ }), Qs = s.object({
1171
1174
  resourceType: s.string().describe("The type of resource (file, url, image, etc)."),
1172
1175
  fileName: s.string().optional().describe("The name of the file."),
1173
1176
  fileSize: s.number().optional().describe("The size of the file in bytes."),
@@ -1187,8 +1190,8 @@ const ae = s.enum(fe).optional().catch(void 0).describe("The color key of the en
1187
1190
  content: s.string().describe("The content of the comment."),
1188
1191
  postedAt: s.string().describe("When the comment was posted (ISO 8601 format)."),
1189
1192
  postedUid: s.string().optional().describe("The UID of the user who posted this comment."),
1190
- fileAttachment: Js.optional().describe("File attachment information, if any.")
1191
- }), Xs = s.object({
1193
+ fileAttachment: Qs.optional().describe("File attachment information, if any.")
1194
+ }), er = s.object({
1192
1195
  id: s.string().optional().describe("The unique ID of the activity event."),
1193
1196
  objectType: s.string().describe("The type of object this event relates to (task, project, etc)."),
1194
1197
  objectId: s.string().describe("The ID of the object this event relates to."),
@@ -1198,7 +1201,7 @@ const ae = s.enum(fe).optional().catch(void 0).describe("The color key of the en
1198
1201
  parentItemId: s.string().optional().describe("The ID of the parent item."),
1199
1202
  initiatorId: s.string().optional().describe("The ID of the user who initiated this event."),
1200
1203
  extraData: s.record(s.string(), s.unknown()).optional().describe("Additional event data.")
1201
- }), Zs = s.object({
1204
+ }), tr = s.object({
1202
1205
  id: s.string().describe("The unique ID of the user."),
1203
1206
  name: s.string().describe("The full name of the user."),
1204
1207
  email: s.string().describe("The email address of the user.")
@@ -1208,7 +1211,7 @@ const ae = s.enum(fe).optional().catch(void 0).describe("The color key of the en
1208
1211
  color: ae,
1209
1212
  order: s.number().optional().catch(void 0).describe("The display order of the label."),
1210
1213
  isFavorite: s.boolean().describe("Whether the label is marked as favorite.")
1211
- }), Qs = s.object({
1214
+ }), sr = s.object({
1212
1215
  isRecurring: s.boolean().describe("Whether this is a recurring reminder."),
1213
1216
  string: s.string().describe("Human-readable due string."),
1214
1217
  date: s.string().describe("Due date in ISO format."),
@@ -1217,9 +1220,9 @@ const ae = s.enum(fe).optional().catch(void 0).describe("The color key of the en
1217
1220
  }), We = s.object({
1218
1221
  id: s.string().describe("The unique ID of the reminder."),
1219
1222
  taskId: s.string().describe("The task ID this reminder belongs to."),
1220
- type: s.enum(Lt).describe("The type of reminder: relative, absolute, or location."),
1223
+ type: s.enum(Ht).describe("The type of reminder: relative, absolute, or location."),
1221
1224
  minuteOffset: s.number().optional().describe("Minutes before due time to trigger (relative reminders only)."),
1222
- due: Qs.optional().describe(
1225
+ due: sr.optional().describe(
1223
1226
  "Due date info (absolute and sometimes relative reminders)."
1224
1227
  ),
1225
1228
  name: s.string().optional().describe("Location name (location reminders only)."),
@@ -1232,23 +1235,23 @@ const ae = s.enum(fe).optional().catch(void 0).describe("The color key of the en
1232
1235
  item: s.string().describe("The item that failed (usually an ID or identifier)."),
1233
1236
  error: s.string().describe("The error message."),
1234
1237
  code: s.string().optional().describe("The error code, if available.")
1235
- }), er = s.object({
1238
+ }), rr = s.object({
1236
1239
  taskId: s.string().optional().describe("The ID of the task to comment on."),
1237
1240
  projectId: s.string().optional().describe(
1238
1241
  'The ID of the project to comment on. Project ID should be an ID string, or the text "inbox", for inbox tasks.'
1239
1242
  ),
1240
1243
  content: s.string().min(1).describe("The content of the comment.")
1241
- }), tr = {
1242
- comments: s.array(er).min(1).describe("The array of comments to add.")
1243
- }, sr = {
1244
+ }), or = {
1245
+ comments: s.array(rr).min(1).describe("The array of comments to add.")
1246
+ }, nr = {
1244
1247
  comments: s.array(ge).describe("The created comments."),
1245
1248
  totalCount: s.number().describe("The total number of comments created."),
1246
1249
  addedCommentIds: s.array(s.string()).describe("The IDs of the added comments.")
1247
- }, rr = {
1250
+ }, ar = {
1248
1251
  name: f.ADD_COMMENTS,
1249
1252
  description: "Add multiple comments to tasks or projects. Each comment must specify either taskId or projectId.",
1250
- parameters: tr,
1251
- outputSchema: sr,
1253
+ parameters: or,
1254
+ outputSchema: nr,
1252
1255
  annotations: { readOnlyHint: !1, destructiveHint: !1, idempotentHint: !1 },
1253
1256
  async execute(e, t) {
1254
1257
  const { comments: r } = e;
@@ -1263,7 +1266,7 @@ const ae = s.enum(fe).optional().catch(void 0).describe("The color key of the en
1263
1266
  );
1264
1267
  }
1265
1268
  const n = r.some((l) => le(l.projectId)) ? await t.getUser() : void 0, a = r.map(async ({ content: l, taskId: p, projectId: u }) => {
1266
- const m = await q({
1269
+ const m = await K({
1267
1270
  projectId: u,
1268
1271
  user: n,
1269
1272
  client: n ? void 0 : t
@@ -1274,7 +1277,7 @@ const ae = s.enum(fe).optional().catch(void 0).describe("The color key of the en
1274
1277
  });
1275
1278
  }), c = (await Promise.all(a)).map(he);
1276
1279
  return {
1277
- textContent: or({ comments: c }),
1280
+ textContent: ir({ comments: c }),
1278
1281
  structuredContent: {
1279
1282
  comments: c,
1280
1283
  totalCount: c.length,
@@ -1283,7 +1286,7 @@ const ae = s.enum(fe).optional().catch(void 0).describe("The color key of the en
1283
1286
  };
1284
1287
  }
1285
1288
  };
1286
- function or({ comments: e }) {
1289
+ function ir({ comments: e }) {
1287
1290
  const t = e.filter((a) => a.taskId).length, r = e.filter((a) => a.projectId).length, o = [];
1288
1291
  if (t > 0) {
1289
1292
  const a = t > 1 ? "comments" : "comment";
@@ -1295,7 +1298,7 @@ function or({ comments: e }) {
1295
1298
  }
1296
1299
  return o.length > 0 ? `Added ${o.join(" and ")}` : "No comments added";
1297
1300
  }
1298
- const nr = {
1301
+ const cr = {
1299
1302
  search: s.string().optional().describe(
1300
1303
  "Search for a filter by name (partial and case insensitive match). If omitted, all filters are returned."
1301
1304
  )
@@ -1306,14 +1309,14 @@ const nr = {
1306
1309
  color: ae,
1307
1310
  isFavorite: s.boolean().describe("Whether the filter is marked as favorite."),
1308
1311
  itemOrder: s.number().describe("The display order of the filter.")
1309
- }), ar = {
1312
+ }), dr = {
1310
1313
  filters: s.array(ze).describe("The found filters."),
1311
1314
  totalCount: s.number().describe("The total number of filters returned.")
1312
- }, ir = {
1315
+ }, lr = {
1313
1316
  name: f.FIND_FILTERS,
1314
1317
  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").',
1315
- parameters: nr,
1316
- outputSchema: ar,
1318
+ parameters: cr,
1319
+ outputSchema: dr,
1317
1320
  annotations: { readOnlyHint: !0, destructiveHint: !1, idempotentHint: !0 },
1318
1321
  async execute(e, t) {
1319
1322
  let o = ((await t.sync({ resourceTypes: ["filters"], syncToken: "*" })).filters ?? []).filter((i) => !i.isDeleted);
@@ -1331,7 +1334,7 @@ const nr = {
1331
1334
  itemOrder: i.itemOrder
1332
1335
  }));
1333
1336
  return {
1334
- textContent: cr({ filters: n, search: e.search }),
1337
+ textContent: ur({ filters: n, search: e.search }),
1335
1338
  structuredContent: {
1336
1339
  filters: n,
1337
1340
  totalCount: n.length
@@ -1339,7 +1342,7 @@ const nr = {
1339
1342
  };
1340
1343
  }
1341
1344
  };
1342
- function cr({
1345
+ function ur({
1343
1346
  filters: e,
1344
1347
  search: t
1345
1348
  }) {
@@ -1360,23 +1363,23 @@ ${n.map((a) => `- ${a}`).join(`
1360
1363
  return o.join(`
1361
1364
  `);
1362
1365
  }
1363
- const dr = s.object({
1366
+ const pr = s.object({
1364
1367
  name: s.string().min(1).describe("The name of the filter."),
1365
1368
  query: s.string().min(1).describe(
1366
1369
  'The filter query string. Examples: "today & p1", "#Work & overdue", "@email & today", "(p1 | p2) & !assigned". Operators: | (OR), & (AND), ! (NOT), () grouping, , (multiple queries).'
1367
1370
  ),
1368
1371
  color: ue,
1369
1372
  isFavorite: s.boolean().optional().describe("Whether to mark the filter as a favorite. Defaults to false.")
1370
- }), lr = {
1371
- filters: s.array(dr).min(1).describe("The array of filters to add.")
1372
- }, ur = {
1373
+ }), mr = {
1374
+ filters: s.array(pr).min(1).describe("The array of filters to add.")
1375
+ }, hr = {
1373
1376
  filters: s.array(ze).describe("The created filters."),
1374
1377
  totalCount: s.number().describe("The total number of filters created.")
1375
- }, pr = {
1378
+ }, fr = {
1376
1379
  name: f.ADD_FILTERS,
1377
1380
  description: "Add one or more new personal filters. Filters are saved custom views using query syntax to organize tasks.",
1378
- parameters: lr,
1379
- outputSchema: ur,
1381
+ parameters: mr,
1382
+ outputSchema: hr,
1380
1383
  annotations: { readOnlyHint: !1, destructiveHint: !1, idempotentHint: !1 },
1381
1384
  async execute({ filters: e }, t) {
1382
1385
  const r = Date.now(), o = e.map((u, m) => `tempFilterAdd${m}${r}`), n = e.map((u, m) => Y(
@@ -1411,26 +1414,26 @@ ${l}`,
1411
1414
  }
1412
1415
  };
1413
1416
  }
1414
- }, mr = s.object({
1417
+ }, br = s.object({
1415
1418
  name: s.string().min(1).max(128).describe("The name of the label."),
1416
1419
  color: ue,
1417
1420
  order: s.number().int().optional().describe("The position of the label in the label list."),
1418
1421
  isFavorite: s.boolean().optional().describe("Whether the label is a favorite. Defaults to false.")
1419
- }), hr = {
1420
- labels: s.array(mr).min(1).describe("The array of labels to add.")
1421
- }, fr = {
1422
+ }), gr = {
1423
+ labels: s.array(br).min(1).describe("The array of labels to add.")
1424
+ }, yr = {
1422
1425
  labels: s.array(ye).describe("The created labels."),
1423
1426
  totalCount: s.number().describe("The total number of labels created.")
1424
- }, br = {
1427
+ }, kr = {
1425
1428
  name: f.ADD_LABELS,
1426
1429
  description: "Add one or more new personal labels.",
1427
- parameters: hr,
1428
- outputSchema: fr,
1430
+ parameters: gr,
1431
+ outputSchema: yr,
1429
1432
  annotations: { readOnlyHint: !1, destructiveHint: !1, idempotentHint: !1 },
1430
1433
  async execute({ labels: e }, t) {
1431
1434
  const r = await Promise.all(e.map((n) => t.addLabel(n)));
1432
1435
  return {
1433
- textContent: gr({ labels: r }),
1436
+ textContent: Tr({ labels: r }),
1434
1437
  structuredContent: {
1435
1438
  labels: r.map((n) => ye.parse(n)),
1436
1439
  totalCount: r.length
@@ -1438,22 +1441,22 @@ ${l}`,
1438
1441
  };
1439
1442
  }
1440
1443
  };
1441
- function gr({ labels: e }) {
1444
+ function Tr({ labels: e }) {
1442
1445
  const t = e.length, r = e.map((o) => `• ${o.name} (id=${o.id})`).join(`
1443
1446
  `);
1444
1447
  return `Added ${t} label${t === 1 ? "" : "s"}:
1445
1448
  ${r}`;
1446
1449
  }
1447
- const yr = 300 * 1e3;
1448
- function kr(e) {
1450
+ const wr = 300 * 1e3;
1451
+ function Ir(e) {
1449
1452
  return /^\d+$/.test(e);
1450
1453
  }
1451
- class Tr {
1454
+ class vr {
1452
1455
  constructor() {
1453
1456
  this.cache = null;
1454
1457
  }
1455
1458
  async getWorkspaces(t) {
1456
- if (this.cache && Date.now() - this.cache.timestamp < yr)
1459
+ if (this.cache && Date.now() - this.cache.timestamp < wr)
1457
1460
  return this.cache.workspaces;
1458
1461
  const r = await t.getWorkspaces();
1459
1462
  return this.cache = { workspaces: r, timestamp: Date.now() }, r;
@@ -1476,7 +1479,7 @@ class Tr {
1476
1479
  const n = await this.getWorkspaces(t), a = n.find((p) => p.id === o);
1477
1480
  if (a)
1478
1481
  return { workspaceId: a.id, workspaceName: a.name };
1479
- if (kr(o))
1482
+ if (Ir(o))
1480
1483
  return { workspaceId: o, workspaceName: o };
1481
1484
  const i = o.toLowerCase(), c = n.find((p) => p.name.toLowerCase() === i);
1482
1485
  if (c)
@@ -1504,7 +1507,7 @@ ${p}` + (d.length > 5 ? `
1504
1507
  this.cache = null;
1505
1508
  }
1506
1509
  }
1507
- const vt = new Tr(), wr = s.object({
1510
+ const vt = new vr(), jr = s.object({
1508
1511
  name: s.string().min(1).describe("The name of the project."),
1509
1512
  parentId: s.string().optional().describe("The ID of the parent project. If provided, creates this as a sub-project."),
1510
1513
  isFavorite: s.boolean().optional().describe("Whether the project is a favorite. Defaults to false."),
@@ -1513,16 +1516,16 @@ const vt = new Tr(), wr = s.object({
1513
1516
  workspace: s.string().trim().min(1).optional().describe(
1514
1517
  "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."
1515
1518
  )
1516
- }), Ir = {
1517
- projects: s.array(wr).min(1).describe("The array of projects to add.")
1518
- }, vr = {
1519
+ }), Sr = {
1520
+ projects: s.array(jr).min(1).describe("The array of projects to add.")
1521
+ }, Cr = {
1519
1522
  projects: s.array(ie).describe("The created projects."),
1520
1523
  totalCount: s.number().describe("The total number of projects created.")
1521
- }, jr = {
1524
+ }, $r = {
1522
1525
  name: f.ADD_PROJECTS,
1523
1526
  description: "Add one or more new projects.",
1524
- parameters: Ir,
1525
- outputSchema: vr,
1527
+ parameters: Sr,
1528
+ outputSchema: Cr,
1526
1529
  annotations: { readOnlyHint: !1, destructiveHint: !1, idempotentHint: !1 },
1527
1530
  async execute({ projects: e }, t) {
1528
1531
  const r = [
@@ -1537,7 +1540,7 @@ const vt = new Tr(), wr = s.object({
1537
1540
  const l = c ? o.get(c) : void 0;
1538
1541
  return t.addProject({ ...d, ...l ? { workspaceId: l } : {} });
1539
1542
  })
1540
- ), a = Sr({ projects: n }), i = n.map(K);
1543
+ ), a = Dr({ projects: n }), i = n.map(V);
1541
1544
  return {
1542
1545
  textContent: a,
1543
1546
  structuredContent: {
@@ -1547,18 +1550,18 @@ const vt = new Tr(), wr = s.object({
1547
1550
  };
1548
1551
  }
1549
1552
  };
1550
- function Sr({ projects: e }) {
1553
+ function Dr({ projects: e }) {
1551
1554
  const t = e.length, r = e.map((n) => `• ${n.name} (id=${n.id})`).join(`
1552
1555
  `);
1553
1556
  return `Added ${t} project${t === 1 ? "" : "s"}:
1554
1557
  ${r}`;
1555
1558
  }
1556
- const me = 25, ke = s.enum(Mt), jt = s.object({
1559
+ const me = 25, ke = s.enum(Wt), jt = s.object({
1557
1560
  date: s.string().optional().describe("Due date in YYYY-MM-DD format."),
1558
1561
  string: s.string().optional().describe('Natural language due string, e.g. "tomorrow at 3pm".'),
1559
1562
  timezone: s.string().optional().describe('Timezone for the reminder, e.g. "America/New_York".'),
1560
1563
  lang: s.string().optional().describe('Language for parsing the due string, e.g. "en".')
1561
- }), St = s.enum(pt), Te = s.boolean().optional().describe("Whether this is an urgent reminder. Applies to relative and absolute reminders."), Cr = s.object({
1564
+ }), St = s.enum(pt), Te = s.boolean().optional().describe("Whether this is an urgent reminder. Applies to relative and absolute reminders."), xr = s.object({
1562
1565
  type: s.literal("relative"),
1563
1566
  taskId: s.string().min(1).describe("The ID of the task to set a reminder for."),
1564
1567
  minuteOffset: s.number().int().min(0).describe(
@@ -1568,7 +1571,7 @@ const me = 25, ke = s.enum(Mt), jt = s.object({
1568
1571
  'Delivery method: "email" or "push" notification. Defaults to push.'
1569
1572
  ),
1570
1573
  isUrgent: Te
1571
- }), $r = s.object({
1574
+ }), Ar = s.object({
1572
1575
  type: s.literal("absolute"),
1573
1576
  taskId: s.string().min(1).describe("The ID of the task to set a reminder for."),
1574
1577
  due: jt.describe("The specific date/time for the reminder."),
@@ -1576,7 +1579,7 @@ const me = 25, ke = s.enum(Mt), jt = s.object({
1576
1579
  'Delivery method: "email" or "push" notification. Defaults to push.'
1577
1580
  ),
1578
1581
  isUrgent: Te
1579
- }), Dr = s.object({
1582
+ }), Er = s.object({
1580
1583
  type: s.literal("location"),
1581
1584
  taskId: s.string().min(1).describe("The ID of the task to set a reminder for."),
1582
1585
  name: s.string().min(1).describe('Name of the location, e.g. "Office", "Home".'),
@@ -1586,23 +1589,23 @@ const me = 25, ke = s.enum(Mt), jt = s.object({
1586
1589
  'When to trigger: "on_enter" (arriving) or "on_leave" (departing).'
1587
1590
  ),
1588
1591
  radius: s.number().int().optional().describe("Radius in meters for the geofence. Defaults to server default.")
1589
- }), xr = s.discriminatedUnion("type", [
1590
- Cr,
1591
- $r,
1592
- Dr
1593
- ]), Ar = {
1594
- reminders: s.array(xr).min(1).max(me).describe(
1592
+ }), Or = s.discriminatedUnion("type", [
1593
+ xr,
1594
+ Ar,
1595
+ Er
1596
+ ]), Pr = {
1597
+ reminders: s.array(Or).min(1).max(me).describe(
1595
1598
  `Array of reminders to create (max ${me}). Each reminder must specify a type: "relative" (minutes before due), "absolute" (specific date/time), or "location" (geofence trigger).`
1596
1599
  )
1597
- }, Er = {
1600
+ }, Ur = {
1598
1601
  reminders: s.array(We).describe("The created reminders."),
1599
1602
  totalCount: s.number().describe("Total number of reminders created."),
1600
1603
  addedReminderIds: s.array(s.string()).describe("IDs of the created reminders.")
1601
- }, Or = {
1604
+ }, _r = {
1602
1605
  name: f.ADD_REMINDERS,
1603
1606
  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.',
1604
- parameters: Ar,
1605
- outputSchema: Er,
1607
+ parameters: Pr,
1608
+ outputSchema: Ur,
1606
1609
  annotations: { readOnlyHint: !1, destructiveHint: !1, idempotentHint: !1 },
1607
1610
  async execute(e, t) {
1608
1611
  const { reminders: r } = e, o = r.map(async (c) => {
@@ -1635,7 +1638,7 @@ const me = 25, ke = s.enum(Mt), jt = s.object({
1635
1638
  }
1636
1639
  }), a = (await Promise.all(o)).map(de);
1637
1640
  return {
1638
- textContent: Pr(a),
1641
+ textContent: Rr(a),
1639
1642
  structuredContent: {
1640
1643
  reminders: a,
1641
1644
  totalCount: a.length,
@@ -1644,7 +1647,7 @@ const me = 25, ke = s.enum(Mt), jt = s.object({
1644
1647
  };
1645
1648
  }
1646
1649
  };
1647
- function Pr(e) {
1650
+ function Rr(e) {
1648
1651
  const { timeBasedCount: t, locationCount: r } = It(e), o = [];
1649
1652
  if (t > 0) {
1650
1653
  const n = t > 1 ? "reminders" : "reminder";
@@ -1656,27 +1659,27 @@ function Pr(e) {
1656
1659
  }
1657
1660
  return o.length > 0 ? `Added ${o.join(" and ")}` : "No reminders added";
1658
1661
  }
1659
- const _r = s.object({
1662
+ const Nr = s.object({
1660
1663
  name: s.string().min(1).describe("The name of the section."),
1661
1664
  projectId: s.string().min(1).describe(
1662
1665
  'The ID of the project to add the section to. Project ID should be an ID string, or the text "inbox", for inbox tasks.'
1663
1666
  )
1664
- }), Rr = {
1665
- sections: s.array(_r).min(1).describe("The array of sections to add.")
1666
- }, Ur = {
1667
+ }), Lr = {
1668
+ sections: s.array(Nr).min(1).describe("The array of sections to add.")
1669
+ }, Mr = {
1667
1670
  sections: s.array(be).describe("The created sections."),
1668
1671
  totalCount: s.number().describe("The total number of sections created.")
1669
- }, Nr = {
1672
+ }, Fr = {
1670
1673
  name: f.ADD_SECTIONS,
1671
1674
  description: "Add one or more new sections to projects.",
1672
- parameters: Rr,
1673
- outputSchema: Ur,
1675
+ parameters: Lr,
1676
+ outputSchema: Mr,
1674
1677
  annotations: { readOnlyHint: !1, destructiveHint: !1, idempotentHint: !1 },
1675
1678
  async execute({ sections: e }, t) {
1676
1679
  const o = e.some((c) => le(c.projectId)) ? await t.getUser() : void 0, n = await Promise.all(
1677
1680
  e.map(async (c) => ({
1678
1681
  ...c,
1679
- projectId: await q({
1682
+ projectId: await K({
1680
1683
  projectId: c.projectId,
1681
1684
  user: o,
1682
1685
  client: o ? void 0 : t
@@ -1686,7 +1689,7 @@ const _r = s.object({
1686
1689
  n.map((c) => t.addSection(c))
1687
1690
  );
1688
1691
  return {
1689
- textContent: Lr({ sections: a }),
1692
+ textContent: Hr({ sections: a }),
1690
1693
  structuredContent: {
1691
1694
  sections: a,
1692
1695
  totalCount: a.length
@@ -1694,13 +1697,13 @@ const _r = s.object({
1694
1697
  };
1695
1698
  }
1696
1699
  };
1697
- function Lr({ sections: e }) {
1700
+ function Hr({ sections: e }) {
1698
1701
  const t = e.length, r = e.map((n) => `• ${n.name} (id=${n.id}, projectId=${n.projectId})`).join(`
1699
1702
  `);
1700
1703
  return `Added ${t} section${t === 1 ? "" : "s"}:
1701
1704
  ${r}`;
1702
1705
  }
1703
- const ee = {
1706
+ const te = {
1704
1707
  USER_NOT_FOUND: "USER_NOT_FOUND",
1705
1708
  USER_NOT_COLLABORATOR: "USER_NOT_COLLABORATOR",
1706
1709
  PROJECT_NOT_SHARED: "PROJECT_NOT_SHARED",
@@ -1709,19 +1712,19 @@ const ee = {
1709
1712
  PROJECT_NOT_FOUND: "PROJECT_NOT_FOUND",
1710
1713
  TASK_NOT_FOUND: "TASK_NOT_FOUND"
1711
1714
  };
1712
- class Mr {
1715
+ class Wr {
1713
1716
  /**
1714
1717
  * Validate a single assignment operation
1715
1718
  */
1716
1719
  async validateAssignment(t, r) {
1717
- const { taskId: o, projectId: n, responsibleUid: a } = r, i = await z.resolveUser(t, a);
1720
+ const { taskId: o, projectId: n, responsibleUid: a } = r, i = await H.resolveUser(t, a);
1718
1721
  if (!i)
1719
1722
  return {
1720
1723
  isValid: !1,
1721
1724
  taskId: o,
1722
1725
  projectId: n,
1723
1726
  error: {
1724
- type: ee.USER_NOT_FOUND,
1727
+ type: te.USER_NOT_FOUND,
1725
1728
  message: `User "${a}" not found`,
1726
1729
  suggestions: [
1727
1730
  "Check the spelling of the user name or email",
@@ -1739,7 +1742,7 @@ class Mr {
1739
1742
  projectId: n,
1740
1743
  resolvedUser: i,
1741
1744
  error: {
1742
- type: ee.PROJECT_NOT_SHARED,
1745
+ type: te.PROJECT_NOT_SHARED,
1743
1746
  message: `Project "${c.name}" is not shared. Task assignments require a shared project with collaborators. Share the project with at least one other person to enable assignments.`,
1744
1747
  suggestions: [
1745
1748
  "Share the project with at least one collaborator to enable assignments",
@@ -1747,7 +1750,7 @@ class Mr {
1747
1750
  ]
1748
1751
  }
1749
1752
  };
1750
- if (!await z.validateProjectCollaborator(
1753
+ if (!await H.validateProjectCollaborator(
1751
1754
  t,
1752
1755
  n,
1753
1756
  i.userId
@@ -1758,7 +1761,7 @@ class Mr {
1758
1761
  projectId: n,
1759
1762
  resolvedUser: i,
1760
1763
  error: {
1761
- type: ee.USER_NOT_COLLABORATOR,
1764
+ type: te.USER_NOT_COLLABORATOR,
1762
1765
  message: `User "${i.displayName}" is not a collaborator on project "${c.name}"`,
1763
1766
  suggestions: [
1764
1767
  "Invite the user to collaborate on this project first",
@@ -1777,7 +1780,7 @@ class Mr {
1777
1780
  projectId: n,
1778
1781
  resolvedUser: i,
1779
1782
  error: {
1780
- type: ee.TASK_NOT_FOUND,
1783
+ type: te.TASK_NOT_FOUND,
1781
1784
  message: `Task "${o}" not found or not accessible`,
1782
1785
  suggestions: [
1783
1786
  "Verify the task ID is correct",
@@ -1800,7 +1803,7 @@ class Mr {
1800
1803
  projectId: n,
1801
1804
  resolvedUser: i,
1802
1805
  error: {
1803
- type: ee.PERMISSION_DENIED,
1806
+ type: te.PERMISSION_DENIED,
1804
1807
  message: "Permission denied or API error occurred",
1805
1808
  suggestions: [
1806
1809
  "Check your API permissions",
@@ -1850,7 +1853,7 @@ class Mr {
1850
1853
  isValid: !1,
1851
1854
  taskId: r,
1852
1855
  error: {
1853
- type: ee.TASK_NOT_FOUND,
1856
+ type: te.TASK_NOT_FOUND,
1854
1857
  message: `Task "${r}" not found or not accessible`,
1855
1858
  suggestions: [
1856
1859
  "Verify the task ID is correct",
@@ -1880,14 +1883,14 @@ class Mr {
1880
1883
  recommendations: ["Project not found or not accessible"]
1881
1884
  };
1882
1885
  }
1883
- const d = await z.getProjectCollaborators(t, r), l = {
1886
+ const d = await H.getProjectCollaborators(t, r), l = {
1884
1887
  name: c.name,
1885
1888
  isShared: c.isShared,
1886
1889
  collaboratorCount: d.length
1887
1890
  };
1888
1891
  if (!c.isShared)
1889
1892
  return a.push("Share this project to enable task assignments"), { canAssign: !1, projectInfo: l, recommendations: a };
1890
- const p = await z.resolveUser(t, o);
1893
+ const p = await H.resolveUser(t, o);
1891
1894
  if (!p)
1892
1895
  return a.push("User not found - check spelling or invite to a shared project"), { canAssign: !1, projectInfo: l, recommendations: a };
1893
1896
  const u = d.some((b) => b.id === p.userId), m = {
@@ -1918,8 +1921,8 @@ class Mr {
1918
1921
  };
1919
1922
  }
1920
1923
  }
1921
- const Ye = new Mr();
1922
- function se(e = /* @__PURE__ */ new Date()) {
1924
+ const Ye = new Wr();
1925
+ function re(e = /* @__PURE__ */ new Date()) {
1923
1926
  const t = e.getFullYear(), r = String(e.getMonth() + 1).padStart(2, "0"), o = String(e.getDate()).padStart(2, "0");
1924
1927
  return `${t}-${r}-${o}`;
1925
1928
  }
@@ -1953,20 +1956,20 @@ ${i.slice(0, Se.MAX_FAILURES_SHOWN).map((u) => ` ${u.item} (Error: ${u.error}
1953
1956
  return c.join(`
1954
1957
  `);
1955
1958
  }
1956
- function Fr(e) {
1959
+ function Br(e) {
1957
1960
  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}` : "";
1958
1961
  return ` ${t}${r}${o}${n}${a}`;
1959
1962
  }
1960
- function Hr(e) {
1963
+ function zr(e) {
1961
1964
  const t = ` (${e.color})`, r = e.isFavorite ? " • ⭐" : "", o = ` • id=${e.id}`;
1962
1965
  return ` ${e.name}${t}${r}${o}`;
1963
1966
  }
1964
- function Wr(e) {
1967
+ function Yr(e) {
1965
1968
  const t = e.inboxProject ? " • Inbox" : "", r = e.isFavorite ? " • ⭐" : "", o = e.isShared ? " • Shared" : "", n = e.viewStyle && e.viewStyle !== "list" ? ` • ${e.viewStyle}` : "", a = ` • id=${e.id}`;
1966
1969
  return ` ${e.name}${t}${r}${o}${n}${a}`;
1967
1970
  }
1968
1971
  function we(e, t = 5) {
1969
- const o = e.slice(0, t).map(Fr).join(`
1972
+ const o = e.slice(0, t).map(Br).join(`
1970
1973
  `);
1971
1974
  if (e.length > t) {
1972
1975
  const n = e.length - t;
@@ -1975,7 +1978,7 @@ function we(e, t = 5) {
1975
1978
  }
1976
1979
  return o;
1977
1980
  }
1978
- function H({
1981
+ function W({
1979
1982
  subject: e,
1980
1983
  count: t,
1981
1984
  limit: r,
@@ -1999,7 +2002,7 @@ ${r.map((n) => `- ${n}`).join(`
1999
2002
  function F(e) {
2000
2003
  return s.string().transform((t) => t === "" ? void 0 : t).optional().describe(e);
2001
2004
  }
2002
- const st = 25, Br = s.object({
2005
+ const st = 25, Gr = s.object({
2003
2006
  content: s.string().min(1).describe(
2004
2007
  '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.'
2005
2008
  ),
@@ -2028,24 +2031,24 @@ const st = 25, Br = s.object({
2028
2031
  "Whether this task should be uncompletable (organizational header). Tasks with isUncompletable: true appear as organizational headers and cannot be completed."
2029
2032
  )
2030
2033
  }), rt = {
2031
- tasks: s.array(Br).min(1).max(st).describe(`The array of tasks to add (max ${st}).`)
2032
- }, zr = {
2033
- tasks: s.array(V).describe("The created tasks."),
2034
+ tasks: s.array(Gr).min(1).max(st).describe(`The array of tasks to add (max ${st}).`)
2035
+ }, qr = {
2036
+ tasks: s.array(J).describe("The created tasks."),
2034
2037
  totalCount: s.number().describe("The total number of tasks created."),
2035
2038
  failures: s.array(Be).describe("Failed task creations with error details."),
2036
2039
  totalRequested: s.number().describe("The total number of tasks requested."),
2037
2040
  successCount: s.number().describe("The number of successfully created tasks."),
2038
2041
  failureCount: s.number().describe("The number of failed task creations.")
2039
- }, Yr = {
2042
+ }, Kr = {
2040
2043
  name: f.ADD_TASKS,
2041
2044
  description: "Add one or more tasks to a project, section, or parent. Supports assignment to project collaborators.",
2042
2045
  parameters: rt,
2043
- outputSchema: zr,
2046
+ outputSchema: qr,
2044
2047
  annotations: { readOnlyHint: !1, destructiveHint: !1, idempotentHint: !1 },
2045
2048
  async execute(e, t) {
2046
2049
  const { tasks: r } = s.object(rt).parse(e), o = /* @__PURE__ */ new Map();
2047
2050
  r.forEach((p, u) => {
2048
- const m = Gr(p), h = o.get(m);
2051
+ const m = Vr(p), h = o.get(m);
2049
2052
  h ? h.push({ task: p, index: u }) : o.set(m, [{ task: p, index: u }]);
2050
2053
  });
2051
2054
  const a = (await Promise.all(
@@ -2053,7 +2056,7 @@ const st = 25, Br = s.object({
2053
2056
  const u = [];
2054
2057
  for (const { task: m, index: h } of p)
2055
2058
  try {
2056
- const b = await qr(m, t);
2059
+ const b = await Jr(m, t);
2057
2060
  u.push({ index: h, result: { status: "fulfilled", value: b } });
2058
2061
  } catch (b) {
2059
2062
  u.push({
@@ -2073,9 +2076,9 @@ const st = 25, Br = s.object({
2073
2076
  const p = c.map((u) => `"${u.item}": ${u.error}`).join("; ");
2074
2077
  throw new Error(`All ${c.length} task(s) failed to create: ${p}`);
2075
2078
  }
2076
- const d = i.map(_);
2079
+ const d = i.map(U);
2077
2080
  return {
2078
- textContent: Kr({
2081
+ textContent: Xr({
2079
2082
  tasks: d,
2080
2083
  failures: c,
2081
2084
  args: { tasks: r }
@@ -2091,10 +2094,10 @@ const st = 25, Br = s.object({
2091
2094
  };
2092
2095
  }
2093
2096
  };
2094
- function Gr(e) {
2097
+ function Vr(e) {
2095
2098
  return `${e.projectId ?? ""}|${e.sectionId ?? ""}|${e.parentId ?? ""}`;
2096
2099
  }
2097
- async function qr(e, t) {
2100
+ async function Jr(e, t) {
2098
2101
  const {
2099
2102
  duration: r,
2100
2103
  projectId: o,
@@ -2169,7 +2172,7 @@ async function qr(e, t) {
2169
2172
  }
2170
2173
  return await t.addTask(h);
2171
2174
  }
2172
- function Kr({
2175
+ function Xr({
2173
2176
  tasks: e,
2174
2177
  failures: t,
2175
2178
  args: r
@@ -2194,23 +2197,23 @@ function Kr({
2194
2197
  showDetails: !0
2195
2198
  });
2196
2199
  }
2197
- const Vr = {
2200
+ const Zr = {
2198
2201
  projectId: s.string().min(1).describe(
2199
2202
  "The ID of the project to analyze. This triggers a new health analysis which may take some time to complete."
2200
2203
  )
2201
- }, Jr = {
2204
+ }, Qr = {
2202
2205
  projectId: s.string().describe("The project ID."),
2203
2206
  health: s.object({
2204
- status: s.enum(Ue).describe("The health status after triggering analysis."),
2207
+ status: s.enum(Re).describe("The health status after triggering analysis."),
2205
2208
  isStale: s.boolean().describe("Whether the health data is still stale after the request."),
2206
2209
  updateInProgress: s.boolean().describe("Whether an analysis update is currently in progress.")
2207
2210
  }).describe("The health response returned after triggering analysis."),
2208
2211
  message: s.string().describe("A human-readable message about the analysis status.")
2209
- }, Xr = {
2212
+ }, eo = {
2210
2213
  name: f.ANALYZE_PROJECT_HEALTH,
2211
2214
  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.",
2212
- parameters: Vr,
2213
- outputSchema: Jr,
2215
+ parameters: Zr,
2216
+ outputSchema: Qr,
2214
2217
  annotations: {
2215
2218
  readOnlyHint: !1,
2216
2219
  destructiveHint: !1,
@@ -2233,19 +2236,19 @@ ${n}`,
2233
2236
  }
2234
2237
  };
2235
2238
  }
2236
- }, Zr = {
2239
+ }, to = {
2237
2240
  ids: s.array(s.string().min(1)).min(1).describe("The IDs of the tasks to complete.")
2238
- }, Qr = {
2241
+ }, so = {
2239
2242
  completed: s.array(s.string()).describe("The IDs of successfully completed tasks."),
2240
2243
  failures: s.array(Be).describe("Failed task completions with error details."),
2241
2244
  totalRequested: s.number().describe("The total number of tasks requested to complete."),
2242
2245
  successCount: s.number().describe("The number of successfully completed tasks."),
2243
2246
  failureCount: s.number().describe("The number of failed task completions.")
2244
- }, eo = {
2247
+ }, ro = {
2245
2248
  name: f.COMPLETE_TASKS,
2246
2249
  description: "Complete one or more tasks by their IDs.",
2247
- parameters: Zr,
2248
- outputSchema: Qr,
2250
+ parameters: to,
2251
+ outputSchema: so,
2249
2252
  annotations: { readOnlyHint: !1, destructiveHint: !0, idempotentHint: !1 },
2250
2253
  async execute(e, t) {
2251
2254
  const r = [], o = [];
@@ -2260,7 +2263,7 @@ ${n}`,
2260
2263
  });
2261
2264
  }
2262
2265
  return {
2263
- textContent: to({
2266
+ textContent: oo({
2264
2267
  completed: r,
2265
2268
  failures: o,
2266
2269
  args: e
@@ -2275,7 +2278,7 @@ ${n}`,
2275
2278
  };
2276
2279
  }
2277
2280
  };
2278
- function to({
2281
+ function oo({
2279
2282
  completed: e,
2280
2283
  failures: t,
2281
2284
  args: r
@@ -2297,20 +2300,20 @@ const $t = [
2297
2300
  "filter",
2298
2301
  "reminder",
2299
2302
  "location_reminder"
2300
- ], so = {
2303
+ ], no = {
2301
2304
  type: s.enum($t).describe("The type of entity to delete."),
2302
2305
  id: s.string().min(1).describe("The ID of the entity to delete.")
2303
- }, ro = {
2306
+ }, ao = {
2304
2307
  deletedEntity: s.object({
2305
2308
  type: s.enum($t).describe("The type of deleted entity."),
2306
2309
  id: s.string().describe("The ID of the deleted entity.")
2307
2310
  }).describe("Information about the deleted entity."),
2308
2311
  success: s.boolean().describe("Whether the deletion was successful.")
2309
- }, oo = {
2312
+ }, io = {
2310
2313
  name: f.DELETE_OBJECT,
2311
2314
  description: "Delete a project, section, task, comment, label, filter, reminder, or location_reminder by its ID.",
2312
- parameters: so,
2313
- outputSchema: ro,
2315
+ parameters: no,
2316
+ outputSchema: ao,
2314
2317
  annotations: { readOnlyHint: !1, destructiveHint: !0, idempotentHint: !0 },
2315
2318
  async execute(e, t) {
2316
2319
  switch (e.type) {
@@ -2355,25 +2358,25 @@ const $t = [
2355
2358
  }
2356
2359
  };
2357
2360
  }
2358
- }, Dt = ["task", "project", "comment", "section"], no = {
2361
+ }, Dt = ["task", "project", "comment", "section"], co = {
2359
2362
  type: s.enum(Dt).describe("The type of object to fetch."),
2360
2363
  id: s.string().min(1).describe("The unique ID of the object to fetch.")
2361
- }, ao = {
2364
+ }, lo = {
2362
2365
  type: s.enum(Dt).describe("The type of object fetched."),
2363
2366
  id: s.string().describe("The ID of the fetched object."),
2364
- object: s.union([V, ie, ge, be]).describe("The fetched object data.")
2365
- }, io = {
2367
+ object: s.union([J, ie, ge, be]).describe("The fetched object data.")
2368
+ }, uo = {
2366
2369
  name: f.FETCH_OBJECT,
2367
2370
  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.",
2368
- parameters: no,
2369
- outputSchema: ao,
2371
+ parameters: co,
2372
+ outputSchema: lo,
2370
2373
  annotations: { readOnlyHint: !0, destructiveHint: !1, idempotentHint: !0 },
2371
2374
  async execute(e, t) {
2372
2375
  const { type: r, id: o } = e;
2373
2376
  try {
2374
2377
  switch (r) {
2375
2378
  case "task": {
2376
- const n = await t.getTask(o), a = _(n);
2379
+ const n = await t.getTask(o), a = U(n);
2377
2380
  return {
2378
2381
  textContent: `Found task: ${a.content} • id=${a.id} • priority=${a.priority} • project=${a.projectId}`,
2379
2382
  structuredContent: {
@@ -2384,7 +2387,7 @@ const $t = [
2384
2387
  };
2385
2388
  }
2386
2389
  case "project": {
2387
- const n = await t.getProject(o), a = K(n);
2390
+ const n = await t.getProject(o), a = V(n);
2388
2391
  return {
2389
2392
  textContent: `Found project: ${a.name} • id=${a.id} • color=${a.color} • viewStyle=${a.viewStyle}`,
2390
2393
  structuredContent: {
@@ -2429,21 +2432,21 @@ const $t = [
2429
2432
  );
2430
2433
  }
2431
2434
  }
2432
- }, co = {
2435
+ }, po = {
2433
2436
  id: s.string().min(1).describe(
2434
2437
  'A unique identifier for the document in the format "task:{id}" or "project:{id}".'
2435
2438
  )
2436
- }, lo = {
2439
+ }, mo = {
2437
2440
  id: s.string().describe("The ID of the fetched document."),
2438
2441
  title: s.string().describe("The title of the document."),
2439
2442
  text: s.string().describe("The text content of the document."),
2440
2443
  url: s.string().describe("The URL of the document."),
2441
2444
  metadata: s.record(s.string(), s.unknown()).optional().describe("Additional metadata about the document.")
2442
- }, uo = {
2445
+ }, ho = {
2443
2446
  name: f.FETCH,
2444
2447
  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}".',
2445
- parameters: co,
2446
- outputSchema: lo,
2448
+ parameters: po,
2449
+ outputSchema: mo,
2447
2450
  annotations: { readOnlyHint: !0, destructiveHint: !1, idempotentHint: !0 },
2448
2451
  async execute(e, t) {
2449
2452
  const { id: r } = e, [o, n] = r.split(":", 2);
@@ -2453,7 +2456,7 @@ const $t = [
2453
2456
  );
2454
2457
  let a;
2455
2458
  if (o === "task") {
2456
- const i = await t.getTask(n), c = _(i), d = [c.content];
2459
+ const i = await t.getTask(n), c = U(i), d = [c.content];
2457
2460
  c.description && d.push(`
2458
2461
 
2459
2462
  Description: ${c.description}`), c.dueDate && d.push(`
@@ -2477,7 +2480,7 @@ Labels: ${c.labels.join(", ")}`), a = {
2477
2480
  }
2478
2481
  };
2479
2482
  } else {
2480
- const i = await t.getProject(n), c = K(i), d = [c.name];
2483
+ const i = await t.getProject(n), c = V(i), d = [c.name];
2481
2484
  c.isShared && d.push(`
2482
2485
 
2483
2486
  Shared project`), c.isFavorite && d.push(`
@@ -2501,7 +2504,7 @@ Favorite: Yes`), a = {
2501
2504
  structuredContent: a
2502
2505
  };
2503
2506
  }
2504
- }, po = {
2507
+ }, fo = {
2505
2508
  objectType: s.enum(["task", "project", "comment"]).optional().describe("Type of object to filter by."),
2506
2509
  objectId: s.string().optional().describe("Filter by specific object ID (task, project, or comment)."),
2507
2510
  eventType: s.enum([
@@ -2520,17 +2523,17 @@ Favorite: Yes`), a = {
2520
2523
  initiatorId: s.string().optional().describe("Filter by the user ID who initiated the event."),
2521
2524
  limit: s.number().int().min(1).max(C.ACTIVITY_MAX).default(C.ACTIVITY_DEFAULT).describe("Maximum number of activity events to return."),
2522
2525
  cursor: s.string().optional().describe("Pagination cursor for retrieving the next page of results.")
2523
- }, mo = {
2524
- events: s.array(Xs).describe("The activity events."),
2526
+ }, bo = {
2527
+ events: s.array(er).describe("The activity events."),
2525
2528
  nextCursor: s.string().optional().describe("Cursor for the next page of results."),
2526
2529
  totalCount: s.number().describe("The total number of events in this page."),
2527
2530
  hasMore: s.boolean().describe("Whether there are more results available."),
2528
2531
  appliedFilters: s.record(s.string(), s.unknown()).describe("The filters that were applied to the search.")
2529
- }, ho = {
2532
+ }, go = {
2530
2533
  name: f.FIND_ACTIVITY,
2531
2534
  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.",
2532
- parameters: po,
2533
- outputSchema: mo,
2535
+ parameters: fo,
2536
+ outputSchema: bo,
2534
2537
  annotations: { readOnlyHint: !0, destructiveHint: !1, idempotentHint: !0 },
2535
2538
  async execute(e, t) {
2536
2539
  const { objectType: r, objectId: o, eventType: n, projectId: a, taskId: i, initiatorId: c, limit: d, cursor: l } = e, p = {
@@ -2538,9 +2541,9 @@ Favorite: Yes`), a = {
2538
2541
  cursor: l ?? null
2539
2542
  };
2540
2543
  r && n ? p.objectEventTypes = `${r}:${n}` : r ? p.objectEventTypes = `${r}:` : n && (p.objectEventTypes = `:${n}`), o && o !== "remove" && (p.objectId = o), a && (p.parentProjectId = a), i && (p.parentItemId = i), c && (p.initiatorId = c);
2541
- const { results: u, nextCursor: m } = await t.getActivityLogs(p), h = u.map(Gs);
2544
+ const { results: u, nextCursor: m } = await t.getActivityLogs(p), h = u.map(Vs);
2542
2545
  return {
2543
- textContent: fo({ events: h, args: e, nextCursor: m }),
2546
+ textContent: yo({ events: h, args: e, nextCursor: m }),
2544
2547
  structuredContent: {
2545
2548
  events: h,
2546
2549
  nextCursor: m ?? void 0,
@@ -2551,7 +2554,7 @@ Favorite: Yes`), a = {
2551
2554
  };
2552
2555
  }
2553
2556
  };
2554
- function fo({
2557
+ function yo({
2555
2558
  events: e,
2556
2559
  args: t,
2557
2560
  nextCursor: r
@@ -2566,18 +2569,18 @@ function fo({
2566
2569
  const a = [];
2567
2570
  t.objectId && a.push(`object ID: ${t.objectId}`), t.projectId && a.push(`project: ${t.projectId}`), t.taskId && a.push(`task: ${t.taskId}`), t.initiatorId && a.push(`initiator: ${t.initiatorId}`);
2568
2571
  const i = [];
2569
- return e.length === 0 && (i.push("No activity events match the specified filters"), i.push("Note: Activity logs only show recent events"), t.eventType && i.push(`Try removing the eventType filter (${t.eventType})`), t.objectType && i.push(`Try removing the objectType filter (${t.objectType})`), (t.objectId || t.projectId || t.taskId) && i.push("Verify the object ID is correct")), H({
2572
+ return e.length === 0 && (i.push("No activity events match the specified filters"), i.push("Note: Activity logs only show recent events"), t.eventType && i.push(`Try removing the eventType filter (${t.eventType})`), t.objectType && i.push(`Try removing the objectType filter (${t.objectType})`), (t.objectId || t.projectId || t.taskId) && i.push("Verify the object ID is correct")), W({
2570
2573
  subject: o,
2571
2574
  count: e.length,
2572
2575
  limit: t.limit,
2573
2576
  nextCursor: r ?? void 0,
2574
2577
  filterHints: a,
2575
- previewLines: bo(e, Math.min(e.length, t.limit)),
2578
+ previewLines: ko(e, Math.min(e.length, t.limit)),
2576
2579
  zeroReasonHints: i
2577
2580
  });
2578
2581
  }
2579
- function bo(e, t = 10) {
2580
- const o = e.slice(0, t).map(go).join(`
2582
+ function ko(e, t = 10) {
2583
+ const o = e.slice(0, t).map(To).join(`
2581
2584
  `);
2582
2585
  if (e.length > t) {
2583
2586
  const n = e.length - t;
@@ -2586,8 +2589,8 @@ function bo(e, t = 10) {
2586
2589
  }
2587
2590
  return o;
2588
2591
  }
2589
- function go(e) {
2590
- const t = yo(e.eventDate), r = `${e.eventType} ${e.objectType}`;
2592
+ function To(e) {
2593
+ const t = wo(e.eventDate), r = `${e.eventType} ${e.objectType}`;
2591
2594
  let o = "";
2592
2595
  if (e.extraData) {
2593
2596
  const c = e.extraData.content || e.extraData.name || e.extraData.last_content;
@@ -2596,7 +2599,7 @@ function go(e) {
2596
2599
  const n = e.objectId ? ` • id=${e.objectId}` : "", a = e.initiatorId ? ` • by=${e.initiatorId}` : " • system", i = e.parentProjectId ? ` • project=${e.parentProjectId}` : "";
2597
2600
  return ` [${t}] ${r}${o}${n}${a}${i}`;
2598
2601
  }
2599
- function yo(e) {
2602
+ function wo(e) {
2600
2603
  try {
2601
2604
  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", {
2602
2605
  hour: "2-digit",
@@ -2609,7 +2612,7 @@ function yo(e) {
2609
2612
  return e;
2610
2613
  }
2611
2614
  }
2612
- const ko = {
2615
+ const Io = {
2613
2616
  taskId: s.string().optional().describe("Find comments for a specific task."),
2614
2617
  projectId: s.string().optional().describe(
2615
2618
  'Find comments for a specific project. Project ID should be an ID string, or the text "inbox", for inbox tasks.'
@@ -2617,7 +2620,7 @@ const ko = {
2617
2620
  commentId: s.string().optional().describe("Get a specific comment by ID."),
2618
2621
  cursor: s.string().optional().describe("Pagination cursor for retrieving more results."),
2619
2622
  limit: s.number().int().min(1).max(C.COMMENTS_MAX).optional().describe("Maximum number of comments to return")
2620
- }, To = {
2623
+ }, vo = {
2621
2624
  comments: s.array(ge).describe("The found comments."),
2622
2625
  searchType: s.string().describe(
2623
2626
  'The type of search performed: "single" (comment ID), "task" (task ID), or "project" (project ID).'
@@ -2626,11 +2629,11 @@ const ko = {
2626
2629
  hasMore: s.boolean().describe("Whether there are more results available."),
2627
2630
  nextCursor: s.string().optional().describe("Cursor for the next page of results."),
2628
2631
  totalCount: s.number().describe("The total number of comments in this page.")
2629
- }, wo = {
2632
+ }, jo = {
2630
2633
  name: f.FIND_COMMENTS,
2631
2634
  description: "Find comments by task, project, or get a specific comment by ID. Exactly one of taskId, projectId, or commentId must be provided.",
2632
- parameters: ko,
2633
- outputSchema: To,
2635
+ parameters: Io,
2636
+ outputSchema: vo,
2634
2637
  annotations: { readOnlyHint: !0, destructiveHint: !1, idempotentHint: !0 },
2635
2638
  async execute(e, t) {
2636
2639
  const r = [e.taskId, e.projectId, e.commentId].filter(Boolean);
@@ -2640,7 +2643,7 @@ const ko = {
2640
2643
  throw new Error(
2641
2644
  "Cannot provide multiple search parameters. Choose one of: taskId, projectId, or commentId."
2642
2645
  );
2643
- const o = await q({
2646
+ const o = await K({
2644
2647
  projectId: e.projectId,
2645
2648
  client: t
2646
2649
  });
@@ -2665,7 +2668,7 @@ const ko = {
2665
2668
  throw new Error("Invalid state: no search parameter provided");
2666
2669
  const c = i.map(he);
2667
2670
  return {
2668
- textContent: Io({
2671
+ textContent: So({
2669
2672
  comments: c,
2670
2673
  searchType: e.commentId ? "single" : e.taskId ? "task" : "project",
2671
2674
  searchId: e.commentId || e.taskId || e.projectId || "",
@@ -2683,7 +2686,7 @@ const ko = {
2683
2686
  };
2684
2687
  }
2685
2688
  };
2686
- function Io({
2689
+ function So({
2687
2690
  comments: e,
2688
2691
  searchType: t,
2689
2692
  searchId: r,
@@ -2713,14 +2716,14 @@ function xt(e) {
2713
2716
  const t = e.getUTCFullYear(), r = String(e.getUTCMonth() + 1).padStart(2, "0"), o = String(e.getUTCDate()).padStart(2, "0");
2714
2717
  return `${t}-${r}-${o}`;
2715
2718
  }
2716
- function vo(e) {
2719
+ function Co(e) {
2717
2720
  const t = /^([+-])(\d{2}):(\d{2})$/.exec(e);
2718
2721
  if (!t)
2719
2722
  return 0;
2720
2723
  const [, r, o, n] = t, a = Number(o) * 60 + Number(n);
2721
2724
  return r === "-" ? -a : a;
2722
2725
  }
2723
- function jo(e, t) {
2726
+ function $o(e, t) {
2724
2727
  const r = new Date(e.getTime() + t * 60 * 1e3);
2725
2728
  return xt(r);
2726
2729
  }
@@ -2731,9 +2734,9 @@ function ot(e, t) {
2731
2734
  const d = new Date(Date.UTC(a, i - 1, c));
2732
2735
  return d.setUTCDate(d.getUTCDate() + t), xt(d);
2733
2736
  }
2734
- const So = ["and", "or"], Ke = {
2737
+ const Do = ["and", "or"], Ke = {
2735
2738
  labels: s.string().array().optional().describe("The labels to filter the tasks by"),
2736
- labelsOperator: s.enum(So).optional().describe(
2739
+ labelsOperator: s.enum(Do).optional().describe(
2737
2740
  'The operator to use when filtering by labels. This will dictate whether a task has all labels, or some of them. Default is "or".'
2738
2741
  )
2739
2742
  };
@@ -2742,20 +2745,20 @@ function Ve(e = [], t = "or") {
2742
2745
  const r = t === "and" ? " & " : " | ";
2743
2746
  return `(${e.map((a) => a.startsWith("@") ? a : `@${a}`).join(` ${r} `)})`;
2744
2747
  }
2745
- const Co = 7;
2746
- function $o({
2748
+ const xo = 7;
2749
+ function Ao({
2747
2750
  since: e,
2748
2751
  until: t,
2749
2752
  userGmtOffset: r,
2750
2753
  now: o = /* @__PURE__ */ new Date()
2751
2754
  }) {
2752
- const n = vo(r), a = jo(o, n), i = Co - 1, c = t ?? (e ? ot(e, i) : a);
2755
+ const n = Co(r), a = $o(o, n), i = xo - 1, c = t ?? (e ? ot(e, i) : a);
2753
2756
  return {
2754
2757
  since: e ?? ot(c, -i),
2755
2758
  until: c
2756
2759
  };
2757
2760
  }
2758
- const Do = {
2761
+ const Eo = {
2759
2762
  getBy: s.enum(["completion", "due"]).default("completion").describe(
2760
2763
  '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).'
2761
2764
  ),
@@ -2779,17 +2782,17 @@ const Do = {
2779
2782
  "The cursor to get the next page of tasks (cursor is obtained from the previous call to this tool, with the same parameters)."
2780
2783
  ),
2781
2784
  ...Ke
2782
- }, xo = {
2783
- tasks: s.array(V).describe("The found completed tasks."),
2785
+ }, Oo = {
2786
+ tasks: s.array(J).describe("The found completed tasks."),
2784
2787
  nextCursor: s.string().optional().describe("Cursor for the next page of results."),
2785
2788
  totalCount: s.number().describe("The total number of tasks in this page."),
2786
2789
  hasMore: s.boolean().describe("Whether there are more results available."),
2787
2790
  appliedFilters: s.record(s.string(), s.unknown()).describe("The filters that were applied to the search.")
2788
- }, Ao = {
2791
+ }, Po = {
2789
2792
  name: f.FIND_COMPLETED_TASKS,
2790
2793
  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.",
2791
- parameters: Do,
2792
- outputSchema: xo,
2794
+ parameters: Eo,
2795
+ outputSchema: Oo,
2793
2796
  annotations: { readOnlyHint: !0, destructiveHint: !1, idempotentHint: !0 },
2794
2797
  async execute(e, t) {
2795
2798
  const { getBy: r, labels: o, labelsOperator: n, since: a, until: i, responsibleUser: c, projectId: d, ...l } = e;
@@ -2799,15 +2802,15 @@ const Do = {
2799
2802
  );
2800
2803
  const p = await Me(t, c), u = p?.email;
2801
2804
  let h = Ve(o, n);
2802
- p && u && (h = re(h, `assigned to: ${u}`));
2803
- const b = await t.getUser(), I = b.tzInfo?.gmtString || "+00:00", D = await q({
2805
+ p && u && (h = oe(h, `assigned to: ${u}`));
2806
+ const b = await t.getUser(), I = b.tzInfo?.gmtString || "+00:00", D = await K({
2804
2807
  projectId: d,
2805
2808
  user: b
2806
- }), $ = $o({
2809
+ }), $ = Ao({
2807
2810
  since: a,
2808
2811
  until: i,
2809
2812
  userGmtOffset: I
2810
- }), N = `${$.since}T00:00:00${I}`, T = `${$.until}T23:59:59${I}`, g = new Date(N).toISOString(), S = new Date(T).toISOString(), R = {
2813
+ }), N = `${$.since}T00:00:00${I}`, T = `${$.until}T23:59:59${I}`, g = new Date(N).toISOString(), S = new Date(T).toISOString(), _ = {
2811
2814
  ...e,
2812
2815
  since: $.since,
2813
2816
  until: $.until
@@ -2823,11 +2826,11 @@ const Do = {
2823
2826
  since: g,
2824
2827
  until: S,
2825
2828
  ...h ? { filterQuery: h, filterLang: "en" } : {}
2826
- }), v = w.map(_);
2829
+ }), v = w.map(U);
2827
2830
  return {
2828
- textContent: Eo({
2831
+ textContent: Uo({
2829
2832
  tasks: v,
2830
- args: R,
2833
+ args: _,
2831
2834
  nextCursor: j,
2832
2835
  assigneeEmail: u
2833
2836
  }),
@@ -2836,12 +2839,12 @@ const Do = {
2836
2839
  nextCursor: j ?? void 0,
2837
2840
  totalCount: v.length,
2838
2841
  hasMore: !!j,
2839
- appliedFilters: R
2842
+ appliedFilters: _
2840
2843
  }
2841
2844
  };
2842
2845
  }
2843
2846
  };
2844
- function Eo({
2847
+ function Uo({
2845
2848
  tasks: e,
2846
2849
  args: t,
2847
2850
  nextCursor: r,
@@ -2857,7 +2860,7 @@ function Eo({
2857
2860
  i.push(`assigned to: ${d}`);
2858
2861
  }
2859
2862
  const c = [];
2860
- return e.length === 0 && (c.push("No tasks completed in this date range"), c.push("Try expanding the date range"), (t.projectId || t.sectionId || t.parentId) && c.push("Try removing project/section/parent filters"), t.getBy === "due" && c.push('Try switching to "completion" date instead')), H({
2863
+ return e.length === 0 && (c.push("No tasks completed in this date range"), c.push("Try expanding the date range"), (t.projectId || t.sectionId || t.parentId) && c.push("Try removing project/section/parent filters"), t.getBy === "due" && c.push('Try switching to "completion" date instead')), W({
2861
2864
  subject: a,
2862
2865
  count: e.length,
2863
2866
  limit: t.limit,
@@ -2867,7 +2870,7 @@ function Eo({
2867
2870
  zeroReasonHints: c
2868
2871
  });
2869
2872
  }
2870
- const Oo = {
2873
+ const _o = {
2871
2874
  searchText: s.string().optional().describe(
2872
2875
  '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.'
2873
2876
  ),
@@ -2875,7 +2878,7 @@ const Oo = {
2875
2878
  cursor: s.string().optional().describe(
2876
2879
  "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."
2877
2880
  )
2878
- }, Po = {
2881
+ }, Ro = {
2879
2882
  labels: s.array(ye).describe("The found personal labels."),
2880
2883
  nextCursor: s.string().optional().describe("Cursor for the next page of results."),
2881
2884
  totalCount: s.number().describe("The total number of labels in this page."),
@@ -2884,22 +2887,22 @@ const Oo = {
2884
2887
  "Names of all shared labels visible to you. These have no IDs or metadata — use their names directly when filtering tasks."
2885
2888
  ),
2886
2889
  appliedFilters: s.record(s.string(), s.unknown()).describe("The filters that were applied to the search.")
2887
- }, _o = {
2890
+ }, No = {
2888
2891
  name: f.FIND_LABELS,
2889
2892
  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.",
2890
- parameters: Oo,
2891
- outputSchema: Po,
2893
+ parameters: _o,
2894
+ outputSchema: Ro,
2892
2895
  annotations: { readOnlyHint: !0, destructiveHint: !1, idempotentHint: !0 },
2893
2896
  async execute(e, t) {
2894
2897
  const [r, o] = await Promise.all([
2895
- e.searchText ? Ws(t, e.searchText).then((c) => ({
2898
+ e.searchText ? Ys(t, e.searchText).then((c) => ({
2896
2899
  results: c,
2897
2900
  nextCursor: null
2898
2901
  })) : t.getLabels({ limit: e.limit, cursor: e.cursor ?? null }),
2899
- Bs(t)
2902
+ Gs(t)
2900
2903
  ]), { results: n, nextCursor: a } = r, i = e.searchText ? { searchText: e.searchText } : { limit: e.limit, cursor: e.cursor };
2901
2904
  return {
2902
- textContent: Ro({ labels: n, args: e, nextCursor: a, sharedLabels: o }),
2905
+ textContent: Lo({ labels: n, args: e, nextCursor: a, sharedLabels: o }),
2903
2906
  structuredContent: {
2904
2907
  labels: n.map((c) => ye.parse(c)),
2905
2908
  nextCursor: a ?? void 0,
@@ -2911,7 +2914,7 @@ const Oo = {
2911
2914
  };
2912
2915
  }
2913
2916
  };
2914
- function Ro({
2917
+ function Lo({
2915
2918
  labels: e,
2916
2919
  args: t,
2917
2920
  nextCursor: r,
@@ -2919,14 +2922,14 @@ function Ro({
2919
2922
  }) {
2920
2923
  const n = t.searchText ? `All labels matching "${t.searchText}"` : "Labels", a = [];
2921
2924
  t.searchText && a.push(`searchText: "${t.searchText}"`);
2922
- const i = 10, d = e.slice(0, i).map(Hr).join(`
2925
+ const i = 10, d = e.slice(0, i).map(zr).join(`
2923
2926
  `), l = e.length - i, p = l > 0 ? `${d}
2924
2927
  …and ${l} more` : d, u = [];
2925
2928
  e.length === 0 && (t.searchText ? (u.push("Try broader search terms"), u.push("Check spelling"), u.push("Remove searchText to see all labels")) : u.push("No personal labels created yet"));
2926
2929
  const m = o.length > 0 ? `
2927
2930
  Shared labels (${o.length}): ${o.join(", ")}` : `
2928
2931
  No shared labels.`;
2929
- return H({
2932
+ return W({
2930
2933
  subject: n,
2931
2934
  count: e.length,
2932
2935
  limit: t.searchText ? void 0 : t.limit,
@@ -2936,29 +2939,33 @@ No shared labels.`;
2936
2939
  zeroReasonHints: u
2937
2940
  }) + m;
2938
2941
  }
2939
- const { FIND_PROJECTS: Uo, ADD_TASKS: At, UPDATE_TASKS: Et } = f, No = {
2940
- projectId: s.string().min(1).describe("The ID of the project to search for collaborators in."),
2942
+ const { FIND_PROJECTS: At, ADD_TASKS: Et, UPDATE_TASKS: Ot } = f, Mo = {
2943
+ projectId: s.string().min(1).optional().describe(
2944
+ '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.'
2945
+ ),
2941
2946
  searchTerm: s.string().optional().describe(
2942
- "Search for a collaborator by name or email (partial and case insensitive match). If omitted, all collaborators in the project are returned."
2947
+ "Search for a user by name or email (partial and case insensitive match). If omitted, all users are returned."
2943
2948
  )
2944
- }, Lo = {
2945
- collaborators: s.array(Zs).describe("The found collaborators."),
2949
+ }, Fo = {
2950
+ collaborators: s.array(tr).describe("The found users."),
2946
2951
  projectInfo: s.object({
2947
2952
  id: s.string().describe("The project ID."),
2948
2953
  name: s.string().describe("The project name."),
2949
2954
  isShared: s.boolean().describe("Whether the project is shared.")
2950
- }).optional().describe("Information about the project."),
2951
- totalCount: s.number().describe("The total number of collaborators found."),
2952
- totalAvailable: s.number().optional().describe("The total number of available collaborators in the project."),
2955
+ }).optional().describe("Information about the project (only present when projectId was provided)."),
2956
+ totalCount: s.number().describe("The total number of users found."),
2957
+ totalAvailable: s.number().optional().describe("The total number of available users before the search filter was applied."),
2953
2958
  appliedFilters: s.record(s.string(), s.unknown()).describe("The filters that were applied to the search.")
2954
- }, Mo = {
2959
+ }, Ho = {
2955
2960
  name: f.FIND_PROJECT_COLLABORATORS,
2956
- description: "Search for collaborators by name or other criteria in a project.",
2957
- parameters: No,
2958
- outputSchema: Lo,
2961
+ 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.`,
2962
+ parameters: Mo,
2963
+ outputSchema: Fo,
2959
2964
  annotations: { readOnlyHint: !0, destructiveHint: !1, idempotentHint: !0 },
2960
2965
  async execute(e, t) {
2961
2966
  const { projectId: r, searchTerm: o } = e;
2967
+ if (!r)
2968
+ return Wo({ searchTerm: o, client: t, appliedFilters: e });
2962
2969
  let n = r, a;
2963
2970
  try {
2964
2971
  if (a = await t.getProject(r), !a)
@@ -2969,7 +2976,7 @@ const { FIND_PROJECTS: Uo, ADD_TASKS: At, UPDATE_TASKS: Et } = f, No = {
2969
2976
 
2970
2977
  **Next steps:**
2971
2978
  • Share the project to enable collaboration
2972
- • Use ${At} and ${Et} for assignment features once shared`,
2979
+ • Use ${Et} and ${Ot} for assignment features once shared`,
2973
2980
  structuredContent: {
2974
2981
  collaborators: [],
2975
2982
  projectInfo: {
@@ -2986,7 +2993,7 @@ const { FIND_PROJECTS: Uo, ADD_TASKS: At, UPDATE_TASKS: Et } = f, No = {
2986
2993
  `Failed to access project "${r}": ${l instanceof Error ? l.message : "Unknown error"}`
2987
2994
  );
2988
2995
  }
2989
- const i = await z.getProjectCollaborators(t, r);
2996
+ const i = await H.getProjectCollaborators(t, r);
2990
2997
  if (i.length === 0)
2991
2998
  return {
2992
2999
  textContent: `Project "${n}" has no collaborators or collaborator data is not accessible.
@@ -3006,15 +3013,9 @@ const { FIND_PROJECTS: Uo, ADD_TASKS: At, UPDATE_TASKS: Et } = f, No = {
3006
3013
  appliedFilters: e
3007
3014
  }
3008
3015
  };
3009
- let c = i;
3010
- if (o) {
3011
- const l = o.toLowerCase().trim();
3012
- c = i.filter(
3013
- (p) => p.name.toLowerCase().includes(l) || p.email.toLowerCase().includes(l)
3014
- );
3015
- }
3016
+ const c = Pt(i, o);
3016
3017
  return {
3017
- textContent: Fo({
3018
+ textContent: Ut({
3018
3019
  collaborators: c,
3019
3020
  projectName: n,
3020
3021
  searchTerm: o,
@@ -3034,33 +3035,91 @@ const { FIND_PROJECTS: Uo, ADD_TASKS: At, UPDATE_TASKS: Et } = f, No = {
3034
3035
  };
3035
3036
  }
3036
3037
  };
3037
- function Fo({
3038
+ async function Wo({
3039
+ searchTerm: e,
3040
+ client: t,
3041
+ appliedFilters: r
3042
+ }) {
3043
+ const o = await H.getAllCollaborators(t), n = await Bo(t, o);
3044
+ if (n.length === 0)
3045
+ return {
3046
+ textContent: `No users found. You may have no shared projects, or collaborator data is not accessible.
3047
+
3048
+ **Next steps:**
3049
+ • Use ${At} to find shared projects
3050
+ • Share a project to add collaborators
3051
+ • Ensure you have permission to view collaborators`,
3052
+ structuredContent: {
3053
+ collaborators: [],
3054
+ projectInfo: void 0,
3055
+ totalCount: 0,
3056
+ totalAvailable: 0,
3057
+ appliedFilters: r
3058
+ }
3059
+ };
3060
+ const a = Pt(n, e);
3061
+ return {
3062
+ textContent: Ut({
3063
+ collaborators: a,
3064
+ projectName: void 0,
3065
+ searchTerm: e,
3066
+ totalAvailable: n.length
3067
+ }),
3068
+ structuredContent: {
3069
+ collaborators: a,
3070
+ projectInfo: void 0,
3071
+ totalCount: a.length,
3072
+ totalAvailable: n.length,
3073
+ appliedFilters: r
3074
+ }
3075
+ };
3076
+ }
3077
+ async function Bo(e, t) {
3078
+ try {
3079
+ const r = await e.getUser();
3080
+ return !r || t.some((o) => o.id === r.id) ? t : [
3081
+ { id: r.id, name: r.fullName, email: r.email },
3082
+ ...t
3083
+ ];
3084
+ } catch {
3085
+ return t;
3086
+ }
3087
+ }
3088
+ function Pt(e, t) {
3089
+ if (!t)
3090
+ return e;
3091
+ const r = t.toLowerCase().trim();
3092
+ return e.filter(
3093
+ (o) => o.name.toLowerCase().includes(r) || o.email.toLowerCase().includes(r)
3094
+ );
3095
+ }
3096
+ function Ut({
3038
3097
  collaborators: e,
3039
3098
  projectName: t,
3040
3099
  searchTerm: r,
3041
3100
  totalAvailable: o
3042
3101
  }) {
3043
- const n = r ? `Project collaborators matching "${r}"` : "Project collaborators", a = [];
3044
- r && a.push(`matching "${r}"`), a.push(`in project "${t}"`);
3045
- let i = [];
3046
- e.length > 0 && (i = e.slice(0, 10).map((l) => {
3047
- const p = l.name || "Unknown Name", u = l.email || "No email";
3048
- return `• ${p} (${u}) - ID: ${l.id}`;
3049
- }), e.length > 10 && i.push(`... and ${e.length - 10} more`));
3050
- const c = [];
3051
- e.length === 0 && (r ? (c.push(`No collaborators match "${r}"`), c.push("Try a broader search term or check spelling"), o > 0 && c.push(`${o} collaborators available without filter`)) : (c.push("Project has no collaborators"), c.push("Share the project to add collaborators")));
3052
- const d = [];
3053
- return e.length > 0 ? (d.push(`Use ${At} with responsibleUser to assign new tasks`), d.push(`Use ${Et} with responsibleUser to reassign existing tasks`), d.push("Use collaborator names, emails, or IDs for assignments")) : (d.push(`Use ${Uo} to find other projects`), r && o > 0 && d.push("Try searching without filters to see all collaborators")), H({
3054
- subject: n,
3102
+ const n = t ? `project "${t}"` : "workspace", a = t ? "Project collaborators" : "Workspace users", i = r ? `${a} matching "${r}"` : a, c = [];
3103
+ r && c.push(`matching "${r}"`), c.push(`in ${n}`);
3104
+ let d = [];
3105
+ e.length > 0 && (d = e.slice(0, 10).map((u) => {
3106
+ const m = u.name || "Unknown Name", h = u.email || "No email";
3107
+ return `• ${m} (${h}) - ID: ${u.id}`;
3108
+ }), e.length > 10 && d.push(`... and ${e.length - 10} more`));
3109
+ const l = [];
3110
+ 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`));
3111
+ const p = [];
3112
+ return e.length > 0 ? (p.push(`Use ${Et} with responsibleUser to assign new tasks`), p.push(`Use ${Ot} with responsibleUser to reassign existing tasks`), p.push("Use user names, emails, or IDs for assignments")) : (p.push(`Use ${At} to find other projects`), r && o > 0 && p.push("Try searching without filters to see all users")), W({
3113
+ subject: i,
3055
3114
  count: e.length,
3056
- filterHints: a,
3057
- previewLines: i.join(`
3115
+ filterHints: c,
3116
+ previewLines: d.join(`
3058
3117
  `),
3059
- zeroReasonHints: c,
3060
- nextSteps: d
3118
+ zeroReasonHints: l,
3119
+ nextSteps: p
3061
3120
  });
3062
3121
  }
3063
- const { ADD_PROJECTS: Ho } = f, Wo = {
3122
+ const { ADD_PROJECTS: zo } = f, Yo = {
3064
3123
  searchText: s.string().optional().describe(
3065
3124
  '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.'
3066
3125
  ),
@@ -3068,17 +3127,17 @@ const { ADD_PROJECTS: Ho } = f, Wo = {
3068
3127
  cursor: s.string().optional().describe(
3069
3128
  "The cursor to get the next page of projects (cursor is obtained from the previous call to this tool, with the same parameters)."
3070
3129
  )
3071
- }, Bo = {
3130
+ }, Go = {
3072
3131
  projects: s.array(ie).describe("The found projects."),
3073
3132
  nextCursor: s.string().optional().describe("Cursor for the next page of results."),
3074
3133
  totalCount: s.number().describe("The total number of projects in this page."),
3075
3134
  hasMore: s.boolean().describe("Whether there are more results available."),
3076
3135
  appliedFilters: s.record(s.string(), s.unknown()).describe("The filters that were applied to the search.")
3077
- }, zo = {
3136
+ }, qo = {
3078
3137
  name: f.FIND_PROJECTS,
3079
3138
  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.",
3080
- parameters: Wo,
3081
- outputSchema: Bo,
3139
+ parameters: Yo,
3140
+ outputSchema: Go,
3082
3141
  annotations: { readOnlyHint: !0, destructiveHint: !1, idempotentHint: !0 },
3083
3142
  async execute(e, t) {
3084
3143
  let r, o = null;
@@ -3091,9 +3150,9 @@ const { ADD_PROJECTS: Ho } = f, Wo = {
3091
3150
  });
3092
3151
  r = a.results, o = a.nextCursor;
3093
3152
  }
3094
- const n = r.map(K);
3153
+ const n = r.map(V);
3095
3154
  return {
3096
- textContent: Yo({ projects: n, args: e, nextCursor: o }),
3155
+ textContent: Ko({ projects: n, args: e, nextCursor: o }),
3097
3156
  structuredContent: {
3098
3157
  projects: n,
3099
3158
  nextCursor: o ?? void 0,
@@ -3104,17 +3163,17 @@ const { ADD_PROJECTS: Ho } = f, Wo = {
3104
3163
  };
3105
3164
  }
3106
3165
  };
3107
- function Yo({
3166
+ function Ko({
3108
3167
  projects: e,
3109
3168
  args: t,
3110
3169
  nextCursor: r
3111
3170
  }) {
3112
3171
  const o = t.searchText ? `All projects matching "${t.searchText}"` : "Projects", n = [];
3113
3172
  t.searchText && n.push(`searchText: "${t.searchText}"`);
3114
- const a = 10, c = e.slice(0, a).map(Wr).join(`
3173
+ const a = 10, c = e.slice(0, a).map(Yr).join(`
3115
3174
  `), d = e.length - a, l = d > 0 ? `${c}
3116
3175
  …and ${d} more` : c, p = [];
3117
- return e.length === 0 && (t.searchText ? (p.push("Try broader search terms"), p.push("Check spelling"), p.push("Remove searchText to see all projects")) : (p.push("No projects created yet"), p.push(`Use ${Ho} to create a project`))), H({
3176
+ return e.length === 0 && (t.searchText ? (p.push("Try broader search terms"), p.push("Check spelling"), p.push("Remove searchText to see all projects")) : (p.push("No projects created yet"), p.push(`Use ${zo} to create a project`))), W({
3118
3177
  subject: o,
3119
3178
  count: e.length,
3120
3179
  limit: t.searchText ? void 0 : t.limit,
@@ -3124,22 +3183,22 @@ function Yo({
3124
3183
  zeroReasonHints: p
3125
3184
  });
3126
3185
  }
3127
- const Go = {
3186
+ const Vo = {
3128
3187
  taskId: s.string().optional().describe(
3129
3188
  "Find all reminders for a specific task. Returns both time-based and location reminders."
3130
3189
  ),
3131
3190
  reminderId: s.string().optional().describe("Get a specific time-based reminder (relative or absolute) by its ID."),
3132
3191
  locationReminderId: s.string().optional().describe("Get a specific location reminder by its ID.")
3133
- }, qo = {
3192
+ }, Jo = {
3134
3193
  reminders: s.array(We).describe("The found reminders (time-based and location)."),
3135
3194
  searchType: s.string().describe('The search type used: "task", "reminder", or "location_reminder".'),
3136
3195
  searchId: s.string().describe("The ID used for the search."),
3137
3196
  totalCount: s.number().describe("Total reminders in this response.")
3138
- }, Ko = {
3197
+ }, Xo = {
3139
3198
  name: f.FIND_REMINDERS,
3140
3199
  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.",
3141
- parameters: Go,
3142
- outputSchema: qo,
3200
+ parameters: Vo,
3201
+ outputSchema: Jo,
3143
3202
  annotations: { readOnlyHint: !0, destructiveHint: !1, idempotentHint: !0 },
3144
3203
  async execute(e, t) {
3145
3204
  const { taskId: r, reminderId: o, locationReminderId: n } = e, a = [r, o, n].filter(Boolean);
@@ -3175,17 +3234,17 @@ const Go = {
3175
3234
  }
3176
3235
  if (r) {
3177
3236
  const [i, c] = await Promise.all([
3178
- ne({
3237
+ q({
3179
3238
  apiMethod: (u) => t.getReminders(u),
3180
3239
  args: { taskId: r }
3181
3240
  }),
3182
- ne({
3241
+ q({
3183
3242
  apiMethod: (u) => t.getLocationReminders(u),
3184
3243
  args: { taskId: r }
3185
3244
  })
3186
3245
  ]), l = [...i, ...c].map(de);
3187
3246
  return {
3188
- textContent: Vo(l, r),
3247
+ textContent: Zo(l, r),
3189
3248
  structuredContent: {
3190
3249
  reminders: l,
3191
3250
  searchType: "task",
@@ -3197,7 +3256,7 @@ const Go = {
3197
3256
  throw new Error("One of taskId, reminderId, or locationReminderId must be provided.");
3198
3257
  }
3199
3258
  };
3200
- function Vo(e, t) {
3259
+ function Zo(e, t) {
3201
3260
  if (e.length === 0)
3202
3261
  return `No reminders found for task ${t}`;
3203
3262
  const { timeBasedCount: r, locationCount: o } = It(e), n = [];
@@ -3211,35 +3270,35 @@ function Vo(e, t) {
3211
3270
  }
3212
3271
  return `Found ${n.join(" and ")} for task ${t}`;
3213
3272
  }
3214
- const { ADD_SECTIONS: Jo } = f, Xo = {
3273
+ const { ADD_SECTIONS: Qo } = f, en = {
3215
3274
  projectId: s.string().min(1).describe(
3216
3275
  'The ID of the project to search sections in. Project ID should be an ID string, or the text "inbox", for inbox tasks.'
3217
3276
  ),
3218
3277
  searchText: s.string().optional().describe(
3219
3278
  '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.'
3220
3279
  )
3221
- }, Zo = {
3280
+ }, tn = {
3222
3281
  sections: s.array(be).describe("The found sections."),
3223
3282
  totalCount: s.number().describe("The total number of sections found."),
3224
3283
  appliedFilters: s.record(s.string(), s.unknown()).describe("The filters that were applied to the search.")
3225
- }, Qo = {
3284
+ }, sn = {
3226
3285
  name: f.FIND_SECTIONS,
3227
3286
  description: "Search for sections by name or other criteria in a project. When searching, uses server-side search to avoid fetching all sections.",
3228
- parameters: Xo,
3229
- outputSchema: Zo,
3287
+ parameters: en,
3288
+ outputSchema: tn,
3230
3289
  annotations: { readOnlyHint: !0, destructiveHint: !1, idempotentHint: !0 },
3231
3290
  async execute(e, t) {
3232
- const r = await q({
3291
+ const r = await K({
3233
3292
  projectId: e.projectId,
3234
3293
  client: t
3235
3294
  });
3236
3295
  let o;
3237
- e.searchText ? o = await zs(t, e.searchText, r) : o = (await t.getSections({
3296
+ e.searchText ? o = await qs(t, e.searchText, r) : o = (await t.getSections({
3238
3297
  projectId: r
3239
3298
  })).results;
3240
3299
  const n = o.map(({ id: i, name: c }) => ({ id: i, name: c }));
3241
3300
  return {
3242
- textContent: en({
3301
+ textContent: rn({
3243
3302
  sections: n,
3244
3303
  projectId: e.projectId,
3245
3304
  searchText: e.searchText
@@ -3252,26 +3311,26 @@ const { ADD_SECTIONS: Jo } = f, Xo = {
3252
3311
  };
3253
3312
  }
3254
3313
  };
3255
- function en({
3314
+ function rn({
3256
3315
  sections: e,
3257
3316
  projectId: t,
3258
3317
  searchText: r
3259
3318
  }) {
3260
3319
  const o = [];
3261
- 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 ${Jo} to create sections`));
3320
+ 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 ${Qo} to create sections`));
3262
3321
  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(`
3263
3322
  `) : void 0;
3264
- return H({
3323
+ return W({
3265
3324
  subject: n,
3266
3325
  count: e.length,
3267
3326
  previewLines: a,
3268
3327
  zeroReasonHints: o
3269
3328
  });
3270
3329
  }
3271
- function Ot(e) {
3330
+ function _t(e) {
3272
3331
  return /* @__PURE__ */ new Date(`${e}T00:00:00`);
3273
3332
  }
3274
- const tn = {
3333
+ const on = {
3275
3334
  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'."),
3276
3335
  overdueOption: s.enum(["overdue-only", "include-overdue", "exclude-overdue"]).optional().describe(
3277
3336
  "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'."
@@ -3290,17 +3349,17 @@ const tn = {
3290
3349
  "Filter when responsibleUser is omitted. 'assigned'=assigned to others; 'unassignedOrMe'=unassigned+mine; 'all'=everyone. Default: 'unassignedOrMe'."
3291
3350
  ),
3292
3351
  ...Ke
3293
- }, sn = {
3294
- tasks: s.array(V).describe("The found tasks."),
3352
+ }, nn = {
3353
+ tasks: s.array(J).describe("The found tasks."),
3295
3354
  nextCursor: s.string().optional().describe("Cursor for the next page of results."),
3296
3355
  totalCount: s.number().describe("The total number of tasks in this page."),
3297
3356
  hasMore: s.boolean().describe("Whether there are more results available."),
3298
3357
  appliedFilters: s.record(s.string(), s.unknown()).describe("The filters that were applied to the search.")
3299
- }, rn = {
3358
+ }, an = {
3300
3359
  name: f.FIND_TASKS_BY_DATE,
3301
3360
  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.",
3302
- parameters: tn,
3303
- outputSchema: sn,
3361
+ parameters: on,
3362
+ outputSchema: nn,
3304
3363
  annotations: { readOnlyHint: !0, destructiveHint: !1, idempotentHint: !0 },
3305
3364
  async execute(e, t) {
3306
3365
  if (!e.startDate && e.overdueOption !== "overdue-only")
@@ -3313,22 +3372,22 @@ const tn = {
3313
3372
  a = "overdue";
3314
3373
  else if (e.startDate === "today")
3315
3374
  if (e.daysCount > 1) {
3316
- const u = /* @__PURE__ */ new Date(), m = se(u), h = Ae(u, e.daysCount), b = Xe(h, { representation: "date" }), I = `(due after: ${m} | due: ${m}) & due before: ${b}`;
3375
+ const u = /* @__PURE__ */ new Date(), m = re(u), h = Ae(u, e.daysCount), b = Xe(h, { representation: "date" }), I = `(due after: ${m} | due: ${m}) & due before: ${b}`;
3317
3376
  a = e.overdueOption === "exclude-overdue" ? I : `(${I} | overdue)`;
3318
3377
  } else
3319
3378
  a = e.overdueOption === "exclude-overdue" ? "today" : "(today | overdue)";
3320
3379
  else if (e.startDate) {
3321
- const u = e.startDate, m = Ae(Ot(u), e.daysCount), h = Xe(m, { representation: "date" });
3380
+ const u = e.startDate, m = Ae(_t(u), e.daysCount), h = Xe(m, { representation: "date" });
3322
3381
  a = `(due after: ${u} | due: ${u}) & due before: ${h}`;
3323
3382
  }
3324
3383
  const i = Ve(e.labels, e.labelsOperator);
3325
- i.length > 0 && (a = re(a, `(${i})`));
3384
+ i.length > 0 && (a = oe(a, `(${i})`));
3326
3385
  const c = Tt({
3327
3386
  resolvedAssigneeId: o,
3328
3387
  assigneeEmail: n,
3329
3388
  responsibleUserFiltering: e.responsibleUserFiltering
3330
3389
  });
3331
- a = re(a, c);
3390
+ a = oe(a, c);
3332
3391
  const { tasks: d, nextCursor: l } = await He({
3333
3392
  client: t,
3334
3393
  query: a,
@@ -3336,7 +3395,7 @@ const tn = {
3336
3395
  limit: e.limit
3337
3396
  });
3338
3397
  return {
3339
- textContent: on({ tasks: d, args: e, nextCursor: l, assigneeEmail: n }),
3398
+ textContent: cn({ tasks: d, args: e, nextCursor: l, assigneeEmail: n }),
3340
3399
  structuredContent: {
3341
3400
  tasks: d,
3342
3401
  nextCursor: l ?? void 0,
@@ -3347,7 +3406,7 @@ const tn = {
3347
3406
  };
3348
3407
  }
3349
3408
  };
3350
- function on({
3409
+ function cn({
3351
3410
  tasks: e,
3352
3411
  args: t,
3353
3412
  nextCursor: r,
@@ -3362,7 +3421,7 @@ function on({
3362
3421
  `today${c}${t.daysCount > 1 ? ` + ${t.daysCount - 1} more days` : ""}`
3363
3422
  );
3364
3423
  } else if (t.startDate) {
3365
- const c = t.daysCount > 1 ? ` to ${se(Ae(Ot(t.startDate), t.daysCount))}` : "";
3424
+ const c = t.daysCount > 1 ? ` to ${re(Ae(_t(t.startDate), t.daysCount))}` : "";
3366
3425
  n.push(`${t.startDate}${c}`);
3367
3426
  }
3368
3427
  if (t.labels && t.labels.length > 0) {
@@ -3387,7 +3446,7 @@ function on({
3387
3446
  i.push(`Great job! No tasks for today${c}`);
3388
3447
  } else
3389
3448
  i.push("Expand date range with larger 'daysCount'"), i.push("Check today's tasks with startDate='today'");
3390
- return H({
3449
+ return W({
3391
3450
  subject: a,
3392
3451
  count: e.length,
3393
3452
  limit: t.limit,
@@ -3397,13 +3456,13 @@ function on({
3397
3456
  zeroReasonHints: i
3398
3457
  });
3399
3458
  }
3400
- const nn = 300 * 1e3;
3401
- class an {
3459
+ const dn = 300 * 1e3;
3460
+ class ln {
3402
3461
  constructor() {
3403
3462
  this.cache = null;
3404
3463
  }
3405
3464
  async getFilters(t) {
3406
- if (this.cache && Date.now() - this.cache.timestamp < nn)
3465
+ if (this.cache && Date.now() - this.cache.timestamp < dn)
3407
3466
  return this.cache.filters;
3408
3467
  const o = ((await t.sync({
3409
3468
  resourceTypes: ["filters"],
@@ -3460,7 +3519,7 @@ ${p}` + (d.length > 5 ? `
3460
3519
  this.cache = null;
3461
3520
  }
3462
3521
  }
3463
- const cn = new an(), { FIND_COMPLETED_TASKS: nt, ADD_TASKS: at } = f, dn = {
3522
+ const un = new ln(), { FIND_COMPLETED_TASKS: nt, ADD_TASKS: at } = f, pn = {
3464
3523
  searchText: s.string().optional().describe("The text to search for in tasks."),
3465
3524
  projectId: s.string().optional().describe(
3466
3525
  'Find tasks in this project. Project ID should be an ID string, or the text "inbox", for inbox tasks.'
@@ -3482,17 +3541,17 @@ const cn = new an(), { FIND_COMPLETED_TASKS: nt, ADD_TASKS: at } = f, dn = {
3482
3541
  "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."
3483
3542
  ),
3484
3543
  ...Ke
3485
- }, ln = {
3486
- tasks: s.array(V).describe("The found tasks."),
3544
+ }, mn = {
3545
+ tasks: s.array(J).describe("The found tasks."),
3487
3546
  nextCursor: s.string().optional().describe("Cursor for the next page of results."),
3488
3547
  totalCount: s.number().describe("The total number of tasks in this page."),
3489
3548
  hasMore: s.boolean().describe("Whether there are more results available."),
3490
3549
  appliedFilters: s.record(s.string(), s.unknown()).describe("The filters that were applied to the search.")
3491
- }, un = {
3550
+ }, hn = {
3492
3551
  name: f.FIND_TASKS,
3493
3552
  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.",
3494
- parameters: dn,
3495
- outputSchema: ln,
3553
+ parameters: pn,
3554
+ outputSchema: mn,
3496
3555
  annotations: { readOnlyHint: !0, destructiveHint: !1, idempotentHint: !0 },
3497
3556
  async execute(e, t) {
3498
3557
  const {
@@ -3522,40 +3581,40 @@ const cn = new an(), { FIND_COMPLETED_TASKS: nt, ADD_TASKS: at } = f, dn = {
3522
3581
  'The `filter`/`filterIdOrName` parameter cannot be combined with projectId, sectionId, or parentId. Use filter syntax instead (e.g. "##ProjectName").'
3523
3582
  );
3524
3583
  let D = m;
3525
- h && (D = (await cn.resolveFilter(t, h)).filterQuery);
3584
+ h && (D = (await un.resolveFilter(t, h)).filterQuery);
3526
3585
  const $ = await Me(t, i), N = $?.userId, T = $?.email;
3527
3586
  if (o || n || a) {
3528
3587
  const x = {
3529
3588
  limit: d,
3530
3589
  cursor: l ?? null
3531
3590
  };
3532
- o && (x.projectId = await q({ projectId: o, user: b })), n && (x.sectionId = n), a && (x.parentId = a);
3533
- const { results: L, nextCursor: W } = await t.getTasks(x), Ie = L.map(_);
3591
+ o && (x.projectId = await K({ projectId: o, user: b })), n && (x.sectionId = n), a && (x.parentId = a);
3592
+ const { results: L, nextCursor: B } = await t.getTasks(x), Ie = L.map(U);
3534
3593
  let M = r ? Ie.filter(
3535
- (J) => J.content.toLowerCase().includes(r.toLowerCase()) || J.description?.toLowerCase().includes(r.toLowerCase())
3594
+ (X) => X.content.toLowerCase().includes(r.toLowerCase()) || X.description?.toLowerCase().includes(r.toLowerCase())
3536
3595
  ) : Ie;
3537
- return M = Hs({
3596
+ return M = zs({
3538
3597
  tasks: M,
3539
3598
  resolvedAssigneeId: N,
3540
3599
  currentUserId: b.id,
3541
3600
  responsibleUserFiltering: c
3542
3601
  }), p && p.length > 0 && (M = u === "and" ? M.filter(
3543
- (J) => p.every((ve) => J.labels.includes(ve))
3602
+ (X) => p.every((ve) => X.labels.includes(ve))
3544
3603
  ) : M.filter(
3545
- (J) => p.some((ve) => J.labels.includes(ve))
3604
+ (X) => p.some((ve) => X.labels.includes(ve))
3546
3605
  )), {
3547
3606
  textContent: $e({
3548
3607
  tasks: M,
3549
3608
  args: e,
3550
- nextCursor: W,
3609
+ nextCursor: B,
3551
3610
  isContainerSearch: !0,
3552
3611
  assigneeEmail: T
3553
3612
  }),
3554
3613
  structuredContent: {
3555
3614
  tasks: M,
3556
- nextCursor: W ?? void 0,
3615
+ nextCursor: B ?? void 0,
3557
3616
  totalCount: M.length,
3558
- hasMore: !!W,
3617
+ hasMore: !!B,
3559
3618
  appliedFilters: e
3560
3619
  }
3561
3620
  };
@@ -3566,34 +3625,34 @@ const cn = new an(), { FIND_COMPLETED_TASKS: nt, ADD_TASKS: at } = f, dn = {
3566
3625
  lang: "en",
3567
3626
  limit: d,
3568
3627
  cursor: l ?? null
3569
- }), W = x.map(_);
3628
+ }), B = x.map(U);
3570
3629
  return {
3571
3630
  textContent: $e({
3572
- tasks: W,
3631
+ tasks: B,
3573
3632
  args: e,
3574
3633
  nextCursor: L,
3575
3634
  isContainerSearch: !1,
3576
3635
  assigneeEmail: T
3577
3636
  }),
3578
3637
  structuredContent: {
3579
- tasks: W,
3638
+ tasks: B,
3580
3639
  nextCursor: L ?? void 0,
3581
- totalCount: W.length,
3640
+ totalCount: B.length,
3582
3641
  hasMore: !!L,
3583
3642
  appliedFilters: e
3584
3643
  }
3585
3644
  };
3586
3645
  }
3587
3646
  let g = D ? `(${D})` : "";
3588
- r && (g = re(g, `search: ${r}`));
3647
+ r && (g = oe(g, `search: ${r}`));
3589
3648
  const S = Ve(p, u);
3590
- if (g = re(g, S), !(h && !i && !c)) {
3649
+ if (g = oe(g, S), !(h && !i && !c)) {
3591
3650
  const x = Tt({
3592
3651
  resolvedAssigneeId: N,
3593
3652
  assigneeEmail: T,
3594
3653
  responsibleUserFiltering: c
3595
3654
  });
3596
- g = re(g, x);
3655
+ g = oe(g, x);
3597
3656
  }
3598
3657
  const { tasks: w, nextCursor: j } = await He({
3599
3658
  client: t,
@@ -3619,7 +3678,7 @@ const cn = new an(), { FIND_COMPLETED_TASKS: nt, ADD_TASKS: at } = f, dn = {
3619
3678
  };
3620
3679
  }
3621
3680
  };
3622
- function pn(e) {
3681
+ function fn(e) {
3623
3682
  if (e.projectId) {
3624
3683
  const t = [
3625
3684
  e.searchText ? "No tasks in project match search" : "Project has no tasks yet"
@@ -3654,7 +3713,7 @@ function $e({
3654
3713
  const d = t.labels.map((l) => `@${l}`).join(t.labelsOperator === "and" ? " & " : " | ");
3655
3714
  i.push(`labels: ${d}`);
3656
3715
  }
3657
- e.length === 0 && c.push(...pn(t));
3716
+ e.length === 0 && c.push(...fn(t));
3658
3717
  } else {
3659
3718
  const d = n || t.responsibleUser, l = [];
3660
3719
  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) {
@@ -3673,7 +3732,7 @@ function $e({
3673
3732
  t.searchText && (c.push("Try broader search terms"), c.push("Verify spelling and try partial words"), t.responsibleUser || c.push(`Check completed tasks with ${nt}`));
3674
3733
  }
3675
3734
  }
3676
- return H({
3735
+ return W({
3677
3736
  subject: a,
3678
3737
  count: e.length,
3679
3738
  limit: t.limit,
@@ -3683,11 +3742,11 @@ function $e({
3683
3742
  zeroReasonHints: c
3684
3743
  });
3685
3744
  }
3686
- const mn = {
3745
+ const bn = {
3687
3746
  projectId: s.string().min(1).optional().describe(
3688
3747
  "Optional project ID. If provided, shows detailed overview of that project. If omitted, shows overview of all projects."
3689
3748
  )
3690
- }, Pt = s.lazy(
3749
+ }, Rt = s.lazy(
3691
3750
  () => s.object({
3692
3751
  id: s.string().describe("The project ID."),
3693
3752
  name: s.string().describe("The project name."),
@@ -3700,9 +3759,9 @@ const mn = {
3700
3759
  name: s.string()
3701
3760
  })
3702
3761
  ),
3703
- children: s.array(Pt).describe("Nested child projects.")
3762
+ children: s.array(Rt).describe("Nested child projects.")
3704
3763
  })
3705
- ), hn = {
3764
+ ), gn = {
3706
3765
  type: s.enum(["account_overview", "project_overview"]).describe("The type of overview returned."),
3707
3766
  totalProjects: s.number().optional().describe("Total number of projects (account overview only)."),
3708
3767
  totalTasks: s.number().optional().describe("Total number of tasks."),
@@ -3726,7 +3785,7 @@ const mn = {
3726
3785
  })
3727
3786
  ).describe("Sections in the inbox project.")
3728
3787
  }).nullable().optional().describe("Inbox information (account overview only)."),
3729
- projects: s.array(s.lazy(() => Pt)).optional().describe(
3788
+ projects: s.array(s.lazy(() => Rt)).optional().describe(
3730
3789
  "List of projects with hierarchy, folders, and ordering (account overview only)."
3731
3790
  ),
3732
3791
  project: s.object({
@@ -3746,7 +3805,7 @@ const mn = {
3746
3805
  tasksWithoutSection: s.number()
3747
3806
  }).optional().describe("Statistics object (project overview only).")
3748
3807
  };
3749
- function fn(e) {
3808
+ function yn(e) {
3750
3809
  const t = {};
3751
3810
  for (const n of e)
3752
3811
  t[n.id] = {
@@ -3758,7 +3817,7 @@ function fn(e) {
3758
3817
  for (const n of e) {
3759
3818
  const a = t[n.id];
3760
3819
  if (a)
3761
- if (oe(n) && n.parentId) {
3820
+ if (ne(n) && n.parentId) {
3762
3821
  const i = t[n.parentId];
3763
3822
  i ? i.children.push(a) : r.push(a);
3764
3823
  } else
@@ -3771,7 +3830,7 @@ function fn(e) {
3771
3830
  }
3772
3831
  return o(r), r;
3773
3832
  }
3774
- async function bn(e, t) {
3833
+ async function kn(e, t) {
3775
3834
  const r = {};
3776
3835
  return await Promise.all(
3777
3836
  t.map(async (o) => {
@@ -3780,14 +3839,14 @@ async function bn(e, t) {
3780
3839
  })
3781
3840
  ), r;
3782
3841
  }
3783
- function _t(e, t, r = "") {
3842
+ function Nt(e, t, r = "") {
3784
3843
  const o = [];
3785
3844
  o.push(`${r}- Project: ${e.name} (id=${e.id})`);
3786
3845
  const n = t[e.id] || [];
3787
3846
  for (const a of n)
3788
3847
  o.push(`${r} - Section: ${a.name} (id=${a.id})`);
3789
3848
  for (const a of e.children)
3790
- o.push(..._t(a, t, `${r} `));
3849
+ o.push(...Nt(a, t, `${r} `));
3791
3850
  return o;
3792
3851
  }
3793
3852
  function it(e) {
@@ -3807,28 +3866,28 @@ function it(e) {
3807
3866
  }
3808
3867
  return r;
3809
3868
  }
3810
- function Re(e, t = "") {
3869
+ function _e(e, t = "") {
3811
3870
  const r = [];
3812
3871
  for (const o of e) {
3813
3872
  const n = `id=${o.id}`, a = o.dueDate ? `; due=${o.dueDate}` : "", i = `; content=${o.content}`;
3814
- r.push(`${t}- ${n}${a}${i}`), o.children.length > 0 && r.push(...Re(o.children, `${t} `));
3873
+ r.push(`${t}- ${n}${a}${i}`), o.children.length > 0 && r.push(..._e(o.children, `${t} `));
3815
3874
  }
3816
3875
  return r;
3817
3876
  }
3818
- function Rt(e, t) {
3877
+ function Lt(e, t) {
3819
3878
  return {
3820
3879
  id: e.id,
3821
3880
  name: e.name,
3822
- parentId: oe(e) ? e.parentId ?? void 0 : void 0,
3881
+ parentId: ne(e) ? e.parentId ?? void 0 : void 0,
3823
3882
  folderId: pe(e) ? e.folderId ?? void 0 : void 0,
3824
3883
  childOrder: e.childOrder,
3825
3884
  sections: t[e.id] || [],
3826
3885
  children: e.children.map(
3827
- (r) => Rt(r, t)
3886
+ (r) => Lt(r, t)
3828
3887
  )
3829
3888
  };
3830
3889
  }
3831
- async function gn(e, t) {
3890
+ async function Tn(e, t) {
3832
3891
  let r = [], o;
3833
3892
  do {
3834
3893
  const { results: n, nextCursor: a } = await e.getTasks({
@@ -3836,16 +3895,16 @@ async function gn(e, t) {
3836
3895
  limit: C.TASKS_BATCH_SIZE,
3837
3896
  cursor: o ?? void 0
3838
3897
  });
3839
- r = r.concat(n.map(_)), o = a ?? void 0;
3898
+ r = r.concat(n.map(U)), o = a ?? void 0;
3840
3899
  } while (o);
3841
3900
  return r;
3842
3901
  }
3843
- async function yn(e, t) {
3902
+ async function wn(e, t) {
3844
3903
  const { results: r } = await e.getSections({ projectId: t });
3845
3904
  return r;
3846
3905
  }
3847
- async function kn(e) {
3848
- const { results: t } = await e.getProjects({}), r = t.find((u) => oe(u) && u.inboxProject === !0), o = t.filter((u) => !oe(u) || u.inboxProject !== !0), n = fn(o), a = t.map((u) => u.id), i = await bn(e, a), c = ["# Personal Projects", ""];
3906
+ async function In(e) {
3907
+ const { results: t } = await e.getProjects({}), r = t.find((u) => ne(u) && u.inboxProject === !0), o = t.filter((u) => !ne(u) || u.inboxProject !== !0), n = yn(o), a = t.map((u) => u.id), i = await kn(e, a), c = ["# Personal Projects", ""];
3849
3908
  if (r) {
3850
3909
  c.push(`- Inbox Project: ${r.name} (id=${r.id})`);
3851
3910
  for (const u of i[r.id] || [])
@@ -3853,7 +3912,7 @@ async function kn(e) {
3853
3912
  }
3854
3913
  if (n.length)
3855
3914
  for (const u of n)
3856
- c.push(..._t(u, i));
3915
+ c.push(...Nt(u, i));
3857
3916
  else
3858
3917
  c.push("_No projects found._");
3859
3918
  c.push("");
@@ -3871,7 +3930,7 @@ async function kn(e) {
3871
3930
  sections: i[r.id] || []
3872
3931
  } : null,
3873
3932
  projects: n.map(
3874
- (u) => Rt(u, i)
3933
+ (u) => Lt(u, i)
3875
3934
  ),
3876
3935
  totalProjects: t.length,
3877
3936
  totalSections: a.reduce(
@@ -3882,11 +3941,11 @@ async function kn(e) {
3882
3941
  };
3883
3942
  return { textContent: l, structuredContent: p };
3884
3943
  }
3885
- async function Tn(e, t) {
3944
+ async function vn(e, t) {
3886
3945
  const [r, o, n] = await Promise.all([
3887
3946
  e.getProject(t),
3888
- yn(e, t),
3889
- gn(e, t)
3947
+ wn(e, t),
3948
+ Tn(e, t)
3890
3949
  ]), a = {};
3891
3950
  for (const p of o)
3892
3951
  a[p.id] = [];
@@ -3897,7 +3956,7 @@ async function Tn(e, t) {
3897
3956
  if (i.length > 0) {
3898
3957
  c.push("");
3899
3958
  const p = it(i);
3900
- c.push(...Re(p));
3959
+ c.push(..._e(p));
3901
3960
  }
3902
3961
  for (const p of o) {
3903
3962
  c.push(""), c.push(`## ${p.name}`);
@@ -3905,7 +3964,7 @@ async function Tn(e, t) {
3905
3964
  if (!u?.length)
3906
3965
  continue;
3907
3966
  const m = it(u);
3908
- c.push(...Re(m));
3967
+ c.push(..._e(m));
3909
3968
  }
3910
3969
  const d = c.join(`
3911
3970
  `), l = {
@@ -3928,27 +3987,27 @@ async function Tn(e, t) {
3928
3987
  };
3929
3988
  return { textContent: d, structuredContent: l };
3930
3989
  }
3931
- const wn = {
3990
+ const jn = {
3932
3991
  name: f.GET_OVERVIEW,
3933
3992
  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.",
3934
- parameters: mn,
3935
- outputSchema: hn,
3993
+ parameters: bn,
3994
+ outputSchema: gn,
3936
3995
  annotations: { readOnlyHint: !0, destructiveHint: !1, idempotentHint: !0 },
3937
3996
  async execute(e, t) {
3938
- const r = e.projectId ? await Tn(t, e.projectId) : await kn(t);
3997
+ const r = e.projectId ? await vn(t, e.projectId) : await In(t);
3939
3998
  return {
3940
3999
  textContent: r.textContent,
3941
4000
  structuredContent: r.structuredContent
3942
4001
  };
3943
4002
  }
3944
- }, In = {}, te = s.object({
4003
+ }, Sn = {}, se = s.object({
3945
4004
  count: s.number().describe("Number of consecutive periods in this streak."),
3946
4005
  start: s.string().describe("Start date of the streak."),
3947
4006
  end: s.string().describe("End date of the streak.")
3948
4007
  }), ct = s.object({
3949
4008
  id: s.string().describe("Project ID."),
3950
4009
  completed: s.number().describe("Number of tasks completed in this project.")
3951
- }), vn = {
4010
+ }), Cn = {
3952
4011
  completedCount: s.number().describe("Total number of completed tasks (all-time)."),
3953
4012
  daysItems: s.array(
3954
4013
  s.object({
@@ -3968,12 +4027,12 @@ const wn = {
3968
4027
  goals: s.object({
3969
4028
  dailyGoal: s.number().describe("Daily task completion goal."),
3970
4029
  weeklyGoal: s.number().describe("Weekly task completion goal."),
3971
- currentDailyStreak: te.describe("Current daily goal streak."),
3972
- currentWeeklyStreak: te.describe("Current weekly goal streak."),
3973
- lastDailyStreak: te.describe("Previous daily goal streak."),
3974
- lastWeeklyStreak: te.describe("Previous weekly goal streak."),
3975
- maxDailyStreak: te.describe("Best daily goal streak ever."),
3976
- maxWeeklyStreak: te.describe("Best weekly goal streak ever."),
4030
+ currentDailyStreak: se.describe("Current daily goal streak."),
4031
+ currentWeeklyStreak: se.describe("Current weekly goal streak."),
4032
+ lastDailyStreak: se.describe("Previous daily goal streak."),
4033
+ lastWeeklyStreak: se.describe("Previous weekly goal streak."),
4034
+ maxDailyStreak: se.describe("Best daily goal streak ever."),
4035
+ maxWeeklyStreak: se.describe("Best weekly goal streak ever."),
3977
4036
  vacationMode: s.number().describe("Whether vacation mode is enabled (0 or 1)."),
3978
4037
  karmaDisabled: s.number().describe("Whether karma tracking is disabled (0 or 1).")
3979
4038
  }).describe("Goal and streak information."),
@@ -3997,11 +4056,11 @@ const wn = {
3997
4056
  })
3998
4057
  ).describe("Recent karma change events with reasons."),
3999
4058
  projectColors: s.record(s.string(), s.string()).describe("Map of project ID to color key.")
4000
- }, jn = {
4059
+ }, $n = {
4001
4060
  name: f.GET_PRODUCTIVITY_STATS,
4002
4061
  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.",
4003
- parameters: In,
4004
- outputSchema: vn,
4062
+ parameters: Sn,
4063
+ outputSchema: Cn,
4005
4064
  annotations: {
4006
4065
  readOnlyHint: !0,
4007
4066
  destructiveHint: !1,
@@ -4010,7 +4069,7 @@ const wn = {
4010
4069
  async execute(e, t) {
4011
4070
  const r = await t.getProductivityStats();
4012
4071
  return {
4013
- textContent: Sn(r),
4072
+ textContent: Dn(r),
4014
4073
  structuredContent: {
4015
4074
  completedCount: r.completedCount,
4016
4075
  daysItems: r.daysItems,
@@ -4037,7 +4096,7 @@ const wn = {
4037
4096
  };
4038
4097
  }
4039
4098
  };
4040
- function Sn(e) {
4099
+ function Dn(e) {
4041
4100
  const t = [
4042
4101
  "# Productivity Statistics",
4043
4102
  "",
@@ -4067,11 +4126,11 @@ function Sn(e) {
4067
4126
  return t.join(`
4068
4127
  `);
4069
4128
  }
4070
- const Cn = {
4129
+ const xn = {
4071
4130
  projectId: s.string().min(1).describe("The ID of the project to get activity stats for."),
4072
4131
  weeks: s.number().int().min(1).max(12).optional().describe("Number of weeks of activity data to retrieve (1-12, default 2)."),
4073
4132
  includeWeeklyCounts: s.boolean().optional().describe("Include weekly rollup counts alongside daily counts.")
4074
- }, $n = {
4133
+ }, An = {
4075
4134
  projectId: s.string().describe("The project ID."),
4076
4135
  dayItems: s.array(
4077
4136
  s.object({
@@ -4087,7 +4146,7 @@ const Cn = {
4087
4146
  })
4088
4147
  ).nullable().describe("Weekly completion rollups. Only included when includeWeeklyCounts is true.")
4089
4148
  };
4090
- function Dn(e, t) {
4149
+ function En(e, t) {
4091
4150
  const r = [`# Activity Stats: Project ${e}`, ""];
4092
4151
  if (t.dayItems.length > 0) {
4093
4152
  r.push("## Daily Activity");
@@ -4103,11 +4162,11 @@ function Dn(e, t) {
4103
4162
  return r.join(`
4104
4163
  `);
4105
4164
  }
4106
- const xn = {
4165
+ const On = {
4107
4166
  name: f.GET_PROJECT_ACTIVITY_STATS,
4108
4167
  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.",
4109
- parameters: Cn,
4110
- outputSchema: $n,
4168
+ parameters: xn,
4169
+ outputSchema: An,
4111
4170
  annotations: {
4112
4171
  readOnlyHint: !0,
4113
4172
  destructiveHint: !1,
@@ -4119,7 +4178,7 @@ const xn = {
4119
4178
  includeWeeklyCounts: n
4120
4179
  });
4121
4180
  return {
4122
- textContent: Dn(r, a),
4181
+ textContent: En(r, a),
4123
4182
  structuredContent: {
4124
4183
  projectId: r,
4125
4184
  dayItems: a.dayItems,
@@ -4127,15 +4186,15 @@ const xn = {
4127
4186
  }
4128
4187
  };
4129
4188
  }
4130
- }, An = {
4189
+ }, Pn = {
4131
4190
  projectId: s.string().min(1).describe("The ID of the project to check health for."),
4132
4191
  includeContext: s.boolean().default(!1).describe(
4133
4192
  "Include detailed health context with project metrics and task-level data. May produce large output for projects with many tasks."
4134
4193
  )
4135
- }, En = s.object({
4194
+ }, Un = s.object({
4136
4195
  taskId: s.string().describe("The ID of the task this recommendation is for."),
4137
4196
  recommendation: s.string().describe("The recommendation for this task.")
4138
- }), On = s.object({
4197
+ }), _n = s.object({
4139
4198
  id: s.string().describe("The task ID."),
4140
4199
  content: s.string().describe("The task content/title."),
4141
4200
  priority: s.string().describe("The task priority (1-4)."),
@@ -4143,7 +4202,7 @@ const xn = {
4143
4202
  deadline: s.string().nullable().optional().describe("The deadline date string, if set."),
4144
4203
  isCompleted: s.boolean().describe("Whether the task is completed."),
4145
4204
  labels: s.array(s.string()).describe("Labels applied to this task.")
4146
- }), Pn = {
4205
+ }), Rn = {
4147
4206
  projectId: s.string().describe("The project ID."),
4148
4207
  projectName: s.string().describe("The project name."),
4149
4208
  progress: s.object({
@@ -4152,10 +4211,10 @@ const xn = {
4152
4211
  progressPercent: s.number().describe("Completion percentage (0-100).")
4153
4212
  }).describe("Project completion progress."),
4154
4213
  health: s.object({
4155
- status: s.enum(Ue).describe("The overall health status of the project."),
4214
+ status: s.enum(Re).describe("The overall health status of the project."),
4156
4215
  description: s.string().nullable().optional().describe("Detailed description of the health assessment."),
4157
4216
  descriptionSummary: s.string().nullable().optional().describe("Brief summary of the health assessment."),
4158
- taskRecommendations: s.array(En).nullable().optional().describe("Specific recommendations for individual tasks."),
4217
+ taskRecommendations: s.array(Un).nullable().optional().describe("Specific recommendations for individual tasks."),
4159
4218
  isStale: s.boolean().describe("Whether the health data is stale and may need refreshing."),
4160
4219
  updateInProgress: s.boolean().describe("Whether a health analysis update is currently in progress."),
4161
4220
  updatedAt: s.string().nullable().optional().describe("When the health assessment was last updated.")
@@ -4170,12 +4229,12 @@ const xn = {
4170
4229
  tasksCompletedThisWeek: s.number().describe("Tasks completed in the current week."),
4171
4230
  averageCompletionTime: s.number().nullable().describe("Average task completion time in days, if available.")
4172
4231
  }).describe("Aggregated project metrics."),
4173
- tasks: s.array(On).describe("Tasks in the project.")
4232
+ tasks: s.array(_n).describe("Tasks in the project.")
4174
4233
  }).optional().describe(
4175
4234
  "Detailed project context with metrics and task data. Only included when includeContext is true."
4176
4235
  )
4177
4236
  };
4178
- async function _n(e, t, r) {
4237
+ async function Nn(e, t, r) {
4179
4238
  if (r) {
4180
4239
  const [a, i, c] = await Promise.all([
4181
4240
  e.getProjectProgress(t),
@@ -4190,9 +4249,9 @@ async function _n(e, t, r) {
4190
4249
  ]);
4191
4250
  return { progress: o, health: n };
4192
4251
  }
4193
- function Rn(e, { progress: t, health: r, context: o }) {
4252
+ function Ln(e, { progress: t, health: r, context: o }) {
4194
4253
  const n = [`# Project Health: ${e}`, ""];
4195
- 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}`), n.push(""), n.push("## Progress"), n.push(
4254
+ 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(
4196
4255
  `**Completed:** ${t.completedCount} | **Active:** ${t.activeCount} | **Progress:** ${t.progressPercent}%`
4197
4256
  ), r.description && (n.push(""), n.push("## Health Description"), n.push(r.description)), r.taskRecommendations && r.taskRecommendations.length > 0) {
4198
4257
  n.push(""), n.push("## Task Recommendations");
@@ -4213,18 +4272,18 @@ function Rn(e, { progress: t, health: r, context: o }) {
4213
4272
  return n.join(`
4214
4273
  `);
4215
4274
  }
4216
- const Un = {
4275
+ const Mn = {
4217
4276
  name: f.GET_PROJECT_HEALTH,
4218
4277
  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.",
4219
- parameters: An,
4220
- outputSchema: Pn,
4278
+ parameters: Pn,
4279
+ outputSchema: Rn,
4221
4280
  annotations: {
4222
4281
  readOnlyHint: !0,
4223
4282
  destructiveHint: !1,
4224
4283
  idempotentHint: !0
4225
4284
  },
4226
4285
  async execute(e, t) {
4227
- const { projectId: r, includeContext: o } = e, n = await _n(t, r, o), a = n.context?.projectName ?? `Project ${r}`, i = Rn(a, n), c = n.context ? {
4286
+ const { projectId: r, includeContext: o } = e, n = await Nn(t, r, o), a = n.context?.projectName ?? `Project ${r}`, i = Ln(a, n), c = n.context ? {
4228
4287
  projectDescription: n.context.projectDescription,
4229
4288
  projectMetrics: n.context.projectMetrics,
4230
4289
  tasks: n.context.tasks.map((d) => ({
@@ -4254,21 +4313,21 @@ const Un = {
4254
4313
  taskRecommendations: n.health.taskRecommendations ?? null,
4255
4314
  isStale: n.health.isStale,
4256
4315
  updateInProgress: n.health.updateInProgress,
4257
- updatedAt: n.health.updatedAt ?? null
4316
+ updatedAt: n.health.updatedAt?.toISOString() ?? null
4258
4317
  },
4259
4318
  context: c
4260
4319
  }
4261
4320
  };
4262
4321
  }
4263
- }, Nn = {
4322
+ }, Fn = {
4264
4323
  workspaceIdOrName: s.string().min(1).describe(
4265
4324
  "The workspace ID or name. Supports exact ID, exact name match (case-insensitive), or unique partial name match."
4266
4325
  ),
4267
4326
  projectIds: s.array(s.string().min(1)).min(1).optional().describe("Optional list of project IDs to scope insights to specific projects.")
4268
- }, Ln = s.object({
4327
+ }, Hn = s.object({
4269
4328
  projectId: s.string().describe("The project ID."),
4270
4329
  health: s.object({
4271
- status: s.enum(Ue).describe("The health status of the project."),
4330
+ status: s.enum(Re).describe("The health status of the project."),
4272
4331
  isStale: s.boolean().describe("Whether the health data is stale."),
4273
4332
  updateInProgress: s.boolean().describe("Whether a health analysis update is in progress.")
4274
4333
  }).nullable().describe("Health data for this project, if available."),
@@ -4277,16 +4336,16 @@ const Un = {
4277
4336
  activeCount: s.number().describe("Number of active tasks."),
4278
4337
  progressPercent: s.number().describe("Completion percentage (0-100).")
4279
4338
  }).nullable().describe("Progress data for this project, if available.")
4280
- }), Mn = {
4339
+ }), Wn = {
4281
4340
  workspaceId: s.string().describe("The resolved workspace ID."),
4282
4341
  workspaceName: s.string().describe("The resolved workspace name."),
4283
4342
  folderId: s.string().nullable().describe("The folder ID, if applicable."),
4284
- projectInsights: s.array(Ln).describe("Health and progress insights for each project in the workspace.")
4285
- }, Fn = {
4343
+ projectInsights: s.array(Hn).describe("Health and progress insights for each project in the workspace.")
4344
+ }, Bn = {
4286
4345
  name: f.GET_WORKSPACE_INSIGHTS,
4287
4346
  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.",
4288
- parameters: Nn,
4289
- outputSchema: Mn,
4347
+ parameters: Fn,
4348
+ outputSchema: Wn,
4290
4349
  annotations: {
4291
4350
  readOnlyHint: !0,
4292
4351
  destructiveHint: !1,
@@ -4326,21 +4385,21 @@ const Un = {
4326
4385
  }
4327
4386
  };
4328
4387
  }
4329
- }, Hn = {}, Wn = {
4388
+ }, zn = {}, Yn = {
4330
4389
  id: s.string().describe("The unique identifier for the workspace."),
4331
4390
  name: s.string().describe("The name of the workspace."),
4332
- plan: s.enum(Ht).describe("The workspace plan type."),
4333
- role: s.enum(Ft).optional().describe("The user's role in the workspace, if available."),
4391
+ plan: s.enum(zt).describe("The workspace plan type."),
4392
+ role: s.enum(Bt).optional().describe("The user's role in the workspace, if available."),
4334
4393
  isLinkSharingEnabled: s.boolean().describe("Whether link sharing is enabled for the workspace."),
4335
4394
  isGuestAllowed: s.boolean().describe("Whether guests are allowed in the workspace."),
4336
4395
  createdAt: s.string().optional().describe("The ISO 8601 timestamp when the workspace was created."),
4337
4396
  creatorId: s.string().describe("The ID of the user who created the workspace.")
4338
- }, Bn = {
4397
+ }, Gn = {
4339
4398
  type: s.literal("workspaces").describe("The type of the response."),
4340
- workspaces: s.array(s.object(Wn)).describe("List of workspaces."),
4399
+ workspaces: s.array(s.object(Yn)).describe("List of workspaces."),
4341
4400
  count: s.number().describe("The total number of workspaces.")
4342
4401
  };
4343
- async function zn(e) {
4402
+ async function qn(e) {
4344
4403
  const r = (await e.getWorkspaces()).map((i) => ({
4345
4404
  id: i.id,
4346
4405
  name: i.name,
@@ -4348,7 +4407,7 @@ async function zn(e) {
4348
4407
  role: i.role,
4349
4408
  isLinkSharingEnabled: i.isLinkSharingEnabled,
4350
4409
  isGuestAllowed: i.isGuestAllowed,
4351
- createdAt: i.createdAt,
4410
+ createdAt: i.createdAt?.toISOString(),
4352
4411
  creatorId: i.creatorId
4353
4412
  })), o = ["# Workspaces", ""];
4354
4413
  if (r.length === 0)
@@ -4371,22 +4430,22 @@ async function zn(e) {
4371
4430
  };
4372
4431
  return { textContent: n, structuredContent: a };
4373
4432
  }
4374
- const Yn = {
4433
+ const Kn = {
4375
4434
  name: f.LIST_WORKSPACES,
4376
4435
  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.",
4377
- parameters: Hn,
4378
- outputSchema: Bn,
4436
+ parameters: zn,
4437
+ outputSchema: Gn,
4379
4438
  annotations: { readOnlyHint: !0, destructiveHint: !1, idempotentHint: !0 },
4380
4439
  async execute(e, t) {
4381
- const r = await zn(t);
4440
+ const r = await qn(t);
4382
4441
  return {
4383
4442
  textContent: r.textContent,
4384
4443
  structuredContent: r.structuredContent
4385
4444
  };
4386
4445
  }
4387
- }, { FIND_TASKS: Gn, FIND_PROJECT_COLLABORATORS: dt, UPDATE_TASKS: qn } = f, Kn = 50, Vn = {
4446
+ }, { FIND_TASKS: Vn, FIND_PROJECT_COLLABORATORS: dt, UPDATE_TASKS: Jn } = f, Xn = 50, Zn = {
4388
4447
  operation: s.enum(["assign", "unassign", "reassign"]).describe("The assignment operation to perform."),
4389
- taskIds: s.array(s.string()).min(1).max(Kn).describe("The IDs of the tasks to operate on (max 50)."),
4448
+ taskIds: s.array(s.string()).min(1).max(Xn).describe("The IDs of the tasks to operate on (max 50)."),
4390
4449
  responsibleUser: s.string().optional().describe(
4391
4450
  '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.'
4392
4451
  ),
@@ -4394,7 +4453,7 @@ const Yn = {
4394
4453
  "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."
4395
4454
  ),
4396
4455
  dryRun: s.boolean().optional().default(!1).describe("If true, validates operations without executing them.")
4397
- }, Jn = {
4456
+ }, Qn = {
4398
4457
  results: s.array(
4399
4458
  s.object({
4400
4459
  taskId: s.string().describe("The ID of the task."),
@@ -4410,11 +4469,11 @@ const Yn = {
4410
4469
  failed: s.number().describe("Number of failed operations."),
4411
4470
  dryRun: s.boolean().describe("Whether this was a dry run.")
4412
4471
  }).optional().describe("Summary of the operation.")
4413
- }, Xn = {
4472
+ }, ea = {
4414
4473
  name: f.MANAGE_ASSIGNMENTS,
4415
4474
  description: "Bulk assignment operations for multiple tasks. Supports assign, unassign, and reassign operations with atomic rollback on failures.",
4416
- parameters: Vn,
4417
- outputSchema: Jn,
4475
+ parameters: Zn,
4476
+ outputSchema: Qn,
4418
4477
  annotations: { readOnlyHint: !1, destructiveHint: !0, idempotentHint: !1 },
4419
4478
  async execute(e, t) {
4420
4479
  const { operation: r, taskIds: o, responsibleUser: n, fromAssigneeUser: a, dryRun: i } = e;
@@ -4446,7 +4505,7 @@ const Yn = {
4446
4505
  throw new Error(`All ${l.length} task(s) failed: ${T}`);
4447
4506
  }
4448
4507
  let p;
4449
- r === "reassign" && a && (p = (await z.resolveUser(t, a))?.userId || a);
4508
+ r === "reassign" && a && (p = (await H.resolveUser(t, a))?.userId || a);
4450
4509
  const u = [];
4451
4510
  for (const T of d)
4452
4511
  r === "reassign" && p && T.responsibleUid !== p || u.push({
@@ -4546,7 +4605,7 @@ const Yn = {
4546
4605
  newAssigneeId: j.resolvedUser.userId
4547
4606
  };
4548
4607
  });
4549
- const R = S.map(
4608
+ const _ = S.map(
4550
4609
  async ({ assignment: w, validation: j }) => {
4551
4610
  const v = d.find((x) => x.id === w.taskId);
4552
4611
  if (!w.taskId || !j.resolvedUser?.userId)
@@ -4575,7 +4634,7 @@ const Yn = {
4575
4634
  }
4576
4635
  }
4577
4636
  );
4578
- return Promise.all(R);
4637
+ return Promise.all(_);
4579
4638
  }
4580
4639
  const D = await I(h, !i), $ = [...D, ...b, ...l];
4581
4640
  if ($.length > 0 && $.every((T) => !T.success)) {
@@ -4637,8 +4696,8 @@ function De({
4637
4696
  `;
4638
4697
  }
4639
4698
  return !r && o.length > 0 ? (c += `**Next steps:**
4640
- `, c += `• Use ${Gn} with responsibleUser to see ${e === "unassign" ? "unassigned" : "newly assigned"} tasks
4641
- `, c += `• Use ${qn} for individual assignment changes
4699
+ `, c += `• Use ${Vn} with responsibleUser to see ${e === "unassign" ? "unassigned" : "newly assigned"} tasks
4700
+ `, c += `• Use ${Jn} for individual assignment changes
4642
4701
  `, n.length > 0 && (c += `• Check failed tasks and use ${dt} to verify collaborator access
4643
4702
  `)) : r ? (c += `**To execute:**
4644
4703
  `, c += `• Remove dryRun parameter and run again to execute changes
@@ -4650,20 +4709,20 @@ function De({
4650
4709
  `, c += `• Use dryRun=true to validate before executing
4651
4710
  `), c;
4652
4711
  }
4653
- const Zn = {
4712
+ const ta = {
4654
4713
  action: s.enum(["archive", "unarchive"]).describe("The action to perform on the project."),
4655
4714
  projectId: s.string().min(1).describe("The ID of the project.")
4656
- }, Qn = {
4715
+ }, sa = {
4657
4716
  project: ie.describe("The updated project."),
4658
4717
  success: s.boolean().describe("Whether the action was successful.")
4659
- }, ea = {
4718
+ }, ra = {
4660
4719
  name: f.PROJECT_MANAGEMENT,
4661
4720
  description: "Archive or unarchive a project by its ID.",
4662
- parameters: Zn,
4663
- outputSchema: Qn,
4721
+ parameters: ta,
4722
+ outputSchema: sa,
4664
4723
  annotations: { readOnlyHint: !1, destructiveHint: !1, idempotentHint: !0 },
4665
4724
  async execute(e, t) {
4666
- const r = e.action === "archive" ? await t.archiveProject(e.projectId) : await t.unarchiveProject(e.projectId), o = K(r);
4725
+ const r = e.action === "archive" ? await t.archiveProject(e.projectId) : await t.unarchiveProject(e.projectId), o = V(r);
4667
4726
  return {
4668
4727
  textContent: `${e.action === "archive" ? "Archived" : "Unarchived"} project: ${o.name} (id=${o.id})`,
4669
4728
  structuredContent: {
@@ -4672,7 +4731,7 @@ const Zn = {
4672
4731
  }
4673
4732
  };
4674
4733
  }
4675
- }, ta = {
4734
+ }, oa = {
4676
4735
  action: s.enum(["move-to-workspace", "move-to-personal"]).describe("The action to perform on the project."),
4677
4736
  projectId: s.string().min(1).describe("The ID of the project to move."),
4678
4737
  workspaceId: s.string().min(1).optional().describe("The target workspace ID. Required when action is move-to-workspace."),
@@ -4680,14 +4739,14 @@ const Zn = {
4680
4739
  visibility: s.enum(["restricted", "team", "public"]).optional().describe(
4681
4740
  "Optional access visibility for the project in the workspace (restricted, team, or public)."
4682
4741
  )
4683
- }, sa = {
4742
+ }, na = {
4684
4743
  project: ie.describe("The moved project."),
4685
4744
  success: s.boolean().describe("Whether the move was successful.")
4686
- }, ra = {
4745
+ }, aa = {
4687
4746
  name: f.PROJECT_MOVE,
4688
4747
  description: "Move a project between personal and workspace contexts.",
4689
- parameters: ta,
4690
- outputSchema: sa,
4748
+ parameters: oa,
4749
+ outputSchema: na,
4691
4750
  annotations: { readOnlyHint: !1, destructiveHint: !1, idempotentHint: !0 },
4692
4751
  async execute(e, t) {
4693
4752
  let r;
@@ -4701,7 +4760,7 @@ const Zn = {
4701
4760
  e.folderId && (a.folderId = e.folderId), e.visibility && (a.access = { visibility: e.visibility }), r = await t.moveProjectToWorkspace(a);
4702
4761
  } else
4703
4762
  r = await t.moveProjectToPersonal({ projectId: e.projectId });
4704
- const o = K(r);
4763
+ const o = V(r);
4705
4764
  return {
4706
4765
  textContent: `${e.action === "move-to-workspace" ? "Moved to workspace" : "Moved to personal"}: ${o.name} (id=${o.id})`,
4707
4766
  structuredContent: {
@@ -4710,8 +4769,8 @@ const Zn = {
4710
4769
  }
4711
4770
  };
4712
4771
  }
4713
- }, Ut = ["project", "section"], oa = {
4714
- type: s.enum(Ut).describe(
4772
+ }, Mt = ["project", "section"], ia = {
4773
+ type: s.enum(Mt).describe(
4715
4774
  '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.'
4716
4775
  ),
4717
4776
  items: s.array(
@@ -4727,17 +4786,17 @@ const Zn = {
4727
4786
  ).min(1).describe(
4728
4787
  "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."
4729
4788
  )
4730
- }, na = {
4731
- type: s.enum(Ut).describe("The type of entity that was reordered/moved."),
4789
+ }, ca = {
4790
+ type: s.enum(Mt).describe("The type of entity that was reordered/moved."),
4732
4791
  movedCount: s.number().describe("The number of entities moved to a new parent."),
4733
4792
  reorderedCount: s.number().describe("The number of entities reordered."),
4734
4793
  affectedIds: s.array(s.string()).describe("The IDs of all affected entities."),
4735
4794
  success: s.boolean().describe("Whether the operation was successful.")
4736
- }, aa = {
4795
+ }, da = {
4737
4796
  name: f.REORDER_OBJECTS,
4738
4797
  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.',
4739
- parameters: oa,
4740
- outputSchema: na,
4798
+ parameters: ia,
4799
+ outputSchema: ca,
4741
4800
  annotations: { readOnlyHint: !1, destructiveHint: !1, idempotentHint: !0 },
4742
4801
  async execute(e, t) {
4743
4802
  const { type: r, items: o } = e, n = /* @__PURE__ */ new Set();
@@ -4799,22 +4858,22 @@ const Zn = {
4799
4858
  }
4800
4859
  };
4801
4860
  }
4802
- }, ia = s.object({
4861
+ }, la = s.object({
4803
4862
  id: s.string().min(1).describe("The ID of the task to reschedule."),
4804
4863
  date: s.string().min(1).describe(
4805
4864
  "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."
4806
4865
  )
4807
- }), ca = {
4808
- tasks: s.array(ia).min(1).describe("The tasks to reschedule with their new dates.")
4809
- }, da = {
4810
- tasks: s.array(V).describe("The rescheduled tasks."),
4866
+ }), ua = {
4867
+ tasks: s.array(la).min(1).describe("The tasks to reschedule with their new dates.")
4868
+ }, pa = {
4869
+ tasks: s.array(J).describe("The rescheduled tasks."),
4811
4870
  totalCount: s.number().describe("The total number of tasks rescheduled."),
4812
4871
  rescheduledTaskIds: s.array(s.string()).describe("The IDs of the rescheduled tasks.")
4813
- }, la = {
4872
+ }, ma = {
4814
4873
  name: f.RESCHEDULE_TASKS,
4815
4874
  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.",
4816
- parameters: ca,
4817
- outputSchema: da,
4875
+ parameters: ua,
4876
+ outputSchema: pa,
4818
4877
  annotations: { readOnlyHint: !1, destructiveHint: !0, idempotentHint: !1 },
4819
4878
  async execute(e, t) {
4820
4879
  const { tasks: r } = e, n = (await Promise.all(
@@ -4827,7 +4886,7 @@ const Zn = {
4827
4886
  throw new Error(
4828
4887
  `Task "${l.content}" (${l.id}) has no due date. Rescheduling requires an existing due date.`
4829
4888
  );
4830
- const p = ua(d.date, l.due);
4889
+ const p = ha(d.date, l.due);
4831
4890
  return Y("item_update", {
4832
4891
  id: d.id,
4833
4892
  due: {
@@ -4845,7 +4904,7 @@ const Zn = {
4845
4904
  const l = d instanceof Error ? d.message : String(d);
4846
4905
  throw new Error(`Reschedule failed: ${l}`);
4847
4906
  }
4848
- const a = await Promise.all(r.map((d) => t.getTask(d.id))), i = a.map(_);
4907
+ const a = await Promise.all(r.map((d) => t.getTask(d.id))), i = a.map(U);
4849
4908
  return {
4850
4909
  textContent: Ge("Rescheduled", i, {
4851
4910
  showDetails: i.length <= 5
@@ -4858,16 +4917,16 @@ const Zn = {
4858
4917
  };
4859
4918
  }
4860
4919
  };
4861
- function ua(e, t) {
4920
+ function ha(e, t) {
4862
4921
  if (/^\d{4}-\d{2}-\d{2}$/.test(e) && t.datetime) {
4863
4922
  const o = t.datetime.substring(10);
4864
4923
  return e + o;
4865
4924
  }
4866
4925
  return e;
4867
4926
  }
4868
- const pa = {
4927
+ const fa = {
4869
4928
  query: s.string().min(1).describe("The search query string to find tasks and projects.")
4870
- }, ma = {
4929
+ }, ba = {
4871
4930
  results: s.array(
4872
4931
  s.object({
4873
4932
  id: s.string().describe("The ID of the result."),
@@ -4876,11 +4935,11 @@ const pa = {
4876
4935
  })
4877
4936
  ).describe("The search results."),
4878
4937
  totalCount: s.number().describe("Total number of results found.")
4879
- }, ha = {
4938
+ }, ga = {
4880
4939
  name: f.SEARCH,
4881
4940
  description: "Search across tasks and projects in Todoist. Returns a list of relevant results with IDs, titles, and URLs.",
4882
- parameters: pa,
4883
- outputSchema: ma,
4941
+ parameters: fa,
4942
+ outputSchema: ba,
4884
4943
  annotations: { readOnlyHint: !0, destructiveHint: !1, idempotentHint: !0 },
4885
4944
  async execute(e, t) {
4886
4945
  const { query: r } = e, [o, n] = await Promise.all([
@@ -4909,19 +4968,19 @@ const pa = {
4909
4968
  structuredContent: { results: a, totalCount: a.length }
4910
4969
  };
4911
4970
  }
4912
- }, fa = {
4971
+ }, ya = {
4913
4972
  ids: s.array(s.string().min(1)).min(1).describe("The IDs of the tasks to uncomplete.")
4914
- }, ba = {
4973
+ }, ka = {
4915
4974
  uncompleted: s.array(s.string()).describe("The IDs of successfully uncompleted tasks."),
4916
4975
  failures: s.array(Be).describe("Failed task uncompletion with error details."),
4917
4976
  totalRequested: s.number().describe("The total number of tasks requested to uncomplete."),
4918
4977
  successCount: s.number().describe("The number of successfully uncompleted tasks."),
4919
4978
  failureCount: s.number().describe("The number of failed task uncompletions.")
4920
- }, ga = {
4979
+ }, Ta = {
4921
4980
  name: f.UNCOMPLETE_TASKS,
4922
4981
  description: "Uncomplete (reopen) one or more completed tasks by their IDs.",
4923
- parameters: fa,
4924
- outputSchema: ba,
4982
+ parameters: ya,
4983
+ outputSchema: ka,
4925
4984
  annotations: { readOnlyHint: !1, destructiveHint: !1, idempotentHint: !1 },
4926
4985
  async execute(e, t) {
4927
4986
  const r = [], o = [];
@@ -4936,7 +4995,7 @@ const pa = {
4936
4995
  });
4937
4996
  }
4938
4997
  return {
4939
- textContent: ya({
4998
+ textContent: wa({
4940
4999
  uncompleted: r,
4941
5000
  failures: o,
4942
5001
  args: e
@@ -4951,7 +5010,7 @@ const pa = {
4951
5010
  };
4952
5011
  }
4953
5012
  };
4954
- function ya({
5013
+ function wa({
4955
5014
  uncompleted: e,
4956
5015
  failures: t,
4957
5016
  args: r
@@ -4965,28 +5024,28 @@ function ya({
4965
5024
  failures: t
4966
5025
  });
4967
5026
  }
4968
- const ka = s.object({
5027
+ const Ia = s.object({
4969
5028
  id: s.string().min(1).describe("The ID of the comment to update."),
4970
5029
  content: s.string().min(1).describe("The new content for the comment.")
4971
- }), Ta = {
4972
- comments: s.array(ka).min(1).describe("The comments to update.")
4973
- }, wa = {
5030
+ }), va = {
5031
+ comments: s.array(Ia).min(1).describe("The comments to update.")
5032
+ }, ja = {
4974
5033
  comments: s.array(ge).describe("The updated comments."),
4975
5034
  totalCount: s.number().describe("The total number of comments updated."),
4976
5035
  updatedCommentIds: s.array(s.string()).describe("The IDs of the updated comments."),
4977
5036
  appliedOperations: s.object({
4978
5037
  updateCount: s.number().describe("The number of comments updated.")
4979
5038
  }).describe("Summary of operations performed.")
4980
- }, Ia = {
5039
+ }, Sa = {
4981
5040
  name: f.UPDATE_COMMENTS,
4982
5041
  description: "Update multiple existing comments with new content.",
4983
- parameters: Ta,
4984
- outputSchema: wa,
5042
+ parameters: va,
5043
+ outputSchema: ja,
4985
5044
  annotations: { readOnlyHint: !1, destructiveHint: !0, idempotentHint: !1 },
4986
5045
  async execute(e, t) {
4987
5046
  const { comments: r } = e, o = r.map(async (c) => await t.updateComment(c.id, { content: c.content })), a = (await Promise.all(o)).map(he);
4988
5047
  return {
4989
- textContent: va({
5048
+ textContent: Ca({
4990
5049
  comments: a
4991
5050
  }),
4992
5051
  structuredContent: {
@@ -5000,7 +5059,7 @@ const ka = s.object({
5000
5059
  };
5001
5060
  }
5002
5061
  };
5003
- function va({ comments: e }) {
5062
+ function Ca({ comments: e }) {
5004
5063
  const t = e.filter((a) => a.taskId).length, r = e.filter((a) => a.projectId).length, o = [];
5005
5064
  if (t > 0) {
5006
5065
  const a = t > 1 ? "comments" : "comment";
@@ -5012,7 +5071,7 @@ function va({ comments: e }) {
5012
5071
  }
5013
5072
  return o.length > 0 ? `Updated ${o.join(" and ")}` : "No comments updated";
5014
5073
  }
5015
- const ja = s.object({
5074
+ const $a = s.object({
5016
5075
  id: s.string().min(1).describe("The ID of the filter to update."),
5017
5076
  name: s.string().min(1).optional().describe("The new name of the filter."),
5018
5077
  query: s.string().min(1).optional().describe(
@@ -5020,9 +5079,9 @@ const ja = s.object({
5020
5079
  ),
5021
5080
  color: ue,
5022
5081
  isFavorite: s.boolean().optional().describe("Whether to mark the filter as a favorite.")
5023
- }), Sa = {
5024
- filters: s.array(ja).min(1).describe("The filters to update.")
5025
- }, Ca = {
5082
+ }), Da = {
5083
+ filters: s.array($a).min(1).describe("The filters to update.")
5084
+ }, xa = {
5026
5085
  filters: s.array(ze).describe("The updated filters."),
5027
5086
  totalCount: s.number().describe("The total number of filters updated."),
5028
5087
  updatedFilterIds: s.array(s.string()).describe("The IDs of the updated filters."),
@@ -5030,15 +5089,15 @@ const ja = s.object({
5030
5089
  updateCount: s.number().describe("The number of filters actually updated."),
5031
5090
  skippedCount: s.number().describe("The number of filters skipped (no changes).")
5032
5091
  }).describe("Summary of operations performed.")
5033
- }, $a = {
5092
+ }, Aa = {
5034
5093
  name: f.UPDATE_FILTERS,
5035
5094
  description: "Update one or more existing personal filters with new values.",
5036
- parameters: Sa,
5037
- outputSchema: Ca,
5095
+ parameters: Da,
5096
+ outputSchema: xa,
5038
5097
  annotations: { readOnlyHint: !1, destructiveHint: !0, idempotentHint: !1 },
5039
5098
  async execute(e, t) {
5040
5099
  const { filters: r } = e, o = [], a = r.map((m) => {
5041
- const h = xa(m);
5100
+ const h = Oa(m);
5042
5101
  return h !== null ? { kind: "skipped", reason: h } : (o.push(m), { kind: "updated", filter: m });
5043
5102
  }).filter((m) => m.kind === "skipped").length;
5044
5103
  if (o.length === 0)
@@ -5069,7 +5128,7 @@ const ja = s.object({
5069
5128
  itemOrder: m.itemOrder
5070
5129
  }));
5071
5130
  return {
5072
- textContent: Da({ filters: p, skippedCount: a }),
5131
+ textContent: Ea({ filters: p, skippedCount: a }),
5073
5132
  structuredContent: {
5074
5133
  filters: p,
5075
5134
  totalCount: p.length,
@@ -5082,7 +5141,7 @@ const ja = s.object({
5082
5141
  };
5083
5142
  }
5084
5143
  };
5085
- function Da({
5144
+ function Ea({
5086
5145
  filters: e,
5087
5146
  skippedCount: t
5088
5147
  }) {
@@ -5096,18 +5155,18 @@ ${n}`;
5096
5155
  }
5097
5156
  return o;
5098
5157
  }
5099
- function xa({ id: e, ...t }) {
5158
+ function Oa({ id: e, ...t }) {
5100
5159
  return Object.values(t).every((o) => o === void 0) ? "no-fields" : null;
5101
5160
  }
5102
- const Aa = s.object({
5161
+ const Pa = s.object({
5103
5162
  id: s.string().min(1).describe("The ID of the project to update."),
5104
5163
  name: s.string().min(1).optional().describe("The new name of the project."),
5105
5164
  isFavorite: s.boolean().optional().describe("Whether the project is a favorite."),
5106
5165
  viewStyle: s.enum(["list", "board", "calendar"]).optional().describe("The project view style."),
5107
5166
  color: ue
5108
- }), Ea = {
5109
- projects: s.array(Aa).min(1).describe("The projects to update.")
5110
- }, Oa = {
5167
+ }), Ua = {
5168
+ projects: s.array(Pa).min(1).describe("The projects to update.")
5169
+ }, _a = {
5111
5170
  projects: s.array(ie).describe("The updated projects."),
5112
5171
  totalCount: s.number().describe("The total number of projects updated."),
5113
5172
  updatedProjectIds: s.array(s.string()).describe("The IDs of the updated projects."),
@@ -5115,29 +5174,29 @@ const Aa = s.object({
5115
5174
  updateCount: s.number().describe("The number of projects actually updated."),
5116
5175
  skippedCount: s.number().describe("The number of projects skipped (no changes).")
5117
5176
  }).describe("Summary of operations performed.")
5118
- }, Pa = {
5177
+ }, Ra = {
5119
5178
  name: f.UPDATE_PROJECTS,
5120
5179
  description: "Update multiple existing projects with new values.",
5121
- parameters: Ea,
5122
- outputSchema: Oa,
5180
+ parameters: Ua,
5181
+ outputSchema: _a,
5123
5182
  annotations: { readOnlyHint: !1, destructiveHint: !0, idempotentHint: !1 },
5124
5183
  async execute(e, t) {
5125
5184
  const { projects: r } = e, o = await Promise.all(
5126
5185
  r.map(async (d) => {
5127
- const l = Ra(d);
5186
+ const l = La(d);
5128
5187
  if (l !== null) return { kind: "skipped", reason: l };
5129
5188
  const { id: p, ...u } = d;
5130
5189
  return { kind: "updated", project: await t.updateProject(p, u) };
5131
5190
  })
5132
5191
  ), n = o.filter(
5133
5192
  (d) => d.kind === "updated"
5134
- ).map((d) => K(d.project)), a = o.filter(
5193
+ ).map((d) => V(d.project)), a = o.filter(
5135
5194
  (d) => d.kind === "skipped" && d.reason === "no-fields"
5136
5195
  ).length, i = o.filter(
5137
5196
  (d) => d.kind === "skipped" && d.reason === "no-valid-values"
5138
5197
  ).length;
5139
5198
  return {
5140
- textContent: _a({
5199
+ textContent: Na({
5141
5200
  projects: n,
5142
5201
  skippedNoFields: a,
5143
5202
  skippedNoValidValues: i
@@ -5154,7 +5213,7 @@ const Aa = s.object({
5154
5213
  };
5155
5214
  }
5156
5215
  };
5157
- function _a({
5216
+ function Na({
5158
5217
  projects: e,
5159
5218
  skippedNoFields: t,
5160
5219
  skippedNoValidValues: r
@@ -5166,23 +5225,23 @@ function _a({
5166
5225
  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 += `:
5167
5226
  ${n}`), a;
5168
5227
  }
5169
- function Ra({ id: e, ...t }) {
5228
+ function La({ id: e, ...t }) {
5170
5229
  const r = Object.values(t);
5171
5230
  return r.length === 0 ? "no-fields" : r.every((o) => o === void 0) ? "no-valid-values" : null;
5172
5231
  }
5173
- const Ua = s.object({
5232
+ const Ma = s.object({
5174
5233
  type: s.literal("relative"),
5175
5234
  id: s.string().min(1).describe("The ID of the relative reminder to update."),
5176
5235
  minuteOffset: s.number().int().min(0).optional().describe("New minute offset before task due time."),
5177
5236
  service: ke.optional().describe('New delivery method: "email" or "push".'),
5178
5237
  isUrgent: Te
5179
- }), Na = s.object({
5238
+ }), Fa = s.object({
5180
5239
  type: s.literal("absolute"),
5181
5240
  id: s.string().min(1).describe("The ID of the absolute reminder to update."),
5182
5241
  due: jt.optional().describe("New due date/time for the reminder."),
5183
5242
  service: ke.optional().describe('New delivery method: "email" or "push".'),
5184
5243
  isUrgent: Te
5185
- }), La = s.object({
5244
+ }), Ha = s.object({
5186
5245
  type: s.literal("location"),
5187
5246
  id: s.string().min(1).describe("The ID of the location reminder to update."),
5188
5247
  name: s.string().optional().describe("New location name."),
@@ -5192,23 +5251,23 @@ const Ua = s.object({
5192
5251
  'New trigger condition: "on_enter" or "on_leave".'
5193
5252
  ),
5194
5253
  radius: s.number().int().optional().describe("New radius in meters.")
5195
- }), Ma = s.discriminatedUnion("type", [
5196
- Ua,
5197
- Na,
5198
- La
5199
- ]), Fa = {
5200
- reminders: s.array(Ma).min(1).max(me).describe(
5254
+ }), Wa = s.discriminatedUnion("type", [
5255
+ Ma,
5256
+ Fa,
5257
+ Ha
5258
+ ]), Ba = {
5259
+ reminders: s.array(Wa).min(1).max(me).describe(
5201
5260
  `Array of reminders to update (max ${me}). Each must include the reminder type and ID. Only include fields that need to change.`
5202
5261
  )
5203
- }, Ha = {
5262
+ }, za = {
5204
5263
  reminders: s.array(We).describe("The updated reminders."),
5205
5264
  totalCount: s.number().describe("Total reminders updated."),
5206
5265
  updatedReminderIds: s.array(s.string()).describe("IDs of updated reminders.")
5207
- }, Wa = {
5266
+ }, Ya = {
5208
5267
  name: f.UPDATE_REMINDERS,
5209
5268
  description: 'Update existing reminders. Each reminder must specify its type ("relative", "absolute", or "location") and ID. Only include fields that need to change.',
5210
- parameters: Fa,
5211
- outputSchema: Ha,
5269
+ parameters: Ba,
5270
+ outputSchema: za,
5212
5271
  annotations: { readOnlyHint: !1, destructiveHint: !0, idempotentHint: !0 },
5213
5272
  async execute(e, t) {
5214
5273
  const { reminders: r } = e, o = r.map(async (d) => {
@@ -5242,27 +5301,27 @@ const Ua = s.object({
5242
5301
  }
5243
5302
  };
5244
5303
  }
5245
- }, Ba = s.object({
5304
+ }, Ga = s.object({
5246
5305
  id: s.string().min(1).describe("The ID of the section to update."),
5247
5306
  name: s.string().min(1).describe("The new name of the section.")
5248
- }), za = {
5249
- sections: s.array(Ba).min(1).describe("The sections to update.")
5250
- }, Ya = {
5307
+ }), qa = {
5308
+ sections: s.array(Ga).min(1).describe("The sections to update.")
5309
+ }, Ka = {
5251
5310
  sections: s.array(be).describe("The updated sections."),
5252
5311
  totalCount: s.number().describe("The total number of sections updated."),
5253
5312
  updatedSectionIds: s.array(s.string()).describe("The IDs of the updated sections.")
5254
- }, Ga = {
5313
+ }, Va = {
5255
5314
  name: f.UPDATE_SECTIONS,
5256
5315
  description: "Update multiple existing sections with new values.",
5257
- parameters: za,
5258
- outputSchema: Ya,
5316
+ parameters: qa,
5317
+ outputSchema: Ka,
5259
5318
  annotations: { readOnlyHint: !1, destructiveHint: !0, idempotentHint: !1 },
5260
5319
  async execute({ sections: e }, t) {
5261
5320
  const r = await Promise.all(
5262
5321
  e.map((n) => t.updateSection(n.id, { name: n.name }))
5263
5322
  );
5264
5323
  return {
5265
- textContent: qa({
5324
+ textContent: Ja({
5266
5325
  sections: r
5267
5326
  }),
5268
5327
  structuredContent: {
@@ -5273,13 +5332,13 @@ const Ua = s.object({
5273
5332
  };
5274
5333
  }
5275
5334
  };
5276
- function qa({ sections: e }) {
5335
+ function Ja({ sections: e }) {
5277
5336
  const t = e.length, r = e.map((n) => `• ${n.name} (id=${n.id}, projectId=${n.projectId})`).join(`
5278
5337
  `);
5279
5338
  return `Updated ${t} section${t === 1 ? "" : "s"}:
5280
5339
  ${r}`;
5281
5340
  }
5282
- const Ka = s.object({
5341
+ const Xa = s.object({
5283
5342
  id: s.string().min(1).describe("The ID of the task to update."),
5284
5343
  content: s.string().optional().describe(
5285
5344
  '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.'
@@ -5318,25 +5377,25 @@ const Ka = s.object({
5318
5377
  isUncompletable: s.boolean().optional().describe(
5319
5378
  "Whether this task should be uncompletable (organizational header). Tasks with isUncompletable: true appear as organizational headers and cannot be completed."
5320
5379
  )
5321
- }), Va = ["remove", "no date"], Ja = ["remove", "no date", "no deadline"], Xa = "no date", Za = {
5322
- tasks: s.array(Ka).min(1).describe("The tasks to update.")
5323
- }, Qa = {
5324
- tasks: s.array(V).describe("The updated tasks."),
5380
+ }), Za = ["remove", "no date"], Qa = ["remove", "no date", "no deadline"], ei = "no date", ti = {
5381
+ tasks: s.array(Xa).min(1).describe("The tasks to update.")
5382
+ }, si = {
5383
+ tasks: s.array(J).describe("The updated tasks."),
5325
5384
  totalCount: s.number().describe("The total number of tasks updated."),
5326
5385
  updatedTaskIds: s.array(s.string()).describe("The IDs of the updated tasks."),
5327
5386
  appliedOperations: s.object({
5328
5387
  updateCount: s.number().describe("The number of tasks actually updated."),
5329
5388
  skippedCount: s.number().describe("The number of tasks skipped (no changes).")
5330
5389
  }).describe("Summary of operations performed.")
5331
- }, ei = {
5390
+ }, ri = {
5332
5391
  name: f.UPDATE_TASKS,
5333
5392
  description: "Update existing tasks including content, dates, priorities, and assignments.",
5334
- parameters: Za,
5335
- outputSchema: Qa,
5393
+ parameters: ti,
5394
+ outputSchema: si,
5336
5395
  annotations: { readOnlyHint: !1, destructiveHint: !0, idempotentHint: !1 },
5337
5396
  async execute(e, t) {
5338
5397
  const { tasks: r } = e, o = r.map(async (c) => {
5339
- if (!si(c))
5398
+ if (!ni(c))
5340
5399
  return;
5341
5400
  const {
5342
5401
  id: d,
@@ -5350,7 +5409,7 @@ const Ka = s.object({
5350
5409
  labels: D,
5351
5410
  deadlineDate: $,
5352
5411
  ...N
5353
- } = c, T = await q({
5412
+ } = c, T = await K({
5354
5413
  projectId: l,
5355
5414
  client: t
5356
5415
  });
@@ -5361,16 +5420,16 @@ const Ka = s.object({
5361
5420
  I && (g.priority = yt(I));
5362
5421
  const S = lt(
5363
5422
  m,
5364
- Va,
5365
- Xa
5423
+ Za,
5424
+ ei
5366
5425
  );
5367
5426
  S !== void 0 && (g = { ...g, dueString: S });
5368
- const R = lt(
5427
+ const _ = lt(
5369
5428
  $,
5370
- Ja,
5429
+ Qa,
5371
5430
  null
5372
5431
  );
5373
- if (R !== void 0 && (g = { ...g, deadlineDate: R }), h)
5432
+ if (_ !== void 0 && (g = { ...g, deadlineDate: _ }), h)
5374
5433
  try {
5375
5434
  const { minutes: v } = gt(h);
5376
5435
  g = {
@@ -5400,13 +5459,13 @@ const Ka = s.object({
5400
5459
  }
5401
5460
  if (!T && !p && !u)
5402
5461
  return await t.updateTask(d, g);
5403
- const w = Ys(d, T, p, u), j = await t.moveTask(d, w);
5462
+ const w = Ks(d, T, p, u), j = await t.moveTask(d, w);
5404
5463
  return Object.keys(g).length > 0 ? await t.updateTask(d, g) : j;
5405
5464
  }), n = (await Promise.all(o)).filter(
5406
5465
  (c) => c !== void 0
5407
- ), a = n.map(_);
5466
+ ), a = n.map(U);
5408
5467
  return {
5409
- textContent: ti({
5468
+ textContent: oi({
5410
5469
  tasks: a,
5411
5470
  args: e
5412
5471
  }),
@@ -5422,7 +5481,7 @@ const Ka = s.object({
5422
5481
  };
5423
5482
  }
5424
5483
  };
5425
- function ti({
5484
+ function oi({
5426
5485
  tasks: e,
5427
5486
  args: t
5428
5487
  }) {
@@ -5433,7 +5492,7 @@ function ti({
5433
5492
  showDetails: e.length <= 5
5434
5493
  });
5435
5494
  }
5436
- function si({ id: e, ...t }) {
5495
+ function ni({ id: e, ...t }) {
5437
5496
  return Object.keys(t).length > 0;
5438
5497
  }
5439
5498
  function lt(e, t, r) {
@@ -5444,7 +5503,7 @@ function lt(e, t, r) {
5444
5503
  const o = e.trim().toLowerCase();
5445
5504
  return t.includes(o) ? r : e;
5446
5505
  }
5447
- const ri = {}, oi = {
5506
+ const ai = {}, ii = {
5448
5507
  type: s.literal("user_info").describe("The type of the response."),
5449
5508
  userId: s.string().describe("The user ID."),
5450
5509
  fullName: s.string().describe("The full name of the user."),
@@ -5461,36 +5520,36 @@ const ri = {}, oi = {
5461
5520
  email: s.string().describe("The email address of the user."),
5462
5521
  plan: s.enum(["Todoist Free", "Todoist Pro", "Todoist Business"]).describe("The user plan.")
5463
5522
  };
5464
- function ni(e) {
5523
+ function ci(e) {
5465
5524
  return e.businessAccountId ? "Todoist Business" : e.isPremium ? "Todoist Pro" : "Todoist Free";
5466
5525
  }
5467
- function ai(e, t) {
5526
+ function di(e, t) {
5468
5527
  const o = ((e.getDay() || 7) - t + 7) % 7, n = new Date(e);
5469
5528
  return n.setDate(e.getDate() - o), n;
5470
5529
  }
5471
- function ii(e) {
5530
+ function li(e) {
5472
5531
  const t = new Date(e);
5473
5532
  return t.setDate(e.getDate() + 6), t;
5474
5533
  }
5475
- function ci(e) {
5534
+ function ui(e) {
5476
5535
  const t = new Date(e.getFullYear(), 0, 1), r = (e.getTime() - t.getTime()) / 864e5;
5477
5536
  return Math.ceil((r + t.getDay() + 1) / 7);
5478
5537
  }
5479
- function di(e) {
5538
+ function pi(e) {
5480
5539
  return ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"][e === 7 ? 0 : e] ?? "Unknown";
5481
5540
  }
5482
- function li(e) {
5541
+ function mi(e) {
5483
5542
  try {
5484
5543
  return new Intl.DateTimeFormat("en-US", { timeZone: e }), !0;
5485
5544
  } catch {
5486
5545
  return !1;
5487
5546
  }
5488
5547
  }
5489
- function Nt(e) {
5490
- return li(e) ? e : "UTC";
5548
+ function Ft(e) {
5549
+ return mi(e) ? e : "UTC";
5491
5550
  }
5492
- function ui(e, t) {
5493
- const r = Nt(t);
5551
+ function hi(e, t) {
5552
+ const r = Ft(t);
5494
5553
  return e.toLocaleString("en-US", {
5495
5554
  timeZone: r,
5496
5555
  year: "numeric",
@@ -5502,8 +5561,8 @@ function ui(e, t) {
5502
5561
  hour12: !1
5503
5562
  });
5504
5563
  }
5505
- async function pi(e) {
5506
- const t = await e.getUser(), r = t.tzInfo?.timezone ?? "UTC", o = Nt(r), n = /* @__PURE__ */ new Date(), a = ui(n, o), i = t.startDay ?? 1, c = di(i), d = ni(t), l = new Date(n.toLocaleString("en-US", { timeZone: o })), p = ai(l, i), u = ii(p), m = ci(l), b = [
5564
+ async function fi(e) {
5565
+ const t = await e.getUser(), r = t.tzInfo?.timezone ?? "UTC", o = Ft(r), n = /* @__PURE__ */ new Date(), a = hi(n, o), i = t.startDay ?? 1, c = pi(i), d = ci(t), l = new Date(n.toLocaleString("en-US", { timeZone: o })), p = di(l, i), u = li(p), m = ui(l), b = [
5507
5566
  "# User Information",
5508
5567
  "",
5509
5568
  `**User ID:** ${t.id}`,
@@ -5515,8 +5574,8 @@ async function pi(e) {
5515
5574
  "## Week Settings",
5516
5575
  `**Week Start Day:** ${c} (${i})`,
5517
5576
  `**Current Week:** Week ${m}`,
5518
- `**Week Start Date:** ${se(p)}`,
5519
- `**Week End Date:** ${se(u)}`,
5577
+ `**Week Start Date:** ${re(p)}`,
5578
+ `**Week End Date:** ${re(u)}`,
5520
5579
  "",
5521
5580
  "## Daily Progress",
5522
5581
  `**Completed Today:** ${t.completedToday}`,
@@ -5534,8 +5593,8 @@ async function pi(e) {
5534
5593
  currentLocalTime: a,
5535
5594
  startDay: i,
5536
5595
  startDayName: c,
5537
- weekStartDate: se(p),
5538
- weekEndDate: se(u),
5596
+ weekStartDate: re(p),
5597
+ weekEndDate: re(u),
5539
5598
  currentWeekNumber: m,
5540
5599
  completedToday: t.completedToday,
5541
5600
  dailyGoal: t.dailyGoal,
@@ -5545,26 +5604,26 @@ async function pi(e) {
5545
5604
  };
5546
5605
  return { textContent: b, structuredContent: I };
5547
5606
  }
5548
- const mi = {
5607
+ const bi = {
5549
5608
  name: f.USER_INFO,
5550
5609
  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).",
5551
- parameters: ri,
5552
- outputSchema: oi,
5610
+ parameters: ai,
5611
+ outputSchema: ii,
5553
5612
  annotations: { readOnlyHint: !0, destructiveHint: !1, idempotentHint: !0 },
5554
5613
  async execute(e, t) {
5555
- const r = await pi(t);
5614
+ const r = await fi(t);
5556
5615
  return {
5557
5616
  textContent: r.textContent,
5558
5617
  structuredContent: r.structuredContent
5559
5618
  };
5560
5619
  }
5561
- }, ut = 10 * 1024 * 1024, hi = /* @__PURE__ */ new Set([
5620
+ }, ut = 10 * 1024 * 1024, gi = /* @__PURE__ */ new Set([
5562
5621
  "image/png",
5563
5622
  "image/jpeg",
5564
5623
  "image/gif",
5565
5624
  "image/webp",
5566
5625
  "image/svg+xml"
5567
- ]), fi = /* @__PURE__ */ new Set([
5626
+ ]), yi = /* @__PURE__ */ new Set([
5568
5627
  "text/plain",
5569
5628
  "text/csv",
5570
5629
  "text/html",
@@ -5572,7 +5631,7 @@ const mi = {
5572
5631
  "application/json",
5573
5632
  "application/xml",
5574
5633
  "text/xml"
5575
- ]), bi = {
5634
+ ]), ki = {
5576
5635
  ".png": "image/png",
5577
5636
  ".jpg": "image/jpeg",
5578
5637
  ".jpeg": "image/jpeg",
@@ -5587,23 +5646,23 @@ const mi = {
5587
5646
  ".xml": "application/xml",
5588
5647
  ".pdf": "application/pdf"
5589
5648
  };
5590
- function gi(e) {
5591
- return hi.has(e) ? "image" : fi.has(e) || e.startsWith("text/") ? "text" : "binary";
5649
+ function Ti(e) {
5650
+ return gi.has(e) ? "image" : yi.has(e) || e.startsWith("text/") ? "text" : "binary";
5592
5651
  }
5593
- function yi(e) {
5652
+ function wi(e) {
5594
5653
  return (e.split(";")[0] ?? e).trim().toLowerCase();
5595
5654
  }
5596
- function ki(e) {
5655
+ function Ii(e) {
5597
5656
  try {
5598
5657
  const t = new URL(e).pathname, r = t.lastIndexOf(".");
5599
5658
  if (r === -1) return;
5600
5659
  const o = t.slice(r).toLowerCase();
5601
- return bi[o];
5660
+ return ki[o];
5602
5661
  } catch {
5603
5662
  return;
5604
5663
  }
5605
5664
  }
5606
- function Ti(e) {
5665
+ function vi(e) {
5607
5666
  try {
5608
5667
  const t = new URL(e).pathname, r = t.lastIndexOf("/");
5609
5668
  return r === -1 ? void 0 : t.slice(r + 1) || void 0;
@@ -5611,27 +5670,27 @@ function Ti(e) {
5611
5670
  return;
5612
5671
  }
5613
5672
  }
5614
- const wi = {
5673
+ const ji = {
5615
5674
  fileUrl: s.string().url().describe(
5616
5675
  "The URL of the attachment file to view. Get this from the fileUrl field in a comment's fileAttachment."
5617
5676
  )
5618
- }, Ii = {
5677
+ }, Si = {
5619
5678
  fileName: s.string().optional().describe("The name of the file."),
5620
5679
  fileType: s.string().optional().describe("The MIME type of the file."),
5621
5680
  fileSize: s.number().optional().describe("The size of the file in bytes."),
5622
5681
  contentDelivery: s.enum(["image", "text", "embedded_resource", "metadata_only"]).describe("How the content was delivered.")
5623
- }, vi = {
5682
+ }, Ci = {
5624
5683
  name: f.VIEW_ATTACHMENT,
5625
5684
  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).",
5626
- parameters: wi,
5627
- outputSchema: Ii,
5685
+ parameters: ji,
5686
+ outputSchema: Si,
5628
5687
  annotations: {
5629
5688
  readOnlyHint: !0,
5630
5689
  destructiveHint: !1,
5631
5690
  idempotentHint: !0
5632
5691
  },
5633
5692
  async execute({ fileUrl: e }, t) {
5634
- const r = await t.viewAttachment(e), o = r.headers["content-length"], n = o ? Number.parseInt(o, 10) : void 0, a = Ti(e), i = r.headers["content-type"], c = i ? yi(i) : void 0, d = c && c !== "application/octet-stream" ? c : ki(e) ?? c ?? "application/octet-stream";
5693
+ const r = await t.viewAttachment(e), o = r.headers["content-length"], n = o ? Number.parseInt(o, 10) : void 0, a = vi(e), i = r.headers["content-type"], c = i ? wi(i) : void 0, d = c && c !== "application/octet-stream" ? c : Ii(e) ?? c ?? "application/octet-stream";
5635
5694
  if (n && n > ut)
5636
5695
  return {
5637
5696
  textContent: `Attachment "${a ?? e}" is too large to display inline (${(n / 1024 / 1024).toFixed(1)}MB, limit is 10MB). File type: ${d}`,
@@ -5653,7 +5712,7 @@ const wi = {
5653
5712
  contentDelivery: "metadata_only"
5654
5713
  }
5655
5714
  };
5656
- const u = gi(d), m = [];
5715
+ const u = Ti(d), m = [];
5657
5716
  let h;
5658
5717
  return u === "image" ? (m.push({
5659
5718
  type: "image",
@@ -5680,7 +5739,7 @@ const wi = {
5680
5739
  contentItems: m
5681
5740
  };
5682
5741
  }
5683
- }, ji = `
5742
+ }, $i = `
5684
5743
  ## Todoist Task and Project Management Tools
5685
5744
 
5686
5745
  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.
@@ -5722,7 +5781,7 @@ You have access to comprehensive Todoist management tools for personal productiv
5722
5781
  **Collaboration & Comments:**
5723
5782
  - **add-comments/update-comments/find-comments**: Manage task and project discussions
5724
5783
  - **view-attachment**: View file attachments from comments. Pass the fileUrl from a comment's fileAttachment. Returns images inline, text files as text, and binary files as embedded resources.
5725
- - **find-project-collaborators**: Find team members by name or email for assignments
5784
+ - **find-project-collaborators**: Look up Todoist users (collaborators, teammates) by name or email to get their user ID — use for "find/who is X" questions or any time you need to resolve a person's name to an ID. By default searches collaborators of every shared project the authenticated user can access (plus the authenticated user themselves). An empty result means the person is not a collaborator on any shared project, not that they do not exist. Pass projectId to scope to a single project
5726
5785
  - **manage-assignments**: Bulk assign/unassign/reassign up to 50 tasks with atomic operations and dry-run validation
5727
5786
 
5728
5787
  **Filters:**
@@ -5752,7 +5811,7 @@ You have access to comprehensive Todoist management tools for personal productiv
5752
5811
 
5753
5812
  2. **Search Strategy**: Use specific search queries combining multiple filters for precise results. When searching for tasks, start with broader queries and narrow down as needed.
5754
5813
 
5755
- 3. **Assignments**: Always validate project collaborators exist before assigning tasks. Use find-project-collaborators to verify user access.
5814
+ 3. **Assignments & user lookup**: Always validate project collaborators exist before assigning tasks. Use find-project-collaborators to verify user access. Also use find-project-collaborators (with just a searchTerm and no projectId) to resolve a user's ID whenever the user references a person by name or email — it searches collaborators of all shared projects you can access, plus yourself.
5756
5815
 
5757
5816
  4. **Bulk Operations**: When working with multiple items, prefer bulk tools (complete-tasks, manage-assignments) over individual operations for better performance.
5758
5817
 
@@ -5768,6 +5827,7 @@ You have access to comprehensive Todoist management tools for personal productiv
5768
5827
 
5769
5828
  - **Daily Planning**: Use find-tasks-by-date with 'today' and get-overview for project status
5770
5829
  - **Team Assignment**: find-project-collaborators → add-tasks with responsibleUser → manage-assignments for bulk changes
5830
+ - **User Lookup**: find-project-collaborators with just a searchTerm (no projectId) to resolve a name or email to a Todoist user ID across all shared-project collaborators you can access
5771
5831
  - **Task Search**: find-tasks with multiple filters → update-tasks or complete-tasks based on results
5772
5832
  - **Project Organization**: add-projects → add-sections → add-tasks with projectId and sectionId
5773
5833
  - **Progress Reviews**: find-completed-tasks (defaults to last 7 days; optionally use explicit date ranges) → get-overview for project summaries
@@ -5777,31 +5837,31 @@ You have access to comprehensive Todoist management tools for personal productiv
5777
5837
 
5778
5838
  Always provide clear, actionable task titles and descriptions. Use the overview tools to give users context about their workload and project status.
5779
5839
  `;
5780
- function Ui({
5840
+ function Mi({
5781
5841
  todoistApiKey: e,
5782
5842
  baseUrl: t,
5783
5843
  features: r = []
5784
5844
  }) {
5785
- const o = new Bt(
5845
+ const o = new Gt(
5786
5846
  { name: "todoist-mcp-server", version: "0.1.0" },
5787
5847
  {
5788
5848
  capabilities: {
5789
5849
  tools: { listChanged: !0 },
5790
5850
  prompts: { listChanged: !0 }
5791
5851
  },
5792
- instructions: ji
5852
+ instructions: $i
5793
5853
  }
5794
- ), n = new Wt(e, { baseUrl: t }), a = {
5795
- ...rn,
5854
+ ), n = new Yt(e, { baseUrl: t }), a = {
5855
+ ...an,
5796
5856
  _meta: {
5797
5857
  ui: {
5798
5858
  resourceUri: Ee
5799
5859
  }
5800
5860
  }
5801
5861
  };
5802
- rs(o);
5862
+ as(o);
5803
5863
  const i = { server: o, client: n, features: r };
5804
- return k({ tool: Yr, ...i }), k({ tool: eo, ...i }), k({ tool: ga, ...i }), k({ tool: ei, ...i }), k({ tool: la, ...i }), k({ tool: un, ...i }), k({ tool: a, ...i }), k({ tool: Ao, ...i }), k({ tool: jr, ...i }), k({ tool: Pa, ...i }), k({ tool: zo, ...i }), k({ tool: ea, ...i }), k({ tool: ra, ...i }), k({ tool: Nr, ...i }), k({ tool: Ga, ...i }), k({ tool: Qo, ...i }), k({ tool: rr, ...i }), k({ tool: wo, ...i }), k({ tool: Ia, ...i }), k({ tool: Or, ...i }), k({ tool: Ko, ...i }), k({ tool: Wa, ...i }), k({ tool: vi, ...i }), k({ tool: br, ...i }), k({ tool: _o, ...i }), k({ tool: ir, ...i }), k({ tool: pr, ...i }), k({ tool: $a, ...i }), k({ tool: ho, ...i }), k({ tool: jn, ...i }), k({ tool: Un, ...i }), k({ tool: xn, ...i }), k({ tool: Xr, ...i }), k({ tool: Fn, ...i }), k({ tool: wn, ...i }), k({ tool: oo, ...i }), k({ tool: io, ...i }), k({ tool: aa, ...i }), k({ tool: mi, ...i }), k({ tool: Mo, ...i }), k({ tool: Xn, ...i }), k({ tool: Yn, ...i }), k({ tool: ha, ...i }), k({ tool: uo, ...i }), o.registerPrompt(
5864
+ return k({ tool: Kr, ...i }), k({ tool: ro, ...i }), k({ tool: Ta, ...i }), k({ tool: ri, ...i }), k({ tool: ma, ...i }), k({ tool: hn, ...i }), k({ tool: a, ...i }), k({ tool: Po, ...i }), k({ tool: $r, ...i }), k({ tool: Ra, ...i }), k({ tool: qo, ...i }), k({ tool: ra, ...i }), k({ tool: aa, ...i }), k({ tool: Fr, ...i }), k({ tool: Va, ...i }), k({ tool: sn, ...i }), k({ tool: ar, ...i }), k({ tool: jo, ...i }), k({ tool: Sa, ...i }), k({ tool: _r, ...i }), k({ tool: Xo, ...i }), k({ tool: Ya, ...i }), k({ tool: Ci, ...i }), k({ tool: kr, ...i }), k({ tool: No, ...i }), k({ tool: lr, ...i }), k({ tool: fr, ...i }), k({ tool: Aa, ...i }), k({ tool: go, ...i }), k({ tool: $n, ...i }), k({ tool: Mn, ...i }), k({ tool: On, ...i }), k({ tool: eo, ...i }), k({ tool: Bn, ...i }), k({ tool: jn, ...i }), k({ tool: io, ...i }), k({ tool: uo, ...i }), k({ tool: da, ...i }), k({ tool: bi, ...i }), k({ tool: Ho, ...i }), k({ tool: ea, ...i }), k({ tool: Kn, ...i }), k({ tool: ga, ...i }), k({ tool: ho, ...i }), o.registerPrompt(
5805
5865
  ce.name,
5806
5866
  {
5807
5867
  title: ce.title,
@@ -5812,45 +5872,45 @@ function Ui({
5812
5872
  ), o;
5813
5873
  }
5814
5874
  export {
5815
- Ga as A,
5816
- Nr as B,
5817
- zo as C,
5818
- Pa as D,
5819
- jr as E,
5820
- la as F,
5821
- Ao as G,
5822
- rn as H,
5823
- un as I,
5824
- ei as J,
5825
- ga as K,
5826
- eo as L,
5827
- Yr as M,
5828
- Ri as N,
5829
- gs as O,
5830
- Mo as a,
5831
- wn as b,
5832
- Fn as c,
5833
- oo as d,
5834
- Xr as e,
5835
- uo as f,
5836
- Ui as g,
5837
- xn as h,
5838
- Un as i,
5839
- jn as j,
5840
- ho as k,
5841
- Yn as l,
5842
- Xn as m,
5843
- $a as n,
5844
- pr as o,
5845
- ir as p,
5846
- _o as q,
5847
- aa as r,
5848
- ha as s,
5849
- br as t,
5850
- mi as u,
5851
- vi as v,
5852
- wo as w,
5853
- Ia as x,
5854
- rr as y,
5855
- Qo as z
5875
+ Va as A,
5876
+ Fr as B,
5877
+ qo as C,
5878
+ Ra as D,
5879
+ $r as E,
5880
+ ma as F,
5881
+ Po as G,
5882
+ an as H,
5883
+ hn as I,
5884
+ ri as J,
5885
+ Ta as K,
5886
+ ro as L,
5887
+ Kr as M,
5888
+ Li as N,
5889
+ Ts as O,
5890
+ Ho as a,
5891
+ jn as b,
5892
+ Bn as c,
5893
+ io as d,
5894
+ eo as e,
5895
+ ho as f,
5896
+ Mi as g,
5897
+ On as h,
5898
+ Mn as i,
5899
+ $n as j,
5900
+ go as k,
5901
+ Kn as l,
5902
+ ea as m,
5903
+ Aa as n,
5904
+ fr as o,
5905
+ lr as p,
5906
+ No as q,
5907
+ da as r,
5908
+ ga as s,
5909
+ kr as t,
5910
+ bi as u,
5911
+ Ci as v,
5912
+ jo as w,
5913
+ Sa as x,
5914
+ ar as y,
5915
+ sn as z
5856
5916
  };