chore: add pre-built dist folder for npx usage

This commit is contained in:
thesved
2025-12-04 20:22:02 +02:00
committed by Romuald Członkowski
parent a70d96a373
commit 5057481e70
716 changed files with 48021 additions and 0 deletions

View File

@@ -0,0 +1,3 @@
export { validateNodeDoc } from './validate-node';
export { validateWorkflowDoc } from './validate-workflow';
//# sourceMappingURL=index.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/mcp/tool-docs/validation/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAClD,OAAO,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAC"}

View File

@@ -0,0 +1,8 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.validateWorkflowDoc = exports.validateNodeDoc = void 0;
var validate_node_1 = require("./validate-node");
Object.defineProperty(exports, "validateNodeDoc", { enumerable: true, get: function () { return validate_node_1.validateNodeDoc; } });
var validate_workflow_1 = require("./validate-workflow");
Object.defineProperty(exports, "validateWorkflowDoc", { enumerable: true, get: function () { return validate_workflow_1.validateWorkflowDoc; } });
//# sourceMappingURL=index.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/mcp/tool-docs/validation/index.ts"],"names":[],"mappings":";;;AAAA,iDAAkD;AAAzC,gHAAA,eAAe,OAAA;AACxB,yDAA0D;AAAjD,wHAAA,mBAAmB,OAAA"}

View File

@@ -0,0 +1,3 @@
import { ToolDocumentation } from '../types';
export declare const validateNodeDoc: ToolDocumentation;
//# sourceMappingURL=validate-node.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"validate-node.d.ts","sourceRoot":"","sources":["../../../../src/mcp/tool-docs/validation/validate-node.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAC;AAE7C,eAAO,MAAM,eAAe,EAAE,iBA6E7B,CAAC"}

View File

