bpmax-cli 0.2.1-beta.2 → 0.2.1-beta.21

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 (107) hide show
  1. package/README.md +28 -1
  2. package/dist/bin.js +2303 -141
  3. package/dist/bin.js.map +1 -1
  4. package/package.json +1 -1
  5. package/skills/bpmax-ai-taskbook/SKILL.md +4 -1
  6. package/skills/bpmax-api-platform-editor/SKILL.md +24 -31
  7. package/skills/bpmax-api-platform-editor/agents/openai.yaml +2 -2
  8. package/skills/bpmax-api-platform-editor/references/platform-api-map.md +2 -2
  9. package/skills/bpmax-api-platform-editor/references/runtime-workflow.md +3 -3
  10. package/skills/bpmax-blueprint-doc-workflow/SKILL.md +87 -0
  11. package/skills/bpmax-blueprint-doc-workflow/agents/openai.yaml +4 -0
  12. package/skills/bpmax-blueprint-doc-workflow/references/blueprint-structure.md +60 -0
  13. package/skills/bpmax-blueprint-doc-workflow/references/per-flow-required-structure.md +98 -0
  14. package/skills/bpmax-blueprint-doc-workflow/references/sample-forbidden-term.xml +12 -0
  15. package/skills/bpmax-blueprint-doc-workflow/references/sample-mermaid-codeblock.xml +12 -0
  16. package/skills/bpmax-blueprint-doc-workflow/references/sample-missing-boundary.xml +10 -0
  17. package/skills/bpmax-blueprint-doc-workflow/references/sample-missing-whiteboard.xml +10 -0
  18. package/skills/bpmax-blueprint-doc-workflow/references/sample-pass.xml +55 -0
  19. package/skills/bpmax-blueprint-doc-workflow/scripts/lint_blueprint_doc.py +257 -0
  20. package/skills/bpmax-builder-shared/template_script_hard_rules.py +3 -1
  21. package/skills/bpmax-builder-shared/tests/test_template_script_hard_rules.py +16 -0
  22. package/skills/bpmax-cli/SKILL.md +30 -0
  23. package/skills/bpmax-console-template-editor/SKILL.md +109 -523
  24. package/skills/bpmax-console-template-editor/agents/openai.yaml +2 -2
  25. package/skills/bpmax-console-template-editor/references/full-detail-guide.md +45 -0
  26. package/skills/bpmax-console-template-editor/references/local-temp-workflow.md +13 -12
  27. package/skills/bpmax-console-template-editor/scripts/console_template_editor_common.py +65 -78
  28. package/skills/bpmax-console-template-editor/tests/test_console_template_editor.py +86 -30
  29. package/skills/bpmax-dataset-field-template-editor/SKILL.md +124 -594
  30. package/skills/bpmax-dataset-field-template-editor/references/full-detail-guide.md +570 -0
  31. package/skills/bpmax-dataset-field-template-editor/references/runtime-verified-field-page-shape.md +1 -1
  32. package/skills/bpmax-dataset-field-template-editor/scripts/dataset_field_editor_common.py +11 -77
  33. package/skills/bpmax-dataset-field-template-editor/scripts/export_dataset_field.py +4 -57
  34. package/skills/bpmax-dataset-field-template-editor/scripts/init_create_dataset_field.py +2 -0
  35. package/skills/bpmax-dataset-field-template-editor/scripts/inspect_dataset_field_runtime.py +4 -78
  36. package/skills/bpmax-dataset-field-template-editor/scripts/submit_dataset_field.py +3 -89
  37. package/skills/bpmax-dataset-field-template-editor/tests/test_dataset_field_editor.py +14 -0
  38. package/skills/bpmax-dataset-field-template-editor/tests/test_init_create_dataset_field.py +2 -0
  39. package/skills/bpmax-dataset-template-editor/SKILL.md +112 -768
  40. package/skills/bpmax-dataset-template-editor/references/full-detail-guide.md +753 -0
  41. package/skills/bpmax-dataset-template-editor/references/ui-to-backend-field-map.md +1 -0
  42. package/skills/bpmax-dataset-template-editor/references/work-file-to-submit-mapping.md +2 -2
  43. package/skills/bpmax-dataset-template-editor/scripts/basic_table_audit.py +8 -1
  44. package/skills/bpmax-dataset-template-editor/scripts/dataset_editor_common.py +9 -90
  45. package/skills/bpmax-dataset-template-editor/scripts/export_dataset.py +8 -1
  46. package/skills/bpmax-dataset-template-editor/scripts/resolve_dataset.py +8 -1
  47. package/skills/bpmax-dataset-template-editor/scripts/submit_dataset.py +1 -2
  48. package/skills/bpmax-dataset-template-editor/scripts/verify_dataset_list.py +8 -1
  49. package/skills/bpmax-dataset-template-editor/scripts/verify_publish_health.py +8 -1
  50. package/skills/bpmax-dataset-template-editor/tests/test_dataset_editor.py +6 -40
  51. package/skills/bpmax-e2e-flow-config-orchestrator/SKILL.md +18 -4
  52. package/skills/bpmax-e2e-flow-test-operator/SKILL.md +112 -533
  53. package/skills/bpmax-e2e-flow-test-operator/references/ai-test-suite.md +43 -4
  54. package/skills/bpmax-e2e-flow-test-operator/references/browser-only-checkpoints.md +6 -5
  55. package/skills/bpmax-e2e-flow-test-operator/references/full-detail-guide.md +563 -0
  56. package/skills/bpmax-e2e-flow-test-operator/references/negative-sale-api-matrix.md +4 -4
  57. package/skills/bpmax-e2e-flow-test-operator/references/profile-schema.md +1 -1
  58. package/skills/bpmax-e2e-flow-test-operator/references/state-schema.md +3 -1
  59. package/skills/bpmax-e2e-flow-test-operator/scripts/e2e_doc.py +7 -5
  60. package/skills/bpmax-e2e-flow-test-operator/scripts/e2e_state.py +2 -2
  61. package/skills/bpmax-e2e-flow-test-operator/scripts/flow_runner.py +5 -1
  62. package/skills/bpmax-e2e-flow-test-operator/tests/test_negative_sale_api_tools.py +71 -0
  63. package/skills/bpmax-filter-template-editor/SKILL.md +110 -551
  64. package/skills/bpmax-filter-template-editor/references/experience-coverage-matrix.md +18 -18
  65. package/skills/bpmax-filter-template-editor/references/filter-request-shape.md +29 -26
  66. package/skills/bpmax-filter-template-editor/references/full-detail-guide.md +56 -0
  67. package/skills/bpmax-filter-template-editor/references/runtime-verified-filter-page-shape.md +10 -9
  68. package/skills/bpmax-filter-template-editor/scripts/filter_template_editor_common.py +7 -57
  69. package/skills/bpmax-filter-template-editor/tests/test_filter_template_editor.py +4 -48
  70. package/skills/bpmax-flow-template-editor/SKILL.md +109 -1084
  71. package/skills/bpmax-flow-template-editor/agents/openai.yaml +2 -2
  72. package/skills/bpmax-flow-template-editor/references/diff-strategy.md +3 -3
  73. package/skills/bpmax-flow-template-editor/references/editor-runtime-vs-draft.md +9 -9
  74. package/skills/bpmax-flow-template-editor/references/full-detail-guide.md +1155 -0
  75. package/skills/bpmax-flow-template-editor/references/local-temp-workflow.md +1 -1
  76. package/skills/bpmax-flow-template-editor/references/requirement-to-node-mapping.md +3 -3
  77. package/skills/bpmax-flow-template-editor/references/runtime-verified-flow-detail-shape.md +7 -7
  78. package/skills/bpmax-flow-template-editor/references/runtime-verified-meta-fields.md +2 -2
  79. package/skills/bpmax-flow-template-editor/references/runtime-verified-node-fields.md +2 -2
  80. package/skills/bpmax-flow-template-editor/references/save-draft-request-shape.md +7 -23
  81. package/skills/bpmax-flow-template-editor/references/work-file-to-submit-mapping.md +1 -1
  82. package/skills/bpmax-flow-template-editor/tests/test_flow_template_editor.py +19 -75
  83. package/skills/bpmax-form-template-editor/SKILL.md +111 -1104
  84. package/skills/bpmax-form-template-editor/agents/openai.yaml +2 -2
  85. package/skills/bpmax-form-template-editor/references/form-template-api-workflow.md +51 -51
  86. package/skills/bpmax-form-template-editor/references/full-detail-guide.md +1108 -0
  87. package/skills/bpmax-form-template-editor/references/local-temp-workflow.md +4 -4
  88. package/skills/bpmax-form-template-editor/references/payload-checklist.md +1 -1
  89. package/skills/bpmax-form-template-editor/scripts/form_template_editor_common.py +8 -0
  90. package/skills/bpmax-form-template-editor/tests/test_form_template_editor.py +42 -19
  91. package/skills/bpmax-list-template-editor/SKILL.md +110 -466
  92. package/skills/bpmax-list-template-editor/agents/openai.yaml +2 -2
  93. package/skills/bpmax-list-template-editor/references/full-detail-guide.md +454 -0
  94. package/skills/bpmax-list-template-editor/references/list-template-api-workflow.md +6 -9
  95. package/skills/bpmax-list-template-editor/references/local-temp-workflow.md +1 -1
  96. package/skills/bpmax-list-template-editor/scripts/list_template_editor_common.py +9 -78
  97. package/skills/bpmax-nav-config-editor/SKILL.md +13 -17
  98. package/skills/bpmax-nav-config-editor/agents/openai.yaml +2 -2
  99. package/skills/bpmax-nav-config-editor/references/api-workflow.md +2 -2
  100. package/skills/bpmax-nav-config-editor/references/runtime-probing.md +11 -12
  101. package/skills/bpmax-plugin-config/SKILL.md +4 -0
  102. package/skills/bpmax-project/SKILL.md +1 -0
  103. package/skills/bpmax-project-detail-template-editor/SKILL.md +11 -33
  104. package/skills/bpmax-project-detail-template-editor/agents/openai.yaml +2 -2
  105. package/skills/bpmax-role-editor/SKILL.md +7 -30
  106. package/skills/bpmax-user-mock-operator/SKILL.md +1 -1
  107. package/skills/bpmax-user-mock-operator/agents/openai.yaml +2 -2
