bpmax-cli 0.2.1-beta.25 → 0.2.1-beta.26
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 +271 -16
- package/dist/bin.js.map +1 -1
- package/package.json +1 -1
- package/skills/bpmax-cli/SKILL.md +3 -0
- package/skills/bpmax-config-latest/SKILL.md +4 -0
package/package.json
CHANGED
|
@@ -25,6 +25,9 @@ bpmax-cli init --agent <agent> --channel feishu --url "<BPMAX_URL>" --name local
|
|
|
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
26
|
- 授权完成后,CLI 会基于当前 API Key 从 `huanpingtong-server` 探查可用 capability。不要假设所有命令可用;如果命令提示缺少 capability,先运行 `bpmax-cli --config-dir <config_dir> capabilities refresh --profile <profile> --format json`,仍缺失则停止并向用户说明当前账号无该 CLI 能力。
|
|
27
27
|
- 如果授权完成输出 `next_commands.config_workspace_init`,需要配置工作区时必须复制该命令并补齐 `<env>` 与 `--workspace-dir <dir>`。该命令会从 BPMAX 平台配置库读取 Git 地址和 sysconfigdiff 凭据,clone 或绑定本地 workspace,并生成 `AGENTS.md`;不要用 `config-env add` 手写配置库账号密码。
|
|
28
|
+
- 授权初始化与本地配置目录初始化是两个阶段。执行配置任务前必须先完成 `config workspace init`,再进入生成的 sysconfig 目录或其子目录;这里的“配置目录”不是 BPMAX 的 `w:xxx` 业务工作区。
|
|
29
|
+
- 配置类命令由 CLI 自动校验当前目录:向上查找同时包含 `AGENTS.md`、`think_configuration/`、`think_flow/`、`think_form_template/` 的最近目录,并核对它是否绑定到当前 profile。用户不需要额外说“请检查当前目录”,Agent 也不得绕过或通过切换 profile 猜测环境。
|
|
30
|
+
- CLI 返回 `config_workspace_required`、`config_workspace_profile_mismatch` 或 `config_workspace_environment_unbound` 时,停止读取 work、生成 payload 和远端配置请求;按提示重新执行 `config workspace init` 修复后,进入该目录重试。
|
|
28
31
|
|
|
29
32
|
## 业务需求优先 BBS
|
|
30
33
|
|
|
@@ -26,6 +26,7 @@ bpmax-cli config workspace init <env> --profile <profile> --workspace-dir <dir>
|
|
|
26
26
|
```
|
|
27
27
|
|
|
28
28
|
`config workspace init` 会从 BPMAX 平台配置库读取 Git 地址和 sysconfigdiff 地址,clone 或绑定本地 sysconfig 仓库,并更新 `AGENTS.md`。不要让用户手写配置库密码。
|
|
29
|
+
5. 进入该 env 对应的 sysconfig 根目录或其子目录后再执行 latest。CLI 会根据目录结构和 profile 绑定自动检查,不接受在其它环境目录中对目标 env 执行 pull/diff。
|
|
29
30
|
|
|
30
31
|
## 标准命令
|
|
31
32
|
|
|
@@ -50,6 +51,7 @@ bpmax-cli --config-dir <config_dir> config latest pull <env> --profile <profile>
|
|
|
50
51
|
## 执行规则
|
|
51
52
|
|
|
52
53
|
- latest pull 必须由 CLI 读取平台配置库中的 Git 地址、账号、密码和 PULL/EXTRACT/PUSH URL。
|
|
54
|
+
- `config latest pull/diff <env>` 必须从该 `<env>` 已绑定的本地配置目录或其子目录执行。不要在普通代码仓库、其它 profile 的 sysconfig 目录或另一个 env 的目录中运行,也不要自动切换 profile 绕过门禁。
|
|
53
55
|
- 不要让用户手写或在对话中暴露配置库密码、API Key、Authorization、token、验证码、手机号等敏感信息。
|
|
54
56
|
- 不要直接运行旧的配置库脚本、curl、raw API 或页面 fetch 来替代 `bpmax-cli config latest pull`。
|
|
55
57
|
- 如果本地 sysconfig 仓库有未提交变更,先向用户说明变更风险;只有用户确认或任务计划明确允许时,才追加 `--allow-dirty` 重试。
|
|
@@ -67,5 +69,7 @@ bpmax-cli --config-dir <config_dir> config latest pull <env> --profile <profile>
|
|
|
67
69
|
- `missing config.latest.pull capability`:当前账号或 API Key 未开启配置能力,重新授权并在授权页勾选配置能力。
|
|
68
70
|
- `config repository environment not found`:平台配置库没有该环境,先在平台配置库页面补齐环境。
|
|
69
71
|
- `sysconfig repo path is missing`:先执行 `config workspace init <env>` 绑定本地 workspace。
|
|
72
|
+
- `config_workspace_required`:当前路径缺少有效配置目录结构;运行 `config workspace init` 修复目录后进入该目录重试。
|
|
73
|
+
- `config_workspace_profile_mismatch` / `config_workspace_environment_unbound`:当前目录与所选 profile/env 的初始化绑定不一致;修复绑定,不要切换 profile 猜测目标。
|
|
70
74
|
- `dirty worktree`:先向用户说明本地未提交变更;确认后才允许 `--allow-dirty`。
|
|
71
75
|
- `remote mismatch`:本地目录不是当前环境的配置库;除非用户明确确认,否则不要使用 `--force` 重新绑定。
|