@doist/todoist-ai 8.12.3 → 9.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/README.md +11 -206
- package/bin/_launcher.js +16 -0
- package/bin/todoist-ai-http.js +4 -0
- package/bin/todoist-ai.js +4 -0
- package/index.d.ts +1 -0
- package/index.mjs +1 -0
- package/package.json +20 -108
- package/LICENSE +0 -21
- package/dist/filter-helpers.d.ts +0 -51
- package/dist/filter-helpers.d.ts.map +0 -1
- package/dist/index.d.ts +0 -2954
- package/dist/index.d.ts.map +0 -1
- package/dist/index.js +0 -103
- package/dist/main-http.d.ts +0 -3
- package/dist/main-http.d.ts.map +0 -1
- package/dist/main-http.js +0 -41
- package/dist/main.d.ts +0 -3
- package/dist/main.d.ts.map +0 -1
- package/dist/main.js +0 -17
- package/dist/mcp-apps/index.html +0 -98
- package/dist/mcp-helpers.d.ts +0 -58
- package/dist/mcp-helpers.d.ts.map +0 -1
- package/dist/mcp-server-B-6X4t3u.js +0 -6133
- package/dist/mcp-server.d.ts +0 -16
- package/dist/mcp-server.d.ts.map +0 -1
- package/dist/middleware/require-valid-todoist-token.d.ts +0 -38
- package/dist/middleware/require-valid-todoist-token.d.ts.map +0 -1
- package/dist/prompts/productivity-analysis.d.ts +0 -58
- package/dist/prompts/productivity-analysis.d.ts.map +0 -1
- package/dist/require-valid-todoist-token-CUTCSVRV.js +0 -72
- package/dist/todoist-tool.d.ts +0 -62
- package/dist/todoist-tool.d.ts.map +0 -1
- package/dist/tool-execution-error.d.ts +0 -7
- package/dist/tool-execution-error.d.ts.map +0 -1
- package/dist/tool-helpers.d.ts +0 -265
- package/dist/tool-helpers.d.ts.map +0 -1
- package/dist/tools/add-comments.d.ts +0 -83
- package/dist/tools/add-comments.d.ts.map +0 -1
- package/dist/tools/add-filters.d.ts +0 -94
- package/dist/tools/add-filters.d.ts.map +0 -1
- package/dist/tools/add-labels.d.ts +0 -92
- package/dist/tools/add-labels.d.ts.map +0 -1
- package/dist/tools/add-projects.d.ts +0 -112
- package/dist/tools/add-projects.d.ts.map +0 -1
- package/dist/tools/add-reminders.d.ts +0 -148
- package/dist/tools/add-reminders.d.ts.map +0 -1
- package/dist/tools/add-sections.d.ts +0 -40
- package/dist/tools/add-sections.d.ts.map +0 -1
- package/dist/tools/add-tasks.d.ts +0 -118
- package/dist/tools/add-tasks.d.ts.map +0 -1
- package/dist/tools/analyze-project-health.d.ts +0 -45
- package/dist/tools/analyze-project-health.d.ts.map +0 -1
- package/dist/tools/complete-tasks.d.ts +0 -42
- package/dist/tools/complete-tasks.d.ts.map +0 -1
- package/dist/tools/delete-object.d.ts +0 -54
- package/dist/tools/delete-object.d.ts.map +0 -1
- package/dist/tools/fetch-object.d.ts +0 -199
- package/dist/tools/fetch-object.d.ts.map +0 -1
- package/dist/tools/fetch.d.ts +0 -41
- package/dist/tools/fetch.d.ts.map +0 -1
- package/dist/tools/find-activity.d.ts +0 -91
- package/dist/tools/find-activity.d.ts.map +0 -1
- package/dist/tools/find-comments.d.ts +0 -89
- package/dist/tools/find-comments.d.ts.map +0 -1
- package/dist/tools/find-completed-tasks.d.ts +0 -115
- package/dist/tools/find-completed-tasks.d.ts.map +0 -1
- package/dist/tools/find-filters.d.ts +0 -92
- package/dist/tools/find-filters.d.ts.map +0 -1
- package/dist/tools/find-labels.d.ts +0 -81
- package/dist/tools/find-labels.d.ts.map +0 -1
- package/dist/tools/find-project-collaborators.d.ts +0 -94
- package/dist/tools/find-project-collaborators.d.ts.map +0 -1
- package/dist/tools/find-projects.d.ts +0 -87
- package/dist/tools/find-projects.d.ts.map +0 -1
- package/dist/tools/find-reminders.d.ts +0 -95
- package/dist/tools/find-reminders.d.ts.map +0 -1
- package/dist/tools/find-sections.d.ts +0 -41
- package/dist/tools/find-sections.d.ts.map +0 -1
- package/dist/tools/find-tasks-by-date.d.ts +0 -133
- package/dist/tools/find-tasks-by-date.d.ts.map +0 -1
- package/dist/tools/find-tasks.d.ts +0 -116
- package/dist/tools/find-tasks.d.ts.map +0 -1
- package/dist/tools/get-overview.d.ts +0 -123
- package/dist/tools/get-overview.d.ts.map +0 -1
- package/dist/tools/get-productivity-stats.d.ts +0 -160
- package/dist/tools/get-productivity-stats.d.ts.map +0 -1
- package/dist/tools/get-project-activity-stats.d.ts +0 -48
- package/dist/tools/get-project-activity-stats.d.ts.map +0 -1
- package/dist/tools/get-project-health.d.ts +0 -112
- package/dist/tools/get-project-health.d.ts.map +0 -1
- package/dist/tools/get-workspace-insights.d.ts +0 -65
- package/dist/tools/get-workspace-insights.d.ts.map +0 -1
- package/dist/tools/list-workspaces.d.ts +0 -54
- package/dist/tools/list-workspaces.d.ts.map +0 -1
- package/dist/tools/manage-assignments.d.ts +0 -72
- package/dist/tools/manage-assignments.d.ts.map +0 -1
- package/dist/tools/project-management.d.ts +0 -78
- package/dist/tools/project-management.d.ts.map +0 -1
- package/dist/tools/project-move.d.ts +0 -88
- package/dist/tools/project-move.d.ts.map +0 -1
- package/dist/tools/reorder-objects.d.ts +0 -50
- package/dist/tools/reorder-objects.d.ts.map +0 -1
- package/dist/tools/reschedule-tasks.d.ts +0 -78
- package/dist/tools/reschedule-tasks.d.ts.map +0 -1
- package/dist/tools/search.d.ts +0 -43
- package/dist/tools/search.d.ts.map +0 -1
- package/dist/tools/uncomplete-tasks.d.ts +0 -42
- package/dist/tools/uncomplete-tasks.d.ts.map +0 -1
- package/dist/tools/update-comments.d.ts +0 -87
- package/dist/tools/update-comments.d.ts.map +0 -1
- package/dist/tools/update-filters.d.ts +0 -106
- package/dist/tools/update-filters.d.ts.map +0 -1
- package/dist/tools/update-labels.d.ts +0 -122
- package/dist/tools/update-labels.d.ts.map +0 -1
- package/dist/tools/update-projects.d.ts +0 -120
- package/dist/tools/update-projects.d.ts.map +0 -1
- package/dist/tools/update-reminders.d.ts +0 -148
- package/dist/tools/update-reminders.d.ts.map +0 -1
- package/dist/tools/update-sections.d.ts +0 -42
- package/dist/tools/update-sections.d.ts.map +0 -1
- package/dist/tools/update-tasks.d.ts +0 -113
- package/dist/tools/update-tasks.d.ts.map +0 -1
- package/dist/tools/user-info.d.ts +0 -57
- package/dist/tools/user-info.d.ts.map +0 -1
- package/dist/tools/view-attachment.d.ts +0 -25
- package/dist/tools/view-attachment.d.ts.map +0 -1
- package/dist/usage-tracking.d.ts +0 -27
- package/dist/usage-tracking.d.ts.map +0 -1
- package/dist/utils/assignment-validator.d.ts +0 -69
- package/dist/utils/assignment-validator.d.ts.map +0 -1
- package/dist/utils/colors.d.ts +0 -68
- package/dist/utils/colors.d.ts.map +0 -1
- package/dist/utils/constants.d.ts +0 -53
- package/dist/utils/constants.d.ts.map +0 -1
- package/dist/utils/date.d.ts +0 -18
- package/dist/utils/date.d.ts.map +0 -1
- package/dist/utils/duration-parser.d.ts +0 -36
- package/dist/utils/duration-parser.d.ts.map +0 -1
- package/dist/utils/filter-resolver.d.ts +0 -27
- package/dist/utils/filter-resolver.d.ts.map +0 -1
- package/dist/utils/labels.d.ts +0 -13
- package/dist/utils/labels.d.ts.map +0 -1
- package/dist/utils/output-schemas.d.ts +0 -199
- package/dist/utils/output-schemas.d.ts.map +0 -1
- package/dist/utils/priorities.d.ts +0 -14
- package/dist/utils/priorities.d.ts.map +0 -1
- package/dist/utils/reminder-schemas.d.ts +0 -33
- package/dist/utils/reminder-schemas.d.ts.map +0 -1
- package/dist/utils/response-builders.d.ts +0 -93
- package/dist/utils/response-builders.d.ts.map +0 -1
- package/dist/utils/retry.d.ts +0 -10
- package/dist/utils/retry.d.ts.map +0 -1
- package/dist/utils/sanitize-data.d.ts +0 -10
- package/dist/utils/sanitize-data.d.ts.map +0 -1
- package/dist/utils/schema-helpers.d.ts +0 -10
- package/dist/utils/schema-helpers.d.ts.map +0 -1
- package/dist/utils/test-helpers.d.ts +0 -91
- package/dist/utils/test-helpers.d.ts.map +0 -1
- package/dist/utils/tool-names.d.ts +0 -56
- package/dist/utils/tool-names.d.ts.map +0 -1
- package/dist/utils/user-resolver.d.ts +0 -39
- package/dist/utils/user-resolver.d.ts.map +0 -1
- package/dist/utils/validate-todoist-token.d.ts +0 -9
- package/dist/utils/validate-todoist-token.d.ts.map +0 -1
- package/dist/utils/workspace-resolver.d.ts +0 -31
- package/dist/utils/workspace-resolver.d.ts.map +0 -1
- package/scripts/bump-plugin-version.mjs +0 -14
- package/scripts/run-tool.ts +0 -240
- package/scripts/test-executable.cjs +0 -69
- package/scripts/validate-schemas.ts +0 -284
package/README.md
CHANGED
|
@@ -1,219 +1,24 @@
|
|
|
1
|
-
#
|
|
1
|
+
# @doist/todoist-ai
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
enabling them to access and modify a Todoist account on the user's behalf.
|
|
3
|
+
> **This package has been renamed to [`@doist/todoist-mcp`](https://npmjs.com/package/@doist/todoist-mcp).**
|
|
5
4
|
|
|
6
|
-
|
|
7
|
-
integrate them to your own AI conversational interfaces.
|
|
8
|
-
|
|
9
|
-
## Using tools
|
|
10
|
-
|
|
11
|
-
### 1. Add this repository as a dependency
|
|
12
|
-
|
|
13
|
-
```sh
|
|
14
|
-
npm install @doist/todoist-ai
|
|
15
|
-
```
|
|
16
|
-
|
|
17
|
-
### 2. Import the tools and plug them to an AI
|
|
18
|
-
|
|
19
|
-
Here's an example using [Vercel's AI SDK](https://ai-sdk.dev/docs/ai-sdk-core/generating-text#streamtext).
|
|
20
|
-
|
|
21
|
-
```js
|
|
22
|
-
import { findTasksByDate, addTasks } from '@doist/todoist-ai'
|
|
23
|
-
import { TodoistApi } from '@doist/todoist-sdk'
|
|
24
|
-
import { streamText } from 'ai'
|
|
25
|
-
|
|
26
|
-
// Create Todoist API client
|
|
27
|
-
const client = new TodoistApi(process.env.TODOIST_API_KEY)
|
|
28
|
-
|
|
29
|
-
// Helper to wrap tools with the client
|
|
30
|
-
function wrapTool(tool, todoistClient) {
|
|
31
|
-
return {
|
|
32
|
-
...tool,
|
|
33
|
-
execute(args) {
|
|
34
|
-
return tool.execute(args, todoistClient)
|
|
35
|
-
},
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
const result = streamText({
|
|
40
|
-
model: yourModel,
|
|
41
|
-
system: 'You are a helpful Todoist assistant',
|
|
42
|
-
tools: {
|
|
43
|
-
findTasksByDate: wrapTool(findTasksByDate, client),
|
|
44
|
-
addTasks: wrapTool(addTasks, client),
|
|
45
|
-
},
|
|
46
|
-
})
|
|
47
|
-
```
|
|
48
|
-
|
|
49
|
-
## Using as an MCP server
|
|
50
|
-
|
|
51
|
-
### Quick Start
|
|
52
|
-
|
|
53
|
-
You can run the MCP server directly with npx:
|
|
54
|
-
|
|
55
|
-
```bash
|
|
56
|
-
npx @doist/todoist-ai
|
|
57
|
-
```
|
|
58
|
-
|
|
59
|
-
### Setup Guide
|
|
60
|
-
|
|
61
|
-
The Todoist AI MCP server is available as a streamable HTTP service for easy integration with various AI clients:
|
|
62
|
-
|
|
63
|
-
**Primary URL (Streamable HTTP):** `https://ai.todoist.net/mcp`
|
|
64
|
-
|
|
65
|
-
#### Claude Desktop
|
|
66
|
-
|
|
67
|
-
1. Open Settings → Connectors → Add custom connector
|
|
68
|
-
2. Enter `https://ai.todoist.net/mcp` and complete OAuth authentication
|
|
69
|
-
|
|
70
|
-
#### Cursor
|
|
71
|
-
|
|
72
|
-
Create a configuration file:
|
|
73
|
-
|
|
74
|
-
- **Global:** `~/.cursor/mcp.json`
|
|
75
|
-
- **Project-specific:** `.cursor/mcp.json`
|
|
76
|
-
|
|
77
|
-
```json
|
|
78
|
-
{
|
|
79
|
-
"mcpServers": {
|
|
80
|
-
"todoist": {
|
|
81
|
-
"command": "npx",
|
|
82
|
-
"args": ["-y", "mcp-remote", "https://ai.todoist.net/mcp"]
|
|
83
|
-
}
|
|
84
|
-
}
|
|
85
|
-
}
|
|
86
|
-
```
|
|
87
|
-
|
|
88
|
-
Then enable the server in Cursor settings if prompted.
|
|
89
|
-
|
|
90
|
-
#### Claude Code (CLI)
|
|
91
|
-
|
|
92
|
-
The fastest setup is the official Todoist plugin, which wires up the MCP server for you:
|
|
93
|
-
|
|
94
|
-
```bash
|
|
95
|
-
/plugin marketplace add doist/todoist-ai
|
|
96
|
-
/plugin install todoist@doist
|
|
97
|
-
```
|
|
98
|
-
|
|
99
|
-
OAuth runs in your browser the first time you use a Todoist tool. See [Anthropic's plugin docs](https://code.claude.com/docs/en/plugins-reference) for more.
|
|
100
|
-
|
|
101
|
-
If you'd rather configure the MCP server manually, run:
|
|
5
|
+
Please update your dependency:
|
|
102
6
|
|
|
103
7
|
```bash
|
|
104
|
-
|
|
8
|
+
npm install @doist/todoist-mcp
|
|
105
9
|
```
|
|
106
10
|
|
|
107
|
-
|
|
11
|
+
And update your imports:
|
|
108
12
|
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
1. Open Command Palette → MCP: Add Server
|
|
112
|
-
2. Select HTTP transport and use:
|
|
113
|
-
|
|
114
|
-
```json
|
|
115
|
-
{
|
|
116
|
-
"servers": {
|
|
117
|
-
"todoist": {
|
|
118
|
-
"type": "http",
|
|
119
|
-
"url": "https://ai.todoist.net/mcp"
|
|
120
|
-
}
|
|
121
|
-
}
|
|
122
|
-
}
|
|
13
|
+
```ts
|
|
14
|
+
import { getMcpServer } from '@doist/todoist-mcp'
|
|
123
15
|
```
|
|
124
16
|
|
|
125
|
-
|
|
17
|
+
The CLI entrypoints have been renamed too:
|
|
126
18
|
|
|
127
19
|
```bash
|
|
128
|
-
npx -
|
|
20
|
+
npx @doist/todoist-mcp # was: npx @doist/todoist-ai
|
|
21
|
+
npx -p @doist/todoist-mcp todoist-mcp-http
|
|
129
22
|
```
|
|
130
23
|
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
## Features
|
|
134
|
-
|
|
135
|
-
A key feature of this project is that tools can be reused, and are not written specifically for use in an MCP server. They can be hooked up as tools to other conversational AI interfaces (e.g. Vercel's AI SDK).
|
|
136
|
-
|
|
137
|
-
This project is in its early stages. Expect more and/or better tools soon.
|
|
138
|
-
|
|
139
|
-
Nevertheless, our goal is to provide a small set of tools that enable complete workflows, rather than just atomic actions, striking a balance between flexibility and efficiency for LLMs.
|
|
140
|
-
|
|
141
|
-
For our design philosophy, guidelines, and development patterns, see [docs/tool-design.md](docs/tool-design.md).
|
|
142
|
-
|
|
143
|
-
### Available Tools
|
|
144
|
-
|
|
145
|
-
For a complete list of available tools, see the [src/tools](src/tools) directory.
|
|
146
|
-
|
|
147
|
-
#### OpenAI MCP Compatibility
|
|
148
|
-
|
|
149
|
-
This server includes `search` and `fetch` tools that follow the [OpenAI MCP specification](https://platform.openai.com/docs/mcp), enabling seamless integration with OpenAI's MCP protocol. These tools return JSON-encoded results optimized for OpenAI's requirements while maintaining compatibility with the broader MCP ecosystem.
|
|
150
|
-
|
|
151
|
-
## Dependencies
|
|
152
|
-
|
|
153
|
-
- MCP server using the official [@modelcontextprotocol/sdk](https://github.com/modelcontextprotocol/typescript-sdk?tab=readme-ov-file#installation)
|
|
154
|
-
- Todoist Typescript API client [@doist/todoist-sdk](https://github.com/Doist/todoist-sdk)
|
|
155
|
-
|
|
156
|
-
## MCP Server Setup
|
|
157
|
-
|
|
158
|
-
See [docs/mcp-server.md](docs/mcp-server.md) for full instructions on setting up the MCP server.
|
|
159
|
-
|
|
160
|
-
## Local Development Setup
|
|
161
|
-
|
|
162
|
-
See [docs/dev-setup.md](docs/dev-setup.md) for full setup instructions and [CONTRIBUTING.md](CONTRIBUTING.md) for contributor workflows and quality checks.
|
|
163
|
-
|
|
164
|
-
### MCP Apps
|
|
165
|
-
|
|
166
|
-
This project includes support for **MCP Apps** – interactive UI widgets rendered inline in AI chat interfaces. Widgets provide rich visual representations of tool outputs (e.g., task lists) instead of plain text.
|
|
167
|
-
|
|
168
|
-
See [docs/mcp-apps.md](docs/mcp-apps.md) for the widget architecture, build pipeline, and development workflow.
|
|
169
|
-
|
|
170
|
-
### Quick Start
|
|
171
|
-
|
|
172
|
-
After cloning and setting up the repository:
|
|
173
|
-
|
|
174
|
-
- `npm start` - Build and run the MCP inspector for testing
|
|
175
|
-
- `npm run dev` - Development mode with auto-rebuild and restart
|
|
176
|
-
- `npm run tool:list` - List available tools for direct execution
|
|
177
|
-
- `npm run tool -- <tool-name> '<json-args>'` - Run a tool directly without MCP
|
|
178
|
-
|
|
179
|
-
When using `npm run tool`, include `--` before tool arguments so npm forwards them to `scripts/run-tool.ts`.
|
|
180
|
-
|
|
181
|
-
Example check before write operations:
|
|
182
|
-
`npm run tool -- user-info '{}'`
|
|
183
|
-
This confirms which Todoist account the current `TODOIST_API_KEY` is connected to.
|
|
184
|
-
|
|
185
|
-
`run-tool` uses `TODOIST_API_KEY` from your `.env` file (created from `.env.example` by `npm run setup`). Use a test account or a temporary project when running write operations to avoid modifying real data.
|
|
186
|
-
|
|
187
|
-
## Contributing
|
|
188
|
-
|
|
189
|
-
See [CONTRIBUTING.md](CONTRIBUTING.md) for:
|
|
190
|
-
|
|
191
|
-
- Development workflow
|
|
192
|
-
- Running tools directly with `scripts/run-tool.ts`
|
|
193
|
-
- Testing and quality checks
|
|
194
|
-
- Commit conventions
|
|
195
|
-
|
|
196
|
-
## Releasing
|
|
197
|
-
|
|
198
|
-
This project uses [release-please](https://github.com/googleapis/release-please) to automate version management and package publishing.
|
|
199
|
-
|
|
200
|
-
### How it works
|
|
201
|
-
|
|
202
|
-
1. Make your changes using [Conventional Commits](https://www.conventionalcommits.org/):
|
|
203
|
-
- `feat:` for new features (minor version bump)
|
|
204
|
-
- `fix:` for bug fixes (patch version bump)
|
|
205
|
-
- `feat!:` or `fix!:` for breaking changes (major version bump)
|
|
206
|
-
- `docs:` for documentation changes
|
|
207
|
-
- `chore:` for maintenance tasks
|
|
208
|
-
- `ci:` for CI changes
|
|
209
|
-
|
|
210
|
-
2. When commits are pushed to `main`:
|
|
211
|
-
- Release-please automatically creates/updates a release PR
|
|
212
|
-
- The PR includes version bump and changelog updates
|
|
213
|
-
- Review the PR and merge when ready
|
|
214
|
-
|
|
215
|
-
3. After merging the release PR:
|
|
216
|
-
- A new GitHub release is automatically created
|
|
217
|
-
- A new tag is created
|
|
218
|
-
- The `publish` workflow is triggered
|
|
219
|
-
- The package is published to npm
|
|
24
|
+
This package continues to work as a thin shim that re-exports `@doist/todoist-mcp` and forwards the legacy CLI bins (`todoist-ai`, `todoist-ai-http`) to the new package, but it will not receive new features.
|
package/bin/_launcher.js
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { createRequire } from 'node:module'
|
|
2
|
+
import { dirname, resolve } from 'node:path'
|
|
3
|
+
import { pathToFileURL } from 'node:url'
|
|
4
|
+
|
|
5
|
+
const require = createRequire(import.meta.url)
|
|
6
|
+
|
|
7
|
+
export async function runBin(binName) {
|
|
8
|
+
const pkgJsonPath = require.resolve('@doist/todoist-mcp/package.json')
|
|
9
|
+
const pkg = require(pkgJsonPath)
|
|
10
|
+
const binEntry = pkg.bin?.[binName]
|
|
11
|
+
if (!binEntry) {
|
|
12
|
+
throw new Error(`@doist/todoist-mcp does not declare a "${binName}" bin`)
|
|
13
|
+
}
|
|
14
|
+
const entryPath = resolve(dirname(pkgJsonPath), binEntry)
|
|
15
|
+
await import(pathToFileURL(entryPath).href)
|
|
16
|
+
}
|
package/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from '@doist/todoist-mcp'
|
package/index.mjs
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from '@doist/todoist-mcp'
|
package/package.json
CHANGED
|
@@ -1,123 +1,35 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@doist/todoist-ai",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "9.0.0",
|
|
4
|
+
"description": "DEPRECATED: renamed to @doist/todoist-mcp. Install @doist/todoist-mcp instead.",
|
|
4
5
|
"type": "module",
|
|
5
|
-
"main": "./
|
|
6
|
-
"types": "./
|
|
7
|
-
"
|
|
6
|
+
"main": "./index.mjs",
|
|
7
|
+
"types": "./index.d.ts",
|
|
8
|
+
"exports": {
|
|
9
|
+
".": {
|
|
10
|
+
"types": "./index.d.ts",
|
|
11
|
+
"import": "./index.mjs"
|
|
12
|
+
}
|
|
13
|
+
},
|
|
8
14
|
"bin": {
|
|
9
|
-
"todoist-ai": "
|
|
10
|
-
"todoist-ai-http": "
|
|
15
|
+
"todoist-ai": "./bin/todoist-ai.js",
|
|
16
|
+
"todoist-ai-http": "./bin/todoist-ai-http.js"
|
|
11
17
|
},
|
|
12
18
|
"files": [
|
|
13
|
-
"
|
|
14
|
-
"
|
|
15
|
-
"
|
|
16
|
-
"package.json",
|
|
17
|
-
"LICENSE",
|
|
19
|
+
"index.mjs",
|
|
20
|
+
"index.d.ts",
|
|
21
|
+
"bin",
|
|
18
22
|
"README.md"
|
|
19
23
|
],
|
|
20
24
|
"license": "MIT",
|
|
21
|
-
"
|
|
25
|
+
"dependencies": {
|
|
26
|
+
"@doist/todoist-mcp": "^9.0.0"
|
|
27
|
+
},
|
|
22
28
|
"repository": {
|
|
23
29
|
"type": "git",
|
|
24
|
-
"url": "https://github.com/Doist/todoist-
|
|
30
|
+
"url": "https://github.com/Doist/todoist-mcp"
|
|
25
31
|
},
|
|
26
|
-
"keywords": [
|
|
27
|
-
"todoist",
|
|
28
|
-
"ai",
|
|
29
|
-
"tools"
|
|
30
|
-
],
|
|
31
32
|
"publishConfig": {
|
|
32
|
-
"access": "public"
|
|
33
|
-
"provenance": true
|
|
34
|
-
},
|
|
35
|
-
"scripts": {
|
|
36
|
-
"test": "vitest run",
|
|
37
|
-
"test:watch": "vitest",
|
|
38
|
-
"test:coverage": "vitest run --coverage",
|
|
39
|
-
"build": "npm run build:lib && npm run build:apps",
|
|
40
|
-
"build:lib": "vite build",
|
|
41
|
-
"build:apps": "vite build --config src/mcp-apps/vite.config.ts",
|
|
42
|
-
"postbuild": "chmod +x dist/main.js && chmod +x dist/main-http.js",
|
|
43
|
-
"start": "npm run build && npx @modelcontextprotocol/inspector node dist/main.js",
|
|
44
|
-
"dev": "concurrently \"npm run build:lib -- --watch\" \"npm run build:apps -- --watch\" \"npx @modelcontextprotocol/inspector npx nodemon --quiet --watch dist --ext js,html --exec node dist/main.js\"",
|
|
45
|
-
"dev:http": "concurrently \"npm run build:lib -- --watch\" \"npm run build:apps -- --watch\" \"npx nodemon --quiet --watch dist --ext js,html --exec node dist/main-http.js\"",
|
|
46
|
-
"start:http": "npm run build && node dist/main-http.js",
|
|
47
|
-
"dev:apps": "vite build --watch --config src/mcp-apps/vite.config.ts",
|
|
48
|
-
"dev:widget": "npm run dev:apps",
|
|
49
|
-
"setup": "cp .env.example .env && npm install && npm run build",
|
|
50
|
-
"tool": "tsx scripts/run-tool.ts",
|
|
51
|
-
"tool:list": "tsx scripts/run-tool.ts --list",
|
|
52
|
-
"test:executable": "npm run build && node scripts/test-executable.cjs",
|
|
53
|
-
"type-check": "npx tsc --noEmit",
|
|
54
|
-
"format:check": "oxlint src scripts && oxfmt --check",
|
|
55
|
-
"format:fix": "oxlint src scripts --fix && oxfmt",
|
|
56
|
-
"lint:schemas": "npm run build && npx tsx scripts/validate-schemas.ts",
|
|
57
|
-
"check": "oxlint src scripts && oxfmt --check && npm run lint:schemas",
|
|
58
|
-
"prepublishOnly": "npm run build && npm test",
|
|
59
|
-
"prepare": "husky"
|
|
60
|
-
},
|
|
61
|
-
"dependencies": {
|
|
62
|
-
"@doist/todoist-sdk": "10.1.5",
|
|
63
|
-
"@modelcontextprotocol/ext-apps": "1.2.2",
|
|
64
|
-
"date-fns": "4.1.0",
|
|
65
|
-
"dompurify": "3.3.3",
|
|
66
|
-
"dotenv": "17.3.1",
|
|
67
|
-
"express": "5.2.1",
|
|
68
|
-
"zod": "4.3.6"
|
|
69
|
-
},
|
|
70
|
-
"peerDependencies": {
|
|
71
|
-
"@modelcontextprotocol/sdk": "^1.25.0"
|
|
72
|
-
},
|
|
73
|
-
"devDependencies": {
|
|
74
|
-
"@modelcontextprotocol/inspector": "0.21.2",
|
|
75
|
-
"@semantic-release/changelog": "6.0.3",
|
|
76
|
-
"@semantic-release/exec": "7.1.0",
|
|
77
|
-
"@semantic-release/git": "10.0.1",
|
|
78
|
-
"@types/dompurify": "3.2.0",
|
|
79
|
-
"@types/express": "5.0.6",
|
|
80
|
-
"@types/morgan": "1.9.10",
|
|
81
|
-
"@types/node": "22.19.17",
|
|
82
|
-
"@types/react": "19.2.14",
|
|
83
|
-
"@types/react-dom": "19.2.3",
|
|
84
|
-
"@vitejs/plugin-react": "5.2.0",
|
|
85
|
-
"concurrently": "9.2.1",
|
|
86
|
-
"conventional-changelog-conventionalcommits": "9.3.1",
|
|
87
|
-
"husky": "9.1.7",
|
|
88
|
-
"lint-staged": "16.4.0",
|
|
89
|
-
"morgan": "1.10.1",
|
|
90
|
-
"nodemon": "3.1.14",
|
|
91
|
-
"oxfmt": "0.48.0",
|
|
92
|
-
"oxlint": "1.58.0",
|
|
93
|
-
"react": "19.2.5",
|
|
94
|
-
"react-dom": "19.2.5",
|
|
95
|
-
"rimraf": "6.1.3",
|
|
96
|
-
"semantic-release": "25.0.3",
|
|
97
|
-
"snarkdown": "2.0.0",
|
|
98
|
-
"tsx": "4.21.0",
|
|
99
|
-
"typescript": "6.0.3",
|
|
100
|
-
"vite": "7.3.2",
|
|
101
|
-
"vite-plugin-dts": "4.5.4",
|
|
102
|
-
"vite-plugin-singlefile": "2.3.3",
|
|
103
|
-
"vitest": "4.1.5"
|
|
104
|
-
},
|
|
105
|
-
"lint-staged": {
|
|
106
|
-
"*.{ts,tsx,js,jsx}": [
|
|
107
|
-
"oxlint --fix",
|
|
108
|
-
"oxfmt --no-error-on-unmatched-pattern"
|
|
109
|
-
],
|
|
110
|
-
"*.{md,yml,yaml,css,json}": [
|
|
111
|
-
"oxfmt --no-error-on-unmatched-pattern"
|
|
112
|
-
],
|
|
113
|
-
"src/tools/*.ts": [
|
|
114
|
-
"npm run lint:schemas"
|
|
115
|
-
],
|
|
116
|
-
"src/index.ts": [
|
|
117
|
-
"npm run lint:schemas"
|
|
118
|
-
],
|
|
119
|
-
"scripts/validate-schemas.ts": [
|
|
120
|
-
"npm run lint:schemas"
|
|
121
|
-
]
|
|
33
|
+
"access": "public"
|
|
122
34
|
}
|
|
123
35
|
}
|
package/LICENSE
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
MIT License
|
|
2
|
-
|
|
3
|
-
Copyright (c) 2025 Doist
|
|
4
|
-
|
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
-
in the Software without restriction, including without limitation the rights
|
|
8
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
-
furnished to do so, subject to the following conditions:
|
|
11
|
-
|
|
12
|
-
The above copyright notice and this permission notice shall be included in all
|
|
13
|
-
copies or substantial portions of the Software.
|
|
14
|
-
|
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
-
SOFTWARE.
|
package/dist/filter-helpers.d.ts
DELETED
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
import { TodoistApi } from '@doist/todoist-sdk';
|
|
2
|
-
export declare const RESPONSIBLE_USER_FILTERING: readonly ["assigned", "unassignedOrMe", "all"];
|
|
3
|
-
export type ResponsibleUserFiltering = (typeof RESPONSIBLE_USER_FILTERING)[number];
|
|
4
|
-
/**
|
|
5
|
-
* Resolves a responsible user name/email to user ID and email.
|
|
6
|
-
* @param client - Todoist API client
|
|
7
|
-
* @param responsibleUser - User identifier (can be user ID, name, or email)
|
|
8
|
-
* @returns Object with userId and email, or undefined if not provided
|
|
9
|
-
* @throws Error if user cannot be found
|
|
10
|
-
*/
|
|
11
|
-
export declare function resolveResponsibleUser(client: TodoistApi, responsibleUser: string | undefined): Promise<{
|
|
12
|
-
userId: string;
|
|
13
|
-
email: string;
|
|
14
|
-
} | undefined>;
|
|
15
|
-
/**
|
|
16
|
-
* Appends a filter component to a query string with proper ' & ' separator.
|
|
17
|
-
* @param query - The existing query string
|
|
18
|
-
* @param filterComponent - The filter component to append
|
|
19
|
-
* @returns The updated query string
|
|
20
|
-
*/
|
|
21
|
-
export declare function appendToQuery(query: string, filterComponent: string): string;
|
|
22
|
-
/**
|
|
23
|
-
* Builds a query filter string for responsible user filtering that can be appended to a Todoist filter query.
|
|
24
|
-
* @param resolvedAssigneeId - The resolved assignee ID (if provided)
|
|
25
|
-
* @param assigneeEmail - The assignee email (if provided)
|
|
26
|
-
* @param responsibleUserFiltering - The filtering mode ('assigned', 'unassignedOrMe', 'all')
|
|
27
|
-
* @returns Query filter string (e.g., "assigned to: email@example.com" or "!assigned to: others")
|
|
28
|
-
*/
|
|
29
|
-
export declare function buildResponsibleUserQueryFilter({ resolvedAssigneeId, assigneeEmail, responsibleUserFiltering, }: {
|
|
30
|
-
resolvedAssigneeId: string | undefined;
|
|
31
|
-
assigneeEmail: string | undefined;
|
|
32
|
-
responsibleUserFiltering?: ResponsibleUserFiltering;
|
|
33
|
-
}): string;
|
|
34
|
-
/**
|
|
35
|
-
* Filters tasks based on responsible user logic:
|
|
36
|
-
* - If resolvedAssigneeId is provided: returns only tasks assigned to that user
|
|
37
|
-
* - If no resolvedAssigneeId: returns only unassigned tasks or tasks assigned to current user
|
|
38
|
-
* @param tasks - Array of tasks to filter (must have responsibleUid property)
|
|
39
|
-
* @param resolvedAssigneeId - The resolved assignee ID to filter by (optional)
|
|
40
|
-
* @param currentUserId - The current authenticated user's ID
|
|
41
|
-
* @returns Filtered array of tasks
|
|
42
|
-
*/
|
|
43
|
-
export declare function filterTasksByResponsibleUser<T extends {
|
|
44
|
-
responsibleUid?: string;
|
|
45
|
-
}>({ tasks, resolvedAssigneeId, currentUserId, responsibleUserFiltering, }: {
|
|
46
|
-
tasks: T[];
|
|
47
|
-
resolvedAssigneeId: string | undefined;
|
|
48
|
-
currentUserId: string;
|
|
49
|
-
responsibleUserFiltering?: ResponsibleUserFiltering;
|
|
50
|
-
}): T[];
|
|
51
|
-
//# sourceMappingURL=filter-helpers.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"filter-helpers.d.ts","sourceRoot":"","sources":["../src/filter-helpers.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAA;AAGpD,eAAO,MAAM,0BAA0B,gDAAiD,CAAA;AACxF,MAAM,MAAM,wBAAwB,GAAG,CAAC,OAAO,0BAA0B,CAAC,CAAC,MAAM,CAAC,CAAA;AAElF;;;;;;GAMG;AACH,wBAAsB,sBAAsB,CACxC,MAAM,EAAE,UAAU,EAClB,eAAe,EAAE,MAAM,GAAG,SAAS,GACpC,OAAO,CAAC;IAAE,MAAM,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,GAAG,SAAS,CAAC,CAaxD;AAED;;;;;GAKG;AACH,wBAAgB,aAAa,CAAC,KAAK,EAAE,MAAM,EAAE,eAAe,EAAE,MAAM,GAAG,MAAM,CAQ5E;AAED;;;;;;GAMG;AACH,wBAAgB,+BAA+B,CAAC,EAC5C,kBAAkB,EAClB,aAAa,EACb,wBAA2C,GAC9C,EAAE;IACC,kBAAkB,EAAE,MAAM,GAAG,SAAS,CAAA;IACtC,aAAa,EAAE,MAAM,GAAG,SAAS,CAAA;IACjC,wBAAwB,CAAC,EAAE,wBAAwB,CAAA;CACtD,GAAG,MAAM,CAmBT;AAED;;;;;;;;GAQG;AACH,wBAAgB,4BAA4B,CAAC,CAAC,SAAS;IAAE,cAAc,CAAC,EAAE,MAAM,CAAA;CAAE,EAAE,EAChF,KAAK,EACL,kBAAkB,EAClB,aAAa,EACb,wBAA2C,GAC9C,EAAE;IACC,KAAK,EAAE,CAAC,EAAE,CAAA;IACV,kBAAkB,EAAE,MAAM,GAAG,SAAS,CAAA;IACtC,aAAa,EAAE,MAAM,CAAA;IACrB,wBAAwB,CAAC,EAAE,wBAAwB,CAAA;CACtD,GAAG,CAAC,EAAE,CAWN"}
|