bpmax-cli 0.1.44 → 0.2.1-beta.1
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 +52 -5
- package/dist/bin.js +11966 -1320
- package/dist/bin.js.map +1 -1
- package/package.json +1 -1
- package/scripts/install-skills.mjs +98 -0
- package/skills/bpmax-ai-taskbook/SKILL.md +226 -0
- package/skills/bpmax-ai-taskbook/agents/openai.yaml +3 -0
- package/skills/bpmax-ai-taskbook/references/taskbook-template.md +68 -0
- package/skills/bpmax-api-platform-editor/SKILL.md +321 -0
- package/skills/bpmax-api-platform-editor/agents/openai.yaml +4 -0
- package/skills/bpmax-api-platform-editor/references/api-doc-debug-workflow.md +34 -0
- package/skills/bpmax-api-platform-editor/references/api-proxy-shape.md +41 -0
- package/skills/bpmax-api-platform-editor/references/instance-config-shape.md +41 -0
- package/skills/bpmax-api-platform-editor/references/platform-api-map.md +52 -0
- package/skills/bpmax-api-platform-editor/references/runtime-workflow.md +32 -0
- package/skills/bpmax-api-platform-editor/scripts/api_platform_editor_common.py +1276 -0
- package/skills/bpmax-api-platform-editor/scripts/build_submit_payload.py +64 -0
- package/skills/bpmax-api-platform-editor/scripts/capture_write_contract.py +40 -0
- package/skills/bpmax-api-platform-editor/scripts/export_layer_bundle.py +212 -0
- package/skills/bpmax-api-platform-editor/scripts/record_doc_debug_acceptance.py +62 -0
- package/skills/bpmax-api-platform-editor/scripts/submit_and_verify_layer.py +75 -0
- package/skills/bpmax-api-platform-editor/tests/test_api_platform_editor.py +287 -0
- package/skills/bpmax-approval-matrix/SKILL.md +87 -0
- package/skills/bpmax-auth/SKILL.md +6 -17
- package/skills/bpmax-builder-shared/SKILL.md +44 -0
- package/skills/bpmax-builder-shared/base_url.py +81 -0
- package/skills/bpmax-builder-shared/runtime-script-site-matrix.json +71 -0
- package/skills/bpmax-builder-shared/runtime-script-site-matrix.md +34 -0
- package/skills/bpmax-builder-shared/runtime-script-template-catalog.md +123 -0
- package/skills/bpmax-builder-shared/runtime_script_rules.py +272 -0
- package/skills/bpmax-builder-shared/skill_audit.py +374 -0
- package/skills/bpmax-builder-shared/template_script_hard_rules.py +280 -0
- package/skills/bpmax-builder-shared/tests/test_base_url.py +80 -0
- package/skills/bpmax-builder-shared/tests/test_runtime_script_rules.py +115 -0
- package/skills/bpmax-builder-shared/tests/test_skill_audit.py +231 -0
- package/skills/bpmax-builder-shared/tests/test_template_script_hard_rules.py +281 -0
- package/skills/bpmax-cli/SKILL.md +5 -0
- package/skills/bpmax-config-latest/SKILL.md +71 -0
- package/skills/bpmax-console-template-editor/SKILL.md +536 -0
- package/skills/bpmax-console-template-editor/agents/openai.yaml +4 -0
- package/skills/bpmax-console-template-editor/references/filter-integration.md +60 -0
- package/skills/bpmax-console-template-editor/references/lessons-from-resume-dashboard.md +114 -0
- package/skills/bpmax-console-template-editor/references/local-temp-workflow.md +69 -0
- package/skills/bpmax-console-template-editor/references/module-catalog.md +100 -0
- package/skills/bpmax-console-template-editor/references/runtime-page-shape.md +91 -0
- package/skills/bpmax-console-template-editor/references/template-shape.md +149 -0
- package/skills/bpmax-console-template-editor/scripts/build_submit_payload.py +38 -0
- package/skills/bpmax-console-template-editor/scripts/confirm_console_template.py +33 -0
- package/skills/bpmax-console-template-editor/scripts/console_template_editor_common.py +964 -0
- package/skills/bpmax-console-template-editor/scripts/export_console_template.py +99 -0
- package/skills/bpmax-console-template-editor/scripts/lint_console_template.py +46 -0
- package/skills/bpmax-console-template-editor/scripts/submit_console_template.py +99 -0
- package/skills/bpmax-console-template-editor/tests/test_console_template_editor.py +383 -0
- package/skills/bpmax-dataset-field-template-editor/SKILL.md +603 -0
- package/skills/bpmax-dataset-field-template-editor/references/create-request-gotchas.md +25 -0
- package/skills/bpmax-dataset-field-template-editor/references/field-classify-mapping.md +35 -0
- package/skills/bpmax-dataset-field-template-editor/references/nested-field-patterns.md +24 -0
- package/skills/bpmax-dataset-field-template-editor/references/runtime-verified-field-page-shape.md +61 -0
- package/skills/bpmax-dataset-field-template-editor/references/virtual-field-patterns.md +27 -0
- package/skills/bpmax-dataset-field-template-editor/references/work-file-to-submit-mapping.md +127 -0
- package/skills/bpmax-dataset-field-template-editor/scripts/build_submit_payload.py +67 -0
- package/skills/bpmax-dataset-field-template-editor/scripts/confirm_dataset_field.py +37 -0
- package/skills/bpmax-dataset-field-template-editor/scripts/dataset_field_editor_common.py +784 -0
- package/skills/bpmax-dataset-field-template-editor/scripts/export_dataset_field.py +62 -0
- package/skills/bpmax-dataset-field-template-editor/scripts/init_create_dataset_field.py +104 -0
- package/skills/bpmax-dataset-field-template-editor/scripts/inspect_dataset_field_runtime.py +83 -0
- package/skills/bpmax-dataset-field-template-editor/scripts/lint_dataset_field_semantics.py +35 -0
- package/skills/bpmax-dataset-field-template-editor/scripts/submit_dataset_field.py +95 -0
- package/skills/bpmax-dataset-field-template-editor/tests/test_dataset_field_editor.py +709 -0
- package/skills/bpmax-dataset-field-template-editor/tests/test_init_create_dataset_field.py +59 -0
- package/skills/bpmax-dataset-template-editor/SKILL.md +779 -0
- package/skills/bpmax-dataset-template-editor/references/custom-key-usage-patterns.md +18 -0
- package/skills/bpmax-dataset-template-editor/references/dataset-script-runtime-matrix.md +73 -0
- package/skills/bpmax-dataset-template-editor/references/pre-process-script-authoring-guide.md +186 -0
- package/skills/bpmax-dataset-template-editor/references/pre-process-script-example-catalog.md +106 -0
- package/skills/bpmax-dataset-template-editor/references/runtime-gotchas.md +28 -0
- package/skills/bpmax-dataset-template-editor/references/runtime-verified-dataset-page-shape.md +47 -0
- package/skills/bpmax-dataset-template-editor/references/ui-to-backend-field-map.md +23 -0
- package/skills/bpmax-dataset-template-editor/references/work-file-to-submit-mapping.md +97 -0
- package/skills/bpmax-dataset-template-editor/scripts/basic_table_audit.py +65 -0
- package/skills/bpmax-dataset-template-editor/scripts/build_submit_payload.py +38 -0
- package/skills/bpmax-dataset-template-editor/scripts/dataset_editor_common.py +650 -0
- package/skills/bpmax-dataset-template-editor/scripts/export_dataset.py +155 -0
- package/skills/bpmax-dataset-template-editor/scripts/lint_dataset_template.py +42 -0
- package/skills/bpmax-dataset-template-editor/scripts/resolve_dataset.py +43 -0
- package/skills/bpmax-dataset-template-editor/scripts/scan_custom_key_references.py +27 -0
- package/skills/bpmax-dataset-template-editor/scripts/submit_dataset.py +115 -0
- package/skills/bpmax-dataset-template-editor/scripts/verify_dataset_list.py +52 -0
- package/skills/bpmax-dataset-template-editor/scripts/verify_publish_health.py +39 -0
- package/skills/bpmax-dataset-template-editor/tests/test_dataset_editor.py +373 -0
- package/skills/bpmax-e2e-flow-config-orchestrator/SKILL.md +203 -0
- package/skills/bpmax-e2e-flow-config-orchestrator/agents/openai.yaml +4 -0
- package/skills/bpmax-e2e-flow-config-orchestrator/references/orchestration-matrix.md +63 -0
- package/skills/bpmax-e2e-flow-test-operator/SKILL.md +551 -0
- package/skills/bpmax-e2e-flow-test-operator/agents/openai.yaml +5 -0
- package/skills/bpmax-e2e-flow-test-operator/profiles/negative_sale.json +97 -0
- package/skills/bpmax-e2e-flow-test-operator/profiles/negative_sale_final_v2.json +105 -0
- package/skills/bpmax-e2e-flow-test-operator/profiles/negative_sale_main.json +36 -0
- package/skills/bpmax-e2e-flow-test-operator/profiles/negative_sale_region.json +40 -0
- package/skills/bpmax-e2e-flow-test-operator/references/ai-test-suite.md +333 -0
- package/skills/bpmax-e2e-flow-test-operator/references/browser-only-checkpoints.md +41 -0
- package/skills/bpmax-e2e-flow-test-operator/references/failure-update-loop.md +17 -0
- package/skills/bpmax-e2e-flow-test-operator/references/filter-field-discovery.md +40 -0
- package/skills/bpmax-e2e-flow-test-operator/references/minimal-test-loop.md +24 -0
- package/skills/bpmax-e2e-flow-test-operator/references/negative-sale-api-matrix.md +75 -0
- package/skills/bpmax-e2e-flow-test-operator/references/profile-schema.md +109 -0
- package/skills/bpmax-e2e-flow-test-operator/references/skill-experience-coverage-matrix.md +29 -0
- package/skills/bpmax-e2e-flow-test-operator/references/stale-runtime-and-clean-sample-rules.md +54 -0
- package/skills/bpmax-e2e-flow-test-operator/references/state-schema.md +83 -0
- package/skills/bpmax-e2e-flow-test-operator/scripts/bpmax_session.py +287 -0
- package/skills/bpmax-e2e-flow-test-operator/scripts/dealer_sample_on_shelf_plan.json +59 -0
- package/skills/bpmax-e2e-flow-test-operator/scripts/dealer_sample_on_shelf_runner.py +687 -0
- package/skills/bpmax-e2e-flow-test-operator/scripts/e2e_doc.py +121 -0
- package/skills/bpmax-e2e-flow-test-operator/scripts/e2e_state.py +288 -0
- package/skills/bpmax-e2e-flow-test-operator/scripts/flow_api_matrix.py +161 -0
- package/skills/bpmax-e2e-flow-test-operator/scripts/flow_filter_fields.py +138 -0
- package/skills/bpmax-e2e-flow-test-operator/scripts/flow_form_runtime.py +396 -0
- package/skills/bpmax-e2e-flow-test-operator/scripts/flow_runner.py +341 -0
- package/skills/bpmax-e2e-flow-test-operator/scripts/flow_test_profile.py +185 -0
- package/skills/bpmax-e2e-flow-test-operator/tests/test_negative_sale_api_tools.py +138 -0
- package/skills/bpmax-feishu-chat-flow-plugin-editor/SKILL.md +69 -0
- package/skills/bpmax-feishu-chat-flow-plugin-editor/agents/openai.yaml +4 -0
- package/skills/bpmax-feishu-chat-flow-plugin-editor/references/config-checklist.md +42 -0
- package/skills/bpmax-feishu-chat-flow-plugin-editor/references/config-recipes.md +38 -0
- package/skills/bpmax-feishu-chat-flow-plugin-editor/references/config-shape.md +86 -0
- package/skills/bpmax-feishu-chat-flow-plugin-editor/references/gate-lint.md +68 -0
- package/skills/bpmax-feishu-chat-flow-plugin-editor/references/hoocoo-patterns.md +39 -0
- package/skills/bpmax-feishu-chat-flow-plugin-editor/references/runtime-behavior.md +41 -0
- package/skills/bpmax-feishu-chat-flow-plugin-editor/references/script-authoring.md +110 -0
- package/skills/bpmax-feishu-chat-flow-plugin-editor/scripts/lint_feishu_chat_plugin.py +278 -0
- package/skills/bpmax-feishu-chat-flow-plugin-editor/tests/test_lint_feishu_chat_plugin.py +203 -0
- package/skills/bpmax-filter-template-editor/SKILL.md +564 -0
- package/skills/bpmax-filter-template-editor/references/experience-coverage-matrix.md +38 -0
- package/skills/bpmax-filter-template-editor/references/filter-and-flow-binding.md +57 -0
- package/skills/bpmax-filter-template-editor/references/filter-content-schema.md +141 -0
- package/skills/bpmax-filter-template-editor/references/filter-request-shape.md +287 -0
- package/skills/bpmax-filter-template-editor/references/filter-runtime-patterns.md +115 -0
- package/skills/bpmax-filter-template-editor/references/runtime-verified-filter-page-shape.md +94 -0
- package/skills/bpmax-filter-template-editor/scripts/build_submit_payload.py +25 -0
- package/skills/bpmax-filter-template-editor/scripts/confirm_filter_template.py +22 -0
- package/skills/bpmax-filter-template-editor/scripts/export_filter_template.py +57 -0
- package/skills/bpmax-filter-template-editor/scripts/filter_template_editor_common.py +348 -0
- package/skills/bpmax-filter-template-editor/scripts/init_create_filter_template.py +8 -0
- package/skills/bpmax-filter-template-editor/scripts/lint_filter_template_semantics.py +26 -0
- package/skills/bpmax-filter-template-editor/scripts/submit_filter_template.py +62 -0
- package/skills/bpmax-filter-template-editor/tests/test_filter_template_editor.py +231 -0
- package/skills/bpmax-flow-template-editor/SKILL.md +1086 -0
- package/skills/bpmax-flow-template-editor/agents/openai.yaml +4 -0
- package/skills/bpmax-flow-template-editor/references/before-next-step-script-runtime-gotchas.md +62 -0
- package/skills/bpmax-flow-template-editor/references/config-surfaces-and-placeholders.md +270 -0
- package/skills/bpmax-flow-template-editor/references/diff-strategy.md +67 -0
- package/skills/bpmax-flow-template-editor/references/editor-runtime-vs-draft.md +25 -0
- package/skills/bpmax-flow-template-editor/references/flow-template-api-workflow.md +174 -0
- package/skills/bpmax-flow-template-editor/references/intent-model.md +117 -0
- package/skills/bpmax-flow-template-editor/references/lessons-from-price-plan-flow.md +147 -0
- package/skills/bpmax-flow-template-editor/references/local-temp-workflow.md +97 -0
- package/skills/bpmax-flow-template-editor/references/matrix-flow-form-nav-collaboration.md +168 -0
- package/skills/bpmax-flow-template-editor/references/payload-checklist.md +133 -0
- package/skills/bpmax-flow-template-editor/references/project-create-runtime-gotchas.md +106 -0
- package/skills/bpmax-flow-template-editor/references/requirement-to-node-mapping.md +149 -0
- package/skills/bpmax-flow-template-editor/references/runtime-verified-flow-detail-shape.md +41 -0
- package/skills/bpmax-flow-template-editor/references/runtime-verified-meta-fields.md +155 -0
- package/skills/bpmax-flow-template-editor/references/runtime-verified-node-fields.md +179 -0
- package/skills/bpmax-flow-template-editor/references/save-draft-request-shape.md +91 -0
- package/skills/bpmax-flow-template-editor/references/script-review-hard-rules.md +96 -0
- package/skills/bpmax-flow-template-editor/references/work-file-to-submit-mapping.md +57 -0
- package/skills/bpmax-flow-template-editor/scripts/build_submit_payload.py +69 -0
- package/skills/bpmax-flow-template-editor/scripts/confirm_flow_template.py +52 -0
- package/skills/bpmax-flow-template-editor/scripts/export_flow_template.py +114 -0
- package/skills/bpmax-flow-template-editor/scripts/flow_template_editor_common.py +1084 -0
- package/skills/bpmax-flow-template-editor/scripts/submit_flow_template.py +159 -0
- package/skills/bpmax-flow-template-editor/tests/test_flow_template_editor.py +636 -0
- package/skills/bpmax-form-template-editor/SKILL.md +1113 -0
- package/skills/bpmax-form-template-editor/agents/openai.yaml +4 -0
- package/skills/bpmax-form-template-editor/references/form-template-api-workflow.md +203 -0
- package/skills/bpmax-form-template-editor/references/local-temp-workflow.md +125 -0
- package/skills/bpmax-form-template-editor/references/payload-checklist.md +77 -0
- package/skills/bpmax-form-template-editor/references/sub-form-patterns.md +49 -0
- package/skills/bpmax-form-template-editor/scripts/build_submit_payload.py +37 -0
- package/skills/bpmax-form-template-editor/scripts/check_form_template_consistency.py +145 -0
- package/skills/bpmax-form-template-editor/scripts/confirm_form_template.py +67 -0
- package/skills/bpmax-form-template-editor/scripts/export_form_template.py +91 -0
- package/skills/bpmax-form-template-editor/scripts/form_template_editor_common.py +1762 -0
- package/skills/bpmax-form-template-editor/scripts/lint_form_template_semantics.py +30 -0
- package/skills/bpmax-form-template-editor/scripts/record_runtime_acceptance.py +67 -0
- package/skills/bpmax-form-template-editor/scripts/submit_form_template.py +163 -0
- package/skills/bpmax-form-template-editor/tests/test_form_template_editor.py +1292 -0
- package/skills/bpmax-list-template-editor/SKILL.md +478 -0
- package/skills/bpmax-list-template-editor/agents/openai.yaml +4 -0
- package/skills/bpmax-list-template-editor/references/browser-page-contract.md +81 -0
- package/skills/bpmax-list-template-editor/references/content-config-shape.md +165 -0
- package/skills/bpmax-list-template-editor/references/dataset-field-mapping.md +60 -0
- package/skills/bpmax-list-template-editor/references/list-template-api-workflow.md +108 -0
- package/skills/bpmax-list-template-editor/references/local-temp-workflow.md +102 -0
- package/skills/bpmax-list-template-editor/references/payload-checklist.md +47 -0
- package/skills/bpmax-list-template-editor/references/runtime-verified-workflow.md +147 -0
- package/skills/bpmax-list-template-editor/references/special-formats.md +411 -0
- package/skills/bpmax-list-template-editor/scripts/build_submit_payload.py +37 -0
- package/skills/bpmax-list-template-editor/scripts/confirm_list_template.py +33 -0
- package/skills/bpmax-list-template-editor/scripts/export_list_template.py +89 -0
- package/skills/bpmax-list-template-editor/scripts/fetch_data_set.py +34 -0
- package/skills/bpmax-list-template-editor/scripts/lint_list_template_semantics.py +54 -0
- package/skills/bpmax-list-template-editor/scripts/list_template_editor_common.py +955 -0
- package/skills/bpmax-list-template-editor/scripts/record_acceptance.py +55 -0
- package/skills/bpmax-list-template-editor/scripts/submit_list_template.py +117 -0
- package/skills/bpmax-list-template-editor/tests/test_list_template_editor_common.py +441 -0
- package/skills/bpmax-memory-protocol/SKILL.md +72 -0
- package/skills/bpmax-nav-config-editor/SKILL.md +350 -0
- package/skills/bpmax-nav-config-editor/agents/openai.yaml +4 -0
- package/skills/bpmax-nav-config-editor/references/api-workflow.md +70 -0
- package/skills/bpmax-nav-config-editor/references/config-shape.md +78 -0
- package/skills/bpmax-nav-config-editor/references/icon-selection.md +83 -0
- package/skills/bpmax-nav-config-editor/references/path-mapping-rules.md +51 -0
- package/skills/bpmax-nav-config-editor/references/payload-checklist.md +41 -0
- package/skills/bpmax-nav-config-editor/references/runtime-probing.md +47 -0
- package/skills/bpmax-nav-config-editor/scripts/build_submit_payload.py +34 -0
- package/skills/bpmax-nav-config-editor/scripts/confirm_nav_config.py +32 -0
- package/skills/bpmax-nav-config-editor/scripts/export_nav_config.py +56 -0
- package/skills/bpmax-nav-config-editor/scripts/lint_nav_config_semantics.py +33 -0
- package/skills/bpmax-nav-config-editor/scripts/nav_config_editor_common.py +812 -0
- package/skills/bpmax-nav-config-editor/scripts/submit_nav_config.py +44 -0
- package/skills/bpmax-nav-config-editor/scripts/verify_nav_config.py +33 -0
- package/skills/bpmax-nav-config-editor/tests/test_nav_config_editor.py +358 -0
- package/skills/bpmax-nav-config-editor/tests/test_nav_config_editor_common.py +138 -0
- package/skills/bpmax-nav-config-editor/tests/test_nav_config_lint.py +58 -0
- package/skills/bpmax-nav-config-editor/tests/test_nav_config_submit_verify.py +51 -0
- package/skills/bpmax-plugin-config/SKILL.md +42 -0
- package/skills/bpmax-project/SKILL.md +17 -3
- package/skills/bpmax-project-detail-template-editor/SKILL.md +355 -0
- package/skills/bpmax-project-detail-template-editor/agents/openai.yaml +4 -0
- package/skills/bpmax-project-detail-template-editor/references/local-temp-workflow.md +59 -0
- package/skills/bpmax-project-detail-template-editor/references/module-catalog-and-config-notes.md +120 -0
- package/skills/bpmax-project-detail-template-editor/references/payload-checklist.md +33 -0
- package/skills/bpmax-project-detail-template-editor/references/project-detail-template-api-workflow.md +44 -0
- package/skills/bpmax-project-detail-template-editor/scripts/build_submit_payload.py +30 -0
- package/skills/bpmax-project-detail-template-editor/scripts/confirm_project_detail_template.py +33 -0
- package/skills/bpmax-project-detail-template-editor/scripts/export_project_detail_template.py +87 -0
- package/skills/bpmax-project-detail-template-editor/scripts/lint_project_detail_template_semantics.py +37 -0
- package/skills/bpmax-project-detail-template-editor/scripts/project_detail_template_editor_common.py +507 -0
- package/skills/bpmax-project-detail-template-editor/scripts/submit_project_detail_template.py +120 -0
- package/skills/bpmax-project-detail-template-editor/tests/test_project_detail_template_editor.py +369 -0
- package/skills/bpmax-role-editor/SKILL.md +251 -0
- package/skills/bpmax-role-editor/references/api-workflow.md +30 -0
- package/skills/bpmax-role-editor/references/runtime-page-shape.md +18 -0
- package/skills/bpmax-role-editor/references/work-file-mapping.md +32 -0
- package/skills/bpmax-role-editor/scripts/build_submit_payload.py +38 -0
- package/skills/bpmax-role-editor/scripts/confirm_role.py +33 -0
- package/skills/bpmax-role-editor/scripts/export_role.py +163 -0
- package/skills/bpmax-role-editor/scripts/lint_role_semantics.py +38 -0
- package/skills/bpmax-role-editor/scripts/role_editor_common.py +1231 -0
- package/skills/bpmax-role-editor/scripts/submit_role.py +144 -0
- package/skills/bpmax-role-editor/tests/test_role_editor.py +343 -0
- package/skills/bpmax-shared/SKILL.md +1 -1
- package/skills/bpmax-user-mock-operator/SKILL.md +106 -0
- package/skills/bpmax-user-mock-operator/agents/openai.yaml +4 -0
- package/skills/bpmax-user-mock-operator/scripts/switch_user_identity.py +37 -0
- package/skills/bpmax-user-mock-operator/scripts/user_mock_operator_common.py +136 -0
- package/skills/bpmax-user-mock-operator/tests/test_user_mock_operator.py +138 -0
- package/skills/bpmax-workspace-editor/SKILL.md +78 -0
- package/skills/bpmax-workspace-editor/agents/openai.yaml +4 -0
- package/skills/form-control-library/SKILL.md +82 -0
- package/skills/form-control-library/agents/openai.yaml +4 -0
- package/skills/form-control-library/references/form-controls.md +199 -0
- package/skills/form-control-library/references/form-template-submit-schema.md +180 -0
- package/skills/form-control-library/references/group-select-runtime.md +191 -0
- package/skills/form-control-library/scripts/rebuild_form_control_library.py +55 -0
|
@@ -0,0 +1,350 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: "bpmax-nav-config-editor"
|
|
3
|
+
description: "用于在 BPMAX 的工作区导航配置页面中创建或编辑 PC导航、PC快捷入口、H5导航、H5快捷入口。只要用户提到“工作区导航配置”“导航管理”“PC导航”“H5导航”“快捷入口”“按需求改导航”“从当前浏览器导航页直接提交导航配置”“让 Codex 根据需求构造 navmenu / shortcut / navmenu_mobile / shortcut_mobile 配置”或等价表达,就应使用这个 skill。它要求用户先在浏览器打开工作区导航管理页;随后 Codex 从当前页面提取已登录授权上下文、读取四类导航配置、权限点与页面运行时方法,构造并提交配置,最后回到导航页核对最新结果。"
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# BPMAX Nav Config Editor
|
|
7
|
+
|
|
8
|
+
## 写入路径硬约束
|
|
9
|
+
- 执行前必须先运行 `bpmax-cli config adapters --format json` 核对 `nav-config`;只有 `build_status` 和 `submit_status` 都是 `supported` 时才允许进入 build/submit。
|
|
10
|
+
- 当前 bpmax-cli typed adapter 支持按 workspace 聚合导出 `navmenu`、`shortcut`、`navmenu_mobile`、`shortcut_mobile` 四类配置,并通过 operation plan dry-run / 确认提交 / 回读 hash。
|
|
11
|
+
- `lint/build/submit/verify` 的可执行门禁在 TypeScript CLI 核心中实现;不要新增或调用旧 Python verify 脚本作为主路径。
|
|
12
|
+
- 旧来源脚本 `scripts/submit*.py` 只保留为结构参考;不得用它们直调 BPMAX API。
|
|
13
|
+
- 不得用 `bpmax-cli api POST/PUT/DELETE /configuration*` 或其它 raw API 绕过 typed config submit。
|
|
14
|
+
|
|
15
|
+
## 全局范围门禁
|
|
16
|
+
- 范围 gate 对本 skill 是强要求。任何会修改 BPMAX 配置、线上状态、本地提交体或最终结果的动作,都必须先归类为 `requested`、`required-collateral` 或 `out-of-scope`。
|
|
17
|
+
- 范围 gate 必须基于线上最新配置:分析或编辑配置前,先通过对应 workflow/API 拉取或读取远端最新状态;提交前再次确认本地 work/submit/payload 仍基于该最新远端基线,若线上配置已变化必须停止并重新对照。
|
|
18
|
+
- 只有用户明确要求的 `requested`,或为闭合需求不可避免的 `required-collateral`,才允许进入 work / submit / 线上 payload / 状态变更。
|
|
19
|
+
- `required-collateral` 必须逐项解释“不改会坏/会失真/会不闭合”的原因并取得确认;`out-of-scope` 一律不得提交或顺手混入。
|
|
20
|
+
- 不得以历史脏配置、顺手修复、统一风格、编辑器自动补字段、方便调试为理由修改需求外配置。
|
|
21
|
+
|
|
22
|
+
## 何时使用
|
|
23
|
+
- 用户已经在浏览器打开工作区导航管理页。
|
|
24
|
+
- 用户要新增、删除、改名、改路径、改权限、改可见范围、调整顺序。
|
|
25
|
+
- 用户要一次性生成一套 PC / H5 导航与快捷入口配置。
|
|
26
|
+
- 用户希望直接复用当前页面登录态,不手动找鉴权。
|
|
27
|
+
|
|
28
|
+
## 前置条件
|
|
29
|
+
- 用户必须先打开类似页面:
|
|
30
|
+
- `.../w:<workspace>/workspaceConfiguration/<workspace>?nav=navs&id=<id>`
|
|
31
|
+
- 用户需要明确说明:
|
|
32
|
+
- 是改现有导航,还是生成一整套导航建议
|
|
33
|
+
- 涉及哪些业务入口、流程、页面或外链
|
|
34
|
+
- 如果用户没有明确四类配置都怎么处理,默认:
|
|
35
|
+
- PC导航:完整导航
|
|
36
|
+
- PC快捷入口:高频入口
|
|
37
|
+
- H5导航:移动常用入口
|
|
38
|
+
- H5快捷入口:移动最高频入口
|
|
39
|
+
|
|
40
|
+
## Mem0 协议
|
|
41
|
+
- 开始前先调用 [$bpmax-memory-protocol](../bpmax-memory-protocol/SKILL.md),检索词至少包含:
|
|
42
|
+
- `workspace`
|
|
43
|
+
- 导航业务名 / 页面入口名
|
|
44
|
+
- `navmenu` / `shortcut` / `navmenu_mobile` / `shortcut_mobile`
|
|
45
|
+
- 权限点 / 可见范围 / H5 路径 等关键词
|
|
46
|
+
- 优先查这些历史信息:
|
|
47
|
+
- 当前工作区已有导航风格和命名约定
|
|
48
|
+
- 某个入口的 PC/H5 路径映射
|
|
49
|
+
- 权限点模型与可见范围模型的已知约束
|
|
50
|
+
- 四类配置回读验证通过后,再写回真正可复用的结论:
|
|
51
|
+
- `decision`:命名压缩、路径映射、权限模型选择规则
|
|
52
|
+
- `task_learning`:某类入口在四类配置中的稳定落法
|
|
53
|
+
- `anti_pattern`:单 tab 保存思维、icon 格式错误、权限点和可见范围混用
|
|
54
|
+
- 不要把单次排序调整、普通名称修改、整份导航 JSON 原样刷进 Mem0。
|
|
55
|
+
- 如果停在“只改完一个 tab 但四类尚未全量回读”“权限范围待人工确认”等状态,结束前写 `session_state`。
|
|
56
|
+
|
|
57
|
+
## 核心原则
|
|
58
|
+
- 优先复用当前浏览器页面的同域授权上下文。
|
|
59
|
+
- 当前默认闭环:
|
|
60
|
+
- `bpmax-cli config nav-config export -> 修改 work -> lint -> build -> submit dry-run -> 用户确认 -> submit --confirm -> 回读 hash -> 浏览器验收`
|
|
61
|
+
- 本地工件固定落在 `.codex/tmp/nav-config-editor/{raw,work,meta,submit,diffs,result}`
|
|
62
|
+
- 浏览器保留这几类运行时职责,不脚本化替代:
|
|
63
|
+
- 当前页面 `origin / Cookie / workspace` 提取
|
|
64
|
+
- `IconPicker` 里真实可选 icon 的读取与选择
|
|
65
|
+
- 非 `zhCN` 语言时的 `POST /api/i18n/config/apply`
|
|
66
|
+
- 最终导航管理页、PC 工作区首页、H5 首页验收
|
|
67
|
+
- 四类配置是一个整体:
|
|
68
|
+
- `navmenu`
|
|
69
|
+
- `shortcut`
|
|
70
|
+
- `navmenu_mobile`
|
|
71
|
+
- `shortcut_mobile`
|
|
72
|
+
- TypeScript build 阶段会执行防清空门禁:如果远端某类配置已有入口,而本次 work/submit 会把对应数组写成空数组,必须停止并重新 export 当前远端配置后合并修改。不得用旧 dry-run payload 或单 tab 保存思维覆盖其他配置。
|
|
73
|
+
- 导航权限只解决“入口可见性”,不解决“列表数据可见性”:
|
|
74
|
+
- `permission` / `visibility` / `visibility_scope` 只控制入口能否出现
|
|
75
|
+
- 业务字段归属、身份映射、跨数据集联动导致的数据范围收口,默认应落数据集 `pre_process_script`
|
|
76
|
+
- 页面保存时会校验并提交四类配置;修改单一 tab 时,也不能破坏另外三类配置。
|
|
77
|
+
- 默认保留已有节点 `id`、顺序、未改字段,不做无关重写。
|
|
78
|
+
- 默认保留现有命名、图标、颜色风格;新增项尽量贴近当前工作区已落地风格。
|
|
79
|
+
- 所有导航名称默认不得超过 6 个汉字。
|
|
80
|
+
- 名称超长时必须先压缩再落配置,不能依赖前端自动省略。
|
|
81
|
+
|
|
82
|
+
## 当前已验证的页面与接口事实
|
|
83
|
+
- 当前页四个 tab 分别对应:
|
|
84
|
+
- `PC导航` -> `navmenu` -> `content.navConfig`
|
|
85
|
+
- `PC快捷入口` -> `shortcut` -> `content.shortcutConfig`
|
|
86
|
+
- `H5导航` -> `navmenu_mobile` -> `content.navMobileConfig`
|
|
87
|
+
- `H5快捷入口` -> `shortcut_mobile` -> `content.shortcutMobileConfig`
|
|
88
|
+
- 页面核心接口:
|
|
89
|
+
- `GET /api/configuration`
|
|
90
|
+
- `POST /api/configuration`
|
|
91
|
+
- `PUT /api/configuration/:id`
|
|
92
|
+
- `GET /api/point/point_list`
|
|
93
|
+
- `GET /api/group/sub_groups`
|
|
94
|
+
- 非中文语言时可能还会调用 `POST /api/i18n/config/apply`
|
|
95
|
+
- 页面运行时 `NavManagement` 组件已暴露:
|
|
96
|
+
- `getData`
|
|
97
|
+
- `submitData`
|
|
98
|
+
- `formatNavigationData`
|
|
99
|
+
- `validateData`
|
|
100
|
+
|
|
101
|
+
## 工作流
|
|
102
|
+
|
|
103
|
+
### 1. 识别当前页面
|
|
104
|
+
- 读取当前页 URL。
|
|
105
|
+
- 只在工作区导航管理页执行。
|
|
106
|
+
- 从当前页识别:
|
|
107
|
+
- workspace key
|
|
108
|
+
- 当前 tab
|
|
109
|
+
- 四类配置现状
|
|
110
|
+
- 配置 id
|
|
111
|
+
- 进入统一入口模型前,先按工作区、入口名和权限模型检索一次 Mem0。
|
|
112
|
+
|
|
113
|
+
### 2. 获取运行时上下文
|
|
114
|
+
- 优先在浏览器页内获取:
|
|
115
|
+
- 当前页面 `origin`
|
|
116
|
+
- `document.cookie`
|
|
117
|
+
- 当前 `workspace`
|
|
118
|
+
- 同域网络请求
|
|
119
|
+
- `NavManagement` 组件实例和 `submitData()` 现在主要用于:
|
|
120
|
+
- 读取线上真实结构
|
|
121
|
+
- 辅助定位 icon / 权限 / 页面行为
|
|
122
|
+
- 最终刷新回页验收
|
|
123
|
+
- 不得把 `submitData()` 或脚本直提 `/api/configuration` 当作提交路径;它们只用于理解页面结构和验收行为,真实写入必须走 typed CLI。
|
|
124
|
+
|
|
125
|
+
### 3. 读取四类配置
|
|
126
|
+
- 优先从页面运行时拿四类配置,而不是只看 DOM。
|
|
127
|
+
- 需要确认每类配置的:
|
|
128
|
+
- `id`
|
|
129
|
+
- `type`
|
|
130
|
+
- `name`
|
|
131
|
+
- `content`
|
|
132
|
+
- 对应数组字段分别是:
|
|
133
|
+
- `navConfig`
|
|
134
|
+
- `shortcutConfig`
|
|
135
|
+
- `navMobileConfig`
|
|
136
|
+
- `shortcutMobileConfig`
|
|
137
|
+
|
|
138
|
+
### 4. 建立统一入口模型
|
|
139
|
+
- 不要先直接改四份数组。
|
|
140
|
+
- 先把用户需求整理成统一入口模型,再映射到四类配置。
|
|
141
|
+
- 每个入口至少考虑这些字段:
|
|
142
|
+
- `name`
|
|
143
|
+
- `path`
|
|
144
|
+
- `icon`
|
|
145
|
+
- `color`
|
|
146
|
+
- `permissionType`
|
|
147
|
+
- `permission`
|
|
148
|
+
- `visibility`
|
|
149
|
+
- `visibility_scope`
|
|
150
|
+
- `sub`
|
|
151
|
+
- `channels`
|
|
152
|
+
- `channels` 用来表达该入口应出现在哪些配置中:
|
|
153
|
+
- `pc_nav`
|
|
154
|
+
- `pc_shortcut`
|
|
155
|
+
- `h5_nav`
|
|
156
|
+
- `h5_shortcut`
|
|
157
|
+
|
|
158
|
+
### 5. 四类配置映射规则
|
|
159
|
+
|
|
160
|
+
#### 5.1 PC导航
|
|
161
|
+
- 允许树形结构。
|
|
162
|
+
- 父节点通常 `path` 为 `/`,真实跳转放在子节点。
|
|
163
|
+
- 如果用户明确要求父节点可跳转,再给父节点有效路径。
|
|
164
|
+
|
|
165
|
+
#### 5.2 PC快捷入口
|
|
166
|
+
- 默认扁平数组。
|
|
167
|
+
- 不放父子结构。
|
|
168
|
+
- 只放高频或首页直达入口。
|
|
169
|
+
|
|
170
|
+
#### 5.3 H5导航
|
|
171
|
+
- 默认扁平数组。
|
|
172
|
+
- 如果用户明确要求多级导航,才生成带 `sub` 的结构。
|
|
173
|
+
- H5 已有渲染器支持多级,但默认仍按最稳的扁平模式处理。
|
|
174
|
+
|
|
175
|
+
#### 5.4 H5快捷入口
|
|
176
|
+
- 默认扁平数组。
|
|
177
|
+
- 只保留移动端最高频入口。
|
|
178
|
+
|
|
179
|
+
### 6. 路径规则
|
|
180
|
+
- 不要把 PC 路径原样塞给 H5。
|
|
181
|
+
- 默认映射规则:
|
|
182
|
+
- PC 流程页:`/project?flow_type=...`
|
|
183
|
+
- H5 流程页:`/pages/index/project?flow_type=...`
|
|
184
|
+
- PC 工作台:`/myProject`
|
|
185
|
+
- H5 工作台:应优先参考当前工作区已有移动端可用路径
|
|
186
|
+
- 如果目标流程有非空 `flow_key`,PC/H5 路径都必须保留 `flow_key` 参数,例如 `/project?flow_type=<flowType>&flow_key=<flowKey>`;不要让导航入口落到默认流程列表。
|
|
187
|
+
- 外链不要自动映射到 H5 内页;先按原路径保留,必要时提示用户。
|
|
188
|
+
- 如果用户提供的是跨工作区路径,默认不擅自改写 workspace 前缀。
|
|
189
|
+
|
|
190
|
+
### 7. Icon 规则
|
|
191
|
+
- 不要凭源码文件名或历史配置猜 icon 格式。
|
|
192
|
+
- 必须优先以当前页面弹窗里的图标选择器为准,直接读取界面上实际可选的 icon。
|
|
193
|
+
- 当前页面实际可选图标来自 `IconPicker` 弹窗,而不是旧版 `iconList` 下拉。
|
|
194
|
+
- 当前页面图标类名的实际提交格式应使用完整类名:
|
|
195
|
+
- `ri ri_home-5-line`
|
|
196
|
+
- `ri ri_task-line`
|
|
197
|
+
- `ri ri_archive-stack-line`
|
|
198
|
+
- 不要提交成缺前缀的值:
|
|
199
|
+
- `ri_home-5-line`
|
|
200
|
+
- `ri_task-line`
|
|
201
|
+
- 也不要把旧版 `el-icon-*` 和新版 `ri ri_*` 混用,除非当前页面明确显示旧版 icon 仍在使用。
|
|
202
|
+
- 选 icon 的流程固定为:
|
|
203
|
+
1. 打开当前节点编辑弹窗
|
|
204
|
+
2. 打开图标选择器
|
|
205
|
+
3. 直接从界面上搜索业务关键词
|
|
206
|
+
4. 读取当前可选项名称
|
|
207
|
+
5. 只从当前界面确实能选到的项里挑 icon
|
|
208
|
+
- 优先使用 `line` 风格,除非当前工作区已有大量 `fill` 风格且用户想保持一致。
|
|
209
|
+
- PC 端父节点默认不配颜色。
|
|
210
|
+
- PC 端子节点默认不配颜色。
|
|
211
|
+
- H5 端允许保留颜色。
|
|
212
|
+
|
|
213
|
+
### 8. 权限与可见范围规则
|
|
214
|
+
- 支持两种权限模型:
|
|
215
|
+
- `PERMISSION_POINT`
|
|
216
|
+
- `VISIBILITY_SCOPE`
|
|
217
|
+
- 两种模型都只负责“入口可见”:
|
|
218
|
+
- 不能替代服务端列表授权
|
|
219
|
+
- 不能表达“经销商只能看自己的货”这类业务字段数据收口
|
|
220
|
+
- `PERMISSION_POINT` 时:
|
|
221
|
+
- `permission` 保留具体权限点
|
|
222
|
+
- `visibility` 固定为 `public`
|
|
223
|
+
- `visibility_scope` 置空
|
|
224
|
+
- `VISIBILITY_SCOPE` 时:
|
|
225
|
+
- `permission` 清空
|
|
226
|
+
- `visibility` 为 `public` / `self` / `custom`
|
|
227
|
+
- `visibility_scope` 使用页面约定 JSON
|
|
228
|
+
- `custom` 范围若含 group,需要按页面真实逻辑构造组树;必要时调用 `/api/group/sub_groups`
|
|
229
|
+
- 若用户实际诉求是“入口可以看到,但进列表后只能看自己的数据”,默认跳转到 [`bpmax-dataset-template-editor`](../bpmax-dataset-template-editor/SKILL.md) 的 `pre_process_script` 方案,而不是继续堆导航权限。
|
|
230
|
+
|
|
231
|
+
### 9. 命名规则
|
|
232
|
+
- 所有文本默认不超过 6 个汉字。
|
|
233
|
+
- 优先删除这些弱信息后缀:
|
|
234
|
+
- 管理
|
|
235
|
+
- 流程
|
|
236
|
+
- 工作台
|
|
237
|
+
- 页面
|
|
238
|
+
- 列表
|
|
239
|
+
- 优先保留业务核心词。
|
|
240
|
+
- 如果压缩后重名,继续做区分,不能落成重复名称。
|
|
241
|
+
- 不要造难懂缩写。
|
|
242
|
+
|
|
243
|
+
### 10. 新增节点规则
|
|
244
|
+
- 新增节点默认沿用页面风格生成随机 `id`。
|
|
245
|
+
- 默认至少补齐:
|
|
246
|
+
- `id`
|
|
247
|
+
- `name`
|
|
248
|
+
- `icon`
|
|
249
|
+
- `permission`
|
|
250
|
+
- `path`
|
|
251
|
+
- `color`
|
|
252
|
+
- `sub`
|
|
253
|
+
- `permissionType`
|
|
254
|
+
- `visibility`
|
|
255
|
+
- `visibility_scope`
|
|
256
|
+
- `sub` 必须始终存在,哪怕为空数组。
|
|
257
|
+
- `color` 默认可为空字符串。
|
|
258
|
+
|
|
259
|
+
### 11. 提交方式
|
|
260
|
+
- 优先级固定为:
|
|
261
|
+
1. `export_nav_config.py` 导出四类配置到本地 work bundle
|
|
262
|
+
2. `confirm_nav_config.py --stage work` 确认 work diff
|
|
263
|
+
3. `build_submit_payload.py` 生成 submit
|
|
264
|
+
4. `lint_nav_config_semantics.py` 做硬校验
|
|
265
|
+
5. `confirm_nav_config.py --stage submit` 确认 submit diff
|
|
266
|
+
6. `bpmax-cli config nav-config submit --id <workspace> --payload <submit-file>` 做 dry-run
|
|
267
|
+
7. 用户确认后执行 `--confirm "submit nav-config <workspace>"`
|
|
268
|
+
8. 回读四类配置并在浏览器验收
|
|
269
|
+
- 旧 `submit_nav_config.py` 只保留为结构参考,默认会硬失败。
|
|
270
|
+
- 不得直接调用 `GET/POST/PUT /api/configuration` 作为提交路径;真实远端写入必须回到 typed CLI。
|
|
271
|
+
- 当前 skill 不再把“接口 200”当完成;至少要 `submit + 回读 hash` 通过,之后还要浏览器最终验收。
|
|
272
|
+
|
|
273
|
+
### 12. 展示结果
|
|
274
|
+
- 提交成功后,必须留在当前导航管理页重新取数并核对。
|
|
275
|
+
- 至少确认:
|
|
276
|
+
- 新增或修改项已经出现
|
|
277
|
+
- 顺序正确
|
|
278
|
+
- 权限模式正确
|
|
279
|
+
- 四类配置没有互相覆盖坏
|
|
280
|
+
- 如果 `bpmax-cli config nav-config verify` 已通过:
|
|
281
|
+
- `zhCN` 语言默认状态应视为 `runtime_pending`
|
|
282
|
+
- 非 `zhCN` 语言默认状态应视为 `manual_followup_required`
|
|
283
|
+
- 导航变更必须进入工作区首页或移动端首页检查渲染结果;至少确认入口可见、点击后 URL 带有正确 `flow_type` / `flow_key`,并能进入目标列表、创建页或详情页。
|
|
284
|
+
- 验证通过后,把新的路径映射、权限模型和入口组织规则写回 Mem0。
|
|
285
|
+
|
|
286
|
+
## 输出要求
|
|
287
|
+
- 明确告诉用户本次动的是哪几类配置。
|
|
288
|
+
- 如果是“一次性给出合理配置”,要说明四类配置各自的取舍原则。
|
|
289
|
+
- 明确告诉用户本次用到的核心接口:
|
|
290
|
+
- `GET /api/configuration`
|
|
291
|
+
- `POST /api/configuration`
|
|
292
|
+
- `PUT /api/configuration/:id`
|
|
293
|
+
- `GET /api/point/point_list`
|
|
294
|
+
- `GET /api/group/sub_groups`
|
|
295
|
+
- 如果改了权限模式,要说明是权限点还是可见范围。
|
|
296
|
+
- 如果改了 icon,要说明本次 icon 是从当前页面图标选择器里实际筛出来的,而不是按名称猜测。
|
|
297
|
+
- 如果自动压缩过名称,要说明哪些名称做了缩短。
|
|
298
|
+
|
|
299
|
+
## 参考资料
|
|
300
|
+
- 页面与接口流程: [references/api-workflow.md](./references/api-workflow.md)
|
|
301
|
+
- 四类配置结构: [references/config-shape.md](./references/config-shape.md)
|
|
302
|
+
- 运行时对象探测: [references/runtime-probing.md](./references/runtime-probing.md)
|
|
303
|
+
- icon 选择与格式: [references/icon-selection.md](./references/icon-selection.md)
|
|
304
|
+
- 路径与命名规则: [references/path-mapping-rules.md](./references/path-mapping-rules.md)
|
|
305
|
+
- 提交前检查项: [references/payload-checklist.md](./references/payload-checklist.md)
|
|
306
|
+
|
|
307
|
+
## 已知经验
|
|
308
|
+
|
|
309
|
+
### 1. 这页不是“单 tab 保存”
|
|
310
|
+
- 页面 `submitData()` 会遍历四个 tab,一次性校验并保存。
|
|
311
|
+
- 所以只改一个 tab 时,也必须把另外三类配置保留完整。
|
|
312
|
+
|
|
313
|
+
### 2. H5 导航默认走保守模式
|
|
314
|
+
- 移动端支持多级导航,但默认生成多级会增加维护成本。
|
|
315
|
+
- 用户没明确要求时,优先产出扁平结构。
|
|
316
|
+
|
|
317
|
+
### 3. 权限点与可见范围要严格二选一
|
|
318
|
+
- `PERMISSION_POINT` 和 `VISIBILITY_SCOPE` 的字段清理逻辑不同。
|
|
319
|
+
- 切换模式时必须同步清空另一套字段,避免脏数据残留。
|
|
320
|
+
|
|
321
|
+
### 4. 名称长度限制要在生成阶段解决
|
|
322
|
+
- 不能把“超长名称交给 UI 截断”当方案。
|
|
323
|
+
- 导航、快捷入口、移动端入口都要统一执行 6 汉字限制。
|
|
324
|
+
|
|
325
|
+
### 5. icon 必须以当前弹窗实际可选项为准
|
|
326
|
+
- 当前页图标选择器界面里能直接读取到可选 icon 名。
|
|
327
|
+
- 实际提交应使用带前缀的完整类名,例如:
|
|
328
|
+
- `ri ri_24-hours-fill`
|
|
329
|
+
- `ri ri_home-5-line`
|
|
330
|
+
- `ri ri_task-line`
|
|
331
|
+
- 不要把 `ri_home-5-line` 这种缺前缀值直接当最终提交值。
|
|
332
|
+
|
|
333
|
+
|
|
334
|
+
## bpmax-cli 统一执行入口
|
|
335
|
+
|
|
336
|
+
本 npm 分发版必须优先使用 typed CLI 命令,不要让 Agent 直接拼 raw API 或直接运行旧来源脚本提交配置。
|
|
337
|
+
|
|
338
|
+
```bash
|
|
339
|
+
bpmax-cli config nav-config export --id <workspace> --out .codex/tmp/nav-config-editor
|
|
340
|
+
bpmax-cli config nav-config lint --work .codex/tmp/nav-config-editor/work/<file>.json
|
|
341
|
+
bpmax-cli config nav-config build --work .codex/tmp/nav-config-editor/work/<file>.json --meta .codex/tmp/nav-config-editor/meta/<file>.meta.json --out .codex/tmp/nav-config-editor/submit/<file>.json
|
|
342
|
+
bpmax-cli config nav-config submit --id <workspace> --payload .codex/tmp/nav-config-editor/submit/<file>.json
|
|
343
|
+
bpmax-cli config nav-config submit --id <workspace> --payload .codex/tmp/nav-config-editor/submit/<file>.json --confirm "submit nav-config <workspace>"
|
|
344
|
+
```
|
|
345
|
+
|
|
346
|
+
`build` 默认只生成实际变化记录的操作计划;只有需要兼容旧行为强制提交四类配置时,才追加 `--all-records`。同一配置里的 `items` 与 `content.<contentKey>` 必须保持一致,二者冲突会被 build 拦截。
|
|
347
|
+
|
|
348
|
+
授权前置:当前 profile 必须通过校对码授权,并在授权页开启“配置能力”。如果 CLI 返回 capability 缺失,停止并让用户使用有管理权限的账号重新授权。
|
|
349
|
+
|
|
350
|
+
旧来源中的 `scripts/` 和 `references/` 只作为字段结构、lint 规则和验收规则参考;不得用旧脚本直写线上导航配置。
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
# 导航配置接口工作流
|
|
2
|
+
|
|
3
|
+
## 页面
|
|
4
|
+
- 页面路径:`/w:<workspace>/workspaceConfiguration/<workspace>?nav=navs&id=<id>`
|
|
5
|
+
- 主组件:`hpt-frontend/components/workspaceConfiguration/navManagement.vue`
|
|
6
|
+
|
|
7
|
+
## 四类配置
|
|
8
|
+
- `navmenu` -> `content.navConfig`
|
|
9
|
+
- `shortcut` -> `content.shortcutConfig`
|
|
10
|
+
- `navmenu_mobile` -> `content.navMobileConfig`
|
|
11
|
+
- `shortcut_mobile` -> `content.shortcutMobileConfig`
|
|
12
|
+
|
|
13
|
+
## 查询
|
|
14
|
+
页面会并行请求四次:
|
|
15
|
+
|
|
16
|
+
```http
|
|
17
|
+
GET /api/configuration?q_type=<type>&is_default_action=1&$workspace=<workspace>&page=1&page_size=10000
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
返回列表后,通常取 `data[0]` 作为当前工作区该类型配置。
|
|
21
|
+
|
|
22
|
+
## 权限点
|
|
23
|
+
|
|
24
|
+
```http
|
|
25
|
+
GET /api/point/point_list
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
用于填充权限点下拉项。
|
|
29
|
+
|
|
30
|
+
## 可见范围组树
|
|
31
|
+
|
|
32
|
+
```http
|
|
33
|
+
GET /api/group/sub_groups?group_ids=<id1,id2>&with_full_info=0
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
当 `visibility_scope` 里选中了 group,需要转成页面所需树形 children。
|
|
37
|
+
|
|
38
|
+
## 提交
|
|
39
|
+
页面会对四类配置分别执行:
|
|
40
|
+
|
|
41
|
+
- 已存在配置 id:`PUT /api/configuration/:id`
|
|
42
|
+
- 不存在配置 id:`POST /api/configuration`
|
|
43
|
+
|
|
44
|
+
参数固定带:
|
|
45
|
+
|
|
46
|
+
```http
|
|
47
|
+
?is_default_action=1&$workspace=<workspace>
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
请求体形态:
|
|
51
|
+
|
|
52
|
+
```json
|
|
53
|
+
{
|
|
54
|
+
"type": "navmenu",
|
|
55
|
+
"name": "工作区导航",
|
|
56
|
+
"content": {
|
|
57
|
+
"navConfig": []
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
其他三类仅替换 `type` 和 `content` 字段名。
|
|
63
|
+
|
|
64
|
+
## 推荐调用顺序
|
|
65
|
+
1. 从页面运行时读取四类配置和请求骨架。
|
|
66
|
+
2. 在本地 work 文件中同时更新四类数据。
|
|
67
|
+
3. 执行 `bpmax-cli config nav-config lint/build/submit`,先 dry-run,再用精确 `--confirm` 正式提交。
|
|
68
|
+
4. 提交后回读四类配置,并在浏览器首页点击入口验证。
|
|
69
|
+
|
|
70
|
+
`submitData()`、页面 `$post` 或直接 `POST/PUT /api/configuration` 只可用于理解页面行为,不得作为真实写入路径。
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
# 四类配置结构
|
|
2
|
+
|
|
3
|
+
## 顶层
|
|
4
|
+
|
|
5
|
+
```json
|
|
6
|
+
{
|
|
7
|
+
"id": 995481712,
|
|
8
|
+
"type": "navmenu",
|
|
9
|
+
"name": "工作区导航",
|
|
10
|
+
"content": {
|
|
11
|
+
"navConfig": []
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
## 通用节点结构
|
|
17
|
+
|
|
18
|
+
```json
|
|
19
|
+
{
|
|
20
|
+
"id": "0.9999857203819873",
|
|
21
|
+
"name": "工作台",
|
|
22
|
+
"icon": "ri ri_add-circle-line",
|
|
23
|
+
"permission": "",
|
|
24
|
+
"path": "/",
|
|
25
|
+
"color": "",
|
|
26
|
+
"sub": [],
|
|
27
|
+
"permissionType": "PERMISSION_POINT",
|
|
28
|
+
"visibility": "public",
|
|
29
|
+
"visibility_scope": ""
|
|
30
|
+
}
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
## 字段说明
|
|
34
|
+
- `id`: 前端表格树的 row key。新增时通常是随机字符串。
|
|
35
|
+
- `name`: 导航名。默认不得超过 6 个汉字。
|
|
36
|
+
- `icon`: 允许新版 `ri ...`,也兼容旧版 `el-icon-*` 风格的值。
|
|
37
|
+
- `permission`: 权限点 key;若使用可见范围模式应清空。
|
|
38
|
+
- `path`: 跳转路径。
|
|
39
|
+
- `color`: 图标色。允许空字符串。
|
|
40
|
+
- `sub`: 子节点数组。快捷入口通常为空数组。
|
|
41
|
+
- `permissionType`: `PERMISSION_POINT` 或 `VISIBILITY_SCOPE`
|
|
42
|
+
- `visibility`: `public` / `self` / `custom`
|
|
43
|
+
- `visibility_scope`: 字符串化 JSON
|
|
44
|
+
|
|
45
|
+
## 可见范围结构
|
|
46
|
+
|
|
47
|
+
```json
|
|
48
|
+
{
|
|
49
|
+
"config": {
|
|
50
|
+
"user": [],
|
|
51
|
+
"group": [],
|
|
52
|
+
"role": []
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
## 四类差异
|
|
58
|
+
|
|
59
|
+
### `navmenu`
|
|
60
|
+
- 常用树形结构。
|
|
61
|
+
- 顶级节点可有 `sub`。
|
|
62
|
+
|
|
63
|
+
### `shortcut`
|
|
64
|
+
- 扁平数组。
|
|
65
|
+
- 默认不放 `sub`。
|
|
66
|
+
|
|
67
|
+
### `navmenu_mobile`
|
|
68
|
+
- 运行时支持树形。
|
|
69
|
+
- 默认建议扁平。
|
|
70
|
+
|
|
71
|
+
### `shortcut_mobile`
|
|
72
|
+
- 扁平数组。
|
|
73
|
+
|
|
74
|
+
## 当前仓库已见到的真实字段名
|
|
75
|
+
- `content.navConfig`
|
|
76
|
+
- `content.shortcutConfig`
|
|
77
|
+
- `content.navMobileConfig`
|
|
78
|
+
- `content.shortcutMobileConfig`
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
# icon 选择与格式
|
|
2
|
+
|
|
3
|
+
## 原则
|
|
4
|
+
- icon 必须从当前页面已经打开的图标选择器里直接读取。
|
|
5
|
+
- 不要只根据源码文件名、历史配置或猜测去写 icon。
|
|
6
|
+
- 如果用户明确要求“看一下现在打开的 icon 列表”,必须真的打开弹窗并从界面上读取。
|
|
7
|
+
|
|
8
|
+
## 当前页面已验证事实
|
|
9
|
+
- 图标选择器来自 `IconPicker` 弹窗。
|
|
10
|
+
- 弹窗里可搜索、可点击的 icon 总量很大,适合按关键词筛选。
|
|
11
|
+
- 界面上实际显示与选择的 icon 名格式是完整类名:
|
|
12
|
+
|
|
13
|
+
```text
|
|
14
|
+
ri ri_home-5-line
|
|
15
|
+
ri ri_task-line
|
|
16
|
+
ri ri_archive-stack-line
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
- 因此提交配置时也应优先使用这种完整值。
|
|
20
|
+
|
|
21
|
+
## 不要使用的错误格式
|
|
22
|
+
|
|
23
|
+
```text
|
|
24
|
+
ri_home-5-line
|
|
25
|
+
ri_task-line
|
|
26
|
+
ri_archive-stack-line
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
这些值可能在部分运行时里能被误显示,但不应作为该页面的标准写法。
|
|
30
|
+
|
|
31
|
+
## 推荐工作流
|
|
32
|
+
1. 在导航页点击某个节点的“编辑”。
|
|
33
|
+
2. 打开图标选择器。
|
|
34
|
+
3. 在搜索框输入业务关键词,例如:
|
|
35
|
+
- `home`
|
|
36
|
+
- `task`
|
|
37
|
+
- `archive`
|
|
38
|
+
- `database`
|
|
39
|
+
- `shopping`
|
|
40
|
+
- `exchange`
|
|
41
|
+
- `store`
|
|
42
|
+
- `contacts`
|
|
43
|
+
- `chart`
|
|
44
|
+
- `survey`
|
|
45
|
+
- `price`
|
|
46
|
+
- `qr`
|
|
47
|
+
4. 读取当前界面实际出现的 icon 名。
|
|
48
|
+
5. 从这些界面里已出现的项中挑选。
|
|
49
|
+
6. 提交前再次确认最终值带有 `ri ri_` 前缀。
|
|
50
|
+
|
|
51
|
+
## 当前已在界面上验证过的一批 icon
|
|
52
|
+
- `ri ri_home-5-line`
|
|
53
|
+
- `ri ri_task-line`
|
|
54
|
+
- `ri ri_archive-stack-line`
|
|
55
|
+
- `ri ri_database-2-line`
|
|
56
|
+
- `ri ri_file-list-3-line`
|
|
57
|
+
- `ri ri_qr-scan-2-line`
|
|
58
|
+
- `ri ri_error-warning-line`
|
|
59
|
+
- `ri ri_inbox-archive-line`
|
|
60
|
+
- `ri ri_exchange-2-line`
|
|
61
|
+
- `ri ri_exchange-box-line`
|
|
62
|
+
- `ri ri_shopping-bag-3-line`
|
|
63
|
+
- `ri ri_store-2-line`
|
|
64
|
+
- `ri ri_store-3-line`
|
|
65
|
+
- `ri ri_user-add-line`
|
|
66
|
+
- `ri ri_box-1-line`
|
|
67
|
+
- `ri ri_box-3-line`
|
|
68
|
+
- `ri ri_price-tag-3-line`
|
|
69
|
+
- `ri ri_survey-line`
|
|
70
|
+
- `ri ri_add-circle-line`
|
|
71
|
+
- `ri ri_indeterminate-circle-line`
|
|
72
|
+
- `ri ri_contacts-book-3-line`
|
|
73
|
+
- `ri ri_team-line`
|
|
74
|
+
- `ri ri_bar-chart-box-line`
|
|
75
|
+
- `ri ri_bar-chart-grouped-line`
|
|
76
|
+
- `ri ri_line-chart-line`
|
|
77
|
+
|
|
78
|
+
## 风格建议
|
|
79
|
+
- 父节点优先选抽象分组 icon。
|
|
80
|
+
- 子节点优先选动作或业务对象 icon。
|
|
81
|
+
- 默认优先使用 `line` 风格。
|
|
82
|
+
- PC 端默认不配色。
|
|
83
|
+
- H5 端可配色。
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
# 路径与命名规则
|
|
2
|
+
|
|
3
|
+
## PC / H5 路径映射
|
|
4
|
+
|
|
5
|
+
### 流程列表
|
|
6
|
+
- PC:
|
|
7
|
+
|
|
8
|
+
```text
|
|
9
|
+
/project?flow_type=<flowType>
|
|
10
|
+
/project?flow_type=<flowType>&flow_key=<flowKey>
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
- H5:
|
|
14
|
+
|
|
15
|
+
```text
|
|
16
|
+
/pages/index/project?flow_type=<flowType>
|
|
17
|
+
/pages/index/project?flow_type=<flowType>&flow_key=<flowKey>
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
- `flow_key` 为空时省略;非空时必须保留。多变体流程如果丢掉 `flow_key`,导航会进入默认流程列表,属于验收失败。
|
|
21
|
+
- 浏览器验收必须点击入口后确认 URL 中的 `flow_type` 和 `flow_key` 与目标流程一致。
|
|
22
|
+
|
|
23
|
+
### 控制台 / 看板 / 外链
|
|
24
|
+
- 不要机械把所有 PC 路径改成 `/pages/index/...`
|
|
25
|
+
- 如果当前工作区已有同类移动端路径,优先复用现有样例。
|
|
26
|
+
- 没有把握时,先保留原路径并向用户说明风险。
|
|
27
|
+
|
|
28
|
+
## 命名限制
|
|
29
|
+
- 默认不超过 6 个汉字。
|
|
30
|
+
- 四类配置统一执行,不区分 PC / H5。
|
|
31
|
+
|
|
32
|
+
## 压缩优先级
|
|
33
|
+
1. 去掉弱后缀:
|
|
34
|
+
- 管理
|
|
35
|
+
- 流程
|
|
36
|
+
- 工作台
|
|
37
|
+
- 页面
|
|
38
|
+
- 列表
|
|
39
|
+
2. 保留业务核心词。
|
|
40
|
+
3. 不用难懂缩写。
|
|
41
|
+
4. 如果仍超长,改成更短但不丢业务辨识度的名称。
|
|
42
|
+
|
|
43
|
+
## 冲突处理
|
|
44
|
+
- 同一配置数组里压缩后若重名,必须继续区分。
|
|
45
|
+
- 优先通过业务对象区分,而不是附加无意义数字。
|
|
46
|
+
|
|
47
|
+
## 常见示例
|
|
48
|
+
- `价格方案管理` -> `价格方案`
|
|
49
|
+
- `经销商管理流程` -> `经销商`
|
|
50
|
+
- `客户退货记录` -> `客户退货`
|
|
51
|
+
- `门店创建流程` -> `创建门店`
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
# 提交前检查清单
|
|
2
|
+
|
|
3
|
+
## 通用
|
|
4
|
+
- 四类配置都还在。
|
|
5
|
+
- 未改动的配置没有被清空。
|
|
6
|
+
- 每个节点都有:
|
|
7
|
+
- `id`
|
|
8
|
+
- `name`
|
|
9
|
+
- `icon`
|
|
10
|
+
- `path`
|
|
11
|
+
- `sub`
|
|
12
|
+
- `name` 不超过 6 个汉字。
|
|
13
|
+
- `sub` 一律为数组。
|
|
14
|
+
|
|
15
|
+
## 权限
|
|
16
|
+
- `permissionType` 只能是:
|
|
17
|
+
- `PERMISSION_POINT`
|
|
18
|
+
- `VISIBILITY_SCOPE`
|
|
19
|
+
- 若为 `PERMISSION_POINT`:
|
|
20
|
+
- `permission` 可为空或具体权限点
|
|
21
|
+
- `visibility = public`
|
|
22
|
+
- `visibility_scope = ""`
|
|
23
|
+
- 若为 `VISIBILITY_SCOPE`:
|
|
24
|
+
- `permission = ""`
|
|
25
|
+
- `visibility` 合法
|
|
26
|
+
- `visibility_scope` 为合法 JSON 字符串
|
|
27
|
+
|
|
28
|
+
## 路径
|
|
29
|
+
- PC 路径不要误写成 H5 路径。
|
|
30
|
+
- H5 路径不要误写成 PC 路径。
|
|
31
|
+
- 父节点若无实际跳转需求,允许 `path = "/"`。
|
|
32
|
+
|
|
33
|
+
## 结构
|
|
34
|
+
- `shortcut` / `shortcut_mobile` 默认扁平。
|
|
35
|
+
- `navmenu_mobile` 若非明确需求,默认不新增多级 `sub`。
|
|
36
|
+
|
|
37
|
+
## 提交后
|
|
38
|
+
- 重新读取四类配置。
|
|
39
|
+
- 检查新增项是否出现。
|
|
40
|
+
- 检查顺序是否符合预期。
|
|
41
|
+
- 检查名称是否按 6 汉字规则落地。
|