bpmax-cli 0.1.42 → 0.1.44-beta.0

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 (251) hide show
  1. package/README.md +3 -3
  2. package/dist/bin.js +3967 -533
  3. package/dist/bin.js.map +1 -1
  4. package/package.json +1 -1
  5. package/skills/bpmax-api-platform-editor/SKILL.md +321 -0
  6. package/skills/bpmax-api-platform-editor/agents/openai.yaml +4 -0
  7. package/skills/bpmax-api-platform-editor/references/api-doc-debug-workflow.md +34 -0
  8. package/skills/bpmax-api-platform-editor/references/api-proxy-shape.md +41 -0
  9. package/skills/bpmax-api-platform-editor/references/instance-config-shape.md +41 -0
  10. package/skills/bpmax-api-platform-editor/references/platform-api-map.md +52 -0
  11. package/skills/bpmax-api-platform-editor/references/runtime-workflow.md +32 -0
  12. package/skills/bpmax-api-platform-editor/scripts/api_platform_editor_common.py +1276 -0
  13. package/skills/bpmax-api-platform-editor/scripts/build_submit_payload.py +64 -0
  14. package/skills/bpmax-api-platform-editor/scripts/capture_write_contract.py +40 -0
  15. package/skills/bpmax-api-platform-editor/scripts/export_layer_bundle.py +212 -0
  16. package/skills/bpmax-api-platform-editor/scripts/record_doc_debug_acceptance.py +62 -0
  17. package/skills/bpmax-api-platform-editor/scripts/submit_and_verify_layer.py +75 -0
  18. package/skills/bpmax-api-platform-editor/tests/test_api_platform_editor.py +287 -0
  19. package/skills/bpmax-auth/SKILL.md +6 -17
  20. package/skills/bpmax-builder-shared/SKILL.md +44 -0
  21. package/skills/bpmax-builder-shared/base_url.py +81 -0
  22. package/skills/bpmax-builder-shared/runtime-script-site-matrix.json +71 -0
  23. package/skills/bpmax-builder-shared/runtime-script-site-matrix.md +34 -0
  24. package/skills/bpmax-builder-shared/runtime-script-template-catalog.md +123 -0
  25. package/skills/bpmax-builder-shared/runtime_script_rules.py +272 -0
  26. package/skills/bpmax-builder-shared/skill_audit.py +374 -0
  27. package/skills/bpmax-builder-shared/template_script_hard_rules.py +280 -0
  28. package/skills/bpmax-builder-shared/tests/test_base_url.py +80 -0
  29. package/skills/bpmax-builder-shared/tests/test_runtime_script_rules.py +115 -0
  30. package/skills/bpmax-builder-shared/tests/test_skill_audit.py +231 -0
  31. package/skills/bpmax-builder-shared/tests/test_template_script_hard_rules.py +281 -0
  32. package/skills/bpmax-cli/SKILL.md +2 -0
  33. package/skills/bpmax-config-latest/SKILL.md +71 -0
  34. package/skills/bpmax-console-template-editor/SKILL.md +536 -0
  35. package/skills/bpmax-console-template-editor/agents/openai.yaml +4 -0
  36. package/skills/bpmax-console-template-editor/references/filter-integration.md +60 -0
  37. package/skills/bpmax-console-template-editor/references/lessons-from-resume-dashboard.md +114 -0
  38. package/skills/bpmax-console-template-editor/references/local-temp-workflow.md +69 -0
  39. package/skills/bpmax-console-template-editor/references/module-catalog.md +100 -0
  40. package/skills/bpmax-console-template-editor/references/runtime-page-shape.md +91 -0
  41. package/skills/bpmax-console-template-editor/references/template-shape.md +149 -0
  42. package/skills/bpmax-console-template-editor/scripts/build_submit_payload.py +38 -0
  43. package/skills/bpmax-console-template-editor/scripts/confirm_console_template.py +33 -0
  44. package/skills/bpmax-console-template-editor/scripts/console_template_editor_common.py +964 -0
  45. package/skills/bpmax-console-template-editor/scripts/export_console_template.py +99 -0
  46. package/skills/bpmax-console-template-editor/scripts/lint_console_template.py +46 -0
  47. package/skills/bpmax-console-template-editor/scripts/submit_console_template.py +99 -0
  48. package/skills/bpmax-console-template-editor/tests/test_console_template_editor.py +383 -0
  49. package/skills/bpmax-dataset-field-template-editor/SKILL.md +600 -0
  50. package/skills/bpmax-dataset-field-template-editor/references/create-request-gotchas.md +25 -0
  51. package/skills/bpmax-dataset-field-template-editor/references/field-classify-mapping.md +35 -0
  52. package/skills/bpmax-dataset-field-template-editor/references/nested-field-patterns.md +24 -0
  53. package/skills/bpmax-dataset-field-template-editor/references/runtime-verified-field-page-shape.md +61 -0
  54. package/skills/bpmax-dataset-field-template-editor/references/virtual-field-patterns.md +27 -0
  55. package/skills/bpmax-dataset-field-template-editor/references/work-file-to-submit-mapping.md +127 -0
  56. package/skills/bpmax-dataset-field-template-editor/scripts/build_submit_payload.py +67 -0
  57. package/skills/bpmax-dataset-field-template-editor/scripts/confirm_dataset_field.py +37 -0
  58. package/skills/bpmax-dataset-field-template-editor/scripts/dataset_field_editor_common.py +784 -0
  59. package/skills/bpmax-dataset-field-template-editor/scripts/export_dataset_field.py +62 -0
  60. package/skills/bpmax-dataset-field-template-editor/scripts/init_create_dataset_field.py +104 -0
  61. package/skills/bpmax-dataset-field-template-editor/scripts/inspect_dataset_field_runtime.py +83 -0
  62. package/skills/bpmax-dataset-field-template-editor/scripts/lint_dataset_field_semantics.py +35 -0
  63. package/skills/bpmax-dataset-field-template-editor/scripts/submit_dataset_field.py +95 -0
  64. package/skills/bpmax-dataset-field-template-editor/tests/test_dataset_field_editor.py +709 -0
  65. package/skills/bpmax-dataset-field-template-editor/tests/test_init_create_dataset_field.py +59 -0
  66. package/skills/bpmax-dataset-template-editor/SKILL.md +779 -0
  67. package/skills/bpmax-dataset-template-editor/references/custom-key-usage-patterns.md +18 -0
  68. package/skills/bpmax-dataset-template-editor/references/dataset-script-runtime-matrix.md +73 -0
  69. package/skills/bpmax-dataset-template-editor/references/pre-process-script-authoring-guide.md +186 -0
  70. package/skills/bpmax-dataset-template-editor/references/pre-process-script-example-catalog.md +106 -0
  71. package/skills/bpmax-dataset-template-editor/references/runtime-gotchas.md +28 -0
  72. package/skills/bpmax-dataset-template-editor/references/runtime-verified-dataset-page-shape.md +47 -0
  73. package/skills/bpmax-dataset-template-editor/references/ui-to-backend-field-map.md +23 -0
  74. package/skills/bpmax-dataset-template-editor/references/work-file-to-submit-mapping.md +97 -0
  75. package/skills/bpmax-dataset-template-editor/scripts/basic_table_audit.py +65 -0
  76. package/skills/bpmax-dataset-template-editor/scripts/build_submit_payload.py +38 -0
  77. package/skills/bpmax-dataset-template-editor/scripts/dataset_editor_common.py +650 -0
  78. package/skills/bpmax-dataset-template-editor/scripts/export_dataset.py +155 -0
  79. package/skills/bpmax-dataset-template-editor/scripts/lint_dataset_template.py +42 -0
  80. package/skills/bpmax-dataset-template-editor/scripts/resolve_dataset.py +43 -0
  81. package/skills/bpmax-dataset-template-editor/scripts/scan_custom_key_references.py +27 -0
  82. package/skills/bpmax-dataset-template-editor/scripts/submit_dataset.py +115 -0
  83. package/skills/bpmax-dataset-template-editor/scripts/verify_dataset_list.py +52 -0
  84. package/skills/bpmax-dataset-template-editor/scripts/verify_publish_health.py +39 -0
  85. package/skills/bpmax-dataset-template-editor/tests/test_dataset_editor.py +373 -0
  86. package/skills/bpmax-e2e-flow-config-orchestrator/SKILL.md +151 -0
  87. package/skills/bpmax-e2e-flow-config-orchestrator/agents/openai.yaml +4 -0
  88. package/skills/bpmax-e2e-flow-config-orchestrator/references/orchestration-matrix.md +60 -0
  89. package/skills/bpmax-e2e-flow-test-operator/SKILL.md +371 -0
  90. package/skills/bpmax-e2e-flow-test-operator/agents/openai.yaml +5 -0
  91. package/skills/bpmax-e2e-flow-test-operator/profiles/negative_sale.json +97 -0
  92. package/skills/bpmax-e2e-flow-test-operator/profiles/negative_sale_final_v2.json +105 -0
  93. package/skills/bpmax-e2e-flow-test-operator/profiles/negative_sale_main.json +36 -0
  94. package/skills/bpmax-e2e-flow-test-operator/profiles/negative_sale_region.json +40 -0
  95. package/skills/bpmax-e2e-flow-test-operator/references/browser-only-checkpoints.md +33 -0
  96. package/skills/bpmax-e2e-flow-test-operator/references/failure-update-loop.md +17 -0
  97. package/skills/bpmax-e2e-flow-test-operator/references/filter-field-discovery.md +40 -0
  98. package/skills/bpmax-e2e-flow-test-operator/references/minimal-test-loop.md +19 -0
  99. package/skills/bpmax-e2e-flow-test-operator/references/negative-sale-api-matrix.md +75 -0
  100. package/skills/bpmax-e2e-flow-test-operator/references/profile-schema.md +107 -0
  101. package/skills/bpmax-e2e-flow-test-operator/references/skill-experience-coverage-matrix.md +29 -0
  102. package/skills/bpmax-e2e-flow-test-operator/references/stale-runtime-and-clean-sample-rules.md +54 -0
  103. package/skills/bpmax-e2e-flow-test-operator/references/state-schema.md +58 -0
  104. package/skills/bpmax-e2e-flow-test-operator/scripts/bpmax_session.py +287 -0
  105. package/skills/bpmax-e2e-flow-test-operator/scripts/dealer_sample_on_shelf_plan.json +59 -0
  106. package/skills/bpmax-e2e-flow-test-operator/scripts/dealer_sample_on_shelf_runner.py +687 -0
  107. package/skills/bpmax-e2e-flow-test-operator/scripts/e2e_doc.py +95 -0
  108. package/skills/bpmax-e2e-flow-test-operator/scripts/e2e_state.py +288 -0
  109. package/skills/bpmax-e2e-flow-test-operator/scripts/flow_api_matrix.py +161 -0
  110. package/skills/bpmax-e2e-flow-test-operator/scripts/flow_filter_fields.py +138 -0
  111. package/skills/bpmax-e2e-flow-test-operator/scripts/flow_form_runtime.py +396 -0
  112. package/skills/bpmax-e2e-flow-test-operator/scripts/flow_runner.py +341 -0
  113. package/skills/bpmax-e2e-flow-test-operator/scripts/flow_test_profile.py +185 -0
  114. package/skills/bpmax-e2e-flow-test-operator/tests/test_negative_sale_api_tools.py +138 -0
  115. package/skills/bpmax-feishu-chat-flow-plugin-editor/SKILL.md +69 -0
  116. package/skills/bpmax-feishu-chat-flow-plugin-editor/agents/openai.yaml +4 -0
  117. package/skills/bpmax-feishu-chat-flow-plugin-editor/references/config-checklist.md +42 -0
  118. package/skills/bpmax-feishu-chat-flow-plugin-editor/references/config-recipes.md +38 -0
  119. package/skills/bpmax-feishu-chat-flow-plugin-editor/references/config-shape.md +86 -0
  120. package/skills/bpmax-feishu-chat-flow-plugin-editor/references/gate-lint.md +68 -0
  121. package/skills/bpmax-feishu-chat-flow-plugin-editor/references/hoocoo-patterns.md +39 -0
  122. package/skills/bpmax-feishu-chat-flow-plugin-editor/references/runtime-behavior.md +41 -0
  123. package/skills/bpmax-feishu-chat-flow-plugin-editor/references/script-authoring.md +110 -0
  124. package/skills/bpmax-feishu-chat-flow-plugin-editor/scripts/lint_feishu_chat_plugin.py +278 -0
  125. package/skills/bpmax-feishu-chat-flow-plugin-editor/tests/test_lint_feishu_chat_plugin.py +203 -0
  126. package/skills/bpmax-filter-template-editor/SKILL.md +564 -0
  127. package/skills/bpmax-filter-template-editor/references/experience-coverage-matrix.md +38 -0
  128. package/skills/bpmax-filter-template-editor/references/filter-and-flow-binding.md +57 -0
  129. package/skills/bpmax-filter-template-editor/references/filter-content-schema.md +141 -0
  130. package/skills/bpmax-filter-template-editor/references/filter-request-shape.md +287 -0
  131. package/skills/bpmax-filter-template-editor/references/filter-runtime-patterns.md +115 -0
  132. package/skills/bpmax-filter-template-editor/references/runtime-verified-filter-page-shape.md +94 -0
  133. package/skills/bpmax-filter-template-editor/scripts/build_submit_payload.py +25 -0
  134. package/skills/bpmax-filter-template-editor/scripts/confirm_filter_template.py +22 -0
  135. package/skills/bpmax-filter-template-editor/scripts/export_filter_template.py +57 -0
  136. package/skills/bpmax-filter-template-editor/scripts/filter_template_editor_common.py +348 -0
  137. package/skills/bpmax-filter-template-editor/scripts/init_create_filter_template.py +8 -0
  138. package/skills/bpmax-filter-template-editor/scripts/lint_filter_template_semantics.py +26 -0
  139. package/skills/bpmax-filter-template-editor/scripts/submit_filter_template.py +62 -0
  140. package/skills/bpmax-filter-template-editor/tests/test_filter_template_editor.py +231 -0
  141. package/skills/bpmax-flow-template-editor/SKILL.md +1043 -0
  142. package/skills/bpmax-flow-template-editor/agents/openai.yaml +4 -0
  143. package/skills/bpmax-flow-template-editor/references/before-next-step-script-runtime-gotchas.md +62 -0
  144. package/skills/bpmax-flow-template-editor/references/config-surfaces-and-placeholders.md +270 -0
  145. package/skills/bpmax-flow-template-editor/references/diff-strategy.md +67 -0
  146. package/skills/bpmax-flow-template-editor/references/editor-runtime-vs-draft.md +25 -0
  147. package/skills/bpmax-flow-template-editor/references/flow-template-api-workflow.md +159 -0
  148. package/skills/bpmax-flow-template-editor/references/intent-model.md +117 -0
  149. package/skills/bpmax-flow-template-editor/references/lessons-from-price-plan-flow.md +147 -0
  150. package/skills/bpmax-flow-template-editor/references/local-temp-workflow.md +97 -0
  151. package/skills/bpmax-flow-template-editor/references/matrix-flow-form-nav-collaboration.md +163 -0
  152. package/skills/bpmax-flow-template-editor/references/payload-checklist.md +133 -0
  153. package/skills/bpmax-flow-template-editor/references/project-create-runtime-gotchas.md +54 -0
  154. package/skills/bpmax-flow-template-editor/references/requirement-to-node-mapping.md +149 -0
  155. package/skills/bpmax-flow-template-editor/references/runtime-verified-flow-detail-shape.md +41 -0
  156. package/skills/bpmax-flow-template-editor/references/runtime-verified-meta-fields.md +155 -0
  157. package/skills/bpmax-flow-template-editor/references/runtime-verified-node-fields.md +179 -0
  158. package/skills/bpmax-flow-template-editor/references/save-draft-request-shape.md +91 -0
  159. package/skills/bpmax-flow-template-editor/references/script-review-hard-rules.md +93 -0
  160. package/skills/bpmax-flow-template-editor/references/work-file-to-submit-mapping.md +57 -0
  161. package/skills/bpmax-flow-template-editor/scripts/build_submit_payload.py +69 -0
  162. package/skills/bpmax-flow-template-editor/scripts/confirm_flow_template.py +52 -0
  163. package/skills/bpmax-flow-template-editor/scripts/export_flow_template.py +114 -0
  164. package/skills/bpmax-flow-template-editor/scripts/flow_template_editor_common.py +1084 -0
  165. package/skills/bpmax-flow-template-editor/scripts/submit_flow_template.py +159 -0
  166. package/skills/bpmax-flow-template-editor/tests/test_flow_template_editor.py +636 -0
  167. package/skills/bpmax-form-template-editor/SKILL.md +1074 -0
  168. package/skills/bpmax-form-template-editor/agents/openai.yaml +4 -0
  169. package/skills/bpmax-form-template-editor/references/form-template-api-workflow.md +193 -0
  170. package/skills/bpmax-form-template-editor/references/local-temp-workflow.md +125 -0
  171. package/skills/bpmax-form-template-editor/references/payload-checklist.md +77 -0
  172. package/skills/bpmax-form-template-editor/references/sub-form-patterns.md +49 -0
  173. package/skills/bpmax-form-template-editor/scripts/build_submit_payload.py +37 -0
  174. package/skills/bpmax-form-template-editor/scripts/check_form_template_consistency.py +145 -0
  175. package/skills/bpmax-form-template-editor/scripts/confirm_form_template.py +67 -0
  176. package/skills/bpmax-form-template-editor/scripts/export_form_template.py +89 -0
  177. package/skills/bpmax-form-template-editor/scripts/form_template_editor_common.py +1745 -0
  178. package/skills/bpmax-form-template-editor/scripts/lint_form_template_semantics.py +30 -0
  179. package/skills/bpmax-form-template-editor/scripts/record_runtime_acceptance.py +67 -0
  180. package/skills/bpmax-form-template-editor/scripts/submit_form_template.py +163 -0
  181. package/skills/bpmax-form-template-editor/tests/test_form_template_editor.py +1303 -0
  182. package/skills/bpmax-list-template-editor/SKILL.md +468 -0
  183. package/skills/bpmax-list-template-editor/agents/openai.yaml +4 -0
  184. package/skills/bpmax-list-template-editor/references/browser-page-contract.md +81 -0
  185. package/skills/bpmax-list-template-editor/references/content-config-shape.md +148 -0
  186. package/skills/bpmax-list-template-editor/references/dataset-field-mapping.md +60 -0
  187. package/skills/bpmax-list-template-editor/references/list-template-api-workflow.md +103 -0
  188. package/skills/bpmax-list-template-editor/references/local-temp-workflow.md +102 -0
  189. package/skills/bpmax-list-template-editor/references/payload-checklist.md +47 -0
  190. package/skills/bpmax-list-template-editor/references/runtime-verified-workflow.md +140 -0
  191. package/skills/bpmax-list-template-editor/references/special-formats.md +394 -0
  192. package/skills/bpmax-list-template-editor/scripts/build_submit_payload.py +37 -0
  193. package/skills/bpmax-list-template-editor/scripts/confirm_list_template.py +33 -0
  194. package/skills/bpmax-list-template-editor/scripts/export_list_template.py +89 -0
  195. package/skills/bpmax-list-template-editor/scripts/fetch_data_set.py +34 -0
  196. package/skills/bpmax-list-template-editor/scripts/lint_list_template_semantics.py +54 -0
  197. package/skills/bpmax-list-template-editor/scripts/list_template_editor_common.py +955 -0
  198. package/skills/bpmax-list-template-editor/scripts/record_acceptance.py +55 -0
  199. package/skills/bpmax-list-template-editor/scripts/submit_list_template.py +117 -0
  200. package/skills/bpmax-list-template-editor/tests/test_list_template_editor_common.py +441 -0
  201. package/skills/bpmax-nav-config-editor/SKILL.md +347 -0
  202. package/skills/bpmax-nav-config-editor/agents/openai.yaml +4 -0
  203. package/skills/bpmax-nav-config-editor/references/api-workflow.md +68 -0
  204. package/skills/bpmax-nav-config-editor/references/config-shape.md +78 -0
  205. package/skills/bpmax-nav-config-editor/references/icon-selection.md +83 -0
  206. package/skills/bpmax-nav-config-editor/references/path-mapping-rules.md +46 -0
  207. package/skills/bpmax-nav-config-editor/references/payload-checklist.md +41 -0
  208. package/skills/bpmax-nav-config-editor/references/runtime-probing.md +47 -0
  209. package/skills/bpmax-nav-config-editor/scripts/build_submit_payload.py +34 -0
  210. package/skills/bpmax-nav-config-editor/scripts/confirm_nav_config.py +32 -0
  211. package/skills/bpmax-nav-config-editor/scripts/export_nav_config.py +56 -0
  212. package/skills/bpmax-nav-config-editor/scripts/lint_nav_config_semantics.py +33 -0
  213. package/skills/bpmax-nav-config-editor/scripts/nav_config_editor_common.py +812 -0
  214. package/skills/bpmax-nav-config-editor/scripts/submit_nav_config.py +44 -0
  215. package/skills/bpmax-nav-config-editor/scripts/verify_nav_config.py +33 -0
  216. package/skills/bpmax-nav-config-editor/tests/test_nav_config_editor.py +358 -0
  217. package/skills/bpmax-nav-config-editor/tests/test_nav_config_editor_common.py +138 -0
  218. package/skills/bpmax-nav-config-editor/tests/test_nav_config_lint.py +58 -0
  219. package/skills/bpmax-nav-config-editor/tests/test_nav_config_submit_verify.py +51 -0
  220. package/skills/bpmax-project/SKILL.md +1 -1
  221. package/skills/bpmax-project-detail-template-editor/SKILL.md +329 -0
  222. package/skills/bpmax-project-detail-template-editor/agents/openai.yaml +4 -0
  223. package/skills/bpmax-project-detail-template-editor/references/local-temp-workflow.md +59 -0
  224. package/skills/bpmax-project-detail-template-editor/references/module-catalog-and-config-notes.md +47 -0
  225. package/skills/bpmax-project-detail-template-editor/references/payload-checklist.md +33 -0
  226. package/skills/bpmax-project-detail-template-editor/references/project-detail-template-api-workflow.md +44 -0
  227. package/skills/bpmax-project-detail-template-editor/scripts/build_submit_payload.py +30 -0
  228. package/skills/bpmax-project-detail-template-editor/scripts/confirm_project_detail_template.py +33 -0
  229. package/skills/bpmax-project-detail-template-editor/scripts/export_project_detail_template.py +87 -0
  230. package/skills/bpmax-project-detail-template-editor/scripts/lint_project_detail_template_semantics.py +37 -0
  231. package/skills/bpmax-project-detail-template-editor/scripts/project_detail_template_editor_common.py +507 -0
  232. package/skills/bpmax-project-detail-template-editor/scripts/submit_project_detail_template.py +120 -0
  233. package/skills/bpmax-project-detail-template-editor/tests/test_project_detail_template_editor.py +369 -0
  234. package/skills/bpmax-role-editor/SKILL.md +251 -0
  235. package/skills/bpmax-role-editor/references/api-workflow.md +30 -0
  236. package/skills/bpmax-role-editor/references/runtime-page-shape.md +18 -0
  237. package/skills/bpmax-role-editor/references/work-file-mapping.md +32 -0
  238. package/skills/bpmax-role-editor/scripts/build_submit_payload.py +38 -0
  239. package/skills/bpmax-role-editor/scripts/confirm_role.py +33 -0
  240. package/skills/bpmax-role-editor/scripts/export_role.py +163 -0
  241. package/skills/bpmax-role-editor/scripts/lint_role_semantics.py +38 -0
  242. package/skills/bpmax-role-editor/scripts/role_editor_common.py +1231 -0
  243. package/skills/bpmax-role-editor/scripts/submit_role.py +144 -0
  244. package/skills/bpmax-role-editor/tests/test_role_editor.py +343 -0
  245. package/skills/bpmax-shared/SKILL.md +1 -1
  246. package/skills/form-control-library/SKILL.md +82 -0
  247. package/skills/form-control-library/agents/openai.yaml +4 -0
  248. package/skills/form-control-library/references/form-controls.md +199 -0
  249. package/skills/form-control-library/references/form-template-submit-schema.md +180 -0
  250. package/skills/form-control-library/references/group-select-runtime.md +191 -0
  251. package/skills/form-control-library/scripts/rebuild_form_control_library.py +55 -0
