n8n-nodes-agnicwallet 1.0.9 → 1.0.10

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.
@@ -5,20 +5,8 @@ const n8n_workflow_1 = require("n8n-workflow");
5
5
  const index_js_1 = require("@modelcontextprotocol/sdk/client/index.js");
6
6
  const streamableHttp_js_1 = require("@modelcontextprotocol/sdk/client/streamableHttp.js");
7
7
  const tools_1 = require("@langchain/core/tools");
8
- const agents_1 = require("langchain/agents");
9
8
  const zod_1 = require("zod");
10
9
  const json_schema_to_zod_1 = require("@n8n/json-schema-to-zod");
11
- /**
12
- * Toolkit class that wraps MCP tools for n8n AI Agent
13
- * Extends Toolkit from langchain/agents for proper instanceof checks
14
- * Uses n8n's bundled langchain via peer dependency (not bundled)
15
- */
16
- class AgnicMcpToolkit extends agents_1.Toolkit {
17
- constructor(tools) {
18
- super();
19
- this.tools = tools;
20
- }
21
- }
22
10
  // Pre-configured AgnicPay MCP endpoint (uses HTTP Streamable transport)
23
11
  const AGNIC_MCP_ENDPOINT = "https://mcp.agnicpay.xyz/sse";
24
12
  /**
@@ -318,15 +306,16 @@ class AgnicMCPTool {
318
306
  return result;
319
307
  };
320
308
  // Convert MCP tools to LangChain DynamicStructuredTools
309
+ // Returns tools directly - n8n's getConnectedTools handles both
310
+ // Toolkit instances and raw tool arrays via flatMap
321
311
  const langchainTools = mcpTools.map((tool) => mcpToolToDynamicTool(tool, callTool));
322
- // Wrap tools in a Toolkit for n8n AI Agent compatibility
323
- const toolkit = new AgnicMcpToolkit(langchainTools);
324
312
  // Store references for cleanup
325
313
  const clientRef = client;
326
314
  const transportRef = transport;
327
- // Return toolkit with cleanup function
315
+ // Return tools directly (not wrapped in Toolkit)
316
+ // This avoids langchain version conflicts with other community nodes
328
317
  return {
329
- response: toolkit,
318
+ response: langchainTools,
330
319
  closeFunction: async () => {
331
320
  try {
332
321
  await clientRef.close();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "n8n-nodes-agnicwallet",
3
- "version": "1.0.9",
3
+ "version": "1.0.10",
4
4
  "description": "n8n community node for AgnicWallet - automated Web3 payments for X402 APIs",
5
5
  "keywords": [
6
6
  "n8n-community-node-package",
@@ -70,14 +70,12 @@
70
70
  "eslint": "^8.54.0",
71
71
  "eslint-plugin-n8n-nodes-base": "^1.16.1",
72
72
  "gulp": "^4.0.2",
73
- "langchain": "^0.3.33",
74
73
  "n8n-workflow": "^1.40.0",
75
74
  "prettier": "^3.1.0",
76
75
  "typescript": "^5.3.0"
77
76
  },
78
77
  "peerDependencies": {
79
78
  "@langchain/core": ">=0.2.0",
80
- "langchain": "^0.3.0",
81
79
  "n8n-workflow": "*"
82
80
  }
83
81
  }