@@ -1,4 +1,4 @@
1
1
  interface:
2
2
  display_name: "BPMAX Form Template Editor"
3
- short_description: "在浏览器里创建或编辑 BPMAX 表单模板"
4
- default_prompt: "使用 $bpmax-form-template-editor 根据当前浏览器页和需求创建或编辑 BPMAX 表单模板。"
3
+ short_description: "通过 bpmax-cli typed config 创建或编辑 BPMAX 表单模板"
4
+ default_prompt: "使用 $bpmax-form-template-editor 通过 bpmax-cli typed config 创建或编辑 BPMAX 表单模板,并用回读验证确认结果。"
@@ -5,14 +5,9 @@
5
5
  - 编辑页:`/w:<workspace>/form_template/<id>`
6
6
 
7
7
  ## 鉴权与执行环境
8
- - 浏览器用于确认登录态、提取 Cookie / 请求头、最终刷新编辑页
9
- - 正式提交必须由 `bpmax-cli config form-template submit` typed adapter 完成;下面的旧脚本命令只用于理解历史临时文件结构,不得用于真实远端写入
10
- - 推荐环境变量:
11
-
12
- ```bash
13
- export BPMAX_COOKIE_HEADER='foo=bar; baz=qux'
14
- export BPMAX_WORKSPACE='store_mgr'
15
- ```
8
+ - 浏览器只用于确认登录态、只读探测和最终刷新编辑页。
9
+ - 正式导出、lint、build、submit、verify 必须由 `bpmax-cli config form-template ...` typed adapter 完成。
10
+ - 旧 Python helper 只作为仓库内历史实现参考,不是本 skill 的执行路径。
16
11
 
