@beeos-ai/cli 1.0.24 → 1.1.1
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 +116 -34
- package/dist/index.js +884 -118
- package/package.json +1 -1
- package/scripts/install.Tests.ps1 +64 -1
- package/scripts/install.ps1 +173 -12
- package/scripts/install.sh +240 -2
package/README.md
CHANGED
|
@@ -14,14 +14,32 @@ npm install -g @beeos-ai/cli
|
|
|
14
14
|
|
|
15
15
|
Pure JavaScript — runs on any platform with Node.js 18+. No native compilation needed.
|
|
16
16
|
|
|
17
|
+
## What's new in 1.1.0
|
|
18
|
+
|
|
19
|
+
- **Multi-OS desktop streaming** for the OpenClaw agent: macOS Screen
|
|
20
|
+
Sharing, Linux TigerVNC and Windows TightVNC are now first-class
|
|
21
|
+
cold-start targets. `beeos init` configures the host's VNC password,
|
|
22
|
+
generates `~/.beeos/vnc.password`, and stages a `vnc-bridge` sidecar
|
|
23
|
+
in one shot.
|
|
24
|
+
- `beeos device attach --self` (experimental) — tags the persisted
|
|
25
|
+
`DeviceEntry.backend` with the host's native backend (`macos` /
|
|
26
|
+
`linux` / `windows`) instead of the historical `adb`. Forward-
|
|
27
|
+
compatible with the upcoming Phase-4 self-attach lifecycle.
|
|
28
|
+
- `BEEOS_NO_DESKTOP=1` opt-out — single chokepoint at the desktop
|
|
29
|
+
pipeline. When set, no probe, no cold-start, no UAC / osascript
|
|
30
|
+
prompt, no TightVNC / TigerVNC / Screen Sharing detection. Useful
|
|
31
|
+
for CI runners and headless servers.
|
|
32
|
+
- Linux fleet auto-enable prompt is now offered on Linux too (was
|
|
33
|
+
darwin-only).
|
|
34
|
+
|
|
17
35
|
## Commands
|
|
18
36
|
|
|
19
37
|
### Device agent (Android)
|
|
20
38
|
|
|
21
39
|
```bash
|
|
22
40
|
# Attach a USB-connected Android device as an AI agent (launches
|
|
23
|
-
# device-agent + scrcpy-bridge in parallel —
|
|
24
|
-
# video / control)
|
|
41
|
+
# device-agent + device-mcp-server + scrcpy-bridge in parallel —
|
|
42
|
+
# the latter powers WebRTC video / control)
|
|
25
43
|
beeos device attach
|
|
26
44
|
|
|
27
45
|
# Attach a specific device
|
|
@@ -30,47 +48,58 @@ beeos device attach --serial SERIAL_NUMBER
|
|
|
30
48
|
# Attach all connected devices
|
|
31
49
|
beeos device attach --all
|
|
32
50
|
|
|
33
|
-
# Skip the scrcpy-bridge sidecar; run only device-agent
|
|
34
|
-
# iterating on
|
|
51
|
+
# Skip the scrcpy-bridge sidecar; run only device-agent + MCP server
|
|
52
|
+
# (useful for iterating on tools / ACP without the video stream)
|
|
35
53
|
beeos device attach --no-video
|
|
36
54
|
|
|
37
|
-
#
|
|
55
|
+
# Attach the host machine itself (experimental, multi-OS) — tags the
|
|
56
|
+
# persisted backend as macos / linux / windows depending on the host
|
|
57
|
+
beeos device attach --self
|
|
58
|
+
|
|
59
|
+
# List attached devices
|
|
38
60
|
beeos device list --local
|
|
39
61
|
|
|
40
|
-
# Detach a device (stops
|
|
62
|
+
# Detach a device (stops every sibling process spawned for that device)
|
|
41
63
|
beeos device detach --serial SERIAL_NUMBER
|
|
42
64
|
|
|
43
65
|
# Send a command to a device
|
|
44
66
|
beeos device exec "open Chrome"
|
|
45
67
|
|
|
46
|
-
# Upgrade device-agent to latest version
|
|
68
|
+
# Upgrade device-agent + device-mcp-server to latest version
|
|
47
69
|
beeos device upgrade
|
|
48
70
|
```
|
|
49
71
|
|
|
50
72
|
#### What `attach` does
|
|
51
73
|
|
|
52
|
-
Under the hood `beeos device attach` orchestrates
|
|
53
|
-
for each device:
|
|
54
|
-
|
|
55
|
-
1. **device-agent** (
|
|
56
|
-
|
|
57
|
-
and writes identity to
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
74
|
+
Under the hood `beeos device attach` orchestrates **three sibling
|
|
75
|
+
processes** for each Android device:
|
|
76
|
+
|
|
77
|
+
1. **device-agent** (TypeScript, Node 20 — `@beeos-ai/device-agent`)
|
|
78
|
+
— Plan-Act-Reflect agent loop, ACP chat, and orchestration. Binds
|
|
79
|
+
the phone to your BeeOS account and writes identity to
|
|
80
|
+
`~/.beeos/identity/device-<serial>.key.json`.
|
|
81
|
+
2. **device-mcp-server** (TypeScript, Node 20 —
|
|
82
|
+
`@beeos-ai/device-mcp-server`) — Fastify HTTP MCP server backing
|
|
83
|
+
`screenshot` / `tap` / `swipe` / `install_apk` / `execute_command`
|
|
84
|
+
and ~14 more tools. The agent talks to it on a private loopback
|
|
85
|
+
port allocated per device (default range starts at `127.0.0.1:7900`).
|
|
86
|
+
3. **scrcpy-bridge** (Rust, WebRTC) — mirrors screen + audio and
|
|
87
|
+
forwards touch / key input. Shares the **same** `.key.json`
|
|
88
|
+
identity file the agent uses, and authenticates to EMQX via Agent
|
|
89
|
+
Gateway's `/api/v1/device/bootstrap` endpoint — no static MQTT
|
|
90
|
+
tokens.
|
|
91
|
+
|
|
92
|
+
The three processes are independent — one crashing does not take down
|
|
93
|
+
the others. All three are tracked in `~/.beeos/devices.json`; `detach`
|
|
94
|
+
and `list` operate on the trio atomically. If `device-agent` /
|
|
95
|
+
`device-mcp-server` aren't yet installed, the CLI runs
|
|
96
|
+
`npm i -g @beeos-ai/device-agent @beeos-ai/device-mcp-server` on first
|
|
97
|
+
use. If the scrcpy-bridge binary is missing, it is downloaded on first
|
|
98
|
+
attach from GitHub Releases into `~/.beeos/bin/`. Override paths via
|
|
99
|
+
`BEEOS_DEVICE_AGENT_BIN`, `BEEOS_SCRCPY_BRIDGE_BIN`, etc.
|
|
71
100
|
|
|
72
101
|
When running against a local dev control plane (e.g. `api_url =
|
|
73
|
-
http://localhost:9080`), the CLI automatically points
|
|
102
|
+
http://localhost:9080`), the CLI automatically points the bridge at
|
|
74
103
|
`http://localhost:8083` unless `platform.agent_gateway_url` is
|
|
75
104
|
explicitly set to something non-default. Set
|
|
76
105
|
`BEEOS_AGENT_GATEWAY_URL` to override for one-off experiments without
|
|
@@ -92,15 +121,47 @@ beeos status
|
|
|
92
121
|
beeos update openclaw
|
|
93
122
|
```
|
|
94
123
|
|
|
124
|
+
#### Multi-OS desktop streaming
|
|
125
|
+
|
|
126
|
+
Starting in 1.1.0, `beeos init` (and `beeos start openclaw`) drives a
|
|
127
|
+
host-aware desktop cold-start so the BeeOS dashboard's desktop view
|
|
128
|
+
works on all three major operating systems:
|
|
129
|
+
|
|
130
|
+
| OS | What gets configured | Auth dialog |
|
|
131
|
+
| ------- | --------------------------------------------------------------------------------------------------- | ---------------------- |
|
|
132
|
+
| macOS | `com.apple.screensharing` enabled; `ARD_AllLocalUsers=NO`; VNC password written to plist + `~/.beeos/vnc.password` | osascript admin prompt |
|
|
133
|
+
| Linux | `~/.vnc/passwd` generated via `tigervncpasswd -f`; `vncserver :1 -localhost yes` started; mirrored to `~/.beeos/vnc.password` | none (no sudo) |
|
|
134
|
+
| Windows | TightVNC registry password (REG_BINARY DES) + `LoopbackOnly=1`; `tvnserver` restarted; mirrored to `~/.beeos/vnc.password` | UAC consent dialog |
|
|
135
|
+
|
|
136
|
+
The flow is **idempotent**: re-running `beeos init` on an
|
|
137
|
+
already-configured host is a no-op. If the cold-start can't run (no
|
|
138
|
+
TigerVNC on Linux, no TightVNC on Windows, user declined the prompt,
|
|
139
|
+
…) the bind still succeeds and OpenClaw works headlessly — only the
|
|
140
|
+
dashboard's desktop view is unavailable.
|
|
141
|
+
|
|
142
|
+
To opt out entirely, set `BEEOS_NO_DESKTOP=1` before running
|
|
143
|
+
`beeos init`. The desktop pipeline returns null at its single
|
|
144
|
+
chokepoint (`getDesktopPipeline()`), so no probe, no prompt, no
|
|
145
|
+
cold-start fires. Useful for CI runners and pure headless servers.
|
|
146
|
+
|
|
95
147
|
## Requirements
|
|
96
148
|
|
|
97
149
|
- **Node.js 18+**
|
|
98
|
-
- **Android devices**: `adb` (Android Debug Bridge)
|
|
99
|
-
|
|
150
|
+
- **Android devices**: `adb` (Android Debug Bridge) on PATH (the CLI
|
|
151
|
+
can install Google's official platform-tools on first use)
|
|
152
|
+
- **device-agent + device-mcp-server**: TypeScript / Node 20+. The
|
|
153
|
+
CLI lazy-installs `@beeos-ai/device-agent` and
|
|
154
|
+
`@beeos-ai/device-mcp-server` on first `device attach` (~20 MB
|
|
155
|
+
one-time download). No Python required.
|
|
100
156
|
- **scrcpy-bridge** (video streaming): auto-downloaded from GitHub
|
|
101
157
|
Releases on first `device attach`. Supported targets: darwin
|
|
102
|
-
arm64/x64, linux arm64/x64, windows x64. On unsupported
|
|
103
|
-
attach still succeeds — only video is skipped.
|
|
158
|
+
arm64/x64, linux arm64/x64, windows x64/arm64. On unsupported
|
|
159
|
+
platforms attach still succeeds — only video is skipped.
|
|
160
|
+
- **Desktop streaming** (optional, OpenClaw): a VNC server on the
|
|
161
|
+
host. macOS ships Screen Sharing built-in; Linux needs `apt install
|
|
162
|
+
tigervnc-standalone-server` (or `dnf install tigervnc-server` /
|
|
163
|
+
`pacman -S tigervnc`); Windows needs `winget install
|
|
164
|
+
GlavSoft.TightVNC`.
|
|
104
165
|
|
|
105
166
|
## Configuration
|
|
106
167
|
|
|
@@ -118,9 +179,24 @@ http_enabled = true
|
|
|
118
179
|
http_port = 9090
|
|
119
180
|
```
|
|
120
181
|
|
|
121
|
-
`agent_gateway_url` is consumed by the scrcpy-bridge
|
|
122
|
-
bootstrap (Ed25519-signed `/api/v1/device/bootstrap`
|
|
123
|
-
alongside `api_url` when pointing at a non-default
|
|
182
|
+
`agent_gateway_url` is consumed by the scrcpy-bridge / vnc-bridge
|
|
183
|
+
sidecars for bootstrap (Ed25519-signed `/api/v1/device/bootstrap`
|
|
184
|
+
calls). Set it alongside `api_url` when pointing at a non-default
|
|
185
|
+
control plane.
|
|
186
|
+
|
|
187
|
+
### Environment variable overrides
|
|
188
|
+
|
|
189
|
+
| Var | Effect |
|
|
190
|
+
| ---------------------------------- | --------------------------------------------------------------------------------------- |
|
|
191
|
+
| `BEEOS_NO_DESKTOP=1` | Skip every desktop-streaming codepath. Honoured at `getDesktopPipeline()` and forwarded by `install.sh` / `install.ps1`. |
|
|
192
|
+
| `BEEOS_VNC_PASSWORD` | Per-shell override for the VNC viewer password. Tried before `~/.beeos/vnc.password`. |
|
|
193
|
+
| `BEEOS_AGENT_GATEWAY_URL` | Override the Agent Gateway URL without editing `config.toml`. |
|
|
194
|
+
| `BEEOS_DEVICE_AGENT_BIN` | Absolute path to a pre-installed `device-agent` binary / JS entry. |
|
|
195
|
+
| `BEEOS_SCRCPY_BRIDGE_BIN` | Absolute path to a pre-built `scrcpy-bridge` binary. |
|
|
196
|
+
| `BEEOS_VNC_BRIDGE_BIN` | Absolute path to a pre-built `vnc-bridge` binary. |
|
|
197
|
+
| `BEEOS_*_RELEASE_URL` | Mirror URL for the matching cargo-dist sidecar (corporate proxies / staging). |
|
|
198
|
+
| `BEEOS_NO_FLEET_AUTOSTART=1` | Suppress the interactive `device-agent fleet enable` prompt on macOS / Linux. |
|
|
199
|
+
| `BEEOS_INSTALL_DRY_RUN=1` | Used by `install.sh` / `install.ps1` smoke tests; exits before any state mutation. |
|
|
124
200
|
|
|
125
201
|
## Troubleshooting
|
|
126
202
|
|
|
@@ -148,3 +224,9 @@ debugging locally:
|
|
|
148
224
|
In production, we rely on the TURN relay path; the mDNS issue is
|
|
149
225
|
only a concern when running Chrome + scrcpy-bridge on the same host
|
|
150
226
|
behind restrictive local firewalls.
|
|
227
|
+
|
|
228
|
+
### Desktop view stuck / black for OpenClaw
|
|
229
|
+
|
|
230
|
+
Run `beeos doctor` — it surfaces per-OS hints (TCC permission on
|
|
231
|
+
macOS, `~/.vnc/xstartup` on Linux, `Get-Service tvnserver` on
|
|
232
|
+
Windows) when the local `vnc-bridge-openclaw` service is unhealthy.
|