glidercli 0.4.6 → 0.4.10
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 +43 -15
- package/bin/glider.js +1589 -424
- package/docs/setup.json +13 -10
- package/lib/bcdp.js +8 -3
- package/lib/beval.js +2 -1
- package/lib/bexplore.js +9 -3
- package/lib/bextract.js +4 -2
- package/lib/bfavicon.js +2 -1
- package/lib/bfetch.js +9 -4
- package/lib/browser-config.js +94 -0
- package/lib/bserve.js +242 -127
- package/lib/bspawn.js +4 -2
- package/lib/bwindow.js +8 -3
- package/lib/glider-daemon.sh +334 -46
- package/lib/guard.js +7 -4
- package/lib/relay-config.js +24 -0
- package/package.json +10 -5
package/README.md
CHANGED
|
@@ -8,8 +8,8 @@
|
|
|
8
8
|
<h1 align="center">glider CLI</h1>
|
|
9
9
|
<p align="center"><i><b>Browser automation CLI with autonomous loop execution</b></i></p>
|
|
10
10
|
|
|
11
|
-
<a href="https://github.com/vdutts7/glidercli"><img src="./assets/badges/github.badge.svg" alt="GitHub" height="
|
|
12
|
-
<a href="https://www.npmjs.com/package/glidercli"><img src="./assets/badges/npm.badge.svg" alt="glidercli on npm" height="
|
|
11
|
+
<a href="https://github.com/vdutts7/glidercli"><img src="./assets/badges/github.badge.svg" alt="GitHub" height="40" /></a>
|
|
12
|
+
<a href="https://www.npmjs.com/package/glidercli"><img src="./assets/badges/npm.badge.svg" alt="glidercli on npm" height="40" /></a>
|
|
13
13
|
|
|
14
14
|
</div>
|
|
15
15
|
|
|
@@ -63,17 +63,17 @@ Extension + relay model uses Chromium + Glider extension from Chrome Web Store i
|
|
|
63
63
|
|
|
64
64
|
| | Browser | Config |
|
|
65
65
|
|---|--------|--------|
|
|
66
|
-
| <img src="https://raw.githubusercontent.com/vdutts7/squircle/main/webp/chrome.webp" width="
|
|
67
|
-
| <img src="https://raw.githubusercontent.com/vdutts7/squircle/main/webp/arc.webp" width="
|
|
68
|
-
| <img src="https://raw.githubusercontent.com/vdutts7/squircle/main/webp/microsoft/microsoft-edge.webp" width="
|
|
69
|
-
| <img src="https://raw.githubusercontent.com/vdutts7/squircle/main/webp/brave.webp" width="
|
|
70
|
-
| <img src="https://raw.githubusercontent.com/vdutts7/squircle/main/webp/vivaldi.webp" width="
|
|
66
|
+
| <img src="https://raw.githubusercontent.com/vdutts7/squircle/main/webp/chrome.webp" width="40" height="40" alt=""> | Google Chrome | default for `glider connect` |
|
|
67
|
+
| <img src="https://raw.githubusercontent.com/vdutts7/squircle/main/webp/arc.webp" width="40" height="40" alt=""> | Arc | [`config/browser.json.example`](config/browser.json.example) |
|
|
68
|
+
| <img src="https://raw.githubusercontent.com/vdutts7/squircle/main/webp/microsoft/microsoft-edge.webp" width="40" height="40" alt=""> | Microsoft Edge | registry key `edge` |
|
|
69
|
+
| <img src="https://raw.githubusercontent.com/vdutts7/squircle/main/webp/brave.webp" width="40" height="40" alt=""> | Brave | registry key `brave` |
|
|
70
|
+
| <img src="https://raw.githubusercontent.com/vdutts7/squircle/main/webp/vivaldi.webp" width="40" height="40" alt=""> | Vivaldi | registry key `vivaldi` |
|
|
71
71
|
|
|
72
72
|
Not supported today: Firefox/Safari/WebKit/Gecko, DuckDuckGo, browsers without Chrome Web Store extension path.
|
|
73
73
|
|
|
74
74
|
### Browser config
|
|
75
75
|
|
|
76
|
-
Priority:
|
|
76
|
+
Priority: `$GLIDER_HOME/config/browser.json` → `$GLIDER_HOME/browser.json` → default Google Chrome.
|
|
77
77
|
|
|
78
78
|
Registry key (recommended):
|
|
79
79
|
|
|
@@ -81,7 +81,7 @@ Registry key (recommended):
|
|
|
81
81
|
{ "use": "arc" }
|
|
82
82
|
```
|
|
83
83
|
|
|
84
|
-
Registry file:
|
|
84
|
+
Registry file: `$GLIDER_HOME/config/browsers-registry.json`
|
|
85
85
|
|
|
86
86
|
```bash
|
|
87
87
|
glider use arc
|
|
@@ -147,6 +147,16 @@ glider resolve https://news.ycombinator.com --json
|
|
|
147
147
|
| Env | Default | Role |
|
|
148
148
|
|-----|---------|------|
|
|
149
149
|
| `GLIDER_HOME` | `~/.glider` | config, cache, warch tree |
|
|
150
|
+
| `GLIDER_PORT` | `19988` | relay port for CLI + helpers; non-default values require matching extension configuration |
|
|
151
|
+
| `GLIDER_NODE_BIN` | auto-detected | Node.js 18+ executable for background relay supervisor |
|
|
152
|
+
| `GLIDER_RELOAD_TIMEOUT_MS` | `15000` | extension reload/reconnect deadline |
|
|
153
|
+
| `GLIDER_CDP_TIMEOUT_MS` | `30000` | per-request CDP/extension timeout |
|
|
154
|
+
| `GLIDER_RELAY_RECONNECT_GRACE_MS` | `10000` | keep cached targets while extension WS flaps |
|
|
155
|
+
| `GLIDER_RELAY_COMMAND_RECONNECT_WAIT_MS` | `3000` | wait for extension before failing a command |
|
|
156
|
+
| `GLIDER_RELAY_MAX_PENDING` | `256` | max in-flight extension requests |
|
|
157
|
+
| `GLIDER_TIMING` | unset | set `1` to always attach `timing` on `--json` output |
|
|
158
|
+
| `GLIDER_BROWSER_UI` | unset (off) | set `1` to allow AppleScript launch/tabs/activate (steals focus). Default refuses browser UI mutation. |
|
|
159
|
+
| `GLIDER_HEAL_NO_WAKE` | unset | set `1` to force-skip heal tab-wake even if `GLIDER_BROWSER_UI=1` |
|
|
150
160
|
| `AGREGISTRY` | unset | optional registry root → warch at `AGREGISTRY/warch/HOST/` |
|
|
151
161
|
|
|
152
162
|
Copy `config/domains.template.json` into `~/.glider/config/domains.json` to seed the host index.
|
|
@@ -157,7 +167,10 @@ Copy `config/domains.template.json` into `~/.glider/config/domains.json` to seed
|
|
|
157
167
|
|
|
158
168
|
| problem | fix | stability | why |
|
|
159
169
|
|---------|-----|-----------|-----|
|
|
160
|
-
| extension not connected | click Glider icon
|
|
170
|
+
| extension not connected | install/enable [`Glider` on Chrome Web Store](https://chromewebstore.google.com/detail/glider/njbidokkffhgpofcejgcfcgcinmeoalj) in selected browser profile; click Glider icon, then run `glider connect` | per browser launch | relay waits on extension WS |
|
|
171
|
+
| extension socket up but worker dead | click Glider icon or `glider reload-ext`; `glider heal` does **not** open tabs by default (`GLIDER_BROWSER_UI` off); set `GLIDER_BROWSER_UI=1` only if you want AppleScript wake | MV3 worker | status refuses healthy until pong |
|
|
172
|
+
| CLI steals browser focus / opens tabs | leave `GLIDER_BROWSER_UI` unset (default); never set it unless you explicitly want launch/tabs/activate | session-stable | AppleScript UI gated off by default |
|
|
173
|
+
| custom relay port has no extension | use `19988` with Chrome Web Store build | install-stable | published extension connects to `ws://localhost:19988/extension` |
|
|
161
174
|
| wrong tab targeted | `glider targets` → `glider use-session session-6` | session-stable | multi-tab needs explicit session |
|
|
162
175
|
| explore HAR empty bodies | replay in-tab with auth hook on XHR/fetch | site-specific | some SPAs never expose bearer in storage |
|
|
163
176
|
| `resolve` misses host | add `~/.glider/warch/HOST/glider.json` or set `AGREGISTRY` | file-stable | optional per-host capture hints |
|
|
@@ -168,9 +181,12 @@ Copy `config/domains.template.json` into `~/.glider/config/domains.json` to seed
|
|
|
168
181
|
|
|
169
182
|
| Command | Description |
|
|
170
183
|
|---------|-------------|
|
|
171
|
-
| `glider install` / `uninstall` |
|
|
184
|
+
| `glider install` / `uninstall` | background relay supervisor |
|
|
172
185
|
| `glider connect` | attach relay to browser |
|
|
173
|
-
| `glider status` | server
|
|
186
|
+
| `glider status` | server + extension + tabs; nonzero unless full stack is healthy |
|
|
187
|
+
| `glider doctor` | relay + SW + targets + one next action (`--json`) |
|
|
188
|
+
| `glider heal` | ensure relay, best-effort SW wake, optional `--clear-pin` |
|
|
189
|
+
| `glider test` | relay + extension + target + live CDP `1+1` diagnostic |
|
|
174
190
|
| `glider goto` / `eval` / `click` / `type` | page ops |
|
|
175
191
|
| `glider frozen` / `thaw` | detect / un-throttle a hidden (macrotask-frozen) tab in place |
|
|
176
192
|
| `glider screenshot` | PNG capture |
|
|
@@ -182,6 +198,20 @@ Full surface: `glider --help`
|
|
|
182
198
|
|
|
183
199
|
---
|
|
184
200
|
|
|
201
|
+
## Verification
|
|
202
|
+
|
|
203
|
+
```bash
|
|
204
|
+
npm test # unit, CLI regression, relay integration, tarball boundary
|
|
205
|
+
npm run test:live # isolated live-browser fixture against the connected extension
|
|
206
|
+
npm run test:syntax # package JavaScript syntax gate
|
|
207
|
+
```
|
|
208
|
+
|
|
209
|
+
Live smoke creates + closes its own browser window.
|
|
210
|
+
|
|
211
|
+
Incomplete event-stream features fail closed: `wait --network-idle`, console streaming, response fulfillment. No success-shaped fallback.
|
|
212
|
+
|
|
213
|
+
---
|
|
214
|
+
|
|
185
215
|
## Roadmap
|
|
186
216
|
|
|
187
217
|
| status | item |
|
|
@@ -195,6 +225,4 @@ Full surface: `glider --help`
|
|
|
195
225
|
|
|
196
226
|
## Contact
|
|
197
227
|
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
[](https://x.com/vdutts7)
|
|
228
|
+
<a href="https://vd7.io"><img src="https://res.cloudinary.com/ddyc1es5v/image/upload/v1773910810/readme-badges/readme-badge-vd7.png" alt="vd7.io" height="40" /></a> <a href="https://x.com/vdutts7"><img src="https://res.cloudinary.com/ddyc1es5v/image/upload/v1773910817/readme-badges/readme-badge-x.png" alt="/vdutts7" height="40" /></a>
|