@n8n/n8n-nodes-langchain 2.29.5 → 2.29.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.
Files changed (25) hide show
  1. package/dist/node-definitions/.nodes-hash +1 -1
  2. package/dist/node-definitions/nodes/n8n-nodes-langchain/mcpTrigger/v1.schema.js +2 -1
  3. package/dist/node-definitions/nodes/n8n-nodes-langchain/mcpTrigger/v1.ts +6 -0
  4. package/dist/node-definitions/nodes/n8n-nodes-langchain/mcpTrigger/v11.schema.js +2 -1
  5. package/dist/node-definitions/nodes/n8n-nodes-langchain/mcpTrigger/v11.ts +6 -0
  6. package/dist/node-definitions/nodes/n8n-nodes-langchain/mcpTrigger/v2.schema.js +2 -1
  7. package/dist/node-definitions/nodes/n8n-nodes-langchain/mcpTrigger/v2.ts +6 -0
  8. package/dist/nodes/llms/LMChatAnthropic/LmChatAnthropic.node.js +10 -6
  9. package/dist/nodes/llms/LMChatAnthropic/LmChatAnthropic.node.js.map +1 -1
  10. package/dist/nodes/llms/LMChatOpenAi/LmChatOpenAi.node.js +4 -1
  11. package/dist/nodes/llms/LMChatOpenAi/LmChatOpenAi.node.js.map +1 -1
  12. package/dist/nodes/llms/LMOpenAi/LmOpenAi.node.js +4 -1
  13. package/dist/nodes/llms/LMOpenAi/LmOpenAi.node.js.map +1 -1
  14. package/dist/nodes/llms/N8nNonEstimatingTracing.js +1 -1
  15. package/dist/nodes/llms/N8nNonEstimatingTracing.js.map +1 -1
  16. package/dist/nodes/mcp/McpTrigger/McpTrigger.node.js +8 -0
  17. package/dist/nodes/mcp/McpTrigger/McpTrigger.node.js.map +1 -1
  18. package/dist/nodes/mcp/McpTrigger/n8n-oauth2-auth.js +7 -4
  19. package/dist/nodes/mcp/McpTrigger/n8n-oauth2-auth.js.map +1 -1
  20. package/dist/typecheck.tsbuildinfo +1 -1
  21. package/dist/types/nodes.json +1 -1
  22. package/dist/utils/helpers.d.ts +4 -0
  23. package/dist/utils/helpers.js +10 -2
  24. package/dist/utils/helpers.js.map +1 -1
  25. package/package.json +11 -11
@@ -65,7 +65,7 @@
65
65
  {"displayName":"MCP Client","description":"Standalone MCP Client","name":"mcpClient","group":["transform"],"version":[1,1.1],"defaultVersion":1.1,"defaults":{"name":"MCP Client"},"credentials":[{"name":"httpBearerAuth","required":true,"displayOptions":{"show":{"authentication":["bearerAuth"]}}},{"name":"httpHeaderAuth","required":true,"displayOptions":{"show":{"authentication":["headerAuth"]}}},{"name":"mcpOAuth2Api","required":true,"displayOptions":{"show":{"authentication":["mcpOAuth2Api"]}}},{"name":"httpMultipleHeadersAuth","required":true,"displayOptions":{"show":{"authentication":["multipleHeadersAuth"]}}}],"inputs":["main"],"outputs":["main"],"properties":[{"displayName":"Server Transport","name":"serverTransport","type":"options","options":[{"name":"HTTP Streamable","value":"httpStreamable"},{"name":"Server Sent Events (Deprecated)","value":"sse"}],"default":"httpStreamable","description":"The transport used by your endpoint"},{"displayName":"MCP Endpoint URL","name":"endpointUrl","type":"string","default":"","placeholder":"e.g. https://my-mcp-server.ai/mcp","required":true,"description":"The URL of the MCP server to connect to"},{"displayName":"Authentication","name":"authentication","type":"options","options":[{"name":"Bearer Auth","value":"bearerAuth"},{"name":"Header Auth","value":"headerAuth"},{"name":"MCP OAuth2","value":"mcpOAuth2Api"},{"name":"Multiple Headers Auth","value":"multipleHeadersAuth"},{"name":"None","value":"none"}],"default":"none","description":"The way to authenticate with your endpoint"},{"displayName":"Credentials","name":"credentials","type":"credentials","default":"","displayOptions":{"show":{"authentication":["headerAuth","bearerAuth","mcpOAuth2Api","multipleHeadersAuth"]}}},{"displayName":"Tool","name":"tool","type":"resourceLocator","default":{"mode":"list","value":""},"required":true,"description":"The tool to use","modes":[{"displayName":"From List","name":"list","type":"list","typeOptions":{"searchListMethod":"getTools","searchable":true,"skipCredentialsCheckInRLC":true}},{"displayName":"ID","name":"id","type":"string"}]},{"displayName":"Input Mode","name":"inputMode","type":"options","default":"manual","noDataExpression":true,"options":[{"name":"Manual","value":"manual","description":"Manually specify the input data for each tool parameter"},{"name":"JSON","value":"json","description":"Specify the input data as a JSON object"}]},{"displayName":"Parameters","name":"parameters","type":"resourceMapper","default":{"mappingMode":"defineBelow","value":null},"noDataExpression":true,"required":true,"typeOptions":{"loadOptionsDependsOn":["tool.value"],"resourceMapper":{"resourceMapperMethod":"getToolParameters","hideNoDataError":true,"addAllFields":false,"supportAutoMap":false,"mode":"add","fieldWords":{"singular":"parameter","plural":"parameters"}}},"displayOptions":{"show":{"inputMode":["manual"]}}},{"displayName":"JSON","name":"jsonInput","type":"json","typeOptions":{"rows":5},"default":"{\n \"my_field_1\": \"value\",\n \"my_field_2\": 1\n}\n","validateType":"object","displayOptions":{"show":{"inputMode":["json"]}}},{"displayName":"Options","name":"options","placeholder":"Add Option","description":"Additional options to add","type":"collection","default":{},"options":[{"displayName":"Convert to Binary","name":"convertToBinary","type":"boolean","default":true,"description":"Whether to convert images and audio to binary data. If false, images and audio will be returned as base64 encoded strings."},{"displayName":"Timeout","name":"timeout","type":"number","typeOptions":{"minValue":1},"default":60000,"description":"Time in ms to wait for tool calls to finish"}]}],"iconUrl":{"light":"icons/@n8n/n8n-nodes-langchain/dist/nodes/mcp/mcp.svg","dark":"icons/@n8n/n8n-nodes-langchain/dist/nodes/mcp/mcp.dark.svg"}},
