@fieldwangai/agentflow 0.1.153 → 0.1.154
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 +276 -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 +268 -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 +1087 -18122
- 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-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-CKClwj96.js} +1 -1
- package/builtin/web-ui/dist/assets/index-BZ5KqLur.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 +2 -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
|
@@ -0,0 +1,212 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: agentflow-node-dsl
|
|
3
|
+
description: >-
|
|
4
|
+
使用 AgentFlow Node DSL 编写代码节点包(节点目录中的 index.mjs),在流程里用起来,并发布到
|
|
5
|
+
marketplace 供其它流程复用。用户要求「加一个自定义节点」「把这段逻辑做成可复用节点」
|
|
6
|
+
「把节点发布出去」时使用。跨端搜索、上传、安装和 Flow 拉取/发布需配合
|
|
7
|
+
agentflow-cli skill。
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
# AgentFlow Node DSL
|
|
11
|
+
|
|
12
|
+
**一个目录 = 一个节点 = 一个可发布的包。** `index.mjs` 同时是声明和实现。
|
|
13
|
+
|
|
14
|
+
```
|
|
15
|
+
<flowDir>/nodes/<name>/index.mjs
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
行为完全由输入决定、不需要 AI 推理的,就该是代码节点。需要理解和判断的用
|
|
19
|
+
`agent.subAgent`。
|
|
20
|
+
|
|
21
|
+
## CLI 前置条件
|
|
22
|
+
|
|
23
|
+
同时安装并读取 `agentflow-cli` skill。把其 `SKILL.md` 所在目录记为
|
|
24
|
+
`<agentflow-cli-skill-dir>`;不要假设当前项目包含 `skills/agentflow-cli`。先执行:
|
|
25
|
+
|
|
26
|
+
```bash
|
|
27
|
+
node <agentflow-cli-skill-dir>/scripts/agentflow-cli.mjs config
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
跨端节点操作要求 `localRuntime.available: true` 和有效 token;缺少 companion skill 或本地
|
|
31
|
+
AgentFlow runtime 时先停止并按 `agentflow-cli` 的安装说明修复。
|
|
32
|
+
|
|
33
|
+
写新包之前,先搜索服务端目录,避免重复造已有节点:
|
|
34
|
+
|
|
35
|
+
```bash
|
|
36
|
+
node <agentflow-cli-skill-dir>/scripts/agentflow-cli.mjs node-package-search --query "需要的能力"
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
结果包含固定版本 `specifier` 和输入/输出槽。满足需求时先 `node-package-install`,然后直接
|
|
40
|
+
import 返回的 `marketplace:<id>@<version>`;只有没有合适结果时才创建 `nodes/<name>/`。
|
|
41
|
+
|
|
42
|
+
## 最小完整例子
|
|
43
|
+
|
|
44
|
+
```js
|
|
45
|
+
import fs from "node:fs/promises";
|
|
46
|
+
|
|
47
|
+
export default {
|
|
48
|
+
id: "count_lines", // 必填,构成 marketplace:count_lines@1.0.0
|
|
49
|
+
version: "1.0.0", // 必填,完整 semver
|
|
50
|
+
name: "统计行数",
|
|
51
|
+
description: "读一个文本文件,统计行数",
|
|
52
|
+
inputs: {
|
|
53
|
+
filePath: { type: "text", description: "文件路径", required: true },
|
|
54
|
+
},
|
|
55
|
+
outputs: {
|
|
56
|
+
total: { type: "text" },
|
|
57
|
+
},
|
|
58
|
+
};
|
|
59
|
+
|
|
60
|
+
export async function run(inputs, outputs, dirs) {
|
|
61
|
+
const text = await fs.readFile(inputs.filePath, "utf-8");
|
|
62
|
+
const total = text.split("\n").length;
|
|
63
|
+
await fs.writeFile(outputs.total, String(total), "utf-8");
|
|
64
|
+
console.log(`共 ${total} 行`); // 进度而已
|
|
65
|
+
}
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
在图里就是一条 import:
|
|
69
|
+
|
|
70
|
+
```js
|
|
71
|
+
import countLines from "./nodes/count-lines";
|
|
72
|
+
|
|
73
|
+
const count = countLines("统计行数", { filePath: pick.result });
|
|
74
|
+
const show = display.markdown("结果", { content: count.total });
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
## 三条硬约束
|
|
78
|
+
|
|
79
|
+
**① 声明必须是纯字面量。** `export default` 由 acorn **静态解析**——列节点面板、渲染画布、
|
|
80
|
+
校验槽位、算运行缓存指纹,全程不执行包里的代码。目录扫描期执行第三方代码既慢又不安全。
|
|
81
|
+
|
|
82
|
+
```js
|
|
83
|
+
const T = "text";
|
|
84
|
+
export default { inputs: { day: { type: T } } }; // ✗ 变量引用
|
|
85
|
+
export default { ...base, id: "x" }; // ✗ 展开
|
|
86
|
+
export default { version: pkg.version }; // ✗ 成员访问
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
违反时带位置报错(`export default.id: 只允许字面量,不允许 Identifier`),不会静默变成空
|
|
90
|
+
清单让节点从面板上消失。
|
|
91
|
+
|
|
92
|
+
**② `outputs.<name>` 是要写入的绝对路径,不是值。** 最容易搞错的一点。
|
|
93
|
+
|
|
94
|
+
```js
|
|
95
|
+
await fs.writeFile(outputs.total, String(total)); // ✓
|
|
96
|
+
outputs.total = String(total); // ✗ 什么都没发生
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
每个声明过的输出槽各自一个文件。**第一个非控制输出槽**承载节点的结果正文。stdout 只在你
|
|
100
|
+
**没有**为结果槽写文件时才当结果——所以 `console.log` 打进度不会盖掉你写进去的值。
|
|
101
|
+
|
|
102
|
+
`file` 类型的输出槽同理,把**文件内容本身**写到 `outputs.<name>` 上:
|
|
103
|
+
|
|
104
|
+
```js
|
|
105
|
+
await fs.writeFile(outputs.deduped, csvText, "utf-8"); // ✓
|
|
106
|
+
const p = path.join(dirs.outputsDir, "deduped.csv");
|
|
107
|
+
await fs.writeFile(p, csvText); await fs.writeFile(outputs.deduped, p); // ✗
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
第二种在测试里看着能过(下游确实拿到一个存在的路径),但槽文件才是被当成产物管理的东西,
|
|
111
|
+
你自选的那个路径在真实运行时位于会被清理的临时目录里。
|
|
112
|
+
|
|
113
|
+
**③ 槽位顺序 = 画布 handle 顺序。** `inputs` / `outputs` 是有序映射,控制槽 `prev` / `next`
|
|
114
|
+
自动前置。改声明顺序等于改已有流程的接线,加槽位请往后加。
|
|
115
|
+
|
|
116
|
+
可用类型:`text` `file` `bool` `node` `image` `json`。未知类型直接报错。
|
|
117
|
+
|
|
118
|
+
## `run(inputs, outputs, dirs)`
|
|
119
|
+
|
|
120
|
+
| 参数 | 内容 |
|
|
121
|
+
|------|------|
|
|
122
|
+
| `inputs` | 槽位名 → 上游传来的值。`file` 槽拿到的是路径 |
|
|
123
|
+
| `outputs` | 槽位名 → **要写入的绝对路径** |
|
|
124
|
+
| `dirs` | `workspaceRoot` / `nodeRunDir` / `nodeTmpDir` / `outputsDir` |
|
|
125
|
+
|
|
126
|
+
失败 = 抛异常或非零退出。不要用 JSON 包裹 stdout,也不要自己造结果文件。
|
|
127
|
+
|
|
128
|
+
`index.mjs` 是**普通 Node 模块**,会被真执行:`for` / `if` / `await` 都可以写。复杂实现可拆到
|
|
129
|
+
包内 `scripts/`,模板和资源可放 `templates/`、`assets/` 并用相对路径加载。不要提交
|
|
130
|
+
`node_modules`;跨端包当前只应依赖 Node 内置模块或包内自带源码。
|
|
131
|
+
和 `workspace.flow.js` 那种「禁一切控制流」的结构文件完全两套规则。
|
|
132
|
+
|
|
133
|
+
## 验证
|
|
134
|
+
|
|
135
|
+
```bash
|
|
136
|
+
agentflow flow dsl lint <flowDir> # 声明能不能静态解析、接线对不对
|
|
137
|
+
```
|
|
138
|
+
|
|
139
|
+
然后在画布上跑一次。节点会以 `marketplace:<id>@<version>` 出现在面板里。
|
|
140
|
+
|
|
141
|
+
## 发布给别的流程用
|
|
142
|
+
|
|
143
|
+
流程自带的 `nodes/<name>/` 只有那个流程能用。要复用就发布:
|
|
144
|
+
|
|
145
|
+
```bash
|
|
146
|
+
agentflow marketplace publish-node <flowDir>/nodes/<name>
|
|
147
|
+
agentflow marketplace list
|
|
148
|
+
```
|
|
149
|
+
|
|
150
|
+
包会被复制到 `.workspace/agentflow/marketplace/packages/nodes/<id>/<version>`。
|
|
151
|
+
|
|
152
|
+
要发给另一台机器或另一个 Agent workspace,上传和安装**整个包目录**:
|
|
153
|
+
|
|
154
|
+
```bash
|
|
155
|
+
node <agentflow-cli-skill-dir>/scripts/agentflow-cli.mjs node-package-publish --file <flowDir>/nodes/<name>
|
|
156
|
+
node <agentflow-cli-skill-dir>/scripts/agentflow-cli.mjs node-package-install \
|
|
157
|
+
--node <id>@<version> --workspace-root <targetWorkspace>
|
|
158
|
+
```
|
|
159
|
+
|
|
160
|
+
流程和本地 `nodes/` 已经一起完成时,优先一键发布,避免漏传包或只传 `index.mjs`:
|
|
161
|
+
|
|
162
|
+
```bash
|
|
163
|
+
node <agentflow-cli-skill-dir>/scripts/agentflow-cli.mjs publish-flow \
|
|
164
|
+
--flow-id <flow-id> --file <flowDir> --target-space personal --with-dependencies
|
|
165
|
+
```
|
|
166
|
+
|
|
167
|
+
命令上传所有包目录,并只在远端发布产物中把 `./nodes/<name>` 改为固定版本 import;本地
|
|
168
|
+
`workspace.flow.js` 保持不变。同版本不同内容会整批在上传前拒绝,必须先提升版本号。
|
|
169
|
+
|
|
170
|
+
如果已经有 `workspace.flow.js`,直接同步它声明的全部包:
|
|
171
|
+
|
|
172
|
+
```bash
|
|
173
|
+
node <agentflow-cli-skill-dir>/scripts/agentflow-cli.mjs node-package-sync \
|
|
174
|
+
--flow <flowDir> --workspace-root <targetWorkspace>
|
|
175
|
+
```
|
|
176
|
+
|
|
177
|
+
如果流程本身还没落到本地,直接 pull;它会先同步包,再生成本地 DSL:
|
|
178
|
+
|
|
179
|
+
```bash
|
|
180
|
+
node <agentflow-cli-skill-dir>/scripts/agentflow-cli.mjs pull-flow \
|
|
181
|
+
--flow-id <flow-id> --flow-source user --workspace-root <targetWorkspace>
|
|
182
|
+
```
|
|
183
|
+
|
|
184
|
+
传输格式是 ZIP,`scripts/`、`templates/`、`assets/` 都会随包传输;同一个 `id@version` 内容
|
|
185
|
+
不同会被拒绝,修改后必须提升版本号。
|
|
186
|
+
|
|
187
|
+
解析 `marketplace:<id>@<version>` 的顺序是**流程本地 → 已发布 → 集合**:流程自己的实现永远
|
|
188
|
+
不会被同名的已发布包顶掉。
|
|
189
|
+
|
|
190
|
+
已安装的包直接在 `workspace.flow.js` 里写版本化 import:
|
|
191
|
+
|
|
192
|
+
```js
|
|
193
|
+
import myNode from "marketplace:<id>@<version>";
|
|
194
|
+
```
|
|
195
|
+
|
|
196
|
+
存储层会把它投影成「基础类型 + `marketplaceRef`」,保存后仍保留这条 import。
|
|
197
|
+
|
|
198
|
+
## 别做的事
|
|
199
|
+
|
|
200
|
+
- **不要写 `node.yaml`。** 它只是已发布老包的回退清单,新包一律用 `index.mjs`。
|
|
201
|
+
- **不要写 `runtime.entry` / `scripts/run.mjs`。** 那是老 manifest 的字段,现在实现就在
|
|
202
|
+
`index.mjs` 的 `run` 里。
|
|
203
|
+
- **不要找旧的 `agentflow marketplace install-node`。** 它写的是 `flow.yaml` 依赖钉。跨端安装
|
|
204
|
+
使用 token-backed CLI 的 `node-package-install`;DSL 用 `marketplace:<id>@<version>` import。
|
|
205
|
+
- **不要用 `agentflow run` / `apply`。** Start/End Pipeline 执行栈已退休,运行走 Workspace。
|
|
206
|
+
- **不要把本机绝对路径或密钥写进包。**
|
|
207
|
+
|
|
208
|
+
## 相关
|
|
209
|
+
|
|
210
|
+
- `agentflow-flow-dsl`:图怎么写,import 代码节点的语法
|
|
211
|
+
- `agentflow-node-reference`:内置节点类型的槽位表
|
|
212
|
+
- `docs/wiki/code-node-packages.zh-CN.md`:更完整的说明
|
|
@@ -9,13 +9,13 @@ description: >-
|
|
|
9
9
|
|
|
10
10
|
使用本技能处理这些问题:
|
|
11
11
|
|
|
12
|
-
- 选择 `agent_subAgent`、`tool_nodejs`、`tool_git_checkout`、`control_cd_workspace`、`
|
|
12
|
+
- 选择 `agent_subAgent`、`tool_nodejs`、`tool_git_checkout`、`control_cd_workspace`、`display_markdown` 等节点。
|
|
13
13
|
- 创建或修改 Workspace Graph 时需要确认 input/output 名称、类型、顺序和 handle 索引。
|
|
14
14
|
- 判断节点是否 local-only,是否会调用 agent,是否需要 `script`。
|
|
15
15
|
|
|
16
16
|
## 必读规则
|
|
17
17
|
|
|
18
|
-
- 先读 [builtin-nodes.md](references/builtin-nodes.md),再改 `workspace.
|
|
18
|
+
- 先读 [builtin-nodes.md](references/builtin-nodes.md),再改 `workspace.flow.js` 的节点调用、引脚和连线;DSL 里的调用名见 **agentflow-flow-dsl** 的 node-calls.md。
|
|
19
19
|
- 新图入口使用 `workspace_run` / `workspace_scheduled_run`,不要新增 `control_start` / `control_end`。
|
|
20
20
|
- `input-N` / `output-N` 必须与节点定义中的槽位顺序一致。
|
|
21
21
|
- `tool_nodejs` 只有写了完整 `script` 才会确定性执行;自然语言任务用 `agent_subAgent`。
|
|
@@ -7,75 +7,36 @@
|
|
|
7
7
|
- `tool_nodejs` needs an executable `script`; `body` is documentation when `script` exists.
|
|
8
8
|
- `agent_subAgent` is for semantic/code/text reasoning tasks.
|
|
9
9
|
- Local-only nodes are executed by AgentFlow runtime and do not call an agent.
|
|
10
|
+
- The Workspace runtime executes a DAG; cyclic graphs are rejected. Express check-then-fix as forward steps.
|
|
10
11
|
- Edge handles are positional: `input-0`, `output-0`, etc. Match slot order exactly.
|
|
11
12
|
|
|
12
13
|
## agent
|
|
13
14
|
|
|
14
15
|
### agent_subAgent
|
|
15
16
|
|
|
16
|
-
- Display:
|
|
17
|
-
- Description:
|
|
17
|
+
- Display: 子 Agent
|
|
18
|
+
- Description: 利用子 Agent 执行任务;可接收 knowledgeContext 读取知识库,可接收 workspaceContext 切换执行工作区,并接收 skillsContext / mcpContext 注入已加载 skills 与 MCP 工具清单。
|
|
18
19
|
- Runtime: agent/runner
|
|
19
|
-
- Inputs: 0. `prev`:node; 1. `workspaceContext`:text; 2. `skillsContext`:text
|
|
20
|
-
- Outputs: 0. `next`:node
|
|
21
|
-
|
|
22
|
-
## control
|
|
23
|
-
|
|
24
|
-
### control_agent_toBool
|
|
25
|
-
|
|
26
|
-
- Display: Agent ToBool
|
|
27
|
-
- Description: AI-powered boolean judgment: an agent evaluates the input value and writes true/false to prediction. Use for non-deterministic scenarios requiring semantic understanding.
|
|
28
|
-
- Runtime: agent/runner
|
|
29
|
-
- Inputs: 0. `prev`:node; 1. `value`:text
|
|
30
|
-
- Outputs: 0. `next`:node; 1. `prediction`:bool
|
|
20
|
+
- Inputs: 0. `prev`:node; 1. `workspaceContext`:text; 2. `skillsContext`:text; 3. `mcpContext`:text; 4. `knowledgeContext`:text
|
|
21
|
+
- Outputs: 0. `next`:node; 1. `result`:text
|
|
31
22
|
|
|
32
|
-
###
|
|
23
|
+
### workspace_one_click_task
|
|
33
24
|
|
|
34
|
-
- Display:
|
|
35
|
-
- Description:
|
|
25
|
+
- Display: 一键任务
|
|
26
|
+
- Description: 输入任务描述,选择 Skills、workspace 上下文和输出类型后直接运行;等价于「Load Skills + 子 Agent + Display」的合并节点。
|
|
36
27
|
- Runtime: agent/runner
|
|
37
|
-
- Inputs: 0. `
|
|
38
|
-
- Outputs: 0. `next`:node
|
|
28
|
+
- Inputs: 0. `prev`:node; 1. `skillKeys`:text; 2. `includeWorkspaceContext`:bool = true; 3. `displayType`:text = markdown; 4. `knowledgeContext`:text; 5. `workspaceContext`:text
|
|
29
|
+
- Outputs: 0. `next`:node; 1. `content`:text; 2. `displayType`:text = markdown
|
|
39
30
|
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
- Display: Cancelled
|
|
43
|
-
- Description: Check whether the current run/watch has been cancelled. Use cancelled output with control_if.
|
|
44
|
-
- Runtime: local-only
|
|
45
|
-
- Inputs: 0. `prev`:node; 1. `watchId`:text
|
|
46
|
-
- Outputs: 0. `next`:node; 1. `cancelled`:bool
|
|
31
|
+
## control
|
|
47
32
|
|
|
48
33
|
### control_cd_workspace
|
|
49
34
|
|
|
50
|
-
- Display:
|
|
51
|
-
- Description:
|
|
52
|
-
- Runtime: local-only
|
|
53
|
-
- Inputs: 0. `prev`:node; 1. `target`:text = ${pipelineWorkspace}; 2. `mode`:text = set; 3. `label`:text; 4. `workspaceContext`:text
|
|
54
|
-
- Outputs: 0. `next`:node; 1. `workspaceContext`:text; 2. `cwd`:file; 3. `previous`:text
|
|
55
|
-
|
|
56
|
-
### control_deadline
|
|
57
|
-
|
|
58
|
-
- Display: Deadline
|
|
59
|
-
- Description: Compute whether a deadline has expired. Use expired output with control_if.
|
|
60
|
-
- Runtime: local-only
|
|
61
|
-
- Inputs: 0. `prev`:node; 1. `startAt`:text; 2. `duration`:text; 3. `deadlineAt`:text; 4. `timezone`:text = Asia/Shanghai
|
|
62
|
-
- Outputs: 0. `next`:node; 1. `expired`:bool; 2. `deadlineAt`:text
|
|
63
|
-
|
|
64
|
-
### control_delay
|
|
65
|
-
|
|
66
|
-
- Display: Delay
|
|
67
|
-
- Description: Persistently wait for a relative duration, then continue when scheduler resumes this run.
|
|
68
|
-
- Runtime: local-only
|
|
69
|
-
- Inputs: 0. `prev`:node; 1. `duration`:text = 10m
|
|
70
|
-
- Outputs: 0. `next`:node; 1. `wakeAt`:text
|
|
71
|
-
|
|
72
|
-
### control_end
|
|
73
|
-
|
|
74
|
-
- Display: End
|
|
75
|
-
- Description: End point of AgentFlow, flow terminates after this node
|
|
35
|
+
- Display: 加载知识库
|
|
36
|
+
- Description: Load one or more read-only knowledge sources for downstream Agent nodes. This node does not change the runtime cwd. It publishes `knowledgeContext` for reading/searching referenced repos or folders. `workspaceContext` and `cwd` are retained as legacy compatibility outputs for the first source.
|
|
76
37
|
- Runtime: local-only
|
|
77
|
-
- Inputs: 0. `prev`:node
|
|
78
|
-
- Outputs:
|
|
38
|
+
- Inputs: 0. `prev`:node; 1. `path`:text; 2. `label`:text; 3. `knowledgeContext`:text; 4. `workspaceContext`:text
|
|
39
|
+
- Outputs: 0. `next`:node; 1. `knowledgeContext`:text; 2. `workspaceContext`:text; 3. `cwd`:file
|
|
79
40
|
|
|
80
41
|
### control_if
|
|
81
42
|
|
|
@@ -85,114 +46,196 @@
|
|
|
85
46
|
- Inputs: 0. `prev`:node; 1. `prediction`:bool
|
|
86
47
|
- Outputs: 0. `next1`:node; 1. `next2`:node
|
|
87
48
|
|
|
88
|
-
###
|
|
49
|
+
### control_load_mcp
|
|
89
50
|
|
|
90
|
-
- Display:
|
|
91
|
-
- Description:
|
|
51
|
+
- Display: Load MCP
|
|
52
|
+
- Description: 加载所选 Cursor MCP Server 的工具清单,通过 mcpContext 传给下游 agent 节点。
|
|
92
53
|
- Runtime: local-only
|
|
93
|
-
- Inputs: 0. `prev`:node; 1. `
|
|
94
|
-
- Outputs: 0. `
|
|
54
|
+
- Inputs: 0. `prev`:node; 1. `serverNames`:text
|
|
55
|
+
- Outputs: 0. `next`:node; 1. `mcpContext`:text
|
|
95
56
|
|
|
96
57
|
### control_load_skills
|
|
97
58
|
|
|
98
59
|
- Display: Load Skills
|
|
99
|
-
- Description: Load
|
|
60
|
+
- Description: Load the currently selected Workspace skill collection for downstream agent nodes. Set `skillKeys` to skill names or registry keys, then connect `skillsContext` to downstream agent/tool nodes. Loaded skills are injected into the node prompt under "已加载 Skills"。 Skill key examples: - `agentflow-flow-add-instances` - `workspace-agents:agentflow-flow-edit-node-fields` - `global-codex:some-skill`
|
|
100
61
|
- Runtime: local-only
|
|
101
|
-
- Inputs: 0. `prev`:node; 1. `
|
|
102
|
-
- Outputs: 0. `next`:node; 1. `skillsContext`:text
|
|
62
|
+
- Inputs: 0. `prev`:node; 1. `skillKeys`:text
|
|
63
|
+
- Outputs: 0. `next`:node; 1. `skillsContext`:text
|
|
103
64
|
|
|
104
|
-
###
|
|
65
|
+
### control_user_workspace
|
|
105
66
|
|
|
106
|
-
- Display:
|
|
107
|
-
- Description:
|
|
67
|
+
- Display: User Workspace
|
|
68
|
+
- Description: Output a workspace context pointing to the current user's home directory.
|
|
108
69
|
- Runtime: local-only
|
|
109
|
-
- Inputs:
|
|
110
|
-
- Outputs: 0. `next`:node
|
|
70
|
+
- Inputs: 0. `prev`:node
|
|
71
|
+
- Outputs: 0. `next`:node; 1. `workspaceContext`:text; 2. `cwd`:file
|
|
111
72
|
|
|
112
|
-
###
|
|
73
|
+
### workspace_run
|
|
113
74
|
|
|
114
|
-
- Display:
|
|
115
|
-
- Description:
|
|
116
|
-
- Runtime:
|
|
117
|
-
- Inputs: 0. `prev`:node
|
|
118
|
-
- Outputs: 0. `next`:node
|
|
75
|
+
- Display: Run
|
|
76
|
+
- Description: Workspace 图的运行入口。点击运行时,从本节点出发沿控制边选出子图并执行;本节点自身不产生输出。
|
|
77
|
+
- Runtime: local-only
|
|
78
|
+
- Inputs: 0. `prev`:node
|
|
79
|
+
- Outputs: 0. `next`:node
|
|
119
80
|
|
|
120
|
-
###
|
|
81
|
+
### workspace_scheduled_run
|
|
121
82
|
|
|
122
|
-
- Display:
|
|
123
|
-
- Description:
|
|
83
|
+
- Display: Scheduled Run
|
|
84
|
+
- Description: 定时运行入口。与 Run 相同的执行语义,区别是由调度器按节点 body 中的 JSON 排程配置触发。
|
|
124
85
|
- Runtime: local-only
|
|
125
|
-
- Inputs: 0. `prev`:node
|
|
126
|
-
- Outputs: 0. `next`:node
|
|
86
|
+
- Inputs: 0. `prev`:node
|
|
87
|
+
- Outputs: 0. `next`:node
|
|
127
88
|
|
|
128
89
|
## tool
|
|
129
90
|
|
|
130
|
-
###
|
|
91
|
+
### tool_display_share_link
|
|
131
92
|
|
|
132
|
-
- Display:
|
|
133
|
-
- Description:
|
|
134
|
-
- Runtime:
|
|
135
|
-
- Inputs: 0. `
|
|
136
|
-
- Outputs: 0. `
|
|
93
|
+
- Display: Display Share Link
|
|
94
|
+
- Description: Create a public share link for upstream Display nodes
|
|
95
|
+
- Runtime: local-only
|
|
96
|
+
- Inputs: 0. `prev`:node; 1. `title`:text; 2. `layout`:text = single; 3. `nodeIds`:text; 4. `baseUrl`:text
|
|
97
|
+
- Outputs: 0. `next`:node; 1. `url`:text; 2. `shareId`:text; 3. `expiresAt`:text
|
|
137
98
|
|
|
138
99
|
### tool_git_checkout
|
|
139
100
|
|
|
140
101
|
- Display: Git Checkout
|
|
141
|
-
- Description: Clone or update a Git repository and expose it as a workspace context for downstream nodes. - `repoUrl` is required. - `targetDir` may be absolute or relative to the current workspace context. - If `targetDir` is empty, the repository is cloned into `${pipelineWorkspace}/.workspace/agentflow/git-repos/<repo-name>`. - Set `includeSubmodules` to `true` to clone/update Git submodules recursively. - The `workspaceContext` output can be connected to CD Workspace, Load Skills, agent, or tool nodes.
|
|
102
|
+
- Description: Clone or update a Git repository and expose it as a workspace context for downstream nodes. - `repoUrl` is required. - `targetDir` may be absolute or relative to the current workspace context. - If `targetDir` is empty, the repository is cloned into `${pipelineWorkspace}/.workspace/agentflow/git-repos/<repo-name>`. For user pipelines, `${pipelineWorkspace}` follows the Admin Settings AgentFlow Data Root. - Set `includeSubmodules` to `true` to clone/update Git submodules recursively. - The `workspaceContext` output can be connected to CD Workspace, Load Skills, agent, or tool nodes. - The `gitContext` output can be connected to Worktree, GitLab MR, or other Git nodes.
|
|
142
103
|
- Runtime: local-only
|
|
143
|
-
- Inputs: 0. `prev`:node; 1. `repoUrl`:text; 2. `branch`:text; 3. `targetDir`:text; 4. `pullIfExists`:bool = true; 5. `includeSubmodules`:bool = false; 6. `workspaceContext`:text
|
|
144
|
-
- Outputs: 0. `next`:node; 1. `repoPath`:file; 2. `branch`:text; 3. `commit`:text; 4. `changed`:bool; 5. `workspaceContext`:text
|
|
104
|
+
- Inputs: 0. `prev`:node; 1. `repoUrl`:text; 2. `branch`:text; 3. `targetDir`:text; 4. `pullIfExists`:bool = true; 5. `includeSubmodules`:bool = false; 6. `remote`:text = origin; 7. `workspaceContext`:text
|
|
105
|
+
- Outputs: 0. `next`:node; 1. `repoPath`:file; 2. `branch`:text; 3. `commit`:text; 4. `changed`:bool; 5. `workspaceContext`:text; 6. `gitContext`:text
|
|
145
106
|
|
|
146
|
-
###
|
|
107
|
+
### tool_git_worktree_load
|
|
147
108
|
|
|
148
|
-
- Display:
|
|
149
|
-
- Description:
|
|
150
|
-
- Runtime:
|
|
151
|
-
- Inputs: 0. `prev`:node; 1. `
|
|
152
|
-
- Outputs: 0. `next`:node; 1. `
|
|
109
|
+
- Display: Load Worktree
|
|
110
|
+
- Description: Create or reuse a Git worktree and expose it as the downstream workspace context. - `repoPath` is required unless `gitContext.repoPath` is connected. - `workspaceContext` is required so the node can preserve the previous execution context. - `branch` is optional. When empty, AgentFlow creates a detached worktree at the current HEAD. - `worktreePath` is optional. When empty, AgentFlow creates a temporary worktree under the current run temp directory. - A worktree created by this node during the current Workspace run is removed when the run finishes or is stopped, even when `worktreePath` is explicitly set. - Existing registered worktrees under the current flow workspace are also removed after the run, covering leftovers from previous interrupted runs. - Existing registered worktrees outside the current flow workspace are reused and not removed automatically unless this run created them. - Existing worktree paths are reused only when they are registered by `git worktree list` for the given repo. - `pruneMissing` defaults to true. When Git has a registered worktree whose directory is missing, AgentFlow runs `git worktree prune` before adding it again. - `force` defaults to false. When true, AgentFlow passes `--force` to `git worktree add`.
|
|
111
|
+
- Runtime: local-only
|
|
112
|
+
- Inputs: 0. `prev`:node; 1. `repoPath`:file; 2. `branch`:text; 3. `worktreePath`:file; 4. `pruneMissing`:bool = true; 5. `force`:bool = false; 6. `gitContext`:text; 7. `workspaceContext`:text
|
|
113
|
+
- Outputs: 0. `next`:node; 1. `worktreePath`:file; 2. `branch`:text; 3. `commit`:text; 4. `workspaceContext`:text; 5. `gitContext`:text
|
|
114
|
+
|
|
115
|
+
### tool_git_worktree_unload
|
|
116
|
+
|
|
117
|
+
- Display: Unload Worktree
|
|
118
|
+
- Description: Remove a Git worktree. - `workspaceContext` is required. Its `cwd` is used as the worktree to remove. - `repoPath`, `worktreePath` and `gitContext` are optional compatibility overrides. - By default `force` is false; dirty worktrees fail instead of being removed. - By default `prune` is true.
|
|
119
|
+
- Runtime: local-only
|
|
120
|
+
- Inputs: 0. `prev`:node; 1. `repoPath`:file; 2. `worktreePath`:file; 3. `gitContext`:text; 4. `workspaceContext`:text; 5. `force`:bool = false; 6. `prune`:bool = true
|
|
121
|
+
- Outputs: 0. `next`:node; 1. `removed`:bool; 2. `workspaceContext`:text; 3. `message`:text
|
|
122
|
+
|
|
123
|
+
### tool_gitlab_create_mr
|
|
124
|
+
|
|
125
|
+
- Display: Create GitLab MR
|
|
126
|
+
- Description: Create or reuse a GitLab merge request for the current branch. - `gitContext` and `workspaceContext` can be connected from Git Checkout / Load Worktree. - `repoPath` is optional. When empty, AgentFlow uses `gitContext.worktreePath`, `gitContext.repoPath`, or `workspaceContext.cwd`. - `sourceBranch`, `targetBranch`, `title`, `description`, `draft`, and `labels` are optional. When empty, AgentFlow derives sensible defaults from git. - `tokenEnv` is optional. Defaults to `GITLAB_TOKEN,GITLAB_PRIVATE_TOKEN`. - `gitlabApiBase` is optional. When empty, AgentFlow uses `https://${gitContext.host}/api/v4`.
|
|
127
|
+
- Runtime: local-only
|
|
128
|
+
- Inputs: 0. `prev`:node; 1. `repoPath`:file; 2. `gitContext`:text; 3. `workspaceContext`:text; 4. `sourceBranch`:text; 5. `targetBranch`:text; 6. `title`:text; 7. `description`:text; 8. `draft`:bool = false; 9. `labels`:text; 10. `push`:bool = true; 11. `remote`:text = origin; 12. `tokenEnv`:text; 13. `gitlabApiBase`:text; 14. `removeSourceBranch`:bool = false; 15. `squash`:bool = false
|
|
129
|
+
- Outputs: 0. `next`:node; 1. `mrUrl`:text; 2. `created`:bool; 3. `mrIid`:text; 4. `projectId`:text; 5. `sourceBranch`:text; 6. `targetBranch`:text; 7. `title`:text; 8. `message`:text
|
|
153
130
|
|
|
154
131
|
### tool_nodejs
|
|
155
132
|
|
|
156
133
|
- Display: NodeJs
|
|
157
|
-
- Description: Execute Node.js script
|
|
134
|
+
- Description: Execute a Node.js script. The Workspace runtime spawns the command directly — no agent involved. **Success/Failure:** Determined by the script process **exit code** — 0 = success, non-0 = failed. **Result Output:** Script stdout becomes the `result` slot content (plain text, e.g. `console.log("hello")`). When stdout is empty and the exit code is non-0, stderr is written to the failure message. Do **not** wrap stdout in a JSON envelope. **Script placeholders:** `script` (inline) or `scriptRef` (file) support `${}` placeholders — `workspaceRoot` / `pipelineWorkspace` / `flowDir` (all three resolve to the scoped workspace root), `cwd`, `nodeRunDir`, `nodeTmpDir`, `outputsDir`, `scriptRef`, plus every input and output slot name. Values are auto shell-quoted, so do not add your own quotes. Example: `script: node ${flowDir}/scripts/my-check.mjs --root ${workspaceRoot} --input ${todo}` **Pin Path Constraint (Important):** File paths read/written by the script **must be passed via pins**; never construct output paths inside the script. - Input slots of type `file` are resolved from upstream connections; the script receives them as CLI args. - Output slots of type `file` are resolved to absolute paths by the runtime; the script writes to them directly. - Reference them with `${slotName}` in `script`, e.g. `--figma-tree ${figma_tree} --output ${restore_todolist}`. - **Forbidden** to invent output paths inside the script — downstream nodes will not find the files. **Scripts under `scripts/` must be referenced as `${flowDir}/scripts/xxx.mjs`.**
|
|
158
135
|
- Runtime: direct script when script exists, otherwise agent
|
|
159
|
-
- Inputs: 0. `prev`:node; 1. `workspaceContext`:text; 2. `skillsContext`:text
|
|
136
|
+
- Inputs: 0. `prev`:node; 1. `workspaceContext`:text; 2. `skillsContext`:text; 3. `mcpContext`:text
|
|
160
137
|
- Outputs: 0. `next`:node; 1. `result`:text
|
|
161
138
|
|
|
162
|
-
###
|
|
139
|
+
### tool_set_run_env
|
|
140
|
+
|
|
141
|
+
- Display: Set Run Env
|
|
142
|
+
- Description: Set environment variables for downstream nodes in the current workspace run
|
|
143
|
+
- Runtime: local-only
|
|
144
|
+
- Inputs: 0. `prev`:node; 1. `key`:text; 2. `value`:text; 3. `variables`:text
|
|
145
|
+
- Outputs: 0. `next`:node; 1. `keys`:text; 2. `count`:text
|
|
146
|
+
|
|
147
|
+
### tool_wecom_send_app_markdown
|
|
148
|
+
|
|
149
|
+
- Display: WeCom Direct Markdown
|
|
150
|
+
- Description: Send Markdown message to WeCom users through an enterprise application
|
|
151
|
+
- Runtime: local-only
|
|
152
|
+
- Inputs: 0. `prev`:node; 1. `markdown`:text; 2. `toUser`:text; 3. `corpId`:text; 4. `corpSecret`:text; 5. `agentId`:text; 6. `accessToken`:text
|
|
153
|
+
- Outputs: 0. `next`:node; 1. `sent`:bool; 2. `message`:text; 3. `response`:text
|
|
154
|
+
|
|
155
|
+
### tool_wecom_send_group_markdown
|
|
156
|
+
|
|
157
|
+
- Display: WeCom Group Chat Markdown
|
|
158
|
+
- Description: Send Markdown message to a WeCom group robot webhook
|
|
159
|
+
- Runtime: local-only
|
|
160
|
+
- Inputs: 0. `prev`:node; 1. `markdown`:text; 2. `webhookUrl`:text; 3. `webhookKey`:text
|
|
161
|
+
- Outputs: 0. `next`:node; 1. `sent`:bool; 2. `message`:text; 3. `response`:text
|
|
162
|
+
|
|
163
|
+
## display
|
|
164
|
+
|
|
165
|
+
### display_ascii
|
|
163
166
|
|
|
164
|
-
- Display:
|
|
165
|
-
- Description:
|
|
167
|
+
- Display: ASCII Display
|
|
168
|
+
- Description: Display ASCII diagram content in workspace canvas; passes diagram text downstream as text
|
|
166
169
|
- Runtime: local-only
|
|
167
170
|
- Inputs: 0. `prev`:node; 1. `content`:text
|
|
168
|
-
- Outputs: 0. `next`:node
|
|
171
|
+
- Outputs: 0. `content`:text; 1. `next`:node
|
|
169
172
|
|
|
170
|
-
###
|
|
173
|
+
### display_chart
|
|
171
174
|
|
|
172
|
-
- Display:
|
|
173
|
-
- Description:
|
|
174
|
-
- Runtime:
|
|
175
|
-
- Inputs: 0. `prev`:node; 1. `
|
|
176
|
-
- Outputs: 0. `next`:node
|
|
175
|
+
- Display: Chart Display
|
|
176
|
+
- Description: Display a JSON ChartSpec with ECharts in workspace canvas; passes the JSON downstream as text
|
|
177
|
+
- Runtime: local-only
|
|
178
|
+
- Inputs: 0. `prev`:node; 1. `content`:text; 2. `filePath`:file; 3. `workspaceContext`:text
|
|
179
|
+
- Outputs: 0. `content`:text; 1. `next`:node
|
|
177
180
|
|
|
178
|
-
###
|
|
181
|
+
### display_html
|
|
179
182
|
|
|
180
|
-
- Display:
|
|
181
|
-
- Description:
|
|
183
|
+
- Display: HTML Display
|
|
184
|
+
- Description: Display HTML content in workspace canvas; passes HTML downstream as text
|
|
182
185
|
- Runtime: local-only
|
|
183
|
-
- Inputs: 0. `prev`:node; 1. `
|
|
184
|
-
- Outputs: 0. `
|
|
186
|
+
- Inputs: 0. `prev`:node; 1. `content`:text; 2. `filePath`:file; 3. `workspaceContext`:text
|
|
187
|
+
- Outputs: 0. `content`:text; 1. `next`:node
|
|
185
188
|
|
|
186
|
-
###
|
|
189
|
+
### display_image
|
|
187
190
|
|
|
188
|
-
- Display:
|
|
189
|
-
- Description:
|
|
191
|
+
- Display: Image Display
|
|
192
|
+
- Description: Display an image URL, data URL, or image path in workspace canvas; passes source downstream as text
|
|
190
193
|
- Runtime: local-only
|
|
191
|
-
- Inputs: 0. `prev`:node; 1. `
|
|
192
|
-
- Outputs: 0. `
|
|
194
|
+
- Inputs: 0. `prev`:node; 1. `src`:text; 2. `filePath`:file; 3. `alt`:text; 4. `workspaceContext`:text
|
|
195
|
+
- Outputs: 0. `src`:text; 1. `next`:node
|
|
196
|
+
|
|
197
|
+
### display_markdown
|
|
198
|
+
|
|
199
|
+
- Display: Markdown Display
|
|
200
|
+
- Description: Display Markdown content in workspace canvas; passes content downstream as text
|
|
201
|
+
- Runtime: local-only
|
|
202
|
+
- Inputs: 0. `prev`:node; 1. `content`:text
|
|
203
|
+
- Outputs: 0. `content`:text; 1. `next`:node
|
|
204
|
+
|
|
205
|
+
### display_mermaid
|
|
206
|
+
|
|
207
|
+
- Display: Mermaid Display
|
|
208
|
+
- Description: Display Mermaid diagram source in workspace canvas; passes diagram source downstream as text
|
|
209
|
+
- Runtime: local-only
|
|
210
|
+
- Inputs: 0. `prev`:node; 1. `content`:text
|
|
211
|
+
- Outputs: 0. `content`:text; 1. `next`:node
|
|
212
|
+
|
|
213
|
+
### display_react_app
|
|
214
|
+
|
|
215
|
+
- Display: React App
|
|
216
|
+
- Description: Display a small React project in a sandboxed workspace iframe and pass the project JSON downstream
|
|
217
|
+
- Runtime: local-only
|
|
218
|
+
- Inputs: 0. `prev`:node; 1. `content`:text; 2. `filePath`:file; 3. `workspaceContext`:text
|
|
219
|
+
- Outputs: 0. `content`:text; 1. `next`:node
|
|
220
|
+
|
|
221
|
+
### display_table
|
|
222
|
+
|
|
223
|
+
- Display: Table Display
|
|
224
|
+
- Description: Display table data in workspace canvas; accepts JSON, Markdown table, CSV, or TSV and passes the text downstream
|
|
225
|
+
- Runtime: local-only
|
|
226
|
+
- Inputs: 0. `prev`:node; 1. `content`:text; 2. `filePath`:file; 3. `workspaceContext`:text
|
|
227
|
+
- Outputs: 0. `content`:text; 1. `next`:node
|
|
193
228
|
|
|
194
229
|
## provide
|
|
195
230
|
|
|
231
|
+
### provide_bool
|
|
232
|
+
|
|
233
|
+
- Display: Boolean
|
|
234
|
+
- Description: Provide a boolean value directly, value will be passed to downstream as true or false
|
|
235
|
+
- Runtime: local-only
|
|
236
|
+
- Inputs: 无
|
|
237
|
+
- Outputs: 0. `value`:bool = false
|
|
238
|
+
|
|
196
239
|
### provide_file
|
|
197
240
|
|
|
198
241
|
- Display: File
|
|
@@ -201,6 +244,14 @@
|
|
|
201
244
|
- Inputs: 无
|
|
202
245
|
- Outputs: 0. `value`:file
|
|
203
246
|
|
|
247
|
+
### provide_password
|
|
248
|
+
|
|
249
|
+
- Display: Password
|
|
250
|
+
- Description: Provide a secret text value without showing it on the node card
|
|
251
|
+
- Runtime: local-only
|
|
252
|
+
- Inputs: 无
|
|
253
|
+
- Outputs: 0. `value`:text
|
|
254
|
+
|
|
204
255
|
### provide_str
|
|
205
256
|
|
|
206
257
|
- Display: String
|
|
@@ -61,4 +61,4 @@ Important files:
|
|
|
61
61
|
|
|
62
62
|
- Edge values are resolved by handle index.
|
|
63
63
|
- File slots usually pass paths; text slots may read upstream output file content.
|
|
64
|
-
- `
|
|
64
|
+
- `display_*.content` should receive the text to render. Pick the display type that matches the payload (`display_markdown`, `display_html`, `display_table`, `display_chart`, …).
|