@@ -0,0 +1,148 @@
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
+ },
116
+ "icon": null,
117
+ "iconColor": null
118
+ }
119
+ ```
120
+
121
+ - 操作列的 `icon` / `iconColor` 不放在列根,默认留空或不写。
122
+ - icon 放到每个操作按钮自身,优先用 `attribute.props.icon`,或显式渲染 `i.ri ri_*` 在按钮文本前。
123
+
124
+ ## 图标列
125
+ - 渲染层会把 `icon` / `iconColor` 作为列外层配置传入
126
+ - 图标不是一定要写进 `createElement`
127
+ - 前后缀插件位也能读取这两个字段
128
+
129
+ ## 人员列
130
+ - 只要列语义涉及人,默认用“头像 + 名称”结构,不要只放姓名字符串
131
+ - 优先复用 `el-avatar`,必要时可退到 `img` + `alt=avatar` 的等效结构
132
+
133
+ ## 排序列
134
+ - 前端读取 `isSort`
135
+ - 排序细节从 `sortConf` 中取
136
+ - 若用户只说“这列支持排序”,优先保留现有列结构,只补:
137
+ - `isSort: true`
138
+ - 合理的 `sortConf`
139
+
140
+ ## 不要混入表单模板字段
141
+ 下面这些是表单模板概念,不应直接写进列表模板列对象:
142
+ - `rule`
143
+ - `value`
144
+ - `field`
145
+ - `field_type`
146
+ - `validateMap`
147
+ - `form_rule_id`
148
+ - `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,103 @@
1
+ # BPMAX 项目列表模板创建与编辑接口工作流
2
+
3
+ ## 适用页面
4
+ - 新建页:`/w:<workspace>/project_detail_table/create`
5
+ - 编辑页:`/w:<workspace>/project_detail_table/<id>`
6
+
7
+ ## 鉴权与执行环境
8
+ - 优先依赖浏览器当前登录态。
9
+ - 优先在页面上下文内执行同域请求,复用已有 Cookie。
10
+ - 可读取的上下文包括:
11
+ - `document.cookie`
12
+ - `localStorage`
13
+ - `sessionStorage`
14
+ - 当前页最近一次提交流量
15
+
16
+ 实践建议:
17
+ - 如果只是为了提交接口,优先直接复用页面里的 `fetch(..., { credentials: 'include' })`。
18
+ - Cookie 信息用于确认和诊断,不应成为唯一提交手段。
19
+
20
+ ## 已确认的接口
21
+
22
+ ### 数据集
23
+ - `GET /api/bpmax/data-set?$workspace=<workspace>&$language=zhCN`
24
+
25
+ 常见参数:
26
+
27
+ ```json
28
+ {
29
+ "flow_type": "flow274424593",
30
+ "flow_key": ""
31
+ }
32
+ ```
33
+
34
+ 返回值用于提供:
35
+ - 可选 `data_set_id`
36
+ - 当前数据集字段列表
37
+
38
+ ### 新建
39
+ - `POST /api/flow_page_template?$workspace=<workspace>&$language=zhCN`
40
+
41
+ 请求体结构:
42
+
43
+ ```json
44
+ {
45
+ "name": "模板名",
46
+ "desc": "",
47
+ "data_set_id": 12345,
48
+ "flow_type": "flow274424593",
49
+ "flow_key": "",
50
+ "type": 1,
51
+ "status": 1,
52
+ "content": "{\"level\":0,\"config\":[...]}"
53
+ }
54
+ ```
55
+
56
+ 特征:
57
+ - 页面新建时会显式附带 `status: 1`
58
+ - `content` 不是对象,而是 JSON 字符串
59
+ - 列表模板当前已知没有额外 `publish` 步骤
60
+
61
+ ### 编辑
62
+ - `GET /api/flow_page_template/<id>?$workspace=<workspace>&$language=zhCN`
63
+ - `PUT /api/flow_page_template/<id>?$workspace=<workspace>&$language=zhCN`
64
+
65
+ 编辑返回体重点字段:
66
+ - `id`
67
+ - `name`
68
+ - `desc`
69
+ - `data_set_id`
70
+ - `content`
71
+
72
+ 编辑提交请求体依旧使用同一套顶层结构:
73
+ - `name`
74
+ - `desc`
75
+ - `data_set_id`
76
+ - `flow_type`
77
+ - `flow_key`
78
+ - `type`
79
+ - `content`
80
+
81
+ ## 类型字段
82
+ - 项目列表模板页面在前端对应 `FLOW_PAGE_TEMPLATE_TYPE.TABLE_LIST`
83
+ - 在当前实现里,列表模板类型就是 `type = 1`
84
+
85
+ ## `content` 的处理
86
+ - 接口接收的是字符串化 JSON
87
+ - 前端编辑页内部会把它反序列化成对象后编辑
88
+ - 提交前需要重新 `JSON.stringify`
89
+
90
+ ## 保存后行为
91
+ - 页面保存成功后会提示成功消息
92
+ - 然后执行 `$router.back()`
93
+ - 因此 skill 如果要核对结果,不能停在“接口 200”
94
+ - 必须主动打开:
95
+ - 新建:`/project_detail_table/<newId>`
96
+ - 编辑:当前 `/project_detail_table/<id>`
97
+
98
+ ## 与表单模板接口的差异
99
+ - 列表模板使用 `/flow_page_template`
100
+ - 表单模板使用 `/form_template`
101
+ - 列表模板没有 `rule/value`
102
+ - 列表模板没有默认 `publish`
103
+ - 列表模板的核心内容在 `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,140 @@
1
+ # 运行时验证过的页面操作方式
2
+
3
+ 这份文档记录的是在真实 `project_detail_table` 页面上验证通过的操作方式,优先级高于纯推断。
4
+
5
+ ## 页面实例定位
6
+
7
+ 在当前 Nuxt 页面中,列表模板编辑页的核心实例可通过递归 Vue 树定位。
8
+
9
+ 可用判定条件:
10
+
11
+ ```js
12
+ Array.isArray(vm.content?.config) &&
13
+ vm.form &&
14
+ typeof vm.save === 'function'
15
+ ```
16
+
17
+ 这个实例通常还具备:
18
+ - `vm.form`
19
+ - `vm.content`
20
+ - `vm.dataSetList`
21
+ - `vm.flow`
22
+ - `vm.$axios`
23
+ - `vm.$router`
24
+
25
+ ## 运行时操作优先级
26
+
27
+ 推荐顺序:
28
+
29
+ 1. 先找页面 Vue 实例
30
+ 2. 优先使用 `vm.$axios`
31
+ 3. 能直接调用 `vm.save()` 时,优先复用页面保存逻辑
32
+ 4. 最后才考虑在浏览器里裸调 `fetch`
33
+
34
+ 原因:
35
+ - 这次实测中,当前页直接裸 `fetch('/api/bpmax/data-set')` 返回了 `403`
36
+ - 但通过页面实例的 `vm.$axios.$post('/flow_page_template', payload)` 创建模板成功
37
+
38
+ ## 推荐操作模式
39
+
40
+ ### 读取当前页面状态
41
+ 优先读:
42
+ - `vm.form`
43
+ - `vm.content`
44
+ - `vm.dataSetList`
45
+ - `vm.flow.data.meta.table_list_template`
46
+
47
+ ### 修改模板
48
+ 优先直接改:
49
+
50
+ ```js
51
+ vm.form.name = '...';
52
+ vm.form.desc = '...';
53
+ vm.form.data_set_id = 716;
54
+ vm.content = { level: 0, config: [...] };
55
+ ```
56
+
57
+ ### 提交
58
+ 若需要自定义创建:
59
+
60
+ ```js
61
+ const payload = {
62
+ ...vm.form,
63
+ flow_key: vm.$route.query.flow_key || '',
64
+ flow_type: vm.$route.query.flow_type || 'default',
65
+ content: JSON.stringify(vm.content),
66
+ type: vm.type,
67
+ status: 1,
68
+ };
69
+ const res = await vm.$axios.$post('/flow_page_template', payload);
70
+ ```
71
+
72
+ 若只是编辑已有模板,优先考虑直接调用页面的 `save()`。
73
+
74
+ ## 创建页默认模板与线上默认模板
75
+ - `create` 页默认骨架不一定等于当前流程线上已挂的默认列表模板
76
+ - 应优先读取:
77
+
78
+ ```js
79
+ vm.flow?.data?.meta?.table_list_template
80
+ ```
81
+
82
+ 再决定是:
83
+ - 基于 create 页默认骨架扩展
84
+ - 还是基于已有线上模板复制增强
85
+
86
+ ## 状态彩色标签的已验证方案
87
+
88
+ 状态标签列可直接使用:
89
+ - `ColorBackgroundText`
90
+
91
+ 已验证可用的列对象形态:
92
+
93
+ ```json
94
+ {
95
+ "title": "状态",
96
+ "props": {
97
+ "width": "110px"
98
+ },
99
+ "createElement": {
100
+ "is": "ColorBackgroundText",
101
+ "attribute": {
102
+ "props": {
103
+ "type": "status",
104
+ "content": {
105
+ "$template": "{const map = {0: '未开始', 1: '进行中', 2: '完结', 3: '延期', 4: '失败', 5: '暂停', 6: '废弃' }; return map[ctx.status] || '未开始'}",
106
+ "eval": true
107
+ },
108
+ "hideStatusPoint": false
109
+ }
110
+ }
111
+ }
112
+ }
113
+ ```
114
+
115
+ ## 当前流程 `flow274424593` 的已验证高价值列
116
+ 基于当前数据集字段,补这些列是合理的:
117
+ - `当前环节`
118
+ - `客户姓名`
119
+ - `客户手机号`
120
+ - `SN`
121
+
122
+ 原因:
123
+ - 都有现成 `dataSetField`
124
+ - 都是列表首屏高频识别字段
125
+ - 不需要额外依赖复杂脚本或插件扩展
126
+
127
+ ## 创建后复核
128
+ 创建成功后,如果接口返回了新 `id`,必须立即跳到:
129
+
130
+ ```text
131
+ /w:<workspace>/project_detail_table/<id>
132
+ ```
133
+
134
+ 然后至少再检查两项:
135
+ - 页面列标题是否符合预期
136
+ - 关键列对象是否真的落成目标结构
137
+
138
+ 例如这次应确认:
139
+ - `状态` 列是否真的使用了 `ColorBackgroundText`
140
+ - 新增的 `SN`、`当前环节`、`客户姓名`、`客户手机号` 是否都已出现在 `content.config[]`