feat(cli): agent 接入补全(token/MCP/REST 分流)+ 修 page-recipe recipe-id

- fix: page-recipe 的 maintenance-crud 漏 `-v1`,而 compile 端点精确匹配
  maintenance-crud-v1,agent 照抄示例会 400;统一为 -v1,并引导以
  GET /api/ai/page-recipes 为权威列表,避免硬写字面量漂移。
- env-manage 新增「鉴权/Token」段:非 prod profile permitAll 免 token,
  prod/JWT 环境需 POST /api/auth/login 取顶层 `token` + `Authorization: Bearer`
  (核实 AuthController/JwtAuthFilter)。
- AGENTS.md(writeAgentsMd):把「优先 platform-cli」误导修为按类分流
  (env/ai/release 用 CLI,建模/页面/授权用 REST 或 platform-mcp),
  并点名 platform-mcp 注册方式 + token 获取指引。
- data-modeling/page-recipe/acl-manage 各加调用方式与 token 交叉引用。
- 测试 +3:page-recipe recipe-id 回归、AGENTS.md MCP/auth、bundled skills 防漂移。

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-06-23 09:50:23 +08:00
parent daad6ea196
commit 0e457d9945
6 changed files with 99 additions and 4 deletions

View File

@@ -5,9 +5,13 @@
- 用户要为某实体生成默认页面(维护 / 树 / 主子表)。
- 需要派生列、父级汇总。
> 调用方式:经 REST(无对应 CLI 子命令),或经 `platform-mcp`(MCP)。非 local 环境需带 `Authorization: Bearer <token>`,取 token 见 `eip4-env-manage`。
## recipe 类型
- `maintenance-crud` — 普通维护 CRUD(列表 + 表单)。
权威列表以 `GET {{EIP4_BASE_URL}}/api/ai/page-recipes` 为准;当前三种(id 带 `-v1`,须逐字传,端点精确匹配,不接受省略 `-v1` 的别名):
- `maintenance-crud-v1` — 普通维护 CRUD(列表 + 表单)。
- `tree-crud-v1` — 树形维护(有 parentid 的层级表)。
- `master-detail-v1` — 主子表(主表 + 子表行内编辑)。
@@ -19,7 +23,7 @@
{
"tableName": "EIP4_DEMO",
"title": "演示页面",
"recipe": "maintenance-crud",
"recipe": "maintenance-crud-v1",
"pageSize": 20,
"displayField": "NAME",
"childTable": "DEMO_DETAIL",