bpmax-cli 0.1.38 → 0.1.40
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 -14
- package/dist/bin.js +170 -75
- package/dist/bin.js.map +1 -1
- package/package.json +1 -1
- package/skills/bpmax-project/SKILL.md +9 -6
- package/skills/bpmax-schema/SKILL.md +2 -1
package/README.md
CHANGED
|
@@ -169,30 +169,42 @@ bpmax-cli project create --profile yuanrong --flow-id 123 --format json
|
|
|
169
169
|
|
|
170
170
|
`project create` uses the interactive guide by default. During the guide, choose "打开 BPMAX 表单页继续填写" to hand off to the web form. The CLI prints a PC URL and mobile path with the fields already entered encoded in `init_value`.
|
|
171
171
|
|
|
172
|
-
Use `--no-interactive` only for explicit direct-submit automation. If the target form template contains auto-init lambda scripts, the CLI still refuses direct submit and prints a web form handoff URL with `reason: "
|
|
172
|
+
Use `--no-interactive` only for explicit direct-submit automation. If the target form template contains page-only behavior such as auto-init lambda scripts, serial number controls, complex selectors, uploads, rich text, or sub forms, the CLI still refuses direct submit and prints a web form handoff URL with `reason: "form_template_requires_page_handoff"`.
|
|
173
|
+
Direct `project create --body` is blocked by default because it bypasses flow form-template checks and can create an empty project shell. Use `project create --json` with a flow id/type so the CLI can detect page-only controls such as serial numbers, complex selectors, uploads, rich text, and sub forms. Only local experts should use `--unsafe-direct-create --body` for intentional legacy raw creation.
|
|
173
174
|
|
|
174
|
-
## ES
|
|
175
|
+
## ES project queries
|
|
175
176
|
|
|
176
|
-
Use
|
|
177
|
+
Use ES project search for high-volume reads and reporting-style queries that can be expressed with the huanpingtong project-list request body. The CLI calls `POST /api/project/list`, so BPMAX still applies project list permissions, workspace filters, and dataset hooks:
|
|
177
178
|
|
|
178
179
|
```bash
|
|
179
|
-
bpmax-cli es project-search --profile yuanrong --body @query.json --format json
|
|
180
|
+
bpmax-cli es project-search --profile yuanrong --body @project-list-query.json --page 1 --page-size 20 --format json
|
|
180
181
|
```
|
|
181
182
|
|
|
182
|
-
|
|
183
|
+
```json
|
|
184
|
+
{
|
|
185
|
+
"data_set_key": "budget_project",
|
|
186
|
+
"flow_type": "flow123",
|
|
187
|
+
"flow_key": "",
|
|
188
|
+
"query": {
|
|
189
|
+
"name": { "type": "match_phrase", "value": "董永喜" }
|
|
190
|
+
},
|
|
191
|
+
"is_select_all": false
|
|
192
|
+
}
|
|
193
|
+
```
|
|
194
|
+
|
|
195
|
+
Raw Elasticsearch DTOs are intentionally not supported through `bpmax-cli es project-search`. `huanpingtong-server` does not expose `/api/project/raw-es-search` as a public endpoint, and legacy `/api/project/<id>` routing can fall through to project creation. If the payload contains a top-level `body` field, the CLI fails before sending any request.
|
|
196
|
+
|
|
197
|
+
Use a project-list body instead:
|
|
183
198
|
|
|
184
199
|
```json
|
|
185
200
|
{
|
|
186
201
|
"data_set_key": "budget_project",
|
|
187
202
|
"flow_type": "flow123",
|
|
188
203
|
"flow_key": "",
|
|
189
|
-
"
|
|
190
|
-
"
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
"by_status": { "terms": { "field": "status" } }
|
|
194
|
-
}
|
|
195
|
-
}
|
|
204
|
+
"query": {
|
|
205
|
+
"name": { "type": "match_phrase", "value": "董永喜" }
|
|
206
|
+
},
|
|
207
|
+
"is_select_all": false
|
|
196
208
|
}
|
|
197
209
|
```
|
|
198
210
|
|
|
@@ -230,11 +242,12 @@ Example `recipe.json`:
|
|
|
230
242
|
"description": "发起门店人员管理流程",
|
|
231
243
|
"workspace": "store_mgr",
|
|
232
244
|
"variables": [
|
|
245
|
+
{ "name": "flow_id", "required": true },
|
|
233
246
|
{ "name": "name", "required": true },
|
|
234
247
|
{ "name": "phone", "required": true }
|
|
235
248
|
],
|
|
236
249
|
"command": {
|
|
237
|
-
"argv": ["project", "create", "--
|
|
250
|
+
"argv": ["project", "create", "--flow-id", "{{flow_id}}", "--name", "{{name}}", "--json", "@payload.json", "--format", "json"],
|
|
238
251
|
"mutating": true
|
|
239
252
|
}
|
|
240
253
|
}
|
|
@@ -245,6 +258,7 @@ Run a recipe with explicit variables. Mutating recipes require `--yes`:
|
|
|
245
258
|
```bash
|
|
246
259
|
bpmax-cli recipe run create-store-staff \
|
|
247
260
|
--yes \
|
|
261
|
+
--var flow_id=123 \
|
|
248
262
|
--var name=杨小小 \
|
|
249
263
|
--vars '{"phone":"18211223344","store_group_id":"817","store_name":"TMS测试门店"}'
|
|
250
264
|
```
|
|
@@ -291,7 +305,7 @@ bpmax-cli --config-dir <config_dir> bbs ensure <skill-key> --agent <agent> --pro
|
|
|
291
305
|
|
|
292
306
|
Use `bbs sync` when there is no local/catalog match, then check again before falling back to generic flow/project/API commands. `bbs sync` installs only the catalog skill; individual business skills are installed lazily with `bbs ensure`.
|
|
293
307
|
|
|
294
|
-
For mutating raw API calls, `bpmax-cli api` requires `--confirm-mutating` and supports `--data @file.json`. Prefer typed commands such as `step submit` for workflow state changes.
|
|
308
|
+
For mutating raw API calls, `bpmax-cli api` requires `--confirm-mutating` and supports `--data @file.json`. Raw API calls to `POST /project` or `POST /project/<anything>` are blocked even with `--confirm-mutating`; the only project POST allowed in raw mode is the read-style `/project/list`. Create projects through `bpmax-cli project create --flow-id <id> --json <json>` so the CLI can run form-template checks and choose safe direct submit or handoff. Prefer typed commands such as `step submit` for workflow state changes.
|
|
295
309
|
|
|
296
310
|
If `aily-skillhub` is available in `PATH`, the installer also runs:
|
|
297
311
|
|