node-autotask 0.8.0 → 0.8.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/ARCHITECTURE.md +54 -12
- package/N8N_MCP_MANIFEST.json +2 -2
- package/N8N_MCP_MANIFEST.md +3 -3
- package/README.md +9 -3
- package/dist/{chunk-C7U3ZRRK.js → chunk-2QLOK7PX.js} +27 -31
- package/dist/{chunk-C7U3ZRRK.js.map → chunk-2QLOK7PX.js.map} +1 -1
- package/dist/{chunk-LDKIIVFV.cjs → chunk-CQIZDSBE.cjs} +272 -276
- package/dist/chunk-CQIZDSBE.cjs.map +1 -0
- package/dist/{chunk-QUFEIJEB.cjs → chunk-DA73ALND.cjs} +136 -138
- package/dist/chunk-DA73ALND.cjs.map +1 -0
- package/dist/{chunk-GNS47RBV.js → chunk-IUJJPWUX.js} +612 -18
- package/dist/chunk-IUJJPWUX.js.map +1 -0
- package/dist/{chunk-RFXGG37L.cjs → chunk-IV2Z3JLR.cjs} +680 -86
- package/dist/chunk-IV2Z3JLR.cjs.map +1 -0
- package/dist/{chunk-ONPT4PIV.js → chunk-PAQXQFGG.js} +4 -6
- package/dist/{chunk-ONPT4PIV.js.map → chunk-PAQXQFGG.js.map} +1 -1
- package/dist/index.cjs +120 -27
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +129 -3
- package/dist/index.d.ts +129 -3
- package/dist/index.js +156 -63
- package/dist/index.js.map +1 -1
- package/dist/operations/index.cjs +113 -116
- package/dist/operations/index.cjs.map +1 -1
- package/dist/operations/index.js +9 -12
- package/dist/operations/index.js.map +1 -1
- package/dist/pool.cjs +8 -11
- package/dist/pool.cjs.map +1 -1
- package/dist/pool.js +4 -7
- package/dist/pool.js.map +1 -1
- package/dist/resources/index.cjs +3 -5
- package/dist/resources/index.cjs.map +1 -1
- package/dist/resources/index.js +2 -4
- package/package.json +9 -3
- package/dist/chunk-5QVXRT3A.cjs +0 -580
- package/dist/chunk-5QVXRT3A.cjs.map +0 -1
- package/dist/chunk-FE225M76.js +0 -580
- package/dist/chunk-FE225M76.js.map +0 -1
- package/dist/chunk-GNS47RBV.js.map +0 -1
- package/dist/chunk-IFXFOYDU.cjs +0 -32
- package/dist/chunk-IFXFOYDU.cjs.map +0 -1
- package/dist/chunk-LDKIIVFV.cjs.map +0 -1
- package/dist/chunk-OOEVTGP4.js +0 -121
- package/dist/chunk-OOEVTGP4.js.map +0 -1
- package/dist/chunk-PBBFMRI5.cjs +0 -121
- package/dist/chunk-PBBFMRI5.cjs.map +0 -1
- package/dist/chunk-QF4K3XTK.js +0 -32
- package/dist/chunk-QF4K3XTK.js.map +0 -1
- package/dist/chunk-QUFEIJEB.cjs.map +0 -1
- package/dist/chunk-RFXGG37L.cjs.map +0 -1
- package/dist/credential-shape.cjs +0 -15
- package/dist/credential-shape.cjs.map +0 -1
- package/dist/credential-shape.d.cts +0 -52
- package/dist/credential-shape.d.ts +0 -52
- package/dist/credential-shape.js +0 -15
- package/dist/credential-shape.js.map +0 -1
- package/dist/credentials.cjs +0 -17
- package/dist/credentials.cjs.map +0 -1
- package/dist/credentials.d.cts +0 -78
- package/dist/credentials.d.ts +0 -78
- package/dist/credentials.js +0 -17
- package/dist/credentials.js.map +0 -1
package/ARCHITECTURE.md
CHANGED
|
@@ -215,20 +215,59 @@ import { CAPABILITY_REGISTRY, CAPABILITIES_PLAN_HASH } from 'node-autotask/capab
|
|
|
215
215
|
```
|
|
216
216
|
|
|
217
217
|
### Package export map (in `package.json` `exports`)
|
|
218
|
+
|
|
219
|
+
The declared subpaths are **public API**: `.`, `./capabilities`, `./pool`,
|
|
220
|
+
`./operations`, `./untrusted`, `./resources`, `./types`, and `./package.json`.
|
|
221
|
+
Renaming or removing one is a **major version** — a consuming server pins an
|
|
222
|
+
exact SDK version, so a silent break lands on a published server.
|
|
223
|
+
|
|
218
224
|
```jsonc
|
|
219
225
|
"exports": {
|
|
220
|
-
".":
|
|
221
|
-
|
|
222
|
-
"./capabilities":
|
|
223
|
-
|
|
224
|
-
"./
|
|
225
|
-
|
|
226
|
-
"./
|
|
226
|
+
".": { "import": { "types": "./dist/index.d.ts", "default": "./dist/index.js" },
|
|
227
|
+
"require": { "types": "./dist/index.d.cts", "default": "./dist/index.cjs" } },
|
|
228
|
+
"./capabilities": { "import": { "types": "./dist/capabilities.d.ts", "default": "./dist/capabilities.js" },
|
|
229
|
+
"require": { "types": "./dist/capabilities.d.cts", "default": "./dist/capabilities.cjs" } },
|
|
230
|
+
"./pool": { "import": { "types": "./dist/pool.d.ts", "default": "./dist/pool.js" },
|
|
231
|
+
"require": { "types": "./dist/pool.d.cts", "default": "./dist/pool.cjs" } },
|
|
232
|
+
"./operations": { "import": { "types": "./dist/operations/index.d.ts", "default": "./dist/operations/index.js" },
|
|
233
|
+
"require": { "types": "./dist/operations/index.d.cts", "default": "./dist/operations/index.cjs" } },
|
|
234
|
+
"./untrusted": { "import": { "types": "./dist/untrusted.d.ts", "default": "./dist/untrusted.js" },
|
|
235
|
+
"require": { "types": "./dist/untrusted.d.cts", "default": "./dist/untrusted.cjs" } },
|
|
236
|
+
"./resources": { "import": { "types": "./dist/resources/index.d.ts", "default": "./dist/resources/index.js" },
|
|
237
|
+
"require": { "types": "./dist/resources/index.d.cts", "default": "./dist/resources/index.cjs" } },
|
|
238
|
+
"./types": { "import": { "types": "./dist/types/index.d.ts", "default": "./dist/types/index.js" },
|
|
239
|
+
"require": { "types": "./dist/types/index.d.cts", "default": "./dist/types/index.cjs" } },
|
|
240
|
+
"./package.json": "./package.json"
|
|
227
241
|
}
|
|
228
242
|
```
|
|
229
|
-
tsup `entry`: `['src/index.ts', 'src/capabilities.ts', 'src/operations/index.ts']`
|
|
230
|
-
|
|
231
|
-
|
|
243
|
+
tsup `entry`: `['src/index.ts', 'src/capabilities.ts', 'src/pool.ts', 'src/operations/index.ts', 'src/resources/index.ts', 'src/types/index.ts', 'src/untrusted.ts']`
|
|
244
|
+
— **every entry has a matching `exports` key, and the `npm run public-surface` gate enforces the pairing**
|
|
245
|
+
(a compiled module with no `exports` key is unreachable bytes; `src/credentials.ts` and
|
|
246
|
+
`src/credential-shape.ts` are therefore NOT entries — both are internal and are reached through the
|
|
247
|
+
root subpath, which re-exports all their symbols). The primary barrel always re-exports everything;
|
|
248
|
+
deep imports are for consumers who want to keep bundles small.
|
|
249
|
+
|
|
250
|
+
### Catalog delivery to the MCP server — recorded DEVIATION (mcp-server-surface section 3)
|
|
251
|
+
|
|
252
|
+
The normative family reference (`api-node-squad/references/mcp-server-surface.md` section 3) says the
|
|
253
|
+
generated tool catalog is shipped **twice**: a compiled module behind a `./mcp` subpath (typed rows,
|
|
254
|
+
`CORE_TOOLS`, effect-split dispatch) **and** the root JSON artifact. **This package ships the JSON
|
|
255
|
+
shape only — deliberately.** Do not "fix" this without reading the reason:
|
|
256
|
+
|
|
257
|
+
- **Consumer**: `iit-mcp-autotask` reads the catalog as **data** at boot. It resolves the JSONs with
|
|
258
|
+
`createRequire(import.meta.url)` + `dirname(require.resolve('node-autotask/package.json'))` and
|
|
259
|
+
imports `CAPABILITIES` + `CAPABILITY_PLAN_HASHES` from `node-autotask/capabilities`, then asserts
|
|
260
|
+
the plan hash before serving. The JSONs are deliberately **not** behind `exports`; data artifacts
|
|
261
|
+
resolve fine from an installed tarball, they just need a documented path (the one above).
|
|
262
|
+
- **Why no `./mcp` subpath**: the reference server lives in a separate package
|
|
263
|
+
(`examples/mcp-*.ts` are runnable references, not the server), so no in-repo consumer imports typed
|
|
264
|
+
rows, `CORE_TOOLS` or a compiled dispatcher. Adding the subpath would be a **public-API addition**
|
|
265
|
+
with no consumer, and a second module instance of the same data. The JSON + `catalog:check`
|
|
266
|
+
rebuild-and-diff is the machine-readable mirror, and `verify:pack` proves it resolves from the
|
|
267
|
+
tarball.
|
|
268
|
+
- **What must stay true** (re-check when the server starts importing typed rows): every registry
|
|
269
|
+
operation has a catalog row, the served text equals the manifest's, and `catalog:check` fails on a
|
|
270
|
+
hand-edit of either artifact.
|
|
232
271
|
|
|
233
272
|
---
|
|
234
273
|
|
|
@@ -898,9 +937,12 @@ export const NoopLogger: Logger = {};
|
|
|
898
937
|
`plan:derive` (`scripts/derive-plan.mjs`), `capabilities:build`
|
|
899
938
|
(`scripts/generate-capabilities.mjs`), `capabilities:check`
|
|
900
939
|
(`scripts/check-capabilities.mjs`), `mcp:project`
|
|
901
|
-
(`scripts/project-mcp-tools.mjs`), `
|
|
902
|
-
(`scripts/
|
|
940
|
+
(`scripts/project-mcp-tools.mjs`), `n8n:project` / `n8n:project:check`
|
|
941
|
+
(`scripts/project-n8n-mcp.mjs` — the secondary-consumer projection),
|
|
942
|
+
`catalog:check` (`scripts/build-tool-catalog.mjs --check`), `mcp:check-surface`,
|
|
943
|
+
`public-surface`, `verify:pack`, `live-smoke`,
|
|
903
944
|
`live-coverage` (env-gated; dry without credentials).
|
|
945
|
+
`verify` runs the whole chain in the same order as `.github/workflows/ci.yml`.
|
|
904
946
|
|
|
905
947
|
---
|
|
906
948
|
|
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-07T13:41:12.738Z",
|
|
4
4
|
"generator": "scripts/project-n8n-mcp.mjs",
|
|
5
5
|
"inputs": {
|
|
6
6
|
"capabilities": "capabilities.json (the capability registry — the single source of truth)",
|
|
@@ -3604,6 +3604,6 @@
|
|
|
3604
3604
|
"approvalGatedWrites": 2,
|
|
3605
3605
|
"destructiveExcluded": 3
|
|
3606
3606
|
},
|
|
3607
|
-
"capabilitiesHash": "
|
|
3607
|
+
"capabilitiesHash": "0d79153516c598a68d5353739f92be9f145e77f610edb5f5f092e96b7247822d",
|
|
3608
3608
|
"curationHash": "e19117ce73e38d9aded3be7e7f077a4e185d2e10294622b76c17d67f63cf9e3b"
|
|
3609
3609
|
}
|
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-07T13:41:12.738Z — 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
|
|
@@ -280,6 +280,6 @@ only via a recorded change to `n8n-mcp.curation.json`.
|
|
|
280
280
|
|
|
281
281
|
## Meta
|
|
282
282
|
|
|
283
|
-
- generatedAt: 2026-10-
|
|
284
|
-
- capabilitiesHash:
|
|
283
|
+
- generatedAt: 2026-10-07T13:41:12.738Z
|
|
284
|
+
- capabilitiesHash: 0d79153516c598a68d5353739f92be9f145e77f610edb5f5f092e96b7247822d
|
|
285
285
|
- curationHash: e19117ce73e38d9aded3be7e7f077a4e185d2e10294622b76c17d67f63cf9e3b
|
package/README.md
CHANGED
|
@@ -211,6 +211,10 @@ import { searchAcrossResources, resolveAny, invoke } from 'node-autotask/operati
|
|
|
211
211
|
import { CAPABILITIES, CAPABILITY_GROUPS, CAPABILITY_PLAN_HASHES } from 'node-autotask/capabilities';
|
|
212
212
|
|
|
213
213
|
// Untrusted-content markers (zero-import projection helper — issue #1)
|
|
214
|
+
// The <untrusted_content> wrapper is a PROJECTION-LAYER, CLIENT-SIDE convention:
|
|
215
|
+
// it is text inside the tool result, so the model treats it as data. There is no
|
|
216
|
+
// wire-level "untrusted content" MIME type or content type, and no host sees the
|
|
217
|
+
// marker as a signal — only the result text carries it.
|
|
214
218
|
import { markUntrusted, stripUntrustedDeep } from 'node-autotask/untrusted';
|
|
215
219
|
|
|
216
220
|
// Bounded LRU pool of clients, keyed by a sha256 digest of the credential
|
|
@@ -463,13 +467,15 @@ node-parity paths the vendored swagger lacks, all UNVERIFIED-live this run), and
|
|
|
463
467
|
| `npm run plan:derive` | `scripts/derive-plan.mjs` — derive the plan's derivable columns (endpoint, envelope, errors, …) |
|
|
464
468
|
| `npm run capabilities:build` | `scripts/generate-capabilities.mjs` — regenerate the registry (src/capabilities.ts + capabilities.json) |
|
|
465
469
|
| `npm run capabilities:check` | `scripts/check-capabilities.mjs` — the batch gate (missing/incomplete/stale records → exit 1) |
|
|
466
|
-
| `npm run public-surface` | `scripts/public-surface.mjs` — capture (`--write`) / verify the public API surface baseline; default mode fails on unannounced removals |
|
|
470
|
+
| `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` |
|
|
467
471
|
| `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 |
|
|
468
472
|
| `npm run live-coverage` | `scripts/live-coverage.mjs` — the live coverage sweep over all 1172 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 <= 1119 plan-honest / <= 1270 wire-honest worst case) |
|
|
469
473
|
| `npm run mcp:project` | `scripts/project-mcp-tools.mjs` — mechanical MCP projection → `MCP_TOOL_MANIFEST.md` (`:check` verifies) |
|
|
474
|
+
| `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`) |
|
|
470
475
|
| `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) |
|
|
471
|
-
| `npm run mcp:check-surface` | `scripts/check-mcp-surface.mjs` — scripted MCP client check of the reference servers (initialize + `tools/list` = the 15-tool core surface, descriptions verbatim vs the manifest, and wire-level `tools/call` DRY probes of the mode-tool / confirm-gate / unknown-op refusals with an offline network-trap proof that DRY mode issues zero outbound requests; stdio + Streamable HTTP, incl. the SIGTERM clean-shutdown leg) |
|
|
472
|
-
| `npm run verify` |
|
|
476
|
+
| `npm run mcp:check-surface` | `scripts/check-mcp-surface.mjs` — scripted MCP client check of the reference servers (initialize + `tools/list` = the 15-tool core surface, descriptions verbatim vs the manifest, and wire-level `tools/call` DRY probes of the mode-tool / confirm-gate / unknown-op refusals with an offline network-trap proof that DRY mode issues zero outbound requests; stdio + Streamable HTTP, incl. the SIGTERM clean-shutdown leg; plus a credential-leak scan of the shipped catalog/manifest/registry/overrides before anything is spawned) |
|
|
477
|
+
| `npm run verify:pack` | `scripts/verify-pack.mjs` — pack the tarball, assert every `files[]` artifact is in it, install it offline into a throwaway project and import EVERY value subpath in ESM+CJS from the install, resolve the root JSON artifacts through the documented `createRequire` path, and assert the pinned plan hash |
|
|
478
|
+
| `npm run verify` | the full 11-step gate (typecheck, lint, build, `capabilities:check --ship`, `mcp:project:check`, `n8n:project:check`, `catalog:check`, `mcp:check-surface`, `public-surface`, `verify:pack`, `npm test`) — the CI mirror of the release gate |
|
|
473
479
|
| `npm run docs:render` | `scripts/render-docs.mjs` — regenerate the generated table blocks in `docs/API.md` + `docs/N8N-ADAPTER.md` |
|
|
474
480
|
| `npx node-autotask doctor` (published package; `node bin/doctor.js doctor` from a checkout after `npm run build`) | `bin/doctor.js` — the read-only doctor preflight CLI (issue #2): config/zone/connectivity/five one-row entity reads/threshold, `--json` + `--timeout-ms`; exit 0 = no failures, 1 = a check failed, 2 = missing/invalid config; read-only, at most 8 requests, retries off (the SDK core is `runDoctor` in `docs/API.md` §13) |
|
|
475
481
|
|
|
@@ -1,62 +1,58 @@
|
|
|
1
1
|
import {
|
|
2
|
+
AutotaskAbortError,
|
|
3
|
+
AutotaskConfigError,
|
|
4
|
+
AutotaskError,
|
|
5
|
+
AutotaskNetworkError,
|
|
6
|
+
AutotaskTimeoutError,
|
|
2
7
|
BLIND_SURFACE_STAMPS,
|
|
8
|
+
CREDENTIAL_ENV_LOAD_ACTION,
|
|
9
|
+
CircuitBreakerError,
|
|
10
|
+
ConflictError,
|
|
3
11
|
DEFAULT_PAGE_SIZE,
|
|
4
12
|
DELETE_BOUNDARY_NOTES,
|
|
5
13
|
EMPTY_REASON_STAMPS,
|
|
14
|
+
EmptyResponseError,
|
|
6
15
|
MAX_PAGES,
|
|
7
16
|
MAX_PAGE_SIZE,
|
|
17
|
+
NotFoundError,
|
|
8
18
|
POINTER_NOTES,
|
|
19
|
+
QueryTooLongError,
|
|
20
|
+
REDACTED,
|
|
9
21
|
RELATIONSHIP_MAP,
|
|
10
22
|
RESPONSE_DRIFT_MARKERS,
|
|
23
|
+
RateLimitError,
|
|
24
|
+
ResolutionError,
|
|
25
|
+
ResponseRejectedError,
|
|
26
|
+
StaleObjectError,
|
|
27
|
+
UnexpectedContentTypeError,
|
|
11
28
|
buildBreakerKey,
|
|
12
29
|
buildTenantKey,
|
|
13
30
|
clampPageSize,
|
|
14
31
|
collectAll,
|
|
15
32
|
cooldownDurationMs,
|
|
33
|
+
credentialShapeProblem,
|
|
16
34
|
decideHostPolicy,
|
|
17
35
|
defaultCircuitBreakerStore,
|
|
18
36
|
defaultCooldownStore,
|
|
37
|
+
errorFromStatus,
|
|
38
|
+
formatVendorDetail,
|
|
39
|
+
isAutotaskError,
|
|
19
40
|
isBreakerFailure,
|
|
41
|
+
isDeterministicVendor500,
|
|
20
42
|
isRecord,
|
|
43
|
+
isRedactedFieldName,
|
|
21
44
|
newCorrelationId,
|
|
22
45
|
paginate,
|
|
23
46
|
paginateItems,
|
|
24
47
|
parseIdentifier,
|
|
48
|
+
parseVendorErrors,
|
|
25
49
|
redactAuditBody,
|
|
50
|
+
redactResponseBody,
|
|
26
51
|
totalPagesFor
|
|
27
|
-
} from "./chunk-
|
|
52
|
+
} from "./chunk-IUJJPWUX.js";
|
|
28
53
|
import {
|
|
29
54
|
CAPABILITIES
|
|
30
55
|
} from "./chunk-LBNDOP4A.js";
|
|
31
|
-
import {
|
|
32
|
-
AutotaskAbortError,
|
|
33
|
-
AutotaskConfigError,
|
|
34
|
-
AutotaskError,
|
|
35
|
-
AutotaskNetworkError,
|
|
36
|
-
AutotaskTimeoutError,
|
|
37
|
-
CircuitBreakerError,
|
|
38
|
-
ConflictError,
|
|
39
|
-
EmptyResponseError,
|
|
40
|
-
NotFoundError,
|
|
41
|
-
QueryTooLongError,
|
|
42
|
-
REDACTED,
|
|
43
|
-
RateLimitError,
|
|
44
|
-
ResolutionError,
|
|
45
|
-
ResponseRejectedError,
|
|
46
|
-
StaleObjectError,
|
|
47
|
-
UnexpectedContentTypeError,
|
|
48
|
-
errorFromStatus,
|
|
49
|
-
formatVendorDetail,
|
|
50
|
-
isAutotaskError,
|
|
51
|
-
isDeterministicVendor500,
|
|
52
|
-
isRedactedFieldName,
|
|
53
|
-
parseVendorErrors,
|
|
54
|
-
redactResponseBody
|
|
55
|
-
} from "./chunk-FE225M76.js";
|
|
56
|
-
import {
|
|
57
|
-
CREDENTIAL_ENV_LOAD_ACTION,
|
|
58
|
-
credentialShapeProblem
|
|
59
|
-
} from "./chunk-QF4K3XTK.js";
|
|
60
56
|
|
|
61
57
|
// src/auth.ts
|
|
62
58
|
var AUTH_HEADERS = {
|
|
@@ -12746,4 +12742,4 @@ export {
|
|
|
12746
12742
|
VersionResource,
|
|
12747
12743
|
ZoneInformationResource
|
|
12748
12744
|
};
|
|
12749
|
-
//# sourceMappingURL=chunk-
|
|
12745
|
+
//# sourceMappingURL=chunk-2QLOK7PX.js.map
|