66
66
  {"displayName":"MCP Client Tool","name":"mcpClientTool","group":["output"],"version":[1,1.1,1.2,1.3,1.4],"defaultVersion":1.4,"description":"Connect tools from an MCP Server","defaults":{"name":"MCP Client"},"codex":{"categories":["AI"],"subcategories":{"AI":["Model Context Protocol"]},"alias":["Model Context Protocol","MCP Client"],"resources":{"primaryDocumentation":[{"url":"https://docs.n8n.io/integrations/builtin/cluster-nodes/sub-nodes/n8n-nodes-langchain.toolmcp/"}]}},"inputs":[],"outputs":[{"type":"ai_tool","displayName":"Tools"}],"credentials":[{"name":"httpBearerAuth","required":true,"displayOptions":{"show":{"authentication":["bearerAuth"]}}},{"name":"httpHeaderAuth","required":true,"displayOptions":{"show":{"authentication":["headerAuth"]}}},{"name":"mcpOAuth2Api","required":true,"displayOptions":{"show":{"authentication":["mcpOAuth2Api"]}}},{"name":"httpMultipleHeadersAuth","required":true,"displayOptions":{"show":{"authentication":["multipleHeadersAuth"]}}}],"properties":[{"displayName":"This node must be connected to an AI agent. <a data-action='openSelectiveNodeCreator' data-action-parameter-creatorview='AI'>Insert one</a>","name":"notice","type":"notice","default":"","typeOptions":{"containerClass":"ndv-connection-hint-notice"}},{"displayName":"SSE Endpoint","name":"sseEndpoint","type":"string","description":"SSE Endpoint of your MCP server","placeholder":"e.g. https://my-mcp-server.ai/sse","default":"","required":true,"displayOptions":{"show":{"@version":[1]}}},{"displayName":"Endpoint","name":"endpointUrl","type":"string","description":"Endpoint of your MCP server","placeholder":"e.g. https://my-mcp-server.ai/mcp","default":"","required":true,"displayOptions":{"show":{"@version":[{"_cnd":{"gte":1.1}}]}}},{"displayName":"Server Transport","name":"serverTransport","type":"options","options":[{"name":"HTTP Streamable","value":"httpStreamable"},{"name":"Server Sent Events (Deprecated)","value":"sse"}],"default":"sse","description":"The transport used by your endpoint","displayOptions":{"show":{"@version":[1.1]}}},{"displayName":"Server Transport","name":"serverTransport","type":"options","options":[{"name":"HTTP Streamable","value":"httpStreamable"},{"name":"Server Sent Events (Deprecated)","value":"sse"}],"default":"httpStreamable","description":"The transport used by your endpoint","displayOptions":{"show":{"@version":[{"_cnd":{"gte":1.2}}]}}},{"displayName":"Authentication","name":"authentication","type":"options","options":[{"name":"Bearer Auth","value":"bearerAuth"},{"name":"Header Auth","value":"headerAuth"},{"name":"None","value":"none"}],"default":"none","description":"The way to authenticate with your endpoint","displayOptions":{"show":{"@version":[{"_cnd":{"lt":1.2}}]}}},{"displayName":"Authentication","name":"authentication","type":"options","options":[{"name":"Bearer Auth","value":"bearerAuth"},{"name":"Header Auth","value":"headerAuth"},{"name":"MCP OAuth2","value":"mcpOAuth2Api"},{"name":"Multiple Headers Auth","value":"multipleHeadersAuth"},{"name":"None","value":"none"}],"default":"none","description":"The way to authenticate with your endpoint","displayOptions":{"show":{"@version":[{"_cnd":{"gte":1.2}}]}}},{"displayName":"Credentials","name":"credentials","type":"credentials","default":"","displayOptions":{"show":{"authentication":["headerAuth","bearerAuth","mcpOAuth2Api","multipleHeadersAuth"]}}},{"displayName":"Tools to Include","name":"include","type":"options","description":"How to select the tools you want to be exposed to the AI Agent","default":"all","options":[{"name":"All","value":"all","description":"Also include all unchanged fields from the input"},{"name":"Selected","value":"selected","description":"Also include the tools listed in the parameter \"Tools to Include\""},{"name":"All Except","value":"except","description":"Exclude the tools listed in the parameter \"Tools to Exclude\""}]},{"displayName":"Tools to Include","name":"includeTools","type":"multiOptions","default":[],"description":"Choose from the list, or specify IDs using an <a href=\"https://docs.n8n.io/code/expressions/\">expression</a>","typeOptions":{"loadOptionsMethod":"getTools","loadOptionsDependsOn":["sseEndpoint","endpointUrl"]},"displayOptions":{"show":{"include":["selected"]}}},{"displayName":"Tools to Exclude","name":"excludeTools","type":"multiOptions","default":[],"description":"Choose from the list, or specify IDs using an <a href=\"https://docs.n8n.io/code/expressions/\">expression</a>","typeOptions":{"loadOptionsMethod":"getTools"},"displayOptions":{"show":{"include":["except"]}}},{"displayName":"Options","name":"options","placeholder":"Add Option","description":"Additional options to add","type":"collection","default":{},"options":[{"displayName":"Timeout","name":"timeout","type":"number","typeOptions":{"minValue":1},"default":60000,"description":"Time in ms to wait for tool calls to finish"}]}],"iconUrl":{"light":"icons/@n8n/n8n-nodes-langchain/dist/nodes/mcp/mcp.svg","dark":"icons/@n8n/n8n-nodes-langchain/dist/nodes/mcp/mcp.dark.svg"}},
