@krffl/tododdle-mcp 3.16.0 → 3.17.1
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/.claude-plugin/marketplace.json +3 -3
- package/.claude-plugin/plugin.json +1 -1
- package/.codex-plugin/plugin.json +2 -2
- package/README.md +21 -6
- package/dist/api-client.d.ts +15 -4
- package/dist/api-client.d.ts.map +1 -1
- package/dist/api-client.js +25 -6
- package/dist/api-client.js.map +1 -1
- package/dist/compatibility.d.ts +2 -2
- package/dist/compatibility.js +1 -1
- package/dist/config.d.ts +2 -1
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js +2 -1
- package/dist/config.js.map +1 -1
- package/dist/server.d.ts +6 -0
- package/dist/server.d.ts.map +1 -1
- package/dist/server.js +262 -232
- package/dist/server.js.map +1 -1
- package/dist/upload-source.d.ts +17 -0
- package/dist/upload-source.d.ts.map +1 -1
- package/dist/upload-source.js +193 -38
- package/dist/upload-source.js.map +1 -1
- package/examples/AGENTS.tododdle.md +2 -2
- package/package.json +1 -1
- package/skills/tododdle-bootstrap/scripts/update-agents.mjs +2 -2
- package/skills/tododdle-factory/SKILL.md +1 -1
- package/skills/tododdle-supervisor/SKILL.md +1 -1
- package/skills/tododdle-workflow/SKILL.md +1 -1
- package/skills/tododdle-workflow/references/files.md +3 -3
|
@@ -5,17 +5,17 @@
|
|
|
5
5
|
"url": "https://tododdle.com"
|
|
6
6
|
},
|
|
7
7
|
"description": "Agent workflow plugins for ToDoddle.",
|
|
8
|
-
"version": "3.
|
|
8
|
+
"version": "3.17.1",
|
|
9
9
|
"plugins": [
|
|
10
10
|
{
|
|
11
11
|
"name": "tododdle",
|
|
12
12
|
"displayName": "ToDoddle",
|
|
13
13
|
"description": "Connect repositories and use ToDoddle for project context and ticket execution.",
|
|
14
|
-
"version": "3.
|
|
14
|
+
"version": "3.17.1",
|
|
15
15
|
"source": {
|
|
16
16
|
"source": "npm",
|
|
17
17
|
"package": "@krffl/tododdle-mcp",
|
|
18
|
-
"version": "3.
|
|
18
|
+
"version": "3.17.1"
|
|
19
19
|
},
|
|
20
20
|
"category": "productivity",
|
|
21
21
|
"tags": [
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "tododdle",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.17.1",
|
|
4
4
|
"description": "Disciplined agent workflows for projects managed in ToDoddle.",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "ToDoddle",
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
"interface": {
|
|
21
21
|
"displayName": "ToDoddle",
|
|
22
22
|
"shortDescription": "Manage tracked work with project context",
|
|
23
|
-
"longDescription": "Connect an existing repository to a verified ToDoddle project, then use ToDoddle
|
|
23
|
+
"longDescription": "Connect an existing repository to a verified ToDoddle project, then use ToDoddle to track project context, board and lane structure, ticket execution, durable status updates, blockers, comments, and time tracking.",
|
|
24
24
|
"developerName": "ToDoddle",
|
|
25
25
|
"category": "Productivity",
|
|
26
26
|
"capabilities": [
|
package/README.md
CHANGED
|
@@ -81,7 +81,7 @@ The MCP server provides capabilities. The package distributes four optional skil
|
|
|
81
81
|
|
|
82
82
|
| Skill | Use |
|
|
83
83
|
| --- | --- |
|
|
84
|
-
| `tododdle-workflow` | Manage ordinary tracked work and
|
|
84
|
+
| `tododdle-workflow` | Manage ordinary tracked work and keep it current on the ToDoddle board. |
|
|
85
85
|
| `tododdle-bootstrap` | Bind an existing repository to one verified ToDoddle project. |
|
|
86
86
|
| `tododdle-factory` | Run one explicit, supervised autonomous delivery attempt with an Agent Run and stable evidence. |
|
|
87
87
|
| `tododdle-supervisor` | Use current ToDoddle supervision assessments at meaningful workflow decisions when a compatible backend is available. |
|
|
@@ -161,7 +161,7 @@ The server returns authoritative website URLs with records so an agent can hand
|
|
|
161
161
|
|
|
162
162
|
### Repository Policy
|
|
163
163
|
|
|
164
|
-
When adding ToDoddle to an existing repository, invoke `$tododdle-bootstrap`. It verifies the ToDoddle project and adds a managed work-
|
|
164
|
+
When adding ToDoddle to an existing repository, invoke `$tododdle-bootstrap`. It verifies the ToDoddle project and adds a managed work-tracking block to the effective root instruction file. It uses `AGENTS.override.md` when that file already exists. Otherwise, it updates or creates `AGENTS.md`.
|
|
165
165
|
|
|
166
166
|
The bootstrap updater preserves every instruction outside `<!-- tododdle:start -->` and `<!-- tododdle:end -->`. It updates an existing block instead of adding a duplicate. It stops on malformed markers. Run its dry mode first and review the diff before writing. The updater never commits, pushes, or stores credentials.
|
|
167
167
|
|
|
@@ -352,9 +352,11 @@ Omit `projectId` to work with workspace Notes. Supply `projectId` to work with N
|
|
|
352
352
|
|
|
353
353
|
Each tool accepts either an approved local `filePath` or an HTTPS `sourceUrl`. A missing file, or a file outside the system temporary directory, returns a message that names that directory. ToDoddle stores SVG, HTML, and other active content as `application/octet-stream` so it can never run in a browser; when the stored type differs from the requested one, the upload result includes a `notice` that says so. Image uploads (PNG, JPEG, GIF, WebP, and SVG) also return `embedMarkdown`, such as ``, to paste into a Note or Context; an SVG embeds through its PNG rendering at `/thumbnail`. The image shows only to people who can open that document. Local files must be regular files in the system temporary directory (`os.tmpdir()`, resolved through symlinks), and the current user must own them. The MCP rejects symlinks, directories, devices, and files owned by another user. 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.
|
|
354
354
|
|
|
355
|
-
|
|
355
|
+
The MCP opens a local file once, with `O_NOFOLLOW`, and checks the open descriptor: it must be a regular file, owned by the current user, and within the size limit. It then streams the bytes from that descriptor. If the path is swapped for a symlink or another file after the checks, the upload still sends the checked file.
|
|
356
356
|
|
|
357
|
-
|
|
357
|
+
To stage a copy, create a staging directory with `mktemp -d "${TMPDIR:-/tmp}/tododdle-upload-XXXXXX"` and copy the file into it. After the tool confirms success, the MCP deletes a local file and its empty parent directory only when the file is directly in a `tododdle-upload-*` directory in the system temporary directory, and only if the path still names the file it uploaded. It never deletes any other file. An agent that staged a copy anywhere else should remove that copy itself after confirmed success. Keep the copy after a failed or uncertain upload so the upload can be retried. Never remove the original source or a pre-existing file. Temporary files that the MCP creates for HTTPS sources are removed automatically.
|
|
358
|
+
|
|
359
|
+
For a pasted or clipboard image, create a staging directory with `mktemp -d "${TMPDIR:-/tmp}/tododdle-upload-XXXXXX"`. Save or copy the image attachment there with a suitable image extension. Never alter the original clipboard attachment. The MCP removes the staged file after confirmed success. It keeps the file after a failed or uncertain upload so the agent can retry and report the path.
|
|
358
360
|
|
|
359
361
|
Remote clients use `begin_upload` and `complete_upload`. Call `begin_upload` with file metadata and an idempotency key. Upload the file bytes from the user's device directly to the returned short-lived URL with the returned headers. Then call `complete_upload` with the document ID and a new idempotency key. Do not print, log, or store the signed URL. A client that cannot send the direct HTTPS upload cannot use remote attachments. The hosted gateway and Vercel never receive or stage the file bytes.
|
|
360
362
|
|
|
@@ -384,7 +386,7 @@ Common scopes include:
|
|
|
384
386
|
- `releases:read` and `releases:write`
|
|
385
387
|
- `testbench:read` and `testbench:write`
|
|
386
388
|
|
|
387
|
-
Uploading a project document requires `projects:read` and `documents:write`. Attaching a new upload to a task also requires `tasks:write`.
|
|
389
|
+
Uploading a project document requires `projects:read` and `documents:write`. Attaching a new upload to a task also requires `tasks:write`. `send_feedback` requires `tasks:write` because it opens a support case.
|
|
388
390
|
|
|
389
391
|
## Environment
|
|
390
392
|
|
|
@@ -432,7 +434,7 @@ The npm `prepack` lifecycle builds `dist/` automatically. `prepublishOnly` runs
|
|
|
432
434
|
## Release Safety
|
|
433
435
|
|
|
434
436
|
- Review `npm pack --dry-run` and verify that only the declared runtime, plugin, skill, examples, parity manifest, documentation, license, and package metadata are present.
|
|
435
|
-
- Publish from a tagged release with npm trusted publishing/provenance where available.
|
|
437
|
+
- Publish from a tagged release with npm trusted publishing/provenance where available. The publish workflow has two jobs. `build` has read-only permissions: it checks that the release tag is on `main`, runs `npm ci`, formatting, types, tests with coverage, and the audit, then packs the tarball. `publish` has the `id-token: write` permission only: it downloads that tarball, checks its SHA-256, and runs `npm publish <tarball> --provenance --ignore-scripts` without installing anything.
|
|
436
438
|
- Treat tool removal, renaming, or incompatible input changes as major releases.
|
|
437
439
|
- Keep generated ToDoddle connection snippets pinned to a tested package version.
|
|
438
440
|
|
|
@@ -478,6 +480,19 @@ This release also includes changes made since 3.7.0: the read-only `list_securit
|
|
|
478
480
|
|
|
479
481
|
The release raises `@modelcontextprotocol/sdk` to `^1.32.1` to fix [GHSA-6qxp-vccf-f47h](https://github.com/advisories/GHSA-6qxp-vccf-f47h), where SDK versions before 1.31.0 could send OAuth client credentials to an authorization server chosen by the MCP server.
|
|
480
482
|
|
|
483
|
+
### 3.17.1 release
|
|
484
|
+
|
|
485
|
+
- The skills, the plugin descriptions, the README and the bootstrap `AGENTS.md` block now describe ToDoddle in plain terms such as "track work" and "ticket updates". The bootstrap block heading is now `## ToDoddle Work Tracking`. Re-run `$tododdle-bootstrap` to update an existing block; it replaces the text between the managed markers. No tool or API behavior changes.
|
|
486
|
+
|
|
487
|
+
### 3.17.0 release
|
|
488
|
+
|
|
489
|
+
- Every ID that goes into an API path must be a ToDoddle ID: letters, digits, `_`, or `-` (up to 200 characters). Tools reject other values before they call the API. The API client also refuses any path with `..`, `?`, `#`, `\`, or an encoded `/`, `\`, or `.`, and any path that resolves to a different route. Query strings go through the client's `query` argument. `ToDoddleApi.patch` takes an optional fourth `query` argument, which `update_project_artifact` uses for `detail=summary`. A hosted gateway that implements `ToDoddleApi` must pass that argument on.
|
|
490
|
+
- Link fields (`uiUrl`, `href`, `upgradeHref`) become absolute only when the result stays on the app origin. A value such as `/\evil.example/x` is left unchanged.
|
|
491
|
+
- HTTPS upload sources now reject more special-purpose addresses: `0.0.0.0/8`, `100.64.0.0/10`, `192.0.0.0/24`, `198.18.0.0/15`, `224.0.0.0/4`, `240.0.0.0/4` (with `255.255.255.255`), documentation ranges, and all of `fe80::/10`, `fec0::/10`, `fc00::/7`, and `ff00::/8`. IPv6 forms that carry an IPv4 address (mapped, including hex such as `::ffff:7f00:1`; compatible; NAT64 `64:ff9b::/96`; and 6to4 `2002::/16`) are checked as that IPv4 address. A value that is not an IP address is treated as private.
|
|
492
|
+
- Local uploads open the file once with `O_NOFOLLOW` and stream from the checked descriptor, so a path swap after the checks cannot change what is sent. `ToDoddleApi.uploadFile` now takes an open `FileHandle` instead of a path. After a confirmed upload, the MCP deletes a local file only when it is directly in a `tododdle-upload-*` directory in the system temporary directory (for example one made with `mktemp -d "${TMPDIR:-/tmp}/tododdle-upload-XXXXXX"`). Before, it deleted any uploaded file in the temporary directory.
|
|
493
|
+
- `send_feedback` needs `tasks:write`, not `tasks:read`, because it opens a support case. The ToDoddle API and the hosted gateway enforce the new scope.
|
|
494
|
+
- The publish workflow is split into a read-only `build` job and a `publish` job that holds `id-token: write`. The npm token never sees `npm ci` or the test run, and a release tag that is not on `main` fails the workflow.
|
|
495
|
+
|
|
481
496
|
### 3.16.0 release
|
|
482
497
|
|
|
483
498
|
- The package is now `@krffl/tododdle-mcp`. Update your MCP config to run `npx --yes --prefer-online @krffl/tododdle-mcp@latest`. The command name stays `tododdle-mcp`.
|
package/dist/api-client.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { McpConfig } from './config.js';
|
|
2
|
+
import type { FileHandle } from 'node:fs/promises';
|
|
2
3
|
export interface AgentRunRequestContext {
|
|
3
4
|
runId: string;
|
|
4
5
|
projectId: string;
|
|
@@ -18,13 +19,22 @@ export declare class ToDoddleApiError extends Error {
|
|
|
18
19
|
readonly scopes?: ToDoddleScopeDenial | undefined;
|
|
19
20
|
constructor(status: number, code: string, message: string, details?: unknown, scopes?: ToDoddleScopeDenial | undefined);
|
|
20
21
|
}
|
|
22
|
+
type QueryParams = Record<string, string | number | boolean | undefined>;
|
|
23
|
+
/**
|
|
24
|
+
* Resolves an API path against the base URL and refuses anything that is not a
|
|
25
|
+
* plain absolute path on that origin. Query strings go through `query`, never
|
|
26
|
+
* through the path, so `?` and `#` are rejected too. This is the last guard if
|
|
27
|
+
* an ID with `/`, `..`, or an encoded separator ever reaches a path.
|
|
28
|
+
*/
|
|
29
|
+
export declare function resolveApiPath(path: string, baseUrl: string): URL;
|
|
21
30
|
export interface ToDoddleApi {
|
|
22
31
|
get(path: string, query?: Record<string, string | number | boolean | undefined>, runContext?: AgentRunRequestContext): Promise<Record<string, unknown>>;
|
|
23
32
|
post(path: string, body: unknown, idempotencyKey?: string, runContext?: AgentRunRequestContext): Promise<Record<string, unknown>>;
|
|
24
33
|
put(path: string, body: unknown, runContext?: AgentRunRequestContext): Promise<Record<string, unknown>>;
|
|
25
|
-
patch(path: string, body: unknown, runContext?: AgentRunRequestContext): Promise<Record<string, unknown>>;
|
|
34
|
+
patch(path: string, body: unknown, runContext?: AgentRunRequestContext, query?: QueryParams): Promise<Record<string, unknown>>;
|
|
26
35
|
delete(path: string, body: unknown, runContext?: AgentRunRequestContext): Promise<Record<string, unknown>>;
|
|
27
|
-
|
|
36
|
+
/** Streams `fileSize` bytes from an open file. The caller owns and closes `file`. */
|
|
37
|
+
uploadFile(url: string, headers: Record<string, string>, file: FileHandle, fileSize: number): Promise<void>;
|
|
28
38
|
}
|
|
29
39
|
export declare class ToDoddleApiClient implements ToDoddleApi {
|
|
30
40
|
private readonly config;
|
|
@@ -39,8 +49,9 @@ export declare class ToDoddleApiClient implements ToDoddleApi {
|
|
|
39
49
|
get(path: string, query?: Record<string, string | number | boolean | undefined>, runContext?: AgentRunRequestContext): Promise<Record<string, unknown>>;
|
|
40
50
|
post(path: string, body: unknown, idempotencyKey?: string, runContext?: AgentRunRequestContext): Promise<Record<string, unknown>>;
|
|
41
51
|
put(path: string, body: unknown, runContext?: AgentRunRequestContext): Promise<Record<string, unknown>>;
|
|
42
|
-
patch(path: string, body: unknown, runContext?: AgentRunRequestContext): Promise<Record<string, unknown>>;
|
|
52
|
+
patch(path: string, body: unknown, runContext?: AgentRunRequestContext, query?: QueryParams): Promise<Record<string, unknown>>;
|
|
43
53
|
delete(path: string, body: unknown, runContext?: AgentRunRequestContext): Promise<Record<string, unknown>>;
|
|
44
|
-
uploadFile(url: string, headers: Record<string, string>,
|
|
54
|
+
uploadFile(url: string, headers: Record<string, string>, file: FileHandle, fileSize: number): Promise<void>;
|
|
45
55
|
}
|
|
56
|
+
export {};
|
|
46
57
|
//# sourceMappingURL=api-client.d.ts.map
|
package/dist/api-client.d.ts.map
CHANGED
|
@@ -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;
|
|
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;AAC7C,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAQnD,MAAM,WAAW,sBAAsB;IACrC,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EACF,mBAAmB,GACnB,eAAe,GACf,sBAAsB,GACtB,0BAA0B,GAC1B,iBAAiB,GACjB,4BAA4B,GAC5B,qBAAqB,CAAC;CAC3B;AAED,sEAAsE;AACtE,MAAM,WAAW,mBAAmB;IAClC,cAAc,CAAC,EAAE,MAAM,EAAE,CAAC;IAC1B,aAAa,CAAC,EAAE,MAAM,EAAE,CAAC;IACzB,aAAa,CAAC,EAAE,MAAM,EAAE,CAAC;CAC1B;AAED,qBAAa,gBAAiB,SAAQ,KAAK;IAEvC,QAAQ,CAAC,MAAM,EAAE,MAAM;IACvB,QAAQ,CAAC,IAAI,EAAE,MAAM;IAErB,QAAQ,CAAC,OAAO,CAAC,EAAE,OAAO;IAC1B,QAAQ,CAAC,MAAM,CAAC,EAAE,mBAAmB;IALvC,YACW,MAAM,EAAE,MAAM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,IAAI,EAAE,UAAU,EAChB,QAAQ,EAAE,MAAM,GACf,OAAO,CAAC,IAAI,CAAC,CAWf;CACF"}
|
package/dist/api-client.js
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { createReadStream } from 'node:fs';
|
|
2
1
|
import { MCP_REQUEST_HEADERS, formatMcpUpdateRequiredMessage } from './compatibility.js';
|
|
3
2
|
export class ToDoddleApiError extends Error {
|
|
4
3
|
status;
|
|
@@ -34,6 +33,25 @@ function scopeDenial(payload) {
|
|
|
34
33
|
return undefined;
|
|
35
34
|
return { requiredScopes, missingScopes, grantedScopes };
|
|
36
35
|
}
|
|
36
|
+
/** Matches path text that could leave the intended route or smuggle a query. */
|
|
37
|
+
const UNSAFE_PATH_PATTERN = /\.\.|[?#\\]|%2f|%5c|%2e/i;
|
|
38
|
+
/**
|
|
39
|
+
* Resolves an API path against the base URL and refuses anything that is not a
|
|
40
|
+
* plain absolute path on that origin. Query strings go through `query`, never
|
|
41
|
+
* through the path, so `?` and `#` are rejected too. This is the last guard if
|
|
42
|
+
* an ID with `/`, `..`, or an encoded separator ever reaches a path.
|
|
43
|
+
*/
|
|
44
|
+
export function resolveApiPath(path, baseUrl) {
|
|
45
|
+
if (!path.startsWith('/') || path.startsWith('//') || UNSAFE_PATH_PATTERN.test(path)) {
|
|
46
|
+
throw new Error(`Refusing unsafe ToDoddle API path: ${JSON.stringify(path)}`);
|
|
47
|
+
}
|
|
48
|
+
const base = new URL(baseUrl);
|
|
49
|
+
const url = new URL(path, base);
|
|
50
|
+
if (url.origin !== base.origin || url.pathname !== path) {
|
|
51
|
+
throw new Error(`Refusing unsafe ToDoddle API path: ${JSON.stringify(path)}`);
|
|
52
|
+
}
|
|
53
|
+
return url;
|
|
54
|
+
}
|
|
37
55
|
export class ToDoddleApiClient {
|
|
38
56
|
config;
|
|
39
57
|
accessToken = null;
|
|
@@ -70,7 +88,7 @@ export class ToDoddleApiClient {
|
|
|
70
88
|
return token.access_token;
|
|
71
89
|
}
|
|
72
90
|
async request(method, path, body, query, idempotencyKey, retry = true, runContext) {
|
|
73
|
-
const url =
|
|
91
|
+
const url = resolveApiPath(path, this.config.baseUrl);
|
|
74
92
|
Object.entries(query || {}).forEach(([key, value]) => {
|
|
75
93
|
if (value !== undefined)
|
|
76
94
|
url.searchParams.set(key, String(value));
|
|
@@ -145,17 +163,18 @@ export class ToDoddleApiClient {
|
|
|
145
163
|
put(path, body, runContext) {
|
|
146
164
|
return this.request('PUT', path, body, undefined, undefined, true, runContext);
|
|
147
165
|
}
|
|
148
|
-
patch(path, body, runContext) {
|
|
149
|
-
return this.request('PATCH', path, body,
|
|
166
|
+
patch(path, body, runContext, query) {
|
|
167
|
+
return this.request('PATCH', path, body, query, undefined, true, runContext);
|
|
150
168
|
}
|
|
151
169
|
delete(path, body, runContext) {
|
|
152
170
|
return this.request('DELETE', path, body, undefined, undefined, true, runContext);
|
|
153
171
|
}
|
|
154
|
-
async uploadFile(url, headers,
|
|
172
|
+
async uploadFile(url, headers, file, fileSize) {
|
|
155
173
|
const response = await fetch(url, {
|
|
156
174
|
method: 'PUT',
|
|
157
175
|
headers: { ...headers, 'content-length': String(fileSize) },
|
|
158
|
-
|
|
176
|
+
// Read from the descriptor that was checked, so a path swap cannot change the bytes.
|
|
177
|
+
body: file.createReadStream({ start: 0, end: fileSize - 1, autoClose: false }),
|
|
159
178
|
duplex: 'half',
|
|
160
179
|
});
|
|
161
180
|
if (!response.ok) {
|
package/dist/api-client.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"api-client.js","sourceRoot":"","sources":["../src/api-client.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"api-client.js","sourceRoot":"","sources":["../src/api-client.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,mBAAmB,EAAE,8BAA8B,EAAE,MAAM,oBAAoB,CAAC;AA4BzF,MAAM,OAAO,gBAAiB,SAAQ,KAAK;IAE9B,MAAM;IACN,IAAI;IAE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E,IAAI,EAAE,UAAU,CAAC,CAAC;IAC/E,CAAC;IAED,MAAM,CAAC,IAAY,EAAE,IAAa,EAAE,UAAmC;QACrE,OAAO,IAAI,CAAC,OAAO,CAAC,QAAQ,EAAE,IAAI,EAAE,IAAI,EAAE,SAAS,EAAE,SAAS,EAAE,IAAI,EAAE,UAAU,CAAC,CAAC;IACpF,CAAC;IAED,KAAK,CAAC,UAAU,CACd,GAAW,EACX,OAA+B,EAC/B,IAAgB,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,qFAAqF;YACrF,IAAI,EAAE,IAAI,CAAC,gBAAgB,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,GAAG,EAAE,QAAQ,GAAG,CAAC,EAAE,SAAS,EAAE,KAAK,EAAE,CAAU;YACvF,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"}
|
package/dist/compatibility.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
export declare const MCP_PACKAGE_VERSION = "3.
|
|
1
|
+
export declare const MCP_PACKAGE_VERSION = "3.17.1";
|
|
2
2
|
export declare const MCP_COMPATIBILITY_LEVEL = 3;
|
|
3
3
|
export declare const MCP_VERSION_HEADER = "x-tododdle-mcp-version";
|
|
4
4
|
export declare const MCP_COMPATIBILITY_HEADER = "x-tododdle-mcp-compatibility";
|
|
5
5
|
export declare const MCP_REQUEST_HEADERS: {
|
|
6
|
-
readonly "x-tododdle-mcp-version": "3.
|
|
6
|
+
readonly "x-tododdle-mcp-version": "3.17.1";
|
|
7
7
|
readonly "x-tododdle-mcp-compatibility": string;
|
|
8
8
|
};
|
|
9
9
|
export declare function formatMcpUpdateRequiredMessage(message: string, details: unknown): string;
|
package/dist/compatibility.js
CHANGED
package/dist/config.d.ts
CHANGED
|
@@ -8,7 +8,8 @@ export interface McpConfig {
|
|
|
8
8
|
/**
|
|
9
9
|
* The managed upload root is the system temporary directory itself, resolved through symlinks
|
|
10
10
|
* (for example macOS /var/folders/.../T becomes /private/var/folders/.../T). No subfolder is
|
|
11
|
-
* created. Safety comes from the per-file checks in prepareUploadSource.
|
|
11
|
+
* created. Safety comes from the per-file checks in prepareUploadSource. Cleanup deletes only
|
|
12
|
+
* files in a tododdle-upload-* directory directly inside this root.
|
|
12
13
|
*/
|
|
13
14
|
export declare function getDefaultManagedUploadRoot(temporaryDirectory?: string): string;
|
|
14
15
|
export declare function loadMcpConfig(environment?: NodeJS.ProcessEnv): McpConfig;
|
package/dist/config.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"AAIA,MAAM,WAAW,SAAS;IACxB,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,MAAM,CAAC;IACjB,YAAY,EAAE,MAAM,CAAC;IACrB,iBAAiB,EAAE,MAAM,CAAC;IAC1B,cAAc,EAAE,MAAM,CAAC;CACxB;AAED
|
|
1
|
+
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"AAIA,MAAM,WAAW,SAAS;IACxB,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,MAAM,CAAC;IACjB,YAAY,EAAE,MAAM,CAAC;IACrB,iBAAiB,EAAE,MAAM,CAAC;IAC1B,cAAc,EAAE,MAAM,CAAC;CACxB;AAED;;;;;GAKG;AACH,wBAAgB,2BAA2B,CAAC,kBAAkB,SAAW,GAAG,MAAM,CAMjF;AAsCD,wBAAgB,aAAa,CAAC,WAAW,GAAE,MAAM,CAAC,UAAwB,GAAG,SAAS,CA6BrF"}
|
package/dist/config.js
CHANGED
|
@@ -4,7 +4,8 @@ import { resolve } from 'node:path';
|
|
|
4
4
|
/**
|
|
5
5
|
* The managed upload root is the system temporary directory itself, resolved through symlinks
|
|
6
6
|
* (for example macOS /var/folders/.../T becomes /private/var/folders/.../T). No subfolder is
|
|
7
|
-
* created. Safety comes from the per-file checks in prepareUploadSource.
|
|
7
|
+
* created. Safety comes from the per-file checks in prepareUploadSource. Cleanup deletes only
|
|
8
|
+
* files in a tododdle-upload-* directory directly inside this root.
|
|
8
9
|
*/
|
|
9
10
|
export function getDefaultManagedUploadRoot(temporaryDirectory = tmpdir()) {
|
|
10
11
|
try {
|
package/dist/config.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.js","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACvC,OAAO,EAAE,MAAM,EAAE,MAAM,SAAS,CAAC;AACjC,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAUpC
|
|
1
|
+
{"version":3,"file":"config.js","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACvC,OAAO,EAAE,MAAM,EAAE,MAAM,SAAS,CAAC;AACjC,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAUpC;;;;;GAKG;AACH,MAAM,UAAU,2BAA2B,CAAC,kBAAkB,GAAG,MAAM,EAAE;IACvE,IAAI,CAAC;QACH,OAAO,YAAY,CAAC,MAAM,CAAC,kBAAkB,CAAC,CAAC;IACjD,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,OAAO,CAAC,kBAAkB,CAAC,CAAC;IACrC,CAAC;AACH,CAAC;AAED,SAAS,gBAAgB,CAAC,KAAyB;I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AW,CAAC,sBAAsB,CAAC;IACxD,MAAM,iBAAiB,GAAG,2BAA2B,EAAE,CAAC;IACxD,MAAM,aAAa,GAAG,MAAM,CAAC,WAAW,CAAC,yBAAyB,IAAI,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC,CAAC;IAE1F,IAAI,CAAC,QAAQ,IAAI,CAAC,YAAY,EAAE,CAAC;QAC/B,MAAM,IAAI,KAAK,CAAC,4DAA4D,CAAC,CAAC;IAChF,CAAC;IAED,IAAI,CAAC,MAAM,CAAC,aAAa,CAAC,aAAa,CAAC,IAAI,aAAa,IAAI,CAAC,EAAE,CAAC;QAC/D,MAAM,IAAI,KAAK,CAAC,sDAAsD,CAAC,CAAC;IAC1E,CAAC;IAED,IAAI,WAAW,CAAC,qBAAqB,EAAE,CAAC;QACtC,sEAAsE;QACtE,OAAO,CAAC,KAAK,CACX,qHAAqH,CACtH,CAAC;IACJ,CAAC;IAED,OAAO;QACL,OAAO;QACP,QAAQ;QACR,YAAY;QACZ,iBAAiB;QACjB,cAAc,EAAE,aAAa;KAC9B,CAAC;AACJ,CAAC"}
|
package/dist/server.d.ts
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
|
|
2
2
|
import { ToDoddleApiError, type ToDoddleApi } from './api-client.js';
|
|
3
|
+
/**
|
|
4
|
+
* ToDoddle record IDs are nanoid or cuid strings. Every ID that goes into an
|
|
5
|
+
* API path must match this pattern, so a value such as `abc/../../notes/N`
|
|
6
|
+
* cannot change which route a tool calls.
|
|
7
|
+
*/
|
|
8
|
+
export declare const TODODDLE_ID_PATTERN: RegExp;
|
|
3
9
|
/**
|
|
4
10
|
* Turns a ToDoddle API failure into a tool error the agent can act on. The SDK
|
|
5
11
|
* default keeps only the message, which dropped the scope an owner must grant.
|
package/dist/server.d.ts.map
CHANGED
|
@@ -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,EAAE,gBAAgB,EAA+B,KAAK,WAAW,EAAE,MAAM,iBAAiB,CAAC;
|
|
1
|
+
{"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../src/server.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,SAAS,EAAoB,MAAM,yCAAyC,CAAC;AAEtF,OAAO,EAAE,gBAAgB,EAA+B,KAAK,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAQlG;;;;GAIG;AACH,eAAO,MAAM,mBAAmB,QAA2B,CAAC;AA2P5D;;;GAGG;AACH,wBAAgB,cAAc,CAAC,KAAK,EAAE,gBAAgB;;;cAmBV,MAAM;;;EACjD;AAcD;;;;;GAKG;AACH,wBAAgB,eAAe,CAAC,KAAK,EAAE,OAAO,EAAE,SAAS,EAAE,MAAM,GAAG,OAAO,CAW1E;AA0ID,MAAM,WAAW,wBAAwB;IACvC,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,uFAAuF;IACvF,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB;AA2ND,wBAAgB,uBAAuB,CACrC,GAAG,EAAE,WAAW,EAChB,aAAa,GAAE,wBAA6B,GAC3C,SAAS,CA6wGX"}
|