@doist/todoist-mcp 13.6.0 → 13.6.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +3 -3
- package/dist/main-http.js +2 -2
- package/dist/main.js +1 -1
- package/dist/{mcp-server-DHMEVYZ1.js → mcp-server-BbWgw3pN.js} +116 -118
- package/dist/{require-valid-todoist-token-ErppL5lQ.js → require-valid-todoist-token-BFsm17yk.js} +1 -1
- package/dist/tools/delete-object.d.ts.map +1 -1
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { t as s } from "./mcp-server-
|
|
2
|
-
import { F as r, a as d, b as i, c as n, d as c, e as l, f as m, h as p, i as f, j as T, k as j, l as g, m as k, n as u, o as v, p as P, q as h, r as b, s as S, u as y, v as A, w as C, x as R, y as x, z as F, g as M, A as O, B as E, C as L, D as w, E as H, G as I, H as W, I as q, J as z, K as B, L as D, M as N, N as U, O as V, P as G, Q as J, R as K, S as Q, T as X, U as Y, V as _, W as Z, X as $, Y as ss } from "./mcp-server-
|
|
3
|
-
import { r as es, v as ts } from "./require-valid-todoist-token-
|
|
1
|
+
import { t as s } from "./mcp-server-BbWgw3pN.js";
|
|
2
|
+
import { F as r, a as d, b as i, c as n, d as c, e as l, f as m, h as p, i as f, j as T, k as j, l as g, m as k, n as u, o as v, p as P, q as h, r as b, s as S, u as y, v as A, w as C, x as R, y as x, z as F, g as M, A as O, B as E, C as L, D as w, E as H, G as I, H as W, I as q, J as z, K as B, L as D, M as N, N as U, O as V, P as G, Q as J, R as K, S as Q, T as X, U as Y, V as _, W as Z, X as $, Y as ss } from "./mcp-server-BbWgw3pN.js";
|
|
3
|
+
import { r as es, v as ts } from "./require-valid-todoist-token-BFsm17yk.js";
|
|
4
4
|
const e = s;
|
|
5
5
|
export {
|
|
6
6
|
r as FEATURE_NAMES,
|
package/dist/main-http.js
CHANGED
|
@@ -4,8 +4,8 @@ import S from "dotenv";
|
|
|
4
4
|
import { toNodeHandler as w } from "@modelcontextprotocol/node";
|
|
5
5
|
import { createMcpHandler as v } from "@modelcontextprotocol/server";
|
|
6
6
|
import h from "express";
|
|
7
|
-
import { g as I } from "./mcp-server-
|
|
8
|
-
import { r as g } from "./require-valid-todoist-token-
|
|
7
|
+
import { g as I } from "./mcp-server-BbWgw3pN.js";
|
|
8
|
+
import { r as g } from "./require-valid-todoist-token-BFsm17yk.js";
|
|
9
9
|
function p(e) {
|
|
10
10
|
return e.startsWith("[") && e.endsWith("]") ? e.slice(1, -1) : e;
|
|
11
11
|
}
|
package/dist/main.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { serveStdio as t } from "@modelcontextprotocol/server/stdio";
|
|
3
3
|
import s from "dotenv";
|
|
4
|
-
import { g as n } from "./mcp-server-
|
|
4
|
+
import { g as n } from "./mcp-server-BbWgw3pN.js";
|
|
5
5
|
function i() {
|
|
6
6
|
const o = process.env.TODOIST_BASE_URL, r = process.env.TODOIST_API_KEY;
|
|
7
7
|
if (!r)
|
|
@@ -4,10 +4,10 @@ import { readFileSync as Xs } from "node:fs";
|
|
|
4
4
|
import { dirname as Qt, join as Fe } from "node:path";
|
|
5
5
|
import { fileURLToPath as Qs } from "node:url";
|
|
6
6
|
import { RESOURCE_MIME_TYPE as He } from "@modelcontextprotocol/ext-apps/server";
|
|
7
|
-
import
|
|
7
|
+
import ae, { ZodError as Zs, z as s } from "zod";
|
|
8
8
|
import { AsyncLocalStorage as er } from "node:async_hooks";
|
|
9
9
|
import { createRequire as tr } from "node:module";
|
|
10
|
-
import { TodoistApi as sr, isWorkspaceProject as je, isPersonalProject as Y, colors as We, LOCATION_TRIGGERS as Zt, REMINDER_TYPES as rr, createCommand as
|
|
10
|
+
import { TodoistApi as sr, isWorkspaceProject as je, isPersonalProject as Y, colors as We, LOCATION_TRIGGERS as Zt, REMINDER_TYPES as rr, createCommand as he, REMINDER_DELIVERY_SERVICES as or, HEALTH_STATUSES as rt, getTaskUrl as es, getProjectUrl as ts, ACTIVITY_EVENT_TYPES as nr, ACTIVITY_OBJECT_TYPES as ir, escapeFilterToken as ss, parseTodoistUrl as ar, WORKSPACE_ROLES as cr, WORKSPACE_PLANS as dr } from "@doist/todoist-sdk";
|
|
11
11
|
import { addDays as Be, formatISO as wt } from "date-fns";
|
|
12
12
|
const ot = 3600 * 1e3, lr = 365 * 24 * ot, j = {
|
|
13
13
|
/** Default limit for task listings */
|
|
@@ -145,11 +145,11 @@ function kr(e) {
|
|
|
145
145
|
async (t) => It(t.toString())
|
|
146
146
|
);
|
|
147
147
|
}
|
|
148
|
-
function
|
|
148
|
+
function Z(e) {
|
|
149
149
|
return typeof e == "object" && e !== null;
|
|
150
150
|
}
|
|
151
151
|
function qe(...e) {
|
|
152
|
-
return e.find(
|
|
152
|
+
return e.find(Z);
|
|
153
153
|
}
|
|
154
154
|
function F(...e) {
|
|
155
155
|
return e.find((t) => t !== void 0);
|
|
@@ -168,7 +168,7 @@ function v(e) {
|
|
|
168
168
|
if (typeof e == "number" || typeof e == "boolean")
|
|
169
169
|
return String(e);
|
|
170
170
|
}
|
|
171
|
-
function
|
|
171
|
+
function ce(e) {
|
|
172
172
|
const t = _(e);
|
|
173
173
|
return t !== void 0 ? t : v(e);
|
|
174
174
|
}
|
|
@@ -198,10 +198,10 @@ function X(e) {
|
|
|
198
198
|
if (t)
|
|
199
199
|
return L(t);
|
|
200
200
|
if (Array.isArray(e)) {
|
|
201
|
-
const n = e.map((i) =>
|
|
201
|
+
const n = e.map((i) => Z(i) ? v(i.message) || v(i.error) : v(i)).filter((i) => !!i);
|
|
202
202
|
return n.length > 0 ? L(n.slice(0, 2).join("; ")) : void 0;
|
|
203
203
|
}
|
|
204
|
-
if (!
|
|
204
|
+
if (!Z(e))
|
|
205
205
|
return;
|
|
206
206
|
const r = F(
|
|
207
207
|
v(e.detail),
|
|
@@ -251,7 +251,7 @@ function vr(e) {
|
|
|
251
251
|
const i = e.errors;
|
|
252
252
|
if (Array.isArray(i))
|
|
253
253
|
for (const a of i) {
|
|
254
|
-
if (!
|
|
254
|
+
if (!Z(a)) {
|
|
255
255
|
r(v(a));
|
|
256
256
|
continue;
|
|
257
257
|
}
|
|
@@ -269,7 +269,7 @@ function vr(e) {
|
|
|
269
269
|
);
|
|
270
270
|
r(c && d ? `${c}: ${d}` : c || d);
|
|
271
271
|
}
|
|
272
|
-
else if (
|
|
272
|
+
else if (Z(i))
|
|
273
273
|
for (const [a, c] of Object.entries(i)) {
|
|
274
274
|
const d = v(c);
|
|
275
275
|
if (d) {
|
|
@@ -328,7 +328,7 @@ function $r(e) {
|
|
|
328
328
|
return r === 401 ? "Authentication failed. Verify your API token, then retry." : r === 403 ? "Access denied. Retrying the same request will not help. If it's a scope/access problem (for example, insufficient token scope), use a token or account with the required access. Otherwise, change the request or target instead." : r === 404 ? "Confirm the referenced IDs exist and are accessible, then retry." : r === 429 ? "Rate limit reached. Wait briefly and retry." : r !== void 0 && r >= 500 ? "Todoist API may be temporarily unavailable. Retry shortly." : o ? "Fix the field hints above and retry." : r === 400 || r === 422 ? "Check parameter values and formats, then retry." : "Check the request parameters and retry.";
|
|
329
329
|
}
|
|
330
330
|
function nt(e) {
|
|
331
|
-
const t =
|
|
331
|
+
const t = Z(e) ? e : void 0, r = e instanceof Error && Z(e.cause) ? e.cause : void 0, o = qe(t?.response, r?.response), n = qe(
|
|
332
332
|
t?.responseData,
|
|
333
333
|
o?.data,
|
|
334
334
|
t?.data,
|
|
@@ -348,12 +348,12 @@ function nt(e) {
|
|
|
348
348
|
Ue(v(r?.message)),
|
|
349
349
|
Ue(typeof e == "string" ? e : void 0)
|
|
350
350
|
), a = F(
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
351
|
+
ce(n?.errorCode),
|
|
352
|
+
ce(n?.error_code),
|
|
353
|
+
ce(n?.code),
|
|
354
|
+
ce(t?.errorCode),
|
|
355
|
+
ce(t?.error_code),
|
|
356
|
+
ce(t?.code)
|
|
357
357
|
), c = F(
|
|
358
358
|
v(n?.errorTag),
|
|
359
359
|
v(n?.error_tag),
|
|
@@ -438,7 +438,7 @@ function xr(e) {
|
|
|
438
438
|
const t = nt(e);
|
|
439
439
|
return t ? Dr(t) : is(e);
|
|
440
440
|
}
|
|
441
|
-
const Er = "13.6.
|
|
441
|
+
const Er = "13.6.2", Or = {
|
|
442
442
|
version: Er
|
|
443
443
|
};
|
|
444
444
|
function St(e, { queueTimeoutMs: t = ze.QUEUE_WAIT_MS } = {}) {
|
|
@@ -491,7 +491,7 @@ function it() {
|
|
|
491
491
|
}
|
|
492
492
|
const _r = 1e4, Pr = 5 * 6e4, W = /* @__PURE__ */ new Map();
|
|
493
493
|
let Ur = _r;
|
|
494
|
-
const cs = /* @__PURE__ */ new WeakMap(),
|
|
494
|
+
const cs = /* @__PURE__ */ new WeakMap(), Q = /* @__PURE__ */ new Map();
|
|
495
495
|
let Ct, jt;
|
|
496
496
|
function Rr() {
|
|
497
497
|
return Ct ??= it(), Ct;
|
|
@@ -525,7 +525,7 @@ function Hr() {
|
|
|
525
525
|
return !1;
|
|
526
526
|
}
|
|
527
527
|
function ls(e, t) {
|
|
528
|
-
if (
|
|
528
|
+
if (Q.has(e))
|
|
529
529
|
return;
|
|
530
530
|
const r = W.get(e);
|
|
531
531
|
if (r)
|
|
@@ -536,9 +536,9 @@ function ls(e, t) {
|
|
|
536
536
|
return W.set(e, o), o;
|
|
537
537
|
}
|
|
538
538
|
function Wr(e) {
|
|
539
|
-
const t =
|
|
539
|
+
const t = Q.get(e);
|
|
540
540
|
if (t !== void 0)
|
|
541
|
-
return
|
|
541
|
+
return Q.set(e, t + 1), {
|
|
542
542
|
limiters: $t(),
|
|
543
543
|
release: () => Dt(e)
|
|
544
544
|
};
|
|
@@ -548,18 +548,18 @@ function Wr(e) {
|
|
|
548
548
|
release: () => {
|
|
549
549
|
r.leases--;
|
|
550
550
|
}
|
|
551
|
-
}) : (
|
|
551
|
+
}) : (Q.set(e, 1), {
|
|
552
552
|
limiters: $t(),
|
|
553
553
|
release: () => Dt(e)
|
|
554
554
|
});
|
|
555
555
|
}
|
|
556
556
|
function Dt(e) {
|
|
557
|
-
const t =
|
|
557
|
+
const t = Q.get(e);
|
|
558
558
|
if (t === void 0 || t <= 1) {
|
|
559
|
-
|
|
559
|
+
Q.delete(e);
|
|
560
560
|
return;
|
|
561
561
|
}
|
|
562
|
-
|
|
562
|
+
Q.set(e, t - 1);
|
|
563
563
|
}
|
|
564
564
|
function Br(e, t) {
|
|
565
565
|
const r = Lr(t);
|
|
@@ -1216,7 +1216,7 @@ class Ts {
|
|
|
1216
1216
|
const Re = new Ts(
|
|
1217
1217
|
Fo,
|
|
1218
1218
|
ys
|
|
1219
|
-
),
|
|
1219
|
+
), de = new Ts(
|
|
1220
1220
|
Ho,
|
|
1221
1221
|
ys
|
|
1222
1222
|
), ks = "me";
|
|
@@ -1302,11 +1302,11 @@ class Wo {
|
|
|
1302
1302
|
* Get collaborators for a specific project
|
|
1303
1303
|
*/
|
|
1304
1304
|
async getProjectCollaborators(t, r, o) {
|
|
1305
|
-
const n = o === void 0 ? await this.getCacheScope(t) : o, i = this.getCacheKey(n, `project_${r}`), a = i ?
|
|
1305
|
+
const n = o === void 0 ? await this.getCacheScope(t) : o, i = this.getCacheKey(n, `project_${r}`), a = i ? de.get(i) : void 0;
|
|
1306
1306
|
if (a !== void 0) return a;
|
|
1307
1307
|
try {
|
|
1308
1308
|
const c = await t.getProjectCollaborators(r), u = (Array.isArray(c) ? c : c.results || []).filter((l) => l?.id && l.name && l.email);
|
|
1309
|
-
return i &&
|
|
1309
|
+
return i && de.set(i, u), u;
|
|
1310
1310
|
} catch {
|
|
1311
1311
|
return [];
|
|
1312
1312
|
}
|
|
@@ -1315,7 +1315,7 @@ class Wo {
|
|
|
1315
1315
|
* Get all collaborators from all shared projects, deduplicated by user ID.
|
|
1316
1316
|
*/
|
|
1317
1317
|
async getAllCollaborators(t, r) {
|
|
1318
|
-
const o = r === void 0 ? await this.getCacheScope(t) : r, n = this.getCacheKey(o, "all_collaborators"), i = n ?
|
|
1318
|
+
const o = r === void 0 ? await this.getCacheScope(t) : r, n = this.getCacheKey(o, "all_collaborators"), i = n ? de.get(n) : void 0;
|
|
1319
1319
|
if (i !== void 0) return i;
|
|
1320
1320
|
try {
|
|
1321
1321
|
const c = (await z({
|
|
@@ -1324,7 +1324,7 @@ class Wo {
|
|
|
1324
1324
|
})).filter((h) => h.isShared);
|
|
1325
1325
|
if (c.length === 0) {
|
|
1326
1326
|
const h = [];
|
|
1327
|
-
return n &&
|
|
1327
|
+
return n && de.set(n, h), h;
|
|
1328
1328
|
}
|
|
1329
1329
|
const d = [], u = /* @__PURE__ */ new Set(), l = c.map(
|
|
1330
1330
|
(h) => this.getProjectCollaborators(t, h.id, o)
|
|
@@ -1333,7 +1333,7 @@ class Wo {
|
|
|
1333
1333
|
if (h.status === "fulfilled")
|
|
1334
1334
|
for (const m of h.value)
|
|
1335
1335
|
m && !u.has(m.id) && (d.push(m), u.add(m.id));
|
|
1336
|
-
return n &&
|
|
1336
|
+
return n && de.set(n, d), d;
|
|
1337
1337
|
} catch {
|
|
1338
1338
|
return [];
|
|
1339
1339
|
}
|
|
@@ -1352,7 +1352,7 @@ class Wo {
|
|
|
1352
1352
|
* Clear all caches - useful for testing
|
|
1353
1353
|
*/
|
|
1354
1354
|
clearCache() {
|
|
1355
|
-
Re.clear(),
|
|
1355
|
+
Re.clear(), de.clear();
|
|
1356
1356
|
}
|
|
1357
1357
|
}
|
|
1358
1358
|
const H = new Wo();
|
|
@@ -1415,7 +1415,7 @@ function Ko({
|
|
|
1415
1415
|
function B(e) {
|
|
1416
1416
|
return e?.toLowerCase() === "inbox";
|
|
1417
1417
|
}
|
|
1418
|
-
async function
|
|
1418
|
+
async function ee(e) {
|
|
1419
1419
|
const { projectId: t, user: r, client: o } = e;
|
|
1420
1420
|
if (!B(t))
|
|
1421
1421
|
return t;
|
|
@@ -1516,7 +1516,7 @@ function U(e) {
|
|
|
1516
1516
|
addedAt: e.addedAt?.toISOString() ?? void 0
|
|
1517
1517
|
};
|
|
1518
1518
|
}
|
|
1519
|
-
function
|
|
1519
|
+
function te(e) {
|
|
1520
1520
|
return {
|
|
1521
1521
|
id: e.id,
|
|
1522
1522
|
name: e.name,
|
|
@@ -1571,12 +1571,12 @@ function Xo(e) {
|
|
|
1571
1571
|
extraData: e.extraData ?? void 0
|
|
1572
1572
|
};
|
|
1573
1573
|
}
|
|
1574
|
-
const Qo =
|
|
1575
|
-
httpStatusCode:
|
|
1576
|
-
responseData:
|
|
1577
|
-
error:
|
|
1578
|
-
errorCode:
|
|
1579
|
-
errorTag:
|
|
1574
|
+
const Qo = ae.object({
|
|
1575
|
+
httpStatusCode: ae.number(),
|
|
1576
|
+
responseData: ae.object({
|
|
1577
|
+
error: ae.string(),
|
|
1578
|
+
errorCode: ae.number(),
|
|
1579
|
+
errorTag: ae.string()
|
|
1580
1580
|
})
|
|
1581
1581
|
});
|
|
1582
1582
|
function Ae(e) {
|
|
@@ -1711,7 +1711,7 @@ const be = s.enum(xe).optional().catch(void 0), K = s.object({
|
|
|
1711
1711
|
checked: s.boolean().describe("Whether the task is completed."),
|
|
1712
1712
|
completedAt: s.string().optional().describe("ISO 8601."),
|
|
1713
1713
|
addedAt: s.string().optional().describe("ISO 8601.")
|
|
1714
|
-
}),
|
|
1714
|
+
}), se = s.object({
|
|
1715
1715
|
id: s.string(),
|
|
1716
1716
|
name: s.string(),
|
|
1717
1717
|
description: s.string().describe("Empty string when none."),
|
|
@@ -1794,7 +1794,7 @@ const on = s.object({
|
|
|
1794
1794
|
locTrigger: s.enum(Zt).optional().describe("Location reminders only."),
|
|
1795
1795
|
radius: s.number().optional().describe("Geofence radius in metres. Location reminders only."),
|
|
1796
1796
|
isUrgent: s.boolean().optional().describe("Relative and absolute reminders only.")
|
|
1797
|
-
}),
|
|
1797
|
+
}), re = s.object({
|
|
1798
1798
|
item: s.string().describe("Usually the ID of the item that failed."),
|
|
1799
1799
|
error: s.string(),
|
|
1800
1800
|
code: s.string().optional()
|
|
@@ -1833,7 +1833,7 @@ const on = s.object({
|
|
|
1833
1833
|
}
|
|
1834
1834
|
const o = r.some((p) => B(p.projectId)), n = r.some((p) => !p.notifyUsers), i = o || n ? await t.getUser() : void 0, a = await Promise.all(
|
|
1835
1835
|
r.map(async (p) => {
|
|
1836
|
-
const h = await
|
|
1836
|
+
const h = await ee({
|
|
1837
1837
|
projectId: p.projectId,
|
|
1838
1838
|
user: i,
|
|
1839
1839
|
client: i ? void 0 : t
|
|
@@ -1996,7 +1996,7 @@ const Tn = s.object({
|
|
|
1996
1996
|
outputSchema: wn,
|
|
1997
1997
|
annotations: { readOnlyHint: !1, destructiveHint: !1, idempotentHint: !1 },
|
|
1998
1998
|
async execute({ filters: e }, t) {
|
|
1999
|
-
const r = Date.now(), o = e.map((p, h) => `tempFilterAdd${h}${r}`), n = e.map((p, h) =>
|
|
1999
|
+
const r = Date.now(), o = e.map((p, h) => `tempFilterAdd${h}${r}`), n = e.map((p, h) => he(
|
|
2000
2000
|
"filter_add",
|
|
2001
2001
|
{
|
|
2002
2002
|
name: p.name,
|
|
@@ -2067,7 +2067,7 @@ function $n({ labels: e }) {
|
|
|
2067
2067
|
${r}`;
|
|
2068
2068
|
}
|
|
2069
2069
|
const Dn = "[redacted]";
|
|
2070
|
-
function
|
|
2070
|
+
function oe(e, t, r, o = {}) {
|
|
2071
2071
|
if (r.length === 0)
|
|
2072
2072
|
return;
|
|
2073
2073
|
const n = r.slice(0, ur.MAX_FAILURES_LOGGED);
|
|
@@ -2077,7 +2077,7 @@ function ne(e, t, r, o = {}) {
|
|
|
2077
2077
|
sample: o.redactItems ? n.map((i) => ({ ...i, item: Dn })) : n
|
|
2078
2078
|
});
|
|
2079
2079
|
}
|
|
2080
|
-
function
|
|
2080
|
+
function pe(e = /* @__PURE__ */ new Date()) {
|
|
2081
2081
|
const t = e.getFullYear(), r = String(e.getMonth() + 1).padStart(2, "0"), o = String(e.getDate()).padStart(2, "0");
|
|
2082
2082
|
return `${t}-${r}-${o}`;
|
|
2083
2083
|
}
|
|
@@ -2241,9 +2241,9 @@ const Ds = new Pn(), Un = s.object({
|
|
|
2241
2241
|
}), Rn = {
|
|
2242
2242
|
projects: s.array(Un).min(1).describe("The array of projects to add.")
|
|
2243
2243
|
}, Ln = {
|
|
2244
|
-
projects: s.array(
|
|
2244
|
+
projects: s.array(se).describe("The created projects."),
|
|
2245
2245
|
totalCount: s.number().describe("The total number of projects created."),
|
|
2246
|
-
failures: s.array(
|
|
2246
|
+
failures: s.array(re).describe(
|
|
2247
2247
|
"Projects that could not be created, with the reason for each. A failure here does not affect the other projects in the batch — do not retry the whole batch; address or drop the failed items."
|
|
2248
2248
|
),
|
|
2249
2249
|
totalRequested: s.number().describe("The total number of projects requested."),
|
|
@@ -2277,8 +2277,8 @@ const Ds = new Pn(), Un = s.object({
|
|
|
2277
2277
|
error: N(u.reason)
|
|
2278
2278
|
});
|
|
2279
2279
|
});
|
|
2280
|
-
const c = i.map(
|
|
2281
|
-
return
|
|
2280
|
+
const c = i.map(te);
|
|
2281
|
+
return oe(g.ADD_PROJECTS, e.length, a, { redactItems: !0 }), {
|
|
2282
2282
|
textContent: Mn({ projects: i, failures: a }),
|
|
2283
2283
|
structuredContent: {
|
|
2284
2284
|
projects: c,
|
|
@@ -2414,7 +2414,7 @@ const qn = s.object({
|
|
|
2414
2414
|
}, Jn = {
|
|
2415
2415
|
sections: s.array(G).describe("The created sections."),
|
|
2416
2416
|
totalCount: s.number().describe("The total number of sections created."),
|
|
2417
|
-
failures: s.array(
|
|
2417
|
+
failures: s.array(re).describe(
|
|
2418
2418
|
"Sections that could not be created, with the reason for each. A failure here does not affect the other sections in the batch — do not retry the whole batch; address or drop the failed items."
|
|
2419
2419
|
),
|
|
2420
2420
|
totalRequested: s.number().describe("The total number of sections requested."),
|
|
@@ -2429,7 +2429,7 @@ const qn = s.object({
|
|
|
2429
2429
|
async execute({ sections: e }, t) {
|
|
2430
2430
|
const r = e.some((c) => B(c.projectId)) ? P(() => t.getUser()) : void 0, o = await Promise.allSettled(
|
|
2431
2431
|
e.map(async (c) => {
|
|
2432
|
-
const d = B(c.projectId) ? await r : void 0, u = await
|
|
2432
|
+
const d = B(c.projectId) ? await r : void 0, u = await ee({
|
|
2433
2433
|
projectId: c.projectId,
|
|
2434
2434
|
user: d,
|
|
2435
2435
|
client: void 0
|
|
@@ -2442,7 +2442,7 @@ const qn = s.object({
|
|
|
2442
2442
|
item: e[d]?.name ?? `Section ${d + 1}`,
|
|
2443
2443
|
error: N(c.reason)
|
|
2444
2444
|
});
|
|
2445
|
-
}),
|
|
2445
|
+
}), oe(g.ADD_SECTIONS, e.length, i, { redactItems: !0 }), {
|
|
2446
2446
|
textContent: Qn({ sections: n, failures: i }),
|
|
2447
2447
|
structuredContent: {
|
|
2448
2448
|
sections: n.map(q),
|
|
@@ -2464,7 +2464,7 @@ function Qn({
|
|
|
2464
2464
|
${o}` : "Added 0 sections";
|
|
2465
2465
|
return gt(n, t);
|
|
2466
2466
|
}
|
|
2467
|
-
const
|
|
2467
|
+
const le = {
|
|
2468
2468
|
USER_NOT_FOUND: "USER_NOT_FOUND",
|
|
2469
2469
|
USER_NOT_COLLABORATOR: "USER_NOT_COLLABORATOR",
|
|
2470
2470
|
PROJECT_NOT_SHARED: "PROJECT_NOT_SHARED",
|
|
@@ -2485,7 +2485,7 @@ class Zn {
|
|
|
2485
2485
|
taskId: o,
|
|
2486
2486
|
projectId: n,
|
|
2487
2487
|
error: {
|
|
2488
|
-
type:
|
|
2488
|
+
type: le.USER_NOT_FOUND,
|
|
2489
2489
|
message: `User "${i}" not found`,
|
|
2490
2490
|
suggestions: [
|
|
2491
2491
|
"Check the spelling of the user name or email",
|
|
@@ -2503,7 +2503,7 @@ class Zn {
|
|
|
2503
2503
|
projectId: n,
|
|
2504
2504
|
resolvedUser: a,
|
|
2505
2505
|
error: {
|
|
2506
|
-
type:
|
|
2506
|
+
type: le.PROJECT_NOT_SHARED,
|
|
2507
2507
|
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.`,
|
|
2508
2508
|
suggestions: [
|
|
2509
2509
|
"Share the project with at least one collaborator to enable assignments",
|
|
@@ -2522,7 +2522,7 @@ class Zn {
|
|
|
2522
2522
|
projectId: n,
|
|
2523
2523
|
resolvedUser: a,
|
|
2524
2524
|
error: {
|
|
2525
|
-
type:
|
|
2525
|
+
type: le.USER_NOT_COLLABORATOR,
|
|
2526
2526
|
message: `User "${a.displayName}" is not a collaborator on project "${c.name}"`,
|
|
2527
2527
|
suggestions: [
|
|
2528
2528
|
"Invite the user to collaborate on this project first",
|
|
@@ -2541,7 +2541,7 @@ class Zn {
|
|
|
2541
2541
|
projectId: n,
|
|
2542
2542
|
resolvedUser: a,
|
|
2543
2543
|
error: {
|
|
2544
|
-
type:
|
|
2544
|
+
type: le.TASK_NOT_FOUND,
|
|
2545
2545
|
message: `Task "${o}" not found or not accessible`,
|
|
2546
2546
|
suggestions: [
|
|
2547
2547
|
"Verify the task ID is correct",
|
|
@@ -2564,7 +2564,7 @@ class Zn {
|
|
|
2564
2564
|
projectId: n,
|
|
2565
2565
|
resolvedUser: a,
|
|
2566
2566
|
error: {
|
|
2567
|
-
type:
|
|
2567
|
+
type: le.PERMISSION_DENIED,
|
|
2568
2568
|
message: "Permission denied or API error occurred",
|
|
2569
2569
|
suggestions: [
|
|
2570
2570
|
"Check your API permissions",
|
|
@@ -2614,7 +2614,7 @@ class Zn {
|
|
|
2614
2614
|
isValid: !1,
|
|
2615
2615
|
taskId: r,
|
|
2616
2616
|
error: {
|
|
2617
|
-
type:
|
|
2617
|
+
type: le.TASK_NOT_FOUND,
|
|
2618
2618
|
message: `Task "${r}" not found or not accessible`,
|
|
2619
2619
|
suggestions: [
|
|
2620
2620
|
"Verify the task ID is correct",
|
|
@@ -2715,7 +2715,7 @@ const yt = new Zn(), Ut = rs.TASKS_PER_OPERATION, ei = s.object({
|
|
|
2715
2715
|
}, ti = {
|
|
2716
2716
|
tasks: s.array(K).describe("The created tasks."),
|
|
2717
2717
|
totalCount: s.number().describe("The total number of tasks created."),
|
|
2718
|
-
failures: s.array(
|
|
2718
|
+
failures: s.array(re).describe("Failed task creations with error details."),
|
|
2719
2719
|
totalRequested: s.number().describe("The total number of tasks requested."),
|
|
2720
2720
|
successCount: s.number().describe("The number of successfully created tasks."),
|
|
2721
2721
|
failureCount: s.number().describe("The number of failed task creations.")
|
|
@@ -2761,7 +2761,7 @@ const yt = new Zn(), Ut = rs.TASKS_PER_OPERATION, ei = s.object({
|
|
|
2761
2761
|
throw u ? new as(m) : new Error(m);
|
|
2762
2762
|
}
|
|
2763
2763
|
const l = c.map(U);
|
|
2764
|
-
return
|
|
2764
|
+
return oe(g.ADD_TASKS, r.length, d, { redactItems: !0 }), {
|
|
2765
2765
|
textContent: ni({
|
|
2766
2766
|
tasks: l,
|
|
2767
2767
|
failures: d,
|
|
@@ -2935,7 +2935,7 @@ ${n}`,
|
|
|
2935
2935
|
ids: s.array(s.string().min(1)).min(1).describe("The IDs of the tasks to complete.")
|
|
2936
2936
|
}, li = {
|
|
2937
2937
|
completed: s.array(s.string()).describe("The IDs of successfully completed tasks."),
|
|
2938
|
-
failures: s.array(
|
|
2938
|
+
failures: s.array(re).describe("Failed task completions with error details."),
|
|
2939
2939
|
totalRequested: s.number().describe("The total number of tasks requested to complete."),
|
|
2940
2940
|
successCount: s.number().describe("The number of successfully completed tasks."),
|
|
2941
2941
|
failureCount: s.number().describe("The number of failed task completions.")
|
|
@@ -2956,7 +2956,7 @@ ${n}`,
|
|
|
2956
2956
|
error: N(a)
|
|
2957
2957
|
});
|
|
2958
2958
|
}
|
|
2959
|
-
return
|
|
2959
|
+
return oe(g.COMPLETE_TASKS, e.ids.length, o), {
|
|
2960
2960
|
textContent: pi({
|
|
2961
2961
|
completed: r,
|
|
2962
2962
|
failures: o,
|
|
@@ -3033,9 +3033,7 @@ const Es = [
|
|
|
3033
3033
|
await t.deleteLabel(e.id);
|
|
3034
3034
|
break;
|
|
3035
3035
|
case "filter":
|
|
3036
|
-
await t.
|
|
3037
|
-
commands: [Q("filter_delete", { id: e.id })]
|
|
3038
|
-
});
|
|
3036
|
+
await t.deleteFilter(e.id);
|
|
3039
3037
|
break;
|
|
3040
3038
|
case "reminder":
|
|
3041
3039
|
await t.deleteReminder(e.id);
|
|
@@ -3115,7 +3113,7 @@ const ki = K.pick({
|
|
|
3115
3113
|
hasChildren: s.boolean().describe(
|
|
3116
3114
|
"Whether this subtask has subtasks of its own. Fetch it with includeChildren to expand."
|
|
3117
3115
|
)
|
|
3118
|
-
}), wi =
|
|
3116
|
+
}), wi = se.pick({ id: !0, name: !0 }).extend({
|
|
3119
3117
|
hasChildren: s.boolean().describe(
|
|
3120
3118
|
"Whether this sub-project has sub-projects of its own. Fetch it with includeChildren to expand."
|
|
3121
3119
|
)
|
|
@@ -3198,7 +3196,7 @@ const _s = ["task", "project", "comment", "section"], Ci = {
|
|
|
3198
3196
|
}, ji = {
|
|
3199
3197
|
type: s.enum(_s).describe("The type of object fetched."),
|
|
3200
3198
|
id: s.string().describe("The ID of the fetched object."),
|
|
3201
|
-
object: s.union([K,
|
|
3199
|
+
object: s.union([K, se, Ie, G]).describe("The fetched object data."),
|
|
3202
3200
|
...vi
|
|
3203
3201
|
}, $i = {
|
|
3204
3202
|
name: g.FETCH_OBJECT,
|
|
@@ -3226,7 +3224,7 @@ const _s = ["task", "project", "comment", "section"], Ci = {
|
|
|
3226
3224
|
};
|
|
3227
3225
|
}
|
|
3228
3226
|
case "project": {
|
|
3229
|
-
const i = await t.getProject(o), a =
|
|
3227
|
+
const i = await t.getProject(o), a = te(i), c = n ? await Nt(() => Si(t, i)) : {};
|
|
3230
3228
|
return {
|
|
3231
3229
|
textContent: `Found project: ${a.name} • id=${a.id} • color=${a.color} • viewStyle=${a.viewStyle}${Mt("subProjects", c)}`,
|
|
3232
3230
|
structuredContent: {
|
|
@@ -3320,7 +3318,7 @@ Labels: ${c.labels.join(", ")}`), i = {
|
|
|
3320
3318
|
}
|
|
3321
3319
|
};
|
|
3322
3320
|
} else {
|
|
3323
|
-
const a = await t.getProject(n), c =
|
|
3321
|
+
const a = await t.getProject(n), c = te(a), d = [c.name];
|
|
3324
3322
|
c.description && d.push(`
|
|
3325
3323
|
|
|
3326
3324
|
Description: ${c.description}`), c.isShared && d.push(`
|
|
@@ -3498,7 +3496,7 @@ const Mi = {
|
|
|
3498
3496
|
throw new Error(
|
|
3499
3497
|
"Cannot provide multiple search parameters. Choose one of: taskId, projectId, or commentId."
|
|
3500
3498
|
);
|
|
3501
|
-
const n = await
|
|
3499
|
+
const n = await ee({
|
|
3502
3500
|
projectId: e.projectId,
|
|
3503
3501
|
client: t
|
|
3504
3502
|
});
|
|
@@ -3668,7 +3666,7 @@ const qi = {
|
|
|
3668
3666
|
const h = await lt(t, c), m = h?.email;
|
|
3669
3667
|
let f = kt(o, n);
|
|
3670
3668
|
h && m && (f = me(f, `assigned to: ${m}`));
|
|
3671
|
-
const T = await t.getUser(), C = T.tzInfo?.gmtString || "+00:00", A = await
|
|
3669
|
+
const T = await t.getUser(), C = T.tzInfo?.gmtString || "+00:00", A = await ee({
|
|
3672
3670
|
projectId: d,
|
|
3673
3671
|
user: T
|
|
3674
3672
|
}), k = Gi({
|
|
@@ -4002,7 +4000,7 @@ const { ADD_PROJECTS: Wt } = g, aa = {
|
|
|
4002
4000
|
"Which projects to return by archive status: 'active' (default, non-archived only), 'archived' (archived only), or 'all' (both active and archived). Each project includes an isArchived field. Archived projects can be deleted via the delete-object tool (type: 'project')."
|
|
4003
4001
|
)
|
|
4004
4002
|
}, da = {
|
|
4005
|
-
projects: s.array(
|
|
4003
|
+
projects: s.array(se).describe("The found projects."),
|
|
4006
4004
|
nextCursor: s.string().optional(),
|
|
4007
4005
|
totalCount: s.number().describe("The total number of projects in this page."),
|
|
4008
4006
|
hasMore: s.boolean(),
|
|
@@ -4029,7 +4027,7 @@ const { ADD_PROJECTS: Wt } = g, aa = {
|
|
|
4029
4027
|
}) : await t.getProjects({ limit: e.limit, cursor: e.cursor ?? null });
|
|
4030
4028
|
n = c.results, i = c.nextCursor;
|
|
4031
4029
|
}
|
|
4032
|
-
const a = n.map(
|
|
4030
|
+
const a = n.map(te);
|
|
4033
4031
|
return {
|
|
4034
4032
|
textContent: ua({ projects: a, args: e, nextCursor: i }),
|
|
4035
4033
|
structuredContent: {
|
|
@@ -4167,7 +4165,7 @@ const { ADD_SECTIONS: ba } = g, ga = {
|
|
|
4167
4165
|
outputSchema: ya,
|
|
4168
4166
|
annotations: { readOnlyHint: !0, destructiveHint: !1, idempotentHint: !0 },
|
|
4169
4167
|
async execute(e, t) {
|
|
4170
|
-
const r = await
|
|
4168
|
+
const r = await ee({
|
|
4171
4169
|
projectId: e.projectId,
|
|
4172
4170
|
client: t
|
|
4173
4171
|
});
|
|
@@ -4254,7 +4252,7 @@ const wa = {
|
|
|
4254
4252
|
d = "overdue";
|
|
4255
4253
|
else if (e.startDate === "today")
|
|
4256
4254
|
if (e.daysCount > 1) {
|
|
4257
|
-
const y = /* @__PURE__ */ new Date(), f =
|
|
4255
|
+
const y = /* @__PURE__ */ new Date(), f = pe(y), T = Be(y, e.daysCount), C = wt(T, { representation: "date" }), A = `(due after: ${f} | due: ${f}) & due before: ${C}`;
|
|
4258
4256
|
d = e.overdueOption === "exclude-overdue" ? A : `(${A} | overdue)`;
|
|
4259
4257
|
} else
|
|
4260
4258
|
d = e.overdueOption === "exclude-overdue" ? "today" : "(today | overdue)";
|
|
@@ -4304,7 +4302,7 @@ function Sa({
|
|
|
4304
4302
|
`today${c}${t.daysCount > 1 ? ` + ${t.daysCount - 1} more days` : ""}`
|
|
4305
4303
|
);
|
|
4306
4304
|
} else if (t.startDate) {
|
|
4307
|
-
const c = t.daysCount > 1 ? ` to ${
|
|
4305
|
+
const c = t.daysCount > 1 ? ` to ${pe(Be(Fs(t.startDate), t.daysCount))}` : "";
|
|
4308
4306
|
n.push(`${t.startDate}${c}`);
|
|
4309
4307
|
}
|
|
4310
4308
|
if (t.labels && t.labels.length > 0) {
|
|
@@ -4473,20 +4471,20 @@ const $a = new ja(), { FIND_COMPLETED_TASKS: Bt, ADD_TASKS: zt } = g, Da = {
|
|
|
4473
4471
|
limit: d,
|
|
4474
4472
|
cursor: y ?? null
|
|
4475
4473
|
};
|
|
4476
|
-
o && (O.projectId = await
|
|
4477
|
-
const { results: Se, nextCursor: J } = await t.getTasks(O),
|
|
4478
|
-
let M = r ?
|
|
4479
|
-
(
|
|
4480
|
-
) :
|
|
4474
|
+
o && (O.projectId = await ee({ projectId: o, user: f })), n && (O.sectionId = n), i && (O.parentId = i);
|
|
4475
|
+
const { results: Se, nextCursor: J } = await t.getTasks(O), ne = Se.map(U);
|
|
4476
|
+
let M = r ? ne.filter(
|
|
4477
|
+
(ie) => ie.content.toLowerCase().includes(r.toLowerCase()) || ie.description?.toLowerCase().includes(r.toLowerCase())
|
|
4478
|
+
) : ne;
|
|
4481
4479
|
return M = Ko({
|
|
4482
4480
|
tasks: M,
|
|
4483
4481
|
resolvedAssigneeId: k,
|
|
4484
4482
|
currentUserId: f.id,
|
|
4485
4483
|
responsibleUserFiltering: c
|
|
4486
4484
|
}), l && l.length > 0 && (M = p === "and" ? M.filter(
|
|
4487
|
-
(
|
|
4485
|
+
(ie) => l.every((Pe) => ie.labels.includes(Pe))
|
|
4488
4486
|
) : M.filter(
|
|
4489
|
-
(
|
|
4487
|
+
(ie) => l.some((Pe) => ie.labels.includes(Pe))
|
|
4490
4488
|
)), {
|
|
4491
4489
|
textContent: Le({
|
|
4492
4490
|
tasks: M,
|
|
@@ -4515,19 +4513,19 @@ const $a = new ja(), { FIND_COMPLETED_TASKS: Bt, ADD_TASKS: zt } = g, Da = {
|
|
|
4515
4513
|
lang: "en",
|
|
4516
4514
|
limit: d,
|
|
4517
4515
|
cursor: y ?? null
|
|
4518
|
-
}),
|
|
4516
|
+
}), ne = Se.map(U);
|
|
4519
4517
|
return {
|
|
4520
4518
|
textContent: Le({
|
|
4521
|
-
tasks:
|
|
4519
|
+
tasks: ne,
|
|
4522
4520
|
args: e,
|
|
4523
4521
|
nextCursor: J,
|
|
4524
4522
|
isContainerSearch: !1,
|
|
4525
4523
|
assigneeEmail: I
|
|
4526
4524
|
}),
|
|
4527
4525
|
structuredContent: {
|
|
4528
|
-
tasks:
|
|
4526
|
+
tasks: ne,
|
|
4529
4527
|
nextCursor: J ?? void 0,
|
|
4530
|
-
totalCount:
|
|
4528
|
+
totalCount: ne.length,
|
|
4531
4529
|
hasMore: !!J,
|
|
4532
4530
|
appliedFilters: e
|
|
4533
4531
|
}
|
|
@@ -4873,13 +4871,13 @@ const Fa = {
|
|
|
4873
4871
|
outputSchema: _a,
|
|
4874
4872
|
annotations: { readOnlyHint: !0, destructiveHint: !1, idempotentHint: !0 },
|
|
4875
4873
|
async execute(e, t) {
|
|
4876
|
-
const r = await
|
|
4874
|
+
const r = await ee({ projectId: e.projectId, client: t }), o = r ? await Ma(t, r) : await Na(t);
|
|
4877
4875
|
return {
|
|
4878
4876
|
textContent: o.textContent,
|
|
4879
4877
|
structuredContent: o.structuredContent
|
|
4880
4878
|
};
|
|
4881
4879
|
}
|
|
4882
|
-
}, Ha = {},
|
|
4880
|
+
}, Ha = {}, ue = s.object({
|
|
4883
4881
|
count: s.number().describe("Number of consecutive periods in this streak."),
|
|
4884
4882
|
start: s.string().describe("Start date of the streak."),
|
|
4885
4883
|
end: s.string().describe("End date of the streak.")
|
|
@@ -4906,12 +4904,12 @@ const Fa = {
|
|
|
4906
4904
|
goals: s.object({
|
|
4907
4905
|
dailyGoal: s.number().describe("Daily task completion goal."),
|
|
4908
4906
|
weeklyGoal: s.number().describe("Weekly task completion goal."),
|
|
4909
|
-
currentDailyStreak:
|
|
4910
|
-
currentWeeklyStreak:
|
|
4911
|
-
lastDailyStreak:
|
|
4912
|
-
lastWeeklyStreak:
|
|
4913
|
-
maxDailyStreak:
|
|
4914
|
-
maxWeeklyStreak:
|
|
4907
|
+
currentDailyStreak: ue.describe("Current daily goal streak."),
|
|
4908
|
+
currentWeeklyStreak: ue.describe("Current weekly goal streak."),
|
|
4909
|
+
lastDailyStreak: ue.describe("Previous daily goal streak."),
|
|
4910
|
+
lastWeeklyStreak: ue.describe("Previous weekly goal streak."),
|
|
4911
|
+
maxDailyStreak: ue.describe("Best daily goal streak ever."),
|
|
4912
|
+
maxWeeklyStreak: ue.describe("Best weekly goal streak ever."),
|
|
4915
4913
|
vacationMode: s.boolean().describe("Whether vacation mode is enabled."),
|
|
4916
4914
|
karmaDisabled: s.boolean().describe("Whether karma tracking is disabled.")
|
|
4917
4915
|
}).describe("Goal and streak information."),
|
|
@@ -5668,7 +5666,7 @@ const vc = {
|
|
|
5668
5666
|
action: s.enum(["archive", "unarchive"]).describe("The action to perform on the project."),
|
|
5669
5667
|
projectId: s.string().min(1).describe("The ID of the project.")
|
|
5670
5668
|
}, Ic = {
|
|
5671
|
-
project:
|
|
5669
|
+
project: se.describe("The updated project."),
|
|
5672
5670
|
success: s.boolean().describe("Whether the action was successful.")
|
|
5673
5671
|
}, Sc = {
|
|
5674
5672
|
name: g.PROJECT_MANAGEMENT,
|
|
@@ -5677,7 +5675,7 @@ const vc = {
|
|
|
5677
5675
|
outputSchema: Ic,
|
|
5678
5676
|
annotations: { readOnlyHint: !1, destructiveHint: !1, idempotentHint: !0 },
|
|
5679
5677
|
async execute(e, t) {
|
|
5680
|
-
const r = e.action === "archive" ? await t.archiveProject(e.projectId) : await t.unarchiveProject(e.projectId), o =
|
|
5678
|
+
const r = e.action === "archive" ? await t.archiveProject(e.projectId) : await t.unarchiveProject(e.projectId), o = te(r);
|
|
5681
5679
|
return {
|
|
5682
5680
|
textContent: `${e.action === "archive" ? "Archived" : "Unarchived"} project: ${o.name} (id=${o.id})`,
|
|
5683
5681
|
structuredContent: {
|
|
@@ -5695,7 +5693,7 @@ const vc = {
|
|
|
5695
5693
|
"Optional access visibility for the project in the workspace (restricted, team, or public)."
|
|
5696
5694
|
)
|
|
5697
5695
|
}, jc = {
|
|
5698
|
-
project:
|
|
5696
|
+
project: se.describe("The moved project."),
|
|
5699
5697
|
success: s.boolean().describe("Whether the move was successful.")
|
|
5700
5698
|
}, $c = {
|
|
5701
5699
|
name: g.PROJECT_MOVE,
|
|
@@ -5715,7 +5713,7 @@ const vc = {
|
|
|
5715
5713
|
e.folderId && (i.folderId = e.folderId), e.visibility && (i.access = { visibility: e.visibility }), r = await t.moveProjectToWorkspace(i);
|
|
5716
5714
|
} else
|
|
5717
5715
|
r = await t.moveProjectToPersonal({ projectId: e.projectId });
|
|
5718
|
-
const o =
|
|
5716
|
+
const o = te(r);
|
|
5719
5717
|
return {
|
|
5720
5718
|
textContent: `${e.action === "move-to-workspace" ? "Moved to workspace" : "Moved to personal"}: ${o.name} (id=${o.id})`,
|
|
5721
5719
|
structuredContent: {
|
|
@@ -5771,7 +5769,7 @@ const vc = {
|
|
|
5771
5769
|
for (const p of a) {
|
|
5772
5770
|
const h = p.parentId;
|
|
5773
5771
|
i.push(
|
|
5774
|
-
|
|
5772
|
+
he("project_move", {
|
|
5775
5773
|
id: p.id,
|
|
5776
5774
|
parentId: h === "root" ? null : h
|
|
5777
5775
|
})
|
|
@@ -5781,14 +5779,14 @@ const vc = {
|
|
|
5781
5779
|
(p) => p.order !== void 0
|
|
5782
5780
|
);
|
|
5783
5781
|
c.length > 0 && (r === "project" ? i.push(
|
|
5784
|
-
|
|
5782
|
+
he("project_reorder", {
|
|
5785
5783
|
projects: c.map((p) => ({
|
|
5786
5784
|
id: p.id,
|
|
5787
5785
|
childOrder: p.order
|
|
5788
5786
|
}))
|
|
5789
5787
|
})
|
|
5790
5788
|
) : i.push(
|
|
5791
|
-
|
|
5789
|
+
he("section_reorder", {
|
|
5792
5790
|
sections: c.map((p) => ({
|
|
5793
5791
|
id: p.id,
|
|
5794
5792
|
sectionOrder: p.order
|
|
@@ -5842,7 +5840,7 @@ const vc = {
|
|
|
5842
5840
|
`Task "${u.content}" (${u.id}) has no due date. Rescheduling requires an existing due date.`
|
|
5843
5841
|
);
|
|
5844
5842
|
const l = Uc(d.date, u.due);
|
|
5845
|
-
return
|
|
5843
|
+
return he("item_update", {
|
|
5846
5844
|
id: d.id,
|
|
5847
5845
|
due: {
|
|
5848
5846
|
date: l,
|
|
@@ -5927,7 +5925,7 @@ const Rc = {
|
|
|
5927
5925
|
ids: s.array(s.string().min(1)).min(1).describe("The IDs of the tasks to uncomplete.")
|
|
5928
5926
|
}, Fc = {
|
|
5929
5927
|
uncompleted: s.array(s.string()).describe("The IDs of successfully uncompleted tasks."),
|
|
5930
|
-
failures: s.array(
|
|
5928
|
+
failures: s.array(re).describe("Failed task uncompletion with error details."),
|
|
5931
5929
|
totalRequested: s.number().describe("The total number of tasks requested to uncomplete."),
|
|
5932
5930
|
successCount: s.number().describe("The number of successfully uncompleted tasks."),
|
|
5933
5931
|
failureCount: s.number().describe("The number of failed task uncompletions.")
|
|
@@ -5948,7 +5946,7 @@ const Rc = {
|
|
|
5948
5946
|
error: N(a)
|
|
5949
5947
|
});
|
|
5950
5948
|
}
|
|
5951
|
-
return
|
|
5949
|
+
return oe(g.UNCOMPLETE_TASKS, e.ids.length, o), {
|
|
5952
5950
|
textContent: Wc({
|
|
5953
5951
|
uncompleted: r,
|
|
5954
5952
|
failures: o,
|
|
@@ -6073,7 +6071,7 @@ const qc = s.object({
|
|
|
6073
6071
|
};
|
|
6074
6072
|
const a = o.map((h) => {
|
|
6075
6073
|
const { id: m, color: y, description: f, ...T } = h;
|
|
6076
|
-
return
|
|
6074
|
+
return he("filter_update", {
|
|
6077
6075
|
id: m,
|
|
6078
6076
|
...T,
|
|
6079
6077
|
// "remove" is the house sentinel for clearing a field; the API clears on null.
|
|
@@ -6248,10 +6246,10 @@ const dd = s.object({
|
|
|
6248
6246
|
}), ld = {
|
|
6249
6247
|
projects: s.array(dd).min(1).describe("The projects to update.")
|
|
6250
6248
|
}, ud = {
|
|
6251
|
-
projects: s.array(
|
|
6249
|
+
projects: s.array(se).describe("The updated projects."),
|
|
6252
6250
|
totalCount: s.number().describe("The total number of projects updated."),
|
|
6253
6251
|
updatedProjectIds: s.array(s.string()).describe("The IDs of the updated projects."),
|
|
6254
|
-
failures: s.array(
|
|
6252
|
+
failures: s.array(re).describe(
|
|
6255
6253
|
"Projects that could not be updated, with the reason for each. A failure here does not affect the other projects in the batch — do not retry the whole batch; address or drop the failed items."
|
|
6256
6254
|
),
|
|
6257
6255
|
appliedOperations: s.object({
|
|
@@ -6283,9 +6281,9 @@ const dd = s.object({
|
|
|
6283
6281
|
});
|
|
6284
6282
|
continue;
|
|
6285
6283
|
}
|
|
6286
|
-
l.value.kind === "updated" ? n.push(
|
|
6284
|
+
l.value.kind === "updated" ? n.push(te(l.value.project)) : l.value.reason === "no-fields" ? a++ : c++;
|
|
6287
6285
|
}
|
|
6288
|
-
return
|
|
6286
|
+
return oe(g.UPDATE_PROJECTS, r.length, i), {
|
|
6289
6287
|
textContent: hd({
|
|
6290
6288
|
projects: n,
|
|
6291
6289
|
skippedNoFields: a,
|
|
@@ -6533,7 +6531,7 @@ const Ed = s.object({
|
|
|
6533
6531
|
tasks: s.array(K).describe("The updated tasks."),
|
|
6534
6532
|
totalCount: s.number().describe("The total number of tasks updated."),
|
|
6535
6533
|
updatedTaskIds: s.array(s.string()).describe("The IDs of the updated tasks."),
|
|
6536
|
-
failures: s.array(
|
|
6534
|
+
failures: s.array(re).describe(
|
|
6537
6535
|
"Tasks that could not be updated, with the reason for each. A failure here does not affect the other tasks in the batch."
|
|
6538
6536
|
),
|
|
6539
6537
|
appliedOperations: s.object({
|
|
@@ -6632,7 +6630,7 @@ const Ed = s.object({
|
|
|
6632
6630
|
b && "task" in b && (o[w.index] = { kind: "updated", task: b.task });
|
|
6633
6631
|
}
|
|
6634
6632
|
const { updatedTasks: T, failures: C, skippedCount: A } = Nd({ tasks: r, outcomes: o }), k = u.filter((w) => w.redundantMoveSkipped).length, I = T.map(U);
|
|
6635
|
-
return
|
|
6633
|
+
return oe(g.UPDATE_TASKS, r.length, C), {
|
|
6636
6634
|
textContent: Kd({
|
|
6637
6635
|
tasks: I,
|
|
6638
6636
|
failures: C,
|
|
@@ -6960,8 +6958,8 @@ async function sl(e) {
|
|
|
6960
6958
|
"## Week Settings",
|
|
6961
6959
|
`**Week Start Day:** ${c} (${a})`,
|
|
6962
6960
|
`**Current Week:** Week ${h}`,
|
|
6963
|
-
`**Week Start Date:** ${
|
|
6964
|
-
`**Week End Date:** ${
|
|
6961
|
+
`**Week Start Date:** ${pe(l)}`,
|
|
6962
|
+
`**Week End Date:** ${pe(p)}`,
|
|
6965
6963
|
"",
|
|
6966
6964
|
"## Daily Progress",
|
|
6967
6965
|
`**Completed Today:** ${t.completedToday}`,
|
|
@@ -6979,8 +6977,8 @@ async function sl(e) {
|
|
|
6979
6977
|
currentLocalTime: i,
|
|
6980
6978
|
startDay: a,
|
|
6981
6979
|
startDayName: c,
|
|
6982
|
-
weekStartDate:
|
|
6983
|
-
weekEndDate:
|
|
6980
|
+
weekStartDate: pe(l),
|
|
6981
|
+
weekEndDate: pe(p),
|
|
6984
6982
|
currentWeekNumber: h,
|
|
6985
6983
|
completedToday: t.completedToday,
|
|
6986
6984
|
dailyGoal: t.dailyGoal,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"delete-object.d.ts","sourceRoot":"","sources":["../../src/tools/delete-object.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AA8BvB,QAAA,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"delete-object.d.ts","sourceRoot":"","sources":["../../src/tools/delete-object.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AA8BvB,QAAA,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAkD6C,CAAA;AAE/D,OAAO,EAAE,YAAY,EAAE,CAAA"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@doist/todoist-mcp",
|
|
3
|
-
"version": "13.6.
|
|
3
|
+
"version": "13.6.2",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"types": "./dist/index.d.ts",
|
|
@@ -65,7 +65,7 @@
|
|
|
65
65
|
"prepare": "husky"
|
|
66
66
|
},
|
|
67
67
|
"dependencies": {
|
|
68
|
-
"@doist/todoist-sdk": "15.
|
|
68
|
+
"@doist/todoist-sdk": "15.8.0",
|
|
69
69
|
"@modelcontextprotocol/ext-apps": "2.0.3",
|
|
70
70
|
"date-fns": "4.1.0",
|
|
71
71
|
"dompurify": "3.3.3",
|
|
@@ -91,7 +91,7 @@
|
|
|
91
91
|
"@types/react": "19.2.18",
|
|
92
92
|
"@types/react-dom": "19.2.7",
|
|
93
93
|
"@vitejs/plugin-react": "5.2.0",
|
|
94
|
-
"concurrently": "9.2.
|
|
94
|
+
"concurrently": "9.2.5",
|
|
95
95
|
"conventional-changelog-conventionalcommits": "9.3.1",
|
|
96
96
|
"gpt-tokenizer": "3.4.0",
|
|
97
97
|
"husky": "9.1.7",
|