@cicctencent/agent-core 1.0.6 → 1.0.8
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/dist/cjs/automation/node-task-types.d.ts +69 -0
- package/dist/cjs/automation/node-task-types.d.ts.map +1 -1
- package/dist/cjs/index.d.ts +2 -1
- package/dist/cjs/index.d.ts.map +1 -1
- package/dist/cjs/index.js +16 -0
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/workflow/engine.d.ts +36 -0
- package/dist/cjs/workflow/engine.d.ts.map +1 -0
- package/dist/cjs/workflow/engine.js +403 -0
- package/dist/cjs/workflow/engine.js.map +1 -0
- package/dist/cjs/workflow/index.d.ts +4 -0
- package/dist/cjs/workflow/index.d.ts.map +1 -0
- package/dist/cjs/workflow/index.js +21 -0
- package/dist/cjs/workflow/index.js.map +1 -0
- package/dist/cjs/workflow/node-executor.d.ts +17 -0
- package/dist/cjs/workflow/node-executor.d.ts.map +1 -0
- package/dist/cjs/workflow/node-executor.js +643 -0
- package/dist/cjs/workflow/node-executor.js.map +1 -0
- package/dist/cjs/workflow/types.d.ts +366 -0
- package/dist/cjs/workflow/types.d.ts.map +1 -0
- package/dist/cjs/workflow/types.js +9 -0
- package/dist/cjs/workflow/types.js.map +1 -0
- package/dist/esm/automation/node-task-types.d.ts +69 -0
- package/dist/esm/automation/node-task-types.d.ts.map +1 -1
- package/dist/esm/index.d.ts +2 -1
- package/dist/esm/index.d.ts.map +1 -1
- package/dist/esm/index.js +2 -0
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/workflow/engine.d.ts +36 -0
- package/dist/esm/workflow/engine.d.ts.map +1 -0
- package/dist/esm/workflow/engine.js +396 -0
- package/dist/esm/workflow/engine.js.map +1 -0
- package/dist/esm/workflow/index.d.ts +4 -0
- package/dist/esm/workflow/index.d.ts.map +1 -0
- package/dist/esm/workflow/index.js +5 -0
- package/dist/esm/workflow/index.js.map +1 -0
- package/dist/esm/workflow/node-executor.d.ts +17 -0
- package/dist/esm/workflow/node-executor.d.ts.map +1 -0
- package/dist/esm/workflow/node-executor.js +639 -0
- package/dist/esm/workflow/node-executor.js.map +1 -0
- package/dist/esm/workflow/types.d.ts +366 -0
- package/dist/esm/workflow/types.d.ts.map +1 -0
- package/dist/esm/workflow/types.js +8 -0
- package/dist/esm/workflow/types.js.map +1 -0
- package/package.json +1 -1
|
@@ -0,0 +1,643 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// ============================================================
|
|
3
|
+
// Node Executor — 节点执行器
|
|
4
|
+
// ============================================================
|
|
5
|
+
// 根据节点类型执行不同逻辑:
|
|
6
|
+
// - start: 初始化输入变量
|
|
7
|
+
// - end: 收集输出
|
|
8
|
+
// - llm: 调用 LLM,支持 Function Calling
|
|
9
|
+
// - tool: 调用工具
|
|
10
|
+
// - condition: 条件分支
|
|
11
|
+
// - code: 执行 JavaScript
|
|
12
|
+
// - http: HTTP 请求
|
|
13
|
+
// - template: 模板渲染
|
|
14
|
+
// ============================================================
|
|
15
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
+
exports.executeNode = executeNode;
|
|
17
|
+
exports.extractArtifacts = extractArtifacts;
|
|
18
|
+
const engine_ts_1 = require("./engine.js");
|
|
19
|
+
/**
|
|
20
|
+
* 执行单个节点
|
|
21
|
+
*/
|
|
22
|
+
async function* executeNode(node, ctx, emit) {
|
|
23
|
+
switch (node.type) {
|
|
24
|
+
case 'start':
|
|
25
|
+
return yield* executeStartNode(node, ctx, emit);
|
|
26
|
+
case 'end':
|
|
27
|
+
return yield* executeEndNode(node, ctx, emit);
|
|
28
|
+
case 'llm':
|
|
29
|
+
return yield* executeLLMNode(node, ctx, emit);
|
|
30
|
+
case 'tool':
|
|
31
|
+
return yield* executeToolNode(node, ctx, emit);
|
|
32
|
+
case 'condition':
|
|
33
|
+
return yield* executeConditionNode(node, ctx, emit);
|
|
34
|
+
case 'code':
|
|
35
|
+
return yield* executeCodeNode(node, ctx, emit);
|
|
36
|
+
case 'http':
|
|
37
|
+
return yield* executeHttpNode(node, ctx, emit);
|
|
38
|
+
case 'template':
|
|
39
|
+
return yield* executeTemplateNode(node, ctx, emit);
|
|
40
|
+
default:
|
|
41
|
+
return {
|
|
42
|
+
nodeId: node.id,
|
|
43
|
+
nodeName: node.name,
|
|
44
|
+
nodeType: node.type,
|
|
45
|
+
output: {},
|
|
46
|
+
status: 'error',
|
|
47
|
+
error: `Unknown node type: ${node.type}`,
|
|
48
|
+
durationMs: 0,
|
|
49
|
+
startedAt: Date.now(),
|
|
50
|
+
finishedAt: Date.now(),
|
|
51
|
+
};
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
// ---- Start Node ----
|
|
55
|
+
async function* executeStartNode(node, ctx, _emit) {
|
|
56
|
+
const config = node.config;
|
|
57
|
+
const output = {};
|
|
58
|
+
for (const input of config.inputs) {
|
|
59
|
+
if (ctx.inputs[input.name] !== undefined) {
|
|
60
|
+
output[input.name] = ctx.inputs[input.name];
|
|
61
|
+
}
|
|
62
|
+
else if (input.defaultValue !== undefined) {
|
|
63
|
+
output[input.name] = input.defaultValue;
|
|
64
|
+
}
|
|
65
|
+
else if (input.required) {
|
|
66
|
+
return {
|
|
67
|
+
nodeId: node.id,
|
|
68
|
+
nodeName: node.name,
|
|
69
|
+
nodeType: 'start',
|
|
70
|
+
output: {},
|
|
71
|
+
status: 'error',
|
|
72
|
+
error: `Required input "${input.name}" is missing`,
|
|
73
|
+
durationMs: 0,
|
|
74
|
+
startedAt: Date.now(),
|
|
75
|
+
finishedAt: Date.now(),
|
|
76
|
+
};
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
return {
|
|
80
|
+
nodeId: node.id,
|
|
81
|
+
nodeName: node.name,
|
|
82
|
+
nodeType: 'start',
|
|
83
|
+
output,
|
|
84
|
+
status: 'success',
|
|
85
|
+
durationMs: 0,
|
|
86
|
+
startedAt: Date.now(),
|
|
87
|
+
finishedAt: Date.now(),
|
|
88
|
+
};
|
|
89
|
+
}
|
|
90
|
+
// ---- End Node ----
|
|
91
|
+
async function* executeEndNode(node, ctx, _emit) {
|
|
92
|
+
const config = node.config;
|
|
93
|
+
const output = {};
|
|
94
|
+
for (const [key, value] of Object.entries(config.outputs)) {
|
|
95
|
+
output[key] = (0, engine_ts_1.resolveVariable)(value, ctx);
|
|
96
|
+
}
|
|
97
|
+
return {
|
|
98
|
+
nodeId: node.id,
|
|
99
|
+
nodeName: node.name,
|
|
100
|
+
nodeType: 'end',
|
|
101
|
+
output,
|
|
102
|
+
status: 'success',
|
|
103
|
+
durationMs: 0,
|
|
104
|
+
startedAt: Date.now(),
|
|
105
|
+
finishedAt: Date.now(),
|
|
106
|
+
};
|
|
107
|
+
}
|
|
108
|
+
// ---- LLM Node (P0: Function Calling) ----
|
|
109
|
+
async function* executeLLMNode(node, ctx, emit) {
|
|
110
|
+
const config = node.config;
|
|
111
|
+
const startedAt = Date.now();
|
|
112
|
+
if (!ctx.llmCaller) {
|
|
113
|
+
return {
|
|
114
|
+
nodeId: node.id,
|
|
115
|
+
nodeName: node.name,
|
|
116
|
+
nodeType: 'llm',
|
|
117
|
+
output: {},
|
|
118
|
+
status: 'error',
|
|
119
|
+
error: 'LLM caller not provided',
|
|
120
|
+
durationMs: 0,
|
|
121
|
+
startedAt,
|
|
122
|
+
finishedAt: Date.now(),
|
|
123
|
+
};
|
|
124
|
+
}
|
|
125
|
+
// 构建消息
|
|
126
|
+
const systemPrompt = (0, engine_ts_1.interpolateTemplate)(config.systemPrompt, ctx);
|
|
127
|
+
const userMessage = (0, engine_ts_1.interpolateTemplate)(config.userMessageTemplate, ctx);
|
|
128
|
+
const messages = [
|
|
129
|
+
{ role: 'system', content: systemPrompt },
|
|
130
|
+
{ role: 'user', content: userMessage },
|
|
131
|
+
];
|
|
132
|
+
// 获取工具定义
|
|
133
|
+
const tools = config.tools || [];
|
|
134
|
+
const toolDefs = tools
|
|
135
|
+
.map(name => ctx.toolRegistry?.getDefinition(name))
|
|
136
|
+
.filter((d) => d !== undefined);
|
|
137
|
+
// Function Calling 循环
|
|
138
|
+
const maxToolRounds = config.maxToolRounds ?? 5;
|
|
139
|
+
let totalUsage;
|
|
140
|
+
const toolCallRecords = [];
|
|
141
|
+
let assistantContent = '';
|
|
142
|
+
for (let round = 0; round < maxToolRounds; round++) {
|
|
143
|
+
if (ctx.abortSignal.aborted) {
|
|
144
|
+
return {
|
|
145
|
+
nodeId: node.id,
|
|
146
|
+
nodeName: node.name,
|
|
147
|
+
nodeType: 'llm',
|
|
148
|
+
output: { content: assistantContent },
|
|
149
|
+
status: 'skipped',
|
|
150
|
+
error: 'Aborted',
|
|
151
|
+
durationMs: Date.now() - startedAt,
|
|
152
|
+
startedAt,
|
|
153
|
+
finishedAt: Date.now(),
|
|
154
|
+
};
|
|
155
|
+
}
|
|
156
|
+
// 调用 LLM
|
|
157
|
+
const llmGen = ctx.llmCaller.call(ctx.sessionId || ctx.executionId, messages, toolDefs, ctx.abortSignal);
|
|
158
|
+
let llmResult = { assistant: null };
|
|
159
|
+
// P3: 跟踪 tool_call 的 args(tool_result 事件不含 args)
|
|
160
|
+
const toolCallArgsMap = new Map();
|
|
161
|
+
while (true) {
|
|
162
|
+
const iter = await llmGen.next();
|
|
163
|
+
if (iter.done) {
|
|
164
|
+
llmResult = iter.value;
|
|
165
|
+
break;
|
|
166
|
+
}
|
|
167
|
+
const llmEvent = iter.value;
|
|
168
|
+
// 转发事件
|
|
169
|
+
switch (llmEvent.type) {
|
|
170
|
+
case 'thinking':
|
|
171
|
+
yield { type: 'node_thinking', nodeId: node.id, content: llmEvent.content, timestamp: Date.now() };
|
|
172
|
+
break;
|
|
173
|
+
case 'message':
|
|
174
|
+
yield { type: 'node_message', nodeId: node.id, content: llmEvent.content, delta: llmEvent.delta, timestamp: Date.now() };
|
|
175
|
+
if (!llmEvent.delta) {
|
|
176
|
+
assistantContent = llmEvent.content;
|
|
177
|
+
}
|
|
178
|
+
break;
|
|
179
|
+
case 'tool_call':
|
|
180
|
+
toolCallArgsMap.set(llmEvent.callId, llmEvent.args);
|
|
181
|
+
yield { type: 'node_tool_call', nodeId: node.id, tool: llmEvent.tool, args: llmEvent.args, callId: llmEvent.callId, timestamp: Date.now() };
|
|
182
|
+
break;
|
|
183
|
+
case 'tool_result':
|
|
184
|
+
yield { type: 'node_tool_result', nodeId: node.id, tool: llmEvent.tool, result: llmEvent.result, isError: llmEvent.isError, callId: llmEvent.callId, durationMs: llmEvent.durationMs, timestamp: Date.now() };
|
|
185
|
+
toolCallRecords.push({
|
|
186
|
+
tool: llmEvent.tool,
|
|
187
|
+
args: toolCallArgsMap.get(llmEvent.callId) || {},
|
|
188
|
+
result: llmEvent.result,
|
|
189
|
+
isError: llmEvent.isError,
|
|
190
|
+
durationMs: llmEvent.durationMs,
|
|
191
|
+
});
|
|
192
|
+
break;
|
|
193
|
+
}
|
|
194
|
+
}
|
|
195
|
+
// 累加 usage
|
|
196
|
+
if (llmResult.usage) {
|
|
197
|
+
totalUsage = totalUsage || { promptTokens: 0, completionTokens: 0, totalTokens: 0 };
|
|
198
|
+
totalUsage.promptTokens += llmResult.usage.promptTokens || 0;
|
|
199
|
+
totalUsage.completionTokens += llmResult.usage.completionTokens || 0;
|
|
200
|
+
totalUsage.totalTokens += llmResult.usage.totalTokens || 0;
|
|
201
|
+
}
|
|
202
|
+
const assistant = llmResult.assistant;
|
|
203
|
+
if (!assistant)
|
|
204
|
+
break;
|
|
205
|
+
messages.push(assistant);
|
|
206
|
+
// 检查是否有 tool_calls
|
|
207
|
+
const toolCalls = assistant.tool_calls;
|
|
208
|
+
if (!toolCalls || toolCalls.length === 0) {
|
|
209
|
+
assistantContent = typeof assistant.content === 'string' ? assistant.content : JSON.stringify(assistant.content);
|
|
210
|
+
break;
|
|
211
|
+
}
|
|
212
|
+
// 执行工具调用
|
|
213
|
+
for (const tc of toolCalls) {
|
|
214
|
+
const toolName = tc.function?.name || tc.name || '';
|
|
215
|
+
const toolArgs = (() => {
|
|
216
|
+
try {
|
|
217
|
+
const argsStr = tc.function?.arguments || tc.arguments || '{}';
|
|
218
|
+
return typeof argsStr === 'string' ? JSON.parse(argsStr) : argsStr;
|
|
219
|
+
}
|
|
220
|
+
catch {
|
|
221
|
+
return {};
|
|
222
|
+
}
|
|
223
|
+
})();
|
|
224
|
+
const toolStart = Date.now();
|
|
225
|
+
let toolResult;
|
|
226
|
+
let isToolError = false;
|
|
227
|
+
try {
|
|
228
|
+
if (!ctx.toolRegistry) {
|
|
229
|
+
throw new Error('Tool registry not provided');
|
|
230
|
+
}
|
|
231
|
+
toolResult = await ctx.toolRegistry.execute(toolName, toolArgs, {
|
|
232
|
+
sessionId: ctx.sessionId || ctx.executionId,
|
|
233
|
+
abortSignal: ctx.abortSignal,
|
|
234
|
+
threadId: ctx.threadId,
|
|
235
|
+
tenant: ctx.tenant,
|
|
236
|
+
});
|
|
237
|
+
}
|
|
238
|
+
catch (err) {
|
|
239
|
+
toolResult = `Error: ${err?.message || 'Tool execution failed'}`;
|
|
240
|
+
isToolError = true;
|
|
241
|
+
}
|
|
242
|
+
const toolDuration = Date.now() - toolStart;
|
|
243
|
+
yield {
|
|
244
|
+
type: 'node_tool_result',
|
|
245
|
+
nodeId: node.id,
|
|
246
|
+
tool: toolName,
|
|
247
|
+
result: toolResult,
|
|
248
|
+
isError: isToolError,
|
|
249
|
+
callId: tc.id || '',
|
|
250
|
+
durationMs: toolDuration,
|
|
251
|
+
timestamp: Date.now(),
|
|
252
|
+
};
|
|
253
|
+
toolCallRecords.push({
|
|
254
|
+
tool: toolName,
|
|
255
|
+
args: toolArgs,
|
|
256
|
+
result: toolResult,
|
|
257
|
+
isError: isToolError,
|
|
258
|
+
durationMs: toolDuration,
|
|
259
|
+
});
|
|
260
|
+
messages.push({
|
|
261
|
+
role: 'tool',
|
|
262
|
+
tool_call_id: tc.id || '',
|
|
263
|
+
content: toolResult,
|
|
264
|
+
});
|
|
265
|
+
}
|
|
266
|
+
// 继续下一轮 LLM 调用
|
|
267
|
+
}
|
|
268
|
+
// P2: 从工具调用结果中提取产物
|
|
269
|
+
const allArtifacts = [];
|
|
270
|
+
for (const tc of toolCallRecords) {
|
|
271
|
+
const tcArtifacts = extractArtifacts(tc.tool, tc.result);
|
|
272
|
+
for (const a of tcArtifacts) {
|
|
273
|
+
allArtifacts.push(a);
|
|
274
|
+
yield {
|
|
275
|
+
type: 'node_artifact',
|
|
276
|
+
nodeId: node.id,
|
|
277
|
+
artifact: a,
|
|
278
|
+
timestamp: Date.now(),
|
|
279
|
+
};
|
|
280
|
+
}
|
|
281
|
+
}
|
|
282
|
+
return {
|
|
283
|
+
nodeId: node.id,
|
|
284
|
+
nodeName: node.name,
|
|
285
|
+
nodeType: 'llm',
|
|
286
|
+
output: { content: assistantContent, messages: messages.slice(2) },
|
|
287
|
+
status: 'success',
|
|
288
|
+
durationMs: Date.now() - startedAt,
|
|
289
|
+
usage: totalUsage,
|
|
290
|
+
toolCalls: toolCallRecords,
|
|
291
|
+
artifacts: allArtifacts.length > 0 ? allArtifacts : undefined,
|
|
292
|
+
startedAt,
|
|
293
|
+
finishedAt: Date.now(),
|
|
294
|
+
};
|
|
295
|
+
}
|
|
296
|
+
// ---- Tool Node ----
|
|
297
|
+
async function* executeToolNode(node, ctx, _emit) {
|
|
298
|
+
const config = node.config;
|
|
299
|
+
const startedAt = Date.now();
|
|
300
|
+
if (!ctx.toolRegistry) {
|
|
301
|
+
return {
|
|
302
|
+
nodeId: node.id,
|
|
303
|
+
nodeName: node.name,
|
|
304
|
+
nodeType: 'tool',
|
|
305
|
+
output: {},
|
|
306
|
+
status: 'error',
|
|
307
|
+
error: 'Tool registry not provided',
|
|
308
|
+
durationMs: 0,
|
|
309
|
+
startedAt,
|
|
310
|
+
finishedAt: Date.now(),
|
|
311
|
+
};
|
|
312
|
+
}
|
|
313
|
+
const args = (0, engine_ts_1.resolveArgs)(config.args, ctx);
|
|
314
|
+
yield {
|
|
315
|
+
type: 'node_tool_call',
|
|
316
|
+
nodeId: node.id,
|
|
317
|
+
tool: config.toolName,
|
|
318
|
+
args,
|
|
319
|
+
callId: '',
|
|
320
|
+
timestamp: Date.now(),
|
|
321
|
+
};
|
|
322
|
+
try {
|
|
323
|
+
const timeoutMs = config.timeoutMs ?? 30000;
|
|
324
|
+
const result = await withTimeout(ctx.toolRegistry.execute(config.toolName, args, {
|
|
325
|
+
sessionId: ctx.sessionId || ctx.executionId,
|
|
326
|
+
abortSignal: ctx.abortSignal,
|
|
327
|
+
threadId: ctx.threadId,
|
|
328
|
+
tenant: ctx.tenant,
|
|
329
|
+
}), timeoutMs);
|
|
330
|
+
yield {
|
|
331
|
+
type: 'node_tool_result',
|
|
332
|
+
nodeId: node.id,
|
|
333
|
+
tool: config.toolName,
|
|
334
|
+
result,
|
|
335
|
+
isError: false,
|
|
336
|
+
callId: '',
|
|
337
|
+
durationMs: Date.now() - startedAt,
|
|
338
|
+
timestamp: Date.now(),
|
|
339
|
+
};
|
|
340
|
+
// P2: 从工具结果中提取产物
|
|
341
|
+
const toolArtifacts = extractArtifacts(config.toolName, result);
|
|
342
|
+
for (const a of toolArtifacts) {
|
|
343
|
+
yield {
|
|
344
|
+
type: 'node_artifact',
|
|
345
|
+
nodeId: node.id,
|
|
346
|
+
artifact: a,
|
|
347
|
+
timestamp: Date.now(),
|
|
348
|
+
};
|
|
349
|
+
}
|
|
350
|
+
return {
|
|
351
|
+
nodeId: node.id,
|
|
352
|
+
nodeName: node.name,
|
|
353
|
+
nodeType: 'tool',
|
|
354
|
+
output: { result },
|
|
355
|
+
status: 'success',
|
|
356
|
+
durationMs: Date.now() - startedAt,
|
|
357
|
+
artifacts: toolArtifacts.length > 0 ? toolArtifacts : undefined,
|
|
358
|
+
startedAt,
|
|
359
|
+
finishedAt: Date.now(),
|
|
360
|
+
};
|
|
361
|
+
}
|
|
362
|
+
catch (err) {
|
|
363
|
+
const errMsg = err?.message || 'Tool execution failed';
|
|
364
|
+
yield {
|
|
365
|
+
type: 'node_tool_result',
|
|
366
|
+
nodeId: node.id,
|
|
367
|
+
tool: config.toolName,
|
|
368
|
+
result: `Error: ${errMsg}`,
|
|
369
|
+
isError: true,
|
|
370
|
+
callId: '',
|
|
371
|
+
durationMs: Date.now() - startedAt,
|
|
372
|
+
timestamp: Date.now(),
|
|
373
|
+
};
|
|
374
|
+
return {
|
|
375
|
+
nodeId: node.id,
|
|
376
|
+
nodeName: node.name,
|
|
377
|
+
nodeType: 'tool',
|
|
378
|
+
output: {},
|
|
379
|
+
status: 'error',
|
|
380
|
+
error: errMsg,
|
|
381
|
+
durationMs: Date.now() - startedAt,
|
|
382
|
+
startedAt,
|
|
383
|
+
finishedAt: Date.now(),
|
|
384
|
+
};
|
|
385
|
+
}
|
|
386
|
+
}
|
|
387
|
+
// ---- Condition Node ----
|
|
388
|
+
async function* executeConditionNode(node, ctx, _emit) {
|
|
389
|
+
const config = node.config;
|
|
390
|
+
const varContext = buildVarContext(ctx);
|
|
391
|
+
let matchedBranch;
|
|
392
|
+
for (const condition of config.conditions) {
|
|
393
|
+
try {
|
|
394
|
+
const fn = new Function('ctx', `with(ctx) { return ${condition.expression}; }`);
|
|
395
|
+
const result = fn(varContext);
|
|
396
|
+
if (result) {
|
|
397
|
+
matchedBranch = condition.name;
|
|
398
|
+
break;
|
|
399
|
+
}
|
|
400
|
+
}
|
|
401
|
+
catch {
|
|
402
|
+
// 表达式执行失败,跳过
|
|
403
|
+
}
|
|
404
|
+
}
|
|
405
|
+
if (!matchedBranch && config.defaultBranch) {
|
|
406
|
+
matchedBranch = config.defaultBranch;
|
|
407
|
+
}
|
|
408
|
+
return {
|
|
409
|
+
nodeId: node.id,
|
|
410
|
+
nodeName: node.name,
|
|
411
|
+
nodeType: 'condition',
|
|
412
|
+
output: { branch: matchedBranch || '' },
|
|
413
|
+
status: 'success',
|
|
414
|
+
durationMs: 0,
|
|
415
|
+
startedAt: Date.now(),
|
|
416
|
+
finishedAt: Date.now(),
|
|
417
|
+
};
|
|
418
|
+
}
|
|
419
|
+
// ---- Code Node ----
|
|
420
|
+
async function* executeCodeNode(node, ctx, _emit) {
|
|
421
|
+
const config = node.config;
|
|
422
|
+
const startedAt = Date.now();
|
|
423
|
+
const inputs = config.inputs ? (0, engine_ts_1.resolveArgs)(config.inputs, ctx) : {};
|
|
424
|
+
try {
|
|
425
|
+
const timeoutMs = config.timeoutMs ?? 10000;
|
|
426
|
+
const result = await withTimeout(new Promise((resolve, reject) => {
|
|
427
|
+
try {
|
|
428
|
+
const varContext = buildVarContext(ctx, inputs);
|
|
429
|
+
const fn = new Function('ctx', 'inputs', `
|
|
430
|
+
${config.code}
|
|
431
|
+
return typeof result !== 'undefined' ? result : {};
|
|
432
|
+
`);
|
|
433
|
+
const output = fn(varContext, inputs);
|
|
434
|
+
resolve(output || {});
|
|
435
|
+
}
|
|
436
|
+
catch (err) {
|
|
437
|
+
reject(err);
|
|
438
|
+
}
|
|
439
|
+
}), timeoutMs);
|
|
440
|
+
return {
|
|
441
|
+
nodeId: node.id,
|
|
442
|
+
nodeName: node.name,
|
|
443
|
+
nodeType: 'code',
|
|
444
|
+
output: result,
|
|
445
|
+
status: 'success',
|
|
446
|
+
durationMs: Date.now() - startedAt,
|
|
447
|
+
startedAt,
|
|
448
|
+
finishedAt: Date.now(),
|
|
449
|
+
};
|
|
450
|
+
}
|
|
451
|
+
catch (err) {
|
|
452
|
+
return {
|
|
453
|
+
nodeId: node.id,
|
|
454
|
+
nodeName: node.name,
|
|
455
|
+
nodeType: 'code',
|
|
456
|
+
output: {},
|
|
457
|
+
status: 'error',
|
|
458
|
+
error: err?.message || 'Code execution failed',
|
|
459
|
+
durationMs: Date.now() - startedAt,
|
|
460
|
+
startedAt,
|
|
461
|
+
finishedAt: Date.now(),
|
|
462
|
+
};
|
|
463
|
+
}
|
|
464
|
+
}
|
|
465
|
+
// ---- HTTP Node ----
|
|
466
|
+
async function* executeHttpNode(node, ctx, _emit) {
|
|
467
|
+
const config = node.config;
|
|
468
|
+
const startedAt = Date.now();
|
|
469
|
+
try {
|
|
470
|
+
const fetchFn = ctx.httpFetch || fetch;
|
|
471
|
+
const url = (0, engine_ts_1.interpolateTemplate)(config.url, ctx);
|
|
472
|
+
const body = config.body !== undefined ? (0, engine_ts_1.resolveVariable)(config.body, ctx) : undefined;
|
|
473
|
+
const controller = new AbortController();
|
|
474
|
+
const timeoutMs = config.timeoutMs ?? 30000;
|
|
475
|
+
const timer = setTimeout(() => controller.abort(), timeoutMs);
|
|
476
|
+
ctx.abortSignal.addEventListener('abort', () => controller.abort(), { once: true });
|
|
477
|
+
const response = await fetchFn(url, {
|
|
478
|
+
method: config.method,
|
|
479
|
+
headers: config.headers,
|
|
480
|
+
body: body !== undefined ? JSON.stringify(body) : undefined,
|
|
481
|
+
signal: controller.signal,
|
|
482
|
+
});
|
|
483
|
+
clearTimeout(timer);
|
|
484
|
+
const text = await response.text();
|
|
485
|
+
let parsedBody = text;
|
|
486
|
+
try {
|
|
487
|
+
parsedBody = JSON.parse(text);
|
|
488
|
+
}
|
|
489
|
+
catch {
|
|
490
|
+
// 保持文本
|
|
491
|
+
}
|
|
492
|
+
return {
|
|
493
|
+
nodeId: node.id,
|
|
494
|
+
nodeName: node.name,
|
|
495
|
+
nodeType: 'http',
|
|
496
|
+
output: {
|
|
497
|
+
status: response.status,
|
|
498
|
+
statusText: response.statusText,
|
|
499
|
+
headers: Object.fromEntries(response.headers.entries()),
|
|
500
|
+
body: parsedBody,
|
|
501
|
+
},
|
|
502
|
+
status: 'success',
|
|
503
|
+
durationMs: Date.now() - startedAt,
|
|
504
|
+
startedAt,
|
|
505
|
+
finishedAt: Date.now(),
|
|
506
|
+
};
|
|
507
|
+
}
|
|
508
|
+
catch (err) {
|
|
509
|
+
return {
|
|
510
|
+
nodeId: node.id,
|
|
511
|
+
nodeName: node.name,
|
|
512
|
+
nodeType: 'http',
|
|
513
|
+
output: {},
|
|
514
|
+
status: 'error',
|
|
515
|
+
error: err?.message || 'HTTP request failed',
|
|
516
|
+
durationMs: Date.now() - startedAt,
|
|
517
|
+
startedAt,
|
|
518
|
+
finishedAt: Date.now(),
|
|
519
|
+
};
|
|
520
|
+
}
|
|
521
|
+
}
|
|
522
|
+
// ---- Template Node ----
|
|
523
|
+
async function* executeTemplateNode(node, ctx, _emit) {
|
|
524
|
+
const config = node.config;
|
|
525
|
+
const startedAt = Date.now();
|
|
526
|
+
try {
|
|
527
|
+
const inputs = config.inputs ? (0, engine_ts_1.resolveArgs)(config.inputs, ctx) : {};
|
|
528
|
+
const varContext = buildVarContext(ctx, inputs);
|
|
529
|
+
// 模板插值
|
|
530
|
+
let output = config.template.replace(/\{\{(\w+)\.(\w+)\}\}/g, (_, source, field) => {
|
|
531
|
+
if (source === 'inputs') {
|
|
532
|
+
return String(inputs[field] ?? '');
|
|
533
|
+
}
|
|
534
|
+
const nodeOutput = ctx.nodeOutputs.get(source);
|
|
535
|
+
if (nodeOutput) {
|
|
536
|
+
return String(nodeOutput[field] ?? '');
|
|
537
|
+
}
|
|
538
|
+
return '';
|
|
539
|
+
});
|
|
540
|
+
// 支持简单表达式插值
|
|
541
|
+
output = output.replace(/\{\{([^}]+)\}\}/g, (_, expr) => {
|
|
542
|
+
try {
|
|
543
|
+
const fn = new Function('ctx', `with(ctx) { return ${expr.trim()}; }`);
|
|
544
|
+
return String(fn(varContext) ?? '');
|
|
545
|
+
}
|
|
546
|
+
catch {
|
|
547
|
+
return '';
|
|
548
|
+
}
|
|
549
|
+
});
|
|
550
|
+
return {
|
|
551
|
+
nodeId: node.id,
|
|
552
|
+
nodeName: node.name,
|
|
553
|
+
nodeType: 'template',
|
|
554
|
+
output: { content: output },
|
|
555
|
+
status: 'success',
|
|
556
|
+
durationMs: Date.now() - startedAt,
|
|
557
|
+
startedAt,
|
|
558
|
+
finishedAt: Date.now(),
|
|
559
|
+
};
|
|
560
|
+
}
|
|
561
|
+
catch (err) {
|
|
562
|
+
return {
|
|
563
|
+
nodeId: node.id,
|
|
564
|
+
nodeName: node.name,
|
|
565
|
+
nodeType: 'template',
|
|
566
|
+
output: {},
|
|
567
|
+
status: 'error',
|
|
568
|
+
error: err?.message || 'Template rendering failed',
|
|
569
|
+
durationMs: Date.now() - startedAt,
|
|
570
|
+
startedAt,
|
|
571
|
+
finishedAt: Date.now(),
|
|
572
|
+
};
|
|
573
|
+
}
|
|
574
|
+
}
|
|
575
|
+
// ---- 辅助函数 ----
|
|
576
|
+
/** 构建变量上下文(供条件/代码/模板节点使用) */
|
|
577
|
+
function buildVarContext(ctx, extraInputs) {
|
|
578
|
+
const varCtx = {
|
|
579
|
+
inputs: { ...ctx.inputs, ...extraInputs },
|
|
580
|
+
};
|
|
581
|
+
for (const [nodeId, output] of ctx.nodeOutputs) {
|
|
582
|
+
varCtx[nodeId] = output;
|
|
583
|
+
}
|
|
584
|
+
return varCtx;
|
|
585
|
+
}
|
|
586
|
+
/** 带超时的 Promise */
|
|
587
|
+
function withTimeout(promise, timeoutMs) {
|
|
588
|
+
return new Promise((resolve, reject) => {
|
|
589
|
+
const timer = setTimeout(() => reject(new Error(`Timeout after ${timeoutMs}ms`)), timeoutMs);
|
|
590
|
+
promise.then(val => { clearTimeout(timer); resolve(val); }, err => { clearTimeout(timer); reject(err); });
|
|
591
|
+
});
|
|
592
|
+
}
|
|
593
|
+
/**
|
|
594
|
+
* P2: 从工具执行结果中提取产物信息
|
|
595
|
+
* 工具结果中可能包含产物 URL(如 /api/artifact/xxx)或 JSON 格式的产物信息
|
|
596
|
+
*/
|
|
597
|
+
function extractArtifacts(toolName, result) {
|
|
598
|
+
const artifacts = [];
|
|
599
|
+
// 尝试解析 JSON 结果
|
|
600
|
+
try {
|
|
601
|
+
const parsed = JSON.parse(result);
|
|
602
|
+
// 如果结果包含 artifact URL
|
|
603
|
+
if (parsed?.url && typeof parsed.url === 'string') {
|
|
604
|
+
artifacts.push({
|
|
605
|
+
name: parsed.name || parsed.title || `artifact_${Date.now()}`,
|
|
606
|
+
type: parsed.type || parsed.mimeType || 'file',
|
|
607
|
+
url: parsed.url,
|
|
608
|
+
size: parsed.size,
|
|
609
|
+
tool: toolName,
|
|
610
|
+
});
|
|
611
|
+
}
|
|
612
|
+
// 如果结果包含 artifacts 数组
|
|
613
|
+
if (Array.isArray(parsed?.artifacts)) {
|
|
614
|
+
for (const a of parsed.artifacts) {
|
|
615
|
+
if (a?.url) {
|
|
616
|
+
artifacts.push({
|
|
617
|
+
name: a.name || `artifact_${Date.now()}`,
|
|
618
|
+
type: a.type || a.mimeType || 'file',
|
|
619
|
+
url: a.url,
|
|
620
|
+
size: a.size,
|
|
621
|
+
tool: toolName,
|
|
622
|
+
});
|
|
623
|
+
}
|
|
624
|
+
}
|
|
625
|
+
}
|
|
626
|
+
}
|
|
627
|
+
catch {
|
|
628
|
+
// 非 JSON 结果,检查是否包含 artifact URL
|
|
629
|
+
const urlMatch = result.match(/\/api\/artifact\/[^\s"']+/g);
|
|
630
|
+
if (urlMatch) {
|
|
631
|
+
for (const url of urlMatch) {
|
|
632
|
+
artifacts.push({
|
|
633
|
+
name: `artifact_${Date.now()}`,
|
|
634
|
+
type: 'file',
|
|
635
|
+
url,
|
|
636
|
+
tool: toolName,
|
|
637
|
+
});
|
|
638
|
+
}
|
|
639
|
+
}
|
|
640
|
+
}
|
|
641
|
+
return artifacts;
|
|
642
|
+
}
|
|
643
|
+
//# sourceMappingURL=node-executor.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"node-executor.js","sourceRoot":"","sources":["../../../src/workflow/node-executor.ts"],"names":[],"mappings":";AAAA,+DAA+D;AAC/D,wBAAwB;AACxB,+DAA+D;AAC/D,gBAAgB;AAChB,mBAAmB;AACnB,cAAc;AACd,oCAAoC;AACpC,eAAe;AACf,oBAAoB;AACpB,wBAAwB;AACxB,kBAAkB;AAClB,mBAAmB;AACnB,+DAA+D;;AAwB/D,kCAmCC;AA8oBD,4CAiDC;AAvuBD,2CAAgF;AAEhF;;GAEG;AACI,KAAK,SAAS,CAAC,CAAC,WAAW,CAChC,IAAkB,EAClB,GA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