@gt-fe/eap-cli 0.2.15 → 0.2.17

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.
Files changed (36) hide show
  1. package/README.md +304 -304
  2. package/dist/templates/README.md +51 -51
  3. package/dist/templates/agent-api-orchestration/README.md +326 -326
  4. package/dist/templates/agent-api-orchestration/eap.config.json +1 -1
  5. package/dist/templates/agent-api-orchestration/graph.json +35 -35
  6. package/dist/templates/agent-api-orchestration/package.json +2 -2
  7. package/dist/templates/dag-workflow/README.md +102 -102
  8. package/dist/templates/dag-workflow/agent.manifest.json +19 -19
  9. package/dist/templates/dag-workflow/eap.config.json +1 -1
  10. package/dist/templates/dag-workflow/gitignore +51 -51
  11. package/dist/templates/dag-workflow/graph.json +51 -51
  12. package/dist/templates/dag-workflow/skills/README.md +116 -116
  13. package/dist/templates/plan-and-execute/README.md +109 -109
  14. package/dist/templates/plan-and-execute/agent.manifest.json +19 -19
  15. package/dist/templates/plan-and-execute/eap.config.json +1 -1
  16. package/dist/templates/plan-and-execute/eap.lock.yaml +5 -5
  17. package/dist/templates/plan-and-execute/gitignore +51 -51
  18. package/dist/templates/plan-and-execute/graph.json +49 -49
  19. package/dist/templates/plan-and-execute/skills/README.md +120 -120
  20. package/dist/templates/simple-flow/README.md +87 -87
  21. package/dist/templates/simple-flow/agent.manifest.json +19 -19
  22. package/dist/templates/simple-flow/eap.config.json +1 -1
  23. package/dist/templates/simple-flow/gitignore +51 -51
  24. package/dist/templates/simple-flow/graph.json +32 -32
  25. package/dist/templates/simple-flow/package.json +10 -10
  26. package/dist/templates/simple-flow/skills/README.md +113 -113
  27. package/dist/templates/single-agent-with-tools/README.md +138 -138
  28. package/dist/templates/single-agent-with-tools/agent.manifest.json +19 -19
  29. package/dist/templates/single-agent-with-tools/eap.config.json +1 -1
  30. package/dist/templates/single-agent-with-tools/eap.lock.yaml +5 -5
  31. package/dist/templates/single-agent-with-tools/gitignore +51 -51
  32. package/dist/templates/single-agent-with-tools/graph.json +41 -41
  33. package/dist/templates/single-agent-with-tools/skills/README.md +119 -119
  34. package/dist/templates/single-agent-with-tools/tools/http-weather/toolset.manifest.json +73 -73
  35. package/dist/templates/single-agent-with-tools/tools/web-search/toolset.manifest.json +41 -41
  36. package/package.json +2 -2