67
67
  {"displayName":"MCP Registry Client (internal)","name":"mcpRegistryClientTool","hidden":true,"group":["output"],"version":[1,1.1],"defaultVersion":1.1,"description":"Runtime backing for MCP registry-derived nodes","defaults":{"name":"MCP Registry Client"},"codex":{"categories":["AI"],"subcategories":{"AI":["Model Context Protocol"]},"alias":["MCP","Model Context Protocol"]},"inputs":[],"outputs":[{"type":"ai_tool","displayName":"Tools"}],"credentials":[{"name":"mcpOAuth2Api","required":true}],"properties":[{"displayName":"Endpoint URL","name":"endpointUrl","type":"hidden","default":""},{"displayName":"Server Transport","name":"serverTransport","type":"hidden","default":"httpStreamable"},{"displayName":"Tools to Include","name":"include","type":"options","description":"How to select the tools you want to be exposed to the AI Agent","default":"all","options":[{"name":"All","value":"all","description":"Expose every tool from the MCP server"},{"name":"Selected","value":"selected","description":"Only expose the tools listed in \"Tools to Include\""},{"name":"All Except","value":"except","description":"Expose all tools except those listed in \"Tools to Exclude\""}]},{"displayName":"Tools to Include","name":"includeTools","type":"multiOptions","default":[],"description":"Tools from the MCP server to expose to the agent. Choose from the list, or specify IDs using an <a href=\"https://docs.n8n.io/code/expressions/\">expression</a>.","typeOptions":{"loadOptionsMethod":"getTools"},"displayOptions":{"show":{"include":["selected"]}}},{"displayName":"Tools to Exclude","name":"excludeTools","type":"multiOptions","default":[],"description":"Tools from the MCP server to hide from the agent. Choose from the list, or specify IDs using an <a href=\"https://docs.n8n.io/code/expressions/\">expression</a>.","typeOptions":{"loadOptionsMethod":"getTools"},"displayOptions":{"show":{"include":["except"]}}},{"displayName":"Options","name":"options","placeholder":"Add Option","description":"Additional options to add","type":"collection","default":{},"options":[{"displayName":"Timeout","name":"timeout","type":"number","typeOptions":{"minValue":1},"default":60000,"description":"Time in ms to wait for tool calls to finish"}]}]},