17
12
  ## 真实线上详情口径
18
13
  - 开发前必须先调用:
@@ -38,83 +33,88 @@ export BPMAX_WORKSPACE='store_mgr'
38
33
  ### 编辑已有模板
39
34
 
40
35
  ```bash
41
- PYTHON_BIN=./venv/bin/python
42
- [[ -x "$PYTHON_BIN" ]] || PYTHON_BIN=./.venv/bin/python
43
- [[ -x "$PYTHON_BIN" ]] || PYTHON_BIN=python
44
-
45
- "$PYTHON_BIN" .codex/skills/bpmax-form-template-editor/scripts/export_form_template.py \
46
- --template-id 990702153 \
47
- --workspace store_mgr \
48
- --cookie-header "$BPMAX_COOKIE_HEADER"
36
+ bpmax-cli config form-template export \
37
+ --id <draft_id> \
38
+ --work-format structured \
39
+ --out .codex/tmp/form-template-editor \
40
+ --profile <profile> \
41
+ --format json
49
42
  ```
50
43
 
51
44
  ### 基于线上样例创建 skeleton
52
45
 
53
46
  ```bash
54
- "$PYTHON_BIN" .codex/skills/bpmax-form-template-editor/scripts/export_form_template.py \
55
- --create-skeleton \
56
- --sample-template-id 990702153 \
57
- --workspace store_mgr \
58
- --cookie-header "$BPMAX_COOKIE_HEADER"
47
+ bpmax-cli config form-template export \
48
+ --id <sample_template_id> \
49
+ --work-format structured \
50
+ --out .codex/tmp/form-template-editor \
51
+ --profile <profile> \
52
+ --format json
59
53
  ```
