fix(Call n8n Workflow Tool Node): Support concurrent invocations of the tool (#13526)

Co-authored-by: Oleg Ivaniv <me@olegivaniv.com>
This commit is contained in:
Charlie Kolb
2025-02-26 16:23:31 +01:00
committed by GitHub
parent 24a38b99a1
commit 5334661b76
15 changed files with 171 additions and 86 deletions

View File

@@ -5,7 +5,7 @@ import { OutputParserException } from '@langchain/core/output_parsers';
import type { MockProxy } from 'jest-mock-extended';
import { mock } from 'jest-mock-extended';
import { normalizeItems } from 'n8n-core';
import type { IExecuteFunctions, IWorkflowDataProxyData } from 'n8n-workflow';
import type { ISupplyDataFunctions, IWorkflowDataProxyData } from 'n8n-workflow';
import { ApplicationError, NodeConnectionType, NodeOperationError } from 'n8n-workflow';
import type {
@@ -18,13 +18,13 @@ import { NAIVE_FIX_PROMPT } from '../prompt';
describe('OutputParserAutofixing', () => {
let outputParser: OutputParserAutofixing;
let thisArg: MockProxy<IExecuteFunctions>;
let thisArg: MockProxy<ISupplyDataFunctions>;
let mockModel: MockProxy<BaseLanguageModel>;
let mockStructuredOutputParser: MockProxy<N8nStructuredOutputParser>;
beforeEach(() => {
outputParser = new OutputParserAutofixing();
thisArg = mock<IExecuteFunctions>({
thisArg = mock<ISupplyDataFunctions>({
helpers: { normalizeItems },
});
mockModel = mock<BaseLanguageModel>();

View File

@@ -2,7 +2,7 @@ import { mock } from 'jest-mock-extended';
import { normalizeItems } from 'n8n-core';
import {
ApplicationError,
type IExecuteFunctions,
type ISupplyDataFunctions,
type IWorkflowDataProxyData,
} from 'n8n-workflow';
@@ -12,7 +12,7 @@ import { OutputParserItemList } from '../OutputParserItemList.node';
describe('OutputParserItemList', () => {
let outputParser: OutputParserItemList;
const thisArg = mock<IExecuteFunctions>({
const thisArg = mock<ISupplyDataFunctions>({
helpers: { normalizeItems },
});
const workflowDataProxy = mock<IWorkflowDataProxyData>({ $input: mock() });

View File

@@ -2,8 +2,8 @@ import { mock } from 'jest-mock-extended';
import { normalizeItems } from 'n8n-core';
import {
jsonParse,
type IExecuteFunctions,
type INode,
type ISupplyDataFunctions,
type IWorkflowDataProxyData,
} from 'n8n-workflow';
@@ -13,7 +13,7 @@ import { OutputParserStructured } from '../OutputParserStructured.node';
describe('OutputParserStructured', () => {
let outputParser: OutputParserStructured;
const thisArg = mock<IExecuteFunctions>({
const thisArg = mock<ISupplyDataFunctions>({
helpers: { normalizeItems },
});
const workflowDataProxy = mock<IWorkflowDataProxyData>({ $input: mock() });