@doist/todoist-ai 8.8.3 → 8.8.4

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.
package/dist/index.js CHANGED
@@ -1,5 +1,5 @@
1
- import { f as s, s as a, l as e, m as t, a as d, u as o, r, d as i, b as c, c as n, e as l, h as m, i as f, j as p, k, n as g, o as j, p as u, q as T, t as h, v, w as P, x as A, y as S, z as b, A as y, B as C, C as F, D as E, E as w, F as x, G as H, H as I, I as L, J as M, K as O, L as z, M as B } from "./mcp-server-BIUYAwud.js";
2
- import { N as G, g as J } from "./mcp-server-BIUYAwud.js";
1
+ import { f as s, s as a, l as e, m as t, a as d, u as o, r, d as i, b as c, c as n, e as l, h as m, i as f, j as p, k, n as g, o as j, p as u, q as T, t as h, v, w as P, x as A, y as S, z as b, A as y, B as C, C as F, D as E, E as w, F as x, G as H, H as I, I as L, J as M, K as O, L as z, M as B } from "./mcp-server-CU4QywCX.js";
2
+ import { N as G, g as J } from "./mcp-server-CU4QywCX.js";
3
3
  const N = {
4
4
  // Task management tools
5
5
  addTasks: B,
package/dist/main-http.js CHANGED
@@ -2,7 +2,7 @@
2
2
  import { StreamableHTTPServerTransport as i } from "@modelcontextprotocol/sdk/server/streamableHttp.js";
3
3
  import l from "dotenv";
4
4
  import a from "express";
5
- import { g as p } from "./mcp-server-BIUYAwud.js";
5
+ import { g as p } from "./mcp-server-CU4QywCX.js";
6
6
  l.config({ quiet: !0 });
7
7
  const s = Number.parseInt(process.env.PORT || "3000", 10);
8
8
  function d() {
package/dist/main.js CHANGED
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  import { StdioServerTransport as s } from "@modelcontextprotocol/sdk/server/stdio.js";
3
3
  import c from "dotenv";
4
- import { g as i } from "./mcp-server-BIUYAwud.js";
4
+ import { g as i } from "./mcp-server-CU4QywCX.js";
5
5
  function p() {
6
6
  const e = process.env.TODOIST_BASE_URL, r = process.env.TODOIST_API_KEY;
7
7
  if (!r)
@@ -1,65 +1,64 @@
1
- import { colors as $e, LOCATION_TRIGGERS as ut, REMINDER_TYPES as Nt, createCommand as z, REMINDER_DELIVERY_SERVICES as Lt, HEALTH_STATUSES as Ue, getTaskUrl as pt, getProjectUrl as mt, WORKSPACE_ROLES as Mt, WORKSPACE_PLANS as Ft, TodoistApi as Ht } from "@doist/todoist-sdk";
2
- import { McpServer as Wt } from "@modelcontextprotocol/sdk/server/mcp.js";
3
- import { createHash as Bt } from "node:crypto";
4
- import { readFileSync as zt } from "node:fs";
5
- import { dirname as Yt, join as Ve } from "node:path";
6
- import { fileURLToPath as Gt } from "node:url";
7
- import { registerAppResource as qt, RESOURCE_MIME_TYPE as Kt, registerAppTool as Vt } from "@modelcontextprotocol/ext-apps/server";
8
- import J, { ZodError as Jt, z as s } from "zod";
1
+ import { colors as $e, LOCATION_TRIGGERS as lt, REMINDER_TYPES as _t, createCommand as z, REMINDER_DELIVERY_SERVICES as Nt, HEALTH_STATUSES as Ue, getTaskUrl as ut, getProjectUrl as pt, WORKSPACE_ROLES as Lt, WORKSPACE_PLANS as Mt, TodoistApi as Ft } from "@doist/todoist-sdk";
2
+ import { McpServer as Ht } from "@modelcontextprotocol/sdk/server/mcp.js";
3
+ import { createHash as Wt } from "node:crypto";
4
+ import { readFileSync as Bt } from "node:fs";
5
+ import { dirname as zt, join as Ve } from "node:path";
6
+ import { fileURLToPath as Yt } from "node:url";
7
+ import { registerAppResource as Gt, RESOURCE_MIME_TYPE as qt, registerAppTool as Kt } from "@modelcontextprotocol/ext-apps/server";
8
+ import J, { ZodError as Vt, z as s } from "zod";
9
9
  import { addDays as De, formatISO as Je } from "date-fns";
10
- const Xe = Yt(Gt(import.meta.url)), Xt = [
10
+ const Xe = zt(Yt(import.meta.url)), Jt = [
11
11
  Ve(Xe, "task-list", "index.html"),
12
12
  Ve(Xe, "mcp-apps", "index.html")
13
- ], Zt = `<!doctype html>
13
+ ], Xt = `<!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 Qt() {
19
+ function Zt() {
20
20
  const e = [];
21
- for (const t of Xt)
21
+ for (const t of Jt)
22
22
  try {
23
- return zt(t, "utf-8");
23
+ return Bt(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), Zt;
27
+ return console.error("Failed to load task list app HTML from any known path:", e), Xt;
28
28
  }
29
- const ht = Qt(), es = Bt("sha256").update(ht).digest("hex").slice(0, 12), xe = `ui://todoist/task-list@${es}`, ft = "Interactive task list widget", Ze = "https://ai.todoist.net", Qe = {
29
+ const mt = Zt(), Qt = Wt("sha256").update(mt).digest("hex").slice(0, 12), xe = `ui://todoist/task-list@${Qt}`, ht = "Interactive task list widget", es = "https://ai.todoist.net", Ze = {
30
30
  ui: {
31
31
  prefersBorder: !0,
32
32
  csp: {
33
33
  // The widget is bundled into one HTML file and does not fetch or load external assets.
34
34
  connectDomains: [],
35
35
  resourceDomains: []
36
- },
37
- domain: Ze
36
+ }
38
37
  },
39
- "openai/widgetDescription": ft,
38
+ "openai/widgetDescription": ht,
40
39
  "openai/widgetPrefersBorder": !0,
41
40
  "openai/widgetCSP": {
42
41
  connect_domains: [],
43
42
  resource_domains: []
44
43
  },
45
- "openai/widgetDomain": Ze
44
+ "openai/widgetDomain": es
46
45
  };
47
46
  function ts(e) {
48
- qt(
47
+ Gt(
49
48
  e,
50
49
  "todoist-task-list",
51
50
  xe,
52
51
  {
53
- description: ft,
54
- _meta: Qe
52
+ description: ht,
53
+ _meta: Ze
55
54
  },
56
55
  async () => ({
57
56
  contents: [
58
57
  {
59
58
  uri: xe,
60
- mimeType: Kt,
61
- text: ht,
62
- _meta: Qe
59
+ mimeType: qt,
60
+ text: mt,
61
+ _meta: Ze
63
62
  }
64
63
  ]
65
64
  })
@@ -102,7 +101,7 @@ function P(e, t = 220) {
102
101
  const r = ss(e).replace(/\s+/g, " ").trim();
103
102
  return r.length <= t ? r : `${r.slice(0, t - 3)}...`;
104
103
  }
105
- function et(e) {
104
+ function Qe(e) {
106
105
  const t = e.trim();
107
106
  return /\bHTTP\s*\d{3}\b/i.test(t) || /\bstatus code \d{3}\b/i.test(t) || /^bad request$/i.test(t) || /^unauthorized$/i.test(t) || /^forbidden$/i.test(t) || /^not found$/i.test(t);
108
107
  }
@@ -261,7 +260,7 @@ function is(e) {
261
260
  y(t?.message),
262
261
  y(r?.message),
263
262
  e instanceof Error ? e.message : y(e)
264
- ].filter((h) => !!h), l = d.find((h) => !et(h)) || d[0], u = _(
263
+ ].filter((h) => !!h), l = d.find((h) => !Qe(h)) || d[0], u = _(
265
264
  W(n?.errorExtra),
266
265
  W(n?.error_extra),
267
266
  W(n?.details),
@@ -269,7 +268,7 @@ function is(e) {
269
268
  W(n?.errors),
270
269
  W(t?.details)
271
270
  ), p = rs(n);
272
- return a !== void 0 || ns(n) || c !== void 0 || i !== void 0 || (l ? et(l) : !1) ? {
271
+ return a !== void 0 || ns(n) || c !== void 0 || i !== void 0 || (l ? Qe(l) : !1) ? {
273
272
  statusCode: a,
274
273
  code: i,
275
274
  tag: c ? P(c, 80) : void 0,
@@ -291,7 +290,7 @@ function ds(e) {
291
290
  return e instanceof Error ? P(e.message) : typeof e == "string" ? P(e) : "An unknown error occurred";
292
291
  }
293
292
  function ls(e) {
294
- if (e instanceof Jt)
293
+ if (e instanceof Vt)
295
294
  return e.message;
296
295
  const t = is(e);
297
296
  return t ? cs(t) : ds(e);
@@ -506,7 +505,7 @@ function k({
506
505
  ...e._meta ? { _meta: e._meta } : {}
507
506
  };
508
507
  if (Ss(e._meta)) {
509
- Vt(
508
+ Kt(
510
509
  t,
511
510
  e.name,
512
511
  {
@@ -695,7 +694,7 @@ class O extends Error {
695
694
  super(`Invalid duration format "${t}": ${r}`), this.name = "DurationParseError";
696
695
  }
697
696
  }
698
- function bt(e) {
697
+ function ft(e) {
699
698
  if (!e || typeof e != "string")
700
699
  throw new O(e, "Duration must be a non-empty string");
701
700
  const t = e.trim().toLowerCase().replace(/\s+/g, "");
@@ -735,7 +734,7 @@ function Ps(e) {
735
734
  return t === 0 ? `${r}m` : r === 0 ? `${t}h` : `${t}h${r}m`;
736
735
  }
737
736
  const Rs = ["p1", "p2", "p3", "p4"], _e = '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.', Ne = s.enum(Rs).describe(_e);
738
- function gt(e) {
737
+ function bt(e) {
739
738
  return { p1: 4, p2: 3, p3: 2, p4: 1 }[e];
740
739
  }
741
740
  function Us(e) {
@@ -878,7 +877,7 @@ const B = new Ns();
878
877
  async function Ls(e, t) {
879
878
  return B.resolveUser(e, t);
880
879
  }
881
- const yt = ["assigned", "unassignedOrMe", "all"];
880
+ const gt = ["assigned", "unassignedOrMe", "all"];
882
881
  async function Le(e, t) {
883
882
  if (!t)
884
883
  return;
@@ -892,7 +891,7 @@ async function Le(e, t) {
892
891
  function se(e, t) {
893
892
  return t.length === 0 ? e : e.length === 0 ? t : `${e} & ${t}`;
894
893
  }
895
- function kt({
894
+ function yt({
896
895
  resolvedAssigneeId: e,
897
896
  assigneeEmail: t,
898
897
  responsibleUserFiltering: r = "unassignedOrMe"
@@ -941,7 +940,7 @@ async function oe(e) {
941
940
  function Me(e) {
942
941
  return /(?<!\\)(?:\\\\)*\*/.test(e) ? e : `*${e.replaceAll(/\\(?!\*)/g, "\\\\")}*`;
943
942
  }
944
- async function Tt(e, t) {
943
+ async function kt(e, t) {
945
944
  return oe({
946
945
  apiMethod: e.searchProjects.bind(e),
947
946
  args: { query: Me(t) },
@@ -1084,7 +1083,7 @@ async function Fe({
1084
1083
  );
1085
1084
  }
1086
1085
  }
1087
- function tt(e) {
1086
+ function et(e) {
1088
1087
  return {
1089
1088
  isRecurring: e.isRecurring,
1090
1089
  string: e.string,
@@ -1104,13 +1103,13 @@ function ce(e) {
1104
1103
  return {
1105
1104
  ...t,
1106
1105
  minuteOffset: e.minuteOffset,
1107
- due: e.due ? tt(e.due) : void 0,
1106
+ due: e.due ? et(e.due) : void 0,
1108
1107
  isUrgent: e.isUrgent
1109
1108
  };
1110
1109
  case "absolute":
1111
1110
  return {
1112
1111
  ...t,
1113
- due: tt(e.due),
1112
+ due: et(e.due),
1114
1113
  isUrgent: e.isUrgent
1115
1114
  };
1116
1115
  case "location":
@@ -1124,7 +1123,7 @@ function ce(e) {
1124
1123
  };
1125
1124
  }
1126
1125
  }
1127
- function wt(e) {
1126
+ function Tt(e) {
1128
1127
  const t = e.filter(
1129
1128
  (o) => o.type === "relative" || o.type === "absolute"
1130
1129
  ).length, r = e.filter((o) => o.type === "location").length;
@@ -1225,7 +1224,7 @@ const ne = s.enum(me).optional().catch(void 0).describe("The color key of the en
1225
1224
  }), He = s.object({
1226
1225
  id: s.string().describe("The unique ID of the reminder."),
1227
1226
  taskId: s.string().describe("The task ID this reminder belongs to."),
1228
- type: s.enum(Nt).describe("The type of reminder: relative, absolute, or location."),
1227
+ type: s.enum(_t).describe("The type of reminder: relative, absolute, or location."),
1229
1228
  minuteOffset: s.number().optional().describe("Minutes before due time to trigger (relative reminders only)."),
1230
1229
  due: Xs.optional().describe(
1231
1230
  "Due date info (absolute and sometimes relative reminders)."
@@ -1233,7 +1232,7 @@ const ne = s.enum(me).optional().catch(void 0).describe("The color key of the en
1233
1232
  name: s.string().optional().describe("Location name (location reminders only)."),
1234
1233
  locLat: s.string().optional().describe("Latitude (location reminders only)."),
1235
1234
  locLong: s.string().optional().describe("Longitude (location reminders only)."),
1236
- locTrigger: s.enum(ut).optional().describe("Trigger type: on_enter or on_leave (location reminders only)."),
1235
+ locTrigger: s.enum(lt).optional().describe("Trigger type: on_enter or on_leave (location reminders only)."),
1237
1236
  radius: s.number().optional().describe("Geofence radius in meters (location reminders only)."),
1238
1237
  isUrgent: s.boolean().optional().describe("Whether this is an urgent reminder (relative and absolute reminders only).")
1239
1238
  }), We = s.object({
@@ -1512,7 +1511,7 @@ ${u}` + (d.length > 5 ? `
1512
1511
  this.cache = null;
1513
1512
  }
1514
1513
  }
1515
- const It = new yr(), kr = s.object({
1514
+ const wt = new yr(), kr = s.object({
1516
1515
  name: s.string().min(1).describe("The name of the project."),
1517
1516
  parentId: s.string().optional().describe("The ID of the parent project. If provided, creates this as a sub-project."),
1518
1517
  isFavorite: s.boolean().optional().describe("Whether the project is a favorite. Defaults to false."),
@@ -1537,7 +1536,7 @@ const It = new yr(), kr = s.object({
1537
1536
  ...new Set(e.map((c) => c.workspace).filter(Boolean))
1538
1537
  ], o = /* @__PURE__ */ new Map();
1539
1538
  for (const c of r) {
1540
- const d = await It.resolveWorkspace(t, c);
1539
+ const d = await wt.resolveWorkspace(t, c);
1541
1540
  o.set(c, d.workspaceId);
1542
1541
  }
1543
1542
  const n = await Promise.all(
@@ -1561,12 +1560,12 @@ function vr({ projects: e }) {
1561
1560
  return `Added ${t} project${t === 1 ? "" : "s"}:
1562
1561
  ${r}`;
1563
1562
  }
1564
- const ue = 25, ge = s.enum(Lt), vt = s.object({
1563
+ const ue = 25, ge = s.enum(Nt), It = s.object({
1565
1564
  date: s.string().optional().describe("Due date in YYYY-MM-DD format."),
1566
1565
  string: s.string().optional().describe('Natural language due string, e.g. "tomorrow at 3pm".'),
1567
1566
  timezone: s.string().optional().describe('Timezone for the reminder, e.g. "America/New_York".'),
1568
1567
  lang: s.string().optional().describe('Language for parsing the due string, e.g. "en".')
1569
- }), jt = s.enum(ut), ye = s.boolean().optional().describe("Whether this is an urgent reminder. Applies to relative and absolute reminders."), jr = s.object({
1568
+ }), vt = s.enum(lt), ye = s.boolean().optional().describe("Whether this is an urgent reminder. Applies to relative and absolute reminders."), jr = s.object({
1570
1569
  type: s.literal("relative"),
1571
1570
  taskId: s.string().min(1).describe("The ID of the task to set a reminder for."),
1572
1571
  minuteOffset: s.number().int().min(0).describe(
@@ -1579,7 +1578,7 @@ const ue = 25, ge = s.enum(Lt), vt = s.object({
1579
1578
  }), Sr = s.object({
1580
1579
  type: s.literal("absolute"),
1581
1580
  taskId: s.string().min(1).describe("The ID of the task to set a reminder for."),
1582
- due: vt.describe("The specific date/time for the reminder."),
1581
+ due: It.describe("The specific date/time for the reminder."),
1583
1582
  service: ge.optional().describe(
1584
1583
  'Delivery method: "email" or "push" notification. Defaults to push.'
1585
1584
  ),
@@ -1590,7 +1589,7 @@ const ue = 25, ge = s.enum(Lt), vt = s.object({
1590
1589
  name: s.string().min(1).describe('Name of the location, e.g. "Office", "Home".'),
1591
1590
  locLat: s.string().describe('Latitude of the location as a string, e.g. "37.7749".'),
1592
1591
  locLong: s.string().describe('Longitude of the location as a string, e.g. "-122.4194".'),
1593
- locTrigger: jt.describe(
1592
+ locTrigger: vt.describe(
1594
1593
  'When to trigger: "on_enter" (arriving) or "on_leave" (departing).'
1595
1594
  ),
1596
1595
  radius: s.number().int().optional().describe("Radius in meters for the geofence. Defaults to server default.")
@@ -1653,7 +1652,7 @@ const ue = 25, ge = s.enum(Lt), vt = s.object({
1653
1652
  }
1654
1653
  };
1655
1654
  function Er(e) {
1656
- const { timeBasedCount: t, locationCount: r } = wt(e), o = [];
1655
+ const { timeBasedCount: t, locationCount: r } = Tt(e), o = [];
1657
1656
  if (t > 0) {
1658
1657
  const n = t > 1 ? "reminders" : "reminder";
1659
1658
  o.push(`${t} time-based ${n}`);
@@ -1995,16 +1994,16 @@ function F({
1995
1994
  }) {
1996
1995
  const d = [], l = `${e}: ${t}${typeof r == "number" ? ` (limit ${r})` : ""}${o ? ", more available" : ""}.`;
1997
1996
  return d.push(l), n?.length && d.push(`Filter: ${n.join("; ")}.`), a?.length && d.push(`Preview:
1998
- ${a}`), !t && i?.length && d.push(`No results. ${i.join("; ")}.`), (c?.length || o) && d.push(St(c || [], o)), d.join(`
1997
+ ${a}`), !t && i?.length && d.push(`No results. ${i.join("; ")}.`), (c?.length || o) && d.push(jt(c || [], o)), d.join(`
1999
1998
  `);
2000
1999
  }
2001
- function St(e, t) {
2000
+ function jt(e, t) {
2002
2001
  const r = [...e];
2003
2002
  return t && r.push(`Pass cursor '${t}' to fetch more results.`), `${r.length === 1 ? "Possible suggested next step:" : "Possible suggested next steps:"}
2004
2003
  ${r.map((n) => `- ${n}`).join(`
2005
2004
  `)}`;
2006
2005
  }
2007
- const st = 25, Hr = s.object({
2006
+ const tt = 25, Hr = s.object({
2008
2007
  content: s.string().min(1).describe(
2009
2008
  '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.'
2010
2009
  ),
@@ -2033,7 +2032,7 @@ const st = 25, Hr = s.object({
2033
2032
  "Whether this task should be uncompletable (organizational header). Tasks with isUncompletable: true appear as organizational headers and cannot be completed."
2034
2033
  )
2035
2034
  }), Wr = {
2036
- tasks: s.array(Hr).min(1).max(st).describe(`The array of tasks to add (max ${st}).`)
2035
+ tasks: s.array(Hr).min(1).max(tt).describe(`The array of tasks to add (max ${tt}).`)
2037
2036
  }, Br = {
2038
2037
  tasks: s.array(K).describe("The created tasks."),
2039
2038
  totalCount: s.number().describe("The total number of tasks created."),
@@ -2128,13 +2127,13 @@ async function Gr(e, t) {
2128
2127
  labels: l,
2129
2128
  deadlineDate: u
2130
2129
  };
2131
- if (d && (h.priority = gt(d)), c && !m && !n && !a)
2130
+ if (d && (h.priority = bt(d)), c && !m && !n && !a)
2132
2131
  throw new Error(
2133
2132
  `Task "${e.content}": Cannot assign tasks without specifying project context. Please specify a projectId, sectionId, or parentId.`
2134
2133
  );
2135
2134
  if (r)
2136
2135
  try {
2137
- const { minutes: g } = bt(r);
2136
+ const { minutes: g } = ft(r);
2138
2137
  h = {
2139
2138
  ...h,
2140
2139
  duration: g,
@@ -2293,7 +2292,7 @@ function eo({
2293
2292
  failures: t
2294
2293
  });
2295
2294
  }
2296
- const Ct = [
2295
+ const St = [
2297
2296
  "project",
2298
2297
  "section",
2299
2298
  "task",
@@ -2303,11 +2302,11 @@ const Ct = [
2303
2302
  "reminder",
2304
2303
  "location_reminder"
2305
2304
  ], to = {
2306
- type: s.enum(Ct).describe("The type of entity to delete."),
2305
+ type: s.enum(St).describe("The type of entity to delete."),
2307
2306
  id: s.string().min(1).describe("The ID of the entity to delete.")
2308
2307
  }, so = {
2309
2308
  deletedEntity: s.object({
2310
- type: s.enum(Ct).describe("The type of deleted entity."),
2309
+ type: s.enum(St).describe("The type of deleted entity."),
2311
2310
  id: s.string().describe("The ID of the deleted entity.")
2312
2311
  }).describe("Information about the deleted entity."),
2313
2312
  success: s.boolean().describe("Whether the deletion was successful.")
@@ -2387,7 +2386,7 @@ Labels: ${c.labels.join(", ")}`), a = {
2387
2386
  id: `task:${c.id}`,
2388
2387
  title: c.content,
2389
2388
  text: d.join(""),
2390
- url: pt(c.id),
2389
+ url: ut(c.id),
2391
2390
  metadata: {
2392
2391
  priority: c.priority,
2393
2392
  projectId: c.projectId,
@@ -2410,7 +2409,7 @@ Favorite: Yes`), a = {
2410
2409
  id: `project:${c.id}`,
2411
2410
  title: c.name,
2412
2411
  text: d.join(""),
2413
- url: mt(c.id),
2412
+ url: pt(c.id),
2414
2413
  metadata: {
2415
2414
  color: c.color,
2416
2415
  isFavorite: c.isFavorite,
@@ -2426,11 +2425,11 @@ Favorite: Yes`), a = {
2426
2425
  structuredContent: a
2427
2426
  };
2428
2427
  }
2429
- }, $t = ["task", "project", "comment", "section"], io = {
2430
- type: s.enum($t).describe("The type of object to fetch."),
2428
+ }, Ct = ["task", "project", "comment", "section"], io = {
2429
+ type: s.enum(Ct).describe("The type of object to fetch."),
2431
2430
  id: s.string().min(1).describe("The unique ID of the object to fetch.")
2432
2431
  }, co = {
2433
- type: s.enum($t).describe("The type of object fetched."),
2432
+ type: s.enum(Ct).describe("The type of object fetched."),
2434
2433
  id: s.string().describe("The ID of the fetched object."),
2435
2434
  object: s.union([K, ae, fe, he]).describe("The fetched object data.")
2436
2435
  }, lo = {
@@ -2702,13 +2701,13 @@ function wo({
2702
2701
  a = `Found ${e.length} ${d} for ${t} ${r}${c}`, o && (a += " • More available");
2703
2702
  }
2704
2703
  if (n) {
2705
- const i = St([], n);
2704
+ const i = jt([], n);
2706
2705
  return `${a}
2707
2706
  ${i}`;
2708
2707
  }
2709
2708
  return a;
2710
2709
  }
2711
- function Dt(e) {
2710
+ function $t(e) {
2712
2711
  const t = e.getUTCFullYear(), r = String(e.getUTCMonth() + 1).padStart(2, "0"), o = String(e.getUTCDate()).padStart(2, "0");
2713
2712
  return `${t}-${r}-${o}`;
2714
2713
  }
@@ -2721,14 +2720,14 @@ function Io(e) {
2721
2720
  }
2722
2721
  function vo(e, t) {
2723
2722
  const r = new Date(e.getTime() + t * 60 * 1e3);
2724
- return Dt(r);
2723
+ return $t(r);
2725
2724
  }
2726
- function rt(e, t) {
2725
+ function st(e, t) {
2727
2726
  const [r, o, n] = e.split("-"), a = Number(r), i = Number(o), c = Number(n);
2728
2727
  if (!Number.isFinite(a) || !Number.isFinite(i) || !Number.isFinite(c))
2729
2728
  throw new Error(`Invalid date format: ${e}. Expected YYYY-MM-DD.`);
2730
2729
  const d = new Date(Date.UTC(a, i - 1, c));
2731
- return d.setUTCDate(d.getUTCDate() + t), Dt(d);
2730
+ return d.setUTCDate(d.getUTCDate() + t), $t(d);
2732
2731
  }
2733
2732
  const jo = ["and", "or"], qe = {
2734
2733
  labels: s.string().array().optional().describe("The labels to filter the tasks by"),
@@ -2748,9 +2747,9 @@ function Co({
2748
2747
  userGmtOffset: r,
2749
2748
  now: o = /* @__PURE__ */ new Date()
2750
2749
  }) {
2751
- const n = Io(r), a = vo(o, n), i = So - 1, c = t ?? (e ? rt(e, i) : a);
2750
+ const n = Io(r), a = vo(o, n), i = So - 1, c = t ?? (e ? st(e, i) : a);
2752
2751
  return {
2753
- since: e ?? rt(c, -i),
2752
+ since: e ?? st(c, -i),
2754
2753
  until: c
2755
2754
  };
2756
2755
  }
@@ -2935,7 +2934,7 @@ No shared labels.`;
2935
2934
  zeroReasonHints: p
2936
2935
  }) + m;
2937
2936
  }
2938
- const { FIND_PROJECTS: Uo, ADD_TASKS: xt, UPDATE_TASKS: At } = f, _o = {
2937
+ const { FIND_PROJECTS: Uo, ADD_TASKS: Dt, UPDATE_TASKS: xt } = f, _o = {
2939
2938
  projectId: s.string().min(1).describe("The ID of the project to search for collaborators in."),
2940
2939
  searchTerm: s.string().optional().describe(
2941
2940
  "Search for a collaborator by name or email (partial and case insensitive match). If omitted, all collaborators in the project are returned."
@@ -2968,7 +2967,7 @@ const { FIND_PROJECTS: Uo, ADD_TASKS: xt, UPDATE_TASKS: At } = f, _o = {
2968
2967
 
2969
2968
  **Next steps:**
2970
2969
  • Share the project to enable collaboration
2971
- • Use ${xt} and ${At} for assignment features once shared`,
2970
+ • Use ${Dt} and ${xt} for assignment features once shared`,
2972
2971
  structuredContent: {
2973
2972
  collaborators: [],
2974
2973
  projectInfo: {
@@ -3049,7 +3048,7 @@ function Mo({
3049
3048
  const c = [];
3050
3049
  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")));
3051
3050
  const d = [];
3052
- return e.length > 0 ? (d.push(`Use ${xt} with responsibleUser to assign new tasks`), d.push(`Use ${At} 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")), F({
3051
+ return e.length > 0 ? (d.push(`Use ${Dt} with responsibleUser to assign new tasks`), d.push(`Use ${xt} 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")), F({
3053
3052
  subject: n,
3054
3053
  count: e.length,
3055
3054
  filterHints: a,
@@ -3082,7 +3081,7 @@ const { ADD_PROJECTS: Fo } = f, Ho = {
3082
3081
  async execute(e, t) {
3083
3082
  let r, o = null;
3084
3083
  if (e.searchText)
3085
- r = await Tt(t, e.searchText), o = null;
3084
+ r = await kt(t, e.searchText), o = null;
3086
3085
  else {
3087
3086
  const a = await t.getProjects({
3088
3087
  limit: e.limit,
@@ -3199,7 +3198,7 @@ const Yo = {
3199
3198
  function Ko(e, t) {
3200
3199
  if (e.length === 0)
3201
3200
  return `No reminders found for task ${t}`;
3202
- const { timeBasedCount: r, locationCount: o } = wt(e), n = [];
3201
+ const { timeBasedCount: r, locationCount: o } = Tt(e), n = [];
3203
3202
  if (r > 0) {
3204
3203
  const a = r > 1 ? "time-based reminders" : "time-based reminder";
3205
3204
  n.push(`${r} ${a}`);
@@ -3330,7 +3329,7 @@ ${u}` + (d.length > 5 ? `
3330
3329
  this.cache = null;
3331
3330
  }
3332
3331
  }
3333
- const sn = new tn(), { FIND_COMPLETED_TASKS: ot, ADD_TASKS: nt } = f, rn = {
3332
+ const sn = new tn(), { FIND_COMPLETED_TASKS: rt, ADD_TASKS: ot } = f, rn = {
3334
3333
  searchText: s.string().optional().describe("The text to search for in tasks."),
3335
3334
  projectId: s.string().optional().describe(
3336
3335
  'Find tasks in this project. Project ID should be an ID string, or the text "inbox", for inbox tasks.'
@@ -3338,7 +3337,7 @@ const sn = new tn(), { FIND_COMPLETED_TASKS: ot, ADD_TASKS: nt } = f, rn = {
3338
3337
  sectionId: s.string().optional().describe("Find tasks in this section."),
3339
3338
  parentId: s.string().optional().describe("Find subtasks of this parent task."),
3340
3339
  responsibleUser: s.string().optional().describe("Find tasks assigned to this user. Can be a user ID, name, or email address."),
3341
- responsibleUserFiltering: s.enum(yt).optional().describe(
3340
+ responsibleUserFiltering: s.enum(gt).optional().describe(
3342
3341
  'How to filter by responsible user when responsibleUser is not provided. "assigned" = only tasks assigned to others; "unassignedOrMe" = only unassigned tasks or tasks assigned to me; "all" = all tasks regardless of assignment. Default value will be `unassignedOrMe`.'
3343
3342
  ),
3344
3343
  limit: s.number().int().min(1).max(C.TASKS_MAX).default(C.TASKS_DEFAULT).describe("The maximum number of tasks to return."),
@@ -3458,7 +3457,7 @@ const sn = new tn(), { FIND_COMPLETED_TASKS: ot, ADD_TASKS: nt } = f, rn = {
3458
3457
  r && (b = se(b, `search: ${r}`));
3459
3458
  const S = Ke(u, p);
3460
3459
  if (b = se(b, S), !(h && !i && !c)) {
3461
- const x = kt({
3460
+ const x = yt({
3462
3461
  resolvedAssigneeId: N,
3463
3462
  assigneeEmail: T,
3464
3463
  responsibleUserFiltering: c
@@ -3494,7 +3493,7 @@ function an(e) {
3494
3493
  const t = [
3495
3494
  e.searchText ? "No tasks in project match search" : "Project has no tasks yet"
3496
3495
  ];
3497
- return e.searchText || t.push(`Use ${nt} to create tasks`), t;
3496
+ return e.searchText || t.push(`Use ${ot} to create tasks`), t;
3498
3497
  }
3499
3498
  if (e.sectionId) {
3500
3499
  const t = [e.searchText ? "No tasks in section match search" : "Section is empty"];
@@ -3502,7 +3501,7 @@ function an(e) {
3502
3501
  }
3503
3502
  if (e.parentId) {
3504
3503
  const t = [e.searchText ? "No subtasks match search" : "No subtasks created yet"];
3505
- return e.searchText || t.push(`Use ${nt} with parentId to add subtasks`), t;
3504
+ return e.searchText || t.push(`Use ${ot} with parentId to add subtasks`), t;
3506
3505
  }
3507
3506
  return [];
3508
3507
  }
@@ -3538,9 +3537,9 @@ function Se({
3538
3537
  if (e.length === 0) {
3539
3538
  if (t.responsibleUser) {
3540
3539
  const u = n || t.responsibleUser;
3541
- c.push(`No tasks assigned to ${u}`), c.push("Check if the user name is correct"), c.push(`Check completed tasks with ${ot}`);
3540
+ c.push(`No tasks assigned to ${u}`), c.push("Check if the user name is correct"), c.push(`Check completed tasks with ${rt}`);
3542
3541
  }
3543
- t.searchText && (c.push("Try broader search terms"), c.push("Verify spelling and try partial words"), t.responsibleUser || c.push(`Check completed tasks with ${ot}`));
3542
+ t.searchText && (c.push("Try broader search terms"), c.push("Verify spelling and try partial words"), t.responsibleUser || c.push(`Check completed tasks with ${rt}`));
3544
3543
  }
3545
3544
  }
3546
3545
  return F({
@@ -3553,7 +3552,7 @@ function Se({
3553
3552
  zeroReasonHints: c
3554
3553
  });
3555
3554
  }
3556
- function Et(e) {
3555
+ function At(e) {
3557
3556
  return /* @__PURE__ */ new Date(`${e}T00:00:00`);
3558
3557
  }
3559
3558
  const cn = {
@@ -3571,7 +3570,7 @@ const cn = {
3571
3570
  responsibleUser: s.string().optional().describe(
3572
3571
  "Filter tasks assigned to this user. User ID, name, or email. For personal queries (summaries, plans, reports), set to current user from user-info to exclude collaborators."
3573
3572
  ),
3574
- responsibleUserFiltering: s.enum(yt).optional().describe(
3573
+ responsibleUserFiltering: s.enum(gt).optional().describe(
3575
3574
  "Filter when responsibleUser is omitted. 'assigned'=assigned to others; 'unassignedOrMe'=unassigned+mine; 'all'=everyone. Default: 'unassignedOrMe'."
3576
3575
  ),
3577
3576
  ...qe
@@ -3603,12 +3602,12 @@ const cn = {
3603
3602
  } else
3604
3603
  a = e.overdueOption === "exclude-overdue" ? "today" : "(today | overdue)";
3605
3604
  else if (e.startDate) {
3606
- const p = e.startDate, m = De(Et(p), e.daysCount), h = Je(m, { representation: "date" });
3605
+ const p = e.startDate, m = De(At(p), e.daysCount), h = Je(m, { representation: "date" });
3607
3606
  a = `(due after: ${p} | due: ${p}) & due before: ${h}`;
3608
3607
  }
3609
3608
  const i = Ke(e.labels, e.labelsOperator);
3610
3609
  i.length > 0 && (a = se(a, `(${i})`));
3611
- const c = kt({
3610
+ const c = yt({
3612
3611
  resolvedAssigneeId: o,
3613
3612
  assigneeEmail: n,
3614
3613
  responsibleUserFiltering: e.responsibleUserFiltering
@@ -3647,7 +3646,7 @@ function un({
3647
3646
  `today${c}${t.daysCount > 1 ? ` + ${t.daysCount - 1} more days` : ""}`
3648
3647
  );
3649
3648
  } else if (t.startDate) {
3650
- const c = t.daysCount > 1 ? ` to ${te(De(Et(t.startDate), t.daysCount))}` : "";
3649
+ const c = t.daysCount > 1 ? ` to ${te(De(At(t.startDate), t.daysCount))}` : "";
3651
3650
  n.push(`${t.startDate}${c}`);
3652
3651
  }
3653
3652
  if (t.labels && t.labels.length > 0) {
@@ -3686,7 +3685,7 @@ const pn = {
3686
3685
  projectId: s.string().min(1).optional().describe(
3687
3686
  "Optional project ID. If provided, shows detailed overview of that project. If omitted, shows overview of all projects."
3688
3687
  )
3689
- }, Ot = s.lazy(
3688
+ }, Et = s.lazy(
3690
3689
  () => s.object({
3691
3690
  id: s.string().describe("The project ID."),
3692
3691
  name: s.string().describe("The project name."),
@@ -3699,7 +3698,7 @@ const pn = {
3699
3698
  name: s.string()
3700
3699
  })
3701
3700
  ),
3702
- children: s.array(Ot).describe("Nested child projects.")
3701
+ children: s.array(Et).describe("Nested child projects.")
3703
3702
  })
3704
3703
  ), mn = {
3705
3704
  type: s.enum(["account_overview", "project_overview"]).describe("The type of overview returned."),
@@ -3725,7 +3724,7 @@ const pn = {
3725
3724
  })
3726
3725
  ).describe("Sections in the inbox project.")
3727
3726
  }).nullable().optional().describe("Inbox information (account overview only)."),
3728
- projects: s.array(s.lazy(() => Ot)).optional().describe(
3727
+ projects: s.array(s.lazy(() => Et)).optional().describe(
3729
3728
  "List of projects with hierarchy, folders, and ordering (account overview only)."
3730
3729
  ),
3731
3730
  project: s.object({
@@ -3779,17 +3778,17 @@ async function fn(e, t) {
3779
3778
  })
3780
3779
  ), r;
3781
3780
  }
3782
- function Pt(e, t, r = "") {
3781
+ function Ot(e, t, r = "") {
3783
3782
  const o = [];
3784
3783
  o.push(`${r}- Project: ${e.name} (id=${e.id})`);
3785
3784
  const n = t[e.id] || [];
3786
3785
  for (const a of n)
3787
3786
  o.push(`${r} - Section: ${a.name} (id=${a.id})`);
3788
3787
  for (const a of e.children)
3789
- o.push(...Pt(a, t, `${r} `));
3788
+ o.push(...Ot(a, t, `${r} `));
3790
3789
  return o;
3791
3790
  }
3792
- function at(e) {
3791
+ function nt(e) {
3793
3792
  const t = {};
3794
3793
  for (const o of e)
3795
3794
  t[o.id] = { ...o, children: [] };
@@ -3814,7 +3813,7 @@ function Re(e, t = "") {
3814
3813
  }
3815
3814
  return r;
3816
3815
  }
3817
- function Rt(e, t) {
3816
+ function Pt(e, t) {
3818
3817
  return {
3819
3818
  id: e.id,
3820
3819
  name: e.name,
@@ -3822,7 +3821,7 @@ function Rt(e, t) {
3822
3821
  folderId: Pe(e) ? e.folderId ?? void 0 : void 0,
3823
3822
  childOrder: e.childOrder,
3824
3823
  sections: t[e.id] || [],
3825
- children: e.children.map((r) => Rt(r, t))
3824
+ children: e.children.map((r) => Pt(r, t))
3826
3825
  };
3827
3826
  }
3828
3827
  async function bn(e, t) {
@@ -3850,7 +3849,7 @@ async function yn(e) {
3850
3849
  }
3851
3850
  if (n.length)
3852
3851
  for (const p of n)
3853
- c.push(...Pt(p, i));
3852
+ c.push(...Ot(p, i));
3854
3853
  else
3855
3854
  c.push("_No projects found._");
3856
3855
  c.push("");
@@ -3868,7 +3867,7 @@ async function yn(e) {
3868
3867
  sections: i[r.id] || []
3869
3868
  } : null,
3870
3869
  projects: n.map(
3871
- (p) => Rt(p, i)
3870
+ (p) => Pt(p, i)
3872
3871
  ),
3873
3872
  totalProjects: t.length,
3874
3873
  totalSections: a.reduce(
@@ -3893,7 +3892,7 @@ async function kn(e, t) {
3893
3892
  const c = [`# ${r.name}`];
3894
3893
  if (i.length > 0) {
3895
3894
  c.push("");
3896
- const u = at(i);
3895
+ const u = nt(i);
3897
3896
  c.push(...Re(u));
3898
3897
  }
3899
3898
  for (const u of o) {
@@ -3901,7 +3900,7 @@ async function kn(e, t) {
3901
3900
  const p = a[u.id];
3902
3901
  if (!p?.length)
3903
3902
  continue;
3904
- const m = at(p);
3903
+ const m = nt(p);
3905
3904
  c.push(...Re(m));
3906
3905
  }
3907
3906
  const d = c.join(`
@@ -3942,7 +3941,7 @@ const Tn = {
3942
3941
  count: s.number().describe("Number of consecutive periods in this streak."),
3943
3942
  start: s.string().describe("Start date of the streak."),
3944
3943
  end: s.string().describe("End date of the streak.")
3945
- }), it = s.object({
3944
+ }), at = s.object({
3946
3945
  id: s.string().describe("Project ID."),
3947
3946
  completed: s.number().describe("Number of tasks completed in this project.")
3948
3947
  }), In = {
@@ -3951,7 +3950,7 @@ const Tn = {
3951
3950
  s.object({
3952
3951
  date: s.string().describe("Date string (YYYY-MM-DD)."),
3953
3952
  totalCompleted: s.number().describe("Total tasks completed on this day."),
3954
- items: s.array(it).describe("Per-project completion breakdown for this day.")
3953
+ items: s.array(at).describe("Per-project completion breakdown for this day.")
3955
3954
  })
3956
3955
  ).describe("Daily completion breakdown (most recent days)."),
3957
3956
  weekItems: s.array(
@@ -3959,7 +3958,7 @@ const Tn = {
3959
3958
  from: s.string().describe("Start date of the week."),
3960
3959
  to: s.string().describe("End date of the week."),
3961
3960
  totalCompleted: s.number().describe("Total tasks completed in this week."),
3962
- items: s.array(it).describe("Per-project completion breakdown for this week.")
3961
+ items: s.array(at).describe("Per-project completion breakdown for this week.")
3963
3962
  })
3964
3963
  ).describe("Weekly completion breakdown (most recent weeks)."),
3965
3964
  goals: s.object({
@@ -4290,7 +4289,7 @@ const Un = {
4290
4289
  idempotentHint: !0
4291
4290
  },
4292
4291
  async execute(e, t) {
4293
- const { workspaceIdOrName: r, projectIds: o } = e, n = await It.resolveWorkspace(t, r), a = await t.getWorkspaceInsights(n.workspaceId, { projectIds: o }), i = a.projectInsights.map((d) => ({
4292
+ const { workspaceIdOrName: r, projectIds: o } = e, n = await wt.resolveWorkspace(t, r), a = await t.getWorkspaceInsights(n.workspaceId, { projectIds: o }), i = a.projectInsights.map((d) => ({
4294
4293
  projectId: d.projectId,
4295
4294
  health: d.health ? {
4296
4295
  status: d.health.status,
@@ -4326,8 +4325,8 @@ const Un = {
4326
4325
  }, Fn = {}, Hn = {
4327
4326
  id: s.string().describe("The unique identifier for the workspace."),
4328
4327
  name: s.string().describe("The name of the workspace."),
4329
- plan: s.enum(Ft).describe("The workspace plan type."),
4330
- role: s.enum(Mt).optional().describe("The user's role in the workspace, if available."),
4328
+ plan: s.enum(Mt).describe("The workspace plan type."),
4329
+ role: s.enum(Lt).optional().describe("The user's role in the workspace, if available."),
4331
4330
  isLinkSharingEnabled: s.boolean().describe("Whether link sharing is enabled for the workspace."),
4332
4331
  isGuestAllowed: s.boolean().describe("Whether guests are allowed in the workspace."),
4333
4332
  createdAt: s.string().optional().describe("The ISO 8601 timestamp when the workspace was created."),
@@ -4381,7 +4380,7 @@ const zn = {
4381
4380
  structuredContent: r.structuredContent
4382
4381
  };
4383
4382
  }
4384
- }, { FIND_TASKS: Yn, FIND_PROJECT_COLLABORATORS: ct, UPDATE_TASKS: Gn } = f, qn = 50, Kn = {
4383
+ }, { FIND_TASKS: Yn, FIND_PROJECT_COLLABORATORS: it, UPDATE_TASKS: Gn } = f, qn = 50, Kn = {
4385
4384
  operation: s.enum(["assign", "unassign", "reassign"]).describe("The assignment operation to perform."),
4386
4385
  taskIds: s.array(s.string()).min(1).max(qn).describe("The IDs of the tasks to operate on (max 50)."),
4387
4386
  responsibleUser: s.string().optional().describe(
@@ -4636,13 +4635,13 @@ function Ce({
4636
4635
  return !r && o.length > 0 ? (c += `**Next steps:**
4637
4636
  `, c += `• Use ${Yn} with responsibleUser to see ${e === "unassign" ? "unassigned" : "newly assigned"} tasks
4638
4637
  `, c += `• Use ${Gn} for individual assignment changes
4639
- `, n.length > 0 && (c += `• Check failed tasks and use ${ct} to verify collaborator access
4638
+ `, n.length > 0 && (c += `• Check failed tasks and use ${it} to verify collaborator access
4640
4639
  `)) : r ? (c += `**To execute:**
4641
4640
  `, c += `• Remove dryRun parameter and run again to execute changes
4642
4641
  `, o.length > 0 && (c += `• ${o.length} task${o.length === 1 ? "" : "s"} ready for ${e} operation
4643
4642
  `), n.length > 0 && (c += `• Fix ${n.length} validation error${n.length === 1 ? "" : "s"} before executing
4644
4643
  `)) : o.length === 0 && (c += `**Suggestions:**
4645
- `, c += `• Use ${ct} to find valid assignees
4644
+ `, c += `• Use ${it} to find valid assignees
4646
4645
  `, c += `• Check task IDs and assignee permissions
4647
4646
  `, c += `• Use dryRun=true to validate before executing
4648
4647
  `), c;
@@ -4707,8 +4706,8 @@ const Xn = {
4707
4706
  }
4708
4707
  };
4709
4708
  }
4710
- }, Ut = ["project", "section"], ra = {
4711
- type: s.enum(Ut).describe(
4709
+ }, Rt = ["project", "section"], ra = {
4710
+ type: s.enum(Rt).describe(
4712
4711
  '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.'
4713
4712
  ),
4714
4713
  items: s.array(
@@ -4725,7 +4724,7 @@ const Xn = {
4725
4724
  "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."
4726
4725
  )
4727
4726
  }, oa = {
4728
- type: s.enum(Ut).describe("The type of entity that was reordered/moved."),
4727
+ type: s.enum(Rt).describe("The type of entity that was reordered/moved."),
4729
4728
  movedCount: s.number().describe("The number of entities moved to a new parent."),
4730
4729
  reorderedCount: s.number().describe("The number of entities reordered."),
4731
4730
  affectedIds: s.array(s.string()).describe("The IDs of all affected entities."),
@@ -4887,19 +4886,19 @@ const ua = {
4887
4886
  limit: C.TASKS_MAX,
4888
4887
  cursor: void 0
4889
4888
  }),
4890
- Tt(t, r)
4889
+ kt(t, r)
4891
4890
  ]), a = [];
4892
4891
  for (const i of o.tasks)
4893
4892
  a.push({
4894
4893
  id: `task:${i.id}`,
4895
4894
  title: i.content,
4896
- url: pt(i.id)
4895
+ url: ut(i.id)
4897
4896
  });
4898
4897
  for (const i of n)
4899
4898
  a.push({
4900
4899
  id: `project:${i.id}`,
4901
4900
  title: i.name,
4902
- url: mt(i.id)
4901
+ url: pt(i.id)
4903
4902
  });
4904
4903
  return {
4905
4904
  textContent: JSON.stringify({ results: a }),
@@ -5177,7 +5176,7 @@ const Ua = s.object({
5177
5176
  }), _a = s.object({
5178
5177
  type: s.literal("absolute"),
5179
5178
  id: s.string().min(1).describe("The ID of the absolute reminder to update."),
5180
- due: vt.optional().describe("New due date/time for the reminder."),
5179
+ due: It.optional().describe("New due date/time for the reminder."),
5181
5180
  service: ge.optional().describe('New delivery method: "email" or "push".'),
5182
5181
  isUrgent: ye
5183
5182
  }), Na = s.object({
@@ -5186,7 +5185,7 @@ const Ua = s.object({
5186
5185
  name: s.string().optional().describe("New location name."),
5187
5186
  locLat: s.string().optional().describe("New latitude."),
5188
5187
  locLong: s.string().optional().describe("New longitude."),
5189
- locTrigger: jt.optional().describe(
5188
+ locTrigger: vt.optional().describe(
5190
5189
  'New trigger condition: "on_enter" or "on_leave".'
5191
5190
  ),
5192
5191
  radius: s.number().int().optional().describe("New radius in meters.")
@@ -5356,21 +5355,21 @@ const qa = s.object({
5356
5355
  ...N,
5357
5356
  ...D !== void 0 && { labels: D }
5358
5357
  };
5359
- I && (b.priority = gt(I));
5360
- const S = dt(
5358
+ I && (b.priority = bt(I));
5359
+ const S = ct(
5361
5360
  m,
5362
5361
  Ka,
5363
5362
  Ja
5364
5363
  );
5365
5364
  S !== void 0 && (b = { ...b, dueString: S });
5366
- const U = dt(
5365
+ const U = ct(
5367
5366
  $,
5368
5367
  Va,
5369
5368
  null
5370
5369
  );
5371
5370
  if (U !== void 0 && (b = { ...b, deadlineDate: U }), h)
5372
5371
  try {
5373
- const { minutes: v } = bt(h);
5372
+ const { minutes: v } = ft(h);
5374
5373
  b = {
5375
5374
  ...b,
5376
5375
  duration: v,
@@ -5434,7 +5433,7 @@ function ei({
5434
5433
  function ti({ id: e, ...t }) {
5435
5434
  return Object.keys(t).length > 0;
5436
5435
  }
5437
- function dt(e, t, r) {
5436
+ function ct(e, t, r) {
5438
5437
  if (e === void 0)
5439
5438
  return e;
5440
5439
  if (e === null)
@@ -5484,11 +5483,11 @@ function di(e) {
5484
5483
  return !1;
5485
5484
  }
5486
5485
  }
5487
- function _t(e) {
5486
+ function Ut(e) {
5488
5487
  return di(e) ? e : "UTC";
5489
5488
  }
5490
5489
  function li(e, t) {
5491
- const r = _t(t);
5490
+ const r = Ut(t);
5492
5491
  return e.toLocaleString("en-US", {
5493
5492
  timeZone: r,
5494
5493
  year: "numeric",
@@ -5501,7 +5500,7 @@ function li(e, t) {
5501
5500
  });
5502
5501
  }
5503
5502
  async function ui(e) {
5504
- const t = await e.getUser(), r = t.tzInfo?.timezone ?? "UTC", o = _t(r), n = /* @__PURE__ */ new Date(), a = li(n, o), i = t.startDay ?? 1, c = ci(i), d = oi(t), l = new Date(n.toLocaleString("en-US", { timeZone: o })), u = ni(l, i), p = ai(u), m = ii(l), g = [
5503
+ const t = await e.getUser(), r = t.tzInfo?.timezone ?? "UTC", o = Ut(r), n = /* @__PURE__ */ new Date(), a = li(n, o), i = t.startDay ?? 1, c = ci(i), d = oi(t), l = new Date(n.toLocaleString("en-US", { timeZone: o })), u = ni(l, i), p = ai(u), m = ii(l), g = [
5505
5504
  "# User Information",
5506
5505
  "",
5507
5506
  `**User ID:** ${t.id}`,
@@ -5556,7 +5555,7 @@ const pi = {
5556
5555
  structuredContent: r.structuredContent
5557
5556
  };
5558
5557
  }
5559
- }, lt = 10 * 1024 * 1024, mi = /* @__PURE__ */ new Set([
5558
+ }, dt = 10 * 1024 * 1024, mi = /* @__PURE__ */ new Set([
5560
5559
  "image/png",
5561
5560
  "image/jpeg",
5562
5561
  "image/gif",
@@ -5630,7 +5629,7 @@ const Ti = {
5630
5629
  },
5631
5630
  async execute({ fileUrl: e }, t) {
5632
5631
  const r = await t.viewAttachment(e), o = r.headers["content-length"], n = o ? Number.parseInt(o, 10) : void 0, a = ki(e), i = r.headers["content-type"], c = i ? gi(i) : void 0, d = c && c !== "application/octet-stream" ? c : yi(e) ?? c ?? "application/octet-stream";
5633
- if (n && n > lt)
5632
+ if (n && n > dt)
5634
5633
  return {
5635
5634
  textContent: `Attachment "${a ?? e}" is too large to display inline (${(n / 1024 / 1024).toFixed(1)}MB, limit is 10MB). File type: ${d}`,
5636
5635
  structuredContent: {
@@ -5641,7 +5640,7 @@ const Ti = {
5641
5640
  }
5642
5641
  };
5643
5642
  const l = Buffer.from(await r.arrayBuffer()), u = l.byteLength;
5644
- if (u > lt)
5643
+ if (u > dt)
5645
5644
  return {
5646
5645
  textContent: `Attachment "${a ?? e}" is too large to display inline (${(u / 1024 / 1024).toFixed(1)}MB, limit is 10MB). File type: ${d}`,
5647
5646
  structuredContent: {
@@ -5780,7 +5779,7 @@ function Ui({
5780
5779
  baseUrl: t,
5781
5780
  features: r = []
5782
5781
  }) {
5783
- const o = new Wt(
5782
+ const o = new Ht(
5784
5783
  { name: "todoist-mcp-server", version: "0.1.0" },
5785
5784
  {
5786
5785
  capabilities: {
@@ -5789,7 +5788,7 @@ function Ui({
5789
5788
  },
5790
5789
  instructions: vi
5791
5790
  }
5792
- ), n = new Ht(e, { baseUrl: t }), a = {
5791
+ ), n = new Ft(e, { baseUrl: t }), a = {
5793
5792
  ...ln,
5794
5793
  _meta: {
5795
5794
  ui: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@doist/todoist-ai",
3
- "version": "8.8.3",
3
+ "version": "8.8.4",
4
4
  "type": "module",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",