@doist/todoist-ai 0.1.4 → 1.0.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.
Files changed (88) hide show
  1. package/README.md +27 -0
  2. package/dist/index.d.ts +34 -34
  3. package/dist/index.d.ts.map +1 -1
  4. package/dist/index.js +68 -68
  5. package/dist/main.js +7 -7
  6. package/dist/mcp-helpers.d.ts +4 -4
  7. package/dist/mcp-helpers.d.ts.map +1 -1
  8. package/dist/mcp-helpers.js +5 -7
  9. package/dist/mcp-server.d.ts +4 -2
  10. package/dist/mcp-server.d.ts.map +1 -1
  11. package/dist/mcp-server.js +50 -49
  12. package/dist/todoist-tool.d.ts +2 -2
  13. package/dist/todoist-tool.d.ts.map +1 -1
  14. package/dist/tools/account-overview.d.ts +1 -1
  15. package/dist/tools/account-overview.d.ts.map +1 -1
  16. package/dist/tools/account-overview.js +12 -11
  17. package/dist/tools/project-overview.d.ts +2 -2
  18. package/dist/tools/project-overview.d.ts.map +1 -1
  19. package/dist/tools/project-overview.js +9 -12
  20. package/dist/tools/projects-add-one.d.ts +1 -1
  21. package/dist/tools/projects-add-one.d.ts.map +1 -1
  22. package/dist/tools/projects-add-one.js +5 -5
  23. package/dist/tools/projects-delete-one.d.ts +1 -1
  24. package/dist/tools/projects-delete-one.d.ts.map +1 -1
  25. package/dist/tools/projects-delete-one.js +3 -3
  26. package/dist/tools/projects-list.d.ts +2 -2
  27. package/dist/tools/projects-list.d.ts.map +1 -1
  28. package/dist/tools/projects-list.js +4 -4
  29. package/dist/tools/projects-search.d.ts +1 -1
  30. package/dist/tools/projects-search.d.ts.map +1 -1
  31. package/dist/tools/projects-search.js +7 -7
  32. package/dist/tools/projects-update-one.d.ts +3 -3
  33. package/dist/tools/projects-update-one.d.ts.map +1 -1
  34. package/dist/tools/projects-update-one.js +3 -3
  35. package/dist/tools/sections-add-one.d.ts +1 -1
  36. package/dist/tools/sections-add-one.d.ts.map +1 -1
  37. package/dist/tools/sections-add-one.js +4 -7
  38. package/dist/tools/sections-delete-one.d.ts +1 -1
  39. package/dist/tools/sections-delete-one.d.ts.map +1 -1
  40. package/dist/tools/sections-delete-one.js +3 -3
  41. package/dist/tools/sections-search.d.ts +1 -1
  42. package/dist/tools/sections-search.d.ts.map +1 -1
  43. package/dist/tools/sections-search.js +4 -7
  44. package/dist/tools/sections-update-one.d.ts +2 -2
  45. package/dist/tools/sections-update-one.d.ts.map +1 -1
  46. package/dist/tools/sections-update-one.js +3 -3
  47. package/dist/tools/shared.d.ts +4 -1
  48. package/dist/tools/shared.d.ts.map +1 -1
  49. package/dist/tools/shared.js +11 -3
  50. package/dist/tools/shared.test.d.ts +2 -0
  51. package/dist/tools/shared.test.d.ts.map +1 -0
  52. package/dist/tools/shared.test.js +135 -0
  53. package/dist/tools/subtasks-list-for-parent-task.d.ts +2 -2
  54. package/dist/tools/subtasks-list-for-parent-task.d.ts.map +1 -1
  55. package/dist/tools/subtasks-list-for-parent-task.js +7 -10
  56. package/dist/tools/tasks-add-multiple.d.ts +2 -2
  57. package/dist/tools/tasks-add-multiple.d.ts.map +1 -1
  58. package/dist/tools/tasks-add-multiple.js +12 -30
  59. package/dist/tools/tasks-complete-multiple.d.ts +1 -1
  60. package/dist/tools/tasks-complete-multiple.d.ts.map +1 -1
  61. package/dist/tools/tasks-complete-multiple.js +3 -6
  62. package/dist/tools/tasks-delete-one.d.ts +1 -1
  63. package/dist/tools/tasks-delete-one.d.ts.map +1 -1
  64. package/dist/tools/tasks-delete-one.js +3 -3
  65. package/dist/tools/{tasks-by-date-range.d.ts → tasks-list-by-date.d.ts} +2 -2
  66. package/dist/tools/tasks-list-by-date.d.ts.map +1 -0
  67. package/dist/tools/{tasks-by-date-range.js → tasks-list-by-date.js} +10 -10
  68. package/dist/tools/{tasks-by-project.d.ts → tasks-list-for-project.d.ts} +2 -2
  69. package/dist/tools/tasks-list-for-project.d.ts.map +1 -0
  70. package/dist/tools/{tasks-by-project.js → tasks-list-for-project.js} +7 -10
  71. package/dist/tools/tasks-list-for-section.d.ts +1 -1
  72. package/dist/tools/tasks-list-for-section.d.ts.map +1 -1
  73. package/dist/tools/tasks-list-for-section.js +7 -10
  74. package/dist/tools/tasks-list-overdue.d.ts +1 -1
  75. package/dist/tools/tasks-list-overdue.d.ts.map +1 -1
  76. package/dist/tools/tasks-list-overdue.js +7 -7
  77. package/dist/tools/tasks-organize-multiple.d.ts +4 -4
  78. package/dist/tools/tasks-organize-multiple.d.ts.map +1 -1
  79. package/dist/tools/tasks-organize-multiple.js +8 -23
  80. package/dist/tools/tasks-search.d.ts +1 -1
  81. package/dist/tools/tasks-search.d.ts.map +1 -1
  82. package/dist/tools/tasks-search.js +6 -6
  83. package/dist/tools/tasks-update-one.d.ts +3 -3
  84. package/dist/tools/tasks-update-one.d.ts.map +1 -1
  85. package/dist/tools/tasks-update-one.js +9 -21
  86. package/package.json +54 -58
  87. package/dist/tools/tasks-by-date-range.d.ts.map +0 -1
  88. package/dist/tools/tasks-by-project.d.ts.map +0 -1
