bpmax-cli 0.2.1-beta.7 → 0.2.1-beta.71
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 +20 -7
- package/dist/bin.js +40326 -12576
- package/dist/bin.js.map +1 -1
- package/package.json +10 -5
- package/scripts/install-skills.mjs +27 -60
- package/scripts/run-source-cli.mjs +145 -0
- package/skills/bpmax-ai-taskbook/SKILL.md +12 -0
- package/skills/bpmax-ai-taskbook/references/blueprint-taskbook-gates.md +120 -0
- package/skills/bpmax-ai-taskbook/references/taskbook-template.md +41 -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-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 +44 -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 +122 -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 +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-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 +128 -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 +5 -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-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 +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 +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
|
@@ -4,13 +4,7 @@ from __future__ import annotations
|
|
|
4
4
|
import copy
|
|
5
5
|
import hashlib
|
|
6
6
|
import json
|
|
7
|
-
import os
|
|
8
7
|
import sys
|
|
9
|
-
import ssl
|
|
10
|
-
import urllib.error
|
|
11
|
-
import urllib.parse
|
|
12
|
-
import urllib.request
|
|
13
|
-
from dataclasses import dataclass
|
|
14
8
|
from datetime import datetime, timezone
|
|
15
9
|
from difflib import unified_diff
|
|
16
10
|
from pathlib import Path
|
|
@@ -20,7 +14,6 @@ from typing import Any, Dict, Iterable, Optional
|
|
|
20
14
|
SHARED_SKILL_ROOT = Path(__file__).resolve().parents[2] / "bpmax-builder-shared"
|
|
21
15
|
if str(SHARED_SKILL_ROOT) not in sys.path:
|
|
22
16
|
sys.path.insert(0, str(SHARED_SKILL_ROOT))
|
|
23
|
-
from base_url import DEFAULT_BASE_URL, resolve_base_url
|
|
24
17
|
|
|
25
18
|
DEFAULT_LANGUAGE = "zhCN"
|
|
26
19
|
REPO_ROOT = Path(__file__).resolve().parents[4]
|
|
@@ -62,6 +55,11 @@ HIGH_RISK_REASONS = {
|
|
|
62
55
|
"image_preview_column",
|
|
63
56
|
"data_set_switch",
|
|
64
57
|
}
|
|
58
|
+
LEGACY_NETWORK_DISABLED_MESSAGE = (
|
|
59
|
+
"Legacy list-template network scripts are disabled in bpmax-cli. "
|
|
60
|
+
"Use `bpmax-cli config list-template export|lint|build|submit|create|delete|verify` "
|
|
61
|
+
"so profile, capability, dry-run, confirmation, audit, and baseline checks are enforced."
|
|
62
|
+
)
|
|
65
63
|
|
|
66
64
|
from template_script_hard_rules import scan_named_script_surfaces
|
|
67
65
|
|
|
@@ -877,79 +875,12 @@ def extract_template_id(payload: Any) -> int | None:
|
|
|
877
875
|
return None
|
|
878
876
|
|
|
879
877
|
|
|
880
|
-
@dataclass
|
|
881
|
-
class ApiClient:
|
|
882
|
-
base_url: str
|
|
883
|
-
workspace: str
|
|
884
|
-
language: str
|
|
885
|
-
cookie_header: str
|
|
886
|
-
timeout: float
|
|
887
|
-
insecure: bool = False
|
|
888
|
-
|
|
889
|
-
def _build_url(self, path: str) -> str:
|
|
890
|
-
suffix = f"$workspace={urllib.parse.quote(self.workspace)}&$language={urllib.parse.quote(self.language)}"
|
|
891
|
-
joiner = "&" if "?" in path else "?"
|
|
892
|
-
return self.base_url.rstrip("/") + path + joiner + suffix
|
|
893
|
-
|
|
894
|
-
def request(self, method: str, path: str, body: Optional[dict] = None) -> dict:
|
|
895
|
-
headers = {
|
|
896
|
-
"content-type": "application/json",
|
|
897
|
-
"cookie": self.cookie_header,
|
|
898
|
-
"accept": "application/json, text/plain, */*",
|
|
899
|
-
}
|
|
900
|
-
data = None if body is None else json.dumps(body, ensure_ascii=False).encode("utf-8")
|
|
901
|
-
req = urllib.request.Request(self._build_url(path), data=data, headers=headers, method=method)
|
|
902
|
-
context = ssl._create_unverified_context() if self.insecure else None
|
|
903
|
-
try:
|
|
904
|
-
with urllib.request.urlopen(req, timeout=self.timeout, context=context) as resp:
|
|
905
|
-
raw = resp.read().decode("utf-8", "replace")
|
|
906
|
-
except urllib.error.HTTPError as err:
|
|
907
|
-
raw = err.read().decode("utf-8", "replace")
|
|
908
|
-
raise SystemExit(f"HTTP {err.code} {path}: {raw}") from err
|
|
909
|
-
except urllib.error.URLError as err:
|
|
910
|
-
raise SystemExit(f"Request failed {path}: {err}") from err
|
|
911
|
-
payload = json.loads(raw)
|
|
912
|
-
if payload.get("code") != 0:
|
|
913
|
-
raise SystemExit(f"API error {path}: {payload}")
|
|
914
|
-
return payload
|
|
915
|
-
|
|
916
|
-
def get_flow_page_template(self, template_id: Any) -> dict:
|
|
917
|
-
return self.request("GET", f"/api/flow_page_template/{template_id}")
|
|
918
|
-
|
|
919
|
-
def create_flow_page_template(self, body: Dict[str, Any]) -> dict:
|
|
920
|
-
return self.request("POST", "/api/flow_page_template", body)
|
|
921
|
-
|
|
922
|
-
def update_flow_page_template(self, template_id: Any, body: Dict[str, Any]) -> dict:
|
|
923
|
-
return self.request("PUT", f"/api/flow_page_template/{template_id}", body)
|
|
924
|
-
|
|
925
|
-
def get_data_set_list(self, *, flow_type: str, flow_key: str = "") -> list[Dict[str, Any]]:
|
|
926
|
-
payload = self.request("GET", f"/bpmax/data-set?flow_type={urllib.parse.quote(flow_type)}&flow_key={urllib.parse.quote(flow_key)}")
|
|
927
|
-
data = payload.get("data")
|
|
928
|
-
if not isinstance(data, list):
|
|
929
|
-
raise SystemExit("unexpected /bpmax/data-set response: data is not a list")
|
|
930
|
-
return data
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
def resolve_cookie_header(value: Optional[str]) -> str:
|
|
934
|
-
cookie = value or os.environ.get("BPMAX_COOKIE_HEADER", "")
|
|
935
|
-
if not cookie:
|
|
936
|
-
raise SystemExit("missing cookie header: pass --cookie-header or set BPMAX_COOKIE_HEADER")
|
|
937
|
-
return cookie
|
|
938
|
-
|
|
939
|
-
|
|
940
878
|
def resolve_workspace(value: Optional[str]) -> str:
|
|
941
|
-
workspace = value or
|
|
879
|
+
workspace = value or ""
|
|
942
880
|
if not workspace:
|
|
943
|
-
raise SystemExit("missing workspace: pass --workspace
|
|
881
|
+
raise SystemExit("missing workspace: pass --workspace")
|
|
944
882
|
return workspace
|
|
945
883
|
|
|
946
884
|
|
|
947
|
-
def build_client(args: Any) ->
|
|
948
|
-
|
|
949
|
-
base_url=resolve_base_url(getattr(args, "base_url", None)),
|
|
950
|
-
workspace=resolve_workspace(getattr(args, "workspace", None)),
|
|
951
|
-
language=getattr(args, "language", DEFAULT_LANGUAGE),
|
|
952
|
-
cookie_header=resolve_cookie_header(getattr(args, "cookie_header", None)),
|
|
953
|
-
timeout=float(getattr(args, "timeout", 30)),
|
|
954
|
-
insecure=bool(getattr(args, "insecure", False)),
|
|
955
|
-
)
|
|
885
|
+
def build_client(args: Any) -> None:
|
|
886
|
+
raise SystemExit(LEGACY_NETWORK_DISABLED_MESSAGE)
|
|
@@ -13,7 +13,9 @@ Memory is isolated by the API Key's bound agent. The CLI only chooses scope:
|
|
|
13
13
|
|
|
14
14
|
- `user`: current BPMAX user + current agent
|
|
15
15
|
- `organization`: current organization + current agent
|
|
16
|
-
- `all`: search
|
|
16
|
+
- `all`: search both user and organization scopes
|
|
17
|
+
|
|
18
|
+
当前 memory 后端只支持 `status`、`search`、`add`。`list/get/update/delete` 会在 capability 中标记为 `adapter_not_implemented`,不得绕过 capability 直接调用旧 Mem0 路径。当前后端也不支持 metadata filters 或独立 metadata 持久化;需要保留的类型、domain 和对象身份应简洁写入 memory 文本本身。
|
|
17
19
|
|
|
18
20
|
## Start Of Work
|
|
19
21
|
|
|
@@ -30,7 +32,7 @@ Good queries include the business name, workspace, `flow_type`, template/data-se
|
|
|
30
32
|
|
|
31
33
|
## Write Back
|
|
32
34
|
|
|
33
|
-
Only write reusable conclusions.
|
|
35
|
+
Only write reusable conclusions. Prefix the text with one of these stable types:
|
|
34
36
|
|
|
35
37
|
- `decision`: durable design or implementation decision
|
|
36
38
|
- `task_learning`: verified method that should be reused
|
|
@@ -41,8 +43,7 @@ Only write reusable conclusions. Prefer these metadata types:
|
|
|
41
43
|
|
|
42
44
|
```bash
|
|
43
45
|
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
|
+
--text "type=task_learning; domain=flow-template; flow_type=flow_xxx; <short reusable learning>" \
|
|
46
47
|
--format json
|
|
47
48
|
```
|
|
48
49
|
|
|
@@ -54,8 +55,7 @@ When pausing, switching threads, or approaching context limits, write a short `s
|
|
|
54
55
|
|
|
55
56
|
```bash
|
|
56
57
|
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"]}' \
|
|
58
|
+
--text "type=session_state; goal=<goal>; done=<done>; files=<key files>; next=<next step>" \
|
|
59
59
|
--format json
|
|
60
60
|
```
|
|
61
61
|
|
|
@@ -66,6 +66,7 @@ bpmax-cli memory add --profile <profile> --scope user \
|
|
|
66
66
|
- If memory is unavailable, continue the task and note that memory lookup/writeback failed.
|
|
67
67
|
- Do not use raw Mem0 URLs, curl, Python helper scripts, or environment variables from old per-environment skills.
|
|
68
68
|
- Do not pass `--agent`; `bpmax-cli memory` intentionally has no agent option.
|
|
69
|
+
- Do not pass `--filters` or rely on `--metadata` for retrieval until the platform capability explicitly reports metadata support.
|
|
69
70
|
|
|
70
71
|
## Output
|
|
71
72
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: "bpmax-nav-config-editor"
|
|
3
|
-
description: "
|
|
3
|
+
description: "用于通过 bpmax-cli typed config 创建或编辑 BPMAX PC导航、PC快捷入口、H5导航、H5快捷入口。只要用户提到“工作区导航配置”“导航管理”“PC导航”“H5导航”“快捷入口”“按需求改导航”“提交导航配置”“让 Codex 根据需求构造 navmenu / shortcut / navmenu_mobile / shortcut_mobile 配置”或等价表达,就应使用这个 skill。它要求 Codex 通过 typed CLI 读取四类导航配置、权限点与回读 hash,构造并提交配置,最后用接口回读确认最新结果。"
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# BPMAX Nav Config Editor
|
|
@@ -20,13 +20,13 @@ description: "用于在 BPMAX 的工作区导航配置页面中创建或编辑 P
|
|
|
20
20
|
- 不得以历史脏配置、顺手修复、统一风格、编辑器自动补字段、方便调试为理由修改需求外配置。
|
|
21
21
|
|
|
22
22
|
## 何时使用
|
|
23
|
-
-
|
|
23
|
+
- 用户需要通过 bpmax-cli typed config 管理 BPMAX 导航配置。
|
|
24
24
|
- 用户要新增、删除、改名、改路径、改权限、改可见范围、调整顺序。
|
|
25
25
|
- 用户要一次性生成一套 PC / H5 导航与快捷入口配置。
|
|
26
|
-
-
|
|
26
|
+
- 用户需要使用当前 CLI profile、capability 和线上回读结果完成配置闭环。
|
|
27
27
|
|
|
28
28
|
## 前置条件
|
|
29
|
-
-
|
|
29
|
+
- 先通过 CLI profile/capability 和目标参数确认类似对象:
|
|
30
30
|
- `.../w:<workspace>/workspaceConfiguration/<workspace>?nav=navs&id=<id>`
|
|
31
31
|
- 用户需要明确说明:
|
|
32
32
|
- 是改现有导航,还是生成一整套导航建议
|
|
@@ -55,14 +55,13 @@ description: "用于在 BPMAX 的工作区导航配置页面中创建或编辑 P
|
|
|
55
55
|
- 如果停在“只改完一个 tab 但四类尚未全量回读”“权限范围待人工确认”等状态,结束前写 `session_state`。
|
|
56
56
|
|
|
57
57
|
## 核心原则
|
|
58
|
-
-
|
|
58
|
+
- 优先使用 bpmax-cli typed config 的当前 profile/auth/capability,不得把页面会话凭据作为配置读取或写入凭据。
|
|
59
59
|
- 当前默认闭环:
|
|
60
60
|
- `bpmax-cli config nav-config export -> 修改 work -> lint -> build -> submit dry-run -> 用户确认 -> submit --confirm -> 回读 hash -> 浏览器验收`
|
|
61
61
|
- 本地工件固定落在 `.codex/tmp/nav-config-editor/{raw,work,meta,submit,diffs,result}`
|
|
62
|
-
-
|
|
63
|
-
-
|
|
64
|
-
- `
|
|
65
|
-
- 非 `zhCN` 语言时的 `POST /api/i18n/config/apply`
|
|
62
|
+
- 页面只保留这几类只读验收职责,不作为配置凭据或写入路径:
|
|
63
|
+
- 真实可选 icon 展示核对
|
|
64
|
+
- 非 `zhCN` 语言下的文案展示核对
|
|
66
65
|
- 最终导航管理页、PC 工作区首页、H5 首页验收
|
|
67
66
|
- 四类配置是一个整体:
|
|
68
67
|
- `navmenu`
|
|
@@ -110,14 +109,11 @@ description: "用于在 BPMAX 的工作区导航配置页面中创建或编辑 P
|
|
|
110
109
|
- 配置 id
|
|
111
110
|
- 进入统一入口模型前,先按工作区、入口名和权限模型检索一次 Mem0。
|
|
112
111
|
|
|
113
|
-
### 2.
|
|
114
|
-
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
- 同域网络请求
|
|
119
|
-
- `NavManagement` 组件实例和 `submitData()` 现在主要用于:
|
|
120
|
-
- 读取线上真实结构
|
|
112
|
+
### 2. 获取 CLI 上下文
|
|
113
|
+
- 使用当前 `bpmax-cli` profile、capability 和线上 readback 作为授权与事实来源。
|
|
114
|
+
- 浏览器页面只用于只读验收导航可见性和入口跳转;真实远端写入必须回到 `bpmax-cli config nav-config submit`。
|
|
115
|
+
- 不读取或复用浏览器 Cookie、浏览器存储、手工请求头或旧脚本环境变量。
|
|
116
|
+
- `NavManagement` 组件实例和 `submitData()` 只作为历史结构参考,不作为配置写入路径。
|
|
121
117
|
- 辅助定位 icon / 权限 / 页面行为
|
|
122
118
|
- 最终刷新回页验收
|
|
123
119
|
- 不得把 `submitData()` 或脚本直提 `/api/configuration` 当作提交路径;它们只用于理解页面结构和验收行为,真实写入必须走 typed CLI。
|
|
@@ -188,6 +184,7 @@ description: "用于在 BPMAX 的工作区导航配置页面中创建或编辑 P
|
|
|
188
184
|
- 如果用户提供的是跨工作区路径,默认不擅自改写 workspace 前缀。
|
|
189
185
|
|
|
190
186
|
### 7. Icon 规则
|
|
187
|
+
- 开始选 icon 前必须读取 `../bpmax-icon-catalog/SKILL.md`,先用 `bpmax-cli icon search` 获取候选并用 `icon validate` 校验;只提交 catalog 返回的完整 class。
|
|
191
188
|
- 不要凭源码文件名或历史配置猜 icon 格式。
|
|
192
189
|
- 必须优先以当前页面弹窗里的图标选择器为准,直接读取界面上实际可选的 icon。
|
|
193
190
|
- 当前页面实际可选图标来自 `IconPicker` 弹窗,而不是旧版 `iconList` 下拉。
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
interface:
|
|
2
2
|
display_name: "BPMAX Nav Config Editor"
|
|
3
|
-
short_description: "
|
|
4
|
-
default_prompt: "使用 $bpmax-nav-config-editor
|
|
3
|
+
short_description: "通过 bpmax-cli typed config 创建或编辑 BPMAX 工作区导航配置"
|
|
4
|
+
default_prompt: "使用 $bpmax-nav-config-editor 通过 bpmax-cli typed config 创建或编辑 BPMAX 工作区导航配置,并用回读验证确认结果。"
|
|
@@ -62,9 +62,9 @@ GET /api/group/sub_groups?group_ids=<id1,id2>&with_full_info=0
|
|
|
62
62
|
其他三类仅替换 `type` 和 `content` 字段名。
|
|
63
63
|
|
|
64
64
|
## 推荐调用顺序
|
|
65
|
-
1.
|
|
65
|
+
1. 从 typed CLI export/readback 读取四类配置和 baseline hash。
|
|
66
66
|
2. 在本地 work 文件中同时更新四类数据。
|
|
67
67
|
3. 执行 `bpmax-cli config nav-config lint/build/submit`,先 dry-run,再用精确 `--confirm` 正式提交。
|
|
68
68
|
4. 提交后回读四类配置,并在浏览器首页点击入口验证。
|
|
69
69
|
|
|
70
|
-
|
|
70
|
+
页面提交函数、页面请求或直接 `POST/PUT /api/configuration` 只可用于理解历史页面行为,不得作为真实写入路径。
|
|
@@ -17,10 +17,11 @@
|
|
|
17
17
|
- `formatNavigationData`
|
|
18
18
|
- `validateData`
|
|
19
19
|
|
|
20
|
-
##
|
|
21
|
-
|
|
20
|
+
## 页面结构观察方式
|
|
21
|
+
页面组件结构只用于理解历史运行态和做只读验收,不作为配置读取或写入路径。配置事实必须来自 `bpmax-cli config nav-config export/verify/readback`。
|
|
22
|
+
1. 如需排查页面展示差异,可从 `window.$nuxt` 向下找组件树。
|
|
22
23
|
2. 识别 `NavManagement` 组件。
|
|
23
|
-
3.
|
|
24
|
+
3. 仅作为只读观察线索读取:
|
|
24
25
|
- `vm._setupState.list`
|
|
25
26
|
- `vm._setupState.tabList`
|
|
26
27
|
- `vm._setupState.submitData`
|
|
@@ -34,14 +35,12 @@
|
|
|
34
35
|
- 不要只读页面上展示出来的文本再反推 JSON。
|
|
35
36
|
|
|
36
37
|
## 推荐执行方式
|
|
37
|
-
-
|
|
38
|
-
-
|
|
39
|
-
-
|
|
40
|
-
-
|
|
41
|
-
|
|
42
|
-
- 一次性替换对应数组
|
|
43
|
-
- 再调用 `submitData()`
|
|
38
|
+
- 小改动和大改动都必须走 typed CLI:
|
|
39
|
+
- `bpmax-cli config nav-config export`
|
|
40
|
+
- 修改 work 文件
|
|
41
|
+
- `lint -> build -> submit dry-run -> submit --confirm -> verify/readback`
|
|
42
|
+
- 页面组件里的 `list.value`、数组替换和 `submitData()` 只作为历史反例和结构观察线索,不得作为配置写入路径。
|
|
44
43
|
|
|
45
44
|
## 回读
|
|
46
|
-
-
|
|
47
|
-
-
|
|
45
|
+
- 提交成功后使用 typed CLI verify/readback 回读四类配置。
|
|
46
|
+
- 页面只用于只读确认导航管理页、PC 工作区首页和 H5 首页展示。
|
|
@@ -1,20 +1,56 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: bpmax-plugin-config
|
|
3
3
|
version: 1.0.0
|
|
4
|
-
description:
|
|
4
|
+
description: Manage BPMAX plugin activation, plugin-scoped Agent skills, and plugin-owned configuration through typed bpmax-cli workflows.
|
|
5
5
|
---
|
|
6
6
|
|
|
7
7
|
# BPMAX Plugin Config
|
|
8
8
|
|
|
9
|
-
Use this skill when a BPMAX task involves
|
|
9
|
+
Use this skill when a BPMAX task involves installing or activating a plugin, discovering its Agent Skill, or changing plugin-owned configuration.
|
|
10
|
+
|
|
11
|
+
## Distinguish the four plugin states
|
|
12
|
+
|
|
13
|
+
- **Installed** means the organization has the plugin package. It does not mean the plugin is active in any workspace.
|
|
14
|
+
- **Activated** means the installed plugin is effective in selected workspaces. Organization defaults are mandatory in every existing and future workspace and cannot be disabled from one workspace.
|
|
15
|
+
- **Skill installed** means the current Agent has the plugin's local instructions, lint, and config adapters. It does not activate the runtime plugin.
|
|
16
|
+
- **Configured** means plugin-owned business settings have been written after activation and Skill discovery. Activation does not create those settings.
|
|
17
|
+
|
|
18
|
+
## Activation flow
|
|
19
|
+
|
|
20
|
+
1. Read the centralized activation overview before changing anything:
|
|
21
|
+
|
|
22
|
+
```bash
|
|
23
|
+
bpmax-cli plugin activation overview --profile <profile> --format json
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
2. Choose one typed mutation scope and review its dry-run:
|
|
27
|
+
|
|
28
|
+
```bash
|
|
29
|
+
bpmax-cli plugin activation workspace set --workspace <workspace> --plugin <plugin_name> --profile <profile> --format json
|
|
30
|
+
bpmax-cli plugin activation plugin set-workspaces --plugin <plugin_name> --workspace <workspace> --profile <profile> --format json
|
|
31
|
+
bpmax-cli plugin activation defaults set --plugin <plugin_name> --profile <profile> --format json
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
3. After the user accepts the displayed scope, repeat the same command with `--confirm`. The CLI must submit through `config.plugin.activation.submit`, read back `config.plugin.activation.export`, and return `readback_confirmed: true`.
|
|
35
|
+
|
|
36
|
+
4. Only after effective activation is proven should the Agent install/update the plugin Skill and edit plugin-owned configuration.
|
|
37
|
+
|
|
38
|
+
## Automatic discovery
|
|
39
|
+
|
|
40
|
+
- `bpmax-cli` compares the platform manifest `sha256` with the profile/origin/agent-scoped local state. Do not rely on the semantic version alone; a plugin may publish corrected Skill content without changing `version`.
|
|
41
|
+
- The default `plugin_skill_update_policy=check` discovers updates and reports the exact next command. `prompt` also blocks dependent configuration work until the operator explicitly updates. `auto` updates official same-origin packages before dependent lint/build/submit. `off` disables update comparison; required plugin lint declaration discovery still runs.
|
|
42
|
+
- Configure the current profile with `bpmax-cli config set plugin_skill_update_policy check|prompt|auto|off --profile <profile> --format json`.
|
|
43
|
+
- Discovery runs after authorization/capability refresh and before plugin-dependent flow-template lint/build/submit. Results are cached for at most six hours.
|
|
44
|
+
- A locally modified or unowned Skill directory is `conflicted` and is never overwritten by automatic update. Both the Agent-visible copy and the profile-scoped lint/config adapter copy are hash-checked. An explicit `plugin skills update` may adopt a legacy unowned copy after the operator chooses to replace it.
|
|
45
|
+
- The install directory records `.bpmax-plugin-skill.json` with the source profile, origin, plugin, version, and hash. A running Agent may need a new task before it reloads updated instructions; CLI lint/adapters are effective immediately.
|
|
10
46
|
|
|
11
47
|
## Required Flow
|
|
12
48
|
|
|
13
|
-
1. Confirm the target profile and
|
|
14
|
-
2.
|
|
49
|
+
1. Confirm the target profile and origin from the user's context or existing `bpmax-cli` profile. Plugin Skill discovery is site-wide and is not bound to a BPMAX business workspace.
|
|
50
|
+
2. Check available and outdated plugin skills:
|
|
15
51
|
|
|
16
52
|
```bash
|
|
17
|
-
bpmax-cli plugin skills
|
|
53
|
+
bpmax-cli plugin skills check --profile <profile> --agent codex --format json
|
|
18
54
|
```
|
|
19
55
|
|
|
20
56
|
3. If the needed plugin skill is not installed locally, install it explicitly:
|
|
@@ -27,16 +63,30 @@ bpmax-cli plugin skills ensure <plugin_name> --profile <profile> --agent codex -
|
|
|
27
63
|
|
|
28
64
|
## Safety Rules
|
|
29
65
|
|
|
66
|
+
- Do not confuse plugin installation, workspace activation, local Skill installation, and plugin configuration.
|
|
67
|
+
- Never infer activation from an installed plugin row or a local Skill directory. Use `plugin activation overview`.
|
|
68
|
+
- A workspace mutation cannot remove an organization default plugin. Do not generate a single-workspace disable attempt for `default_active: true`.
|
|
69
|
+
- Setting organization defaults affects all existing and future workspaces. Always show the dry-run scope before using `--confirm`.
|
|
70
|
+
- A successful PUT is not completion. Require typed overview readback and report `submitted_readback_mismatch` as an unresolved remote mutation, not as success.
|
|
71
|
+
- Removing a plugin from organization defaults does not prove it is disabled in every workspace; inspect the returned effective workspace activation.
|
|
30
72
|
- Do not assume plugin installation also installed local Agent skills.
|
|
31
73
|
- Do not manually copy plugin skill folders unless `bpmax-cli plugin skills ensure` fails and the user explicitly approves a fallback.
|
|
32
74
|
- Treat `config.plugin.*` capabilities like other BPMAX configuration capabilities: they require an authorized profile and organization-admin configuration access.
|
|
33
75
|
- If `ensure` reports a checksum, name, version, or lint failure, stop and report the failure instead of using the package.
|
|
76
|
+
- If discovery reports `update_available`, `update_failed`, `not_installed`, `state_missing`, `conflicted`, or `checksum_unavailable`, do not continue plugin-dependent configuration with stale or unverifiable lint rules.
|
|
77
|
+
- If a flow contains plugin-like node arrays such as `*_triggers[]` but neither the platform nor local state provides a `flow-template-node` lint declaration, strict lint must fail instead of silently accepting the configuration.
|
|
78
|
+
- Preserve existing plugin extension fields when editing a flow. Never delete a remote `plugin_*` block merely because the platform or local installation has no matching lint declaration.
|
|
79
|
+
- On an exported existing flow with a remote `flow_type`, an unknown plugin extension whose every occurrence explicitly sets `enabled: false` is retained and reported as a warning; plugin-specific lint is skipped because the extension cannot execute.
|
|
80
|
+
- A new flow cannot use this compatibility path. Even a disabled unknown extension remains a hard error until the plugin publishes or installs its lint declaration.
|
|
81
|
+
- An enabled unknown extension, an extension without an explicit `enabled: false`, or a mix of enabled and disabled occurrences remains a hard error. Install its declared plugin skill or stop for a platform/plugin declaration fix before submit.
|
|
34
82
|
|
|
35
83
|
## Useful Commands
|
|
36
84
|
|
|
37
85
|
```bash
|
|
38
86
|
bpmax-cli plugin skills list --profile <profile> --format json
|
|
87
|
+
bpmax-cli plugin skills check --profile <profile> --agent codex --format json
|
|
39
88
|
bpmax-cli plugin skills ensure <plugin_name> --profile <profile> --agent codex --format json
|
|
40
89
|
bpmax-cli plugin skills update <plugin_name> --profile <profile> --agent codex --format json
|
|
41
90
|
bpmax-cli plugin skills state --profile <profile> --agent codex --format json
|
|
91
|
+
bpmax-cli plugin activation overview --profile <profile> --format json
|
|
42
92
|
```
|
|
@@ -66,6 +66,7 @@ CLI 返回 `handoff: true` 时,回复用户前必须全部满足:
|
|
|
66
66
|
- `reason: "form_template_requires_page_handoff"` 说明表单包含页面专属能力,例如流水号、自动初始化或复杂控件;必须把 handoff 链接发给用户,不能回复“项目已创建”
|
|
67
67
|
- 如果链接只有 `flow_type`,或既没有 `prefill_token` 也没有 `init_value`,不得发给用户;重新运行默认 `project create` 或报告无法生成预填链接
|
|
68
68
|
- 如果 CLI 没有返回 URL,不要自己拼 URL
|
|
69
|
+
- `prefill_context` 只说明 CLI 生成了预填 payload,不等于真实浏览器控件已经带出;CLI 返回 `browser_prefill_verified: false` 或 `prefill_verification_required: true` 时,必须打开真实创建页核对可见控件值,再把 handoff 视为可用。
|
|
69
70
|
- 如果需要检查 handoff token 是否还能被平台读取,使用 `bpmax-cli project handoff status --prefill-token <token> --format json`。即使返回 `ok: true`,也只代表 token 可读;`browser_verified: false` 时必须打开真实浏览器页面验证表单预填和提交结果。若返回 `supported: false`,说明当前平台不支持 token 状态查询。
|
|
70
71
|
|
|
71
72
|
### 禁止/例外
|
|
@@ -78,17 +79,49 @@ CLI 返回 `handoff: true` 时,回复用户前必须全部满足:
|
|
|
78
79
|
- `--unsafe-direct-create` 只允许本地专家调试旧行为;OpenClaw/Agent/BBS 永远不要使用
|
|
79
80
|
- 表单校验失败时修正字段 key/type/选项值,不要绕过校验重试
|
|
80
81
|
|
|
82
|
+
## 环节关联项目表单预填 handoff
|
|
83
|
+
|
|
84
|
+
当用户要为当前待办环节中展示的“关联项目表单”准备预填值时,只使用 typed 命令生成 handoff:
|
|
85
|
+
|
|
86
|
+
```bash
|
|
87
|
+
bpmax-cli project handoff step-form \
|
|
88
|
+
--project-id <project_id> \
|
|
89
|
+
--step-id <step_id> \
|
|
90
|
+
--json '{"form":{"<field_key>":"<value>"}}' \
|
|
91
|
+
--format json
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
硬门禁:
|
|
95
|
+
|
|
96
|
+
- 该能力只适用于当前用户尚未处理、仍可编辑,且流程节点开启 `enable_relate_project_form` 的环节。
|
|
97
|
+
- 必须使用表单模板内真实 field key;CLI 会读取关联项目表单 schema 并拒绝不存在或不兼容的字段。
|
|
98
|
+
- 禁止手写 `/projectContinue` URL、`prefill_token`、`target` 或直接调用 `/project_staging/prefill`。
|
|
99
|
+
- 最终回复只逐字使用 CLI 输出的 `reply_markdown`;没有该字段时才使用完整 `url`,不得截断、重组或删除查询参数。
|
|
100
|
+
- CLI 返回 `browser_prefill_verified: false` 或 `prefill_verification_required: true` 时,必须打开真实环节页确认可见项目表单控件已经带值;token 可读不等于页面预填成功。
|
|
101
|
+
- 该命令只预填关联项目表单,不提交表单、不完成环节,也不得声称环节已处理。
|
|
102
|
+
- 检查 token 状态时必须显式使用 step capability:
|
|
103
|
+
|
|
104
|
+
```bash
|
|
105
|
+
bpmax-cli project handoff status \
|
|
106
|
+
--prefill-token <token> \
|
|
107
|
+
--step-form \
|
|
108
|
+
--format json
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
- 状态查询固定走 query 参数协议;不要把 token 放到 URL path 上。
|
|
112
|
+
|
|
81
113
|
## 查询与链接命令
|
|
82
114
|
|
|
83
115
|
```bash
|
|
84
116
|
bpmax-cli project list --format table
|
|
85
|
-
bpmax-cli project get
|
|
117
|
+
bpmax-cli project get 1001 --format json
|
|
86
118
|
bpmax-cli project my-step --format table
|
|
87
119
|
bpmax-cli project my-step --flow-type flow802926525 --format json
|
|
88
120
|
bpmax-cli project my-step --key-of-flow-node 'flow802926525::1776572829122' --format json
|
|
89
121
|
bpmax-cli project my-step --workspace store_mgr --flow-type flow802926525 --format json
|
|
90
122
|
bpmax-cli project approval-context 1001 --step-id 2002 --format json
|
|
91
123
|
bpmax-cli project handoff status --prefill-token <token> --format json
|
|
124
|
+
bpmax-cli project handoff status --prefill-token <token> --step-form --format json
|
|
92
125
|
bpmax-cli project search --body @project-search-query.json --page 1 --page-size 20 --format json
|
|
93
126
|
bpmax-cli es project-search --body @project-search-query.json --page 1 --page-size 20 --format json
|
|
94
127
|
bpmax-cli step get 2002 --format json
|
|
@@ -129,10 +162,13 @@ bpmax-cli step submit <step_id> --project-id <project_id> --action approve --lab
|
|
|
129
162
|
|
|
130
163
|
- 概览优先 `project list`
|
|
131
164
|
- 按候选人姓名、表单字段、流程内关键词定位项目时,优先 `project search`;该命令会走 `huanpingtong-server` 的 `/api/project/list` ES 模式,由 huanpingtong 侧 API Key 和权限上下文转发到 bpmax-server `/project/list`
|
|
165
|
+
- `/project/list` 有两种分页契约:普通项目列表从 POST body 读取 `page/page_size`,包含 `data_set_id`、`data_set_key`、`query`、`is_select_all`、`_source` 或 `aggs` 的 ES 查询从 query params 读取。始终使用 `--page` / `--page-size`,由 CLI 自动按请求模式放置分页;不要手工猜测位置。扫描必须记录每页项目 ID,发现连续页 ID 完全相同或 raw rows 大于 unique rows 很多时,立即判定分页可能失效,不得给出“未命中”结论。
|
|
166
|
+
- `page` 和 `page_size` 必须是大于等于 1 的安全整数;CLI 会在 HTTP 前同时归一化命令参数和 body 中的数字字符串,空串、0、负数、小数和非数字都应本地失败。
|
|
132
167
|
- `es project-search` 只是兼容别名;新场景必须写 `project search`
|
|
133
168
|
- 不要向 `project search` 或 `es project-search` 传包含顶层 `body` 的 raw ES DTO;`huanpingtong-server` 没有公开 `/api/project/raw-es-search`,CLI 会在发请求前阻断
|
|
134
169
|
- 预算汇总、趋势分析等统计只能先使用 `/api/project/list` ES 模式能表达的查询体;确实需要 raw ES 聚合时,必须先让服务端增加明确公开接口,不能复用 `/api/project/<unknown>`
|
|
135
170
|
- 单项目详情走 `project get`
|
|
171
|
+
- `project get` 首选位置参数 `project get <id>`;为兼容旧自动化也接受 `project get --project-id <id>`,两者同时出现时必须一致。
|
|
136
172
|
- 待办相关优先 `project my-step`
|
|
137
173
|
- 待办需要限定流程时,用 `project my-step --flow-type <flow_type>`,不要先全量拉取再本地筛选
|
|
138
174
|
- 待办需要限定到流程节点时,用 `project my-step --key-of-flow-node '<flow_type>:<flow_key>:<flow_step_id>'`;流程 key 为空时保留中间冒号,例如 `flow802926525::1776572829122`
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: "bpmax-project-detail-template-editor"
|
|
3
|
-
description: "
|
|
3
|
+
description: "用于通过 bpmax-cli typed config 创建、编辑、启用和删除 BPMAX 项目详情模板。只要用户提到“新建项目详情模板”“编辑项目详情模板”“启用项目详情模板”“删除项目详情模板”“提交项目详情模板配置”“让 Codex 构造 flow_page_template type=2 接口数据”或等价表达,就应使用这个 skill。它覆盖列表检索、创建、编辑、启用、删除,以及可视化模式和高级 JSON 模式,统一走线上事实优先 + 本地 temp-file + 双确认 + typed CLI submit + 接口回读。"
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# BPMAX Project Detail Template Editor
|
|
@@ -19,13 +19,13 @@ description: "用于在 BPMAX 的项目详情模板页面中创建、编辑、
|
|
|
19
19
|
- 不得以历史脏配置、顺手修复、统一风格、编辑器自动补字段、方便调试为理由修改需求外配置。
|
|
20
20
|
|
|
21
21
|
## 何时使用
|
|
22
|
-
-
|
|
22
|
+
- 用户需要通过 bpmax-cli typed config 管理 BPMAX 项目详情模板。
|
|
23
23
|
- 用户要新建、编辑、启用或删除 `flow_page_template.type = 2` 的项目详情模板。
|
|
24
24
|
- 用户要按自然语言需求调整项目详情页模块、区域和顺序。
|
|
25
|
-
-
|
|
25
|
+
- 用户需要使用当前 CLI profile、capability 和线上回读结果完成配置闭环。
|
|
26
26
|
|
|
27
27
|
## 前置条件
|
|
28
|
-
-
|
|
28
|
+
- 先通过 CLI profile/capability 和目标参数确认以下任一对象:
|
|
29
29
|
- `.../w:<workspace>/project_detail_template?flow_type=<flow_type>&flow_key=<flow_key>`
|
|
30
30
|
- `.../w:<workspace>/project_detail_template/create?flow_type=<flow_type>&flow_key=<flow_key>`
|
|
31
31
|
- `.../w:<workspace>/project_detail_template/<id>?flow_type=<flow_type>&flow_key=<flow_key>`
|
|
@@ -82,12 +82,8 @@ description: "用于在 BPMAX 的项目详情模板页面中创建、编辑、
|
|
|
82
82
|
- 编辑运行态默认详情模板前,必须先解析真实数字 ID:
|
|
83
83
|
- 优先运行 `bpmax-cli config project-detail-template resolve-default --flow-type <flow_type> --flow-key "<flow_key>" --profile <profile> --format json`。
|
|
84
84
|
- 若只拿到本地 sysconfig UUID,先运行 `bpmax-cli config resolve-id --domain project-detail-template --uuid <uuid> --repo <sysconfig_repo> --profile <profile> --format json`。本地镜像可能只有 UUID 没有数字 ID;只有 `resolved_id` 是平台数字 ID 时才允许 export/submit。
|
|
85
|
-
-
|
|
86
|
-
|
|
87
|
-
- 审批/审核/确认/验收类节点,详情模板应以“项目详情”为主,不默认暴露当前环节表单填写模块。
|
|
88
|
-
- 打回修改、发起人补充等 `enable_relate_project_form=true` 的节点,应使用“只填写项目表单”的模板,且节点不应再额外挂独立 `form_template`。
|
|
89
|
-
- 纯系统自动化动作不要配置成单独需要用户进入处理的详情页;如果节点带子流程联动,应优先做系统等待/汇总页或禁止人工处理入口。
|
|
90
|
-
- 详情模板修改后的验收不能只看模板接口回读;还要回读绑定它的流程节点,确认 `step_detail_id`、`form_template`、`enable_relate_project_form` 与节点动作一致。
|
|
85
|
+
- `node.step_detail_id` 不属于本 skill 管理的 type=2 项目详情模板;它只能引用 type=6 环节详情模板,必须切换到 `bpmax-flow-template-editor` 和 `config step-detail-template` 完成配置与 lint。不得把 project-detail-template 的数字 ID 写入 `node.step_detail_id`。
|
|
86
|
+
- 项目详情模板修改后的验收应确认流程默认详情页解析与运行态展示;环节处理页的 `step_detail_id`、`form_template`、`enable_relate_project_form` 适配由环节详情模板门禁单独负责。
|
|
91
87
|
- 详情模块脚本默认查询口径:
|
|
92
88
|
- 前端模块脚本默认优先 `raw-es-search`
|
|
93
89
|
- 后端 helper 默认优先 `ctx.$esQuery(...)` 或已验证的 `rootUser` helper
|
|
@@ -116,21 +112,10 @@ description: "用于在 BPMAX 的项目详情模板页面中创建、编辑、
|
|
|
116
112
|
- 如果当前在 `/project_detail_template/<id>`,按编辑流程处理。
|
|
117
113
|
- 进入真正修改前,先按模板和模块语义检索一次 Mem0。
|
|
118
114
|
|
|
119
|
-
### 2.
|
|
120
|
-
-
|
|
121
|
-
-
|
|
122
|
-
|
|
123
|
-
- 当前页面最近一次同域接口请求头
|
|
124
|
-
- 必要时补看 `localStorage` / `sessionStorage`
|
|
125
|
-
- 默认把 Cookie 组装成:
|
|
126
|
-
|
|
127
|
-
```bash
|
|
128
|
-
export BPMAX_BASE_URL='https://<your-bpmax-host>'
|
|
129
|
-
export BPMAX_COOKIE_HEADER='foo=bar; baz=qux'
|
|
130
|
-
export BPMAX_WORKSPACE='store_mgr'
|
|
131
|
-
```
|
|
132
|
-
|
|
133
|
-
- `BPMAX_BASE_URL` 必须来自当前浏览器页面 origin 或最近一次同域请求的 origin。
|
|
115
|
+
### 2. 获取 CLI 上下文
|
|
116
|
+
- 使用当前 `bpmax-cli` profile、capability 和线上 readback 作为授权与事实来源。
|
|
117
|
+
- 不读取或复用浏览器 Cookie、浏览器存储、手工请求头或旧脚本环境变量。
|
|
118
|
+
- URL 只作为目标 flow/workspace/template 的定位线索;真实写入必须回到 typed CLI。
|
|
134
119
|
|
|
135
120
|
### 3. 先确认真实线上数据格式
|
|
136
121
|
- 编辑模式优先读取:
|
|
@@ -159,7 +144,7 @@ bpmax-cli config project-detail-template resolve-default \
|
|
|
159
144
|
--format json
|
|
160
145
|
```
|
|
161
146
|
|
|
162
|
-
- `resolved_id` 为空时,不得继续用 `--id 0`
|
|
147
|
+
- `resolved_id` 为空时,不得继续用 `--id 0` 猜测编辑;必须通过 typed CLI resolve/export 或配置列表接口确认目标模板。
|
|
163
148
|
- `bpmax-cli config project-detail-template export --id 0` 只能用于查看全局默认结构,不能作为某个流程的默认详情模板修改目标。
|
|
164
149
|
|
|
165
150
|
### 3.1 优先检索现有模板
|
|
@@ -176,24 +161,13 @@ bpmax-cli config project-detail-template resolve-default \
|
|
|
176
161
|
- 编辑已有模板:
|
|
177
162
|
|
|
178
163
|
```bash
|
|
179
|
-
|
|
180
|
-
[[ -x "$PYTHON_BIN" ]] || PYTHON_BIN=./.venv/bin/python
|
|
181
|
-
[[ -x "$PYTHON_BIN" ]] || PYTHON_BIN=python
|
|
182
|
-
|
|
183
|
-
"$PYTHON_BIN" .codex/skills/bpmax-project-detail-template-editor/scripts/export_project_detail_template.py \
|
|
184
|
-
--template-id 954573597 \
|
|
185
|
-
--workspace store_mgr \
|
|
186
|
-
--cookie-header "$BPMAX_COOKIE_HEADER"
|
|
164
|
+
bpmax-cli config project-detail-template export --id <template-id> --out .codex/tmp/project-detail-template-editor --profile <profile> --format json
|
|
187
165
|
```
|
|
188
166
|
|
|
189
167
|
- 基于线上样例创建 skeleton:
|
|
190
168
|
|
|
191
169
|
```bash
|
|
192
|
-
|
|
193
|
-
--create-skeleton \
|
|
194
|
-
--sample-template-id 954573597 \
|
|
195
|
-
--workspace store_mgr \
|
|
196
|
-
--cookie-header "$BPMAX_COOKIE_HEADER"
|
|
170
|
+
bpmax-cli config project-detail-template export --id <sample-template-id> --out .codex/tmp/project-detail-template-editor --profile <profile> --format json
|
|
197
171
|
```
|
|
198
172
|
|
|
199
173
|
- `stem` 规则固定为:
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
interface:
|
|
2
2
|
display_name: "BPMAX Project Detail Template Editor"
|
|
3
|
-
short_description: "
|
|
4
|
-
default_prompt: "使用 $bpmax-project-detail-template-editor
|
|
3
|
+
short_description: "通过 bpmax-cli typed config 创建、编辑、启用或删除 BPMAX 项目详情模板"
|
|
4
|
+
default_prompt: "使用 $bpmax-project-detail-template-editor 通过 bpmax-cli typed config 创建、编辑、启用或删除 BPMAX 项目详情模板,并用回读验证确认结果。"
|