Skip to content

Commit f1e6e5b

Browse files
czlonkowskiclaude
andauthored
chore: update n8n to 2.31.3 (czlonkowski#952)
* chore: update n8n to 2.31.3 and bump version to 2.66.1 - Updated n8n-nodes-base from 2.30.3 to 2.31.3 - Updated n8n-core from 2.30.2 to 2.31.3 - Updated n8n-workflow from 2.30.1 to 2.31.3 - Updated @n8n/n8n-nodes-langchain from 2.30.3 to 2.31.3 - Added the agentSelector property type introduced in n8n 2.31 - Fixed AI tool detection for versioned nodes, restoring 26 tool variants (slackTool, postgresTool, googleSheetsTool and others) - Removed the name-based tool-capability guess that invented 26 node types n8n does not have (waitTool, lmChatAnthropicTool and others) - Rebuilt node database with 827 core nodes (698 from n8n-nodes-base, 129 from @n8n/n8n-nodes-langchain) - Refreshed community nodes (1,295 verified + 160 npm, 1,455 total) - Generated AI summaries for 107 new community nodes - Updated README badge with new n8n version and node counts - Updated CHANGELOG with dependency changes Conceived by Romuald Członkowski - https://www.aiadvisors.pl/en 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> * fix: detect the object form of usableAsTool and wire up agentSelector Follow-up review found the AI tool detection fix still dropped the most used tool node in the corpus. - n8n types the flag `usableAsTool?: true | UsableAsToolDescription`, and HTTP Request uses the object form on every version from 3 onwards, so comparing against `true` by identity rejected it. nodes-base.httpRequestTool was absent from the database despite appearing in 139 of 2,352 templates, and wiring plain httpRequest into an ai_tool connection produced an error with no suggested fix. Any value other than false/absent now counts. - Tool capability is read from nodeVersions[currentVersion], which is what n8n resolves before consulting the flag. No node in 2.31.3 diverges, so the database is unchanged, but accepting any version would have invented a variant for a node that dropped tool support in a later version. - agentSelector is wired into ConfigValidator, EnhancedConfigValidator and the expectedFormat hint, so it validates as its own documentation claims. The __rl marker is dropped from its examples: n8n's guard requires only mode and value. - The Docker builder pinned n8n-workflow@^2.4.2, which resolves through the lagging latest dist-tag and compiled src against 2.16.x types. The pin is exact now and update-n8n-deps.js keeps it in step with package.json. - property-extractor reuses the existing instantiateNode helper rather than open-coding the same try/instantiate block four times. Database: 828 core nodes, 267 tool variants. Audited against the packages — no fabricated types, no variant shadowing a real node, no usableAsTool node without its variant. Conceived by Romuald Członkowski - https://www.aiadvisors.pl/en 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> * fix: realign Docker builder pins with package.json The builder stage installs a hand-maintained dependency list rather than the repo's own, and four pins had drifted. Two broke the build: - zod@3.24.1 failed npm install outright with ERESOLVE, because n8n-workflow@2.31.3 declares an exact zod: 3.25.67 peer dependency. Reproduced locally: `npm install n8n-workflow@2.31.3 zod@3.24.1`. - n8n-workflow@^2.4.2 resolved through the lagging latest dist-tag to 2.16.x and compiled src against older type definitions. @modelcontextprotocol/sdk, axios and uuid had drifted without failing yet. All four now match package.json, and update-n8n-deps.js re-syncs every pin naming a direct dependency instead of only n8n-workflow, so the list cannot silently fall behind again. Package names the repo does not depend on directly are left alone. Verified the exact builder install resolves clean (266 packages, no ERESOLVE) and that the sync is idempotent against the current Dockerfile. Conceived by Romuald Członkowski - https://www.aiadvisors.pl/en 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> * fix: resolve tool version via defaultVersion and scope agentSelector mode guidance Addresses the second round of review comments on czlonkowski#952. - Version selection fell back to the highest key in nodeVersions when a node had no currentVersion. n8n computes it as `defaultVersion ?? latest`, and a node can ship a later version while still defaulting to an earlier one, so the declared defaultVersion is now consulted first and the highest key is used only when no default exists. - detectAIToolCapability constructed the node, then let getNodeDescription construct it a second time. The instance is reused. - The enhanced validator's mode guidance suggested "url" and "name" for agentSelector, which the Message an Agent picker does not offer. The suggestion is scoped per type. The accepted set is deliberately unchanged: n8n declares no modes array for agentSelector, so narrowing what validates would reject configurations n8n accepts. The database is unchanged by all of this — rebuilt and diffed across all 2,283 rows including the tool flags: nothing added, removed or changed. Conceived by Romuald Członkowski - https://www.aiadvisors.pl/en 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
1 parent 84f1145 commit f1e6e5b

18 files changed

Lines changed: 1268 additions & 2518 deletions

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,9 @@ n8n-mcp-wrapper.sh
141141
# MCP configuration files (all variants: .mcp.json, .mcp.json.bk, .mcp.json.bak, etc.)
142142
.mcp.json*
143143

144+
# Local Codex MCP configuration can contain credentials
145+
.codex/config.toml
146+
144147
# UI Apps build output
145148
ui-apps/dist/
146149
ui-apps/node_modules/

CHANGELOG.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,26 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77

88
## [Unreleased]
99

10+
## [2.66.1] - 2026-07-26
11+
12+
### Changed
13+
14+
- **Updated n8n to 2.31.x.** Bumped `n8n-nodes-base` 2.30.3 → 2.31.3, `n8n-core` 2.30.2 → 2.31.3, `n8n-workflow` 2.30.1 → 2.31.3, and `@n8n/n8n-nodes-langchain` 2.30.3 → 2.31.3. Rebuilt the node database (828 core nodes: 699 from `n8n-nodes-base` + 129 from `@n8n/n8n-nodes-langchain`).
15+
- **Refreshed community nodes.** Registry sync added 107 community nodes (1,348 → 1,455 total; 1,295 verified + 160 unverified). README metadata and AI summaries now cover 1,444/1,455 community nodes; the remaining 11 packages have no retrievable npm README to summarize.
16+
- Updated README n8n version badge and node counts (2,283 total nodes: 828 core + 1,455 community).
17+
- **The Docker builder no longer installs a stale dependency set.** Its builder stage installs a hand-maintained list rather than the repo's own dependencies, and four of those pins had drifted from `package.json`. Two mattered: `n8n-workflow@^2.4.2` resolved through the package's `latest` dist-tag — which lags the release n8n ships (2.16.1 against the 2.31.3 in `package.json`) — so the image compiled `src/` against older type definitions and failed on `agentSelector`; and `zod@3.24.1` broke `npm install` outright, because `n8n-workflow@2.31.3` declares an exact `zod: 3.25.67` peer dependency. All four are realigned (`zod`, `@modelcontextprotocol/sdk`, `axios`, `uuid`), and `scripts/update-n8n-deps.js` now re-syncs every pin naming a direct dependency instead of leaving the list to drift until a build breaks.
18+
19+
### Added
20+
21+
- **`agentSelector` property type.** n8n 2.31 introduced it for the Message an n8n Agent node (typeVersion 2), where it replaces the resource locator that picks the target agent. n8n validates it through the same path as `resourceLocator`, so it is wired into the same three places: `ConfigValidator`, the structure check in `EnhancedConfigValidator`, and the `expectedFormat` hint `get_node` returns. Its declared shape is `mode` plus `value` — the `__rl: true` marker n8n's editor writes is not required, matching n8n's own `isINodeParameterResourceLocator` guard.
22+
23+
### Fixed
24+
25+
- **HTTP Request was not recognised as an AI tool, so `httpRequestTool` was missing entirely.** n8n's flag is typed `usableAsTool?: true | UsableAsToolDescription`, and HTTP Request uses the object form on every version from 3 onwards to carry its codex replacements. Detection compared against `true` by identity and therefore rejected it. `nodes-base.httpRequestTool` is the most used tool node in the template corpus — 139 of 2,352 templates, against 6 for `slackTool` — and it was absent from the database, so `search_nodes` and `get_node` could not find it and `get_node` reported `hasUsableAsToolProperty: false` for HTTP Request. Worse, because HTTP Request was not marked as having a tool variant, wiring the plain `nodes-base.httpRequest` node into an `ai_tool` connection produced a bare `INVALID_AI_TOOL_SOURCE` with no suggested fix, while every correctly detected node returned a `WRONG_NODE_TYPE_FOR_AI_TOOL` error carrying a `tool-variant-correction` autofix. Any value other than `false`/absent now counts, matching n8n.
26+
- **Tool capability is read from the node's current version, as n8n reads it.** Detection accepted the flag from any entry in `nodeVersions`, but n8n resolves `nodeVersions[currentVersion]` before consulting `usableAsTool`. No node in 2.31.3 diverges, so the database is unchanged by this, but the looser rule would have invented a tool variant for any node that dropped tool support while keeping an older version — the same class of defect as the name-based guess removed below.
27+
- **AI tool detection missed versioned nodes, so 26 tool variants were absent from the database.** `usableAsTool` is read from a node's description, but `VersionedNodeType` assigns its version map in the constructor — reading `nodeVersions` off the class finds nothing, and a node that declares `usableAsTool` per version rather than on its base description was therefore never recognised. Commonly used tool variants — `slackTool`, `postgresTool`, `googleSheetsTool`, `googleDriveTool`, `notionTool`, `microsoftTeamsTool`, `mySqlTool`, `awsS3Tool` and 18 more — could not be found via `search_nodes`/`get_node`, and `validate_workflow` rejected workflows that used them as unknown node types. Detection now instantiates the node to read its versions. The same gap would have dropped `messageAnAgentTool` and `microsoftSharePointTool` in this release, as both became versioned nodes in n8n 2.31.
28+
- **Node types that n8n does not have are no longer invented.** Tool-variant generation fell back to a name check — a node whose name contained `ai`, `openai`, `anthropic`, `cohere` or `huggingface` was treated as tool-capable regardless of `usableAsTool`. That produced 26 node types n8n rejects, including `nodes-base.waitTool` (from "w-ai-t"), `nodes-base.openAiTool`, `nodes-langchain.lmChatAnthropicTool` and `nodes-langchain.embeddingsOpenAiTool`. An agent could wire one into a workflow, have it validate cleanly, and only find out at deploy time. `usableAsTool` is now the sole signal, matching n8n's own `node-helpers`.
29+
1030
## [2.66.0] - 2026-07-25
1131

1232
### Fixed

Dockerfile

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,18 @@ COPY tsconfig*.json ./
1010

1111
# Create minimal package.json and install ONLY build dependencies
1212
# Note: openai and zod are needed for TypeScript compilation of template metadata modules
13+
#
14+
# These versions must match package.json. scripts/update-n8n-deps.js re-syncs them
15+
# on every n8n update. Two ways this list bites when it drifts: a stale n8n-workflow
16+
# compiles src against older type definitions (a range would resolve through the
17+
# `latest` dist-tag, which lags the release n8n ships), and a stale zod fails
18+
# `npm install` outright, because n8n-workflow declares an exact zod peer dependency.
1319
RUN --mount=type=cache,target=/root/.npm \
1420
echo '{}' > package.json && \
1521
npm install --no-save typescript@^5.8.3 @types/node@^22.15.30 @types/express@^5.0.3 \
16-
@modelcontextprotocol/sdk@1.20.1 dotenv@^16.5.0 express@^5.1.0 axios@^1.10.0 \
17-
n8n-workflow@^2.4.2 uuid@^11.0.5 @types/uuid@^10.0.0 \
18-
openai@^4.77.0 zod@3.24.1 lru-cache@^11.2.1 @supabase/supabase-js@^2.57.4
22+
@modelcontextprotocol/sdk@1.28.0 dotenv@^16.5.0 express@^5.1.0 axios@^1.18.1 \
23+
n8n-workflow@2.31.3 uuid@^11.1.1 @types/uuid@^10.0.0 \
24+
openai@^4.77.0 zod@3.25.67 lru-cache@^11.2.1 @supabase/supabase-js@^2.57.4
1925

2026
# Copy source and build
2127
COPY src ./src

0 commit comments

Comments
 (0)