mirror of
https://github.com/czlonkowski/n8n-mcp.git
synced 2026-03-21 09:53:08 +00:00
- Normalize name→nodeName and id→nodeId for node-targeting operations in the Zod schema transform, so LLMs using natural field names no longer get "Node not found" errors - Replace hardcoded ALL_CONNECTION_TYPES with dynamic iteration so AI sub-nodes (ai_outputParser, ai_document, ai_textSplitter, etc.) are not flagged as disconnected during save - Add .catchall() to workflowConnectionSchema and extend connection reference validation to cover all connection types, not just main - Fix filterOperationsByFixes ID-vs-name mismatch: typeversion-upgrade operations now include nodeName alongside nodeId, and the filter checks both fields Conceived by Romuald Członkowski - https://www.aiadvisors.pl/en Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
committed by
GitHub
parent
65ab94deb2
commit
f7a1cfe8bf
14
dist/services/node-sanitizer.js
vendored
14
dist/services/node-sanitizer.js
vendored
@@ -17,7 +17,7 @@ function sanitizeWorkflowNodes(workflow) {
|
||||
}
|
||||
return {
|
||||
...workflow,
|
||||
nodes: workflow.nodes.map((node) => sanitizeNode(node))
|
||||
nodes: workflow.nodes.map(sanitizeNode)
|
||||
};
|
||||
}
|
||||
function isFilterBasedNode(nodeType, typeVersion) {
|
||||
@@ -66,7 +66,7 @@ function sanitizeFilterConditions(conditions) {
|
||||
...sanitized.options
|
||||
};
|
||||
if (sanitized.conditions && Array.isArray(sanitized.conditions)) {
|
||||
sanitized.conditions = sanitized.conditions.map((condition) => sanitizeCondition(condition));
|
||||
sanitized.conditions = sanitized.conditions.map(sanitizeCondition);
|
||||
}
|
||||
return sanitized;
|
||||
}
|
||||
@@ -124,6 +124,10 @@ function inferDataType(operation) {
|
||||
if (dateOps.some(op => operation.includes(op))) {
|
||||
return 'dateTime';
|
||||
}
|
||||
const objectOps = ['empty', 'notEmpty', 'exists', 'notExists'];
|
||||
if (objectOps.includes(operation)) {
|
||||
return 'object';
|
||||
}
|
||||
return 'string';
|
||||
}
|
||||
function isUnaryOperator(operation) {
|
||||
@@ -132,7 +136,11 @@ function isUnaryOperator(operation) {
|
||||
'isNotEmpty',
|
||||
'true',
|
||||
'false',
|
||||
'isNumeric'
|
||||
'isNumeric',
|
||||
'empty',
|
||||
'notEmpty',
|
||||
'exists',
|
||||
'notExists'
|
||||
];
|
||||
return unaryOps.includes(operation);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user