bpmax-cli 0.1.36 → 0.1.38

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bpmax-cli",
3
- "version": "0.1.36",
3
+ "version": "0.1.38",
4
4
  "description": "CLI for BPMAX environments with multi-profile config and local login callback flow",
5
5
  "type": "module",
6
6
  "bin": {
@@ -38,6 +38,7 @@ bpmax-cli init --agent <agent> --channel feishu --url "<BPMAX_URL>" --name local
38
38
  - 当前用户:读 `../bpmax-user/SKILL.md`
39
39
  - 流程列表、流程选项、流程详情:读 `../bpmax-flow/SKILL.md`
40
40
  - 项目列表、项目详情、我的待办、最小创建:读 `../bpmax-project/SKILL.md`
41
+ - 环节推进、审批通过/拒绝、完成 step:读 `../bpmax-project/SKILL.md`,必须使用 `step context/actions/requirements/submit` 的安全链路
41
42
  - 系统内页面 URL 生成:先读 `../bpmax-shared/SKILL.md` 的“系统内 URL 生成”
42
43
  - 本地 schema manifest:读 `../bpmax-schema/SKILL.md`
43
44
  - BPMAX Business Skills 查询、同步、安装、更新、卸载:读 `../bpmax-business-skill/SKILL.md`
@@ -84,10 +84,39 @@ bpmax-cli project my-step --key-of-flow-node 'flow802926525::1776572829122' --fo
84
84
  bpmax-cli project approval-context 1001 --step-id 2002 --format json
85
85
  bpmax-cli es project-search --body @query.json --format json
86
86
  bpmax-cli step get 2002 --format json
87
+ bpmax-cli step context 2002 --project-id 1001 --format json
88
+ bpmax-cli step actions 2002 --project-id 1001 --format json
89
+ bpmax-cli step requirements 2002 --project-id 1001 --format json
87
90
  bpmax-cli url project-detail 1001
88
91
  bpmax-cli url project-step 1001 --step-id 2002
89
92
  ```
90
93
 
94
+ ## 环节推进硬门禁
95
+
96
+ 用户要求“通过/拒绝/推进一步/完成环节/邀约面试/不合适”等会改变环节状态的动作时,必须先走安全上下文:
97
+
98
+ ```bash
99
+ bpmax-cli step context <step_id> --project-id <project_id> --format json
100
+ bpmax-cli step actions <step_id> --project-id <project_id> --format json
101
+ bpmax-cli step requirements <step_id> --project-id <project_id> --format json
102
+ ```
103
+
104
+ 执行规则:
105
+
106
+ - 禁止直接用 `bpmax-cli api PUT /step/<id>`、curl 或手写接口推进环节
107
+ - `step context` 返回 `identity_unverified: true` 时停止;只有 ES 命中、附件文本命中、自然语言猜测姓名都不能作为推进依据
108
+ - 必须确认 `current_user_can_process` 不是 `false`、`step_finished` 不是 `true`、`project_id` 与 step 匹配
109
+ - 必须从 `step actions` 选择真实按钮语义,不能凭“推进一步”猜 `approve`
110
+ - 必须检查 `step requirements` 或 `step context.requirements`;如果 `missing_required_inputs` 非空,先补齐 `--data`,不要直接确认提交
111
+ - 默认先 dry-run:
112
+
113
+ ```bash
114
+ bpmax-cli step submit <step_id> --project-id <project_id> --action approve --label "通过" --data '{"form":{"manager_opinion":"同意"}}' --format json
115
+ ```
116
+
117
+ - 只有用户确认具体项目、候选人/表单证据、动作按钮、当前环节必填内容和 payload 后,才追加 `--confirm <确认文本>` 实际提交
118
+ - 提交失败时保留服务端错误原文,不要改用 raw API 绕过
119
+
91
120
  ## 查询规则
92
121
 
93
122
  - 概览优先 `project list`
@@ -98,6 +127,7 @@ bpmax-cli url project-step 1001 --step-id 2002
98
127
  - 待办需要限定到流程节点时,用 `project my-step --key-of-flow-node '<flow_type>:<flow_key>:<flow_step_id>'`;流程 key 为空时保留中间冒号,例如 `flow802926525::1776572829122`
99
128
  - 审批判断前优先用 `project approval-context <project_id> --step-id <current_step_id>`,它会同时返回项目主表单和已结束环节的表单值;不要只依赖 `project get` 的 `metaForm`
100
129
  - 需要查看某个审批环节/任务详情时,用 `step get <step_id>`,不要退回原始 `api GET /step/<step_id>`
130
+ - 需要推进环节时,用 `step context/actions/submit`,不要退回原始 `api PUT /step/<step_id>`
101
131
  - 查询详情页、项目列表页或步骤处理页地址时,走 `bpmax-cli url ...` 生成,不要手写 URL
102
132
  - `bpmax-cli url project-create` 不得用于用户发起流程单的 handoff;创建 handoff 只能使用 `project create --format json` 输出的 `url`/`pc_url`
103
133
  - 创建或查询项目后必须返回可打开链接;如果 `project create/get` 输出已有 `url` 字段,直接使用;否则用 `bpmax-cli url project-detail <project_id>`