@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,403 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// ============================================================
|
|
3
|
+
// Workflow Engine — 工作流执行引擎
|
|
4
|
+
// ============================================================
|
|
5
|
+
// 职责:
|
|
6
|
+
// - 解析工作流 DAG,拓扑排序
|
|
7
|
+
// - 按序执行节点,传递变量
|
|
8
|
+
// - 发射事件供 SSE 流式输出
|
|
9
|
+
// - 错误处理与重试
|
|
10
|
+
// ============================================================
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.WorkflowEngine = void 0;
|
|
13
|
+
exports.resolveVariable = resolveVariable;
|
|
14
|
+
exports.interpolateTemplate = interpolateTemplate;
|
|
15
|
+
exports.resolveArgs = resolveArgs;
|
|
16
|
+
const node_executor_ts_1 = require("./node-executor.js");
|
|
17
|
+
/** 工作流引擎 */
|
|
18
|
+
class WorkflowEngine {
|
|
19
|
+
/**
|
|
20
|
+
* 执行工作流
|
|
21
|
+
* @returns 异步生成器,产出工作流事件,最终返回执行结果
|
|
22
|
+
*/
|
|
23
|
+
async *run(params) {
|
|
24
|
+
const { workflow, inputs, abortSignal } = params;
|
|
25
|
+
const executionId = `wf_exec_${Date.now()}_${Math.random().toString(36).slice(2, 8)}`;
|
|
26
|
+
const startTime = Date.now();
|
|
27
|
+
// 收集事件
|
|
28
|
+
const events = [];
|
|
29
|
+
const emit = (event) => {
|
|
30
|
+
events.push(event);
|
|
31
|
+
};
|
|
32
|
+
const ctx = {
|
|
33
|
+
executionId,
|
|
34
|
+
workflow,
|
|
35
|
+
inputs,
|
|
36
|
+
nodeOutputs: new Map(),
|
|
37
|
+
results: [],
|
|
38
|
+
abortSignal,
|
|
39
|
+
emit,
|
|
40
|
+
llmCaller: params.llmCaller,
|
|
41
|
+
toolRegistry: params.toolRegistry,
|
|
42
|
+
httpFetch: params.httpFetch,
|
|
43
|
+
sessionId: params.sessionId,
|
|
44
|
+
threadId: params.threadId,
|
|
45
|
+
tenant: params.tenant,
|
|
46
|
+
};
|
|
47
|
+
// 发射 workflow_start 事件
|
|
48
|
+
const startEvent = {
|
|
49
|
+
type: 'workflow_start',
|
|
50
|
+
executionId,
|
|
51
|
+
workflowId: workflow.id,
|
|
52
|
+
workflowName: workflow.name,
|
|
53
|
+
inputs,
|
|
54
|
+
timestamp: startTime,
|
|
55
|
+
};
|
|
56
|
+
yield startEvent;
|
|
57
|
+
emit(startEvent);
|
|
58
|
+
// 设置超时
|
|
59
|
+
const timeoutMs = workflow.timeoutMs ?? 5 * 60 * 1000;
|
|
60
|
+
const timeoutController = new AbortController();
|
|
61
|
+
const timeoutTimer = setTimeout(() => timeoutController.abort(), timeoutMs);
|
|
62
|
+
// 合并 abort 信号
|
|
63
|
+
const mergedSignal = mergeAbortSignals(abortSignal, timeoutController.signal);
|
|
64
|
+
ctx.abortSignal = mergedSignal;
|
|
65
|
+
try {
|
|
66
|
+
// 拓扑排序
|
|
67
|
+
const sortedNodeIds = topologicalSort(workflow.nodes, workflow.edges);
|
|
68
|
+
// 执行节点
|
|
69
|
+
let lastError;
|
|
70
|
+
for (const nodeId of sortedNodeIds) {
|
|
71
|
+
if (mergedSignal.aborted) {
|
|
72
|
+
break;
|
|
73
|
+
}
|
|
74
|
+
const node = workflow.nodes.find(n => n.id === nodeId);
|
|
75
|
+
if (!node)
|
|
76
|
+
continue;
|
|
77
|
+
// 检查条件边:只有满足条件的边才继续执行
|
|
78
|
+
// 简化处理:线性执行,条件节点决定后续分支
|
|
79
|
+
const result = yield* this.executeNodeWithEvents(node, ctx);
|
|
80
|
+
ctx.results.push(result);
|
|
81
|
+
if (result.status === 'error') {
|
|
82
|
+
lastError = result.error;
|
|
83
|
+
// 节点执行失败,终止工作流
|
|
84
|
+
const errorEvent = {
|
|
85
|
+
type: 'workflow_error',
|
|
86
|
+
executionId,
|
|
87
|
+
nodeId: node.id,
|
|
88
|
+
error: result.error || 'Node execution failed',
|
|
89
|
+
timestamp: Date.now(),
|
|
90
|
+
};
|
|
91
|
+
yield errorEvent;
|
|
92
|
+
emit(errorEvent);
|
|
93
|
+
break;
|
|
94
|
+
}
|
|
95
|
+
// 条件节点:决定下一个执行的节点
|
|
96
|
+
if (node.type === 'condition' && result.status === 'success') {
|
|
97
|
+
const matchedBranch = result.output['branch'];
|
|
98
|
+
if (matchedBranch) {
|
|
99
|
+
// 过滤后续节点:只执行匹配分支的节点
|
|
100
|
+
// 这里简化处理:标记分支结果,后续拓扑排序时已包含所有节点
|
|
101
|
+
// 实际分支逻辑在 getNodeSuccessors 中处理
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
// 收集输出
|
|
106
|
+
const endNode = workflow.nodes.find(n => n.type === 'end');
|
|
107
|
+
let outputs = {};
|
|
108
|
+
if (endNode && ctx.nodeOutputs.has(endNode.id)) {
|
|
109
|
+
outputs = ctx.nodeOutputs.get(endNode.id);
|
|
110
|
+
}
|
|
111
|
+
const endTime = Date.now();
|
|
112
|
+
const status = mergedSignal.aborted
|
|
113
|
+
? 'aborted'
|
|
114
|
+
: lastError ? 'error' : 'completed';
|
|
115
|
+
const endEvent = {
|
|
116
|
+
type: 'workflow_end',
|
|
117
|
+
executionId,
|
|
118
|
+
status,
|
|
119
|
+
outputs,
|
|
120
|
+
durationMs: endTime - startTime,
|
|
121
|
+
timestamp: endTime,
|
|
122
|
+
};
|
|
123
|
+
yield endEvent;
|
|
124
|
+
emit(endEvent);
|
|
125
|
+
// 计算 token 总用量
|
|
126
|
+
let totalUsage;
|
|
127
|
+
for (const r of ctx.results) {
|
|
128
|
+
if (r.usage) {
|
|
129
|
+
totalUsage = totalUsage || { promptTokens: 0, completionTokens: 0, totalTokens: 0 };
|
|
130
|
+
totalUsage.promptTokens += r.usage.promptTokens || 0;
|
|
131
|
+
totalUsage.completionTokens += r.usage.completionTokens || 0;
|
|
132
|
+
totalUsage.totalTokens += r.usage.totalTokens || 0;
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
// P2: 收集所有节点生成的产物
|
|
136
|
+
const allArtifacts = [];
|
|
137
|
+
for (const r of ctx.results) {
|
|
138
|
+
if (r.artifacts) {
|
|
139
|
+
for (const a of r.artifacts) {
|
|
140
|
+
allArtifacts.push({
|
|
141
|
+
nodeId: r.nodeId,
|
|
142
|
+
nodeName: r.nodeName,
|
|
143
|
+
...a,
|
|
144
|
+
});
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
return {
|
|
149
|
+
executionId,
|
|
150
|
+
workflowId: workflow.id,
|
|
151
|
+
status,
|
|
152
|
+
outputs,
|
|
153
|
+
nodeResults: ctx.results,
|
|
154
|
+
artifacts: allArtifacts.length > 0 ? allArtifacts : undefined,
|
|
155
|
+
durationMs: endTime - startTime,
|
|
156
|
+
totalUsage,
|
|
157
|
+
error: lastError,
|
|
158
|
+
};
|
|
159
|
+
}
|
|
160
|
+
catch (err) {
|
|
161
|
+
const errorEvent = {
|
|
162
|
+
type: 'workflow_error',
|
|
163
|
+
executionId,
|
|
164
|
+
error: err?.message || 'Workflow execution failed',
|
|
165
|
+
timestamp: Date.now(),
|
|
166
|
+
};
|
|
167
|
+
yield errorEvent;
|
|
168
|
+
emit(errorEvent);
|
|
169
|
+
const endTime = Date.now();
|
|
170
|
+
const endEvent = {
|
|
171
|
+
type: 'workflow_end',
|
|
172
|
+
executionId,
|
|
173
|
+
status: 'error',
|
|
174
|
+
outputs: {},
|
|
175
|
+
durationMs: endTime - startTime,
|
|
176
|
+
timestamp: endTime,
|
|
177
|
+
};
|
|
178
|
+
yield endEvent;
|
|
179
|
+
emit(endEvent);
|
|
180
|
+
return {
|
|
181
|
+
executionId,
|
|
182
|
+
workflowId: workflow.id,
|
|
183
|
+
status: 'error',
|
|
184
|
+
outputs: {},
|
|
185
|
+
nodeResults: ctx.results,
|
|
186
|
+
durationMs: endTime - startTime,
|
|
187
|
+
error: err?.message || 'Workflow execution failed',
|
|
188
|
+
};
|
|
189
|
+
}
|
|
190
|
+
finally {
|
|
191
|
+
clearTimeout(timeoutTimer);
|
|
192
|
+
}
|
|
193
|
+
}
|
|
194
|
+
/** 执行单个节点并发射事件 */
|
|
195
|
+
async *executeNodeWithEvents(node, ctx) {
|
|
196
|
+
const startedAt = Date.now();
|
|
197
|
+
// 发射 node_start 事件
|
|
198
|
+
const startEvent = {
|
|
199
|
+
type: 'node_start',
|
|
200
|
+
nodeId: node.id,
|
|
201
|
+
nodeName: node.name,
|
|
202
|
+
nodeType: node.type,
|
|
203
|
+
timestamp: startedAt,
|
|
204
|
+
};
|
|
205
|
+
yield startEvent;
|
|
206
|
+
ctx.emit(startEvent);
|
|
207
|
+
// 执行节点(带重试)
|
|
208
|
+
const maxRetries = node.retry?.maxRetries ?? 0;
|
|
209
|
+
const delayMs = node.retry?.delayMs ?? 1000;
|
|
210
|
+
const backoffFactor = node.retry?.backoffFactor ?? 2;
|
|
211
|
+
let lastError;
|
|
212
|
+
let result;
|
|
213
|
+
for (let attempt = 0; attempt <= maxRetries; attempt++) {
|
|
214
|
+
if (ctx.abortSignal.aborted) {
|
|
215
|
+
result = {
|
|
216
|
+
nodeId: node.id,
|
|
217
|
+
nodeName: node.name,
|
|
218
|
+
nodeType: node.type,
|
|
219
|
+
output: {},
|
|
220
|
+
status: 'skipped',
|
|
221
|
+
error: 'Aborted',
|
|
222
|
+
durationMs: Date.now() - startedAt,
|
|
223
|
+
startedAt,
|
|
224
|
+
finishedAt: Date.now(),
|
|
225
|
+
};
|
|
226
|
+
break;
|
|
227
|
+
}
|
|
228
|
+
try {
|
|
229
|
+
// 执行节点(yield* 委托生成器,自动转发事件)
|
|
230
|
+
const nodeResult = yield* (0, node_executor_ts_1.executeNode)(node, ctx, ctx.emit);
|
|
231
|
+
result = {
|
|
232
|
+
...nodeResult,
|
|
233
|
+
nodeId: node.id,
|
|
234
|
+
nodeName: node.name,
|
|
235
|
+
nodeType: node.type,
|
|
236
|
+
startedAt,
|
|
237
|
+
finishedAt: Date.now(),
|
|
238
|
+
durationMs: Date.now() - startedAt,
|
|
239
|
+
};
|
|
240
|
+
// 存储节点输出
|
|
241
|
+
if (result.status === 'success') {
|
|
242
|
+
ctx.nodeOutputs.set(node.id, result.output);
|
|
243
|
+
}
|
|
244
|
+
break;
|
|
245
|
+
}
|
|
246
|
+
catch (err) {
|
|
247
|
+
lastError = err?.message || 'Node execution failed';
|
|
248
|
+
if (attempt < maxRetries) {
|
|
249
|
+
// P3: 发射重试事件
|
|
250
|
+
const retryEvent = {
|
|
251
|
+
type: 'node_start',
|
|
252
|
+
nodeId: node.id,
|
|
253
|
+
nodeName: node.name,
|
|
254
|
+
nodeType: node.type,
|
|
255
|
+
timestamp: Date.now(),
|
|
256
|
+
};
|
|
257
|
+
yield retryEvent;
|
|
258
|
+
ctx.emit(retryEvent);
|
|
259
|
+
// 等待重试延迟(指数退避)
|
|
260
|
+
const waitMs = delayMs * Math.pow(backoffFactor, attempt);
|
|
261
|
+
await sleep(waitMs);
|
|
262
|
+
}
|
|
263
|
+
}
|
|
264
|
+
}
|
|
265
|
+
if (!result) {
|
|
266
|
+
result = {
|
|
267
|
+
nodeId: node.id,
|
|
268
|
+
nodeName: node.name,
|
|
269
|
+
nodeType: node.type,
|
|
270
|
+
output: {},
|
|
271
|
+
status: 'error',
|
|
272
|
+
error: lastError || 'Unknown error',
|
|
273
|
+
durationMs: Date.now() - startedAt,
|
|
274
|
+
startedAt,
|
|
275
|
+
finishedAt: Date.now(),
|
|
276
|
+
};
|
|
277
|
+
}
|
|
278
|
+
// 发射 node_end 事件
|
|
279
|
+
const endEvent = {
|
|
280
|
+
type: 'node_end',
|
|
281
|
+
nodeId: node.id,
|
|
282
|
+
nodeName: node.name,
|
|
283
|
+
status: result.status,
|
|
284
|
+
durationMs: result.durationMs,
|
|
285
|
+
usage: result.usage,
|
|
286
|
+
timestamp: result.finishedAt,
|
|
287
|
+
};
|
|
288
|
+
yield endEvent;
|
|
289
|
+
ctx.emit(endEvent);
|
|
290
|
+
return result;
|
|
291
|
+
}
|
|
292
|
+
}
|
|
293
|
+
exports.WorkflowEngine = WorkflowEngine;
|
|
294
|
+
// ---- 辅助函数 ----
|
|
295
|
+
/** 拓扑排序 */
|
|
296
|
+
function topologicalSort(nodes, edges) {
|
|
297
|
+
const inDegree = new Map();
|
|
298
|
+
const adjacency = new Map();
|
|
299
|
+
for (const node of nodes) {
|
|
300
|
+
inDegree.set(node.id, 0);
|
|
301
|
+
adjacency.set(node.id, []);
|
|
302
|
+
}
|
|
303
|
+
for (const edge of edges) {
|
|
304
|
+
if (!adjacency.has(edge.source))
|
|
305
|
+
adjacency.set(edge.source, []);
|
|
306
|
+
if (!inDegree.has(edge.target))
|
|
307
|
+
inDegree.set(edge.target, 0);
|
|
308
|
+
adjacency.get(edge.source).push(edge.target);
|
|
309
|
+
inDegree.set(edge.target, (inDegree.get(edge.target) || 0) + 1);
|
|
310
|
+
}
|
|
311
|
+
const queue = [];
|
|
312
|
+
for (const [id, deg] of inDegree) {
|
|
313
|
+
if (deg === 0)
|
|
314
|
+
queue.push(id);
|
|
315
|
+
}
|
|
316
|
+
const result = [];
|
|
317
|
+
while (queue.length > 0) {
|
|
318
|
+
const id = queue.shift();
|
|
319
|
+
result.push(id);
|
|
320
|
+
const neighbors = adjacency.get(id) || [];
|
|
321
|
+
for (const neighbor of neighbors) {
|
|
322
|
+
const newDeg = (inDegree.get(neighbor) || 0) - 1;
|
|
323
|
+
inDegree.set(neighbor, newDeg);
|
|
324
|
+
if (newDeg === 0)
|
|
325
|
+
queue.push(neighbor);
|
|
326
|
+
}
|
|
327
|
+
}
|
|
328
|
+
// 检查环
|
|
329
|
+
if (result.length !== nodes.length) {
|
|
330
|
+
throw new Error('Workflow contains a cycle');
|
|
331
|
+
}
|
|
332
|
+
return result;
|
|
333
|
+
}
|
|
334
|
+
/** 合并多个 AbortSignal */
|
|
335
|
+
function mergeAbortSignals(...signals) {
|
|
336
|
+
const controller = new AbortController();
|
|
337
|
+
for (const signal of signals) {
|
|
338
|
+
if (signal.aborted) {
|
|
339
|
+
controller.abort();
|
|
340
|
+
return controller.signal;
|
|
341
|
+
}
|
|
342
|
+
signal.addEventListener('abort', () => controller.abort(), { once: true });
|
|
343
|
+
}
|
|
344
|
+
return controller.signal;
|
|
345
|
+
}
|
|
346
|
+
/** 睡眠 */
|
|
347
|
+
function sleep(ms) {
|
|
348
|
+
return new Promise(resolve => setTimeout(resolve, ms));
|
|
349
|
+
}
|
|
350
|
+
/**
|
|
351
|
+
* 解析变量引用:将 VariableValue 解析为实际值
|
|
352
|
+
* 支持 {{变量名}} 插值和 VariableRef 引用
|
|
353
|
+
*/
|
|
354
|
+
function resolveVariable(value, ctx) {
|
|
355
|
+
// 变量引用
|
|
356
|
+
if (typeof value === 'object' && value !== null && !Array.isArray(value) && 'nodeId' in value && 'field' in value) {
|
|
357
|
+
const ref = value;
|
|
358
|
+
const nodeOutput = ctx.nodeOutputs.get(ref.nodeId);
|
|
359
|
+
if (!nodeOutput)
|
|
360
|
+
return undefined;
|
|
361
|
+
return nodeOutput[ref.field];
|
|
362
|
+
}
|
|
363
|
+
// 数组递归解析
|
|
364
|
+
if (Array.isArray(value)) {
|
|
365
|
+
return value.map(v => resolveVariable(v, ctx));
|
|
366
|
+
}
|
|
367
|
+
// 对象递归解析
|
|
368
|
+
if (typeof value === 'object' && value !== null) {
|
|
369
|
+
const result = {};
|
|
370
|
+
for (const [key, val] of Object.entries(value)) {
|
|
371
|
+
result[key] = resolveVariable(val, ctx);
|
|
372
|
+
}
|
|
373
|
+
return result;
|
|
374
|
+
}
|
|
375
|
+
return value;
|
|
376
|
+
}
|
|
377
|
+
/**
|
|
378
|
+
* 模板插值:将 {{变量名}} 替换为实际值
|
|
379
|
+
* 变量名格式:nodeId.field 或 inputs.field
|
|
380
|
+
*/
|
|
381
|
+
function interpolateTemplate(template, ctx) {
|
|
382
|
+
return template.replace(/\{\{(\w+)\.(\w+)\}\}/g, (_, source, field) => {
|
|
383
|
+
if (source === 'inputs') {
|
|
384
|
+
return String(ctx.inputs[field] ?? '');
|
|
385
|
+
}
|
|
386
|
+
const nodeOutput = ctx.nodeOutputs.get(source);
|
|
387
|
+
if (nodeOutput) {
|
|
388
|
+
return String(nodeOutput[field] ?? '');
|
|
389
|
+
}
|
|
390
|
+
return '';
|
|
391
|
+
});
|
|
392
|
+
}
|
|
393
|
+
/**
|
|
394
|
+
* 解析对象中的所有变量引用和模板插值
|
|
395
|
+
*/
|
|
396
|
+
function resolveArgs(args, ctx) {
|
|
397
|
+
const result = {};
|
|
398
|
+
for (const [key, value] of Object.entries(args)) {
|
|
399
|
+
result[key] = resolveVariable(value, ctx);
|
|
400
|
+
}
|
|
401
|
+
return result;
|
|
402
|
+
}
|
|
403
|
+
//# sourceMappingURL=engine.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"engine.js","sourceRoot":"","sources":["../../../src/workflow/engine.ts"],"names":[],"mappings":";AAAA,+DAA+D;AAC/D,4BAA4B;AAC5B,+DAA+D;AAC/D,MAAM;AACN,mBAAmB;AACnB,gBAAgB;AAChB,mBAAmB;AACnB,YAAY;AACZ,+DAA+D;;;AAiZ/D,0CA2BC;AAMD,kDAcC;AAKD,kCASC;AAjcD,yDAAiD;AAEjD,YAAY;AACZ,MAAa,cAAc;IACzB;;;OAGG;IACH,KAAK,CAAC,CAAC,GAAG,CAAC,MAUV;QACC,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,WAAW,EAAE,GAAG,MAAM,CAAC;QACjD,MAAM,WAAW,GAAG,WAAW,IAAI,CAAC,GAAG,EAAE,IAAI,IAAI,CAAC,MAAM,EAAE,CAAC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|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// Workflow 模块导出
|
|
3
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
4
|
+
if (k2 === undefined) k2 = k;
|
|
5
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
6
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
7
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
8
|
+
}
|
|
9
|
+
Object.defineProperty(o, k2, desc);
|
|
10
|
+
}) : (function(o, m, k, k2) {
|
|
11
|
+
if (k2 === undefined) k2 = k;
|
|
12
|
+
o[k2] = m[k];
|
|
13
|
+
}));
|
|
14
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
15
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
16
|
+
};
|
|
17
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
+
__exportStar(require("./types.js"), exports);
|
|
19
|
+
__exportStar(require("./engine.js"), exports);
|
|
20
|
+
__exportStar(require("./node-executor.js"), exports);
|
|
21
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/workflow/index.ts"],"names":[],"mappings":";AAAA,gBAAgB;;;;;;;;;;;;;;;;AAEhB,6CAA2B;AAC3B,8CAA4B;AAC5B,qDAAmC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { WorkflowNode, WorkflowExecutionContext, NodeExecutionResult, WorkflowEvent } from './types.js';
|
|
2
|
+
/**
|
|
3
|
+
* 执行单个节点
|
|
4
|
+
*/
|
|
5
|
+
export declare function executeNode(node: WorkflowNode, ctx: WorkflowExecutionContext, emit: (event: WorkflowEvent) => void): AsyncGenerator<WorkflowEvent, NodeExecutionResult>;
|
|
6
|
+
/**
|
|
7
|
+
* P2: 从工具执行结果中提取产物信息
|
|
8
|
+
* 工具结果中可能包含产物 URL(如 /api/artifact/xxx)或 JSON 格式的产物信息
|
|
9
|
+
*/
|
|
10
|
+
export declare function extractArtifacts(toolName: string, result: string): Array<{
|
|
11
|
+
name: string;
|
|
12
|
+
type: string;
|
|
13
|
+
url: string;
|
|
14
|
+
size?: number;
|
|
15
|
+
tool?: string;
|
|
16
|
+
}>;
|
|
17
|
+
//# sourceMappingURL=node-executor.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"node-executor.d.ts","sourceRoot":"","sources":["../../../src/workflow/node-executor.ts"],"names":[],"mappings":"AAcA,OAAO,KAAK,EACV,YAAY,EACZ,wBAAwB,EACxB,mBAAmB,EACnB,aAAa,EAYd,MAAM,YAAY,CAAC;AAGpB;;GAEG;AACH,wBAAuB,WAAW,CAChC,IAAI,EAAE,YAAY,EAClB,GAAG,EAAE,wBAAwB,EAC7B,IAAI,EAAE,CAAC,KAAK,EAAE,aAAa,KAAK,IAAI,GACnC,cAAc,CAAC,aAAa,EAAE,mBAAmB,CAAC,CA+BpD;AA0oBD;;;GAGG;AACH,wBAAgB,gBAAgB,CAC9B,QAAQ,EAAE,MAAM,EAChB,MAAM,EAAE,MAAM,GACb,KAAK,CAAC;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,GAAG,EAAE,MAAM,CAAC;IAAC,IAAI,CAAC,EAAE,MAAM,CAAC;IAAC,IAAI,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC,CA8ClF"}
|