bpmax-cli 0.1.44-beta.2 → 0.1.44-beta.20
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 +49 -0
- package/dist/bin.js +8995 -4787
- package/dist/bin.js.map +1 -1
- package/package.json +1 -1
- package/skills/bpmax-ai-taskbook/SKILL.md +178 -0
- package/skills/bpmax-approval-matrix/SKILL.md +87 -0
- package/skills/bpmax-cli/SKILL.md +3 -0
- package/skills/bpmax-dataset-field-template-editor/SKILL.md +5 -2
- package/skills/bpmax-dataset-template-editor/SKILL.md +2 -2
- package/skills/bpmax-dataset-template-editor/references/pre-process-script-example-catalog.md +8 -8
- package/skills/bpmax-e2e-flow-config-orchestrator/SKILL.md +53 -1
- package/skills/bpmax-e2e-flow-config-orchestrator/references/orchestration-matrix.md +4 -1
- package/skills/bpmax-e2e-flow-test-operator/SKILL.md +106 -3
- package/skills/bpmax-e2e-flow-test-operator/profiles/negative_sale.json +4 -4
- package/skills/bpmax-e2e-flow-test-operator/profiles/negative_sale_final_v2.json +4 -4
- package/skills/bpmax-e2e-flow-test-operator/profiles/negative_sale_main.json +4 -4
- package/skills/bpmax-e2e-flow-test-operator/profiles/negative_sale_region.json +4 -4
- package/skills/bpmax-e2e-flow-test-operator/references/ai-test-suite.md +333 -0
- package/skills/bpmax-e2e-flow-test-operator/references/browser-only-checkpoints.md +8 -0
- package/skills/bpmax-e2e-flow-test-operator/references/filter-field-discovery.md +2 -2
- package/skills/bpmax-e2e-flow-test-operator/references/minimal-test-loop.md +9 -4
- package/skills/bpmax-e2e-flow-test-operator/references/negative-sale-api-matrix.md +3 -3
- package/skills/bpmax-e2e-flow-test-operator/references/profile-schema.md +6 -4
- package/skills/bpmax-e2e-flow-test-operator/references/state-schema.md +25 -0
- package/skills/bpmax-e2e-flow-test-operator/scripts/e2e_doc.py +26 -0
- package/skills/bpmax-e2e-flow-test-operator/scripts/flow_test_profile.py +11 -11
- package/skills/bpmax-flow-template-editor/SKILL.md +52 -11
- package/skills/bpmax-flow-template-editor/references/flow-template-api-workflow.md +17 -2
- package/skills/bpmax-flow-template-editor/references/lessons-from-price-plan-flow.md +3 -3
- package/skills/bpmax-flow-template-editor/references/matrix-flow-form-nav-collaboration.md +9 -4
- 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-form-template-editor/SKILL.md +44 -14
- package/skills/bpmax-form-template-editor/references/form-template-api-workflow.md +15 -5
- package/skills/bpmax-form-template-editor/references/local-temp-workflow.md +1 -1
- package/skills/bpmax-form-template-editor/scripts/export_form_template.py +2 -0
- package/skills/bpmax-form-template-editor/scripts/form_template_editor_common.py +17 -0
- package/skills/bpmax-form-template-editor/tests/test_form_template_editor.py +6 -17
- package/skills/bpmax-list-template-editor/SKILL.md +10 -0
- package/skills/bpmax-list-template-editor/references/content-config-shape.md +17 -0
- package/skills/bpmax-list-template-editor/references/list-template-api-workflow.md +9 -4
- package/skills/bpmax-list-template-editor/references/runtime-verified-workflow.md +17 -10
- package/skills/bpmax-list-template-editor/references/special-formats.md +17 -0
- package/skills/bpmax-nav-config-editor/SKILL.md +3 -2
- package/skills/bpmax-nav-config-editor/references/api-workflow.md +6 -4
- package/skills/bpmax-nav-config-editor/references/path-mapping-rules.md +5 -0
- package/skills/bpmax-project/SKILL.md +8 -1
- package/skills/bpmax-project-detail-template-editor/SKILL.md +26 -0
- package/skills/bpmax-project-detail-template-editor/references/module-catalog-and-config-notes.md +73 -0
- package/skills/bpmax-role-editor/SKILL.md +1 -1
- package/skills/bpmax-user-mock-operator/SKILL.md +106 -0
- package/skills/bpmax-user-mock-operator/agents/openai.yaml +4 -0
- package/skills/bpmax-user-mock-operator/scripts/switch_user_identity.py +37 -0
- package/skills/bpmax-user-mock-operator/scripts/user_mock_operator_common.py +136 -0
- package/skills/bpmax-user-mock-operator/tests/test_user_mock_operator.py +138 -0
- package/skills/bpmax-workspace-editor/SKILL.md +78 -0
- package/skills/bpmax-workspace-editor/agents/openai.yaml +4 -0
- package/skills/form-control-library/references/form-controls.md +37 -37
|
@@ -78,6 +78,16 @@ description: "用于在 BPMAX 的项目详情模板页面中创建、编辑、
|
|
|
78
78
|
- 模块顺序就是页面展示顺序。
|
|
79
79
|
- `main_col` / `side_col` 的模块允许范围默认以 `moduleRegistry.js` 为准;源码存在但 registry 未收录的模块,允许作为高级 JSON 模式候选,不默认承诺可视化面板可直接支持。
|
|
80
80
|
- flow 绑定默认以当前页面 query 的 `flow_type/flow_key` 为准,不假设从 `flow.data.meta` 直接读取到详情模板绑定。
|
|
81
|
+
- `/project_detail/0/<project_id>` 里的 `0` 是运行态默认入口占位,不等于可以直接编辑的 flow_page_template 数字 ID。不要把 `bpmax-cli config project-detail-template export --id 0` 当成目标流程默认详情模板;它只代表全局默认模板。
|
|
82
|
+
- 编辑运行态默认详情模板前,必须先解析真实数字 ID:
|
|
83
|
+
- 优先运行 `bpmax-cli config project-detail-template resolve-default --flow-type <flow_type> --flow-key "<flow_key>" --profile <profile> --format json`。
|
|
84
|
+
- 若只拿到本地 sysconfig UUID,先运行 `bpmax-cli config resolve-id --domain project-detail-template --uuid <uuid> --repo <sysconfig_repo> --profile <profile> --format json`。本地镜像可能只有 UUID 没有数字 ID;只有 `resolved_id` 是平台数字 ID 时才允许 export/submit。
|
|
85
|
+
- 当详情模板被绑定到流程节点 `node.step_detail_id` 时,必须按节点业务动作选型:
|
|
86
|
+
- 需要填写当前环节表单的节点,详情模板应包含“项目详情 + 当前环节表单填写模块”。
|
|
87
|
+
- 审批/审核/确认/验收类节点,详情模板应以“项目详情”为主,不默认暴露当前环节表单填写模块。
|
|
88
|
+
- 打回修改、发起人补充等 `enable_relate_project_form=true` 的节点,应使用“只填写项目表单”的模板,且节点不应再额外挂独立 `form_template`。
|
|
89
|
+
- 纯系统自动化动作不要配置成单独需要用户进入处理的详情页;如果节点带子流程联动,应优先做系统等待/汇总页或禁止人工处理入口。
|
|
90
|
+
- 详情模板修改后的验收不能只看模板接口回读;还要回读绑定它的流程节点,确认 `step_detail_id`、`form_template`、`enable_relate_project_form` 与节点动作一致。
|
|
81
91
|
- 详情模块脚本默认查询口径:
|
|
82
92
|
- 前端模块脚本默认优先 `raw-es-search`
|
|
83
93
|
- 后端 helper 默认优先 `ctx.$esQuery(...)` 或已验证的 `rootUser` helper
|
|
@@ -138,6 +148,20 @@ export BPMAX_WORKSPACE='store_mgr'
|
|
|
138
148
|
- 至少检查 3 件事:模块是否出现在详情页、是否真的渲染出表格/卡片主体、页面是否发出了符合预期的列表请求或已经出现目标行数据。
|
|
139
149
|
- 只要模块目标是列表数据,模板回读成功不等于页面真实生效。
|
|
140
150
|
|
|
151
|
+
### 3.0 默认详情模板解析
|
|
152
|
+
- 如果用户给的是运行态 URL `/project_detail/0/<project_id>`,先通过项目详情、列表入口或用户提供信息确认 `flow_type/flow_key`,然后解析真实模板 ID:
|
|
153
|
+
|
|
154
|
+
```bash
|
|
155
|
+
bpmax-cli config project-detail-template resolve-default \
|
|
156
|
+
--flow-type <flow_type> \
|
|
157
|
+
--flow-key "<flow_key>" \
|
|
158
|
+
--profile <profile> \
|
|
159
|
+
--format json
|
|
160
|
+
```
|
|
161
|
+
|
|
162
|
+
- `resolved_id` 为空时,不得继续用 `--id 0` 猜测编辑;必须回到浏览器列表页或配置列表接口确认目标模板。
|
|
163
|
+
- `bpmax-cli config project-detail-template export --id 0` 只能用于查看全局默认结构,不能作为某个流程的默认详情模板修改目标。
|
|
164
|
+
|
|
141
165
|
### 3.1 优先检索现有模板
|
|
142
166
|
- 只要需求涉及“新建项目详情模板”或“参考已有模板改一个版本”,先在当前已激活配置仓库检索 `think_flow_page_template` 里的 `type = 2` 候选模板。
|
|
143
167
|
- 输出至少包含:
|
|
@@ -317,6 +341,8 @@ bpmax-cli config project-detail-template submit \
|
|
|
317
341
|
|
|
318
342
|
```bash
|
|
319
343
|
bpmax-cli config project-detail-template export --id <id> --out .codex/tmp/project-detail-template-editor
|
|
344
|
+
bpmax-cli config project-detail-template resolve-default --flow-type <flow_type> --flow-key "<flow_key>" --profile <profile> --format json
|
|
345
|
+
bpmax-cli config resolve-id --domain project-detail-template --uuid <uuid> --repo <sysconfig_repo> --profile <profile> --format json
|
|
320
346
|
bpmax-cli config project-detail-template lint --work .codex/tmp/project-detail-template-editor/work/<file>.json
|
|
321
347
|
bpmax-cli config project-detail-template build --work .codex/tmp/project-detail-template-editor/work/<file>.json --meta .codex/tmp/project-detail-template-editor/meta/<file>.meta.json --out .codex/tmp/project-detail-template-editor/submit/<file>.json
|
|
322
348
|
bpmax-cli config project-detail-template submit --id <id> --payload .codex/tmp/project-detail-template-editor/submit/<file>.json
|
package/skills/bpmax-project-detail-template-editor/references/module-catalog-and-config-notes.md
CHANGED
|
@@ -45,3 +45,76 @@
|
|
|
45
45
|
- 必须显式配置 `flow_step_id`
|
|
46
46
|
- 模块顺序:
|
|
47
47
|
- 数组顺序就是页面渲染顺序
|
|
48
|
+
|
|
49
|
+
## 可复用最小 JSON 示例
|
|
50
|
+
|
|
51
|
+
### meta-form:展示当前项目表单字段/子表
|
|
52
|
+
|
|
53
|
+
用于展示主项目表单的基础信息、字段和子表。适合主区。
|
|
54
|
+
|
|
55
|
+
```json
|
|
56
|
+
{
|
|
57
|
+
"type": "meta-form",
|
|
58
|
+
"title": "项目表单",
|
|
59
|
+
"config": {
|
|
60
|
+
"showTitle": true,
|
|
61
|
+
"fields": [],
|
|
62
|
+
"subForms": []
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
说明:
|
|
68
|
+
- `fields: []` 表示按表单默认字段展示;需要控制字段时再显式列 key。
|
|
69
|
+
- 子表展示依赖表单模板本身存在 sub_form 控件;详情模板只负责展示,不负责创建表单结构。
|
|
70
|
+
|
|
71
|
+
### project-list:展示关联子流程/子项目
|
|
72
|
+
|
|
73
|
+
用于在当前项目详情页展示关联的下游流程、子流程或子项目列表。优先使用已验证的父子关联表格模式。
|
|
74
|
+
|
|
75
|
+
```json
|
|
76
|
+
{
|
|
77
|
+
"type": "project-list",
|
|
78
|
+
"title": "关联项目",
|
|
79
|
+
"config": {
|
|
80
|
+
"mode": "",
|
|
81
|
+
"format": "table",
|
|
82
|
+
"template_id": 954573597,
|
|
83
|
+
"flow_type": "flow123456789",
|
|
84
|
+
"flow_key": ""
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
说明:
|
|
90
|
+
- `template_id` 必须是列表模板数字 ID,不得使用 UUID。
|
|
91
|
+
- 只有运行态确认 ES 列表模式可稳定加载时,才使用 `mode: "project"`。
|
|
92
|
+
|
|
93
|
+
### project-info:展示项目基础信息
|
|
94
|
+
|
|
95
|
+
```json
|
|
96
|
+
{
|
|
97
|
+
"type": "project-info",
|
|
98
|
+
"title": "项目信息",
|
|
99
|
+
"config": {
|
|
100
|
+
"showCreator": true,
|
|
101
|
+
"showCreateTime": true,
|
|
102
|
+
"showStatus": true
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
### step-log:展示流程流转记录
|
|
108
|
+
|
|
109
|
+
适合侧栏,用于验收审批/退回/转交痕迹。
|
|
110
|
+
|
|
111
|
+
```json
|
|
112
|
+
{
|
|
113
|
+
"type": "step-log",
|
|
114
|
+
"title": "流转记录",
|
|
115
|
+
"config": {
|
|
116
|
+
"showComment": true,
|
|
117
|
+
"showTime": true
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
```
|
|
@@ -41,7 +41,7 @@ description: "用于在 BPMAX 的角色配置页面创建或编辑角色。只
|
|
|
41
41
|
- 提交
|
|
42
42
|
- 接口回读
|
|
43
43
|
- 浏览器刷新角色页验收
|
|
44
|
-
-
|
|
44
|
+
- 支持通过 `bpmax-cli config role delete --id <role_id>` 删除角色;必须先 dry-run,确认无成员、权限点和业务流程引用风险后,再使用精确 `--confirm` 执行并回读角色列表验收。
|
|
45
45
|
- 只允许人工修改 `work/<stem>.json`,不要直接改 `raw`、`submit` 或仓库镜像。
|
|
46
46
|
- `permissions` 必须始终保持四段结构:
|
|
47
47
|
- `system`
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: "bpmax-user-mock-operator"
|
|
3
|
+
description: "用于 BPMAX 浏览器 E2E 测试中的用户身份切换。只要用户提到“浏览器 E2E 切换用户”“模拟审批人测试”“多角色页面回归”“mock 用户做页面测试”“退出模拟用户”或等价表达,就应使用这个 skill。它只复用当前浏览器登录态调用既有 `PUT /api/user/:id` mock/unmock 接口,不提供 API Key 冒充、不修改平台权限、不修改本地配置镜像。"
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# BPMAX User Mock Operator
|
|
7
|
+
|
|
8
|
+
## 使用范围
|
|
9
|
+
- 本 skill 只用于“浏览器 E2E 测试中的用户身份切换”。
|
|
10
|
+
- 目标是让同一浏览器会话在完整页面链路中切到发起人、审批人、查看人等角色,验证真实 UI 可见性、按钮、表单和流转。
|
|
11
|
+
- 不用于普通 CLI API 调用身份切换,不用于 API Key impersonation,不新增 `bpmax-cli user mock` typed command。
|
|
12
|
+
- 不修改 BPMAX 平台权限、角色配置、本地 `think_*` 镜像或配置提交体。
|
|
13
|
+
|
|
14
|
+
## 何时使用
|
|
15
|
+
- E2E 场景需要用不同用户在浏览器里发起、审批、驳回、查看或验证权限。
|
|
16
|
+
- 当前浏览器已登录一个具备模拟用户权限的管理账号,需要临时 mock 到目标用户。
|
|
17
|
+
- 测试结束后需要 unmock,恢复原管理账号身份。
|
|
18
|
+
- 用户只给了姓名但没有给 `user_id` 时,先通过用户管理页或已有查询链路确认目标用户 id。
|
|
19
|
+
|
|
20
|
+
## 前置条件
|
|
21
|
+
- 浏览器里已有可用 BPMAX 登录态。
|
|
22
|
+
- 当前账号具备平台已有的用户模拟权限。
|
|
23
|
+
- 已确认 workspace、目标用户 `user_id`、目标测试角色。
|
|
24
|
+
- 默认页面为 `.../w:<workspace>/userManagement`;如果测试页不是这个路由,可以传 `--href-path` 覆盖。
|
|
25
|
+
|
|
26
|
+
## Memory 协议
|
|
27
|
+
- 开始前先调用 [$bpmax-memory-protocol](../bpmax-memory-protocol/SKILL.md),检索词至少包含:
|
|
28
|
+
- `浏览器 E2E`
|
|
29
|
+
- `模拟用户`
|
|
30
|
+
- `mock unmock`
|
|
31
|
+
- `workspace`
|
|
32
|
+
- 只有遇到稳定经验时才写回 memory,例如:
|
|
33
|
+
- 某工作区用户管理路由不是默认 `/w:<workspace>/userManagement`
|
|
34
|
+
- 某环境对 `x-href` 或 `referer` 有额外要求
|
|
35
|
+
- 某类角色切换后的页面权限验证方式
|
|
36
|
+
- 不要写入 Cookie、Authorization、API Key、手机号、验证码、密码或完整接口响应。
|
|
37
|
+
|
|
38
|
+
## 核心接口
|
|
39
|
+
- 进入模拟:`PUT /api/user/<user_id>`,body `{"mock": 1}`
|
|
40
|
+
- 退出模拟:`PUT /api/user/<user_id>`,body `{"unmock": 1}`
|
|
41
|
+
- query 需要带 `$workspace=<workspace>&$language=<language>`
|
|
42
|
+
- 请求头复用当前浏览器登录态:
|
|
43
|
+
- `Cookie`
|
|
44
|
+
- `Origin`
|
|
45
|
+
- `Referer`
|
|
46
|
+
- `x-href`
|
|
47
|
+
- `Content-Type: application/json`
|
|
48
|
+
|
|
49
|
+
## 操作命令
|
|
50
|
+
|
|
51
|
+
### 进入目标用户身份
|
|
52
|
+
|
|
53
|
+
```bash
|
|
54
|
+
PYTHON_BIN=./venv/bin/python
|
|
55
|
+
[[ -x "$PYTHON_BIN" ]] || PYTHON_BIN=./.venv/bin/python
|
|
56
|
+
[[ -x "$PYTHON_BIN" ]] || PYTHON_BIN=python3
|
|
57
|
+
|
|
58
|
+
"$PYTHON_BIN" .codex/skills/bpmax-user-mock-operator/scripts/switch_user_identity.py \
|
|
59
|
+
--action mock \
|
|
60
|
+
--user-id <target_user_id> \
|
|
61
|
+
--workspace <workspace> \
|
|
62
|
+
--base-url <bpmax_origin> \
|
|
63
|
+
--cookie-header "$BPMAX_COOKIE_HEADER"
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
### 退出模拟身份
|
|
67
|
+
|
|
68
|
+
```bash
|
|
69
|
+
"$PYTHON_BIN" .codex/skills/bpmax-user-mock-operator/scripts/switch_user_identity.py \
|
|
70
|
+
--action unmock \
|
|
71
|
+
--user-id <target_user_id> \
|
|
72
|
+
--workspace <workspace> \
|
|
73
|
+
--base-url <bpmax_origin> \
|
|
74
|
+
--cookie-header "$BPMAX_COOKIE_HEADER"
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
## 参数说明
|
|
78
|
+
- `--action`:只能是 `mock` 或 `unmock`。
|
|
79
|
+
- `--user-id`:目标用户 id,必须是正整数。
|
|
80
|
+
- `--workspace`:工作区 key;也可用 `BPMAX_WORKSPACE` 环境变量。
|
|
81
|
+
- `--base-url`:BPMAX 页面 origin;也可用 `BPMAX_BASE_URL` 环境变量。
|
|
82
|
+
- `--cookie-header`:当前浏览器页面有效 Cookie 串;也可用 `BPMAX_COOKIE_HEADER` 环境变量。
|
|
83
|
+
- `--href-path`:覆盖默认 `/w:<workspace>/userManagement` 的 `x-href` / `Referer` 口径。
|
|
84
|
+
- `--language`:默认 `zhCN`。
|
|
85
|
+
- `--insecure`:仅用于证书异常的临时排障。
|
|
86
|
+
|
|
87
|
+
## 浏览器 E2E 工作流
|
|
88
|
+
1. 记录原始管理账号、workspace、当前页面和目标测试角色。
|
|
89
|
+
2. 从当前浏览器页面提取 Cookie,设置 `BPMAX_COOKIE_HEADER`。
|
|
90
|
+
3. 用本 skill 执行 `mock`。
|
|
91
|
+
4. 刷新或打开待测页面,通过 `/api/user/current` 或页面头像/用户名/权限入口确认当前身份已经切到目标用户。
|
|
92
|
+
5. 在浏览器中执行该角色的真实动作:发起、填写、提交、审批、驳回、查看或权限验证。
|
|
93
|
+
6. 记录截图、项目 ID、step ID、当前角色、目标用户 id 和结论。
|
|
94
|
+
7. 执行 `unmock`,刷新页面并确认已恢复原管理账号身份。
|
|
95
|
+
|
|
96
|
+
## 硬门禁
|
|
97
|
+
- 没有确认当前浏览器身份前,不得声称该角色浏览器 E2E 已通过。
|
|
98
|
+
- 没有执行 unmock 和恢复验证前,不得结束多角色测试。
|
|
99
|
+
- 不得把 mock 后的 Cookie/API 响应用作普通 API Key 或 CLI 业务命令身份。
|
|
100
|
+
- 不得把浏览器抓包中的 Cookie 或 Authorization 写入报告、memory、AGENTS.md 或 git。
|
|
101
|
+
|
|
102
|
+
## 常见问题
|
|
103
|
+
- 401/403:先确认 Cookie 是否过期,再确认原始管理账号是否具备模拟用户权限。
|
|
104
|
+
- HTTP 200 但业务 `code` 非 0:以后端返回的 JSON 错误为准,不要继续执行页面测试。
|
|
105
|
+
- 页面身份未变化:刷新页面,或调用 `/api/user/current` 验证;仍未变化则先 unmock 再重试。
|
|
106
|
+
- 目标用户 id 不确定:先在用户管理页定位用户,不要凭姓名猜 id。
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
#!/usr/bin/env python3
|
|
2
|
+
from __future__ import annotations
|
|
3
|
+
|
|
4
|
+
import argparse
|
|
5
|
+
import json
|
|
6
|
+
|
|
7
|
+
from user_mock_operator_common import build_client, default_href_path
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
def build_parser() -> argparse.ArgumentParser:
|
|
11
|
+
parser = argparse.ArgumentParser(
|
|
12
|
+
description="Switch a BPMAX browser E2E session into or out of simulated identity mode via /api/user/:id."
|
|
13
|
+
)
|
|
14
|
+
parser.add_argument("--action", choices=("mock", "unmock"), required=True)
|
|
15
|
+
parser.add_argument("--user-id", type=int, required=True)
|
|
16
|
+
parser.add_argument("--workspace")
|
|
17
|
+
parser.add_argument("--base-url")
|
|
18
|
+
parser.add_argument("--language", default="zhCN")
|
|
19
|
+
parser.add_argument("--cookie-header")
|
|
20
|
+
parser.add_argument("--href-path")
|
|
21
|
+
parser.add_argument("--timeout", type=float, default=30)
|
|
22
|
+
parser.add_argument("--insecure", action="store_true")
|
|
23
|
+
return parser
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
def main() -> int:
|
|
27
|
+
args = build_parser().parse_args()
|
|
28
|
+
client = build_client(args)
|
|
29
|
+
workspace = args.workspace or client.workspace
|
|
30
|
+
href_path = args.href_path or default_href_path(workspace)
|
|
31
|
+
payload = client.switch_user_identity(args.user_id, args.action, href_path)
|
|
32
|
+
print(json.dumps(payload, ensure_ascii=False))
|
|
33
|
+
return 0
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
if __name__ == "__main__":
|
|
37
|
+
raise SystemExit(main())
|
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
#!/usr/bin/env python3
|
|
2
|
+
from __future__ import annotations
|
|
3
|
+
|
|
4
|
+
import json
|
|
5
|
+
import os
|
|
6
|
+
import ssl
|
|
7
|
+
import sys
|
|
8
|
+
import urllib.error
|
|
9
|
+
import urllib.parse
|
|
10
|
+
import urllib.request
|
|
11
|
+
from dataclasses import dataclass
|
|
12
|
+
from pathlib import Path
|
|
13
|
+
from typing import Any, Optional
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
SHARED_SKILL_ROOT = Path(__file__).resolve().parents[2] / "bpmax-builder-shared"
|
|
17
|
+
if str(SHARED_SKILL_ROOT) not in sys.path:
|
|
18
|
+
sys.path.insert(0, str(SHARED_SKILL_ROOT))
|
|
19
|
+
|
|
20
|
+
from base_url import DEFAULT_BASE_URL, resolve_base_url
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
DEFAULT_LANGUAGE = "zhCN"
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
def resolve_cookie_header(value: Optional[str]) -> str:
|
|
27
|
+
cookie = value or os.environ.get("BPMAX_COOKIE_HEADER", "")
|
|
28
|
+
if not cookie:
|
|
29
|
+
raise SystemExit("missing cookie header: pass --cookie-header or set BPMAX_COOKIE_HEADER")
|
|
30
|
+
return cookie
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
def resolve_workspace(value: Optional[str]) -> str:
|
|
34
|
+
workspace = value or os.environ.get("BPMAX_WORKSPACE", "")
|
|
35
|
+
if not workspace:
|
|
36
|
+
raise SystemExit("missing workspace: pass --workspace or set BPMAX_WORKSPACE")
|
|
37
|
+
return workspace
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
def default_href_path(workspace: str) -> str:
|
|
41
|
+
return f"/w:{workspace}/userManagement"
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
def encode_x_href(href_path: str) -> str:
|
|
45
|
+
return urllib.parse.quote(href_path, safe="")
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
def normalize_href_path(href_path: Optional[str], workspace: str) -> str:
|
|
49
|
+
candidate = (href_path or "").strip() or default_href_path(workspace)
|
|
50
|
+
if candidate.startswith("http://") or candidate.startswith("https://"):
|
|
51
|
+
parsed = urllib.parse.urlparse(candidate)
|
|
52
|
+
candidate = parsed.path or default_href_path(workspace)
|
|
53
|
+
if parsed.query:
|
|
54
|
+
candidate = f"{candidate}?{parsed.query}"
|
|
55
|
+
if not candidate.startswith("/"):
|
|
56
|
+
raise SystemExit("href path must start with '/' or be an absolute BPMAX page URL")
|
|
57
|
+
return candidate
|
|
58
|
+
|
|
59
|
+
|
|
60
|
+
def build_action_body(action: str) -> dict:
|
|
61
|
+
if action == "mock":
|
|
62
|
+
return {"mock": 1}
|
|
63
|
+
if action == "unmock":
|
|
64
|
+
return {"unmock": 1}
|
|
65
|
+
raise SystemExit(f"unsupported action: {action}")
|
|
66
|
+
|
|
67
|
+
|
|
68
|
+
@dataclass
|
|
69
|
+
class ApiClient:
|
|
70
|
+
base_url: str
|
|
71
|
+
workspace: str
|
|
72
|
+
language: str
|
|
73
|
+
cookie_header: str
|
|
74
|
+
timeout: float
|
|
75
|
+
insecure: bool = False
|
|
76
|
+
|
|
77
|
+
def _build_url(self, path: str) -> str:
|
|
78
|
+
joiner = "&" if "?" in path else "?"
|
|
79
|
+
suffix = f"$workspace={urllib.parse.quote(self.workspace)}&$language={urllib.parse.quote(self.language)}"
|
|
80
|
+
return self.base_url.rstrip("/") + path + joiner + suffix
|
|
81
|
+
|
|
82
|
+
def _build_headers(self, href_path: str) -> dict[str, str]:
|
|
83
|
+
normalized_href = normalize_href_path(href_path, self.workspace)
|
|
84
|
+
return {
|
|
85
|
+
"accept": "application/json, text/plain, */*",
|
|
86
|
+
"accept-language": "zh-CN,zh;q=0.9",
|
|
87
|
+
"content-type": "application/json",
|
|
88
|
+
"cookie": self.cookie_header,
|
|
89
|
+
"origin": self.base_url.rstrip("/"),
|
|
90
|
+
"referer": f"{self.base_url.rstrip('/')}{normalized_href}",
|
|
91
|
+
"x-href": encode_x_href(normalized_href),
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
def request(self, method: str, path: str, body: Optional[dict] = None, *, href_path: Optional[str] = None) -> dict:
|
|
95
|
+
href = normalize_href_path(href_path, self.workspace)
|
|
96
|
+
headers = self._build_headers(href)
|
|
97
|
+
data = None if body is None else json.dumps(body, ensure_ascii=False).encode("utf-8")
|
|
98
|
+
request = urllib.request.Request(self._build_url(path), data=data, headers=headers, method=method.upper())
|
|
99
|
+
context = ssl._create_unverified_context() if self.insecure else None
|
|
100
|
+
try:
|
|
101
|
+
with urllib.request.urlopen(request, timeout=self.timeout, context=context) as response:
|
|
102
|
+
raw = response.read().decode("utf-8", "replace")
|
|
103
|
+
except urllib.error.HTTPError as err:
|
|
104
|
+
raw = err.read().decode("utf-8", "replace")
|
|
105
|
+
raise SystemExit(f"HTTP {err.code} {path}: {raw}") from err
|
|
106
|
+
except urllib.error.URLError as err:
|
|
107
|
+
raise SystemExit(f"Request failed {path}: {err}") from err
|
|
108
|
+
|
|
109
|
+
try:
|
|
110
|
+
payload = json.loads(raw)
|
|
111
|
+
except json.JSONDecodeError as err:
|
|
112
|
+
raise SystemExit(f"Non-JSON response from {path}: {raw}") from err
|
|
113
|
+
if isinstance(payload, dict) and payload.get("code") not in (None, 0):
|
|
114
|
+
raise SystemExit(f"API error {path}: {payload}")
|
|
115
|
+
return payload
|
|
116
|
+
|
|
117
|
+
def switch_user_identity(self, user_id: int, action: str, href_path: Optional[str] = None) -> dict:
|
|
118
|
+
if user_id <= 0:
|
|
119
|
+
raise SystemExit("user id must be positive")
|
|
120
|
+
return self.request(
|
|
121
|
+
"PUT",
|
|
122
|
+
f"/api/user/{user_id}",
|
|
123
|
+
build_action_body(action),
|
|
124
|
+
href_path=href_path,
|
|
125
|
+
)
|
|
126
|
+
|
|
127
|
+
|
|
128
|
+
def build_client(args: Any) -> ApiClient:
|
|
129
|
+
return ApiClient(
|
|
130
|
+
base_url=resolve_base_url(getattr(args, "base_url", None)),
|
|
131
|
+
workspace=resolve_workspace(getattr(args, "workspace", None)),
|
|
132
|
+
language=getattr(args, "language", DEFAULT_LANGUAGE),
|
|
133
|
+
cookie_header=resolve_cookie_header(getattr(args, "cookie_header", None)),
|
|
134
|
+
timeout=float(getattr(args, "timeout", 30)),
|
|
135
|
+
insecure=bool(getattr(args, "insecure", False)),
|
|
136
|
+
)
|
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
import io
|
|
2
|
+
import json
|
|
3
|
+
import os
|
|
4
|
+
import sys
|
|
5
|
+
import unittest
|
|
6
|
+
from contextlib import redirect_stdout
|
|
7
|
+
from pathlib import Path
|
|
8
|
+
from unittest import mock
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
SCRIPT_DIR = Path(__file__).resolve().parents[1] / "scripts"
|
|
12
|
+
if str(SCRIPT_DIR) not in sys.path:
|
|
13
|
+
sys.path.insert(0, str(SCRIPT_DIR))
|
|
14
|
+
|
|
15
|
+
import switch_user_identity as cli # noqa: E402
|
|
16
|
+
from user_mock_operator_common import ( # noqa: E402
|
|
17
|
+
DEFAULT_BASE_URL,
|
|
18
|
+
ApiClient,
|
|
19
|
+
build_action_body,
|
|
20
|
+
build_client,
|
|
21
|
+
default_href_path,
|
|
22
|
+
encode_x_href,
|
|
23
|
+
)
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
class FakeResponse:
|
|
27
|
+
def __init__(self, body: bytes, status: int = 200) -> None:
|
|
28
|
+
self._body = body
|
|
29
|
+
self.status = status
|
|
30
|
+
|
|
31
|
+
def __enter__(self) -> "FakeResponse":
|
|
32
|
+
return self
|
|
33
|
+
|
|
34
|
+
def __exit__(self, exc_type, exc, tb) -> None:
|
|
35
|
+
return None
|
|
36
|
+
|
|
37
|
+
def read(self) -> bytes:
|
|
38
|
+
return self._body
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
class UserMockOperatorTests(unittest.TestCase):
|
|
42
|
+
def test_default_base_url_is_empty_until_runtime_configured(self) -> None:
|
|
43
|
+
self.assertEqual(DEFAULT_BASE_URL, "")
|
|
44
|
+
|
|
45
|
+
def test_build_action_body_maps_mock_and_unmock(self) -> None:
|
|
46
|
+
self.assertEqual(build_action_body("mock"), {"mock": 1})
|
|
47
|
+
self.assertEqual(build_action_body("unmock"), {"unmock": 1})
|
|
48
|
+
|
|
49
|
+
def test_default_href_path_and_encoding_follow_user_management_route(self) -> None:
|
|
50
|
+
href = default_href_path("store_mgr")
|
|
51
|
+
self.assertEqual(href, "/w:store_mgr/userManagement")
|
|
52
|
+
self.assertEqual(encode_x_href(href), "%2Fw%3Astore_mgr%2FuserManagement")
|
|
53
|
+
|
|
54
|
+
def test_build_client_uses_environment_origin_without_api_suffix(self) -> None:
|
|
55
|
+
args = type(
|
|
56
|
+
"Args",
|
|
57
|
+
(),
|
|
58
|
+
{
|
|
59
|
+
"base_url": None,
|
|
60
|
+
"workspace": "store_mgr",
|
|
61
|
+
"language": "zhCN",
|
|
62
|
+
"cookie_header": "token=demo",
|
|
63
|
+
"timeout": 30,
|
|
64
|
+
"insecure": False,
|
|
65
|
+
},
|
|
66
|
+
)()
|
|
67
|
+
with mock.patch.dict(os.environ, {"BPMAX_BASE_URL": "https://bpmax.example.com/api/"}, clear=False):
|
|
68
|
+
client = build_client(args)
|
|
69
|
+
self.assertEqual(
|
|
70
|
+
client._build_url("/api/user/995920025"),
|
|
71
|
+
"https://bpmax.example.com/api/user/995920025?$workspace=store_mgr&$language=zhCN",
|
|
72
|
+
)
|
|
73
|
+
|
|
74
|
+
def test_client_builds_expected_headers_for_user_management_page(self) -> None:
|
|
75
|
+
client = ApiClient(
|
|
76
|
+
base_url="https://bpmax.example.com",
|
|
77
|
+
workspace="store_mgr",
|
|
78
|
+
language="zhCN",
|
|
79
|
+
cookie_header="token=demo",
|
|
80
|
+
timeout=30,
|
|
81
|
+
)
|
|
82
|
+
headers = client._build_headers(default_href_path("store_mgr"))
|
|
83
|
+
self.assertEqual(headers["origin"], "https://bpmax.example.com")
|
|
84
|
+
self.assertEqual(headers["referer"], "https://bpmax.example.com/w:store_mgr/userManagement")
|
|
85
|
+
self.assertEqual(headers["x-href"], "%2Fw%3Astore_mgr%2FuserManagement")
|
|
86
|
+
self.assertEqual(headers["cookie"], "token=demo")
|
|
87
|
+
|
|
88
|
+
def test_switch_user_identity_sends_put_with_expected_body(self) -> None:
|
|
89
|
+
client = ApiClient(
|
|
90
|
+
base_url="https://bpmax.example.com",
|
|
91
|
+
workspace="store_mgr",
|
|
92
|
+
language="zhCN",
|
|
93
|
+
cookie_header="token=demo",
|
|
94
|
+
timeout=30,
|
|
95
|
+
)
|
|
96
|
+
captured = {}
|
|
97
|
+
|
|
98
|
+
def fake_urlopen(req, timeout, context=None):
|
|
99
|
+
captured["url"] = req.full_url
|
|
100
|
+
captured["method"] = req.get_method()
|
|
101
|
+
captured["data"] = req.data.decode("utf-8")
|
|
102
|
+
captured["headers"] = {k.lower(): v for k, v in req.header_items()}
|
|
103
|
+
return FakeResponse(b'{"code":0,"data":{"ok":true}}')
|
|
104
|
+
|
|
105
|
+
with mock.patch.object(
|
|
106
|
+
__import__("user_mock_operator_common").urllib.request,
|
|
107
|
+
"urlopen",
|
|
108
|
+
side_effect=fake_urlopen,
|
|
109
|
+
):
|
|
110
|
+
payload = client.switch_user_identity(995920025, "mock", default_href_path("store_mgr"))
|
|
111
|
+
|
|
112
|
+
self.assertTrue(payload["data"]["ok"])
|
|
113
|
+
self.assertEqual(captured["method"], "PUT")
|
|
114
|
+
self.assertEqual(json.loads(captured["data"]), {"mock": 1})
|
|
115
|
+
self.assertEqual(
|
|
116
|
+
captured["url"],
|
|
117
|
+
"https://bpmax.example.com/api/user/995920025?$workspace=store_mgr&$language=zhCN",
|
|
118
|
+
)
|
|
119
|
+
self.assertEqual(captured["headers"]["x-href"], "%2Fw%3Astore_mgr%2FuserManagement")
|
|
120
|
+
|
|
121
|
+
def test_cli_dispatches_selected_action_and_prints_json(self) -> None:
|
|
122
|
+
client = mock.Mock()
|
|
123
|
+
client.switch_user_identity.return_value = {"code": 0, "data": {"userId": 995920025, "mocked": False}}
|
|
124
|
+
output = io.StringIO()
|
|
125
|
+
with mock.patch.object(cli, "build_client", return_value=client), mock.patch.object(
|
|
126
|
+
sys,
|
|
127
|
+
"argv",
|
|
128
|
+
["switch_user_identity.py", "--action", "unmock", "--user-id", "995920025", "--workspace", "store_mgr"],
|
|
129
|
+
), redirect_stdout(output):
|
|
130
|
+
result = cli.main()
|
|
131
|
+
|
|
132
|
+
self.assertEqual(result, 0)
|
|
133
|
+
client.switch_user_identity.assert_called_once_with(995920025, "unmock", "/w:store_mgr/userManagement")
|
|
134
|
+
self.assertEqual(json.loads(output.getvalue()), {"code": 0, "data": {"userId": 995920025, "mocked": False}})
|
|
135
|
+
|
|
136
|
+
|
|
137
|
+
if __name__ == "__main__":
|
|
138
|
+
unittest.main()
|
|
@@ -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>` 或当前平台对应工作区配置页,确认名称、入口、图标和管理员范围显示正确。
|