bpmax-cli 0.1.27 → 0.1.28

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.27",
3
+ "version": "0.1.28",
4
4
  "description": "CLI for BPMAX environments with multi-profile config and local login callback flow",
5
5
  "type": "module",
6
6
  "bin": {
@@ -27,6 +27,7 @@
27
27
  "@clack/prompts": "^1.2.0",
28
28
  "axios": "^1.9.0",
29
29
  "commander": "^14.0.0",
30
+ "jszip": "^3.10.1",
30
31
  "open": "^10.1.2"
31
32
  },
32
33
  "devDependencies": {
@@ -0,0 +1,64 @@
1
+ ---
2
+ name: bpmax-business-skill
3
+ version: 1.0.0
4
+ description: Use when managing, syncing, installing, updating, or uninstalling BPMAX Business Skills (BBS) through bpmax-cli.
5
+ metadata:
6
+ requires:
7
+ bins: ["bpmax-cli"]
8
+ cliHelp: "bpmax-cli bbs --help"
9
+ ---
10
+
11
+ # BPMAX Business Skill
12
+
13
+ BBS 是 BPMAX 远端托管的标准 agent skill 包。不要手动复制远端 BBS;通过 CLI 同步 catalog,并在真正需要某个业务 skill 时懒加载安装。
14
+
15
+ ## 常用命令
16
+
17
+ ```bash
18
+ bpmax-cli bbs sync --agent openclaw --profile <profile> --format json
19
+ bpmax-cli bbs list --profile <profile> --format json
20
+ bpmax-cli bbs ensure <skill-key> --agent openclaw --profile <profile> --format json
21
+ bpmax-cli bbs gate <skill-key> --stage preflight --input @input.json --profile <profile> --format json
22
+ bpmax-cli bbs gate <skill-key> --stage verify --input @result.json --profile <profile> --format json
23
+ bpmax-cli bbs uninstall <skill-key> --agent openclaw --profile <profile> --format json
24
+ ```
25
+
26
+ ## 规则
27
+
28
+ - `bbs sync` 只安装 `bpmax-business-skill-catalog`,不安装所有业务 skill。
29
+ - 使用业务 skill 前先运行 `bbs ensure <skill-key>`。
30
+ - `bbs ensure` 会自动检测远端最新版本;本地缺失或版本落后时直接安装/更新。
31
+ - 执行业务 BBS 的状态变更前,先按 `bbs.json.gates.preflight` 调用 `bbs gate ... --stage preflight`;失败时停止,不要继续执行。
32
+ - 状态变更完成后,按 `bbs.json.gates.verify` 调用 `bbs gate ... --stage verify`;失败时不要声称业务处理成功。
33
+ - OpenClaw 场景不要提示用户手动复制 skill;CLI 会先尝试 `openclaw skills install`,失败后再 fallback 到 `~/.openclaw/skills`。
34
+
35
+ ## 发布 BBS
36
+
37
+ ```bash
38
+ bpmax-cli bbs create --name "预算查询" --scene "预算分析" --zip ./skill.zip --profile <profile> --format json
39
+ bpmax-cli bbs upgrade <skill-key> --zip ./skill.zip --release-note "..." --profile <profile> --format json
40
+ bpmax-cli bbs lint --zip ./skill.zip --format json
41
+ ```
42
+
43
+ zip 包必须包含顶层 `SKILL.md`,并在 frontmatter 中提供 `name`、`version`、`description`。
44
+
45
+ `bbs create/upgrade` 默认会先跑本地 lint:errors 阻断上传,warnings 只提示。只有明确需要临时绕过时才使用 `--allow-lint-errors`,并且必须把 lint report 告知用户。
46
+
47
+ 业务稳定性门禁建议放在顶层 `bbs.json`:
48
+
49
+ ```json
50
+ {
51
+ "lint": {
52
+ "commands": ["npm test"]
53
+ },
54
+ "gates": {
55
+ "preflight": {
56
+ "requiredCommands": ["bpmax-cli project approval-context"],
57
+ "requiredInputs": ["project_id", "step_id", "decision"]
58
+ },
59
+ "verify": {
60
+ "requiredOutputs": ["project_id", "step_id", "action_result"]
61
+ }
62
+ }
63
+ }
64
+ ```
@@ -81,6 +81,7 @@ bpmax-cli project get --project-id 1001 --format json
81
81
  bpmax-cli project my-step --format table
82
82
  bpmax-cli project my-step --flow-type flow802926525 --format json
83
83
  bpmax-cli project my-step --key-of-flow-node 'flow802926525::1776572829122' --format json
84
+ bpmax-cli project approval-context 1001 --step-id 2002 --format json
84
85
  bpmax-cli es project-search --body @query.json --format json
85
86
  bpmax-cli step get 2002 --format json
86
87
  bpmax-cli url project-detail 1001
@@ -95,6 +96,7 @@ bpmax-cli url project-step 1001 --step-id 2002
95
96
  - 待办相关优先 `project my-step`
96
97
  - 待办需要限定流程时,用 `project my-step --flow-type <flow_type>`,不要先全量拉取再本地筛选
97
98
  - 待办需要限定到流程节点时,用 `project my-step --key-of-flow-node '<flow_type>:<flow_key>:<flow_step_id>'`;流程 key 为空时保留中间冒号,例如 `flow802926525::1776572829122`
99
+ - 审批判断前优先用 `project approval-context <project_id> --step-id <current_step_id>`,它会同时返回项目主表单和已结束环节的表单值;不要只依赖 `project get` 的 `metaForm`
98
100
  - 需要查看某个审批环节/任务详情时,用 `step get <step_id>`,不要退回原始 `api GET /step/<step_id>`
99
101
  - 查询详情页、项目列表页或步骤处理页地址时,走 `bpmax-cli url ...` 生成,不要手写 URL
100
102
  - `bpmax-cli url project-create` 不得用于用户发起流程单的 handoff;创建 handoff 只能使用 `project create --format json` 输出的 `url`/`pc_url`