@@ -0,0 +1,82 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.validateNodeDoc = void 0;
exports.validateNodeDoc = {
name: 'validate_node',
category: 'validation',
essentials: {
description: 'Validate n8n node configuration. Use mode="full" for comprehensive validation with errors/warnings/suggestions, mode="minimal" for quick required fields check.',
keyParameters: ['nodeType', 'config', 'mode', 'profile'],
example: 'validate_node({nodeType: "nodes-base.slack", config: {resource: "channel", operation: "create"}})',
performance: 'Fast (<100ms)',
tips: [
'Always call get_node({detail:"standard"}) first to see required fields',
'Use mode="minimal" for quick checks during development',
'Use mode="full" with profile="strict" before production deployment',
'Includes automatic structure validation for filter, resourceMapper, etc.'
]
},
full: {
description: `**Validation Modes:**
- full (default): Comprehensive validation with errors, warnings, suggestions, and automatic structure validation
- minimal: Quick check for required fields only - fast but less thorough
**Validation Profiles (for mode="full"):**
- minimal: Very lenient, basic checks only
- runtime: Standard validation (default)
- ai-friendly: Balanced for AI agent workflows
- strict: Most thorough, recommended for production
**Automatic Structure Validation:**
Validates complex n8n types automatically:
- filter (FilterValue): 40+ operations (equals, contains, regex, etc.)
- resourceMapper (ResourceMapperValue): Data mapping configuration
- assignmentCollection (AssignmentCollectionValue): Variable assignments
- resourceLocator (INodeParameterResourceLocator): Resource selection modes`,
parameters: {
nodeType: { type: 'string', required: true, description: 'Node type with prefix: "nodes-base.slack"' },
config: { type: 'object', required: true, description: 'Configuration object to validate. Use {} for empty config' },
mode: { type: 'string', required: false, description: 'Validation mode: "full" (default) or "minimal"' },
profile: { type: 'string', required: false, description: 'Validation profile for mode=full: "minimal", "runtime" (default), "ai-friendly", "strict"' }
},
returns: `Object containing:
- nodeType: The validated node type
- workflowNodeType: Type to use in workflow JSON
- displayName: Human-readable node name
- valid: Boolean indicating if configuration is valid
- errors: Array of error objects with type, property, message, fix
- warnings: Array of warning objects with suggestions
- suggestions: Array of improvement suggestions
- missingRequiredFields: (mode=minimal only) Array of missing required field names
- summary: Object with hasErrors, errorCount, warningCount, suggestionCount`,
examples: [
'// Full validation with default profile\nvalidate_node({nodeType: "nodes-base.slack", config: {resource: "channel", operation: "create"}})',
'// Quick required fields check\nvalidate_node({nodeType: "nodes-base.webhook", config: {}, mode: "minimal"})',
'// Strict validation for production\nvalidate_node({nodeType: "nodes-base.httpRequest", config: {...}, mode: "full", profile: "strict"})',
'// Validate IF node with filter\nvalidate_node({nodeType: "nodes-base.if", config: {conditions: {combinator: "and", conditions: [...]}}})'
],
useCases: [
'Validate node configuration before adding to workflow',
'Quick check for required fields during development',
'Pre-production validation with strict profile',
'Validate complex structures (filters, resource mappers)',
'Get suggestions for improving node configuration'
],
performance: 'Fast validation: <50ms for minimal mode, <100ms for full mode. Structure validation adds minimal overhead.',
bestPractices: [
'Always call get_node() first to understand required fields',
'Use mode="minimal" for rapid iteration during development',
'Use profile="strict" before deploying to production',
'Pay attention to warnings - they often prevent runtime issues',
'Validate after any configuration changes'
],
pitfalls: [
'Empty config {} is valid for some nodes (e.g., manual trigger)',
'mode="minimal" only checks required fields, not value validity',
'Some warnings may be acceptable for specific use cases',
'Credential validation requires runtime context'
],
relatedTools: ['get_node', 'validate_workflow', 'n8n_autofix_workflow']
}
};
//# sourceMappingURL=validate-node.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"validate-node.js","sourceRoot":"","sources":["../../../../src/mcp/tool-docs/validation/validate-node.ts"],"names":[],"mappings":";;;AAEa,QAAA,eAAe,GAAsB;IAChD,IAAI,EAAE,eAAe;IACrB,QAAQ,EAAE,YAAY;IACtB,UAAU,EAAE;QACV,WAAW,EAAE,iKAAiK;QAC9K,aAAa,EAAE,CAAC,UAAU,EAAE,QAAQ,EAAE,MAAM,EAAE,SAAS,CAAC;QACxD,OAAO,EAAE,mGAAmG;QAC5G,WAAW,EAAE,eAAe;QAC5B,IAAI,EAAE;YACJ,wEAAwE;YACxE,wDAAwD;YACxD,oEAAoE;YACpE,0EAA0E;SAC3E;KACF;IACD,IAAI,EAAE;QACJ,WAAW,EAAE;;;;;;;;;;;;;;;4EAe2D;QACxE,UAAU,EAAE;YACV,QAAQ,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,QAAQ,EAAE,IAAI,EAAE,WAAW,EAAE,2CAA2C,EAAE;YACtG,MAAM,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,QAAQ,EAAE,IAAI,EAAE,WAAW,EAAE,2DAA2D,EAAE;YACpH,IAAI,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,QAAQ,EAAE,KAAK,EAAE,WAAW,EAAE,gDAAgD,EAAE;YACxG,OAAO,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,QAAQ,EAAE,KAAK,EAAE,WAAW,EAAE,2FAA2F,EAAE;SACvJ;QACD,OAAO,EAAE;;;;;;;;;4EAS+D;QACxE,QAAQ,EAAE;YACR,4IAA4I;YAC5I,8GAA8G;YAC9G,0IAA0I;YAC1I,2IAA2I;SAC5I;QACD,QAAQ,EAAE;YACR,uDAAuD;YACvD,oDAAoD;YACpD,+CAA+C;YAC/C,yDAAyD;YACzD,kDAAkD;SACnD;QACD,WAAW,EAAE,4GAA4G;QACzH,aAAa,EAAE;YACb,4DAA4D;YAC5D,2DAA2D;YAC3D,qDAAqD;YACrD,+DAA+D;YAC/D,0CAA0C;SAC3C;QACD,QAAQ,EAAE;YACR,gEAAgE;YAChE,gEAAgE;YAChE,wDAAwD;YACxD,gDAAgD;SACjD;QACD,YAAY,EAAE,CAAC,UAAU,EAAE,mBAAmB,EAAE,sBAAsB,CAAC;KACxE;CACF,CAAC"}

View File

@@ -0,0 +1,3 @@
import { ToolDocumentation } from '../types';
export declare const validateWorkflowDoc: ToolDocumentation;
//# sourceMappingURL=validate-workflow.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"validate-workflow.d.ts","sourceRoot":"","sources":["../../../../src/mcp/tool-docs/validation/validate-workflow.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAC;AAE7C,eAAO,MAAM,mBAAmB,EAAE,iBAiFjC,CAAC"}

View File