68
- {"displayName":"MCP Server Trigger","name":"mcpTrigger","group":["trigger"],"version":[1,1.1,2],"description":"Expose n8n tools as an MCP Server endpoint","activationMessage":"You can now connect your MCP Clients to the URL, using SSE or Streamable HTTP transports.","defaults":{"name":"MCP Server Trigger"},"codex":{"categories":["AI","Core Nodes"],"subcategories":{"AI":["Root Nodes","Model Context Protocol"],"Core Nodes":["Other Trigger Nodes"]},"alias":["Model Context Protocol","MCP Server"],"resources":{"primaryDocumentation":[{"url":"https://docs.n8n.io/integrations/builtin/core-nodes/n8n-nodes-langchain.mcptrigger/"}]}},"triggerPanel":{"header":"Listen for MCP events","executionsHelp":{"inactive":"This trigger has two modes: test and production.<br /><br /><b>Use test mode while you build your workflow</b>. Click the 'execute step' button, then make an MCP request to the test URL. The executions will show up in the editor.<br /><br /><b>Use production mode to run your workflow automatically</b>. Publish the workflow, then make requests to the production URL. These executions will show up in the <a data-key='executions'>executions list</a>, but not the editor.","active":"This trigger has two modes: test and production.<br /><br /><b>Use test mode while you build your workflow</b>. Click the 'execute step' button, then make an MCP request to the test URL. The executions will show up in the editor.<br /><br /><b>Use production mode to run your workflow automatically</b>. Since your workflow is activated, you can make requests to the production URL. These executions will show up in the <a data-key='executions'>executions list</a>, but not the editor."},"activationHint":"Once you've finished building your workflow, run it without having to click this button by using the production URL."},"inputs":[{"type":"ai_tool","displayName":"Tools"}],"outputs":[],"credentials":[{"name":"httpBearerAuth","required":true,"displayOptions":{"show":{"authentication":["bearerAuth"]}}},{"name":"httpHeaderAuth","required":true,"displayOptions":{"show":{"authentication":["headerAuth"]}}}],"properties":[{"displayName":"Authentication","name":"authentication","type":"options","options":[{"name":"None","value":"none"},{"name":"n8n User Auth (OAuth2)","value":"n8nOAuth2","description":"Require user to give consent to use their n8n account","displayOptions":{"show":{"@version":[{"_cnd":{"gte":2}}]}}},{"name":"Bearer Auth","value":"bearerAuth"},{"name":"Header Auth","value":"headerAuth"}],"default":"none","description":"The way to authenticate","builderHint":{"propertyHint":"Default to 'none'. n8n exposes inbound trigger URLs publicly by design. Only select an authentication method when the user explicitly asks to authenticate inbound traffic."}},{"displayName":"Path","name":"path","type":"string","default":"","placeholder":"webhook","required":true,"description":"The base path for this MCP server"}],"webhooks":[{"name":"setup","httpMethod":"GET","responseMode":"onReceived","isFullPath":true,"path":"={{$parameter[\"path\"]}}{{parseFloat($nodeVersion)<2 ? '/sse' : ''}}","nodeType":"mcp","ndvHideMethod":true,"ndvHideUrl":false},{"name":"default","httpMethod":"POST","responseMode":"onReceived","isFullPath":true,"path":"={{$parameter[\"path\"]}}{{parseFloat($nodeVersion)<2 ? '/messages' : ''}}","nodeType":"mcp","ndvHideMethod":true,"ndvHideUrl":true},{"name":"default","httpMethod":"DELETE","responseMode":"onReceived","isFullPath":true,"path":"={{$parameter[\"path\"]}}","nodeType":"mcp","ndvHideMethod":true,"ndvHideUrl":true}],"iconUrl":{"light":"icons/@n8n/n8n-nodes-langchain/dist/nodes/mcp/mcp.svg","dark":"icons/@n8n/n8n-nodes-langchain/dist/nodes/mcp/mcp.dark.svg"}},
68
+ {"displayName":"MCP Server Trigger","name":"mcpTrigger","group":["trigger"],"version":[1,1.1,2],"description":"Expose n8n tools as an MCP Server endpoint","activationMessage":"You can now connect your MCP Clients to the URL, using SSE or Streamable HTTP transports.","defaults":{"name":"MCP Server Trigger"},"codex":{"categories":["AI","Core Nodes"],"subcategories":{"AI":["Root Nodes","Model Context Protocol"],"Core Nodes":["Other Trigger Nodes"]},"alias":["Model Context Protocol","MCP Server"],"resources":{"primaryDocumentation":[{"url":"https://docs.n8n.io/integrations/builtin/core-nodes/n8n-nodes-langchain.mcptrigger/"}]}},"triggerPanel":{"header":"Listen for MCP events","executionsHelp":{"inactive":"This trigger has two modes: test and production.<br /><br /><b>Use test mode while you build your workflow</b>. Click the 'execute step' button, then make an MCP request to the test URL. The executions will show up in the editor.<br /><br /><b>Use production mode to run your workflow automatically</b>. Publish the workflow, then make requests to the production URL. These executions will show up in the <a data-key='executions'>executions list</a>, but not the editor.","active":"This trigger has two modes: test and production.<br /><br /><b>Use test mode while you build your workflow</b>. Click the 'execute step' button, then make an MCP request to the test URL. The executions will show up in the editor.<br /><br /><b>Use production mode to run your workflow automatically</b>. Since your workflow is activated, you can make requests to the production URL. These executions will show up in the <a data-key='executions'>executions list</a>, but not the editor."},"activationHint":"Once you've finished building your workflow, run it without having to click this button by using the production URL."},"inputs":[{"type":"ai_tool","displayName":"Tools"}],"outputs":[],"credentials":[{"name":"httpBearerAuth","required":true,"displayOptions":{"show":{"authentication":["bearerAuth"]}}},{"name":"httpHeaderAuth","required":true,"displayOptions":{"show":{"authentication":["headerAuth"]}}}],"properties":[{"displayName":"Authentication","name":"authentication","type":"options","options":[{"name":"None","value":"none"},{"name":"n8n User Auth (OAuth2)","value":"n8nOAuth2","description":"Require user to give consent to use their n8n account","displayOptions":{"show":{"@version":[{"_cnd":{"gte":2}}]}}},{"name":"Bearer Auth","value":"bearerAuth"},{"name":"Header Auth","value":"headerAuth"}],"default":"none","description":"The way to authenticate","builderHint":{"propertyHint":"Default to 'none'. n8n exposes inbound trigger URLs publicly by design. Only select an authentication method when the user explicitly asks to authenticate inbound traffic."}},{"displayName":"Require Workflow Execute Permission","name":"requireExecuteAccess","type":"boolean","default":true,"displayOptions":{"show":{"authentication":["n8nOAuth2"]}},"description":"Whether the triggering user must also have permission to execute the workflow in the project it belongs to"},{"displayName":"Path","name":"path","type":"string","default":"","placeholder":"webhook","required":true,"description":"The base path for this MCP server"}],"webhooks":[{"name":"setup","httpMethod":"GET","responseMode":"onReceived","isFullPath":true,"path":"={{$parameter[\"path\"]}}{{parseFloat($nodeVersion)<2 ? '/sse' : ''}}","nodeType":"mcp","ndvHideMethod":true,"ndvHideUrl":false},{"name":"default","httpMethod":"POST","responseMode":"onReceived","isFullPath":true,"path":"={{$parameter[\"path\"]}}{{parseFloat($nodeVersion)<2 ? '/messages' : ''}}","nodeType":"mcp","ndvHideMethod":true,"ndvHideUrl":true},{"name":"default","httpMethod":"DELETE","responseMode":"onReceived","isFullPath":true,"path":"={{$parameter[\"path\"]}}","nodeType":"mcp","ndvHideMethod":true,"ndvHideUrl":true}],"iconUrl":{"light":"icons/@n8n/n8n-nodes-langchain/dist/nodes/mcp/mcp.svg","dark":"icons/@n8n/n8n-nodes-langchain/dist/nodes/mcp/mcp.dark.svg"}},
69
69
  {"displayName":"Simple Memory","name":"memoryBufferWindow","icon":"node:simple-memory","iconColor":"black","group":["transform"],"version":[1,1.1,1.2,1.3,1.4],"description":"Stores in n8n memory, so no credentials required","defaults":{"name":"Simple Memory"},"codex":{"categories":["AI"],"subcategories":{"AI":["Memory"],"Memory":["For beginners"]},"resources":{"primaryDocumentation":[{"url":"https://docs.n8n.io/integrations/builtin/cluster-nodes/sub-nodes/n8n-nodes-langchain.memorybufferwindow/"}]}},"builderHint":{"searchHint":"Reuse with multiple agents in the same workflow by connecting to multiple agent nodes so agents have a shared context."},"inputs":[],"outputs":["ai_memory"],"outputNames":["Memory"],"properties":[{"displayName":"This node must be connected to an AI agent. <a data-action='openSelectiveNodeCreator' data-action-parameter-creatorview='AI'>Insert one</a>","name":"notice","type":"notice","default":"","typeOptions":{"containerClass":"ndv-connection-hint-notice"}},{"displayName":"This node stores memory locally in the n8n instance. It is not compatible with Queue Mode or Multi-Main setups, as memory will not be shared across workers. For production use with scaling, consider using an external memory store such as Redis, Postgres, or another persistent memory node.","name":"scalingNotice","type":"notice","default":""},{"displayName":"Session Key","name":"sessionKey","type":"string","default":"chat_history","description":"The key to use to store the memory in the workflow data","displayOptions":{"show":{"@version":[1]}}},{"displayName":"Session ID","name":"sessionKey","type":"string","default":"={{ $json.sessionId }}","description":"The key to use to store the memory","displayOptions":{"show":{"@version":[1.1]}}},{"displayName":"Session ID","name":"sessionIdType","type":"options","options":[{"name":"Connected Chat Trigger Node","value":"fromInput","description":"Looks for an input field called 'sessionId' that is coming from a directly connected Chat Trigger"},{"name":"Define below","value":"customKey","description":"Use an expression to reference data in previous nodes or enter static text"}],"default":"fromInput","builderHint":{"propertyHint":"Use 'Connected Chat Trigger Node' (fromInput) if there is a Chat Trigger node earlier in the workflow. Otherwise use 'Define below' (customKey)."},"displayOptions":{"show":{"@version":[{"_cnd":{"gte":1.2}}]}}},{"displayName":"Session Key From Previous Node","name":"sessionKey","type":"string","default":"={{ $json.sessionId }}","disabledOptions":{"show":{"sessionIdType":["fromInput"]}},"displayOptions":{"show":{"sessionIdType":["fromInput"],"@version":[{"_cnd":{"gte":1.3}}]}}},{"displayName":"Session is automatically scoped only to this memory node. To share a session between different memory nodes, switch \"Session ID\" to \"Define below\" and use the same key in each node.","name":"scopedSessionHintNotice","type":"notice","default":"","displayOptions":{"show":{"@version":[{"_cnd":{"gte":1.4}}],"sessionIdType":["fromInput"]}}},{"displayName":"Key","name":"sessionKey","type":"string","default":"","description":"The key to use to store session ID in the memory","displayOptions":{"show":{"sessionIdType":["customKey"]}}},{"displayName":"Context Window Length","name":"contextWindowLength","type":"number","default":5,"hint":"How many past interactions the model receives as context"}]},
