@doist/todoist-mcp 12.2.4 → 12.3.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/index.js CHANGED
@@ -1,6 +1,6 @@
1
- import { f as s, s as a, l as e, m as t, a as o, u as d, r, d as i, b as n, c, e as l, h as m, i as p, j as f, k, n as T, o as u, p as g, q as j, t as v, v as h, w as P, x as b, y as A, z as S, A as y, B as C, C as F, D as x, E, F as L, G as O, H as w, I as H, J as I, K as M, L as q, M as z, N as B } from "./mcp-server-CJwB10bN.js";
2
- import { O as J, g as K } from "./mcp-server-CJwB10bN.js";
3
- import { r as U, v as V } from "./require-valid-todoist-token-1PqO_8hQ.js";
1
+ import { f as s, s as a, l as e, m as t, a as o, u as d, r, d as i, b as n, c, e as l, h as m, i as p, j as f, k, n as T, o as u, p as g, q as j, t as v, v as h, w as P, x as b, y as A, z as S, A as y, B as C, C as F, D as x, E, F as L, G as O, H as w, I as H, J as I, K as M, L as q, M as z, N as B } from "./mcp-server-BOvuwJio.js";
2
+ import { O as J, g as K } from "./mcp-server-BOvuwJio.js";
3
+ import { r as U, v as V } from "./require-valid-todoist-token-CLh0YpWi.js";
4
4
  const N = {
5
5
  // Task management tools
6
6
  addTasks: B,
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 { StreamableHTTPServerTransport as S } from "@modelcontextprotocol/sdk/server/streamableHttp.js";
5
5
  import m from "express";
6
- import { g as v } from "./mcp-server-CJwB10bN.js";
7
- import { r as w } from "./require-valid-todoist-token-1PqO_8hQ.js";
6
+ import { g as v } from "./mcp-server-BOvuwJio.js";
7
+ import { r as w } from "./require-valid-todoist-token-CLh0YpWi.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/sdk/server/stdio.js";
3
3
  import c from "dotenv";
4
- import { g as i } from "./mcp-server-CJwB10bN.js";
4
+ import { g as i } from "./mcp-server-BOvuwJio.js";
5
5
  function p() {
6
6
  const e = process.env.TODOIST_BASE_URL, r = process.env.TODOIST_API_KEY;
7
7
  if (!r)
@@ -345,7 +345,7 @@ function Vs(e) {
345
345
  const t = Ft(e);
346
346
  return t ? Ks(t) : Wt(e);
347
347
  }
348
- const Js = "12.2.4", Xs = {
348
+ const Js = "12.3.0", Xs = {
349
349
  version: Js
350
350
  }, I = {
351
351
  /** Default limit for task listings */
@@ -1,4 +1,4 @@
1
- import { P as A, Q as v, R as T } from "./mcp-server-CJwB10bN.js";
1
+ import { P as A, Q as v, R as T } from "./mcp-server-BOvuwJio.js";
2
2
  const y = /* @__PURE__ */ new Set([401, 403]);
3
3
  function C(e) {
4
4
  const t = T(e);
@@ -0,0 +1,63 @@
1
+ import { MoveTaskArgs, Task } from '@doist/todoist-sdk';
2
+ /** The container fields a caller can send to relocate a task. */
3
+ type MoveRequest = {
4
+ projectId?: string | undefined;
5
+ sectionId?: string | undefined;
6
+ parentId?: string | undefined;
7
+ };
8
+ type MovePlan = {
9
+ /** The move to perform, or undefined when the task is already where it was asked to go. */
10
+ move?: MoveTaskArgs;
11
+ /** True when a requested destination was dropped as already-satisfied. */
12
+ redundantMoveSkipped: boolean;
13
+ };
14
+ /**
15
+ * Whether moving `current` to `destination` would leave the task exactly where it
16
+ * already is, making the request a pointless write.
17
+ *
18
+ * Matching the destination field alone is not enough. Moving a task to a project
19
+ * also lifts it out of its section and out from under its parent, and moving it
20
+ * to a section lifts it out from under its parent — so a task that matches on
21
+ * `projectId` but sits in a section is *not* already in the requested end state.
22
+ *
23
+ * The extra conditions therefore make this predicate conservative on purpose: it
24
+ * only reports "redundant" when the task already looks the way the move would
25
+ * leave it under those detaching semantics. If the API turned out not to detach,
26
+ * the cost is a move we could have skipped, never a move we wrongly skipped.
27
+ */
28
+ declare function isMoveRedundant(current: Task, destination: MoveTaskArgs): boolean;
29
+ /**
30
+ * Identifies a move destination, so tasks heading to the same place can be
31
+ * collapsed into one request.
32
+ */
33
+ declare function destinationKey(move: MoveTaskArgs): string;
34
+ /**
35
+ * Works out what move, if any, a requested update actually needs.
36
+ *
37
+ * Callers commonly echo a task's whole current shape back when they only meant to
38
+ * edit a field, which would otherwise be read as a relocation. Dropping the
39
+ * containers the task already satisfies means those calls perform no move at all —
40
+ * and a request that names several containers, all but one of them unchanged,
41
+ * resolves to the single real move instead of being rejected as ambiguous.
42
+ *
43
+ * A single container is judged on the whole position it describes, so asking for a
44
+ * task's current project still moves it when that would lift it out of a section.
45
+ * Several containers are judged field by field, so a task described as already
46
+ * being in its project *and* its section is left alone rather than pulled out of
47
+ * that section.
48
+ *
49
+ * @param taskId - Used only to describe the task in error messages.
50
+ * @param request - The container fields as supplied by the caller.
51
+ * @param current - The task's current state, or undefined when it could not be
52
+ * read. Unknown state means every requested move is performed, matching the
53
+ * behaviour of not checking at all.
54
+ * @throws If more than one genuine destination remains, since the API accepts
55
+ * exactly one.
56
+ */
57
+ declare function planMove({ taskId, request, current, }: {
58
+ taskId: string;
59
+ request: MoveRequest;
60
+ current: Task | undefined;
61
+ }): MovePlan;
62
+ export { destinationKey, isMoveRedundant, type MovePlan, type MoveRequest, planMove };
63
+ //# sourceMappingURL=move-planner.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"move-planner.d.ts","sourceRoot":"","sources":["../../src/utils/move-planner.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,IAAI,EAAE,MAAM,oBAAoB,CAAA;AAE5D,iEAAiE;AACjE,KAAK,WAAW,GAAG;IACf,SAAS,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;IAC9B,SAAS,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;IAC9B,QAAQ,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;CAChC,CAAA;AAED,KAAK,QAAQ,GAAG;IACZ,2FAA2F;IAC3F,IAAI,CAAC,EAAE,YAAY,CAAA;IACnB,0EAA0E;IAC1E,oBAAoB,EAAE,OAAO,CAAA;CAChC,CAAA;AAED;;;;;;;;;;;;;GAaG;AACH,iBAAS,eAAe,CAAC,OAAO,EAAE,IAAI,EAAE,WAAW,EAAE,YAAY,GAAG,OAAO,CAY1E;AAsBD;;;GAGG;AACH,iBAAS,cAAc,CAAC,IAAI,EAAE,YAAY,GAAG,MAAM,CAQlD;AAgBD;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,iBAAS,QAAQ,CAAC,EACd,MAAM,EACN,OAAO,EACP,OAAO,GACV,EAAE;IACC,MAAM,EAAE,MAAM,CAAA;IACd,OAAO,EAAE,WAAW,CAAA;IACpB,OAAO,EAAE,IAAI,GAAG,SAAS,CAAA;CAC5B,GAAG,QAAQ,CA4BX;AAED,OAAO,EAAE,cAAc,EAAE,eAAe,EAAE,KAAK,QAAQ,EAAE,KAAK,WAAW,EAAE,QAAQ,EAAE,CAAA"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@doist/todoist-mcp",
3
- "version": "12.2.4",
3
+ "version": "12.3.0",
4
4
  "type": "module",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",