@monoes/monomindcli 1.10.30 → 1.10.32
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/adr-draft-handler.cjs +64 -0
- package/.claude/helpers/handlers/agent-start-handler.cjs +99 -0
- package/.claude/helpers/handlers/budget-status-handler.cjs +14 -0
- package/.claude/helpers/handlers/compact-handler.cjs +33 -0
- package/.claude/helpers/handlers/graph-status-handler.cjs +38 -0
- package/.claude/helpers/handlers/loops-status-handler.cjs +45 -0
- package/.claude/helpers/handlers/session-restore-handler.cjs +66 -55
- package/.claude/helpers/handlers/stats-handler.cjs +14 -0
- package/.claude/helpers/hook-handler.cjs +16 -228
- 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/browser/actions.d.ts +15 -0
- package/dist/src/browser/actions.d.ts.map +1 -1
- package/dist/src/browser/actions.js +91 -0
- package/dist/src/browser/actions.js.map +1 -1
- package/dist/src/browser/batch.d.ts +13 -0
- package/dist/src/browser/batch.d.ts.map +1 -0
- package/dist/src/browser/batch.js +11 -0
- package/dist/src/browser/batch.js.map +1 -0
- package/dist/src/browser/console-log.d.ts +22 -0
- package/dist/src/browser/console-log.d.ts.map +1 -0
- package/dist/src/browser/console-log.js +55 -0
- package/dist/src/browser/console-log.js.map +1 -0
- package/dist/src/browser/dialog.d.ts +11 -0
- package/dist/src/browser/dialog.d.ts.map +1 -0
- package/dist/src/browser/dialog.js +36 -0
- package/dist/src/browser/dialog.js.map +1 -0
- package/dist/src/browser/emulation.d.ts +15 -0
- package/dist/src/browser/emulation.d.ts.map +1 -0
- package/dist/src/browser/emulation.js +62 -0
- package/dist/src/browser/emulation.js.map +1 -0
- package/dist/src/browser/find.d.ts +21 -0
- package/dist/src/browser/find.d.ts.map +1 -0
- package/dist/src/browser/find.js +118 -0
- package/dist/src/browser/find.js.map +1 -0
- package/dist/src/browser/index.d.ts +7 -0
- package/dist/src/browser/index.d.ts.map +1 -1
- package/dist/src/browser/index.js +7 -0
- package/dist/src/browser/index.js.map +1 -1
- package/dist/src/browser/pdf.d.ts +15 -0
- package/dist/src/browser/pdf.d.ts.map +1 -0
- package/dist/src/browser/pdf.js +27 -0
- package/dist/src/browser/pdf.js.map +1 -0
- package/dist/src/browser/storage.d.ts +11 -0
- package/dist/src/browser/storage.d.ts.map +1 -0
- package/dist/src/browser/storage.js +43 -0
- package/dist/src/browser/storage.js.map +1 -0
- package/dist/src/commands/browse.d.ts.map +1 -1
- package/dist/src/commands/browse.js +939 -18
- package/dist/src/commands/browse.js.map +1 -1
- package/dist/src/ui/dashboard-v2.html +581 -19
- package/dist/src/ui/server.mjs +56 -0
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
|
@@ -13,21 +13,20 @@ triggers:
|
|
|
13
13
|
tools:
|
|
14
14
|
- Bash
|
|
15
15
|
requires:
|
|
16
|
-
-
|
|
16
|
+
- monomind >= 1.0.0
|
|
17
17
|
---
|
|
18
18
|
|
|
19
|
-
<!-- Pattern adapted from agent-browser — rebranded for monomind -->
|
|
20
19
|
|
|
21
20
|
# Electron App Automation (monomind:browse-electron)
|
|
22
21
|
|
|
23
|
-
Automate any Electron desktop app using
|
|
22
|
+
Automate any Electron desktop app using monomind browse via Chrome DevTools Protocol (CDP). Electron apps are built on Chromium and expose a CDP port, enabling the same snapshot-interact workflow used for web pages.
|
|
24
23
|
|
|
25
24
|
See `monomind:browse` for the full browser automation reference.
|
|
26
25
|
|
|
27
26
|
## Core Workflow
|
|
28
27
|
|
|
29
28
|
1. **Launch** the Electron app with remote debugging enabled
|
|
30
|
-
2. **Connect**
|
|
29
|
+
2. **Connect** monomind browse to the CDP port
|
|
31
30
|
3. **Snapshot** to discover interactive elements
|
|
32
31
|
4. **Interact** using element refs
|
|
33
32
|
5. **Re-snapshot** after navigation or state changes
|
|
@@ -36,13 +35,13 @@ See `monomind:browse` for the full browser automation reference.
|
|
|
36
35
|
# Launch an Electron app with remote debugging
|
|
37
36
|
open -a "Slack" --args --remote-debugging-port=9222
|
|
38
37
|
|
|
39
|
-
# Connect
|
|
40
|
-
|
|
38
|
+
# Connect monomind browse to the app
|
|
39
|
+
npx monomind browse open --port 0
|
|
41
40
|
|
|
42
41
|
# Standard workflow from here
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
42
|
+
npx monomind browse snapshot -i
|
|
43
|
+
npx monomind browse click @e5
|
|
44
|
+
npx monomind browse screenshot slack-desktop.png
|
|
46
45
|
```
|
|
47
46
|
|
|
48
47
|
## Launching with CDP
|
|
@@ -81,13 +80,13 @@ discord --remote-debugging-port=9224
|
|
|
81
80
|
|
|
82
81
|
```bash
|
|
83
82
|
# Connect to a specific port (persists for session)
|
|
84
|
-
|
|
83
|
+
npx monomind browse open --port 0
|
|
85
84
|
|
|
86
85
|
# Or pass --cdp on each command
|
|
87
|
-
|
|
86
|
+
npx monomind browse --cdp 9222 snapshot -i
|
|
88
87
|
|
|
89
88
|
# Auto-discover a running Chromium-based app
|
|
90
|
-
|
|
89
|
+
npx monomind browse --auto-connect snapshot -i
|
|
91
90
|
```
|
|
92
91
|
|
|
93
92
|
## Tab Management
|
|
@@ -95,9 +94,9 @@ agent-browser --auto-connect snapshot -i
|
|
|
95
94
|
Electron apps often have multiple windows or webviews:
|
|
96
95
|
|
|
97
96
|
```bash
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
97
|
+
npx monomind browse tab # list all targets (windows, webviews)
|
|
98
|
+
npx monomind browse tab t2 # switch by stable id
|
|
99
|
+
npx monomind browse tab --url "*settings*" # switch by URL pattern
|
|
101
100
|
```
|
|
102
101
|
|
|
103
102
|
## Webview Support
|
|
@@ -105,14 +104,14 @@ agent-browser tab --url "*settings*" # switch by URL pattern
|
|
|
105
104
|
Electron `<webview>` elements appear as separate targets in the tab list:
|
|
106
105
|
|
|
107
106
|
```bash
|
|
108
|
-
|
|
109
|
-
|
|
107
|
+
npx monomind browse open --port 0
|
|
108
|
+
npx monomind browse tab
|
|
110
109
|
# 0: [page] Slack - Main Window https://app.slack.com/
|
|
111
110
|
# 1: [webview] Embedded Content https://example.com/widget
|
|
112
111
|
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
112
|
+
npx monomind browse tab t2 # switch to webview
|
|
113
|
+
npx monomind browse snapshot -i
|
|
114
|
+
npx monomind browse click @e3
|
|
116
115
|
```
|
|
117
116
|
|
|
118
117
|
## Common Patterns
|
|
@@ -122,57 +121,57 @@ agent-browser click @e3
|
|
|
122
121
|
```bash
|
|
123
122
|
open -a "Slack" --args --remote-debugging-port=9222
|
|
124
123
|
sleep 3
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
124
|
+
npx monomind browse open --port 0
|
|
125
|
+
npx monomind browse snapshot -i
|
|
126
|
+
npx monomind browse click @e10
|
|
127
|
+
npx monomind browse snapshot -i
|
|
129
128
|
```
|
|
130
129
|
|
|
131
130
|
### Screenshots
|
|
132
131
|
|
|
133
132
|
```bash
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
133
|
+
npx monomind browse open --port 0
|
|
134
|
+
npx monomind browse screenshot app-state.png
|
|
135
|
+
npx monomind browse screenshot --annotate annotated-app.png
|
|
137
136
|
```
|
|
138
137
|
|
|
139
138
|
### Extract Data
|
|
140
139
|
|
|
141
140
|
```bash
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
141
|
+
npx monomind browse open --port 0
|
|
142
|
+
npx monomind browse snapshot -i
|
|
143
|
+
npx monomind browse get text @e5
|
|
144
|
+
npx monomind browse snapshot --json > app-state.json
|
|
146
145
|
```
|
|
147
146
|
|
|
148
147
|
### Fill Forms
|
|
149
148
|
|
|
150
149
|
```bash
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
150
|
+
npx monomind browse open --port 0
|
|
151
|
+
npx monomind browse snapshot -i
|
|
152
|
+
npx monomind browse fill @e3 "search query"
|
|
153
|
+
npx monomind browse press Enter
|
|
154
|
+
npx monomind browse wait 1000
|
|
155
|
+
npx monomind browse snapshot -i
|
|
157
156
|
```
|
|
158
157
|
|
|
159
158
|
### Multiple Apps Simultaneously
|
|
160
159
|
|
|
161
160
|
```bash
|
|
162
|
-
|
|
163
|
-
|
|
161
|
+
npx monomind browse --session slack connect 9222
|
|
162
|
+
npx monomind browse --session vscode connect 9223
|
|
164
163
|
|
|
165
|
-
|
|
166
|
-
|
|
164
|
+
npx monomind browse --session slack snapshot -i
|
|
165
|
+
npx monomind browse --session vscode snapshot -i
|
|
167
166
|
```
|
|
168
167
|
|
|
169
168
|
## Color Scheme
|
|
170
169
|
|
|
171
170
|
```bash
|
|
172
|
-
|
|
173
|
-
|
|
171
|
+
npx monomind browse open --port 0
|
|
172
|
+
npx monomind browse --color-scheme dark snapshot -i
|
|
174
173
|
# or
|
|
175
|
-
AGENT_BROWSER_COLOR_SCHEME=dark
|
|
174
|
+
AGENT_BROWSER_COLOR_SCHEME=dark npx monomind browse open --port 0
|
|
176
175
|
```
|
|
177
176
|
|
|
178
177
|
## Troubleshooting
|
|
@@ -181,8 +180,8 @@ AGENT_BROWSER_COLOR_SCHEME=dark agent-browser connect 9222
|
|
|
181
180
|
|---------|-----|
|
|
182
181
|
| "Connection refused" | App not launched with `--remote-debugging-port`, or port mismatch |
|
|
183
182
|
| Connect fails after launch | Wait a few seconds — `sleep 3` before connect |
|
|
184
|
-
| Elements not in snapshot | Use `
|
|
185
|
-
| Can't type in inputs | Try `
|
|
183
|
+
| Elements not in snapshot | Use `monomind browse tab` to switch to the right window/webview |
|
|
184
|
+
| Can't type in inputs | Try `monomind browse keyboard type "text"` or `keyboard inserttext "text"` |
|
|
186
185
|
|
|
187
186
|
## Supported Apps
|
|
188
187
|
|
|
@@ -16,10 +16,9 @@ triggers:
|
|
|
16
16
|
tools:
|
|
17
17
|
- Bash
|
|
18
18
|
requires:
|
|
19
|
-
-
|
|
19
|
+
- monomind >= 1.0.0
|
|
20
20
|
---
|
|
21
21
|
|
|
22
|
-
<!-- Pattern adapted from agent-browser — rebranded for monomind -->
|
|
23
22
|
|
|
24
23
|
# Systematic QA / Dogfood Testing (monomind:browse-qa)
|
|
25
24
|
|
|
@@ -39,7 +38,7 @@ See `monomind:browse` for the full browser automation reference.
|
|
|
39
38
|
|
|
40
39
|
Start immediately with defaults. Only ask if authentication is mentioned but credentials are missing.
|
|
41
40
|
|
|
42
|
-
Always call `
|
|
41
|
+
Always call `monomind browse` directly — using `npx monomind browse`. It uses the native TypeScript CDP client.
|
|
43
42
|
|
|
44
43
|
## Workflow
|
|
45
44
|
|
|
@@ -57,21 +56,21 @@ Always call `agent-browser` directly — never `npx agent-browser`. The direct b
|
|
|
57
56
|
```bash
|
|
58
57
|
mkdir -p ./qa-output/screenshots
|
|
59
58
|
SESSION="$(echo '<TARGET_URL>' | sed 's|https\?://||; s|/.*||; s|\.|-|g')"
|
|
60
|
-
|
|
61
|
-
|
|
59
|
+
npx monomind browse --session "$SESSION" open <TARGET_URL>
|
|
60
|
+
npx monomind browse --session "$SESSION" wait --load networkidle
|
|
62
61
|
```
|
|
63
62
|
|
|
64
63
|
### 2. Authenticate (if needed)
|
|
65
64
|
|
|
66
65
|
```bash
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
66
|
+
npx monomind browse --session "$SESSION" snapshot -i
|
|
67
|
+
npx monomind browse --session "$SESSION" fill @e1 "<EMAIL>"
|
|
68
|
+
npx monomind browse --session "$SESSION" fill @e2 "<PASSWORD>"
|
|
69
|
+
npx monomind browse --session "$SESSION" click @e3
|
|
70
|
+
npx monomind browse --session "$SESSION" wait --load networkidle
|
|
72
71
|
|
|
73
72
|
# Save auth state for reuse
|
|
74
|
-
|
|
73
|
+
npx monomind browse --session "$SESSION" state save ./qa-output/auth-state.json
|
|
75
74
|
```
|
|
76
75
|
|
|
77
76
|
For OTP/email codes: ask the user, wait for input, then enter the code.
|
|
@@ -79,10 +78,10 @@ For OTP/email codes: ask the user, wait for input, then enter the code.
|
|
|
79
78
|
### 3. Orient
|
|
80
79
|
|
|
81
80
|
```bash
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
81
|
+
npx monomind browse --session "$SESSION" screenshot --annotate ./qa-output/screenshots/00-initial.png
|
|
82
|
+
npx monomind browse --session "$SESSION" snapshot -i
|
|
83
|
+
npx monomind browse --session "$SESSION" get title
|
|
84
|
+
npx monomind browse --session "$SESSION" get url
|
|
86
85
|
```
|
|
87
86
|
|
|
88
87
|
Document the starting state: what is visible, main navigation elements, key actions available.
|
|
@@ -92,17 +91,17 @@ Document the starting state: what is visible, main navigation elements, key acti
|
|
|
92
91
|
For each area/page:
|
|
93
92
|
|
|
94
93
|
```bash
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
94
|
+
npx monomind browse --session "$SESSION" click @e[nav-item]
|
|
95
|
+
npx monomind browse --session "$SESSION" wait --load networkidle
|
|
96
|
+
npx monomind browse --session "$SESSION" snapshot -i
|
|
97
|
+
npx monomind browse --session "$SESSION" screenshot ./qa-output/screenshots/<page-name>.png
|
|
99
98
|
```
|
|
100
99
|
|
|
101
100
|
**Test systematically:**
|
|
102
101
|
- Navigation: does every link work? Does back/forward work?
|
|
103
102
|
- Forms: submit empty, submit invalid, submit valid
|
|
104
103
|
- Interactive elements: hover states, click states, disabled states
|
|
105
|
-
- Responsive: `
|
|
104
|
+
- Responsive: `monomind browse set viewport 375 812` (mobile), `1280 720` (desktop)
|
|
106
105
|
- Error states: what happens when APIs fail? Use `network route` to simulate failures
|
|
107
106
|
- Loading states: `wait --load networkidle` then check if spinners resolve
|
|
108
107
|
|
|
@@ -112,7 +111,7 @@ For every issue found:
|
|
|
112
111
|
|
|
113
112
|
```bash
|
|
114
113
|
# 1. Screenshot the broken state
|
|
115
|
-
|
|
114
|
+
npx monomind browse --session "$SESSION" screenshot ./qa-output/screenshots/bug-<N>-<name>.png
|
|
116
115
|
|
|
117
116
|
# 2. Record reproduction steps in report
|
|
118
117
|
```
|
|
@@ -134,7 +133,7 @@ Issue format:
|
|
|
134
133
|
### 6. Wrap Up
|
|
135
134
|
|
|
136
135
|
```bash
|
|
137
|
-
|
|
136
|
+
npx monomind browse --session "$SESSION" close
|
|
138
137
|
```
|
|
139
138
|
|
|
140
139
|
Print summary:
|
|
@@ -177,12 +176,12 @@ Output: ./qa-output/
|
|
|
177
176
|
- [ ] Tooltips appear on hover
|
|
178
177
|
|
|
179
178
|
**Responsive:**
|
|
180
|
-
- [ ] Mobile (375×812): `
|
|
181
|
-
- [ ] Tablet (768×1024): `
|
|
182
|
-
- [ ] Desktop (1280×720): `
|
|
179
|
+
- [ ] Mobile (375×812): `monomind browse set viewport 375 812`
|
|
180
|
+
- [ ] Tablet (768×1024): `monomind browse set viewport 768 1024`
|
|
181
|
+
- [ ] Desktop (1280×720): `monomind browse set viewport 1280 720`
|
|
183
182
|
|
|
184
183
|
**Error states:**
|
|
185
|
-
- [ ] Network error: `
|
|
184
|
+
- [ ] Network error: `monomind browse network route "https://api.*" --abort`
|
|
186
185
|
- [ ] Empty state: check when lists/tables have no data
|
|
187
186
|
- [ ] 404 page: navigate to `/nonexistent-path`
|
|
188
187
|
|
|
@@ -195,11 +194,11 @@ Output: ./qa-output/
|
|
|
195
194
|
|
|
196
195
|
```bash
|
|
197
196
|
# Block all API calls to test error handling
|
|
198
|
-
|
|
197
|
+
npx monomind browse batch \
|
|
199
198
|
'["open"]' \
|
|
200
199
|
'["network", "route", "https://api.example.com/*", "--abort"]' \
|
|
201
200
|
'["navigate", "https://app.example.com/dashboard"]'
|
|
202
|
-
|
|
201
|
+
npx monomind browse snapshot -i
|
|
203
202
|
# → Verify error states render correctly
|
|
204
203
|
```
|
|
205
204
|
|
|
@@ -207,10 +206,10 @@ agent-browser snapshot -i
|
|
|
207
206
|
|
|
208
207
|
```bash
|
|
209
208
|
# Baseline
|
|
210
|
-
|
|
209
|
+
npx monomind browse open https://app.example.com && monomind browse snapshot -i > ./qa-output/baseline.txt
|
|
211
210
|
|
|
212
211
|
# After change
|
|
213
|
-
|
|
212
|
+
npx monomind browse open https://app.example.com && monomind browse diff snapshot --baseline ./qa-output/baseline.txt
|
|
214
213
|
```
|
|
215
214
|
|
|
216
215
|
## Monomind Integration
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
# Authentication Patterns
|
|
2
2
|
|
|
3
|
-
<!-- Pattern adapted from agent-browser — rebranded for monomind -->
|
|
4
3
|
|
|
5
4
|
Login flows, session persistence, OAuth, 2FA, and authenticated browsing.
|
|
6
5
|
|
|
@@ -27,13 +26,13 @@ Log in to your target site normally in this Chrome window.
|
|
|
27
26
|
**Step 2: Save auth state**
|
|
28
27
|
|
|
29
28
|
```bash
|
|
30
|
-
|
|
29
|
+
npx monomind browse --auto-connect state save ./my-auth.json
|
|
31
30
|
```
|
|
32
31
|
|
|
33
32
|
**Step 3: Reuse in automation**
|
|
34
33
|
|
|
35
34
|
```bash
|
|
36
|
-
|
|
35
|
+
npx monomind browse --state ./my-auth.json open https://app.example.com/dashboard
|
|
37
36
|
```
|
|
38
37
|
|
|
39
38
|
## Auth Methods Quick Reference
|
|
@@ -51,24 +50,24 @@ agent-browser --state ./my-auth.json open https://app.example.com/dashboard
|
|
|
51
50
|
## Basic Login Flow
|
|
52
51
|
|
|
53
52
|
```bash
|
|
54
|
-
|
|
55
|
-
|
|
53
|
+
npx monomind browse open https://app.example.com/login
|
|
54
|
+
npx monomind browse snapshot -i
|
|
56
55
|
# identify: @e[email], @e[password], @e[submit]
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
56
|
+
npx monomind browse fill @e1 "user@test.com"
|
|
57
|
+
npx monomind browse fill @e2 "SecurePass123!"
|
|
58
|
+
npx monomind browse click @e3
|
|
59
|
+
npx monomind browse wait --url "**/dashboard" --timeout 10000
|
|
61
60
|
|
|
62
61
|
# Save for reuse
|
|
63
|
-
|
|
62
|
+
npx monomind browse state save ./auth.json
|
|
64
63
|
```
|
|
65
64
|
|
|
66
65
|
## Session Persistence
|
|
67
66
|
|
|
68
67
|
```bash
|
|
69
68
|
# Auto-save/restore state by name
|
|
70
|
-
|
|
71
|
-
# → State saved to ~/.
|
|
69
|
+
npx monomind browse --session-name myapp open https://app.example.com
|
|
70
|
+
# → State saved to ~/.monomind/browser-sessions/myapp automatically
|
|
72
71
|
# → Next time: just --session-name myapp and you're logged in
|
|
73
72
|
```
|
|
74
73
|
|
|
@@ -77,7 +76,7 @@ agent-browser --session-name myapp open https://app.example.com
|
|
|
77
76
|
```bash
|
|
78
77
|
# Generate a key: openssl rand -hex 32
|
|
79
78
|
export AGENT_BROWSER_ENCRYPTION_KEY=<64-char-hex>
|
|
80
|
-
|
|
79
|
+
npx monomind browse --session-name secure open https://app.example.com
|
|
81
80
|
# → State file is AES-256-GCM encrypted at rest
|
|
82
81
|
```
|
|
83
82
|
|
|
@@ -85,28 +84,28 @@ agent-browser --session-name secure open https://app.example.com
|
|
|
85
84
|
|
|
86
85
|
```bash
|
|
87
86
|
# Store credentials once
|
|
88
|
-
echo "mypassword" |
|
|
87
|
+
echo "mypassword" | monomind browse auth save github \
|
|
89
88
|
--url https://github.com/login \
|
|
90
89
|
--username me \
|
|
91
90
|
--password-stdin
|
|
92
91
|
|
|
93
92
|
# Login using stored credentials
|
|
94
|
-
|
|
93
|
+
npx monomind browse auth login github
|
|
95
94
|
```
|
|
96
95
|
|
|
97
96
|
## Token-Based Auth (Skip Login Form)
|
|
98
97
|
|
|
99
98
|
```bash
|
|
100
99
|
# Headers scoped to origin only — never leaked to other domains
|
|
101
|
-
|
|
102
|
-
|
|
100
|
+
npx monomind browse open https://api.example.com --headers '{"Authorization": "Bearer <token>"}'
|
|
101
|
+
npx monomind browse snapshot -i
|
|
103
102
|
```
|
|
104
103
|
|
|
105
104
|
## Cookie Import (from cURL)
|
|
106
105
|
|
|
107
106
|
```bash
|
|
108
107
|
# Export from browser DevTools → Network → Copy as cURL → save to file
|
|
109
|
-
|
|
108
|
+
npx monomind browse cookies set --curl ./cookies.curl # auto-detects format
|
|
110
109
|
```
|
|
111
110
|
|
|
112
111
|
## OAuth / SSO
|
|
@@ -114,43 +113,43 @@ agent-browser cookies set --curl ./cookies.curl # auto-detects format
|
|
|
114
113
|
OAuth flows redirect through external providers — just follow the snapshots:
|
|
115
114
|
|
|
116
115
|
```bash
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
116
|
+
npx monomind browse open https://app.example.com/login
|
|
117
|
+
npx monomind browse snapshot -i
|
|
118
|
+
npx monomind browse click @e[sign-in-with-google]
|
|
119
|
+
npx monomind browse wait --url "**/accounts.google.com/**"
|
|
120
|
+
npx monomind browse snapshot -i
|
|
122
121
|
# fill Google credentials...
|
|
123
|
-
|
|
122
|
+
npx monomind browse wait --url "**/app.example.com/**"
|
|
124
123
|
# → OAuth complete, save state
|
|
125
|
-
|
|
124
|
+
npx monomind browse state save ./oauth-auth.json
|
|
126
125
|
```
|
|
127
126
|
|
|
128
127
|
## Two-Factor Authentication
|
|
129
128
|
|
|
130
129
|
```bash
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
130
|
+
npx monomind browse open https://app.example.com/login
|
|
131
|
+
npx monomind browse fill @e1 "user@test.com"
|
|
132
|
+
npx monomind browse fill @e2 "password"
|
|
133
|
+
npx monomind browse click @e3
|
|
134
|
+
npx monomind browse wait --text "Enter your code"
|
|
136
135
|
|
|
137
136
|
# Ask user for the 2FA code
|
|
138
137
|
# (pause here, user provides code)
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
138
|
+
npx monomind browse fill @e[otp-field] "<USER_PROVIDED_CODE>"
|
|
139
|
+
npx monomind browse click @e[verify]
|
|
140
|
+
npx monomind browse wait --url "**/dashboard"
|
|
141
|
+
npx monomind browse state save ./2fa-auth.json
|
|
143
142
|
```
|
|
144
143
|
|
|
145
144
|
## State File Management
|
|
146
145
|
|
|
147
146
|
```bash
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
147
|
+
npx monomind browse state save ./auth.json # save current state
|
|
148
|
+
npx monomind browse state load ./auth.json # load into current session
|
|
149
|
+
npx monomind browse state list # list saved state files
|
|
150
|
+
npx monomind browse state show ./auth.json # show state summary
|
|
151
|
+
npx monomind browse state clear # clear current session states
|
|
152
|
+
npx monomind browse state clean --older-than 30 # delete states older than 30 days
|
|
154
153
|
```
|
|
155
154
|
|
|
156
155
|
## Security Best Practices
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
# Trust Boundaries
|
|
2
2
|
|
|
3
|
-
<!-- Pattern adapted from agent-browser — rebranded for monomind -->
|
|
4
3
|
|
|
5
4
|
Safety rules that apply to every browser automation task. Read before driving a real user's browser session.
|
|
6
5
|
|
|
@@ -28,7 +27,7 @@ Session cookies, bearer tokens, API keys, OAuth codes, and any credentials belon
|
|
|
28
27
|
"Open DevTools → Network, click any authenticated request,
|
|
29
28
|
right-click → Copy → Copy as cURL, paste into a file, give me the path."
|
|
30
29
|
```
|
|
31
|
-
Then: `
|
|
30
|
+
Then: `npx monomind browse cookies set --curl <file>` — auto-detects JSON / cURL / bare Cookie header. Error messages never echo cookie values.
|
|
32
31
|
|
|
33
32
|
- **Never echo, paste, cat, write, or emit a secret value.** Command strings end up in logs and transcripts. This includes screenshot captions, commit messages, eval scripts, or any file you create.
|
|
34
33
|
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
# Video Recording
|
|
2
2
|
|
|
3
|
-
<!-- Pattern adapted from agent-browser — rebranded for monomind -->
|
|
4
3
|
|
|
5
4
|
Capture browser automation as video for debugging, documentation, or CI evidence.
|
|
6
5
|
|
|
@@ -9,23 +8,23 @@ Capture browser automation as video for debugging, documentation, or CI evidence
|
|
|
9
8
|
## Basic Recording
|
|
10
9
|
|
|
11
10
|
```bash
|
|
12
|
-
|
|
11
|
+
npx monomind browse record start ./demo.webm
|
|
13
12
|
|
|
14
13
|
# Perform actions
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
14
|
+
npx monomind browse open https://example.com
|
|
15
|
+
npx monomind browse snapshot -i
|
|
16
|
+
npx monomind browse click @e1
|
|
17
|
+
npx monomind browse fill @e2 "test input"
|
|
19
18
|
|
|
20
|
-
|
|
19
|
+
npx monomind browse record stop
|
|
21
20
|
```
|
|
22
21
|
|
|
23
22
|
## Commands
|
|
24
23
|
|
|
25
24
|
```bash
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
25
|
+
npx monomind browse record start ./output.webm # start recording to file
|
|
26
|
+
npx monomind browse record stop # stop current recording
|
|
27
|
+
npx monomind browse record restart ./take2.webm # stop current + start new
|
|
29
28
|
```
|
|
30
29
|
|
|
31
30
|
## Patterns
|
|
@@ -33,38 +32,38 @@ agent-browser record restart ./take2.webm # stop current + start new
|
|
|
33
32
|
### Debug a failed automation
|
|
34
33
|
|
|
35
34
|
```bash
|
|
36
|
-
|
|
35
|
+
npx monomind browse record start ./debug-$(date +%Y%m%d-%H%M%S).webm
|
|
37
36
|
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
37
|
+
npx monomind browse open https://app.example.com
|
|
38
|
+
npx monomind browse snapshot -i
|
|
39
|
+
npx monomind browse click @e1 || { echo "Click failed"; monomind browse record stop; exit 1; }
|
|
41
40
|
|
|
42
|
-
|
|
41
|
+
npx monomind browse record stop
|
|
43
42
|
```
|
|
44
43
|
|
|
45
44
|
### CI/CD test evidence
|
|
46
45
|
|
|
47
46
|
```bash
|
|
48
47
|
mkdir -p ./test-recordings
|
|
49
|
-
|
|
48
|
+
npx monomind browse record start ./test-recordings/e2e-$(date +%s).webm
|
|
50
49
|
|
|
51
50
|
# run tests...
|
|
52
51
|
|
|
53
|
-
|
|
52
|
+
npx monomind browse record stop
|
|
54
53
|
```
|
|
55
54
|
|
|
56
55
|
### Combine with screenshots
|
|
57
56
|
|
|
58
57
|
```bash
|
|
59
|
-
|
|
58
|
+
npx monomind browse record start ./flow.webm
|
|
60
59
|
|
|
61
|
-
|
|
62
|
-
|
|
60
|
+
npx monomind browse open https://example.com
|
|
61
|
+
npx monomind browse screenshot ./screenshots/step1.png
|
|
63
62
|
|
|
64
|
-
|
|
65
|
-
|
|
63
|
+
npx monomind browse click @e1
|
|
64
|
+
npx monomind browse screenshot ./screenshots/step2.png
|
|
66
65
|
|
|
67
|
-
|
|
66
|
+
npx monomind browse record stop
|
|
68
67
|
```
|
|
69
68
|
|
|
70
69
|
## Best Practices
|
|
@@ -73,7 +72,7 @@ agent-browser record stop
|
|
|
73
72
|
2. **Descriptive filenames** — include date/context: `login-flow-2026-05-17.webm`
|
|
74
73
|
3. **Trap cleanup** — always stop recording on exit:
|
|
75
74
|
```bash
|
|
76
|
-
cleanup() {
|
|
75
|
+
cleanup() { monomind browse record stop 2>/dev/null || true; }
|
|
77
76
|
trap cleanup EXIT
|
|
78
77
|
```
|
|
79
78
|
|