iit-mcp-autotask 0.63.3 → 0.63.4

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/capabilities.json CHANGED
@@ -74,7 +74,7 @@
74
74
  },
75
75
  {
76
76
  "id": "autotask.platform.catalog",
77
- "description": "Find the exact operation key for anything without a dedicated tool: ranked search (q) over the 1,278 registry operations, with effect and whether this deployment serves it. No vendor call.",
77
+ "description": "Find the exact operation key for anything without a dedicated tool: ranked search (q) over the 1,287 registry operations, with effect and whether this deployment serves it. No vendor call.",
78
78
  "mcpPrimitive": "tool",
79
79
  "toolName": "autotask_catalog",
80
80
  "type": "read",
@@ -480,7 +480,7 @@
480
480
  "autotask_describe",
481
481
  "autotask_read"
482
482
  ],
483
- "backingRegistryOperations": 1278,
483
+ "backingRegistryOperations": 1287,
484
484
  "note": "autotask_catalog finds the exact operation key (ranked search), autotask_describe serves its contract, autotask_read runs any effect=read key. Writes go through the operator profile (autotask_write then autotask_apply); authenticate.* is never served."
485
485
  },
486
486
  "schemas": {}
@@ -107,7 +107,7 @@ export declare function sdkCacheOptions(cache: 'on' | 'off'): Pick<AutotaskConfi
107
107
  * fails the boot (or the CI test) instead of quietly shipping a tool surface that no longer
108
108
  * describes the SDK behind it.
109
109
  */
110
- export declare const BUILT_AGAINST_PLAN_HASH = "3dfaa99bd81e843635bafd242e5229270f259de68c6a32d483a6640402f3b187";
110
+ export declare const BUILT_AGAINST_PLAN_HASH = "cff16b0b9d022a81a1926ffacb0d01cf5a1e924805447744b62865a3cf9d3779";
111
111
  /**
112
112
  * Fail fast when the installed SDK's plan has moved out from under this surface.
113
113
  * Called at boot (main.ts) and safe to call repeatedly (pure comparison).
@@ -187,7 +187,7 @@ export function sdkCacheOptions(cache) {
187
187
  * fails the boot (or the CI test) instead of quietly shipping a tool surface that no longer
188
188
  * describes the SDK behind it.
189
189
  */
190
- export const BUILT_AGAINST_PLAN_HASH = '3dfaa99bd81e843635bafd242e5229270f259de68c6a32d483a6640402f3b187';
190
+ export const BUILT_AGAINST_PLAN_HASH = 'cff16b0b9d022a81a1926ffacb0d01cf5a1e924805447744b62865a3cf9d3779';
191
191
  /**
192
192
  * Fail fast when the installed SDK's plan has moved out from under this surface.
193
193
  * Called at boot (main.ts) and safe to call repeatedly (pure comparison).
@@ -57,7 +57,7 @@ export function getIds(ctx, resource, parentId, id) {
57
57
  return parentId !== undefined && !hasSimpleGet(resource, ctx) ? [parentId, id] : [id];
58
58
  }
59
59
  /** The reader for one snapshot. Only the write's own target record is hashed in full; a referenced record is hashed by its stable facts. */
60
- function createReader(ctx, targetKey, signal) {
60
+ function createReader(ctx, targetKey, signal, requirePredecessorInPayload = false) {
61
61
  const reads = {};
62
62
  const hashed = {};
63
63
  const companies = new Set();
@@ -148,15 +148,26 @@ function createReader(ctx, targetKey, signal) {
148
148
  try {
149
149
  const parent = includeParent ? await parentOf(resource) : undefined;
150
150
  const refs = [...(parent === undefined ? [] : [[parent.field, parent.resource]]), ...ANCHORS.filter(([f]) => f !== parent?.field)];
151
+ // The successor is the route parent. The other task also contributes scope and stable facts.
152
+ if (resource === 'task_predecessors')
153
+ refs.push(['predecessorTaskID', 'tasks']);
151
154
  const children = await drainReads(refs.map(async ([field, res]) => {
152
155
  let read;
153
156
  try {
154
157
  const value = ci(rec, field);
155
- if (value === undefined || value === null)
156
- read = { kind: 'absent' };
158
+ if (value === undefined || value === null) {
159
+ const required = field === 'predecessorTaskID' && (!payload || requirePredecessorInPayload);
160
+ read = { kind: required ? 'missing' : 'absent' };
161
+ }
157
162
  else {
158
163
  const ids = isRefId(value, res) && depth < 3 ? await idsFor(res, value, rec) : undefined;
159
- read = ids === undefined ? { kind: 'missing' } : { kind: 'record', record: await get(res, ids) };
164
+ if (ids === undefined)
165
+ read = { kind: 'missing' };
166
+ else {
167
+ const target = await get(res, ids);
168
+ const wrongTask = resource === 'task_predecessors' && res === 'tasks' && ci(target, 'id') !== value;
169
+ read = wrongTask ? { kind: 'missing' } : { kind: 'record', record: target };
170
+ }
160
171
  }
161
172
  }
162
173
  catch (error) {
@@ -325,7 +336,7 @@ export async function takeSnapshot(ctx, record, parsed, duplicateFields, signal)
325
336
  return reason('INPUT_INVALID', `${record.id}: parentId 0 names no record; write targets are ids, never names (resolve a name with autotask_resolve first)`, 'args.0');
326
337
  }
327
338
  const targetKey = parsed.targets.id === undefined ? undefined : `${record.resource}:${getIds(ctx, record.resource, parsed.targets.parentId, parsed.targets.id).join('/')}`;
328
- const r = createReader(ctx, targetKey, signal);
339
+ const r = createReader(ctx, targetKey, signal, record.id === 'task_predecessors.create');
329
340
  const { get, idsFor, anchor, reads, hashed, unresolved, companies } = r;
330
341
  const { targets, data } = parsed;
331
342
  const parent = targets.parentId === undefined ? undefined : await parentOf(record.resource);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "iit-mcp-autotask",
3
- "version": "0.63.3",
3
+ "version": "0.63.4",
4
4
  "description": "MCP server for the Autotask (Datto) PSA domain, built on the node-autotask SDK",
5
5
  "license": "MIT",
6
6
  "author": "Max Soukhomlinov",
@@ -54,7 +54,7 @@
54
54
  },
55
55
  "dependencies": {
56
56
  "@modelcontextprotocol/server": "^2.2.0",
57
- "node-autotask": "0.73.0",
57
+ "node-autotask": "0.74.0",
58
58
  "zod": "^4.6.7"
59
59
  },
60
60
  "devDependencies": {
package/server.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "iit-mcp-autotask",
3
- "version": "0.63.3",
3
+ "version": "0.63.4",
4
4
  "description": "MCP server for the Autotask (Datto) PSA API, powered by the node-autotask SDK",
5
5
  "mcpProtocolBaseline": "2026-07-28",
6
6
  "legacyProtocolFallback": "2025-11-25",
@@ -62,7 +62,7 @@
62
62
  "capabilitiesManifest": "capabilities.json",
63
63
  "sdk": {
64
64
  "package": "node-autotask",
65
- "versionRange": "0.73.0"
65
+ "versionRange": "0.74.0"
66
66
  },
67
67
  "vendorExtensions": false,
68
68
  "credentialModelNote": "per-request; server-held under stdio or, on HTTP, only behind AUTOTASK_HTTP_AUTH=tokens; operator plans and the ledger are keyed by principal and tenant id, never by credential, and an apply authenticates the request credential and restores the plan's per-write impersonation"