fix: correct version extraction and typeVersion validation for langchain nodes

This commit fixes two critical bugs affecting AI Agent and other langchain nodes:

1. Version Extraction Bug (node-parser.ts)
   - AI Agent was returning version "3" instead of "2.2" (the defaultVersion)
   - Root cause: extractVersion() checked non-existent instance.baseDescription.defaultVersion
   - Fix: Updated priority to check currentVersion first, then description.defaultVersion
   - Impact: All VersionedNodeType nodes now return correct version

2. typeVersion Validation Bypass (workflow-validator.ts)
   - Langchain nodes with invalid typeVersion passed validation (even typeVersion: 99999)
   - Root cause: langchain skip happened before typeVersion validation
   - Fix: Moved typeVersion validation before langchain parameter skip
   - Impact: Invalid typeVersion values now properly caught for all nodes

Also includes:
- Database rebuilt with corrected version data (536 nodes)
- Version bump: 2.17.3 → 2.17.4
- Comprehensive CHANGELOG entry

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
czlonkowski
2025-10-07 20:16:45 +02:00
parent 2c536a25fd
commit b986beef2c
5 changed files with 123 additions and 26 deletions

View File

@@ -1,6 +1,6 @@
{
"name": "n8n-mcp",
"version": "2.17.3",
"version": "2.17.4",
"description": "Integration between n8n workflow automation and Model Context Protocol (MCP)",
"main": "dist/index.js",
"bin": {