mirror of
https://github.com/czlonkowski/n8n-mcp.git
synced 2026-03-17 16:03:08 +00:00
fix: numeric sourceOutput remapping, IMAP trigger detection, AI tool description validation (#537, #538, #477, #602) (#636)
- Remap numeric sourceOutput ("0","1") to "main" with sourceIndex,
with guard to skip when branch/case smart params are present (#537)
- Recognize emailReadImap as activatable trigger in isTriggerNode() (#538)
- Add getToolDescription() helper checking toolDescription, description,
and options.description across all AI tool validators (#477)
- Defensive check for missing workflow ID in create response (#602)
- Relax flaky CI thresholds: perf test ratio 15→20, timing variance 10%→50%
Conceived by Romuald Członkowski - 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
9590f751d2
commit
599bc664d0
@@ -747,6 +747,14 @@ export class WorkflowDiffEngine {
|
||||
let sourceOutput = String(operation.sourceOutput ?? 'main');
|
||||
let sourceIndex = operation.sourceIndex ?? 0;
|
||||
|
||||
// Remap numeric sourceOutput (e.g., "0", "1") to "main" with sourceIndex (#537)
|
||||
// Skip when smart parameters (branch, case) are present — they take precedence
|
||||
if (/^\d+$/.test(sourceOutput) && operation.sourceIndex === undefined
|
||||
&& operation.branch === undefined && operation.case === undefined) {
|
||||
sourceIndex = parseInt(sourceOutput, 10);
|
||||
sourceOutput = 'main';
|
||||
}
|
||||
|
||||
// Smart parameter: branch (for IF nodes)
|
||||
// IF nodes use 'main' output with index 0 (true) or 1 (false)
|
||||
if (operation.branch !== undefined && operation.sourceIndex === undefined) {
|
||||
|
||||
Reference in New Issue
Block a user