bpmax-cli 0.2.1-beta.5 → 0.2.1-beta.50
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 +13 -5
- package/dist/bin.js +25216 -12623
- package/dist/bin.js.map +1 -1
- package/package.json +10 -5
- package/scripts/run-source-cli.mjs +121 -0
- package/skills/bpmax-ai-taskbook/SKILL.md +2 -0
- 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 +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-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-cli/SKILL.md +43 -0
- package/skills/bpmax-config-latest/SKILL.md +4 -0
- package/skills/bpmax-console-template-editor/SKILL.md +112 -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 +127 -594
- package/skills/bpmax-dataset-field-template-editor/references/full-detail-guide.md +570 -0
- 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 +116 -778
- package/skills/bpmax-dataset-template-editor/references/full-detail-guide.md +753 -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 +150 -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 +136 -13
- package/skills/bpmax-e2e-flow-test-operator/references/browser-action-dsl.md +85 -0
- package/skills/bpmax-e2e-flow-test-operator/references/browser-only-checkpoints.md +6 -5
- package/skills/bpmax-e2e-flow-test-operator/references/full-detail-guide.md +576 -0
- package/skills/bpmax-e2e-flow-test-operator/references/minimal-test-loop.md +2 -0
- 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-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 +120 -1084
- 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 +1157 -0
- package/skills/bpmax-flow-template-editor/references/local-temp-workflow.md +1 -1
- 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 +8 -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 +133 -1104
- 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-list-template-editor/SKILL.md +119 -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 +458 -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/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 +13 -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-plugin-config/SKILL.md +20 -4
- 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 +7 -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 +20 -48
- package/skills/bpmax-user-mock-operator/agents/openai.yaml +2 -2
- package/skills/bpmax-user-model-editor/SKILL.md +24 -0
- package/skills/form-control-library/references/form-template-submit-schema.md +1 -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
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
interface:
|
|
2
2
|
display_name: "BPMAX Form Template Editor"
|
|
3
|
-
short_description: "
|
|
4
|
-
default_prompt: "使用 $bpmax-form-template-editor
|
|
3
|
+
short_description: "通过 bpmax-cli typed config 创建或编辑 BPMAX 表单模板"
|
|
4
|
+
default_prompt: "使用 $bpmax-form-template-editor 通过 bpmax-cli typed config 创建或编辑 BPMAX 表单模板,并用回读验证确认结果。"
|
|
@@ -0,0 +1,167 @@
|
|
|
1
|
+
# 动态显隐、动态只读与动态必填
|
|
2
|
+
|
|
3
|
+
本页定义 BPMAX 表单字段的前端动态状态配置。配置写在字段 `rule` 上,只控制运行态页面呈现、交互和前端校验,不等同于服务端字段读取权限或写入权限。
|
|
4
|
+
|
|
5
|
+
## 三类标准字段
|
|
6
|
+
|
|
7
|
+
| 能力 | 启用字段 | 配置字段 | `action=true` 的含义 |
|
|
8
|
+
| --- | --- | --- | --- |
|
|
9
|
+
| 动态显隐 | `hasVisibilityCondition` | `visibilityCondition` | 条件成立时隐藏 |
|
|
10
|
+
| 动态只读 | `hasDisabledCondition` | `disabledCondition` | 条件成立时禁用 |
|
|
11
|
+
| 动态必填 | `hasRequiredCondition` | `requiredCondition` | 条件成立时必填 |
|
|
12
|
+
|
|
13
|
+
`action=false` 会反转结果:条件成立时显示、启用或非必填;条件不成立时执行对应动作。不要把 `visibilityCondition.action=true` 理解成“显示”。
|
|
14
|
+
|
|
15
|
+
## 标准结构
|
|
16
|
+
|
|
17
|
+
```json
|
|
18
|
+
{
|
|
19
|
+
"hasVisibilityCondition": true,
|
|
20
|
+
"visibilityCondition": {
|
|
21
|
+
"condition": {
|
|
22
|
+
"logic": "AND",
|
|
23
|
+
"conditions": [
|
|
24
|
+
{
|
|
25
|
+
"leftValueType": "field",
|
|
26
|
+
"leftValue": "is_temporary",
|
|
27
|
+
"operator": "eq",
|
|
28
|
+
"rightValueType": "constant",
|
|
29
|
+
"rightValue": "是"
|
|
30
|
+
}
|
|
31
|
+
]
|
|
32
|
+
},
|
|
33
|
+
"action": true
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
- `condition` 必须是条件组,包含 `logic: AND|OR` 和非空 `conditions[]`。
|
|
39
|
+
- `conditions[]` 可以继续嵌套条件组。
|
|
40
|
+
- 旧结构 `condition: { leftValueType, ... }` 不能继续使用。当前运行时会把它当作空条件,可能造成字段始终隐藏或始终禁用。
|
|
41
|
+
- `action` 必须是 boolean。
|
|
42
|
+
|
|
43
|
+
## 条件项
|
|
44
|
+
|
|
45
|
+
左侧:
|
|
46
|
+
|
|
47
|
+
- `leftValueType` 仅允许 `field` 或 `variable`。
|
|
48
|
+
- `field` 模式的 `leftValue` 必须填写真实 `rule.field`,不能填写业务 `key`。
|
|
49
|
+
- 对对象字段取子属性时使用 `leftSubField`。
|
|
50
|
+
- 非空旧字段 `subField` 不会被当前表单运行时读取,必须迁移为 `leftSubField` 或 `rightSubField`。
|
|
51
|
+
|
|
52
|
+
右侧:
|
|
53
|
+
|
|
54
|
+
- `rightValueType` 允许 `field`、`variable`、`constant`。
|
|
55
|
+
- `field` 模式可使用 `rightSubField`。
|
|
56
|
+
- `constant` 模式必须显式提供 `rightValue`;`null` 也是显式值。
|
|
57
|
+
- `isEmpty`、`isNotEmpty` 是单目操作符,不要求右值。
|
|
58
|
+
|
|
59
|
+
允许的操作符:
|
|
60
|
+
|
|
61
|
+
```text
|
|
62
|
+
eq ne gt gte lt lte contains isEmpty isNotEmpty
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
## 运行变量
|
|
66
|
+
|
|
67
|
+
允许使用:
|
|
68
|
+
|
|
69
|
+
- `$MOMENT`
|
|
70
|
+
- `$userInfo`
|
|
71
|
+
- `$formField`
|
|
72
|
+
- `$formDisplayField`
|
|
73
|
+
- `$FLOW`
|
|
74
|
+
- `$RANGE`
|
|
75
|
+
|
|
76
|
+
`$FLOW` 可读取当前环节和进行中环节上下文;节点级显隐优先使用前端变量选择器提供的 canonical 路径,例如 `$FLOW.currentStep.flowstepID`、`$FLOW.currentStep.name`、`$FLOW.runningStep.flowstepID`。流程变量不订阅表单字段,因此不需要 `leftValueRef` / `rightValueRef`。
|
|
77
|
+
|
|
78
|
+
引用表单字段的变量必须提供对应的 `leftValueRef` 或 `rightValueRef`,否则运行时不会订阅字段变化:
|
|
79
|
+
|
|
80
|
+
```json
|
|
81
|
+
{
|
|
82
|
+
"leftValueType": "variable",
|
|
83
|
+
"leftValue": "$RANGE($formField['service_period'], 'days')",
|
|
84
|
+
"leftValueRef": "$formField['service_period']",
|
|
85
|
+
"operator": "gt",
|
|
86
|
+
"rightValueType": "constant",
|
|
87
|
+
"rightValue": 30
|
|
88
|
+
}
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
`$userInfo.id` 可用于页面状态判断,但它仍然只是前端条件。不得用它替代服务端权限、敏感字段保密或防篡改控制。
|
|
92
|
+
|
|
93
|
+
## 冲突门禁
|
|
94
|
+
|
|
95
|
+
- 动态条件不得引用不存在的字段,不得自引用或形成间接循环依赖。
|
|
96
|
+
- 同一条件和同一 `action` 不能同时让字段隐藏并必填。
|
|
97
|
+
- 同一条件和同一 `action` 不能同时让字段禁用并必填。
|
|
98
|
+
- 静态隐藏字段启用动态必填时,必须同时有动态显隐恢复路径。
|
|
99
|
+
- 静态禁用字段启用动态必填时,必须同时有动态只读恢复路径。
|
|
100
|
+
- 静态必填字段只要可能动态隐藏或禁用,就必须改为配套的 `requiredCondition`,不能永久保持必填。
|
|
101
|
+
- `raw`、标签、分隔线、按钮等展示或命令控件不得配置动态必填。
|
|
102
|
+
|
|
103
|
+
推荐成对配置:触发条件成立时显示并必填,可写成互斥动作。
|
|
104
|
+
|
|
105
|
+
```json
|
|
106
|
+
{
|
|
107
|
+
"hasVisibilityCondition": true,
|
|
108
|
+
"visibilityCondition": {
|
|
109
|
+
"condition": {
|
|
110
|
+
"logic": "AND",
|
|
111
|
+
"conditions": [
|
|
112
|
+
{
|
|
113
|
+
"leftValueType": "field",
|
|
114
|
+
"leftValue": "need_detail",
|
|
115
|
+
"operator": "ne",
|
|
116
|
+
"rightValueType": "constant",
|
|
117
|
+
"rightValue": "是"
|
|
118
|
+
}
|
|
119
|
+
]
|
|
120
|
+
},
|
|
121
|
+
"action": true
|
|
122
|
+
},
|
|
123
|
+
"hasRequiredCondition": true,
|
|
124
|
+
"requiredCondition": {
|
|
125
|
+
"condition": {
|
|
126
|
+
"logic": "AND",
|
|
127
|
+
"conditions": [
|
|
128
|
+
{
|
|
129
|
+
"leftValueType": "field",
|
|
130
|
+
"leftValue": "need_detail",
|
|
131
|
+
"operator": "eq",
|
|
132
|
+
"rightValueType": "constant",
|
|
133
|
+
"rightValue": "是"
|
|
134
|
+
}
|
|
135
|
+
]
|
|
136
|
+
},
|
|
137
|
+
"action": true
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
```
|
|
141
|
+
|
|
142
|
+
## 子表单
|
|
143
|
+
|
|
144
|
+
`TableForm` 会按当前子表单行分别初始化动态条件。子表单字段条件应引用同一行内的字段;必须回测新增行、复制行、多行切换和保存重开,不能只验证第一行。
|
|
145
|
+
|
|
146
|
+
## CLI 与运行态验收
|
|
147
|
+
|
|
148
|
+
提交前必须通过:
|
|
149
|
+
|
|
150
|
+
```bash
|
|
151
|
+
bpmax-cli config form-template lint --work <work-file> --profile <profile> --format json
|
|
152
|
+
```
|
|
153
|
+
|
|
154
|
+
lint/build 会阻断:旧单条件结构、空条件组、非法操作符、错误字段引用、缺少变量订阅、循环依赖和必填冲突。关闭 `has*Condition` 但保留配置时只提示 stale warning,不执行该配置。
|
|
155
|
+
|
|
156
|
+
提交和 readback 只能证明配置被正确持久化。真实页面还必须覆盖:
|
|
157
|
+
|
|
158
|
+
1. 初始状态。
|
|
159
|
+
2. 条件成立后的隐藏、禁用或必填状态。
|
|
160
|
+
3. 条件不成立后的恢复状态。
|
|
161
|
+
4. 连续来回切换,不出现状态残留。
|
|
162
|
+
5. 保存并重新打开后配置仍生效。
|
|
163
|
+
6. 动态必填必须真实触发提交校验。
|
|
164
|
+
7. 动态必填恢复为非必填后,已经出现的必填错误必须消失,不能残留“请填写”状态。
|
|
165
|
+
8. 子表单场景验证新增、复制和多行隔离。
|
|
166
|
+
|
|
167
|
+
动态隐藏不会自动清空字段旧值。除非平台另有经过源码和运行态验证的业务逻辑,不得假设隐藏时会删除已填写数据。
|
|
@@ -5,14 +5,9 @@
|
|
|
5
5
|
- 编辑页:`/w:<workspace>/form_template/<id>`
|
|
6
6
|
|
|
7
7
|
## 鉴权与执行环境
|
|
8
|
-
-
|
|
9
|
-
-
|
|
10
|
-
-
|
|
11
|
-
|
|
12
|
-
```bash
|
|
13
|
-
export BPMAX_COOKIE_HEADER='foo=bar; baz=qux'
|
|
14
|
-
export BPMAX_WORKSPACE='store_mgr'
|
|
15
|
-
```
|
|
8
|
+
- 浏览器只用于确认登录态、只读探测和最终刷新编辑页。
|
|
9
|
+
- 正式导出、lint、build、submit、verify 必须由 `bpmax-cli config form-template ...` typed adapter 完成。
|
|
10
|
+
- 旧 Python helper 只作为仓库内历史实现参考,不是本 skill 的执行路径。
|
|
16
11
|
|
|
17
12
|
## 真实线上详情口径
|
|
18
13
|
- 开发前必须先调用:
|
|
@@ -38,83 +33,88 @@ export BPMAX_WORKSPACE='store_mgr'
|
|
|
38
33
|
### 编辑已有模板
|
|
39
34
|
|
|
40
35
|
```bash
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
--
|
|
47
|
-
--workspace store_mgr \
|
|
48
|
-
--cookie-header "$BPMAX_COOKIE_HEADER"
|
|
36
|
+
bpmax-cli config form-template export \
|
|
37
|
+
--id <draft_id> \
|
|
38
|
+
--work-format structured \
|
|
39
|
+
--out .codex/tmp/form-template-editor \
|
|
40
|
+
--profile <profile> \
|
|
41
|
+
--format json
|
|
49
42
|
```
|
|
50
43
|
|
|
51
44
|
### 基于线上样例创建 skeleton
|
|
52
45
|
|
|
53
46
|
```bash
|
|
54
|
-
|
|
55
|
-
--
|
|
56
|
-
--
|
|
57
|
-
--
|
|
58
|
-
--
|
|
47
|
+
bpmax-cli config form-template export \
|
|
48
|
+
--id <sample_template_id> \
|
|
49
|
+
--work-format structured \
|
|
50
|
+
--out .codex/tmp/form-template-editor \
|
|
51
|
+
--profile <profile> \
|
|
52
|
+
--format json
|
|
59
53
|
```
|
|
60
54
|
|
|
61
|
-
###
|
|
62
|
-
|
|
63
|
-
```bash
|
|
64
|
-
"$PYTHON_BIN" .codex/skills/bpmax-form-template-editor/scripts/confirm_form_template.py \
|
|
65
|
-
--stem 990702153 \
|
|
66
|
-
--stage work \
|
|
67
|
-
--actor codex \
|
|
68
|
-
--minimal-form-mode minimal \
|
|
69
|
-
--detail-entry-mode single \
|
|
70
|
-
--long-term-control unknown \
|
|
71
|
-
--layout-reviewed
|
|
72
|
-
```
|
|
55
|
+
### lint 与第一次确认
|
|
73
56
|
|
|
74
|
-
|
|
57
|
+
先修改 `work/<file>.json`,再运行 typed lint,展示 `work diff` 并等待用户确认。
|
|
75
58
|
|
|
76
59
|
```bash
|
|
77
|
-
|
|
78
|
-
--
|
|
60
|
+
bpmax-cli config form-template lint \
|
|
61
|
+
--work .codex/tmp/form-template-editor/work/<file>.json \
|
|
62
|
+
--profile <profile> \
|
|
63
|
+
--format json
|
|
79
64
|
```
|
|
80
65
|
|
|
81
|
-
###
|
|
66
|
+
### 构建最终提交体
|
|
82
67
|
|
|
83
68
|
```bash
|
|
84
|
-
|
|
85
|
-
--
|
|
69
|
+
bpmax-cli config form-template build \
|
|
70
|
+
--work .codex/tmp/form-template-editor/work/<file>.json \
|
|
71
|
+
--meta .codex/tmp/form-template-editor/meta/<file>.meta.json \
|
|
72
|
+
--out .codex/tmp/form-template-editor/submit/<file>.json \
|
|
73
|
+
--profile <profile> \
|
|
74
|
+
--format json
|
|
86
75
|
```
|
|
87
76
|
|
|
88
77
|
### 第二次确认
|
|
89
78
|
|
|
90
|
-
|
|
91
|
-
"$PYTHON_BIN" .codex/skills/bpmax-form-template-editor/scripts/confirm_form_template.py \
|
|
92
|
-
--stem 990702153 \
|
|
93
|
-
--stage submit \
|
|
94
|
-
--actor codex
|
|
95
|
-
```
|
|
79
|
+
展示 `submit/<file>.json` 与 submit diff;如果 submit diff 超出已确认 work diff,必须重新解释并确认。
|
|
96
80
|
|
|
97
81
|
### 提交与回读
|
|
98
82
|
|
|
99
83
|
```bash
|
|
100
|
-
bpmax-cli config form-template submit
|
|
101
|
-
|
|
84
|
+
bpmax-cli config form-template submit \
|
|
85
|
+
--id <draft_id> \
|
|
86
|
+
--payload .codex/tmp/form-template-editor/submit/<file>.json \
|
|
87
|
+
--profile <profile> \
|
|
88
|
+
--format json
|
|
89
|
+
bpmax-cli config form-template submit \
|
|
90
|
+
--id <draft_id> \
|
|
91
|
+
--payload .codex/tmp/form-template-editor/submit/<file>.json \
|
|
92
|
+
--profile <profile> \
|
|
93
|
+
--confirm "submit form-template <draft_id>" \
|
|
94
|
+
--format json
|
|
95
|
+
bpmax-cli config form-template verify \
|
|
96
|
+
--id <draft_id> \
|
|
97
|
+
--expect .codex/tmp/form-template-editor/work/<file>.json \
|
|
98
|
+
--profile <profile> \
|
|
99
|
+
--format json
|
|
102
100
|
```
|
|
103
101
|
|
|
104
102
|
## 正式接口
|
|
105
103
|
### 编辑
|
|
106
104
|
- `PUT /api/form_template/:id?$workspace=<workspace>&$language=zhCN`
|
|
107
105
|
- `POST /api/form_template/publish?$workspace=<workspace>&$language=zhCN`
|
|
106
|
+
- 这些是 typed adapter 背后的平台接口,不是 Agent 直接调用入口。
|
|
108
107
|
|
|
109
108
|
### 新建
|
|
110
109
|
- `POST /api/form_template?$workspace=<workspace>&$language=zhCN`
|
|
111
110
|
- `POST /api/form_template/publish?$workspace=<workspace>&$language=zhCN`
|
|
111
|
+
- 这些是 typed adapter 背后的平台接口,不是 Agent 直接调用入口。
|
|
112
112
|
- typed CLI 口径:
|
|
113
113
|
|
|
114
114
|
```bash
|
|
115
|
-
bpmax-cli config form-template build --work .codex/tmp/form-template-editor/work/<create-file>.json --meta .codex/tmp/form-template-editor/meta/<create-file>.meta.json --out .codex/tmp/form-template-editor/submit/<create-file>.json
|
|
116
|
-
bpmax-cli config form-template submit --id create --payload .codex/tmp/form-template-editor/submit/<create-file>.json
|
|
117
|
-
bpmax-cli config form-template submit --id create --payload .codex/tmp/form-template-editor/submit/<create-file>.json --confirm "submit form-template create"
|
|
115
|
+
bpmax-cli config form-template build --work .codex/tmp/form-template-editor/work/<create-file>.json --meta .codex/tmp/form-template-editor/meta/<create-file>.meta.json --out .codex/tmp/form-template-editor/submit/<create-file>.json --profile <profile> --format json
|
|
116
|
+
bpmax-cli config form-template submit --id create --payload .codex/tmp/form-template-editor/submit/<create-file>.json --profile <profile> --format json
|
|
117
|
+
bpmax-cli config form-template submit --id create --payload .codex/tmp/form-template-editor/submit/<create-file>.json --profile <profile> --confirm "submit form-template create" --format json
|
|
118
118
|
```
|
|
119
119
|
|
|
120
120
|
### 发布请求体
|
|
@@ -126,7 +126,7 @@ bpmax-cli config form-template submit --id create --payload .codex/tmp/form-temp
|
|
|
126
126
|
```
|
|
127
127
|
|
|
128
128
|
## 提交体结构
|
|
129
|
-
|
|
129
|
+
typed CLI build 最终生成的 `submit/<stem>.json` 只保留:
|
|
130
130
|
|
|
131
131
|
```json
|
|
132
132
|
{
|