@@ -1,51 +1,51 @@
1
- # CLI 脚手架源
2
-
3
- 本目录是 `eap create` 的磁盘源。构建 CLI 时同步到 `packages/cli/dist/templates/`。`eap create` 只拷贝 `packages/cli/src/lib/template.ts` 里**已登记**的子目录,不会拷贝本文件。
4
-
5
- PRD 预期形态见 [prd-agent-execution-modes.md](../../docs/architecture/prd-agent-execution-modes.md)。本目录是 `eap create` 脚手架。默认图不含 subgraph;并行扇出用多条普通出边。
6
-
7
- 面向 **CLI / 模板维护者**。Agent 开发者请使用 `npm install -g @eap/cli` 后阅读生成工程内的 README。
8
-
9
- ## 已登记模板
10
-
11
- | 目录 | `eap create` | 图结构 | 适用 |
12
- |------|--------------|--------|------|
13
- | `simple-flow` | 已登记 | code 整理 → 一次 LLM(`disableTools`) | 固定步骤。默认可无工具;工具或 Skill 须写在图上 |
14
- | `single-agent-with-tools` | **默认** | ReAct:`agent` ⇄ `tools` | 默认装配 `echo-tool` 与 `http-weather`;`web-search` 未写入 `toolRefs` |
15
- | `plan-and-execute` | 已登记 | planner → executor ⇄ tools | 先规划,再按计划逐步执行 |
16
- | `dag-workflow` | 已登记 | split 两条出边 → 两个 llm → merge | 并行扇出后汇合 |
17
- | `agent-api-orchestration` | 已登记 | rag → respond;内嵌 Runtime + HTTP/SSE | Agent API 服务工程,不是执行模式。不依赖 `eap login` |
18
-
19
- 现行 `eap create` 执行模式只登记上表前四行。`agent-api-orchestration` 是服务工程,不是执行模式。Orchestrator 工程、由事件触发的 Agent 工程若另提供,不作为执行模式登记。见 [prd-agent-execution-modes.md](../../docs/architecture/prd-agent-execution-modes.md)。
20
-
21
- Session 一轮一条助手正文。`plan-and-execute` 的 `finishPoints` 保持 `["__end__"]`,计划与结果拼进这一条;不要把 `planner` 写进去(那是 LangGraph 终止点)。`dag-workflow` 写 `["merge"]`,只保留汇合正文。
22
-
23
- 对照样例(`fixtures/eap-ask-data/`、`fixtures/chatAgent/`)不会被 `eap create` 拷走。官方模板不得加入问数 select/bind。`copyTemplate` 与构建脚本排除 `node_modules`、`dist`、`.eap`、`agents`、`.turbo`。
24
-
25
- `echo-tool` 为 `type: code`、`runtime: node`,使用当前 `eap` 进程的 Node,stdin/stdout 为 JSON。类型说明见 [tool-types-and-transports.md](../../docs/contracts/tool-types-and-transports.md)。
26
-
27
- ## 构建本仓库 CLI(仅 CLI 开发者)
28
-
29
- 在 **EAP 仓库根目录**(含 `dev-tools/` 的那一层)执行:
30
-
31
- ```bash
32
- pnpm --dir dev-tools/packages/cli run build
33
- node dev-tools/packages/cli/dist/index.js create demo --template simple-flow --dir ./demo
34
- ```
35
-
36
- 构建会执行 `scripts/copy-templates.mjs`,将本目录同步到 `packages/cli/dist/templates/`。未构建则 `eap create` 仍使用旧模板。
37
-
38
- ## Agent 开发者创建工程
39
-
40
- ```bash
41
- # ~/.npmrc 配置 @eap:registry 指向公司私服
42
- npm install -g @eap/cli
43
- eap create my-agent --template single-agent-with-tools --dir ./my-agent
44
- cd my-agent
45
- ```
46
-
47
- 生成工程内的 README 从配置写起:把 `eap.config.json` 的 `sk-example-token` 换成有效 Token、`eap validate`、`eap chat`。不要求 `eap login`。常规模板的 `platform.foundationServiceUrl` 默认指向测试环境 Foundation(登录/发布用)。本地 `eap chat` 因 `runtime.llm` 会设 `EAP_LLM_MODE=local`,不走 Foundation 模型路由;纯本地可把该字段改为 `null`。`agent-api-orchestration` 使用 `.env`,通过 `npm run dev` 运行演示服务;生产构建使用 `npm run build`,宿主从 `dist/embedded-agent.js` 调用 `createEmbeddedAgent({ credentialProvider })` 显式注入凭证。其 `runtime.llm.models` 与另外四个模板同一形态,密钥用 `${OPENAI_API_KEY}` 指向网关,不要只写顶层 `runtime.llm.baseUrl`。模板默认使用 Runtime `dev` 文件存储,不接入数据库。本仓库 CLI 通过 workspace 使用仓库根目录 `runtime/`(包名 `@gt-fe/eap-runtime`),不要用过期的 npm `0.0.15`。
48
-
49
- 各模板 README 均说明:模型密钥写在 `eap.config.json` 的 `runtime.llm.models.*.apiKey`;生产模型密钥由 Foundation 路由持有;UCS「配置项与密钥」中配置项只存放非敏感值。`single-agent-with-tools` 默认装配 `echo-tool` 与 `http-weather`(Open-Meteo,无需 Key)。`web-search` 仍为未装配示例,启用后才需要 `${EXA_API_KEY}`。问数数据集等企业工具仅放在 `fixtures/chatAgent/`,不进入 `eap create`。`--type tool` 已拒绝;Tool 登记走 developer-portal。
50
-
51
- HITL 确认与 Skill 子图不写进四个官方模板的默认 `graph.json`。单独验收图见 [docs/examples/verify-graphs](../../docs/examples/verify-graphs/README.md)。
1
+ # CLI 脚手架源
2
+
3
+ 本目录是 `eap create` 的磁盘源。构建 CLI 时同步到 `packages/cli/dist/templates/`。`eap create` 只拷贝 `packages/cli/src/lib/template.ts` 里**已登记**的子目录,不会拷贝本文件。
4
+
5
+ PRD 预期形态见 [prd-agent-execution-modes.md](../../docs/architecture/prd-agent-execution-modes.md)。本目录是 `eap create` 脚手架。默认图不含 subgraph;并行扇出用多条普通出边。
6
+
7
+ 面向 **CLI / 模板维护者**。Agent 开发者请使用 `npm install -g @eap/cli` 后阅读生成工程内的 README。
8
+
9
+ ## 已登记模板
10
+
11
+ | 目录 | `eap create` | 图结构 | 适用 |
12
+ |------|--------------|--------|------|
13
+ | `simple-flow` | 已登记 | code 整理 → 一次 LLM(`disableTools`) | 固定步骤。默认可无工具;工具或 Skill 须写在图上 |
14
+ | `single-agent-with-tools` | **默认** | ReAct:`agent` ⇄ `tools` | 默认装配 `echo-tool` 与 `http-weather`;`web-search` 未写入 `toolRefs` |
15
+ | `plan-and-execute` | 已登记 | planner → executor ⇄ tools | 先规划,再按计划逐步执行 |
16
+ | `dag-workflow` | 已登记 | split 两条出边 → 两个 llm → merge | 并行扇出后汇合 |
17
+ | `agent-api-orchestration` | 已登记 | rag → respond;内嵌 Runtime + HTTP/SSE | Agent API 服务工程,不是执行模式。不依赖 `eap login` |
18
+
19
+ 现行 `eap create` 执行模式只登记上表前四行。`agent-api-orchestration` 是服务工程,不是执行模式。Orchestrator 工程、由事件触发的 Agent 工程若另提供,不作为执行模式登记。见 [prd-agent-execution-modes.md](../../docs/architecture/prd-agent-execution-modes.md)。
20
+
21
+ Session 一轮一条助手正文。`plan-and-execute` 的 `finishPoints` 保持 `["__end__"]`,计划与结果拼进这一条;不要把 `planner` 写进去(那是 LangGraph 终止点)。`dag-workflow` 写 `["merge"]`,只保留汇合正文。
22
+
23
+ 对照样例(`fixtures/eap-ask-data/`、`fixtures/chatAgent/`)不会被 `eap create` 拷走。官方模板不得加入问数 select/bind。`copyTemplate` 与构建脚本排除 `node_modules`、`dist`、`.eap`、`agents`、`.turbo`。
24
+
25
+ `echo-tool` 为 `type: code`、`runtime: node`,使用当前 `eap` 进程的 Node,stdin/stdout 为 JSON。类型说明见 [tool-types-and-transports.md](../../docs/contracts/tool-types-and-transports.md)。
26
+
27
+ ## 构建本仓库 CLI(仅 CLI 开发者)
28
+
29
+ 在 **EAP 仓库根目录**(含 `dev-tools/` 的那一层)执行:
30
+
31
+ ```bash
32
+ pnpm --dir dev-tools/packages/cli run build
33
+ node dev-tools/packages/cli/dist/index.js create demo --template simple-flow --dir ./demo
34
+ ```
35
+
36
+ 构建会执行 `scripts/copy-templates.mjs`,将本目录同步到 `packages/cli/dist/templates/`。未构建则 `eap create` 仍使用旧模板。
37
+
38
+ ## Agent 开发者创建工程
39
+
40
+ ```bash
41
+ # ~/.npmrc 配置 @eap:registry 指向公司私服
42
+ npm install -g @eap/cli
43
+ eap create my-agent --template single-agent-with-tools --dir ./my-agent
44
+ cd my-agent
45
+ ```
46
+
47
+ 生成工程内的 README 从配置写起:把 `eap.config.json` 的 `sk-example-token` 换成有效 Token、`eap validate`、`eap chat`。不要求 `eap login`。常规模板的 `platform.foundationServiceUrl` 默认指向测试环境 Foundation(登录/发布用)。本地 `eap chat` 因 `runtime.llm` 会设 `EAP_LLM_MODE=local`,不走 Foundation 模型路由;纯本地可把该字段改为 `null`。`agent-api-orchestration` 使用 `.env`,通过 `npm run dev` 运行演示服务;生产构建使用 `npm run build`,宿主从 `dist/embedded-agent.js` 调用 `createEmbeddedAgent({ credentialProvider })` 显式注入凭证。其 `runtime.llm.models` 与另外四个模板同一形态,密钥用 `${OPENAI_API_KEY}` 指向网关,不要只写顶层 `runtime.llm.baseUrl`。模板默认使用 Runtime `dev` 文件存储,不接入数据库。本仓库 CLI 通过 workspace 使用仓库根目录 `runtime/`(包名 `@gt-fe/eap-runtime`),不要用过期的 npm `0.0.15`。
48
+
49
+ 各模板 README 均说明:模型密钥写在 `eap.config.json` 的 `runtime.llm.models.*.apiKey`;生产模型密钥由 Foundation 路由持有;UCS「配置项与密钥」中配置项只存放非敏感值。`single-agent-with-tools` 默认装配 `echo-tool` 与 `http-weather`(Open-Meteo,无需 Key)。`web-search` 仍为未装配示例,启用后才需要 `${EXA_API_KEY}`。问数数据集等企业工具仅放在 `fixtures/chatAgent/`,不进入 `eap create`。`--type tool` 已拒绝;Tool 登记走 developer-portal。
50
+
51
+ HITL 确认与 Skill 子图不写进四个官方模板的默认 `graph.json`。单独验收图见 [docs/examples/verify-graphs](../../docs/examples/verify-graphs/README.md)。