bpmax-cli 0.1.12 → 0.1.13
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 +64 -0
- package/dist/bin.js +541 -259
- package/dist/bin.js.map +1 -1
- package/package.json +1 -1
- package/scripts/install-skills.mjs +183 -47
- package/skills/bpmax-auth/SKILL.md +29 -4
- package/skills/bpmax-shared/SKILL.md +19 -1
package/README.md
CHANGED
|
@@ -22,6 +22,30 @@ The update command checks the npm registry for `bpmax-cli`, runs `npm install -g
|
|
|
22
22
|
|
|
23
23
|
After installation, bpmax-cli prints an agent-oriented setup hint. The expected flow is: ask the user to directly input any BPMAX page URL in the target workspace, then run setup with that URL after the user replies.
|
|
24
24
|
|
|
25
|
+
For browserless agent environments such as OpenClaw, Aily, or Feishu-hosted assistants, prefer the device initialization flow:
|
|
26
|
+
|
|
27
|
+
```bash
|
|
28
|
+
bpmax-cli init \
|
|
29
|
+
--agent openclaw \
|
|
30
|
+
--channel feishu \
|
|
31
|
+
--url https://example.com/w:store_mgr \
|
|
32
|
+
--name retail \
|
|
33
|
+
--format json
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
The command saves the profile, syncs bundled skills for the selected agent adapter, and returns a `message_card` with:
|
|
37
|
+
|
|
38
|
+
- `authorization_url`
|
|
39
|
+
- `user_code`
|
|
40
|
+
- `expires_at`
|
|
41
|
+
- `next_action`
|
|
42
|
+
|
|
43
|
+
After the user confirms the code in BPMAX, complete authorization with:
|
|
44
|
+
|
|
45
|
+
```bash
|
|
46
|
+
bpmax-cli auth device complete --profile retail --session <device_code> --format json
|
|
47
|
+
```
|
|
48
|
+
|
|
25
49
|
For agent-driven use, ask the user for any BPMAX page URL in the target workspace, then run setup with that URL. The CLI extracts the environment origin and workspace from the URL and opens browser authorization without terminal prompts:
|
|
26
50
|
|
|
27
51
|
```bash
|
|
@@ -41,6 +65,32 @@ Interactive setup is still available when running the CLI directly:
|
|
|
41
65
|
bpmax-cli setup
|
|
42
66
|
```
|
|
43
67
|
|
|
68
|
+
## Browserless device authorization
|
|
69
|
+
|
|
70
|
+
Start a device authorization session without opening a local browser:
|
|
71
|
+
|
|
72
|
+
```bash
|
|
73
|
+
bpmax-cli auth device start \
|
|
74
|
+
--profile retail \
|
|
75
|
+
--agent openclaw \
|
|
76
|
+
--channel feishu \
|
|
77
|
+
--format json
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
The result includes a short `user_code`, `authorization_url`, `session` (same as `device_code`), and a channel-neutral `message_card`. This is the recommended path for OpenClaw-style agents embedded in Feishu or other chat surfaces.
|
|
81
|
+
|
|
82
|
+
Complete after the user confirms the code:
|
|
83
|
+
|
|
84
|
+
```bash
|
|
85
|
+
bpmax-cli auth device complete --profile retail --session <session> --format json
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
Local terminal users can still use the existing browser callback flow:
|
|
89
|
+
|
|
90
|
+
```bash
|
|
91
|
+
bpmax-cli auth login --profile retail
|
|
92
|
+
```
|
|
93
|
+
|
|
44
94
|
## BPMAX web URLs
|
|
45
95
|
|
|
46
96
|
Generate common in-system URLs from the active profile origin and workspace:
|
|
@@ -156,3 +206,17 @@ aily-skillhub install --file-path <skill-directory>
|
|
|
156
206
|
```
|
|
157
207
|
|
|
158
208
|
for each bundled `skills/bpmax-*` directory.
|
|
209
|
+
|
|
210
|
+
For OpenClaw, pass an explicit agent:
|
|
211
|
+
|
|
212
|
+
```bash
|
|
213
|
+
node scripts/install-skills.mjs --json --agent openclaw
|
|
214
|
+
```
|
|
215
|
+
|
|
216
|
+
The installer first tries:
|
|
217
|
+
|
|
218
|
+
```bash
|
|
219
|
+
openclaw skills install --file-path <skill-directory>
|
|
220
|
+
```
|
|
221
|
+
|
|
222
|
+
If the OpenClaw CLI is unavailable or installation fails, it falls back to copying skills into `~/.openclaw/skills` when OpenClaw is explicitly requested or `~/.openclaw` already exists.
|