bpmax-cli 0.2.1-beta.8 → 0.2.1-beta.81

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.
Files changed (191) hide show
  1. package/README.md +30 -7
  2. package/dist/bin.js +41819 -11180
  3. package/dist/bin.js.map +1 -1
  4. package/package.json +12 -5
  5. package/scripts/install-skills.mjs +27 -60
  6. package/scripts/run-source-cli.mjs +145 -0
  7. package/skills/bpmax-ai-taskbook/SKILL.md +13 -1
  8. package/skills/bpmax-ai-taskbook/references/blueprint-taskbook-gates.md +121 -0
  9. package/skills/bpmax-ai-taskbook/references/taskbook-template.md +42 -2
  10. package/skills/bpmax-api-platform-editor/SKILL.md +24 -31
  11. package/skills/bpmax-api-platform-editor/agents/openai.yaml +2 -2
  12. package/skills/bpmax-api-platform-editor/references/platform-api-map.md +2 -2
  13. package/skills/bpmax-api-platform-editor/references/runtime-workflow.md +3 -3
  14. package/skills/bpmax-approval-matrix/SKILL.md +54 -2
  15. package/skills/bpmax-blueprint-doc-workflow/SKILL.md +15 -2
  16. package/skills/bpmax-blueprint-doc-workflow/references/blueprint-structure.md +8 -0
  17. package/skills/bpmax-blueprint-doc-workflow/references/per-flow-required-structure.md +13 -0
  18. package/skills/bpmax-blueprint-doc-workflow/references/sample-missing-modeling-review.xml +23 -0
  19. package/skills/bpmax-blueprint-doc-workflow/references/sample-paragraph-flow-details.xml +27 -0
  20. package/skills/bpmax-blueprint-doc-workflow/references/sample-pass.xml +45 -28
  21. package/skills/bpmax-blueprint-doc-workflow/references/source-traceability-and-flow-modeling.md +115 -0
  22. package/skills/bpmax-blueprint-doc-workflow/scripts/lint_blueprint_doc.py +386 -5
  23. package/skills/bpmax-bug-reporting/SKILL.md +72 -0
  24. package/skills/bpmax-builder-shared/SKILL.md +1 -0
  25. package/skills/bpmax-builder-shared/configuration-impact-review.md +76 -0
  26. package/skills/bpmax-builder-shared/template_script_hard_rules.py +3 -1
  27. package/skills/bpmax-builder-shared/tests/test_template_script_hard_rules.py +16 -0
  28. package/skills/bpmax-business-skill/SKILL.md +3 -1
  29. package/skills/bpmax-cli/SKILL.md +46 -0
  30. package/skills/bpmax-config-latest/SKILL.md +4 -0
  31. package/skills/bpmax-console-template-editor/SKILL.md +113 -523
  32. package/skills/bpmax-console-template-editor/agents/openai.yaml +2 -2
  33. package/skills/bpmax-console-template-editor/references/full-detail-guide.md +45 -0
  34. package/skills/bpmax-console-template-editor/references/local-temp-workflow.md +13 -12
  35. package/skills/bpmax-console-template-editor/scripts/console_template_editor_common.py +299 -78
  36. package/skills/bpmax-console-template-editor/tests/test_console_template_editor.py +344 -30
  37. package/skills/bpmax-dataset-field-template-editor/SKILL.md +131 -594
  38. package/skills/bpmax-dataset-field-template-editor/references/full-detail-guide.md +570 -0
  39. package/skills/bpmax-dataset-field-template-editor/references/nested-field-patterns.md +8 -8
  40. package/skills/bpmax-dataset-field-template-editor/references/runtime-verified-field-page-shape.md +1 -1
  41. package/skills/bpmax-dataset-field-template-editor/scripts/dataset_field_editor_common.py +11 -77
  42. package/skills/bpmax-dataset-field-template-editor/scripts/export_dataset_field.py +4 -57
  43. package/skills/bpmax-dataset-field-template-editor/scripts/init_create_dataset_field.py +2 -0
  44. package/skills/bpmax-dataset-field-template-editor/scripts/inspect_dataset_field_runtime.py +4 -78
  45. package/skills/bpmax-dataset-field-template-editor/scripts/submit_dataset_field.py +3 -89
  46. package/skills/bpmax-dataset-field-template-editor/tests/test_dataset_field_editor.py +14 -0
  47. package/skills/bpmax-dataset-field-template-editor/tests/test_init_create_dataset_field.py +2 -0
  48. package/skills/bpmax-dataset-template-editor/SKILL.md +123 -778
  49. package/skills/bpmax-dataset-template-editor/references/dataset-script-runtime-matrix.md +11 -0
  50. package/skills/bpmax-dataset-template-editor/references/full-detail-guide.md +753 -0
  51. package/skills/bpmax-dataset-template-editor/references/runtime-gotchas.md +12 -0
  52. package/skills/bpmax-dataset-template-editor/references/ui-to-backend-field-map.md +1 -0
  53. package/skills/bpmax-dataset-template-editor/references/work-file-to-submit-mapping.md +2 -2
  54. package/skills/bpmax-dataset-template-editor/scripts/basic_table_audit.py +8 -1
  55. package/skills/bpmax-dataset-template-editor/scripts/dataset_editor_common.py +9 -90
  56. package/skills/bpmax-dataset-template-editor/scripts/export_dataset.py +8 -1
  57. package/skills/bpmax-dataset-template-editor/scripts/resolve_dataset.py +8 -1
  58. package/skills/bpmax-dataset-template-editor/scripts/submit_dataset.py +1 -2
  59. package/skills/bpmax-dataset-template-editor/scripts/verify_dataset_list.py +8 -1
  60. package/skills/bpmax-dataset-template-editor/scripts/verify_publish_health.py +8 -1
  61. package/skills/bpmax-dataset-template-editor/tests/test_dataset_editor.py +6 -40
  62. package/skills/bpmax-e2e-flow-config-orchestrator/SKILL.md +18 -4
  63. package/skills/bpmax-e2e-flow-config-orchestrator/agents/openai.yaml +2 -2
  64. package/skills/bpmax-e2e-flow-config-orchestrator/references/orchestration-matrix.md +13 -9
  65. package/skills/bpmax-e2e-flow-test-operator/SKILL.md +174 -546
  66. package/skills/bpmax-e2e-flow-test-operator/agents/openai.yaml +2 -3
  67. package/skills/bpmax-e2e-flow-test-operator/references/ai-test-suite.md +181 -15
  68. package/skills/bpmax-e2e-flow-test-operator/references/browser-action-dsl.md +167 -0
  69. package/skills/bpmax-e2e-flow-test-operator/references/browser-only-checkpoints.md +15 -7
  70. package/skills/bpmax-e2e-flow-test-operator/references/full-detail-guide.md +589 -0
  71. package/skills/bpmax-e2e-flow-test-operator/references/minimal-test-loop.md +12 -8
  72. package/skills/bpmax-e2e-flow-test-operator/references/negative-sale-api-matrix.md +4 -4
  73. package/skills/bpmax-e2e-flow-test-operator/references/profile-schema.md +1 -1
  74. package/skills/bpmax-e2e-flow-test-operator/references/state-schema.md +3 -1
  75. package/skills/bpmax-e2e-flow-test-operator/scripts/e2e_doc.py +7 -5
  76. package/skills/bpmax-e2e-flow-test-operator/scripts/e2e_state.py +2 -2
  77. package/skills/bpmax-e2e-flow-test-operator/scripts/flow_runner.py +5 -1
  78. package/skills/bpmax-e2e-flow-test-operator/tests/test_negative_sale_api_tools.py +71 -0
  79. package/skills/bpmax-e2e-flow-test-operator-v2/SKILL.md +64 -0
  80. package/skills/bpmax-e2e-flow-test-operator-v2/agents/openai.yaml +7 -0
  81. package/skills/bpmax-e2e-flow-test-operator-v2/references/automation-generation-pipeline.md +33 -0
  82. package/skills/bpmax-e2e-flow-test-operator-v2/references/autonomous-execution.md +40 -0
  83. package/skills/bpmax-e2e-flow-test-operator-v2/references/batch-generation-and-execution.md +17 -0
  84. package/skills/bpmax-e2e-flow-test-operator-v2/references/browser-action-runner.md +19 -0
  85. package/skills/bpmax-e2e-flow-test-operator-v2/references/browser-recording-and-replay.md +95 -0
  86. package/skills/bpmax-e2e-flow-test-operator-v2/references/form-script-generation.md +41 -0
  87. package/skills/bpmax-e2e-flow-test-operator-v2/references/identity-and-failure-routing.md +90 -0
  88. package/skills/bpmax-e2e-flow-test-operator-v2/references/multi-request-mutation.md +9 -0
  89. package/skills/bpmax-e2e-flow-test-operator-v2/references/scenario-coverage-generation.md +17 -0
  90. package/skills/bpmax-e2e-flow-test-operator-v2/references/scoped-execution.md +13 -0
  91. package/skills/bpmax-e2e-flow-test-operator-v2/references/step-restartability-and-state.md +23 -0
  92. package/skills/bpmax-e2e-flow-test-operator-v2/references/test-assets-and-evidence.md +9 -0
  93. package/skills/bpmax-e2e-flow-test-operator-v2/references/test-data-and-selector-contract.md +51 -0
  94. package/skills/bpmax-e2e-flow-test-operator-v2/references/test-preflight-and-confirmation.md +32 -0
  95. package/skills/bpmax-filter-template-editor/SKILL.md +114 -551
  96. package/skills/bpmax-filter-template-editor/references/experience-coverage-matrix.md +18 -18
  97. package/skills/bpmax-filter-template-editor/references/filter-content-schema.md +21 -0
  98. package/skills/bpmax-filter-template-editor/references/filter-request-shape.md +29 -26
  99. package/skills/bpmax-filter-template-editor/references/filter-runtime-patterns.md +19 -2
  100. package/skills/bpmax-filter-template-editor/references/full-detail-guide.md +56 -0
  101. package/skills/bpmax-filter-template-editor/references/runtime-verified-filter-page-shape.md +10 -9
  102. package/skills/bpmax-filter-template-editor/scripts/filter_template_editor_common.py +7 -57
  103. package/skills/bpmax-filter-template-editor/tests/test_filter_template_editor.py +4 -48
  104. package/skills/bpmax-flow/SKILL.md +2 -0
  105. package/skills/bpmax-flow-detail-template-editor/SKILL.md +53 -0
  106. package/skills/bpmax-flow-template-editor/SKILL.md +129 -1123
  107. package/skills/bpmax-flow-template-editor/agents/openai.yaml +2 -2
  108. package/skills/bpmax-flow-template-editor/references/diff-strategy.md +3 -3
  109. package/skills/bpmax-flow-template-editor/references/editor-runtime-vs-draft.md +9 -9
  110. package/skills/bpmax-flow-template-editor/references/flow-template-api-workflow.md +2 -1
  111. package/skills/bpmax-flow-template-editor/references/full-detail-guide.md +1158 -0
  112. package/skills/bpmax-flow-template-editor/references/local-temp-workflow.md +1 -1
  113. package/skills/bpmax-flow-template-editor/references/payload-checklist.md +2 -0
  114. package/skills/bpmax-flow-template-editor/references/project-create-runtime-gotchas.md +17 -0
  115. package/skills/bpmax-flow-template-editor/references/requirement-to-node-mapping.md +8 -3
  116. package/skills/bpmax-flow-template-editor/references/runtime-verified-flow-detail-shape.md +7 -7
  117. package/skills/bpmax-flow-template-editor/references/runtime-verified-meta-fields.md +2 -2
  118. package/skills/bpmax-flow-template-editor/references/runtime-verified-node-fields.md +12 -2
  119. package/skills/bpmax-flow-template-editor/references/save-draft-request-shape.md +7 -23
  120. package/skills/bpmax-flow-template-editor/references/work-file-to-submit-mapping.md +1 -1
  121. package/skills/bpmax-flow-template-editor/tests/test_flow_template_editor.py +19 -75
  122. package/skills/bpmax-form-template-editor/SKILL.md +138 -1151
  123. package/skills/bpmax-form-template-editor/agents/openai.yaml +2 -2
  124. package/skills/bpmax-form-template-editor/references/dynamic-field-state.md +167 -0
  125. package/skills/bpmax-form-template-editor/references/form-template-api-workflow.md +51 -51
  126. package/skills/bpmax-form-template-editor/references/full-detail-guide.md +1115 -0
  127. package/skills/bpmax-form-template-editor/references/local-temp-workflow.md +4 -4
  128. package/skills/bpmax-form-template-editor/references/payload-checklist.md +3 -1
  129. package/skills/bpmax-form-template-editor/references/sub-form-patterns.md +6 -0
  130. package/skills/bpmax-form-template-editor/scripts/form_template_editor_common.py +8 -0
  131. package/skills/bpmax-form-template-editor/tests/test_form_template_editor.py +42 -19
  132. package/skills/bpmax-functional-test-design/LICENSE.upstream +24 -0
  133. package/skills/bpmax-functional-test-design/SKILL.md +80 -0
  134. package/skills/bpmax-functional-test-design/agents/openai.yaml +4 -0
  135. package/skills/bpmax-functional-test-design/references/bpmax-test-suite-output.md +95 -0
  136. package/skills/bpmax-functional-test-design/references/decision-table-testing.md +50 -0
  137. package/skills/bpmax-functional-test-design/references/domain-testing.md +43 -0
  138. package/skills/bpmax-functional-test-design/references/state-transition-testing.md +47 -0
  139. package/skills/bpmax-functional-test-design/references/technique-selection.md +38 -0
  140. package/skills/bpmax-functional-test-design/references/use-case-testing.md +55 -0
  141. package/skills/bpmax-group-model-editor/SKILL.md +24 -0
  142. package/skills/bpmax-home-portal-editor/SKILL.md +81 -0
  143. package/skills/bpmax-icon-catalog/SKILL.md +18 -0
  144. package/skills/bpmax-icon-catalog/agents/openai.yaml +4 -0
  145. package/skills/bpmax-icon-catalog/assets/ri-icons.json +3140 -0
  146. package/skills/bpmax-icon-catalog/references/source-contract.md +3 -0
  147. package/skills/bpmax-list-template-editor/SKILL.md +131 -466
  148. package/skills/bpmax-list-template-editor/agents/openai.yaml +2 -2
  149. package/skills/bpmax-list-template-editor/references/content-config-shape.md +16 -4
  150. package/skills/bpmax-list-template-editor/references/full-detail-guide.md +461 -0
  151. package/skills/bpmax-list-template-editor/references/list-template-api-workflow.md +6 -9
  152. package/skills/bpmax-list-template-editor/references/local-temp-workflow.md +1 -1
  153. package/skills/bpmax-list-template-editor/references/runtime-verified-workflow.md +50 -2
  154. package/skills/bpmax-list-template-editor/references/special-formats.md +5 -2
  155. package/skills/bpmax-list-template-editor/scripts/list_template_editor_common.py +9 -78
  156. package/skills/bpmax-memory-protocol/SKILL.md +7 -6
  157. package/skills/bpmax-nav-config-editor/SKILL.md +14 -17
  158. package/skills/bpmax-nav-config-editor/agents/openai.yaml +2 -2
  159. package/skills/bpmax-nav-config-editor/references/api-workflow.md +2 -2
  160. package/skills/bpmax-nav-config-editor/references/runtime-probing.md +11 -12
  161. package/skills/bpmax-page-composition-template-editor/SKILL.md +315 -0
  162. package/skills/bpmax-page-composition-template-editor/examples/presets/catalog.json +41 -0
  163. package/skills/bpmax-page-composition-template-editor/examples/presets/full-capability-workbench.json +294 -0
  164. package/skills/bpmax-page-composition-template-editor/examples/presets/project-detail-step-panel.json +184 -0
  165. package/skills/bpmax-page-composition-template-editor/examples/presets/project-list-quick-process.json +177 -0
  166. package/skills/bpmax-page-composition-template-editor/examples/presets/project-operations-dashboard.json +400 -0
  167. package/skills/bpmax-page-composition-template-editor/examples/presets/project-operations-visual-light.json +214 -0
  168. package/skills/bpmax-page-composition-template-editor/examples/presets/step-related-projects.json +184 -0
  169. package/skills/bpmax-page-composition-template-editor/references/resource-api.md +9 -0
  170. package/skills/bpmax-plugin-config/SKILL.md +55 -5
  171. package/skills/bpmax-project/SKILL.md +37 -1
  172. package/skills/bpmax-project-detail-template-editor/SKILL.md +13 -39
  173. package/skills/bpmax-project-detail-template-editor/agents/openai.yaml +2 -2
  174. package/skills/bpmax-role-editor/SKILL.md +11 -30
  175. package/skills/bpmax-shared/SKILL.md +19 -9
  176. package/skills/bpmax-team-editor/SKILL.md +27 -0
  177. package/skills/bpmax-ui-ux-audit/LICENSE.upstream +23 -0
  178. package/skills/bpmax-ui-ux-audit/SKILL.md +42 -0
  179. package/skills/bpmax-ui-ux-audit/agents/openai.yaml +4 -0
  180. package/skills/bpmax-ui-ux-audit/references/audit-framework.md +39 -0
  181. package/skills/bpmax-ui-ux-audit/references/bpmax-ux-findings.md +56 -0
  182. package/skills/bpmax-user/SKILL.md +33 -1
  183. package/skills/bpmax-user-mock-operator/SKILL.md +58 -56
  184. package/skills/bpmax-user-mock-operator/agents/openai.yaml +2 -2
  185. package/skills/bpmax-user-mock-operator/scripts/chrome_identity_bridge.mjs +1766 -0
  186. package/skills/bpmax-user-model-editor/SKILL.md +24 -0
  187. package/skills/bpmax-workspace-editor/SKILL.md +1 -0
  188. package/skills/form-control-library/references/form-template-submit-schema.md +3 -1
  189. package/skills/bpmax-user-mock-operator/scripts/switch_user_identity.py +0 -37
  190. package/skills/bpmax-user-mock-operator/scripts/user_mock_operator_common.py +0 -136
  191. package/skills/bpmax-user-mock-operator/tests/test_user_mock_operator.py +0 -138
