@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
@@ -0,0 +1,135 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const shared_1 = require("./shared");
4
+ describe('shared utilities', () => {
5
+ describe('mapTask', () => {
6
+ it('should map a basic task correctly', () => {
7
+ const mockTask = {
8
+ id: '123',
9
+ content: 'Test task',
10
+ description: 'Test description',
11
+ projectId: 'proj-1',
12
+ sectionId: null,
13
+ parentId: null,
14
+ labels: ['work'],
15
+ priority: 1,
16
+ due: {
17
+ date: '2024-01-15',
18
+ isRecurring: false,
19
+ datetime: '2024-01-15T10:00:00Z',
20
+ string: 'Jan 15',
21
+ timezone: 'UTC',
22
+ },
23
+ };
24
+ const result = (0, shared_1.mapTask)(mockTask);
25
+ expect(result).toEqual({
26
+ id: '123',
27
+ content: 'Test task',
28
+ description: 'Test description',
29
+ dueDate: '2024-01-15',
30
+ recurring: false,
31
+ priority: 1,
32
+ projectId: 'proj-1',
33
+ sectionId: null,
34
+ parentId: null,
35
+ labels: ['work'],
36
+ });
37
+ });
38
+ it('should handle recurring tasks', () => {
39
+ const mockTask = {
40
+ id: '456',
41
+ content: 'Recurring task',
42
+ description: '',
43
+ projectId: 'proj-1',
44
+ sectionId: null,
45
+ parentId: null,
46
+ labels: [],
47
+ priority: 1,
48
+ due: {
49
+ date: '2024-01-15',
50
+ isRecurring: true,
51
+ datetime: '2024-01-15T10:00:00Z',
52
+ string: 'every day',
53
+ timezone: 'UTC',
54
+ },
55
+ };
56
+ const result = (0, shared_1.mapTask)(mockTask);
57
+ expect(result.recurring).toBe('every day');
58
+ });
59
+ });
60
+ describe('mapProject', () => {
61
+ it('should map a personal project correctly', () => {
62
+ const mockPersonalProject = {
63
+ id: 'proj-1',
64
+ name: 'Personal Project',
65
+ color: 'blue',
66
+ isFavorite: false,
67
+ isShared: false,
68
+ parentId: null,
69
+ inboxProject: false,
70
+ viewStyle: 'list',
71
+ };
72
+ const result = (0, shared_1.mapProject)(mockPersonalProject);
73
+ expect(result).toEqual({
74
+ id: 'proj-1',
75
+ name: 'Personal Project',
76
+ color: 'blue',
77
+ isFavorite: false,
78
+ isShared: false,
79
+ parentId: null,
80
+ inboxProject: false,
81
+ viewStyle: 'list',
82
+ });
83
+ });
84
+ it('should map a workspace project correctly', () => {
85
+ const mockWorkspaceProject = {
86
+ id: 'proj-2',
87
+ name: 'Workspace Project',
88
+ color: 'red',
89
+ isFavorite: true,
90
+ isShared: true,
91
+ viewStyle: 'board',
92
+ };
93
+ const result = (0, shared_1.mapProject)(mockWorkspaceProject);
94
+ expect(result).toEqual({
95
+ id: 'proj-2',
96
+ name: 'Workspace Project',
97
+ color: 'red',
98
+ isFavorite: true,
99
+ isShared: true,
100
+ parentId: null,
101
+ inboxProject: false,
102
+ viewStyle: 'board',
103
+ });
104
+ });
105
+ });
106
+ describe('type guards', () => {
107
+ it('should correctly identify personal projects', () => {
108
+ const personalProject = {
109
+ id: 'proj-1',
110
+ name: 'Personal',
111
+ color: 'blue',
112
+ isFavorite: false,
113
+ isShared: false,
114
+ parentId: null,
115
+ inboxProject: true,
116
+ viewStyle: 'list',
117
+ };
118
+ expect((0, shared_1.isPersonalProject)(personalProject)).toBe(true);
119
+ expect((0, shared_1.isWorkspaceProject)(personalProject)).toBe(false);
120
+ });
121
+ it('should correctly identify workspace projects', () => {
122
+ const workspaceProject = {
123
+ id: 'proj-2',
124
+ name: 'Workspace',
125
+ color: 'red',
126
+ isFavorite: false,
127
+ isShared: true,
128
+ viewStyle: 'board',
129
+ accessLevel: 'admin',
130
+ };
131
+ expect((0, shared_1.isWorkspaceProject)(workspaceProject)).toBe(true);
132
+ expect((0, shared_1.isPersonalProject)(workspaceProject)).toBe(false);
133
+ });
134
+ });
135
+ });
@@ -1,4 +1,4 @@
1
- import { z } from "zod";
1
+ import { z } from 'zod';
2
2
  declare const subtasksListForParentTask: {
3
3
  name: string;
4
4
  description: string;
@@ -8,8 +8,8 @@ declare const subtasksListForParentTask: {
8
8
  cursor: z.ZodOptional<z.ZodString>;
9
9
  };
10
10
  execute(args: {
11
- limit: number;
12
11
  parentId: string;
12
+ limit: number;
13
13
  cursor?: string | undefined;
14
14
  }, client: import("@doist/todoist-api-typescript").TodoistApi): Promise<{
15
15
  tasks: {
@@ -1 +1 @@
1
- {"version":3,"file":"subtasks-list-for-parent-task.d.ts","sourceRoot":"","sources":["../../src/tools/subtasks-list-for-parent-task.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAwBxB,QAAA,MAAM,yBAAyB;;;;;;;;;;;;;;;;;;;;;;;;;;;CAgBW,CAAC;AAE3C,OAAO,EAAE,yBAAyB,EAAE,CAAC"}
1
+ {"version":3,"file":"subtasks-list-for-parent-task.d.ts","sourceRoot":"","sources":["../../src/tools/subtasks-list-for-parent-task.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAmBvB,QAAA,MAAM,yBAAyB;;;;;;;;;;;;;;;;;;;;;;;;;;;CAgBW,CAAA;AAE1C,OAAO,EAAE,yBAAyB,EAAE,CAAA"}
@@ -2,27 +2,24 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.subtasksListForParentTask = 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
- parentId: zod_1.z
8
- .string()
9
- .min(1)
10
- .describe("The ID of the parent task to get subtasks for."),
7
+ parentId: zod_1.z.string().min(1).describe('The ID of the parent task to get subtasks for.'),
11
8
  limit: zod_1.z
12
9
  .number()
13
10
  .int()
14
11
  .min(1)
15
12
  .max(50)
16
13
  .default(10)
17
- .describe("The maximum number of subtasks to return."),
14
+ .describe('The maximum number of subtasks to return.'),
18
15
  cursor: zod_1.z
19
16
  .string()
20
17
  .optional()
21
- .describe("The cursor to get the next page of subtasks (from previous call)."),
18
+ .describe('The cursor to get the next page of subtasks (from previous call).'),
22
19
  };
23
20
  const subtasksListForParentTask = {
24
- name: "subtasks-list-for-parent-task",
25
- description: "List subtasks for a given parent task.",
21
+ name: 'subtasks-list-for-parent-task',
22
+ description: 'List subtasks for a given parent task.',
26
23
  parameters: ArgsSchema,
27
24
  async execute(args, client) {
28
25
  const { parentId, limit, cursor } = args;
@@ -32,7 +29,7 @@ const subtasksListForParentTask = {
32
29
  cursor: cursor ?? null,
33
30
  });
34
31
  return {
35
- tasks: results.map(shared_js_1.mapTask),
32
+ tasks: results.map(shared_1.mapTask),
36
33
  nextCursor,
37
34
  };
38
35
  },
@@ -1,4 +1,4 @@
1
- import { z } from "zod";
1
+ import { z } from 'zod';
2
2
  declare const tasksAddMultiple: {
3
3
  name: string;
4
4
  description: string;
@@ -30,8 +30,8 @@ declare const tasksAddMultiple: {
30
30
  priority?: number | undefined;
31
31
  dueString?: string | undefined;
32
32
  }[];
33
- projectId?: string | undefined;
34
33
  parentId?: string | undefined;
34
+ projectId?: string | undefined;
35
35
  sectionId?: string | undefined;
36
36
  }, client: import("@doist/todoist-api-typescript").TodoistApi): Promise<{
37
37
  id: string;
@@ -1 +1 @@
1
- {"version":3,"file":"tasks-add-multiple.d.ts","sourceRoot":"","sources":["../../src/tools/tasks-add-multiple.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAoCxB,QAAA,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAaoB,CAAC;AAE3C,OAAO,EAAE,gBAAgB,EAAE,CAAC"}
1
+ {"version":3,"file":"tasks-add-multiple.d.ts","sourceRoot":"","sources":["../../src/tools/tasks-add-multiple.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAkBvB,QAAA,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAaoB,CAAA;AAE1C,OAAO,EAAE,gBAAgB,EAAE,CAAA"}
@@ -2,40 +2,22 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.tasksAddMultiple = 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 TaskSchema = zod_1.z.object({
7
- content: zod_1.z.string().min(1).describe("The content of the task to create."),
8
- description: zod_1.z.string().optional().describe("The description of the task."),
9
- priority: zod_1.z
10
- .number()
11
- .int()
12
- .min(1)
13
- .max(4)
14
- .optional()
15
- .describe("The priority of the task (1-4)."),
16
- dueString: zod_1.z
17
- .string()
18
- .optional()
19
- .describe("The due date for the task, in natural language."),
7
+ content: zod_1.z.string().min(1).describe('The content of the task to create.'),
8
+ description: zod_1.z.string().optional().describe('The description of the task.'),
9
+ priority: zod_1.z.number().int().min(1).max(4).optional().describe('The priority of the task (1-4).'),
10
+ dueString: zod_1.z.string().optional().describe('The due date for the task, in natural language.'),
20
11
  });
21
12
  const ArgsSchema = {
22
- projectId: zod_1.z
23
- .string()
24
- .optional()
25
- .describe("The project ID to add the tasks to."),
26
- sectionId: zod_1.z
27
- .string()
28
- .optional()
29
- .describe("The section ID to add the tasks to."),
30
- parentId: zod_1.z
31
- .string()
32
- .optional()
33
- .describe("The parent task ID (for subtasks)."),
34
- tasks: zod_1.z.array(TaskSchema).min(1).describe("The array of tasks to add."),
13
+ projectId: zod_1.z.string().optional().describe('The project ID to add the tasks to.'),
14
+ sectionId: zod_1.z.string().optional().describe('The section ID to add the tasks to.'),
15
+ parentId: zod_1.z.string().optional().describe('The parent task ID (for subtasks).'),
16
+ tasks: zod_1.z.array(TaskSchema).min(1).describe('The array of tasks to add.'),
35
17
  };
36
18
  const tasksAddMultiple = {
37
- name: "tasks-add-multiple",
38
- description: "Add one or more tasks to a project, section, or parent.",
19
+ name: 'tasks-add-multiple',
20
+ description: 'Add one or more tasks to a project, section, or parent.',
39
21
  parameters: ArgsSchema,
40
22
  async execute(args, client) {
41
23
  const { projectId, sectionId, parentId, tasks } = args;
@@ -44,7 +26,7 @@ const tasksAddMultiple = {
44
26
  const taskArgs = { ...task, projectId, sectionId, parentId };
45
27
  newTasks.push(await client.addTask(taskArgs));
46
28
  }
47
- return newTasks.map(shared_js_1.mapTask);
29
+ return newTasks.map(shared_1.mapTask);
48
30
  },
49
31
  };
50
32
  exports.tasksAddMultiple = tasksAddMultiple;
@@ -1,4 +1,4 @@
1
- import { z } from "zod";
1
+ import { z } from 'zod';
2
2
  declare const tasksCompleteMultiple: {
3
3
  name: string;
4
4
  description: string;
@@ -1 +1 @@
1
- {"version":3,"file":"tasks-complete-multiple.d.ts","sourceRoot":"","sources":["../../src/tools/tasks-complete-multiple.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAUxB,QAAA,MAAM,qBAAqB;;;;;;;;;;;;CAgBe,CAAC;AAE3C,OAAO,EAAE,qBAAqB,EAAE,CAAC"}
1
+ {"version":3,"file":"tasks-complete-multiple.d.ts","sourceRoot":"","sources":["../../src/tools/tasks-complete-multiple.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAOvB,QAAA,MAAM,qBAAqB;;;;;;;;;;;;CAgBe,CAAA;AAE1C,OAAO,EAAE,qBAAqB,EAAE,CAAA"}
@@ -3,14 +3,11 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.tasksCompleteMultiple = void 0;
4
4
  const zod_1 = require("zod");
5
5
  const ArgsSchema = {
6
- ids: zod_1.z
7
- .array(zod_1.z.string().min(1))
8
- .min(1)
9
- .describe("The IDs of the tasks to complete."),
6
+ ids: zod_1.z.array(zod_1.z.string().min(1)).min(1).describe('The IDs of the tasks to complete.'),
10
7
  };
11
8
  const tasksCompleteMultiple = {
12
- name: "tasks-complete-multiple",
13
- description: "Complete one or more tasks by their IDs.",
9
+ name: 'tasks-complete-multiple',
10
+ description: 'Complete one or more tasks by their IDs.',
14
11
  parameters: ArgsSchema,
15
12
  async execute(args, client) {
16
13
  const completed = [];
@@ -1,4 +1,4 @@
1
- import { z } from "zod";
1
+ import { z } from 'zod';
2
2
  declare const tasksDeleteOne: {
3
3
  name: string;
4
4
  description: string;
@@ -1 +1 @@
1
- {"version":3,"file":"tasks-delete-one.d.ts","sourceRoot":"","sources":["../../src/tools/tasks-delete-one.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAOxB,QAAA,MAAM,cAAc;;;;;;;;;;;CAQsB,CAAC;AAE3C,OAAO,EAAE,cAAc,EAAE,CAAC"}
1
+ {"version":3,"file":"tasks-delete-one.d.ts","sourceRoot":"","sources":["../../src/tools/tasks-delete-one.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAOvB,QAAA,MAAM,cAAc;;;;;;;;;;;CAQsB,CAAA;AAE1C,OAAO,EAAE,cAAc,EAAE,CAAA"}
@@ -3,11 +3,11 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.tasksDeleteOne = 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 delete."),
6
+ id: zod_1.z.string().min(1).describe('The ID of the task to delete.'),
7
7
  };
8
8
  const tasksDeleteOne = {
9
- name: "tasks-delete-one",
10
- description: "Delete a task by its ID.",
9
+ name: 'tasks-delete-one',
10
+ description: 'Delete a task by its ID.',
11
11
  parameters: ArgsSchema,
12
12
  async execute(args, client) {
13
13
  await client.deleteTask(args.id);
@@ -1,4 +1,4 @@
1
- import { z } from "zod";
1
+ import { z } from 'zod';
2
2
  declare const tasksListByDate: {
3
3
  name: string;
4
4
  description: string;
@@ -30,4 +30,4 @@ declare const tasksListByDate: {
30
30
  }>;
31
31
  };
32
32
  export { tasksListByDate };
33
- //# sourceMappingURL=tasks-by-date-range.d.ts.map
33
+ //# sourceMappingURL=tasks-list-by-date.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tasks-list-by-date.d.ts","sourceRoot":"","sources":["../../src/tools/tasks-list-by-date.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AA+BvB,QAAA,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAmBqB,CAAA;AAE1C,OAAO,EAAE,eAAe,EAAE,CAAA"}
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.tasksListByDate = void 0;
4
4
  const date_fns_1 = require("date-fns");
5
5
  const zod_1 = require("zod");
6
- const shared_js_1 = require("./shared.js");
6
+ const shared_1 = require("./shared");
7
7
  const ArgsSchema = {
8
8
  startDate: zod_1.z
9
9
  .string()
@@ -15,31 +15,31 @@ const ArgsSchema = {
15
15
  .min(1)
16
16
  .max(30)
17
17
  .default(1)
18
- .describe("The number of days to get the tasks for, starting from the start date."),
18
+ .describe('The number of days to get the tasks for, starting from the start date.'),
19
19
  limit: zod_1.z
20
20
  .number()
21
21
  .int()
22
22
  .min(1)
23
23
  .max(50)
24
24
  .default(10)
25
- .describe("The maximum number of tasks to return."),
25
+ .describe('The maximum number of tasks to return.'),
26
26
  cursor: zod_1.z
27
27
  .string()
28
28
  .optional()
29
- .describe("The cursor to get the next page of tasks (cursor is obtained from the previous call to this tool, with the same parameters)."),
29
+ .describe('The cursor to get the next page of tasks (cursor is obtained from the previous call to this tool, with the same parameters).'),
30
30
  };
31
31
  const tasksListByDate = {
32
- name: "tasks-list-by-date",
33
- description: "Get tasks by date range.",
32
+ name: 'tasks-list-by-date',
33
+ description: 'Get tasks by date range.',
34
34
  parameters: ArgsSchema,
35
35
  async execute(args, client) {
36
- const startDate = args.startDate === "today"
37
- ? (0, date_fns_1.formatISO)(new Date(), { representation: "date" })
36
+ const startDate = args.startDate === 'today'
37
+ ? (0, date_fns_1.formatISO)(new Date(), { representation: 'date' })
38
38
  : args.startDate;
39
39
  const endDate = (0, date_fns_1.addDays)(startDate, args.daysCount + 1);
40
- const endDateStr = (0, date_fns_1.formatISO)(endDate, { representation: "date" });
40
+ const endDateStr = (0, date_fns_1.formatISO)(endDate, { representation: 'date' });
41
41
  const query = `(due after: ${startDate} | due: ${startDate}) & due before: ${endDateStr}`;
42
- return await (0, shared_js_1.getTasksByFilter)({
42
+ return await (0, shared_1.getTasksByFilter)({
43
43
  client,
44
44
  query,
45
45
  cursor: args.cursor,
@@ -1,4 +1,4 @@
1
- import { z } from "zod";
1
+ import { z } from 'zod';
2
2
  declare const tasksListForProject: {
3
3
  name: string;
4
4
  description: string;
@@ -28,4 +28,4 @@ declare const tasksListForProject: {
28
28
  }>;
29
29
  };
30
30
  export { tasksListForProject };
31
- //# sourceMappingURL=tasks-by-project.d.ts.map
31
+ //# sourceMappingURL=tasks-list-for-project.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tasks-list-for-project.d.ts","sourceRoot":"","sources":["../../src/tools/tasks-list-for-project.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAqBvB,QAAA,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;CAgBiB,CAAA;AAE1C,OAAO,EAAE,mBAAmB,EAAE,CAAA"}
@@ -2,27 +2,24 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.tasksListForProject = 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
- projectId: zod_1.z
8
- .string()
9
- .min(1)
10
- .describe("The ID of the project to get tasks for."),
7
+ projectId: zod_1.z.string().min(1).describe('The ID of the project to get tasks for.'),
11
8
  limit: zod_1.z
12
9
  .number()
13
10
  .int()
14
11
  .min(1)
15
12
  .max(50)
16
13
  .default(10)
17
- .describe("The maximum number of tasks to return."),
14
+ .describe('The maximum number of tasks to return.'),
18
15
  cursor: zod_1.z
19
16
  .string()
20
17
  .optional()
21
- .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).'),
22
19
  };
23
20
  const tasksListForProject = {
24
- name: "tasks-list-for-project",
25
- description: "Get tasks by project ID.",
21
+ name: 'tasks-list-for-project',
22
+ description: 'Get tasks by project ID.',
26
23
  parameters: ArgsSchema,
27
24
  async execute(args, client) {
28
25
  const { projectId, limit, cursor } = args;
@@ -32,7 +29,7 @@ const tasksListForProject = {
32
29
  cursor: cursor ?? null,
33
30
  });
34
31
  return {
35
- tasks: results.map(shared_js_1.mapTask),
32
+ tasks: results.map(shared_1.mapTask),
36
33
  nextCursor,
37
34
  };
38
35
  },
@@ -1,4 +1,4 @@
1
- import { z } from "zod";
1
+ import { z } from 'zod';
2
2
  declare const tasksListForSection: {
3
3
  name: string;
4
4
  description: string;
@@ -1 +1 @@
1
- {"version":3,"file":"tasks-list-for-section.d.ts","sourceRoot":"","sources":["../../src/tools/tasks-list-for-section.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAwBxB,QAAA,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;CAgBiB,CAAC;AAE3C,OAAO,EAAE,mBAAmB,EAAE,CAAC"}
1
+ {"version":3,"file":"tasks-list-for-section.d.ts","sourceRoot":"","sources":["../../src/tools/tasks-list-for-section.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAmBvB,QAAA,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;CAgBiB,CAAA;AAE1C,OAAO,EAAE,mBAAmB,EAAE,CAAA"}
@@ -2,27 +2,24 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.tasksListForSection = 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
- sectionId: zod_1.z
8
- .string()
9
- .min(1)
10
- .describe("The ID of the section to get tasks for."),
7
+ sectionId: zod_1.z.string().min(1).describe('The ID of the section to get tasks for.'),
11
8
  limit: zod_1.z
12
9
  .number()
13
10
  .int()
14
11
  .min(1)
15
12
  .max(50)
16
13
  .default(10)
17
- .describe("The maximum number of tasks to return."),
14
+ .describe('The maximum number of tasks to return.'),
18
15
  cursor: zod_1.z
19
16
  .string()
20
17
  .optional()
21
- .describe("The cursor to get the next page of tasks (from previous call)."),
18
+ .describe('The cursor to get the next page of tasks (from previous call).'),
22
19
  };
23
20
  const tasksListForSection = {
24
- name: "tasks-list-for-section",
25
- description: "List tasks for a given section.",
21
+ name: 'tasks-list-for-section',
22
+ description: 'List tasks for a given section.',
26
23
  parameters: ArgsSchema,
27
24
  async execute(args, client) {
28
25
  const { sectionId, limit, cursor } = args;
@@ -32,7 +29,7 @@ const tasksListForSection = {
32
29
  cursor: cursor ?? null,
33
30
  });
34
31
  return {
35
- tasks: results.map(shared_js_1.mapTask),
32
+ tasks: results.map(shared_1.mapTask),
36
33
  nextCursor,
37
34
  };
38
35
  },
@@ -1,4 +1,4 @@
1
- import { z } from "zod";
1
+ import { z } from 'zod';
2
2
  declare const tasksListOverdue: {
3
3
  name: string;
4
4
  description: string;
@@ -1 +1 @@
1
- {"version":3,"file":"tasks-list-overdue.d.ts","sourceRoot":"","sources":["../../src/tools/tasks-list-overdue.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAoBxB,QAAA,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;CAYoB,CAAC;AAE3C,OAAO,EAAE,gBAAgB,EAAE,CAAC"}
1
+ {"version":3,"file":"tasks-list-overdue.d.ts","sourceRoot":"","sources":["../../src/tools/tasks-list-overdue.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAoBvB,QAAA,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;CAYoB,CAAA;AAE1C,OAAO,EAAE,gBAAgB,EAAE,CAAA"}
@@ -2,7 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.tasksListOverdue = 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
7
  limit: zod_1.z
8
8
  .number()
@@ -10,20 +10,20 @@ const ArgsSchema = {
10
10
  .min(1)
11
11
  .max(50)
12
12
  .default(10)
13
- .describe("The maximum number of overdue tasks to return."),
13
+ .describe('The maximum number of overdue tasks to return.'),
14
14
  cursor: zod_1.z
15
15
  .string()
16
16
  .optional()
17
- .describe("The cursor to get the next page of overdue tasks (cursor is obtained from the previous call to this tool, with the same parameters)."),
17
+ .describe('The cursor to get the next page of overdue tasks (cursor is obtained from the previous call to this tool, with the same parameters).'),
18
18
  };
19
19
  const tasksListOverdue = {
20
- name: "tasks-list-overdue",
21
- description: "Get overdue tasks.",
20
+ name: 'tasks-list-overdue',
21
+ description: 'Get overdue tasks.',
22
22
  parameters: ArgsSchema,
23
23
  async execute(args, client) {
24
- return await (0, shared_js_1.getTasksByFilter)({
24
+ return await (0, shared_1.getTasksByFilter)({
25
25
  client,
26
- query: "overdue",
26
+ query: 'overdue',
27
27
  cursor: args.cursor,
28
28
  limit: args.limit,
29
29
  });
@@ -1,4 +1,4 @@
1
- import { z } from "zod";
1
+ import { z } from 'zod';
2
2
  declare const tasksOrganizeMultiple: {
3
3
  name: string;
4
4
  description: string;
@@ -11,14 +11,14 @@ declare const tasksOrganizeMultiple: {
11
11
  order: z.ZodOptional<z.ZodNumber>;
12
12
  }, "strip", z.ZodTypeAny, {
13
13
  id: string;
14
- projectId?: string | undefined;
15
14
  parentId?: string | undefined;
15
+ projectId?: string | undefined;
16
16
  sectionId?: string | undefined;
17
17
  order?: number | undefined;
18
18
  }, {
19
19
  id: string;
20
- projectId?: string | undefined;
21
20
  parentId?: string | undefined;
21
+ projectId?: string | undefined;
22
22
  sectionId?: string | undefined;
23
23
  order?: number | undefined;
24
24
  }>, "many">;
@@ -26,8 +26,8 @@ declare const tasksOrganizeMultiple: {
26
26
  execute(args: {
27
27
  tasks: {
28
28
  id: string;
29
- projectId?: string | undefined;
30
29
  parentId?: string | undefined;
30
+ projectId?: string | undefined;
31
31
  sectionId?: string | undefined;
32
32
  order?: number | undefined;
33
33
  }[];
@@ -1 +1 @@
1
- {"version":3,"file":"tasks-organize-multiple.d.ts","sourceRoot":"","sources":["../../src/tools/tasks-organize-multiple.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AA8BxB,QAAA,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAYe,CAAC;AAE3C,OAAO,EAAE,qBAAqB,EAAE,CAAC"}
1
+ {"version":3,"file":"tasks-organize-multiple.d.ts","sourceRoot":"","sources":["../../src/tools/tasks-organize-multiple.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAevB,QAAA,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAYe,CAAA;AAE1C,OAAO,EAAE,qBAAqB,EAAE,CAAA"}