70
70
  {"displayName":"Motorhead","name":"memoryMotorhead","icon":"fa:file-export","iconColor":"black","hidden":true,"group":["transform"],"version":[1,1.1,1.2,1.3,1.4],"description":"Use Motorhead Memory","defaults":{"name":"Motorhead"},"codex":{"categories":["AI"],"subcategories":{"AI":["Memory"],"Memory":["Other memories"]},"resources":{"primaryDocumentation":[{"url":"https://docs.n8n.io/integrations/builtin/cluster-nodes/sub-nodes/n8n-nodes-langchain.memorymotorhead/"}]}},"inputs":[],"outputs":["ai_memory"],"outputNames":["Memory"],"credentials":[{"name":"motorheadApi","required":true}],"properties":[{"displayName":"This node must be connected to an AI agent. <a data-action='openSelectiveNodeCreator' data-action-parameter-creatorview='AI'>Insert one</a>","name":"notice","type":"notice","default":"","typeOptions":{"containerClass":"ndv-connection-hint-notice"}},{"displayName":"The Motorhead project is no longer maintained. This node is deprecated and will be removed in a future version.","name":"deprecationNotice","type":"notice","default":""},{"displayName":"Session ID","name":"sessionId","type":"string","required":true,"default":"","displayOptions":{"show":{"@version":[1]}}},{"displayName":"Session ID","name":"sessionId","type":"string","default":"={{ $json.sessionId }}","description":"The key to use to store the memory","displayOptions":{"show":{"@version":[1.1]}}},{"displayName":"Session ID","name":"sessionIdType","type":"options","options":[{"name":"Connected Chat Trigger Node","value":"fromInput","description":"Looks for an input field called 'sessionId' that is coming from a directly connected Chat Trigger"},{"name":"Define below","value":"customKey","description":"Use an expression to reference data in previous nodes or enter static text"}],"default":"fromInput","builderHint":{"propertyHint":"Use 'Connected Chat Trigger Node' (fromInput) if there is a Chat Trigger node earlier in the workflow. Otherwise use 'Define below' (customKey)."},"displayOptions":{"show":{"@version":[{"_cnd":{"gte":1.2}}]}}},{"displayName":"Session Key From Previous Node","name":"sessionKey","type":"string","default":"={{ $json.sessionId }}","disabledOptions":{"show":{"sessionIdType":["fromInput"]}},"displayOptions":{"show":{"sessionIdType":["fromInput"],"@version":[{"_cnd":{"gte":1.3}}]}}},{"displayName":"Session is automatically scoped only to this memory node. To share a session between different memory nodes, switch \"Session ID\" to \"Define below\" and use the same key in each node.","name":"scopedSessionHintNotice","type":"notice","default":"","displayOptions":{"show":{"@version":[{"_cnd":{"gte":1.4}}],"sessionIdType":["fromInput"]}}},{"displayName":"Key","name":"sessionKey","type":"string","default":"","description":"The key to use to store session ID in the memory","displayOptions":{"show":{"sessionIdType":["customKey"]}}}]},