@@ -26,3 +26,15 @@
26
26
  1. 新建成功后先回读详情。
27
27
  2. 如需做 `pause -> publish` 闭环,若 `pause` 首次失败,先重新读取详情和列表状态。
28
28
  3. 只要详情和列表都能回读到新数据集,不要立刻重建第二个同名数据集。
29
+
30
+ ## Nested 字段超限会让索引创建失败
31
+
32
+ ### 已验证根因
33
+ - 数据集 944 曾有 82 个业务 `nested` 字段,平台又固定加入 3 个保留 nested 字段,超过 ES `nested_fields.limit=50`。
34
+ - 将其中 42 个仅展示或单值对象字段在 `post_es_mapping` 中改为 `object` 后,项目 3181 成功写入并在真实列表显示。
35
+
36
+ ### 排障顺序
37
+ 1. 先找本批次最早的索引创建或 mapping 错误,不要从最后一个字段写入异常倒推根因。
38
+ 2. 核对 lint/build 的 `dataset_mapping`:基础数、平台 3 个、脚本覆盖、有效数、上限和是否可静态确定。
39
+ 3. `__id`、`__create_time` 缺失或列表空白可能是索引未创建成功后的次生症状,不应单独补字段后反复 refresh。
40
+ 4. submit 后先 readback 最新 `post_es_mapping`;只有回读正确才 refresh。失败后重新读取最早错误,只允许一次有依据的有界重试。
@@ -18,6 +18,7 @@
18
18
  - `搜索前后处理` -> `pre_process_script` / `post_process_script` / `process_script_tag`
