@todoist/mcp 17.3.0 → 17.3.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/index.js +3 -3
- package/dist/main-http.js +2 -2
- package/dist/main.js +1 -1
- package/dist/{mcp-server-ComlcMjA.js → mcp-server-Cbmm4bcH.js} +1216 -1201
- package/dist/{require-valid-todoist-token-CqZdy7qB.js → require-valid-todoist-token-ByqFeCxt.js} +1 -1
- package/dist/tool-execution-error.d.ts +23 -1
- package/dist/tool-execution-error.d.ts.map +1 -1
- package/dist/utils/batch-failures.d.ts +6 -2
- package/dist/utils/batch-failures.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/{require-valid-todoist-token-CqZdy7qB.js → require-valid-todoist-token-ByqFeCxt.js}
RENAMED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { validateBearerToken as _, createTokenVerdictCache as p, buildBearerChallenge as u } from "@todoist/mcp-core/host";
|
|
2
|
-
import { a2 as v, a3 as A } from "./mcp-server-
|
|
2
|
+
import { a2 as v, a3 as A } from "./mcp-server-Cbmm4bcH.js";
|
|
3
3
|
const k = "https://api.todoist.com", U = (e, t) => _({
|
|
4
4
|
// Resolved the way the SDK resolves its own requests against a custom base URL. An empty
|
|
5
5
|
// base (`TODOIST_BASE_URL=`) means the default, as it does for the SDK client.
|
|
@@ -15,9 +15,30 @@ export declare class ProjectAccessError extends Error {
|
|
|
15
15
|
* tools that report per-item failures. Unlike `error.message` (which for SDK
|
|
16
16
|
* errors is just "HTTP 403: Forbidden"), this preserves the API error signals
|
|
17
17
|
* (status, code, tag) so failures like MAX_ITEMS_LIMIT_REACHED stay
|
|
18
|
-
* recognizable after aggregation
|
|
18
|
+
* recognizable after aggregation, and explains a tag that has a hint in
|
|
19
|
+
* `TODOIST_ERROR_TAG_HINTS`.
|
|
20
|
+
*
|
|
21
|
+
* A tool that reports many items in one response should give each tag's hint
|
|
22
|
+
* once: `partitionSettled` does, through {@link describeBatchItemError}.
|
|
19
23
|
*/
|
|
20
24
|
export declare function formatBatchItemError(error: unknown): string;
|
|
25
|
+
/** One item's failure, with the explanation of its error tag kept apart. */
|
|
26
|
+
type BatchItemErrorDescription = {
|
|
27
|
+
/** The error with its API signals: `Message (HTTP 403, tag PREMIUM_ONLY)`. */
|
|
28
|
+
summary: string;
|
|
29
|
+
/** What a known tag means and how to recover, when the error carries one. */
|
|
30
|
+
hint?: {
|
|
31
|
+
tag: string;
|
|
32
|
+
text: string;
|
|
33
|
+
};
|
|
34
|
+
};
|
|
35
|
+
/**
|
|
36
|
+
* The parts of {@link formatBatchItemError}, for callers that report several
|
|
37
|
+
* items at once. These tags reject whole batches (a full project, a free plan),
|
|
38
|
+
* so repeating the hint on every item would return the same paragraph up to a
|
|
39
|
+
* hundred times.
|
|
40
|
+
*/
|
|
41
|
+
export declare function describeBatchItemError(error: unknown): BatchItemErrorDescription;
|
|
21
42
|
/**
|
|
22
43
|
* Return task-specific recovery guidance only when Todoist rejected a supplied
|
|
23
44
|
* natural-language due string. The REST API currently returns the generic
|
|
@@ -33,4 +54,5 @@ export declare function formatDueStringParseError(error: unknown, { taskContent,
|
|
|
33
54
|
* Format tool execution errors in a consistent, actionable format.
|
|
34
55
|
*/
|
|
35
56
|
export declare function formatToolExecutionError(error: unknown): string;
|
|
57
|
+
export {};
|
|
36
58
|
//# sourceMappingURL=tool-execution-error.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tool-execution-error.d.ts","sourceRoot":"","sources":["../src/tool-execution-error.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"tool-execution-error.d.ts","sourceRoot":"","sources":["../src/tool-execution-error.ts"],"names":[],"mappings":"AAwiBA,qBAAa,mBAAoB,SAAQ,KAAK;gBAC9B,OAAO,EAAE,MAAM;CAI9B;AAED;;;;;GAKG;AACH,qBAAa,kBAAmB,SAAQ,KAAK;gBAC7B,OAAO,EAAE,MAAM;CAI9B;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,CAG3D;AAED,4EAA4E;AAC5E,KAAK,yBAAyB,GAAG;IAC7B,8EAA8E;IAC9E,OAAO,EAAE,MAAM,CAAA;IACf,6EAA6E;IAC7E,IAAI,CAAC,EAAE;QAAE,GAAG,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,CAAA;CACvC,CAAA;AAED;;;;;GAKG;AACH,wBAAgB,sBAAsB,CAAC,KAAK,EAAE,OAAO,GAAG,yBAAyB,CAuBhF;AAED;;;;;GAKG;AACH,wBAAgB,yBAAyB,CACrC,KAAK,EAAE,OAAO,EACd,EACI,WAAW,EACX,SAAS,EACT,YAAY,GACf,EAAE;IAAE,WAAW,EAAE,MAAM,CAAC;IAAC,SAAS,EAAE,MAAM,GAAG,SAAS,CAAC;IAAC,YAAY,CAAC,EAAE,MAAM,CAAA;CAAE,GACjF,MAAM,GAAG,SAAS,CAmCpB;AAED;;GAEG;AACH,wBAAgB,wBAAwB,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,CAe/D"}
|
|
@@ -15,8 +15,12 @@ type SettledBatch<Item, Value> = {
|
|
|
15
15
|
/**
|
|
16
16
|
* Splits a batch's settled results into the items that worked and a failure for
|
|
17
17
|
* each one that didn't. `settled` lines up with `items`, as `Promise.allSettled`
|
|
18
|
-
* over them returns it. Each failure names its item with `describe` and
|
|
19
|
-
*
|
|
18
|
+
* over them returns it. Each failure names its item with `describe` and keeps the
|
|
19
|
+
* API's status and error tag.
|
|
20
|
+
*
|
|
21
|
+
* A known error tag is explained on the first item that failed with it. Later
|
|
22
|
+
* items with the same tag point back to that one, since such errors tend to
|
|
23
|
+
* reject a whole batch and the explanation would otherwise repeat on every item.
|
|
20
24
|
*/
|
|
21
25
|
export declare function partitionSettled<Item, Value>(items: ReadonlyArray<Item>, settled: ReadonlyArray<PromiseSettledResult<Value>>, describe: (item: Item, index: number) => string): SettledBatch<Item, Value>;
|
|
22
26
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"batch-failures.d.ts","sourceRoot":"","sources":["../../src/utils/batch-failures.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAG5B,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAA;AACxD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAA;AAE/C,KAAK,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,aAAa,CAAC,CAAA;AAEjD,KAAK,YAAY,CAAC,IAAI,EAAE,KAAK,IAAI;IAC7B,oFAAoF;IACpF,SAAS,EAAE,KAAK,CAAC;QAAE,IAAI,EAAE,IAAI,CAAC;QAAC,KAAK,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,KAAK,CAAA;KAAE,CAAC,CAAA;IAC7D,6DAA6D;IAC7D,QAAQ,EAAE,YAAY,EAAE,CAAA;CAC3B,CAAA;AAED
|
|
1
|
+
{"version":3,"file":"batch-failures.d.ts","sourceRoot":"","sources":["../../src/utils/batch-failures.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAG5B,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAA;AACxD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAA;AAE/C,KAAK,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,aAAa,CAAC,CAAA;AAEjD,KAAK,YAAY,CAAC,IAAI,EAAE,KAAK,IAAI;IAC7B,oFAAoF;IACpF,SAAS,EAAE,KAAK,CAAC;QAAE,IAAI,EAAE,IAAI,CAAC;QAAC,KAAK,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,KAAK,CAAA;KAAE,CAAC,CAAA;IAC7D,6DAA6D;IAC7D,QAAQ,EAAE,YAA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