arise-browser 0.2.1 → 0.2.2
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/package.json
CHANGED
|
@@ -13,40 +13,34 @@ metadata:
|
|
|
13
13
|
|
|
14
14
|
# AriseBrowser
|
|
15
15
|
|
|
16
|
-
Control a real Chrome browser via HTTP API.
|
|
16
|
+
Control a real Chrome browser via HTTP API. Persistent element refs, YAML accessibility snapshots, WebRTC live view.
|
|
17
17
|
|
|
18
|
-
##
|
|
18
|
+
## MANDATORY RULES
|
|
19
19
|
|
|
20
|
-
|
|
20
|
+
**You MUST follow these rules. No exceptions.**
|
|
21
21
|
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
22
|
+
1. **Do NOT call any API endpoint until `/health` returns `{"connected":true}`.** The server needs time to start the Docker container and Chrome. Poll `/health` in a loop.
|
|
23
|
+
2. **Every browser task follows: Navigate → Snapshot → Act → Snapshot → Act → Done.** Always snapshot before acting — you need refs from the snapshot to target elements.
|
|
24
|
+
3. **Refs are persistent.** Do NOT re-snapshot just to reuse a ref. Only snapshot when the page changes significantly.
|
|
25
25
|
|
|
26
|
-
|
|
27
|
-
node --version || echo "MISSING: Install Node.js 20+ — https://nodejs.org"
|
|
28
|
-
```
|
|
26
|
+
## Step 1: Start the Server
|
|
29
27
|
|
|
30
|
-
|
|
28
|
+
Requires Docker and Node.js. If arise-browser is not installed:
|
|
31
29
|
```bash
|
|
32
|
-
|
|
30
|
+
npm install -g arise-browser
|
|
33
31
|
```
|
|
34
32
|
|
|
35
|
-
|
|
36
|
-
|
|
33
|
+
Start:
|
|
37
34
|
```bash
|
|
38
|
-
npm install -g arise-browser
|
|
39
35
|
npx arise-browser --virtual-display --port 9867 --host 0.0.0.0 &
|
|
40
36
|
```
|
|
41
37
|
|
|
42
|
-
Wait for ready
|
|
38
|
+
**Wait for ready (MANDATORY):**
|
|
43
39
|
```bash
|
|
44
|
-
until curl -s http://localhost:9867/health
|
|
45
|
-
curl http://localhost:9867/health
|
|
46
|
-
# → {"status":"ok","connected":true}
|
|
40
|
+
until curl -s http://localhost:9867/health 2>/dev/null | grep -q '"connected":true'; do sleep 2; done
|
|
47
41
|
```
|
|
48
42
|
|
|
49
|
-
First run takes ~2 minutes (Docker pulls
|
|
43
|
+
First run takes ~2 minutes (Docker pulls Neko Chrome image ~700MB).
|
|
50
44
|
|
|
51
45
|
### Tell the user
|
|
52
46
|
|