@@ -3,33 +3,18 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.tasksOrganizeMultiple = void 0;
4
4
  const zod_1 = require("zod");
5
5
  const TaskUpdateSchema = zod_1.z.object({
6
- id: zod_1.z.string().min(1).describe("The ID of the task to update."),
7
- projectId: zod_1.z
8
- .string()
9
- .optional()
10
- .describe("The new project ID for the task."),
11
- sectionId: zod_1.z
12
- .string()
13
- .optional()
14
- .describe("The new section ID for the task."),
15
- parentId: zod_1.z
16
- .string()
17
- .optional()
18
- .describe("The new parent task ID (for subtasks)."),
19
- order: zod_1.z
20
- .number()
21
- .optional()
22
- .describe("The new order of the task within its parent/section."),
6
+ id: zod_1.z.string().min(1).describe('The ID of the task to update.'),
7
+ projectId: zod_1.z.string().optional().describe('The new project ID for the task.'),
8
+ sectionId: zod_1.z.string().optional().describe('The new section ID for the task.'),
9
+ parentId: zod_1.z.string().optional().describe('The new parent task ID (for subtasks).'),
10
+ order: zod_1.z.number().optional().describe('The new order of the task within its parent/section.'),
23
11
  });
24
12
  const ArgsSchema = {
25
- tasks: zod_1.z
26
- .array(TaskUpdateSchema)
27
- .min(1)
28
- .describe("Array of task updates to apply."),
13
+ tasks: zod_1.z.array(TaskUpdateSchema).min(1).describe('Array of task updates to apply.'),
29
14
  };
