@doist/todoist-mcp 13.2.3 → 13.2.5
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-B74_sI2e.js → mcp-server-B1r-n81f.js} +173 -170
- package/dist/{require-valid-todoist-token-7FOpFoUE.js → require-valid-todoist-token-EELznAMG.js} +1 -1
- package/dist/tools/get-overview.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-B1r-n81f.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-B1r-n81f.js";
|
|
3
|
+
import { r as es, v as ts } from "./require-valid-todoist-token-EELznAMG.js";
|
|
4
4
|
const e = s;
|
|
5
5
|
export {
|
|
6
6
|
r as FEATURE_NAMES,
|
package/dist/main-http.js
CHANGED
|
@@ -3,8 +3,8 @@ import { isIP as p } from "node:net";
|
|
|
3
3
|
import O from "dotenv";
|
|
4
4
|
import { NodeStreamableHTTPServerTransport as S } from "@modelcontextprotocol/node";
|
|
5
5
|
import m from "express";
|
|
6
|
-
import { g as v } from "./mcp-server-
|
|
7
|
-
import { r as w } from "./require-valid-todoist-token-
|
|
6
|
+
import { g as v } from "./mcp-server-B1r-n81f.js";
|
|
7
|
+
import { r as w } from "./require-valid-todoist-token-EELznAMG.js";
|
|
8
8
|
function f(t) {
|
|
9
9
|
return t.startsWith("[") && t.endsWith("]") ? t.slice(1, -1) : t;
|
|
10
10
|
}
|
package/dist/main.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { StdioServerTransport as s } from "@modelcontextprotocol/server/stdio";
|
|
3
3
|
import c from "dotenv";
|
|
4
|
-
import { g as i } from "./mcp-server-
|
|
4
|
+
import { g as i } from "./mcp-server-B1r-n81f.js";
|
|
5
5
|
function p() {
|
|
6
6
|
const e = process.env.TODOIST_BASE_URL, r = process.env.TODOIST_API_KEY;
|
|
7
7
|
if (!r)
|
|
@@ -4,7 +4,7 @@ import { readFileSync as Ks } from "node:fs";
|
|
|
4
4
|
import { dirname as Vt, join as Me } from "node:path";
|
|
5
5
|
import { fileURLToPath as qs } from "node:url";
|
|
6
6
|
import { RESOURCE_MIME_TYPE as Fe } from "@modelcontextprotocol/ext-apps/server";
|
|
7
|
-
import
|
|
7
|
+
import ce, { ZodError as Ys, z as s } from "zod";
|
|
8
8
|
import { AsyncLocalStorage as Gs } from "node:async_hooks";
|
|
9
9
|
import { createRequire as Vs } from "node:module";
|
|
10
10
|
import { TodoistApi as Js, isWorkspaceProject as Ce, isPersonalProject as q, colors as He, LOCATION_TRIGGERS as Jt, REMINDER_TYPES as Xs, createCommand as Q, REMINDER_DELIVERY_SERVICES as Qs, HEALTH_STATUSES as tt, getTaskUrl as Xt, getProjectUrl as Qt, parseTodoistUrl as Zs, WORKSPACE_ROLES as er, WORKSPACE_PLANS as tr } from "@doist/todoist-sdk";
|
|
@@ -101,7 +101,7 @@ function v(e) {
|
|
|
101
101
|
if (typeof e == "number" || typeof e == "boolean")
|
|
102
102
|
return String(e);
|
|
103
103
|
}
|
|
104
|
-
function
|
|
104
|
+
function de(e) {
|
|
105
105
|
const t = O(e);
|
|
106
106
|
return t !== void 0 ? t : v(e);
|
|
107
107
|
}
|
|
@@ -119,7 +119,7 @@ function Ye(e) {
|
|
|
119
119
|
const t = e.trim();
|
|
120
120
|
return /\bHTTP\s*\d{3}\b/i.test(t) || /\bstatus code \d{3}\b/i.test(t) || /^bad request$/i.test(t) || /^unauthorized$/i.test(t) || /^forbidden$/i.test(t) || /^not found$/i.test(t);
|
|
121
121
|
}
|
|
122
|
-
function
|
|
122
|
+
function Pe(e) {
|
|
123
123
|
if (!e)
|
|
124
124
|
return;
|
|
125
125
|
const t = e.match(/\b(?:HTTP|status code)\s*[:#-]?\s*(\d{3})\b/i);
|
|
@@ -277,16 +277,16 @@ function st(e) {
|
|
|
277
277
|
O(n?.status),
|
|
278
278
|
O(n?.httpCode),
|
|
279
279
|
O(n?.http_code),
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
280
|
+
Pe(v(t?.message)),
|
|
281
|
+
Pe(v(r?.message)),
|
|
282
|
+
Pe(typeof e == "string" ? e : void 0)
|
|
283
283
|
), a = F(
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
284
|
+
de(n?.errorCode),
|
|
285
|
+
de(n?.error_code),
|
|
286
|
+
de(n?.code),
|
|
287
|
+
de(t?.errorCode),
|
|
288
|
+
de(t?.error_code),
|
|
289
|
+
de(t?.code)
|
|
290
290
|
), c = F(
|
|
291
291
|
v(n?.errorTag),
|
|
292
292
|
v(n?.error_tag),
|
|
@@ -371,7 +371,7 @@ function yr(e) {
|
|
|
371
371
|
const t = st(e);
|
|
372
372
|
return t ? br(t) : ts(e);
|
|
373
373
|
}
|
|
374
|
-
const Tr = "13.2.
|
|
374
|
+
const Tr = "13.2.5", kr = {
|
|
375
375
|
version: Tr
|
|
376
376
|
}, j = {
|
|
377
377
|
/** Default limit for task listings */
|
|
@@ -574,10 +574,10 @@ function as(e, t) {
|
|
|
574
574
|
}
|
|
575
575
|
}) : Cr()[t];
|
|
576
576
|
}
|
|
577
|
-
function
|
|
577
|
+
function _r(e) {
|
|
578
578
|
return as(e, "moves");
|
|
579
579
|
}
|
|
580
|
-
function
|
|
580
|
+
function Pr(e) {
|
|
581
581
|
return as(e, "writes");
|
|
582
582
|
}
|
|
583
583
|
const Ur = "todoist-mcp", ot = kr.version, cs = new Gs(), jt = Vs(import.meta.url);
|
|
@@ -743,7 +743,7 @@ function so({
|
|
|
743
743
|
function ro(e) {
|
|
744
744
|
return new Promise((t) => setTimeout(t, e));
|
|
745
745
|
}
|
|
746
|
-
async function
|
|
746
|
+
async function _(e, t = {}) {
|
|
747
747
|
const r = t.maxRetries ?? Vr, o = t.baseDelayMs ?? Jr, n = t.maxDelayMs ?? Xr, i = t.random;
|
|
748
748
|
let a;
|
|
749
749
|
for (let c = 0; c <= r; c++)
|
|
@@ -941,7 +941,7 @@ function go({
|
|
|
941
941
|
try {
|
|
942
942
|
let { textContent: h, structuredContent: m, contentItems: y } = await Mr(
|
|
943
943
|
e.name,
|
|
944
|
-
() =>
|
|
944
|
+
() => _(() => i(l, r))
|
|
945
945
|
);
|
|
946
946
|
return n && (h && (h = bo(h)), m && (m = Xe(m))), io({ textContent: h, structuredContent: m, contentItems: y });
|
|
947
947
|
} catch (h) {
|
|
@@ -1183,7 +1183,7 @@ class hs {
|
|
|
1183
1183
|
const Ue = new hs(
|
|
1184
1184
|
jo,
|
|
1185
1185
|
ps
|
|
1186
|
-
),
|
|
1186
|
+
), le = new hs(
|
|
1187
1187
|
$o,
|
|
1188
1188
|
ps
|
|
1189
1189
|
), ms = "me";
|
|
@@ -1269,11 +1269,11 @@ class Ao {
|
|
|
1269
1269
|
* Get collaborators for a specific project
|
|
1270
1270
|
*/
|
|
1271
1271
|
async getProjectCollaborators(t, r, o) {
|
|
1272
|
-
const n = o === void 0 ? await this.getCacheScope(t) : o, i = this.getCacheKey(n, `project_${r}`), a = i ?
|
|
1272
|
+
const n = o === void 0 ? await this.getCacheScope(t) : o, i = this.getCacheKey(n, `project_${r}`), a = i ? le.get(i) : void 0;
|
|
1273
1273
|
if (a !== void 0) return a;
|
|
1274
1274
|
try {
|
|
1275
1275
|
const c = await t.getProjectCollaborators(r), u = (Array.isArray(c) ? c : c.results || []).filter((l) => l?.id && l.name && l.email);
|
|
1276
|
-
return i &&
|
|
1276
|
+
return i && le.set(i, u), u;
|
|
1277
1277
|
} catch {
|
|
1278
1278
|
return [];
|
|
1279
1279
|
}
|
|
@@ -1282,7 +1282,7 @@ class Ao {
|
|
|
1282
1282
|
* Get all collaborators from all shared projects, deduplicated by user ID.
|
|
1283
1283
|
*/
|
|
1284
1284
|
async getAllCollaborators(t, r) {
|
|
1285
|
-
const o = r === void 0 ? await this.getCacheScope(t) : r, n = this.getCacheKey(o, "all_collaborators"), i = n ?
|
|
1285
|
+
const o = r === void 0 ? await this.getCacheScope(t) : r, n = this.getCacheKey(o, "all_collaborators"), i = n ? le.get(n) : void 0;
|
|
1286
1286
|
if (i !== void 0) return i;
|
|
1287
1287
|
try {
|
|
1288
1288
|
const c = (await z({
|
|
@@ -1291,7 +1291,7 @@ class Ao {
|
|
|
1291
1291
|
})).filter((h) => h.isShared);
|
|
1292
1292
|
if (c.length === 0) {
|
|
1293
1293
|
const h = [];
|
|
1294
|
-
return n &&
|
|
1294
|
+
return n && le.set(n, h), h;
|
|
1295
1295
|
}
|
|
1296
1296
|
const d = [], u = /* @__PURE__ */ new Set(), l = c.map(
|
|
1297
1297
|
(h) => this.getProjectCollaborators(t, h.id, o)
|
|
@@ -1300,7 +1300,7 @@ class Ao {
|
|
|
1300
1300
|
if (h.status === "fulfilled")
|
|
1301
1301
|
for (const m of h.value)
|
|
1302
1302
|
m && !u.has(m.id) && (d.push(m), u.add(m.id));
|
|
1303
|
-
return n &&
|
|
1303
|
+
return n && le.set(n, d), d;
|
|
1304
1304
|
} catch {
|
|
1305
1305
|
return [];
|
|
1306
1306
|
}
|
|
@@ -1319,7 +1319,7 @@ class Ao {
|
|
|
1319
1319
|
* Clear all caches - useful for testing
|
|
1320
1320
|
*/
|
|
1321
1321
|
clearCache() {
|
|
1322
|
-
Ue.clear(),
|
|
1322
|
+
Ue.clear(), le.clear();
|
|
1323
1323
|
}
|
|
1324
1324
|
}
|
|
1325
1325
|
const H = new Ao();
|
|
@@ -1358,7 +1358,7 @@ async function at(e, t) {
|
|
|
1358
1358
|
);
|
|
1359
1359
|
return { userId: r.userId, email: r.email };
|
|
1360
1360
|
}
|
|
1361
|
-
function
|
|
1361
|
+
function me(e, t) {
|
|
1362
1362
|
return t.length === 0 ? e : e.length === 0 ? t : `${e} & ${t}`;
|
|
1363
1363
|
}
|
|
1364
1364
|
function Qe({
|
|
@@ -1382,7 +1382,7 @@ function Eo({
|
|
|
1382
1382
|
function B(e) {
|
|
1383
1383
|
return e?.toLowerCase() === "inbox";
|
|
1384
1384
|
}
|
|
1385
|
-
async function
|
|
1385
|
+
async function te(e) {
|
|
1386
1386
|
const { projectId: t, user: r, client: o } = e;
|
|
1387
1387
|
if (!B(t))
|
|
1388
1388
|
return t;
|
|
@@ -1428,7 +1428,7 @@ async function Oo(e) {
|
|
|
1428
1428
|
limit: j.PROJECTS_MAX
|
|
1429
1429
|
});
|
|
1430
1430
|
}
|
|
1431
|
-
function
|
|
1431
|
+
function _o(e) {
|
|
1432
1432
|
const t = (i) => i.replaceAll(/[.*+?^${}()|[\]\\]/g, "\\$&"), r = /(?<!\\)(?:\\\\)*\*/.test(e), o = [...e];
|
|
1433
1433
|
let n = "";
|
|
1434
1434
|
for (let i = 0; i < o.length; i++) {
|
|
@@ -1437,7 +1437,7 @@ function Po(e) {
|
|
|
1437
1437
|
}
|
|
1438
1438
|
return new RegExp(r ? `^${n}$` : n, "iu");
|
|
1439
1439
|
}
|
|
1440
|
-
async function
|
|
1440
|
+
async function Po(e, t) {
|
|
1441
1441
|
return z({
|
|
1442
1442
|
apiMethod: e.searchLabels.bind(e),
|
|
1443
1443
|
args: { query: ct(t) },
|
|
@@ -1459,7 +1459,7 @@ async function Ro(e, t, r) {
|
|
|
1459
1459
|
limit: j.SECTIONS_MAX
|
|
1460
1460
|
});
|
|
1461
1461
|
}
|
|
1462
|
-
function
|
|
1462
|
+
function P(e) {
|
|
1463
1463
|
return {
|
|
1464
1464
|
id: e.id,
|
|
1465
1465
|
content: e.content,
|
|
@@ -1480,7 +1480,7 @@ function _(e) {
|
|
|
1480
1480
|
addedAt: e.addedAt?.toISOString() ?? void 0
|
|
1481
1481
|
};
|
|
1482
1482
|
}
|
|
1483
|
-
function
|
|
1483
|
+
function se(e) {
|
|
1484
1484
|
return {
|
|
1485
1485
|
id: e.id,
|
|
1486
1486
|
name: e.name,
|
|
@@ -1535,12 +1535,12 @@ function Lo(e) {
|
|
|
1535
1535
|
extraData: e.extraData ?? void 0
|
|
1536
1536
|
};
|
|
1537
1537
|
}
|
|
1538
|
-
const No =
|
|
1539
|
-
httpStatusCode:
|
|
1540
|
-
responseData:
|
|
1541
|
-
error:
|
|
1542
|
-
errorCode:
|
|
1543
|
-
errorTag:
|
|
1538
|
+
const No = ce.object({
|
|
1539
|
+
httpStatusCode: ce.number(),
|
|
1540
|
+
responseData: ce.object({
|
|
1541
|
+
error: ce.string(),
|
|
1542
|
+
errorCode: ce.number(),
|
|
1543
|
+
errorTag: ce.string()
|
|
1544
1544
|
})
|
|
1545
1545
|
});
|
|
1546
1546
|
function Ae(e) {
|
|
@@ -1555,7 +1555,7 @@ async function dt({
|
|
|
1555
1555
|
}) {
|
|
1556
1556
|
try {
|
|
1557
1557
|
const { results: n, nextCursor: i } = await e.getTasksByFilter({ query: t, cursor: o, limit: r });
|
|
1558
|
-
return { tasks: n.map(
|
|
1558
|
+
return { tasks: n.map(P), nextCursor: i };
|
|
1559
1559
|
} catch (n) {
|
|
1560
1560
|
const i = No.safeParse(n);
|
|
1561
1561
|
if (!i.success)
|
|
@@ -1674,7 +1674,7 @@ const be = s.enum(De).optional().catch(void 0), K = s.object({
|
|
|
1674
1674
|
checked: s.boolean().describe("Whether the task is completed."),
|
|
1675
1675
|
completedAt: s.string().optional().describe("ISO 8601."),
|
|
1676
1676
|
addedAt: s.string().optional().describe("ISO 8601.")
|
|
1677
|
-
}),
|
|
1677
|
+
}), re = s.object({
|
|
1678
1678
|
id: s.string(),
|
|
1679
1679
|
name: s.string(),
|
|
1680
1680
|
description: s.string().describe("Empty string when none."),
|
|
@@ -1757,7 +1757,7 @@ const zo = s.object({
|
|
|
1757
1757
|
locTrigger: s.enum(Jt).optional().describe("Location reminders only."),
|
|
1758
1758
|
radius: s.number().optional().describe("Geofence radius in metres. Location reminders only."),
|
|
1759
1759
|
isUrgent: s.boolean().optional().describe("Relative and absolute reminders only.")
|
|
1760
|
-
}),
|
|
1760
|
+
}), oe = s.object({
|
|
1761
1761
|
item: s.string().describe("Usually the ID of the item that failed."),
|
|
1762
1762
|
error: s.string(),
|
|
1763
1763
|
code: s.string().optional()
|
|
@@ -1796,7 +1796,7 @@ const zo = s.object({
|
|
|
1796
1796
|
}
|
|
1797
1797
|
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(
|
|
1798
1798
|
r.map(async (p) => {
|
|
1799
|
-
const h = await
|
|
1799
|
+
const h = await te({
|
|
1800
1800
|
projectId: p.projectId,
|
|
1801
1801
|
user: i,
|
|
1802
1802
|
client: i ? void 0 : t
|
|
@@ -2030,7 +2030,7 @@ function hn({ labels: e }) {
|
|
|
2030
2030
|
${r}`;
|
|
2031
2031
|
}
|
|
2032
2032
|
const mn = "[redacted]";
|
|
2033
|
-
function
|
|
2033
|
+
function ne(e, t, r, o = {}) {
|
|
2034
2034
|
if (r.length === 0)
|
|
2035
2035
|
return;
|
|
2036
2036
|
const n = r.slice(0, wr.MAX_FAILURES_LOGGED);
|
|
@@ -2040,7 +2040,7 @@ function oe(e, t, r, o = {}) {
|
|
|
2040
2040
|
sample: o.redactItems ? n.map((i) => ({ ...i, item: mn })) : n
|
|
2041
2041
|
});
|
|
2042
2042
|
}
|
|
2043
|
-
function
|
|
2043
|
+
function he(e = /* @__PURE__ */ new Date()) {
|
|
2044
2044
|
const t = e.getFullYear(), r = String(e.getMonth() + 1).padStart(2, "0"), o = String(e.getDate()).padStart(2, "0");
|
|
2045
2045
|
return `${t}-${r}-${o}`;
|
|
2046
2046
|
}
|
|
@@ -2204,9 +2204,9 @@ const vs = new kn(), wn = s.object({
|
|
|
2204
2204
|
}), vn = {
|
|
2205
2205
|
projects: s.array(wn).min(1).describe("The array of projects to add.")
|
|
2206
2206
|
}, In = {
|
|
2207
|
-
projects: s.array(
|
|
2207
|
+
projects: s.array(re).describe("The created projects."),
|
|
2208
2208
|
totalCount: s.number().describe("The total number of projects created."),
|
|
2209
|
-
failures: s.array(
|
|
2209
|
+
failures: s.array(oe).describe(
|
|
2210
2210
|
"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."
|
|
2211
2211
|
),
|
|
2212
2212
|
totalRequested: s.number().describe("The total number of projects requested."),
|
|
@@ -2223,13 +2223,13 @@ const vs = new kn(), wn = s.object({
|
|
|
2223
2223
|
if (!u)
|
|
2224
2224
|
return Promise.resolve(void 0);
|
|
2225
2225
|
let l = r.get(u);
|
|
2226
|
-
return l || (l =
|
|
2226
|
+
return l || (l = _(
|
|
2227
2227
|
() => vs.resolveWorkspace(t, u)
|
|
2228
2228
|
).then(({ workspaceId: p }) => p), r.set(u, l)), l;
|
|
2229
2229
|
}, n = await Promise.allSettled(
|
|
2230
2230
|
e.map(async ({ workspace: u, ...l }) => {
|
|
2231
2231
|
const p = await o(u);
|
|
2232
|
-
return await
|
|
2232
|
+
return await _(
|
|
2233
2233
|
() => t.addProject({ ...l, ...p ? { workspaceId: p } : {} })
|
|
2234
2234
|
);
|
|
2235
2235
|
})
|
|
@@ -2240,8 +2240,8 @@ const vs = new kn(), wn = s.object({
|
|
|
2240
2240
|
error: N(u.reason)
|
|
2241
2241
|
});
|
|
2242
2242
|
});
|
|
2243
|
-
const c = i.map(
|
|
2244
|
-
return
|
|
2243
|
+
const c = i.map(se);
|
|
2244
|
+
return ne(g.ADD_PROJECTS, e.length, a, { redactItems: !0 }), {
|
|
2245
2245
|
textContent: Cn({ projects: i, failures: a }),
|
|
2246
2246
|
structuredContent: {
|
|
2247
2247
|
projects: c,
|
|
@@ -2345,7 +2345,7 @@ const je = 25, Ee = s.enum(Qs), Is = s.object({
|
|
|
2345
2345
|
}
|
|
2346
2346
|
}), i = (await Promise.all(o)).map(ke);
|
|
2347
2347
|
return {
|
|
2348
|
-
textContent:
|
|
2348
|
+
textContent: _n(i),
|
|
2349
2349
|
structuredContent: {
|
|
2350
2350
|
reminders: i,
|
|
2351
2351
|
totalCount: i.length,
|
|
@@ -2354,7 +2354,7 @@ const je = 25, Ee = s.enum(Qs), Is = s.object({
|
|
|
2354
2354
|
};
|
|
2355
2355
|
}
|
|
2356
2356
|
};
|
|
2357
|
-
function
|
|
2357
|
+
function _n(e) {
|
|
2358
2358
|
const { timeBasedCount: t, locationCount: r } = ys(e), o = [];
|
|
2359
2359
|
if (t > 0) {
|
|
2360
2360
|
const n = t > 1 ? "reminders" : "reminder";
|
|
@@ -2366,18 +2366,18 @@ function Pn(e) {
|
|
|
2366
2366
|
}
|
|
2367
2367
|
return o.length > 0 ? `Added ${o.join(" and ")}` : "No reminders added";
|
|
2368
2368
|
}
|
|
2369
|
-
const
|
|
2369
|
+
const Pn = s.object({
|
|
2370
2370
|
name: s.string().min(1).describe("The name of the section."),
|
|
2371
2371
|
projectId: s.string().min(1).describe(
|
|
2372
2372
|
'The ID of the project to add the section to. Project ID should be an ID string, or the text "inbox", for inbox tasks.'
|
|
2373
2373
|
),
|
|
2374
2374
|
description: s.string().optional().describe("The description of the section. Supports Markdown.")
|
|
2375
2375
|
}), Un = {
|
|
2376
|
-
sections: s.array(
|
|
2376
|
+
sections: s.array(Pn).min(1).describe("The array of sections to add.")
|
|
2377
2377
|
}, Rn = {
|
|
2378
2378
|
sections: s.array(Y).describe("The created sections."),
|
|
2379
2379
|
totalCount: s.number().describe("The total number of sections created."),
|
|
2380
|
-
failures: s.array(
|
|
2380
|
+
failures: s.array(oe).describe(
|
|
2381
2381
|
"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."
|
|
2382
2382
|
),
|
|
2383
2383
|
totalRequested: s.number().describe("The total number of sections requested."),
|
|
@@ -2390,14 +2390,14 @@ const _n = s.object({
|
|
|
2390
2390
|
outputSchema: Rn,
|
|
2391
2391
|
annotations: { readOnlyHint: !1, destructiveHint: !1, idempotentHint: !1 },
|
|
2392
2392
|
async execute({ sections: e }, t) {
|
|
2393
|
-
const r = e.some((c) => B(c.projectId)) ?
|
|
2393
|
+
const r = e.some((c) => B(c.projectId)) ? _(() => t.getUser()) : void 0, o = await Promise.allSettled(
|
|
2394
2394
|
e.map(async (c) => {
|
|
2395
|
-
const d = B(c.projectId) ? await r : void 0, u = await
|
|
2395
|
+
const d = B(c.projectId) ? await r : void 0, u = await te({
|
|
2396
2396
|
projectId: c.projectId,
|
|
2397
2397
|
user: d,
|
|
2398
2398
|
client: void 0
|
|
2399
2399
|
}) ?? c.projectId;
|
|
2400
|
-
return
|
|
2400
|
+
return _(() => t.addSection({ ...c, projectId: u }));
|
|
2401
2401
|
})
|
|
2402
2402
|
), n = [], i = [];
|
|
2403
2403
|
return o.forEach((c, d) => {
|
|
@@ -2405,7 +2405,7 @@ const _n = s.object({
|
|
|
2405
2405
|
item: e[d]?.name ?? `Section ${d + 1}`,
|
|
2406
2406
|
error: N(c.reason)
|
|
2407
2407
|
});
|
|
2408
|
-
}),
|
|
2408
|
+
}), ne(g.ADD_SECTIONS, e.length, i, { redactItems: !0 }), {
|
|
2409
2409
|
textContent: Nn({ sections: n, failures: i }),
|
|
2410
2410
|
structuredContent: {
|
|
2411
2411
|
sections: n.map(G),
|
|
@@ -2427,7 +2427,7 @@ function Nn({
|
|
|
2427
2427
|
${o}` : "Added 0 sections";
|
|
2428
2428
|
return mt(n, t);
|
|
2429
2429
|
}
|
|
2430
|
-
const
|
|
2430
|
+
const ue = {
|
|
2431
2431
|
USER_NOT_FOUND: "USER_NOT_FOUND",
|
|
2432
2432
|
USER_NOT_COLLABORATOR: "USER_NOT_COLLABORATOR",
|
|
2433
2433
|
PROJECT_NOT_SHARED: "PROJECT_NOT_SHARED",
|
|
@@ -2448,7 +2448,7 @@ class Mn {
|
|
|
2448
2448
|
taskId: o,
|
|
2449
2449
|
projectId: n,
|
|
2450
2450
|
error: {
|
|
2451
|
-
type:
|
|
2451
|
+
type: ue.USER_NOT_FOUND,
|
|
2452
2452
|
message: `User "${i}" not found`,
|
|
2453
2453
|
suggestions: [
|
|
2454
2454
|
"Check the spelling of the user name or email",
|
|
@@ -2466,7 +2466,7 @@ class Mn {
|
|
|
2466
2466
|
projectId: n,
|
|
2467
2467
|
resolvedUser: a,
|
|
2468
2468
|
error: {
|
|
2469
|
-
type:
|
|
2469
|
+
type: ue.PROJECT_NOT_SHARED,
|
|
2470
2470
|
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.`,
|
|
2471
2471
|
suggestions: [
|
|
2472
2472
|
"Share the project with at least one collaborator to enable assignments",
|
|
@@ -2485,7 +2485,7 @@ class Mn {
|
|
|
2485
2485
|
projectId: n,
|
|
2486
2486
|
resolvedUser: a,
|
|
2487
2487
|
error: {
|
|
2488
|
-
type:
|
|
2488
|
+
type: ue.USER_NOT_COLLABORATOR,
|
|
2489
2489
|
message: `User "${a.displayName}" is not a collaborator on project "${c.name}"`,
|
|
2490
2490
|
suggestions: [
|
|
2491
2491
|
"Invite the user to collaborate on this project first",
|
|
@@ -2504,7 +2504,7 @@ class Mn {
|
|
|
2504
2504
|
projectId: n,
|
|
2505
2505
|
resolvedUser: a,
|
|
2506
2506
|
error: {
|
|
2507
|
-
type:
|
|
2507
|
+
type: ue.TASK_NOT_FOUND,
|
|
2508
2508
|
message: `Task "${o}" not found or not accessible`,
|
|
2509
2509
|
suggestions: [
|
|
2510
2510
|
"Verify the task ID is correct",
|
|
@@ -2527,7 +2527,7 @@ class Mn {
|
|
|
2527
2527
|
projectId: n,
|
|
2528
2528
|
resolvedUser: a,
|
|
2529
2529
|
error: {
|
|
2530
|
-
type:
|
|
2530
|
+
type: ue.PERMISSION_DENIED,
|
|
2531
2531
|
message: "Permission denied or API error occurred",
|
|
2532
2532
|
suggestions: [
|
|
2533
2533
|
"Check your API permissions",
|
|
@@ -2577,7 +2577,7 @@ class Mn {
|
|
|
2577
2577
|
isValid: !1,
|
|
2578
2578
|
taskId: r,
|
|
2579
2579
|
error: {
|
|
2580
|
-
type:
|
|
2580
|
+
type: ue.TASK_NOT_FOUND,
|
|
2581
2581
|
message: `Task "${r}" not found or not accessible`,
|
|
2582
2582
|
suggestions: [
|
|
2583
2583
|
"Verify the task ID is correct",
|
|
@@ -2675,23 +2675,23 @@ const ft = new Mn(), Ot = rs.TASKS_PER_OPERATION, Fn = s.object({
|
|
|
2675
2675
|
isUncompletable: s.boolean().optional().describe(
|
|
2676
2676
|
"Whether this task should be uncompletable (organizational header). Tasks with isUncompletable: true appear as organizational headers and cannot be completed."
|
|
2677
2677
|
)
|
|
2678
|
-
}),
|
|
2678
|
+
}), _t = {
|
|
2679
2679
|
tasks: s.array(Fn).min(1).max(Ot).describe(`The array of tasks to add (max ${Ot}).`)
|
|
2680
2680
|
}, Hn = {
|
|
2681
2681
|
tasks: s.array(K).describe("The created tasks."),
|
|
2682
2682
|
totalCount: s.number().describe("The total number of tasks created."),
|
|
2683
|
-
failures: s.array(
|
|
2683
|
+
failures: s.array(oe).describe("Failed task creations with error details."),
|
|
2684
2684
|
totalRequested: s.number().describe("The total number of tasks requested."),
|
|
2685
2685
|
successCount: s.number().describe("The number of successfully created tasks."),
|
|
2686
2686
|
failureCount: s.number().describe("The number of failed task creations.")
|
|
2687
2687
|
}, Wn = {
|
|
2688
2688
|
name: g.ADD_TASKS,
|
|
2689
2689
|
description: "Add one or more tasks to a project, section, or parent. Supports assignment to project collaborators.",
|
|
2690
|
-
parameters:
|
|
2690
|
+
parameters: _t,
|
|
2691
2691
|
outputSchema: Hn,
|
|
2692
2692
|
annotations: { readOnlyHint: !1, destructiveHint: !1, idempotentHint: !1 },
|
|
2693
2693
|
async execute(e, t) {
|
|
2694
|
-
const { tasks: r } = s.object(
|
|
2694
|
+
const { tasks: r } = s.object(_t).parse(e), o = /* @__PURE__ */ new Map();
|
|
2695
2695
|
r.forEach((h, m) => {
|
|
2696
2696
|
const y = Bn(h), f = o.get(y);
|
|
2697
2697
|
f ? f.push({ task: h, index: m }) : o.set(y, [{ task: h, index: m }]);
|
|
@@ -2725,8 +2725,8 @@ const ft = new Mn(), Ot = rs.TASKS_PER_OPERATION, Fn = s.object({
|
|
|
2725
2725
|
const h = d.map((y) => `"${y.item}": ${y.error}`).join("; "), m = `All ${d.length} task(s) failed to create: ${h}`;
|
|
2726
2726
|
throw u ? new ss(m) : new Error(m);
|
|
2727
2727
|
}
|
|
2728
|
-
const l = c.map(
|
|
2729
|
-
return
|
|
2728
|
+
const l = c.map(P);
|
|
2729
|
+
return ne(g.ADD_TASKS, r.length, d, { redactItems: !0 }), {
|
|
2730
2730
|
textContent: Kn({
|
|
2731
2731
|
tasks: l,
|
|
2732
2732
|
failures: d,
|
|
@@ -2900,7 +2900,7 @@ ${n}`,
|
|
|
2900
2900
|
ids: s.array(s.string().min(1)).min(1).describe("The IDs of the tasks to complete.")
|
|
2901
2901
|
}, Jn = {
|
|
2902
2902
|
completed: s.array(s.string()).describe("The IDs of successfully completed tasks."),
|
|
2903
|
-
failures: s.array(
|
|
2903
|
+
failures: s.array(oe).describe("Failed task completions with error details."),
|
|
2904
2904
|
totalRequested: s.number().describe("The total number of tasks requested to complete."),
|
|
2905
2905
|
successCount: s.number().describe("The number of successfully completed tasks."),
|
|
2906
2906
|
failureCount: s.number().describe("The number of failed task completions.")
|
|
@@ -2921,7 +2921,7 @@ ${n}`,
|
|
|
2921
2921
|
error: N(a)
|
|
2922
2922
|
});
|
|
2923
2923
|
}
|
|
2924
|
-
return
|
|
2924
|
+
return ne(g.COMPLETE_TASKS, e.ids.length, o), {
|
|
2925
2925
|
textContent: Qn({
|
|
2926
2926
|
completed: r,
|
|
2927
2927
|
failures: o,
|
|
@@ -3017,7 +3017,7 @@ const Cs = [
|
|
|
3017
3017
|
}
|
|
3018
3018
|
};
|
|
3019
3019
|
}
|
|
3020
|
-
},
|
|
3020
|
+
}, Pt = 5, js = ["file", "url"], si = {
|
|
3021
3021
|
projectId: s.string().min(1).describe("The ID of the project to export as a template."),
|
|
3022
3022
|
format: s.enum(js).default("file").describe(
|
|
3023
3023
|
'How to return the template. "file" returns the CSV content, which can be passed straight back to import-project-template. "url" returns a shareable download link instead, and is the better choice for large projects because it does not return the whole file.'
|
|
@@ -3062,8 +3062,8 @@ ${c}`,
|
|
|
3062
3062
|
}
|
|
3063
3063
|
};
|
|
3064
3064
|
function ni({ projectId: e, lines: t }) {
|
|
3065
|
-
const r = `Exported project (id=${e}) as a template file (${t.length} row${t.length === 1 ? "" : "s"}).`, o = t.slice(0,
|
|
3066
|
-
`), n = t.length -
|
|
3065
|
+
const r = `Exported project (id=${e}) as a template file (${t.length} row${t.length === 1 ? "" : "s"}).`, o = t.slice(0, Pt).join(`
|
|
3066
|
+
`), n = t.length - Pt;
|
|
3067
3067
|
return n > 0 ? `${r}
|
|
3068
3068
|
|
|
3069
3069
|
${o}
|
|
@@ -3080,7 +3080,7 @@ const ii = K.pick({
|
|
|
3080
3080
|
hasChildren: s.boolean().describe(
|
|
3081
3081
|
"Whether this subtask has subtasks of its own. Fetch it with includeChildren to expand."
|
|
3082
3082
|
)
|
|
3083
|
-
}), ai =
|
|
3083
|
+
}), ai = re.pick({ id: !0, name: !0 }).extend({
|
|
3084
3084
|
hasChildren: s.boolean().describe(
|
|
3085
3085
|
"Whether this sub-project has sub-projects of its own. Fetch it with includeChildren to expand."
|
|
3086
3086
|
)
|
|
@@ -3163,7 +3163,7 @@ const $s = ["task", "project", "comment", "section"], ui = {
|
|
|
3163
3163
|
}, pi = {
|
|
3164
3164
|
type: s.enum($s).describe("The type of object fetched."),
|
|
3165
3165
|
id: s.string().describe("The ID of the fetched object."),
|
|
3166
|
-
object: s.union([K,
|
|
3166
|
+
object: s.union([K, re, ve, Y]).describe("The fetched object data."),
|
|
3167
3167
|
...ci
|
|
3168
3168
|
}, hi = {
|
|
3169
3169
|
name: g.FETCH_OBJECT,
|
|
@@ -3179,7 +3179,7 @@ const $s = ["task", "project", "comment", "section"], ui = {
|
|
|
3179
3179
|
const [i, a] = await Promise.all([
|
|
3180
3180
|
t.getTask(o),
|
|
3181
3181
|
n ? Ut(() => di(t, o)) : Promise.resolve({})
|
|
3182
|
-
]), c =
|
|
3182
|
+
]), c = P(i);
|
|
3183
3183
|
return {
|
|
3184
3184
|
textContent: `Found task: ${c.content} • id=${c.id} • priority=${c.priority} • project=${c.projectId}${Rt("subtasks", a)}`,
|
|
3185
3185
|
structuredContent: {
|
|
@@ -3191,7 +3191,7 @@ const $s = ["task", "project", "comment", "section"], ui = {
|
|
|
3191
3191
|
};
|
|
3192
3192
|
}
|
|
3193
3193
|
case "project": {
|
|
3194
|
-
const i = await t.getProject(o), a =
|
|
3194
|
+
const i = await t.getProject(o), a = se(i), c = n ? await Ut(() => li(t, i)) : {};
|
|
3195
3195
|
return {
|
|
3196
3196
|
textContent: `Found project: ${a.name} • id=${a.id} • color=${a.color} • viewStyle=${a.viewStyle}${Rt("subProjects", c)}`,
|
|
3197
3197
|
structuredContent: {
|
|
@@ -3258,7 +3258,7 @@ const $s = ["task", "project", "comment", "section"], ui = {
|
|
|
3258
3258
|
);
|
|
3259
3259
|
let i;
|
|
3260
3260
|
if (o === "task") {
|
|
3261
|
-
const a = await t.getTask(n), c =
|
|
3261
|
+
const a = await t.getTask(n), c = P(a), d = [c.content];
|
|
3262
3262
|
c.description && d.push(`
|
|
3263
3263
|
|
|
3264
3264
|
Description: ${c.description}`), c.dueDate && d.push(`
|
|
@@ -3282,7 +3282,7 @@ Labels: ${c.labels.join(", ")}`), i = {
|
|
|
3282
3282
|
}
|
|
3283
3283
|
};
|
|
3284
3284
|
} else {
|
|
3285
|
-
const a = await t.getProject(n), c =
|
|
3285
|
+
const a = await t.getProject(n), c = se(a), d = [c.name];
|
|
3286
3286
|
c.description && d.push(`
|
|
3287
3287
|
|
|
3288
3288
|
Description: ${c.description}`), c.isShared && d.push(`
|
|
@@ -3470,7 +3470,7 @@ const Ci = {
|
|
|
3470
3470
|
throw new Error(
|
|
3471
3471
|
"Cannot provide multiple search parameters. Choose one of: taskId, projectId, or commentId."
|
|
3472
3472
|
);
|
|
3473
|
-
const n = await
|
|
3473
|
+
const n = await te({
|
|
3474
3474
|
projectId: e.projectId,
|
|
3475
3475
|
client: t
|
|
3476
3476
|
});
|
|
@@ -3573,7 +3573,7 @@ function gt(e = [], t = "or") {
|
|
|
3573
3573
|
return `(${e.map((i) => i.startsWith("@") ? i : `@${i}`).join(` ${r} `)})`;
|
|
3574
3574
|
}
|
|
3575
3575
|
const Oi = 7;
|
|
3576
|
-
function
|
|
3576
|
+
function _i({
|
|
3577
3577
|
since: e,
|
|
3578
3578
|
until: t,
|
|
3579
3579
|
userGmtOffset: r,
|
|
@@ -3585,7 +3585,7 @@ function Pi({
|
|
|
3585
3585
|
until: c
|
|
3586
3586
|
};
|
|
3587
3587
|
}
|
|
3588
|
-
const
|
|
3588
|
+
const Pi = {
|
|
3589
3589
|
getBy: s.enum(["completion", "due"]).default("completion").describe(
|
|
3590
3590
|
'The method to use to get the tasks: "completion" to get tasks by completion date (ie, when the task was actually completed), "due" to get tasks by due date (ie, when the task was due to be completed by).'
|
|
3591
3591
|
),
|
|
@@ -3618,7 +3618,7 @@ const _i = {
|
|
|
3618
3618
|
}, Ri = {
|
|
3619
3619
|
name: g.FIND_COMPLETED_TASKS,
|
|
3620
3620
|
description: 'Get completed tasks in a date range. For "what did I complete/get done" questions, use find-activity instead — it reports completion events, including every occurrence of a recurring task, which this tool does not. since/until are optional and default to a 7-day window when omitted. Includes all collaborators by default. Person-specific queries (summaries, plans, reports) require responsibleUser.',
|
|
3621
|
-
parameters:
|
|
3621
|
+
parameters: Pi,
|
|
3622
3622
|
outputSchema: Ui,
|
|
3623
3623
|
annotations: { readOnlyHint: !0, destructiveHint: !1, idempotentHint: !0 },
|
|
3624
3624
|
async execute(e, t) {
|
|
@@ -3639,11 +3639,11 @@ const _i = {
|
|
|
3639
3639
|
);
|
|
3640
3640
|
const h = await at(t, c), m = h?.email;
|
|
3641
3641
|
let f = gt(o, n);
|
|
3642
|
-
h && m && (f =
|
|
3643
|
-
const w = await t.getUser(), C = w.tzInfo?.gmtString || "+00:00", D = await
|
|
3642
|
+
h && m && (f = me(f, `assigned to: ${m}`));
|
|
3643
|
+
const w = await t.getUser(), C = w.tzInfo?.gmtString || "+00:00", D = await te({
|
|
3644
3644
|
projectId: d,
|
|
3645
3645
|
user: w
|
|
3646
|
-
}), T =
|
|
3646
|
+
}), T = _i({
|
|
3647
3647
|
since: i,
|
|
3648
3648
|
until: a,
|
|
3649
3649
|
userGmtOffset: C
|
|
@@ -3665,7 +3665,7 @@ const _i = {
|
|
|
3665
3665
|
since: k,
|
|
3666
3666
|
until: b,
|
|
3667
3667
|
...f ? { filterQuery: f, filterLang: "en" } : {}
|
|
3668
|
-
}), E = A.map(
|
|
3668
|
+
}), E = A.map(P);
|
|
3669
3669
|
return {
|
|
3670
3670
|
textContent: Li({
|
|
3671
3671
|
tasks: E,
|
|
@@ -3734,7 +3734,7 @@ const Ni = {
|
|
|
3734
3734
|
annotations: { readOnlyHint: !0, destructiveHint: !1, idempotentHint: !0 },
|
|
3735
3735
|
async execute(e, t) {
|
|
3736
3736
|
const [r, o] = await Promise.all([
|
|
3737
|
-
e.searchText ?
|
|
3737
|
+
e.searchText ? Po(t, e.searchText).then((c) => ({
|
|
3738
3738
|
results: c,
|
|
3739
3739
|
nextCursor: null
|
|
3740
3740
|
})) : t.getLabels({ limit: e.limit, cursor: e.cursor ?? null }),
|
|
@@ -3854,7 +3854,7 @@ const { FIND_PROJECTS: Ds, ADD_TASKS: xs, UPDATE_TASKS: Es } = g, Wi = {
|
|
|
3854
3854
|
};
|
|
3855
3855
|
const c = Os(a, o);
|
|
3856
3856
|
return {
|
|
3857
|
-
textContent:
|
|
3857
|
+
textContent: _s({
|
|
3858
3858
|
collaborators: c,
|
|
3859
3859
|
projectName: n,
|
|
3860
3860
|
searchTerm: o,
|
|
@@ -3898,7 +3898,7 @@ async function Ki({
|
|
|
3898
3898
|
};
|
|
3899
3899
|
const i = Os(n, e);
|
|
3900
3900
|
return {
|
|
3901
|
-
textContent:
|
|
3901
|
+
textContent: _s({
|
|
3902
3902
|
collaborators: i,
|
|
3903
3903
|
projectName: void 0,
|
|
3904
3904
|
searchTerm: e,
|
|
@@ -3932,7 +3932,7 @@ function Os(e, t) {
|
|
|
3932
3932
|
(o) => o.name.toLowerCase().includes(r) || o.email.toLowerCase().includes(r)
|
|
3933
3933
|
);
|
|
3934
3934
|
}
|
|
3935
|
-
function
|
|
3935
|
+
function _s({
|
|
3936
3936
|
collaborators: e,
|
|
3937
3937
|
projectName: t,
|
|
3938
3938
|
searchTerm: r,
|
|
@@ -3974,7 +3974,7 @@ const { ADD_PROJECTS: Mt } = g, Yi = {
|
|
|
3974
3974
|
"Which projects to return by archive status: 'active' (default, non-archived only), 'archived' (archived only), or 'all' (both active and archived). Each project includes an isArchived field. Archived projects can be deleted via the delete-object tool (type: 'project')."
|
|
3975
3975
|
)
|
|
3976
3976
|
}, Vi = {
|
|
3977
|
-
projects: s.array(
|
|
3977
|
+
projects: s.array(re).describe("The found projects."),
|
|
3978
3978
|
nextCursor: s.string().optional(),
|
|
3979
3979
|
totalCount: s.number().describe("The total number of projects in this page."),
|
|
3980
3980
|
hasMore: s.boolean(),
|
|
@@ -3992,7 +3992,7 @@ const { ADD_PROJECTS: Mt } = g, Yi = {
|
|
|
3992
3992
|
const c = Promise.resolve([]), [d, u] = await Promise.all([
|
|
3993
3993
|
o === "archived" ? c : r ? bs(t, r) : gs(t),
|
|
3994
3994
|
o === "active" ? c : Oo(t)
|
|
3995
|
-
]), l = r ?
|
|
3995
|
+
]), l = r ? _o(r) : null, p = l ? u.filter((h) => l.test(h.name)) : u;
|
|
3996
3996
|
n = [...d, ...p];
|
|
3997
3997
|
} else {
|
|
3998
3998
|
const c = o === "archived" ? await t.getArchivedProjects({
|
|
@@ -4001,7 +4001,7 @@ const { ADD_PROJECTS: Mt } = g, Yi = {
|
|
|
4001
4001
|
}) : await t.getProjects({ limit: e.limit, cursor: e.cursor ?? null });
|
|
4002
4002
|
n = c.results, i = c.nextCursor;
|
|
4003
4003
|
}
|
|
4004
|
-
const a = n.map(
|
|
4004
|
+
const a = n.map(se);
|
|
4005
4005
|
return {
|
|
4006
4006
|
textContent: Xi({ projects: a, args: e, nextCursor: i }),
|
|
4007
4007
|
structuredContent: {
|
|
@@ -4139,7 +4139,7 @@ const { ADD_SECTIONS: sa } = g, ra = {
|
|
|
4139
4139
|
outputSchema: oa,
|
|
4140
4140
|
annotations: { readOnlyHint: !0, destructiveHint: !1, idempotentHint: !0 },
|
|
4141
4141
|
async execute(e, t) {
|
|
4142
|
-
const r = await
|
|
4142
|
+
const r = await te({
|
|
4143
4143
|
projectId: e.projectId,
|
|
4144
4144
|
client: t
|
|
4145
4145
|
});
|
|
@@ -4178,7 +4178,7 @@ function ia({
|
|
|
4178
4178
|
zeroReasonHints: o
|
|
4179
4179
|
});
|
|
4180
4180
|
}
|
|
4181
|
-
function
|
|
4181
|
+
function Ps(e) {
|
|
4182
4182
|
return /* @__PURE__ */ new Date(`${e}T00:00:00`);
|
|
4183
4183
|
}
|
|
4184
4184
|
const aa = {
|
|
@@ -4226,23 +4226,23 @@ const aa = {
|
|
|
4226
4226
|
d = "overdue";
|
|
4227
4227
|
else if (e.startDate === "today")
|
|
4228
4228
|
if (e.daysCount > 1) {
|
|
4229
|
-
const y = /* @__PURE__ */ new Date(), f =
|
|
4229
|
+
const y = /* @__PURE__ */ new Date(), f = he(y), w = We(y, e.daysCount), C = yt(w, { representation: "date" }), D = `(due after: ${f} | due: ${f}) & due before: ${C}`;
|
|
4230
4230
|
d = e.overdueOption === "exclude-overdue" ? D : `(${D} | overdue)`;
|
|
4231
4231
|
} else
|
|
4232
4232
|
d = e.overdueOption === "exclude-overdue" ? "today" : "(today | overdue)";
|
|
4233
4233
|
else if (e.startDate) {
|
|
4234
|
-
const y = e.startDate, f = We(
|
|
4234
|
+
const y = e.startDate, f = We(Ps(y), e.daysCount), w = yt(f, { representation: "date" });
|
|
4235
4235
|
d = `(due after: ${y} | due: ${y}) & due before: ${w}`;
|
|
4236
4236
|
}
|
|
4237
4237
|
const u = gt(e.labels, e.labelsOperator);
|
|
4238
|
-
u.length > 0 && (d =
|
|
4238
|
+
u.length > 0 && (d = me(d, `(${u})`));
|
|
4239
4239
|
const l = Qe({
|
|
4240
4240
|
resolvedAssigneeId: n,
|
|
4241
4241
|
assigneeEmail: i,
|
|
4242
4242
|
currentUserId: c,
|
|
4243
4243
|
responsibleUserFiltering: e.responsibleUserFiltering
|
|
4244
4244
|
});
|
|
4245
|
-
d =
|
|
4245
|
+
d = me(d, l);
|
|
4246
4246
|
const { tasks: p, nextCursor: h } = await dt({
|
|
4247
4247
|
client: t,
|
|
4248
4248
|
query: d,
|
|
@@ -4276,7 +4276,7 @@ function la({
|
|
|
4276
4276
|
`today${c}${t.daysCount > 1 ? ` + ${t.daysCount - 1} more days` : ""}`
|
|
4277
4277
|
);
|
|
4278
4278
|
} else if (t.startDate) {
|
|
4279
|
-
const c = t.daysCount > 1 ? ` to ${
|
|
4279
|
+
const c = t.daysCount > 1 ? ` to ${he(We(Ps(t.startDate), t.daysCount))}` : "";
|
|
4280
4280
|
n.push(`${t.startDate}${c}`);
|
|
4281
4281
|
}
|
|
4282
4282
|
if (t.labels && t.labels.length > 0) {
|
|
@@ -4445,20 +4445,20 @@ const ha = new pa(), { FIND_COMPLETED_TASKS: Ft, ADD_TASKS: Ht } = g, ma = {
|
|
|
4445
4445
|
limit: d,
|
|
4446
4446
|
cursor: y ?? null
|
|
4447
4447
|
};
|
|
4448
|
-
o && (E.projectId = await
|
|
4449
|
-
const { results: Ie, nextCursor: J } = await t.getTasks(E),
|
|
4450
|
-
let M = r ?
|
|
4451
|
-
(
|
|
4452
|
-
) :
|
|
4448
|
+
o && (E.projectId = await te({ projectId: o, user: f })), n && (E.sectionId = n), i && (E.parentId = i);
|
|
4449
|
+
const { results: Ie, nextCursor: J } = await t.getTasks(E), ie = Ie.map(P);
|
|
4450
|
+
let M = r ? ie.filter(
|
|
4451
|
+
(ae) => ae.content.toLowerCase().includes(r.toLowerCase()) || ae.description?.toLowerCase().includes(r.toLowerCase())
|
|
4452
|
+
) : ie;
|
|
4453
4453
|
return M = Eo({
|
|
4454
4454
|
tasks: M,
|
|
4455
4455
|
resolvedAssigneeId: T,
|
|
4456
4456
|
currentUserId: f.id,
|
|
4457
4457
|
responsibleUserFiltering: c
|
|
4458
4458
|
}), l && l.length > 0 && (M = p === "and" ? M.filter(
|
|
4459
|
-
(
|
|
4459
|
+
(ae) => l.every((_e) => ae.labels.includes(_e))
|
|
4460
4460
|
) : M.filter(
|
|
4461
|
-
(
|
|
4461
|
+
(ae) => l.some((_e) => ae.labels.includes(_e))
|
|
4462
4462
|
)), {
|
|
4463
4463
|
textContent: Re({
|
|
4464
4464
|
tasks: M,
|
|
@@ -4487,35 +4487,35 @@ const ha = new pa(), { FIND_COMPLETED_TASKS: Ft, ADD_TASKS: Ht } = g, ma = {
|
|
|
4487
4487
|
lang: "en",
|
|
4488
4488
|
limit: d,
|
|
4489
4489
|
cursor: y ?? null
|
|
4490
|
-
}),
|
|
4490
|
+
}), ie = Ie.map(P);
|
|
4491
4491
|
return {
|
|
4492
4492
|
textContent: Re({
|
|
4493
|
-
tasks:
|
|
4493
|
+
tasks: ie,
|
|
4494
4494
|
args: e,
|
|
4495
4495
|
nextCursor: J,
|
|
4496
4496
|
isContainerSearch: !1,
|
|
4497
4497
|
assigneeEmail: I
|
|
4498
4498
|
}),
|
|
4499
4499
|
structuredContent: {
|
|
4500
|
-
tasks:
|
|
4500
|
+
tasks: ie,
|
|
4501
4501
|
nextCursor: J ?? void 0,
|
|
4502
|
-
totalCount:
|
|
4502
|
+
totalCount: ie.length,
|
|
4503
4503
|
hasMore: !!J,
|
|
4504
4504
|
appliedFilters: e
|
|
4505
4505
|
}
|
|
4506
4506
|
};
|
|
4507
4507
|
}
|
|
4508
4508
|
let $ = C ? `(${C})` : "";
|
|
4509
|
-
r && ($ =
|
|
4509
|
+
r && ($ = me($, `search: ${r}`));
|
|
4510
4510
|
const k = gt(l, p);
|
|
4511
|
-
if ($ =
|
|
4511
|
+
if ($ = me($, k), !(m && !a && !c)) {
|
|
4512
4512
|
const E = Qe({
|
|
4513
4513
|
resolvedAssigneeId: T,
|
|
4514
4514
|
assigneeEmail: I,
|
|
4515
4515
|
currentUserId: f.id,
|
|
4516
4516
|
responsibleUserFiltering: c
|
|
4517
4517
|
});
|
|
4518
|
-
$ =
|
|
4518
|
+
$ = me($, E);
|
|
4519
4519
|
}
|
|
4520
4520
|
const { tasks: S, nextCursor: A } = await dt({
|
|
4521
4521
|
client: t,
|
|
@@ -4607,7 +4607,7 @@ function Re({
|
|
|
4607
4607
|
}
|
|
4608
4608
|
const ya = {
|
|
4609
4609
|
projectId: s.string().min(1).optional().describe(
|
|
4610
|
-
|
|
4610
|
+
`Optional project ID. Use "inbox" for the Inbox. If provided, returns that project's tasks grouped by section. If omitted, returns the project and section structure for the whole account with no tasks.`
|
|
4611
4611
|
)
|
|
4612
4612
|
}, Us = s.lazy(
|
|
4613
4613
|
() => s.object({
|
|
@@ -4743,7 +4743,7 @@ async function va(e, t) {
|
|
|
4743
4743
|
limit: j.TASKS_BATCH_SIZE,
|
|
4744
4744
|
cursor: o ?? void 0
|
|
4745
4745
|
});
|
|
4746
|
-
r = r.concat(n.map(
|
|
4746
|
+
r = r.concat(n.map(P)), o = i ?? void 0;
|
|
4747
4747
|
} while (o);
|
|
4748
4748
|
return r;
|
|
4749
4749
|
}
|
|
@@ -4763,7 +4763,10 @@ async function Sa(e) {
|
|
|
4763
4763
|
c.push(...Rs(p, a));
|
|
4764
4764
|
else
|
|
4765
4765
|
c.push("_No projects found._");
|
|
4766
|
-
c.push("")
|
|
4766
|
+
c.push(""), c.push(
|
|
4767
|
+
`_Note: This overview lists projects and sections only; tasks are not included. Call ${g.GET_OVERVIEW} with a projectId (or "inbox") to see a project's tasks._`,
|
|
4768
|
+
""
|
|
4769
|
+
);
|
|
4767
4770
|
const d = n.some((p) => p.children.length > 0);
|
|
4768
4771
|
d && c.push(
|
|
4769
4772
|
"_Note: Indentation indicates that a project is a sub-project of the one above it. This allows for organizing projects hierarchically, with parent projects containing related sub-projects._",
|
|
@@ -4837,18 +4840,18 @@ async function Ca(e, t) {
|
|
|
4837
4840
|
}
|
|
4838
4841
|
const ja = {
|
|
4839
4842
|
name: g.GET_OVERVIEW,
|
|
4840
|
-
description:
|
|
4843
|
+
description: `Get a Markdown overview. Called without a projectId, returns the account's project and section structure only — no tasks — for navigation. Pass a projectId (or "inbox" for the Inbox) to get that project's tasks grouped by section.`,
|
|
4841
4844
|
parameters: ya,
|
|
4842
4845
|
outputSchema: Ta,
|
|
4843
4846
|
annotations: { readOnlyHint: !0, destructiveHint: !1, idempotentHint: !0 },
|
|
4844
4847
|
async execute(e, t) {
|
|
4845
|
-
const r = e.projectId ? await Ca(t,
|
|
4848
|
+
const r = await te({ projectId: e.projectId, client: t }), o = r ? await Ca(t, r) : await Sa(t);
|
|
4846
4849
|
return {
|
|
4847
|
-
textContent:
|
|
4848
|
-
structuredContent:
|
|
4850
|
+
textContent: o.textContent,
|
|
4851
|
+
structuredContent: o.structuredContent
|
|
4849
4852
|
};
|
|
4850
4853
|
}
|
|
4851
|
-
}, $a = {},
|
|
4854
|
+
}, $a = {}, pe = s.object({
|
|
4852
4855
|
count: s.number().describe("Number of consecutive periods in this streak."),
|
|
4853
4856
|
start: s.string().describe("Start date of the streak."),
|
|
4854
4857
|
end: s.string().describe("End date of the streak.")
|
|
@@ -4875,12 +4878,12 @@ const ja = {
|
|
|
4875
4878
|
goals: s.object({
|
|
4876
4879
|
dailyGoal: s.number().describe("Daily task completion goal."),
|
|
4877
4880
|
weeklyGoal: s.number().describe("Weekly task completion goal."),
|
|
4878
|
-
currentDailyStreak:
|
|
4879
|
-
currentWeeklyStreak:
|
|
4880
|
-
lastDailyStreak:
|
|
4881
|
-
lastWeeklyStreak:
|
|
4882
|
-
maxDailyStreak:
|
|
4883
|
-
maxWeeklyStreak:
|
|
4881
|
+
currentDailyStreak: pe.describe("Current daily goal streak."),
|
|
4882
|
+
currentWeeklyStreak: pe.describe("Current weekly goal streak."),
|
|
4883
|
+
lastDailyStreak: pe.describe("Previous daily goal streak."),
|
|
4884
|
+
lastWeeklyStreak: pe.describe("Previous weekly goal streak."),
|
|
4885
|
+
maxDailyStreak: pe.describe("Best daily goal streak ever."),
|
|
4886
|
+
maxWeeklyStreak: pe.describe("Best weekly goal streak ever."),
|
|
4884
4887
|
vacationMode: s.boolean().describe("Whether vacation mode is enabled."),
|
|
4885
4888
|
karmaDisabled: s.boolean().describe("Whether karma tracking is disabled.")
|
|
4886
4889
|
}).describe("Goal and streak information."),
|
|
@@ -4994,7 +4997,7 @@ const Ea = {
|
|
|
4994
4997
|
})
|
|
4995
4998
|
).optional().describe("Weekly completion rollups. Only included when includeWeeklyCounts is true.")
|
|
4996
4999
|
};
|
|
4997
|
-
function
|
|
5000
|
+
function _a(e, t) {
|
|
4998
5001
|
const r = [`# Activity Stats: Project ${e}`, ""];
|
|
4999
5002
|
if (t.dayItems.length > 0) {
|
|
5000
5003
|
r.push("## Daily Activity");
|
|
@@ -5010,7 +5013,7 @@ function Pa(e, t) {
|
|
|
5010
5013
|
return r.join(`
|
|
5011
5014
|
`);
|
|
5012
5015
|
}
|
|
5013
|
-
const
|
|
5016
|
+
const Pa = {
|
|
5014
5017
|
name: g.GET_PROJECT_ACTIVITY_STATS,
|
|
5015
5018
|
description: "Get daily and optional weekly task completion counts for a project over a configurable time window (1-12 weeks). Useful for identifying completion trends and patterns.",
|
|
5016
5019
|
parameters: Ea,
|
|
@@ -5026,7 +5029,7 @@ const _a = {
|
|
|
5026
5029
|
includeWeeklyCounts: n
|
|
5027
5030
|
});
|
|
5028
5031
|
return {
|
|
5029
|
-
textContent:
|
|
5032
|
+
textContent: _a(r, i),
|
|
5030
5033
|
structuredContent: {
|
|
5031
5034
|
projectId: r,
|
|
5032
5035
|
dayItems: i.dayItems,
|
|
@@ -5282,7 +5285,7 @@ const Ya = {
|
|
|
5282
5285
|
projectId: e,
|
|
5283
5286
|
file: r ?? "",
|
|
5284
5287
|
fileName: "template.csv"
|
|
5285
|
-
}), a = i.sections.map(G), c = i.tasks.map(
|
|
5288
|
+
}), a = i.sections.map(G), c = i.tasks.map(P), d = i.comments.map(we), u = i.projects.length + a.length + c.length + d.length;
|
|
5286
5289
|
return {
|
|
5287
5290
|
textContent: Ja({
|
|
5288
5291
|
projectId: e,
|
|
@@ -5636,7 +5639,7 @@ const cc = {
|
|
|
5636
5639
|
action: s.enum(["archive", "unarchive"]).describe("The action to perform on the project."),
|
|
5637
5640
|
projectId: s.string().min(1).describe("The ID of the project.")
|
|
5638
5641
|
}, dc = {
|
|
5639
|
-
project:
|
|
5642
|
+
project: re.describe("The updated project."),
|
|
5640
5643
|
success: s.boolean().describe("Whether the action was successful.")
|
|
5641
5644
|
}, lc = {
|
|
5642
5645
|
name: g.PROJECT_MANAGEMENT,
|
|
@@ -5645,7 +5648,7 @@ const cc = {
|
|
|
5645
5648
|
outputSchema: dc,
|
|
5646
5649
|
annotations: { readOnlyHint: !1, destructiveHint: !1, idempotentHint: !0 },
|
|
5647
5650
|
async execute(e, t) {
|
|
5648
|
-
const r = e.action === "archive" ? await t.archiveProject(e.projectId) : await t.unarchiveProject(e.projectId), o =
|
|
5651
|
+
const r = e.action === "archive" ? await t.archiveProject(e.projectId) : await t.unarchiveProject(e.projectId), o = se(r);
|
|
5649
5652
|
return {
|
|
5650
5653
|
textContent: `${e.action === "archive" ? "Archived" : "Unarchived"} project: ${o.name} (id=${o.id})`,
|
|
5651
5654
|
structuredContent: {
|
|
@@ -5663,7 +5666,7 @@ const cc = {
|
|
|
5663
5666
|
"Optional access visibility for the project in the workspace (restricted, team, or public)."
|
|
5664
5667
|
)
|
|
5665
5668
|
}, pc = {
|
|
5666
|
-
project:
|
|
5669
|
+
project: re.describe("The moved project."),
|
|
5667
5670
|
success: s.boolean().describe("Whether the move was successful.")
|
|
5668
5671
|
}, hc = {
|
|
5669
5672
|
name: g.PROJECT_MOVE,
|
|
@@ -5683,7 +5686,7 @@ const cc = {
|
|
|
5683
5686
|
e.folderId && (i.folderId = e.folderId), e.visibility && (i.access = { visibility: e.visibility }), r = await t.moveProjectToWorkspace(i);
|
|
5684
5687
|
} else
|
|
5685
5688
|
r = await t.moveProjectToPersonal({ projectId: e.projectId });
|
|
5686
|
-
const o =
|
|
5689
|
+
const o = se(r);
|
|
5687
5690
|
return {
|
|
5688
5691
|
textContent: `${e.action === "move-to-workspace" ? "Moved to workspace" : "Moved to personal"}: ${o.name} (id=${o.id})`,
|
|
5689
5692
|
structuredContent: {
|
|
@@ -5827,7 +5830,7 @@ const cc = {
|
|
|
5827
5830
|
const u = d instanceof Error ? d.message : String(d);
|
|
5828
5831
|
throw new Error(`Reschedule failed: ${u}`);
|
|
5829
5832
|
}
|
|
5830
|
-
const i = await Promise.all(r.map((d) => t.getTask(d.id))), a = i.map(
|
|
5833
|
+
const i = await Promise.all(r.map((d) => t.getTask(d.id))), a = i.map(P);
|
|
5831
5834
|
return {
|
|
5832
5835
|
textContent: pt("Rescheduled", a, {
|
|
5833
5836
|
showDetails: a.length <= 5
|
|
@@ -5895,7 +5898,7 @@ const vc = {
|
|
|
5895
5898
|
ids: s.array(s.string().min(1)).min(1).describe("The IDs of the tasks to uncomplete.")
|
|
5896
5899
|
}, jc = {
|
|
5897
5900
|
uncompleted: s.array(s.string()).describe("The IDs of successfully uncompleted tasks."),
|
|
5898
|
-
failures: s.array(
|
|
5901
|
+
failures: s.array(oe).describe("Failed task uncompletion with error details."),
|
|
5899
5902
|
totalRequested: s.number().describe("The total number of tasks requested to uncomplete."),
|
|
5900
5903
|
successCount: s.number().describe("The number of successfully uncompleted tasks."),
|
|
5901
5904
|
failureCount: s.number().describe("The number of failed task uncompletions.")
|
|
@@ -5916,7 +5919,7 @@ const vc = {
|
|
|
5916
5919
|
error: N(a)
|
|
5917
5920
|
});
|
|
5918
5921
|
}
|
|
5919
|
-
return
|
|
5922
|
+
return ne(g.UNCOMPLETE_TASKS, e.ids.length, o), {
|
|
5920
5923
|
textContent: Ac({
|
|
5921
5924
|
uncompleted: r,
|
|
5922
5925
|
failures: o,
|
|
@@ -5967,7 +5970,7 @@ const Dc = s.object({
|
|
|
5967
5970
|
async execute(e, t) {
|
|
5968
5971
|
const { comments: r } = e, o = r.map(async (c) => await t.updateComment(c.id, { content: c.content })), i = (await Promise.all(o)).map(we);
|
|
5969
5972
|
return {
|
|
5970
|
-
textContent:
|
|
5973
|
+
textContent: _c({
|
|
5971
5974
|
comments: i
|
|
5972
5975
|
}),
|
|
5973
5976
|
structuredContent: {
|
|
@@ -5981,7 +5984,7 @@ const Dc = s.object({
|
|
|
5981
5984
|
};
|
|
5982
5985
|
}
|
|
5983
5986
|
};
|
|
5984
|
-
function
|
|
5987
|
+
function _c({ comments: e }) {
|
|
5985
5988
|
const t = e.filter((i) => i.taskId).length, r = e.filter((i) => i.projectId).length, o = [];
|
|
5986
5989
|
if (t > 0) {
|
|
5987
5990
|
const i = t > 1 ? "comments" : "comment";
|
|
@@ -5993,7 +5996,7 @@ function Pc({ comments: e }) {
|
|
|
5993
5996
|
}
|
|
5994
5997
|
return o.length > 0 ? `Updated ${o.join(" and ")}` : "No comments updated";
|
|
5995
5998
|
}
|
|
5996
|
-
const
|
|
5999
|
+
const Pc = s.object({
|
|
5997
6000
|
id: s.string().min(1).describe("The ID of the filter to update."),
|
|
5998
6001
|
name: s.string().min(1).optional().describe("The new name of the filter."),
|
|
5999
6002
|
query: s.string().min(1).optional().describe(
|
|
@@ -6009,7 +6012,7 @@ const _c = s.object({
|
|
|
6009
6012
|
color: fe,
|
|
6010
6013
|
isFavorite: s.boolean().optional().describe("Whether to mark the filter as a favorite.")
|
|
6011
6014
|
}), Uc = {
|
|
6012
|
-
filters: s.array(
|
|
6015
|
+
filters: s.array(Pc).min(1).describe("The filters to update.")
|
|
6013
6016
|
}, Rc = {
|
|
6014
6017
|
filters: s.array(ut).describe("The updated filters."),
|
|
6015
6018
|
totalCount: s.number().describe("The total number of filters updated."),
|
|
@@ -6216,10 +6219,10 @@ const Vc = s.object({
|
|
|
6216
6219
|
}), Jc = {
|
|
6217
6220
|
projects: s.array(Vc).min(1).describe("The projects to update.")
|
|
6218
6221
|
}, Xc = {
|
|
6219
|
-
projects: s.array(
|
|
6222
|
+
projects: s.array(re).describe("The updated projects."),
|
|
6220
6223
|
totalCount: s.number().describe("The total number of projects updated."),
|
|
6221
6224
|
updatedProjectIds: s.array(s.string()).describe("The IDs of the updated projects."),
|
|
6222
|
-
failures: s.array(
|
|
6225
|
+
failures: s.array(oe).describe(
|
|
6223
6226
|
"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."
|
|
6224
6227
|
),
|
|
6225
6228
|
appliedOperations: s.object({
|
|
@@ -6239,7 +6242,7 @@ const Vc = s.object({
|
|
|
6239
6242
|
const l = ed(u);
|
|
6240
6243
|
if (l !== null) return { kind: "skipped", reason: l };
|
|
6241
6244
|
const { id: p, ...h } = u;
|
|
6242
|
-
return { kind: "updated", project: await
|
|
6245
|
+
return { kind: "updated", project: await _(() => t.updateProject(p, h)) };
|
|
6243
6246
|
})
|
|
6244
6247
|
), n = [], i = [];
|
|
6245
6248
|
let a = 0, c = 0;
|
|
@@ -6251,9 +6254,9 @@ const Vc = s.object({
|
|
|
6251
6254
|
});
|
|
6252
6255
|
continue;
|
|
6253
6256
|
}
|
|
6254
|
-
l.value.kind === "updated" ? n.push(
|
|
6257
|
+
l.value.kind === "updated" ? n.push(se(l.value.project)) : l.value.reason === "no-fields" ? a++ : c++;
|
|
6255
6258
|
}
|
|
6256
|
-
return
|
|
6259
|
+
return ne(g.UPDATE_PROJECTS, r.length, i), {
|
|
6257
6260
|
textContent: Zc({
|
|
6258
6261
|
projects: n,
|
|
6259
6262
|
skippedNoFields: a,
|
|
@@ -6503,7 +6506,7 @@ const gd = s.object({
|
|
|
6503
6506
|
tasks: s.array(K).describe("The updated tasks."),
|
|
6504
6507
|
totalCount: s.number().describe("The total number of tasks updated."),
|
|
6505
6508
|
updatedTaskIds: s.array(s.string()).describe("The IDs of the updated tasks."),
|
|
6506
|
-
failures: s.array(
|
|
6509
|
+
failures: s.array(oe).describe(
|
|
6507
6510
|
"Tasks that could not be updated, with the reason for each. A failure here does not affect the other tasks in the batch."
|
|
6508
6511
|
),
|
|
6509
6512
|
appliedOperations: s.object({
|
|
@@ -6601,8 +6604,8 @@ const gd = s.object({
|
|
|
6601
6604
|
const b = h.get(k.index);
|
|
6602
6605
|
b && "task" in b && (o[k.index] = { kind: "updated", task: b.task });
|
|
6603
6606
|
}
|
|
6604
|
-
const { updatedTasks: w, failures: C, skippedCount: D } = Sd({ tasks: r, outcomes: o }), T = u.filter((k) => k.redundantMoveSkipped).length, I = w.map(
|
|
6605
|
-
return
|
|
6607
|
+
const { updatedTasks: w, failures: C, skippedCount: D } = Sd({ tasks: r, outcomes: o }), T = u.filter((k) => k.redundantMoveSkipped).length, I = w.map(P);
|
|
6608
|
+
return ne(g.UPDATE_TASKS, r.length, C), {
|
|
6606
6609
|
textContent: Ed({
|
|
6607
6610
|
tasks: I,
|
|
6608
6611
|
failures: C,
|
|
@@ -6645,7 +6648,7 @@ async function Cd(e, t) {
|
|
|
6645
6648
|
if (!e.some((r) => B(r.projectId)))
|
|
6646
6649
|
return {};
|
|
6647
6650
|
try {
|
|
6648
|
-
return { projectId: (await
|
|
6651
|
+
return { projectId: (await _(() => t.getUser())).inboxProjectId };
|
|
6649
6652
|
} catch (r) {
|
|
6650
6653
|
return { error: r };
|
|
6651
6654
|
}
|
|
@@ -6661,7 +6664,7 @@ async function Hs({
|
|
|
6661
6664
|
const o = new Set(t), n = {
|
|
6662
6665
|
ids: t.join(","),
|
|
6663
6666
|
limit: et
|
|
6664
|
-
}, { results: i } = await
|
|
6667
|
+
}, { results: i } = await _(() => e.getTasks(n));
|
|
6665
6668
|
for (const a of i)
|
|
6666
6669
|
o.has(a.id) && r.set(a.id, a);
|
|
6667
6670
|
} catch {
|
|
@@ -6681,19 +6684,19 @@ async function jd({
|
|
|
6681
6684
|
const d = md(c.move), u = n.get(d);
|
|
6682
6685
|
u ? u.push(c) : n.set(d, [c]);
|
|
6683
6686
|
}
|
|
6684
|
-
const i =
|
|
6687
|
+
const i = _r(e), a = [];
|
|
6685
6688
|
for (const c of n.values()) {
|
|
6686
6689
|
const d = [...new Set(c.map(({ item: p }) => p.id))], u = c[0]?.move, l = c.length === 1 ? c[0] : void 0;
|
|
6687
6690
|
try {
|
|
6688
6691
|
if (l) {
|
|
6689
6692
|
const f = await i(
|
|
6690
|
-
() =>
|
|
6693
|
+
() => _(() => e.moveTask(l.item.id, u))
|
|
6691
6694
|
);
|
|
6692
6695
|
r.set(l.item.index, { task: f }), o(c);
|
|
6693
6696
|
continue;
|
|
6694
6697
|
}
|
|
6695
6698
|
const p = await i(
|
|
6696
|
-
() =>
|
|
6699
|
+
() => _(() => e.moveTasks(d, u))
|
|
6697
6700
|
), h = new Map(p.map((f) => [f.id, f])), m = [], y = [];
|
|
6698
6701
|
for (const f of c) {
|
|
6699
6702
|
const w = h.get(f.item.id);
|
|
@@ -6738,12 +6741,12 @@ async function Ad({
|
|
|
6738
6741
|
onUpdated: r,
|
|
6739
6742
|
onFailed: o
|
|
6740
6743
|
}) {
|
|
6741
|
-
const n =
|
|
6744
|
+
const n = Pr(e);
|
|
6742
6745
|
await Promise.all(
|
|
6743
6746
|
t.filter((i) => Fs(i.updateArgs)).map(async (i) => {
|
|
6744
6747
|
try {
|
|
6745
6748
|
const a = await n(
|
|
6746
|
-
() =>
|
|
6749
|
+
() => _(() => e.updateTask(i.id, i.updateArgs))
|
|
6747
6750
|
);
|
|
6748
6751
|
r(i, a);
|
|
6749
6752
|
} catch (a) {
|
|
@@ -6859,7 +6862,7 @@ function qt(e, t, r) {
|
|
|
6859
6862
|
const o = e.trim().toLowerCase();
|
|
6860
6863
|
return t.includes(o) ? r : e;
|
|
6861
6864
|
}
|
|
6862
|
-
const
|
|
6865
|
+
const _d = {}, Pd = {
|
|
6863
6866
|
type: s.literal("user_info").describe("The type of the response."),
|
|
6864
6867
|
userId: s.string().describe("The user ID."),
|
|
6865
6868
|
fullName: s.string().describe("The full name of the user."),
|
|
@@ -6930,8 +6933,8 @@ async function Wd(e) {
|
|
|
6930
6933
|
"## Week Settings",
|
|
6931
6934
|
`**Week Start Day:** ${c} (${a})`,
|
|
6932
6935
|
`**Current Week:** Week ${h}`,
|
|
6933
|
-
`**Week Start Date:** ${
|
|
6934
|
-
`**Week End Date:** ${
|
|
6936
|
+
`**Week Start Date:** ${he(l)}`,
|
|
6937
|
+
`**Week End Date:** ${he(p)}`,
|
|
6935
6938
|
"",
|
|
6936
6939
|
"## Daily Progress",
|
|
6937
6940
|
`**Completed Today:** ${t.completedToday}`,
|
|
@@ -6949,8 +6952,8 @@ async function Wd(e) {
|
|
|
6949
6952
|
currentLocalTime: i,
|
|
6950
6953
|
startDay: a,
|
|
6951
6954
|
startDayName: c,
|
|
6952
|
-
weekStartDate:
|
|
6953
|
-
weekEndDate:
|
|
6955
|
+
weekStartDate: he(l),
|
|
6956
|
+
weekEndDate: he(p),
|
|
6954
6957
|
currentWeekNumber: h,
|
|
6955
6958
|
completedToday: t.completedToday,
|
|
6956
6959
|
dailyGoal: t.dailyGoal,
|
|
@@ -6963,8 +6966,8 @@ async function Wd(e) {
|
|
|
6963
6966
|
const Bd = {
|
|
6964
6967
|
name: g.USER_INFO,
|
|
6965
6968
|
description: "Get comprehensive user information including user ID, full name, email, timezone with current local time, week start day preferences, current week dates, daily/weekly goal progress, and user plan (Free/Pro/Business).",
|
|
6966
|
-
parameters:
|
|
6967
|
-
outputSchema:
|
|
6969
|
+
parameters: _d,
|
|
6970
|
+
outputSchema: Pd,
|
|
6968
6971
|
annotations: { readOnlyHint: !0, destructiveHint: !1, idempotentHint: !0 },
|
|
6969
6972
|
async execute(e, t) {
|
|
6970
6973
|
const r = await Wd(t);
|
|
@@ -7120,7 +7123,7 @@ const Xd = {
|
|
|
7120
7123
|
getProductivityStats: Da,
|
|
7121
7124
|
// Health and insights tools
|
|
7122
7125
|
getProjectHealth: Fa,
|
|
7123
|
-
getProjectActivityStats:
|
|
7126
|
+
getProjectActivityStats: Pa,
|
|
7124
7127
|
analyzeProjectHealth: Gn,
|
|
7125
7128
|
getWorkspaceInsights: za,
|
|
7126
7129
|
// General tools
|
|
@@ -7230,7 +7233,7 @@ export {
|
|
|
7230
7233
|
eo as $,
|
|
7231
7234
|
ja as A,
|
|
7232
7235
|
Da as B,
|
|
7233
|
-
|
|
7236
|
+
Pa as C,
|
|
7234
7237
|
Fa as D,
|
|
7235
7238
|
za as E,
|
|
7236
7239
|
fl as F,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-overview.d.ts","sourceRoot":"","sources":["../../src/tools/get-overview.ts"],"names":[],"mappings":"AAAA,OAAO,EAIH,KAAK,UAAU,EAClB,MAAM,oBAAoB,CAAA;AAC3B,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAEvB,OAAO,EAAE,OAAO,
|
|
1
|
+
{"version":3,"file":"get-overview.d.ts","sourceRoot":"","sources":["../../src/tools/get-overview.ts"],"names":[],"mappings":"AAAA,OAAO,EAIH,KAAK,UAAU,EAClB,MAAM,oBAAoB,CAAA;AAC3B,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAEvB,OAAO,EAAE,OAAO,EAAuC,MAAM,oBAAoB,CAAA;AAEjF,OAAO,EAAiB,KAAK,cAAc,EAAoB,MAAM,4BAA4B,CAAA;AA4NjG,KAAK,gBAAgB,GAAG;IACpB,EAAE,EAAE,MAAM,CAAA;IACV,IAAI,EAAE,MAAM,CAAA;IACZ,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,UAAU,EAAE,MAAM,CAAA;IAClB,QAAQ,EAAE,cAAc,EAAE,CAAA;IAC1B,QAAQ,EAAE,gBAAgB,EAAE,CAAA;CAC/B,CAAA;AAED,KAAK,yBAAyB,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG;IACvD,IAAI,EAAE,kBAAkB,CAAA;IACxB,KAAK,CAAC,EAAE;QACJ,EAAE,EAAE,MAAM,CAAA;QACV,IAAI,EAAE,MAAM,CAAA;QACZ,QAAQ,EAAE,cAAc,EAAE,CAAA;KAC7B,CAAA;IACD,QAAQ,EAAE,gBAAgB,EAAE,CAAA;IAC5B,aAAa,EAAE,MAAM,CAAA;IACrB,aAAa,EAAE,MAAM,CAAA;IACrB,iBAAiB,EAAE,OAAO,CAAA;CAC7B,CAAA;AAED,KAAK,yBAAyB,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG;IACvD,IAAI,EAAE,kBAAkB,CAAA;IACxB,OAAO,EAAE;QACL,EAAE,EAAE,MAAM,CAAA;QACV,IAAI,EAAE,MAAM,CAAA;KACf,CAAA;IACD,QAAQ,EAAE,cAAc,EAAE,CAAA;IAC1B,KAAK,EAAE,KAAK,CAAC,UAAU,CAAC,OAAO,OAAO,CAAC,GAAG;QAAE,QAAQ,EAAE,KAAK,EAAE,CAAA;KAAE,CAAC,CAAA;IAChE,KAAK,EAAE;QACH,UAAU,EAAE,MAAM,CAAA;QAClB,aAAa,EAAE,MAAM,CAAA;QACrB,mBAAmB,EAAE,MAAM,CAAA;KAC9B,CAAA;CACJ,CAAA;AAuKD,QAAA,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;gBAzZT,MAAM;kBACJ,MAAM;uBACD,MAAM;uBACN,MAAM;wBACL,MAAM;sBACR,cAAc,EAAE;sBAChB,OAAO,EAAE;;gBANf,MAAM;kBACJ,MAAM;uBACD,MAAM;uBACN,MAAM;wBACL,MAAM;sBACR,cAAc,EAAE;sBAChB,OAAO,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAqawC,CAAA;AAE/D,OAAO,EAAE,KAAK,yBAAyB,EAAE,WAAW,EAAE,KAAK,yBAAyB,EAAE,CAAA"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@doist/todoist-mcp",
|
|
3
|
-
"version": "13.2.
|
|
3
|
+
"version": "13.2.5",
|
|
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.2.0",
|
|
69
69
|
"@modelcontextprotocol/ext-apps": "1.2.2",
|
|
70
70
|
"date-fns": "4.1.0",
|
|
71
71
|
"dompurify": "3.3.3",
|
|
@@ -89,7 +89,7 @@
|
|
|
89
89
|
"@types/morgan": "1.9.10",
|
|
90
90
|
"@types/node": "22.20.1",
|
|
91
91
|
"@types/react": "19.2.18",
|
|
92
|
-
"@types/react-dom": "19.2.
|
|
92
|
+
"@types/react-dom": "19.2.7",
|
|
93
93
|
"@vitejs/plugin-react": "5.2.0",
|
|
94
94
|
"concurrently": "9.2.4",
|
|
95
95
|
"conventional-changelog-conventionalcommits": "9.3.1",
|