iit-mcp-autotask 0.63.11 → 0.63.12

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,336 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,343 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": 1336,
483
+ "backingRegistryOperations": 1343,
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": {}
@@ -151,6 +151,10 @@ export function resolveWritePolicy(env) {
151
151
  dedupProblems.push(`${op}: the configuration-item query cannot establish exact configuration-item parent duplicates; remove this AUTOTASK_DEDUP entry and use explicit scoped create`);
152
152
  continue;
153
153
  }
154
+ if (op === 'sales_order_attachments.create') {
155
+ dedupProblems.push(`${op}: the sales order query cannot establish exact order-parent duplicates; remove this AUTOTASK_DEDUP entry and use explicit scoped create`);
156
+ continue;
157
+ }
154
158
  if (!fields.every((f) => FIELD.test(f))) {
155
159
  dedupProblems.push(`${op}: each field must be a plain field name joined by +`);
156
160
  continue;
@@ -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 = "3ad65c80be0b2edbfb3ea25f2f82f34e41fb1e047a0d2da526a34c5d28de6bad";
110
+ export declare const BUILT_AGAINST_PLAN_HASH = "2de751fe81574eda1520f8db24e6f947cab79b1231aeeb39da8e379bf50d7308";
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 = '3ad65c80be0b2edbfb3ea25f2f82f34e41fb1e047a0d2da526a34c5d28de6bad';
190
+ export const BUILT_AGAINST_PLAN_HASH = '2de751fe81574eda1520f8db24e6f947cab79b1231aeeb39da8e379bf50d7308';
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).
@@ -165,7 +165,7 @@ function evaluatePreview(r, a, snap, dry, resource, types) {
165
165
  const attribution = typeof contact === 'number'
166
166
  ? `Requested contact author ${contact}, subject to Autotask validation${resourceIdentity === undefined ? '' : `. Request uses ${resourceIdentity}`}`
167
167
  : `Creator: ${resourceIdentity ?? 'API user'}`;
168
- const fileAttachment = ['configuration_item_attachments.create', 'configuration_item_note_attachments.create', 'contract_note_attachments.create', 'project_attachments.create', 'project_note_attachments.create', 'task_attachments.create', 'task_note_attachments.create'].includes(op);
168
+ const fileAttachment = ['configuration_item_attachments.create', 'configuration_item_note_attachments.create', 'contract_note_attachments.create', 'project_attachments.create', 'project_note_attachments.create', 'sales_order_attachments.create', 'task_attachments.create', 'task_note_attachments.create'].includes(op);
169
169
  const base64 = fileAttachment && parsed.data?.attachmentType === 'FILE_ATTACHMENT' ? parsed.data.data : undefined;
170
170
  const file = typeof base64 === 'string'
171
171
  ? { bytes: Buffer.byteLength(base64, 'base64'), sha256: createHash('sha256').update(base64, 'base64').digest('hex') }
@@ -79,7 +79,8 @@ function createReader(ctx, targetKey, signal, operation) {
79
79
  const projectAttachment = operation === 'project_attachments.create' || operation === 'project_attachments.delete';
80
80
  const projectNoteAttachment = operation === 'project_note_attachments.create' || operation === 'project_note_attachments.delete';
81
81
  const contractNoteAttachment = operation === 'contract_note_attachments.create' || operation === 'contract_note_attachments.delete';
82
- const strictAttachment = taskAttachment || assetAttachment || assetNoteAttachment || projectAttachment || projectNoteAttachment || contractNoteAttachment || operation === 'task_note_attachments.create' || operation === 'task_note_attachments.delete';
82
+ const salesOrderAttachment = operation === 'sales_order_attachments.create' || operation === 'sales_order_attachments.delete';
83
+ const strictAttachment = salesOrderAttachment || taskAttachment || assetAttachment || assetNoteAttachment || projectAttachment || projectNoteAttachment || contractNoteAttachment || operation === 'task_note_attachments.create' || operation === 'task_note_attachments.delete';
83
84
  // The write's own TARGET record is hashed in full (an update/delete must notice any change to it);
84
85
  // a record that is only REFERENCED (the ticket a time entry is logged on) is hashed by its stable
85
86
  // facts only, so a volatile stamp the first of two outstanding writes moves (lastActivityDate,
@@ -97,7 +98,9 @@ function createReader(ctx, targetKey, signal, operation) {
97
98
  if (v === undefined)
98
99
  throw new Cancelled();
99
100
  const model = v;
100
- const hasCompanyScope = resource === 'projects' || resource === 'contracts' || ((assetAttachment || assetNoteAttachment) && resource === 'configuration_items');
101
+ const orderCompany = salesOrderAttachment && (resource === 'sales_orders' || resource === 'opportunities');
102
+ const hasCompanyScope = orderCompany || resource === 'projects' || resource === 'contracts'
103
+ || ((assetAttachment || assetNoteAttachment) && resource === 'configuration_items');
101
104
  if (strictAttachment && (ci(model, 'id') !== ids.at(-1) || (hasCompanyScope && !isRefId(ci(model, 'companyID'), 'companies')))) {
102
105
  throw new AttachmentScopeUnresolved(`${resource}: the fresh record did not establish the requested identity and scope`);
103
106
  }
@@ -112,6 +115,9 @@ function createReader(ctx, targetKey, signal, operation) {
112
115
  }
113
116
  reads[key] = v;
114
117
  hashed[key] = key === targetKey ? v : stableFacts(v);
118
+ if (salesOrderAttachment && resource === 'sales_orders') {
119
+ hashed[`${key}:opportunity`] = ci(model, 'opportunityID');
120
+ }
115
121
  return model;
116
122
  })();
117
123
  pending.set(key, request);
@@ -189,12 +195,17 @@ function createReader(ctx, targetKey, signal, operation) {
189
195
  if (projectAttachment && !payload && resource === 'project_attachments') {
190
196
  refs.push(['projectNoteID', 'project_notes']);
191
197
  }
198
+ const orderOrigin = salesOrderAttachment && !payload && resource === 'sales_orders';
199
+ if (orderOrigin || (salesOrderAttachment && !payload && resource === 'sales_order_attachments')) {
200
+ refs.push(['opportunityID', 'opportunities']);
201
+ }
192
202
  const children = await drainReads(refs.map(async ([field, res]) => {
193
203
  let read;
194
204
  try {
195
205
  const value = ci(rec, field);
196
206
  if (value === undefined || value === null) {
197
- const required = field === 'predecessorTaskID' && (!payload || operation === 'task_predecessors.create');
207
+ const required = (field === 'opportunityID' && orderOrigin)
208
+ || (field === 'predecessorTaskID' && (!payload || operation === 'task_predecessors.create'));
198
209
  read = { kind: required ? 'missing' : 'absent' };
199
210
  }
200
211
  else {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "iit-mcp-autotask",
3
- "version": "0.63.11",
3
+ "version": "0.63.12",
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.81.0",
57
+ "node-autotask": "0.82.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.11",
3
+ "version": "0.63.12",
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.81.0"
65
+ "versionRange": "0.82.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"