30
15
  const tasksOrganizeMultiple = {
31
- name: "tasks-organize-multiple",
32
- description: "Organize multiple tasks (move, reorder, etc.) in bulk.",
16
+ name: 'tasks-organize-multiple',
17
+ description: 'Organize multiple tasks (move, reorder, etc.) in bulk.',
33
18
  parameters: ArgsSchema,
34
19
  async execute(args, client) {
35
20
  const results = [];
@@ -1,4 +1,4 @@
1
- import { z } from "zod";
1
+ import { z } from 'zod';
2
2
  declare const tasksSearch: {
3
3
  name: string;
4
4
  description: string;
@@ -1 +1 @@
1
- {"version":3,"file":"tasks-search.d.ts","sourceRoot":"","sources":["../../src/tools/tasks-search.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAqBxB,QAAA,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;CAYyB,CAAC;AAE3C,OAAO,EAAE,WAAW,EAAE,CAAC"}
1
+ {"version":3,"file":"tasks-search.d.ts","sourceRoot":"","sources":["../../src/tools/tasks-search.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAqBvB,QAAA,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;CAYyB,CAAA;AAE1C,OAAO,EAAE,WAAW,EAAE,CAAA"}
@@ -2,27 +2,27 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.tasksSearch = void 0;
4
4
  const zod_1 = require("zod");
5
- const shared_js_1 = require("./shared.js");
5
+ const shared_1 = require("./shared");
6
6
  const ArgsSchema = {
7
- searchText: zod_1.z.string().min(1).describe("The text to search for in tasks."),
7
+ searchText: zod_1.z.string().min(1).describe('The text to search for in tasks.'),
8
8
  limit: zod_1.z
9
9
  .number()
10
10
  .int()
11
11
  .min(1)
12
12
  .max(50)
13
13
  .default(10)
14
- .describe("The maximum number of tasks to return."),
14
+ .describe('The maximum number of tasks to return.'),
15
15
  cursor: zod_1.z
16
16
  .string()
17
17
  .optional()
18
- .describe("The cursor to get the next page of tasks (cursor is obtained from the previous call to this tool, with the same parameters)."),
18
+ .describe('The cursor to get the next page of tasks (cursor is obtained from the previous call to this tool, with the same parameters).'),
19
19
  };
20
20
  const tasksSearch = {
21
- name: "tasks-search",
21
+ name: 'tasks-search',
22
22
  description: "Search tasks by text using Todoist's filter query.",
23
23
  parameters: ArgsSchema,
24
24
  async execute(args, client) {
25
- return await (0, shared_js_1.getTasksByFilter)({
25
+ return await (0, shared_1.getTasksByFilter)({
26
26
  client,
27
27
  query: `search: ${args.searchText}`,
28
28
  cursor: args.cursor,
@@ -1,4 +1,4 @@
1
- import { z } from "zod";
1
+ import { z } from 'zod';
2
2
  declare const tasksUpdateOne: {
3
3
  name: string;
4
4
  description: string;
@@ -15,9 +15,9 @@ declare const tasksUpdateOne: {
15
15
  execute(args: {
16
16
  id: string;
17
17
  content?: string | undefined;
18
- projectId?: string | undefined;
19
- parentId?: string | undefined;
20
18
  description?: string | undefined;
19
+ parentId?: string | undefined;
20
+ projectId?: string | undefined;
21
21
  priority?: number | undefined;
22
22
  dueString?: string | undefined;
23
23
  sectionId?: string | undefined;
@@ -1 +1 @@
1
- {"version":3,"file":"tasks-update-one.d.ts","sourceRoot":"","sources":["../../src/tools/tasks-update-one.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAqCxB,QAAA,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;CAQsB,CAAC;AAE3C,OAAO,EAAE,cAAc,EAAE,CAAC"}
1
+ {"version":3,"file":"tasks-update-one.d.ts","sourceRoot":"","sources":["../../src/tools/tasks-update-one.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAuBvB,QAAA,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;CAQsB,CAAA;AAE1C,OAAO,EAAE,cAAc,EAAE,CAAA"}
@@ -3,39 +3,27 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.tasksUpdateOne = void 0;
4
4
  const zod_1 = require("zod");
5
5
  const ArgsSchema = {
6
- id: zod_1.z.string().min(1).describe("The ID of the task to update."),
7
- content: zod_1.z.string().optional().describe("The new content of the task."),
8
- description: zod_1.z
9
- .string()
10
- .optional()
11
- .describe("The new description of the task."),
12
- projectId: zod_1.z
13
- .string()
14
- .optional()
15
- .describe("The new project ID for the task."),
16
- sectionId: zod_1.z
17
- .string()
18
- .optional()
19
- .describe("The new section ID for the task."),
20
- parentId: zod_1.z
21
- .string()
22
- .optional()
23
- .describe("The new parent task ID (for subtasks)."),
6
+ id: zod_1.z.string().min(1).describe('The ID of the task to update.'),
7
+ content: zod_1.z.string().optional().describe('The new content of the task.'),
8
+ description: zod_1.z.string().optional().describe('The new description of the task.'),
9
+ projectId: zod_1.z.string().optional().describe('The new project ID for the task.'),
10
+ sectionId: zod_1.z.string().optional().describe('The new section ID for the task.'),
11
+ parentId: zod_1.z.string().optional().describe('The new parent task ID (for subtasks).'),
24
12
  priority: zod_1.z
25
13
  .number()
26
14
  .int()
27
15
  .min(1)
28
16
  .max(4)
29
17
  .optional()
30
- .describe("The new priority of the task (1-4)."),
18
+ .describe('The new priority of the task (1-4).'),
31
19
  dueString: zod_1.z
32
20
  .string()
33
21
  .optional()
34
22
  .describe("The new due date for the task, in natural language (e.g., 'tomorrow at 5pm')."),
35
23
  };
36
24
  const tasksUpdateOne = {
37
- name: "tasks-update-one",
38
- description: "Update an existing task with new values.",
25
+ name: 'tasks-update-one',
26
+ description: 'Update an existing task with new values.',
39
27
  parameters: ArgsSchema,
40
28
  async execute(args, client) {
41
29
  const { id, ...updateArgs } = args;
package/package.json CHANGED
@@ -1,60 +1,56 @@
1
1
  {
2
- "name": "@doist/todoist-ai",
3
- "version": "0.1.4",
4
- "main": "./dist/index.js",
5
- "types": "./dist/index.d.ts",
6
- "files": [
7
- "dist",
8
- "package.json",
9
- "LICENSE.txt",
10
- "README.md"
11
- ],
12
- "license": "MIT",
13
- "description": "A collection of tools for Todoist using AI",
14
- "repository": {
15
- "type": "git",
16
- "url": "git+https://github.com/doist/todoist-ai.git"
17
- },
18
- "keywords": ["todoist", "ai", "tools"],
19
- "scripts": {
20
- "test": "echo \"Error: no test specified\" && exit 1",
21
- "build": "rimraf dist && npx tsc --project tsconfig.json",
22
- "dev": "concurrently \"npx tsc --watch\" \"nodemon --watch dist --ext js --exec 'npx -y @modelcontextprotocol/inspector npx node dist/main.js'\"",
23
- "setup": "cp .env.example .env && npm install && npm run build",
24
- "type-check": "npx tsc --noEmit",
25
- "biome:sort-imports": "biome check --formatter-enabled=false --linter-enabled=false --organize-imports-enabled=true --write .",
26
- "lint:check": "biome lint",
27
- "lint:write": "biome lint --write",
28
- "format:check": "biome format",
29
- "format:write": "biome format --write",
30
- "check": "biome check",
31
- "check:fix": "biome check --fix --unsafe",
32
- "prepare": "husky"
33
- },
34
- "dependencies": {
35
- "@doist/todoist-api-typescript": "^4.0.4",
36
- "@modelcontextprotocol/sdk": "^1.11.1",
37
- "date-fns": "^4.1.0",
38
- "dotenv": "^16.5.0",
39
- "zod": "^3.25.7"
40
- },
41
- "devDependencies": {
42
- "@biomejs/biome": "1.9.4",
43
- "@types/express": "^5.0.2",
44
- "@types/morgan": "^1.9.9",
45
- "@types/node": "^22.15.17",
46
- "concurrently": "^8.2.2",
47
- "express": "^4.19.2",
48
- "husky": "^9.1.7",
49
- "lint-staged": "^16.0.0",
50
- "morgan": "^1.10.0",
51
- "nodemon": "^3.1.10",
52
- "rimraf": "^6.0.1",
53
- "typescript": "^5.8.3"
54
- },
55
- "lint-staged": {
56
- "*": [
57
- "biome check --write --no-errors-on-unmatched --files-ignore-unknown=true"
58
- ]
59
- }
2
+ "name": "@doist/todoist-ai",
3
+ "version": "1.0.0",
4
+ "main": "./dist/index.js",
5
+ "types": "./dist/index.d.ts",
6
+ "files": ["dist", "package.json", "LICENSE.txt", "README.md"],
7
+ "license": "MIT",
8
+ "description": "A collection of tools for Todoist using AI",
9
+ "repository": {
10
+ "type": "git",
11
+ "url": "https://github.com/Doist/todoist-ai"
12
+ },
13
+ "keywords": ["todoist", "ai", "tools"],
14
+ "scripts": {
15
+ "test": "jest",
16
+ "build": "rimraf dist && npx tsc --project tsconfig.json",
17
+ "dev": "concurrently \"npx tsc --watch\" \"nodemon --watch dist --ext js --exec 'npx -y @modelcontextprotocol/inspector npx node dist/main.js\"",
18
+ "setup": "cp .env.example .env && npm install && npm run build",
19
+ "type-check": "npx tsc --noEmit",
20
+ "biome:sort-imports": "biome check --formatter-enabled=false --linter-enabled=false --organize-imports-enabled=true --write .",
21
+ "lint:check": "biome lint",
22
+ "lint:write": "biome lint --write",
23
+ "format:check": "biome format",
24
+ "format:write": "biome format --write",
25
+ "check": "biome check",
26
+ "check:fix": "biome check --fix --unsafe",
27
+ "prepare": "husky"
28
+ },
29
+ "dependencies": {
30
+ "@doist/todoist-api-typescript": "5.1.1",
31
+ "@modelcontextprotocol/sdk": "^1.11.1",
32
+ "date-fns": "^4.1.0",
33
+ "dotenv": "^16.5.0",
34
+ "zod": "^3.25.7"
35
+ },
36
+ "devDependencies": {
37
+ "@biomejs/biome": "1.9.4",
38
+ "@types/express": "^5.0.2",
39
+ "@types/jest": "30.0.0",
40
+ "@types/morgan": "^1.9.9",
41
+ "@types/node": "^22.15.17",
42
+ "concurrently": "^8.2.2",
43
+ "express": "^4.19.2",
44
+ "husky": "^9.1.7",
45
+ "jest": "30.0.5",
46
+ "lint-staged": "^16.0.0",
47
+ "morgan": "^1.10.0",
48
+ "nodemon": "^3.1.10",
49
+ "rimraf": "^6.0.1",
50
+ "ts-jest": "29.4.1",
51
+ "typescript": "^5.8.3"
52
+ },
53
+ "lint-staged": {
54
+ "*": ["biome check --write --no-errors-on-unmatched --files-ignore-unknown=true"]
55
+ }
60
56
  }
@@ -1 +0,0 @@
1
- {"version":3,"file":"tasks-by-date-range.d.ts","sourceRoot":"","sources":["../../src/tools/tasks-by-date-range.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAmCxB,QAAA,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAmBqB,CAAC;AAE3C,OAAO,EAAE,eAAe,EAAE,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"tasks-by-project.d.ts","sourceRoot":"","sources":["../../src/tools/tasks-by-project.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAwBxB,QAAA,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;CAgBiB,CAAC;AAE3C,OAAO,EAAE,mBAAmB,EAAE,CAAC"}