@doist/todoist-ai 7.8.1 → 7.10.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/filter-helpers.d.ts.map +1 -1
- package/dist/index.js +2 -2
- package/dist/main-http.js +24 -95
- package/dist/main.js +1 -1
- package/dist/{mcp-server-DJK_AbsH.js → mcp-server-DxuxnYdP.js} +416 -347
- package/dist/mcp-server.d.ts.map +1 -1
- package/dist/tools/find-tasks.d.ts.map +1 -1
- package/dist/tools/get-overview.d.ts.map +1 -1
- package/dist/tools/project-management.d.ts +53 -0
- package/dist/tools/project-management.d.ts.map +1 -0
- package/dist/tools/project-move.d.ts +63 -0
- package/dist/tools/project-move.d.ts.map +1 -0
- package/dist/utils/tool-names.d.ts +2 -0
- package/dist/utils/tool-names.d.ts.map +1 -1
- package/package.json +5 -5
- package/scripts/run-tool.ts +4 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"filter-helpers.d.ts","sourceRoot":"","sources":["../src/filter-helpers.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,+BAA+B,CAAA;AAG/D,eAAO,MAAM,0BAA0B,gDAAiD,CAAA;AACxF,MAAM,MAAM,wBAAwB,GAAG,CAAC,OAAO,0BAA0B,CAAC,CAAC,MAAM,CAAC,CAAA;AAElF;;;;;;GAMG;AACH,wBAAsB,sBAAsB,CACxC,MAAM,EAAE,UAAU,EAClB,eAAe,EAAE,MAAM,GAAG,SAAS,GACpC,OAAO,CAAC;IAAE,MAAM,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,GAAG,SAAS,CAAC,CAaxD;AAED;;;;;GAKG;AACH,wBAAgB,aAAa,CAAC,KAAK,EAAE,MAAM,EAAE,eAAe,EAAE,MAAM,GAAG,MAAM,CAQ5E;AAED;;;;;;GAMG;AACH,wBAAgB,+BAA+B,CAAC,EAC5C,kBAAkB,EAClB,aAAa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,SAAS,CAAA;IACtC,aAAa,EAAE,MAAM,GAAG,SAAS,CAAA;IACjC,wBAAwB,CAAC,EAAE,wBAAwB,CAAA;CACtD,GAAG,MAAM,CAmBT;AAED;;;;;;;;GAQG;AACH,wBAAgB,4BAA4B,CAAC,CAAC,SAAS;IAAE,cAAc,CAAC,EAAE,MAAM,CAAA;CAAE,EAAE,EAChF,KAAK,EACL,kBAAkB,EAClB,aAAa,EACb,wBAA2C,GAC9C,EAAE;IACC,KAAK,EAAE,CAAC,EAAE,CAAA;IACV,kBAAkB,EAAE,MAAM,GAAG,SAAS,CAAA;IACtC,aAAa,EAAE,MAAM,CAAA;IACrB,wBAAwB,CAAC,EAAE,wBAAwB,CAAA;CACtD,GAAG,CAAC,EAAE,CAWN"}
|
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { f as s, s as a, l as e, m as t, a as o, u as d, d as n, b as i, c as r, e as c, h as m, i as f, j as p, k, n as l, o as T, p as j, q as u, r as g, t as v, v as C, w as S, x as A, y as P } from "./mcp-server-
|
|
2
|
-
import { F as E, g as w } from "./mcp-server-
|
|
1
|
+
import { f as s, s as a, l as e, m as t, a as o, u as d, d as n, b as i, c as r, e as c, h as m, i as f, j as p, k, n as l, o as T, p as j, q as u, r as g, t as v, v as C, w as S, x as A, y as P } from "./mcp-server-DxuxnYdP.js";
|
|
2
|
+
import { F as E, g as w } from "./mcp-server-DxuxnYdP.js";
|
|
3
3
|
const h = {
|
|
4
4
|
// Task management tools
|
|
5
5
|
addTasks: P,
|
package/dist/main-http.js
CHANGED
|
@@ -1,65 +1,24 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import {
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
const
|
|
10
|
-
|
|
11
|
-
const r =
|
|
12
|
-
r
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
const r = t.get(i);
|
|
16
|
-
r && (clearTimeout(r.timeoutId), r.lastActivity = Date.now(), r.timeoutId = setTimeout(() => u(i), l));
|
|
17
|
-
}
|
|
18
|
-
function g() {
|
|
19
|
-
const i = process.env.TODOIST_BASE_URL, r = process.env.TODOIST_API_KEY;
|
|
20
|
-
r || (console.error("Error: TODOIST_API_KEY environment variable is required"), process.exit(1));
|
|
21
|
-
const a = m();
|
|
22
|
-
a.use(m.json()), a.get("/health", (o, n) => {
|
|
23
|
-
n.json({
|
|
24
|
-
status: "ok",
|
|
25
|
-
activeSessions: t.size,
|
|
26
|
-
sessionTimeoutMs: l
|
|
27
|
-
});
|
|
28
|
-
}), a.post("/mcp", async (o, n) => {
|
|
29
|
-
const s = o.headers["mcp-session-id"];
|
|
2
|
+
import { StreamableHTTPServerTransport as i } from "@modelcontextprotocol/sdk/server/streamableHttp.js";
|
|
3
|
+
import l from "dotenv";
|
|
4
|
+
import a from "express";
|
|
5
|
+
import { g as p } from "./mcp-server-DxuxnYdP.js";
|
|
6
|
+
l.config({ quiet: !0 });
|
|
7
|
+
const s = Number.parseInt(process.env.PORT || "3000", 10);
|
|
8
|
+
function d() {
|
|
9
|
+
const c = process.env.TODOIST_BASE_URL, n = process.env.TODOIST_API_KEY;
|
|
10
|
+
n || (console.error("Error: TODOIST_API_KEY environment variable is required"), process.exit(1));
|
|
11
|
+
const r = a();
|
|
12
|
+
r.use(a.json()), r.get("/health", (o, e) => {
|
|
13
|
+
e.json({ status: "ok" });
|
|
14
|
+
}), r.post("/mcp", async (o, e) => {
|
|
30
15
|
try {
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
onsessioninitialized: (c) => {
|
|
38
|
-
const I = setTimeout(() => u(c), l);
|
|
39
|
-
t.set(c, {
|
|
40
|
-
transport: e,
|
|
41
|
-
lastActivity: Date.now(),
|
|
42
|
-
timeoutId: I
|
|
43
|
-
}), console.error(`[Session] New session initialized: ${c}`);
|
|
44
|
-
}
|
|
45
|
-
});
|
|
46
|
-
e.onclose = () => {
|
|
47
|
-
if (e.sessionId) {
|
|
48
|
-
const c = t.get(e.sessionId);
|
|
49
|
-
c && (clearTimeout(c.timeoutId), t.delete(e.sessionId), console.error(`[Session] Session closed: ${e.sessionId}`));
|
|
50
|
-
}
|
|
51
|
-
}, await v({ todoistApiKey: r, baseUrl: i }).connect(e), await e.handleRequest(o, n, o.body);
|
|
52
|
-
} else
|
|
53
|
-
n.status(400).json({
|
|
54
|
-
jsonrpc: "2.0",
|
|
55
|
-
error: {
|
|
56
|
-
code: -32001,
|
|
57
|
-
message: "Invalid session. Please reconnect to establish a new session."
|
|
58
|
-
},
|
|
59
|
-
id: null
|
|
60
|
-
});
|
|
61
|
-
} catch (e) {
|
|
62
|
-
console.error("[Error] Request handling failed:", e), n.status(500).json({
|
|
16
|
+
const t = new i({
|
|
17
|
+
sessionIdGenerator: void 0
|
|
18
|
+
});
|
|
19
|
+
await p({ todoistApiKey: n, baseUrl: c }).connect(t), await t.handleRequest(o, e, o.body);
|
|
20
|
+
} catch (t) {
|
|
21
|
+
console.error("[Error] Request handling failed:", t), e.status(500).json({
|
|
63
22
|
jsonrpc: "2.0",
|
|
64
23
|
error: {
|
|
65
24
|
code: -32603,
|
|
@@ -68,40 +27,10 @@ function g() {
|
|
|
68
27
|
id: null
|
|
69
28
|
});
|
|
70
29
|
}
|
|
71
|
-
}),
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
jsonrpc: "2.0",
|
|
76
|
-
error: {
|
|
77
|
-
code: -32001,
|
|
78
|
-
message: "Invalid or expired session. Please reconnect."
|
|
79
|
-
},
|
|
80
|
-
id: null
|
|
81
|
-
});
|
|
82
|
-
return;
|
|
83
|
-
}
|
|
84
|
-
const e = t.get(s);
|
|
85
|
-
e && (p(s), await e.transport.handleRequest(o, n));
|
|
86
|
-
}), a.delete("/mcp", async (o, n) => {
|
|
87
|
-
const s = o.headers["mcp-session-id"];
|
|
88
|
-
if (!s || !t.has(s)) {
|
|
89
|
-
n.status(400).json({
|
|
90
|
-
jsonrpc: "2.0",
|
|
91
|
-
error: {
|
|
92
|
-
code: -32001,
|
|
93
|
-
message: "Invalid session"
|
|
94
|
-
},
|
|
95
|
-
id: null
|
|
96
|
-
});
|
|
97
|
-
return;
|
|
98
|
-
}
|
|
99
|
-
const e = t.get(s);
|
|
100
|
-
e && await e.transport.handleRequest(o, n);
|
|
101
|
-
}), a.listen(d, () => {
|
|
102
|
-
console.error(`Todoist MCP HTTP Server started on port ${d}`), console.error(
|
|
103
|
-
`Session timeout: ${l}ms (${l / 6e4} minutes)`
|
|
104
|
-
), console.error(`MCP endpoint: http://localhost:${d}/mcp`), console.error(`Health check: http://localhost:${d}/health`);
|
|
30
|
+
}), r.get("/mcp", (o, e) => {
|
|
31
|
+
e.status(405).set("Allow", "POST").send("Method Not Allowed");
|
|
32
|
+
}), r.listen(s, () => {
|
|
33
|
+
console.error(`Todoist MCP HTTP Server started on port ${s}`), console.error(`MCP endpoint: http://localhost:${s}/mcp`), console.error(`Health check: http://localhost:${s}/health`);
|
|
105
34
|
});
|
|
106
35
|
}
|
|
107
|
-
|
|
36
|
+
d();
|
package/dist/main.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { StdioServerTransport as s } from "@modelcontextprotocol/sdk/server/stdio.js";
|
|
3
3
|
import c from "dotenv";
|
|
4
|
-
import { g as i } from "./mcp-server-
|
|
4
|
+
import { g as i } from "./mcp-server-DxuxnYdP.js";
|
|
5
5
|
function p() {
|
|
6
6
|
const e = process.env.TODOIST_BASE_URL, r = process.env.TODOIST_API_KEY;
|
|
7
7
|
if (!r)
|