iit-mcp-autotask 0.63.9 → 0.63.11
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,
|
|
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.",
|
|
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":
|
|
483
|
+
"backingRegistryOperations": 1336,
|
|
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": {}
|
package/dist/access/write-env.js
CHANGED
|
@@ -139,7 +139,7 @@ export function resolveWritePolicy(env) {
|
|
|
139
139
|
dedupProblems.push(`${op}: task-level queries can include child attachments and cannot establish exact task-parent duplicates; remove this AUTOTASK_DEDUP entry and use explicit scoped create`);
|
|
140
140
|
continue;
|
|
141
141
|
}
|
|
142
|
-
if (op === 'task_note_attachments.create' || op === 'configuration_item_note_attachments.create') {
|
|
142
|
+
if (op === 'task_note_attachments.create' || op === 'configuration_item_note_attachments.create' || op === 'project_note_attachments.create' || op === 'contract_note_attachments.create') {
|
|
143
143
|
dedupProblems.push(`${op}: the note-filtered query cannot establish exact note-parent duplicates; remove this AUTOTASK_DEDUP entry and use explicit scoped create`);
|
|
144
144
|
continue;
|
|
145
145
|
}
|
|
@@ -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 = "
|
|
110
|
+
export declare const BUILT_AGAINST_PLAN_HASH = "3ad65c80be0b2edbfb3ea25f2f82f34e41fb1e047a0d2da526a34c5d28de6bad";
|
|
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 = '
|
|
190
|
+
export const BUILT_AGAINST_PLAN_HASH = '3ad65c80be0b2edbfb3ea25f2f82f34e41fb1e047a0d2da526a34c5d28de6bad';
|
|
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).
|
|
@@ -159,13 +159,13 @@ function evaluatePreview(r, a, snap, dry, resource, types) {
|
|
|
159
159
|
audit(decision.decision, decision.reasons, planHash, parsed.targets, facts);
|
|
160
160
|
const described = describe(record, shape, op, parsed, dry);
|
|
161
161
|
const creator = creatorIdentity(ctx);
|
|
162
|
-
const contact =
|
|
162
|
+
const contact = ['project_note_attachments.create', 'task_note_attachments.create'].includes(op) ? parsed.data?.attachedByContactID : undefined;
|
|
163
163
|
const requestAuthor = typeof contact === 'number' ? { mode: 'requested_contact', contactId: contact, requestIdentity: creator } : creator;
|
|
164
164
|
const resourceIdentity = creator.mode === 'impersonation' ? `impersonation resource ${creator.resourceId}` : undefined;
|
|
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', 'project_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', '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') }
|
|
@@ -77,7 +77,9 @@ function createReader(ctx, targetKey, signal, operation) {
|
|
|
77
77
|
const assetAttachment = operation === 'configuration_item_attachments.create' || operation === 'configuration_item_attachments.delete';
|
|
78
78
|
const assetNoteAttachment = operation === 'configuration_item_note_attachments.create' || operation === 'configuration_item_note_attachments.delete';
|
|
79
79
|
const projectAttachment = operation === 'project_attachments.create' || operation === 'project_attachments.delete';
|
|
80
|
-
const
|
|
80
|
+
const projectNoteAttachment = operation === 'project_note_attachments.create' || operation === 'project_note_attachments.delete';
|
|
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';
|
|
81
83
|
// The write's own TARGET record is hashed in full (an update/delete must notice any change to it);
|
|
82
84
|
// a record that is only REFERENCED (the ticket a time entry is logged on) is hashed by its stable
|
|
83
85
|
// facts only, so a volatile stamp the first of two outstanding writes moves (lastActivityDate,
|
|
@@ -171,7 +173,10 @@ function createReader(ctx, targetKey, signal, operation) {
|
|
|
171
173
|
const acquireAnchor = async (resource, rec, depth, payload, includeParent = true) => {
|
|
172
174
|
try {
|
|
173
175
|
const parent = includeParent ? await parentOf(resource) : undefined;
|
|
174
|
-
|
|
176
|
+
// A secondary ownership association is checked against the independently read note.
|
|
177
|
+
const secondaryOwnerField = projectNoteAttachment && resource === 'project_note_attachments' ? 'projectID'
|
|
178
|
+
: contractNoteAttachment && resource === 'contract_note_attachments' ? 'contractID' : undefined;
|
|
179
|
+
const refs = [...(parent === undefined ? [] : [[parent.field, parent.resource]]), ...ANCHORS.filter(([f]) => f !== parent?.field && f !== secondaryOwnerField)];
|
|
175
180
|
// The successor is the route parent. The other task also contributes scope and stable facts.
|
|
176
181
|
if (resource === 'task_predecessors')
|
|
177
182
|
refs.push(['predecessorTaskID', 'tasks']);
|
|
@@ -376,12 +381,21 @@ export async function takeSnapshot(ctx, record, parsed, duplicateFields, signal)
|
|
|
376
381
|
const { get, idsFor, anchor, reads, hashed, unresolved, companies } = r;
|
|
377
382
|
const { targets, data } = parsed;
|
|
378
383
|
const assetNoteAttachment = record.resource === 'configuration_item_note_attachments';
|
|
384
|
+
const projectNoteAttachment = record.resource === 'project_note_attachments';
|
|
385
|
+
const contractNoteAttachment = record.resource === 'contract_note_attachments';
|
|
386
|
+
const independentNoteAttachment = assetNoteAttachment || projectNoteAttachment || contractNoteAttachment;
|
|
379
387
|
const parent = targets.parentId === undefined ? undefined : await parentOf(record.resource);
|
|
380
388
|
if (writeShape(record) === 'create_child' && parent !== undefined && data !== undefined) {
|
|
381
389
|
const payloadParent = ci(data, parent.field);
|
|
382
390
|
if (record.id === 'task_note_attachments.create' && payloadParent !== undefined) {
|
|
383
391
|
return reason('INPUT_INVALID', 'Pass the task note ID as parentId for a task note attachment', 'data.taskNoteID');
|
|
384
392
|
}
|
|
393
|
+
if (projectNoteAttachment && payloadParent !== undefined) {
|
|
394
|
+
return reason('INPUT_INVALID', 'Pass the project note ID as parentId for a note attachment', 'data.projectNoteID');
|
|
395
|
+
}
|
|
396
|
+
if (contractNoteAttachment && payloadParent !== undefined) {
|
|
397
|
+
return reason('INPUT_INVALID', 'Pass the contract note ID as parentId for a note attachment', 'data.contractNoteID');
|
|
398
|
+
}
|
|
385
399
|
if (assetNoteAttachment && payloadParent !== undefined) {
|
|
386
400
|
return reason('INPUT_INVALID', 'Pass the configuration item note ID as parentId for a note attachment', 'data.configurationItemNoteID');
|
|
387
401
|
}
|
|
@@ -432,7 +446,7 @@ export async function takeSnapshot(ctx, record, parsed, duplicateFields, signal)
|
|
|
432
446
|
return reason('INPUT_INVALID', `${record.id}: the target's ${parent.field} conflicts with the parentId route`, 'args.0');
|
|
433
447
|
}
|
|
434
448
|
// The note's independent locator lookup below supplies its authoritative asset.
|
|
435
|
-
await anchor(record.resource, current, 0, false, !
|
|
449
|
+
await anchor(record.resource, current, 0, false, !independentNoteAttachment);
|
|
436
450
|
}
|
|
437
451
|
if (targets.toId !== undefined) {
|
|
438
452
|
// the TARGET ticket is a scope fact of its own (its company joins the union), read live
|
|
@@ -483,8 +497,8 @@ export async function takeSnapshot(ctx, record, parsed, duplicateFields, signal)
|
|
|
483
497
|
if (targets.parentId !== undefined) {
|
|
484
498
|
// The parent the caller names is a scope fact of its own, read live, whatever the payload says.
|
|
485
499
|
const parent = await parentOf(record.resource);
|
|
486
|
-
const
|
|
487
|
-
const locatorInput =
|
|
500
|
+
const contactNoteAttachment = record.resource === 'task_note_attachments' || projectNoteAttachment;
|
|
501
|
+
const locatorInput = contactNoteAttachment || independentNoteAttachment ? {} : data ?? current ?? {};
|
|
488
502
|
const ids = parent === undefined || !isRefId(targets.parentId, parent.resource) ? undefined : await idsFor(parent.resource, targets.parentId, locatorInput);
|
|
489
503
|
if (parent === undefined || ids === undefined)
|
|
490
504
|
unresolved.push(`${record.resource}.parent`);
|
|
@@ -497,14 +511,22 @@ export async function takeSnapshot(ctx, record, parsed, duplicateFields, signal)
|
|
|
497
511
|
return reason('TARGET_NOT_IN_SCOPE', `${record.id}: the attachment's configuration item association contradicts the note's asset`);
|
|
498
512
|
}
|
|
499
513
|
}
|
|
500
|
-
if (
|
|
501
|
-
const
|
|
502
|
-
if (
|
|
503
|
-
return reason('TARGET_NOT_IN_SCOPE', `${record.id}: the attachment's
|
|
514
|
+
if (contractNoteAttachment && current !== undefined) {
|
|
515
|
+
const attachedContract = ci(current, 'contractID');
|
|
516
|
+
if (attachedContract != null && attachedContract !== ci(parentRecord, 'contractID')) {
|
|
517
|
+
return reason('TARGET_NOT_IN_SCOPE', `${record.id}: the attachment's contract association contradicts the note's contract`);
|
|
518
|
+
}
|
|
519
|
+
}
|
|
520
|
+
if (contactNoteAttachment) {
|
|
521
|
+
const ownerField = projectNoteAttachment ? 'projectID' : 'taskID';
|
|
522
|
+
const attachmentOwner = current === undefined ? undefined : ci(current, ownerField);
|
|
523
|
+
if (attachmentOwner != null && attachmentOwner !== ci(parentRecord, ownerField)) {
|
|
524
|
+
const owner = projectNoteAttachment ? 'project' : 'task';
|
|
525
|
+
return reason('TARGET_NOT_IN_SCOPE', `${record.id}: the attachment's ${owner} association contradicts the note's ${owner}`);
|
|
504
526
|
}
|
|
505
527
|
const contact = data === undefined ? undefined : ci(data, 'attachedByContactID');
|
|
506
528
|
if (isRefId(contact, 'contacts')) {
|
|
507
|
-
hashed[
|
|
529
|
+
hashed[`${parent.resource}:${ids.join('/')}:contact_author`] = { createdByContactID: ci(parentRecord, 'createdByContactID') };
|
|
508
530
|
}
|
|
509
531
|
}
|
|
510
532
|
await anchor(parent.resource, parentRecord, 1, false);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "iit-mcp-autotask",
|
|
3
|
-
"version": "0.63.
|
|
3
|
+
"version": "0.63.11",
|
|
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.
|
|
57
|
+
"node-autotask": "0.81.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
|
+
"version": "0.63.11",
|
|
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.
|
|
65
|
+
"versionRange": "0.81.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"
|