bpmax-cli 0.1.44 → 0.2.1-beta.10
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 +79 -5
- package/dist/bin.js +14430 -2672
- 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 +230 -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 +90 -0
- package/skills/bpmax-auth/SKILL.md +6 -17
- package/skills/bpmax-blueprint-doc-workflow/SKILL.md +87 -0
- package/skills/bpmax-blueprint-doc-workflow/agents/openai.yaml +4 -0
- package/skills/bpmax-blueprint-doc-workflow/references/blueprint-structure.md +60 -0
- package/skills/bpmax-blueprint-doc-workflow/references/per-flow-required-structure.md +98 -0
- package/skills/bpmax-blueprint-doc-workflow/references/sample-forbidden-term.xml +12 -0
- package/skills/bpmax-blueprint-doc-workflow/references/sample-mermaid-codeblock.xml +12 -0
- package/skills/bpmax-blueprint-doc-workflow/references/sample-missing-boundary.xml +10 -0
- package/skills/bpmax-blueprint-doc-workflow/references/sample-missing-whiteboard.xml +10 -0
- package/skills/bpmax-blueprint-doc-workflow/references/sample-pass.xml +55 -0
- package/skills/bpmax-blueprint-doc-workflow/scripts/lint_blueprint_doc.py +257 -0
- 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 +606 -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 +789 -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 +227 -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 +564 -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 +355 -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 +1148 -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 +1160 -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,55 @@
|
|
|
1
|
+
#!/usr/bin/env python3
|
|
2
|
+
from __future__ import annotations
|
|
3
|
+
|
|
4
|
+
import argparse
|
|
5
|
+
|
|
6
|
+
from list_template_editor_common import (
|
|
7
|
+
build_acceptance_payload,
|
|
8
|
+
dump_json,
|
|
9
|
+
load_json,
|
|
10
|
+
paths_for,
|
|
11
|
+
update_acceptance_meta,
|
|
12
|
+
)
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
def build_parser() -> argparse.ArgumentParser:
|
|
16
|
+
p = argparse.ArgumentParser(description="Record editor-page/list-page acceptance evidence for a BPMAX list-template change.")
|
|
17
|
+
p.add_argument("--stem", required=True)
|
|
18
|
+
p.add_argument("--editor-page-accepted", action="store_true")
|
|
19
|
+
p.add_argument("--list-page-accepted", action="store_true")
|
|
20
|
+
return p
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
def main() -> int:
|
|
24
|
+
args = build_parser().parse_args()
|
|
25
|
+
paths = paths_for(args.stem)
|
|
26
|
+
meta = update_acceptance_meta(
|
|
27
|
+
paths["meta"],
|
|
28
|
+
stem=args.stem,
|
|
29
|
+
editor_page_accepted=(True if args.editor_page_accepted else None),
|
|
30
|
+
list_page_accepted=(True if args.list_page_accepted else None),
|
|
31
|
+
)
|
|
32
|
+
verify = load_json(paths["verify"]) if paths["verify"].exists() else {}
|
|
33
|
+
verification = verify.get("verification") or {}
|
|
34
|
+
acceptance = build_acceptance_payload(
|
|
35
|
+
readback_ok=bool(verify.get("ok")),
|
|
36
|
+
editor_page_accepted=bool(meta.get("editorPageAccepted")),
|
|
37
|
+
list_page_accepted=bool(meta.get("listPageAccepted")),
|
|
38
|
+
high_risk_required=bool(meta.get("highRiskAcceptanceRequired")),
|
|
39
|
+
high_risk_reasons=list(meta.get("highRiskReasons") or []),
|
|
40
|
+
)
|
|
41
|
+
dump_json(
|
|
42
|
+
paths["acceptance"],
|
|
43
|
+
{
|
|
44
|
+
**acceptance,
|
|
45
|
+
"submittedColumnTitles": verification.get("submittedColumnTitles"),
|
|
46
|
+
"readbackColumnTitles": verification.get("readbackColumnTitles"),
|
|
47
|
+
},
|
|
48
|
+
)
|
|
49
|
+
print(paths["meta"])
|
|
50
|
+
print(paths["acceptance"])
|
|
51
|
+
return 0
|
|
52
|
+
|
|
53
|
+
|
|
54
|
+
if __name__ == "__main__":
|
|
55
|
+
raise SystemExit(main())
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
#!/usr/bin/env python3
|
|
2
|
+
from __future__ import annotations
|
|
3
|
+
|
|
4
|
+
import sys
|
|
5
|
+
|
|
6
|
+
print(
|
|
7
|
+
"Legacy config submit scripts are disabled in bpmax-cli. Use `bpmax-cli config list-template submit` so capability, dry-run, confirmation, audit, and baseline checks are enforced.",
|
|
8
|
+
file=sys.stderr,
|
|
9
|
+
)
|
|
10
|
+
sys.exit(2)
|
|
11
|
+
|
|
12
|
+
import argparse
|
|
13
|
+
|
|
14
|
+
from list_template_editor_common import (
|
|
15
|
+
build_acceptance_payload,
|
|
16
|
+
build_client,
|
|
17
|
+
dump_json,
|
|
18
|
+
ensure_submission_allowed,
|
|
19
|
+
extract_template_id,
|
|
20
|
+
load_json,
|
|
21
|
+
parse_content,
|
|
22
|
+
paths_for,
|
|
23
|
+
summarize_verification,
|
|
24
|
+
write_diff,
|
|
25
|
+
)
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
def build_parser() -> argparse.ArgumentParser:
|
|
29
|
+
p = argparse.ArgumentParser(description="Submit a local BPMAX list-template payload and verify readback.")
|
|
30
|
+
p.add_argument("--stem", required=True)
|
|
31
|
+
p.add_argument("--workspace")
|
|
32
|
+
p.add_argument("--base-url")
|
|
33
|
+
p.add_argument("--language", default="zhCN")
|
|
34
|
+
p.add_argument("--cookie-header")
|
|
35
|
+
p.add_argument("--timeout", type=float, default=30)
|
|
36
|
+
p.add_argument("--insecure", action="store_true")
|
|
37
|
+
return p
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
def main() -> int:
|
|
41
|
+
args = build_parser().parse_args()
|
|
42
|
+
client = build_client(args)
|
|
43
|
+
paths = paths_for(args.stem)
|
|
44
|
+
meta = ensure_submission_allowed(paths["meta"], paths["work"], paths["submit"])
|
|
45
|
+
submit_payload = load_json(paths["submit"])
|
|
46
|
+
semantic_lint = load_json(paths["semantic_lint"]) if paths["semantic_lint"].exists() else None
|
|
47
|
+
|
|
48
|
+
mode = meta.get("mode")
|
|
49
|
+
if mode == "edit":
|
|
50
|
+
template_id = meta.get("templateId")
|
|
51
|
+
if not template_id:
|
|
52
|
+
raise SystemExit("edit submission requires templateId in meta")
|
|
53
|
+
submit_response = client.update_flow_page_template(template_id, submit_payload)
|
|
54
|
+
readback_id = template_id
|
|
55
|
+
elif mode == "create":
|
|
56
|
+
submit_response = client.create_flow_page_template(submit_payload)
|
|
57
|
+
readback_id = extract_template_id(submit_response)
|
|
58
|
+
if not readback_id:
|
|
59
|
+
raise SystemExit("create response did not include a template id")
|
|
60
|
+
else:
|
|
61
|
+
raise SystemExit(f"unsupported submission mode: {mode}")
|
|
62
|
+
|
|
63
|
+
readback = client.get_flow_page_template(readback_id).get("data") or {}
|
|
64
|
+
verify = summarize_verification(submit_payload, readback)
|
|
65
|
+
acceptance = build_acceptance_payload(
|
|
66
|
+
readback_ok=verify["ok"],
|
|
67
|
+
editor_page_accepted=bool(meta.get("editorPageAccepted")),
|
|
68
|
+
list_page_accepted=bool(meta.get("listPageAccepted")),
|
|
69
|
+
high_risk_required=bool(meta.get("highRiskAcceptanceRequired")),
|
|
70
|
+
high_risk_reasons=list(meta.get("highRiskReasons") or []),
|
|
71
|
+
)
|
|
72
|
+
|
|
73
|
+
dump_json(paths["response"], submit_response)
|
|
74
|
+
dump_json(paths["readback"], readback)
|
|
75
|
+
dump_json(paths["acceptance"], acceptance)
|
|
76
|
+
dump_json(
|
|
77
|
+
paths["verify"],
|
|
78
|
+
{
|
|
79
|
+
"ok": verify["ok"],
|
|
80
|
+
"mode": mode,
|
|
81
|
+
"templateId": readback_id,
|
|
82
|
+
"submittedContent": parse_content(submit_payload.get("content")),
|
|
83
|
+
"semanticLint": semantic_lint,
|
|
84
|
+
"acceptance": acceptance,
|
|
85
|
+
"verification": verify,
|
|
86
|
+
},
|
|
87
|
+
)
|
|
88
|
+
write_diff(
|
|
89
|
+
paths["readback_diff"],
|
|
90
|
+
{
|
|
91
|
+
**submit_payload,
|
|
92
|
+
"content": parse_content(submit_payload.get("content")),
|
|
93
|
+
},
|
|
94
|
+
{
|
|
95
|
+
"name": readback.get("name"),
|
|
96
|
+
"desc": readback.get("desc"),
|
|
97
|
+
"data_set_id": readback.get("data_set_id"),
|
|
98
|
+
"flow_type": readback.get("flow_type"),
|
|
99
|
+
"flow_key": readback.get("flow_key"),
|
|
100
|
+
"type": readback.get("type"),
|
|
101
|
+
"content": parse_content(readback.get("content")),
|
|
102
|
+
},
|
|
103
|
+
"submit",
|
|
104
|
+
"readback",
|
|
105
|
+
)
|
|
106
|
+
|
|
107
|
+
print(paths["response"])
|
|
108
|
+
print(paths["readback"])
|
|
109
|
+
print(paths["readback_diff"])
|
|
110
|
+
print(paths["verify"])
|
|
111
|
+
if not verify["ok"]:
|
|
112
|
+
raise SystemExit("readback verification failed; inspect verify.json for mismatches")
|
|
113
|
+
return 0
|
|
114
|
+
|
|
115
|
+
|
|
116
|
+
if __name__ == "__main__":
|
|
117
|
+
raise SystemExit(main())
|
|
@@ -0,0 +1,441 @@
|
|
|
1
|
+
from __future__ import annotations
|
|
2
|
+
|
|
3
|
+
import sys
|
|
4
|
+
import tempfile
|
|
5
|
+
import unittest
|
|
6
|
+
from pathlib import Path
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
SCRIPT_DIR = Path(__file__).resolve().parents[1] / "scripts"
|
|
10
|
+
if str(SCRIPT_DIR) not in sys.path:
|
|
11
|
+
sys.path.insert(0, str(SCRIPT_DIR))
|
|
12
|
+
|
|
13
|
+
import list_template_editor_common as common # noqa: E402
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
class ListTemplateEditorCommonTests(unittest.TestCase):
|
|
17
|
+
def test_detail_to_work_and_build_submit_round_trip(self) -> None:
|
|
18
|
+
detail = {
|
|
19
|
+
"id": 123,
|
|
20
|
+
"name": "示例模板",
|
|
21
|
+
"desc": "desc",
|
|
22
|
+
"data_set_id": 456,
|
|
23
|
+
"flow_type": "flow123",
|
|
24
|
+
"flow_key": "",
|
|
25
|
+
"type": 1,
|
|
26
|
+
"content": "{\"level\":0,\"config\":[{\"title\":\"名称\",\"createElement\":{\"children\":{\"$template\":\"ctx.name\",\"eval\":true}}}]}",
|
|
27
|
+
}
|
|
28
|
+
work = common.detail_to_work_payload(detail, mode="edit")
|
|
29
|
+
self.assertEqual(work["basic"]["data_set_id"], 456)
|
|
30
|
+
self.assertEqual(work["content"]["config"][0]["title"], "名称")
|
|
31
|
+
|
|
32
|
+
submit = common.build_submit_payload(work)
|
|
33
|
+
self.assertEqual(submit["name"], "示例模板")
|
|
34
|
+
self.assertEqual(common.parse_content(submit["content"])["config"][0]["title"], "名称")
|
|
35
|
+
|
|
36
|
+
def test_build_requires_work_confirmation(self) -> None:
|
|
37
|
+
with tempfile.TemporaryDirectory() as tmpdir:
|
|
38
|
+
meta = Path(tmpdir) / "meta.json"
|
|
39
|
+
work = Path(tmpdir) / "work.json"
|
|
40
|
+
submit = Path(tmpdir) / "submit.json"
|
|
41
|
+
common.dump_json(
|
|
42
|
+
meta,
|
|
43
|
+
common.ensure_meta_shape(
|
|
44
|
+
{
|
|
45
|
+
"stem": "x",
|
|
46
|
+
"mode": "edit",
|
|
47
|
+
"workspace": "store_mgr",
|
|
48
|
+
"status": "exported",
|
|
49
|
+
},
|
|
50
|
+
"x",
|
|
51
|
+
),
|
|
52
|
+
)
|
|
53
|
+
common.dump_json(
|
|
54
|
+
work,
|
|
55
|
+
{
|
|
56
|
+
"mode": "edit",
|
|
57
|
+
"basic": {
|
|
58
|
+
"name": "模板",
|
|
59
|
+
"desc": "",
|
|
60
|
+
"data_set_id": 1,
|
|
61
|
+
"flow_type": "flow1",
|
|
62
|
+
"flow_key": "",
|
|
63
|
+
"type": 1,
|
|
64
|
+
},
|
|
65
|
+
"content": {"level": 0, "config": []},
|
|
66
|
+
},
|
|
67
|
+
)
|
|
68
|
+
common.dump_json(submit, {"name": "模板"})
|
|
69
|
+
with self.assertRaises(SystemExit):
|
|
70
|
+
common.update_build_meta(meta, stem="x", work_path=work, submit_path=submit)
|
|
71
|
+
|
|
72
|
+
def test_confirm_and_submit_gate(self) -> None:
|
|
73
|
+
with tempfile.TemporaryDirectory() as tmpdir:
|
|
74
|
+
meta = Path(tmpdir) / "meta.json"
|
|
75
|
+
work = Path(tmpdir) / "work.json"
|
|
76
|
+
submit = Path(tmpdir) / "submit.json"
|
|
77
|
+
common.dump_json(
|
|
78
|
+
work,
|
|
79
|
+
{
|
|
80
|
+
"mode": "edit",
|
|
81
|
+
"basic": {
|
|
82
|
+
"name": "模板",
|
|
83
|
+
"desc": "",
|
|
84
|
+
"data_set_id": 1,
|
|
85
|
+
"flow_type": "flow1",
|
|
86
|
+
"flow_key": "",
|
|
87
|
+
"type": 1,
|
|
88
|
+
},
|
|
89
|
+
"content": {"level": 0, "config": []},
|
|
90
|
+
},
|
|
91
|
+
)
|
|
92
|
+
common.dump_json(meta, common.ensure_meta_shape({"stem": "x", "mode": "edit", "workspace": "store_mgr"}, "x"))
|
|
93
|
+
|
|
94
|
+
common.update_confirmation_state(meta, stem="x", actor="codex", stage="work", work_path=work)
|
|
95
|
+
common.dump_json(submit, common.build_submit_payload(common.load_json(work)))
|
|
96
|
+
common.update_build_meta(meta, stem="x", work_path=work, submit_path=submit)
|
|
97
|
+
lint_report = common.lint_list_template_semantics(
|
|
98
|
+
common.load_json(work),
|
|
99
|
+
data_sets=[{"id": 1, "dataSetFields": []}],
|
|
100
|
+
submit_payload=common.load_json(submit),
|
|
101
|
+
)
|
|
102
|
+
common.update_lint_meta(meta, stem="x", submit_path=submit, report=lint_report)
|
|
103
|
+
common.update_confirmation_state(meta, stem="x", actor="codex", stage="submit", work_path=work, submit_path=submit)
|
|
104
|
+
meta_payload = common.ensure_submission_allowed(meta, work, submit)
|
|
105
|
+
self.assertEqual(meta_payload["status"], "submit_confirmed")
|
|
106
|
+
|
|
107
|
+
def test_lint_blocks_invalid_icon_and_missing_field_ref(self) -> None:
|
|
108
|
+
work = {
|
|
109
|
+
"mode": "edit",
|
|
110
|
+
"basic": {
|
|
111
|
+
"name": "模板",
|
|
112
|
+
"desc": "",
|
|
113
|
+
"data_set_id": 9,
|
|
114
|
+
"flow_type": "flow1",
|
|
115
|
+
"flow_key": "",
|
|
116
|
+
"type": 1,
|
|
117
|
+
},
|
|
118
|
+
"content": {
|
|
119
|
+
"level": 0,
|
|
120
|
+
"config": [
|
|
121
|
+
{
|
|
122
|
+
"title": "名称",
|
|
123
|
+
"icon": "ri_file-text-line",
|
|
124
|
+
"iconColor": "#ff0000",
|
|
125
|
+
"createElement": {
|
|
126
|
+
"children": {
|
|
127
|
+
"$template": "ctx.missing_key",
|
|
128
|
+
"eval": True,
|
|
129
|
+
}
|
|
130
|
+
},
|
|
131
|
+
}
|
|
132
|
+
],
|
|
133
|
+
},
|
|
134
|
+
"meta": {
|
|
135
|
+
"previousDataSetId": 8,
|
|
136
|
+
},
|
|
137
|
+
}
|
|
138
|
+
submit = common.build_submit_payload(work)
|
|
139
|
+
report = common.lint_list_template_semantics(
|
|
140
|
+
work,
|
|
141
|
+
data_sets=[{"id": 9, "dataSetFields": [{"key": "name"}]}],
|
|
142
|
+
submit_payload=submit,
|
|
143
|
+
)
|
|
144
|
+
self.assertFalse(report["ok"])
|
|
145
|
+
self.assertTrue(report["highRiskAcceptanceRequired"])
|
|
146
|
+
self.assertIn("data_set_switch", report["highRiskReasons"])
|
|
147
|
+
self.assertTrue(any("icon must use full class format" in item for item in report["style_errors"]))
|
|
148
|
+
self.assertTrue(any("missing_key" in item for item in report["errors"]))
|
|
149
|
+
|
|
150
|
+
def test_lint_blocks_project_list_query(self) -> None:
|
|
151
|
+
work = {
|
|
152
|
+
"mode": "edit",
|
|
153
|
+
"basic": {
|
|
154
|
+
"name": "模板",
|
|
155
|
+
"desc": "",
|
|
156
|
+
"data_set_id": 9,
|
|
157
|
+
"flow_type": "flow1",
|
|
158
|
+
"flow_key": "",
|
|
159
|
+
"type": 1,
|
|
160
|
+
},
|
|
161
|
+
"content": {
|
|
162
|
+
"level": 0,
|
|
163
|
+
"config": [],
|
|
164
|
+
"beforeSearch": {
|
|
165
|
+
"$template": (
|
|
166
|
+
"{ return ctx.$axios.post('/bpmax/project/list?page=1', "
|
|
167
|
+
"{ flow_type: 'flow1', query: {} }); }"
|
|
168
|
+
)
|
|
169
|
+
},
|
|
170
|
+
},
|
|
171
|
+
}
|
|
172
|
+
submit = common.build_submit_payload(work)
|
|
173
|
+
report = common.lint_list_template_semantics(
|
|
174
|
+
work,
|
|
175
|
+
data_sets=[{"id": 9, "dataSetFields": []}],
|
|
176
|
+
submit_payload=submit,
|
|
177
|
+
)
|
|
178
|
+
|
|
179
|
+
self.assertFalse(report["ok"])
|
|
180
|
+
self.assertTrue(any("project/list" in item for item in report["errors"]))
|
|
181
|
+
|
|
182
|
+
def test_lint_allows_action_button_icons_and_ordinary_icon_window(self) -> None:
|
|
183
|
+
work = {
|
|
184
|
+
"mode": "edit",
|
|
185
|
+
"basic": {
|
|
186
|
+
"name": "模板",
|
|
187
|
+
"desc": "",
|
|
188
|
+
"data_set_id": 9,
|
|
189
|
+
"flow_type": "flow1",
|
|
190
|
+
"flow_key": "",
|
|
191
|
+
"type": 1,
|
|
192
|
+
},
|
|
193
|
+
"content": {
|
|
194
|
+
"level": 0,
|
|
195
|
+
"config": [
|
|
196
|
+
{
|
|
197
|
+
"title": "名称",
|
|
198
|
+
"icon": "ri ri_file-text-line",
|
|
199
|
+
"props": {
|
|
200
|
+
"showOverflowTooltip": True,
|
|
201
|
+
},
|
|
202
|
+
"createElement": {
|
|
203
|
+
"children": {
|
|
204
|
+
"$template": "ctx.name",
|
|
205
|
+
"eval": True,
|
|
206
|
+
}
|
|
207
|
+
},
|
|
208
|
+
},
|
|
209
|
+
{
|
|
210
|
+
"title": "状态",
|
|
211
|
+
"createElement": {
|
|
212
|
+
"children": {
|
|
213
|
+
"$template": "ctx.status",
|
|
214
|
+
"eval": True,
|
|
215
|
+
}
|
|
216
|
+
},
|
|
217
|
+
},
|
|
218
|
+
{
|
|
219
|
+
"title": "负责人",
|
|
220
|
+
"createElement": {
|
|
221
|
+
"is": "div",
|
|
222
|
+
"children": [
|
|
223
|
+
{
|
|
224
|
+
"is": "el-avatar",
|
|
225
|
+
"attribute": {
|
|
226
|
+
"props": {
|
|
227
|
+
"size": 24,
|
|
228
|
+
"src": {
|
|
229
|
+
"$template": "{ const owner = ctx.__project_owner || {}; return owner.avatar || '' }",
|
|
230
|
+
"eval": True,
|
|
231
|
+
},
|
|
232
|
+
}
|
|
233
|
+
},
|
|
234
|
+
},
|
|
235
|
+
{
|
|
236
|
+
"is": "span",
|
|
237
|
+
"children": {
|
|
238
|
+
"$template": "{ const owner = ctx.__project_owner || {}; return owner.name || '--' }",
|
|
239
|
+
"eval": True,
|
|
240
|
+
},
|
|
241
|
+
},
|
|
242
|
+
],
|
|
243
|
+
},
|
|
244
|
+
},
|
|
245
|
+
{
|
|
246
|
+
"title": "操作",
|
|
247
|
+
"createElement": {
|
|
248
|
+
"children": [
|
|
249
|
+
{
|
|
250
|
+
"is": "el-button",
|
|
251
|
+
"attribute": {
|
|
252
|
+
"props": {
|
|
253
|
+
"size": "small",
|
|
254
|
+
"type": "text",
|
|
255
|
+
"icon": "ri ri_eye-line",
|
|
256
|
+
}
|
|
257
|
+
},
|
|
258
|
+
"children": "详情",
|
|
259
|
+
},
|
|
260
|
+
{
|
|
261
|
+
"is": "el-button",
|
|
262
|
+
"attribute": {
|
|
263
|
+
"props": {
|
|
264
|
+
"size": "small",
|
|
265
|
+
"type": "text",
|
|
266
|
+
"icon": "ri ri_delete-bin-6-line",
|
|
267
|
+
}
|
|
268
|
+
},
|
|
269
|
+
"children": "删除",
|
|
270
|
+
},
|
|
271
|
+
]
|
|
272
|
+
},
|
|
273
|
+
"icon": None,
|
|
274
|
+
"iconColor": None,
|
|
275
|
+
},
|
|
276
|
+
],
|
|
277
|
+
},
|
|
278
|
+
"meta": {},
|
|
279
|
+
}
|
|
280
|
+
submit = common.build_submit_payload(work)
|
|
281
|
+
report = common.lint_list_template_semantics(
|
|
282
|
+
work,
|
|
283
|
+
data_sets=[{"id": 9, "dataSetFields": [{"key": "name"}, {"key": "status"}]}],
|
|
284
|
+
submit_payload=submit,
|
|
285
|
+
)
|
|
286
|
+
|
|
287
|
+
self.assertTrue(report["ok"])
|
|
288
|
+
self.assertFalse(report["style_errors"])
|
|
289
|
+
|
|
290
|
+
def test_lint_blocks_action_column_root_icon_and_missing_button_icon(self) -> None:
|
|
291
|
+
work = {
|
|
292
|
+
"mode": "edit",
|
|
293
|
+
"basic": {
|
|
294
|
+
"name": "模板",
|
|
295
|
+
"desc": "",
|
|
296
|
+
"data_set_id": 9,
|
|
297
|
+
"flow_type": "flow1",
|
|
298
|
+
"flow_key": "",
|
|
299
|
+
"type": 1,
|
|
300
|
+
},
|
|
301
|
+
"content": {
|
|
302
|
+
"level": 0,
|
|
303
|
+
"config": [
|
|
304
|
+
{
|
|
305
|
+
"title": "名称",
|
|
306
|
+
"icon": "ri ri_file-text-line",
|
|
307
|
+
"createElement": {
|
|
308
|
+
"children": {
|
|
309
|
+
"$template": "ctx.name",
|
|
310
|
+
"eval": True,
|
|
311
|
+
}
|
|
312
|
+
},
|
|
313
|
+
},
|
|
314
|
+
{
|
|
315
|
+
"title": "操作",
|
|
316
|
+
"icon": "ri ri_settings-3-line",
|
|
317
|
+
"iconColor": "#D6DCE5",
|
|
318
|
+
"createElement": {
|
|
319
|
+
"children": [
|
|
320
|
+
{
|
|
321
|
+
"is": "el-button",
|
|
322
|
+
"attribute": {
|
|
323
|
+
"props": {
|
|
324
|
+
"size": "small",
|
|
325
|
+
"type": "text",
|
|
326
|
+
}
|
|
327
|
+
},
|
|
328
|
+
"children": "详情",
|
|
329
|
+
}
|
|
330
|
+
]
|
|
331
|
+
},
|
|
332
|
+
},
|
|
333
|
+
],
|
|
334
|
+
},
|
|
335
|
+
"meta": {},
|
|
336
|
+
}
|
|
337
|
+
submit = common.build_submit_payload(work)
|
|
338
|
+
report = common.lint_list_template_semantics(
|
|
339
|
+
work,
|
|
340
|
+
data_sets=[{"id": 9, "dataSetFields": [{"key": "name"}]}],
|
|
341
|
+
submit_payload=submit,
|
|
342
|
+
)
|
|
343
|
+
|
|
344
|
+
self.assertFalse(report["ok"])
|
|
345
|
+
self.assertTrue(any("must not set column-level icon" in item for item in report["style_errors"]))
|
|
346
|
+
self.assertTrue(any("must provide a button-level icon" in item for item in report["style_errors"]))
|
|
347
|
+
|
|
348
|
+
def test_lint_blocks_people_column_without_avatar(self) -> None:
|
|
349
|
+
work = {
|
|
350
|
+
"mode": "edit",
|
|
351
|
+
"basic": {
|
|
352
|
+
"name": "模板",
|
|
353
|
+
"desc": "",
|
|
354
|
+
"data_set_id": 9,
|
|
355
|
+
"flow_type": "flow1",
|
|
356
|
+
"flow_key": "",
|
|
357
|
+
"type": 1,
|
|
358
|
+
},
|
|
359
|
+
"content": {
|
|
360
|
+
"level": 0,
|
|
361
|
+
"config": [
|
|
362
|
+
{
|
|
363
|
+
"title": "名称",
|
|
364
|
+
"icon": "ri ri_file-text-line",
|
|
365
|
+
"props": {
|
|
366
|
+
"showOverflowTooltip": True,
|
|
367
|
+
},
|
|
368
|
+
"createElement": {
|
|
369
|
+
"children": {
|
|
370
|
+
"$template": "ctx.name",
|
|
371
|
+
"eval": True,
|
|
372
|
+
}
|
|
373
|
+
},
|
|
374
|
+
},
|
|
375
|
+
{
|
|
376
|
+
"title": "负责人",
|
|
377
|
+
"createElement": {
|
|
378
|
+
"children": {
|
|
379
|
+
"$template": "{ const owner = ctx.__project_owner || {}; return owner.name || '--' }",
|
|
380
|
+
"eval": True,
|
|
381
|
+
}
|
|
382
|
+
},
|
|
383
|
+
},
|
|
384
|
+
],
|
|
385
|
+
},
|
|
386
|
+
"meta": {},
|
|
387
|
+
}
|
|
388
|
+
submit = common.build_submit_payload(work)
|
|
389
|
+
report = common.lint_list_template_semantics(
|
|
390
|
+
work,
|
|
391
|
+
data_sets=[{"id": 9, "dataSetFields": [{"key": "name"}]}],
|
|
392
|
+
submit_payload=submit,
|
|
393
|
+
)
|
|
394
|
+
|
|
395
|
+
self.assertFalse(report["ok"])
|
|
396
|
+
self.assertTrue(any("people columns must render avatar" in item for item in report["style_errors"]))
|
|
397
|
+
|
|
398
|
+
def test_lint_blocks_data_set_id_in_before_search_template(self) -> None:
|
|
399
|
+
work = {
|
|
400
|
+
"mode": "edit",
|
|
401
|
+
"basic": {
|
|
402
|
+
"name": "模板",
|
|
403
|
+
"desc": "",
|
|
404
|
+
"data_set_id": 9,
|
|
405
|
+
"flow_type": "flow1",
|
|
406
|
+
"flow_key": "",
|
|
407
|
+
"type": 1,
|
|
408
|
+
},
|
|
409
|
+
"content": {
|
|
410
|
+
"level": 0,
|
|
411
|
+
"config": [],
|
|
412
|
+
"beforeSearch": {
|
|
413
|
+
"$template": "{ ctx.value.status = { data_set_id: 9, query: {} }; }",
|
|
414
|
+
},
|
|
415
|
+
},
|
|
416
|
+
"meta": {},
|
|
417
|
+
}
|
|
418
|
+
submit = common.build_submit_payload(work)
|
|
419
|
+
report = common.lint_list_template_semantics(
|
|
420
|
+
work,
|
|
421
|
+
data_sets=[{"id": 9, "dataSetFields": []}],
|
|
422
|
+
submit_payload=submit,
|
|
423
|
+
)
|
|
424
|
+
|
|
425
|
+
self.assertFalse(report["ok"])
|
|
426
|
+
self.assertTrue(any("data_set_id" in item for item in report["errors"]))
|
|
427
|
+
|
|
428
|
+
def test_acceptance_payload_requires_list_page_when_high_risk(self) -> None:
|
|
429
|
+
acceptance = common.build_acceptance_payload(
|
|
430
|
+
readback_ok=True,
|
|
431
|
+
editor_page_accepted=True,
|
|
432
|
+
list_page_accepted=False,
|
|
433
|
+
high_risk_required=True,
|
|
434
|
+
high_risk_reasons=["icon_column"],
|
|
435
|
+
)
|
|
436
|
+
self.assertFalse(acceptance["ok"])
|
|
437
|
+
self.assertTrue(acceptance["highRiskAcceptanceRequired"])
|
|
438
|
+
|
|
439
|
+
|
|
440
|
+
if __name__ == "__main__":
|
|
441
|
+
unittest.main()
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: bpmax-memory-protocol
|
|
3
|
+
description: Use when a BPMAX task needs long-term memory, prior decisions, repeated configuration work, flow/template/data-set context, cross-session continuity, or the user mentions memory, Mem0, graph, history, or learned context.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# BPMAX Memory Protocol
|
|
7
|
+
|
|
8
|
+
## Overview
|
|
9
|
+
|
|
10
|
+
BPMAX memory is accessed through `bpmax-cli memory`, which calls the BPMAX platform proxy. Do not call Mem0 directly, do not pass an agent id manually, and do not store secrets.
|
|
11
|
+
|
|
12
|
+
Memory is isolated by the API Key's bound agent. The CLI only chooses scope:
|
|
13
|
+
|
|
14
|
+
- `user`: current BPMAX user + current agent
|
|
15
|
+
- `organization`: current organization + current agent
|
|
16
|
+
- `all`: search/list both user and organization scopes
|
|
17
|
+
|
|
18
|
+
## Start Of Work
|
|
19
|
+
|
|
20
|
+
Before non-trivial BPMAX configuration, flow, template, dataset, role, navigation, BBS, or e2e work, search memory with a specific query.
|
|
21
|
+
|
|
22
|
+
```bash
|
|
23
|
+
bpmax-cli memory status --profile <profile> --format json
|
|
24
|
+
bpmax-cli memory search --profile <profile> --scope all \
|
|
25
|
+
--query "<workspace> <flow_type> <business name> <target action>" \
|
|
26
|
+
--limit 8 --format json
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
Good queries include the business name, workspace, `flow_type`, template/data-set/object id, and the current action such as edit, lint, submit, verify, or debug.
|
|
30
|
+
|
|
31
|
+
## Write Back
|
|
32
|
+
|
|
33
|
+
Only write reusable conclusions. Prefer these metadata types:
|
|
34
|
+
|
|
35
|
+
- `decision`: durable design or implementation decision
|
|
36
|
+
- `task_learning`: verified method that should be reused
|
|
37
|
+
- `anti_pattern`: failed approach or known trap
|
|
38
|
+
- `session_state`: current state when stopping or context may be lost
|
|
39
|
+
- `environmental`: environment, endpoint, permission, branch, or deployment constraint
|
|
40
|
+
- `convention`: naming, directory, or repository convention
|
|
41
|
+
|
|
42
|
+
```bash
|
|
43
|
+
bpmax-cli memory add --profile <profile> --scope user \
|
|
44
|
+
--text "<short reusable learning>" \
|
|
45
|
+
--metadata '{"type":"task_learning","domain":"flow-template","workspace":"store_mgr","flow_type":"flow_xxx","project_id":"bpmax"}' \
|
|
46
|
+
--format json
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
Use `--scope organization` only for learning that should be shared across users of the same organization and agent. Organization-scope writes require organization admin permission.
|
|
50
|
+
|
|
51
|
+
## Session State
|
|
52
|
+
|
|
53
|
+
When pausing, switching threads, or approaching context limits, write a short `session_state` memory:
|
|
54
|
+
|
|
55
|
+
```bash
|
|
56
|
+
bpmax-cli memory add --profile <profile> --scope user \
|
|
57
|
+
--text "goal=<goal>; done=<done>; files=<key files>; next=<next step>" \
|
|
58
|
+
--metadata '{"type":"session_state","project_id":"bpmax","tags":["handoff"]}' \
|
|
59
|
+
--format json
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
## Safety Rules
|
|
63
|
+
|
|
64
|
+
- Never store API Key, Authorization, token, password, cookie, session, verification code, SMS code, phone number, complete raw payload, or large raw API response.
|
|
65
|
+
- Summarize evidence instead of copying full JSON.
|
|
66
|
+
- If memory is unavailable, continue the task and note that memory lookup/writeback failed.
|
|
67
|
+
- Do not use raw Mem0 URLs, curl, Python helper scripts, or environment variables from old per-environment skills.
|
|
68
|
+
- Do not pass `--agent`; `bpmax-cli memory` intentionally has no agent option.
|
|
69
|
+
|
|
70
|
+
## Output
|
|
71
|
+
|
|
72
|
+
When using memory, report only the 2-5 relevant findings and how they change the current decision. Do not paste full memory JSON unless the user asks for raw output.
|