tododdle-mcp 2.7.1 → 3.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.
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tododdle",
3
- "version": "2.7.1",
3
+ "version": "3.0.0",
4
4
  "description": "Disciplined agent workflows for projects managed in ToDoddle.",
5
5
  "author": {
6
6
  "name": "ToDoddle",
@@ -9,19 +9,19 @@
9
9
  "homepage": "https://tododdle.com",
10
10
  "repository": "https://github.com/krffl/tododdle-mcp",
11
11
  "license": "MIT",
12
- "keywords": ["project-management", "tasks", "time-tracking", "mcp"],
12
+ "keywords": ["project-management", "tickets", "boards", "time-tracking", "mcp"],
13
13
  "skills": "./skills/",
14
14
  "interface": {
15
15
  "displayName": "ToDoddle",
16
16
  "shortDescription": "Manage tracked work with project context",
17
- "longDescription": "Use ToDoddle as the shared work ledger for project context, task execution, durable status updates, blockers, comments, and time tracking.",
17
+ "longDescription": "Use ToDoddle as the shared work ledger for project context, board and lane structure, ticket execution, durable status updates, blockers, comments, and time tracking.",
18
18
  "developerName": "ToDoddle",
19
19
  "category": "Productivity",
20
20
  "capabilities": ["Read", "Write"],
21
21
  "websiteURL": "https://tododdle.com",
22
22
  "defaultPrompt": [
23
23
  "Review my ToDoddle work queue and recommend what to do next.",
24
- "Read the project context and begin the relevant task.",
24
+ "Read the project context and begin the relevant ticket.",
25
25
  "Summarize progress and update the tracked work."
26
26
  ],
27
27
  "brandColor": "#0F766E"
package/README.md CHANGED
@@ -1,10 +1,12 @@
1
1
  # ToDoddle MCP Server
2
2
 
3
- The official Model Context Protocol stdio server for [ToDoddle](https://tododdle.com). It gives MCP-compatible agents a bounded interface for project context, task management, comments, and time tracking through ToDoddle's hosted API.
3
+ The official Model Context Protocol stdio server for [ToDoddle](https://tododdle.com). It gives MCP-compatible agents a bounded interface for project context, boards, lanes, tickets, comments, and time tracking through ToDoddle's hosted API.
4
4
 
5
5
  The package contains no ToDoddle application or database code. It is a small stdio client that authenticates as an Agent Connection and calls the hosted API.
6
6
 
7
- Agent work claims let any connected agent indicate that it is actively handling a task without becoming the human assignee. Claims use the configured Agent Connection label, an opaque run ID, and an expiring lease.
7
+ Version 3 sends its package version and compatibility level with every token and API request. If ToDoddle returns `MCP_UPDATE_REQUIRED`, run `npx --yes --prefer-online tododdle-mcp@latest` and restart the MCP host. The error includes the installed version, minimum supported level, update command, and current troubleshooting guide.
8
+
9
+ Agent work claims let any connected agent indicate that it is actively handling a ticket without becoming the human assignee. Claims use the configured Agent Connection label, an opaque run ID, and an expiring lease.
8
10
 
9
11
  ## Requirements
10
12
 
@@ -85,6 +87,23 @@ Restart Codex, open the Plugins Directory, select **ToDoddle**, and install the
85
87
 
86
88
  Installing the plugin does not create or expand ToDoddle credentials, scopes, or project grants. The skill declares the separately configured `tododdle` MCP server as a dependency.
87
89
 
90
+ ### Bounded Project Context
91
+
92
+ For substantial planning or implementation, load project context in a small, predictable sequence:
93
+
94
+ 1. Call `get_project_brief` once for the durable purpose, constraints, and success criteria.
95
+ 2. Call `get_project_context` once for bounded board and lane structure.
96
+ 3. Use `list_project_artifacts`, `list_tickets`, or `get_ticket` only for the artifacts and work relevant to the request. Keep list calls bounded and follow their pagination metadata.
97
+ 4. Reuse returned project, board, lane, ticket, and artifact IDs in the active conversation and its compaction summary. Refresh only volatile ticket state before a mutation.
98
+
99
+ Simple lookups should skip the brief and full context entirely. Call the narrowest read tool, such as `get_ticket` for a known ticket or hierarchy-filtered `list_tickets` for one board or lane. `get_work_queue` remains the cross-project operational view. The stable API fields `planId`, `sectionId`, and `taskId` identify boards, lanes, and tickets.
100
+
101
+ ### Version 3 migration
102
+
103
+ Version 3 replaces Plan, Section, and Task tool names with Board, Lane, and Ticket names. The hosted API paths and stable ID fields do not change. Version 2 clients must update to `tododdle-mcp@latest` and restart their agent host. The API returns `MCP_UPDATE_REQUIRED` with the exact update command when an old client identifies itself.
104
+
105
+ The server returns authoritative website URLs with records so an agent can hand work back to a human without reconstructing routes. Access remains the intersection of the Agent Connection's scopes, explicit project grants, and authorizing user's current ACL on every call.
106
+
88
107
  ### Repository Policy
89
108
 
90
109
  When ToDoddle should be mandatory for one repository, merge the relevant rules from [`examples/AGENTS.tododdle.md`](examples/AGENTS.tododdle.md) into that repository's `AGENTS.md`. The policy makes tracking updates durable repository guidance; the skill remains the reusable workflow.
@@ -96,50 +115,55 @@ When ToDoddle should be mandatory for one repository, merge the relevant rules f
96
115
  - `list_projects`
97
116
  - `get_project`
98
117
  - `get_project_context`
99
- - `list_plans`
100
- - `get_plan`
101
- - `list_sections`
102
- - `get_section`
118
+ - `list_boards`
119
+ - `get_board`
120
+ - `list_lanes`
121
+ - `get_lane`
103
122
  - `list_project_members`
104
123
  - `list_project_documents`
105
124
  - `get_document_download_url`
106
125
  - `list_notes`
107
126
  - `get_note`
108
- - `list_tasks`
127
+ - `list_tickets`
109
128
  - `get_work_queue`
129
+ - `list_available_work`
110
130
  - `get_focus_list`
111
- - `add_task_to_focus`
112
- - `move_focus_task`
113
- - `remove_task_from_focus`
114
- - `get_task`
131
+ - `add_ticket_to_focus`
132
+ - `move_focus_ticket`
133
+ - `remove_ticket_from_focus`
134
+ - `get_ticket`
115
135
  - `get_project_brief`
116
136
  - `list_project_artifacts`
117
137
  - `get_project_artifact`
118
138
  - `get_agent_inbox`
119
139
 
120
- ### Manage Tasks
121
-
122
- - `claim_task`
123
- - `release_task`
124
- - `create_task`
125
- - `update_task`
126
- - `transition_task`
127
- - `preview_task_move`
128
- - `move_task`
129
- - `set_task_blocker`
130
- - `add_task_comment`
140
+ ### Manage Tickets
141
+
142
+ - `claim_ticket`
143
+ - `claim_next_ticket`
144
+ - `renew_ticket_claim`
145
+ - `release_ticket`
146
+ - `create_ticket`
147
+ - `update_ticket`
148
+ - `transition_ticket`
149
+ - `preview_ticket_move`
150
+ - `move_ticket`
151
+ - `set_ticket_blocker`
152
+ - `add_ticket_comment`
131
153
  - `acknowledge_agent_reply`
132
- - `archive_task`
154
+ - `archive_ticket`
155
+
156
+ `list_available_work` reads only unblocked, currently unclaimed work in one project. `claim_next_ticket` selects the highest-ranked eligible ticket. `claim_ticket`, `renew_ticket_claim`, and `release_ticket` manage its agent lease without changing human assignment. `preview_ticket_move` reports lane automation and hierarchy blockers before a board move. `move_ticket` and `archive_ticket` are destructive because a destination lane can archive the ticket. Ticket deletion is unavailable.
133
157
 
134
- `claim_task` creates or refreshes a connection-labelled work lease and can mark the agent run as `ACTIVE` or `WAITING`; `release_task` ends that lease without changing task status or human assignment. A conflicting live claim identifies the Agent Connection already handling the task. `preview_task_move` reports section automation and hierarchy blockers before a same-project plan move. `move_task` and `archive_task` are marked destructive because a destination section may archive the task. Task deletion is intentionally unavailable.
158
+ Durable agent-to-human handoffs use typed `HANDOFF` comments with a concise outcome, verification and immutable evidence, and any remaining risk or next action. External mutations return a stable ToDoddle `uiUrl`; expiring asset token URLs must not be copied into comments. A continuing run reads and handles its Agent Connection inbox reply before acknowledgement, then reloads the linked record.
135
159
 
136
- Task create/update accepts `TASK`, `FEATURE`, `EPIC`, `BUG`, `RESEARCH`, and `ACTION_ITEM`. Section create/update supports `SET_KIND` alongside status, priority, assignee, and archive entry actions.
160
+ Ticket create/update accepts the stable kind values `TASK`, `FEATURE`, `EPIC`, `BUG`, `RESEARCH`, and `ACTION_ITEM`. Lane create/update supports `SET_KIND` alongside status, priority, assignee, and archive entry actions.
137
161
 
138
162
  ### Manage Project Structure
139
163
 
140
164
  - `create_project`, `update_project`, `archive_project`, `restore_project`
141
- - `create_plan`, `update_plan`, `move_plan`, `archive_plan`, `restore_plan`
142
- - `create_section`, `update_section`, `move_section`, `archive_section`, `restore_section`
165
+ - `create_board`, `update_board`, `move_board`, `archive_board`, `restore_board`
166
+ - `create_lane`, `update_lane`, `move_lane`, `archive_lane`, `restore_lane`
143
167
 
144
168
  Archive operations are destructive and require client approval. Permanent deletion is intentionally unavailable.
145
169
 
@@ -155,10 +179,10 @@ Notes are organization-scoped and unavailable to project-only connections.
155
179
 
156
180
  - `get_active_time_entries`
157
181
  - `list_project_time`
158
- - `list_task_time`
159
- - `start_task_timer`
160
- - `stop_task_timer`
161
- - `log_task_time`
182
+ - `list_ticket_time`
183
+ - `start_ticket_timer`
184
+ - `stop_ticket_timer`
185
+ - `log_ticket_time`
162
186
  - `update_time_entry`
163
187
  - `archive_time_entry`
164
188
 
@@ -169,7 +193,7 @@ Notes are organization-scoped and unavailable to project-only connections.
169
193
  - `create_project_artifact`
170
194
  - `update_project_artifact`
171
195
  - `transition_project_artifact`
172
- - `link_artifact_task`
196
+ - `link_artifact_ticket`
173
197
  - `add_artifact_comment`
174
198
  - `list_artifact_revisions`
175
199
  - `link_project_artifacts`
@@ -177,13 +201,13 @@ Notes are organization-scoped and unavailable to project-only connections.
177
201
  ### Upload Files
178
202
 
179
203
  - `upload_project_document`
180
- - `attach_file_to_task`
204
+ - `attach_file_to_ticket`
181
205
 
182
206
  Each tool accepts either an approved local `filePath` or an HTTPS `sourceUrl`. Local paths are disabled until `TODODDLE_UPLOAD_ROOTS` is configured. Files stream directly from this local MCP process to ToDoddle's short-lived Bunny upload URL; file bodies are never placed in MCP JSON messages.
183
207
 
184
208
  Use `get_document_download_url` with a `projectId` and `documentId` returned by `list_project_documents` to obtain a five-minute tokenized URL. The URL grants access only to that ready document and should not be stored in comments or other durable project context. Video documents return a protected stream URL when the workspace subscription permits playback.
185
209
 
186
- The server also provides task, project, and project-artifact resource templates plus `triage_work` and `daily_status` prompts.
210
+ The server also provides ticket, project, and project-artifact resource templates plus `triage_work` and `daily_status` prompts.
187
211
 
188
212
  ## Permissions
189
213
 
@@ -1,5 +1,5 @@
1
1
  {
2
- "source": "ToDoddle External API inventory, reviewed 2026-08-08",
2
+ "source": "ToDoddle External API inventory, reviewed 2026-08-09",
3
3
  "tools": {
4
4
  "list_projects": ["GET /api/external/projects"],
5
5
  "get_project": ["GET /api/external/projects/[projectId]"],
@@ -7,20 +7,20 @@
7
7
  "update_project": ["PUT /api/external/projects/[projectId]"],
8
8
  "archive_project": ["PUT /api/external/projects/[projectId]"],
9
9
  "restore_project": ["PUT /api/external/projects/[projectId]"],
10
- "list_plans": ["GET /api/external/projects/[projectId]/plans"],
11
- "get_plan": ["GET /api/external/projects/[projectId]/plans/[planId]"],
12
- "create_plan": ["POST /api/external/projects/[projectId]/plans"],
13
- "update_plan": ["PUT /api/external/projects/[projectId]/plans/[planId]"],
14
- "move_plan": ["PUT /api/external/projects/[projectId]/plans/[planId]"],
15
- "archive_plan": ["PUT /api/external/projects/[projectId]/plans/[planId]"],
16
- "restore_plan": ["PUT /api/external/projects/[projectId]/plans/[planId]"],
17
- "list_sections": ["GET /api/external/projects/[projectId]/plans/[planId]/sections"],
18
- "get_section": ["GET /api/external/projects/[projectId]/plans/[planId]/sections/[sectionId]"],
19
- "create_section": ["POST /api/external/projects/[projectId]/plans/[planId]/sections"],
20
- "update_section": ["PUT /api/external/projects/[projectId]/plans/[planId]/sections/[sectionId]"],
21
- "move_section": ["PUT /api/external/projects/[projectId]/plans/[planId]/sections/[sectionId]"],
22
- "archive_section": ["PUT /api/external/projects/[projectId]/plans/[planId]/sections/[sectionId]"],
23
- "restore_section": ["PUT /api/external/projects/[projectId]/plans/[planId]/sections/[sectionId]"],
10
+ "list_boards": ["GET /api/external/projects/[projectId]/plans"],
11
+ "get_board": ["GET /api/external/projects/[projectId]/plans/[planId]"],
12
+ "create_board": ["POST /api/external/projects/[projectId]/plans"],
13
+ "update_board": ["PUT /api/external/projects/[projectId]/plans/[planId]"],
14
+ "move_board": ["PUT /api/external/projects/[projectId]/plans/[planId]"],
15
+ "archive_board": ["PUT /api/external/projects/[projectId]/plans/[planId]"],
16
+ "restore_board": ["PUT /api/external/projects/[projectId]/plans/[planId]"],
17
+ "list_lanes": ["GET /api/external/projects/[projectId]/plans/[planId]/sections"],
18
+ "get_lane": ["GET /api/external/projects/[projectId]/plans/[planId]/sections/[sectionId]"],
19
+ "create_lane": ["POST /api/external/projects/[projectId]/plans/[planId]/sections"],
20
+ "update_lane": ["PUT /api/external/projects/[projectId]/plans/[planId]/sections/[sectionId]"],
21
+ "move_lane": ["PUT /api/external/projects/[projectId]/plans/[planId]/sections/[sectionId]"],
22
+ "archive_lane": ["PUT /api/external/projects/[projectId]/plans/[planId]/sections/[sectionId]"],
23
+ "restore_lane": ["PUT /api/external/projects/[projectId]/plans/[planId]/sections/[sectionId]"],
24
24
  "list_project_members": ["GET /api/external/projects/[projectId]/members"],
25
25
  "list_project_documents": ["GET /api/external/projects/[projectId]/documents"],
26
26
  "get_document_download_url": ["POST /api/external/projects/[projectId]/documents/[documentId]/download-url"],
@@ -28,7 +28,7 @@
28
28
  "POST /api/external/projects/[projectId]/documents/upload-sessions",
29
29
  "POST /api/external/projects/[projectId]/documents/[documentId]/finalize"
30
30
  ],
31
- "attach_file_to_task": [
31
+ "attach_file_to_ticket": [
32
32
  "POST /api/external/projects/[projectId]/documents/upload-sessions",
33
33
  "POST /api/external/projects/[projectId]/documents/[documentId]/finalize"
34
34
  ],
@@ -39,30 +39,33 @@
39
39
  "archive_note": ["DELETE /api/external/notes/[noteId]"],
40
40
  "get_project_context": ["GET /api/external/projects/[projectId]/context"],
41
41
  "get_work_queue": ["GET /api/external/work-queue"],
42
+ "list_available_work": ["GET /api/external/work-queue/available"],
43
+ "claim_next_ticket": ["POST /api/external/work-queue/available"],
42
44
  "get_focus_list": ["GET /api/external/focus"],
43
- "add_task_to_focus": ["POST /api/external/focus"],
44
- "move_focus_task": ["PATCH /api/external/focus/[taskId]"],
45
- "remove_task_from_focus": ["DELETE /api/external/focus/[taskId]"],
46
- "list_tasks": ["GET /api/external/tasks"],
47
- "get_task": ["GET /api/external/tasks/[taskId]"],
48
- "claim_task": ["PUT /api/external/tasks/[taskId]/claim"],
49
- "release_task": ["DELETE /api/external/tasks/[taskId]/claim"],
50
- "create_task": ["POST /api/external/tasks"],
51
- "update_task": ["PUT /api/external/tasks/[taskId]"],
52
- "transition_task": ["PUT /api/external/tasks/[taskId]"],
53
- "set_task_blocker": ["PUT /api/external/tasks/[taskId]"],
54
- "move_task": ["PUT /api/external/tasks/[taskId]/move"],
55
- "preview_task_move": ["POST /api/external/tasks/[taskId]/move/preview"],
56
- "add_task_comment": ["POST /api/external/tasks/[taskId]/comments"],
45
+ "add_ticket_to_focus": ["POST /api/external/focus"],
46
+ "move_focus_ticket": ["PATCH /api/external/focus/[taskId]"],
47
+ "remove_ticket_from_focus": ["DELETE /api/external/focus/[taskId]"],
48
+ "list_tickets": ["GET /api/external/tasks"],
49
+ "get_ticket": ["GET /api/external/tasks/[taskId]"],
50
+ "claim_ticket": ["PUT /api/external/tasks/[taskId]/claim"],
51
+ "renew_ticket_claim": ["PUT /api/external/tasks/[taskId]/claim"],
52
+ "release_ticket": ["DELETE /api/external/tasks/[taskId]/claim"],
53
+ "create_ticket": ["POST /api/external/tasks"],
54
+ "update_ticket": ["PUT /api/external/tasks/[taskId]"],
55
+ "transition_ticket": ["PUT /api/external/tasks/[taskId]"],
56
+ "set_ticket_blocker": ["PUT /api/external/tasks/[taskId]"],
57
+ "move_ticket": ["PUT /api/external/tasks/[taskId]/move"],
58
+ "preview_ticket_move": ["POST /api/external/tasks/[taskId]/move/preview"],
59
+ "add_ticket_comment": ["POST /api/external/tasks/[taskId]/comments"],
57
60
  "get_agent_inbox": ["GET /api/external/agent-inbox"],
58
61
  "acknowledge_agent_reply": ["POST /api/external/agent-inbox/[commentId]/acknowledge"],
59
- "archive_task": ["PATCH /api/external/tasks/[taskId]/archive"],
62
+ "archive_ticket": ["PATCH /api/external/tasks/[taskId]/archive"],
60
63
  "get_active_time_entries": ["GET /api/external/time-entries/active"],
61
64
  "list_project_time": ["GET /api/external/projects/[projectId]/time-entries"],
62
- "list_task_time": ["GET /api/external/projects/[projectId]/tasks/[taskId]/time-entries"],
63
- "start_task_timer": ["POST /api/external/projects/[projectId]/tasks/[taskId]/time-entries"],
64
- "log_task_time": ["POST /api/external/projects/[projectId]/tasks/[taskId]/time-entries"],
65
- "stop_task_timer": ["POST /api/external/projects/[projectId]/tasks/[taskId]/time-entries/[timeEntryId]/stop"],
65
+ "list_ticket_time": ["GET /api/external/projects/[projectId]/tasks/[taskId]/time-entries"],
66
+ "start_ticket_timer": ["POST /api/external/projects/[projectId]/tasks/[taskId]/time-entries"],
67
+ "log_ticket_time": ["POST /api/external/projects/[projectId]/tasks/[taskId]/time-entries"],
68
+ "stop_ticket_timer": ["POST /api/external/projects/[projectId]/tasks/[taskId]/time-entries/[timeEntryId]/stop"],
66
69
  "update_time_entry": ["PATCH /api/external/projects/[projectId]/tasks/[taskId]/time-entries/[timeEntryId]"],
67
70
  "archive_time_entry": ["DELETE /api/external/projects/[projectId]/tasks/[taskId]/time-entries/[timeEntryId]"],
68
71
  "get_project_brief": ["GET /api/external/projects/[projectId]/brief"],
@@ -73,19 +76,21 @@
73
76
  "link_project_artifacts": ["POST /api/external/projects/[projectId]/artifacts/[artifactId]/relations"],
74
77
  "update_project_artifact": ["PATCH /api/external/projects/[projectId]/artifacts/[artifactId]"],
75
78
  "transition_project_artifact": ["POST /api/external/projects/[projectId]/artifacts/[artifactId]/transition"],
76
- "link_artifact_task": ["POST /api/external/projects/[projectId]/artifacts/[artifactId]/task-links"],
79
+ "link_artifact_ticket": ["POST /api/external/projects/[projectId]/artifacts/[artifactId]/task-links"],
77
80
  "add_artifact_comment": ["POST /api/external/projects/[projectId]/artifacts/[artifactId]/comments"]
78
81
  },
79
82
  "exceptions": {
80
83
  "POST /api/external/oauth/token": "Transport-level OAuth token acquisition is exercised by the API client, not exposed as a model-callable tool.",
84
+ "GET /api/external/action-approvals": "Consequential-action review is a human control surface and is not exposed as a model-callable read.",
85
+ "GET /api/external/action-approvals/[approvalId]": "Consequential-action detail is a human control surface and is not exposed as a model-callable read.",
81
86
  "DELETE /api/external/projects/[projectId]": "Compatibility hard-delete endpoint is intentionally omitted; MCP exposes reversible archive and restore tools.",
82
87
  "DELETE /api/external/projects/[projectId]/plans/[planId]": "Compatibility hard-delete endpoint is intentionally omitted; MCP exposes reversible archive and restore tools.",
83
88
  "DELETE /api/external/projects/[projectId]/plans/[planId]/sections/[sectionId]": "Compatibility endpoint is intentionally omitted; MCP exposes explicit optimistic archive and restore tools.",
84
- "POST /api/external/projects/[projectId]/tasks/[taskId]/attachments": "Attachment creation is completed by the direct-upload finalize operation used by attach_file_to_task.",
85
- "GET /api/external/tasks/[taskId]/comments": "get_task returns bounded comments with the complete task context, avoiding a redundant model-callable read.",
86
- "DELETE /api/external/tasks/[taskId]": "Compatibility hard-delete endpoint is intentionally omitted; MCP exposes archive_task.",
89
+ "POST /api/external/projects/[projectId]/tasks/[taskId]/attachments": "Attachment creation is completed by the direct-upload finalize operation used by attach_file_to_ticket.",
90
+ "GET /api/external/tasks/[taskId]/comments": "get_ticket returns bounded comments with the complete ticket context, avoiding a redundant model-callable read.",
91
+ "DELETE /api/external/tasks/[taskId]": "Compatibility hard-delete endpoint is intentionally omitted; MCP exposes archive_ticket.",
87
92
  "GET /api/external/todos": "Superseded personal-list contract; MCP uses the bounded Focus API.",
88
- "POST /api/external/todos": "Superseded personal-list contract; MCP uses add_task_to_focus.",
89
- "DELETE /api/external/todos/[taskId]": "Superseded personal-list contract; MCP uses remove_task_from_focus."
93
+ "POST /api/external/todos": "Superseded personal-list contract; MCP uses add_ticket_to_focus.",
94
+ "DELETE /api/external/todos/[taskId]": "Superseded personal-list contract; MCP uses remove_ticket_from_focus."
90
95
  }
91
96
  }
@@ -1 +1 @@
1
- {"version":3,"file":"api-client.d.ts","sourceRoot":"","sources":["../src/api-client.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAQ7C,qBAAa,gBAAiB,SAAQ,KAAK;IAEvC,QAAQ,CAAC,MAAM,EAAE,MAAM;IACvB,QAAQ,CAAC,IAAI,EAAE,MAAM;IAErB,QAAQ,CAAC,OAAO,CAAC,EAAE,OAAO;IAJ5B,YACW,MAAM,EAAE,MAAM,EAC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E,IAAI,EAAE,OAAO,EAAE,cAAc,CAAC,EAAE,MAAM,oCAExD;IAED,GAAG,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,oCAE9B;IAED,KAAK,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,oCAEhC;IAED,MAAM,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,oCAEjC;IAEK,UAAU,CACd,GAAG,EAAE,MAAM,EACX,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,EAC/B,QAAQ,EAAE,MAAM,EAChB,QAAQ,EAAE,MAAM,GACf,OAAO,CAAC,IAAI,CAAC,CAUf;CACF"}
@@ -1,4 +1,5 @@
1
1
  import { createReadStream } from 'node:fs';
2
+ import { MCP_REQUEST_HEADERS, formatMcpUpdateRequiredMessage } from './compatibility.js';
2
3
  export class ToDoddleApiError extends Error {
3
4
  status;
4
5
  code;
@@ -28,7 +29,10 @@ export class ToDoddleApiClient {
28
29
  });
29
30
  const response = await fetch(`${this.config.baseUrl}/api/external/oauth/token`, {
30
31
  method: 'POST',
31
- headers: { 'content-type': 'application/x-www-form-urlencoded' },
32
+ headers: {
33
+ 'content-type': 'application/x-www-form-urlencoded',
34
+ ...MCP_REQUEST_HEADERS,
35
+ },
32
36
  body: form,
33
37
  redirect: 'manual',
34
38
  });
@@ -54,6 +58,7 @@ export class ToDoddleApiClient {
54
58
  method,
55
59
  headers: {
56
60
  authorization: `Bearer ${token}`,
61
+ ...MCP_REQUEST_HEADERS,
57
62
  ...(body !== undefined ? { 'content-type': 'application/json' } : {}),
58
63
  ...(idempotencyKey ? { 'idempotency-key': idempotencyKey } : {}),
59
64
  },
@@ -91,11 +96,15 @@ export class ToDoddleApiClient {
91
96
  throw new ToDoddleApiError(response.status, 'configuration_error', `TODODDLE_BASE_URL redirected${destination ? ` to ${destination}` : ''}; configure the final API origin instead`);
92
97
  }
93
98
  toError(status, payload) {
94
- return new ToDoddleApiError(status, typeof payload.error === 'string' ? payload.error : 'server_error', typeof payload.message === 'string'
99
+ const code = typeof payload.error === 'string' ? payload.error : 'server_error';
100
+ const message = typeof payload.message === 'string'
95
101
  ? payload.message
96
102
  : typeof payload.error_description === 'string'
97
103
  ? payload.error_description
98
- : `ToDoddle request failed (${status})`, payload.details);
104
+ : `ToDoddle request failed (${status})`;
105
+ return new ToDoddleApiError(status, code, code === 'MCP_UPDATE_REQUIRED'
106
+ ? formatMcpUpdateRequiredMessage(message, payload.details)
107
+ : message, payload.details);
99
108
  }
100
109
  get(path, query) {
101
110
  return this.request('GET', path, undefined, query);
@@ -1 +1 @@
1
- {"version":3,"file":"api-client.js","sourceRoot":"","sources":["../src/api-client.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAO3C,MAAM,OAAO,gBAAiB,SAAQ,KAAK;IAE9B,MAAM;IACN,IAAI;IAEJ,OAAO;IAJlB,YACW,MAAc,EACd,IAAY,EACrB,OAAe,EACN,OAAiB;QAE1B,KAAK,CAAC,OAAO,CAAC,CAAC;sBALN,MAAM;oBACN,IAAI;uBAEJ,OAAO;QAGhB,IAAI,CAAC,IAAI,GAAG,kBAAkB,CAAC;IACjC,CAAC;CACF;AAmBD,MAAM,OAAO,iBAAiB;IAIC,MAAM;IAH3B,WAAW,GAAkB,IAAI,CAAC;IAClC,cAAc,GAAG,CAAC,CAAC;IAE3B,YAA6B,MAAiB;sBAAjB,MAAM;IAAc,CAAC;IAE1C,KAAK,CAAC,cAAc;QAC1B,IAAI,IAAI,CAAC,WAAW,IAAI,IAAI,CAAC,GAAG,EAAE,GAAG,IAAI,CAAC,cAAc,GAAG,MAAM;YAAE,OAAO,IAAI,CAAC,WAAW,CAAC;QAE3F,MAAM,IAAI,GAAG,IAAI,eAAe,CAAC;YAC/B,UAAU,EAAE,oBAAoB;YAChC,SAAS,EAAE,IAAI,CAAC,MAAM,CAAC,QAAQ;YAC/B,aAAa,EAAE,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AC,CAAC;IACrD,CAAC;IAED,IAAI,CAAC,IAAY,EAAE,IAAa,EAAE,cAAuB;QACvD,OAAO,IAAI,CAAC,OAAO,CAAC,MAAM,EAAE,IAAI,EAAE,IAAI,EAAE,SAAS,EAAE,cAAc,CAAC,CAAC;IACrE,CAAC;IAED,GAAG,CAAC,IAAY,EAAE,IAAa;QAC7B,OAAO,IAAI,CAAC,OAAO,CAAC,KAAK,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC;IACzC,CAAC;IAED,KAAK,CAAC,IAAY,EAAE,IAAa;QAC/B,OAAO,IAAI,CAAC,OAAO,CAAC,OAAO,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC;IAC3C,CAAC;IAED,MAAM,CAAC,IAAY,EAAE,IAAa;QAChC,OAAO,IAAI,CAAC,OAAO,CAAC,QAAQ,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC;IAC5C,CAAC;IAED,KAAK,CAAC,UAAU,CACd,GAAW,EACX,OAA+B,EAC/B,QAAgB,EAChB,QAAgB;QAEhB,MAAM,QAAQ,GAAG,MAAM,KAAK,CAAC,GAAG,EAAE;YAChC,MAAM,EAAE,KAAK;YACb,OAAO,EAAE,EAAE,GAAG,OAAO,EAAE,gBAAgB,EAAE,MAAM,CAAC,QAAQ,CAAC,EAAE;YAC3D,IAAI,EAAE,gBAAgB,CAAC,QAAQ,CAAU;YACzC,MAAM,EAAE,MAAM;SACqB,CAAC,CAAC;QACvC,IAAI,CAAC,QAAQ,CAAC,EAAE,EAAE,CAAC;YACjB,MAAM,IAAI,KAAK,CAAC,yBAAyB,QAAQ,CAAC,MAAM,GAAG,CAAC,CAAC;QAC/D,CAAC;IACH,CAAC;CACF"}
@@ -0,0 +1,10 @@
1
+ export declare const MCP_PACKAGE_VERSION = "3.0.0";
2
+ export declare const MCP_COMPATIBILITY_LEVEL = 3;
3
+ export declare const MCP_VERSION_HEADER = "x-tododdle-mcp-version";
4
+ export declare const MCP_COMPATIBILITY_HEADER = "x-tododdle-mcp-compatibility";
5
+ export declare const MCP_REQUEST_HEADERS: {
6
+ readonly "x-tododdle-mcp-version": "3.0.0";
7
+ readonly "x-tododdle-mcp-compatibility": string;
8
+ };
9
+ export declare function formatMcpUpdateRequiredMessage(message: string, details: unknown): string;
10
+ //# sourceMappingURL=compatibility.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"compatibility.d.ts","sourceRoot":"","sources":["../src/compatibility.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,mBAAmB,UAAU,CAAC;AAC3C,eAAO,MAAM,uBAAuB,IAAI,CAAC;AACzC,eAAO,MAAM,kBAAkB,2BAA2B,CAAC;AAC3D,eAAO,MAAM,wBAAwB,iCAAiC,CAAC;AAEvE,eAAO,MAAM,mBAAmB;;;CAGtB,CAAC;AAUX,wBAAgB,8BAA8B,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,GAAG,MAAM,CAUxF"}
@@ -0,0 +1,17 @@
1
+ export const MCP_PACKAGE_VERSION = '3.0.0';
2
+ export const MCP_COMPATIBILITY_LEVEL = 3;
3
+ export const MCP_VERSION_HEADER = 'x-tododdle-mcp-version';
4
+ export const MCP_COMPATIBILITY_HEADER = 'x-tododdle-mcp-compatibility';
5
+ export const MCP_REQUEST_HEADERS = {
6
+ [MCP_VERSION_HEADER]: MCP_PACKAGE_VERSION,
7
+ [MCP_COMPATIBILITY_HEADER]: String(MCP_COMPATIBILITY_LEVEL),
8
+ };
9
+ export function formatMcpUpdateRequiredMessage(message, details) {
10
+ const value = details && typeof details === 'object' ? details : {};
11
+ const updateCommand = typeof value.updateCommand === 'string'
12
+ ? value.updateCommand
13
+ : 'npx --yes --prefer-online tododdle-mcp@latest';
14
+ const documentation = typeof value.documentationUrl === 'string' ? ` See ${value.documentationUrl}.` : '';
15
+ return `${message} Ask the user to run \`${updateCommand}\`, then restart Codex.${documentation}`;
16
+ }
17
+ //# sourceMappingURL=compatibility.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"compatibility.js","sourceRoot":"","sources":["../src/compatibility.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,mBAAmB,GAAG,OAAO,CAAC;AAC3C,MAAM,CAAC,MAAM,uBAAuB,GAAG,CAAC,CAAC;AACzC,MAAM,CAAC,MAAM,kBAAkB,GAAG,wBAAwB,CAAC;AAC3D,MAAM,CAAC,MAAM,wBAAwB,GAAG,8BAA8B,CAAC;AAEvE,MAAM,CAAC,MAAM,mBAAmB,GAAG;IACjC,CAAC,kBAAkB,CAAC,EAAE,mBAAmB;IACzC,CAAC,wBAAwB,CAAC,EAAE,MAAM,CAAC,uBAAuB,CAAC;CACnD,CAAC;AAUX,MAAM,UAAU,8BAA8B,CAAC,OAAe,EAAE,OAAgB;IAC9E,MAAM,KAAK,GAAG,OAAO,IAAI,OAAO,OAAO,KAAK,QAAQ,CAAC,CAAC,CAAE,OAAoC,CAAC,CAAC,CAAC,EAAE,CAAC;IAClG,MAAM,aAAa,GACjB,OAAO,KAAK,CAAC,aAAa,KAAK,QAAQ;QACrC,CAAC,CAAC,KAAK,CAAC,aAAa;QACrB,CAAC,CAAC,+CAA+C,CAAC;IACtD,MAAM,aAAa,GACjB,OAAO,KAAK,CAAC,gBAAgB,KAAK,QAAQ,CAAC,CAAC,CAAC,QAAQ,KAAK,CAAC,gBAAgB,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC;IAEtF,OAAO,GAAG,OAAO,0BAA0B,aAAa,0BAA0B,aAAa,EAAE,CAAC;AACpG,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../src/server.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,SAAS,EAAoB,MAAM,yCAAyC,CAAC;AAEtF,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AA0DnD,MAAM,WAAW,wBAAwB;IACvC,WAAW,CAAC,EAAE,MAAM,EAAE,CAAC;IACvB,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB;AA6FD,wBAAgB,uBAAuB,CACrC,GAAG,EAAE,WAAW,EAChB,aAAa,GAAE,wBAA6B,GAC3C,SAAS,CAumDX"}
1
+ {"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../src/server.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,SAAS,EAAoB,MAAM,yCAAyC,CAAC;AAEtF,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AA0DnD,MAAM,WAAW,wBAAwB;IACvC,WAAW,CAAC,EAAE,MAAM,EAAE,CAAC;IACvB,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB;AA6FD,wBAAgB,uBAAuB,CACrC,GAAG,EAAE,WAAW,EAChB,aAAa,GAAE,wBAA6B,GAC3C,SAAS,CA6qDX"}