bpmax-cli 0.1.44-beta.8 → 0.1.44
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +5 -3
- package/dist/bin.js +466 -4578
- package/dist/bin.js.map +1 -1
- package/package.json +1 -1
- package/scripts/install-skills.mjs +0 -98
- package/skills/bpmax-auth/SKILL.md +17 -6
- package/skills/bpmax-cli/SKILL.md +0 -2
- package/skills/bpmax-project/SKILL.md +2 -1
- package/skills/bpmax-shared/SKILL.md +1 -1
- package/skills/bpmax-api-platform-editor/SKILL.md +0 -321
- package/skills/bpmax-api-platform-editor/agents/openai.yaml +0 -4
- package/skills/bpmax-api-platform-editor/references/api-doc-debug-workflow.md +0 -34
- package/skills/bpmax-api-platform-editor/references/api-proxy-shape.md +0 -41
- package/skills/bpmax-api-platform-editor/references/instance-config-shape.md +0 -41
- package/skills/bpmax-api-platform-editor/references/platform-api-map.md +0 -52
- package/skills/bpmax-api-platform-editor/references/runtime-workflow.md +0 -32
- package/skills/bpmax-api-platform-editor/scripts/api_platform_editor_common.py +0 -1276
- package/skills/bpmax-api-platform-editor/scripts/build_submit_payload.py +0 -64
- package/skills/bpmax-api-platform-editor/scripts/capture_write_contract.py +0 -40
- package/skills/bpmax-api-platform-editor/scripts/export_layer_bundle.py +0 -212
- package/skills/bpmax-api-platform-editor/scripts/record_doc_debug_acceptance.py +0 -62
- package/skills/bpmax-api-platform-editor/scripts/submit_and_verify_layer.py +0 -75
- package/skills/bpmax-api-platform-editor/tests/test_api_platform_editor.py +0 -287
- package/skills/bpmax-builder-shared/SKILL.md +0 -44
- package/skills/bpmax-builder-shared/base_url.py +0 -81
- package/skills/bpmax-builder-shared/runtime-script-site-matrix.json +0 -71
- package/skills/bpmax-builder-shared/runtime-script-site-matrix.md +0 -34
- package/skills/bpmax-builder-shared/runtime-script-template-catalog.md +0 -123
- package/skills/bpmax-builder-shared/runtime_script_rules.py +0 -272
- package/skills/bpmax-builder-shared/skill_audit.py +0 -374
- package/skills/bpmax-builder-shared/template_script_hard_rules.py +0 -280
- package/skills/bpmax-builder-shared/tests/test_base_url.py +0 -80
- package/skills/bpmax-builder-shared/tests/test_runtime_script_rules.py +0 -115
- package/skills/bpmax-builder-shared/tests/test_skill_audit.py +0 -231
- package/skills/bpmax-builder-shared/tests/test_template_script_hard_rules.py +0 -281
- package/skills/bpmax-config-latest/SKILL.md +0 -71
- package/skills/bpmax-console-template-editor/SKILL.md +0 -536
- package/skills/bpmax-console-template-editor/agents/openai.yaml +0 -4
- package/skills/bpmax-console-template-editor/references/filter-integration.md +0 -60
- package/skills/bpmax-console-template-editor/references/lessons-from-resume-dashboard.md +0 -114
- package/skills/bpmax-console-template-editor/references/local-temp-workflow.md +0 -69
- package/skills/bpmax-console-template-editor/references/module-catalog.md +0 -100
- package/skills/bpmax-console-template-editor/references/runtime-page-shape.md +0 -91
- package/skills/bpmax-console-template-editor/references/template-shape.md +0 -149
- package/skills/bpmax-console-template-editor/scripts/build_submit_payload.py +0 -38
- package/skills/bpmax-console-template-editor/scripts/confirm_console_template.py +0 -33
- package/skills/bpmax-console-template-editor/scripts/console_template_editor_common.py +0 -964
- package/skills/bpmax-console-template-editor/scripts/export_console_template.py +0 -99
- package/skills/bpmax-console-template-editor/scripts/lint_console_template.py +0 -46
- package/skills/bpmax-console-template-editor/scripts/submit_console_template.py +0 -99
- package/skills/bpmax-console-template-editor/tests/test_console_template_editor.py +0 -383
- package/skills/bpmax-dataset-field-template-editor/SKILL.md +0 -600
- package/skills/bpmax-dataset-field-template-editor/references/create-request-gotchas.md +0 -25
- package/skills/bpmax-dataset-field-template-editor/references/field-classify-mapping.md +0 -35
- package/skills/bpmax-dataset-field-template-editor/references/nested-field-patterns.md +0 -24
- package/skills/bpmax-dataset-field-template-editor/references/runtime-verified-field-page-shape.md +0 -61
- package/skills/bpmax-dataset-field-template-editor/references/virtual-field-patterns.md +0 -27
- package/skills/bpmax-dataset-field-template-editor/references/work-file-to-submit-mapping.md +0 -127
- package/skills/bpmax-dataset-field-template-editor/scripts/build_submit_payload.py +0 -67
- package/skills/bpmax-dataset-field-template-editor/scripts/confirm_dataset_field.py +0 -37
- package/skills/bpmax-dataset-field-template-editor/scripts/dataset_field_editor_common.py +0 -784
- package/skills/bpmax-dataset-field-template-editor/scripts/export_dataset_field.py +0 -62
- package/skills/bpmax-dataset-field-template-editor/scripts/init_create_dataset_field.py +0 -104
- package/skills/bpmax-dataset-field-template-editor/scripts/inspect_dataset_field_runtime.py +0 -83
- package/skills/bpmax-dataset-field-template-editor/scripts/lint_dataset_field_semantics.py +0 -35
- package/skills/bpmax-dataset-field-template-editor/scripts/submit_dataset_field.py +0 -95
- package/skills/bpmax-dataset-field-template-editor/tests/test_dataset_field_editor.py +0 -709
- package/skills/bpmax-dataset-field-template-editor/tests/test_init_create_dataset_field.py +0 -59
- package/skills/bpmax-dataset-template-editor/SKILL.md +0 -779
- package/skills/bpmax-dataset-template-editor/references/custom-key-usage-patterns.md +0 -18
- package/skills/bpmax-dataset-template-editor/references/dataset-script-runtime-matrix.md +0 -73
- package/skills/bpmax-dataset-template-editor/references/pre-process-script-authoring-guide.md +0 -186
- package/skills/bpmax-dataset-template-editor/references/pre-process-script-example-catalog.md +0 -106
- package/skills/bpmax-dataset-template-editor/references/runtime-gotchas.md +0 -28
- package/skills/bpmax-dataset-template-editor/references/runtime-verified-dataset-page-shape.md +0 -47
- package/skills/bpmax-dataset-template-editor/references/ui-to-backend-field-map.md +0 -23
- package/skills/bpmax-dataset-template-editor/references/work-file-to-submit-mapping.md +0 -97
- package/skills/bpmax-dataset-template-editor/scripts/basic_table_audit.py +0 -65
- package/skills/bpmax-dataset-template-editor/scripts/build_submit_payload.py +0 -38
- package/skills/bpmax-dataset-template-editor/scripts/dataset_editor_common.py +0 -650
- package/skills/bpmax-dataset-template-editor/scripts/export_dataset.py +0 -155
- package/skills/bpmax-dataset-template-editor/scripts/lint_dataset_template.py +0 -42
- package/skills/bpmax-dataset-template-editor/scripts/resolve_dataset.py +0 -43
- package/skills/bpmax-dataset-template-editor/scripts/scan_custom_key_references.py +0 -27
- package/skills/bpmax-dataset-template-editor/scripts/submit_dataset.py +0 -115
- package/skills/bpmax-dataset-template-editor/scripts/verify_dataset_list.py +0 -52
- package/skills/bpmax-dataset-template-editor/scripts/verify_publish_health.py +0 -39
- package/skills/bpmax-dataset-template-editor/tests/test_dataset_editor.py +0 -373
- package/skills/bpmax-e2e-flow-config-orchestrator/SKILL.md +0 -177
- package/skills/bpmax-e2e-flow-config-orchestrator/agents/openai.yaml +0 -4
- package/skills/bpmax-e2e-flow-config-orchestrator/references/orchestration-matrix.md +0 -60
- package/skills/bpmax-e2e-flow-test-operator/SKILL.md +0 -394
- package/skills/bpmax-e2e-flow-test-operator/agents/openai.yaml +0 -5
- package/skills/bpmax-e2e-flow-test-operator/profiles/negative_sale.json +0 -97
- package/skills/bpmax-e2e-flow-test-operator/profiles/negative_sale_final_v2.json +0 -105
- package/skills/bpmax-e2e-flow-test-operator/profiles/negative_sale_main.json +0 -36
- package/skills/bpmax-e2e-flow-test-operator/profiles/negative_sale_region.json +0 -40
- package/skills/bpmax-e2e-flow-test-operator/references/browser-only-checkpoints.md +0 -41
- package/skills/bpmax-e2e-flow-test-operator/references/failure-update-loop.md +0 -17
- package/skills/bpmax-e2e-flow-test-operator/references/filter-field-discovery.md +0 -40
- package/skills/bpmax-e2e-flow-test-operator/references/minimal-test-loop.md +0 -24
- package/skills/bpmax-e2e-flow-test-operator/references/negative-sale-api-matrix.md +0 -75
- package/skills/bpmax-e2e-flow-test-operator/references/profile-schema.md +0 -107
- package/skills/bpmax-e2e-flow-test-operator/references/skill-experience-coverage-matrix.md +0 -29
- package/skills/bpmax-e2e-flow-test-operator/references/stale-runtime-and-clean-sample-rules.md +0 -54
- package/skills/bpmax-e2e-flow-test-operator/references/state-schema.md +0 -83
- package/skills/bpmax-e2e-flow-test-operator/scripts/bpmax_session.py +0 -287
- package/skills/bpmax-e2e-flow-test-operator/scripts/dealer_sample_on_shelf_plan.json +0 -59
- package/skills/bpmax-e2e-flow-test-operator/scripts/dealer_sample_on_shelf_runner.py +0 -687
- package/skills/bpmax-e2e-flow-test-operator/scripts/e2e_doc.py +0 -121
- package/skills/bpmax-e2e-flow-test-operator/scripts/e2e_state.py +0 -288
- package/skills/bpmax-e2e-flow-test-operator/scripts/flow_api_matrix.py +0 -161
- package/skills/bpmax-e2e-flow-test-operator/scripts/flow_filter_fields.py +0 -138
- package/skills/bpmax-e2e-flow-test-operator/scripts/flow_form_runtime.py +0 -396
- package/skills/bpmax-e2e-flow-test-operator/scripts/flow_runner.py +0 -341
- package/skills/bpmax-e2e-flow-test-operator/scripts/flow_test_profile.py +0 -185
- package/skills/bpmax-e2e-flow-test-operator/tests/test_negative_sale_api_tools.py +0 -138
- package/skills/bpmax-feishu-chat-flow-plugin-editor/SKILL.md +0 -69
- package/skills/bpmax-feishu-chat-flow-plugin-editor/agents/openai.yaml +0 -4
- package/skills/bpmax-feishu-chat-flow-plugin-editor/references/config-checklist.md +0 -42
- package/skills/bpmax-feishu-chat-flow-plugin-editor/references/config-recipes.md +0 -38
- package/skills/bpmax-feishu-chat-flow-plugin-editor/references/config-shape.md +0 -86
- package/skills/bpmax-feishu-chat-flow-plugin-editor/references/gate-lint.md +0 -68
- package/skills/bpmax-feishu-chat-flow-plugin-editor/references/hoocoo-patterns.md +0 -39
- package/skills/bpmax-feishu-chat-flow-plugin-editor/references/runtime-behavior.md +0 -41
- package/skills/bpmax-feishu-chat-flow-plugin-editor/references/script-authoring.md +0 -110
- package/skills/bpmax-feishu-chat-flow-plugin-editor/scripts/lint_feishu_chat_plugin.py +0 -278
- package/skills/bpmax-feishu-chat-flow-plugin-editor/tests/test_lint_feishu_chat_plugin.py +0 -203
- package/skills/bpmax-filter-template-editor/SKILL.md +0 -564
- package/skills/bpmax-filter-template-editor/references/experience-coverage-matrix.md +0 -38
- package/skills/bpmax-filter-template-editor/references/filter-and-flow-binding.md +0 -57
- package/skills/bpmax-filter-template-editor/references/filter-content-schema.md +0 -141
- package/skills/bpmax-filter-template-editor/references/filter-request-shape.md +0 -287
- package/skills/bpmax-filter-template-editor/references/filter-runtime-patterns.md +0 -115
- package/skills/bpmax-filter-template-editor/references/runtime-verified-filter-page-shape.md +0 -94
- package/skills/bpmax-filter-template-editor/scripts/build_submit_payload.py +0 -25
- package/skills/bpmax-filter-template-editor/scripts/confirm_filter_template.py +0 -22
- package/skills/bpmax-filter-template-editor/scripts/export_filter_template.py +0 -57
- package/skills/bpmax-filter-template-editor/scripts/filter_template_editor_common.py +0 -348
- package/skills/bpmax-filter-template-editor/scripts/init_create_filter_template.py +0 -8
- package/skills/bpmax-filter-template-editor/scripts/lint_filter_template_semantics.py +0 -26
- package/skills/bpmax-filter-template-editor/scripts/submit_filter_template.py +0 -62
- package/skills/bpmax-filter-template-editor/tests/test_filter_template_editor.py +0 -231
- package/skills/bpmax-flow-template-editor/SKILL.md +0 -1058
- package/skills/bpmax-flow-template-editor/agents/openai.yaml +0 -4
- package/skills/bpmax-flow-template-editor/references/before-next-step-script-runtime-gotchas.md +0 -62
- package/skills/bpmax-flow-template-editor/references/config-surfaces-and-placeholders.md +0 -270
- package/skills/bpmax-flow-template-editor/references/diff-strategy.md +0 -67
- package/skills/bpmax-flow-template-editor/references/editor-runtime-vs-draft.md +0 -25
- package/skills/bpmax-flow-template-editor/references/flow-template-api-workflow.md +0 -174
- package/skills/bpmax-flow-template-editor/references/intent-model.md +0 -117
- package/skills/bpmax-flow-template-editor/references/lessons-from-price-plan-flow.md +0 -147
- package/skills/bpmax-flow-template-editor/references/local-temp-workflow.md +0 -97
- package/skills/bpmax-flow-template-editor/references/matrix-flow-form-nav-collaboration.md +0 -165
- package/skills/bpmax-flow-template-editor/references/payload-checklist.md +0 -133
- package/skills/bpmax-flow-template-editor/references/project-create-runtime-gotchas.md +0 -54
- package/skills/bpmax-flow-template-editor/references/requirement-to-node-mapping.md +0 -149
- package/skills/bpmax-flow-template-editor/references/runtime-verified-flow-detail-shape.md +0 -41
- package/skills/bpmax-flow-template-editor/references/runtime-verified-meta-fields.md +0 -155
- package/skills/bpmax-flow-template-editor/references/runtime-verified-node-fields.md +0 -179
- package/skills/bpmax-flow-template-editor/references/save-draft-request-shape.md +0 -91
- package/skills/bpmax-flow-template-editor/references/script-review-hard-rules.md +0 -93
- package/skills/bpmax-flow-template-editor/references/work-file-to-submit-mapping.md +0 -57
- package/skills/bpmax-flow-template-editor/scripts/build_submit_payload.py +0 -69
- package/skills/bpmax-flow-template-editor/scripts/confirm_flow_template.py +0 -52
- package/skills/bpmax-flow-template-editor/scripts/export_flow_template.py +0 -114
- package/skills/bpmax-flow-template-editor/scripts/flow_template_editor_common.py +0 -1084
- package/skills/bpmax-flow-template-editor/scripts/submit_flow_template.py +0 -159
- package/skills/bpmax-flow-template-editor/tests/test_flow_template_editor.py +0 -636
- package/skills/bpmax-form-template-editor/SKILL.md +0 -1099
- package/skills/bpmax-form-template-editor/agents/openai.yaml +0 -4
- package/skills/bpmax-form-template-editor/references/form-template-api-workflow.md +0 -203
- package/skills/bpmax-form-template-editor/references/local-temp-workflow.md +0 -125
- package/skills/bpmax-form-template-editor/references/payload-checklist.md +0 -77
- package/skills/bpmax-form-template-editor/references/sub-form-patterns.md +0 -49
- package/skills/bpmax-form-template-editor/scripts/build_submit_payload.py +0 -37
- package/skills/bpmax-form-template-editor/scripts/check_form_template_consistency.py +0 -145
- package/skills/bpmax-form-template-editor/scripts/confirm_form_template.py +0 -67
- package/skills/bpmax-form-template-editor/scripts/export_form_template.py +0 -91
- package/skills/bpmax-form-template-editor/scripts/form_template_editor_common.py +0 -1762
- package/skills/bpmax-form-template-editor/scripts/lint_form_template_semantics.py +0 -30
- package/skills/bpmax-form-template-editor/scripts/record_runtime_acceptance.py +0 -67
- package/skills/bpmax-form-template-editor/scripts/submit_form_template.py +0 -163
- package/skills/bpmax-form-template-editor/tests/test_form_template_editor.py +0 -1292
- package/skills/bpmax-list-template-editor/SKILL.md +0 -468
- package/skills/bpmax-list-template-editor/agents/openai.yaml +0 -4
- package/skills/bpmax-list-template-editor/references/browser-page-contract.md +0 -81
- package/skills/bpmax-list-template-editor/references/content-config-shape.md +0 -148
- package/skills/bpmax-list-template-editor/references/dataset-field-mapping.md +0 -60
- package/skills/bpmax-list-template-editor/references/list-template-api-workflow.md +0 -103
- package/skills/bpmax-list-template-editor/references/local-temp-workflow.md +0 -102
- package/skills/bpmax-list-template-editor/references/payload-checklist.md +0 -47
- package/skills/bpmax-list-template-editor/references/runtime-verified-workflow.md +0 -140
- package/skills/bpmax-list-template-editor/references/special-formats.md +0 -394
- package/skills/bpmax-list-template-editor/scripts/build_submit_payload.py +0 -37
- package/skills/bpmax-list-template-editor/scripts/confirm_list_template.py +0 -33
- package/skills/bpmax-list-template-editor/scripts/export_list_template.py +0 -89
- package/skills/bpmax-list-template-editor/scripts/fetch_data_set.py +0 -34
- package/skills/bpmax-list-template-editor/scripts/lint_list_template_semantics.py +0 -54
- package/skills/bpmax-list-template-editor/scripts/list_template_editor_common.py +0 -955
- package/skills/bpmax-list-template-editor/scripts/record_acceptance.py +0 -55
- package/skills/bpmax-list-template-editor/scripts/submit_list_template.py +0 -117
- package/skills/bpmax-list-template-editor/tests/test_list_template_editor_common.py +0 -441
- package/skills/bpmax-memory-protocol/SKILL.md +0 -72
- package/skills/bpmax-nav-config-editor/SKILL.md +0 -347
- package/skills/bpmax-nav-config-editor/agents/openai.yaml +0 -4
- package/skills/bpmax-nav-config-editor/references/api-workflow.md +0 -68
- package/skills/bpmax-nav-config-editor/references/config-shape.md +0 -78
- package/skills/bpmax-nav-config-editor/references/icon-selection.md +0 -83
- package/skills/bpmax-nav-config-editor/references/path-mapping-rules.md +0 -46
- package/skills/bpmax-nav-config-editor/references/payload-checklist.md +0 -41
- package/skills/bpmax-nav-config-editor/references/runtime-probing.md +0 -47
- package/skills/bpmax-nav-config-editor/scripts/build_submit_payload.py +0 -34
- package/skills/bpmax-nav-config-editor/scripts/confirm_nav_config.py +0 -32
- package/skills/bpmax-nav-config-editor/scripts/export_nav_config.py +0 -56
- package/skills/bpmax-nav-config-editor/scripts/lint_nav_config_semantics.py +0 -33
- package/skills/bpmax-nav-config-editor/scripts/nav_config_editor_common.py +0 -812
- package/skills/bpmax-nav-config-editor/scripts/submit_nav_config.py +0 -44
- package/skills/bpmax-nav-config-editor/scripts/verify_nav_config.py +0 -33
- package/skills/bpmax-nav-config-editor/tests/test_nav_config_editor.py +0 -358
- package/skills/bpmax-nav-config-editor/tests/test_nav_config_editor_common.py +0 -138
- package/skills/bpmax-nav-config-editor/tests/test_nav_config_lint.py +0 -58
- package/skills/bpmax-nav-config-editor/tests/test_nav_config_submit_verify.py +0 -51
- package/skills/bpmax-project-detail-template-editor/SKILL.md +0 -329
- package/skills/bpmax-project-detail-template-editor/agents/openai.yaml +0 -4
- package/skills/bpmax-project-detail-template-editor/references/local-temp-workflow.md +0 -59
- package/skills/bpmax-project-detail-template-editor/references/module-catalog-and-config-notes.md +0 -47
- package/skills/bpmax-project-detail-template-editor/references/payload-checklist.md +0 -33
- package/skills/bpmax-project-detail-template-editor/references/project-detail-template-api-workflow.md +0 -44
- package/skills/bpmax-project-detail-template-editor/scripts/build_submit_payload.py +0 -30
- package/skills/bpmax-project-detail-template-editor/scripts/confirm_project_detail_template.py +0 -33
- package/skills/bpmax-project-detail-template-editor/scripts/export_project_detail_template.py +0 -87
- package/skills/bpmax-project-detail-template-editor/scripts/lint_project_detail_template_semantics.py +0 -37
- package/skills/bpmax-project-detail-template-editor/scripts/project_detail_template_editor_common.py +0 -507
- package/skills/bpmax-project-detail-template-editor/scripts/submit_project_detail_template.py +0 -120
- package/skills/bpmax-project-detail-template-editor/tests/test_project_detail_template_editor.py +0 -369
- package/skills/bpmax-role-editor/SKILL.md +0 -251
- package/skills/bpmax-role-editor/references/api-workflow.md +0 -30
- package/skills/bpmax-role-editor/references/runtime-page-shape.md +0 -18
- package/skills/bpmax-role-editor/references/work-file-mapping.md +0 -32
- package/skills/bpmax-role-editor/scripts/build_submit_payload.py +0 -38
- package/skills/bpmax-role-editor/scripts/confirm_role.py +0 -33
- package/skills/bpmax-role-editor/scripts/export_role.py +0 -163
- package/skills/bpmax-role-editor/scripts/lint_role_semantics.py +0 -38
- package/skills/bpmax-role-editor/scripts/role_editor_common.py +0 -1231
- package/skills/bpmax-role-editor/scripts/submit_role.py +0 -144
- package/skills/bpmax-role-editor/tests/test_role_editor.py +0 -343
- package/skills/bpmax-user-mock-operator/SKILL.md +0 -106
- package/skills/bpmax-user-mock-operator/agents/openai.yaml +0 -4
- package/skills/bpmax-user-mock-operator/scripts/switch_user_identity.py +0 -37
- package/skills/bpmax-user-mock-operator/scripts/user_mock_operator_common.py +0 -136
- package/skills/bpmax-user-mock-operator/tests/test_user_mock_operator.py +0 -138
- package/skills/form-control-library/SKILL.md +0 -82
- package/skills/form-control-library/agents/openai.yaml +0 -4
- package/skills/form-control-library/references/form-controls.md +0 -199
- package/skills/form-control-library/references/form-template-submit-schema.md +0 -180
- package/skills/form-control-library/references/group-select-runtime.md +0 -191
- package/skills/form-control-library/scripts/rebuild_form_control_library.py +0 -55
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
from __future__ import annotations
|
|
2
|
-
|
|
3
|
-
import sys
|
|
4
|
-
import unittest
|
|
5
|
-
from pathlib import Path
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
SCRIPT_DIR = Path(__file__).resolve().parents[1] / "scripts"
|
|
9
|
-
if str(SCRIPT_DIR) not in sys.path:
|
|
10
|
-
sys.path.insert(0, str(SCRIPT_DIR))
|
|
11
|
-
|
|
12
|
-
import nav_config_editor_common as common # noqa: E402
|
|
13
|
-
from test_nav_config_editor_common import make_details # noqa: E402
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
class NavConfigSubmitVerifyTests(unittest.TestCase):
|
|
17
|
-
def test_submission_plan_uses_put_for_existing_ids(self) -> None:
|
|
18
|
-
work = common.detail_to_work_payload(make_details(), workspace="store_mgr")
|
|
19
|
-
submit = common.build_submit_payload(work)
|
|
20
|
-
plan = common.build_submission_plan(submit)
|
|
21
|
-
self.assertEqual([item["method"] for item in plan], ["PUT", "PUT", "PUT", "PUT"])
|
|
22
|
-
self.assertEqual([item["type"] for item in plan], list(common.CONFIG_TYPES))
|
|
23
|
-
|
|
24
|
-
def test_submission_plan_uses_post_when_id_missing(self) -> None:
|
|
25
|
-
work = common.detail_to_work_payload(make_details(), workspace="store_mgr")
|
|
26
|
-
work["configs"]["shortcut_mobile"]["id"] = None
|
|
27
|
-
submit = common.build_submit_payload(work)
|
|
28
|
-
plan = common.build_submission_plan(submit)
|
|
29
|
-
self.assertEqual(plan[-1]["method"], "POST")
|
|
30
|
-
self.assertEqual(plan[-1]["payload"]["type"], "shortcut_mobile")
|
|
31
|
-
|
|
32
|
-
def test_verify_detects_enable_multi_level_drift(self) -> None:
|
|
33
|
-
work = common.detail_to_work_payload(make_details(), workspace="store_mgr")
|
|
34
|
-
submit = common.build_submit_payload(work)
|
|
35
|
-
readback = make_details()
|
|
36
|
-
readback["navmenu"]["content"]["enableMultiLevel"] = False
|
|
37
|
-
verify = common.summarize_verification(submit, readback)
|
|
38
|
-
self.assertFalse(verify["ok"])
|
|
39
|
-
self.assertFalse(verify["checks"]["navmenu"]["match"])
|
|
40
|
-
|
|
41
|
-
def test_verify_accepts_matching_readback(self) -> None:
|
|
42
|
-
work = common.detail_to_work_payload(make_details(), workspace="store_mgr")
|
|
43
|
-
submit = common.build_submit_payload(work)
|
|
44
|
-
verify = common.summarize_verification(submit, make_details())
|
|
45
|
-
self.assertTrue(verify["ok"])
|
|
46
|
-
self.assertTrue(all(item["match"] for item in verify["checks"].values()))
|
|
47
|
-
self.assertEqual(verify["completionStatus"], "runtime_pending")
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
if __name__ == "__main__":
|
|
51
|
-
unittest.main()
|
|
@@ -1,329 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: "bpmax-project-detail-template-editor"
|
|
3
|
-
description: "用于在 BPMAX 的项目详情模板页面中创建、编辑、启用和删除项目详情模板。只要用户提到“新建项目详情模板”“编辑项目详情模板”“启用项目详情模板”“删除项目详情模板”“从当前浏览器项目详情模板页直接提交配置”“让 Codex 构造 flow_page_template type=2 接口数据”或等价表达,就应使用这个 skill。它覆盖列表页检索、创建、编辑、启用、删除,以及编辑页的可视化模式和高级 JSON 模式,统一走线上事实优先 + 本地 temp-file + 双确认 + typed CLI submit + 接口回读 + 浏览器刷新验收。"
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# BPMAX Project Detail Template Editor
|
|
7
|
-
|
|
8
|
-
## 写入路径硬约束
|
|
9
|
-
- 执行前必须先运行 `bpmax-cli config adapters --format json` 核对 `project-detail-template`;只有 `build_status` 和 `submit_status` 都是 `supported` 时才允许进入 build/submit。当前若显示 `blocked`,只能导出、编辑 work、lint 和形成变更建议,不得提交。
|
|
10
|
-
- 在 bpmax-cli npm 分发包中,真实远端写操作只能走 `bpmax-cli config project-detail-template submit`。
|
|
11
|
-
- 旧来源脚本 `scripts/submit*.py` 只保留为结构参考,默认会硬失败;不得用它们直调 BPMAX API。
|
|
12
|
-
- 不得用 `bpmax-cli api POST/PUT/DELETE /flow_page_template*` 或其它 raw API 绕过 typed config submit。
|
|
13
|
-
|
|
14
|
-
## 全局范围门禁
|
|
15
|
-
- 范围 gate 对本 skill 是强要求。任何会修改 BPMAX 配置、线上状态、本地提交体或最终结果的动作,都必须先归类为 `requested`、`required-collateral` 或 `out-of-scope`。
|
|
16
|
-
- 范围 gate 必须基于线上最新配置:分析或编辑配置前,先通过对应 workflow/API 拉取或读取远端最新状态;提交前再次确认本地 work/submit/payload 仍基于该最新远端基线,若线上配置已变化必须停止并重新对照。
|
|
17
|
-
- 只有用户明确要求的 `requested`,或为闭合需求不可避免的 `required-collateral`,才允许进入 work / submit / 线上 payload / 状态变更。
|
|
18
|
-
- `required-collateral` 必须逐项解释“不改会坏/会失真/会不闭合”的原因并取得确认;`out-of-scope` 一律不得提交或顺手混入。
|
|
19
|
-
- 不得以历史脏配置、顺手修复、统一风格、编辑器自动补字段、方便调试为理由修改需求外配置。
|
|
20
|
-
|
|
21
|
-
## 何时使用
|
|
22
|
-
- 用户已经在浏览器打开 BPMAX 项目详情模板列表页、创建页或编辑页。
|
|
23
|
-
- 用户要新建、编辑、启用或删除 `flow_page_template.type = 2` 的项目详情模板。
|
|
24
|
-
- 用户要按自然语言需求调整项目详情页模块、区域和顺序。
|
|
25
|
-
- 用户希望复用当前浏览器登录态,不手动准备独立 API Key。
|
|
26
|
-
|
|
27
|
-
## 前置条件
|
|
28
|
-
- 用户应先打开以下任一页面:
|
|
29
|
-
- `.../w:<workspace>/project_detail_template?flow_type=<flow_type>&flow_key=<flow_key>`
|
|
30
|
-
- `.../w:<workspace>/project_detail_template/create?flow_type=<flow_type>&flow_key=<flow_key>`
|
|
31
|
-
- `.../w:<workspace>/project_detail_template/<id>?flow_type=<flow_type>&flow_key=<flow_key>`
|
|
32
|
-
- 用户需要明确说明:
|
|
33
|
-
- 目标流程 `flow_type`
|
|
34
|
-
- `flow_key` 是否为空或子流程 key
|
|
35
|
-
- 是列表管理、新建、编辑、启用还是删除
|
|
36
|
-
- 具体要增删改哪些模块、在哪个区域、顺序如何变化
|
|
37
|
-
|
|
38
|
-
## Mem0 协议
|
|
39
|
-
- 开始前先调用 [$bpmax-memory-protocol](../bpmax-memory-protocol/SKILL.md),检索词至少包含:
|
|
40
|
-
- `project_detail_template`
|
|
41
|
-
- 模板 `id` / 模板名
|
|
42
|
-
- `flow_type`
|
|
43
|
-
- `flow_key`
|
|
44
|
-
- 关键模块类型,例如 `meta-form`、`project-list`、`step-log`
|
|
45
|
-
- 优先查这些历史信息:
|
|
46
|
-
- 同流程已有详情模板与可复用骨架
|
|
47
|
-
- 某些模块配置的已验证写法
|
|
48
|
-
- 列表页启用或编辑页回显的已知坑点
|
|
49
|
-
- 完成接口回读和浏览器刷新验收后,再写回真正可复用的结论:
|
|
50
|
-
- `decision`:模块选型、区域摆放、验收口径
|
|
51
|
-
- `task_learning`:某类模块配置的稳定写法
|
|
52
|
-
- `anti_pattern`:误把文档当唯一模块源、误把详情模板当表单模板处理
|
|
53
|
-
|
|
54
|
-
## 核心原则
|
|
55
|
-
- 详情模板实体是 `flow_page_template`,模板类型固定为 `type = 2`。
|
|
56
|
-
- 浏览器实时线上页面、真实接口返回、当前页面 query 的 `flow_type/flow_key` 优先级高于本地镜像。
|
|
57
|
-
- 模块能力事实来源优先级:
|
|
58
|
-
- 线上页面与真实接口
|
|
59
|
-
- `ProjectDetailConfig/utils/moduleRegistry.js`
|
|
60
|
-
- `components/DetailSections/README.md`
|
|
61
|
-
- `doc.bpmax.cn/script/ui/project-detail.html`
|
|
62
|
-
- 文档只作公开说明,不是唯一模块清单。
|
|
63
|
-
- 默认主流程不是在对话里手拼 JSON,而是:
|
|
64
|
-
- 线上详情导出到本地 temp file
|
|
65
|
-
- 修改 `work`
|
|
66
|
-
- 第一次确认
|
|
67
|
-
- 构建 `submit`
|
|
68
|
-
- 语义 lint
|
|
69
|
-
- 第二次确认
|
|
70
|
-
- typed CLI submit
|
|
71
|
-
- 接口回读
|
|
72
|
-
- 浏览器刷新验收
|
|
73
|
-
- 项目详情模板不是表单模板:
|
|
74
|
-
- 不使用 `rule/value`
|
|
75
|
-
- 不使用 `publish`
|
|
76
|
-
- 不使用 `origin_template_id`
|
|
77
|
-
- 可视化模式和高级 JSON 模式都支持,但最终提交只认脚本构建后的统一 `content`。
|
|
78
|
-
- 模块顺序就是页面展示顺序。
|
|
79
|
-
- `main_col` / `side_col` 的模块允许范围默认以 `moduleRegistry.js` 为准;源码存在但 registry 未收录的模块,允许作为高级 JSON 模式候选,不默认承诺可视化面板可直接支持。
|
|
80
|
-
- flow 绑定默认以当前页面 query 的 `flow_type/flow_key` 为准,不假设从 `flow.data.meta` 直接读取到详情模板绑定。
|
|
81
|
-
- 详情模块脚本默认查询口径:
|
|
82
|
-
- 前端模块脚本默认优先 `raw-es-search`
|
|
83
|
-
- 后端 helper 默认优先 `ctx.$esQuery(...)` 或已验证的 `rootUser` helper
|
|
84
|
-
- 脚本中禁止使用 `/bpmax/project/list` / 用户态 `ESProjectList`;涉及项目 ES 数据时必须使用 `raw-es-search` + `data_set_key`、后端 `ctx.$esQuery(...)` 或不依赖 project/list 的 helper
|
|
85
|
-
- 只有明确需要“当前登录人可见项目列表”语义时,才允许例外使用 `/bpmax/project/list` / 用户态 `ESProjectList`,且脚本里必须写 `bpmax-allow-user-scope-project-list: <reason>`;否则 lint 阻断
|
|
86
|
-
- 禁止把 `/bpmax/project/list` 返回的 `count` / `total` 当真实总数;该接口可能被 10000 上限截断,真实总数必须用 `raw-es-search` + `track_total_hits=true`
|
|
87
|
-
- 禁止把复杂 SQL join 作为数据集联动默认方案;能按数据集字段查询时,必须把条件下推到 `raw-es-search` / `ctx.$esQuery(...)`
|
|
88
|
-
- 禁止先拉取大批 ES 数据再在脚本里 `find` / `filter` / `some` 匹配;必须直接查询需要的数据并控制 `size`
|
|
89
|
-
- 禁止把 `raw-es-search`、`ctx.$esQuery(...)`、`/bpmax/project/list` 放进逐条 SN / 项目 / 团队循环里形成 N+1;必须批量 terms、aggregation 或预计算
|
|
90
|
-
- 主区 `project-list` 模块如果目标是展示“当前项目下的关联项目表格”,不要默认优先用 `mode: "project"`。
|
|
91
|
-
- 已验证更稳的首选是:`mode: ""` + `format: "table"` + `template_id`。
|
|
92
|
-
- 原因:详情页内嵌的 ES 列表模式在某些页面首屏不会稳定完成内层 `ProjectDefault.init()`,可能出现模板接口回读正确、但页面不拉列表模板也不发列表查询的空壳模块。
|
|
93
|
-
- 如果目标记录本身已经通过 `__p_id` / `project/sub` 挂到当前项目下,优先走父子关联表格模式。
|
|
94
|
-
- 只有在明确需要 ES dataset 查询、且运行态已验证首屏可稳定起表时,才优先使用 `mode: "project"`。
|
|
95
|
-
|
|
96
|
-
## 工作流
|
|
97
|
-
|
|
98
|
-
### 1. 识别当前模式
|
|
99
|
-
- 如果当前在列表页,先判断用户是要:
|
|
100
|
-
- 检索候选模板
|
|
101
|
-
- 新建
|
|
102
|
-
- 编辑
|
|
103
|
-
- 启用
|
|
104
|
-
- 删除
|
|
105
|
-
- 如果当前在 `/project_detail_template/create`,按新建流程处理。
|
|
106
|
-
- 如果当前在 `/project_detail_template/<id>`,按编辑流程处理。
|
|
107
|
-
- 进入真正修改前,先按模板和模块语义检索一次 Mem0。
|
|
108
|
-
|
|
109
|
-
### 2. 获取授权上下文
|
|
110
|
-
- 先在浏览器里确认当前页面登录态。
|
|
111
|
-
- 必要时提取:
|
|
112
|
-
- `document.cookie`
|
|
113
|
-
- 当前页面最近一次同域接口请求头
|
|
114
|
-
- 必要时补看 `localStorage` / `sessionStorage`
|
|
115
|
-
- 默认把 Cookie 组装成:
|
|
116
|
-
|
|
117
|
-
```bash
|
|
118
|
-
export BPMAX_BASE_URL='https://<your-bpmax-host>'
|
|
119
|
-
export BPMAX_COOKIE_HEADER='foo=bar; baz=qux'
|
|
120
|
-
export BPMAX_WORKSPACE='store_mgr'
|
|
121
|
-
```
|
|
122
|
-
|
|
123
|
-
- `BPMAX_BASE_URL` 必须来自当前浏览器页面 origin 或最近一次同域请求的 origin。
|
|
124
|
-
|
|
125
|
-
### 3. 先确认真实线上数据格式
|
|
126
|
-
- 编辑模式优先读取:
|
|
127
|
-
- `GET /api/flow_page_template/:id?type=2&create=&skip_i18n=true`
|
|
128
|
-
- 列表页管理优先读取:
|
|
129
|
-
- `GET /api/flow_page_template?type=2&flow_type=...&flow_key=...`
|
|
130
|
-
- 新建模式默认先找到一个可复用 sample template,再读取:
|
|
131
|
-
- `GET /api/flow_page_template/:sampleId?type=2&create=&skip_i18n=true`
|
|
132
|
-
- 当前已验证项目详情模板 `content` 顶层结构为:
|
|
133
|
-
- `config`
|
|
134
|
-
- `main_col`
|
|
135
|
-
- `side_col`
|
|
136
|
-
- 同步或迁移本 skill 时,排除 `__pycache__` 和 `.pyc`;skill 目录只保留源码与必要文档,不提交 Python 编译产物。
|
|
137
|
-
- 对 `project-list` 的在线验收不要只看接口回读。
|
|
138
|
-
- 至少检查 3 件事:模块是否出现在详情页、是否真的渲染出表格/卡片主体、页面是否发出了符合预期的列表请求或已经出现目标行数据。
|
|
139
|
-
- 只要模块目标是列表数据,模板回读成功不等于页面真实生效。
|
|
140
|
-
|
|
141
|
-
### 3.1 优先检索现有模板
|
|
142
|
-
- 只要需求涉及“新建项目详情模板”或“参考已有模板改一个版本”,先在当前已激活配置仓库检索 `think_flow_page_template` 里的 `type = 2` 候选模板。
|
|
143
|
-
- 输出至少包含:
|
|
144
|
-
- 模板名称
|
|
145
|
-
- 模板路径或唯一标识
|
|
146
|
-
- 为什么判断它可复用
|
|
147
|
-
- 在没有合理理由前,不直接新建语义重复的详情模板。
|
|
148
|
-
|
|
149
|
-
### 3.2 导出到本地临时文件
|
|
150
|
-
- 临时文件目录固定为:
|
|
151
|
-
- `.codex/tmp/project-detail-template-editor/`
|
|
152
|
-
- 编辑已有模板:
|
|
153
|
-
|
|
154
|
-
```bash
|
|
155
|
-
PYTHON_BIN=./venv/bin/python
|
|
156
|
-
[[ -x "$PYTHON_BIN" ]] || PYTHON_BIN=./.venv/bin/python
|
|
157
|
-
[[ -x "$PYTHON_BIN" ]] || PYTHON_BIN=python
|
|
158
|
-
|
|
159
|
-
"$PYTHON_BIN" .codex/skills/bpmax-project-detail-template-editor/scripts/export_project_detail_template.py \
|
|
160
|
-
--template-id 954573597 \
|
|
161
|
-
--workspace store_mgr \
|
|
162
|
-
--cookie-header "$BPMAX_COOKIE_HEADER"
|
|
163
|
-
```
|
|
164
|
-
|
|
165
|
-
- 基于线上样例创建 skeleton:
|
|
166
|
-
|
|
167
|
-
```bash
|
|
168
|
-
"$PYTHON_BIN" .codex/skills/bpmax-project-detail-template-editor/scripts/export_project_detail_template.py \
|
|
169
|
-
--create-skeleton \
|
|
170
|
-
--sample-template-id 954573597 \
|
|
171
|
-
--workspace store_mgr \
|
|
172
|
-
--cookie-header "$BPMAX_COOKIE_HEADER"
|
|
173
|
-
```
|
|
174
|
-
|
|
175
|
-
- `stem` 规则固定为:
|
|
176
|
-
- 编辑:`<template-id>`
|
|
177
|
-
- 新建:`create-<flow_type>-<flow_key|default>-<sampleId>`
|
|
178
|
-
|
|
179
|
-
### 3.3 本地 `work` 文件结构
|
|
180
|
-
- `work/<stem>.json` 是唯一允许人工修改的主文件,结构固定为:
|
|
181
|
-
- `id`
|
|
182
|
-
- `mode`
|
|
183
|
-
- `basic`
|
|
184
|
-
- `content`
|
|
185
|
-
- `meta`
|
|
186
|
-
- `basic` 固定保留:
|
|
187
|
-
- `name`
|
|
188
|
-
- `desc`
|
|
189
|
-
- `type`
|
|
190
|
-
- `flow_type`
|
|
191
|
-
- `flow_key`
|
|
192
|
-
- `status`
|
|
193
|
-
- `content` 固定保留:
|
|
194
|
-
- `config`
|
|
195
|
-
- `main_col`
|
|
196
|
-
- `side_col`
|
|
197
|
-
|
|
198
|
-
### 3.4 第一次确认
|
|
199
|
-
- 修改 `work/<stem>.json` 后,先向用户展示 `diffs/<stem>.work.diff.txt` 的关键变化。
|
|
200
|
-
- 需要明确说清:
|
|
201
|
-
- 改了哪些模块
|
|
202
|
-
- 在 `main_col` 还是 `side_col`
|
|
203
|
-
- 顺序如何变化
|
|
204
|
-
- 用户确认后,再记录:
|
|
205
|
-
|
|
206
|
-
```bash
|
|
207
|
-
"$PYTHON_BIN" .codex/skills/bpmax-project-detail-template-editor/scripts/confirm_project_detail_template.py \
|
|
208
|
-
--stem 954573597 \
|
|
209
|
-
--stage work \
|
|
210
|
-
--actor codex
|
|
211
|
-
```
|
|
212
|
-
|
|
213
|
-
### 4. 构造 submit 文件
|
|
214
|
-
- `submit/<stem>.json` 只能通过脚本从 `work/<stem>.json` 构建,不能手写。
|
|
215
|
-
|
|
216
|
-
```bash
|
|
217
|
-
"$PYTHON_BIN" .codex/skills/bpmax-project-detail-template-editor/scripts/build_submit_payload.py \
|
|
218
|
-
--stem 954573597
|
|
219
|
-
```
|
|
220
|
-
|
|
221
|
-
- 构建规则固定为:
|
|
222
|
-
- 顶层只保留 `name/desc/type/flow_type/flow_key/content`
|
|
223
|
-
- create 模式额外保留 `status`
|
|
224
|
-
- `content` 必须统一 `JSON.stringify({ config, main_col, side_col })`
|
|
225
|
-
|
|
226
|
-
### 5. 语义 lint
|
|
227
|
-
- 在第二次确认和正式提交前,必须先跑:
|
|
228
|
-
|
|
229
|
-
```bash
|
|
230
|
-
"$PYTHON_BIN" .codex/skills/bpmax-project-detail-template-editor/scripts/lint_project_detail_template_semantics.py \
|
|
231
|
-
--stem 954573597
|
|
232
|
-
```
|
|
233
|
-
|
|
234
|
-
- lint 负责拦截:
|
|
235
|
-
- `content.config` 不是对象
|
|
236
|
-
- `content.main_col` / `content.side_col` 不是数组
|
|
237
|
-
- 已知模块被放到非法区域
|
|
238
|
-
- `step-form` 缺少 `flow_step_id`
|
|
239
|
-
- 高风险脚本位点误用 `data_set_id`
|
|
240
|
-
- `content` 不可 JSON 序列化
|
|
241
|
-
- 对未知模块的处理:
|
|
242
|
-
- 默认 warning
|
|
243
|
-
- 允许继续作为高级 JSON 模式候选
|
|
244
|
-
|
|
245
|
-
### 6. 第二次确认
|
|
246
|
-
- 构建完成后,向用户展示 `submit/<stem>.json` 摘要和 `diffs/<stem>.submit.diff.txt`。
|
|
247
|
-
- 用户确认后记录:
|
|
248
|
-
|
|
249
|
-
```bash
|
|
250
|
-
"$PYTHON_BIN" .codex/skills/bpmax-project-detail-template-editor/scripts/confirm_project_detail_template.py \
|
|
251
|
-
--stem 954573597 \
|
|
252
|
-
--stage submit \
|
|
253
|
-
--actor codex
|
|
254
|
-
```
|
|
255
|
-
|
|
256
|
-
### 7. 提交、启用、删除
|
|
257
|
-
- create/edit 提交:
|
|
258
|
-
|
|
259
|
-
```bash
|
|
260
|
-
bpmax-cli config project-detail-template submit \
|
|
261
|
-
--id 954573597 \
|
|
262
|
-
--payload .codex/tmp/project-detail-template-editor/submit/project-detail-template-954573597.json \
|
|
263
|
-
--confirm "submit project-detail-template 954573597"
|
|
264
|
-
```
|
|
265
|
-
|
|
266
|
-
- 启用:
|
|
267
|
-
|
|
268
|
-
```bash
|
|
269
|
-
bpmax-cli config project-detail-template submit \
|
|
270
|
-
--id 954573597 \
|
|
271
|
-
--payload .codex/tmp/project-detail-template-editor/submit/project-detail-template-954573597-activate.json \
|
|
272
|
-
--confirm "submit project-detail-template 954573597"
|
|
273
|
-
```
|
|
274
|
-
|
|
275
|
-
- 删除:
|
|
276
|
-
|
|
277
|
-
```bash
|
|
278
|
-
bpmax-cli config project-detail-template submit \
|
|
279
|
-
--id 954573597 \
|
|
280
|
-
--payload .codex/tmp/project-detail-template-editor/submit/project-detail-template-954573597-delete.json \
|
|
281
|
-
--confirm "submit project-detail-template 954573597"
|
|
282
|
-
```
|
|
283
|
-
|
|
284
|
-
- 旧 `submit_project_detail_template.py` 只保留为结构参考,默认会硬失败;不得用它直调 `flow_page_template`。
|
|
285
|
-
|
|
286
|
-
## 输出要求
|
|
287
|
-
- 明确告诉用户本次是列表管理、新建、编辑、启用还是删除。
|
|
288
|
-
- 明确告诉用户这次用到的核心接口:
|
|
289
|
-
- `GET /api/flow_page_template/:id?type=2&create=&skip_i18n=true`
|
|
290
|
-
- `POST /api/flow_page_template`
|
|
291
|
-
- `PUT /api/flow_page_template/:id`
|
|
292
|
-
- `DELETE /api/flow_page_template/:id`
|
|
293
|
-
- 明确告诉用户这次用到的本地文件:
|
|
294
|
-
- `raw/<stem>.json`
|
|
295
|
-
- `work/<stem>.json`
|
|
296
|
-
- `submit/<stem>.json`
|
|
297
|
-
- `meta/<stem>.json`
|
|
298
|
-
- `result/<stem>.readback.json`
|
|
299
|
-
- `result/<stem>.verify.json`
|
|
300
|
-
- `result/<stem>.semantic-lint.json`
|
|
301
|
-
- 如果改了模块布局,要说明:
|
|
302
|
-
- 哪些模块被新增、删除或移动
|
|
303
|
-
- 位于 `main_col` 还是 `side_col`
|
|
304
|
-
- 顺序如何变化
|
|
305
|
-
- 说明哪些模块能力来自源码事实,哪些只是来自公开文档。
|
|
306
|
-
|
|
307
|
-
## 参考资料
|
|
308
|
-
- 创建/编辑/启用/删除接口: [references/project-detail-template-api-workflow.md](./references/project-detail-template-api-workflow.md)
|
|
309
|
-
- 本地 temp-file 闭环: [references/local-temp-workflow.md](./references/local-temp-workflow.md)
|
|
310
|
-
- 提交前检查清单: [references/payload-checklist.md](./references/payload-checklist.md)
|
|
311
|
-
- 模块目录与配置注意事项: [references/module-catalog-and-config-notes.md](./references/module-catalog-and-config-notes.md)
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
## bpmax-cli 统一执行入口
|
|
315
|
-
|
|
316
|
-
本 npm 分发版必须优先使用 typed CLI 命令,不要让 Agent 直接拼 raw API 或直接运行旧来源脚本提交配置:
|
|
317
|
-
|
|
318
|
-
```bash
|
|
319
|
-
bpmax-cli config project-detail-template export --id <id> --out .codex/tmp/project-detail-template-editor
|
|
320
|
-
bpmax-cli config project-detail-template lint --work .codex/tmp/project-detail-template-editor/work/<file>.json
|
|
321
|
-
bpmax-cli config project-detail-template build --work .codex/tmp/project-detail-template-editor/work/<file>.json --meta .codex/tmp/project-detail-template-editor/meta/<file>.meta.json --out .codex/tmp/project-detail-template-editor/submit/<file>.json
|
|
322
|
-
bpmax-cli config project-detail-template submit --id <id> --payload .codex/tmp/project-detail-template-editor/submit/<file>.json
|
|
323
|
-
bpmax-cli config project-detail-template submit --id <id> --payload .codex/tmp/project-detail-template-editor/submit/<file>.json --confirm "submit project-detail-template <id>"
|
|
324
|
-
bpmax-cli config project-detail-template verify --id <id> --expect .codex/tmp/project-detail-template-editor/work/<file>.json
|
|
325
|
-
```
|
|
326
|
-
|
|
327
|
-
授权前置:当前 profile 必须通过校对码授权,并在授权页开启“配置能力”。如果 CLI 返回 capability 缺失,停止并让用户使用有管理权限的账号重新授权。
|
|
328
|
-
|
|
329
|
-
旧来源中的 `scripts/` 和 `references/` 只作为字段结构、lint 规则和验收规则参考;真实远端写操作必须走 `bpmax-cli config project-detail-template submit`,保留 dry-run、二次确认、审计和回读验证。
|
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
# BPMAX 项目详情模板本地临时文件闭环
|
|
2
|
-
|
|
3
|
-
## 临时目录
|
|
4
|
-
- 固定写到 `.codex/tmp/project-detail-template-editor/`
|
|
5
|
-
- 子目录:
|
|
6
|
-
- `raw/`
|
|
7
|
-
- `work/`
|
|
8
|
-
- `meta/`
|
|
9
|
-
- `submit/`
|
|
10
|
-
- `diffs/`
|
|
11
|
-
- `result/`
|
|
12
|
-
|
|
13
|
-
## 主流程
|
|
14
|
-
1. 先用真实线上接口读取详情或 sample template
|
|
15
|
-
2. 导出 `raw/work/meta`
|
|
16
|
-
3. 修改 `work`
|
|
17
|
-
4. 展示 `work diff` 并做第一次确认
|
|
18
|
-
5. 构建 `submit`
|
|
19
|
-
6. 跑 `semantic-lint`
|
|
20
|
-
7. 展示 `submit diff` 并做第二次确认
|
|
21
|
-
8. 脚本提交
|
|
22
|
-
9. 接口回读并生成 `verify.json`
|
|
23
|
-
10. 刷新浏览器编辑页或列表页验收
|
|
24
|
-
|
|
25
|
-
## `work/<stem>.json` 结构
|
|
26
|
-
- `id`
|
|
27
|
-
- `mode`
|
|
28
|
-
- `basic`
|
|
29
|
-
- `content`
|
|
30
|
-
- `meta`
|
|
31
|
-
|
|
32
|
-
## `basic` 固定字段
|
|
33
|
-
- `name`
|
|
34
|
-
- `desc`
|
|
35
|
-
- `type`
|
|
36
|
-
- `flow_type`
|
|
37
|
-
- `flow_key`
|
|
38
|
-
- `status`
|
|
39
|
-
|
|
40
|
-
## `content` 固定字段
|
|
41
|
-
- `config`
|
|
42
|
-
- `main_col`
|
|
43
|
-
- `side_col`
|
|
44
|
-
|
|
45
|
-
## `meta` 最低要求
|
|
46
|
-
- `stem`
|
|
47
|
-
- `mode`
|
|
48
|
-
- `templateId`
|
|
49
|
-
- `templateUuid`
|
|
50
|
-
- `sampleTemplateId`
|
|
51
|
-
- `workspace`
|
|
52
|
-
- `requestUrl`
|
|
53
|
-
- `workSha256`
|
|
54
|
-
- `submitSha256`
|
|
55
|
-
- `workConfirmedAt`
|
|
56
|
-
- `submitConfirmedAt`
|
|
57
|
-
- `submitBuiltAt`
|
|
58
|
-
- `lintPassed`
|
|
59
|
-
- `status`
|
package/skills/bpmax-project-detail-template-editor/references/module-catalog-and-config-notes.md
DELETED
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
# 项目详情模板模块目录与配置注意事项
|
|
2
|
-
|
|
3
|
-
## 模块事实来源优先级
|
|
4
|
-
1. 当前线上页面与真实接口
|
|
5
|
-
2. `components/ProjectDetailConfig/utils/moduleRegistry.js`
|
|
6
|
-
3. `components/DetailSections/README.md`
|
|
7
|
-
4. `doc.bpmax.cn/script/ui/project-detail.html`
|
|
8
|
-
|
|
9
|
-
## 当前已知模块区域约束
|
|
10
|
-
- `main_col` 常见:
|
|
11
|
-
- `project-info`
|
|
12
|
-
- `meta-form`
|
|
13
|
-
- `step-form`
|
|
14
|
-
- `step-form-any`
|
|
15
|
-
- `comment-list`
|
|
16
|
-
- `project-list`
|
|
17
|
-
- `finance`
|
|
18
|
-
- `customer-binding`
|
|
19
|
-
- `step-arrange`
|
|
20
|
-
- `periods`
|
|
21
|
-
- `auto-replay-info`
|
|
22
|
-
- `delay-reason`
|
|
23
|
-
- `generate-report`
|
|
24
|
-
- `project-detail-panel`
|
|
25
|
-
- `project-meta-info`
|
|
26
|
-
- `project-reopen`
|
|
27
|
-
- `side_col` 常见:
|
|
28
|
-
- `project-info`
|
|
29
|
-
- `comment-list`
|
|
30
|
-
- `project-list`
|
|
31
|
-
- `step-log`
|
|
32
|
-
- `attachment-list`
|
|
33
|
-
- `circulate`
|
|
34
|
-
- `project-meta-info`
|
|
35
|
-
- `custom-form-list`
|
|
36
|
-
|
|
37
|
-
## 处理原则
|
|
38
|
-
- `moduleRegistry.js` 中不存在,但源码或历史模板存在的模块:
|
|
39
|
-
- 允许作为高级 JSON 模式候选
|
|
40
|
-
- 默认不承诺可视化面板一定能直接新增或编辑
|
|
41
|
-
- `project-list`:
|
|
42
|
-
- 主区默认看 `flow_type/flow_key/mode/query`
|
|
43
|
-
- 侧栏常见 `isSubProcess = true`
|
|
44
|
-
- `step-form`:
|
|
45
|
-
- 必须显式配置 `flow_step_id`
|
|
46
|
-
- 模块顺序:
|
|
47
|
-
- 数组顺序就是页面渲染顺序
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
# 项目详情模板 Payload 检查清单
|
|
2
|
-
|
|
3
|
-
## 导出前
|
|
4
|
-
- 是否已经确认当前页面是 `project_detail_template` 而不是列表模板或筛选器模板
|
|
5
|
-
- 是否已经通过真实接口拿到当前 `type=2` 详情
|
|
6
|
-
- create 模式是否已经锁定 sample template
|
|
7
|
-
|
|
8
|
-
## work 文件
|
|
9
|
-
- `basic.type` 是否固定为 `2`
|
|
10
|
-
- `basic.flow_type` / `basic.flow_key` 是否来自当前页面 query
|
|
11
|
-
- `content.config` 是否仍是对象
|
|
12
|
-
- `content.main_col` / `content.side_col` 是否仍是数组
|
|
13
|
-
- 模块顺序是否就是页面目标展示顺序
|
|
14
|
-
- `step-form.config.flow_step_id` 是否完整
|
|
15
|
-
- `project-list` 是否按主区/侧栏模式配置
|
|
16
|
-
|
|
17
|
-
## submit 文件
|
|
18
|
-
- 是否由 `build_submit_payload.py` 构建
|
|
19
|
-
- 顶层是否只保留真实提交字段
|
|
20
|
-
- `content` 是否已经统一字符串化
|
|
21
|
-
- 是否没有混入 `rule/value/publish/origin_template_id`
|
|
22
|
-
|
|
23
|
-
## lint
|
|
24
|
-
- side-only 模块是否误放进 `main_col`
|
|
25
|
-
- `content` 是否 JSON 可序列化
|
|
26
|
-
- 高风险脚本位点是否没有 `data_set_id` 误用
|
|
27
|
-
- 未知模块是否只作为高级 JSON 模式候选,而不是误判为可视化可配
|
|
28
|
-
|
|
29
|
-
## 提交后
|
|
30
|
-
- 顶层 `name/desc/type/flow_type/flow_key` 是否回读一致
|
|
31
|
-
- `content.config/main_col/side_col` 是否回读一致
|
|
32
|
-
- 浏览器编辑页是否回显目标模块顺序和标题
|
|
33
|
-
- 若做启用/删除,列表页状态是否同步更新
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
# BPMAX 项目详情模板接口与本地文件工作流
|
|
2
|
-
|
|
3
|
-
## 适用页面
|
|
4
|
-
- 列表页:`/w:<workspace>/project_detail_template?flow_type=<flow_type>&flow_key=<flow_key>`
|
|
5
|
-
- 新建页:`/w:<workspace>/project_detail_template/create?flow_type=<flow_type>&flow_key=<flow_key>`
|
|
6
|
-
- 编辑页:`/w:<workspace>/project_detail_template/<id>?flow_type=<flow_type>&flow_key=<flow_key>`
|
|
7
|
-
|
|
8
|
-
## 真实线上接口
|
|
9
|
-
- 详情读取:`GET /api/flow_page_template/:id?type=2&create=&skip_i18n=true`
|
|
10
|
-
- 新建:`POST /api/flow_page_template`
|
|
11
|
-
- 编辑:`PUT /api/flow_page_template/:id`
|
|
12
|
-
- 启用:`PUT /api/flow_page_template/:id`
|
|
13
|
-
- 删除:`DELETE /api/flow_page_template/:id`
|
|
14
|
-
|
|
15
|
-
## 提交体口径
|
|
16
|
-
- `type` 固定为 `2`
|
|
17
|
-
- create/edit 提交体只保留:
|
|
18
|
-
- `name`
|
|
19
|
-
- `desc`
|
|
20
|
-
- `type`
|
|
21
|
-
- `flow_type`
|
|
22
|
-
- `flow_key`
|
|
23
|
-
- `content`
|
|
24
|
-
- create 模式额外保留:
|
|
25
|
-
- `status`
|
|
26
|
-
- `content` 必须是 `JSON.stringify({ config, main_col, side_col })`
|
|
27
|
-
|
|
28
|
-
## 启用动作最小 body
|
|
29
|
-
```json
|
|
30
|
-
{
|
|
31
|
-
"status": 1,
|
|
32
|
-
"flow_type": "flow801021391",
|
|
33
|
-
"flow_key": ""
|
|
34
|
-
}
|
|
35
|
-
```
|
|
36
|
-
|
|
37
|
-
## 验证事实
|
|
38
|
-
- 编辑页当前已验证会请求:
|
|
39
|
-
- `GET /api/flow_page_template/:id?type=2&create=&skip_i18n=true`
|
|
40
|
-
- 编辑页前端提交逻辑当前已验证:
|
|
41
|
-
- create -> `POST /api/flow_page_template`
|
|
42
|
-
- edit -> `PUT /api/flow_page_template/:id`
|
|
43
|
-
- 列表页启用逻辑当前已验证:
|
|
44
|
-
- `PUT /api/flow_page_template/:id` with `status/flow_type/flow_key`
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env python3
|
|
2
|
-
from __future__ import annotations
|
|
3
|
-
|
|
4
|
-
import argparse
|
|
5
|
-
|
|
6
|
-
from project_detail_template_editor_common import build_submit_payload, dump_json, load_json, paths_for, update_build_meta, write_diff
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
def build_parser() -> argparse.ArgumentParser:
|
|
10
|
-
p = argparse.ArgumentParser(description="Build the final BPMAX project-detail-template submit payload from a local work file.")
|
|
11
|
-
p.add_argument("--stem", required=True)
|
|
12
|
-
return p
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
def main() -> int:
|
|
16
|
-
args = build_parser().parse_args()
|
|
17
|
-
paths = paths_for(args.stem)
|
|
18
|
-
work = load_json(paths["work"])
|
|
19
|
-
submit = build_submit_payload(work)
|
|
20
|
-
dump_json(paths["submit"], submit)
|
|
21
|
-
write_diff(paths["submit_diff"], work, submit, "work", "submit")
|
|
22
|
-
update_build_meta(paths["meta"], stem=args.stem, work_path=paths["work"], submit_path=paths["submit"])
|
|
23
|
-
print(paths["submit"])
|
|
24
|
-
print(paths["submit_diff"])
|
|
25
|
-
print(paths["meta"])
|
|
26
|
-
return 0
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
if __name__ == "__main__":
|
|
30
|
-
raise SystemExit(main())
|
package/skills/bpmax-project-detail-template-editor/scripts/confirm_project_detail_template.py
DELETED
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env python3
|
|
2
|
-
from __future__ import annotations
|
|
3
|
-
|
|
4
|
-
import argparse
|
|
5
|
-
|
|
6
|
-
from project_detail_template_editor_common import paths_for, update_confirmation_state
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
def build_parser() -> argparse.ArgumentParser:
|
|
10
|
-
p = argparse.ArgumentParser(description="Persist local confirmation state for BPMAX project-detail-template work or submit artifacts.")
|
|
11
|
-
p.add_argument("--stem", required=True)
|
|
12
|
-
p.add_argument("--stage", required=True, choices=("work", "submit"))
|
|
13
|
-
p.add_argument("--actor", default="codex")
|
|
14
|
-
return p
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
def main() -> int:
|
|
18
|
-
args = build_parser().parse_args()
|
|
19
|
-
paths = paths_for(args.stem)
|
|
20
|
-
update_confirmation_state(
|
|
21
|
-
paths["meta"],
|
|
22
|
-
stem=args.stem,
|
|
23
|
-
actor=args.actor,
|
|
24
|
-
stage=args.stage,
|
|
25
|
-
work_path=paths["work"],
|
|
26
|
-
submit_path=paths["submit"],
|
|
27
|
-
)
|
|
28
|
-
print(paths["meta"])
|
|
29
|
-
return 0
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
if __name__ == "__main__":
|
|
33
|
-
raise SystemExit(main())
|