bpmax-cli 0.1.40 → 0.1.41
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 +19 -6
- package/dist/bin.js +240 -24
- package/dist/bin.js.map +1 -1
- package/package.json +1 -1
- package/skills/bpmax-cli/SKILL.md +2 -0
- package/skills/bpmax-project/SKILL.md +6 -4
- package/skills/bpmax-schema/SKILL.md +6 -2
package/package.json
CHANGED
|
@@ -23,6 +23,7 @@ bpmax-cli init --agent <agent> --channel feishu --url "<BPMAX_URL>" --name local
|
|
|
23
23
|
|
|
24
24
|
- `init` 返回后,Agent 必须展示 `message_card.authorization_url` 和 `message_card.user_code` 给用户;用户确认短码后,逐字执行 `message_card.next_command`,不要从 `message_card.next_action` 自然语言里猜命令。
|
|
25
25
|
- `profile`、`config_dir` 的最终值只以 `init` JSON 返回为准;不要自行拼接或复用 `local`/共享 `~/.bpmax`。后续检查优先复制 `next_commands.profile_list/auth_status/bbs_list`,不要裸跑 `config profile list`、`auth status` 或 `bbs list`。
|
|
26
|
+
- 授权完成后,CLI 会基于当前 API Key 从 `huanpingtong-server` 探查可用 capability。不要假设所有命令可用;如果命令提示缺少 capability,先运行 `bpmax-cli --config-dir <config_dir> capabilities refresh --profile <profile> --format json`,仍缺失则停止并向用户说明当前账号无该 CLI 能力。
|
|
26
27
|
|
|
27
28
|
## 业务需求优先 BBS
|
|
28
29
|
|
|
@@ -41,6 +42,7 @@ bpmax-cli init --agent <agent> --channel feishu --url "<BPMAX_URL>" --name local
|
|
|
41
42
|
- 环节推进、审批通过/拒绝、完成 step:读 `../bpmax-project/SKILL.md`,必须使用 `step context/actions/requirements/submit` 的安全链路
|
|
42
43
|
- 系统内页面 URL 生成:先读 `../bpmax-shared/SKILL.md` 的“系统内 URL 生成”
|
|
43
44
|
- 本地 schema manifest:读 `../bpmax-schema/SKILL.md`
|
|
45
|
+
- 服务端能力白名单:先用 `capabilities status/refresh` 查看当前 profile 已授权 capability,不要绕过白名单手写 raw API
|
|
44
46
|
- BPMAX Business Skills 查询、同步、安装、更新、卸载:读 `../bpmax-business-skill/SKILL.md`
|
|
45
47
|
|
|
46
48
|
## 规则
|
|
@@ -83,7 +83,8 @@ bpmax-cli project my-step --format table
|
|
|
83
83
|
bpmax-cli project my-step --flow-type flow802926525 --format json
|
|
84
84
|
bpmax-cli project my-step --key-of-flow-node 'flow802926525::1776572829122' --format json
|
|
85
85
|
bpmax-cli project approval-context 1001 --step-id 2002 --format json
|
|
86
|
-
bpmax-cli
|
|
86
|
+
bpmax-cli project search --body @project-search-query.json --page 1 --page-size 20 --format json
|
|
87
|
+
bpmax-cli es project-search --body @project-search-query.json --page 1 --page-size 20 --format json
|
|
87
88
|
bpmax-cli step get 2002 --format json
|
|
88
89
|
bpmax-cli step context 2002 --project-id 1001 --format json
|
|
89
90
|
bpmax-cli step actions 2002 --project-id 1001 --format json
|
|
@@ -121,9 +122,10 @@ bpmax-cli step submit <step_id> --project-id <project_id> --action approve --lab
|
|
|
121
122
|
## 查询规则
|
|
122
123
|
|
|
123
124
|
- 概览优先 `project list`
|
|
124
|
-
-
|
|
125
|
-
-
|
|
126
|
-
-
|
|
125
|
+
- 按候选人姓名、表单字段、流程内关键词定位项目时,优先 `project search`;该命令会走 `huanpingtong-server` 的 `/api/project/list` ES 模式,由 huanpingtong 侧 API Key 和权限上下文转发到 bpmax-server `/project/list`
|
|
126
|
+
- `es project-search` 只是兼容别名;新场景必须写 `project search`
|
|
127
|
+
- 不要向 `project search` 或 `es project-search` 传包含顶层 `body` 的 raw ES DTO;`huanpingtong-server` 没有公开 `/api/project/raw-es-search`,CLI 会在发请求前阻断
|
|
128
|
+
- 预算汇总、趋势分析等统计只能先使用 `/api/project/list` ES 模式能表达的查询体;确实需要 raw ES 聚合时,必须先让服务端增加明确公开接口,不能复用 `/api/project/<unknown>`
|
|
127
129
|
- 单项目详情走 `project get`
|
|
128
130
|
- 待办相关优先 `project my-step`
|
|
129
131
|
- 待办需要限定流程时,用 `project my-step --flow-type <flow_type>`,不要先全量拉取再本地筛选
|
|
@@ -16,7 +16,9 @@ metadata:
|
|
|
16
16
|
|
|
17
17
|
```bash
|
|
18
18
|
bpmax-cli schema list
|
|
19
|
+
bpmax-cli schema show capabilities.refresh
|
|
19
20
|
bpmax-cli schema show project.create
|
|
21
|
+
bpmax-cli schema show project.search
|
|
20
22
|
bpmax-cli schema show es.project-search
|
|
21
23
|
```
|
|
22
24
|
|
|
@@ -30,6 +32,8 @@ bpmax-cli schema show es.project-search
|
|
|
30
32
|
|
|
31
33
|
- 先 `schema list` 看命令地图
|
|
32
34
|
- 需要具体 shortcut 说明时,再 `schema show <name>`
|
|
33
|
-
- 普通项目搜索确认 `
|
|
34
|
-
-
|
|
35
|
+
- 普通项目搜索确认 `project.search` 是否可用后优先使用 `bpmax-cli project search`,它会走 `/api/project/list` ES 模式
|
|
36
|
+
- `es.project-search` 是兼容别名,不是 raw ES DSL 入口
|
|
37
|
+
- 不要把包含顶层 `body` 的 raw ES DTO 传给 `project.search` 或 `es.project-search`;`huanpingtong-server` 未公开 `/api/project/raw-es-search`,CLI 会阻断该形态
|
|
38
|
+
- `schema` 是本地命令地图;实际能否调用必须以 `bpmax-cli capabilities status/refresh` 返回的服务端白名单为准
|
|
35
39
|
- `schema` 只看本地 manifest,不依赖远端 Swagger
|