bpmax-cli 0.2.1-beta.33 → 0.2.1-beta.35
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/dist/bin.js +287 -20
- package/dist/bin.js.map +1 -1
- package/package.json +1 -1
- package/skills/bpmax-e2e-flow-test-operator/SKILL.md +1 -1
- package/skills/bpmax-e2e-flow-test-operator/references/ai-test-suite.md +1 -1
- package/skills/bpmax-flow-detail-template-editor/SKILL.md +43 -0
- package/skills/bpmax-project/SKILL.md +3 -2
package/package.json
CHANGED
|
@@ -47,7 +47,7 @@ description: "用于在 BPMAX 中做全链路流程测试、场景回归、前
|
|
|
47
47
|
## `.ai_test` 资产门禁
|
|
48
48
|
- 可复用测试用例统一放在 `.ai_test/`;运行状态放在 `.codex/tmp/e2e_states/`;不要混用。
|
|
49
49
|
- 每个场景必须同时有 `cases.csv` 和 `case_steps.csv`:前者只保存用例级元数据,后者必须让每个测试步骤独占一行。禁止继续把打开、填写、提交、审批和验证聚合到一个 `steps` 单元格。
|
|
50
|
-
- `case_steps.csv` 每行只能有一个用户动作,并写清 actor、runner、action、target、input_data、即时 expected_result 和 evidence_required
|
|
50
|
+
- `case_steps.csv` 每行只能有一个用户动作,并写清 actor、runner、action、target、input_data、即时 expected_result 和 evidence_required;不能用“然后/接着/再”把多步塞进一行。上传附件属于合法单一步骤,应单独写成“上传 <具体附件>”并记录页面证据。
|
|
51
51
|
- 生成、检查、更新用例资产前,必须先 latest sync,并把证明写入 `.codex/tmp/ai_test_suite/latest-<env>-proof.json`。缺少 `--latest-proof` 时,CLI 必须拒绝 lint/index/draft-update/promote。
|
|
52
52
|
- `.ai_test` suite 的 lint、review init/repair/explain、draft-update、promote 都使用 `bpmax-cli test-suite` 的 TypeScript 实现;不要新增或调用旧 Python suite 脚本作为主路径。
|
|
53
53
|
- 每个场景目录必须有 `README.md`、`cases.csv`、`case_steps.csv`;promote 前必须有合格 `review.json`,`execution_operability.step_judgments` 覆盖全部 active step,且 `unresolved.P0=0`、`unresolved.P1=0`。
|
|
@@ -100,7 +100,7 @@ C001,S004,4,dealer_owner,e2e_step_run,审批通过客户换货申请,经销商
|
|
|
100
100
|
- `runner` 只能是 `browser`、`e2e_create_page`、`e2e_step_run`、`observe`。
|
|
101
101
|
- `step_no` 从 1 开始连续递增;`step_id` 在 case 内唯一。
|
|
102
102
|
- `actor` 必须属于 cases.csv 的 roles,系统观察步骤可写 `system`。
|
|
103
|
-
- `action` 一行只能有一个动作,禁止
|
|
103
|
+
- `action` 一行只能有一个动作,禁止 `>`、连续编号和“然后/接着/再然后”;上传附件是合法单一步骤,必须写清具体附件和目标控件。
|
|
104
104
|
- `target`、`input_data`、即时 `expected_result`、`evidence_required` 都必须明确;无输入写“无”。
|
|
105
105
|
|
|
106
106
|
旧聚合格式使用以下命令迁移到 draft,生成的 `REVIEW_REQUIRED` 字段必须逐行补齐:
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: bpmax-flow-detail-template-editor
|
|
3
|
+
version: 1.0.0
|
|
4
|
+
description: "Use the typed CLI when discovering, creating, editing, reading back, or verifying BPMAX flow_page_template type=5 flow report/document templates."
|
|
5
|
+
metadata:
|
|
6
|
+
requires:
|
|
7
|
+
bins: ["bpmax-cli"]
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
# BPMAX Flow Report Template Editor
|
|
11
|
+
|
|
12
|
+
该 Skill 管理 `report_template` 编辑器使用的 `flow_page_template type=5` 流程报告/文档模板。`flow-detail-template` 是为兼容既有 issue 和命令体系保留的 CLI 名称,不表示页面布局型“流程详情模板”。
|
|
13
|
+
|
|
14
|
+
## 边界
|
|
15
|
+
|
|
16
|
+
- type=5 流程报告/文档模板使用 `config flow-detail-template`。
|
|
17
|
+
- type=2 项目详情模板使用 `config project-detail-template`。
|
|
18
|
+
- type=6 环节详情模板使用 `config step-detail-template`,并由流程节点 `step_detail_id` 引用。
|
|
19
|
+
- 三种模板不得混用;不得用 type=5 ID 填充 `node.step_detail_id`。
|
|
20
|
+
- 配置写入只能通过 typed CLI 完成,不得直接修改 `think_flow_page_template` 文件,也不得用 raw API 绕过门禁。
|
|
21
|
+
- 不知道模板 ID 时,必须先按 `flow_type/flow_key` 使用 typed list 发现,不能猜测 ID。
|
|
22
|
+
|
|
23
|
+
## 标准流程
|
|
24
|
+
|
|
25
|
+
```bash
|
|
26
|
+
bpmax-cli config flow-detail-template list --flow-type <flow_type> --flow-key <flow_key> --profile <profile> --format json
|
|
27
|
+
bpmax-cli config flow-detail-template export --id <id> --profile <profile> --out <dir> --format json
|
|
28
|
+
bpmax-cli config flow-detail-template lint --work <work.json> --format json
|
|
29
|
+
bpmax-cli config flow-detail-template build --work <work.json> --meta <meta.json> --out <submit.json> --format json
|
|
30
|
+
bpmax-cli config flow-detail-template submit --id <id> --payload <submit.json> --profile <profile> --format json
|
|
31
|
+
bpmax-cli config flow-detail-template verify --id <id> --profile <profile> --format json
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
新建时使用 `config flow-detail-template create` 生成 work/meta,再执行 lint、build 和带精确确认文本的 submit。删除同样必须先 dry-run,再复制 CLI 返回的确认文本。
|
|
35
|
+
|
|
36
|
+
## 门禁
|
|
37
|
+
|
|
38
|
+
- work 和 readback 的 `type` 必须为 `5`。
|
|
39
|
+
- `content` 必须是 `{ fields, templateFile }`:`fields[]` 的 `field/desc/expression` 均为非空字符串且 field 不重复;`templateFile[]` 至少包含一个带 `name/url` 的文件。
|
|
40
|
+
- 平台生成报告时只读取 `templateFile[0]`;配置多个文件时必须确认第一个文件就是实际生效文件。
|
|
41
|
+
- 必须保留 `flow_type`、`flow_key`、`data_set_id` 和报告表达式的原有语义,不得套用 type=2/type=6 的 layout 模块规则。
|
|
42
|
+
- lint/build/submit/verify 任一步失败都不能宣称配置完成。
|
|
43
|
+
- 完成后必须保留 typed readback hash;涉及真实展示效果时,再补充运行态页面证据。
|
|
@@ -114,7 +114,7 @@ bpmax-cli project handoff status \
|
|
|
114
114
|
|
|
115
115
|
```bash
|
|
116
116
|
bpmax-cli project list --format table
|
|
117
|
-
bpmax-cli project get
|
|
117
|
+
bpmax-cli project get 1001 --format json
|
|
118
118
|
bpmax-cli project my-step --format table
|
|
119
119
|
bpmax-cli project my-step --flow-type flow802926525 --format json
|
|
120
120
|
bpmax-cli project my-step --key-of-flow-node 'flow802926525::1776572829122' --format json
|
|
@@ -162,12 +162,13 @@ bpmax-cli step submit <step_id> --project-id <project_id> --action approve --lab
|
|
|
162
162
|
|
|
163
163
|
- 概览优先 `project list`
|
|
164
164
|
- 按候选人姓名、表单字段、流程内关键词定位项目时,优先 `project search`;该命令会走 `huanpingtong-server` 的 `/api/project/list` ES 模式,由 huanpingtong 侧 API Key 和权限上下文转发到 bpmax-server `/project/list`
|
|
165
|
-
-
|
|
165
|
+
- `/project/list` 有两种分页契约:普通项目列表从 POST body 读取 `page/page_size`,包含 `data_set_id`、`data_set_key`、`query`、`is_select_all`、`_source` 或 `aggs` 的 ES 查询从 query params 读取。始终使用 `--page` / `--page-size`,由 CLI 自动按请求模式放置分页;不要手工猜测位置。扫描必须记录每页项目 ID,发现连续页 ID 完全相同或 raw rows 大于 unique rows 很多时,立即判定分页可能失效,不得给出“未命中”结论。
|
|
166
166
|
- `page` 和 `page_size` 必须是大于等于 1 的安全整数;CLI 会在 HTTP 前同时归一化命令参数和 body 中的数字字符串,空串、0、负数、小数和非数字都应本地失败。
|
|
167
167
|
- `es project-search` 只是兼容别名;新场景必须写 `project search`
|
|
168
168
|
- 不要向 `project search` 或 `es project-search` 传包含顶层 `body` 的 raw ES DTO;`huanpingtong-server` 没有公开 `/api/project/raw-es-search`,CLI 会在发请求前阻断
|
|
169
169
|
- 预算汇总、趋势分析等统计只能先使用 `/api/project/list` ES 模式能表达的查询体;确实需要 raw ES 聚合时,必须先让服务端增加明确公开接口,不能复用 `/api/project/<unknown>`
|
|
170
170
|
- 单项目详情走 `project get`
|
|
171
|
+
- `project get` 首选位置参数 `project get <id>`;为兼容旧自动化也接受 `project get --project-id <id>`,两者同时出现时必须一致。
|
|
171
172
|
- 待办相关优先 `project my-step`
|
|
172
173
|
- 待办需要限定流程时,用 `project my-step --flow-type <flow_type>`,不要先全量拉取再本地筛选
|
|
173
174
|
- 待办需要限定到流程节点时,用 `project my-step --key-of-flow-node '<flow_type>:<flow_key>:<flow_step_id>'`;流程 key 为空时保留中间冒号,例如 `flow802926525::1776572829122`
|