19
19
 
20
20
  ## 状态操作
21
+ 以下为 typed adapter 背后的后端契约说明,不是 Agent 直接调用入口;实际写操作必须使用 `bpmax-cli config dataset publish|pause|cancel-refresh|refresh|reindex`。
21
22
  - `应用/发布` -> `POST /bpmax/data-set/publish/:id`
22
23
  - `暂停` -> `POST /bpmax/data-set/pause/:id`
23
24
  - `取消刷新` -> `POST /bpmax/data-set/cancel-refresh/:id`
@@ -71,8 +71,8 @@
71
71
  - `meta/<stem>.json.basicTableAudit`
72
72
  - `meta/<stem>.json.customKeyReferences`
73
73
  - 第二次确认只看 `work -> submit` diff 和提交摘要,确认“最终提交体是否正确”
74
- - 未完成两次明确确认,不允许执行 `submit_dataset.py`
75
- - 只有显式携带 `--confirm-token SUBMIT_CONFIRMED` 才允许提交
74
+ - 未完成两次明确确认,不允许执行 typed CLI submit
75
+ - 只有显式携带 typed CLI 要求的精确 `--confirm` 文本才允许提交
76
76
 
77
77
  ## 回读验收
78
78
  - `result/*.verify.json` 至少校验:
@@ -1,6 +1,14 @@
1
1
  #!/usr/bin/env python3
