bpmax-cli 0.1.44-beta.11 → 0.1.44-beta.13
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 +30 -0
- package/dist/bin.js +1590 -93
- package/dist/bin.js.map +1 -1
- package/package.json +1 -1
- package/skills/bpmax-e2e-flow-test-operator/SKILL.md +34 -0
- package/skills/bpmax-e2e-flow-test-operator/references/ai-test-suite.md +321 -0
- package/skills/bpmax-flow-template-editor/SKILL.md +27 -1
- package/skills/bpmax-flow-template-editor/references/project-create-runtime-gotchas.md +54 -2
- package/skills/bpmax-flow-template-editor/references/script-review-hard-rules.md +3 -0
- package/skills/bpmax-list-template-editor/SKILL.md +6 -0
- package/skills/bpmax-project-detail-template-editor/SKILL.md +6 -0
- package/skills/bpmax-workspace-editor/SKILL.md +78 -0
- package/skills/bpmax-workspace-editor/agents/openai.yaml +4 -0
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: "bpmax-workspace-editor"
|
|
3
|
+
description: "用于在 BPMAX 中创建、编辑、导出、验证或删除平台工作区。只要用户提到“创建工作区”“编辑工作区配置”“workspace 配置”“工作区入口路径”“工作区管理员/白名单/icon/logo/背景图”“删除工作区”或等价表达,就应使用这个 skill。它要求 Codex 使用 bpmax-cli 的 typed `config workspace` adapter 完成 export、lint、build、submit、verify/delete 闭环,不得把它和本地配置库 `config workspace init <env>` 或流程绑定 `config workspace-flow` 混用。"
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# BPMAX Workspace Editor
|
|
7
|
+
|
|
8
|
+
## 写入路径硬约束
|
|
9
|
+
- 执行前必须先运行 `bpmax-cli config adapters --format json` 核对 `workspace`;只有 `export_status`、`build_status`、`submit_status`、`create_status`、`delete_status` 都是 `supported` 时,才允许进入真实写入。
|
|
10
|
+
- 当前平台工作区配置只能走 typed CLI:
|
|
11
|
+
- 导出:`bpmax-cli config workspace export --id key:<workspace_key> --profile <profile> --format json`
|
|
12
|
+
- 构建:`bpmax-cli config workspace build --work <work-file> --meta <meta-file> --out <submit-file> --format json`
|
|
13
|
+
- 提交:`bpmax-cli config workspace submit --id <id|key:key> --payload <submit-file> --confirm "submit workspace <workspace_key>" --profile <profile> --format json`
|
|
14
|
+
- 新建:先准备 `mode=create` 的 work/meta,再用 `bpmax-cli config workspace create --id create:workspace --payload <submit-file> --confirm "submit workspace <workspace_key>" --profile <profile> --format json`
|
|
15
|
+
- 删除:`bpmax-cli config workspace delete --id <numeric_id> --confirm "delete workspace <numeric_id>" --profile <profile> --format json`
|
|
16
|
+
- 不得用 `bpmax-cli api POST/PUT/DELETE /workspace*`、浏览器 fetch、curl 或旧脚本绕过 typed adapter。
|
|
17
|
+
- 不要把本 skill 用于配置库目录初始化;配置库 clone/bind 使用 `bpmax-cli config workspace init <env> --workspace-dir <dir>`,对应 skill 是 `bpmax-config-latest`。
|
|
18
|
+
- 不要把本 skill 用于给工作区绑定流程;流程绑定使用 `bpmax-cli config workspace-flow build/submit`,通常由 `bpmax-flow-template-editor` 或 `bpmax-e2e-flow-config-orchestrator` 编排。
|
|
19
|
+
|
|
20
|
+
## 范围门禁
|
|
21
|
+
- 修改前必须明确目标工作区 key、用户要求改哪些字段,以及哪些字段必须保持不变。
|
|
22
|
+
- 只允许改用户明确要求的工作区字段;不得顺手调整 `workspace_flow`、导航、角色、权限点或配置库环境。
|
|
23
|
+
- 对 `entry_path`、`m_entry_path`、`origin`、`white_list`、`admin_ids` 这类可能影响访问入口和权限的字段,提交前必须在 dry-run 中逐项说明变更。
|
|
24
|
+
- 删除工作区是高风险操作;必须确认 numeric id,且只在用户明确要求删除时执行。
|
|
25
|
+
|
|
26
|
+
## Mem0 协议
|
|
27
|
+
- 开始前先调用 [$bpmax-memory-protocol](../bpmax-memory-protocol/SKILL.md),检索词至少包含:
|
|
28
|
+
- `workspace`
|
|
29
|
+
- 工作区 key / 名称
|
|
30
|
+
- `entry_path` / `admin_ids` / `white_list` / `icon` / `logo` 等本次相关字段
|
|
31
|
+
- 回读验证通过后,只写可复用结论:
|
|
32
|
+
- `decision`:工作区 key 命名、入口路径、管理员模型选择
|
|
33
|
+
- `task_learning`:某类工作区字段的稳定配置方式
|
|
34
|
+
- `anti_pattern`:误把平台工作区和配置库 workspace init 混用、raw API 绕过 typed adapter
|
|
35
|
+
- 不写 API Key、Authorization、密码、手机号、验证码、cookie、完整 payload 或大段接口响应。
|
|
36
|
+
|
|
37
|
+
## 标准闭环
|
|
38
|
+
1. 确认 profile 和能力:
|
|
39
|
+
```bash
|
|
40
|
+
bpmax-cli auth status --profile <profile> --format json
|
|
41
|
+
bpmax-cli capabilities refresh --profile <profile> --format json
|
|
42
|
+
bpmax-cli config adapters --format json
|
|
43
|
+
```
|
|
44
|
+
2. 编辑现有工作区:
|
|
45
|
+
```bash
|
|
46
|
+
bpmax-cli config workspace export --id key:<workspace_key> --profile <profile> --out .codex/tmp/workspace-editor --format json
|
|
47
|
+
bpmax-cli config workspace lint --work .codex/tmp/workspace-editor/work/workspace-key-<workspace_key>.json --format json
|
|
48
|
+
bpmax-cli config workspace build --work <work-file> --meta <meta-file> --out <submit-file> --format json
|
|
49
|
+
bpmax-cli config workspace submit --id key:<workspace_key> --payload <submit-file> --profile <profile> --format json
|
|
50
|
+
bpmax-cli config workspace submit --id key:<workspace_key> --payload <submit-file> --confirm "submit workspace <workspace_key>" --profile <profile> --format json
|
|
51
|
+
```
|
|
52
|
+
3. 新建工作区:
|
|
53
|
+
- work 文件必须包含 `mode: "create"`、`name`、`key`、`entry_path`。
|
|
54
|
+
- `key` 必须 2-20 位,字母开头,只能包含字母、数字、`_`、`-`。
|
|
55
|
+
- `entry_path` 默认可用 `/myProject`,但必须确认是否符合业务入口。
|
|
56
|
+
```bash
|
|
57
|
+
bpmax-cli config workspace build --work <create-work-file> --meta <create-meta-file> --out <submit-file> --format json
|
|
58
|
+
bpmax-cli config workspace create --id create:workspace --payload <submit-file> --profile <profile> --format json
|
|
59
|
+
bpmax-cli config workspace create --id create:workspace --payload <submit-file> --confirm "submit workspace <workspace_key>" --profile <profile> --format json
|
|
60
|
+
```
|
|
61
|
+
4. 验证:
|
|
62
|
+
```bash
|
|
63
|
+
bpmax-cli config workspace export --id key:<workspace_key> --profile <profile> --format json
|
|
64
|
+
```
|
|
65
|
+
必须确认回读中的 `name`、`key`、`entry_path`、`m_entry_path`、`origin`、`admin_ids`、`white_list` 与预期一致。
|
|
66
|
+
|
|
67
|
+
## 字段约束
|
|
68
|
+
- `name`:2-20 字符。
|
|
69
|
+
- `key`:2-20 位,字母开头,只能包含字母、数字、`_`、`-`。命令输入可写 `w:<key>` 或 `key:<key>`,提交 payload 会规范成纯 key。
|
|
70
|
+
- `entry_path`:必填,决定 PC 默认入口。
|
|
71
|
+
- `m_entry_path`:移动端入口;不确定时保持原值或空字符串。
|
|
72
|
+
- `is_system_admin`、`admin_ids`、`white_list`:权限相关字段,必须按用户要求或导出现状保守保留。
|
|
73
|
+
- `logo`、`bg_img`、`icon`、`description`、`origin`:只在需求明确时修改。
|
|
74
|
+
|
|
75
|
+
## 验收
|
|
76
|
+
- dry-run 输出必须显示 endpoint、method、payload 和 diff。
|
|
77
|
+
- confirmed submit 后必须有 readback hash。
|
|
78
|
+
- 浏览器验收时打开 `.../w:<workspace_key>/workspaceConfiguration/<workspace_key>` 或当前平台对应工作区配置页,确认名称、入口、图标和管理员范围显示正确。
|