@monoes/monomindcli 1.10.31 → 1.10.33
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/.claude/commands/browse.md +6 -17
- package/.claude/helpers/handlers/budget-status-handler.cjs +14 -0
- package/.claude/helpers/handlers/compact-handler.cjs +33 -0
- package/.claude/helpers/handlers/loops-status-handler.cjs +45 -0
- package/.claude/helpers/handlers/session-restore-handler.cjs +21 -15
- package/.claude/helpers/handlers/stats-handler.cjs +14 -0
- package/.claude/helpers/hook-handler.cjs +10 -70
- package/.claude/helpers/statusline.cjs +16 -5
- package/.claude/skills/agent-browser-testing/SKILL.md +149 -151
- package/.claude/skills/monomind/browse-agentcore.md +20 -21
- package/.claude/skills/monomind/browse-electron.md +45 -46
- package/.claude/skills/monomind/browse-qa.md +29 -30
- package/.claude/skills/monomind/browse-references/authentication.md +39 -40
- package/.claude/skills/monomind/browse-references/trust-boundaries.md +1 -2
- package/.claude/skills/monomind/browse-references/video-recording.md +23 -24
- package/.claude/skills/monomind/browse-slack.md +52 -53
- package/.claude/skills/monomind/browse-vercel.md +26 -27
- package/.claude/skills/monomind/browse.md +273 -273
- package/dist/src/ui/.monomind/sessions/current.json +1 -1
- package/dist/src/ui/dashboard-v2.html +770 -15
- package/dist/src/ui/server.mjs +34 -0
- package/package.json +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: monomind:browse
|
|
3
|
-
description: State-of-the-art browser automation skill for UI testing, web scraping, and agent-driven navigation using
|
|
3
|
+
description: State-of-the-art browser automation skill for UI testing, web scraping, and agent-driven navigation using monomind browse (built-in TypeScript CDP client). Token-optimized with ref-based element selection, batch execution, KV-cache prompt ordering, on-demand screenshots, and full monomind memory integration.
|
|
4
4
|
version: 2.0.0
|
|
5
5
|
triggers:
|
|
6
6
|
- /browse
|
|
@@ -22,12 +22,12 @@ triggers:
|
|
|
22
22
|
tools:
|
|
23
23
|
- Bash
|
|
24
24
|
requires:
|
|
25
|
-
-
|
|
25
|
+
- monomind >= 1.0.0
|
|
26
26
|
---
|
|
27
27
|
|
|
28
28
|
# monomind:browse
|
|
29
29
|
|
|
30
|
-
State-of-the-art browser automation using
|
|
30
|
+
State-of-the-art browser automation using monomind browse. Optimized for minimal token consumption, maximum test coverage, and deep monomind integration.
|
|
31
31
|
|
|
32
32
|
---
|
|
33
33
|
|
|
@@ -35,14 +35,14 @@ State-of-the-art browser automation using agent-browser. Optimized for minimal t
|
|
|
35
35
|
|
|
36
36
|
```bash
|
|
37
37
|
# Install
|
|
38
|
-
|
|
38
|
+
# monomind browse is built-in — no install needed
|
|
39
39
|
|
|
40
40
|
# Download Chrome (first time only)
|
|
41
|
-
|
|
41
|
+
# no install needed
|
|
42
42
|
|
|
43
43
|
# Verify
|
|
44
|
-
|
|
45
|
-
|
|
44
|
+
npx monomind browse --version # should be >= 0.25.4
|
|
45
|
+
npx monomind browse doctor # check all systems
|
|
46
46
|
```
|
|
47
47
|
|
|
48
48
|
---
|
|
@@ -51,13 +51,13 @@ agent-browser doctor # check all systems
|
|
|
51
51
|
|
|
52
52
|
These rules are non-negotiable. Violating them wastes tokens and degrades performance.
|
|
53
53
|
|
|
54
|
-
1. **Batch multi-step flows** — Use `
|
|
55
|
-
2. **Snapshot with `-i` flag** — Interactive-only snapshots are 93% smaller than full trees. Never call `
|
|
54
|
+
1. **Batch multi-step flows** — Use `monomind browse batch` to execute sequences in a single process invocation. Eliminates per-command startup overhead.
|
|
55
|
+
2. **Snapshot with `-i` flag** — Interactive-only snapshots are 93% smaller than full trees. Never call `monomind browse snapshot` without `-i` unless you need to understand full page structure.
|
|
56
56
|
3. **Reuse refs** — After a snapshot, refs (`@e1`, `@e2`) are stable for the current page. Do NOT re-snapshot unless the page changed. One snapshot per page-state.
|
|
57
|
-
4. **On-demand screenshots only** — Screenshots add ~800ms and ~1500 tokens as images. Only call `
|
|
58
|
-
5. **Use batch for read-only chains** — `
|
|
59
|
-
6. **Scope snapshots** — When testing a form or component, use `
|
|
60
|
-
7. **Prefer `wait --text` over polling** — Never sleep and re-snapshot. Use `
|
|
57
|
+
4. **On-demand screenshots only** — Screenshots add ~800ms and ~1500 tokens as images. Only call `monomind browse screenshot` when: element not in a11y tree, visual verification is required, or the task explicitly needs visual proof.
|
|
58
|
+
5. **Use batch for read-only chains** — `npx monomind browse open url` then `snapshot -i` is two process starts. `monomind browse batch "open url" "snapshot -i"` is one.
|
|
59
|
+
6. **Scope snapshots** — When testing a form or component, use `monomind browse snapshot -i "#form-id"` to scope to that subtree only.
|
|
60
|
+
7. **Prefer `wait --text` over polling** — Never sleep and re-snapshot. Use `monomind browse wait --text "Expected"` or `wait --url "**pattern"`.
|
|
61
61
|
|
|
62
62
|
---
|
|
63
63
|
|
|
@@ -71,22 +71,22 @@ OPEN → SNAPSHOT -i → ACT (by ref) → SNAPSHOT -i (if page changed) → VERI
|
|
|
71
71
|
|
|
72
72
|
```bash
|
|
73
73
|
# Batch: open + snapshot in one call
|
|
74
|
-
|
|
74
|
+
npx monomind browse batch "open https://app.example.com/login" "snapshot -i"
|
|
75
75
|
# → snapshot output: textbox "Email" [ref=e1], textbox "Password" [ref=e2], button "Sign In" [ref=e3]
|
|
76
76
|
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
77
|
+
npx monomind browse fill @e1 "user@test.com"
|
|
78
|
+
npx monomind browse fill @e2 "SecurePass123!"
|
|
79
|
+
npx monomind browse click @e3
|
|
80
|
+
npx monomind browse wait --url "**/dashboard" --timeout 8000
|
|
81
81
|
|
|
82
82
|
# Re-snapshot only because URL changed (new page state)
|
|
83
|
-
|
|
83
|
+
npx monomind browse snapshot -i
|
|
84
84
|
```
|
|
85
85
|
|
|
86
86
|
### Full batch mode (most token-efficient)
|
|
87
87
|
|
|
88
88
|
```bash
|
|
89
|
-
|
|
89
|
+
npx monomind browse batch \
|
|
90
90
|
"open https://app.example.com/login" \
|
|
91
91
|
"snapshot -i" \
|
|
92
92
|
"fill @e1 user@test.com" \
|
|
@@ -107,7 +107,7 @@ echo '[
|
|
|
107
107
|
["click", "@e3"],
|
|
108
108
|
["wait", "--url", "**/dashboard"],
|
|
109
109
|
["snapshot", "-i"]
|
|
110
|
-
]' |
|
|
110
|
+
]' | monomind browse batch --json --bail
|
|
111
111
|
```
|
|
112
112
|
|
|
113
113
|
---
|
|
@@ -117,27 +117,27 @@ echo '[
|
|
|
117
117
|
### Navigation
|
|
118
118
|
|
|
119
119
|
```bash
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
120
|
+
npx monomind browse open <url> # Launch + navigate (aliases: goto, navigate)
|
|
121
|
+
npx monomind browse open # Launch on about:blank (for pre-nav setup)
|
|
122
|
+
npx monomind browse back # Go back
|
|
123
|
+
npx monomind browse forward # Go forward
|
|
124
|
+
npx monomind browse reload # Reload
|
|
125
|
+
npx monomind browse pushstate <url> # SPA client-side nav (Next.js, Remix, etc.)
|
|
126
|
+
npx monomind browse close # Close browser
|
|
127
|
+
npx monomind browse close --all # Close all sessions
|
|
128
128
|
```
|
|
129
129
|
|
|
130
130
|
### Snapshot (primary observation tool)
|
|
131
131
|
|
|
132
132
|
```bash
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
133
|
+
npx monomind browse snapshot # Full accessibility tree + refs
|
|
134
|
+
npx monomind browse snapshot -i # Interactive elements only (USE THIS BY DEFAULT)
|
|
135
|
+
npx monomind browse snapshot -i --urls # Include href URLs for links
|
|
136
|
+
npx monomind browse snapshot -c # Compact (strip empty structural nodes)
|
|
137
|
+
npx monomind browse snapshot -d 3 # Limit depth to 3 levels
|
|
138
|
+
npx monomind browse snapshot -s "#main" # Scope to CSS selector
|
|
139
|
+
npx monomind browse snapshot -i -c -d 5 # Combined: compact interactive, max depth 5
|
|
140
|
+
npx monomind browse snapshot --json # JSON output for programmatic use
|
|
141
141
|
```
|
|
142
142
|
|
|
143
143
|
**Output example:**
|
|
@@ -152,138 +152,138 @@ agent-browser snapshot --json # JSON output for programmatic use
|
|
|
152
152
|
|
|
153
153
|
```bash
|
|
154
154
|
# Primary: use @ref from snapshot (fastest, no DOM re-query)
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
155
|
+
npx monomind browse click @e3
|
|
156
|
+
npx monomind browse fill @e1 "value"
|
|
157
|
+
npx monomind browse dblclick @e5
|
|
158
|
+
npx monomind browse hover @e6
|
|
159
|
+
npx monomind browse check @e7 # checkbox
|
|
160
|
+
npx monomind browse uncheck @e8
|
|
161
|
+
npx monomind browse select @e9 "Option A"
|
|
162
|
+
npx monomind browse focus @e2
|
|
163
163
|
|
|
164
164
|
# Keyboard
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
165
|
+
npx monomind browse press Enter
|
|
166
|
+
npx monomind browse press Tab
|
|
167
|
+
npx monomind browse press "Control+a"
|
|
168
|
+
npx monomind browse keyboard type "hello world" # real keystrokes
|
|
169
|
+
npx monomind browse keyboard inserttext "hello" # insert without key events
|
|
170
|
+
npx monomind browse keydown Shift
|
|
171
|
+
npx monomind browse keyup Shift
|
|
172
172
|
|
|
173
173
|
# Drag & drop
|
|
174
|
-
|
|
175
|
-
|
|
174
|
+
npx monomind browse drag @e1 @e2
|
|
175
|
+
npx monomind browse upload @e3 /path/to/file.pdf
|
|
176
176
|
|
|
177
177
|
# Scroll
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
178
|
+
npx monomind browse scroll down 500 # scroll 500px down
|
|
179
|
+
npx monomind browse scroll up
|
|
180
|
+
npx monomind browse scrollintoview @e10
|
|
181
|
+
npx monomind browse scroll down --selector "#feed"
|
|
182
182
|
```
|
|
183
183
|
|
|
184
184
|
### Semantic locators (fallback when no ref available)
|
|
185
185
|
|
|
186
186
|
```bash
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
187
|
+
npx monomind browse find role button click --name "Submit"
|
|
188
|
+
npx monomind browse find text "Sign In" click
|
|
189
|
+
npx monomind browse find label "Email" fill "test@test.com"
|
|
190
|
+
npx monomind browse find placeholder "Search..." fill "query"
|
|
191
|
+
npx monomind browse find testid "submit-btn" click
|
|
192
|
+
npx monomind browse find first ".item" click
|
|
193
|
+
npx monomind browse find nth 2 "a" text
|
|
194
194
|
```
|
|
195
195
|
|
|
196
196
|
### Wait (never sleep/poll manually)
|
|
197
197
|
|
|
198
198
|
```bash
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
199
|
+
npx monomind browse wait 500 # ms delay (use sparingly)
|
|
200
|
+
npx monomind browse wait "#spinner" --state hidden # wait for element to hide
|
|
201
|
+
npx monomind browse wait --text "Success" # wait for text to appear
|
|
202
|
+
npx monomind browse wait --url "**/dashboard" # wait for URL pattern
|
|
203
|
+
npx monomind browse wait --load networkidle # wait for network idle
|
|
204
|
+
npx monomind browse wait --fn "window.ready === true" # wait for JS condition
|
|
205
|
+
npx monomind browse wait --fn "!document.body.innerText.includes('Loading')"
|
|
206
206
|
```
|
|
207
207
|
|
|
208
208
|
### Read state
|
|
209
209
|
|
|
210
210
|
```bash
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
211
|
+
npx monomind browse get text @e1 # text content
|
|
212
|
+
npx monomind browse get html @e2 # innerHTML
|
|
213
|
+
npx monomind browse get value @e3 # input value
|
|
214
|
+
npx monomind browse get attr @e4 "href" # attribute
|
|
215
|
+
npx monomind browse get title # page title
|
|
216
|
+
npx monomind browse get url # current URL
|
|
217
|
+
npx monomind browse get count ".item" # count matching elements
|
|
218
|
+
npx monomind browse get box @e1 # bounding box
|
|
219
|
+
npx monomind browse get styles @e1 # computed CSS styles
|
|
220
220
|
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
221
|
+
npx monomind browse is visible @e1 # boolean check
|
|
222
|
+
npx monomind browse is enabled @e1
|
|
223
|
+
npx monomind browse is checked @e1
|
|
224
224
|
```
|
|
225
225
|
|
|
226
226
|
### Screenshots (use sparingly)
|
|
227
227
|
|
|
228
228
|
```bash
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
229
|
+
npx monomind browse screenshot # auto-path in /tmp
|
|
230
|
+
npx monomind browse screenshot page.png # specific path
|
|
231
|
+
npx monomind browse screenshot --full full-page.png # full-page scroll capture
|
|
232
|
+
npx monomind browse screenshot --annotate # numbered refs overlaid → use with visual models
|
|
233
|
+
npx monomind browse pdf report.pdf # save as PDF
|
|
234
234
|
```
|
|
235
235
|
|
|
236
236
|
**Annotated screenshot pattern** (for visual debugging or multimodal LLMs):
|
|
237
237
|
```bash
|
|
238
|
-
|
|
238
|
+
npx monomind browse screenshot --annotate
|
|
239
239
|
# Output: [1] @e1 button "Submit" [2] @e2 link "Home" [3] @e3 textbox "Email"
|
|
240
240
|
# Now refs are cached — interact immediately without re-snapshot
|
|
241
|
-
|
|
241
|
+
npx monomind browse click @e1
|
|
242
242
|
```
|
|
243
243
|
|
|
244
244
|
### Diff (regression testing)
|
|
245
245
|
|
|
246
246
|
```bash
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
247
|
+
npx monomind browse diff snapshot # current vs last snapshot
|
|
248
|
+
npx monomind browse diff snapshot --baseline ./before.txt # vs saved file
|
|
249
|
+
npx monomind browse diff snapshot -s "#main" --compact # scoped diff
|
|
250
|
+
npx monomind browse diff screenshot --baseline before.png # pixel diff
|
|
251
|
+
npx monomind browse diff screenshot --baseline b.png -t 0.2 # threshold 0–1
|
|
252
|
+
npx monomind browse diff url https://v1.com https://v2.com # compare two URLs
|
|
253
|
+
npx monomind browse diff url https://v1.com https://v2.com --screenshot # + visual
|
|
254
254
|
```
|
|
255
255
|
|
|
256
256
|
### Tabs & multi-tab
|
|
257
257
|
|
|
258
258
|
```bash
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
259
|
+
npx monomind browse tab # list all tabs
|
|
260
|
+
npx monomind browse tab new https://example.com # new tab
|
|
261
|
+
npx monomind browse tab new --label docs https://docs.example.com # named tab
|
|
262
|
+
npx monomind browse tab docs # switch by label
|
|
263
|
+
npx monomind browse tab t2 # switch by stable id
|
|
264
|
+
npx monomind browse tab close docs # close by label
|
|
265
|
+
npx monomind browse window new # new window
|
|
266
|
+
npx monomind browse frame "#iframe-id" # switch to iframe
|
|
267
|
+
npx monomind browse frame main # back to main frame
|
|
268
268
|
```
|
|
269
269
|
|
|
270
270
|
**Multi-tab parallel test pattern:**
|
|
271
271
|
```bash
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
272
|
+
npx monomind browse tab new --label app https://app.example.com
|
|
273
|
+
npx monomind browse tab new --label docs https://docs.example.com
|
|
274
|
+
npx monomind browse tab app
|
|
275
|
+
npx monomind browse snapshot -i # refs for app tab
|
|
276
|
+
npx monomind browse click @e3
|
|
277
|
+
npx monomind browse tab docs
|
|
278
|
+
npx monomind browse snapshot -i # refs for docs tab
|
|
279
279
|
```
|
|
280
280
|
|
|
281
281
|
### Dialogs
|
|
282
282
|
|
|
283
283
|
```bash
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
284
|
+
npx monomind browse dialog accept "confirmation text"
|
|
285
|
+
npx monomind browse dialog dismiss
|
|
286
|
+
npx monomind browse dialog status # is a dialog currently open?
|
|
287
287
|
```
|
|
288
288
|
|
|
289
289
|
Note: `alert` and `beforeunload` are auto-accepted by default. `confirm` and `prompt` need explicit handling.
|
|
@@ -291,23 +291,23 @@ Note: `alert` and `beforeunload` are auto-accepted by default. `confirm` and `pr
|
|
|
291
291
|
### Network interception
|
|
292
292
|
|
|
293
293
|
```bash
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
294
|
+
npx monomind browse network route "https://api.example.com/*" --abort # block endpoint
|
|
295
|
+
npx monomind browse network route "*" --abort --resource-type script # block all JS
|
|
296
|
+
npx monomind browse network route "https://api/*" --body '{"data":[]}' # mock response
|
|
297
|
+
npx monomind browse network unroute "https://api.example.com/*"
|
|
298
|
+
npx monomind browse network requests # view tracked requests
|
|
299
|
+
npx monomind browse network requests --filter api # filter by URL substring
|
|
300
|
+
npx monomind browse network requests --type xhr,fetch # filter by type
|
|
301
|
+
npx monomind browse network requests --method POST
|
|
302
|
+
npx monomind browse network requests --status 2xx
|
|
303
|
+
npx monomind browse network request <requestId> # full request/response
|
|
304
|
+
npx monomind browse network har start # record HAR
|
|
305
|
+
npx monomind browse network har stop output.har # stop + save
|
|
306
306
|
```
|
|
307
307
|
|
|
308
308
|
**Pre-nav setup pattern** (set network routes BEFORE navigating):
|
|
309
309
|
```bash
|
|
310
|
-
|
|
310
|
+
npx monomind browse batch \
|
|
311
311
|
'["open"]' \
|
|
312
312
|
'["network", "route", "*", "--abort", "--resource-type", "script"]' \
|
|
313
313
|
'["cookies", "set", "--curl", "auth.curl", "--domain", "localhost"]' \
|
|
@@ -317,46 +317,46 @@ agent-browser batch \
|
|
|
317
317
|
### Cookies & storage
|
|
318
318
|
|
|
319
319
|
```bash
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
320
|
+
npx monomind browse cookies # get all cookies
|
|
321
|
+
npx monomind browse cookies set name value # set cookie
|
|
322
|
+
npx monomind browse cookies set --curl cookies.curl # import from cURL dump / JSON / header string
|
|
323
|
+
npx monomind browse cookies clear
|
|
324
324
|
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
325
|
+
npx monomind browse storage local # get localStorage
|
|
326
|
+
npx monomind browse storage local myKey # get specific key
|
|
327
|
+
npx monomind browse storage local set myKey myValue # set
|
|
328
|
+
npx monomind browse storage local clear
|
|
329
|
+
npx monomind browse storage session # sessionStorage (same API)
|
|
330
330
|
```
|
|
331
331
|
|
|
332
332
|
### Browser settings
|
|
333
333
|
|
|
334
334
|
```bash
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
335
|
+
npx monomind browse set viewport 1280 720 2 # width height deviceScaleFactor
|
|
336
|
+
npx monomind browse set device "iPhone 15 Pro" # device emulation
|
|
337
|
+
npx monomind browse set geo 37.7749 -122.4194 # geolocation
|
|
338
|
+
npx monomind browse set offline on # offline mode
|
|
339
|
+
npx monomind browse set headers '{"Authorization":"Bearer tok"}' # global headers
|
|
340
|
+
npx monomind browse set credentials user pass # HTTP basic auth
|
|
341
|
+
npx monomind browse set media dark # color scheme
|
|
342
342
|
```
|
|
343
343
|
|
|
344
344
|
### Clipboard
|
|
345
345
|
|
|
346
346
|
```bash
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
347
|
+
npx monomind browse clipboard read
|
|
348
|
+
npx monomind browse clipboard write "Hello"
|
|
349
|
+
npx monomind browse clipboard copy # Ctrl+C
|
|
350
|
+
npx monomind browse clipboard paste # Ctrl+V
|
|
351
351
|
```
|
|
352
352
|
|
|
353
353
|
### Mouse (raw control, use only when refs/semantic locators fail)
|
|
354
354
|
|
|
355
355
|
```bash
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
356
|
+
npx monomind browse mouse move 100 200
|
|
357
|
+
npx monomind browse mouse down left
|
|
358
|
+
npx monomind browse mouse up left
|
|
359
|
+
npx monomind browse mouse wheel 100 0 # dy dx
|
|
360
360
|
```
|
|
361
361
|
|
|
362
362
|
### React DevTools (v0.27+)
|
|
@@ -365,86 +365,86 @@ Requires launching with `--enable react-devtools`:
|
|
|
365
365
|
|
|
366
366
|
```bash
|
|
367
367
|
# Launch with hook installed
|
|
368
|
-
|
|
368
|
+
npx monomind browse open --enable react-devtools https://your-react-app.com
|
|
369
369
|
|
|
370
370
|
# Inspect component tree
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
371
|
+
npx monomind browse react tree # full component hierarchy
|
|
372
|
+
npx monomind browse react inspect 5 # fiber ID → props, hooks, state, source
|
|
373
|
+
npx monomind browse react renders start # begin render profiling
|
|
374
|
+
npx monomind browse react renders stop # print profile (mount/re-render counts)
|
|
375
|
+
npx monomind browse react renders stop --json # JSON output
|
|
376
|
+
npx monomind browse react suspense # Suspense boundaries + root-cause classifier
|
|
377
|
+
npx monomind browse react suspense --only-dynamic # hide static boundaries
|
|
378
378
|
```
|
|
379
379
|
|
|
380
380
|
### Web Vitals (framework-agnostic)
|
|
381
381
|
|
|
382
382
|
```bash
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
383
|
+
npx monomind browse vitals # LCP, CLS, TTFB, FCP, INP + React hydration
|
|
384
|
+
npx monomind browse vitals https://example.com # test specific URL
|
|
385
|
+
npx monomind browse vitals --json # JSON output
|
|
386
386
|
```
|
|
387
387
|
|
|
388
388
|
### Tracing & profiling
|
|
389
389
|
|
|
390
390
|
```bash
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
391
|
+
npx monomind browse trace start trace.zip # start Chrome trace
|
|
392
|
+
npx monomind browse trace stop trace.zip # stop and save
|
|
393
|
+
npx monomind browse profiler start # DevTools profiler
|
|
394
|
+
npx monomind browse profiler stop profile.json # stop and save
|
|
395
395
|
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
396
|
+
npx monomind browse console # browser console messages
|
|
397
|
+
npx monomind browse console --json # structured CDP output
|
|
398
|
+
npx monomind browse console --clear
|
|
399
|
+
npx monomind browse errors # uncaught JS exceptions
|
|
400
|
+
npx monomind browse errors --clear
|
|
401
401
|
```
|
|
402
402
|
|
|
403
403
|
### Sessions & auth
|
|
404
404
|
|
|
405
405
|
```bash
|
|
406
406
|
# Isolated sessions (each has own browser, cookies, history)
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
407
|
+
npx monomind browse --session agent1 open site-a.com
|
|
408
|
+
npx monomind browse --session agent2 open site-b.com
|
|
409
|
+
npx monomind browse session list
|
|
410
410
|
|
|
411
411
|
# Persist state across restarts
|
|
412
|
-
|
|
413
|
-
# → auto-saves to ~/.
|
|
412
|
+
npx monomind browse --session-name myapp open app.example.com
|
|
413
|
+
# → auto-saves to ~/.monomind/browser-sessions/myapp
|
|
414
414
|
|
|
415
415
|
# Reuse existing Chrome login
|
|
416
|
-
|
|
417
|
-
|
|
416
|
+
npx monomind browse profiles # list Chrome profiles
|
|
417
|
+
npx monomind browse --profile Default open gmail.com
|
|
418
418
|
|
|
419
419
|
# Save / load state
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
420
|
+
npx monomind browse state save ./auth.json # save cookies + localStorage
|
|
421
|
+
npx monomind browse state load ./auth.json
|
|
422
|
+
npx monomind browse --state ./auth.json open https://app.example.com/dashboard
|
|
423
423
|
|
|
424
424
|
# Auth vault (credentials never sent to LLM)
|
|
425
|
-
echo "mypassword" |
|
|
426
|
-
|
|
425
|
+
echo "mypassword" | monomind browse auth save github --url https://github.com/login --username me --password-stdin
|
|
426
|
+
npx monomind browse auth login github
|
|
427
427
|
|
|
428
428
|
# Encrypted state at rest
|
|
429
429
|
export AGENT_BROWSER_ENCRYPTION_KEY=<64-char-hex>
|
|
430
|
-
|
|
430
|
+
npx monomind browse --session-name secure open example.com
|
|
431
431
|
```
|
|
432
432
|
|
|
433
433
|
### Dashboard (observability)
|
|
434
434
|
|
|
435
435
|
```bash
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
436
|
+
npx monomind browse dashboard start # port 4848
|
|
437
|
+
npx monomind browse dashboard start --port 8080
|
|
438
|
+
npx monomind browse dashboard stop
|
|
439
439
|
# → open http://localhost:4848 for live viewport + activity feed + AI chat
|
|
440
440
|
```
|
|
441
441
|
|
|
442
442
|
### Init scripts
|
|
443
443
|
|
|
444
444
|
```bash
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
445
|
+
npx monomind browse open --init-script ./setup.js https://app.example.com
|
|
446
|
+
npx monomind browse addinitscript "window.__TEST__ = true"
|
|
447
|
+
npx monomind browse removeinitscript <identifier>
|
|
448
448
|
```
|
|
449
449
|
|
|
450
450
|
### iOS / Mobile (real Safari)
|
|
@@ -452,14 +452,14 @@ agent-browser removeinitscript <identifier>
|
|
|
452
452
|
Requires: `npm install -g appium && appium driver install xcuitest`
|
|
453
453
|
|
|
454
454
|
```bash
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
455
|
+
npx monomind browse device list
|
|
456
|
+
npx monomind browse -p ios --device "iPhone 15 Pro" open https://example.com
|
|
457
|
+
npx monomind browse -p ios snapshot -i
|
|
458
|
+
npx monomind browse -p ios tap @e1
|
|
459
|
+
npx monomind browse -p ios fill @e2 "text"
|
|
460
|
+
npx monomind browse -p ios swipe up
|
|
461
|
+
npx monomind browse -p ios screenshot mobile.png
|
|
462
|
+
npx monomind browse -p ios close
|
|
463
463
|
```
|
|
464
464
|
|
|
465
465
|
### Cloud providers
|
|
@@ -477,18 +477,18 @@ All commands work identically regardless of provider.
|
|
|
477
477
|
### Streaming
|
|
478
478
|
|
|
479
479
|
```bash
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
480
|
+
npx monomind browse stream status # see WebSocket port
|
|
481
|
+
npx monomind browse stream enable --port 9223
|
|
482
|
+
npx monomind browse stream disable
|
|
483
483
|
```
|
|
484
484
|
|
|
485
485
|
### CDP / Electron apps
|
|
486
486
|
|
|
487
487
|
```bash
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
488
|
+
npx monomind browse connect 9222 # connect to port, persist for session
|
|
489
|
+
npx monomind browse --cdp 9222 snapshot # per-command
|
|
490
|
+
npx monomind browse --cdp wss://remote/cdp snapshot
|
|
491
|
+
npx monomind browse --auto-connect snapshot # auto-discover running Chrome
|
|
492
492
|
```
|
|
493
493
|
|
|
494
494
|
---
|
|
@@ -498,130 +498,130 @@ agent-browser --auto-connect snapshot # auto-discover running Chrome
|
|
|
498
498
|
### Login / Auth
|
|
499
499
|
|
|
500
500
|
```bash
|
|
501
|
-
|
|
501
|
+
npx monomind browse batch \
|
|
502
502
|
"open https://app.example.com/login" \
|
|
503
503
|
"snapshot -i"
|
|
504
504
|
# identify refs from output, then:
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
505
|
+
npx monomind browse fill @e[email] "user@test.com"
|
|
506
|
+
npx monomind browse fill @e[password] "TestPass123!"
|
|
507
|
+
npx monomind browse click @e[submit]
|
|
508
|
+
npx monomind browse wait --url "**/dashboard" --timeout 8000
|
|
509
509
|
```
|
|
510
510
|
|
|
511
511
|
### Form with validation
|
|
512
512
|
|
|
513
513
|
```bash
|
|
514
514
|
# Test happy path
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
515
|
+
npx monomind browse batch "open /form" "snapshot -i"
|
|
516
|
+
npx monomind browse fill @e1 "John Doe"
|
|
517
|
+
npx monomind browse fill @e2 "john@test.com"
|
|
518
|
+
npx monomind browse select @e3 "Option A"
|
|
519
|
+
npx monomind browse check @e4
|
|
520
|
+
npx monomind browse click @e5
|
|
521
|
+
npx monomind browse wait --text "submitted"
|
|
522
|
+
npx monomind browse screenshot pass-form.png
|
|
523
523
|
|
|
524
524
|
# Test validation (empty submit)
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
525
|
+
npx monomind browse reload
|
|
526
|
+
npx monomind browse snapshot -i
|
|
527
|
+
npx monomind browse click @e5 # submit empty
|
|
528
|
+
npx monomind browse wait --text "required"
|
|
529
|
+
npx monomind browse snapshot -i # verify error messages
|
|
530
530
|
|
|
531
531
|
# Invalid email
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
532
|
+
npx monomind browse fill @e2 "not-an-email"
|
|
533
|
+
npx monomind browse click @e5
|
|
534
|
+
npx monomind browse snapshot -i
|
|
535
535
|
```
|
|
536
536
|
|
|
537
537
|
### CRUD
|
|
538
538
|
|
|
539
539
|
```bash
|
|
540
540
|
# Create
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
541
|
+
npx monomind browse click @e[add]
|
|
542
|
+
npx monomind browse fill @e[name] "New Item"
|
|
543
|
+
npx monomind browse click @e[save]
|
|
544
|
+
npx monomind browse wait --text "New Item"
|
|
545
545
|
|
|
546
546
|
# Update
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
547
|
+
npx monomind browse click @e[edit]
|
|
548
|
+
npx monomind browse fill @e[name] "Updated Item"
|
|
549
|
+
npx monomind browse click @e[save]
|
|
550
|
+
npx monomind browse wait --text "Updated Item"
|
|
551
551
|
|
|
552
552
|
# Delete
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
553
|
+
npx monomind browse click @e[delete]
|
|
554
|
+
npx monomind browse wait --text "Are you sure"
|
|
555
|
+
npx monomind browse click @e[confirm]
|
|
556
|
+
npx monomind browse wait --fn "!document.body.innerText.includes('Updated Item')"
|
|
557
557
|
```
|
|
558
558
|
|
|
559
559
|
### Multi-step wizard
|
|
560
560
|
|
|
561
561
|
```bash
|
|
562
562
|
# Step 1
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
563
|
+
npx monomind browse batch "open /wizard" "snapshot -i"
|
|
564
|
+
npx monomind browse fill @e1 "value"
|
|
565
|
+
npx monomind browse click @e[next]
|
|
566
|
+
npx monomind browse wait --text "Step 2"
|
|
567
567
|
|
|
568
568
|
# Step 2
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
569
|
+
npx monomind browse snapshot -i
|
|
570
|
+
npx monomind browse select @e2 "choice"
|
|
571
|
+
npx monomind browse click @e[next]
|
|
572
572
|
|
|
573
573
|
# Step 3 — verify summary
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
574
|
+
npx monomind browse snapshot -i
|
|
575
|
+
npx monomind browse get text @e[summary]
|
|
576
|
+
npx monomind browse click @e[confirm]
|
|
577
|
+
npx monomind browse wait --text "Complete"
|
|
578
578
|
```
|
|
579
579
|
|
|
580
580
|
### Regression test (diff baseline)
|
|
581
581
|
|
|
582
582
|
```bash
|
|
583
583
|
# Save baseline
|
|
584
|
-
|
|
585
|
-
|
|
584
|
+
npx monomind browse open https://app.example.com
|
|
585
|
+
npx monomind browse snapshot -i > baseline.txt
|
|
586
586
|
|
|
587
587
|
# After a deploy, compare:
|
|
588
|
-
|
|
589
|
-
|
|
588
|
+
npx monomind browse open https://app.example.com
|
|
589
|
+
npx monomind browse diff snapshot --baseline ./baseline.txt
|
|
590
590
|
```
|
|
591
591
|
|
|
592
592
|
### API mocking
|
|
593
593
|
|
|
594
594
|
```bash
|
|
595
595
|
# Mock API response, test UI reaction
|
|
596
|
-
|
|
596
|
+
npx monomind browse batch \
|
|
597
597
|
'["open"]' \
|
|
598
598
|
'["network", "route", "https://api.example.com/users", "--body", "{\"data\":[]}"]' \
|
|
599
599
|
'["navigate", "https://app.example.com/users"]'
|
|
600
|
-
|
|
600
|
+
npx monomind browse snapshot -i
|
|
601
601
|
# → verify "No users found" empty state renders correctly
|
|
602
602
|
```
|
|
603
603
|
|
|
604
604
|
### React app deep inspection
|
|
605
605
|
|
|
606
606
|
```bash
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
607
|
+
npx monomind browse open --enable react-devtools https://your-react-app.com
|
|
608
|
+
npx monomind browse react tree
|
|
609
|
+
npx monomind browse vitals --json
|
|
610
|
+
npx monomind browse react renders start
|
|
611
611
|
# ... trigger user interactions ...
|
|
612
|
-
|
|
613
|
-
|
|
612
|
+
npx monomind browse react renders stop
|
|
613
|
+
npx monomind browse react suspense --only-dynamic
|
|
614
614
|
```
|
|
615
615
|
|
|
616
616
|
---
|
|
617
617
|
|
|
618
|
-
## Configuration
|
|
618
|
+
## Configuration
|
|
619
619
|
|
|
620
620
|
Create in project root for persistent defaults:
|
|
621
621
|
|
|
622
622
|
```json
|
|
623
623
|
{
|
|
624
|
-
"$schema": "https://
|
|
624
|
+
"$schema": "https://monomind.dev/schema.json",
|
|
625
625
|
"maxOutput": 50000,
|
|
626
626
|
"contentBoundaries": true,
|
|
627
627
|
"idleTimeout": "5m",
|
|
@@ -651,7 +651,7 @@ AGENT_BROWSER_IDLE_TIMEOUT_MS=300000 # daemon auto-shutdown after idle
|
|
|
651
651
|
AGENT_BROWSER_CONTENT_BOUNDARIES=1 # LLM-safe output delimiters
|
|
652
652
|
AGENT_BROWSER_HEADED=1 # visible browser (debugging)
|
|
653
653
|
AGENT_BROWSER_STREAM_PORT=9223 # fixed WebSocket stream port
|
|
654
|
-
|
|
654
|
+
# No API key needed — monomind browse is built-in
|
|
655
655
|
AI_GATEWAY_MODEL=anthropic/claude-sonnet-4-6
|
|
656
656
|
```
|
|
657
657
|
|
|
@@ -686,10 +686,10 @@ npx monomind task create \
|
|
|
686
686
|
|
|
687
687
|
```bash
|
|
688
688
|
# Once logged in:
|
|
689
|
-
|
|
689
|
+
npx monomind browse state save .monomind/auth/<app>.json
|
|
690
690
|
|
|
691
691
|
# Future sessions:
|
|
692
|
-
|
|
692
|
+
npx monomind browse --state .monomind/auth/<app>.json open https://app.example.com
|
|
693
693
|
```
|
|
694
694
|
|
|
695
695
|
---
|
|
@@ -698,8 +698,8 @@ agent-browser --state .monomind/auth/<app>.json open https://app.example.com
|
|
|
698
698
|
|
|
699
699
|
| Anti-pattern | Why | Fix |
|
|
700
700
|
|---|---|---|
|
|
701
|
-
| `
|
|
702
|
-
| Playwright MCP | 13,700-token schema tax before step 1 | Use
|
|
701
|
+
| `monomind browse snapshot` (no `-i`) for every step | Full tree = 10–20x tokens | Use `snapshot -i` always |
|
|
702
|
+
| Playwright MCP | 13,700-token schema tax before step 1 | Use monomind browse directly |
|
|
703
703
|
| Screenshot every step | +800ms +1500 tokens each | Screenshot only on fail/visual-required |
|
|
704
704
|
| Re-snapshot without page change | Wastes tokens | Reuse refs from last snapshot |
|
|
705
705
|
| `sleep N` between actions | Slow, fragile | Use `wait --text`, `wait --url`, `wait --fn` |
|
|
@@ -711,8 +711,8 @@ agent-browser --state .monomind/auth/<app>.json open https://app.example.com
|
|
|
711
711
|
## Checklist
|
|
712
712
|
|
|
713
713
|
When this skill is activated:
|
|
714
|
-
- [ ] `
|
|
715
|
-
- [ ] `
|
|
714
|
+
- [ ] `npx monomind browse --version` — confirm monomind is installed
|
|
715
|
+
- [ ] `npx monomind doctor` — check system health
|
|
716
716
|
- [ ] Get target URL from user if not provided
|
|
717
717
|
- [ ] Use `batch "open <url>" "snapshot -i"` to start
|
|
718
718
|
- [ ] Use refs (`@eN`) from snapshot output for all interactions
|