@fieldwangai/agentflow 0.1.25
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/LICENSE +21 -0
- package/README.md +201 -0
- package/README.zh-CN.md +201 -0
- package/agents/agentflow-node-executor-code.md +32 -0
- package/agents/agentflow-node-executor-planning.md +32 -0
- package/agents/agentflow-node-executor-requirement.md +32 -0
- package/agents/agentflow-node-executor-test.md +32 -0
- package/agents/agentflow-node-executor-ui.md +32 -0
- package/agents/agentflow-node-executor.md +32 -0
- package/agents/agents.json +8 -0
- package/agents/en/agentflow-node-executor.md +32 -0
- package/agents/zh/agentflow-node-executor.md +32 -0
- package/bin/agentflow.mjs +52 -0
- package/bin/ensure-workspace-reference.mjs +35 -0
- package/bin/lib/agent-runners.mjs +1199 -0
- package/bin/lib/agents-path.mjs +61 -0
- package/bin/lib/api-runner.mjs +361 -0
- package/bin/lib/apply.mjs +852 -0
- package/bin/lib/catalog-agents.mjs +300 -0
- package/bin/lib/catalog-flows.mjs +532 -0
- package/bin/lib/composer-agent.mjs +884 -0
- package/bin/lib/composer-flow-instances.mjs +68 -0
- package/bin/lib/composer-flow-skeleton.mjs +334 -0
- package/bin/lib/composer-flow-validate.mjs +47 -0
- package/bin/lib/composer-log.mjs +197 -0
- package/bin/lib/composer-model-router.mjs +160 -0
- package/bin/lib/composer-node-schema.mjs +299 -0
- package/bin/lib/composer-planner.mjs +749 -0
- package/bin/lib/composer-script-ops.mjs +233 -0
- package/bin/lib/composer-skill-router.mjs +384 -0
- package/bin/lib/flow-import.mjs +305 -0
- package/bin/lib/flow-normalize.mjs +71 -0
- package/bin/lib/flow-write.mjs +395 -0
- package/bin/lib/help.mjs +139 -0
- package/bin/lib/hub-login.mjs +54 -0
- package/bin/lib/hub-publish.mjs +159 -0
- package/bin/lib/hub-remote.mjs +189 -0
- package/bin/lib/hub.mjs +299 -0
- package/bin/lib/i18n.mjs +233 -0
- package/bin/lib/locales/en.json +344 -0
- package/bin/lib/locales/zh.json +344 -0
- package/bin/lib/log.mjs +37 -0
- package/bin/lib/main.mjs +611 -0
- package/bin/lib/model-config.mjs +118 -0
- package/bin/lib/model-lists.mjs +188 -0
- package/bin/lib/node-exec-context.mjs +336 -0
- package/bin/lib/node-execute.mjs +513 -0
- package/bin/lib/normalize-node-tool-command.mjs +97 -0
- package/bin/lib/paths.mjs +216 -0
- package/bin/lib/pipeline-scripts.mjs +41 -0
- package/bin/lib/recent-runs.mjs +173 -0
- package/bin/lib/run-apply-active-lock.mjs +82 -0
- package/bin/lib/run-events.mjs +85 -0
- package/bin/lib/run-node-statuses-from-disk.mjs +85 -0
- package/bin/lib/schedule-config.mjs +227 -0
- package/bin/lib/scheduler.mjs +312 -0
- package/bin/lib/table.mjs +4 -0
- package/bin/lib/terminal.mjs +42 -0
- package/bin/lib/ui-print.mjs +94 -0
- package/bin/lib/ui-server.mjs +2113 -0
- package/bin/lib/workspace-tree.mjs +266 -0
- package/bin/lib/workspace.mjs +180 -0
- package/bin/pipeline/build-node-prompt.mjs +179 -0
- package/bin/pipeline/check-cache.mjs +191 -0
- package/bin/pipeline/check-flow.mjs +543 -0
- package/bin/pipeline/collect-nodes.mjs +212 -0
- package/bin/pipeline/compute-cache-md5.mjs +177 -0
- package/bin/pipeline/ensure-run-dir.mjs +71 -0
- package/bin/pipeline/extract-thinking.mjs +308 -0
- package/bin/pipeline/gc.mjs +129 -0
- package/bin/pipeline/get-env.mjs +83 -0
- package/bin/pipeline/get-exec-id.mjs +145 -0
- package/bin/pipeline/get-ready-nodes.mjs +435 -0
- package/bin/pipeline/get-resolved-values.mjs +337 -0
- package/bin/pipeline/load-key.mjs +62 -0
- package/bin/pipeline/parse-bool.mjs +33 -0
- package/bin/pipeline/parse-flow.mjs +698 -0
- package/bin/pipeline/post-process-control-if.mjs +23 -0
- package/bin/pipeline/post-process-node.mjs +490 -0
- package/bin/pipeline/pre-process-node.mjs +449 -0
- package/bin/pipeline/resolve-inputs.mjs +201 -0
- package/bin/pipeline/run-log.mjs +34 -0
- package/bin/pipeline/run-tool-nodejs.mjs +160 -0
- package/bin/pipeline/save-key.mjs +93 -0
- package/bin/pipeline/snapshot-prior-round.mjs +70 -0
- package/bin/pipeline/validate-flow.mjs +825 -0
- package/bin/pipeline/validate-for-ui.mjs +226 -0
- package/bin/pipeline/validate-script-output.mjs +130 -0
- package/bin/pipeline/write-result.mjs +182 -0
- package/builtin/nodes/agent_subAgent.md +14 -0
- package/builtin/nodes/control_agent_toBool.md +20 -0
- package/builtin/nodes/control_anyOne.md +17 -0
- package/builtin/nodes/control_end.md +11 -0
- package/builtin/nodes/control_if.md +20 -0
- package/builtin/nodes/control_start.md +11 -0
- package/builtin/nodes/control_toBool.md +21 -0
- package/builtin/nodes/provide_file.md +11 -0
- package/builtin/nodes/provide_str.md +11 -0
- package/builtin/nodes/tool_get_env.md +14 -0
- package/builtin/nodes/tool_load_key.md +20 -0
- package/builtin/nodes/tool_nodejs.md +40 -0
- package/builtin/nodes/tool_print.md +14 -0
- package/builtin/nodes/tool_save_key.md +20 -0
- package/builtin/nodes/tool_user_ask.md +23 -0
- package/builtin/nodes/tool_user_check.md +22 -0
- package/builtin/pipelines/module-migrate/flow.yaml +819 -0
- package/builtin/pipelines/module-migrate/scripts/check_imports.mjs +700 -0
- package/builtin/pipelines/module-migrate/scripts/node_modules/tree-sitter-kotlin/build/Makefile +362 -0
- package/builtin/pipelines/module-migrate/scripts/node_modules/tree-sitter-kotlin/build/Release/.deps/Release/obj.target/node_modules/node-addon-api/node_addon_api_except.stamp.d +1 -0
- package/builtin/pipelines/module-migrate/scripts/node_modules/tree-sitter-kotlin/build/Release/.deps/Release/obj.target/tree_sitter_kotlin_binding/bindings/node/binding.o.d +17 -0
- package/builtin/pipelines/module-migrate/scripts/node_modules/tree-sitter-kotlin/build/Release/.deps/Release/obj.target/tree_sitter_kotlin_binding/src/parser.o.d +5 -0
- package/builtin/pipelines/module-migrate/scripts/node_modules/tree-sitter-kotlin/build/Release/.deps/Release/obj.target/tree_sitter_kotlin_binding/src/scanner.o.d +8 -0
- package/builtin/pipelines/module-migrate/scripts/node_modules/tree-sitter-kotlin/build/Release/.deps/Release/tree_sitter_kotlin_binding.node.d +1 -0
- package/builtin/pipelines/module-migrate/scripts/node_modules/tree-sitter-kotlin/build/Release/obj.target/node_modules/node-addon-api/node_addon_api_except.stamp +0 -0
- package/builtin/pipelines/module-migrate/scripts/node_modules/tree-sitter-kotlin/build/Release/obj.target/tree_sitter_kotlin_binding/bindings/node/binding.o +0 -0
- package/builtin/pipelines/module-migrate/scripts/node_modules/tree-sitter-kotlin/build/Release/obj.target/tree_sitter_kotlin_binding/src/parser.o +0 -0
- package/builtin/pipelines/module-migrate/scripts/node_modules/tree-sitter-kotlin/build/Release/obj.target/tree_sitter_kotlin_binding/src/scanner.o +0 -0
- package/builtin/pipelines/module-migrate/scripts/node_modules/tree-sitter-kotlin/build/Release/tree_sitter_kotlin_binding.node +0 -0
- package/builtin/pipelines/module-migrate/scripts/node_modules/tree-sitter-kotlin/build/binding.Makefile +6 -0
- package/builtin/pipelines/module-migrate/scripts/node_modules/tree-sitter-kotlin/build/gyp-mac-tool +768 -0
- package/builtin/pipelines/module-migrate/scripts/node_modules/tree-sitter-kotlin/build/node_modules/node-addon-api/node_addon_api.Makefile +6 -0
- package/builtin/pipelines/module-migrate/scripts/node_modules/tree-sitter-kotlin/build/node_modules/node-addon-api/node_addon_api.target.mk +122 -0
- package/builtin/pipelines/module-migrate/scripts/node_modules/tree-sitter-kotlin/build/node_modules/node-addon-api/node_addon_api_except.target.mk +126 -0
- package/builtin/pipelines/module-migrate/scripts/node_modules/tree-sitter-kotlin/build/node_modules/node-addon-api/node_addon_api_maybe.target.mk +122 -0
- package/builtin/pipelines/module-migrate/scripts/node_modules/tree-sitter-kotlin/build/tree_sitter_kotlin_binding.target.mk +203 -0
- package/builtin/pipelines/new/flow.yaml +545 -0
- package/builtin/pipelines/new/scripts/check-flow.mjs +9 -0
- package/builtin/pipelines/new/scripts/collect-nodes.mjs +211 -0
- package/builtin/pipelines/scripts/adjust-node-positions.mjs +113 -0
- package/builtin/web-ui/dist/agentflow-icon.svg +23 -0
- package/builtin/web-ui/dist/assets/index-CZkUPcXE.css +1 -0
- package/builtin/web-ui/dist/assets/index-DkkhNESc.js +190 -0
- package/builtin/web-ui/dist/index.html +24 -0
- package/package.json +67 -0
- package/reference/flow-control-capabilities.md +274 -0
- package/reference/flow-layout.md +84 -0
- package/reference/flow-prompt-handler-check.md +12 -0
- package/reference/flow-result-semantics.md +14 -0
|
@@ -0,0 +1,545 @@
|
|
|
1
|
+
instances:
|
|
2
|
+
control_start_new:
|
|
3
|
+
definitionId: control_start
|
|
4
|
+
label: Start
|
|
5
|
+
role: normal
|
|
6
|
+
input: []
|
|
7
|
+
output:
|
|
8
|
+
- type: node
|
|
9
|
+
name: next
|
|
10
|
+
value: ""
|
|
11
|
+
body: |
|
|
12
|
+
流程入口
|
|
13
|
+
agent_plan:
|
|
14
|
+
definitionId: agent_subAgent
|
|
15
|
+
label: Plan Nodes
|
|
16
|
+
role: planning
|
|
17
|
+
input:
|
|
18
|
+
- type: node
|
|
19
|
+
name: prev
|
|
20
|
+
value: ""
|
|
21
|
+
- type: file
|
|
22
|
+
name: nodes.md
|
|
23
|
+
value: ""
|
|
24
|
+
- type: text
|
|
25
|
+
name: message
|
|
26
|
+
value: ""
|
|
27
|
+
- type: file
|
|
28
|
+
name: flow.yaml
|
|
29
|
+
value: ""
|
|
30
|
+
output:
|
|
31
|
+
- type: node
|
|
32
|
+
name: next
|
|
33
|
+
value: ""
|
|
34
|
+
- type: file
|
|
35
|
+
name: plan.md
|
|
36
|
+
value: ""
|
|
37
|
+
- type: text
|
|
38
|
+
name: newFlow
|
|
39
|
+
value: ""
|
|
40
|
+
body: |
|
|
41
|
+
用户描述的Requirements为:${message}。结合现有节点信息 ${nodes.md},及流程参考 ${flow.yaml}。Plan Nodes图并输出为 ${plan.md},供用户先确认。
|
|
42
|
+
新建的 flow 名称保存到 ${newFlow}。该名称须与 agentflow list 列出的已有 pipeline 不同(不可重复)。
|
|
43
|
+
注意:内置节点的 instance 应保持和原始 node 元数据一致(尤其是 description)。
|
|
44
|
+
agent_create:
|
|
45
|
+
definitionId: agent_subAgent
|
|
46
|
+
label: Create Flow
|
|
47
|
+
role: normal
|
|
48
|
+
input:
|
|
49
|
+
- type: node
|
|
50
|
+
name: prev
|
|
51
|
+
value: ""
|
|
52
|
+
- type: file
|
|
53
|
+
name: plan.md
|
|
54
|
+
value: ""
|
|
55
|
+
- type: file
|
|
56
|
+
name: layout.md
|
|
57
|
+
value: ""
|
|
58
|
+
- type: text
|
|
59
|
+
name: newFlow
|
|
60
|
+
value: ""
|
|
61
|
+
output:
|
|
62
|
+
- type: node
|
|
63
|
+
name: next
|
|
64
|
+
value: ""
|
|
65
|
+
- type: file
|
|
66
|
+
name: script.md
|
|
67
|
+
value: ""
|
|
68
|
+
body: |
|
|
69
|
+
基于 ${plan.md} 在 ~/agentflow/pipelines/${newFlow}/ 下**必须生成并写入** flow.yaml(不存在则创建,已存在则按规划覆盖):
|
|
70
|
+
节点布局参考 ${layout.md},避免节点排成一条线。
|
|
71
|
+
若有脚本需实现,将脚本路径与功能说明写入 ${script.md},供下游 agent 实现代码,本节点 **不** 书写代码。
|
|
72
|
+
control_end_new:
|
|
73
|
+
definitionId: control_end
|
|
74
|
+
label: End
|
|
75
|
+
role: normal
|
|
76
|
+
input:
|
|
77
|
+
- type: node
|
|
78
|
+
name: prev
|
|
79
|
+
value: ""
|
|
80
|
+
output: []
|
|
81
|
+
body: |
|
|
82
|
+
新建流程的出口。
|
|
83
|
+
provide_skills_file:
|
|
84
|
+
definitionId: provide_file
|
|
85
|
+
label: Layout Skills
|
|
86
|
+
role: normal
|
|
87
|
+
input: []
|
|
88
|
+
output:
|
|
89
|
+
- type: file
|
|
90
|
+
name: value
|
|
91
|
+
value: ~/agentflow/reference/flow-layout.md
|
|
92
|
+
body: ""
|
|
93
|
+
provide_requirement:
|
|
94
|
+
definitionId: provide_str
|
|
95
|
+
label: Requirements
|
|
96
|
+
role: normal
|
|
97
|
+
input: []
|
|
98
|
+
output:
|
|
99
|
+
- type: text
|
|
100
|
+
name: value
|
|
101
|
+
value: 将AI_Workspace中个daily流程(几个source和一个summary)改造成agentflow流程
|
|
102
|
+
body: ""
|
|
103
|
+
agent_fix:
|
|
104
|
+
definitionId: agent_subAgent
|
|
105
|
+
label: Fix Nodes
|
|
106
|
+
role: planning
|
|
107
|
+
input:
|
|
108
|
+
- type: node
|
|
109
|
+
name: prev
|
|
110
|
+
value: ""
|
|
111
|
+
- type: file
|
|
112
|
+
name: err.md
|
|
113
|
+
value: ""
|
|
114
|
+
- type: file
|
|
115
|
+
name: err2.md
|
|
116
|
+
value: ""
|
|
117
|
+
output:
|
|
118
|
+
- type: node
|
|
119
|
+
name: next
|
|
120
|
+
value: ""
|
|
121
|
+
body: |
|
|
122
|
+
修复${err.md} 及 ${err2.md} 中提到的问题
|
|
123
|
+
agent_implement_script:
|
|
124
|
+
definitionId: agent_subAgent
|
|
125
|
+
label: Complete Code
|
|
126
|
+
role: code
|
|
127
|
+
input:
|
|
128
|
+
- type: node
|
|
129
|
+
name: prev
|
|
130
|
+
value: ""
|
|
131
|
+
- type: file
|
|
132
|
+
name: code.md
|
|
133
|
+
value: ""
|
|
134
|
+
output:
|
|
135
|
+
- type: node
|
|
136
|
+
name: next
|
|
137
|
+
value: ""
|
|
138
|
+
body: |
|
|
139
|
+
实现 ${code.md} 中提到要写的代码。
|
|
140
|
+
tool_user_check:
|
|
141
|
+
definitionId: tool_user_check
|
|
142
|
+
label: UserCheck
|
|
143
|
+
role: normal
|
|
144
|
+
input:
|
|
145
|
+
- type: node
|
|
146
|
+
name: prev
|
|
147
|
+
value: ""
|
|
148
|
+
- type: file
|
|
149
|
+
name: check.md
|
|
150
|
+
value: ""
|
|
151
|
+
output:
|
|
152
|
+
- type: node
|
|
153
|
+
name: next
|
|
154
|
+
value: ""
|
|
155
|
+
body: |
|
|
156
|
+
提示用户 确认 ${check.md}
|
|
157
|
+
control_anyOne:
|
|
158
|
+
definitionId: control_anyOne
|
|
159
|
+
label: AnyOne
|
|
160
|
+
role: normal
|
|
161
|
+
input:
|
|
162
|
+
- type: node
|
|
163
|
+
name: prev1
|
|
164
|
+
value: ""
|
|
165
|
+
- type: node
|
|
166
|
+
name: prev2
|
|
167
|
+
value: ""
|
|
168
|
+
output:
|
|
169
|
+
- type: node
|
|
170
|
+
name: next
|
|
171
|
+
value: ""
|
|
172
|
+
provide_flow:
|
|
173
|
+
definitionId: provide_file
|
|
174
|
+
label: Flows Skills
|
|
175
|
+
role: normal
|
|
176
|
+
input: []
|
|
177
|
+
output:
|
|
178
|
+
- type: file
|
|
179
|
+
name: value
|
|
180
|
+
value: ~/agentflow/reference/flow-control-capabilities.md
|
|
181
|
+
provide_newFlow_key_save:
|
|
182
|
+
definitionId: provide_str
|
|
183
|
+
label: FlowKeyName
|
|
184
|
+
role: normal
|
|
185
|
+
input: []
|
|
186
|
+
output:
|
|
187
|
+
- type: text
|
|
188
|
+
name: value
|
|
189
|
+
value: newFlow
|
|
190
|
+
body: ""
|
|
191
|
+
provide_newFlow_key_load:
|
|
192
|
+
definitionId: provide_str
|
|
193
|
+
label: FlowKeyName
|
|
194
|
+
role: normal
|
|
195
|
+
input: []
|
|
196
|
+
output:
|
|
197
|
+
- type: text
|
|
198
|
+
name: value
|
|
199
|
+
value: newFlow
|
|
200
|
+
body: ""
|
|
201
|
+
collectNode:
|
|
202
|
+
definitionId: tool_nodejs
|
|
203
|
+
label: 收集Nodes
|
|
204
|
+
description: "|"
|
|
205
|
+
role: normal
|
|
206
|
+
input:
|
|
207
|
+
- type: node
|
|
208
|
+
name: prev
|
|
209
|
+
value: ""
|
|
210
|
+
output:
|
|
211
|
+
- type: node
|
|
212
|
+
name: next
|
|
213
|
+
value: ""
|
|
214
|
+
- type: file
|
|
215
|
+
name: result
|
|
216
|
+
value: ""
|
|
217
|
+
script: agentflow apply -ai collect-nodes ${workspaceRoot} ${flowName} ${result}
|
|
218
|
+
body: agentflow apply -ai collect-nodes ${workspaceRoot} ${flowName} ${result}
|
|
219
|
+
agent_ai_check_tool:
|
|
220
|
+
definitionId: agent_subAgent
|
|
221
|
+
label: AI检查
|
|
222
|
+
role: normal
|
|
223
|
+
input:
|
|
224
|
+
- type: node
|
|
225
|
+
name: prev
|
|
226
|
+
value: ""
|
|
227
|
+
- type: file
|
|
228
|
+
name: check.md
|
|
229
|
+
value: ""
|
|
230
|
+
- type: text
|
|
231
|
+
name: newFlow
|
|
232
|
+
value: ""
|
|
233
|
+
output:
|
|
234
|
+
- type: node
|
|
235
|
+
name: next
|
|
236
|
+
value: ""
|
|
237
|
+
- type: file
|
|
238
|
+
name: result.md
|
|
239
|
+
value: ""
|
|
240
|
+
body: |
|
|
241
|
+
利用 ${check.md} 检查流水线(${newFlow})是否正常,将检查报告写入${result.md}
|
|
242
|
+
AI_CHECK_FILE:
|
|
243
|
+
definitionId: provide_file
|
|
244
|
+
label: AICheckFile
|
|
245
|
+
role: normal
|
|
246
|
+
input: []
|
|
247
|
+
output:
|
|
248
|
+
- type: file
|
|
249
|
+
name: value
|
|
250
|
+
value: ~/agentflow/reference/flow-prompt-handler-check.md
|
|
251
|
+
save_flow_name:
|
|
252
|
+
definitionId: tool_save_key
|
|
253
|
+
label: SaveFlowName
|
|
254
|
+
description: "由 agentflow apply 流程内部执行。命令:agentflow apply -ai run-tool-nodejs <workspaceRoot> <flowName> <uuid> <instanceId> <execId> -- node <path>/save-key.mjs <workspaceRoot> <flowName> <uuid> <key> <value>。返回(stdout 一行 JSON):{ \\\"err_code\\\": 0, \\\"message\\\": { \\\"result\\\": \\\"<写入的 value>\\\" } }(err_code 0=成功 1=失败)。"
|
|
255
|
+
role: normal
|
|
256
|
+
input:
|
|
257
|
+
- type: node
|
|
258
|
+
name: prev
|
|
259
|
+
value: ""
|
|
260
|
+
- type: text
|
|
261
|
+
name: key
|
|
262
|
+
value: newFlow
|
|
263
|
+
- type: text
|
|
264
|
+
name: value
|
|
265
|
+
value: ""
|
|
266
|
+
output: []
|
|
267
|
+
loadFlowKey:
|
|
268
|
+
definitionId: tool_load_key
|
|
269
|
+
label: LoadFlowName
|
|
270
|
+
description: "由 agentflow apply 流程内部执行。命令:agentflow apply -ai run-tool-nodejs <workspaceRoot> <flowName> <uuid> <instanceId> <execId> -- node <path>/load-key.mjs <workspaceRoot> <flowName> <uuid> <key>。返回(stdout 一行 JSON):{ \\\"err_code\\\": 0, \\\"message\\\": { \\\"result\\\": \\\"<value>\\\" } }(err_code 0=成功 1=失败);result 写入节点的 result 槽位。"
|
|
271
|
+
role: normal
|
|
272
|
+
input:
|
|
273
|
+
- type: text
|
|
274
|
+
name: key
|
|
275
|
+
value: newFlow
|
|
276
|
+
output:
|
|
277
|
+
- type: text
|
|
278
|
+
name: result
|
|
279
|
+
value: ""
|
|
280
|
+
tool_check_flow:
|
|
281
|
+
definitionId: tool_nodejs
|
|
282
|
+
label: Flow脚本检查
|
|
283
|
+
description: "|"
|
|
284
|
+
role: normal
|
|
285
|
+
input:
|
|
286
|
+
- type: node
|
|
287
|
+
name: prev
|
|
288
|
+
value: ""
|
|
289
|
+
- type: text
|
|
290
|
+
name: newFlow
|
|
291
|
+
value: ""
|
|
292
|
+
output:
|
|
293
|
+
- type: node
|
|
294
|
+
name: next
|
|
295
|
+
value: ""
|
|
296
|
+
- type: file
|
|
297
|
+
name: result
|
|
298
|
+
value: ""
|
|
299
|
+
body: |-
|
|
300
|
+
执行:agentflow apply -ai validate-flow ${workspaceRoot} ${newFlow}。需要检查的 flow 为:${newFlow}。
|
|
301
|
+
校验不通过时,由后续节点修复;本节点状态仍为 success。
|
|
302
|
+
control_if_check:
|
|
303
|
+
definitionId: control_if
|
|
304
|
+
label: Ifcheck
|
|
305
|
+
role: normal
|
|
306
|
+
input:
|
|
307
|
+
- type: node
|
|
308
|
+
name: prev
|
|
309
|
+
value: ""
|
|
310
|
+
- type: bool
|
|
311
|
+
name: prediction
|
|
312
|
+
value: ""
|
|
313
|
+
output:
|
|
314
|
+
- type: node
|
|
315
|
+
name: next1
|
|
316
|
+
value: ""
|
|
317
|
+
- type: node
|
|
318
|
+
name: next2
|
|
319
|
+
value: ""
|
|
320
|
+
body: ""
|
|
321
|
+
control_toBool_check:
|
|
322
|
+
definitionId: control_toBool
|
|
323
|
+
label: ToBoolCheck
|
|
324
|
+
role: normal
|
|
325
|
+
input:
|
|
326
|
+
- type: node
|
|
327
|
+
name: prev
|
|
328
|
+
value: ""
|
|
329
|
+
- type: file
|
|
330
|
+
name: err.md
|
|
331
|
+
value: ""
|
|
332
|
+
- type: file
|
|
333
|
+
name: err2.md
|
|
334
|
+
value: ""
|
|
335
|
+
output:
|
|
336
|
+
- type: node
|
|
337
|
+
name: next
|
|
338
|
+
value: ""
|
|
339
|
+
- type: bool
|
|
340
|
+
name: prediction
|
|
341
|
+
value: ""
|
|
342
|
+
body: 检查 ${err.md} 和 ${err2.md} 都无问题为true,任一有问题则为 false
|
|
343
|
+
edges:
|
|
344
|
+
- source: provide_skills_file
|
|
345
|
+
target: agent_create
|
|
346
|
+
sourceHandle: output-0
|
|
347
|
+
targetHandle: input-2
|
|
348
|
+
- source: agent_plan
|
|
349
|
+
target: agent_create
|
|
350
|
+
sourceHandle: output-1
|
|
351
|
+
targetHandle: input-1
|
|
352
|
+
- source: agent_plan
|
|
353
|
+
target: agent_create
|
|
354
|
+
sourceHandle: output-2
|
|
355
|
+
targetHandle: input-3
|
|
356
|
+
- source: provide_requirement
|
|
357
|
+
target: agent_plan
|
|
358
|
+
sourceHandle: output-0
|
|
359
|
+
targetHandle: input-2
|
|
360
|
+
- source: agent_create
|
|
361
|
+
target: agent_implement_script
|
|
362
|
+
sourceHandle: output-0
|
|
363
|
+
targetHandle: input-0
|
|
364
|
+
- source: agent_create
|
|
365
|
+
target: agent_implement_script
|
|
366
|
+
sourceHandle: output-1
|
|
367
|
+
targetHandle: input-1
|
|
368
|
+
- source: agent_plan
|
|
369
|
+
target: tool_user_check
|
|
370
|
+
sourceHandle: output-0
|
|
371
|
+
targetHandle: input-0
|
|
372
|
+
- source: tool_user_check
|
|
373
|
+
target: agent_create
|
|
374
|
+
sourceHandle: output-0
|
|
375
|
+
targetHandle: input-0
|
|
376
|
+
- source: agent_plan
|
|
377
|
+
target: tool_user_check
|
|
378
|
+
sourceHandle: output-1
|
|
379
|
+
targetHandle: input-1
|
|
380
|
+
- source: agent_fix
|
|
381
|
+
target: control_anyOne
|
|
382
|
+
sourceHandle: output-0
|
|
383
|
+
targetHandle: input-1
|
|
384
|
+
- source: agent_implement_script
|
|
385
|
+
target: control_anyOne
|
|
386
|
+
sourceHandle: output-0
|
|
387
|
+
targetHandle: input-0
|
|
388
|
+
- source: provide_flow
|
|
389
|
+
target: agent_plan
|
|
390
|
+
sourceHandle: output-0
|
|
391
|
+
targetHandle: input-3
|
|
392
|
+
- source: control_start_new
|
|
393
|
+
target: collectNode
|
|
394
|
+
sourceHandle: output-0
|
|
395
|
+
targetHandle: input-0
|
|
396
|
+
- source: collectNode
|
|
397
|
+
target: agent_plan
|
|
398
|
+
sourceHandle: output-1
|
|
399
|
+
targetHandle: input-1
|
|
400
|
+
- source: collectNode
|
|
401
|
+
target: agent_plan
|
|
402
|
+
sourceHandle: output-0
|
|
403
|
+
targetHandle: input-0
|
|
404
|
+
- source: AI_CHECK_FILE
|
|
405
|
+
target: agent_ai_check_tool
|
|
406
|
+
sourceHandle: output-0
|
|
407
|
+
targetHandle: input-1
|
|
408
|
+
- source: control_anyOne
|
|
409
|
+
target: agent_ai_check_tool
|
|
410
|
+
sourceHandle: output-0
|
|
411
|
+
targetHandle: input-0
|
|
412
|
+
- source: agent_ai_check_tool
|
|
413
|
+
target: agent_fix
|
|
414
|
+
sourceHandle: output-1
|
|
415
|
+
targetHandle: input-2
|
|
416
|
+
- source: tool_user_check
|
|
417
|
+
target: save_flow_name
|
|
418
|
+
sourceHandle: output-0
|
|
419
|
+
targetHandle: input-0
|
|
420
|
+
- source: agent_plan
|
|
421
|
+
target: save_flow_name
|
|
422
|
+
sourceHandle: output-2
|
|
423
|
+
targetHandle: input-2
|
|
424
|
+
- source: provide_newFlow_key_save
|
|
425
|
+
target: save_flow_name
|
|
426
|
+
sourceHandle: output-0
|
|
427
|
+
targetHandle: input-1
|
|
428
|
+
- source: provide_newFlow_key_load
|
|
429
|
+
target: loadFlowKey
|
|
430
|
+
sourceHandle: output-0
|
|
431
|
+
targetHandle: input-0
|
|
432
|
+
- source: loadFlowKey
|
|
433
|
+
target: agent_ai_check_tool
|
|
434
|
+
sourceHandle: output-0
|
|
435
|
+
targetHandle: input-2
|
|
436
|
+
- source: loadFlowKey
|
|
437
|
+
target: tool_check_flow
|
|
438
|
+
sourceHandle: output-0
|
|
439
|
+
targetHandle: input-1
|
|
440
|
+
- source: control_anyOne
|
|
441
|
+
target: tool_check_flow
|
|
442
|
+
sourceHandle: output-0
|
|
443
|
+
targetHandle: input-0
|
|
444
|
+
- source: tool_check_flow
|
|
445
|
+
target: agent_fix
|
|
446
|
+
sourceHandle: output-1
|
|
447
|
+
targetHandle: input-1
|
|
448
|
+
- source: tool_check_flow
|
|
449
|
+
target: control_toBool_check
|
|
450
|
+
sourceHandle: output-1
|
|
451
|
+
targetHandle: input-1
|
|
452
|
+
- source: agent_ai_check_tool
|
|
453
|
+
target: control_toBool_check
|
|
454
|
+
sourceHandle: output-1
|
|
455
|
+
targetHandle: input-2
|
|
456
|
+
- source: tool_check_flow
|
|
457
|
+
target: control_toBool_check
|
|
458
|
+
sourceHandle: output-0
|
|
459
|
+
targetHandle: input-0
|
|
460
|
+
- source: agent_ai_check_tool
|
|
461
|
+
target: control_toBool_check
|
|
462
|
+
sourceHandle: output-0
|
|
463
|
+
targetHandle: input-0
|
|
464
|
+
- source: control_toBool_check
|
|
465
|
+
target: control_if_check
|
|
466
|
+
sourceHandle: output-0
|
|
467
|
+
targetHandle: input-0
|
|
468
|
+
- source: control_toBool_check
|
|
469
|
+
target: control_if_check
|
|
470
|
+
sourceHandle: output-1
|
|
471
|
+
targetHandle: input-1
|
|
472
|
+
- source: control_if_check
|
|
473
|
+
target: control_end_new
|
|
474
|
+
sourceHandle: output-0
|
|
475
|
+
targetHandle: input-0
|
|
476
|
+
- source: control_if_check
|
|
477
|
+
target: agent_fix
|
|
478
|
+
sourceHandle: output-1
|
|
479
|
+
targetHandle: input-0
|
|
480
|
+
ui:
|
|
481
|
+
nodePositions:
|
|
482
|
+
control_start_new:
|
|
483
|
+
x: -524.0221500316359
|
|
484
|
+
"y": 69.29933116119443
|
|
485
|
+
agent_plan:
|
|
486
|
+
x: -12.533299879007767
|
|
487
|
+
"y": 186.57684421816793
|
|
488
|
+
agent_create:
|
|
489
|
+
x: 308.99314801580965
|
|
490
|
+
"y": 217.2843329442596
|
|
491
|
+
control_end_new:
|
|
492
|
+
x: 1471.8052088229888
|
|
493
|
+
"y": 254.85582797003843
|
|
494
|
+
provide_skills_file:
|
|
495
|
+
x: 120
|
|
496
|
+
"y": 217.2843329442596
|
|
497
|
+
provide_requirement:
|
|
498
|
+
x: -263.595905131459
|
|
499
|
+
"y": 276.4850011544905
|
|
500
|
+
agent_fix:
|
|
501
|
+
x: 775.615715499502
|
|
502
|
+
"y": 469.0169259909583
|
|
503
|
+
agent_implement_script:
|
|
504
|
+
x: 489.43515105233405
|
|
505
|
+
"y": 216.95726539220158
|
|
506
|
+
tool_user_check:
|
|
507
|
+
x: 161.4995421112628
|
|
508
|
+
"y": 137.98256383520896
|
|
509
|
+
control_anyOne:
|
|
510
|
+
x: 661.6143763748839
|
|
511
|
+
"y": 221.22446541312343
|
|
512
|
+
provide_flow:
|
|
513
|
+
x: -258.73821498428885
|
|
514
|
+
"y": 351.00016245846024
|
|
515
|
+
provide_newFlow_key_save:
|
|
516
|
+
x: 50
|
|
517
|
+
"y": 380
|
|
518
|
+
provide_newFlow_key_load:
|
|
519
|
+
x: 400
|
|
520
|
+
"y": 100
|
|
521
|
+
collectNode:
|
|
522
|
+
x: -253.75940968202514
|
|
523
|
+
"y": 11.90795223444617
|
|
524
|
+
agent_ai_check_tool:
|
|
525
|
+
x: 885.7119294568562
|
|
526
|
+
"y": 210.76075573821723
|
|
527
|
+
AI_CHECK_FILE:
|
|
528
|
+
x: 729.4743614102706
|
|
529
|
+
"y": 306.2856185194921
|
|
530
|
+
save_flow_name:
|
|
531
|
+
x: 207.84153217267578
|
|
532
|
+
"y": 383.15812857607636
|
|
533
|
+
loadFlowKey:
|
|
534
|
+
x: 619.6461494834679
|
|
535
|
+
"y": 102.5505010541772
|
|
536
|
+
tool_check_flow:
|
|
537
|
+
x: 882.2732188144741
|
|
538
|
+
"y": 116.9437357066682
|
|
539
|
+
control_if_check:
|
|
540
|
+
x: 1280.956507038537
|
|
541
|
+
"y": 163.3111380274076
|
|
542
|
+
control_toBool_check:
|
|
543
|
+
x: 1104.357184628079
|
|
544
|
+
"y": 152.08227937703163
|
|
545
|
+
description: 新建流程(Plan → 确认 → 创建 → 检查)
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
/**
|
|
3
|
+
* 已合并至 agentflow 包内统一校验脚本,请使用:
|
|
4
|
+
* agentflow apply -ai validate-flow <workspaceRoot> <flowName> [flowDir] [uuid]
|
|
5
|
+
* 或:agentflow validate <FlowName> [uuid]
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
console.error("请使用 agentflow apply -ai validate-flow <workspaceRoot> <flowName> [flowDir] 或 agentflow validate <FlowName>");
|
|
9
|
+
process.exit(1);
|