@gt-fe/eap-cli 0.2.17 → 0.2.20
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 +304 -304
- package/dist/commands/create.d.ts.map +1 -1
- package/dist/commands/create.js +31 -2
- package/dist/commands/create.js.map +1 -1
- package/dist/index.js +31 -2
- package/dist/index.js.map +1 -1
- package/dist/static/playground-app/assets/{index-Bg09N-Dc.css → index-B3p2mvcC.css} +1 -1
- package/dist/static/playground-app/assets/{index-CjAzCUkk.js → index-EGQ_46bX.js} +65 -65
- package/dist/static/playground-app/index.html +2 -2
- package/dist/templates/README.md +51 -51
- package/dist/templates/agent-api-orchestration/README.md +326 -326
- package/dist/templates/agent-api-orchestration/eap.config.json +1 -1
- package/dist/templates/agent-api-orchestration/graph.json +35 -35
- package/dist/templates/agent-api-orchestration/package.json +2 -2
- package/dist/templates/dag-workflow/README.md +102 -102
- package/dist/templates/dag-workflow/agent.manifest.json +19 -19
- package/dist/templates/dag-workflow/eap.config.json +1 -1
- package/dist/templates/dag-workflow/gitignore +51 -51
- package/dist/templates/dag-workflow/graph.json +51 -51
- package/dist/templates/dag-workflow/skills/README.md +116 -116
- package/dist/templates/plan-and-execute/README.md +109 -109
- package/dist/templates/plan-and-execute/agent.manifest.json +19 -19
- package/dist/templates/plan-and-execute/eap.config.json +1 -1
- package/dist/templates/plan-and-execute/eap.lock.yaml +5 -5
- package/dist/templates/plan-and-execute/gitignore +51 -51
- package/dist/templates/plan-and-execute/graph.json +49 -49
- package/dist/templates/plan-and-execute/skills/README.md +120 -120
- package/dist/templates/simple-flow/README.md +87 -87
- package/dist/templates/simple-flow/agent.manifest.json +19 -19
- package/dist/templates/simple-flow/eap.config.json +1 -1
- package/dist/templates/simple-flow/gitignore +51 -51
- package/dist/templates/simple-flow/graph.json +32 -32
- package/dist/templates/simple-flow/package.json +10 -10
- package/dist/templates/simple-flow/skills/README.md +113 -113
- package/dist/templates/single-agent-with-tools/README.md +138 -138
- package/dist/templates/single-agent-with-tools/agent.manifest.json +19 -19
- package/dist/templates/single-agent-with-tools/eap.config.json +1 -1
- package/dist/templates/single-agent-with-tools/eap.lock.yaml +5 -5
- package/dist/templates/single-agent-with-tools/gitignore +51 -51
- package/dist/templates/single-agent-with-tools/graph.json +41 -41
- package/dist/templates/single-agent-with-tools/skills/README.md +119 -119
- package/dist/templates/single-agent-with-tools/tools/http-weather/toolset.manifest.json +73 -73
- package/dist/templates/single-agent-with-tools/tools/web-search/toolset.manifest.json +41 -41
- package/package.json +2 -2
|
@@ -1,35 +1,35 @@
|
|
|
1
|
-
{
|
|
2
|
-
"description": "用于演示 Agent API 编排的最小模型流程(含 RAG 多源检索)。",
|
|
3
|
-
"state": {
|
|
4
|
-
"userRequest": "string",
|
|
5
|
-
"response": "string"
|
|
6
|
-
},
|
|
7
|
-
"nodes": [
|
|
8
|
-
{
|
|
9
|
-
"id": "rag",
|
|
10
|
-
"type": "rag",
|
|
11
|
-
"config": {
|
|
12
|
-
"maxIterations": 5
|
|
13
|
-
}
|
|
14
|
-
},
|
|
15
|
-
{
|
|
16
|
-
"id": "respond",
|
|
17
|
-
"type": "llm",
|
|
18
|
-
"config": {
|
|
19
|
-
"disableTools": true,
|
|
20
|
-
"systemPrompt": "你是企业知识与数据问答助手,请根据用户的问题直接回答。"
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
],
|
|
24
|
-
"edges": [
|
|
25
|
-
{ "from": "__start__", "to": "rag" },
|
|
26
|
-
{ "from": "rag", "to": "respond" },
|
|
27
|
-
{ "from": "respond", "to": "__end__" }
|
|
28
|
-
],
|
|
29
|
-
"entryPoint": "rag",
|
|
30
|
-
"finishPoints": ["__end__"],
|
|
31
|
-
"config": {
|
|
32
|
-
"maxRetries": 3,
|
|
33
|
-
"checkpointStore": "memory"
|
|
34
|
-
}
|
|
35
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"description": "用于演示 Agent API 编排的最小模型流程(含 RAG 多源检索)。",
|
|
3
|
+
"state": {
|
|
4
|
+
"userRequest": "string",
|
|
5
|
+
"response": "string"
|
|
6
|
+
},
|
|
7
|
+
"nodes": [
|
|
8
|
+
{
|
|
9
|
+
"id": "rag",
|
|
10
|
+
"type": "rag",
|
|
11
|
+
"config": {
|
|
12
|
+
"maxIterations": 5
|
|
13
|
+
}
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
"id": "respond",
|
|
17
|
+
"type": "llm",
|
|
18
|
+
"config": {
|
|
19
|
+
"disableTools": true,
|
|
20
|
+
"systemPrompt": "你是企业知识与数据问答助手,请根据用户的问题直接回答。"
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
],
|
|
24
|
+
"edges": [
|
|
25
|
+
{ "from": "__start__", "to": "rag" },
|
|
26
|
+
{ "from": "rag", "to": "respond" },
|
|
27
|
+
{ "from": "respond", "to": "__end__" }
|
|
28
|
+
],
|
|
29
|
+
"entryPoint": "rag",
|
|
30
|
+
"finishPoints": ["__end__"],
|
|
31
|
+
"config": {
|
|
32
|
+
"maxRetries": 3,
|
|
33
|
+
"checkpointStore": "memory"
|
|
34
|
+
}
|
|
35
|
+
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "agent-api-orchestration",
|
|
3
|
-
"description": "
|
|
3
|
+
"description": "面向前端智能体页面的 Agent API 服务模板",
|
|
4
4
|
"version": "1.0.0",
|
|
5
5
|
"private": true,
|
|
6
6
|
"type": "module",
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
"type-check": "tsc --noEmit"
|
|
15
15
|
},
|
|
16
16
|
"dependencies": {
|
|
17
|
-
"@gt-fe/eap-sdk": "^0.2.
|
|
17
|
+
"@gt-fe/eap-sdk": "^0.2.20",
|
|
18
18
|
"dotenv": "^17.2.2",
|
|
19
19
|
"express": "^4.21.2"
|
|
20
20
|
},
|
|
@@ -1,102 +1,102 @@
|
|
|
1
|
-
# DAG 工作流
|
|
2
|
-
|
|
3
|
-
`split` 两条普通出边同时进入 `branch-report` 与 `branch-task`,再在 `merge` 汇合。本模板按无环图交付。
|
|
4
|
-
|
|
5
|
-
并行扇出就是多条普通边。条件分支把这两条出边改成 `conditionalEdges`,一次只走一条。装配 Skill 见 `skills/README.md`。整图超时:图上未写 `config.timeout` 时为 20 分钟。
|
|
6
|
-
|
|
7
|
-
## 图结构
|
|
8
|
-
|
|
9
|
-
```text
|
|
10
|
-
╭───────────╮ ┌──────────────┐
|
|
11
|
-
│ __start__ ├───▶│ split / code │
|
|
12
|
-
╰───────────╯ └──────┬───────┘
|
|
13
|
-
┌──────┴──────┐
|
|
14
|
-
▼ ▼
|
|
15
|
-
┌──────────────────┐ ┌──────────────────┐
|
|
16
|
-
│ branch-report │ │ branch-task │
|
|
17
|
-
│ llm disableTools │ │ llm disableTools │
|
|
18
|
-
└────────┬─────────┘ └────────┬─────────┘
|
|
19
|
-
└──────────┬────────────┘
|
|
20
|
-
▼
|
|
21
|
-
┌─────────────────┐ ╭─────────╮
|
|
22
|
-
│ merge / llm · ├───▶│ __end__ │
|
|
23
|
-
│ disableTools │ ╰─────────╯
|
|
24
|
-
└─────────────────┘
|
|
25
|
-
```
|
|
26
|
-
|
|
27
|
-
```mermaid
|
|
28
|
-
flowchart TB
|
|
29
|
-
start((__start__)) --> split[split / code]
|
|
30
|
-
split --> report["branch-report / llm · disableTools"]
|
|
31
|
-
split --> task["branch-task / llm · disableTools"]
|
|
32
|
-
report --> merge["merge / llm · disableTools"]
|
|
33
|
-
task --> merge
|
|
34
|
-
merge --> finish((__end__))
|
|
35
|
-
```
|
|
36
|
-
|
|
37
|
-
**适用**:多步骤、独立分支同时推进后再汇合。
|
|
38
|
-
|
|
39
|
-
**不适用**:一次只走一条分支。把 `split` 的两条普通出边改成 `conditionalEdges`。
|
|
40
|
-
|
|
41
|
-
Session 只保留 `merge` 的正文(`finishPoints: ["merge"]`)。两条分支的意见在 llm-turns / Trace,不写成两条助手消息。
|
|
42
|
-
|
|
43
|
-
## 1. 配置
|
|
44
|
-
|
|
45
|
-
本地 `eap chat` 不要求 `eap login`。`runtime.llm` 会设置 `EAP_LLM_MODE=local`,用 `eap.config.json` 里的网关和 Token,不走 Foundation 模型路由。`platform.foundationServiceUrl` 默认是测试环境地址,给登录/发布用;纯本地可改为 `null`。
|
|
46
|
-
|
|
47
|
-
把 `runtime.llm.models.*.apiKey` 的 `sk-example-token` 换成与 `baseUrl` 一致的有效 Token,不要提交真实密钥。图中 LLM 均设 `disableTools`,无 Tool 节点。
|
|
48
|
-
|
|
49
|
-
| 项 | 要求 |
|
|
50
|
-
|----|------|
|
|
51
|
-
| `runtime.llm.models.*.apiKey` | 模板占位 `sk-example-token`,运行前替换 |
|
|
52
|
-
| `baseUrl` | 默认 `https://gtaiapi.gtcloud.cn/v1`。须与 Key 所属网关一致 |
|
|
53
|
-
| 生效 | 修改 `eap.config.json` 后重新启动 `eap chat` |
|
|
54
|
-
|
|
55
|
-
## 2. 占位符与密钥
|
|
56
|
-
|
|
57
|
-
模型密钥写在 `eap.config.json` 的 `runtime.llm.models.*.apiKey`,模板占位 `sk-example-token`。
|
|
58
|
-
|
|
59
|
-
| 环境 | 处理 |
|
|
60
|
-
|------|------|
|
|
61
|
-
| 本地 | 替换占位 Token;不要提交真实密钥 |
|
|
62
|
-
| 生产 | 不使用 `runtime.llm`。模型密钥由 Foundation 模型路由持有 |
|
|
63
|
-
|
|
64
|
-
华为云 UCS「配置项与密钥」:配置项(ConfigMap)只存放非敏感值;密钥(Secret)仅当该 Pod 必须持有敏感值,且须挂载。禁止将 API Key 写入配置项。
|
|
65
|
-
|
|
66
|
-
## 3. 运行
|
|
67
|
-
|
|
68
|
-
```bash
|
|
69
|
-
eap validate --strict
|
|
70
|
-
eap chat
|
|
71
|
-
```
|
|
72
|
-
|
|
73
|
-
`eap chat` 须在交互式终端中运行。启动摘要应为 `Runtime openai-http · mcp · dev`。
|
|
74
|
-
|
|
75
|
-
试跑:`用户登录后要导出月报,请给出说明和待办。` 预期两个分支都执行,再由 merge 汇总。Session 只保留 merge 这一条用户可见回复(`finishPoints`)。终端与 Playground 在**同一轮**里按节点分块展示,块上标节点 id,不把两路 token 交错拼成一串;`--verbose` 与 llm-turns 可看分支全文。
|
|
76
|
-
|
|
77
|
-
可选:`eap chat --verbose`;`eap dev` 启动 Playground。
|
|
78
|
-
|
|
79
|
-
## 4. 项目结构
|
|
80
|
-
|
|
81
|
-
```text
|
|
82
|
-
.
|
|
83
|
-
|-- agent.manifest.json
|
|
84
|
-
|-- graph.json
|
|
85
|
-
|-- eap.config.json
|
|
86
|
-
|-- eap.lock.yaml
|
|
87
|
-
|-- package.json
|
|
88
|
-
|-- .gitignore
|
|
89
|
-
`-- skills/README.md
|
|
90
|
-
```
|
|
91
|
-
|
|
92
|
-
发布与部署以 Portal / Hosting 合同为准。
|
|
93
|
-
|
|
94
|
-
## 5. 故障排除
|
|
95
|
-
|
|
96
|
-
| 现象 | 处理 |
|
|
97
|
-
|------|------|
|
|
98
|
-
| `LLM API error 401` | Key 无效,或与 `baseUrl` 所属网关不一致 |
|
|
99
|
-
| 提示先执行 `eap login` | 升级 CLI。本地 `eap chat` 不要求登录 |
|
|
100
|
-
| 启动失败,提示 `no API key resolved` | 把 `eap.config.json` 的 `sk-example-token` 换成有效 Token |
|
|
101
|
-
| 校验失败,提示节点 type 非法 | 扇出用普通边,不要发明节点类型 |
|
|
102
|
-
| 请求进入 Foundation 模型路由 | `platform.foundationServiceUrl` 设为 `null`,并取消 `FOUNDATION_SERVICE_URL` |
|
|
1
|
+
# DAG 工作流
|
|
2
|
+
|
|
3
|
+
`split` 两条普通出边同时进入 `branch-report` 与 `branch-task`,再在 `merge` 汇合。本模板按无环图交付。
|
|
4
|
+
|
|
5
|
+
并行扇出就是多条普通边。条件分支把这两条出边改成 `conditionalEdges`,一次只走一条。装配 Skill 见 `skills/README.md`。整图超时:图上未写 `config.timeout` 时为 20 分钟。
|
|
6
|
+
|
|
7
|
+
## 图结构
|
|
8
|
+
|
|
9
|
+
```text
|
|
10
|
+
╭───────────╮ ┌──────────────┐
|
|
11
|
+
│ __start__ ├───▶│ split / code │
|
|
12
|
+
╰───────────╯ └──────┬───────┘
|
|
13
|
+
┌──────┴──────┐
|
|
14
|
+
▼ ▼
|
|
15
|
+
┌──────────────────┐ ┌──────────────────┐
|
|
16
|
+
│ branch-report │ │ branch-task │
|
|
17
|
+
│ llm disableTools │ │ llm disableTools │
|
|
18
|
+
└────────┬─────────┘ └────────┬─────────┘
|
|
19
|
+
└──────────┬────────────┘
|
|
20
|
+
▼
|
|
21
|
+
┌─────────────────┐ ╭─────────╮
|
|
22
|
+
│ merge / llm · ├───▶│ __end__ │
|
|
23
|
+
│ disableTools │ ╰─────────╯
|
|
24
|
+
└─────────────────┘
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
```mermaid
|
|
28
|
+
flowchart TB
|
|
29
|
+
start((__start__)) --> split[split / code]
|
|
30
|
+
split --> report["branch-report / llm · disableTools"]
|
|
31
|
+
split --> task["branch-task / llm · disableTools"]
|
|
32
|
+
report --> merge["merge / llm · disableTools"]
|
|
33
|
+
task --> merge
|
|
34
|
+
merge --> finish((__end__))
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
**适用**:多步骤、独立分支同时推进后再汇合。
|
|
38
|
+
|
|
39
|
+
**不适用**:一次只走一条分支。把 `split` 的两条普通出边改成 `conditionalEdges`。
|
|
40
|
+
|
|
41
|
+
Session 只保留 `merge` 的正文(`finishPoints: ["merge"]`)。两条分支的意见在 llm-turns / Trace,不写成两条助手消息。
|
|
42
|
+
|
|
43
|
+
## 1. 配置
|
|
44
|
+
|
|
45
|
+
本地 `eap chat` 不要求 `eap login`。`runtime.llm` 会设置 `EAP_LLM_MODE=local`,用 `eap.config.json` 里的网关和 Token,不走 Foundation 模型路由。`platform.foundationServiceUrl` 默认是测试环境地址,给登录/发布用;纯本地可改为 `null`。
|
|
46
|
+
|
|
47
|
+
把 `runtime.llm.models.*.apiKey` 的 `sk-example-token` 换成与 `baseUrl` 一致的有效 Token,不要提交真实密钥。图中 LLM 均设 `disableTools`,无 Tool 节点。
|
|
48
|
+
|
|
49
|
+
| 项 | 要求 |
|
|
50
|
+
|----|------|
|
|
51
|
+
| `runtime.llm.models.*.apiKey` | 模板占位 `sk-example-token`,运行前替换 |
|
|
52
|
+
| `baseUrl` | 默认 `https://gtaiapi.gtcloud.cn/v1`。须与 Key 所属网关一致 |
|
|
53
|
+
| 生效 | 修改 `eap.config.json` 后重新启动 `eap chat` |
|
|
54
|
+
|
|
55
|
+
## 2. 占位符与密钥
|
|
56
|
+
|
|
57
|
+
模型密钥写在 `eap.config.json` 的 `runtime.llm.models.*.apiKey`,模板占位 `sk-example-token`。
|
|
58
|
+
|
|
59
|
+
| 环境 | 处理 |
|
|
60
|
+
|------|------|
|
|
61
|
+
| 本地 | 替换占位 Token;不要提交真实密钥 |
|
|
62
|
+
| 生产 | 不使用 `runtime.llm`。模型密钥由 Foundation 模型路由持有 |
|
|
63
|
+
|
|
64
|
+
华为云 UCS「配置项与密钥」:配置项(ConfigMap)只存放非敏感值;密钥(Secret)仅当该 Pod 必须持有敏感值,且须挂载。禁止将 API Key 写入配置项。
|
|
65
|
+
|
|
66
|
+
## 3. 运行
|
|
67
|
+
|
|
68
|
+
```bash
|
|
69
|
+
eap validate --strict
|
|
70
|
+
eap chat
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
`eap chat` 须在交互式终端中运行。启动摘要应为 `Runtime openai-http · mcp · dev`。
|
|
74
|
+
|
|
75
|
+
试跑:`用户登录后要导出月报,请给出说明和待办。` 预期两个分支都执行,再由 merge 汇总。Session 只保留 merge 这一条用户可见回复(`finishPoints`)。终端与 Playground 在**同一轮**里按节点分块展示,块上标节点 id,不把两路 token 交错拼成一串;`--verbose` 与 llm-turns 可看分支全文。
|
|
76
|
+
|
|
77
|
+
可选:`eap chat --verbose`;`eap dev` 启动 Playground。
|
|
78
|
+
|
|
79
|
+
## 4. 项目结构
|
|
80
|
+
|
|
81
|
+
```text
|
|
82
|
+
.
|
|
83
|
+
|-- agent.manifest.json
|
|
84
|
+
|-- graph.json
|
|
85
|
+
|-- eap.config.json
|
|
86
|
+
|-- eap.lock.yaml
|
|
87
|
+
|-- package.json
|
|
88
|
+
|-- .gitignore
|
|
89
|
+
`-- skills/README.md
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
发布与部署以 Portal / Hosting 合同为准。
|
|
93
|
+
|
|
94
|
+
## 5. 故障排除
|
|
95
|
+
|
|
96
|
+
| 现象 | 处理 |
|
|
97
|
+
|------|------|
|
|
98
|
+
| `LLM API error 401` | Key 无效,或与 `baseUrl` 所属网关不一致 |
|
|
99
|
+
| 提示先执行 `eap login` | 升级 CLI。本地 `eap chat` 不要求登录 |
|
|
100
|
+
| 启动失败,提示 `no API key resolved` | 把 `eap.config.json` 的 `sk-example-token` 换成有效 Token |
|
|
101
|
+
| 校验失败,提示节点 type 非法 | 扇出用普通边,不要发明节点类型 |
|
|
102
|
+
| 请求进入 Foundation 模型路由 | `platform.foundationServiceUrl` 设为 `null`,并取消 `FOUNDATION_SERVICE_URL` |
|
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
{
|
|
2
|
-
"code": "my-agent",
|
|
3
|
-
"name": "my-agent",
|
|
4
|
-
"version": "1.0.0",
|
|
5
|
-
"description": "DAG 工作流:并行扇出后合并",
|
|
6
|
-
"toolRefs": [],
|
|
7
|
-
"skillRefs": [],
|
|
8
|
-
"prompts": {
|
|
9
|
-
"system": "对请求同时从报告和任务两个视角处理,再合并。用中文回答。"
|
|
10
|
-
},
|
|
11
|
-
"models": {
|
|
12
|
-
"default": "DeepSeek-V4-Pro",
|
|
13
|
-
"allowed": ["DeepSeek-V4-Pro", "DeepSeek-V4-Flash"]
|
|
14
|
-
},
|
|
15
|
-
"metadata": {
|
|
16
|
-
"owner": "agent-template",
|
|
17
|
-
"tags": ["template"]
|
|
18
|
-
}
|
|
19
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"code": "my-agent",
|
|
3
|
+
"name": "my-agent",
|
|
4
|
+
"version": "1.0.0",
|
|
5
|
+
"description": "DAG 工作流:并行扇出后合并",
|
|
6
|
+
"toolRefs": [],
|
|
7
|
+
"skillRefs": [],
|
|
8
|
+
"prompts": {
|
|
9
|
+
"system": "对请求同时从报告和任务两个视角处理,再合并。用中文回答。"
|
|
10
|
+
},
|
|
11
|
+
"models": {
|
|
12
|
+
"default": "DeepSeek-V4-Pro",
|
|
13
|
+
"allowed": ["DeepSeek-V4-Pro", "DeepSeek-V4-Flash"]
|
|
14
|
+
},
|
|
15
|
+
"metadata": {
|
|
16
|
+
"owner": "agent-template",
|
|
17
|
+
"tags": ["template"]
|
|
18
|
+
}
|
|
19
|
+
}
|
|
@@ -1,51 +1,51 @@
|
|
|
1
|
-
# OS files
|
|
2
|
-
.DS_Store
|
|
3
|
-
Thumbs.db
|
|
4
|
-
Desktop.ini
|
|
5
|
-
|
|
6
|
-
# Editor and IDE files
|
|
7
|
-
.idea/
|
|
8
|
-
.vscode/
|
|
9
|
-
*.swp
|
|
10
|
-
*.swo
|
|
11
|
-
|
|
12
|
-
# Dependencies
|
|
13
|
-
node_modules/
|
|
14
|
-
.pnpm-store/
|
|
15
|
-
|
|
16
|
-
# Lock files
|
|
17
|
-
package-lock.json
|
|
18
|
-
|
|
19
|
-
# Build outputs
|
|
20
|
-
dist/
|
|
21
|
-
build/
|
|
22
|
-
out/
|
|
23
|
-
.output/
|
|
24
|
-
.history
|
|
25
|
-
|
|
26
|
-
# Logs
|
|
27
|
-
*.log
|
|
28
|
-
npm-debug.log*
|
|
29
|
-
yarn-debug.log*
|
|
30
|
-
yarn-error.log*
|
|
31
|
-
pnpm-debug.log*
|
|
32
|
-
|
|
33
|
-
# Test coverage
|
|
34
|
-
coverage/
|
|
35
|
-
|
|
36
|
-
# Turbo
|
|
37
|
-
.turbo/
|
|
38
|
-
|
|
39
|
-
# Environment
|
|
40
|
-
.env
|
|
41
|
-
.env.local
|
|
42
|
-
.env.*.local
|
|
43
|
-
|
|
44
|
-
# Temporary files
|
|
45
|
-
tmp/
|
|
46
|
-
temp/
|
|
47
|
-
.cache/
|
|
48
|
-
.run/
|
|
49
|
-
|
|
50
|
-
# Generated Agent state
|
|
51
|
-
.eap/
|
|
1
|
+
# OS files
|
|
2
|
+
.DS_Store
|
|
3
|
+
Thumbs.db
|
|
4
|
+
Desktop.ini
|
|
5
|
+
|
|
6
|
+
# Editor and IDE files
|
|
7
|
+
.idea/
|
|
8
|
+
.vscode/
|
|
9
|
+
*.swp
|
|
10
|
+
*.swo
|
|
11
|
+
|
|
12
|
+
# Dependencies
|
|
13
|
+
node_modules/
|
|
14
|
+
.pnpm-store/
|
|
15
|
+
|
|
16
|
+
# Lock files
|
|
17
|
+
package-lock.json
|
|
18
|
+
|
|
19
|
+
# Build outputs
|
|
20
|
+
dist/
|
|
21
|
+
build/
|
|
22
|
+
out/
|
|
23
|
+
.output/
|
|
24
|
+
.history
|
|
25
|
+
|
|
26
|
+
# Logs
|
|
27
|
+
*.log
|
|
28
|
+
npm-debug.log*
|
|
29
|
+
yarn-debug.log*
|
|
30
|
+
yarn-error.log*
|
|
31
|
+
pnpm-debug.log*
|
|
32
|
+
|
|
33
|
+
# Test coverage
|
|
34
|
+
coverage/
|
|
35
|
+
|
|
36
|
+
# Turbo
|
|
37
|
+
.turbo/
|
|
38
|
+
|
|
39
|
+
# Environment
|
|
40
|
+
.env
|
|
41
|
+
.env.local
|
|
42
|
+
.env.*.local
|
|
43
|
+
|
|
44
|
+
# Temporary files
|
|
45
|
+
tmp/
|
|
46
|
+
temp/
|
|
47
|
+
.cache/
|
|
48
|
+
.run/
|
|
49
|
+
|
|
50
|
+
# Generated Agent state
|
|
51
|
+
.eap/
|
|
@@ -1,51 +1,51 @@
|
|
|
1
|
-
{
|
|
2
|
-
"description": "并行扇出后合并:split 两条普通出边同时进入两个 LLM,再在 merge 汇合。",
|
|
3
|
-
"nodes": [
|
|
4
|
-
{
|
|
5
|
-
"id": "split",
|
|
6
|
-
"type": "code",
|
|
7
|
-
"config": {
|
|
8
|
-
"timeoutMs": 1000,
|
|
9
|
-
"code": "const msgs = Array.isArray(state.messages) ? state.messages : [];\nlet text = '';\nfor (let i = msgs.length - 1; i >= 0; i--) {\n if (msgs[i] && msgs[i].role === 'user') { text = String(msgs[i].content || ''); break; }\n}\nreturn { step: 'split', text: String(text).replace(/\\s+/g, ' ').trim() };"
|
|
10
|
-
}
|
|
11
|
-
},
|
|
12
|
-
{
|
|
13
|
-
"id": "branch-report",
|
|
14
|
-
"type": "llm",
|
|
15
|
-
"config": {
|
|
16
|
-
"disableTools": true,
|
|
17
|
-
"systemPrompt": "从「报告/说明」视角用中文给出简短意见。不要调用工具。"
|
|
18
|
-
}
|
|
19
|
-
},
|
|
20
|
-
{
|
|
21
|
-
"id": "branch-task",
|
|
22
|
-
"type": "llm",
|
|
23
|
-
"config": {
|
|
24
|
-
"disableTools": true,
|
|
25
|
-
"systemPrompt": "从「任务/排期」视角用中文给出简短意见。不要调用工具。"
|
|
26
|
-
}
|
|
27
|
-
},
|
|
28
|
-
{
|
|
29
|
-
"id": "merge",
|
|
30
|
-
"type": "llm",
|
|
31
|
-
"config": {
|
|
32
|
-
"disableTools": true,
|
|
33
|
-
"systemPrompt": "综合两个视角的意见,用中文给出最终回复。不要调用工具。"
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
|
-
],
|
|
37
|
-
"edges": [
|
|
38
|
-
{ "from": "__start__", "to": "split" },
|
|
39
|
-
{ "from": "split", "to": "branch-report" },
|
|
40
|
-
{ "from": "split", "to": "branch-task" },
|
|
41
|
-
{ "from": "branch-report", "to": "merge" },
|
|
42
|
-
{ "from": "branch-task", "to": "merge" },
|
|
43
|
-
{ "from": "merge", "to": "__end__" }
|
|
44
|
-
],
|
|
45
|
-
"entryPoint": "split",
|
|
46
|
-
"finishPoints": ["merge"],
|
|
47
|
-
"config": {
|
|
48
|
-
"maxRetries": 3,
|
|
49
|
-
"checkpointStore": "memory"
|
|
50
|
-
}
|
|
51
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"description": "并行扇出后合并:split 两条普通出边同时进入两个 LLM,再在 merge 汇合。",
|
|
3
|
+
"nodes": [
|
|
4
|
+
{
|
|
5
|
+
"id": "split",
|
|
6
|
+
"type": "code",
|
|
7
|
+
"config": {
|
|
8
|
+
"timeoutMs": 1000,
|
|
9
|
+
"code": "const msgs = Array.isArray(state.messages) ? state.messages : [];\nlet text = '';\nfor (let i = msgs.length - 1; i >= 0; i--) {\n if (msgs[i] && msgs[i].role === 'user') { text = String(msgs[i].content || ''); break; }\n}\nreturn { step: 'split', text: String(text).replace(/\\s+/g, ' ').trim() };"
|
|
10
|
+
}
|
|
11
|
+
},
|
|
12
|
+
{
|
|
13
|
+
"id": "branch-report",
|
|
14
|
+
"type": "llm",
|
|
15
|
+
"config": {
|
|
16
|
+
"disableTools": true,
|
|
17
|
+
"systemPrompt": "从「报告/说明」视角用中文给出简短意见。不要调用工具。"
|
|
18
|
+
}
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
"id": "branch-task",
|
|
22
|
+
"type": "llm",
|
|
23
|
+
"config": {
|
|
24
|
+
"disableTools": true,
|
|
25
|
+
"systemPrompt": "从「任务/排期」视角用中文给出简短意见。不要调用工具。"
|
|
26
|
+
}
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
"id": "merge",
|
|
30
|
+
"type": "llm",
|
|
31
|
+
"config": {
|
|
32
|
+
"disableTools": true,
|
|
33
|
+
"systemPrompt": "综合两个视角的意见,用中文给出最终回复。不要调用工具。"
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
],
|
|
37
|
+
"edges": [
|
|
38
|
+
{ "from": "__start__", "to": "split" },
|
|
39
|
+
{ "from": "split", "to": "branch-report" },
|
|
40
|
+
{ "from": "split", "to": "branch-task" },
|
|
41
|
+
{ "from": "branch-report", "to": "merge" },
|
|
42
|
+
{ "from": "branch-task", "to": "merge" },
|
|
43
|
+
{ "from": "merge", "to": "__end__" }
|
|
44
|
+
],
|
|
45
|
+
"entryPoint": "split",
|
|
46
|
+
"finishPoints": ["merge"],
|
|
47
|
+
"config": {
|
|
48
|
+
"maxRetries": 3,
|
|
49
|
+
"checkpointStore": "memory"
|
|
50
|
+
}
|
|
51
|
+
}
|