bpmax-cli 0.1.44 → 0.2.1-beta.2

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 (266) hide show
  1. package/README.md +52 -5
  2. package/dist/bin.js +12304 -1315
  3. package/dist/bin.js.map +1 -1
  4. package/package.json +1 -1
  5. package/scripts/install-skills.mjs +98 -0
  6. package/skills/bpmax-ai-taskbook/SKILL.md +227 -0
  7. package/skills/bpmax-ai-taskbook/agents/openai.yaml +3 -0
  8. package/skills/bpmax-ai-taskbook/references/taskbook-template.md +68 -0
  9. package/skills/bpmax-api-platform-editor/SKILL.md +321 -0
  10. package/skills/bpmax-api-platform-editor/agents/openai.yaml +4 -0
  11. package/skills/bpmax-api-platform-editor/references/api-doc-debug-workflow.md +34 -0
  12. package/skills/bpmax-api-platform-editor/references/api-proxy-shape.md +41 -0
  13. package/skills/bpmax-api-platform-editor/references/instance-config-shape.md +41 -0
  14. package/skills/bpmax-api-platform-editor/references/platform-api-map.md +52 -0
  15. package/skills/bpmax-api-platform-editor/references/runtime-workflow.md +32 -0
  16. package/skills/bpmax-api-platform-editor/scripts/api_platform_editor_common.py +1276 -0
  17. package/skills/bpmax-api-platform-editor/scripts/build_submit_payload.py +64 -0
  18. package/skills/bpmax-api-platform-editor/scripts/capture_write_contract.py +40 -0
  19. package/skills/bpmax-api-platform-editor/scripts/export_layer_bundle.py +212 -0
  20. package/skills/bpmax-api-platform-editor/scripts/record_doc_debug_acceptance.py +62 -0
  21. package/skills/bpmax-api-platform-editor/scripts/submit_and_verify_layer.py +75 -0
  22. package/skills/bpmax-api-platform-editor/tests/test_api_platform_editor.py +287 -0
  23. package/skills/bpmax-approval-matrix/SKILL.md +90 -0
  24. package/skills/bpmax-auth/SKILL.md +6 -17
  25. package/skills/bpmax-builder-shared/SKILL.md +44 -0
  26. package/skills/bpmax-builder-shared/base_url.py +81 -0
  27. package/skills/bpmax-builder-shared/runtime-script-site-matrix.json +71 -0
  28. package/skills/bpmax-builder-shared/runtime-script-site-matrix.md +34 -0
  29. package/skills/bpmax-builder-shared/runtime-script-template-catalog.md +123 -0
  30. package/skills/bpmax-builder-shared/runtime_script_rules.py +272 -0
  31. package/skills/bpmax-builder-shared/skill_audit.py +374 -0
  32. package/skills/bpmax-builder-shared/template_script_hard_rules.py +280 -0
  33. package/skills/bpmax-builder-shared/tests/test_base_url.py +80 -0
  34. package/skills/bpmax-builder-shared/tests/test_runtime_script_rules.py +115 -0
  35. package/skills/bpmax-builder-shared/tests/test_skill_audit.py +231 -0
  36. package/skills/bpmax-builder-shared/tests/test_template_script_hard_rules.py +281 -0
  37. package/skills/bpmax-cli/SKILL.md +5 -0
  38. package/skills/bpmax-config-latest/SKILL.md +71 -0
  39. package/skills/bpmax-console-template-editor/SKILL.md +536 -0
  40. package/skills/bpmax-console-template-editor/agents/openai.yaml +4 -0
  41. package/skills/bpmax-console-template-editor/references/filter-integration.md +60 -0
  42. package/skills/bpmax-console-template-editor/references/lessons-from-resume-dashboard.md +114 -0
  43. package/skills/bpmax-console-template-editor/references/local-temp-workflow.md +69 -0
  44. package/skills/bpmax-console-template-editor/references/module-catalog.md +100 -0
  45. package/skills/bpmax-console-template-editor/references/runtime-page-shape.md +91 -0
  46. package/skills/bpmax-console-template-editor/references/template-shape.md +149 -0
  47. package/skills/bpmax-console-template-editor/scripts/build_submit_payload.py +38 -0
  48. package/skills/bpmax-console-template-editor/scripts/confirm_console_template.py +33 -0
  49. package/skills/bpmax-console-template-editor/scripts/console_template_editor_common.py +964 -0
  50. package/skills/bpmax-console-template-editor/scripts/export_console_template.py +99 -0
  51. package/skills/bpmax-console-template-editor/scripts/lint_console_template.py +46 -0
  52. package/skills/bpmax-console-template-editor/scripts/submit_console_template.py +99 -0
  53. package/skills/bpmax-console-template-editor/tests/test_console_template_editor.py +383 -0
  54. package/skills/bpmax-dataset-field-template-editor/SKILL.md +606 -0
  55. package/skills/bpmax-dataset-field-template-editor/references/create-request-gotchas.md +25 -0
  56. package/skills/bpmax-dataset-field-template-editor/references/field-classify-mapping.md +35 -0
  57. package/skills/bpmax-dataset-field-template-editor/references/nested-field-patterns.md +24 -0
  58. package/skills/bpmax-dataset-field-template-editor/references/runtime-verified-field-page-shape.md +61 -0
  59. package/skills/bpmax-dataset-field-template-editor/references/virtual-field-patterns.md +27 -0
  60. package/skills/bpmax-dataset-field-template-editor/references/work-file-to-submit-mapping.md +127 -0
  61. package/skills/bpmax-dataset-field-template-editor/scripts/build_submit_payload.py +67 -0
  62. package/skills/bpmax-dataset-field-template-editor/scripts/confirm_dataset_field.py +37 -0
  63. package/skills/bpmax-dataset-field-template-editor/scripts/dataset_field_editor_common.py +784 -0
  64. package/skills/bpmax-dataset-field-template-editor/scripts/export_dataset_field.py +62 -0
  65. package/skills/bpmax-dataset-field-template-editor/scripts/init_create_dataset_field.py +104 -0
  66. package/skills/bpmax-dataset-field-template-editor/scripts/inspect_dataset_field_runtime.py +83 -0
  67. package/skills/bpmax-dataset-field-template-editor/scripts/lint_dataset_field_semantics.py +35 -0
  68. package/skills/bpmax-dataset-field-template-editor/scripts/submit_dataset_field.py +95 -0
  69. package/skills/bpmax-dataset-field-template-editor/tests/test_dataset_field_editor.py +709 -0
  70. package/skills/bpmax-dataset-field-template-editor/tests/test_init_create_dataset_field.py +59 -0
  71. package/skills/bpmax-dataset-template-editor/SKILL.md +779 -0
  72. package/skills/bpmax-dataset-template-editor/references/custom-key-usage-patterns.md +18 -0
  73. package/skills/bpmax-dataset-template-editor/references/dataset-script-runtime-matrix.md +73 -0
  74. package/skills/bpmax-dataset-template-editor/references/pre-process-script-authoring-guide.md +186 -0
  75. package/skills/bpmax-dataset-template-editor/references/pre-process-script-example-catalog.md +106 -0
  76. package/skills/bpmax-dataset-template-editor/references/runtime-gotchas.md +28 -0
  77. package/skills/bpmax-dataset-template-editor/references/runtime-verified-dataset-page-shape.md +47 -0
  78. package/skills/bpmax-dataset-template-editor/references/ui-to-backend-field-map.md +23 -0
  79. package/skills/bpmax-dataset-template-editor/references/work-file-to-submit-mapping.md +97 -0
  80. package/skills/bpmax-dataset-template-editor/scripts/basic_table_audit.py +65 -0
  81. package/skills/bpmax-dataset-template-editor/scripts/build_submit_payload.py +38 -0
  82. package/skills/bpmax-dataset-template-editor/scripts/dataset_editor_common.py +650 -0
  83. package/skills/bpmax-dataset-template-editor/scripts/export_dataset.py +155 -0
  84. package/skills/bpmax-dataset-template-editor/scripts/lint_dataset_template.py +42 -0
  85. package/skills/bpmax-dataset-template-editor/scripts/resolve_dataset.py +43 -0
  86. package/skills/bpmax-dataset-template-editor/scripts/scan_custom_key_references.py +27 -0
  87. package/skills/bpmax-dataset-template-editor/scripts/submit_dataset.py +115 -0
  88. package/skills/bpmax-dataset-template-editor/scripts/verify_dataset_list.py +52 -0
  89. package/skills/bpmax-dataset-template-editor/scripts/verify_publish_health.py +39 -0
  90. package/skills/bpmax-dataset-template-editor/tests/test_dataset_editor.py +373 -0
  91. package/skills/bpmax-e2e-flow-config-orchestrator/SKILL.md +217 -0
  92. package/skills/bpmax-e2e-flow-config-orchestrator/agents/openai.yaml +4 -0
  93. package/skills/bpmax-e2e-flow-config-orchestrator/references/orchestration-matrix.md +63 -0
  94. package/skills/bpmax-e2e-flow-test-operator/SKILL.md +551 -0
  95. package/skills/bpmax-e2e-flow-test-operator/agents/openai.yaml +5 -0
  96. package/skills/bpmax-e2e-flow-test-operator/profiles/negative_sale.json +97 -0
  97. package/skills/bpmax-e2e-flow-test-operator/profiles/negative_sale_final_v2.json +105 -0
  98. package/skills/bpmax-e2e-flow-test-operator/profiles/negative_sale_main.json +36 -0
  99. package/skills/bpmax-e2e-flow-test-operator/profiles/negative_sale_region.json +40 -0
  100. package/skills/bpmax-e2e-flow-test-operator/references/ai-test-suite.md +333 -0
  101. package/skills/bpmax-e2e-flow-test-operator/references/browser-only-checkpoints.md +41 -0
  102. package/skills/bpmax-e2e-flow-test-operator/references/failure-update-loop.md +17 -0
  103. package/skills/bpmax-e2e-flow-test-operator/references/filter-field-discovery.md +40 -0
  104. package/skills/bpmax-e2e-flow-test-operator/references/minimal-test-loop.md +24 -0
  105. package/skills/bpmax-e2e-flow-test-operator/references/negative-sale-api-matrix.md +75 -0
  106. package/skills/bpmax-e2e-flow-test-operator/references/profile-schema.md +109 -0
  107. package/skills/bpmax-e2e-flow-test-operator/references/skill-experience-coverage-matrix.md +29 -0
  108. package/skills/bpmax-e2e-flow-test-operator/references/stale-runtime-and-clean-sample-rules.md +54 -0
  109. package/skills/bpmax-e2e-flow-test-operator/references/state-schema.md +83 -0
  110. package/skills/bpmax-e2e-flow-test-operator/scripts/bpmax_session.py +287 -0
  111. package/skills/bpmax-e2e-flow-test-operator/scripts/dealer_sample_on_shelf_plan.json +59 -0
  112. package/skills/bpmax-e2e-flow-test-operator/scripts/dealer_sample_on_shelf_runner.py +687 -0
  113. package/skills/bpmax-e2e-flow-test-operator/scripts/e2e_doc.py +121 -0
  114. package/skills/bpmax-e2e-flow-test-operator/scripts/e2e_state.py +288 -0
  115. package/skills/bpmax-e2e-flow-test-operator/scripts/flow_api_matrix.py +161 -0
  116. package/skills/bpmax-e2e-flow-test-operator/scripts/flow_filter_fields.py +138 -0
  117. package/skills/bpmax-e2e-flow-test-operator/scripts/flow_form_runtime.py +396 -0
  118. package/skills/bpmax-e2e-flow-test-operator/scripts/flow_runner.py +341 -0
  119. package/skills/bpmax-e2e-flow-test-operator/scripts/flow_test_profile.py +185 -0
  120. package/skills/bpmax-e2e-flow-test-operator/tests/test_negative_sale_api_tools.py +138 -0
  121. package/skills/bpmax-feishu-chat-flow-plugin-editor/SKILL.md +69 -0
  122. package/skills/bpmax-feishu-chat-flow-plugin-editor/agents/openai.yaml +4 -0
  123. package/skills/bpmax-feishu-chat-flow-plugin-editor/references/config-checklist.md +42 -0
  124. package/skills/bpmax-feishu-chat-flow-plugin-editor/references/config-recipes.md +38 -0
  125. package/skills/bpmax-feishu-chat-flow-plugin-editor/references/config-shape.md +86 -0
  126. package/skills/bpmax-feishu-chat-flow-plugin-editor/references/gate-lint.md +68 -0
  127. package/skills/bpmax-feishu-chat-flow-plugin-editor/references/hoocoo-patterns.md +39 -0
  128. package/skills/bpmax-feishu-chat-flow-plugin-editor/references/runtime-behavior.md +41 -0
  129. package/skills/bpmax-feishu-chat-flow-plugin-editor/references/script-authoring.md +110 -0
  130. package/skills/bpmax-feishu-chat-flow-plugin-editor/scripts/lint_feishu_chat_plugin.py +278 -0
  131. package/skills/bpmax-feishu-chat-flow-plugin-editor/tests/test_lint_feishu_chat_plugin.py +203 -0
  132. package/skills/bpmax-filter-template-editor/SKILL.md +564 -0
  133. package/skills/bpmax-filter-template-editor/references/experience-coverage-matrix.md +38 -0
  134. package/skills/bpmax-filter-template-editor/references/filter-and-flow-binding.md +57 -0
  135. package/skills/bpmax-filter-template-editor/references/filter-content-schema.md +141 -0
  136. package/skills/bpmax-filter-template-editor/references/filter-request-shape.md +287 -0
  137. package/skills/bpmax-filter-template-editor/references/filter-runtime-patterns.md +115 -0
  138. package/skills/bpmax-filter-template-editor/references/runtime-verified-filter-page-shape.md +94 -0
  139. package/skills/bpmax-filter-template-editor/scripts/build_submit_payload.py +25 -0
  140. package/skills/bpmax-filter-template-editor/scripts/confirm_filter_template.py +22 -0
  141. package/skills/bpmax-filter-template-editor/scripts/export_filter_template.py +57 -0
  142. package/skills/bpmax-filter-template-editor/scripts/filter_template_editor_common.py +348 -0
  143. package/skills/bpmax-filter-template-editor/scripts/init_create_filter_template.py +8 -0
  144. package/skills/bpmax-filter-template-editor/scripts/lint_filter_template_semantics.py +26 -0
  145. package/skills/bpmax-filter-template-editor/scripts/submit_filter_template.py +62 -0
  146. package/skills/bpmax-filter-template-editor/tests/test_filter_template_editor.py +231 -0
  147. package/skills/bpmax-flow-template-editor/SKILL.md +1095 -0
  148. package/skills/bpmax-flow-template-editor/agents/openai.yaml +4 -0
  149. package/skills/bpmax-flow-template-editor/references/before-next-step-script-runtime-gotchas.md +62 -0
  150. package/skills/bpmax-flow-template-editor/references/config-surfaces-and-placeholders.md +270 -0
  151. package/skills/bpmax-flow-template-editor/references/diff-strategy.md +67 -0
  152. package/skills/bpmax-flow-template-editor/references/editor-runtime-vs-draft.md +25 -0
  153. package/skills/bpmax-flow-template-editor/references/flow-template-api-workflow.md +174 -0
  154. package/skills/bpmax-flow-template-editor/references/intent-model.md +117 -0
  155. package/skills/bpmax-flow-template-editor/references/lessons-from-price-plan-flow.md +147 -0
  156. package/skills/bpmax-flow-template-editor/references/local-temp-workflow.md +97 -0
  157. package/skills/bpmax-flow-template-editor/references/matrix-flow-form-nav-collaboration.md +168 -0
  158. package/skills/bpmax-flow-template-editor/references/payload-checklist.md +133 -0
  159. package/skills/bpmax-flow-template-editor/references/project-create-runtime-gotchas.md +106 -0
  160. package/skills/bpmax-flow-template-editor/references/requirement-to-node-mapping.md +149 -0
  161. package/skills/bpmax-flow-template-editor/references/runtime-verified-flow-detail-shape.md +41 -0
  162. package/skills/bpmax-flow-template-editor/references/runtime-verified-meta-fields.md +155 -0
  163. package/skills/bpmax-flow-template-editor/references/runtime-verified-node-fields.md +179 -0
  164. package/skills/bpmax-flow-template-editor/references/save-draft-request-shape.md +91 -0
  165. package/skills/bpmax-flow-template-editor/references/script-review-hard-rules.md +96 -0
  166. package/skills/bpmax-flow-template-editor/references/work-file-to-submit-mapping.md +57 -0
  167. package/skills/bpmax-flow-template-editor/scripts/build_submit_payload.py +69 -0
  168. package/skills/bpmax-flow-template-editor/scripts/confirm_flow_template.py +52 -0
  169. package/skills/bpmax-flow-template-editor/scripts/export_flow_template.py +114 -0
  170. package/skills/bpmax-flow-template-editor/scripts/flow_template_editor_common.py +1084 -0
  171. package/skills/bpmax-flow-template-editor/scripts/submit_flow_template.py +159 -0
  172. package/skills/bpmax-flow-template-editor/tests/test_flow_template_editor.py +636 -0
  173. package/skills/bpmax-form-template-editor/SKILL.md +1113 -0
  174. package/skills/bpmax-form-template-editor/agents/openai.yaml +4 -0
  175. package/skills/bpmax-form-template-editor/references/form-template-api-workflow.md +203 -0
  176. package/skills/bpmax-form-template-editor/references/local-temp-workflow.md +125 -0
  177. package/skills/bpmax-form-template-editor/references/payload-checklist.md +77 -0
  178. package/skills/bpmax-form-template-editor/references/sub-form-patterns.md +49 -0
  179. package/skills/bpmax-form-template-editor/scripts/build_submit_payload.py +37 -0
  180. package/skills/bpmax-form-template-editor/scripts/check_form_template_consistency.py +145 -0
  181. package/skills/bpmax-form-template-editor/scripts/confirm_form_template.py +67 -0
  182. package/skills/bpmax-form-template-editor/scripts/export_form_template.py +91 -0
  183. package/skills/bpmax-form-template-editor/scripts/form_template_editor_common.py +1762 -0
  184. package/skills/bpmax-form-template-editor/scripts/lint_form_template_semantics.py +30 -0
  185. package/skills/bpmax-form-template-editor/scripts/record_runtime_acceptance.py +67 -0
  186. package/skills/bpmax-form-template-editor/scripts/submit_form_template.py +163 -0
  187. package/skills/bpmax-form-template-editor/tests/test_form_template_editor.py +1292 -0
  188. package/skills/bpmax-list-template-editor/SKILL.md +478 -0
  189. package/skills/bpmax-list-template-editor/agents/openai.yaml +4 -0
  190. package/skills/bpmax-list-template-editor/references/browser-page-contract.md +81 -0
  191. package/skills/bpmax-list-template-editor/references/content-config-shape.md +165 -0
  192. package/skills/bpmax-list-template-editor/references/dataset-field-mapping.md +60 -0
  193. package/skills/bpmax-list-template-editor/references/list-template-api-workflow.md +108 -0
  194. package/skills/bpmax-list-template-editor/references/local-temp-workflow.md +102 -0
  195. package/skills/bpmax-list-template-editor/references/payload-checklist.md +47 -0
  196. package/skills/bpmax-list-template-editor/references/runtime-verified-workflow.md +147 -0
  197. package/skills/bpmax-list-template-editor/references/special-formats.md +411 -0
  198. package/skills/bpmax-list-template-editor/scripts/build_submit_payload.py +37 -0
  199. package/skills/bpmax-list-template-editor/scripts/confirm_list_template.py +33 -0
  200. package/skills/bpmax-list-template-editor/scripts/export_list_template.py +89 -0
  201. package/skills/bpmax-list-template-editor/scripts/fetch_data_set.py +34 -0
  202. package/skills/bpmax-list-template-editor/scripts/lint_list_template_semantics.py +54 -0
  203. package/skills/bpmax-list-template-editor/scripts/list_template_editor_common.py +955 -0
  204. package/skills/bpmax-list-template-editor/scripts/record_acceptance.py +55 -0
  205. package/skills/bpmax-list-template-editor/scripts/submit_list_template.py +117 -0
  206. package/skills/bpmax-list-template-editor/tests/test_list_template_editor_common.py +441 -0
  207. package/skills/bpmax-memory-protocol/SKILL.md +72 -0
  208. package/skills/bpmax-nav-config-editor/SKILL.md +350 -0
  209. package/skills/bpmax-nav-config-editor/agents/openai.yaml +4 -0
  210. package/skills/bpmax-nav-config-editor/references/api-workflow.md +70 -0
  211. package/skills/bpmax-nav-config-editor/references/config-shape.md +78 -0
  212. package/skills/bpmax-nav-config-editor/references/icon-selection.md +83 -0
  213. package/skills/bpmax-nav-config-editor/references/path-mapping-rules.md +51 -0
  214. package/skills/bpmax-nav-config-editor/references/payload-checklist.md +41 -0
  215. package/skills/bpmax-nav-config-editor/references/runtime-probing.md +47 -0
  216. package/skills/bpmax-nav-config-editor/scripts/build_submit_payload.py +34 -0
  217. package/skills/bpmax-nav-config-editor/scripts/confirm_nav_config.py +32 -0
  218. package/skills/bpmax-nav-config-editor/scripts/export_nav_config.py +56 -0
  219. package/skills/bpmax-nav-config-editor/scripts/lint_nav_config_semantics.py +33 -0
  220. package/skills/bpmax-nav-config-editor/scripts/nav_config_editor_common.py +812 -0
  221. package/skills/bpmax-nav-config-editor/scripts/submit_nav_config.py +44 -0
  222. package/skills/bpmax-nav-config-editor/scripts/verify_nav_config.py +33 -0
  223. package/skills/bpmax-nav-config-editor/tests/test_nav_config_editor.py +358 -0
  224. package/skills/bpmax-nav-config-editor/tests/test_nav_config_editor_common.py +138 -0
  225. package/skills/bpmax-nav-config-editor/tests/test_nav_config_lint.py +58 -0
  226. package/skills/bpmax-nav-config-editor/tests/test_nav_config_submit_verify.py +51 -0
  227. package/skills/bpmax-plugin-config/SKILL.md +42 -0
  228. package/skills/bpmax-project/SKILL.md +17 -3
  229. package/skills/bpmax-project-detail-template-editor/SKILL.md +355 -0
  230. package/skills/bpmax-project-detail-template-editor/agents/openai.yaml +4 -0
  231. package/skills/bpmax-project-detail-template-editor/references/local-temp-workflow.md +59 -0
  232. package/skills/bpmax-project-detail-template-editor/references/module-catalog-and-config-notes.md +120 -0
  233. package/skills/bpmax-project-detail-template-editor/references/payload-checklist.md +33 -0
  234. package/skills/bpmax-project-detail-template-editor/references/project-detail-template-api-workflow.md +44 -0
  235. package/skills/bpmax-project-detail-template-editor/scripts/build_submit_payload.py +30 -0
  236. package/skills/bpmax-project-detail-template-editor/scripts/confirm_project_detail_template.py +33 -0
  237. package/skills/bpmax-project-detail-template-editor/scripts/export_project_detail_template.py +87 -0
  238. package/skills/bpmax-project-detail-template-editor/scripts/lint_project_detail_template_semantics.py +37 -0
  239. package/skills/bpmax-project-detail-template-editor/scripts/project_detail_template_editor_common.py +507 -0
  240. package/skills/bpmax-project-detail-template-editor/scripts/submit_project_detail_template.py +120 -0
  241. package/skills/bpmax-project-detail-template-editor/tests/test_project_detail_template_editor.py +369 -0
  242. package/skills/bpmax-role-editor/SKILL.md +251 -0
  243. package/skills/bpmax-role-editor/references/api-workflow.md +30 -0
  244. package/skills/bpmax-role-editor/references/runtime-page-shape.md +18 -0
  245. package/skills/bpmax-role-editor/references/work-file-mapping.md +32 -0
  246. package/skills/bpmax-role-editor/scripts/build_submit_payload.py +38 -0
  247. package/skills/bpmax-role-editor/scripts/confirm_role.py +33 -0
  248. package/skills/bpmax-role-editor/scripts/export_role.py +163 -0
  249. package/skills/bpmax-role-editor/scripts/lint_role_semantics.py +38 -0
  250. package/skills/bpmax-role-editor/scripts/role_editor_common.py +1231 -0
  251. package/skills/bpmax-role-editor/scripts/submit_role.py +144 -0
  252. package/skills/bpmax-role-editor/tests/test_role_editor.py +343 -0
  253. package/skills/bpmax-shared/SKILL.md +1 -1
  254. package/skills/bpmax-user-mock-operator/SKILL.md +106 -0
  255. package/skills/bpmax-user-mock-operator/agents/openai.yaml +4 -0
  256. package/skills/bpmax-user-mock-operator/scripts/switch_user_identity.py +37 -0
  257. package/skills/bpmax-user-mock-operator/scripts/user_mock_operator_common.py +136 -0
  258. package/skills/bpmax-user-mock-operator/tests/test_user_mock_operator.py +138 -0
  259. package/skills/bpmax-workspace-editor/SKILL.md +78 -0
  260. package/skills/bpmax-workspace-editor/agents/openai.yaml +4 -0
  261. package/skills/form-control-library/SKILL.md +82 -0
  262. package/skills/form-control-library/agents/openai.yaml +4 -0
  263. package/skills/form-control-library/references/form-controls.md +199 -0
  264. package/skills/form-control-library/references/form-template-submit-schema.md +180 -0
  265. package/skills/form-control-library/references/group-select-runtime.md +191 -0
  266. package/skills/form-control-library/scripts/rebuild_form_control_library.py +55 -0
