node-autotask 0.21.0 → 0.23.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/ARCHITECTURE.md +44 -21
- package/CHANGELOG.md +31 -0
- package/MCP_TOOL_CATALOG.json +69 -10
- package/MCP_TOOL_MANIFEST.md +20 -17
- package/MCP_TOOL_OVERRIDES.json +6 -6
- package/N8N_MCP_MANIFEST.json +20 -4
- package/N8N_MCP_MANIFEST.md +6 -5
- package/README.md +9 -9
- package/capabilities.json +2898 -7412
- package/capabilities.schema.json +0 -12
- package/dist/capabilities.cjs +2 -2
- package/dist/capabilities.d.cts +0 -2
- package/dist/capabilities.d.ts +0 -2
- package/dist/capabilities.js +1 -1
- package/dist/{chunk-KD6LOSAK.js → chunk-B5SNZ3TZ.js} +3473 -3084
- package/dist/{chunk-QWAWNQEZ.cjs → chunk-D5TVBI4U.cjs} +3021 -2632
- package/dist/{chunk-CBUY3MKB.cjs → chunk-JUO3URUI.cjs} +2897 -7411
- package/dist/{chunk-HEW4WJLC.cjs → chunk-N27NUB4R.cjs} +2466 -1745
- package/dist/{chunk-DM67SXCO.js → chunk-OGNUI3UR.js} +2897 -7411
- package/dist/{chunk-GBVUXAUA.js → chunk-PVUUOM5G.js} +2092 -1371
- package/dist/{chunk-PMPFQDVM.cjs → chunk-TTQB537V.cjs} +135 -135
- package/dist/{chunk-JRSU6PKP.js → chunk-VYFO2N5F.js} +2 -2
- package/dist/{index-BXtKN1M5.d.cts → index-BVtycq-6.d.cts} +1 -1
- package/dist/{index-BXtKN1M5.d.ts → index-BVtycq-6.d.ts} +1 -1
- package/dist/{index-DSnuyiTr.d.ts → index-DBoX-Dnk.d.ts} +430 -957
- package/dist/{index-ByWYfNog.d.cts → index-NC-x-bYl.d.cts} +430 -957
- package/dist/index.cjs +91 -62
- package/dist/index.d.cts +360 -5
- package/dist/index.d.ts +360 -5
- package/dist/index.js +74 -45
- package/dist/operations/index.cjs +462 -462
- package/dist/operations/index.d.cts +78 -84
- package/dist/operations/index.d.ts +78 -84
- package/dist/operations/index.js +382 -382
- package/dist/pool.cjs +8 -8
- package/dist/pool.d.cts +2 -2
- package/dist/pool.d.ts +2 -2
- package/dist/pool.js +4 -4
- package/dist/resources/index.cjs +4 -4
- package/dist/resources/index.d.cts +2 -2
- package/dist/resources/index.d.ts +2 -2
- package/dist/resources/index.js +3 -3
- package/dist/types/index.d.cts +1 -1
- package/dist/types/index.d.ts +1 -1
- package/docs/API.md +133 -41
- package/docs/N8N-ADAPTER.md +3 -3
- package/examples/mcp/errors.ts +135 -0
- package/examples/mcp/manifest.ts +168 -0
- package/examples/mcp/register.ts +66 -0
- package/examples/mcp/schemas.ts +203 -0
- package/examples/mcp/tools-meta.ts +120 -0
- package/examples/mcp/tools-mode.ts +177 -0
- package/examples/mcp/tools-read.ts +264 -0
- package/examples/mcp/types.ts +34 -0
- package/examples/mcp-register.ts +9 -1074
- package/package.json +1 -1
package/N8N_MCP_MANIFEST.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"schema": "node-autotask n8n consumer mcp projection v1",
|
|
3
|
-
"generatedAt": "2026-10-
|
|
3
|
+
"generatedAt": "2026-10-21T12:07:42.002Z",
|
|
4
4
|
"generator": "scripts/project-n8n-mcp.mjs",
|
|
5
5
|
"inputs": {
|
|
6
6
|
"capabilities": "capabilities.json (the capability registry — the single source of truth)",
|
|
@@ -3688,10 +3688,26 @@
|
|
|
3688
3688
|
"purpose": "Delete a time entry.",
|
|
3689
3689
|
"confirmRule": "confirm: \"time_entries.delete\" (must equal the operation key exactly) — the call is refused pre-request without it",
|
|
3690
3690
|
"note": "Excluded from the n8n consumer surface by curation (timeEntry: excludeDestructive: true). The capability exists on the canonical SDK MCP surface: the autotask_delete mode tool (confirm required) or the per-op tool. Re-include on the consumer surface only via a recorded change to n8n-mcp.curation.json."
|
|
3691
|
+
},
|
|
3692
|
+
{
|
|
3693
|
+
"entity": "timeEntry",
|
|
3694
|
+
"apiEntity": "time_entries",
|
|
3695
|
+
"op": "time_entries.moveToTicket",
|
|
3696
|
+
"verb": "moveToTicket",
|
|
3697
|
+
"effect": "destructive",
|
|
3698
|
+
"kind": "helper",
|
|
3699
|
+
"flags": [],
|
|
3700
|
+
"requiredArgs": [
|
|
3701
|
+
"sourceId",
|
|
3702
|
+
"toTicketId"
|
|
3703
|
+
],
|
|
3704
|
+
"purpose": "Move a time entry to another ticket. The vendor update does NOT change ticketID, so this creates the record on the target ticket, verifies it, then deletes the source — with refusals for billed/approved/old sources and a twin check against duplicates.",
|
|
3705
|
+
"confirmRule": "confirm: \"time_entries.moveToTicket\" (must equal the operation key exactly) — the call is refused pre-request without it",
|
|
3706
|
+
"note": "Excluded from the n8n consumer surface by curation (timeEntry: excludeDestructive: true). The capability exists on the canonical SDK MCP surface: the autotask_delete mode tool (confirm required) or the per-op tool. Re-include on the consumer surface only via a recorded change to n8n-mcp.curation.json."
|
|
3691
3707
|
}
|
|
3692
3708
|
],
|
|
3693
3709
|
"stats": {
|
|
3694
|
-
"registryRecords":
|
|
3710
|
+
"registryRecords": 1216,
|
|
3695
3711
|
"curatedEntities": 7,
|
|
3696
3712
|
"includedEntities": 7,
|
|
3697
3713
|
"readTools": 7,
|
|
@@ -3700,8 +3716,8 @@
|
|
|
3700
3716
|
"readOperations": 84,
|
|
3701
3717
|
"writeOperations": 21,
|
|
3702
3718
|
"approvalGatedWrites": 2,
|
|
3703
|
-
"destructiveExcluded":
|
|
3719
|
+
"destructiveExcluded": 4
|
|
3704
3720
|
},
|
|
3705
|
-
"capabilitiesHash": "
|
|
3721
|
+
"capabilitiesHash": "466880cd0488797463b1317445eea24047a9bfe7dd3b7f0711dda135e9869d62",
|
|
3706
3722
|
"curationHash": "e19117ce73e38d9aded3be7e7f077a4e185d2e10294622b76c17d67f63cf9e3b"
|
|
3707
3723
|
}
|
package/N8N_MCP_MANIFEST.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# N8N MCP Manifest — node-autotask (consumer projection)
|
|
2
2
|
|
|
3
|
-
<!-- GENERATED by scripts/project-n8n-mcp.mjs at 2026-10-
|
|
3
|
+
<!-- GENERATED by scripts/project-n8n-mcp.mjs at 2026-10-21T12:07:42.002Z — do not hand-edit. -->
|
|
4
4
|
|
|
5
5
|
The n8n CONSUMER projection of the capability registry: the canonical source for what the
|
|
6
6
|
n8n-side MCP tools must expose. The SDK is canonical — this is a projection of it, never a
|
|
@@ -266,10 +266,11 @@ only via a recorded change to `n8n-mcp.curation.json`.
|
|
|
266
266
|
| contact | `contacts.delete` | idempotent+requiresApproval+sensitive | parentId, id | confirm: "contacts.delete" (must equal the operation key exactly) — the call is refused pre-request without it | Delete a contact. (under a company) |
|
|
267
267
|
| companyLocation | `company_locations.delete` | idempotent+requiresApproval | parentId, id | confirm: "company_locations.delete" (must equal the operation key exactly) — the call is refused pre-request without it | Delete a company location. |
|
|
268
268
|
| timeEntry | `time_entries.delete` | idempotent+requiresApproval | id | confirm: "time_entries.delete" (must equal the operation key exactly) — the call is refused pre-request without it | Delete a time entry. |
|
|
269
|
+
| timeEntry | `time_entries.moveToTicket` | — | sourceId, toTicketId | confirm: "time_entries.moveToTicket" (must equal the operation key exactly) — the call is refused pre-request without it | Move a time entry to another ticket. The vendor update does NOT change ticketID, so this creates the record on the target ticket, verifies it, then deletes the source — with refusals for billed/approved/old sources and a twin check against duplicates. |
|
|
269
270
|
|
|
270
271
|
## Stats
|
|
271
272
|
|
|
272
|
-
- registryRecords:
|
|
273
|
+
- registryRecords: 1216
|
|
273
274
|
- curatedEntities: 7
|
|
274
275
|
- includedEntities: 7
|
|
275
276
|
- readTools: 7
|
|
@@ -278,10 +279,10 @@ only via a recorded change to `n8n-mcp.curation.json`.
|
|
|
278
279
|
- readOperations: 84
|
|
279
280
|
- writeOperations: 21
|
|
280
281
|
- approvalGatedWrites: 2
|
|
281
|
-
- destructiveExcluded:
|
|
282
|
+
- destructiveExcluded: 4
|
|
282
283
|
|
|
283
284
|
## Meta
|
|
284
285
|
|
|
285
|
-
- generatedAt: 2026-10-
|
|
286
|
-
- capabilitiesHash:
|
|
286
|
+
- generatedAt: 2026-10-21T12:07:42.002Z
|
|
287
|
+
- capabilitiesHash: 466880cd0488797463b1317445eea24047a9bfe7dd3b7f0711dda135e9869d62
|
|
287
288
|
- curationHash: e19117ce73e38d9aded3be7e7f077a4e185d2e10294622b76c17d67f63cf9e3b
|
package/README.md
CHANGED
|
@@ -4,7 +4,7 @@ Fully-typed TypeScript SDK for the Autotask (Datto) PSA REST API. Zero runtime
|
|
|
4
4
|
dependencies. Built for building MCP servers and integrations.
|
|
5
5
|
|
|
6
6
|
The SDK is also the **deterministic execution layer for agents** (ARCHITECTURE
|
|
7
|
-
section 19): a generated capability registry (
|
|
7
|
+
section 19): a generated capability registry (1214 operations across the 121-entity
|
|
8
8
|
MVP set), a mechanical MCP substrate (registry → manifest → overrides → core tier +
|
|
9
9
|
catalog meta-tool), and a write governor (dry-run-first, destructive
|
|
10
10
|
confirmation). The SDK boundary also redacts response field values — the
|
|
@@ -326,14 +326,14 @@ The SDK ships the mechanical substrate, not a server (no MCP imports, no zod):
|
|
|
326
326
|
explicitly until the server 0.2.0 preset work, after which they can
|
|
327
327
|
send nothing) so a tenant's repeated single-record reads stay cheap
|
|
328
328
|
across requests.
|
|
329
|
-
Both MCP servers share `examples/mcp-register.ts` (one registration code
|
|
329
|
+
Both MCP servers share `examples/mcp-register.ts` (entry; implementation in `examples/mcp/`; one registration code
|
|
330
330
|
path: manifest descriptions, zod v4 schemas, annotations derived from
|
|
331
331
|
`effect` + `flags`, the mode-enforced `autotask_read` / `autotask_write` /
|
|
332
332
|
`autotask_delete` governor dispatch), so the two
|
|
333
333
|
transports expose the same surface by construction; `node
|
|
334
334
|
scripts/check-mcp-surface.mjs` proves it (spawn, initialize, `tools/list` =
|
|
335
335
|
15 core tools, descriptions verbatim vs the manifest). The future Autotask
|
|
336
|
-
MCP server package reuses `examples/mcp-register.ts` as its registration
|
|
336
|
+
MCP server package reuses `examples/mcp-register.ts` (`examples/mcp/*`) as its registration
|
|
337
337
|
layer and swaps the examples' devDependencies (`@modelcontextprotocol/server`,
|
|
338
338
|
`zod`) for runtime ones — the SDK itself remains MCP-import-free and
|
|
339
339
|
zod-free. No dedicated write is in the core tier: reads travel through
|
|
@@ -344,22 +344,22 @@ The SDK ships the mechanical substrate, not a server (no MCP imports, no zod):
|
|
|
344
344
|
governor place: `src/operations/invoke.ts`).
|
|
345
345
|
|
|
346
346
|
**Harness approval policy (recommended).** Require approval on every tool
|
|
347
|
-
whose MCP annotation is `readOnlyHint !== true` — today exactly **
|
|
348
|
-
tools**: the
|
|
347
|
+
whose MCP annotation is `readOnlyHint !== true` — today exactly **256
|
|
348
|
+
tools**: the 254 dedicated write/delete tools (198 `effect=write` + 56
|
|
349
349
|
`effect=destructive`, every one of them has a dedicated tool) +
|
|
350
|
-
`autotask_write` + `autotask_delete`. The remaining **
|
|
350
|
+
`autotask_write` + `autotask_delete`. The remaining **602 tools** (the 589
|
|
351
351
|
dedicated read tools + the 10 core read tools + `autotask_read` +
|
|
352
352
|
`autotask_catalog` + `autotask_describe`) all carry `readOnlyHint: true`
|
|
353
353
|
and are safe ungated: every op they can route is `effect=read` (zero
|
|
354
354
|
mutating requests — pinned by the test inventory). Refined class for the
|
|
355
|
-
highest-risk ops: the **
|
|
355
|
+
highest-risk ops: the **57 tools with `destructiveHint: true`** (56
|
|
356
356
|
dedicated delete tools + `autotask_delete`) additionally require
|
|
357
357
|
`confirm === <operation key>` even inside `autotask_delete`, and the 3
|
|
358
358
|
approval-gated writes (`configuration_items.moveConfigurationItem`,
|
|
359
359
|
`contacts.moveToCompany`, `resources.transferOwnership`) require the same
|
|
360
360
|
confirm inside `autotask_write`. Migration: `autotask_invoke` is REPLACED
|
|
361
361
|
by `autotask_read`/`autotask_write`/`autotask_delete` — update harness
|
|
362
|
-
config (approve the
|
|
362
|
+
config (approve the 256 above) and remove any `autotask_invoke` entry. The
|
|
363
363
|
rule is derivable from the registry `effect` column (and the mode tools'
|
|
364
364
|
fixed annotations) — it never needs a hand-maintained name list.
|
|
365
365
|
|
|
@@ -519,7 +519,7 @@ node-parity paths the vendored swagger lacks, all UNVERIFIED-live this run), and
|
|
|
519
519
|
| `npm run capabilities:check` | `scripts/check-capabilities.mjs` — the batch gate (missing/incomplete/stale records → exit 1) |
|
|
520
520
|
| `npm run public-surface` | `scripts/public-surface.mjs` — capture (`--write`) / verify the public API surface baseline; default mode fails on unannounced removals, **and** checks the BUILT surface: every tsup entry has a matching `exports` key (and vice versa), every declared target was emitted and loads (ESM+CJS), and no runtime dependency leaks into `dist` |
|
|
521
521
|
| `npm run live-smoke` | `scripts/live-smoke.mjs` — read-only live smoke: 5 vendor probes (5-6 wire calls worst case: 4 GET + 1 bounded query that may walk a 2nd, empty page) + a zero-network shape guard; `--dry` prints the plan with no calls (DRY-RUN-ONLY verdict, exit 0); live via `AUTOTASK_*` env — missing/partial credentials hard-fail exit 2 |
|
|
522
|
-
| `npm run live-coverage` | `scripts/live-coverage.mjs` — the live coverage sweep over all
|
|
522
|
+
| `npm run live-coverage` | `scripts/live-coverage.mjs` — the live coverage sweep over all 1214 registry ops (`--dry`: full call plan, no calls; live: bounded reads for real, mutations `dryRun: true` only — zero mutating requests, every governor-gated row (the 54 delete dry-runs included) routed through invoke with `confirm`; budget <= 1160 plan-honest / <= 1314 wire-honest worst case) |
|
|
523
523
|
| `npm run mcp:project` | `scripts/project-mcp-tools.mjs` — mechanical MCP projection → `MCP_TOOL_MANIFEST.md` (`:check` verifies) |
|
|
524
524
|
| `npm run n8n:project` / `n8n:project:check` | `scripts/project-n8n-mcp.mjs` — the n8n consumer projection from the SAME registry → `N8N_MCP_MANIFEST.json`/`.md` (`--check` rebuilds and diffs; the gate is wired into `verify`) |
|
|
525
525
|
| `npm run catalog:build` / `catalog:check` | `scripts/build-tool-catalog.mjs` — the catalog meta-tool row data → `MCP_TOOL_CATALOG.json` + mechanical CORE profile (`--check` verifies drift) |
|