@doist/todoist-ai 8.7.0 → 8.7.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/filter-helpers.d.ts +51 -0
- package/dist/filter-helpers.d.ts.map +1 -0
- package/dist/index.d.ts +2866 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +98 -0
- package/dist/main-http.d.ts +3 -0
- package/dist/main-http.d.ts.map +1 -0
- package/dist/main-http.js +36 -0
- package/dist/main.d.ts +3 -0
- package/dist/main.d.ts.map +1 -0
- package/dist/main.js +17 -0
- package/dist/mcp-helpers.d.ts +58 -0
- package/dist/mcp-helpers.d.ts.map +1 -0
- package/dist/mcp-server-Eb2ZRWDB.js +5777 -0
- package/dist/mcp-server.d.ts +16 -0
- package/dist/mcp-server.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/todoist-tool.d.ts +62 -0
- package/dist/todoist-tool.d.ts.map +1 -0
- package/dist/tool-execution-error.d.ts +7 -0
- package/dist/tool-execution-error.d.ts.map +1 -0
- package/dist/tool-helpers.d.ts +264 -0
- package/dist/tool-helpers.d.ts.map +1 -0
- package/dist/tools/add-comments.d.ts +83 -0
- package/dist/tools/add-comments.d.ts.map +1 -0
- package/dist/tools/add-filters.d.ts +94 -0
- package/dist/tools/add-filters.d.ts.map +1 -0
- package/dist/tools/add-labels.d.ts +92 -0
- package/dist/tools/add-labels.d.ts.map +1 -0
- package/dist/tools/add-projects.d.ts +112 -0
- package/dist/tools/add-projects.d.ts.map +1 -0
- package/dist/tools/add-reminders.d.ts +141 -0
- package/dist/tools/add-reminders.d.ts.map +1 -0
- package/dist/tools/add-sections.d.ts +50 -0
- package/dist/tools/add-sections.d.ts.map +1 -0
- package/dist/tools/add-tasks.d.ts +118 -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/fetch-object.d.ts +199 -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 +91 -0
- package/dist/tools/find-activity.d.ts.map +1 -0
- package/dist/tools/find-comments.d.ts +89 -0
- package/dist/tools/find-comments.d.ts.map +1 -0
- package/dist/tools/find-completed-tasks.d.ts +115 -0
- package/dist/tools/find-completed-tasks.d.ts.map +1 -0
- package/dist/tools/find-filters.d.ts +92 -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 +84 -0
- package/dist/tools/find-project-collaborators.d.ts.map +1 -0
- package/dist/tools/find-projects.d.ts +87 -0
- package/dist/tools/find-projects.d.ts.map +1 -0
- package/dist/tools/find-reminders.d.ts +92 -0
- package/dist/tools/find-reminders.d.ts.map +1 -0
- package/dist/tools/find-sections.d.ts +41 -0
- package/dist/tools/find-sections.d.ts.map +1 -0
- package/dist/tools/find-tasks-by-date.d.ts +133 -0
- package/dist/tools/find-tasks-by-date.d.ts.map +1 -0
- package/dist/tools/find-tasks.d.ts +116 -0
- package/dist/tools/find-tasks.d.ts.map +1 -0
- package/dist/tools/get-overview.d.ts +122 -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 +112 -0
- package/dist/tools/get-project-health.d.ts.map +1 -0
- package/dist/tools/get-workspace-insights.d.ts +65 -0
- package/dist/tools/get-workspace-insights.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 +72 -0
- package/dist/tools/manage-assignments.d.ts.map +1 -0
- package/dist/tools/project-management.d.ts +78 -0
- package/dist/tools/project-management.d.ts.map +1 -0
- package/dist/tools/project-move.d.ts +88 -0
- package/dist/tools/project-move.d.ts.map +1 -0
- package/dist/tools/reorder-objects.d.ts +50 -0
- package/dist/tools/reorder-objects.d.ts.map +1 -0
- package/dist/tools/reschedule-tasks.d.ts +78 -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/uncomplete-tasks.d.ts +42 -0
- package/dist/tools/uncomplete-tasks.d.ts.map +1 -0
- package/dist/tools/update-comments.d.ts +87 -0
- package/dist/tools/update-comments.d.ts.map +1 -0
- package/dist/tools/update-filters.d.ts +106 -0
- package/dist/tools/update-filters.d.ts.map +1 -0
- package/dist/tools/update-projects.d.ts +120 -0
- package/dist/tools/update-projects.d.ts.map +1 -0
- package/dist/tools/update-reminders.d.ts +141 -0
- package/dist/tools/update-reminders.d.ts.map +1 -0
- package/dist/tools/update-sections.d.ts +52 -0
- package/dist/tools/update-sections.d.ts.map +1 -0
- package/dist/tools/update-tasks.d.ts +113 -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 +48 -0
- package/dist/tools/view-attachment.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/colors.d.ts +68 -0
- package/dist/utils/colors.d.ts.map +1 -0
- package/dist/utils/constants.d.ts +53 -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 +36 -0
- package/dist/utils/duration-parser.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/labels.d.ts +13 -0
- package/dist/utils/labels.d.ts.map +1 -0
- package/dist/utils/output-schemas.d.ts +191 -0
- package/dist/utils/output-schemas.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-schemas.d.ts +29 -0
- package/dist/utils/reminder-schemas.d.ts.map +1 -0
- package/dist/utils/response-builders.d.ts +93 -0
- package/dist/utils/response-builders.d.ts.map +1 -0
- package/dist/utils/sanitize-data.d.ts +10 -0
- package/dist/utils/sanitize-data.d.ts.map +1 -0
- package/dist/utils/test-helpers.d.ts +91 -0
- package/dist/utils/test-helpers.d.ts.map +1 -0
- package/dist/utils/tool-names.d.ts +55 -0
- package/dist/utils/tool-names.d.ts.map +1 -0
- package/dist/utils/user-resolver.d.ts +39 -0
- package/dist/utils/user-resolver.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 +2 -2
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
|
|
2
|
+
import { FEATURE_NAMES, Feature, FeatureName, Features } from './mcp-helpers.js';
|
|
3
|
+
/**
|
|
4
|
+
* Create the MCP server.
|
|
5
|
+
* @param todoistApiKey - The API key for the todoist account.
|
|
6
|
+
* @param baseUrl - The base URL for the todoist API.
|
|
7
|
+
* @param features - Features to enable for the server.
|
|
8
|
+
* @returns the MCP server.
|
|
9
|
+
*/
|
|
10
|
+
declare function getMcpServer({ todoistApiKey, baseUrl, features, }: {
|
|
11
|
+
todoistApiKey: string;
|
|
12
|
+
baseUrl?: string;
|
|
13
|
+
features?: Features;
|
|
14
|
+
}): McpServer;
|
|
15
|
+
export { FEATURE_NAMES, type Feature, type FeatureName, type Features, getMcpServer };
|
|
16
|
+
//# sourceMappingURL=mcp-server.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mcp-server.d.ts","sourceRoot":"","sources":["../src/mcp-server.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAA;AAGnE,OAAO,EACH,aAAa,EACb,KAAK,OAAO,EACZ,KAAK,WAAW,EAChB,KAAK,QAAQ,EAEhB,MAAM,kBAAkB,CAAA;AAgJzB;;;;;;GAMG;AACH,iBAAS,YAAY,CAAC,EAClB,aAAa,EACb,OAAO,EACP,QAAa,GAChB,EAAE;IACC,aAAa,EAAE,MAAM,CAAA;IACrB,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,QAAQ,CAAC,EAAE,QAAQ,CAAA;CACtB,aAuHA;AAED,OAAO,EAAE,aAAa,EAAE,KAAK,OAAO,EAAE,KAAK,WAAW,EAAE,KAAK,QAAQ,EAAE,YAAY,EAAE,CAAA"}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { GetPromptResult } from '@modelcontextprotocol/sdk/types.js';
|
|
2
|
+
import { z } from 'zod';
|
|
3
|
+
declare const argsSchema: {
|
|
4
|
+
period: z.ZodDefault<z.ZodEnum<{
|
|
5
|
+
today: "today";
|
|
6
|
+
"7d": "7d";
|
|
7
|
+
"14d": "14d";
|
|
8
|
+
"30d": "30d";
|
|
9
|
+
"this-week": "this-week";
|
|
10
|
+
"this-month": "this-month";
|
|
11
|
+
}>>;
|
|
12
|
+
focus: z.ZodDefault<z.ZodEnum<{
|
|
13
|
+
overall: "overall";
|
|
14
|
+
goals: "goals";
|
|
15
|
+
projects: "projects";
|
|
16
|
+
trends: "trends";
|
|
17
|
+
recommendations: "recommendations";
|
|
18
|
+
}>>;
|
|
19
|
+
projectId: z.ZodOptional<z.ZodString>;
|
|
20
|
+
};
|
|
21
|
+
type PromptArgs = z.infer<z.ZodObject<typeof argsSchema>>;
|
|
22
|
+
/**
|
|
23
|
+
* Compute the date range (since/until as YYYY-MM-DD) for a given period.
|
|
24
|
+
* Uses UTC since the prompt instructs the LLM to call user-info for timezone.
|
|
25
|
+
*/
|
|
26
|
+
declare function computeDateRange(period: PromptArgs['period'], now?: Date): {
|
|
27
|
+
since: string;
|
|
28
|
+
until: string;
|
|
29
|
+
periodDescription: string;
|
|
30
|
+
};
|
|
31
|
+
declare function buildPromptText(args: PromptArgs): string;
|
|
32
|
+
declare function callback(args: PromptArgs): GetPromptResult;
|
|
33
|
+
declare const productivityAnalysis: {
|
|
34
|
+
name: string;
|
|
35
|
+
title: string;
|
|
36
|
+
description: string;
|
|
37
|
+
argsSchema: {
|
|
38
|
+
period: z.ZodDefault<z.ZodEnum<{
|
|
39
|
+
today: "today";
|
|
40
|
+
"7d": "7d";
|
|
41
|
+
"14d": "14d";
|
|
42
|
+
"30d": "30d";
|
|
43
|
+
"this-week": "this-week";
|
|
44
|
+
"this-month": "this-month";
|
|
45
|
+
}>>;
|
|
46
|
+
focus: z.ZodDefault<z.ZodEnum<{
|
|
47
|
+
overall: "overall";
|
|
48
|
+
goals: "goals";
|
|
49
|
+
projects: "projects";
|
|
50
|
+
trends: "trends";
|
|
51
|
+
recommendations: "recommendations";
|
|
52
|
+
}>>;
|
|
53
|
+
projectId: z.ZodOptional<z.ZodString>;
|
|
54
|
+
};
|
|
55
|
+
callback: typeof callback;
|
|
56
|
+
};
|
|
57
|
+
export { productivityAnalysis, computeDateRange, buildPromptText };
|
|
58
|
+
//# sourceMappingURL=productivity-analysis.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"productivity-analysis.d.ts","sourceRoot":"","sources":["../../src/prompts/productivity-analysis.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,oCAAoC,CAAA;AACzE,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAEvB,QAAA,MAAM,UAAU;;;;;;;;;;;;;;;;;CAiBf,CAAA;AAED,KAAK,UAAU,GAAG,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,SAAS,CAAC,OAAO,UAAU,CAAC,CAAC,CAAA;AAEzD;;;GAGG;AACH,iBAAS,gBAAgB,CACrB,MAAM,EAAE,UAAU,CAAC,QAAQ,CAAC,EAC5B,GAAG,GAAE,IAAiB,GACvB;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAC;IAAC,iBAAiB,EAAE,MAAM,CAAA;CAAE,CA0D7D;AAwCD,iBAAS,eAAe,CAAC,IAAI,EAAE,UAAU,GAAG,MAAM,CAkCjD;AAED,iBAAS,QAAQ,CAAC,IAAI,EAAE,UAAU,GAAG,eAAe,CAYnD;AAED,QAAA,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;CAOzB,CAAA;AAED,OAAO,EAAE,oBAAoB,EAAE,gBAAgB,EAAE,eAAe,EAAE,CAAA"}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import { TodoistApi } from '@doist/todoist-api-typescript';
|
|
2
|
+
import { ContentBlock, ToolAnnotations } from '@modelcontextprotocol/sdk/types.js';
|
|
3
|
+
import { z } from 'zod';
|
|
4
|
+
type ExecuteResult<Output extends z.ZodRawShape> = Promise<{
|
|
5
|
+
textContent?: string;
|
|
6
|
+
structuredContent?: z.infer<z.ZodObject<Output>>;
|
|
7
|
+
contentItems?: ContentBlock[];
|
|
8
|
+
}>;
|
|
9
|
+
type RequiredToolAnnotations = ToolAnnotations & {
|
|
10
|
+
readOnlyHint: boolean;
|
|
11
|
+
destructiveHint: boolean;
|
|
12
|
+
idempotentHint: boolean;
|
|
13
|
+
};
|
|
14
|
+
/**
|
|
15
|
+
* A Todoist tool that can be used in an MCP server or other conversational AI interfaces.
|
|
16
|
+
*/
|
|
17
|
+
type TodoistTool<Params extends z.ZodRawShape, Output extends z.ZodRawShape> = {
|
|
18
|
+
/**
|
|
19
|
+
* The name of the tool.
|
|
20
|
+
*/
|
|
21
|
+
name: string;
|
|
22
|
+
/**
|
|
23
|
+
* The description of the tool. This is important for the LLM to understand what the tool does,
|
|
24
|
+
* and how to use it.
|
|
25
|
+
*/
|
|
26
|
+
description: string;
|
|
27
|
+
/**
|
|
28
|
+
* The schema of the parameters of the tool.
|
|
29
|
+
*
|
|
30
|
+
* This is used to validate the parameters of the tool, as well as to let the LLM know what the
|
|
31
|
+
* parameters are.
|
|
32
|
+
*/
|
|
33
|
+
parameters: Params;
|
|
34
|
+
/**
|
|
35
|
+
* The schema of the output of the tool.
|
|
36
|
+
*
|
|
37
|
+
* This is used to describe the structured output format that the tool will return.
|
|
38
|
+
*/
|
|
39
|
+
outputSchema: Output;
|
|
40
|
+
/**
|
|
41
|
+
* MCP ToolAnnotations hints for this tool.
|
|
42
|
+
*/
|
|
43
|
+
annotations: RequiredToolAnnotations;
|
|
44
|
+
/**
|
|
45
|
+
* The meta data of the tool.
|
|
46
|
+
*
|
|
47
|
+
* This is used to store additional information about the tool.
|
|
48
|
+
*/
|
|
49
|
+
_meta?: Record<string, unknown>;
|
|
50
|
+
/**
|
|
51
|
+
* The function that executes the tool.
|
|
52
|
+
*
|
|
53
|
+
* This is the main function that will be called when the tool is used.
|
|
54
|
+
*
|
|
55
|
+
* @param args - The arguments of the tool.
|
|
56
|
+
* @param client - The Todoist API client used to make requests to the Todoist API.
|
|
57
|
+
* @returns The result of the tool.
|
|
58
|
+
*/
|
|
59
|
+
execute: (args: z.infer<z.ZodObject<Params>>, client: TodoistApi) => ExecuteResult<Output>;
|
|
60
|
+
};
|
|
61
|
+
export type { RequiredToolAnnotations, TodoistTool };
|
|
62
|
+
//# sourceMappingURL=todoist-tool.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"todoist-tool.d.ts","sourceRoot":"","sources":["../src/todoist-tool.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,+BAA+B,CAAA;AAC/D,OAAO,KAAK,EAAE,YAAY,EAAE,eAAe,EAAE,MAAM,oCAAoC,CAAA;AACvF,OAAO,KAAK,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAE5B,KAAK,aAAa,CAAC,MAAM,SAAS,CAAC,CAAC,WAAW,IAAI,OAAO,CAAC;IACvD,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,iBAAiB,CAAC,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC,CAAA;IAChD,YAAY,CAAC,EAAE,YAAY,EAAE,CAAA;CAChC,CAAC,CAAA;AAEF,KAAK,uBAAuB,GAAG,eAAe,GAAG;IAC7C,YAAY,EAAE,OAAO,CAAA;IACrB,eAAe,EAAE,OAAO,CAAA;IACxB,cAAc,EAAE,OAAO,CAAA;CAC1B,CAAA;AAED;;GAEG;AACH,KAAK,WAAW,CAAC,MAAM,SAAS,CAAC,CAAC,WAAW,EAAE,MAAM,SAAS,CAAC,CAAC,WAAW,IAAI;IAC3E;;OAEG;IACH,IAAI,EAAE,MAAM,CAAA;IAEZ;;;OAGG;IACH,WAAW,EAAE,MAAM,CAAA;IAEnB;;;;;OAKG;IACH,UAAU,EAAE,MAAM,CAAA;IAElB;;;;OAIG;IACH,YAAY,EAAE,MAAM,CAAA;IAEpB;;OAEG;IACH,WAAW,EAAE,uBAAuB,CAAA;IAEpC;;;;OAIG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;IAE/B;;;;;;;;OAQG;IACH,OAAO,EAAE,CAAC,IAAI,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC,EAAE,MAAM,EAAE,UAAU,KAAK,aAAa,CAAC,MAAM,CAAC,CAAA;CAC7F,CAAA;AAED,YAAY,EAAE,uBAAuB,EAAE,WAAW,EAAE,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tool-execution-error.d.ts","sourceRoot":"","sources":["../src/tool-execution-error.ts"],"names":[],"mappings":"AAwbA;;;;GAIG;AACH,wBAAgB,wBAAwB,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,CAW/D"}
|
|
@@ -0,0 +1,264 @@
|
|
|
1
|
+
import { ActivityEvent, ColorKey, Comment, CurrentUser, Label, MoveTaskArgs, PersonalProject, Reminder, Section, Task, TodoistApi, WorkspaceProject } from '@doist/todoist-api-typescript';
|
|
2
|
+
export { appendToQuery, buildResponsibleUserQueryFilter, filterTasksByResponsibleUser, RESPONSIBLE_USER_FILTERING, type ResponsibleUserFiltering, resolveResponsibleUser, } from './filter-helpers.js';
|
|
3
|
+
export type Project = PersonalProject | WorkspaceProject;
|
|
4
|
+
export declare function isPersonalProject(project: Project): project is PersonalProject;
|
|
5
|
+
export declare function isWorkspaceProject(project: Project): project is WorkspaceProject;
|
|
6
|
+
/**
|
|
7
|
+
* Checks if a project ID represents the inbox (case-insensitive).
|
|
8
|
+
*
|
|
9
|
+
* @param projectId - The project ID to check
|
|
10
|
+
* @returns true if the project ID is inbox-like
|
|
11
|
+
*/
|
|
12
|
+
export declare function isInboxProjectId(projectId: string | undefined): boolean;
|
|
13
|
+
/**
|
|
14
|
+
* Resolves "inbox" project ID to actual inbox project ID (case-insensitive).
|
|
15
|
+
* Only makes API calls when necessary (when projectId is inbox-like and user not provided).
|
|
16
|
+
*
|
|
17
|
+
* @param args - Configuration object
|
|
18
|
+
* @param args.projectId - The project ID to resolve (may be "inbox", "Inbox", etc.)
|
|
19
|
+
* @param args.user - The current user object (if already fetched)
|
|
20
|
+
* @param args.client - The API client (if user needs to be fetched)
|
|
21
|
+
* @returns Promise resolving to the resolved project ID
|
|
22
|
+
*/
|
|
23
|
+
export declare function resolveInboxProjectId(args: {
|
|
24
|
+
projectId: string | undefined;
|
|
25
|
+
user?: CurrentUser;
|
|
26
|
+
client?: TodoistApi;
|
|
27
|
+
}): Promise<string | undefined>;
|
|
28
|
+
/**
|
|
29
|
+
* Generic pagination utility for Todoist API methods
|
|
30
|
+
*
|
|
31
|
+
* Recursively fetches all pages of data from paginated Todoist API endpoints.
|
|
32
|
+
*
|
|
33
|
+
* @template TArgs - The type of arguments accepted by the API method
|
|
34
|
+
* @template TResponse - The type of response returned by the API method
|
|
35
|
+
* @template TResult - The type of individual result items in the response
|
|
36
|
+
*
|
|
37
|
+
* @param options - Configuration options
|
|
38
|
+
* @param options.apiMethod - The Todoist API method to call (e.g., todoistApi.getLabels)
|
|
39
|
+
* @param options.args - Initial arguments to pass to the API method (excluding cursor and limit)
|
|
40
|
+
* @param options.limit - Number of items to fetch per page (default: 100)
|
|
41
|
+
* @returns Promise resolving to an array of all result items across all pages
|
|
42
|
+
*
|
|
43
|
+
* @example
|
|
44
|
+
* const allLabels = await fetchAllPages({
|
|
45
|
+
* apiMethod: (args) => todoistApi.getLabels(args),
|
|
46
|
+
* args: {},
|
|
47
|
+
* limit: 100
|
|
48
|
+
* })
|
|
49
|
+
*/
|
|
50
|
+
export declare function fetchAllPages<TArgs extends {
|
|
51
|
+
cursor?: string | null;
|
|
52
|
+
limit?: number;
|
|
53
|
+
}, TResponse extends {
|
|
54
|
+
results: TResult[];
|
|
55
|
+
nextCursor: string | null;
|
|
56
|
+
}, TResult>(options: {
|
|
57
|
+
apiMethod: (args: TArgs) => Promise<TResponse>;
|
|
58
|
+
args?: Omit<TArgs, 'cursor' | 'limit'>;
|
|
59
|
+
limit?: number;
|
|
60
|
+
}): Promise<TResult[]>;
|
|
61
|
+
/**
|
|
62
|
+
* Wraps a search query with wildcards for substring matching.
|
|
63
|
+
* If the query already contains unescaped wildcards, it is returned as-is
|
|
64
|
+
* to preserve intentional wildcard patterns (e.g. prefix matching with "work*").
|
|
65
|
+
*/
|
|
66
|
+
export declare function toWildcardQuery(query: string): string;
|
|
67
|
+
/**
|
|
68
|
+
* Searches projects by name and fetches all matching pages.
|
|
69
|
+
*
|
|
70
|
+
* @param client - The Todoist API client
|
|
71
|
+
* @param query - The search query string
|
|
72
|
+
* @returns Promise resolving to array of matching projects
|
|
73
|
+
*/
|
|
74
|
+
export declare function searchAllProjects(client: TodoistApi, query: string): Promise<Project[]>;
|
|
75
|
+
/**
|
|
76
|
+
* Searches labels by name and fetches all matching pages.
|
|
77
|
+
*
|
|
78
|
+
* @param client - The Todoist API client
|
|
79
|
+
* @param query - The search query string
|
|
80
|
+
* @returns Promise resolving to array of matching labels
|
|
81
|
+
*/
|
|
82
|
+
export declare function searchAllLabels(client: TodoistApi, query: string): Promise<Label[]>;
|
|
83
|
+
export declare function fetchAllSharedLabels(client: TodoistApi): Promise<string[]>;
|
|
84
|
+
/**
|
|
85
|
+
* Searches sections by name (optionally scoped to a project) and fetches all matching pages.
|
|
86
|
+
*
|
|
87
|
+
* @param client - The Todoist API client
|
|
88
|
+
* @param query - The search query string
|
|
89
|
+
* @param projectId - Optional project ID to scope the search
|
|
90
|
+
* @returns Promise resolving to array of matching sections
|
|
91
|
+
*/
|
|
92
|
+
export declare function searchAllSections(client: TodoistApi, query: string, projectId?: string): Promise<Section[]>;
|
|
93
|
+
/**
|
|
94
|
+
* Creates a MoveTaskArgs object from move parameters, validating that exactly one is provided.
|
|
95
|
+
* @param taskId - The task ID (used for error messages)
|
|
96
|
+
* @param projectId - Optional project ID to move to
|
|
97
|
+
* @param sectionId - Optional section ID to move to
|
|
98
|
+
* @param parentId - Optional parent ID to move to
|
|
99
|
+
* @returns MoveTaskArgs object with exactly one destination
|
|
100
|
+
* @throws Error if multiple move parameters are provided or none are provided
|
|
101
|
+
*/
|
|
102
|
+
export declare function createMoveTaskArgs(taskId: string, projectId?: string, sectionId?: string, parentId?: string): MoveTaskArgs;
|
|
103
|
+
/**
|
|
104
|
+
* Map a single Todoist task to a more structured format, for LLM consumption.
|
|
105
|
+
* @param task - The task to map.
|
|
106
|
+
* @returns The mapped task.
|
|
107
|
+
*/
|
|
108
|
+
declare function mapTask(task: Task): {
|
|
109
|
+
id: string;
|
|
110
|
+
content: string;
|
|
111
|
+
description: string;
|
|
112
|
+
dueDate: string | undefined;
|
|
113
|
+
recurring: string | boolean;
|
|
114
|
+
deadlineDate: string | undefined;
|
|
115
|
+
priority: "p1" | "p2" | "p3" | "p4";
|
|
116
|
+
projectId: string;
|
|
117
|
+
sectionId: string | undefined;
|
|
118
|
+
parentId: string | undefined;
|
|
119
|
+
labels: string[];
|
|
120
|
+
duration: string | undefined;
|
|
121
|
+
responsibleUid: string | undefined;
|
|
122
|
+
assignedByUid: string | undefined;
|
|
123
|
+
checked: boolean;
|
|
124
|
+
completedAt: string | undefined;
|
|
125
|
+
};
|
|
126
|
+
type MappedTask = ReturnType<typeof mapTask>;
|
|
127
|
+
/**
|
|
128
|
+
* Map a single Todoist project to a more structured format, for LLM consumption.
|
|
129
|
+
* @param project - The project to map.
|
|
130
|
+
* @returns The mapped project.
|
|
131
|
+
*/
|
|
132
|
+
declare function mapProject(project: Project): {
|
|
133
|
+
id: string;
|
|
134
|
+
name: string;
|
|
135
|
+
color: ColorKey;
|
|
136
|
+
isFavorite: boolean;
|
|
137
|
+
isShared: boolean;
|
|
138
|
+
parentId: string | undefined;
|
|
139
|
+
inboxProject: boolean;
|
|
140
|
+
viewStyle: string;
|
|
141
|
+
workspaceId: string | undefined;
|
|
142
|
+
folderId: string | undefined;
|
|
143
|
+
childOrder: number;
|
|
144
|
+
};
|
|
145
|
+
/**
|
|
146
|
+
* Map a single Todoist comment to a more structured format, for LLM consumption.
|
|
147
|
+
* @param comment - The comment to map.
|
|
148
|
+
* @returns The mapped comment.
|
|
149
|
+
*/
|
|
150
|
+
declare function mapComment(comment: Comment): {
|
|
151
|
+
id: string;
|
|
152
|
+
taskId: string | undefined;
|
|
153
|
+
projectId: string | undefined;
|
|
154
|
+
content: string;
|
|
155
|
+
postedAt: string;
|
|
156
|
+
postedUid: string;
|
|
157
|
+
fileAttachment: {
|
|
158
|
+
resourceType: string;
|
|
159
|
+
fileName: string | undefined;
|
|
160
|
+
fileSize: number | undefined;
|
|
161
|
+
fileType: string | undefined;
|
|
162
|
+
fileUrl: string | undefined;
|
|
163
|
+
fileDuration: number | undefined;
|
|
164
|
+
uploadState: "completed" | "pending" | undefined;
|
|
165
|
+
url: string | undefined;
|
|
166
|
+
title: string | undefined;
|
|
167
|
+
image: string | undefined;
|
|
168
|
+
imageWidth: number | undefined;
|
|
169
|
+
imageHeight: number | undefined;
|
|
170
|
+
} | undefined;
|
|
171
|
+
};
|
|
172
|
+
/**
|
|
173
|
+
* Map a single Todoist activity event to a more structured format, for LLM consumption.
|
|
174
|
+
* @param event - The activity event to map.
|
|
175
|
+
* @returns The mapped activity event.
|
|
176
|
+
*/
|
|
177
|
+
declare function mapActivityEvent(event: ActivityEvent): {
|
|
178
|
+
id: string | undefined;
|
|
179
|
+
objectType: string;
|
|
180
|
+
objectId: string;
|
|
181
|
+
eventType: string;
|
|
182
|
+
eventDate: string;
|
|
183
|
+
parentProjectId: string | undefined;
|
|
184
|
+
parentItemId: string | undefined;
|
|
185
|
+
initiatorId: string | undefined;
|
|
186
|
+
extraData: Record<string, any> | undefined;
|
|
187
|
+
};
|
|
188
|
+
declare function getTasksByFilter({ client, query, limit, cursor, }: {
|
|
189
|
+
client: TodoistApi;
|
|
190
|
+
query: string;
|
|
191
|
+
limit: number | undefined;
|
|
192
|
+
cursor: string | undefined;
|
|
193
|
+
}): Promise<{
|
|
194
|
+
tasks: {
|
|
195
|
+
id: string;
|
|
196
|
+
content: string;
|
|
197
|
+
description: string;
|
|
198
|
+
dueDate: string | undefined;
|
|
199
|
+
recurring: string | boolean;
|
|
200
|
+
deadlineDate: string | undefined;
|
|
201
|
+
priority: "p1" | "p2" | "p3" | "p4";
|
|
202
|
+
projectId: string;
|
|
203
|
+
sectionId: string | undefined;
|
|
204
|
+
parentId: string | undefined;
|
|
205
|
+
labels: string[];
|
|
206
|
+
duration: string | undefined;
|
|
207
|
+
responsibleUid: string | undefined;
|
|
208
|
+
assignedByUid: string | undefined;
|
|
209
|
+
checked: boolean;
|
|
210
|
+
completedAt: string | undefined;
|
|
211
|
+
}[];
|
|
212
|
+
nextCursor: string | null;
|
|
213
|
+
}>;
|
|
214
|
+
/**
|
|
215
|
+
* Map a single Todoist reminder to a more structured format, for LLM consumption.
|
|
216
|
+
* Normalizes SDK's `itemId` to `taskId` for consistency with other tools.
|
|
217
|
+
* @param reminder - The reminder to map (any of the 3 types).
|
|
218
|
+
* @returns The mapped reminder.
|
|
219
|
+
*/
|
|
220
|
+
declare function mapReminder(reminder: Reminder): {
|
|
221
|
+
minuteOffset: number;
|
|
222
|
+
due: {
|
|
223
|
+
isRecurring: boolean;
|
|
224
|
+
string: string;
|
|
225
|
+
date: string;
|
|
226
|
+
datetime: string | undefined;
|
|
227
|
+
timezone: string | undefined;
|
|
228
|
+
} | undefined;
|
|
229
|
+
id: string;
|
|
230
|
+
taskId: string;
|
|
231
|
+
type: "location" | "absolute" | "relative";
|
|
232
|
+
} | {
|
|
233
|
+
due: {
|
|
234
|
+
isRecurring: boolean;
|
|
235
|
+
string: string;
|
|
236
|
+
date: string;
|
|
237
|
+
datetime: string | undefined;
|
|
238
|
+
timezone: string | undefined;
|
|
239
|
+
};
|
|
240
|
+
id: string;
|
|
241
|
+
taskId: string;
|
|
242
|
+
type: "location" | "absolute" | "relative";
|
|
243
|
+
} | {
|
|
244
|
+
name: string;
|
|
245
|
+
locLat: string;
|
|
246
|
+
locLong: string;
|
|
247
|
+
locTrigger: "on_enter" | "on_leave";
|
|
248
|
+
radius: number;
|
|
249
|
+
id: string;
|
|
250
|
+
taskId: string;
|
|
251
|
+
type: "location" | "absolute" | "relative";
|
|
252
|
+
};
|
|
253
|
+
/**
|
|
254
|
+
* Count reminders by category: time-based (relative/absolute) and location.
|
|
255
|
+
*/
|
|
256
|
+
declare function countRemindersByType(reminders: {
|
|
257
|
+
type: string;
|
|
258
|
+
}[]): {
|
|
259
|
+
timeBasedCount: number;
|
|
260
|
+
locationCount: number;
|
|
261
|
+
};
|
|
262
|
+
export type { MappedTask };
|
|
263
|
+
export { countRemindersByType, getTasksByFilter, mapActivityEvent, mapComment, mapProject, mapReminder, mapTask, };
|
|
264
|
+
//# sourceMappingURL=tool-helpers.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tool-helpers.d.ts","sourceRoot":"","sources":["../src/tool-helpers.ts"],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
declare const addComments: {
|
|
3
|
+
name: "add-comments";
|
|
4
|
+
description: string;
|
|
5
|
+
parameters: {
|
|
6
|
+
comments: z.ZodArray<z.ZodObject<{
|
|
7
|
+
taskId: z.ZodOptional<z.ZodString>;
|
|
8
|
+
projectId: z.ZodOptional<z.ZodString>;
|
|
9
|
+
content: z.ZodString;
|
|
10
|
+
}, z.core.$strip>>;
|
|
11
|
+
};
|
|
12
|
+
outputSchema: {
|
|
13
|
+
comments: z.ZodArray<z.ZodObject<{
|
|
14
|
+
id: z.ZodString;
|
|
15
|
+
taskId: z.ZodOptional<z.ZodString>;
|
|
16
|
+
projectId: z.ZodOptional<z.ZodString>;
|
|
17
|
+
content: z.ZodString;
|
|
18
|
+
postedAt: z.ZodString;
|
|
19
|
+
postedUid: z.ZodOptional<z.ZodString>;
|
|
20
|
+
fileAttachment: z.ZodOptional<z.ZodObject<{
|
|
21
|
+
resourceType: z.ZodString;
|
|
22
|
+
fileName: z.ZodOptional<z.ZodString>;
|
|
23
|
+
fileSize: z.ZodOptional<z.ZodNumber>;
|
|
24
|
+
fileType: z.ZodOptional<z.ZodString>;
|
|
25
|
+
fileUrl: z.ZodOptional<z.ZodString>;
|
|
26
|
+
fileDuration: z.ZodOptional<z.ZodNumber>;
|
|
27
|
+
uploadState: z.ZodOptional<z.ZodEnum<{
|
|
28
|
+
completed: "completed";
|
|
29
|
+
pending: "pending";
|
|
30
|
+
}>>;
|
|
31
|
+
url: z.ZodOptional<z.ZodString>;
|
|
32
|
+
title: z.ZodOptional<z.ZodString>;
|
|
33
|
+
image: z.ZodOptional<z.ZodString>;
|
|
34
|
+
imageWidth: z.ZodOptional<z.ZodNumber>;
|
|
35
|
+
imageHeight: z.ZodOptional<z.ZodNumber>;
|
|
36
|
+
}, z.core.$strip>>;
|
|
37
|
+
}, z.core.$strip>>;
|
|
38
|
+
totalCount: z.ZodNumber;
|
|
39
|
+
addedCommentIds: z.ZodArray<z.ZodString>;
|
|
40
|
+
};
|
|
41
|
+
annotations: {
|
|
42
|
+
readOnlyHint: false;
|
|
43
|
+
destructiveHint: false;
|
|
44
|
+
idempotentHint: false;
|
|
45
|
+
};
|
|
46
|
+
execute(args: {
|
|
47
|
+
comments: {
|
|
48
|
+
content: string;
|
|
49
|
+
taskId?: string | undefined;
|
|
50
|
+
projectId?: string | undefined;
|
|
51
|
+
}[];
|
|
52
|
+
}, client: import('@doist/todoist-api-typescript').TodoistApi): Promise<{
|
|
53
|
+
textContent: string;
|
|
54
|
+
structuredContent: {
|
|
55
|
+
comments: {
|
|
56
|
+
id: string;
|
|
57
|
+
taskId: string | undefined;
|
|
58
|
+
projectId: string | undefined;
|
|
59
|
+
content: string;
|
|
60
|
+
postedAt: string;
|
|
61
|
+
postedUid: string;
|
|
62
|
+
fileAttachment: {
|
|
63
|
+
resourceType: string;
|
|
64
|
+
fileName: string | undefined;
|
|
65
|
+
fileSize: number | undefined;
|
|
66
|
+
fileType: string | undefined;
|
|
67
|
+
fileUrl: string | undefined;
|
|
68
|
+
fileDuration: number | undefined;
|
|
69
|
+
uploadState: "completed" | "pending" | undefined;
|
|
70
|
+
url: string | undefined;
|
|
71
|
+
title: string | undefined;
|
|
72
|
+
image: string | undefined;
|
|
73
|
+
imageWidth: number | undefined;
|
|
74
|
+
imageHeight: number | undefined;
|
|
75
|
+
} | undefined;
|
|
76
|
+
}[];
|
|
77
|
+
totalCount: number;
|
|
78
|
+
addedCommentIds: string[];
|
|
79
|
+
};
|
|
80
|
+
}>;
|
|
81
|
+
};
|
|
82
|
+
export { addComments };
|
|
83
|
+
//# sourceMappingURL=add-comments.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"add-comments.d.ts","sourceRoot":"","sources":["../../src/tools/add-comments.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AA2BvB,QAAA,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAuD8C,CAAA;AAsB/D,OAAO,EAAE,WAAW,EAAE,CAAA"}
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
declare const addFilters: {
|
|
3
|
+
name: "add-filters";
|
|
4
|
+
description: string;
|
|
5
|
+
parameters: {
|
|
6
|
+
filters: z.ZodArray<z.ZodObject<{
|
|
7
|
+
name: z.ZodString;
|
|
8
|
+
query: z.ZodString;
|
|
9
|
+
color: z.ZodPipe<z.ZodTransform<string | undefined, unknown>, z.ZodOptional<z.ZodEnum<{
|
|
10
|
+
berry_red: "berry_red";
|
|
11
|
+
red: "red";
|
|
12
|
+
orange: "orange";
|
|
13
|
+
yellow: "yellow";
|
|
14
|
+
olive_green: "olive_green";
|
|
15
|
+
lime_green: "lime_green";
|
|
16
|
+
green: "green";
|
|
17
|
+
mint_green: "mint_green";
|
|
18
|
+
teal: "teal";
|
|
19
|
+
sky_blue: "sky_blue";
|
|
20
|
+
light_blue: "light_blue";
|
|
21
|
+
blue: "blue";
|
|
22
|
+
grape: "grape";
|
|
23
|
+
violet: "violet";
|
|
24
|
+
lavender: "lavender";
|
|
25
|
+
magenta: "magenta";
|
|
26
|
+
salmon: "salmon";
|
|
27
|
+
charcoal: "charcoal";
|
|
28
|
+
grey: "grey";
|
|
29
|
+
taupe: "taupe";
|
|
30
|
+
}>>>;
|
|
31
|
+
isFavorite: z.ZodOptional<z.ZodBoolean>;
|
|
32
|
+
}, z.core.$strip>>;
|
|
33
|
+
};
|
|
34
|
+
outputSchema: {
|
|
35
|
+
filters: z.ZodArray<z.ZodObject<{
|
|
36
|
+
id: z.ZodString;
|
|
37
|
+
name: z.ZodString;
|
|
38
|
+
query: z.ZodString;
|
|
39
|
+
color: z.ZodCatch<z.ZodOptional<z.ZodEnum<{
|
|
40
|
+
berry_red: "berry_red";
|
|
41
|
+
red: "red";
|
|
42
|
+
orange: "orange";
|
|
43
|
+
yellow: "yellow";
|
|
44
|
+
olive_green: "olive_green";
|
|
45
|
+
lime_green: "lime_green";
|
|
46
|
+
green: "green";
|
|
47
|
+
mint_green: "mint_green";
|
|
48
|
+
teal: "teal";
|
|
49
|
+
sky_blue: "sky_blue";
|
|
50
|
+
light_blue: "light_blue";
|
|
51
|
+
blue: "blue";
|
|
52
|
+
grape: "grape";
|
|
53
|
+
violet: "violet";
|
|
54
|
+
lavender: "lavender";
|
|
55
|
+
magenta: "magenta";
|
|
56
|
+
salmon: "salmon";
|
|
57
|
+
charcoal: "charcoal";
|
|
58
|
+
grey: "grey";
|
|
59
|
+
taupe: "taupe";
|
|
60
|
+
}>>>;
|
|
61
|
+
isFavorite: z.ZodBoolean;
|
|
62
|
+
itemOrder: z.ZodNumber;
|
|
63
|
+
}, z.core.$strip>>;
|
|
64
|
+
totalCount: z.ZodNumber;
|
|
65
|
+
};
|
|
66
|
+
annotations: {
|
|
67
|
+
readOnlyHint: false;
|
|
68
|
+
destructiveHint: false;
|
|
69
|
+
idempotentHint: false;
|
|
70
|
+
};
|
|
71
|
+
execute({ filters }: {
|
|
72
|
+
filters: {
|
|
73
|
+
name: string;
|
|
74
|
+
query: string;
|
|
75
|
+
color?: "berry_red" | "red" | "orange" | "yellow" | "olive_green" | "lime_green" | "green" | "mint_green" | "teal" | "sky_blue" | "light_blue" | "blue" | "grape" | "violet" | "lavender" | "magenta" | "salmon" | "charcoal" | "grey" | "taupe" | undefined;
|
|
76
|
+
isFavorite?: boolean | undefined;
|
|
77
|
+
}[];
|
|
78
|
+
}, client: import('@doist/todoist-api-typescript').TodoistApi): Promise<{
|
|
79
|
+
textContent: string;
|
|
80
|
+
structuredContent: {
|
|
81
|
+
filters: {
|
|
82
|
+
id: string;
|
|
83
|
+
name: string;
|
|
84
|
+
query: string;
|
|
85
|
+
color: "berry_red" | "red" | "orange" | "yellow" | "olive_green" | "lime_green" | "green" | "mint_green" | "teal" | "sky_blue" | "light_blue" | "blue" | "grape" | "violet" | "lavender" | "magenta" | "salmon" | "charcoal" | "grey" | "taupe" | undefined;
|
|
86
|
+
isFavorite: boolean;
|
|
87
|
+
itemOrder: number;
|
|
88
|
+
}[];
|
|
89
|
+
totalCount: number;
|
|
90
|
+
};
|
|
91
|
+
}>;
|
|
92
|
+
};
|
|
93
|
+
export { addFilters };
|
|
94
|
+
//# sourceMappingURL=add-filters.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"add-filters.d.ts","sourceRoot":"","sources":["../../src/tools/add-filters.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AA+BvB,QAAA,MAAM,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA8D+C,CAAA;AAE/D,OAAO,EAAE,UAAU,EAAE,CAAA"}
|