n8n-mcp 2.65.2 → 2.66.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/dist/mcp/handlers-n8n-manager.d.ts.map +1 -1
- package/dist/mcp/handlers-n8n-manager.js +38 -8
- package/dist/mcp/handlers-n8n-manager.js.map +1 -1
- package/dist/mcp/handlers-workflow-diff.d.ts.map +1 -1
- package/dist/mcp/handlers-workflow-diff.js +18 -3
- package/dist/mcp/handlers-workflow-diff.js.map +1 -1
- package/dist/mcp/tool-docs/workflow_management/n8n-create-workflow.d.ts.map +1 -1
- package/dist/mcp/tool-docs/workflow_management/n8n-create-workflow.js +2 -1
- package/dist/mcp/tool-docs/workflow_management/n8n-create-workflow.js.map +1 -1
- package/dist/mcp/tool-docs/workflow_management/n8n-get-workflow.d.ts.map +1 -1
- package/dist/mcp/tool-docs/workflow_management/n8n-get-workflow.js +5 -3
- package/dist/mcp/tool-docs/workflow_management/n8n-get-workflow.js.map +1 -1
- package/dist/mcp/tool-docs/workflow_management/n8n-update-full-workflow.d.ts.map +1 -1
- package/dist/mcp/tool-docs/workflow_management/n8n-update-full-workflow.js +1 -0
- package/dist/mcp/tool-docs/workflow_management/n8n-update-full-workflow.js.map +1 -1
- package/dist/mcp/tool-docs/workflow_management/n8n-update-partial-workflow.d.ts.map +1 -1
- package/dist/mcp/tool-docs/workflow_management/n8n-update-partial-workflow.js +11 -4
- package/dist/mcp/tool-docs/workflow_management/n8n-update-partial-workflow.js.map +1 -1
- package/dist/mcp/tools-n8n-manager.d.ts.map +1 -1
- package/dist/mcp/tools-n8n-manager.js +29 -1
- package/dist/mcp/tools-n8n-manager.js.map +1 -1
- package/dist/services/n8n-api-client.d.ts +11 -2
- package/dist/services/n8n-api-client.d.ts.map +1 -1
- package/dist/services/n8n-api-client.js +114 -16
- package/dist/services/n8n-api-client.js.map +1 -1
- package/dist/services/n8n-validation.d.ts.map +1 -1
- package/dist/services/n8n-validation.js +2 -0
- package/dist/services/n8n-validation.js.map +1 -1
- package/dist/services/node-groups.d.ts +60 -0
- package/dist/services/node-groups.d.ts.map +1 -0
- package/dist/services/node-groups.js +237 -0
- package/dist/services/node-groups.js.map +1 -0
- package/dist/services/workflow-diff-engine.d.ts +6 -0
- package/dist/services/workflow-diff-engine.d.ts.map +1 -1
- package/dist/services/workflow-diff-engine.js +132 -4
- package/dist/services/workflow-diff-engine.js.map +1 -1
- package/dist/services/workflow-validator.d.ts +7 -0
- package/dist/services/workflow-validator.d.ts.map +1 -1
- package/dist/services/workflow-validator.js +20 -0
- package/dist/services/workflow-validator.js.map +1 -1
- package/dist/services/workflow-versioning-service.d.ts +2 -0
- package/dist/services/workflow-versioning-service.d.ts.map +1 -1
- package/dist/services/workflow-versioning-service.js +11 -3
- package/dist/services/workflow-versioning-service.js.map +1 -1
- package/dist/telemetry/intent-classifier.d.ts.map +1 -1
- package/dist/telemetry/intent-classifier.js +1 -0
- package/dist/telemetry/intent-classifier.js.map +1 -1
- package/dist/telemetry/mutation-tracker.d.ts.map +1 -1
- package/dist/telemetry/mutation-tracker.js +5 -0
- package/dist/telemetry/mutation-tracker.js.map +1 -1
- package/dist/types/n8n-api.d.ts +10 -0
- package/dist/types/n8n-api.d.ts.map +1 -1
- package/dist/types/n8n-api.js.map +1 -1
- package/dist/types/workflow-diff.d.ts +13 -2
- package/dist/types/workflow-diff.d.ts.map +1 -1
- package/dist/types/workflow-diff.js +1 -1
- package/dist/types/workflow-diff.js.map +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"handlers-n8n-manager.d.ts","sourceRoot":"","sources":["../../src/mcp/handlers-n8n-manager.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAI1D,OAAO,EAML,eAAe,EAKhB,MAAM,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"handlers-n8n-manager.d.ts","sourceRoot":"","sources":["../../src/mcp/handl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,CAAC,IAAI,EAAE,OAAO,EAAE,OAAO,CAAC,EAAE,eAAe,GAAG,OAAO,CAAC,eAAe,CAAC,CAsC/G;AAED,wBAAsB,sBAAsB,CAAC,IAAI,EAAE,OAAO,EAAE,OAAO,CAAC,EAAE,eAAe,GAAG,OAAO,CAAC,eAAe,CAAC,CAa/G;AAED,wBAAsB,yBAAyB,CAAC,IAAI,EAAE,OAAO,EAAE,OAAO,CAAC,EAAE,eAAe,GAAG,OAAO,CAAC,eAAe,CAAC,CAalH;AAeD,wBAAsB,mBAAmB,CAAC,IAAI,EAAE,OAAO,EAAE,OAAO,CAAC,EAAE,eAAe,GAAG,OAAO,CAAC,eAAe,CAAC,CAwG5G"}
|
|
@@ -86,6 +86,7 @@ const audit_report_builder_1 = require("../services/audit-report-builder");
|
|
|
86
86
|
const n8n_api_1 = require("../config/n8n-api");
|
|
87
87
|
const n8n_api_2 = require("../types/n8n-api");
|
|
88
88
|
const n8n_validation_1 = require("../services/n8n-validation");
|
|
89
|
+
const node_groups_1 = require("../services/node-groups");
|
|
89
90
|
const n8n_errors_1 = require("../utils/n8n-errors");
|
|
90
91
|
const logger_1 = require("../utils/logger");
|
|
91
92
|
const zod_1 = require("zod");
|
|
@@ -232,6 +233,7 @@ const createWorkflowSchema = zod_1.z.object({
|
|
|
232
233
|
executionTimeout: zod_1.z.number().optional(),
|
|
233
234
|
errorWorkflow: zod_1.z.string().optional(),
|
|
234
235
|
})).optional(),
|
|
236
|
+
nodeGroups: zod_1.z.any().optional(),
|
|
235
237
|
projectId: zod_1.z.string().optional(),
|
|
236
238
|
});
|
|
237
239
|
const updateWorkflowSchema = zod_1.z.object({
|
|
@@ -240,6 +242,7 @@ const updateWorkflowSchema = zod_1.z.object({
|
|
|
240
242
|
nodes: zod_1.z.preprocess(mcp_input_normalizer_1.normalizeMcpWorkflowNodes, zod_1.z.array(zod_1.z.any())).optional(),
|
|
241
243
|
connections: zod_1.z.preprocess(mcp_input_normalizer_1.normalizeMcpWorkflowConnections, zod_1.z.record(zod_1.z.string(), zod_1.z.any())).optional(),
|
|
242
244
|
settings: zod_1.z.preprocess(mcp_input_normalizer_1.normalizeMcpJsonValue, zod_1.z.any()).optional(),
|
|
245
|
+
nodeGroups: zod_1.z.any().optional(),
|
|
243
246
|
createBackup: zod_1.z.boolean().optional(),
|
|
244
247
|
intent: zod_1.z.string().optional(),
|
|
245
248
|
});
|
|
@@ -360,7 +363,13 @@ async function handleCreateWorkflow(args, context) {
|
|
|
360
363
|
details: { errors }
|
|
361
364
|
};
|
|
362
365
|
}
|
|
363
|
-
const
|
|
366
|
+
const { nodeGroups: rawNodeGroups, ...createPayload } = input;
|
|
367
|
+
const nodeGroups = (0, node_groups_1.parseNodeGroupsInput)(rawNodeGroups);
|
|
368
|
+
const groupWarnings = [];
|
|
369
|
+
const workflow = await client.createWorkflow(nodeGroups !== undefined ? { ...createPayload, nodeGroups } : createPayload, {
|
|
370
|
+
authoredGroups: new Set((nodeGroups ?? []).map(group => group.name)),
|
|
371
|
+
onWarning: message => groupWarnings.push(message),
|
|
372
|
+
});
|
|
364
373
|
if (!workflow || !workflow.id) {
|
|
365
374
|
return {
|
|
366
375
|
success: false,
|
|
@@ -379,7 +388,8 @@ async function handleCreateWorkflow(args, context) {
|
|
|
379
388
|
active: workflow.active,
|
|
380
389
|
nodeCount: workflow.nodes?.length || 0
|
|
381
390
|
},
|
|
382
|
-
message: `Workflow "${workflow.name}" created successfully with ID: ${workflow.id}. Use n8n_get_workflow with mode 'structure' to verify current state
|
|
391
|
+
message: `Workflow "${workflow.name}" created successfully with ID: ${workflow.id}. Use n8n_get_workflow with mode 'structure' to verify current state.`,
|
|
392
|
+
...(groupWarnings.length > 0 ? { details: { warnings: groupWarnings } } : {})
|
|
383
393
|
};
|
|
384
394
|
}
|
|
385
395
|
catch (error) {
|
|
@@ -502,6 +512,7 @@ async function handleGetWorkflowStructure(args, context) {
|
|
|
502
512
|
isArchived: workflow.isArchived,
|
|
503
513
|
nodes: simplifiedNodes,
|
|
504
514
|
connections: workflow.connections,
|
|
515
|
+
...(0, node_groups_1.nodeGroupsField)(workflow.nodeGroups),
|
|
505
516
|
nodeCount: workflow.nodes.length,
|
|
506
517
|
connectionCount: Object.keys(workflow.connections).length
|
|
507
518
|
}
|
|
@@ -579,6 +590,8 @@ async function handleGetWorkflowFiltered(args, context) {
|
|
|
579
590
|
const matchedNodes = workflow.nodes.filter(node => requested.has(node.name) || requested.has(node.id));
|
|
580
591
|
const matchedKeys = new Set(matchedNodes.flatMap(node => [node.name, node.id]));
|
|
581
592
|
const notFound = nodeNames.filter(key => !matchedKeys.has(key));
|
|
593
|
+
const matchedIds = new Set(matchedNodes.map(node => node.id));
|
|
594
|
+
const touchedGroups = (workflow.nodeGroups ?? []).filter(group => Array.isArray(group?.nodeIds) && group.nodeIds.some(nodeId => matchedIds.has(nodeId)));
|
|
582
595
|
return {
|
|
583
596
|
success: true,
|
|
584
597
|
data: {
|
|
@@ -587,6 +600,7 @@ async function handleGetWorkflowFiltered(args, context) {
|
|
|
587
600
|
active: workflow.active,
|
|
588
601
|
isArchived: workflow.isArchived,
|
|
589
602
|
nodes: matchedNodes,
|
|
603
|
+
...(0, node_groups_1.nodeGroupsField)(touchedGroups),
|
|
590
604
|
nodeCount: workflow.nodes.length,
|
|
591
605
|
returnedCount: matchedNodes.length,
|
|
592
606
|
...(notFound.length > 0 ? { notFound } : {})
|
|
@@ -640,6 +654,7 @@ async function handleGetWorkflowActive(args, context) {
|
|
|
640
654
|
versionName: activeVersion.name ?? null,
|
|
641
655
|
nodes: activeVersion.nodes,
|
|
642
656
|
connections: activeVersion.connections,
|
|
657
|
+
...(0, node_groups_1.nodeGroupsField)(activeVersion.nodeGroups),
|
|
643
658
|
}
|
|
644
659
|
};
|
|
645
660
|
}
|
|
@@ -653,6 +668,7 @@ async function handleGetWorkflowActive(args, context) {
|
|
|
653
668
|
versionName: null,
|
|
654
669
|
nodes: workflow.nodes,
|
|
655
670
|
connections: workflow.connections,
|
|
671
|
+
...(0, node_groups_1.nodeGroupsField)(workflow.nodeGroups),
|
|
656
672
|
}
|
|
657
673
|
};
|
|
658
674
|
}
|
|
@@ -713,7 +729,8 @@ async function handleUpdateWorkflow(args, repository, context) {
|
|
|
713
729
|
}
|
|
714
730
|
}
|
|
715
731
|
}
|
|
716
|
-
const { settings: settingsUpdate, ...nonSettingsUpdate } = updateData;
|
|
732
|
+
const { settings: settingsUpdate, nodeGroups: rawNodeGroups, ...nonSettingsUpdate } = updateData;
|
|
733
|
+
const nodeGroupsUpdate = (0, node_groups_1.parseNodeGroupsInput)(rawNodeGroups);
|
|
717
734
|
const fullWorkflow = {
|
|
718
735
|
...current,
|
|
719
736
|
...nonSettingsUpdate
|
|
@@ -724,7 +741,10 @@ async function handleUpdateWorkflow(args, repository, context) {
|
|
|
724
741
|
...settingsUpdate,
|
|
725
742
|
};
|
|
726
743
|
}
|
|
727
|
-
if (
|
|
744
|
+
if (nodeGroupsUpdate !== undefined) {
|
|
745
|
+
fullWorkflow.nodeGroups = nodeGroupsUpdate;
|
|
746
|
+
}
|
|
747
|
+
if (updateData.nodes || updateData.connections || nodeGroupsUpdate !== undefined) {
|
|
728
748
|
if (createBackup !== false) {
|
|
729
749
|
try {
|
|
730
750
|
const versioningService = new workflow_versioning_service_1.WorkflowVersioningService(repository, client, (0, instance_context_1.getInstanceScopeId)(context));
|
|
@@ -754,7 +774,11 @@ async function handleUpdateWorkflow(args, repository, context) {
|
|
|
754
774
|
};
|
|
755
775
|
}
|
|
756
776
|
}
|
|
757
|
-
const
|
|
777
|
+
const groupWarnings = [];
|
|
778
|
+
const workflow = await client.updateWorkflow(id, fullWorkflow, {
|
|
779
|
+
authoredGroups: new Set((nodeGroupsUpdate ?? []).map(group => group.name)),
|
|
780
|
+
onWarning: message => groupWarnings.push(message),
|
|
781
|
+
});
|
|
758
782
|
if (workflowBefore) {
|
|
759
783
|
void trackWorkflowMutationForFullUpdate({
|
|
760
784
|
sessionId,
|
|
@@ -777,7 +801,8 @@ async function handleUpdateWorkflow(args, repository, context) {
|
|
|
777
801
|
active: workflow.active,
|
|
778
802
|
nodeCount: workflow.nodes?.length || 0
|
|
779
803
|
},
|
|
780
|
-
message: `Workflow "${workflow.name}" updated successfully. Use n8n_get_workflow with mode 'structure' to verify current state
|
|
804
|
+
message: `Workflow "${workflow.name}" updated successfully. Use n8n_get_workflow with mode 'structure' to verify current state.`,
|
|
805
|
+
...(groupWarnings.length > 0 ? { details: { warnings: groupWarnings } } : {})
|
|
781
806
|
};
|
|
782
807
|
}
|
|
783
808
|
catch (error) {
|
|
@@ -1987,7 +2012,7 @@ async function handleWorkflowVersions(args, repository, context) {
|
|
|
1987
2012
|
error: 'Workflow version storage is not available for this tenant context'
|
|
1988
2013
|
};
|
|
1989
2014
|
}
|
|
1990
|
-
const client =
|
|
2015
|
+
const client = getN8nApiClient(context);
|
|
1991
2016
|
const versioningService = new workflow_versioning_service_1.WorkflowVersioningService(repository, client || undefined, (0, instance_context_1.getInstanceScopeId)(context));
|
|
1992
2017
|
switch (input.mode) {
|
|
1993
2018
|
case 'list': {
|
|
@@ -2200,11 +2225,15 @@ async function handleDeployTemplate(args, templateService, repository, context)
|
|
|
2200
2225
|
n.type?.includes('webhook') ||
|
|
2201
2226
|
n.type === 'n8n-nodes-base.webhook');
|
|
2202
2227
|
const triggerType = triggerNode?.type?.split('.').pop() || 'manual';
|
|
2228
|
+
const templateGroupWarnings = [];
|
|
2203
2229
|
const createdWorkflow = await client.createWorkflow({
|
|
2204
2230
|
name: workflowName,
|
|
2205
2231
|
nodes: workflow.nodes,
|
|
2206
2232
|
connections: workflow.connections,
|
|
2233
|
+
...(0, node_groups_1.nodeGroupsField)(workflow.nodeGroups),
|
|
2207
2234
|
settings: workflow.settings || { executionOrder: 'v1' }
|
|
2235
|
+
}, {
|
|
2236
|
+
onWarning: message => templateGroupWarnings.push(message)
|
|
2208
2237
|
});
|
|
2209
2238
|
const apiConfig = resolveN8nApiConfigForResponse(context);
|
|
2210
2239
|
const baseUrl = apiConfig?.baseUrl?.replace('/api/v1', '') || '';
|
|
@@ -2250,7 +2279,8 @@ async function handleDeployTemplate(args, templateService, repository, context)
|
|
|
2250
2279
|
templateId: input.templateId,
|
|
2251
2280
|
templateUrl: template.url || `https://n8n.io/workflows/${input.templateId}`,
|
|
2252
2281
|
autoFixStatus,
|
|
2253
|
-
fixesApplied: fixesApplied.length > 0 ? fixesApplied : undefined
|
|
2282
|
+
fixesApplied: fixesApplied.length > 0 ? fixesApplied : undefined,
|
|
2283
|
+
warnings: templateGroupWarnings.length > 0 ? templateGroupWarnings : undefined
|
|
2254
2284
|
},
|
|
2255
2285
|
message: `Workflow "${createdWorkflow.name}" deployed successfully from template ${input.templateId}.${fixSummary} ${requiredCredentials.length > 0
|
|
2256
2286
|
? `Configure ${requiredCredentials.length} credential(s) in n8n to activate.`
|