bpmax-cli 0.2.1-beta.8 → 0.2.1-beta.81
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 +30 -7
- package/dist/bin.js +41819 -11180
- package/dist/bin.js.map +1 -1
- package/package.json +12 -5
- package/scripts/install-skills.mjs +27 -60
- package/scripts/run-source-cli.mjs +145 -0
- package/skills/bpmax-ai-taskbook/SKILL.md +13 -1
- package/skills/bpmax-ai-taskbook/references/blueprint-taskbook-gates.md +121 -0
- package/skills/bpmax-ai-taskbook/references/taskbook-template.md +42 -2
- package/skills/bpmax-api-platform-editor/SKILL.md +24 -31
- package/skills/bpmax-api-platform-editor/agents/openai.yaml +2 -2
- package/skills/bpmax-api-platform-editor/references/platform-api-map.md +2 -2
- package/skills/bpmax-api-platform-editor/references/runtime-workflow.md +3 -3
- package/skills/bpmax-approval-matrix/SKILL.md +54 -2
- package/skills/bpmax-blueprint-doc-workflow/SKILL.md +15 -2
- package/skills/bpmax-blueprint-doc-workflow/references/blueprint-structure.md +8 -0
- package/skills/bpmax-blueprint-doc-workflow/references/per-flow-required-structure.md +13 -0
- package/skills/bpmax-blueprint-doc-workflow/references/sample-missing-modeling-review.xml +23 -0
- package/skills/bpmax-blueprint-doc-workflow/references/sample-paragraph-flow-details.xml +27 -0
- package/skills/bpmax-blueprint-doc-workflow/references/sample-pass.xml +45 -28
- package/skills/bpmax-blueprint-doc-workflow/references/source-traceability-and-flow-modeling.md +115 -0
- package/skills/bpmax-blueprint-doc-workflow/scripts/lint_blueprint_doc.py +386 -5
- package/skills/bpmax-bug-reporting/SKILL.md +72 -0
- package/skills/bpmax-builder-shared/SKILL.md +1 -0
- package/skills/bpmax-builder-shared/configuration-impact-review.md +76 -0
- package/skills/bpmax-builder-shared/template_script_hard_rules.py +3 -1
- package/skills/bpmax-builder-shared/tests/test_template_script_hard_rules.py +16 -0
- package/skills/bpmax-business-skill/SKILL.md +3 -1
- package/skills/bpmax-cli/SKILL.md +46 -0
- package/skills/bpmax-config-latest/SKILL.md +4 -0
- package/skills/bpmax-console-template-editor/SKILL.md +113 -523
- package/skills/bpmax-console-template-editor/agents/openai.yaml +2 -2
- package/skills/bpmax-console-template-editor/references/full-detail-guide.md +45 -0
- package/skills/bpmax-console-template-editor/references/local-temp-workflow.md +13 -12
- package/skills/bpmax-console-template-editor/scripts/console_template_editor_common.py +299 -78
- package/skills/bpmax-console-template-editor/tests/test_console_template_editor.py +344 -30
- package/skills/bpmax-dataset-field-template-editor/SKILL.md +131 -594
- package/skills/bpmax-dataset-field-template-editor/references/full-detail-guide.md +570 -0
- package/skills/bpmax-dataset-field-template-editor/references/nested-field-patterns.md +8 -8
- package/skills/bpmax-dataset-field-template-editor/references/runtime-verified-field-page-shape.md +1 -1
- package/skills/bpmax-dataset-field-template-editor/scripts/dataset_field_editor_common.py +11 -77
- package/skills/bpmax-dataset-field-template-editor/scripts/export_dataset_field.py +4 -57
- package/skills/bpmax-dataset-field-template-editor/scripts/init_create_dataset_field.py +2 -0
- package/skills/bpmax-dataset-field-template-editor/scripts/inspect_dataset_field_runtime.py +4 -78
- package/skills/bpmax-dataset-field-template-editor/scripts/submit_dataset_field.py +3 -89
- package/skills/bpmax-dataset-field-template-editor/tests/test_dataset_field_editor.py +14 -0
- package/skills/bpmax-dataset-field-template-editor/tests/test_init_create_dataset_field.py +2 -0
- package/skills/bpmax-dataset-template-editor/SKILL.md +123 -778
- package/skills/bpmax-dataset-template-editor/references/dataset-script-runtime-matrix.md +11 -0
- package/skills/bpmax-dataset-template-editor/references/full-detail-guide.md +753 -0
- package/skills/bpmax-dataset-template-editor/references/runtime-gotchas.md +12 -0
- package/skills/bpmax-dataset-template-editor/references/ui-to-backend-field-map.md +1 -0
- package/skills/bpmax-dataset-template-editor/references/work-file-to-submit-mapping.md +2 -2
- package/skills/bpmax-dataset-template-editor/scripts/basic_table_audit.py +8 -1
- package/skills/bpmax-dataset-template-editor/scripts/dataset_editor_common.py +9 -90
- package/skills/bpmax-dataset-template-editor/scripts/export_dataset.py +8 -1
- package/skills/bpmax-dataset-template-editor/scripts/resolve_dataset.py +8 -1
- package/skills/bpmax-dataset-template-editor/scripts/submit_dataset.py +1 -2
- package/skills/bpmax-dataset-template-editor/scripts/verify_dataset_list.py +8 -1
- package/skills/bpmax-dataset-template-editor/scripts/verify_publish_health.py +8 -1
- package/skills/bpmax-dataset-template-editor/tests/test_dataset_editor.py +6 -40
- package/skills/bpmax-e2e-flow-config-orchestrator/SKILL.md +18 -4
- package/skills/bpmax-e2e-flow-config-orchestrator/agents/openai.yaml +2 -2
- package/skills/bpmax-e2e-flow-config-orchestrator/references/orchestration-matrix.md +13 -9
- package/skills/bpmax-e2e-flow-test-operator/SKILL.md +174 -546
- package/skills/bpmax-e2e-flow-test-operator/agents/openai.yaml +2 -3
- package/skills/bpmax-e2e-flow-test-operator/references/ai-test-suite.md +181 -15
- package/skills/bpmax-e2e-flow-test-operator/references/browser-action-dsl.md +167 -0
- package/skills/bpmax-e2e-flow-test-operator/references/browser-only-checkpoints.md +15 -7
- package/skills/bpmax-e2e-flow-test-operator/references/full-detail-guide.md +589 -0
- package/skills/bpmax-e2e-flow-test-operator/references/minimal-test-loop.md +12 -8
- package/skills/bpmax-e2e-flow-test-operator/references/negative-sale-api-matrix.md +4 -4
- package/skills/bpmax-e2e-flow-test-operator/references/profile-schema.md +1 -1
- package/skills/bpmax-e2e-flow-test-operator/references/state-schema.md +3 -1
- package/skills/bpmax-e2e-flow-test-operator/scripts/e2e_doc.py +7 -5
- package/skills/bpmax-e2e-flow-test-operator/scripts/e2e_state.py +2 -2
- package/skills/bpmax-e2e-flow-test-operator/scripts/flow_runner.py +5 -1
- package/skills/bpmax-e2e-flow-test-operator/tests/test_negative_sale_api_tools.py +71 -0
- package/skills/bpmax-e2e-flow-test-operator-v2/SKILL.md +64 -0
- package/skills/bpmax-e2e-flow-test-operator-v2/agents/openai.yaml +7 -0
- package/skills/bpmax-e2e-flow-test-operator-v2/references/automation-generation-pipeline.md +33 -0
- package/skills/bpmax-e2e-flow-test-operator-v2/references/autonomous-execution.md +40 -0
- package/skills/bpmax-e2e-flow-test-operator-v2/references/batch-generation-and-execution.md +17 -0
- package/skills/bpmax-e2e-flow-test-operator-v2/references/browser-action-runner.md +19 -0
- package/skills/bpmax-e2e-flow-test-operator-v2/references/browser-recording-and-replay.md +95 -0
- package/skills/bpmax-e2e-flow-test-operator-v2/references/form-script-generation.md +41 -0
- package/skills/bpmax-e2e-flow-test-operator-v2/references/identity-and-failure-routing.md +90 -0
- package/skills/bpmax-e2e-flow-test-operator-v2/references/multi-request-mutation.md +9 -0
- package/skills/bpmax-e2e-flow-test-operator-v2/references/scenario-coverage-generation.md +17 -0
- package/skills/bpmax-e2e-flow-test-operator-v2/references/scoped-execution.md +13 -0
- package/skills/bpmax-e2e-flow-test-operator-v2/references/step-restartability-and-state.md +23 -0
- package/skills/bpmax-e2e-flow-test-operator-v2/references/test-assets-and-evidence.md +9 -0
- package/skills/bpmax-e2e-flow-test-operator-v2/references/test-data-and-selector-contract.md +51 -0
- package/skills/bpmax-e2e-flow-test-operator-v2/references/test-preflight-and-confirmation.md +32 -0
- package/skills/bpmax-filter-template-editor/SKILL.md +114 -551
- package/skills/bpmax-filter-template-editor/references/experience-coverage-matrix.md +18 -18
- package/skills/bpmax-filter-template-editor/references/filter-content-schema.md +21 -0
- package/skills/bpmax-filter-template-editor/references/filter-request-shape.md +29 -26
- package/skills/bpmax-filter-template-editor/references/filter-runtime-patterns.md +19 -2
- package/skills/bpmax-filter-template-editor/references/full-detail-guide.md +56 -0
- package/skills/bpmax-filter-template-editor/references/runtime-verified-filter-page-shape.md +10 -9
- package/skills/bpmax-filter-template-editor/scripts/filter_template_editor_common.py +7 -57
- package/skills/bpmax-filter-template-editor/tests/test_filter_template_editor.py +4 -48
- package/skills/bpmax-flow/SKILL.md +2 -0
- package/skills/bpmax-flow-detail-template-editor/SKILL.md +53 -0
- package/skills/bpmax-flow-template-editor/SKILL.md +129 -1123
- package/skills/bpmax-flow-template-editor/agents/openai.yaml +2 -2
- package/skills/bpmax-flow-template-editor/references/diff-strategy.md +3 -3
- package/skills/bpmax-flow-template-editor/references/editor-runtime-vs-draft.md +9 -9
- package/skills/bpmax-flow-template-editor/references/flow-template-api-workflow.md +2 -1
- package/skills/bpmax-flow-template-editor/references/full-detail-guide.md +1158 -0
- package/skills/bpmax-flow-template-editor/references/local-temp-workflow.md +1 -1
- package/skills/bpmax-flow-template-editor/references/payload-checklist.md +2 -0
- package/skills/bpmax-flow-template-editor/references/project-create-runtime-gotchas.md +17 -0
- package/skills/bpmax-flow-template-editor/references/requirement-to-node-mapping.md +8 -3
- package/skills/bpmax-flow-template-editor/references/runtime-verified-flow-detail-shape.md +7 -7
- package/skills/bpmax-flow-template-editor/references/runtime-verified-meta-fields.md +2 -2
- package/skills/bpmax-flow-template-editor/references/runtime-verified-node-fields.md +12 -2
- package/skills/bpmax-flow-template-editor/references/save-draft-request-shape.md +7 -23
- package/skills/bpmax-flow-template-editor/references/work-file-to-submit-mapping.md +1 -1
- package/skills/bpmax-flow-template-editor/tests/test_flow_template_editor.py +19 -75
- package/skills/bpmax-form-template-editor/SKILL.md +138 -1151
- package/skills/bpmax-form-template-editor/agents/openai.yaml +2 -2
- package/skills/bpmax-form-template-editor/references/dynamic-field-state.md +167 -0
- package/skills/bpmax-form-template-editor/references/form-template-api-workflow.md +51 -51
- package/skills/bpmax-form-template-editor/references/full-detail-guide.md +1115 -0
- package/skills/bpmax-form-template-editor/references/local-temp-workflow.md +4 -4
- package/skills/bpmax-form-template-editor/references/payload-checklist.md +3 -1
- package/skills/bpmax-form-template-editor/references/sub-form-patterns.md +6 -0
- package/skills/bpmax-form-template-editor/scripts/form_template_editor_common.py +8 -0
- package/skills/bpmax-form-template-editor/tests/test_form_template_editor.py +42 -19
- package/skills/bpmax-functional-test-design/LICENSE.upstream +24 -0
- package/skills/bpmax-functional-test-design/SKILL.md +80 -0
- package/skills/bpmax-functional-test-design/agents/openai.yaml +4 -0
- package/skills/bpmax-functional-test-design/references/bpmax-test-suite-output.md +95 -0
- package/skills/bpmax-functional-test-design/references/decision-table-testing.md +50 -0
- package/skills/bpmax-functional-test-design/references/domain-testing.md +43 -0
- package/skills/bpmax-functional-test-design/references/state-transition-testing.md +47 -0
- package/skills/bpmax-functional-test-design/references/technique-selection.md +38 -0
- package/skills/bpmax-functional-test-design/references/use-case-testing.md +55 -0
- package/skills/bpmax-group-model-editor/SKILL.md +24 -0
- package/skills/bpmax-home-portal-editor/SKILL.md +81 -0
- package/skills/bpmax-icon-catalog/SKILL.md +18 -0
- package/skills/bpmax-icon-catalog/agents/openai.yaml +4 -0
- package/skills/bpmax-icon-catalog/assets/ri-icons.json +3140 -0
- package/skills/bpmax-icon-catalog/references/source-contract.md +3 -0
- package/skills/bpmax-list-template-editor/SKILL.md +131 -466
- package/skills/bpmax-list-template-editor/agents/openai.yaml +2 -2
- package/skills/bpmax-list-template-editor/references/content-config-shape.md +16 -4
- package/skills/bpmax-list-template-editor/references/full-detail-guide.md +461 -0
- package/skills/bpmax-list-template-editor/references/list-template-api-workflow.md +6 -9
- package/skills/bpmax-list-template-editor/references/local-temp-workflow.md +1 -1
- package/skills/bpmax-list-template-editor/references/runtime-verified-workflow.md +50 -2
- package/skills/bpmax-list-template-editor/references/special-formats.md +5 -2
- package/skills/bpmax-list-template-editor/scripts/list_template_editor_common.py +9 -78
- package/skills/bpmax-memory-protocol/SKILL.md +7 -6
- package/skills/bpmax-nav-config-editor/SKILL.md +14 -17
- package/skills/bpmax-nav-config-editor/agents/openai.yaml +2 -2
- package/skills/bpmax-nav-config-editor/references/api-workflow.md +2 -2
- package/skills/bpmax-nav-config-editor/references/runtime-probing.md +11 -12
- package/skills/bpmax-page-composition-template-editor/SKILL.md +315 -0
- package/skills/bpmax-page-composition-template-editor/examples/presets/catalog.json +41 -0
- package/skills/bpmax-page-composition-template-editor/examples/presets/full-capability-workbench.json +294 -0
- package/skills/bpmax-page-composition-template-editor/examples/presets/project-detail-step-panel.json +184 -0
- package/skills/bpmax-page-composition-template-editor/examples/presets/project-list-quick-process.json +177 -0
- package/skills/bpmax-page-composition-template-editor/examples/presets/project-operations-dashboard.json +400 -0
- package/skills/bpmax-page-composition-template-editor/examples/presets/project-operations-visual-light.json +214 -0
- package/skills/bpmax-page-composition-template-editor/examples/presets/step-related-projects.json +184 -0
- package/skills/bpmax-page-composition-template-editor/references/resource-api.md +9 -0
- package/skills/bpmax-plugin-config/SKILL.md +55 -5
- package/skills/bpmax-project/SKILL.md +37 -1
- package/skills/bpmax-project-detail-template-editor/SKILL.md +13 -39
- package/skills/bpmax-project-detail-template-editor/agents/openai.yaml +2 -2
- package/skills/bpmax-role-editor/SKILL.md +11 -30
- package/skills/bpmax-shared/SKILL.md +19 -9
- package/skills/bpmax-team-editor/SKILL.md +27 -0
- package/skills/bpmax-ui-ux-audit/LICENSE.upstream +23 -0
- package/skills/bpmax-ui-ux-audit/SKILL.md +42 -0
- package/skills/bpmax-ui-ux-audit/agents/openai.yaml +4 -0
- package/skills/bpmax-ui-ux-audit/references/audit-framework.md +39 -0
- package/skills/bpmax-ui-ux-audit/references/bpmax-ux-findings.md +56 -0
- package/skills/bpmax-user/SKILL.md +33 -1
- package/skills/bpmax-user-mock-operator/SKILL.md +58 -56
- package/skills/bpmax-user-mock-operator/agents/openai.yaml +2 -2
- package/skills/bpmax-user-mock-operator/scripts/chrome_identity_bridge.mjs +1766 -0
- package/skills/bpmax-user-model-editor/SKILL.md +24 -0
- package/skills/bpmax-workspace-editor/SKILL.md +1 -0
- package/skills/form-control-library/references/form-template-submit-schema.md +3 -1
- package/skills/bpmax-user-mock-operator/scripts/switch_user_identity.py +0 -37
- package/skills/bpmax-user-mock-operator/scripts/user_mock_operator_common.py +0 -136
- package/skills/bpmax-user-mock-operator/tests/test_user_mock_operator.py +0 -138
|
@@ -8,6 +8,8 @@
|
|
|
8
8
|
## data 结构
|
|
9
9
|
- `periods` 是否是数组
|
|
10
10
|
- `nodes` 是否是数组
|
|
11
|
+
- 最小结构硬门禁(无豁免):`periods` 至少一个非空名称的阶段,`nodes` 至少一个 `id` 和非空 `name` 都齐全的环节;否则 `lint/build/create/submit` 会在远端请求前阻断
|
|
12
|
+
- 只改 `meta` 或只改创建页时,是否误把既有阶段和节点清空
|
|
11
13
|
- 如存在 `meta`、`group`、`settings`,是否被意外删除
|
|
12
14
|
- `meta` 下已有 `project_name_template`、`object_events`、`hook`、`plugin_*` 是否被误删
|
|
13
15
|
- `meta` 是否仍保留发起入口语义:
|
|
@@ -57,6 +57,23 @@ return (function () {
|
|
|
57
57
|
- `form_template` 必须是当前环境远端数字 `id`,不能是本地 `uuid`、目录名或模板名。
|
|
58
58
|
- typed CLI lint 会阻断“standard/page + node.form_template + meta.form_template 为空”的配置。
|
|
59
59
|
|
|
60
|
+
## 创建页提交后不要再生成申请人首节点
|
|
61
|
+
- 表单驱动创建页本身已经承载申请填写与提交。项目初始化时,后端默认直接创建并进入 `data.nodes[0]`;`start_step=true` 或 `create_step=true` 主要是编辑器标记,不能可靠地把该节点视为已完成。
|
|
62
|
+
- 因此不要把由创建人办理的 `申请人`、`发起人`、`提交人` 节点放在 `data.nodes[0]`,再依赖它的 `condational_nodes` 去选择审批人。这会在创建成功后产生一条新的申请人待办,必须人工再次确认才能进入审批。
|
|
63
|
+
- 正确做法是把申请人节点上的创建期分流迁移到 `data.meta.condational_jump`,让每条规则直接返回创建后的真实首个审批节点 id,并在最后增加 `return true;` 的显式兜底。
|
|
64
|
+
- typed CLI semantic lint 会阻断以下高风险组合:已配置创建表单、首节点名称具有申请人/发起人/提交人语义、`owner_is_creater=true`,且 `data.meta.condational_jump` 为空或任一 `result` 仍指回该首节点。
|
|
65
|
+
- 如果业务明确要求“创建后由申请人二次确认”,可在本地 work 根节点声明:
|
|
66
|
+
|
|
67
|
+
```json
|
|
68
|
+
{
|
|
69
|
+
"bpmax_lint": {
|
|
70
|
+
"allow_post_create_initiator_step": true
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
- 这是 lint-only 豁免,不会进入提交 payload。使用豁免时必须在验收证据中说明二次确认的业务依据,并验证创建后确实应停留在申请人待办。
|
|
76
|
+
|
|
60
77
|
## 经验 1:脚本存在不等于校验生效
|
|
61
78
|
- BPMAX 后端通过 `parseEvalFunction()` 执行创建期脚本。
|
|
62
79
|
- 这类脚本不是直接 `eval` 结果,而是作为“函数体”包进去执行。
|
|
@@ -83,6 +83,11 @@
|
|
|
83
83
|
- `node.cc_user_by_script`
|
|
84
84
|
- “抄送消息自定义”
|
|
85
85
|
- `node.cc_message_template`
|
|
86
|
+
- “WEWF `signorder=4` / 确认型抄送 / acknowledged CC”
|
|
87
|
+
- 当前已验证的 BPMAX 节点字段没有“抄送人必须提交确认后才完成”的独立参与通道,必须标记 `cc_ack_not_supported` 并停止等价迁移。
|
|
88
|
+
- `need_confirm` 只控制环节负责人接收任务,不会把普通 CC 变成确认参与人。
|
|
89
|
+
- 不得降级成普通 CC,也不得提升成普通审批人;两者都会改变源流程的参与与完成语义。
|
|
90
|
+
- 只有平台 capability、typed export/readback 或插件契约明确出现对应参与通道后,才能补充映射并做运行态回测。
|
|
86
91
|
|
|
87
92
|
## 消息模板
|
|
88
93
|
- “节点完成后发通知”
|
|
@@ -136,14 +141,14 @@
|
|
|
136
141
|
- 同时存在“简单配置”和“脚本配置”两种实现时:
|
|
137
142
|
- 优先保留现有实现风格
|
|
138
143
|
- 不要把脚本型实现无故改成纯配置
|
|
139
|
-
- 如果本地目录里找到的是表单模板 `uuid` /
|
|
140
|
-
-
|
|
144
|
+
- 如果本地目录里找到的是表单模板 `uuid` / 目录引用,但 typed CLI export/readback 显示当前环境使用远端表单模板数字 `id`:
|
|
145
|
+
- 优先以 typed CLI 线上回读和当前环境接口返回为准
|
|
141
146
|
- 先把候选模板从本地目录定位出来,再解析成当前环境可提交的真实引用值
|
|
142
147
|
|
|
143
148
|
## 用法要求
|
|
144
149
|
- 这张表不是补充说明,而是主流程第 1 步到第 6 步之间的核心映射依据。
|
|
145
150
|
- 当意图模型里出现某条业务需求时,应先来这里找默认落点,再决定是否需要脚本、外链文件或页面模板联动。
|
|
146
151
|
- 如果这里没有明确覆盖某种需求:
|
|
147
|
-
-
|
|
152
|
+
- 先参考 typed CLI 当前线上回读
|
|
148
153
|
- 再参考 `sysconfig-n`
|
|
149
154
|
- 最后再做最小保守推断
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Runtime Verified Flow Detail Shape
|
|
2
2
|
|
|
3
|
-
基于当前 skill 已确认的
|
|
3
|
+
基于当前 skill 已确认的 typed CLI export/readback 和 verify 结果整理。
|
|
4
4
|
|
|
5
5
|
## 顶层共识
|
|
6
6
|
- `name`
|
|
@@ -23,11 +23,11 @@
|
|
|
23
23
|
- 常伴随 `FlowMap Invalid DIV id` 一类后续报错
|
|
24
24
|
|
|
25
25
|
## 当前闭环的使用方式
|
|
26
|
-
1.
|
|
27
|
-
- `
|
|
28
|
-
- `
|
|
29
|
-
2.
|
|
30
|
-
3.
|
|
26
|
+
1. 优先读取 typed CLI export/readback:
|
|
27
|
+
- `bpmax-cli config flow-template export --id <id> --profile <profile> --format json`
|
|
28
|
+
- `bpmax-cli config readback flow-template --id <id> --profile <profile> --format json`
|
|
29
|
+
2. 若 readback 返回空壳、残缺数据或与只读编辑器画布不一致,停止继续修改,先重新导出或恢复到最新可信草稿
|
|
30
|
+
3. 导出到本地 `work` 文件时统一转成:
|
|
31
31
|
- `basic.name`
|
|
32
32
|
- `basic.updateTime`
|
|
33
33
|
- `data.periods`
|
|
@@ -38,4 +38,4 @@
|
|
|
38
38
|
## 当前闭环不做的事
|
|
39
39
|
- 不在 `work` 阶段对 `data` 做抽象 DSL
|
|
40
40
|
- 不在 `submit` 阶段对 `data` 做最小化裁剪
|
|
41
|
-
-
|
|
41
|
+
- 不把页面运行时对象当成事实来源或写入基线
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
# Runtime Verified Meta Fields
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
基于历史流程编辑器运行时字段观察整理,用于解释流程 meta 字段背景;当前配置读取、构造和提交必须以 typed CLI export/build/verify/readback 为准。
|
|
4
4
|
|
|
5
5
|
## 适用范围
|
|
6
6
|
- 仅代表当前环境、当前前端版本、当前流程编辑器的已验证字段。
|
|
7
|
-
-
|
|
7
|
+
- 若其他环境或当前 typed CLI readback 不同,以当前 typed CLI export/readback 为准。
|
|
8
8
|
|
|
9
9
|
## 核心结论
|
|
10
10
|
- 保存草稿时主流程主体是:
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
# Runtime Verified Node Fields
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
基于当前 typed CLI export/readback 中的 `data.nodes` 和 verify 结果整理。
|
|
4
4
|
|
|
5
5
|
## 适用范围
|
|
6
6
|
- 仅代表当前环境已验证的节点字段集合。
|
|
7
|
-
-
|
|
7
|
+
- 节点字段总数会随插件和平台版本增加,遇到新字段以 typed CLI export/readback 为准。
|
|
8
8
|
|
|
9
9
|
## 当前页面已验证的高频字段
|
|
10
10
|
|
|
@@ -107,6 +107,12 @@
|
|
|
107
107
|
### `step_detail_id`
|
|
108
108
|
- 节点详情模板不是 `detail_template`,当前页面已验证使用 `step_detail_id`。
|
|
109
109
|
|
|
110
|
+
### 确认型抄送边界
|
|
111
|
+
- WEWF `signorder=4` 表示的确认型抄送当前没有已验证的 BPMAX 对等字段,迁移结论必须是 `cc_ack_not_supported`。
|
|
112
|
+
- `need_confirm` 是环节负责人接收任务的开关,不是抄送确认开关。
|
|
113
|
+
- `cc_user`、`cc_user_role` 可能存在于历史 export 字段中,但当前服务端已验证的有效普通 CC 运行模式只有 `cc_type=fieldvalue` + `cc_user_by_script` 和 `cc_type=matrix` + `cc_matrix`;普通 CC 不贡献确认完成。
|
|
114
|
+
- 不得用普通审批人替代确认型抄送,因为这会引入审批阈值、通过和拒绝语义。
|
|
115
|
+
|
|
110
116
|
### `attachment_required`
|
|
111
117
|
- 对应“配置附件要求”。
|
|
112
118
|
- 当前页未配置时为 `[]`,不是 `null`。
|
|
@@ -168,6 +174,10 @@
|
|
|
168
174
|
}
|
|
169
175
|
```
|
|
170
176
|
|
|
177
|
+
- 当 `flows` 非空且 `manual_end=false` 时,该节点默认是自动等待/汇总节点,`approve_count_required` 必须为 `0` 或空。
|
|
178
|
+
- 确需人工兜底时,在顶层 `bpmax_lint.manual_child_flow_fallbacks[]` 中按节点 ID/名称声明非空 `reason`,并配置带文案的 `approve_actions` 与可用拒绝目标;`bpmax_lint` 不进入提交 payload。
|
|
179
|
+
- 任意有效审批阈值都必须有可用拒绝目标,同意与拒绝目标归一化后不得相同。
|
|
180
|
+
|
|
171
181
|
### `beforeNextStepScript`
|
|
172
182
|
- 需要同时关注:
|
|
173
183
|
- `enableBeforeNextStepScript`
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Save Draft Request Shape
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
基于历史流程编辑器保存草稿行为整理。本文只记录字段形态与兼容背景;不得把这里的历史接口示例或页面运行时对象当作配置写入路径。真实写入必须回到 `bpmax-cli config flow-template build/submit/verify`。
|
|
4
4
|
|
|
5
5
|
## 主流程保存草稿
|
|
6
6
|
|
|
@@ -35,26 +35,9 @@ Referer: /w:store_mgr/flow_editor_dark/beta?key_of_flow=flow352878207:
|
|
|
35
35
|
GET /api/flow?flow_type=flow352878207&draft=1&$workspace=store_mgr&$language=zhCN
|
|
36
36
|
```
|
|
37
37
|
|
|
38
|
-
##
|
|
38
|
+
## 历史编辑器背景
|
|
39
39
|
|
|
40
|
-
|
|
41
|
-
- `FlowEditorDark`
|
|
42
|
-
- `FlowEditorAsideLeft`
|
|
43
|
-
|
|
44
|
-
### 关键方法
|
|
45
|
-
- `FlowEditorDark.getSubmitData()`
|
|
46
|
-
- `FlowEditorDark.refresh()`
|
|
47
|
-
- `FlowEditorDark.getRemoteData()`
|
|
48
|
-
- `FlowEditorDark.formatRemoteData()`
|
|
49
|
-
- `FlowEditorAsideLeft.saveRemoteData()`
|
|
50
|
-
|
|
51
|
-
### 关键状态
|
|
52
|
-
- `flowTypeKey`
|
|
53
|
-
- `flowTypeName`
|
|
54
|
-
- `updateTime`
|
|
55
|
-
- `flowData`
|
|
56
|
-
- `graphData`
|
|
57
|
-
- `currentNode`
|
|
40
|
+
这些字段曾由流程编辑器运行时维护,但当前配置工作不得依赖页面运行时对象。需要确认字段时,优先使用 typed CLI export/readback、build 输出和 verify 结果。
|
|
58
41
|
|
|
59
42
|
## 当前页面确认到的结构特征
|
|
60
43
|
|
|
@@ -86,6 +69,7 @@ GET /api/flow?flow_type=flow352878207&draft=1&$workspace=store_mgr&$language=zhC
|
|
|
86
69
|
- `*_template_simple`
|
|
87
70
|
|
|
88
71
|
## 对 skill 的约束
|
|
89
|
-
-
|
|
90
|
-
-
|
|
91
|
-
-
|
|
72
|
+
- 这里的历史接口形态只用于理解平台保存草稿的字段背景,不是 Agent 可执行命令。
|
|
73
|
+
- 构造 submit payload 时应以 typed CLI `export/build` 输出和当前远端 readback 为准,而不是手写最小对象。
|
|
74
|
+
- 任何差量编辑都应在 typed CLI work 文件上修改,不能自行省略未知字段。
|
|
75
|
+
- 若文档与当前线上结构冲突,以 typed CLI export/readback 和 verify 结果为准。
|
|
@@ -1,10 +1,8 @@
|
|
|
1
1
|
import json
|
|
2
|
-
import os
|
|
3
2
|
import sys
|
|
4
3
|
import tempfile
|
|
5
4
|
import unittest
|
|
6
5
|
from pathlib import Path
|
|
7
|
-
from unittest import mock
|
|
8
6
|
|
|
9
7
|
|
|
10
8
|
SCRIPT_DIR = Path(__file__).resolve().parents[1] / "scripts"
|
|
@@ -12,8 +10,6 @@ if str(SCRIPT_DIR) not in sys.path:
|
|
|
12
10
|
sys.path.insert(0, str(SCRIPT_DIR))
|
|
13
11
|
|
|
14
12
|
from flow_template_editor_common import ( # noqa: E402
|
|
15
|
-
ApiClient,
|
|
16
|
-
build_client,
|
|
17
13
|
build_drift_report,
|
|
18
14
|
build_submit_payload,
|
|
19
15
|
detail_to_work_payload,
|
|
@@ -536,91 +532,39 @@ class FlowTemplateEditorCommonTests(unittest.TestCase):
|
|
|
536
532
|
self.assertEqual(normalized["name"], "ST销售出库")
|
|
537
533
|
self.assertEqual(normalized["update_time"], "2026-04-22 16:58:41")
|
|
538
534
|
|
|
539
|
-
def
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
cookie_header="token=demo",
|
|
545
|
-
timeout=30,
|
|
546
|
-
)
|
|
547
|
-
self.assertEqual(
|
|
548
|
-
client._build_url("/api/flow?flow_type=flow352878207&draft=1&skip_i18n=true"),
|
|
549
|
-
"https://bpmax.example.com/api/flow?flow_type=flow352878207&draft=1&skip_i18n=true&$workspace=store_mgr&$language=zhCN",
|
|
550
|
-
)
|
|
551
|
-
|
|
552
|
-
def test_publish_flow_uses_publish_1_endpoint(self) -> None:
|
|
553
|
-
client = ApiClient(
|
|
554
|
-
base_url="https://bpmax.example.com",
|
|
555
|
-
workspace="store_mgr",
|
|
556
|
-
language="zhCN",
|
|
557
|
-
cookie_header="token=demo",
|
|
558
|
-
timeout=30,
|
|
559
|
-
)
|
|
560
|
-
with mock.patch.object(client, "request", return_value={"code": 0}) as request:
|
|
561
|
-
client.publish_flow(
|
|
562
|
-
flow_type="flow352878207",
|
|
563
|
-
update_time="2026-04-02 20:48:50",
|
|
564
|
-
body={"name": "ST销售出库", "data": {}},
|
|
565
|
-
)
|
|
566
|
-
request.assert_called_once()
|
|
567
|
-
self.assertIn("publish=1", request.call_args.args[1])
|
|
535
|
+
def test_publish_guidance_uses_typed_cli_publish_live(self) -> None:
|
|
536
|
+
skill_path = Path(__file__).resolve().parents[1] / "SKILL.md"
|
|
537
|
+
content = skill_path.read_text(encoding="utf-8")
|
|
538
|
+
self.assertIn("必须通过 typed CLI 的 `--publish-live` 路径执行", content)
|
|
539
|
+
self.assertIn("不要手动调用 `PUT /api/flow`", content)
|
|
568
540
|
|
|
569
541
|
def test_legacy_submit_script_is_disabled(self) -> None:
|
|
570
542
|
with self.assertRaises(SystemExit) as ctx:
|
|
571
543
|
__import__("submit_flow_template")
|
|
572
544
|
self.assertEqual(ctx.exception.code, 2)
|
|
573
545
|
|
|
574
|
-
def
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
"base_url": None,
|
|
580
|
-
"workspace": "store_mgr",
|
|
581
|
-
"language": "zhCN",
|
|
582
|
-
"cookie_header": "token=demo",
|
|
583
|
-
"timeout": 30,
|
|
584
|
-
"insecure": False,
|
|
585
|
-
},
|
|
586
|
-
)()
|
|
587
|
-
with mock.patch.dict(os.environ, {"BPMAX_BASE_URL": "https://bpmax.example.com/"}, clear=False):
|
|
588
|
-
client = build_client(args)
|
|
589
|
-
self.assertEqual(client.base_url, "https://bpmax.example.com")
|
|
590
|
-
|
|
591
|
-
def test_build_client_requires_runtime_origin_when_not_explicitly_configured(self) -> None:
|
|
592
|
-
args = type(
|
|
593
|
-
"Args",
|
|
594
|
-
(),
|
|
595
|
-
{
|
|
596
|
-
"base_url": None,
|
|
597
|
-
"workspace": "store_mgr",
|
|
598
|
-
"language": "zhCN",
|
|
599
|
-
"cookie_header": "token=demo",
|
|
600
|
-
"timeout": 30,
|
|
601
|
-
"insecure": False,
|
|
602
|
-
},
|
|
603
|
-
)()
|
|
604
|
-
with mock.patch.dict(os.environ, {}, clear=True):
|
|
605
|
-
with self.assertRaises(SystemExit) as ctx:
|
|
606
|
-
build_client(args)
|
|
607
|
-
self.assertIn("BPMAX_BASE_URL", str(ctx.exception))
|
|
546
|
+
def test_skill_forbids_browser_credentials_for_config_writes(self) -> None:
|
|
547
|
+
skill_path = Path(__file__).resolve().parents[1] / "SKILL.md"
|
|
548
|
+
content = skill_path.read_text(encoding="utf-8")
|
|
549
|
+
self.assertIn("配置写入只使用 CLI profile/auth/capability", content)
|
|
550
|
+
self.assertIn("不得读取或复用浏览器凭据、浏览器存储或手工请求头", content)
|
|
608
551
|
|
|
609
552
|
def test_skill_references_exist(self) -> None:
|
|
610
553
|
skill_path = Path(__file__).resolve().parents[1] / "SKILL.md"
|
|
611
554
|
content = skill_path.read_text(encoding="utf-8")
|
|
612
555
|
expected = [
|
|
613
|
-
"
|
|
614
|
-
"
|
|
615
|
-
"
|
|
616
|
-
"
|
|
556
|
+
"bpmax-cli config flow-template export",
|
|
557
|
+
"bpmax-cli config flow-template lint",
|
|
558
|
+
"bpmax-cli config flow-template build",
|
|
559
|
+
"bpmax-cli config flow-template submit",
|
|
560
|
+
"bpmax-cli config flow-template verify",
|
|
561
|
+
"references/full-detail-guide.md",
|
|
617
562
|
"references/local-temp-workflow.md",
|
|
618
563
|
"references/work-file-to-submit-mapping.md",
|
|
619
564
|
".codex/tmp/flow-template-editor/",
|
|
620
|
-
"
|
|
621
|
-
"
|
|
622
|
-
"
|
|
623
|
-
"仍需人工确认",
|
|
565
|
+
"不得直接编辑 `think_*/`",
|
|
566
|
+
"required-collateral",
|
|
567
|
+
"workspace_binding",
|
|
624
568
|
]
|
|
625
569
|
for item in expected:
|
|
626
570
|
self.assertIn(item, content)
|