bpmax-cli 0.2.1-beta.2 → 0.2.1-beta.20
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 +28 -1
- package/dist/bin.js +2132 -101
- package/dist/bin.js.map +1 -1
- package/package.json +1 -1
- package/skills/bpmax-ai-taskbook/SKILL.md +4 -1
- 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-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/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 +30 -0
- package/skills/bpmax-console-template-editor/SKILL.md +109 -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 +65 -78
- package/skills/bpmax-console-template-editor/tests/test_console_template_editor.py +86 -30
- package/skills/bpmax-dataset-field-template-editor/SKILL.md +124 -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 +112 -768
- 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-test-operator/SKILL.md +112 -533
- package/skills/bpmax-e2e-flow-test-operator/references/ai-test-suite.md +43 -4
- 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 +563 -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 +110 -551
- package/skills/bpmax-filter-template-editor/references/experience-coverage-matrix.md +18 -18
- package/skills/bpmax-filter-template-editor/references/filter-request-shape.md +29 -26
- 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-template-editor/SKILL.md +109 -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/full-detail-guide.md +1155 -0
- package/skills/bpmax-flow-template-editor/references/local-temp-workflow.md +1 -1
- package/skills/bpmax-flow-template-editor/references/requirement-to-node-mapping.md +3 -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 +2 -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 +111 -1104
- package/skills/bpmax-form-template-editor/agents/openai.yaml +2 -2
- 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 +1108 -0
- package/skills/bpmax-form-template-editor/references/local-temp-workflow.md +4 -4
- package/skills/bpmax-form-template-editor/references/payload-checklist.md +1 -1
- 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-list-template-editor/SKILL.md +110 -466
- package/skills/bpmax-list-template-editor/agents/openai.yaml +2 -2
- package/skills/bpmax-list-template-editor/references/full-detail-guide.md +454 -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/scripts/list_template_editor_common.py +9 -78
- 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-project/SKILL.md +1 -0
- package/skills/bpmax-project-detail-template-editor/SKILL.md +11 -33
- package/skills/bpmax-project-detail-template-editor/agents/openai.yaml +2 -2
- package/skills/bpmax-role-editor/SKILL.md +7 -30
- package/skills/bpmax-user-mock-operator/SKILL.md +1 -1
- package/skills/bpmax-user-mock-operator/agents/openai.yaml +2 -2
|
@@ -13,7 +13,7 @@ def main():
|
|
|
13
13
|
state = json.loads(Path(args.state).read_text(encoding="utf-8"))
|
|
14
14
|
scenarios = state.get("scenarios", [])
|
|
15
15
|
issues = state.get("issues", [])
|
|
16
|
-
counts = {"pass": 0, "fail": 0, "blocked": 0, "pending": 0}
|
|
16
|
+
counts = {"pass": 0, "diagnostic": 0, "fail": 0, "blocked": 0, "pending": 0}
|
|
17
17
|
for item in scenarios:
|
|
18
18
|
counts[item["status"]] = counts.get(item["status"], 0) + 1
|
|
19
19
|
|
|
@@ -28,14 +28,16 @@ def main():
|
|
|
28
28
|
for k, v in state["dependencies"].items():
|
|
29
29
|
lines.append(f" - `{k}`: `{v}`")
|
|
30
30
|
lines.append("")
|
|
31
|
-
lines.append("## 2. AI
|
|
31
|
+
lines.append("## 2. AI 诊断记录(非页面 E2E 结论)")
|
|
32
|
+
lines.append("- 该文档由旧诊断脚本生成,只能记录接口/脚本摸底结果;不能作为完整页面 E2E 通过报告。")
|
|
33
|
+
lines.append("- 正式重新运行报告必须使用 `.ai_test/report/<run_id>/` 并通过 `bpmax-cli test-suite lint-report`。")
|
|
32
34
|
lines.append(f"- 已测场景数:`{len(scenarios)}`")
|
|
33
|
-
lines.append(f"-
|
|
35
|
+
lines.append(f"- 诊断成功:`{counts['diagnostic'] + counts['pass']}`")
|
|
34
36
|
lines.append(f"- 失败:`{counts['fail']}`")
|
|
35
37
|
lines.append(f"- 阻塞:`{counts['blocked']}`")
|
|
36
38
|
lines.append(f"- 待测:`{counts['pending']}`")
|
|
37
39
|
lines.append("")
|
|
38
|
-
lines.append("### 2.1
|
|
40
|
+
lines.append("### 2.1 诊断场景")
|
|
39
41
|
for item in scenarios:
|
|
40
42
|
lines.append(f"- `{item['id']}` {item['title']}:`{item['status']}`")
|
|
41
43
|
if item.get("sample"):
|
|
@@ -102,7 +104,7 @@ def main():
|
|
|
102
104
|
lines.append(f"- {item['id']}:{item['title']}")
|
|
103
105
|
lines.append("")
|
|
104
106
|
lines.append("### 3.3 预期结果")
|
|
105
|
-
lines.append("- 逐场景以 2.1
|
|
107
|
+
lines.append("- 逐场景以 2.1 中的诊断记录为参考;完整 E2E 通过必须另有真实页面报告。")
|
|
106
108
|
if state.get("runtime_bindings"):
|
|
107
109
|
lines.append("")
|
|
108
110
|
lines.append("## 4. 运行时绑定")
|
|
@@ -164,7 +164,7 @@ def cmd_endpoint(args):
|
|
|
164
164
|
"path": args.path,
|
|
165
165
|
"status": args.status,
|
|
166
166
|
"note": args.note,
|
|
167
|
-
"
|
|
167
|
+
"body_redacted": body,
|
|
168
168
|
"at": now_iso(),
|
|
169
169
|
}
|
|
170
170
|
],
|
|
@@ -231,7 +231,7 @@ def main():
|
|
|
231
231
|
p.add_argument("--id", required=True)
|
|
232
232
|
p.add_argument("--scenario", required=True)
|
|
233
233
|
p.add_argument("--title")
|
|
234
|
-
p.add_argument("--status", required=True, choices=["pass", "fail", "blocked", "pending"])
|
|
234
|
+
p.add_argument("--status", required=True, choices=["pass", "fail", "blocked", "pending", "diagnostic"])
|
|
235
235
|
p.add_argument("--sample")
|
|
236
236
|
p.add_argument("--note")
|
|
237
237
|
p.set_defaults(func=cmd_record)
|
|
@@ -326,11 +326,15 @@ def main() -> None:
|
|
|
326
326
|
if args.state_id and getattr(err, "code", 0) not in (0, None):
|
|
327
327
|
record_state_scenario(args.state_id, args.scenario.upper(), "fail", note=str(err))
|
|
328
328
|
raise
|
|
329
|
-
status = "
|
|
329
|
+
status = "diagnostic"
|
|
330
330
|
note = scenario_note(result)
|
|
331
331
|
if args.scenario == "full" and not result.get("terminal_reached"):
|
|
332
332
|
status = "fail"
|
|
333
333
|
note = (note + ", " if note else "") + "terminal step not reached"
|
|
334
|
+
elif note:
|
|
335
|
+
note = f"{note}; api/script diagnostic only, not browser E2E pass"
|
|
336
|
+
else:
|
|
337
|
+
note = "api/script diagnostic only, not browser E2E pass"
|
|
334
338
|
record_state_scenario(args.state_id, args.scenario.upper(), status, note=note, sample=str(result.get("project_id") or ""))
|
|
335
339
|
if args.output:
|
|
336
340
|
save_json(Path(args.output), result)
|
|
@@ -11,6 +11,7 @@ if str(SCRIPT_DIR) not in sys.path:
|
|
|
11
11
|
sys.path.insert(0, str(SCRIPT_DIR))
|
|
12
12
|
|
|
13
13
|
import e2e_state # noqa: E402
|
|
14
|
+
import flow_test_profile # noqa: E402
|
|
14
15
|
from bpmax_session import resolve_extra_headers # noqa: E402
|
|
15
16
|
from flow_test_profile import FlowTestProfile, load_profile, resolve_profile # noqa: E402
|
|
16
17
|
from flow_api_matrix import build_matrix # noqa: E402
|
|
@@ -19,6 +20,76 @@ from flow_form_runtime import build_create_skeleton, infer_transition # noqa: E
|
|
|
19
20
|
|
|
20
21
|
|
|
21
22
|
class NegativeSaleApiToolsTests(unittest.TestCase):
|
|
23
|
+
@classmethod
|
|
24
|
+
def setUpClass(cls) -> None:
|
|
25
|
+
cls.fixture = tempfile.TemporaryDirectory()
|
|
26
|
+
cls.fixture_root = Path(cls.fixture.name)
|
|
27
|
+
cls.original_root = flow_test_profile.ROOT
|
|
28
|
+
flow_test_profile.ROOT = cls.fixture_root
|
|
29
|
+
cls._write_fixture()
|
|
30
|
+
|
|
31
|
+
@classmethod
|
|
32
|
+
def tearDownClass(cls) -> None:
|
|
33
|
+
flow_test_profile.ROOT = cls.original_root
|
|
34
|
+
cls.fixture.cleanup()
|
|
35
|
+
|
|
36
|
+
@classmethod
|
|
37
|
+
def _write_json(cls, path: Path, payload: object) -> None:
|
|
38
|
+
path.parent.mkdir(parents=True, exist_ok=True)
|
|
39
|
+
path.write_text(json.dumps(payload, ensure_ascii=False), encoding="utf-8")
|
|
40
|
+
|
|
41
|
+
@classmethod
|
|
42
|
+
def _write_fixture(cls) -> None:
|
|
43
|
+
profile = resolve_profile()
|
|
44
|
+
|
|
45
|
+
form_dir = cls.fixture_root / "think_form_template" / f"uuid'{profile.form_template_uuid}"
|
|
46
|
+
cls._write_json(form_dir / "form_template", {"name": profile.form_template_name})
|
|
47
|
+
cls._write_json(
|
|
48
|
+
form_dir / "think_form_rule" / "001-negativeQuota" / "form_rule.value",
|
|
49
|
+
{"field": "negativeQuota", "title": "负卖额度", "template_id": 1, "field_type": "i_input_number", "key": "negativeQuota"},
|
|
50
|
+
)
|
|
51
|
+
cls._write_json(
|
|
52
|
+
form_dir / "think_form_rule" / "002-seller" / "form_rule.value",
|
|
53
|
+
{"field": "seller", "title": "经销商团队", "template_id": 1, "field_type": "group_select", "key": "seller"},
|
|
54
|
+
)
|
|
55
|
+
|
|
56
|
+
data_set_base = (
|
|
57
|
+
cls.fixture_root
|
|
58
|
+
/ "think_data_set"
|
|
59
|
+
/ f"uuid'{profile.data_set_uuid}"
|
|
60
|
+
/ "think_data_set_data_set_fields_think_data_set_field"
|
|
61
|
+
)
|
|
62
|
+
for field in ("name", "seller", "product", "status"):
|
|
63
|
+
field_dir = data_set_base / f"id'1___key'{field}___is_del'0"
|
|
64
|
+
cls._write_json(field_dir / "data_set_data_set_fields_think_data_set_field", {"key": field})
|
|
65
|
+
|
|
66
|
+
for uuid, config in (
|
|
67
|
+
(profile.filter_template_uuid, [{"field": field, "label": field, "is": "input", "type": "like"} for field in ("name", "seller", "product", "status")]),
|
|
68
|
+
(profile.list_template_uuid, [{"field": field, "title": field, "icon": ""} for field in ("name", "seller", "product", "status")]),
|
|
69
|
+
):
|
|
70
|
+
cls._write_json(
|
|
71
|
+
cls.fixture_root / "think_flow_page_template" / f"uuid'{uuid}" / "flow_page_template.content",
|
|
72
|
+
{"config": config},
|
|
73
|
+
)
|
|
74
|
+
|
|
75
|
+
cls._write_json(
|
|
76
|
+
cls.fixture_root / "think_flow" / f"flow_type'{profile.flow_type}" / "flow.data",
|
|
77
|
+
{
|
|
78
|
+
"nodes": [
|
|
79
|
+
{
|
|
80
|
+
"id": "1777001001001",
|
|
81
|
+
"name": "经销商负责人审批",
|
|
82
|
+
"approve_actions": ["通过|1777001001002"],
|
|
83
|
+
"approve_fail_actions": ["驳回|1775123074529"],
|
|
84
|
+
},
|
|
85
|
+
{"id": "1775123074529", "name": "修改配置", "approve_to_step": "1777001001001"},
|
|
86
|
+
{"id": "1777001001002", "name": "区域经理审批", "approve_to_step": "1777001001003"},
|
|
87
|
+
{"id": "1777001001003", "name": "零售业务部审批", "approve_to_step": "1775123027709"},
|
|
88
|
+
{"id": "1775123027709", "name": "生效中"},
|
|
89
|
+
]
|
|
90
|
+
},
|
|
91
|
+
)
|
|
92
|
+
|
|
22
93
|
def test_build_create_skeleton_from_local_template(self) -> None:
|
|
23
94
|
profile = resolve_profile()
|
|
24
95
|
payload = build_create_skeleton(profile=profile)
|