71
71
  {"displayName":"Postgres Chat Memory","name":"memoryPostgresChat","group":["transform"],"version":[1,1.1,1.2,1.3,1.4],"description":"Stores the chat history in Postgres table.","defaults":{"name":"Postgres Chat Memory"},"credentials":[{"name":"postgres","required":true,"testedBy":"postgresConnectionTest"}],"codex":{"categories":["AI"],"subcategories":{"AI":["Memory"],"Memory":["Other memories"]},"resources":{"primaryDocumentation":[{"url":"https://docs.n8n.io/integrations/builtin/cluster-nodes/sub-nodes/n8n-nodes-langchain.memorypostgreschat/"}]}},"inputs":[],"outputs":["ai_memory"],"outputNames":["Memory"],"properties":[{"displayName":"This node must be connected to an AI agent. <a data-action='openSelectiveNodeCreator' data-action-parameter-creatorview='AI'>Insert one</a>","name":"notice","type":"notice","default":"","typeOptions":{"containerClass":"ndv-connection-hint-notice"}},{"displayName":"Session ID","name":"sessionIdType","type":"options","options":[{"name":"Connected Chat Trigger Node","value":"fromInput","description":"Looks for an input field called 'sessionId' that is coming from a directly connected Chat Trigger"},{"name":"Define below","value":"customKey","description":"Use an expression to reference data in previous nodes or enter static text"}],"default":"fromInput","builderHint":{"propertyHint":"Use 'Connected Chat Trigger Node' (fromInput) if there is a Chat Trigger node earlier in the workflow. Otherwise use 'Define below' (customKey)."}},{"displayName":"Session Key From Previous Node","name":"sessionKey","type":"string","default":"={{ $json.sessionId }}","disabledOptions":{"show":{"sessionIdType":["fromInput"]}},"displayOptions":{"show":{"sessionIdType":["fromInput"],"@version":[{"_cnd":{"gte":1.2}}]}}},{"displayName":"Session is automatically scoped only to this memory node. To share a session between different memory nodes, switch \"Session ID\" to \"Define below\" and use the same key in each node.","name":"scopedSessionHintNotice","type":"notice","default":"","displayOptions":{"show":{"@version":[{"_cnd":{"gte":1.4}}],"sessionIdType":["fromInput"]}}},{"displayName":"Key","name":"sessionKey","type":"string","default":"","description":"The key to use to store session ID in the memory","displayOptions":{"show":{"sessionIdType":["customKey"]}}},{"displayName":"Table Name","name":"tableName","type":"string","default":"n8n_chat_histories","description":"The table name to store the chat history in. If table does not exist, it will be created."},{"displayName":"Context Window Length","name":"contextWindowLength","type":"number","default":5,"hint":"How many past interactions the model receives as context","displayOptions":{"hide":{"@version":[{"_cnd":{"lt":1.1}}]}}}],"iconUrl":"icons/@n8n/n8n-nodes-langchain/dist/nodes/memory/MemoryPostgresChat/postgres.svg"},