@@ -0,0 +1,165 @@
1
+ # 列表模板 `content.config[]` 结构说明
2
+
3
+ ## 顶层结构
4
+
5
+ ```json
6
+ {
7
+ "level": 0,
8
+ "config": [
9
+ {
10
+ "title": "名称",
11
+ "props": {
12
+ "width": "400px"
13
+ },
14
+ "createElement": {
15
+ "is": "span",
16
+ "children": {
17
+ "$template": "{return ctx.name }",
18
+ "eval": true
19
+ }
20
+ }
21
+ }
22
+ ]
23
+ }
24
+ ```
25
+
26
+ 说明:
27
+ - `level` 控制是否为层级列表
28
+ - `config` 是列数组,顺序即展示顺序
29
+
30
+ ## 列对象常见字段
31
+ - `title`
32
+ - 列标题
33
+ - `props`
34
+ - 透传给 `el-table-column`
35
+ - 常见如 `width`、`fixed`
36
+ - `createElement`
37
+ - 列单元格的渲染定义
38
+ - `icon`
39
+ - 图标类名
40
+ - `iconColor`
41
+ - 图标颜色
42
+ - `isSort`
43
+ - 是否允许自定义排序
44
+ - `sortConf`
45
+ - 排序字段配置
46
+ - `preset`
47
+ - 使用前端内置预设渲染
48
+
49
+ ## `createElement` 常见形态
50
+
51
+ ### 1. 直接文本列
52
+
53
+ ```json
54
+ {
55
+ "title": "项目编码",
56
+ "createElement": {
57
+ "children": {
58
+ "$template": "{return ctx.project_code || '--'}",
59
+ "eval": true
60
+ }
61
+ }
62
+ }
63
+ ```
64
+
65
+ ### 2. 直接数据集字段映射列
66
+
67
+ ```json
68
+ {
69
+ "title": "门店名称",
70
+ "createElement": {
71
+ "children": {
72
+ "$template": "ctx.store_name",
73
+ "eval": true
74
+ }
75
+ }
76
+ }
77
+ ```
78
+
79
+ ### 3. 操作列
80
+
81
+ ```json
82
+ {
83
+ "title": "操作",
84
+ "props": {
85
+ "fixed": "right",
86
+ "width": "120px"
87
+ },
88
+ "createElement": {
89
+ "children": [
90
+ {
91
+ "is": "router-link",
92
+ "attribute": {
93
+ "props": {
94
+ "to": {
95
+ "path": {
96
+ "$template": "{ const workspace = ctx.$WORKSPACE; return '/' + workspace + '/project_detail/0/{{__id}}'; }",
97
+ "eval": true
98
+ }
99
+ }
100
+ }
101
+ },
102
+ "children": {
103
+ "is": "el-button",
104
+ "attribute": {
105
+ "props": {
106
+ "size": "small",
107
+ "type": "text",
108
+ "icon": "ri ri_eye-line"
109
+ }
110
+ },
111
+ "children": "详情"
112
+ }
113
+ },
114
+ {
115
+ "is": "el-button",
116
+ "if": {
117
+ "$template": "{return ctx.status === 0 && !ctx.current_flow_step_name}",
118
+ "eval": true
119
+ },
120
+ "attribute": {
121
+ "props": {
122
+ "size": "small",
123
+ "type": "text",
124
+ "icon": "ri ri_delete-bin-line"
125
+ }
126
+ },
127
+ "children": "删除"
128
+ }
129
+ ]
130
+ },
131
+ "icon": null,
132
+ "iconColor": null
133
+ }
134
+ ```
135
+
136
+ - 操作列的 `icon` / `iconColor` 不放在列根,默认留空或不写。
137
+ - icon 放到每个操作按钮自身,优先用 `attribute.props.icon`,或显式渲染 `i.ri ri_*` 在按钮文本前。
138
+ - 操作列必须包含详情/查看和删除/移除动作。
139
+ - 删除/移除动作必须带条件 guard,依据项目状态、当前环节或步骤状态控制是否可用;默认只允许刚创建、未推进的项目删除,过了第一个节点后不能删除。
140
+
141
+ ## 图标列
142
+ - 渲染层会把 `icon` / `iconColor` 作为列外层配置传入
143
+ - 图标不是一定要写进 `createElement`
144
+ - 前后缀插件位也能读取这两个字段
145
+
146
+ ## 人员列
147
+ - 只要列语义涉及人,默认用“头像 + 名称”结构,不要只放姓名字符串
148
+ - 优先复用 `el-avatar`,必要时可退到 `img` + `alt=avatar` 的等效结构
149
+
150
+ ## 排序列
151
+ - 前端读取 `isSort`
152
+ - 排序细节从 `sortConf` 中取
153
+ - 若用户只说“这列支持排序”,优先保留现有列结构,只补:
154
+ - `isSort: true`
155
+ - 合理的 `sortConf`
156
+
157
+ ## 不要混入表单模板字段
158
+ 下面这些是表单模板概念,不应直接写进列表模板列对象:
159
+ - `rule`
160
+ - `value`
161
+ - `field`
162
+ - `field_type`
163
+ - `validateMap`
164
+ - `form_rule_id`
165
+ - `form_template_id`
@@ -0,0 +1,60 @@
1
+ # 数据集字段映射列生成规则
2
+
3
+ ## 来源
4
+ 前端列编辑弹窗会把当前数据集字段转换成候选列对象,逻辑在:
5
+ - [FieldSelector.vue](/Users/yanghanwen/Development/Cicada/bpmax-core/hpt-frontend/components/ProjectDetailTable/FieldSelector.vue)
6
+
7
+ ## 已确认生成规则
8
+ 数据集字段列表中的每个字段会被映射成:
9
+
10
+ ```json
11
+ {
12
+ "name": "字段显示名",
13
+ "key": "字段 key",
14
+ "id": 123,
15
+ "value": {
16
+ "title": "字段显示名",
17
+ "createElement": {
18
+ "children": {
19
+ "$template": "ctx.<字段 key>",
20
+ "eval": true
21
+ }
22
+ }
23
+ }
24
+ }
25
+ ```
26
+
27
+ ## skill 默认策略
28
+ 只要用户说“把某个数据集字段展示成一列”,默认按下面步骤处理:
29
+
30
+ 1. 读取当前模板绑定的数据集
31
+ 2. 在该数据集字段列表中找到目标字段
32
+ 3. 用该字段生成最小列对象:
33
+
34
+ ```json
35
+ {
36
+ "title": "字段显示名",
37
+ "createElement": {
38
+ "children": {
39
+ "$template": "ctx.<字段 key>",
40
+ "eval": true
41
+ }
42
+ }
43
+ }
44
+ ```
45
+
46
+ 4. 如果用户额外要求:
47
+ - 支持排序:再补 `isSort` / `sortConf`
48
+ - 指定宽度:再补 `props.width`
49
+ - 指定固定列:再补 `props.fixed`
50
+ - 指定图标:再补 `icon` / `iconColor`
51
+
52
+ ## 注意事项
53
+ - 数据集字段映射列的 `ctx.<字段 key>` 依赖当前 `data_set_id`
54
+ - 如果用户要求切换模板数据集,必须回头检查所有现有列模板是否还引用旧字段 key
55
+ - 不要把表单字段的 `field` 概念混进列表模板列里
56
+
57
+ ## 推荐优先级
58
+ - 普通展示列:优先用数据集字段映射
59
+ - 复杂格式化列:在映射列基础上再包一层脚本模板
60
+ - 操作列:优先复用已有“操作”列 skeleton,不要从零硬写
@@ -0,0 +1,108 @@
1
+ # BPMAX 项目列表模板创建与编辑接口工作流
2
+
3
+ > 当前约束:本文记录页面接口结构和历史请求骨架,只用于导出、比对、浏览器验收和调试。真实远端写入必须走 `bpmax-cli config list-template build/submit`,不得用页面 `fetch`、`vm.$axios`、raw `POST/PUT /api/flow_page_template` 或旧脚本替代 typed CLI。
4
+
5
+ ## 适用页面
6
+ - 新建页:`/w:<workspace>/project_detail_table/create`
7
+ - 编辑页:`/w:<workspace>/project_detail_table/<id>`
8
+
9
+ ## 鉴权与执行环境
10
+ - 优先依赖浏览器当前登录态。
11
+ - 优先在页面上下文内观察同域请求,复用已有 Cookie 做只读诊断。
12
+ - 可读取的上下文包括:
13
+ - `document.cookie`
14
+ - `localStorage`
15
+ - `sessionStorage`
16
+ - 当前页最近一次提交流量
17
+
18
+ 实践建议:
19
+ - 如果只是为了确认接口结构,可以观察页面里的 `fetch(..., { credentials: 'include' })`。
20
+ - 如果需要提交,必须把结构写入本地 work 文件并通过 `bpmax-cli config list-template submit`。
21
+ - Cookie 信息用于确认和诊断,不应成为唯一提交手段。
22
+
23
+ ## 已确认的接口
24
+
25
+ ### 数据集
26
+ - `GET /api/bpmax/data-set?$workspace=<workspace>&$language=zhCN`
27
+
28
+ 常见参数:
29
+
30
+ ```json
31
+ {
32
+ "flow_type": "flow274424593",
33
+ "flow_key": ""
34
+ }
35
+ ```
36
+
37
+ 返回值用于提供:
38
+ - 可选 `data_set_id`
39
+ - 当前数据集字段列表
40
+
41
+ ### 新建
42
+ - 历史页面接口:`POST /api/flow_page_template?$workspace=<workspace>&$language=zhCN`
43
+ - typed CLI 写入:`bpmax-cli config list-template submit --id create:list-template ...`
44
+
45
+ 请求体结构:
46
+
47
+ ```json
48
+ {
49
+ "name": "模板名",
50
+ "desc": "",
51
+ "data_set_id": 12345,
52
+ "flow_type": "flow274424593",
53
+ "flow_key": "",
54
+ "type": 1,
55
+ "status": 1,
56
+ "content": "{\"level\":0,\"config\":[...]}"
57
+ }
58
+ ```
59
+
60
+ 特征:
61
+ - 页面新建时会显式附带 `status: 1`
62
+ - `content` 不是对象,而是 JSON 字符串
63
+ - 列表模板当前已知没有额外 `publish` 步骤
64
+
65
+ ### 编辑
66
+ - `GET /api/flow_page_template/<id>?$workspace=<workspace>&$language=zhCN`
67
+ - 历史页面接口:`PUT /api/flow_page_template/<id>?$workspace=<workspace>&$language=zhCN`
68
+ - typed CLI 写入:`bpmax-cli config list-template submit --id <id> ...`
69
+
70
+ 编辑返回体重点字段:
71
+ - `id`
72
+ - `name`
73
+ - `desc`
74
+ - `data_set_id`
75
+ - `content`
76
+
77
+ 编辑提交请求体依旧使用同一套顶层结构:
78
+ - `name`
79
+ - `desc`
80
+ - `data_set_id`
81
+ - `flow_type`
82
+ - `flow_key`
83
+ - `type`
84
+ - `content`
85
+
86
+ ## 类型字段
87
+ - 项目列表模板页面在前端对应 `FLOW_PAGE_TEMPLATE_TYPE.TABLE_LIST`
88
+ - 在当前实现里,列表模板类型就是 `type = 1`
89
+
90
+ ## `content` 的处理
91
+ - 接口接收的是字符串化 JSON
92
+ - 前端编辑页内部会把它反序列化成对象后编辑
93
+ - 提交前需要重新 `JSON.stringify`
94
+
95
+ ## 保存后行为
96
+ - 页面保存成功后会提示成功消息
97
+ - 然后执行 `$router.back()`
98
+ - 因此 skill 如果要核对结果,不能停在“接口 200”
99
+ - 必须主动打开:
100
+ - 新建:`/project_detail_table/<newId>`
101
+ - 编辑:当前 `/project_detail_table/<id>`
102
+
103
+ ## 与表单模板接口的差异
104
+ - 列表模板使用 `/flow_page_template`
105
+ - 表单模板使用 `/form_template`
106
+ - 列表模板没有 `rule/value`
107
+ - 列表模板没有默认 `publish`
108
+ - 列表模板的核心内容在 `content.config[]`
@@ -0,0 +1,102 @@
1
+ # BPMAX 列表模板本地临时文件闭环
2
+
3
+ ## 临时目录
4
+ - 所有中间产物固定写到 `.codex/tmp/list-template-editor/`
5
+ - 子目录:
6
+ - `raw/`
7
+ - `work/`
8
+ - `meta/`
9
+ - `submit/`
10
+ - `diffs/`
11
+ - `result/`
12
+
13
+ ## 主流程
14
+ 1. 通过真实线上接口确认详情结构
15
+ 2. 导出 `raw` / `work` / `meta`
16
+ 3. 修改 `work`
17
+ 4. 向用户展示 `work diff` 做第一次确认
18
+ 5. 构建 `submit`
19
+ 6. 运行严格 lint,检查结构、样式、 icon 和数据集字段合法性
20
+ 7. 向用户展示 `submit diff` 做第二次确认
21
+ 8. 执行提交脚本
22
+ 9. 回读线上详情
23
+ 10. 刷新浏览器编辑页验收
24
+ 11. 若命中高风险条件,再进入真实列表页验收
25
+
26
+ ## 文件职责
27
+ ### `raw/<stem>.json`
28
+ - 只保存线上原始详情或 create skeleton 样例详情
29
+ - 不允许人工直接编辑
30
+
31
+ ### `work/<stem>.json`
32
+ - 人类可编辑稿
33
+ - 固定结构:
34
+ - `id`
35
+ - `mode`
36
+ - `basic`
37
+ - `content`
38
+ - `meta`
39
+
40
+ ### `submit/<stem>.json`
41
+ - 最终接口提交体
42
+ - 只能由脚本生成,不允许手工构造
43
+ - 最小必要顶层字段:
44
+ - `name`
45
+ - `desc`
46
+ - `data_set_id`
47
+ - `flow_type`
48
+ - `flow_key`
49
+ - `type`
50
+ - `content`
51
+ - `status`(仅 create)
52
+
53
+ ### `meta/<stem>.json`
54
+ - 记录确认状态机与文件哈希
55
+ - 至少包含:
56
+ - `mode`
57
+ - `templateId`
58
+ - `sampleTemplateId`
59
+ - `workspace`
60
+ - `requestUrl`
61
+ - `rawSha256`
62
+ - `workSha256`
63
+ - `submitSha256`
64
+ - `workConfirmedAt`
65
+ - `submitConfirmedAt`
66
+ - `lintPassed`
67
+ - `lintSha256`
68
+ - `highRiskAcceptanceRequired`
69
+ - `editorPageAccepted`
70
+ - `listPageAccepted`
71
+ - `status`
72
+
73
+ ### `result/<stem>.semantic-lint.json`
74
+ - 提交前的强制 lint 报告
75
+ - 只要存在 `errors` 或 `style_errors`,就禁止进入第二次确认和正式提交
76
+
77
+ ### `result/<stem>.data-set-list.json`
78
+ - lint / 数据集校验时回读的实时数据集列表
79
+ - 用于验证:
80
+ - `data_set_id` 是否存在
81
+ - `ctx.<fieldKey>` 是否来自当前数据集
82
+
83
+ ### `result/<stem>.readback.json`
84
+ - 提交后从线上接口回读的详情
85
+
86
+ ### `result/<stem>.readback.diff.txt`
87
+ - 聚焦 `submit -> readback` 差异
88
+ - 重点检查:
89
+ - 顶层基础字段
90
+ - `content.level`
91
+ - `content.config[]`
92
+
93
+ ## 确认门禁
94
+ - 没有第一次确认,不得构建 submit
95
+ - lint 不通过,不得进入第二次确认
96
+ - 没有第二次确认,不得提交
97
+ - `work` 文件一旦变化,旧的 `submit` 构建和确认必须失效
98
+ - `submit` 文件一旦变化,必须重新确认
99
+ - 默认完成标准是:
100
+ - `readbackAccepted`
101
+ - `editorPageAccepted`
102
+ - 命中高风险条件时再追加 `listPageAccepted`
@@ -0,0 +1,47 @@
1
+ # Payload 检查清单
2
+
3
+ 提交前至少检查下面这些项:
4
+
5
+ ## 顶层
6
+ - `name` 是否符合需求
7
+ - `desc` 是否需要更新
8
+ - `data_set_id` 是否正确
9
+ - `flow_type` / `flow_key` 是否与当前页面一致
10
+ - `type` 是否仍是列表模板类型
11
+ - `content` 是否已经重新 `JSON.stringify`
12
+
13
+ ## content
14
+ - `content` 反序列化后是否仍是对象
15
+ - `content.level` 是否符合层级列表预期
16
+ - `content.config` 是否仍是数组
17
+ - 删除列后是否留下无效空对象
18
+
19
+ ## 列配置
20
+ - 每列是否有 `title`
21
+ - `props` 是否只包含当前前端支持的列参数
22
+ - `createElement` 是否完整
23
+ - 图标列是否正确维护了 `icon` / `iconColor`
24
+ - 涉及人的列是否已经带头像,而不是只显示姓名文本
25
+ - 排序列是否正确维护了 `isSort` / `sortConf`
26
+ - 展示型列是否包含空值兜底逻辑
27
+ - 当字段为空时,是否会显示统一占位内容(默认 `--`)
28
+
29
+ ## 数据集字段映射
30
+ - 当前列引用的字段 key 是否存在于所选数据集
31
+ - `$template` 是否与数据集字段 key 对齐
32
+ - 数据集字段为空时,模板是否会回落到占位内容
33
+ - 若改了 `data_set_id`,旧列模板是否仍然有效
34
+
35
+ ## 编辑场景
36
+ - 未改动的列是否被误删
37
+ - 列顺序是否符合用户要求
38
+ - 操作列是否仍保留必要按钮
39
+
40
+ ## 新建场景
41
+ - 是否附带了 `status: 1`
42
+ - 不要伪造后端已有 `id`
43
+ - 提交成功后是否能定位到新模板 `id`
44
+
45
+ ## 页面一致性
46
+ - 当前页面如果在源码模式,提交前应以源码模式里的最终 JSON 为准
47
+ - 当前页面如果在可视模式改过列,提交前应确认可视编辑结果已同步回 `content`
@@ -0,0 +1,147 @@
1
+ # 运行时验证过的页面操作方式
2
+
3
+ 这份文档记录的是在真实 `project_detail_table` 页面上验证通过的操作方式,优先级高于纯推断。
4
+
5
+ > 当前约束:本文只作为浏览器验收、页面状态诊断和历史结构参考。真实远端写入必须走 `bpmax-cli config list-template build/submit`,不得再用 `vm.save()`、`vm.$axios` 或裸 `fetch` 作为提交路径。
6
+
7
+ ## 页面实例定位
8
+
9
+ 在当前 Nuxt 页面中,列表模板编辑页的核心实例可通过递归 Vue 树定位。
10
+
11
+ 可用判定条件:
12
+
13
+ ```js
14
+ Array.isArray(vm.content?.config) &&
15
+ vm.form &&
16
+ typeof vm.save === 'function'
17
+ ```
18
+
19
+ 这个实例通常还具备:
20
+ - `vm.form`
21
+ - `vm.content`
22
+ - `vm.dataSetList`
23
+ - `vm.flow`
24
+ - `vm.$axios`
25
+ - `vm.$router`
26
+
27
+ ## 运行时诊断优先级
28
+
29
+ 只读诊断推荐顺序:
30
+
31
+ 1. 先找页面 Vue 实例
32
+ 2. 读取 `vm.form` / `vm.content` / `vm.dataSetList` / `vm.flow`
33
+ 3. 观察页面保存前后的请求结构
34
+ 4. 把确认后的结构落到本地 work 文件,再通过 typed CLI build/submit 写入
35
+
36
+ 原因:
37
+ - 这次实测中,当前页直接裸 `fetch('/api/bpmax/data-set')` 返回了 `403`
38
+ - 历史上通过页面实例的 `vm.$axios.$post('/flow_page_template', payload)` 创建模板成功,但该路径现在只可作为请求结构参考,不能作为实际提交路径
39
+
40
+ ## 推荐操作模式
41
+
42
+ ### 读取当前页面状态
43
+ 优先读:
44
+ - `vm.form`
45
+ - `vm.content`
46
+ - `vm.dataSetList`
47
+ - `vm.flow.data.meta.table_list_template`
48
+
49
+ ### 查看待修改结构
50
+ 可以临时在页面实例中观察结构,但不要调用保存:
51
+
52
+ ```js
53
+ vm.form.name = '...';
54
+ vm.form.desc = '...';
55
+ vm.form.data_set_id = 716;
56
+ vm.content = { level: 0, config: [...] };
57
+ ```
58
+
59
+ ### 提交
60
+ 不要使用页面实例提交。以下旧写法只保留为历史请求骨架参考:
61
+
62
+ ```js
63
+ const payload = {
64
+ ...vm.form,
65
+ flow_key: vm.$route.query.flow_key || '',
66
+ flow_type: vm.$route.query.flow_type || 'default',
67
+ content: JSON.stringify(vm.content),
68
+ type: vm.type,
69
+ status: 1,
70
+ };
71
+ const res = await vm.$axios.$post('/flow_page_template', payload);
72
+ ```
73
+
74
+ 实际提交必须改为:
75
+
76
+ ```bash
77
+ bpmax-cli config list-template build --work <work-file> --meta <meta-file> --out <submit-file>
78
+ bpmax-cli config list-template submit --id <template-id> --payload <submit-file> --confirm "submit list-template <template-id>"
79
+ ```
80
+
81
+ ## 创建页默认模板与线上默认模板
82
+ - `create` 页默认骨架不一定等于当前流程线上已挂的默认列表模板
83
+ - 应优先读取:
84
+
85
+ ```js
86
+ vm.flow?.data?.meta?.table_list_template
87
+ ```
88
+
89
+ 再决定是:
90
+ - 基于 create 页默认骨架扩展
91
+ - 还是基于已有线上模板复制增强
92
+
93
+ ## 状态彩色标签的已验证方案
94
+
95
+ 状态标签列可直接使用:
96
+ - `ColorBackgroundText`
97
+
98
+ 已验证可用的列对象形态:
99
+
100
+ ```json
101
+ {
102
+ "title": "状态",
103
+ "props": {
104
+ "width": "110px"
105
+ },
106
+ "createElement": {
107
+ "is": "ColorBackgroundText",
108
+ "attribute": {
109
+ "props": {
110
+ "type": "status",
111
+ "content": {
112
+ "$template": "{const map = {0: '未开始', 1: '进行中', 2: '完结', 3: '延期', 4: '失败', 5: '暂停', 6: '废弃' }; return map[ctx.status] || '未开始'}",
113
+ "eval": true
114
+ },
115
+ "hideStatusPoint": false
116
+ }
117
+ }
118
+ }
119
+ }
120
+ ```
121
+
122
+ ## 当前流程 `flow274424593` 的已验证高价值列
123
+ 基于当前数据集字段,补这些列是合理的:
124
+ - `当前环节`
125
+ - `客户姓名`
126
+ - `客户手机号`
127
+ - `SN`
128
+
129
+ 原因:
130
+ - 都有现成 `dataSetField`
131
+ - 都是列表首屏高频识别字段
132
+ - 不需要额外依赖复杂脚本或插件扩展
133
+
134
+ ## 创建后复核
135
+ 创建成功后,如果接口返回了新 `id`,必须立即跳到:
136
+
137
+ ```text
138
+ /w:<workspace>/project_detail_table/<id>
139
+ ```
140
+
141
+ 然后至少再检查两项:
142
+ - 页面列标题是否符合预期
143
+ - 关键列对象是否真的落成目标结构
144
+
145
+ 例如这次应确认:
146
+ - `状态` 列是否真的使用了 `ColorBackgroundText`
147
+ - 新增的 `SN`、`当前环节`、`客户姓名`、`客户手机号` 是否都已出现在 `content.config[]`