@path58/p58-n8n 0.2.6 → 0.2.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -5,6 +5,13 @@ All notable changes to this project will be documented in this file.
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
6
6
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
7
 
8
+ ## [0.2.7] - 2026-03-11
9
+
10
+ ### Fixed
11
+
12
+ - **LangChain connection type pattern fallback** — `ConnectionTypeResolver` now includes a static prefix-based resolver that correctly identifies LangChain AI sub-node types (`ai_languageModel`, `ai_tool`, `ai_memory`, etc.) even when the database is unreachable (e.g., Supabase circuit breaker open). Previously, any DB connectivity failure caused all connections to silently default to `"main"`, breaking LangChain workflows.
13
+ - Error message for DB load failures now surfaces the actual error string for easier diagnostics
14
+
8
15
  ## [0.2.6] - 2026-03-11
9
16
 
10
17
  ### Added
@@ -150,6 +157,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
150
157
  - npm package published as `@path58/p58-n8n`
151
158
  - ESM module support with shebang for direct `npx` execution
152
159
 
160
+ [0.2.7]: https://github.com/tsvika58/p58-n8n/releases/tag/v0.2.7
153
161
  [0.2.6]: https://github.com/tsvika58/p58-n8n/releases/tag/v0.2.6
154
162
  [0.2.5]: https://github.com/tsvika58/p58-n8n/releases/tag/v0.2.5
155
163
  [0.2.4]: https://github.com/tsvika58/p58-n8n/releases/tag/v0.2.4
@@ -18473,7 +18473,7 @@ var import_types22 = require("@modelcontextprotocol/sdk/types.js");
18473
18473
  var config = {
18474
18474
  // Server identity
18475
18475
  SERVER_NAME: "p58-n8n",
18476
- SERVER_VERSION: "0.2.6",
18476
+ SERVER_VERSION: "0.2.7",
18477
18477
  // Database configuration (from environment)
18478
18478
  SUPABASE_URL: process.env.SUPABASE_URL,
18479
18479
  SUPABASE_KEY: process.env.SUPABASE_KEY,
@@ -41711,6 +41711,27 @@ var AI_TYPE_TO_CONNECTION_TYPE = {
41711
41711
  reranker: "ai_reranker"
41712
41712
  };
41713
41713
  var DEFAULT_CONNECTION_TYPE = "main";
41714
+ var LANGCHAIN_PREFIX_TO_CONNECTION = [
41715
+ ["@n8n/n8n-nodes-langchain.lmchat", "ai_languageModel"],
41716
+ ["@n8n/n8n-nodes-langchain.lm", "ai_languageModel"],
41717
+ ["@n8n/n8n-nodes-langchain.memory", "ai_memory"],
41718
+ ["@n8n/n8n-nodes-langchain.tool", "ai_tool"],
41719
+ ["@n8n/n8n-nodes-langchain.embeddings", "ai_embedding"],
41720
+ ["@n8n/n8n-nodes-langchain.outputparser", "ai_outputParser"],
41721
+ ["@n8n/n8n-nodes-langchain.retriever", "ai_retriever"],
41722
+ ["@n8n/n8n-nodes-langchain.document", "ai_document"],
41723
+ ["@n8n/n8n-nodes-langchain.textsplitter", "ai_textSplitter"],
41724
+ ["@n8n/n8n-nodes-langchain.vectorstore", "ai_vectorStore"],
41725
+ ["@n8n/n8n-nodes-langchain.reranker", "ai_reranker"]
41726
+ ];
41727
+ function resolveByPattern(nodeType) {
41728
+ const lower = nodeType.toLowerCase();
41729
+ for (const [prefix, connType] of LANGCHAIN_PREFIX_TO_CONNECTION) {
41730
+ if (lower.startsWith(prefix))
41731
+ return connType;
41732
+ }
41733
+ return void 0;
41734
+ }
41714
41735
  async function loadConnectionRules2() {
41715
41736
  const { rows } = await (0, import_retry7.retryDbQuery)(() => validatorQuery(`SELECT LOWER(source_node_type) AS source_node_type,
41716
41737
  LOWER(target_node_type) AS target_node_type,
@@ -41770,7 +41791,8 @@ var ConnectionTypeResolver = class _ConnectionTypeResolver {
41770
41791
  });
41771
41792
  return new _ConnectionTypeResolver(buildRuleMap(ruleRows), buildAITypeMap(aiNodeRows));
41772
41793
  } catch (err) {
41773
- import_logging53.logger.warn('connectionTypeResolver: DB load failed, defaulting all connections to "main"', { error: err });
41794
+ const msg = err instanceof Error ? err.message : String(err);
41795
+ import_logging53.logger.warn("connectionTypeResolver: DB load failed \u2014 pattern fallback active for LangChain nodes", { error: msg });
41774
41796
  return new _ConnectionTypeResolver(/* @__PURE__ */ new Map(), /* @__PURE__ */ new Map());
41775
41797
  }
41776
41798
  }
@@ -41794,6 +41816,9 @@ var ConnectionTypeResolver = class _ConnectionTypeResolver {
41794
41816
  const aiType = this.aiTypeMap.get(sourceNodeType);
41795
41817
  if (aiType)
41796
41818
  return aiType;
41819
+ const patternType = resolveByPattern(sourceNodeType);
41820
+ if (patternType)
41821
+ return patternType;
41797
41822
  }
41798
41823
  return DEFAULT_CONNECTION_TYPE;
41799
41824
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@path58/p58-n8n",
3
- "version": "0.2.6",
3
+ "version": "0.2.7",
4
4
  "description": "The smartest and fastest n8n MCP server — validate, fix, and discover workflows inside your LLM",
5
5
  "keywords": [
6
6
  "mcp",