@todoist/mcp 0.0.1 → 15.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.
- package/LICENSE +21 -0
- package/README.md +217 -29
- package/dist/filter-helpers.d.ts +53 -0
- package/dist/filter-helpers.d.ts.map +1 -0
- package/dist/http-app.d.ts +28 -0
- package/dist/http-app.d.ts.map +1 -0
- package/dist/index.d.ts +4347 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +61 -0
- package/dist/main-http.d.ts +3 -0
- package/dist/main-http.d.ts.map +1 -0
- package/dist/main-http.js +133 -0
- package/dist/main.d.ts +3 -0
- package/dist/main.d.ts.map +1 -0
- package/dist/main.js +16 -0
- package/dist/mcp-apps/index.html +116 -0
- package/dist/mcp-helpers.d.ts +62 -0
- package/dist/mcp-helpers.d.ts.map +1 -0
- package/dist/mcp-server-y4HhlBJW.js +8152 -0
- package/dist/mcp-server.d.ts +16 -0
- package/dist/mcp-server.d.ts.map +1 -0
- package/dist/middleware/require-trusted-host.d.ts +44 -0
- package/dist/middleware/require-trusted-host.d.ts.map +1 -0
- package/dist/middleware/require-valid-todoist-token.d.ts +39 -0
- package/dist/middleware/require-valid-todoist-token.d.ts.map +1 -0
- package/dist/prompts/productivity-analysis.d.ts +58 -0
- package/dist/prompts/productivity-analysis.d.ts.map +1 -0
- package/dist/require-valid-todoist-token-I1jh7sbd.js +63 -0
- package/dist/todoist-tool.d.ts +15 -0
- package/dist/todoist-tool.d.ts.map +1 -0
- package/dist/tool-execution-error.d.ts +27 -0
- package/dist/tool-execution-error.d.ts.map +1 -0
- package/dist/tool-helpers.d.ts +318 -0
- package/dist/tool-helpers.d.ts.map +1 -0
- package/dist/tool-registry.d.ts +4307 -0
- package/dist/tool-registry.d.ts.map +1 -0
- package/dist/tools/add-comments.d.ts +104 -0
- package/dist/tools/add-comments.d.ts.map +1 -0
- package/dist/tools/add-filters.d.ts +113 -0
- package/dist/tools/add-filters.d.ts.map +1 -0
- package/dist/tools/add-labels.d.ts +107 -0
- package/dist/tools/add-labels.d.ts.map +1 -0
- package/dist/tools/add-projects.d.ts +134 -0
- package/dist/tools/add-projects.d.ts.map +1 -0
- package/dist/tools/add-reminders.d.ts +174 -0
- package/dist/tools/add-reminders.d.ts.map +1 -0
- package/dist/tools/add-sections.d.ts +61 -0
- package/dist/tools/add-sections.d.ts.map +1 -0
- package/dist/tools/add-tasks.d.ts +123 -0
- package/dist/tools/add-tasks.d.ts.map +1 -0
- package/dist/tools/analyze-project-health.d.ts +45 -0
- package/dist/tools/analyze-project-health.d.ts.map +1 -0
- package/dist/tools/complete-tasks.d.ts +42 -0
- package/dist/tools/complete-tasks.d.ts.map +1 -0
- package/dist/tools/delete-object.d.ts +54 -0
- package/dist/tools/delete-object.d.ts.map +1 -0
- package/dist/tools/export-project-template.d.ts +54 -0
- package/dist/tools/export-project-template.d.ts.map +1 -0
- package/dist/tools/fetch-object.d.ts +243 -0
- package/dist/tools/fetch-object.d.ts.map +1 -0
- package/dist/tools/fetch.d.ts +41 -0
- package/dist/tools/fetch.d.ts.map +1 -0
- package/dist/tools/find-activity.d.ts +98 -0
- package/dist/tools/find-activity.d.ts.map +1 -0
- package/dist/tools/find-comments.d.ts +91 -0
- package/dist/tools/find-comments.d.ts.map +1 -0
- package/dist/tools/find-completed-tasks.d.ts +119 -0
- package/dist/tools/find-completed-tasks.d.ts.map +1 -0
- package/dist/tools/find-filters.d.ts +95 -0
- package/dist/tools/find-filters.d.ts.map +1 -0
- package/dist/tools/find-labels.d.ts +81 -0
- package/dist/tools/find-labels.d.ts.map +1 -0
- package/dist/tools/find-project-collaborators.d.ts +94 -0
- package/dist/tools/find-project-collaborators.d.ts.map +1 -0
- package/dist/tools/find-projects.d.ts +98 -0
- package/dist/tools/find-projects.d.ts.map +1 -0
- package/dist/tools/find-reminders.d.ts +99 -0
- package/dist/tools/find-reminders.d.ts.map +1 -0
- package/dist/tools/find-sections.d.ts +45 -0
- package/dist/tools/find-sections.d.ts.map +1 -0
- package/dist/tools/find-tasks-by-date.d.ts +137 -0
- package/dist/tools/find-tasks-by-date.d.ts.map +1 -0
- package/dist/tools/find-tasks.d.ts +120 -0
- package/dist/tools/find-tasks.d.ts.map +1 -0
- package/dist/tools/get-overview.d.ts +121 -0
- package/dist/tools/get-overview.d.ts.map +1 -0
- package/dist/tools/get-productivity-stats.d.ts +160 -0
- package/dist/tools/get-productivity-stats.d.ts.map +1 -0
- package/dist/tools/get-project-activity-stats.d.ts +48 -0
- package/dist/tools/get-project-activity-stats.d.ts.map +1 -0
- package/dist/tools/get-project-health.d.ts +104 -0
- package/dist/tools/get-project-health.d.ts.map +1 -0
- package/dist/tools/get-user-status.d.ts +35 -0
- package/dist/tools/get-user-status.d.ts.map +1 -0
- package/dist/tools/get-workspace-insights.d.ts +63 -0
- package/dist/tools/get-workspace-insights.d.ts.map +1 -0
- package/dist/tools/import-project-template.d.ts +148 -0
- package/dist/tools/import-project-template.d.ts.map +1 -0
- package/dist/tools/list-workspaces.d.ts +54 -0
- package/dist/tools/list-workspaces.d.ts.map +1 -0
- package/dist/tools/manage-assignments.d.ts +73 -0
- package/dist/tools/manage-assignments.d.ts.map +1 -0
- package/dist/tools/project-management.d.ts +82 -0
- package/dist/tools/project-management.d.ts.map +1 -0
- package/dist/tools/project-move.d.ts +92 -0
- package/dist/tools/project-move.d.ts.map +1 -0
- package/dist/tools/reorder-objects.d.ts +61 -0
- package/dist/tools/reorder-objects.d.ts.map +1 -0
- package/dist/tools/reschedule-tasks.d.ts +95 -0
- package/dist/tools/reschedule-tasks.d.ts.map +1 -0
- package/dist/tools/search.d.ts +43 -0
- package/dist/tools/search.d.ts.map +1 -0
- package/dist/tools/set-user-status.d.ts +51 -0
- package/dist/tools/set-user-status.d.ts.map +1 -0
- package/dist/tools/uncomplete-tasks.d.ts +42 -0
- package/dist/tools/uncomplete-tasks.d.ts.map +1 -0
- package/dist/tools/update-comments.d.ts +100 -0
- package/dist/tools/update-comments.d.ts.map +1 -0
- package/dist/tools/update-filters.d.ts +121 -0
- package/dist/tools/update-filters.d.ts.map +1 -0
- package/dist/tools/update-labels.d.ts +133 -0
- package/dist/tools/update-labels.d.ts.map +1 -0
- package/dist/tools/update-projects.d.ts +138 -0
- package/dist/tools/update-projects.d.ts.map +1 -0
- package/dist/tools/update-reminders.d.ts +176 -0
- package/dist/tools/update-reminders.d.ts.map +1 -0
- package/dist/tools/update-sections.d.ts +65 -0
- package/dist/tools/update-sections.d.ts.map +1 -0
- package/dist/tools/update-tasks.d.ts +135 -0
- package/dist/tools/update-tasks.d.ts.map +1 -0
- package/dist/tools/user-info.d.ts +57 -0
- package/dist/tools/user-info.d.ts.map +1 -0
- package/dist/tools/view-attachment.d.ts +25 -0
- package/dist/tools/view-attachment.d.ts.map +1 -0
- package/dist/usage-tracking.d.ts +36 -0
- package/dist/usage-tracking.d.ts.map +1 -0
- package/dist/utils/assignment-validator.d.ts +69 -0
- package/dist/utils/assignment-validator.d.ts.map +1 -0
- package/dist/utils/batch-failures.d.ts +25 -0
- package/dist/utils/batch-failures.d.ts.map +1 -0
- package/dist/utils/children.d.ts +68 -0
- package/dist/utils/children.d.ts.map +1 -0
- package/dist/utils/colors.d.ts +68 -0
- package/dist/utils/colors.d.ts.map +1 -0
- package/dist/utils/comment-recipients.d.ts +35 -0
- package/dist/utils/comment-recipients.d.ts.map +1 -0
- package/dist/utils/concurrency.d.ts +35 -0
- package/dist/utils/concurrency.d.ts.map +1 -0
- package/dist/utils/constants.d.ts +93 -0
- package/dist/utils/constants.d.ts.map +1 -0
- package/dist/utils/date.d.ts +18 -0
- package/dist/utils/date.d.ts.map +1 -0
- package/dist/utils/duration-parser.d.ts +39 -0
- package/dist/utils/duration-parser.d.ts.map +1 -0
- package/dist/utils/filter-description.d.ts +16 -0
- package/dist/utils/filter-description.d.ts.map +1 -0
- package/dist/utils/filter-resolver.d.ts +27 -0
- package/dist/utils/filter-resolver.d.ts.map +1 -0
- package/dist/utils/host.d.ts +6 -0
- package/dist/utils/host.d.ts.map +1 -0
- package/dist/utils/labels.d.ts +13 -0
- package/dist/utils/labels.d.ts.map +1 -0
- package/dist/utils/move-planner.d.ts +63 -0
- package/dist/utils/move-planner.d.ts.map +1 -0
- package/dist/utils/order-keys.d.ts +36 -0
- package/dist/utils/order-keys.d.ts.map +1 -0
- package/dist/utils/output-schemas.d.ts +209 -0
- package/dist/utils/output-schemas.d.ts.map +1 -0
- package/dist/utils/personal-project-limit.d.ts +31 -0
- package/dist/utils/personal-project-limit.d.ts.map +1 -0
- package/dist/utils/priorities.d.ts +14 -0
- package/dist/utils/priorities.d.ts.map +1 -0
- package/dist/utils/reminder-recipients.d.ts +21 -0
- package/dist/utils/reminder-recipients.d.ts.map +1 -0
- package/dist/utils/reminder-schemas.d.ts +41 -0
- package/dist/utils/reminder-schemas.d.ts.map +1 -0
- package/dist/utils/response-builders.d.ts +103 -0
- package/dist/utils/response-builders.d.ts.map +1 -0
- package/dist/utils/retry.d.ts +39 -0
- package/dist/utils/retry.d.ts.map +1 -0
- package/dist/utils/schema-helpers.d.ts +10 -0
- package/dist/utils/schema-helpers.d.ts.map +1 -0
- package/dist/utils/sync-commands.d.ts +21 -0
- package/dist/utils/sync-commands.d.ts.map +1 -0
- package/dist/utils/test-helpers.d.ts +118 -0
- package/dist/utils/test-helpers.d.ts.map +1 -0
- package/dist/utils/tool-names.d.ts +60 -0
- package/dist/utils/tool-names.d.ts.map +1 -0
- package/dist/utils/user-resolver.d.ts +92 -0
- package/dist/utils/user-resolver.d.ts.map +1 -0
- package/dist/utils/user-status.d.ts +32 -0
- package/dist/utils/user-status.d.ts.map +1 -0
- package/dist/utils/validate-todoist-token.d.ts +17 -0
- package/dist/utils/validate-todoist-token.d.ts.map +1 -0
- package/dist/utils/workspace-resolver.d.ts +31 -0
- package/dist/utils/workspace-resolver.d.ts.map +1 -0
- package/package.json +115 -8
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
import { TodoistApi } from '@doist/todoist-sdk';
|
|
2
|
+
import { z } from 'zod';
|
|
3
|
+
declare const updateTasks: {
|
|
4
|
+
name: "update-tasks";
|
|
5
|
+
description: string;
|
|
6
|
+
parameters: {
|
|
7
|
+
tasks: z.ZodArray<z.ZodObject<{
|
|
8
|
+
id: z.ZodString;
|
|
9
|
+
content: z.ZodOptional<z.ZodString>;
|
|
10
|
+
description: z.ZodOptional<z.ZodString>;
|
|
11
|
+
projectId: z.ZodOptional<z.ZodString>;
|
|
12
|
+
sectionId: z.ZodOptional<z.ZodString>;
|
|
13
|
+
parentId: z.ZodOptional<z.ZodString>;
|
|
14
|
+
order: z.ZodOptional<z.ZodNumber>;
|
|
15
|
+
priority: z.ZodOptional<z.ZodEnum<{
|
|
16
|
+
p1: "p1";
|
|
17
|
+
p2: "p2";
|
|
18
|
+
p3: "p3";
|
|
19
|
+
p4: "p4";
|
|
20
|
+
}>>;
|
|
21
|
+
dueString: z.ZodOptional<z.ZodPreprocess<z.ZodString, unknown>>;
|
|
22
|
+
replaceRecurrence: z.ZodOptional<z.ZodBoolean>;
|
|
23
|
+
deadlineDate: z.ZodOptional<z.ZodPreprocess<z.ZodString, unknown>>;
|
|
24
|
+
duration: z.ZodOptional<z.ZodString>;
|
|
25
|
+
responsibleUser: z.ZodOptional<z.ZodPreprocess<z.ZodString, unknown>>;
|
|
26
|
+
labels: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
27
|
+
isUncompletable: z.ZodOptional<z.ZodBoolean>;
|
|
28
|
+
}, z.core.$strip>>;
|
|
29
|
+
};
|
|
30
|
+
outputSchema: {
|
|
31
|
+
tasks: z.ZodArray<z.ZodObject<{
|
|
32
|
+
id: z.ZodString;
|
|
33
|
+
content: z.ZodString;
|
|
34
|
+
description: z.ZodString;
|
|
35
|
+
dueDate: z.ZodOptional<z.ZodString>;
|
|
36
|
+
recurring: z.ZodUnion<readonly [z.ZodBoolean, z.ZodString]>;
|
|
37
|
+
deadlineDate: z.ZodOptional<z.ZodString>;
|
|
38
|
+
priority: z.ZodEnum<{
|
|
39
|
+
p1: "p1";
|
|
40
|
+
p2: "p2";
|
|
41
|
+
p3: "p3";
|
|
42
|
+
p4: "p4";
|
|
43
|
+
}>;
|
|
44
|
+
projectId: z.ZodString;
|
|
45
|
+
sectionId: z.ZodOptional<z.ZodString>;
|
|
46
|
+
parentId: z.ZodOptional<z.ZodString>;
|
|
47
|
+
labels: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
48
|
+
duration: z.ZodOptional<z.ZodString>;
|
|
49
|
+
responsibleUid: z.ZodOptional<z.ZodString>;
|
|
50
|
+
isUncompletable: z.ZodOptional<z.ZodBoolean>;
|
|
51
|
+
assignedByUid: z.ZodOptional<z.ZodString>;
|
|
52
|
+
isDeleted: z.ZodOptional<z.ZodBoolean>;
|
|
53
|
+
checked: z.ZodBoolean;
|
|
54
|
+
completedAt: z.ZodOptional<z.ZodString>;
|
|
55
|
+
addedAt: z.ZodOptional<z.ZodString>;
|
|
56
|
+
}, z.core.$strip>>;
|
|
57
|
+
totalCount: z.ZodNumber;
|
|
58
|
+
updatedTaskIds: z.ZodArray<z.ZodString>;
|
|
59
|
+
failures: z.ZodArray<z.ZodObject<{
|
|
60
|
+
item: z.ZodString;
|
|
61
|
+
error: z.ZodString;
|
|
62
|
+
code: z.ZodOptional<z.ZodString>;
|
|
63
|
+
}, z.core.$strip>>;
|
|
64
|
+
appliedOperations: z.ZodObject<{
|
|
65
|
+
updateCount: z.ZodNumber;
|
|
66
|
+
skippedCount: z.ZodNumber;
|
|
67
|
+
failureCount: z.ZodNumber;
|
|
68
|
+
redundantMovesSkipped: z.ZodNumber;
|
|
69
|
+
}, z.core.$strip>;
|
|
70
|
+
};
|
|
71
|
+
annotations: {
|
|
72
|
+
readOnlyHint: false;
|
|
73
|
+
destructiveHint: true;
|
|
74
|
+
idempotentHint: false;
|
|
75
|
+
openWorldHint: true;
|
|
76
|
+
};
|
|
77
|
+
execute(args: {
|
|
78
|
+
tasks: {
|
|
79
|
+
id: string;
|
|
80
|
+
content?: string | undefined;
|
|
81
|
+
description?: string | undefined;
|
|
82
|
+
projectId?: string | undefined;
|
|
83
|
+
sectionId?: string | undefined;
|
|
84
|
+
parentId?: string | undefined;
|
|
85
|
+
order?: number | undefined;
|
|
86
|
+
priority?: "p1" | "p2" | "p3" | "p4" | undefined;
|
|
87
|
+
dueString?: string | undefined;
|
|
88
|
+
replaceRecurrence?: boolean | undefined;
|
|
89
|
+
deadlineDate?: string | undefined;
|
|
90
|
+
duration?: string | undefined;
|
|
91
|
+
responsibleUser?: string | undefined;
|
|
92
|
+
labels?: string[] | undefined;
|
|
93
|
+
isUncompletable?: boolean | undefined;
|
|
94
|
+
}[];
|
|
95
|
+
}, client: TodoistApi): Promise<{
|
|
96
|
+
textContent: string;
|
|
97
|
+
structuredContent: {
|
|
98
|
+
tasks: {
|
|
99
|
+
id: string;
|
|
100
|
+
content: string;
|
|
101
|
+
description: string;
|
|
102
|
+
dueDate: string | undefined;
|
|
103
|
+
recurring: string | boolean;
|
|
104
|
+
deadlineDate: string | undefined;
|
|
105
|
+
priority: "p1" | "p2" | "p3" | "p4";
|
|
106
|
+
projectId: string;
|
|
107
|
+
sectionId: string | undefined;
|
|
108
|
+
parentId: string | undefined;
|
|
109
|
+
labels: string[];
|
|
110
|
+
duration: string | undefined;
|
|
111
|
+
responsibleUid: string | undefined;
|
|
112
|
+
assignedByUid: string | undefined;
|
|
113
|
+
isDeleted: true | undefined;
|
|
114
|
+
checked: boolean;
|
|
115
|
+
completedAt: string | undefined;
|
|
116
|
+
addedAt: string | undefined;
|
|
117
|
+
}[];
|
|
118
|
+
totalCount: number;
|
|
119
|
+
updatedTaskIds: string[];
|
|
120
|
+
failures: {
|
|
121
|
+
item: string;
|
|
122
|
+
error: string;
|
|
123
|
+
code?: string;
|
|
124
|
+
}[];
|
|
125
|
+
appliedOperations: {
|
|
126
|
+
updateCount: number;
|
|
127
|
+
skippedCount: number;
|
|
128
|
+
failureCount: number;
|
|
129
|
+
redundantMovesSkipped: number;
|
|
130
|
+
};
|
|
131
|
+
};
|
|
132
|
+
}>;
|
|
133
|
+
};
|
|
134
|
+
export { updateTasks };
|
|
135
|
+
//# sourceMappingURL=update-tasks.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"update-tasks.d.ts","sourceRoot":"","sources":["../../src/tools/update-tasks.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAIR,UAAU,EAEb,MAAM,oBAAoB,CAAA;AAC3B,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAiMvB,QAAA,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;sBAiOW,MAAM;uBAAS,MAAM;uBAAS,MAAM;;;;;;;;;;CARD,CAAA;AA0f/D,OAAO,EAAE,WAAW,EAAE,CAAA"}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { TodoistApi } from '@doist/todoist-sdk';
|
|
2
|
+
import { z } from 'zod';
|
|
3
|
+
type UserPlan = 'Todoist Free' | 'Todoist Pro' | 'Todoist Business';
|
|
4
|
+
type UserInfoStructured = Record<string, unknown> & {
|
|
5
|
+
type: 'user_info';
|
|
6
|
+
userId: string;
|
|
7
|
+
fullName: string;
|
|
8
|
+
timezone: string;
|
|
9
|
+
currentLocalTime: string;
|
|
10
|
+
startDay: number;
|
|
11
|
+
startDayName: string;
|
|
12
|
+
weekStartDate: string;
|
|
13
|
+
weekEndDate: string;
|
|
14
|
+
currentWeekNumber: number;
|
|
15
|
+
completedToday: number;
|
|
16
|
+
dailyGoal: number;
|
|
17
|
+
weeklyGoal: number;
|
|
18
|
+
email: string;
|
|
19
|
+
plan: UserPlan;
|
|
20
|
+
};
|
|
21
|
+
declare const userInfo: {
|
|
22
|
+
name: "user-info";
|
|
23
|
+
description: string;
|
|
24
|
+
parameters: {};
|
|
25
|
+
outputSchema: {
|
|
26
|
+
type: z.ZodLiteral<"user_info">;
|
|
27
|
+
userId: z.ZodString;
|
|
28
|
+
fullName: z.ZodString;
|
|
29
|
+
timezone: z.ZodString;
|
|
30
|
+
currentLocalTime: z.ZodString;
|
|
31
|
+
startDay: z.ZodNumber;
|
|
32
|
+
startDayName: z.ZodString;
|
|
33
|
+
weekStartDate: z.ZodString;
|
|
34
|
+
weekEndDate: z.ZodString;
|
|
35
|
+
currentWeekNumber: z.ZodNumber;
|
|
36
|
+
completedToday: z.ZodNumber;
|
|
37
|
+
dailyGoal: z.ZodNumber;
|
|
38
|
+
weeklyGoal: z.ZodNumber;
|
|
39
|
+
email: z.ZodString;
|
|
40
|
+
plan: z.ZodEnum<{
|
|
41
|
+
"Todoist Free": "Todoist Free";
|
|
42
|
+
"Todoist Pro": "Todoist Pro";
|
|
43
|
+
"Todoist Business": "Todoist Business";
|
|
44
|
+
}>;
|
|
45
|
+
};
|
|
46
|
+
annotations: {
|
|
47
|
+
readOnlyHint: true;
|
|
48
|
+
destructiveHint: false;
|
|
49
|
+
idempotentHint: true;
|
|
50
|
+
};
|
|
51
|
+
execute(_args: Record<string, never>, client: TodoistApi): Promise<{
|
|
52
|
+
textContent: string;
|
|
53
|
+
structuredContent: UserInfoStructured;
|
|
54
|
+
}>;
|
|
55
|
+
};
|
|
56
|
+
export { type UserInfoStructured, userInfo };
|
|
57
|
+
//# sourceMappingURL=user-info.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"user-info.d.ts","sourceRoot":"","sources":["../../src/tools/user-info.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAA;AACpD,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAyBvB,KAAK,QAAQ,GAAG,cAAc,GAAG,aAAa,GAAG,kBAAkB,CAAA;AAEnE,KAAK,kBAAkB,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG;IAChD,IAAI,EAAE,WAAW,CAAA;IACjB,MAAM,EAAE,MAAM,CAAA;IACd,QAAQ,EAAE,MAAM,CAAA;IAChB,QAAQ,EAAE,MAAM,CAAA;IAChB,gBAAgB,EAAE,MAAM,CAAA;IACxB,QAAQ,EAAE,MAAM,CAAA;IAChB,YAAY,EAAE,MAAM,CAAA;IACpB,aAAa,EAAE,MAAM,CAAA;IACrB,WAAW,EAAE,MAAM,CAAA;IACnB,iBAAiB,EAAE,MAAM,CAAA;IACzB,cAAc,EAAE,MAAM,CAAA;IACtB,SAAS,EAAE,MAAM,CAAA;IACjB,UAAU,EAAE,MAAM,CAAA;IAClB,KAAK,EAAE,MAAM,CAAA;IACb,IAAI,EAAE,QAAQ,CAAA;CACjB,CAAA;AAgJD,QAAA,MAAM,QAAQ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAeiD,CAAA;AAE/D,OAAO,EAAE,KAAK,kBAAkB,EAAE,QAAQ,EAAE,CAAA"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { ContentBlock } from '@modelcontextprotocol/server';
|
|
2
|
+
import { z } from 'zod';
|
|
3
|
+
declare const viewAttachment: {
|
|
4
|
+
name: "view-attachment";
|
|
5
|
+
description: string;
|
|
6
|
+
parameters: {
|
|
7
|
+
fileUrl: z.ZodURL;
|
|
8
|
+
};
|
|
9
|
+
annotations: {
|
|
10
|
+
readOnlyHint: true;
|
|
11
|
+
destructiveHint: false;
|
|
12
|
+
idempotentHint: true;
|
|
13
|
+
};
|
|
14
|
+
execute({ fileUrl }: {
|
|
15
|
+
fileUrl: string;
|
|
16
|
+
}, client: import('@doist/todoist-sdk').TodoistApi): Promise<{
|
|
17
|
+
textContent: string;
|
|
18
|
+
contentItems?: undefined;
|
|
19
|
+
} | {
|
|
20
|
+
textContent: string;
|
|
21
|
+
contentItems: ContentBlock[];
|
|
22
|
+
}>;
|
|
23
|
+
};
|
|
24
|
+
export { viewAttachment };
|
|
25
|
+
//# sourceMappingURL=view-attachment.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"view-attachment.d.ts","sourceRoot":"","sources":["../../src/tools/view-attachment.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAA;AAChE,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAoFvB,QAAA,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;CAuEsB,CAAA;AAE1C,OAAO,EAAE,cAAc,EAAE,CAAA"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { CustomFetch, TodoistApi } from '@doist/todoist-sdk';
|
|
2
|
+
declare const TODOIST_MCP_VERSION: string;
|
|
3
|
+
type UsageTrackingConfig = {
|
|
4
|
+
enabled?: boolean;
|
|
5
|
+
platform?: string;
|
|
6
|
+
sessionId?: string;
|
|
7
|
+
};
|
|
8
|
+
type DefaultTransport = {
|
|
9
|
+
dispatcher: unknown;
|
|
10
|
+
fetch?: typeof fetch;
|
|
11
|
+
};
|
|
12
|
+
type DispatcherModule = {
|
|
13
|
+
getDefaultTransport: () => Promise<DefaultTransport | undefined>;
|
|
14
|
+
};
|
|
15
|
+
export declare function normalizeUsageLabel(label: string): string;
|
|
16
|
+
export declare function runWithUsageTrackingContext<T>(label: string, fn: () => T): T;
|
|
17
|
+
export declare function buildUsageTrackingHeaders({ label, platform, sessionId, }?: {
|
|
18
|
+
label?: string;
|
|
19
|
+
platform?: string;
|
|
20
|
+
sessionId?: string;
|
|
21
|
+
}): Record<string, string>;
|
|
22
|
+
export declare function resetDefaultDispatcherForTests(): Promise<void>;
|
|
23
|
+
export declare function setDispatcherModuleLoaderForTests(loader: () => Promise<DispatcherModule>): void;
|
|
24
|
+
export declare function resetDispatcherModuleLoaderForTests(): void;
|
|
25
|
+
/**
|
|
26
|
+
* Sends a request the way the SDK sends its own: through its default dispatcher, which honours
|
|
27
|
+
* `HTTP_PROXY`, `HTTPS_PROXY` and `NO_PROXY`, with the `fetch` paired to it.
|
|
28
|
+
*/
|
|
29
|
+
export declare function fetchThroughSdkTransport(url: string | URL, init: RequestInit): Promise<Response>;
|
|
30
|
+
export declare function createTrackedFetch(baseFetch?: typeof fetch, tracking?: UsageTrackingConfig): CustomFetch;
|
|
31
|
+
export declare function createTodoistClient(apiKey: string, { baseUrl, tracking, }?: {
|
|
32
|
+
baseUrl?: string;
|
|
33
|
+
tracking?: UsageTrackingConfig;
|
|
34
|
+
}): TodoistApi;
|
|
35
|
+
export { TODOIST_MCP_VERSION };
|
|
36
|
+
//# sourceMappingURL=usage-tracking.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"usage-tracking.d.ts","sourceRoot":"","sources":["../src/usage-tracking.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,WAAW,EAA4B,UAAU,EAAE,MAAM,oBAAoB,CAAA;AAK3F,QAAA,MAAM,mBAAmB,QAAsB,CAAA;AAI/C,KAAK,mBAAmB,GAAG;IACvB,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,SAAS,CAAC,EAAE,MAAM,CAAA;CACrB,CAAA;AAED,KAAK,gBAAgB,GAAG;IACpB,UAAU,EAAE,OAAO,CAAA;IACnB,KAAK,CAAC,EAAE,OAAO,KAAK,CAAA;CACvB,CAAA;AAED,KAAK,gBAAgB,GAAG;IACpB,mBAAmB,EAAE,MAAM,OAAO,CAAC,gBAAgB,GAAG,SAAS,CAAC,CAAA;CACnE,CAAA;AAcD,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAEzD;AAED,wBAAgB,2BAA2B,CAAC,CAAC,EAAE,KAAK,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,CAAC,GAAG,CAAC,CAE5E;AAED,wBAAgB,yBAAyB,CAAC,EACtC,KAAK,EACL,QAAgB,EAChB,SAAwB,GAC3B,GAAE;IACC,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,SAAS,CAAC,EAAE,MAAM,CAAA;CAChB,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAW9B;AAkGD,wBAAsB,8BAA8B,IAAI,OAAO,CAAC,IAAI,CAAC,CAcpE;AAED,wBAAgB,iCAAiC,CAAC,MAAM,EAAE,MAAM,OAAO,CAAC,gBAAgB,CAAC,GAAG,IAAI,CAE/F;AAED,wBAAgB,mCAAmC,IAAI,IAAI,CAE1D;AAuBD;;;GAGG;AACH,wBAAsB,wBAAwB,CAC1C,GAAG,EAAE,MAAM,GAAG,GAAG,EACjB,IAAI,EAAE,WAAW,GAClB,OAAO,CAAC,QAAQ,CAAC,CAInB;AAcD,wBAAgB,kBAAkB,CAC9B,SAAS,GAAE,OAAO,KAAwB,EAC1C,QAAQ,GAAE,mBAAwB,GACnC,WAAW,CA+Bb;AAED,wBAAgB,mBAAmB,CAC/B,MAAM,EAAE,MAAM,EACd,EACI,OAAO,EACP,QAAQ,GACX,GAAE;IACC,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,QAAQ,CAAC,EAAE,mBAAmB,CAAA;CAC5B,GACP,UAAU,CAUZ;AAED,OAAO,EAAE,mBAAmB,EAAE,CAAA"}
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import { TodoistApi } from '@doist/todoist-sdk';
|
|
2
|
+
import { ResolvedUser } from './user-resolver.js';
|
|
3
|
+
export declare const AssignmentErrorType: {
|
|
4
|
+
readonly USER_NOT_FOUND: "USER_NOT_FOUND";
|
|
5
|
+
readonly USER_NOT_COLLABORATOR: "USER_NOT_COLLABORATOR";
|
|
6
|
+
readonly PROJECT_NOT_SHARED: "PROJECT_NOT_SHARED";
|
|
7
|
+
readonly TASK_NOT_ACCESSIBLE: "TASK_NOT_ACCESSIBLE";
|
|
8
|
+
readonly PERMISSION_DENIED: "PERMISSION_DENIED";
|
|
9
|
+
readonly PROJECT_NOT_FOUND: "PROJECT_NOT_FOUND";
|
|
10
|
+
readonly TASK_NOT_FOUND: "TASK_NOT_FOUND";
|
|
11
|
+
};
|
|
12
|
+
export type AssignmentErrorType = (typeof AssignmentErrorType)[keyof typeof AssignmentErrorType];
|
|
13
|
+
export type ValidationError = {
|
|
14
|
+
type: AssignmentErrorType;
|
|
15
|
+
message: string;
|
|
16
|
+
suggestions?: string[];
|
|
17
|
+
};
|
|
18
|
+
export type ValidationResult = {
|
|
19
|
+
isValid: boolean;
|
|
20
|
+
resolvedUser?: ResolvedUser;
|
|
21
|
+
error?: ValidationError;
|
|
22
|
+
taskId?: string;
|
|
23
|
+
projectId?: string;
|
|
24
|
+
};
|
|
25
|
+
export type Assignment = {
|
|
26
|
+
taskId?: string;
|
|
27
|
+
projectId: string;
|
|
28
|
+
responsibleUid: string;
|
|
29
|
+
};
|
|
30
|
+
export declare class AssignmentValidator {
|
|
31
|
+
/**
|
|
32
|
+
* Validate a single assignment operation
|
|
33
|
+
*/
|
|
34
|
+
validateAssignment(client: TodoistApi, assignment: Assignment): Promise<ValidationResult>;
|
|
35
|
+
/**
|
|
36
|
+
* Validate multiple assignment operations in bulk
|
|
37
|
+
*/
|
|
38
|
+
validateBulkAssignment(client: TodoistApi, assignments: Assignment[]): Promise<ValidationResult[]>;
|
|
39
|
+
/**
|
|
40
|
+
* Validate assignment for task creation (no taskId required)
|
|
41
|
+
*/
|
|
42
|
+
validateTaskCreationAssignment(client: TodoistApi, projectId: string, responsibleUid: string): Promise<ValidationResult>;
|
|
43
|
+
/**
|
|
44
|
+
* Validate assignment for task update
|
|
45
|
+
*/
|
|
46
|
+
validateTaskUpdateAssignment(client: TodoistApi, taskId: string, responsibleUid: string | null): Promise<ValidationResult>;
|
|
47
|
+
/**
|
|
48
|
+
* Get detailed assignment eligibility information for troubleshooting
|
|
49
|
+
*/
|
|
50
|
+
getAssignmentEligibility(client: TodoistApi, projectId: string, responsibleUid: string, taskIds?: string[]): Promise<{
|
|
51
|
+
canAssign: boolean;
|
|
52
|
+
projectInfo: {
|
|
53
|
+
name: string;
|
|
54
|
+
isShared: boolean;
|
|
55
|
+
collaboratorCount: number;
|
|
56
|
+
};
|
|
57
|
+
userInfo?: {
|
|
58
|
+
resolvedName: string;
|
|
59
|
+
isCollaborator: boolean;
|
|
60
|
+
};
|
|
61
|
+
taskInfo?: {
|
|
62
|
+
accessibleTasks: number;
|
|
63
|
+
inaccessibleTasks: number;
|
|
64
|
+
};
|
|
65
|
+
recommendations: string[];
|
|
66
|
+
}>;
|
|
67
|
+
}
|
|
68
|
+
export declare const assignmentValidator: AssignmentValidator;
|
|
69
|
+
//# sourceMappingURL=assignment-validator.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"assignment-validator.d.ts","sourceRoot":"","sources":["../../src/utils/assignment-validator.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAA;AAEpD,OAAO,EAAE,KAAK,YAAY,EAAgB,MAAM,oBAAoB,CAAA;AAEpE,eAAO,MAAM,mBAAmB;;;;;;;;CAQtB,CAAA;AAEV,MAAM,MAAM,mBAAmB,GAAG,CAAC,OAAO,mBAAmB,CAAC,CAAC,MAAM,OAAO,mBAAmB,CAAC,CAAA;AAEhG,MAAM,MAAM,eAAe,GAAG;IAC1B,IAAI,EAAE,mBAAmB,CAAA;IACzB,OAAO,EAAE,MAAM,CAAA;IACf,WAAW,CAAC,EAAE,MAAM,EAAE,CAAA;CACzB,CAAA;AAED,MAAM,MAAM,gBAAgB,GAAG;IAC3B,OAAO,EAAE,OAAO,CAAA;IAChB,YAAY,CAAC,EAAE,YAAY,CAAA;IAC3B,KAAK,CAAC,EAAE,eAAe,CAAA;IACvB,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,SAAS,CAAC,EAAE,MAAM,CAAA;CACrB,CAAA;AAED,MAAM,MAAM,UAAU,GAAG;IACrB,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,SAAS,EAAE,MAAM,CAAA;IACjB,cAAc,EAAE,MAAM,CAAA;CACzB,CAAA;AAED,qBAAa,mBAAmB;IAC5B;;OAEG;IACG,kBAAkB,CACpB,MAAM,EAAE,UAAU,EAClB,UAAU,EAAE,UAAU,GACvB,OAAO,CAAC,gBAAgB,CAAC;IAqH5B;;OAEG;IACG,sBAAsB,CACxB,MAAM,EAAE,UAAU,EAClB,WAAW,EAAE,UAAU,EAAE,GAC1B,OAAO,CAAC,gBAAgB,EAAE,CAAC;IAS9B;;OAEG;IACG,8BAA8B,CAChC,MAAM,EAAE,UAAU,EAClB,SAAS,EAAE,MAAM,EACjB,cAAc,EAAE,MAAM,GACvB,OAAO,CAAC,gBAAgB,CAAC;IAO5B;;OAEG;IACG,4BAA4B,CAC9B,MAAM,EAAE,UAAU,EAClB,MAAM,EAAE,MAAM,EACd,cAAc,EAAE,MAAM,GAAG,IAAI,GAC9B,OAAO,CAAC,gBAAgB,CAAC;IAkC5B;;OAEG;IACG,wBAAwB,CAC1B,MAAM,EAAE,UAAU,EAClB,SAAS,EAAE,MAAM,EACjB,cAAc,EAAE,MAAM,EACtB,OAAO,CAAC,EAAE,MAAM,EAAE,GACnB,OAAO,CAAC;QACP,SAAS,EAAE,OAAO,CAAA;QAClB,WAAW,EAAE;YACT,IAAI,EAAE,MAAM,CAAA;YACZ,QAAQ,EAAE,OAAO,CAAA;YACjB,iBAAiB,EAAE,MAAM,CAAA;SAC5B,CAAA;QACD,QAAQ,CAAC,EAAE;YACP,YAAY,EAAE,MAAM,CAAA;YACpB,cAAc,EAAE,OAAO,CAAA;SAC1B,CAAA;QACD,QAAQ,CAAC,EAAE;YACP,eAAe,EAAE,MAAM,CAAA;YACvB,iBAAiB,EAAE,MAAM,CAAA;SAC5B,CAAA;QACD,eAAe,EAAE,MAAM,EAAE,CAAA;KAC5B,CAAC;CAqFL;AAGD,eAAO,MAAM,mBAAmB,qBAA4B,CAAA"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { FailureSchema } from './output-schemas.js';
|
|
3
|
+
import { ToolName } from './tool-names.js';
|
|
4
|
+
type BatchFailure = z.infer<typeof FailureSchema>;
|
|
5
|
+
/**
|
|
6
|
+
* Records the items a batch tool could not act on.
|
|
7
|
+
*
|
|
8
|
+
* These failures are reported in the tool result rather than thrown, so the
|
|
9
|
+
* server answers 200 and logs nothing while the caller's items stay untouched.
|
|
10
|
+
* A whole batch can fail on an expired token or a dropped connection with no
|
|
11
|
+
* trace on this side, which leaves nothing to diagnose from afterwards.
|
|
12
|
+
*
|
|
13
|
+
* @param toolName - The tool that ran the batch, for the log prefix.
|
|
14
|
+
* @param total - How many items the caller asked for.
|
|
15
|
+
* @param failures - The items that failed, as reported in the result.
|
|
16
|
+
* @param options.redactItems - Set where `item` is the caller's own text rather
|
|
17
|
+
* than an identifier, e.g. a task title. That text can carry personal data and
|
|
18
|
+
* must not reach server logs; the error and its code carry the diagnosis anyway.
|
|
19
|
+
* Quoted text inside each error is always redacted, for the same reason.
|
|
20
|
+
*/
|
|
21
|
+
export declare function logBatchFailures(toolName: ToolName, total: number, failures: ReadonlyArray<BatchFailure>, options?: {
|
|
22
|
+
redactItems?: boolean;
|
|
23
|
+
}): void;
|
|
24
|
+
export {};
|
|
25
|
+
//# sourceMappingURL=batch-failures.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"batch-failures.d.ts","sourceRoot":"","sources":["../../src/utils/batch-failures.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAE5B,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAA;AACxD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAA;AAE/C,KAAK,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,aAAa,CAAC,CAAA;AAWjD;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,gBAAgB,CAC5B,QAAQ,EAAE,QAAQ,EAClB,KAAK,EAAE,MAAM,EACb,QAAQ,EAAE,aAAa,CAAC,YAAY,CAAC,EACrC,OAAO,GAAE;IAAE,WAAW,CAAC,EAAE,OAAO,CAAA;CAAO,GACxC,IAAI,CAkBN"}
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import { TodoistApi } from '@doist/todoist-sdk';
|
|
2
|
+
import { z } from 'zod';
|
|
3
|
+
import { Project } from '../tool-helpers.js';
|
|
4
|
+
declare const ChildTaskSchema: z.ZodObject<{
|
|
5
|
+
content: z.ZodString;
|
|
6
|
+
id: z.ZodString;
|
|
7
|
+
checked: z.ZodBoolean;
|
|
8
|
+
dueDate: z.ZodOptional<z.ZodString>;
|
|
9
|
+
hasChildren: z.ZodBoolean;
|
|
10
|
+
}, z.core.$strip>;
|
|
11
|
+
declare const ChildProjectSchema: z.ZodObject<{
|
|
12
|
+
name: z.ZodString;
|
|
13
|
+
id: z.ZodString;
|
|
14
|
+
hasChildren: z.ZodBoolean;
|
|
15
|
+
}, z.core.$strip>;
|
|
16
|
+
/**
|
|
17
|
+
* Output schema fragment for tools that can return an object's direct children.
|
|
18
|
+
* Spread it into the tool's own output schema.
|
|
19
|
+
*/
|
|
20
|
+
declare const ChildrenOutputSchema: {
|
|
21
|
+
childCount: z.ZodOptional<z.ZodNumber>;
|
|
22
|
+
children: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
|
|
23
|
+
content: z.ZodString;
|
|
24
|
+
id: z.ZodString;
|
|
25
|
+
checked: z.ZodBoolean;
|
|
26
|
+
dueDate: z.ZodOptional<z.ZodString>;
|
|
27
|
+
hasChildren: z.ZodBoolean;
|
|
28
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
29
|
+
name: z.ZodString;
|
|
30
|
+
id: z.ZodString;
|
|
31
|
+
hasChildren: z.ZodBoolean;
|
|
32
|
+
}, z.core.$strip>]>>>;
|
|
33
|
+
hasMoreChildren: z.ZodOptional<z.ZodBoolean>;
|
|
34
|
+
childrenError: z.ZodOptional<z.ZodString>;
|
|
35
|
+
};
|
|
36
|
+
type ChildSummary = z.infer<typeof ChildTaskSchema> | z.infer<typeof ChildProjectSchema>;
|
|
37
|
+
type ChildrenResult = {
|
|
38
|
+
childCount?: number;
|
|
39
|
+
children?: ChildSummary[];
|
|
40
|
+
hasMoreChildren?: boolean;
|
|
41
|
+
childrenError?: string;
|
|
42
|
+
};
|
|
43
|
+
/**
|
|
44
|
+
* Fetches the direct subtasks of a task, flagging which of them nest further.
|
|
45
|
+
*
|
|
46
|
+
* The API exposes no child count on a task, so each child needs its own probe.
|
|
47
|
+
* That keeps the cost proportional to the number of subtasks rather than to the
|
|
48
|
+
* size of the project, which matters because the common case is a task with none.
|
|
49
|
+
*/
|
|
50
|
+
declare function getTaskChildren(client: TodoistApi, taskId: string): Promise<ChildrenResult>;
|
|
51
|
+
/**
|
|
52
|
+
* Fetches the direct sub-projects of a project, flagging which of them nest further.
|
|
53
|
+
*
|
|
54
|
+
* Projects cannot be filtered by parent server-side, so the hierarchy is derived
|
|
55
|
+
* from a single fetch of every active project.
|
|
56
|
+
*/
|
|
57
|
+
declare function getProjectChildren(client: TodoistApi, project: Project): Promise<ChildrenResult>;
|
|
58
|
+
/**
|
|
59
|
+
* Runs a children lookup without letting its failure sink the fetch it belongs to.
|
|
60
|
+
* The error is reported rather than swallowed: a missing childCount would otherwise
|
|
61
|
+
* read as "no children", which is the exact mistake these fields exist to prevent.
|
|
62
|
+
*/
|
|
63
|
+
declare function resolveChildren(load: () => Promise<ChildrenResult>): Promise<ChildrenResult>;
|
|
64
|
+
/** Renders a children result as a suffix for a tool's one-line text summary. */
|
|
65
|
+
declare function formatChildrenSummary(label: string, result: ChildrenResult): string;
|
|
66
|
+
export { ChildrenOutputSchema, formatChildrenSummary, getProjectChildren, getTaskChildren, resolveChildren, };
|
|
67
|
+
export type { ChildrenResult };
|
|
68
|
+
//# sourceMappingURL=children.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"children.d.ts","sourceRoot":"","sources":["../../src/utils/children.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAmB,UAAU,EAAE,MAAM,oBAAoB,CAAA;AACrE,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AACvB,OAAO,EAA6C,KAAK,OAAO,EAAE,MAAM,oBAAoB,CAAA;AAI5F,QAAA,MAAM,eAAe;;;;;;iBAWnB,CAAA;AAEF,QAAA,MAAM,kBAAkB;;;;iBAMtB,CAAA;AAEF;;;GAGG;AACH,QAAA,MAAM,oBAAoB;;;;;;;;;;;;;;;CAyBzB,CAAA;AAED,KAAK,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,eAAe,CAAC,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAA;AAExF,KAAK,cAAc,GAAG;IAClB,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,QAAQ,CAAC,EAAE,YAAY,EAAE,CAAA;IACzB,eAAe,CAAC,EAAE,OAAO,CAAA;IACzB,aAAa,CAAC,EAAE,MAAM,CAAA;CACzB,CAAA;AAED;;;;;;GAMG;AACH,iBAAe,eAAe,CAAC,MAAM,EAAE,UAAU,EAAE,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,cAAc,CAAC,CA8B1F;AAED;;;;;GAKG;AACH,iBAAe,kBAAkB,CAAC,MAAM,EAAE,UAAU,EAAE,OAAO,EAAE,OAAO,GAAG,OAAO,CAAC,cAAc,CAAC,CA4B/F;AAED;;;;GAIG;AACH,iBAAe,eAAe,CAAC,IAAI,EAAE,MAAM,OAAO,CAAC,cAAc,CAAC,GAAG,OAAO,CAAC,cAAc,CAAC,CAM3F;AAED,gFAAgF;AAChF,iBAAS,qBAAqB,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,cAAc,GAAG,MAAM,CAO5E;AAED,OAAO,EACH,oBAAoB,EACpB,qBAAqB,EACrB,kBAAkB,EAClB,eAAe,EACf,eAAe,GAClB,CAAA;AACD,YAAY,EAAE,cAAc,EAAE,CAAA"}
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const ColorSchema: z.ZodPreprocess<z.ZodOptional<z.ZodEnum<{
|
|
3
|
+
berry_red: "berry_red";
|
|
4
|
+
red: "red";
|
|
5
|
+
orange: "orange";
|
|
6
|
+
yellow: "yellow";
|
|
7
|
+
olive_green: "olive_green";
|
|
8
|
+
lime_green: "lime_green";
|
|
9
|
+
green: "green";
|
|
10
|
+
mint_green: "mint_green";
|
|
11
|
+
teal: "teal";
|
|
12
|
+
sky_blue: "sky_blue";
|
|
13
|
+
light_blue: "light_blue";
|
|
14
|
+
blue: "blue";
|
|
15
|
+
grape: "grape";
|
|
16
|
+
violet: "violet";
|
|
17
|
+
lavender: "lavender";
|
|
18
|
+
magenta: "magenta";
|
|
19
|
+
salmon: "salmon";
|
|
20
|
+
charcoal: "charcoal";
|
|
21
|
+
grey: "grey";
|
|
22
|
+
taupe: "taupe";
|
|
23
|
+
}>>, unknown>;
|
|
24
|
+
export declare const ColorKeySchema: z.ZodEnum<{
|
|
25
|
+
berry_red: "berry_red";
|
|
26
|
+
red: "red";
|
|
27
|
+
orange: "orange";
|
|
28
|
+
yellow: "yellow";
|
|
29
|
+
olive_green: "olive_green";
|
|
30
|
+
lime_green: "lime_green";
|
|
31
|
+
green: "green";
|
|
32
|
+
mint_green: "mint_green";
|
|
33
|
+
teal: "teal";
|
|
34
|
+
sky_blue: "sky_blue";
|
|
35
|
+
light_blue: "light_blue";
|
|
36
|
+
blue: "blue";
|
|
37
|
+
grape: "grape";
|
|
38
|
+
violet: "violet";
|
|
39
|
+
lavender: "lavender";
|
|
40
|
+
magenta: "magenta";
|
|
41
|
+
salmon: "salmon";
|
|
42
|
+
charcoal: "charcoal";
|
|
43
|
+
grey: "grey";
|
|
44
|
+
taupe: "taupe";
|
|
45
|
+
}>;
|
|
46
|
+
export declare const ColorOutputSchema: z.ZodCatch<z.ZodOptional<z.ZodEnum<{
|
|
47
|
+
berry_red: "berry_red";
|
|
48
|
+
red: "red";
|
|
49
|
+
orange: "orange";
|
|
50
|
+
yellow: "yellow";
|
|
51
|
+
olive_green: "olive_green";
|
|
52
|
+
lime_green: "lime_green";
|
|
53
|
+
green: "green";
|
|
54
|
+
mint_green: "mint_green";
|
|
55
|
+
teal: "teal";
|
|
56
|
+
sky_blue: "sky_blue";
|
|
57
|
+
light_blue: "light_blue";
|
|
58
|
+
blue: "blue";
|
|
59
|
+
grape: "grape";
|
|
60
|
+
violet: "violet";
|
|
61
|
+
lavender: "lavender";
|
|
62
|
+
magenta: "magenta";
|
|
63
|
+
salmon: "salmon";
|
|
64
|
+
charcoal: "charcoal";
|
|
65
|
+
grey: "grey";
|
|
66
|
+
taupe: "taupe";
|
|
67
|
+
}>>>;
|
|
68
|
+
//# sourceMappingURL=colors.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"colors.d.ts","sourceRoot":"","sources":["../../src/utils/colors.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAmBvB,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;aAEO,CAAA;AAG/B,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;EAAoB,CAAA;AAQ/C,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;IAAgD,CAAA"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { Task, TodoistApi } from '@doist/todoist-sdk';
|
|
2
|
+
/** Value that tells `add-comments` to post without notifying anyone. */
|
|
3
|
+
export declare const NO_NOTIFY_KEYWORD = "none";
|
|
4
|
+
export type CommentTarget = {
|
|
5
|
+
taskId: string;
|
|
6
|
+
projectId?: never;
|
|
7
|
+
} | {
|
|
8
|
+
projectId: string;
|
|
9
|
+
taskId?: never;
|
|
10
|
+
};
|
|
11
|
+
/** Whether a `notifyUsers` list is the explicit "notify nobody" opt-out. */
|
|
12
|
+
export declare function isNoNotifyList(notifyUsers: string[]): boolean;
|
|
13
|
+
/**
|
|
14
|
+
* Work out who Todoist's own clients would notify about a new comment.
|
|
15
|
+
*
|
|
16
|
+
* The API notifies exactly the people it is handed and derives nobody itself,
|
|
17
|
+
* so a comment posted without recipients notifies no one — and, because a reply
|
|
18
|
+
* takes its recipients from the comment before it, silences the next comment in
|
|
19
|
+
* the thread too. Mirroring the clients here keeps that chain intact:
|
|
20
|
+
*
|
|
21
|
+
* - replying to an existing thread notifies the previous comment's participants
|
|
22
|
+
* - the first comment on a task notifies its assignee, assigner and creator
|
|
23
|
+
* - the first comment on a project notifies nobody, as a project has no assignee
|
|
24
|
+
*
|
|
25
|
+
* The comment's own author is never a recipient.
|
|
26
|
+
*
|
|
27
|
+
* @param client - Todoist API client
|
|
28
|
+
* @param target - The task or project being commented on
|
|
29
|
+
* @param currentUserId - The authenticated user, excluded from the result
|
|
30
|
+
* @param getTask - Reads the task being commented on, so a caller that also
|
|
31
|
+
* needs it can share the one request
|
|
32
|
+
* @returns User IDs to notify, deduplicated
|
|
33
|
+
*/
|
|
34
|
+
export declare function getDefaultCommentRecipients(client: TodoistApi, target: CommentTarget, currentUserId: string, getTask?: (taskId: string) => Promise<Task>): Promise<string[]>;
|
|
35
|
+
//# sourceMappingURL=comment-recipients.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"comment-recipients.d.ts","sourceRoot":"","sources":["../../src/utils/comment-recipients.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAgC,IAAI,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAA;AAExF,wEAAwE;AACxE,eAAO,MAAM,iBAAiB,SAAS,CAAA;AAEvC,MAAM,MAAM,aAAa,GACnB;IAAE,MAAM,EAAE,MAAM,CAAC;IAAC,SAAS,CAAC,EAAE,KAAK,CAAA;CAAE,GACrC;IAAE,SAAS,EAAE,MAAM,CAAC;IAAC,MAAM,CAAC,EAAE,KAAK,CAAA;CAAE,CAAA;AAE3C,4EAA4E;AAC5E,wBAAgB,cAAc,CAAC,WAAW,EAAE,MAAM,EAAE,GAAG,OAAO,CAE7D;AAED;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,wBAAsB,2BAA2B,CAC7C,MAAM,EAAE,UAAU,EAClB,MAAM,EAAE,aAAa,EACrB,aAAa,EAAE,MAAM,EACrB,OAAO,GAAE,CAAC,MAAM,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAsC,GAChF,OAAO,CAAC,MAAM,EAAE,CAAC,CAgBnB"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Wraps a task so it only runs once a slot is free.
|
|
3
|
+
*/
|
|
4
|
+
type Limiter = <T>(fn: () => Promise<T>) => Promise<T>;
|
|
5
|
+
type TrackedLimiter = Limiter & {
|
|
6
|
+
/** Whether no task is running or waiting for this limiter. */
|
|
7
|
+
isIdle: () => boolean;
|
|
8
|
+
};
|
|
9
|
+
/**
|
|
10
|
+
* A FIFO semaphore. Tasks beyond `maxConcurrent` queue and start as slots free up.
|
|
11
|
+
*
|
|
12
|
+
* Deliberately applied at the tool layer rather than inside the SDK's
|
|
13
|
+
* `customFetch`: the SDK installs its request-timeout `AbortSignal` *before*
|
|
14
|
+
* calling `customFetch`, so gating there would charge queue time against the
|
|
15
|
+
* request timeout and fail long-queued requests that never actually ran.
|
|
16
|
+
*
|
|
17
|
+
* That same property is why queued tasks need their own deadline. A task's request
|
|
18
|
+
* timeout only starts once it reaches the front of the queue, so without one a task
|
|
19
|
+
* can wait indefinitely — long past the point its caller gave up — and then still
|
|
20
|
+
* issue its request. `queueTimeoutMs` bounds the wait instead, failing the task with
|
|
21
|
+
* a reason that says the request was never sent.
|
|
22
|
+
*/
|
|
23
|
+
declare function createLimiter(maxConcurrent: number, { queueTimeoutMs }?: {
|
|
24
|
+
queueTimeoutMs?: number;
|
|
25
|
+
}): TrackedLimiter;
|
|
26
|
+
/** Records the account key so each limited operation can resolve its current pair. */
|
|
27
|
+
declare function registerClientLimiters(client: object, apiKey: string): void;
|
|
28
|
+
declare function getMoveLimiter(client: object): Limiter;
|
|
29
|
+
declare function getWriteLimiter(client: object): Limiter;
|
|
30
|
+
/** Test-only: drops all registered limiters so cases start from a clean slate. */
|
|
31
|
+
declare function resetLimitersForTesting({ maxAccountLimiters, }?: {
|
|
32
|
+
maxAccountLimiters?: number;
|
|
33
|
+
}): void;
|
|
34
|
+
export { createLimiter, getMoveLimiter, getWriteLimiter, type Limiter, registerClientLimiters, resetLimitersForTesting, };
|
|
35
|
+
//# sourceMappingURL=concurrency.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"concurrency.d.ts","sourceRoot":"","sources":["../../src/utils/concurrency.ts"],"names":[],"mappings":"AAGA;;GAEG;AACH,KAAK,OAAO,GAAG,CAAC,CAAC,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC,CAAC,CAAC,KAAK,OAAO,CAAC,CAAC,CAAC,CAAA;AAEtD,KAAK,cAAc,GAAG,OAAO,GAAG;IAC5B,8DAA8D;IAC9D,MAAM,EAAE,MAAM,OAAO,CAAA;CACxB,CAAA;AAeD;;;;;;;;;;;;;GAaG;AACH,iBAAS,aAAa,CAClB,aAAa,EAAE,MAAM,EACrB,EAAE,cAAgD,EAAE,GAAE;IAAE,cAAc,CAAC,EAAE,MAAM,CAAA;CAAO,GACvF,cAAc,CAgEhB;AAoKD,sFAAsF;AACtF,iBAAS,sBAAsB,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,IAAI,CAGpE;AAuBD,iBAAS,cAAc,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAE/C;AAED,iBAAS,eAAe,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAEhD;AAED,kFAAkF;AAClF,iBAAS,uBAAuB,CAAC,EAC7B,kBAAyC,GAC5C,GAAE;IAAE,kBAAkB,CAAC,EAAE,MAAM,CAAA;CAAO,GAAG,IAAI,CAM7C;AAED,OAAO,EACH,aAAa,EACb,cAAc,EACd,eAAe,EACf,KAAK,OAAO,EACZ,sBAAsB,EACtB,uBAAuB,GAC1B,CAAA"}
|