2
2
  from __future__ import annotations
3
3
 
4
+ import sys
5
+
6
+ print(
7
+ "Legacy dataset network scripts are disabled in bpmax-cli. Use `bpmax-cli config dataset lint/verify` and typed readback so capability, dry-run, confirmation, audit, and baseline checks are enforced.",
8
+ file=sys.stderr,
9
+ )
10
+ sys.exit(2)
11
+
4
12
  import argparse
5
13
 
6
14
  from dataset_editor_common import (
@@ -21,7 +29,6 @@ def build_parser() -> argparse.ArgumentParser:
21
29
  p.add_argument("--workspace")
22
30
  p.add_argument("--base-url")
23
31
  p.add_argument("--language", default="zhCN")
24
- p.add_argument("--cookie-header")
25
32
  p.add_argument("--timeout", type=float, default=30)
26
33
  p.add_argument("--insecure", action="store_true")
27
34
  return p
@@ -4,11 +4,6 @@ from __future__ import annotations
4
4
  import json
5
5
  import subprocess
6
6
  import sys
7
- import ssl
8
- import urllib.error
9
- import urllib.parse
10
- import urllib.request
11
- from dataclasses import dataclass
12
7
  from datetime import datetime, timezone
13
8
  from difflib import unified_diff
14
9
  from pathlib import Path
@@ -558,93 +553,17 @@ def require_confirm_token(token: str) -> None:
558
553
  raise SystemExit(f"refusing to submit: --confirm-token must equal {DEFAULT_CONFIRM_TOKEN}")
559
554
 
560
555
 
561
- @dataclass
562
- class ApiClient:
563
- base_url: str
564
- workspace: str
565
- language: str
566
- cookie_header: str
567
- timeout: float
568
- insecure: bool = False
569
-
570
- def _build_url(self, path: str) -> str:
571
- suffix = f"$workspace={urllib.parse.quote(self.workspace)}&$language={urllib.parse.quote(self.language)}"
572
- joiner = "&" if "?" in path else "?"
573
- return self.base_url.rstrip("/") + path + joiner + suffix
574
-
575
- def request(self, method: str, path: str, body: Optional[dict] = None) -> dict:
576
- headers = {
577
- "content-type": "application/json",
578
- "cookie": self.cookie_header,
579
- "accept": "application/json, text/plain, */*",
580
- }
581
- data = None if body is None else json.dumps(body, ensure_ascii=False).encode("utf-8")
582
- req = urllib.request.Request(self._build_url(path), data=data, headers=headers, method=method)
583
- context = ssl._create_unverified_context() if self.insecure else None
584
- try:
585
- with urllib.request.urlopen(req, timeout=self.timeout, context=context) as resp:
586
- raw = resp.read().decode("utf-8", "replace")
587
- except urllib.error.HTTPError as err:
588
- raw = err.read().decode("utf-8", "replace")
589
- raise SystemExit(f"HTTP {err.code} {path}: {raw}") from err
590
- except urllib.error.URLError as err:
591
- raise SystemExit(f"Request failed {path}: {err}") from err
592
- payload = json.loads(raw)
593
- if payload.get("code") != 0:
594
- raise SystemExit(f"API error {path}: {raw}")
595
- return payload
596
-
597
- def get_dataset(self, dataset_id: int) -> dict:
598
- return self.request("GET", f"/bpmax/data-set/{dataset_id}")
599
-
600
- def list_datasets(
601
- self,
602
- flow_type: str,
603
- flow_key: str = "",
604
- *,
605
- page: int = 1,
606
- page_size: int = DEFAULT_LIST_PAGE_SIZE,
607
- include_relations: bool = True,
608
- include_progress: bool = True,
609
- is_del: int = 0,
610
- ) -> dict:
611
- payload: Dict[str, Any] = {
612
- "is_del": is_del,
613
- "flow_type": flow_type,
614
- "flow_key": flow_key,
615
- "includeRelations": include_relations,
616
- "includeProgress": include_progress,
617
- }
618
- return self.request("POST", f"/bpmax/data-set/list?page_size={page_size}&page={page}", payload)
556
+ LEGACY_NETWORK_DISABLED_MESSAGE = (
557
+ "Legacy dataset network helpers are disabled in bpmax-cli. Use `bpmax-cli config dataset "
558
+ "export/lint/build/submit/verify` and lifecycle subcommands so capability, dry-run, "
559
+ "confirmation, audit, and baseline checks are enforced."
560
+ )
619
561
 
620
- def create_dataset(self, payload: dict) -> dict:
621
- return self.request("POST", "/bpmax/data-set", payload)
622
562
 
623
- def update_dataset_relation_fields(self, dataset_id: int, payload: dict) -> dict:
624
- return self.request("POST", f"/bpmax/data-set/relationFields/{dataset_id}", payload)
625
-
626
- def get_flow_fields(self, flow_type: str, flow_key: str = "") -> dict:
627
- query = f"/bpmax/data-set-field/getBatchByFlow?flow_type={urllib.parse.quote(flow_type)}"
628
- if flow_key not in ("", None):
629
- query += f"&flow_key={urllib.parse.quote(flow_key)}"
630
- return self.request("GET", query)
631
-
632
- def get_dataset_es_data(self, dataset_id: int) -> dict:
633
- return self.request("GET", f"/bpmax/data-set/esData/{dataset_id}")
563
+ class ApiClient:
564
+ def __init__(self, *_args: Any, **_kwargs: Any) -> None:
565
+ raise SystemExit(LEGACY_NETWORK_DISABLED_MESSAGE)
634
566
 
635
567
 
636
568
  def build_client(args: Any) -> ApiClient:
637
- workspace = getattr(args, "workspace", None)
638
- cookie_header = getattr(args, "cookie_header", None)
639
- if not workspace:
640
- raise SystemExit("--workspace is required")
641
- if not cookie_header:
642
- raise SystemExit("--cookie-header is required")
643
- return ApiClient(
644
- base_url=resolve_base_url(getattr(args, "base_url", None)),
645
- workspace=workspace,
646
- language=getattr(args, "language", None) or DEFAULT_LANGUAGE,
647
- cookie_header=cookie_header,
648
- timeout=float(getattr(args, "timeout", 30)),
649
- insecure=bool(getattr(args, "insecure", False)),
650
- )
569
+ raise SystemExit(LEGACY_NETWORK_DISABLED_MESSAGE)
@@ -1,6 +1,14 @@
1
1
  #!/usr/bin/env python3
2
2
  from __future__ import annotations
3
3
 
4
+ import sys
5
+
6
+ print(
7
+ "Legacy dataset network scripts are disabled in bpmax-cli. Use `bpmax-cli config dataset export` or `bpmax-cli config dataset build` so capability, dry-run, confirmation, audit, and baseline checks are enforced.",
8
+ file=sys.stderr,
9
+ )
10
+ sys.exit(2)
11
+
4
12
  import argparse
5
13
 
6
14
  from dataset_editor_common import (
@@ -27,7 +35,6 @@ def build_parser() -> argparse.ArgumentParser:
27
35
  p.add_argument("--workspace")
28
36
  p.add_argument("--base-url")
29
37
  p.add_argument("--language", default="zhCN")
30
- p.add_argument("--cookie-header")
31
38
  p.add_argument("--timeout", type=float, default=30)
32
39
  p.add_argument("--insecure", action="store_true")
33
40
  p.add_argument("--create-skeleton", action="store_true")
@@ -1,6 +1,14 @@
1
1
  #!/usr/bin/env python3
2
2
  from __future__ import annotations
3
3
 
4
+ import sys
5
+
6
+ print(
7
+ "Legacy dataset network scripts are disabled in bpmax-cli. Use `bpmax-cli config dataset export` or typed readback/resolve commands so capability, dry-run, confirmation, audit, and baseline checks are enforced.",
8
+ file=sys.stderr,
9
+ )
10
+ sys.exit(2)
11
+
4
12
  import argparse
5
13
 
6
14
  from dataset_editor_common import build_client, dump_json, paths_for, resolve_dataset_candidates
@@ -15,7 +23,6 @@ def build_parser() -> argparse.ArgumentParser:
15
23
  p.add_argument("--workspace")
16
24
  p.add_argument("--base-url")
17
25
  p.add_argument("--language", default="zhCN")
18
- p.add_argument("--cookie-header")
19
26
  p.add_argument("--timeout", type=float, default=30)
20
27
  p.add_argument("--insecure", action="store_true")
21
28
  return p
@@ -4,7 +4,7 @@ from __future__ import annotations
4
4
  import sys
5
5
 
6
6
  print(
7
- "Legacy config submit scripts are disabled in bpmax-cli. Use `bpmax-cli config dataset submit` so capability, dry-run, confirmation, audit, and baseline checks are enforced.",
7
+ "Legacy dataset network scripts are disabled in bpmax-cli. Use `bpmax-cli config dataset submit` so capability, dry-run, confirmation, audit, and baseline checks are enforced.",
8
8
  file=sys.stderr,
9
9
  )
10
10
  sys.exit(2)
@@ -33,7 +33,6 @@ def build_parser() -> argparse.ArgumentParser:
33
33
  p.add_argument("--workspace")
34
34
  p.add_argument("--base-url")
35
35
  p.add_argument("--language", default="zhCN")
36
- p.add_argument("--cookie-header")
37
36
  p.add_argument("--timeout", type=float, default=30)
38
37
  p.add_argument("--insecure", action="store_true")
39
38
  p.add_argument(
@@ -1,6 +1,14 @@
1
1
  #!/usr/bin/env python3
2
2
  from __future__ import annotations
3
3
 
4
+ import sys
5
+
6
+ print(
7
+ "Legacy dataset network scripts are disabled in bpmax-cli. Use `bpmax-cli config dataset verify` or `bpmax-cli config readback dataset` so capability, dry-run, confirmation, audit, and baseline checks are enforced.",
8
+ file=sys.stderr,
9
+ )
10
+ sys.exit(2)
11
+
4
12
  import argparse
5
13
 
6
14
  from dataset_editor_common import (
@@ -20,7 +28,6 @@ def build_parser() -> argparse.ArgumentParser:
20
28
  p.add_argument("--workspace")
21
29
  p.add_argument("--base-url")
22
30
  p.add_argument("--language", default="zhCN")
23
- p.add_argument("--cookie-header")
24
31
  p.add_argument("--timeout", type=float, default=30)
25
32
  p.add_argument("--insecure", action="store_true")
26
33
  return p
@@ -1,6 +1,14 @@
1
1
  #!/usr/bin/env python3
2
2
  from __future__ import annotations
3
3
 
4
+ import sys
5
+
6
+ print(
7
+ "Legacy dataset network scripts are disabled in bpmax-cli. Use `bpmax-cli config dataset publish|pause|cancel-refresh|refresh|reindex` and typed readback so capability, dry-run, confirmation, audit, and baseline checks are enforced.",
8
+ file=sys.stderr,
9
+ )
10
+ sys.exit(2)
11
+
4
12
  import argparse
5
13
 
6
14
  from dataset_editor_common import build_client, dump_json, paths_for, summarize_publish_health
@@ -12,7 +20,6 @@ def build_parser() -> argparse.ArgumentParser:
12
20
  p.add_argument("--workspace")
13
21
  p.add_argument("--base-url")
14
22
  p.add_argument("--language", default="zhCN")
15
- p.add_argument("--cookie-header")
16
23
  p.add_argument("--timeout", type=float, default=30)
17
24
  p.add_argument("--insecure", action="store_true")
18
25
  p.add_argument("--with-es-data", action="store_true")
@@ -2,7 +2,6 @@ import sys
2
2
  import tempfile
3
3
  import unittest
4
4
  from pathlib import Path
5
- from unittest import mock
6
5
 
7
6
 
8
7
  SCRIPT_DIR = Path(__file__).resolve().parents[1] / "scripts"
@@ -10,7 +9,6 @@ if str(SCRIPT_DIR) not in sys.path:
10
9
  sys.path.insert(0, str(SCRIPT_DIR))
11
10
 
12
11
  from dataset_editor_common import ( # noqa: E402
13
- ApiClient,
14
12
  build_client,
15
13
  build_create_skeleton,
16
14
  build_dataset_lint_report,
@@ -199,54 +197,22 @@ class DatasetEditorCommonTests(unittest.TestCase):
199
197
  self.assertEqual(verify["checks"]["fields"]["actual"]["count"], 1)
200
198
  self.assertFalse(verify["checks"]["refresh_setting"]["match"])
201
199
 
202
- def test_relation_fields_endpoint_matches_live_editor(self) -> None:
203
- client = ApiClient(
204
- base_url="https://bpmax.example.com",
205
- workspace="store_mgr",
206
- language="zhCN",
207
- cookie_header="token=demo",
208
- timeout=30,
209
- )
210
-
211
- self.assertEqual(
212
- client._build_url("/bpmax/data-set/relationFields/620"),
213
- "https://bpmax.example.com/bpmax/data-set/relationFields/620?$workspace=store_mgr&$language=zhCN",
214
- )
215
-
216
- def test_build_client_uses_environment_base_url(self) -> None:
217
- args = type(
218
- "Args",
219
- (),
220
- {
221
- "base_url": None,
222
- "workspace": "store_mgr",
223
- "language": "zhCN",
224
- "cookie_header": "token=demo",
225
- "timeout": 30,
226
- "insecure": False,
227
- },
228
- )()
229
- with mock.patch.dict(__import__("os").environ, {"BPMAX_BASE_URL": "https://bpmax.example.com/"}, clear=False):
230
- client = build_client(args)
231
- self.assertEqual(client.base_url, "https://bpmax.example.com")
232
-
233
- def test_build_client_requires_runtime_origin_when_not_explicitly_configured(self) -> None:
200
+ def test_legacy_network_client_is_disabled(self) -> None:
234
201
  args = type(
235
202
  "Args",
236
203
  (),
237
204
  {
238
- "base_url": None,
205
+ "base_url": "https://bpmax.example.com",
239
206
  "workspace": "store_mgr",
240
207
  "language": "zhCN",
241
- "cookie_header": "token=demo",
242
208
  "timeout": 30,
243
209
  "insecure": False,
244
210
  },
245
211
  )()
246
- with mock.patch.dict(__import__("os").environ, {}, clear=True):
247
- with self.assertRaises(SystemExit) as ctx:
248
- build_client(args)
249
- self.assertIn("BPMAX_BASE_URL", str(ctx.exception))
212
+ with self.assertRaises(SystemExit) as ctx:
213
+ build_client(args)
214
+ self.assertIn("Legacy dataset network helpers are disabled", str(ctx.exception))
215
+ self.assertIn("bpmax-cli config dataset export/lint/build/submit/verify", str(ctx.exception))
250
216
 
251
217
  def test_basic_table_audit_flags_project_vs_think_project(self) -> None:
252
218
  audit = summarize_basic_table_audit(
@@ -29,19 +29,26 @@ description: "用于按 BPMAX 完整流程配置需求先调研、再出计划
29
29
 
30
30
  ## 核心原则
31
31
  - 这是编排型 skill,不重复实现各子 skill 的具体执行细节;它负责调研、计划、编排顺序、停机条件和结果闭环。
32
+ - 搭建前必须同时使用 [$bpmax-functional-test-design](../bpmax-functional-test-design/SKILL.md) 和 [$bpmax-ui-ux-audit](../bpmax-ui-ux-audit/SKILL.md) 思考主路径、分支、边界、状态、角色、表单信息架构、动作文案、错误恢复、状态反馈、可访问性和跨页一致性;把结论写入计划、任务书和各配置面的 typed config lint 检查项。
33
+ - 所有确认的体验问题都属于 `BUG`,设计期发现也不得降级为建议。配置 lint 通过不等于 UX/E2E 通过;配置完成后仍必须按双 skill 用例执行真实页面并通过 `bpmax-cli test-suite lint-report`。
32
34
  - 默认先进入计划模式;如果当前环境不能自动切换到计划模式,必须明确要求用户手动切换到计划模式,然后再继续。
33
35
  - 不直接开始执行。先把流程需求讲清楚,再把本次要做的配置面讲清楚,再看是否还缺高影响信息。
34
- - 浏览器实时页面、实时接口返回、当前页面真实请求骨架优先级高于本地 `think_*` 配置镜像;本地仓库只作为候选检索和结构参考。
35
- - 每完成一个配置面,默认先做该页面的浏览器侧回读验收,再进入下一面;不要把上一步的陈旧草稿或本地镜像误当成当前线上事实继续往下串。
36
+ - typed CLI 线上回读、实时接口返回和只读页面验收优先级高于本地 `think_*` 配置镜像;本地仓库只作为候选检索和结构参考。
37
+ - 每完成一个配置面,默认先做 typed CLI verify/readback 和只读页面验收,再进入下一面;不要把上一步的陈旧草稿或本地镜像误当成当前线上事实继续往下串。
38
+ - 每个配置面在 build 前必须运行对应的 `bpmax-cli config <domain> impact --raw <raw> --work <work>`。编排器负责把 `references_found` 转成后续配置任务,把高风险 `required_collateral_candidates` 停在用户确认点,并把 `recommended_next_steps` 与 `unverified_surfaces` 带入后续页面验收和 E2E;不得让单域 Skill verify 通过后直接结束整条链路。
36
39
  - 新建主流程时必须通过 typed CLI 让平台创建流程壳,拿到 `flow<number>` 格式的真实 `flow_type` 后再继续配置;不得把业务名、测试 marker 或语义 key 拼成 `flow_type`。语义标识只能放在 `testMarker`、配置备注、测试 profile 或 metadata 中。
40
+ - flow work 顶层 `category` 必须从当前 profile 回读的有效 flow category key 中选择;不得把“采购”等业务语义直接翻译成 `procurement`。`flow-template lint/build/create/submit` 的 `$.category` 引用门禁未通过时停止。
37
41
  - “没有相关流程,需要创建新表单、新流程并绑定到工作区”时,默认首选端到端 typed 命令:
38
42
 
39
43
  ```bash
44
+ bpmax-cli config flow-app lint --workspace <workspace> --form-work <form-work-file> --flow-work <flow-work-file> --name <name> --format json
40
45
  bpmax-cli config flow-app create --workspace <workspace> --form-work <form-work-file> --flow-work <flow-work-file> --name <name>
41
46
  bpmax-cli config flow-app create --workspace <workspace> --form-work <form-work-file> --flow-work <flow-work-file> --name <name> --confirm "create flow-app <name> in <workspace>" --evidence-out .codex/tmp/target-context.csv --response-out .codex/tmp/flow-app-create.response.json
42
47
  ```
43
48
 
49
+ - `flow-app lint` 是新建应用的聚合前置 gate;需要单独校验 pre-create flow work 时,使用 `config flow-template lint --mode create`,此时 `flow_type` 仍由平台分配,不得伪造。
44
50
  - `flow-app create` 的 dry-run 必须展示完整 operation plan:创建表单、发布表单、创建流程壳、绑定 `data.meta.form_template=<published_id>`、保存/发布流程、绑定工作区、回读验证。缺任何关键步骤都不得确认执行。
51
+ - dry-run 中 `operation_plan.save_flow_draft.payload_summary.data.meta.form_template` 必须显示 `<published-form-id>`,否则不能确认执行。
45
52
  - 确认文本不得猜:dry-run JSON 必须包含 `required_confirm`,真实执行时直接复制该值;若确认文本不匹配,必须视为失败,不得把 dry-run JSON 当成功结果。
46
53
  - 确认执行必须同时保留 `--response-out` 和 `--evidence-out`:前者保存完整响应、created IDs 和恢复上下文,后者保存给后续配置面复用的 target context。不得只保留 shell 重定向输出。
47
54
  - 新建或迁移流程进入 dataset/list/filter/nav 任一后续阶段前,必须先取得 target context evidence:
@@ -63,6 +70,8 @@ bpmax-cli config batch readback --manifest .codex/tmp/config-readback-batch.json
63
70
  - batch manifest 每行必须保留 `domain`、`id`、`payload`(submit 时)、`confirm` 和 `response_out`;失败项要进入最终 summary,不能因为一条失败丢失前面成功项和剩余待处理项。
64
71
  - `target_context.evidence_status` 必须是 `verified`,且 `missing_context` 必须为空;否则停止在 target context 修复阶段,不得继续生成 dataset、列表、导航或 E2E 任务。
65
72
  - `target-context.csv/json` 是后续迁移 apply-ready evidence:至少包含 `flow_type`、`flow_template_id`、`form_template_id`、`form_template_draft_id`、`workspace_key`、`workspace_readback_hash`。不得让 subagent 重新猜这些 ID。
73
+ - 蓝图或任务书出现“创建/发起/触发子流程”时,必须在父流程 IR 和 work 中生成 `bpmax_lint.expected_child_flows`,把自动化编译到触发节点的 `auto_trigger_flows.flows`;纯自动化不得另建人工业务节点。取得真实子流程 target context 后回填精确 `flow` 引用、`create_rule` 字段映射与 `create_again`、`manual_end`、`all_finish_action`、`fail_action` 策略,在父流程重新 lint/build/submit/verify 前不得标记完成。
74
+ - 单子流程或并行子流程的最终 E2E 必须新建父项目并推进到触发节点,证明运行态自动创建子项目的数量、父子关联、字段继承与汇合结果;仅主子流程分别发布、列表可见或备注“待联动配置”均不得标记完成。
66
75
  - `flow-app create` 的 flow work 必须预置表单驱动发起默认基线:隐藏 `project.name` / `project.brief` / `project.plan_end_time`,启用 `meta.use_template_project_name = true`,并提供非空 `meta.project_name_template`。这是 typed CLI 写入前 gate,不是可选建议。
67
76
  - 工作区绑定必须走 `PUT /workspace/workspace_flow` typed adapter,并在 `/workspace/by_key?key=<workspace>` 回读中确认新 `(flow_type, flow_key)` 存在。回读失败时不能宣布创建成功。
68
77
  - 若用户选择“完整流程配置”,默认依次评估:
@@ -173,8 +182,10 @@ bpmax-cli taskbook lint-prompt --prompt-source .codex/tmp/TASK_PROMPT.md
173
182
  - 哪些子 skill 会被调用
174
183
  - 是否需要 `bpmax-ai-taskbook`,以及任务书 lint、prompt lint、进度 CSV 的路径
175
184
  - 哪些页面必须先在浏览器中打开
176
- - 哪些地方以浏览器实时配置为准
185
+ - 哪些地方以 typed CLI 线上回读和只读页面验收为准
177
186
  - 新建场景使用哪个 typed create 命令、确认文本是什么、失败后停止在哪一步
187
+ - `bpmax-functional-test-design` 生成的主/备/异常/边界/状态/角色覆盖,以及 `bpmax-ui-ux-audit` 生成的界面体验 lint 清单
188
+ - 每个配置面的 typed config lint 如何吸收上述两份清单,最终如何进入双 skill E2E 和 `test-suite lint-report`
178
189
 
179
190
  ### 6. 计划后的执行编排
180
191
  - 用户切出计划模式并要求继续后,由同一个 skill 按计划推进。
@@ -190,6 +201,8 @@ bpmax-cli taskbook lint-prompt --prompt-source .codex/tmp/TASK_PROMPT.md
190
201
  - 最新配置同步:[$bpmax-config-latest](../bpmax-config-latest/SKILL.md)
191
202
  - AI 任务书:[$bpmax-ai-taskbook](../bpmax-ai-taskbook/SKILL.md)
192
203
  - 运行态验收:[$bpmax-e2e-flow-test-operator](../bpmax-e2e-flow-test-operator/SKILL.md)
204
+ - 功能用例设计:[$bpmax-functional-test-design](../bpmax-functional-test-design/SKILL.md)
205
+ - UI/UX 审计:[$bpmax-ui-ux-audit](../bpmax-ui-ux-audit/SKILL.md)
193
206
  - 若流程或表单需求依赖控件能力判断,先用 [$form-control-library](../form-control-library/SKILL.md)。
194
207
  - 若某一步要求浏览器已打开特定页面,而当前页面不对,必须先让用户打开到正确页面,不要盲目继续。
195
208
  - `flow-app create` 完成后,必须再执行工作区视角的只读验证:
@@ -197,6 +210,7 @@ bpmax-cli taskbook lint-prompt --prompt-source .codex/tmp/TASK_PROMPT.md
197
210
  - `bpmax-cli flow list --workspace <workspace> --format json`
198
211
  - 结果中应能看到新建流程
199
212
  - 打开目标工作区创建页确认表单加载
213
+ - 如果 `project_after_create_path` 跳到 `/project?flow_type=...`,创建真实项目后必须验证列表页能发现该项目;若列表显示空但 `project get` 能读到项目,不得宣称“完整入口/列表可用”,应回到列表、数据集或默认模板配置修复。
200
214
  - 浏览器中表单如果打不开、空白或创建页报错,必须优先检查 Console 和 Network;如果错误指向 `form_template`、控件脚本、字段 schema 或表单模板发布态 ID,优先回到表单模板修复,不要先改流程或导航。
201
215
  - 阶段性完成或被打断时,写一条 `session_state`,保证下轮能从当前编排状态继续。
202
216
 
@@ -220,7 +234,7 @@ bpmax-cli taskbook lint-prompt --prompt-source .codex/tmp/TASK_PROMPT.md
220
234
  - 在执行阶段,优先告诉用户:
221
235
  - 当前正在做哪个配置面
222
236
  - 当前调用的是哪个子 skill
223
- - 当前依据的是浏览器实时配置还是本地候选配置
237
+ - 当前依据的是 typed CLI 线上回读还是本地候选配置
224
238
  - 若停下,具体停在哪一步、为什么停
225
239
 
226
240
  ## 参考资料
@@ -1,4 +1,4 @@
1
1
  interface:
2
2
  display_name: "BPMAX E2E Flow Config Orchestrator"
3
- short_description: "先调研、出计划,再编排执行 BPMAX 完整流程配置"
4
- default_prompt: "使用 $bpmax-e2e-flow-config-orchestrator 先进入计划阶段,把 BPMAX 流程需求和配置范围调研清楚,生成执行计划后再按计划完成整套流程配置。"
3
+ short_description: "用功能与 UX 双门禁编排 BPMAX 完整流程配置"
4
+ default_prompt: "使用 $bpmax-e2e-flow-config-orchestrator 先调研和计划,并用 bpmax-functional-test-design、bpmax-ui-ux-audit 形成设计与 lint 门禁后完成整套流程配置。"
@@ -3,15 +3,17 @@
3
3
  ## 默认编排顺序
4
4
  - 完整流程配置:
5
5
  1. `bpmax-config-latest` -> `bpmax-cli config latest pull <env>`
6
- 2. `bpmax-flow-template-editor`
7
- 3. `bpmax-form-template-editor`
8
- 4. `bpmax-dataset-field-template-editor`
9
- 5. `bpmax-dataset-template-editor`
10
- 6. `bpmax-list-template-editor`
11
- 7. `bpmax-filter-template-editor`
12
- 8. `bpmax-nav-config-editor`
13
- 9. `bpmax-e2e-flow-test-operator` -> 真实浏览器运行态验收
14
- 10. `bpmax-config-latest` -> `bpmax-cli config latest pull <env>`
6
+ 2. 设计期双 skill gate:`bpmax-functional-test-design` + `bpmax-ui-ux-audit`,形成测试覆盖和界面体验 lint 清单
7
+ 3. `bpmax-flow-template-editor`
8
+ 4. `bpmax-form-template-editor`
9
+ 5. `bpmax-dataset-field-template-editor`
10
+ 6. `bpmax-dataset-template-editor`
11
+ 7. `bpmax-list-template-editor`
12
+ 8. `bpmax-filter-template-editor`
13
+ 9. `bpmax-nav-config-editor`
14
+ 10. `bpmax-e2e-flow-test-operator` -> 按双 skill 做真实浏览器运行态验收
15
+ 11. 交付期 lint-report gate:`bpmax-cli test-suite lint-report --root .ai_test/report/<run> --format json`
16
+ 12. `bpmax-config-latest` -> `bpmax-cli config latest pull <env>`
15
17
 
16
18
  ## 范围到 skill 的映射
17
19
  - 流程模板:`bpmax-flow-template-editor`
@@ -22,6 +24,8 @@
22
24
  - 筛选器模板:`bpmax-filter-template-editor`
23
25
  - 导航配置:`bpmax-nav-config-editor`
24
26
  - 运行态验收:`bpmax-e2e-flow-test-operator`
27
+ - 功能测试设计:`bpmax-functional-test-design`
28
+ - UI/UX BUG 审计:`bpmax-ui-ux-audit`
25
29
  - 控件判断:`form-control-library`
26
30
  - 环境同步:`bpmax-config-latest` -> `bpmax-cli config latest pull <env>`
27
31