@fieldwangai/agentflow 0.1.153 → 0.1.156
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/README.md +16 -34
- package/README.zh-CN.md +14 -34
- package/agents/agentflow-node-executor-code.md +13 -3
- package/agents/agentflow-node-executor-planning.md +13 -3
- package/agents/agentflow-node-executor-requirement.md +13 -3
- package/agents/agentflow-node-executor-test.md +13 -3
- package/agents/agentflow-node-executor-ui.md +13 -3
- package/agents/agentflow-node-executor.md +13 -3
- package/agents/en/agentflow-node-executor.md +13 -3
- package/agents/zh/agentflow-node-executor.md +13 -3
- package/bin/agentflow.mjs +3 -3
- package/bin/lib/admin-builtin-pipelines.mjs +3 -2
- package/bin/lib/agent-runners.mjs +0 -929
- package/bin/lib/auth.mjs +2 -1
- package/bin/lib/catalog-agents.mjs +2 -1
- package/bin/lib/catalog-flows.mjs +165 -90
- package/bin/lib/composer-agent.mjs +3 -793
- package/bin/lib/composer-skill-router.mjs +3 -323
- package/bin/lib/exec-buffered.mjs +32 -0
- package/bin/lib/flow-dsl/cli.mjs +277 -0
- package/bin/lib/flow-dsl/codegen.mjs +358 -0
- package/bin/lib/flow-dsl/defs.mjs +103 -0
- package/bin/lib/flow-dsl/index.mjs +77 -0
- package/bin/lib/flow-dsl/ir.mjs +305 -0
- package/bin/lib/flow-dsl/layout.mjs +115 -0
- package/bin/lib/flow-dsl/legacy-yaml.mjs +303 -0
- package/bin/lib/flow-dsl/lint.mjs +241 -0
- package/bin/lib/flow-dsl/packages.mjs +251 -0
- package/bin/lib/flow-dsl/parser.mjs +444 -0
- package/bin/lib/flow-import.mjs +96 -26
- package/bin/lib/flow-write.mjs +48 -12
- package/bin/lib/help.mjs +8 -28
- package/bin/lib/html-escape.mjs +19 -0
- package/bin/lib/http-util.mjs +49 -0
- package/bin/lib/legacy-flow-execution.mjs +37 -0
- package/bin/lib/locales/en.json +1 -1
- package/bin/lib/locales/zh.json +1 -1
- package/bin/lib/main.mjs +152 -286
- package/bin/lib/marketplace.mjs +206 -61
- package/bin/lib/model-config.mjs +10 -0
- package/bin/lib/node-package-archive.mjs +240 -0
- package/bin/lib/node-package-bootstrap.mjs +72 -0
- package/bin/lib/node-package-manifest.mjs +174 -0
- package/bin/lib/paths.mjs +42 -19
- package/bin/lib/prd-workflow-routes.mjs +2949 -0
- package/bin/lib/prd-workflow-server.mjs +4884 -0
- package/bin/lib/run-events.mjs +0 -66
- package/bin/lib/schedule-config.mjs +4 -4
- package/bin/lib/skill-runtime.mjs +35 -0
- package/bin/lib/startup-storage-migrations.mjs +274 -0
- package/bin/lib/ui-server.mjs +1092 -18123
- package/bin/lib/user-env.mjs +16 -0
- package/bin/lib/workspace-auto-layout.mjs +234 -0
- package/bin/lib/workspace-flow-store.mjs +478 -0
- package/bin/lib/workspace-graph-merge.mjs +41 -34
- package/bin/lib/workspace-preview.mjs +12 -2
- package/bin/lib/workspace-routes.mjs +3088 -0
- package/bin/lib/workspace-server.mjs +6199 -0
- package/bin/lib/workspace-state.mjs +331 -0
- package/bin/lib/workspace.mjs +2 -1
- package/builtin/nodes/agent_subAgent.md +1 -0
- package/builtin/nodes/control_agent_toBool.md +2 -0
- package/builtin/nodes/control_anyOne.md +2 -0
- package/builtin/nodes/control_cancelled.md +2 -0
- package/builtin/nodes/control_cd_workspace.md +5 -11
- package/builtin/nodes/control_delay.md +2 -0
- package/builtin/nodes/control_end.md +2 -0
- package/builtin/nodes/control_if.md +1 -0
- package/builtin/nodes/control_interval_loop.md +2 -0
- package/builtin/nodes/control_load_mcp.md +24 -0
- package/builtin/nodes/control_load_skills.md +8 -23
- package/builtin/nodes/control_start.md +2 -0
- package/builtin/nodes/control_toBool.md +2 -0
- package/builtin/nodes/control_user_workspace.md +2 -0
- package/builtin/nodes/control_wait_until.md +2 -0
- package/builtin/nodes/display_ascii.md +1 -0
- package/builtin/nodes/display_chart.md +1 -0
- package/builtin/nodes/display_html.md +1 -0
- package/builtin/nodes/display_image.md +1 -0
- package/builtin/nodes/display_markdown.md +1 -0
- package/builtin/nodes/display_mermaid.md +1 -0
- package/builtin/nodes/display_react_app.md +1 -0
- package/builtin/nodes/display_table.md +1 -0
- package/builtin/nodes/provide_bool.md +1 -0
- package/builtin/nodes/provide_file.md +1 -0
- package/builtin/nodes/provide_password.md +1 -0
- package/builtin/nodes/provide_str.md +1 -0
- package/builtin/nodes/tool_display_share_link.md +1 -0
- package/builtin/nodes/tool_get_env.md +2 -0
- package/builtin/nodes/tool_git_checkout.md +1 -0
- package/builtin/nodes/tool_git_worktree_load.md +1 -0
- package/builtin/nodes/tool_git_worktree_unload.md +1 -0
- package/builtin/nodes/tool_gitlab_create_mr.md +1 -0
- package/builtin/nodes/tool_jenkins_build.md +2 -0
- package/builtin/nodes/tool_load_key.md +2 -0
- package/builtin/nodes/tool_nodejs.md +17 -19
- package/builtin/nodes/tool_print.md +2 -0
- package/builtin/nodes/tool_save_key.md +2 -0
- package/builtin/nodes/tool_set_run_env.md +1 -0
- package/builtin/nodes/tool_user_ask.md +2 -0
- package/builtin/nodes/tool_user_check.md +2 -0
- package/builtin/nodes/tool_wecom_send_app_markdown.md +1 -0
- package/builtin/nodes/tool_wecom_send_group_markdown.md +1 -0
- package/builtin/nodes/workspace_one_click_task.md +44 -0
- package/builtin/nodes/workspace_run.md +16 -0
- package/builtin/nodes/workspace_scheduled_run.md +16 -0
- package/builtin/pipelines/module-migrate/scripts/gate.mjs +37 -0
- package/builtin/pipelines/module-migrate/scripts/static-check.mjs +82 -0
- package/builtin/pipelines/module-migrate/workspace.flow.js +172 -0
- package/builtin/pipelines/module-migrate/workspace.layout.json +134 -0
- package/builtin/pipelines/new/scripts/lint-flow.mjs +38 -0
- package/builtin/pipelines/new/workspace.flow.js +91 -0
- package/builtin/pipelines/new/workspace.layout.json +70 -0
- package/builtin/web-ui/dist/assets/{WorkflowAssistantThread-B9xslwI0.js → WorkflowAssistantThread-ClNxY2Wu.js} +1 -1
- package/builtin/web-ui/dist/assets/index-BJzMYRK3.js +870 -0
- package/builtin/web-ui/dist/assets/index-CEXmmwM2.css +1 -0
- package/builtin/web-ui/dist/index.html +2 -2
- package/package.json +3 -1
- package/reference/flow-control-capabilities.md +77 -158
- package/reference/flow-layout.md +1 -1
- package/reference/flow-prompt-handler-check.md +2 -2
- package/skills/agentflow-author-flow/SKILL.md +1 -1
- package/skills/agentflow-cli/SKILL.md +139 -24
- package/skills/agentflow-cli/agents/openai.yaml +2 -2
- package/skills/agentflow-cli/scripts/agentflow-cli.mjs +654 -20
- package/skills/agentflow-cli/scripts/agentflow-runtime.mjs +97 -0
- package/skills/agentflow-flow-add-instances/SKILL.md +1 -1
- package/skills/agentflow-flow-dsl/SKILL.md +206 -0
- package/skills/agentflow-flow-dsl/agents/openai.yaml +4 -0
- package/skills/agentflow-flow-dsl/references/node-calls.md +39 -0
- package/skills/agentflow-flow-edit-node-fields/SKILL.md +1 -1
- package/skills/agentflow-flow-recipes/SKILL.md +7 -4
- package/skills/agentflow-flow-recipes/references/recipes.md +97 -43
- package/skills/agentflow-flow-sync-ui/SKILL.md +1 -1
- package/skills/agentflow-node-dsl/SKILL.md +212 -0
- package/skills/agentflow-node-dsl/agents/openai.yaml +4 -0
- package/skills/agentflow-node-reference/SKILL.md +2 -2
- package/skills/agentflow-node-reference/references/builtin-nodes.md +166 -115
- package/skills/agentflow-runtime-reference/references/runtime.md +1 -1
- package/skills/agentflow-workspace-ascii/SKILL.md +9 -16
- package/skills/agentflow-workspace-graph/SKILL.md +62 -48
- package/skills/agentflow-workspace-html/SKILL.md +7 -2
- package/skills/agentflow-workspace-image/SKILL.md +6 -2
- package/skills/agentflow-workspace-markdown/SKILL.md +14 -21
- package/skills/agentflow-workspace-mermaid/SKILL.md +8 -16
- package/bin/lib/api-runner.mjs +0 -387
- package/bin/lib/apply.mjs +0 -903
- package/bin/lib/composer-flow-instances.mjs +0 -68
- package/bin/lib/composer-flow-skeleton.mjs +0 -334
- package/bin/lib/composer-flow-validate.mjs +0 -47
- package/bin/lib/composer-model-router.mjs +0 -185
- package/bin/lib/composer-node-schema.mjs +0 -303
- package/bin/lib/composer-planner.mjs +0 -751
- package/bin/lib/composer-script-ops.mjs +0 -233
- package/bin/lib/flow-static-preview.mjs +0 -104
- package/bin/lib/hub-login.mjs +0 -54
- package/bin/lib/hub-publish.mjs +0 -159
- package/bin/lib/hub-remote.mjs +0 -189
- package/bin/lib/hub.mjs +0 -299
- package/bin/lib/jenkins.mjs +0 -380
- package/bin/lib/node-execute.mjs +0 -539
- package/bin/lib/normalize-node-tool-command.mjs +0 -97
- package/bin/lib/runtime-context.mjs +0 -243
- package/bin/lib/scheduler.mjs +0 -601
- package/bin/lib/ui-print.mjs +0 -94
- package/bin/pipeline/build-node-prompt.mjs +0 -271
- package/bin/pipeline/check-cache.mjs +0 -191
- package/bin/pipeline/check-flow.mjs +0 -543
- package/bin/pipeline/collect-nodes.mjs +0 -212
- package/bin/pipeline/compute-cache-md5.mjs +0 -177
- package/bin/pipeline/ensure-run-dir.mjs +0 -71
- package/bin/pipeline/gc.mjs +0 -129
- package/bin/pipeline/get-env.mjs +0 -59
- package/bin/pipeline/get-resolved-values.mjs +0 -344
- package/bin/pipeline/load-key.mjs +0 -62
- package/bin/pipeline/parse-flow.mjs +0 -708
- package/bin/pipeline/post-process-control-if.mjs +0 -23
- package/bin/pipeline/post-process-node.mjs +0 -490
- package/bin/pipeline/pre-process-node.mjs +0 -1430
- package/bin/pipeline/resolve-inputs.mjs +0 -201
- package/bin/pipeline/run-tool-nodejs.mjs +0 -167
- package/bin/pipeline/save-key.mjs +0 -93
- package/bin/pipeline/snapshot-prior-round.mjs +0 -70
- package/bin/pipeline/validate-for-ui.mjs +0 -234
- package/bin/pipeline/validate-script-output.mjs +0 -130
- package/bin/pipeline/write-result.mjs +0 -182
- package/builtin/pipelines/module-migrate/flow.yaml +0 -819
- package/builtin/pipelines/new/flow.yaml +0 -545
- package/builtin/pipelines/new/scripts/check-flow.mjs +0 -9
- package/builtin/pipelines/new/scripts/collect-nodes.mjs +0 -211
- package/builtin/web-ui/dist/assets/index-DZ328oSo.css +0 -1
- package/builtin/web-ui/dist/assets/index-DmUV7ZCL.js +0 -888
- package/skills/agentflow-node-authoring/SKILL.md +0 -57
|
@@ -1,545 +0,0 @@
|
|
|
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 → 确认 → 创建 → 检查)
|
|
@@ -1,9 +0,0 @@
|
|
|
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);
|