60
54
 
61
- ### 第一次确认
62
-
63
- ```bash
64
- "$PYTHON_BIN" .codex/skills/bpmax-form-template-editor/scripts/confirm_form_template.py \
65
- --stem 990702153 \
66
- --stage work \
67
- --actor codex \
68
- --minimal-form-mode minimal \
69
- --detail-entry-mode single \
70
- --long-term-control unknown \
71
- --layout-reviewed
72
- ```
55
+ ### lint 与第一次确认
73
56
 
74
- ### 构建最终提交体
57
+ 先修改 `work/<file>.json`,再运行 typed lint,展示 `work diff` 并等待用户确认。
75
58
 
76
59
  ```bash
77
- "$PYTHON_BIN" .codex/skills/bpmax-form-template-editor/scripts/build_submit_payload.py \
78
- --stem 990702153
60
+ bpmax-cli config form-template lint \
61
+ --work .codex/tmp/form-template-editor/work/<file>.json \
62
+ --profile <profile> \
63
+ --format json
79
64
  ```
80
65
 
81
- ### 语义 lint
66
+ ### 构建最终提交体
82
67
 
83
68
  ```bash
84
- "$PYTHON_BIN" .codex/skills/bpmax-form-template-editor/scripts/lint_form_template_semantics.py \
85
- --stem 990702153
69
+ bpmax-cli config form-template build \
70
+ --work .codex/tmp/form-template-editor/work/<file>.json \
71
+ --meta .codex/tmp/form-template-editor/meta/<file>.meta.json \
72
+ --out .codex/tmp/form-template-editor/submit/<file>.json \
73
+ --profile <profile> \
74
+ --format json
86
75
  ```
87
76
 
88
77
  ### 第二次确认
89
78
 