@@ -11,5 +11,9 @@ export declare function getSessionId(ctx: ISupplyDataFunctions | IWebhookFunctio
11
11
  export declare function serializeChatHistory(chatHistory: BaseMessage[]): string;
12
12
  export declare function escapeSingleCurlyBrackets(text?: string): string | undefined;
13
13
  export declare const getConnectedTools: (ctx: IExecuteFunctions | IWebhookFunctions | ISupplyDataFunctions, enforceUniqueNames: boolean, convertStructuredTool?: boolean, escapeCurlyBrackets?: boolean) => Promise<Tool[]>;
14
+ export declare function getCustomCredentialHeader(credentials: ICredentialDataDecryptedObject): {
15
+ name: string;
16
+ value: string;
17
+ } | undefined;
14
18
  export declare function mergeCustomHeaders(credentials: ICredentialDataDecryptedObject, defaultHeaders: Record<string, string>): Record<string, string>;
15
19
  export declare function unwrapNestedOutput(output: Record<string, unknown>): Record<string, unknown>;
@@ -5,6 +5,7 @@ exports.getPromptInputByType = getPromptInputByType;
5
5
  exports.getSessionId = getSessionId;
6
6
  exports.serializeChatHistory = serializeChatHistory;
7
7
  exports.escapeSingleCurlyBrackets = escapeSingleCurlyBrackets;
8
+ exports.getCustomCredentialHeader = getCustomCredentialHeader;
8
9
  exports.mergeCustomHeaders = mergeCustomHeaders;
9
10
  exports.unwrapNestedOutput = unwrapNestedOutput;
10
11
  const tools_1 = require("@langchain/core/tools");
@@ -193,14 +194,21 @@ const getConnectedTools = async (ctx, enforceUniqueNames, convertStructuredTool
193
194
  return finalTools;
194
195
  };
195
196
  exports.getConnectedTools = getConnectedTools;
196
- function mergeCustomHeaders(credentials, defaultHeaders) {
197
+ function getCustomCredentialHeader(credentials) {
197
198
  if (credentials.header &&
198
199
  typeof credentials.headerName === 'string' &&
199
200
  credentials.headerName &&
200
201
  typeof credentials.headerValue === 'string') {
202
+ return { name: credentials.headerName, value: credentials.headerValue };
203
+ }
204
+ return undefined;
205
+ }
206
+ function mergeCustomHeaders(credentials, defaultHeaders) {
207
+ const customHeader = getCustomCredentialHeader(credentials);
208
+ if (customHeader) {
201
209
  return {
202
210
  ...defaultHeaders,
203
- [credentials.headerName]: credentials.headerValue,
211
+ [customHeader.name]: customHeader.value,
204
212
  };
205
213
  }
206
214
  return defaultHeaders;
@@ -1 +1 @@
1
- {"version":3,"file":"helpers.js","sourceRoot":"","sources":["../../utils/helpers.ts"],"names":[],"mappings":";;;AAgBA,oDAiCC;AA+BD,oCA8DC;AAED,oDAYC;AAED,8DAgBC;AAmGD,gDAgBC;AAMD,gDAaC;AAnTD,iDAA8F;AAE9F,uCAA0E;AAO1E,+CAAuE;AACvE,6BAA8B;AAE9B,uCAAoC;AACpC,mDAAyD;AAEzD,SAAgB,oBAAoB,CAAC,OAKpC;IACA,MAAM,EAAE,GAAG,EAAE,CAAC,EAAE,aAAa,EAAE,QAAQ,EAAE,GAAG,OAAO,CAAC;IACpD,MAAM,UAAU,GAAG,GAAG,CAAC,gBAAgB,CAAC,aAAa,EA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AI;QACtB,QAAQ,IAAI,MAAM,CAAC,MAAM;QACzB,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,MAAM,KAAK,CAAC,EACtC,CAAC;QACF,OAAO,MAAM,CAAC,MAAiC,CAAC;IACjD,CAAC;IAED,OAAO,MAAM,CAAC;AACf,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@n8n/n8n-nodes-langchain",
3
- "version": "2.29.5",
3
+ "version": "2.29.7",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "exports": {
@@ -234,7 +234,7 @@
234
234
  "@langchain/classic": "1.0.27",
235
235
  "@langchain/cohere": "1.0.1",
236
236
  "@langchain/community": "1.1.27",
237
- "@langchain/core": "1.1.41",
237
+ "@langchain/core": "1.2.0",
238
238
  "@langchain/google-common": "2.1.24",
239
239
  "@langchain/google-genai": "2.1.24",
240
240
  "@langchain/google-vertexai": "2.1.24",
@@ -302,17 +302,17 @@
302
302
  "weaviate-client": "3.9.0",
303
303
  "zod": "3.25.67",
304
304
  "zod-to-json-schema": "3.23.3",
305
- "@n8n/ai-utilities": "0.22.5",
306
- "@n8n/config": "2.27.2",
307
- "@n8n/client-oauth2": "1.11.0",
308
- "@n8n/di": "0.14.0",
305
+ "@n8n/ai-utilities": "0.22.7",
309
306
  "@n8n/errors": "0.10.0",
307
+ "@n8n/di": "0.14.0",
308
+ "@n8n/json-schema-to-zod": "1.12.0",
310
309
  "@n8n/typescript-config": "1.7.0",
311
- "@n8n/utils": "1.37.0",
312
- "n8n-core": "2.29.5",
313
- "n8n-nodes-base": "2.29.5",
314
- "n8n-workflow": "2.29.2",
315
- "@n8n/json-schema-to-zod": "1.12.0"
310
+ "@n8n/config": "2.27.3",
311
+ "@n8n/utils": "1.37.2",
312
+ "n8n-core": "2.29.7",
313
+ "n8n-workflow": "2.29.3",
314
+ "n8n-nodes-base": "2.29.7",
315
+ "@n8n/client-oauth2": "1.11.2"
316
316
  },
317
317
  "license": "SEE LICENSE IN LICENSE.md",
318
318
  "homepage": "https://n8n.io",