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,121 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env python3
|
|
2
|
-
import argparse
|
|
3
|
-
import json
|
|
4
|
-
from pathlib import Path
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
def main():
|
|
8
|
-
parser = argparse.ArgumentParser()
|
|
9
|
-
parser.add_argument("--state", required=True)
|
|
10
|
-
parser.add_argument("--output", required=True)
|
|
11
|
-
args = parser.parse_args()
|
|
12
|
-
|
|
13
|
-
state = json.loads(Path(args.state).read_text(encoding="utf-8"))
|
|
14
|
-
scenarios = state.get("scenarios", [])
|
|
15
|
-
issues = state.get("issues", [])
|
|
16
|
-
counts = {"pass": 0, "fail": 0, "blocked": 0, "pending": 0}
|
|
17
|
-
for item in scenarios:
|
|
18
|
-
counts[item["status"]] = counts.get(item["status"], 0) + 1
|
|
19
|
-
|
|
20
|
-
lines = []
|
|
21
|
-
lines.append(f"# {state['title']}测试文档")
|
|
22
|
-
lines.append("")
|
|
23
|
-
lines.append("## 1. 流程范围")
|
|
24
|
-
lines.append(f"- 工作区:`{state.get('workspace', '')}`")
|
|
25
|
-
lines.append(f"- `flow_type`:`{state.get('flow_type', '')}`")
|
|
26
|
-
if state.get("dependencies"):
|
|
27
|
-
lines.append("- 关键依赖:")
|
|
28
|
-
for k, v in state["dependencies"].items():
|
|
29
|
-
lines.append(f" - `{k}`: `{v}`")
|
|
30
|
-
lines.append("")
|
|
31
|
-
lines.append("## 2. AI 自动测试结论")
|
|
32
|
-
lines.append(f"- 已测场景数:`{len(scenarios)}`")
|
|
33
|
-
lines.append(f"- 通过:`{counts['pass']}`")
|
|
34
|
-
lines.append(f"- 失败:`{counts['fail']}`")
|
|
35
|
-
lines.append(f"- 阻塞:`{counts['blocked']}`")
|
|
36
|
-
lines.append(f"- 待测:`{counts['pending']}`")
|
|
37
|
-
lines.append("")
|
|
38
|
-
lines.append("### 2.1 已测场景")
|
|
39
|
-
for item in scenarios:
|
|
40
|
-
lines.append(f"- `{item['id']}` {item['title']}:`{item['status']}`")
|
|
41
|
-
if item.get("sample"):
|
|
42
|
-
lines.append(f" - 样本:`{item['sample']}`")
|
|
43
|
-
if item.get("note"):
|
|
44
|
-
lines.append(f" - 说明:{item['note']}")
|
|
45
|
-
lines.append("")
|
|
46
|
-
lines.append("### 2.2 尚存问题")
|
|
47
|
-
if issues:
|
|
48
|
-
for item in issues:
|
|
49
|
-
lines.append(f"- `{item['status']}` {item['title']}")
|
|
50
|
-
if item.get("note"):
|
|
51
|
-
lines.append(f" - {item['note']}")
|
|
52
|
-
else:
|
|
53
|
-
lines.append("- 无")
|
|
54
|
-
if state.get("artifacts"):
|
|
55
|
-
lines.append("")
|
|
56
|
-
lines.append("### 2.3 证据产物")
|
|
57
|
-
for item in state.get("artifacts", []):
|
|
58
|
-
lines.append(f"- `{item.get('kind', 'artifact')}` {item.get('path', '')}")
|
|
59
|
-
if item.get("note"):
|
|
60
|
-
lines.append(f" - {item['note']}")
|
|
61
|
-
if state.get("browser_only_steps"):
|
|
62
|
-
lines.append("")
|
|
63
|
-
lines.append("### 2.4 浏览器保留点")
|
|
64
|
-
for item in state.get("browser_only_steps", []):
|
|
65
|
-
lines.append(f"- {item.get('title', '')}")
|
|
66
|
-
if item.get("reason"):
|
|
67
|
-
lines.append(f" - {item['reason']}")
|
|
68
|
-
if state.get("identity_steps") or state.get("role_contexts"):
|
|
69
|
-
lines.append("")
|
|
70
|
-
lines.append("### 2.5 多角色浏览器身份")
|
|
71
|
-
if state.get("role_contexts"):
|
|
72
|
-
lines.append("- 角色矩阵:")
|
|
73
|
-
for item in state.get("role_contexts", []):
|
|
74
|
-
lines.append(
|
|
75
|
-
f" - `{item.get('role', '')}`: `{item.get('user_name', '')}` / `{item.get('user_id', '')}`"
|
|
76
|
-
)
|
|
77
|
-
if item.get("expected_actions"):
|
|
78
|
-
lines.append(f" - 动作:{item['expected_actions']}")
|
|
79
|
-
if state.get("identity_steps"):
|
|
80
|
-
lines.append("- 身份切换记录:")
|
|
81
|
-
for item in state.get("identity_steps", []):
|
|
82
|
-
lines.append(
|
|
83
|
-
f" - `{item.get('action', '')}` `{item.get('role', '')}` "
|
|
84
|
-
f"`{item.get('target_user_id', '')}`: `{item.get('status', '')}`"
|
|
85
|
-
)
|
|
86
|
-
if item.get("evidence"):
|
|
87
|
-
lines.append(f" - 证据:{item['evidence']}")
|
|
88
|
-
if state.get("identity_cleanup"):
|
|
89
|
-
cleanup = state["identity_cleanup"]
|
|
90
|
-
lines.append(
|
|
91
|
-
f"- 恢复原始身份:`{cleanup.get('unmock_done', False)}`,"
|
|
92
|
-
f"当前账号:`{cleanup.get('restored_user', '')}`"
|
|
93
|
-
)
|
|
94
|
-
lines.append("")
|
|
95
|
-
lines.append("## 3. 给测试人员的操作手册")
|
|
96
|
-
lines.append("### 3.1 前置数据")
|
|
97
|
-
lines.append("- 按业务准备测试账号、门店、物料、库存 SN、历史销售单或补录数据。")
|
|
98
|
-
lines.append("- 优先复用本文档 2.1 中已验证样本对应的数据口径。")
|
|
99
|
-
lines.append("")
|
|
100
|
-
lines.append("### 3.2 测试步骤")
|
|
101
|
-
for item in scenarios:
|
|
102
|
-
lines.append(f"- {item['id']}:{item['title']}")
|
|
103
|
-
lines.append("")
|
|
104
|
-
lines.append("### 3.3 预期结果")
|
|
105
|
-
lines.append("- 逐场景以 2.1 中的通过标准为准。")
|
|
106
|
-
if state.get("runtime_bindings"):
|
|
107
|
-
lines.append("")
|
|
108
|
-
lines.append("## 4. 运行时绑定")
|
|
109
|
-
for k, v in state["runtime_bindings"].items():
|
|
110
|
-
lines.append(f"- `{k}`: `{v}`")
|
|
111
|
-
if state.get("next_step"):
|
|
112
|
-
lines.append("")
|
|
113
|
-
lines.append("## 5. 下一步")
|
|
114
|
-
lines.append(f"- {state['next_step']}")
|
|
115
|
-
|
|
116
|
-
Path(args.output).write_text("\n".join(lines) + "\n", encoding="utf-8")
|
|
117
|
-
print(args.output)
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
if __name__ == "__main__":
|
|
121
|
-
main()
|
|
@@ -1,288 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env python3
|
|
2
|
-
import argparse
|
|
3
|
-
import json
|
|
4
|
-
from datetime import datetime, timezone
|
|
5
|
-
from pathlib import Path
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
ROOT = Path(__file__).resolve().parents[4]
|
|
9
|
-
STATE_DIR = ROOT / ".codex" / "tmp" / "e2e_states"
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
def now_iso():
|
|
13
|
-
return datetime.now(timezone.utc).astimezone().isoformat(timespec="seconds")
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
def state_path(state_id: str) -> Path:
|
|
17
|
-
return STATE_DIR / f"{state_id}.json"
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
def load(path: Path) -> dict:
|
|
21
|
-
if not path.exists():
|
|
22
|
-
raise SystemExit(f"state not found: {path}")
|
|
23
|
-
return json.loads(path.read_text(encoding="utf-8"))
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
def save(path: Path, data: dict) -> None:
|
|
27
|
-
path.parent.mkdir(parents=True, exist_ok=True)
|
|
28
|
-
data["updated_at"] = now_iso()
|
|
29
|
-
path.write_text(json.dumps(data, ensure_ascii=False, indent=2) + "\n", encoding="utf-8")
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
def parse_kv_pairs(items):
|
|
33
|
-
result = {}
|
|
34
|
-
for item in items or []:
|
|
35
|
-
if "=" not in item:
|
|
36
|
-
continue
|
|
37
|
-
k, v = item.split("=", 1)
|
|
38
|
-
result[k.strip()] = v.strip()
|
|
39
|
-
return result
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
def cmd_init(args):
|
|
43
|
-
path = state_path(args.id)
|
|
44
|
-
data = {
|
|
45
|
-
"id": args.id,
|
|
46
|
-
"title": args.title,
|
|
47
|
-
"workspace": args.workspace,
|
|
48
|
-
"flow_type": args.flow_type,
|
|
49
|
-
"dependencies": parse_kv_pairs(args.dep),
|
|
50
|
-
"scenarios": [],
|
|
51
|
-
"samples": [],
|
|
52
|
-
"issues": [],
|
|
53
|
-
"artifacts": [],
|
|
54
|
-
"endpoint_calls": [],
|
|
55
|
-
"browser_only_steps": [],
|
|
56
|
-
"runtime_bindings": {},
|
|
57
|
-
"next_step": "",
|
|
58
|
-
}
|
|
59
|
-
save(path, data)
|
|
60
|
-
print(path)
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
def upsert_scenario(data, scenario_id, title=None):
|
|
64
|
-
for item in data["scenarios"]:
|
|
65
|
-
if item["id"] == scenario_id:
|
|
66
|
-
if title:
|
|
67
|
-
item["title"] = title
|
|
68
|
-
return item
|
|
69
|
-
item = {"id": scenario_id, "title": title or scenario_id, "status": "pending", "sample": "", "note": ""}
|
|
70
|
-
data["scenarios"].append(item)
|
|
71
|
-
return item
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
def cmd_record(args):
|
|
75
|
-
path = state_path(args.id)
|
|
76
|
-
data = load(path)
|
|
77
|
-
item = upsert_scenario(data, args.scenario, args.title)
|
|
78
|
-
item["status"] = args.status
|
|
79
|
-
if args.sample:
|
|
80
|
-
item["sample"] = args.sample
|
|
81
|
-
data["samples"].append({"scenario": args.scenario, "value": args.sample, "at": now_iso()})
|
|
82
|
-
if args.note:
|
|
83
|
-
item["note"] = args.note
|
|
84
|
-
save(path, data)
|
|
85
|
-
print(json.dumps(item, ensure_ascii=False, indent=2))
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
def cmd_issue(args):
|
|
89
|
-
path = state_path(args.id)
|
|
90
|
-
data = load(path)
|
|
91
|
-
data["issues"].append({
|
|
92
|
-
"title": args.title,
|
|
93
|
-
"status": args.status,
|
|
94
|
-
"owner_skill": args.owner_skill,
|
|
95
|
-
"note": args.note,
|
|
96
|
-
"at": now_iso(),
|
|
97
|
-
})
|
|
98
|
-
save(path, data)
|
|
99
|
-
print("ok")
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
def cmd_next(args):
|
|
103
|
-
path = state_path(args.id)
|
|
104
|
-
data = load(path)
|
|
105
|
-
data["next_step"] = args.text
|
|
106
|
-
save(path, data)
|
|
107
|
-
print(data["next_step"])
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
def record_artifacts(state_id: str, items):
|
|
111
|
-
path = state_path(state_id)
|
|
112
|
-
data = load(path)
|
|
113
|
-
data.setdefault("artifacts", [])
|
|
114
|
-
data["artifacts"].extend(items or [])
|
|
115
|
-
save(path, data)
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
def record_endpoint_calls(state_id: str, items):
|
|
119
|
-
path = state_path(state_id)
|
|
120
|
-
data = load(path)
|
|
121
|
-
data.setdefault("endpoint_calls", [])
|
|
122
|
-
data["endpoint_calls"].extend(items or [])
|
|
123
|
-
save(path, data)
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
def record_browser_only_steps(state_id: str, items):
|
|
127
|
-
path = state_path(state_id)
|
|
128
|
-
data = load(path)
|
|
129
|
-
data.setdefault("browser_only_steps", [])
|
|
130
|
-
data["browser_only_steps"].extend(items or [])
|
|
131
|
-
save(path, data)
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
def record_runtime_bindings(state_id: str, mapping):
|
|
135
|
-
path = state_path(state_id)
|
|
136
|
-
data = load(path)
|
|
137
|
-
data.setdefault("runtime_bindings", {})
|
|
138
|
-
data["runtime_bindings"].update(mapping or {})
|
|
139
|
-
save(path, data)
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
def cmd_artifact(args):
|
|
143
|
-
record_artifacts(
|
|
144
|
-
args.id,
|
|
145
|
-
[
|
|
146
|
-
{
|
|
147
|
-
"kind": args.kind,
|
|
148
|
-
"path": args.path,
|
|
149
|
-
"note": args.note,
|
|
150
|
-
"at": now_iso(),
|
|
151
|
-
}
|
|
152
|
-
],
|
|
153
|
-
)
|
|
154
|
-
print("ok")
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
def cmd_endpoint(args):
|
|
158
|
-
body = parse_kv_pairs(args.body)
|
|
159
|
-
record_endpoint_calls(
|
|
160
|
-
args.id,
|
|
161
|
-
[
|
|
162
|
-
{
|
|
163
|
-
"method": args.method,
|
|
164
|
-
"path": args.path,
|
|
165
|
-
"status": args.status,
|
|
166
|
-
"note": args.note,
|
|
167
|
-
"body": body,
|
|
168
|
-
"at": now_iso(),
|
|
169
|
-
}
|
|
170
|
-
],
|
|
171
|
-
)
|
|
172
|
-
print("ok")
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
def cmd_browser_step(args):
|
|
176
|
-
record_browser_only_steps(
|
|
177
|
-
args.id,
|
|
178
|
-
[
|
|
179
|
-
{
|
|
180
|
-
"title": args.title,
|
|
181
|
-
"reason": args.reason,
|
|
182
|
-
"at": now_iso(),
|
|
183
|
-
}
|
|
184
|
-
],
|
|
185
|
-
)
|
|
186
|
-
print("ok")
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
def cmd_runtime_binding(args):
|
|
190
|
-
record_runtime_bindings(args.id, parse_kv_pairs(args.binding))
|
|
191
|
-
print("ok")
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
def cmd_summary(args):
|
|
195
|
-
path = state_path(args.id)
|
|
196
|
-
data = load(path)
|
|
197
|
-
total = len(data["scenarios"])
|
|
198
|
-
counts = {"pass": 0, "fail": 0, "blocked": 0, "pending": 0}
|
|
199
|
-
for item in data["scenarios"]:
|
|
200
|
-
counts[item["status"]] = counts.get(item["status"], 0) + 1
|
|
201
|
-
summary = {
|
|
202
|
-
"id": data["id"],
|
|
203
|
-
"title": data["title"],
|
|
204
|
-
"workspace": data["workspace"],
|
|
205
|
-
"flow_type": data["flow_type"],
|
|
206
|
-
"scenario_total": total,
|
|
207
|
-
"counts": counts,
|
|
208
|
-
"issues_open": [i for i in data["issues"] if i["status"] != "fixed"],
|
|
209
|
-
"artifact_count": len(data.get("artifacts", [])),
|
|
210
|
-
"endpoint_call_count": len(data.get("endpoint_calls", [])),
|
|
211
|
-
"browser_only_step_count": len(data.get("browser_only_steps", [])),
|
|
212
|
-
"runtime_bindings": data.get("runtime_bindings", {}),
|
|
213
|
-
"next_step": data.get("next_step", ""),
|
|
214
|
-
}
|
|
215
|
-
print(json.dumps(summary, ensure_ascii=False, indent=2))
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
def main():
|
|
219
|
-
parser = argparse.ArgumentParser()
|
|
220
|
-
sub = parser.add_subparsers(dest="cmd", required=True)
|
|
221
|
-
|
|
222
|
-
p = sub.add_parser("init")
|
|
223
|
-
p.add_argument("--id", required=True)
|
|
224
|
-
p.add_argument("--title", required=True)
|
|
225
|
-
p.add_argument("--workspace", required=True)
|
|
226
|
-
p.add_argument("--flow-type", required=True)
|
|
227
|
-
p.add_argument("--dep", action="append")
|
|
228
|
-
p.set_defaults(func=cmd_init)
|
|
229
|
-
|
|
230
|
-
p = sub.add_parser("record")
|
|
231
|
-
p.add_argument("--id", required=True)
|
|
232
|
-
p.add_argument("--scenario", required=True)
|
|
233
|
-
p.add_argument("--title")
|
|
234
|
-
p.add_argument("--status", required=True, choices=["pass", "fail", "blocked", "pending"])
|
|
235
|
-
p.add_argument("--sample")
|
|
236
|
-
p.add_argument("--note")
|
|
237
|
-
p.set_defaults(func=cmd_record)
|
|
238
|
-
|
|
239
|
-
p = sub.add_parser("issue")
|
|
240
|
-
p.add_argument("--id", required=True)
|
|
241
|
-
p.add_argument("--title", required=True)
|
|
242
|
-
p.add_argument("--status", default="open")
|
|
243
|
-
p.add_argument("--owner-skill", default="")
|
|
244
|
-
p.add_argument("--note", default="")
|
|
245
|
-
p.set_defaults(func=cmd_issue)
|
|
246
|
-
|
|
247
|
-
p = sub.add_parser("next")
|
|
248
|
-
p.add_argument("--id", required=True)
|
|
249
|
-
p.add_argument("--text", required=True)
|
|
250
|
-
p.set_defaults(func=cmd_next)
|
|
251
|
-
|
|
252
|
-
p = sub.add_parser("artifact")
|
|
253
|
-
p.add_argument("--id", required=True)
|
|
254
|
-
p.add_argument("--kind", required=True)
|
|
255
|
-
p.add_argument("--path", required=True)
|
|
256
|
-
p.add_argument("--note", default="")
|
|
257
|
-
p.set_defaults(func=cmd_artifact)
|
|
258
|
-
|
|
259
|
-
p = sub.add_parser("endpoint")
|
|
260
|
-
p.add_argument("--id", required=True)
|
|
261
|
-
p.add_argument("--method", required=True)
|
|
262
|
-
p.add_argument("--path", required=True)
|
|
263
|
-
p.add_argument("--status", default="")
|
|
264
|
-
p.add_argument("--note", default="")
|
|
265
|
-
p.add_argument("--body", action="append")
|
|
266
|
-
p.set_defaults(func=cmd_endpoint)
|
|
267
|
-
|
|
268
|
-
p = sub.add_parser("browser-step")
|
|
269
|
-
p.add_argument("--id", required=True)
|
|
270
|
-
p.add_argument("--title", required=True)
|
|
271
|
-
p.add_argument("--reason", default="")
|
|
272
|
-
p.set_defaults(func=cmd_browser_step)
|
|
273
|
-
|
|
274
|
-
p = sub.add_parser("runtime-binding")
|
|
275
|
-
p.add_argument("--id", required=True)
|
|
276
|
-
p.add_argument("--binding", action="append")
|
|
277
|
-
p.set_defaults(func=cmd_runtime_binding)
|
|
278
|
-
|
|
279
|
-
p = sub.add_parser("summary")
|
|
280
|
-
p.add_argument("--id", required=True)
|
|
281
|
-
p.set_defaults(func=cmd_summary)
|
|
282
|
-
|
|
283
|
-
args = parser.parse_args()
|
|
284
|
-
args.func(args)
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
if __name__ == "__main__":
|
|
288
|
-
main()
|
|
@@ -1,161 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env python3
|
|
2
|
-
import argparse
|
|
3
|
-
import json
|
|
4
|
-
from pathlib import Path
|
|
5
|
-
from typing import Any, Dict, List, Optional
|
|
6
|
-
|
|
7
|
-
from bpmax_session import load_json, save_json
|
|
8
|
-
from flow_test_profile import FlowTestProfile, find_uuid_dir, resolve_profile
|
|
9
|
-
from flow_filter_fields import build_report as build_filter_report
|
|
10
|
-
from flow_form_runtime import _load_flow_nodes
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
def build_object_mapping(profile: FlowTestProfile) -> Dict[str, Any]:
|
|
14
|
-
return {
|
|
15
|
-
"profile": profile.name,
|
|
16
|
-
"workspace": profile.workspace,
|
|
17
|
-
"flow_type": profile.flow_type,
|
|
18
|
-
"data_set_uuid": profile.data_set_uuid,
|
|
19
|
-
"list_template_uuid": profile.list_template_uuid,
|
|
20
|
-
"filter_template_uuid": profile.filter_template_uuid,
|
|
21
|
-
"form_template_uuid": profile.form_template_uuid,
|
|
22
|
-
"form_template_name": profile.form_template_name,
|
|
23
|
-
"flow_name": profile.flow_name,
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
def build_node_chain(profile: FlowTestProfile) -> List[Dict[str, Any]]:
|
|
28
|
-
nodes = _load_flow_nodes(profile)
|
|
29
|
-
ordered = []
|
|
30
|
-
step_ids = profile.node_chain_ids or sorted(nodes.keys())
|
|
31
|
-
for step_id in step_ids:
|
|
32
|
-
node = nodes.get(step_id, {})
|
|
33
|
-
ordered.append(
|
|
34
|
-
{
|
|
35
|
-
"flow_step_id": step_id,
|
|
36
|
-
"name": node.get("name"),
|
|
37
|
-
"approve_actions": node.get("approve_actions", []),
|
|
38
|
-
"approve_fail_actions": node.get("approve_fail_actions", []),
|
|
39
|
-
"approve_to_step": node.get("approve_to_step"),
|
|
40
|
-
"approve_fail": node.get("approve_fail"),
|
|
41
|
-
}
|
|
42
|
-
)
|
|
43
|
-
return ordered
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
def build_endpoints(profile: FlowTestProfile) -> List[Dict[str, Any]]:
|
|
47
|
-
overrides = profile.endpoint_overrides or {}
|
|
48
|
-
detail_paths = overrides.get("project_detail_paths") or ["/project/{project_id}?steps=1", "/api/project/{project_id}?steps=1"]
|
|
49
|
-
step_get_paths = overrides.get("step_get_paths") or ["/step/{step_id}", "/api/step/{step_id}"]
|
|
50
|
-
step_action_paths = overrides.get("step_action_paths") or ["/step/{step_id}?action={action}", "/api/step/{step_id}?action={action}"]
|
|
51
|
-
return [
|
|
52
|
-
{
|
|
53
|
-
"name": "list_projects",
|
|
54
|
-
"method": "POST",
|
|
55
|
-
"path": "/bpmax/project/list?page=1&page_size={page_size}&level=0",
|
|
56
|
-
"purpose": "列表页与筛选器查询",
|
|
57
|
-
"request_source": ".codex/tmp/step10424_approve.json 中同类项目列表查询形态 + 本地筛选模板配置",
|
|
58
|
-
"notes": ["优先传 data_set_id 或 flow_type", f"默认 profile: {profile.name}"],
|
|
59
|
-
},
|
|
60
|
-
{
|
|
61
|
-
"name": "create_project",
|
|
62
|
-
"method": "POST",
|
|
63
|
-
"path": "/api/project",
|
|
64
|
-
"purpose": "创建流程项目",
|
|
65
|
-
"request_source": ".codex/tmp/project_create_8631_clone.json 的真实 /api/project 骨架",
|
|
66
|
-
"notes": [f"flow_type 由 profile 提供: {profile.flow_type}", "优先从运行时详情回读生成 projectForm.value", "不要手写最小化 payload"],
|
|
67
|
-
},
|
|
68
|
-
{
|
|
69
|
-
"name": "project_detail",
|
|
70
|
-
"method": "GET",
|
|
71
|
-
"paths": detail_paths,
|
|
72
|
-
"purpose": "详情页、当前环节、metaForm 回读",
|
|
73
|
-
"request_source": "运行时详情接口;优先按 profile endpoint_overrides 声明的 fallback 顺序尝试",
|
|
74
|
-
"notes": ["回读 current_flow_step_name、metaForm.value、step_owner_list"],
|
|
75
|
-
},
|
|
76
|
-
{
|
|
77
|
-
"name": "step_detail",
|
|
78
|
-
"method": "GET",
|
|
79
|
-
"paths": step_get_paths,
|
|
80
|
-
"purpose": "步骤详情或运行态 step_form 取证",
|
|
81
|
-
"request_source": "运行时步骤接口;优先按 profile endpoint_overrides 声明的 fallback 顺序尝试",
|
|
82
|
-
"notes": ["通常只有 detail 中 step_form 不完整时才需要单独读取 step"],
|
|
83
|
-
},
|
|
84
|
-
{
|
|
85
|
-
"name": "step_approve",
|
|
86
|
-
"method": "PUT",
|
|
87
|
-
"paths": [path.replace("{action}", "approve") for path in step_action_paths],
|
|
88
|
-
"purpose": "审批流转",
|
|
89
|
-
"request_source": "列表模板前端内联动作与 .codex/tmp/step10424_approve.json 请求骨架",
|
|
90
|
-
"notes": ["审批步骤无表单时可发最小 body", "有 step_form 时必须携带完整 value/key_to_value/field_to_value 结构"],
|
|
91
|
-
},
|
|
92
|
-
{
|
|
93
|
-
"name": "step_reject",
|
|
94
|
-
"method": "PUT",
|
|
95
|
-
"paths": [path.replace("{action}", "refuse") for path in step_action_paths],
|
|
96
|
-
"purpose": "驳回到修改配置",
|
|
97
|
-
"request_source": "前端项目动作模板中 `?action=refuse` 真实调用形态",
|
|
98
|
-
"notes": ["至少带 project_id 与 flow_step_id", "目标环节从 flow.data 推导"],
|
|
99
|
-
},
|
|
100
|
-
]
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
def build_list_template_shape(profile: FlowTestProfile) -> Dict[str, Any]:
|
|
104
|
-
content = load_json(find_uuid_dir("think_flow_page_template", profile.list_template_uuid) / "flow_page_template.content")
|
|
105
|
-
columns = []
|
|
106
|
-
for item in content.get("config", []) or []:
|
|
107
|
-
columns.append({"title": item.get("title"), "icon": item.get("icon")})
|
|
108
|
-
meta = load_json(find_uuid_dir("think_form_template", profile.form_template_uuid) / "form_template")
|
|
109
|
-
return {"list_columns": columns, "form_template_name": meta.get("name")}
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
def build_matrix(profile: Optional[FlowTestProfile] = None) -> Dict[str, Any]:
|
|
113
|
-
profile = profile or resolve_profile()
|
|
114
|
-
return {
|
|
115
|
-
"objects": build_object_mapping(profile),
|
|
116
|
-
"node_chain": build_node_chain(profile),
|
|
117
|
-
"endpoints": build_endpoints(profile),
|
|
118
|
-
"list_and_form_shape": build_list_template_shape(profile),
|
|
119
|
-
"filter_fields": build_filter_report(None, profile),
|
|
120
|
-
"browser_only_steps": profile.browser_only_steps,
|
|
121
|
-
"runtime_binding_notes": [
|
|
122
|
-
"节点链路以 flow.data live 配置为准。",
|
|
123
|
-
"审批节点无 form_template 时,接口 runner 才退回最小 step body;只要运行态可拿到 step_form,就优先保留完整结构。",
|
|
124
|
-
"创建 skeleton 优先来自 live 项目详情或真实浏览器请求,其次才退回本地表单模板。",
|
|
125
|
-
],
|
|
126
|
-
}
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
def main() -> None:
|
|
130
|
-
p = argparse.ArgumentParser(description="Output the flow API matrix and runtime object bindings.")
|
|
131
|
-
p.add_argument("--profile", default="negative_sale")
|
|
132
|
-
p.add_argument("--profile-file")
|
|
133
|
-
p.add_argument("--workspace")
|
|
134
|
-
p.add_argument("--flow-type")
|
|
135
|
-
p.add_argument("--data-set-uuid")
|
|
136
|
-
p.add_argument("--list-template-uuid")
|
|
137
|
-
p.add_argument("--filter-template-uuid")
|
|
138
|
-
p.add_argument("--form-template-uuid")
|
|
139
|
-
p.add_argument("--form-template-name")
|
|
140
|
-
p.add_argument("--output")
|
|
141
|
-
args = p.parse_args()
|
|
142
|
-
|
|
143
|
-
profile = resolve_profile(
|
|
144
|
-
args.profile,
|
|
145
|
-
profile_file=args.profile_file,
|
|
146
|
-
workspace=args.workspace,
|
|
147
|
-
flow_type=args.flow_type,
|
|
148
|
-
data_set_uuid=args.data_set_uuid,
|
|
149
|
-
list_template_uuid=args.list_template_uuid,
|
|
150
|
-
filter_template_uuid=args.filter_template_uuid,
|
|
151
|
-
form_template_uuid=args.form_template_uuid,
|
|
152
|
-
form_template_name=args.form_template_name,
|
|
153
|
-
)
|
|
154
|
-
matrix = build_matrix(profile)
|
|
155
|
-
if args.output:
|
|
156
|
-
save_json(Path(args.output), matrix)
|
|
157
|
-
print(json.dumps(matrix, ensure_ascii=False, indent=2))
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
if __name__ == "__main__":
|
|
161
|
-
main()
|