@@ -0,0 +1,86 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.validateWorkflowDoc = void 0;
exports.validateWorkflowDoc = {
name: 'validate_workflow',
category: 'validation',
essentials: {
description: 'Full workflow validation: structure, connections, expressions, AI tools. Returns errors/warnings/fixes. Essential before deploy.',
keyParameters: ['workflow', 'options'],
example: 'validate_workflow({workflow: {nodes: [...], connections: {...}}})',
performance: 'Moderate (100-500ms)',
tips: [
'Always validate before n8n_create_workflow to catch errors early',
'Use options.profile="minimal" for quick checks during development',
'AI tool connections are automatically validated for proper node references',
'Detects operator structure issues (binary vs unary, singleValue requirements)'
]
},
full: {
description: 'Performs comprehensive validation of n8n workflows including structure, node configurations, connections, and expressions. This is a three-layer validation system that catches errors before deployment, validates complex multi-node workflows, checks all n8n expressions for syntax errors, and ensures proper node connections and data flow.',
parameters: {
workflow: {
type: 'object',
required: true,
description: 'The complete workflow JSON to validate. Must include nodes array and connections object.'
},
options: {
type: 'object',
required: false,
description: 'Validation options object'
},
'options.validateNodes': {
type: 'boolean',
required: false,
description: 'Validate individual node configurations. Default: true'
},
'options.validateConnections': {
type: 'boolean',
required: false,
description: 'Validate node connections and flow. Default: true'
},
'options.validateExpressions': {
type: 'boolean',
required: false,
description: 'Validate n8n expressions syntax and references. Default: true'
},
'options.profile': {
type: 'string',
required: false,
description: 'Validation profile for node validation: minimal, runtime (default), ai-friendly, strict'
}
},
returns: 'Object with valid (boolean), errors (array), warnings (array), statistics (object), and suggestions (array)',
examples: [
'validate_workflow({workflow: myWorkflow}) - Full validation with default settings',
'validate_workflow({workflow: myWorkflow, options: {profile: "minimal"}}) - Quick validation for editing',
'validate_workflow({workflow: myWorkflow, options: {validateExpressions: false}}) - Skip expression validation'
],
useCases: [
'Pre-deployment validation to catch all workflow issues',
'Quick validation during workflow development',
'Validate workflows with AI Agent nodes and tool connections',
'Check expression syntax before workflow execution',
'Ensure workflow structure integrity after modifications'
],
performance: 'Moderate (100-500ms). Depends on workflow size and validation options. Expression validation adds ~50-100ms.',
bestPractices: [
'Always validate workflows before creating or updating in n8n',
'Use minimal profile during development, strict profile before production',
'Pay attention to warnings - they often indicate potential runtime issues',
'Validate after any workflow modifications, especially connection changes',
'Check statistics to understand workflow complexity',
'**Auto-sanitization runs during create/update**: Operator structures and missing metadata are automatically fixed when workflows are created or updated, but validation helps catch issues before they reach n8n',
'If validation detects operator issues, they will be auto-fixed during n8n_create_workflow or n8n_update_partial_workflow'
],
pitfalls: [
'Large workflows (100+ nodes) may take longer to validate',
'Expression validation requires proper node references to exist',
'Some warnings may be acceptable depending on use case',
'Validation cannot catch all runtime errors (e.g., API failures)',
'Profile setting only affects node validation, not connection/expression checks'
],
relatedTools: ['validate_node', 'n8n_create_workflow', 'n8n_update_partial_workflow', 'n8n_autofix_workflow']
}
};
//# sourceMappingURL=validate-workflow.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"validate-workflow.js","sourceRoot":"","sources":["../../../../src/mcp/tool-docs/validation/validate-workflow.ts"],"names":[],"mappings":";;;AAEa,QAAA,mBAAmB,GAAsB;IACpD,IAAI,EAAE,mBAAmB;IACzB,QAAQ,EAAE,YAAY;IACtB,UAAU,EAAE;QACV,WAAW,EAAE,kIAAkI;QAC/I,aAAa,EAAE,CAAC,UAAU,EAAE,SAAS,CAAC;QACtC,OAAO,EAAE,mEAAmE;QAC5E,WAAW,EAAE,sBAAsB;QACnC,IAAI,EAAE;YACJ,kEAAkE;YAClE,mEAAmE;YACnE,4EAA4E;YAC5E,+EAA+E;SAChF;KACF;IACD,IAAI,EAAE;QACJ,WAAW,EAAE,oVAAoV;QACjW,UAAU,EAAE;YACV,QAAQ,EAAE;gBACR,IAAI,EAAE,QAAQ;gBACd,QAAQ,EAAE,IAAI;gBACd,WAAW,EAAE,0FAA0F;aACxG;YACD,OAAO,EAAE;gBACP,IAAI,EAAE,QAAQ;gBACd,QAAQ,EAAE,KAAK;gBACf,WAAW,EAAE,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