90
- ```bash
91
- "$PYTHON_BIN" .codex/skills/bpmax-form-template-editor/scripts/confirm_form_template.py \
92
- --stem 990702153 \
93
- --stage submit \
94
- --actor codex
95
- ```
79
+ 展示 `submit/<file>.json` 与 submit diff;如果 submit diff 超出已确认 work diff,必须重新解释并确认。
96
80
 
97
81
  ### 提交与回读
98
82
 
99
83
  ```bash
100
- bpmax-cli config form-template submit --id 990702153 --payload .codex/tmp/form-template-editor/submit/form-template-990702153.json
101
- bpmax-cli config form-template submit --id 990702153 --payload .codex/tmp/form-template-editor/submit/form-template-990702153.json --confirm "submit form-template 990702153"
84
+ bpmax-cli config form-template submit \
85
+ --id <draft_id> \
86
+ --payload .codex/tmp/form-template-editor/submit/<file>.json \
87
+ --profile <profile> \
88
+ --format json
89
+ bpmax-cli config form-template submit \
90
+ --id <draft_id> \
91
+ --payload .codex/tmp/form-template-editor/submit/<file>.json \
92
+ --profile <profile> \
93
+ --confirm "submit form-template <draft_id>" \
94
+ --format json
95
+ bpmax-cli config form-template verify \
96
+ --id <draft_id> \
97
+ --expect .codex/tmp/form-template-editor/work/<file>.json \
98
+ --profile <profile> \
99
+ --format json
102
100
  ```
103
101
 
104
102
  ## 正式接口
105
103
  ### 编辑
106
104
  - `PUT /api/form_template/:id?$workspace=<workspace>&$language=zhCN`
107
105
  - `POST /api/form_template/publish?$workspace=<workspace>&$language=zhCN`
106
+ - 这些是 typed adapter 背后的平台接口,不是 Agent 直接调用入口。
108
107
 
109
108
  ### 新建
110
109
  - `POST /api/form_template?$workspace=<workspace>&$language=zhCN`
111
110
  - `POST /api/form_template/publish?$workspace=<workspace>&$language=zhCN`
111
+ - 这些是 typed adapter 背后的平台接口,不是 Agent 直接调用入口。
112
112
  - typed CLI 口径:
113
113
 
114
114
  ```bash
115
- bpmax-cli config form-template build --work .codex/tmp/form-template-editor/work/<create-file>.json --meta .codex/tmp/form-template-editor/meta/<create-file>.meta.json --out .codex/tmp/form-template-editor/submit/<create-file>.json
116
- bpmax-cli config form-template submit --id create --payload .codex/tmp/form-template-editor/submit/<create-file>.json
117
- bpmax-cli config form-template submit --id create --payload .codex/tmp/form-template-editor/submit/<create-file>.json --confirm "submit form-template create"
115
+ bpmax-cli config form-template build --work .codex/tmp/form-template-editor/work/<create-file>.json --meta .codex/tmp/form-template-editor/meta/<create-file>.meta.json --out .codex/tmp/form-template-editor/submit/<create-file>.json --profile <profile> --format json
116
+ bpmax-cli config form-template submit --id create --payload .codex/tmp/form-template-editor/submit/<create-file>.json --profile <profile> --format json
117
+ bpmax-cli config form-template submit --id create --payload .codex/tmp/form-template-editor/submit/<create-file>.json --profile <profile> --confirm "submit form-template create" --format json
118
118
  ```
119
119
 
120
120
  ### 发布请求体
@@ -126,7 +126,7 @@ bpmax-cli config form-template submit --id create --payload .codex/tmp/form-temp
126
126
  ```
127
127
 
128
128
  ## 提交体结构
129
- 脚本最终生成的 `submit/<stem>.json` 只保留:
129
+ typed CLI build 最终生成的 `submit/<stem>.json` 只保留:
130
130
 
131
131
  ```json
132
132
  {