pi-agent-browser-native 0.2.24 → 0.2.25
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/CHANGELOG.md +26 -0
- package/README.md +122 -9
- package/docs/ARCHITECTURE.md +48 -7
- package/docs/COMMAND_REFERENCE.md +567 -40
- package/docs/RELEASE.md +57 -7
- package/docs/REQUIREMENTS.md +13 -1
- package/docs/SUPPORT_MATRIX.md +65 -0
- package/docs/TOOL_CONTRACT.md +265 -19
- package/extensions/agent-browser/index.ts +986 -25
- package/extensions/agent-browser/lib/playbook.ts +20 -10
- package/extensions/agent-browser/lib/results/presentation.ts +624 -33
- package/extensions/agent-browser/lib/results/shared.ts +365 -0
- package/extensions/agent-browser/lib/results.ts +12 -0
- package/extensions/agent-browser/lib/runtime.ts +75 -8
- package/package.json +4 -2
- package/scripts/agent-browser-capability-baseline.mjs +499 -110
- package/scripts/doctor.mjs +1 -1
|
@@ -5,6 +5,7 @@ Related docs:
|
|
|
5
5
|
- [`TOOL_CONTRACT.md`](TOOL_CONTRACT.md)
|
|
6
6
|
- [`ARCHITECTURE.md`](ARCHITECTURE.md)
|
|
7
7
|
- [`RELEASE.md`](RELEASE.md)
|
|
8
|
+
- [`SUPPORT_MATRIX.md`](SUPPORT_MATRIX.md)
|
|
8
9
|
|
|
9
10
|
## Purpose
|
|
10
11
|
|
|
@@ -19,25 +20,52 @@ This project intentionally blocks normal `agent-browser` bash usage in most agen
|
|
|
19
20
|
This reference is baselined to the locally installed `agent-browser 0.27.0` command/help surface. Upstream `agent-browser` remains the source of truth for command semantics; this file is the local fallback for Pi agent sessions where direct binary help is blocked or discouraged.
|
|
20
21
|
|
|
21
22
|
The lightweight drift check is `npm run verify -- command-reference`. Run it whenever the installed upstream `agent-browser` version changes or this reference is edited.
|
|
23
|
+
|
|
24
|
+
Use `npm run benchmark:agent-browser` or `npm run verify -- benchmark` before and after agent-facing workflow abstractions to measure task success, tool calls, model-visible output size, stale-ref behavior, artifact success, failure-category coverage, and elapsed-time estimates.
|
|
22
25
|
<!-- agent-browser-capability-baseline:end upstream-baseline -->
|
|
23
26
|
|
|
24
27
|
## Core mental model
|
|
25
28
|
|
|
26
|
-
Tool parameters:
|
|
29
|
+
Tool parameters (use exactly one of `args`, `semanticAction`, `job`, `qa`, `sourceLookup`, or `networkSourceLookup`):
|
|
27
30
|
|
|
28
31
|
```json
|
|
29
|
-
{
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
}
|
|
32
|
+
{ "args": ["open", "https://example.com"], "sessionMode": "auto" }
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
```json
|
|
36
|
+
{ "semanticAction": { "action": "click", "locator": "text", "value": "Submit" }, "sessionMode": "auto" }
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
```json
|
|
40
|
+
{ "args": ["batch"], "stdin": "[[\"open\",\"https://example.com\"],[\"snapshot\",\"-i\"]]" }
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
```json
|
|
44
|
+
{ "job": { "steps": [{ "action": "open", "url": "https://example.com" }, { "action": "assertText", "text": "Example Domain" }] } }
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
```json
|
|
48
|
+
{ "sourceLookup": { "selector": "#save", "reactFiberId": "2", "componentName": "SaveButton" } }
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
```json
|
|
52
|
+
{ "networkSourceLookup": { "requestId": "req-1", "url": "/api/fail" } }
|
|
34
53
|
```
|
|
35
54
|
|
|
36
|
-
- `args`: exact `agent-browser` CLI tokens after the binary name.
|
|
37
|
-
- `
|
|
55
|
+
- `args`: exact `agent-browser` CLI tokens after the binary name. Omit when using `semanticAction`, `job`, `qa`, `sourceLookup`, or `networkSourceLookup` instead (mutually exclusive).
|
|
56
|
+
- `semanticAction`: optional shorthand for common `find` flows; compiles to `find` argv and is rejected together with `args`, `job`, `qa`, `sourceLookup`, or `networkSourceLookup` on the same call.
|
|
57
|
+
- `job`: optional constrained short-workflow schema; compiles to existing upstream `batch` args/stdin and reports the compiled plan in `details.compiledJob`.
|
|
58
|
+
- `qa`: optional lightweight QA preset; compiles to the same batch path and reports `details.compiledQaPreset` plus `details.qaPreset` pass/fail evidence.
|
|
59
|
+
- `sourceLookup`: optional experimental helper for local UI-to-source *candidates*; compiles to the same `batch` path, reports `details.compiledSourceLookup` and `details.sourceLookup`, and never reclassifies a fully successful upstream batch as failed the way `qa` can (see [`TOOL_CONTRACT.md`](TOOL_CONTRACT.md#sourcelookup) and the longer notes below).
|
|
60
|
+
- `networkSourceLookup`: optional experimental helper for failed request-to-source *candidates*; compiles to generated `batch`, reports `details.compiledNetworkSourceLookup` and `details.networkSourceLookup`, and never assigns blame or edits files.
|
|
61
|
+
- `stdin`: only for `batch`, `eval --stdin`, and `auth save --password-stdin`; other command/stdin combinations are rejected before `agent-browser` is launched. `job`, `qa`, `sourceLookup`, and `networkSourceLookup` generate their own `batch` stdin.
|
|
38
62
|
- `sessionMode`:
|
|
39
63
|
- `"auto"` reuses the extension-managed session when possible.
|
|
40
|
-
- `"fresh"` rotates that managed session to a fresh upstream launch so launch-scoped flags like `--profile`, `--session-name`, `--cdp`, `--state`, `--auto-connect`, `--init-script`, or `--
|
|
64
|
+
- `"fresh"` rotates that managed session to a fresh upstream launch so launch-scoped flags like `--profile`, `--session-name`, `--cdp`, `--state`, `--auto-connect`, `--init-script`, `--enable`, `-p` / `--provider`, or iOS `--device` apply.
|
|
65
|
+
|
|
66
|
+
### Debug, diff, stream, dashboard, and chat families
|
|
67
|
+
|
|
68
|
+
Upstream also exposes non-core families (`network`, `diff`, `trace` / `profiler` / `record`, `console` / `errors` / `highlight` / `inspect` / `clipboard`, `stream`, `dashboard`, `chat`, and related subcommands). The wrapper still owns argv planning, `--json`, managed sessions where applicable, artifact metadata, and model-facing presentation: structured results are compacted and scrubbed in `extensions/agent-browser/lib/results/presentation.ts`, and echoed argv uses the same `redactInvocationArgs` rules as core commands (see [`TOOL_CONTRACT.md`](TOOL_CONTRACT.md#details) for the field contract). Deterministic fake-upstream coverage for representative JSON shapes and redaction lives in `test/agent-browser.extension-validation.test.ts` under `agentBrowserExtension passes through non-core network debug diff stream dashboard and chat families`.
|
|
41
69
|
|
|
42
70
|
## Recommended workflow
|
|
43
71
|
|
|
@@ -96,10 +124,15 @@ Examples:
|
|
|
96
124
|
{ "args": ["find", "role", "button", "click", "--name", "Close"] }
|
|
97
125
|
{ "args": ["find", "text", "Close", "click"] }
|
|
98
126
|
{ "args": ["find", "label", "Email", "fill", "user@example.com"] }
|
|
127
|
+
{ "semanticAction": { "action": "click", "locator": "role", "value": "button", "name": "Close" } }
|
|
128
|
+
{ "semanticAction": { "action": "fill", "locator": "label", "value": "Email", "text": "user@example.com" } }
|
|
129
|
+
{ "semanticAction": { "action": "uncheck", "locator": "label", "value": "Remember me" } }
|
|
99
130
|
{ "args": ["scrollintoview", "@e12"] }
|
|
100
131
|
{ "args": ["snapshot", "-i"] }
|
|
101
132
|
```
|
|
102
133
|
|
|
134
|
+
The optional native `semanticAction` object is only a thin schema for common locator-based actions; it compiles to existing upstream `find` commands and reports the compiled argv in `details.compiledSemanticAction` (see [`TOOL_CONTRACT.md`](TOOL_CONTRACT.md#semanticaction) for the full field rules). It is a top-level alternative to `args`, `job`, `qa`, `sourceLookup`, and `networkSourceLookup`, not a nested shape inside `batch` stdin arrays.
|
|
135
|
+
|
|
103
136
|
Do not assume Playwright selector dialects such as `text=Close` or `button:has-text('Close')` are supported wrapper syntax. If you need those forms, verify current upstream `agent-browser` behavior first; otherwise use refs, `find`, or known CSS selectors.
|
|
104
137
|
|
|
105
138
|
### Extract page data
|
|
@@ -121,6 +154,44 @@ Prefer `get` and scoped `eval --stdin` for read-only extraction. Return the inte
|
|
|
121
154
|
|
|
122
155
|
Use `batch --bail` when later steps should stop after the first failed command.
|
|
123
156
|
|
|
157
|
+
For short constrained flows, use top-level `job` instead of hand-writing `batch` stdin. Supported job steps are `open`, `click`, `fill`, `wait`, `assertText`, `assertUrl`, `waitForDownload`, and `screenshot`; the wrapper compiles them to upstream `batch` and records `details.compiledJob.steps[]`. There is still no separate first-class catalog of reusable named browser recipes above `job`, the `qa` preset, and raw `batch`; see [`ARCHITECTURE.md`](ARCHITECTURE.md#no-reusable-recipe-layer-yet) for the closed `RQ-0068` decision and revisit bar.
|
|
158
|
+
|
|
159
|
+
```json
|
|
160
|
+
{
|
|
161
|
+
"job": {
|
|
162
|
+
"steps": [
|
|
163
|
+
{ "action": "open", "url": "https://example.com" },
|
|
164
|
+
{ "action": "assertText", "text": "Example Domain" },
|
|
165
|
+
{ "action": "screenshot", "path": ".dogfood/example.png" }
|
|
166
|
+
]
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
```
|
|
170
|
+
|
|
171
|
+
Use raw `args: ["batch"]` with `stdin` when you need arbitrary upstream commands, flags, or batch failure policies outside the constrained schema. Do not pass `stdin` with `job`, `qa`, `sourceLookup`, or `networkSourceLookup`; those modes generate the batch stdin themselves.
|
|
172
|
+
|
|
173
|
+
For quick smoke/QA checks, use top-level `qa`. It clears enabled network/console/page-error buffers before opening the target URL, waits for page readiness, checks expected text/selector, inspects fresh network requests, console messages, and page errors, and can capture an evidence screenshot.
|
|
174
|
+
|
|
175
|
+
```json
|
|
176
|
+
{ "qa": { "url": "https://example.com", "expectedText": "Example Domain", "screenshotPath": ".dogfood/qa-example.png" } }
|
|
177
|
+
```
|
|
178
|
+
|
|
179
|
+
Optional `checkNetwork`, `checkConsole`, and `checkErrors` default to `true`; set one to `false` to skip that diagnostic. Omit `expectedText` and `expectedSelector` when you only need load plus diagnostics.
|
|
180
|
+
|
|
181
|
+
Use custom `job` or raw `batch` when you need a different check sequence.
|
|
182
|
+
|
|
183
|
+
For local app debugging, top-level `sourceLookup` can gather candidate component/file locations for a visible element from selector DOM hints, React DevTools inspection, and a bounded workspace component-name search rooted at the Pi session working directory (`maxWorkspaceFiles` defaults to 2000 and cannot exceed 5000; the scan records at most ten `workspace-search` candidates). With a `selector`, the wrapper runs `is visible` and, unless `includeDomHints` is `false`, `get html` so DOM data attributes and embedded source-like paths can become `dom-attribute` candidates. It reports evidence and confidence in `details.sourceLookup` instead of claiming a guaranteed source file. React hints require a session opened with `--enable react-devtools`. The `details.sourceLookup.status` field reads `unsupported` only when no candidates were collected **and** a `react` batch step failed (inspect errors, missing renderer, and similar); it reads `no-candidates` when the batch succeeded but nothing matched. If selector or workspace hints still yield candidates, `status` remains `candidates-found` even when React inspection failed. Unlike `qa`, the wrapper does not downgrade a **fully successful** upstream batch to `isError` solely because those statuses appear—though failed batch steps still produce normal tool errors.
|
|
184
|
+
|
|
185
|
+
```json
|
|
186
|
+
{ "sourceLookup": { "selector": "#save", "reactFiberId": "2", "componentName": "SaveButton" } }
|
|
187
|
+
```
|
|
188
|
+
|
|
189
|
+
Top-level `networkSourceLookup` does the same for failed browser requests. When `requestId` is set it adds `network request <requestId>`; when `filter` or `url` is set it also adds `network requests --filter …`, using `url` as the filter pattern when `filter` is omitted. With `requestId` only, the compiled batch is just that request step; failed-request detection still walks the returned batch JSON and treats HTTP status ≥ 400, `failed: true`, or an `error` field as failure. When `filter` or `url` is present, the same heuristics apply but requests are correlated only if their URL matches that substring (either direction). Workspace URL literal search under the Pi session cwd reuses the `sourceLookup` scan rules (`maxWorkspaceFiles` defaults to 2000, hard cap 5000, at most ten `workspace-search` rows, up to eight URL/path needles from the query plus failed request URLs). It reports `details.networkSourceLookup.status` as `failed-requests-found`, `no-failed-requests`, or `no-candidates` and never assigns definitive blame.
|
|
190
|
+
|
|
191
|
+
```json
|
|
192
|
+
{ "networkSourceLookup": { "requestId": "req-1", "url": "/api/fail" } }
|
|
193
|
+
```
|
|
194
|
+
|
|
124
195
|
### Wait for page readiness or downloads
|
|
125
196
|
|
|
126
197
|
```json
|
|
@@ -151,17 +222,23 @@ A successful wait-based download renders a readable summary such as `Download co
|
|
|
151
222
|
```json
|
|
152
223
|
{ "args": ["download", "@e5", "/tmp/report.pdf"] }
|
|
153
224
|
{ "args": ["screenshot", "/tmp/page.png"] }
|
|
225
|
+
{ "args": ["screenshot", "--full", "/tmp/full-page.png"] }
|
|
226
|
+
{ "args": ["screenshot", "--annotate", "/tmp/annotated.png"] }
|
|
154
227
|
{ "args": ["pdf", "/tmp/page.pdf"] }
|
|
155
228
|
```
|
|
156
229
|
|
|
230
|
+
The upstream screenshot aliases are `screenshot --full` for full-page capture and `screenshot --annotate` for labeled screenshots.
|
|
231
|
+
|
|
157
232
|
Prefer `download <selector> <path>` when the target element itself is the downloadable link/control. Use `click` plus `wait --download [path]` when a previous action starts the download indirectly.
|
|
158
233
|
|
|
159
234
|
Wrapper result rendering is metadata-first for saved files:
|
|
160
235
|
- screenshots return a saved-path summary, visible artifact metadata, structured `details.artifacts` metadata, and an inline image attachment when safe; the visible block includes artifact type, requested path, absolute path, existence, size, cwd, session, and repair/copy status when applicable
|
|
161
|
-
- downloads, PDFs, `wait --download` files, traces, CPU profiles, completed WebM recordings from `record stop`, and path-bearing HAR captures return concise saved-path summaries plus structured `details.artifacts` metadata without inlining large files
|
|
236
|
+
- downloads, PDFs, `wait --download` files, `state save` state files, diff screenshot output images, traces, CPU profiles, completed WebM recordings from `record stop`, and path-bearing HAR captures return concise saved-path summaries plus structured `details.artifacts` metadata without inlining large files
|
|
162
237
|
- `record start <path>` reports that recording started and that output will be written on `record stop`; the target file may not exist until recording stops
|
|
163
238
|
- `batch` keeps each step's artifacts in `details.batchSteps[].artifacts` and aggregates them in top-level `details.artifacts` in step order
|
|
164
239
|
|
|
240
|
+
`diff screenshot` follows the file-artifact path above for the **diff** image: model-visible text and `details.artifacts` focus on that output, while baseline paths stay out of the artifact summary block, and Pi does **not** auto-inline the diff the way it inlines trusted `screenshot` captures. `state load` may print the loaded path in prose but does not add a saved-file artifact entry the way `state save` does.
|
|
241
|
+
|
|
165
242
|
For screenshot paths under dot-directories such as `.dogfood/run/foo.png`, the wrapper normalizes the requested path to an absolute path before invoking upstream `agent-browser`, verifies the requested file exists, and repairs from an upstream temp screenshot when possible. The requested path remains visible as `Requested path`, while `Absolute path` shows the actual on-disk location.
|
|
166
243
|
|
|
167
244
|
For annotated screenshots in `batch`, put `--annotate` in top-level args instead of inside the screenshot step:
|
|
@@ -214,6 +291,32 @@ If the result says `Pending confirmation id: c_8f3a1234`, choose one follow-up:
|
|
|
214
291
|
|
|
215
292
|
Confirmation context may be redacted when it contains credentials, tokens, cookies, or auth-bearing URLs. Use the id exactly as printed.
|
|
216
293
|
|
|
294
|
+
### Use stateful browser-context commands safely
|
|
295
|
+
|
|
296
|
+
Stateful commands are native `agent_browser` calls, not shell commands. Keep secrets out of `args` whenever upstream supports stdin, and expect model-facing summaries to redact auth, cookie, password, secret, session, and token-like values.
|
|
297
|
+
|
|
298
|
+
```json
|
|
299
|
+
{ "args": ["auth", "save", "demo", "--password-stdin"], "stdin": "password from the user-approved secret source" }
|
|
300
|
+
{ "args": ["auth", "login", "demo"] }
|
|
301
|
+
{ "args": ["state", "save", "/tmp/demo-state.json"] }
|
|
302
|
+
{ "args": ["state", "load", "/tmp/demo-state.json"], "sessionMode": "fresh" }
|
|
303
|
+
{ "args": ["cookies", "set", "theme", "dark", "--url", "https://example.com"] }
|
|
304
|
+
{ "args": ["storage", "local", "get", "theme"] }
|
|
305
|
+
{ "args": ["dialog", "status"] }
|
|
306
|
+
{ "args": ["dialog", "accept", "prompt text"] }
|
|
307
|
+
{ "args": ["frame", "main"] }
|
|
308
|
+
```
|
|
309
|
+
|
|
310
|
+
Operational notes:
|
|
311
|
+
|
|
312
|
+
- `stdin` is accepted only for `batch`, `eval --stdin`, and `auth save --password-stdin`; other stdin-bearing calls are rejected before launch.
|
|
313
|
+
- `auth list/show/save/login/delete` summaries avoid expanding profile secrets. Prefer `auth save --password-stdin` over `--password <value>`.
|
|
314
|
+
- `state save <path>` is a verified file-artifact workflow; inspect `details.artifactVerification` before relying on the file. `state load <path>` is not treated as a newly saved artifact.
|
|
315
|
+
- `cookies get` can expose real authenticated-profile cookies; prefer task-specific page actions and only inspect cookies when the user needs cookie data.
|
|
316
|
+
- `storage local|session` summaries redact sensitive keys and values; still avoid broad storage dumps unless necessary.
|
|
317
|
+
- `dialog accept/dismiss/status`, `frame <selector|main>`, and guarded-action `confirm <id>` / `deny <id>` pass through the native tool. Prefer `details.nextActions` for exact confirmation recovery payloads.
|
|
318
|
+
- `batch` mirrors the same redaction on every step: top-level `details.data` is a compact `{ success, command, result?, error? }[]` matrix (argv-redacted `command`, stateful `result`, scrubbed `error` text). Use `details.batchSteps[]` when you need per-step artifacts, categories, spill paths, or full structured errors beyond the roll-up.
|
|
319
|
+
|
|
217
320
|
## Full supported surface
|
|
218
321
|
|
|
219
322
|
The tables below intentionally list more than the recommended workflow. Rare commands are included so agents can discover that the installed upstream supports them without direct `agent-browser --help` access.
|
|
@@ -222,12 +325,14 @@ The tables below intentionally list more than the recommended workflow. Rare com
|
|
|
222
325
|
|
|
223
326
|
Native-tool note: upstream skills are written for the standalone `agent-browser` CLI and may show bash/heredoc examples. In pi, convert those examples to `agent_browser` calls: pass CLI tokens in `args`, and pass heredoc/stdin bodies through the tool `stdin` field for `batch`, `eval --stdin`, or `auth save --password-stdin`.
|
|
224
327
|
|
|
328
|
+
Session note: `skills list`, `skills get …`, and `skills path …` are **stateless** in this wrapper. Even with default `sessionMode: "auto"`, the extension does not prepend the implicit managed `--session` for those commands, so reading bundled skills does not attach to or rotate the active browser session (same intent as plain-text `--help` / `--version` inspection). Other `skills` subcommands follow normal session rules until explicitly allowlisted in `extensions/agent-browser/lib/runtime.ts` alongside regression coverage in `test/agent-browser.runtime.test.ts`.
|
|
329
|
+
|
|
225
330
|
| Command | Purpose |
|
|
226
331
|
| --- | --- |
|
|
227
332
|
| `skills list` | List available CLI-bundled skills. |
|
|
228
333
|
| `skills get core` | Print the core usage guide. |
|
|
229
334
|
| `skills get core --full` | Print the full version-matched core command reference and templates. |
|
|
230
|
-
| `skills get <name>` | Load a specialized skill such as `electron` or `slack`. |
|
|
335
|
+
| `skills get <name>` | Load a specialized skill such as `electron` or `slack`. Common specialized calls include `skills get electron`, `skills get slack`, `skills get dogfood`, `skills get vercel-sandbox`, and `skills get agentcore`. |
|
|
231
336
|
| `skills path [name]` | Print a skill directory path. |
|
|
232
337
|
|
|
233
338
|
### Core page and element commands
|
|
@@ -239,7 +344,7 @@ Native-tool note: upstream skills are written for the standalone `agent-browser`
|
|
|
239
344
|
| `dblclick <sel>` | Double-click an element. |
|
|
240
345
|
| `type <sel> <text>` | Type into an element. |
|
|
241
346
|
| `fill <sel> <text>` | Clear and fill an element. |
|
|
242
|
-
| `press <key>` | Press a key such as `Enter`, `Tab`, or `Control+a`. |
|
|
347
|
+
| `press <key>` | Press a key such as `Enter`, `Tab`, or `Control+a`. Related key-hold aliases include `keydown Shift` and `keyup Shift`. |
|
|
243
348
|
| `keyboard type <text>` | Type text with real keystrokes and no selector. |
|
|
244
349
|
| `keyboard inserttext <text>` | Insert text without key events. |
|
|
245
350
|
| `hover <sel>` | Hover an element. |
|
|
@@ -268,12 +373,19 @@ Native-tool note: upstream skills are written for the standalone `agent-browser`
|
|
|
268
373
|
| `forward` | Go forward. |
|
|
269
374
|
| `reload` | Reload the current page. |
|
|
270
375
|
|
|
271
|
-
### Session and inspection commands
|
|
376
|
+
### Session, state, frames, dialogs, windows, and inspection commands
|
|
272
377
|
|
|
273
378
|
| Command | Purpose |
|
|
274
379
|
| --- | --- |
|
|
275
380
|
| `session` | Show current session name. |
|
|
276
381
|
| `session list` | List active sessions. |
|
|
382
|
+
| `state save <path>` | Save cookies, local storage, and session storage to a state file. |
|
|
383
|
+
| `state load <path>` | Load cookies and storage from a state file. |
|
|
384
|
+
| `frame <selector|main>` | Switch iframe context by selector/ref/name/URL, or return to the main frame. |
|
|
385
|
+
| `dialog accept [text]` | Accept an alert, confirm, or prompt dialog, optionally supplying prompt text. |
|
|
386
|
+
| `dialog dismiss` | Dismiss or cancel the current dialog. |
|
|
387
|
+
| `dialog status` | Check whether a dialog is pending. |
|
|
388
|
+
| `window new` | Open a new browser window. |
|
|
277
389
|
| `close` | Close the current browser session. |
|
|
278
390
|
| `close --all` | Close every session. |
|
|
279
391
|
|
|
@@ -284,7 +396,7 @@ Native inspection calls use the `agent_browser` tool shape, not shell-like direc
|
|
|
284
396
|
- { "args": ["--help"] }
|
|
285
397
|
- { "args": ["--version"] }
|
|
286
398
|
|
|
287
|
-
These calls return plain text and stay stateless: the extension does not inject its implicit session and does not let inspection consume the managed-session slot needed for later profile, session, CDP, state,
|
|
399
|
+
These calls return plain text and stay stateless: the extension does not inject its implicit session and does not let inspection consume the managed-session slot needed for later profile, session, CDP, state, auto-connect, or provider-backed launches.
|
|
288
400
|
<!-- agent-browser-playbook:end inspection -->
|
|
289
401
|
|
|
290
402
|
### Page state, finding, mouse, settings, network, and storage
|
|
@@ -353,6 +465,7 @@ Stable tab ids look like `t1`, `t2`, and `t3`. Optional user labels such as `doc
|
|
|
353
465
|
| `profiler start|stop [path]` | Record a Chrome DevTools profile. |
|
|
354
466
|
| `record start <path> [url]` | Start WebM video recording; output is written on `record stop`. |
|
|
355
467
|
| `record stop` | Stop and save video. |
|
|
468
|
+
| `record restart <path> [url]` | Stop any current recording and start a new WebM recording. |
|
|
356
469
|
| `console [--clear]` | View or clear console logs. |
|
|
357
470
|
| `errors [--clear]` | View or clear page errors. |
|
|
358
471
|
| `highlight <sel>` | Highlight an element. |
|
|
@@ -370,7 +483,9 @@ Stable tab ids look like `t1`, `t2`, and `t3`. Optional user labels such as `doc
|
|
|
370
483
|
| `pushstate <url>` | Perform SPA client-side navigation; detects Next.js router pushes and falls back to history navigation events. |
|
|
371
484
|
| `removeinitscript <id>` | Remove an init script registered through upstream init-script mechanisms. |
|
|
372
485
|
|
|
373
|
-
When these diagnostic commands are invoked through the native `agent_browser` tool, structured console, page-error, React, Web Vitals, and SPA outputs render as compact summaries when possible, with large outputs previewed and spilled instead of dumped into context. Large outputs are previewed with a `Full output path:` spill file instead of dumping the entire payload into context.
|
|
486
|
+
When these diagnostic commands are invoked through the native `agent_browser` tool, structured console, page-error, React, Web Vitals, and SPA outputs render as compact summaries when possible, with large outputs previewed and spilled instead of dumped into context. Large outputs are previewed with a `Full output path:` spill file instead of dumping the entire payload into context. Artifact-producing commands such as `network har stop`, `diff screenshot`, `trace stop`, `profiler stop`, and `record stop` report `details.artifacts[]` plus `details.artifactVerification`; `record start` is reported as pending until `record stop` completes.
|
|
487
|
+
|
|
488
|
+
Long-running or lifecycle commands should be explicitly paired with cleanup calls: `stream enable` → `stream disable`, `dashboard start` → `dashboard stop`, `trace start` → `trace stop`, `profiler start` → `profiler stop`, and `record start` → `record stop`. The wrapper keeps each subprocess bounded by its normal timeout; it does not keep an interactive `chat` REPL open, so prefer `chat <message>` with `--model` or `AI_GATEWAY_MODEL` for single-shot AI use.
|
|
374
489
|
|
|
375
490
|
`trace` and `profiler` share upstream Chrome tracing machinery. Do not run them at the same time. The wrapper tracks owner state it observes in the current Pi session and blocks conflicting starts/stops with "wrapper believes ..." wording because direct upstream CLI use or browser restarts can desynchronize wrapper-local state.
|
|
376
491
|
|
|
@@ -379,7 +494,7 @@ When these diagnostic commands are invoked through the native `agent_browser` to
|
|
|
379
494
|
| Command | Purpose |
|
|
380
495
|
| --- | --- |
|
|
381
496
|
| `batch [--bail] ["cmd" ...]` | Execute multiple commands sequentially from args or stdin. |
|
|
382
|
-
| `auth save <name> [opts]` | Save an auth profile with options such as `--url`, `--username`, `--password`, or `--password-stdin`. Prefer
|
|
497
|
+
| `auth save <name> [opts]` | Save an auth profile with options such as `--url`, `--username`, `--password`, or `--password-stdin`. Prefer `auth save <name> --password-stdin` with the tool `stdin` field; avoid putting passwords in `args`. |
|
|
383
498
|
| `auth login <name>` | Login using saved credentials. |
|
|
384
499
|
| `auth list` | List saved auth profiles. |
|
|
385
500
|
| `auth show <name>` | Show auth profile metadata. |
|
|
@@ -396,10 +511,10 @@ When these diagnostic commands are invoked through the native `agent_browser` to
|
|
|
396
511
|
| `install` | Install browser binaries. |
|
|
397
512
|
| `install --with-deps` | Install browser binaries plus Linux system dependencies. |
|
|
398
513
|
| `upgrade` | Upgrade `agent-browser` to the latest version. |
|
|
399
|
-
| `doctor [--fix]` | Diagnose install issues and optionally auto-clean stale files. |
|
|
514
|
+
| `doctor [--fix]` | Diagnose install issues and optionally auto-clean stale files. Use `doctor --offline --quick` for a fast local-only check and `doctor --json` for structured output. |
|
|
400
515
|
| `profiles` | List available Chrome profiles. |
|
|
401
516
|
|
|
402
|
-
When these commands are invoked through the native `agent_browser` tool, structured diagnostic/status outputs are rendered as compact summaries. List-like outputs such as sessions, Chrome profiles, auth profiles, network requests, console messages, and page errors include counts and key fields; large outputs are previewed with a `Full output path:` spill file instead of dumping the entire payload into context. For `network requests`, the wrapper shows status, method, URL, resource/mime type, request id, and, when the installed upstream output includes body-like fields, bounded redacted payload, response, and failure/error snippets. `network request <requestId>` can expose upstream full-detail body fields such as response bodies using the same bounded model-facing preview. Header, cookie, auth, token, and other secret-like fields are not expanded in model-facing text
|
|
517
|
+
When these commands are invoked through the native `agent_browser` tool, structured diagnostic/status outputs are rendered as compact summaries. List-like outputs such as sessions, Chrome profiles, auth profiles, network requests, console messages, and page errors include counts and key fields; large outputs are previewed with a `Full output path:` spill file instead of dumping the entire payload into context. For `network requests`, the wrapper shows status, method, URL, resource/mime type, request id, and, when the installed upstream output includes body-like fields, bounded redacted payload, response, and failure/error snippets. `network request <requestId>` can expose upstream full-detail body fields such as response bodies using the same bounded model-facing preview. Header, cookie, auth, token, and other secret-like fields are not expanded in model-facing text or `details.data`; command echoes also redact `--body`, `--headers`, `--password`, proxy credentials, auth-bearing URLs, cookie/storage values, and bearer/basic credential text in positional arguments. Use upstream HAR or full raw details only when complete data is required.
|
|
403
518
|
|
|
404
519
|
## Important global flags, config, and environment
|
|
405
520
|
|
|
@@ -433,7 +548,7 @@ When these commands are invoked through the native `agent_browser` tool, structu
|
|
|
433
548
|
|
|
434
549
|
### Output, provider, policy, and AI flags
|
|
435
550
|
|
|
436
|
-
- `--json`: JSON output. The wrapper injects this automatically for normal tool execution.
|
|
551
|
+
- `--json`: JSON output. The wrapper injects this automatically for normal tool execution. Environment: `AGENT_BROWSER_JSON`.
|
|
437
552
|
- `--annotate`: annotated screenshot with numbered labels and legend. Environment: `AGENT_BROWSER_ANNOTATE`.
|
|
438
553
|
- `--screenshot-dir <path>`: default screenshot output directory. Environment: `AGENT_BROWSER_SCREENSHOT_DIR`.
|
|
439
554
|
- `--screenshot-quality <n>`: JPEG quality `0-100`. Environment: `AGENT_BROWSER_SCREENSHOT_QUALITY`.
|
|
@@ -446,6 +561,7 @@ When these commands are invoked through the native `agent_browser` tool, structu
|
|
|
446
561
|
- `--confirm-interactive`: interactive confirmations; auto-denies when stdin is not a TTY. Environment: `AGENT_BROWSER_CONFIRM_INTERACTIVE`.
|
|
447
562
|
- `-p, --provider <name>`: provider such as `ios`, `browserbase`, `kernel`, `browseruse`, `browserless`, or `agentcore`. Environment: `AGENT_BROWSER_PROVIDER`.
|
|
448
563
|
- `--device <name>`: iOS device name. Environment: `AGENT_BROWSER_IOS_DEVICE`.
|
|
564
|
+
- Provider-specific iOS examples from upstream include `agent-browser -p ios device list`, `agent-browser -p ios swipe up`, and `agent-browser -p ios tap @e1`; in pi, pass those tokens through `args` rather than bash. iOS requires external Xcode/Appium setup, and cloud providers (`browserbase`, `kernel`, `browseruse`, `browserless`, `agentcore`) require their upstream accounts, credentials, and provider-specific environment variables. The wrapper forwards provider flags/env and stays thin; it does not emulate provider setup or cloud browser behavior.
|
|
449
565
|
- `--model <name>`: AI model for `chat`. Environment: `AI_GATEWAY_MODEL`.
|
|
450
566
|
- `-v, --verbose`: show tool commands and raw output.
|
|
451
567
|
- `-q, --quiet`: show only AI text responses.
|
|
@@ -463,12 +579,12 @@ When these commands are invoked through the native `agent_browser` tool, structu
|
|
|
463
579
|
|
|
464
580
|
Use `--config <path>` to load a specific config file. Boolean flags accept optional `true` or `false` values, such as `--headed false`, to override config. Browser extensions from user and project configs are merged rather than replaced.
|
|
465
581
|
|
|
466
|
-
Other useful environment variables include `AGENT_BROWSER_DEFAULT_TIMEOUT`, `AGENT_BROWSER_STREAM_PORT`, `AGENT_BROWSER_IDLE_TIMEOUT_MS`, `AGENT_BROWSER_ENCRYPTION_KEY`, `AGENT_BROWSER_STATE_EXPIRE_DAYS`, `AGENT_BROWSER_IOS_UDID`, `AI_GATEWAY_URL`, and `AI_GATEWAY_API_KEY`.
|
|
582
|
+
Other useful environment variables include `AGENT_BROWSER_DEFAULT_TIMEOUT`, `AGENT_BROWSER_STREAM_PORT`, `AGENT_BROWSER_IDLE_TIMEOUT_MS`, `AGENT_BROWSER_ENCRYPTION_KEY`, `AGENT_BROWSER_STATE_EXPIRE_DAYS`, `AGENT_BROWSER_IOS_DEVICE`, `AGENT_BROWSER_IOS_UDID`, `AI_GATEWAY_URL`, and `AI_GATEWAY_API_KEY`. The upstream child also receives every parent variable whose name starts with `AGENT_BROWSER_`, `AGENTCORE_`, `AI_GATEWAY_`, `BROWSERBASE_`, `BROWSERLESS_`, `BROWSER_USE_`, `KERNEL_`, or `XDG_`, plus the explicit inherited-name allowlist in `buildAgentBrowserProcessEnv` (`extensions/agent-browser/lib/process.ts`).
|
|
467
583
|
|
|
468
584
|
## Wrapper-specific behavior worth knowing
|
|
469
585
|
|
|
470
586
|
- The extension may keep following one implicit managed session across later tool calls.
|
|
471
|
-
- If launch-scoped flags like `--profile`, `--session-name`, `--cdp`, `--state`, `--auto-connect`, `--init-script`, or `--
|
|
587
|
+
- If launch-scoped flags like `--profile`, `--session-name`, `--cdp`, `--state`, `--auto-connect`, `--init-script`, `--enable`, `--provider` / `-p`, or provider device flags like `--device` would be ignored because that implicit session is already active, retry with `sessionMode: "fresh"`.
|
|
472
588
|
<!-- agent-browser-playbook:start wrapper-tab-recovery -->
|
|
473
589
|
<!-- Generated from extensions/agent-browser/lib/playbook.ts. Run `npm run docs -- playbook write` to update. -->
|
|
474
590
|
- After launch-scoped open/goto/navigate calls that can restore existing tabs (for example --profile, --session-name, or --state), agent_browser best-effort re-selects the tab whose URL matches the returned page when restored tabs steal focus during launch.
|
|
@@ -491,46 +607,362 @@ This generated block is review data for maintainers. The human-authored referenc
|
|
|
491
607
|
|
|
492
608
|
#### Upstream help commands sampled
|
|
493
609
|
- root help: `agent-browser --help`
|
|
610
|
+
- skills help: `agent-browser skills --help`
|
|
611
|
+
- skills list: `agent-browser skills list`
|
|
612
|
+
- core skill full: `agent-browser skills get core --full`
|
|
494
613
|
- tab help: `agent-browser tab --help`
|
|
495
614
|
- snapshot help: `agent-browser snapshot --help`
|
|
496
615
|
- wait help: `agent-browser wait --help`
|
|
616
|
+
- screenshot help: `agent-browser screenshot --help`
|
|
617
|
+
- find help: `agent-browser find --help`
|
|
618
|
+
- network help: `agent-browser network --help`
|
|
619
|
+
- cookies help: `agent-browser cookies --help`
|
|
620
|
+
- storage help: `agent-browser storage --help`
|
|
621
|
+
- state help: `agent-browser state --help`
|
|
622
|
+
- frame help: `agent-browser frame --help`
|
|
623
|
+
- dialog help: `agent-browser dialog --help`
|
|
624
|
+
- window help: `agent-browser window --help`
|
|
625
|
+
- keyboard help: `agent-browser keyboard --help`
|
|
626
|
+
- batch help: `agent-browser batch --help`
|
|
627
|
+
- auth help: `agent-browser auth --help`
|
|
628
|
+
- stream help: `agent-browser stream --help`
|
|
629
|
+
- dashboard help: `agent-browser dashboard --help`
|
|
630
|
+
- chat help: `agent-browser chat --help`
|
|
631
|
+
- doctor help: `agent-browser doctor --help`
|
|
632
|
+
- diff help: `agent-browser diff --help`
|
|
633
|
+
- trace help: `agent-browser trace --help`
|
|
634
|
+
- profiler help: `agent-browser profiler --help`
|
|
635
|
+
- record help: `agent-browser record --help`
|
|
636
|
+
|
|
637
|
+
#### Inventory sections
|
|
638
|
+
- Built-in skills: 10 human-doc token(s), 11 upstream token(s)
|
|
639
|
+
- Core page, element, navigation, and extraction commands: 38 human-doc token(s), 40 upstream token(s)
|
|
640
|
+
- Sessions, state, tabs, frames, dialogs, and windows: 12 human-doc token(s), 8 upstream token(s)
|
|
641
|
+
- Network, storage, artifacts, diagnostics, and performance: 29 human-doc token(s), 33 upstream token(s)
|
|
642
|
+
- Batch, auth, confirmations, setup, dashboard, and AI commands: 19 human-doc token(s), 17 upstream token(s)
|
|
643
|
+
- Global flags, config, providers, policy, and environment: 95 human-doc token(s), 90 upstream token(s)
|
|
644
|
+
|
|
645
|
+
#### Human-authored doc tokens required
|
|
646
|
+
##### Built-in skills
|
|
647
|
+
- `skills list`
|
|
648
|
+
- `skills get core`
|
|
649
|
+
- `skills get core --full`
|
|
650
|
+
- `skills get <name>`
|
|
651
|
+
- `skills get electron`
|
|
652
|
+
- `skills get slack`
|
|
653
|
+
- `skills get dogfood`
|
|
654
|
+
- `skills get vercel-sandbox`
|
|
655
|
+
- `skills get agentcore`
|
|
656
|
+
- `skills path [name]`
|
|
657
|
+
|
|
658
|
+
##### Core page, element, navigation, and extraction commands
|
|
659
|
+
- `open <url>`
|
|
660
|
+
- `click <sel>`
|
|
661
|
+
- `dblclick <sel>`
|
|
662
|
+
- `type <sel> <text>`
|
|
663
|
+
- `fill <sel> <text>`
|
|
664
|
+
- `press <key>`
|
|
665
|
+
- `keyboard type <text>`
|
|
666
|
+
- `keyboard inserttext <text>`
|
|
667
|
+
- `keydown Shift`
|
|
668
|
+
- `keyup Shift`
|
|
669
|
+
- `hover <sel>`
|
|
670
|
+
- `focus <sel>`
|
|
671
|
+
- `check <sel>`
|
|
672
|
+
- `uncheck <sel>`
|
|
673
|
+
- `select <sel> <val...>`
|
|
674
|
+
- `drag <src> <dst>`
|
|
675
|
+
- `upload <sel> <files...>`
|
|
676
|
+
- `download <sel> <path>`
|
|
677
|
+
- `scroll <dir> [px]`
|
|
678
|
+
- `scrollintoview <sel>`
|
|
679
|
+
- `wait <sel|ms>`
|
|
680
|
+
- `screenshot [path]`
|
|
681
|
+
- `screenshot --full`
|
|
682
|
+
- `screenshot --annotate`
|
|
683
|
+
- `pdf <path>`
|
|
684
|
+
- `snapshot`
|
|
685
|
+
- `eval <js>`
|
|
686
|
+
- `connect <port|url>`
|
|
687
|
+
- `close [--all]`
|
|
688
|
+
- `back`
|
|
689
|
+
- `forward`
|
|
690
|
+
- `reload`
|
|
691
|
+
- `pushstate <url>`
|
|
692
|
+
- `get <what> [selector]`
|
|
693
|
+
- `is <what> <selector>`
|
|
694
|
+
- `find <locator> <value> <action>`
|
|
695
|
+
- `mouse <action> [args]`
|
|
696
|
+
- `set <setting> [value]`
|
|
697
|
+
|
|
698
|
+
##### Sessions, state, tabs, frames, dialogs, and windows
|
|
699
|
+
- `session`
|
|
700
|
+
- `session list`
|
|
701
|
+
- `state save <path>`
|
|
702
|
+
- `state load <path>`
|
|
703
|
+
- `tab list`
|
|
704
|
+
- `tab new --label <name> [url]`
|
|
705
|
+
- `tab <t<N>|label>`
|
|
706
|
+
- `frame <selector|main>`
|
|
707
|
+
- `dialog accept [text]`
|
|
708
|
+
- `dialog dismiss`
|
|
709
|
+
- `dialog status`
|
|
710
|
+
- `window new`
|
|
711
|
+
|
|
712
|
+
##### Network, storage, artifacts, diagnostics, and performance
|
|
713
|
+
- `network <action>`
|
|
714
|
+
- `network route <url> [--abort|--body <json>] [--resource-type <csv>]`
|
|
715
|
+
- `network request <requestId>`
|
|
716
|
+
- `cookies [get|set|clear]`
|
|
717
|
+
- `cookies set --curl <file>`
|
|
718
|
+
- `storage <local|session>`
|
|
719
|
+
- `diff snapshot`
|
|
720
|
+
- `diff screenshot --baseline`
|
|
721
|
+
- `diff url <u1> <u2>`
|
|
722
|
+
- `trace start|stop [path]`
|
|
723
|
+
- `profiler start|stop [path]`
|
|
724
|
+
- `record start <path> [url]`
|
|
725
|
+
- `record restart <path> [url]`
|
|
726
|
+
- `record stop`
|
|
727
|
+
- `console [--clear]`
|
|
728
|
+
- `errors [--clear]`
|
|
729
|
+
- `highlight <sel>`
|
|
730
|
+
- `inspect`
|
|
731
|
+
- `clipboard <op> [text]`
|
|
732
|
+
- `stream enable [--port <n>]`
|
|
733
|
+
- `stream disable`
|
|
734
|
+
- `stream status`
|
|
735
|
+
- `react tree`
|
|
736
|
+
- `react inspect <id>`
|
|
737
|
+
- `react renders start`
|
|
738
|
+
- `react renders stop [--json]`
|
|
739
|
+
- `react suspense [--only-dynamic] [--json]`
|
|
740
|
+
- `vitals [url] [--json]`
|
|
741
|
+
- `removeinitscript <id>`
|
|
742
|
+
|
|
743
|
+
##### Batch, auth, confirmations, setup, dashboard, and AI commands
|
|
744
|
+
- `batch [--bail]`
|
|
745
|
+
- `auth save <name>`
|
|
746
|
+
- `auth save <name> --password-stdin`
|
|
747
|
+
- `auth login <name>`
|
|
748
|
+
- `auth list`
|
|
749
|
+
- `auth show <name>`
|
|
750
|
+
- `auth delete <name>`
|
|
751
|
+
- `confirm <id>`
|
|
752
|
+
- `deny <id>`
|
|
753
|
+
- `chat <message>`
|
|
754
|
+
- `dashboard start --port <n>`
|
|
755
|
+
- `dashboard stop`
|
|
756
|
+
- `install`
|
|
757
|
+
- `install --with-deps`
|
|
758
|
+
- `upgrade`
|
|
759
|
+
- `doctor [--fix]`
|
|
760
|
+
- `doctor --offline --quick`
|
|
761
|
+
- `doctor --json`
|
|
762
|
+
- `profiles`
|
|
763
|
+
|
|
764
|
+
##### Global flags, config, providers, policy, and environment
|
|
765
|
+
- `--profile <name|path>`
|
|
766
|
+
- `AGENT_BROWSER_PROFILE`
|
|
767
|
+
- `--session <name>`
|
|
768
|
+
- `AGENT_BROWSER_SESSION`
|
|
769
|
+
- `--session-name <name>`
|
|
770
|
+
- `AGENT_BROWSER_SESSION_NAME`
|
|
771
|
+
- `--state <path>`
|
|
772
|
+
- `AGENT_BROWSER_STATE`
|
|
773
|
+
- `--auto-connect`
|
|
774
|
+
- `AGENT_BROWSER_AUTO_CONNECT`
|
|
775
|
+
- `--headers <json>`
|
|
776
|
+
- `--init-script <path>`
|
|
777
|
+
- `AGENT_BROWSER_INIT_SCRIPTS`
|
|
778
|
+
- `--enable <feature>`
|
|
779
|
+
- `AGENT_BROWSER_ENABLE`
|
|
780
|
+
- `--executable-path <path>`
|
|
781
|
+
- `AGENT_BROWSER_EXECUTABLE_PATH`
|
|
782
|
+
- `--extension <path>`
|
|
783
|
+
- `AGENT_BROWSER_EXTENSIONS`
|
|
784
|
+
- `--args <args>`
|
|
785
|
+
- `AGENT_BROWSER_ARGS`
|
|
786
|
+
- `--user-agent <ua>`
|
|
787
|
+
- `AGENT_BROWSER_USER_AGENT`
|
|
788
|
+
- `--proxy <server>`
|
|
789
|
+
- `AGENT_BROWSER_PROXY`
|
|
790
|
+
- `HTTP_PROXY`
|
|
791
|
+
- `HTTPS_PROXY`
|
|
792
|
+
- `ALL_PROXY`
|
|
793
|
+
- `--proxy-bypass <hosts>`
|
|
794
|
+
- `AGENT_BROWSER_PROXY_BYPASS`
|
|
795
|
+
- `NO_PROXY`
|
|
796
|
+
- `--ignore-https-errors`
|
|
797
|
+
- `AGENT_BROWSER_IGNORE_HTTPS_ERRORS`
|
|
798
|
+
- `--allow-file-access`
|
|
799
|
+
- `AGENT_BROWSER_ALLOW_FILE_ACCESS`
|
|
800
|
+
- `--headed`
|
|
801
|
+
- `AGENT_BROWSER_HEADED`
|
|
802
|
+
- `--cdp <port>`
|
|
803
|
+
- `--color-scheme <scheme>`
|
|
804
|
+
- `AGENT_BROWSER_COLOR_SCHEME`
|
|
805
|
+
- `--download-path <path>`
|
|
806
|
+
- `AGENT_BROWSER_DOWNLOAD_PATH`
|
|
807
|
+
- `--engine <name>`
|
|
808
|
+
- `AGENT_BROWSER_ENGINE`
|
|
809
|
+
- `--no-auto-dialog`
|
|
810
|
+
- `AGENT_BROWSER_NO_AUTO_DIALOG`
|
|
811
|
+
- `--json`
|
|
812
|
+
- `AGENT_BROWSER_JSON`
|
|
813
|
+
- `--annotate`
|
|
814
|
+
- `AGENT_BROWSER_ANNOTATE`
|
|
815
|
+
- `--screenshot-dir <path>`
|
|
816
|
+
- `AGENT_BROWSER_SCREENSHOT_DIR`
|
|
817
|
+
- `--screenshot-quality <n>`
|
|
818
|
+
- `AGENT_BROWSER_SCREENSHOT_QUALITY`
|
|
819
|
+
- `--screenshot-format <fmt>`
|
|
820
|
+
- `AGENT_BROWSER_SCREENSHOT_FORMAT`
|
|
821
|
+
- `--content-boundaries`
|
|
822
|
+
- `AGENT_BROWSER_CONTENT_BOUNDARIES`
|
|
823
|
+
- `--max-output <chars>`
|
|
824
|
+
- `AGENT_BROWSER_MAX_OUTPUT`
|
|
825
|
+
- `--allowed-domains <list>`
|
|
826
|
+
- `AGENT_BROWSER_ALLOWED_DOMAINS`
|
|
827
|
+
- `--action-policy <path>`
|
|
828
|
+
- `AGENT_BROWSER_ACTION_POLICY`
|
|
829
|
+
- `--confirm-actions <list>`
|
|
830
|
+
- `AGENT_BROWSER_CONFIRM_ACTIONS`
|
|
831
|
+
- `--confirm-interactive`
|
|
832
|
+
- `AGENT_BROWSER_CONFIRM_INTERACTIVE`
|
|
833
|
+
- `-p, --provider <name>`
|
|
834
|
+
- `AGENT_BROWSER_PROVIDER`
|
|
835
|
+
- `browserbase`
|
|
836
|
+
- `kernel`
|
|
837
|
+
- `browseruse`
|
|
838
|
+
- `browserless`
|
|
839
|
+
- `agentcore`
|
|
840
|
+
- `--device <name>`
|
|
841
|
+
- `AGENT_BROWSER_IOS_DEVICE`
|
|
842
|
+
- `agent-browser -p ios device list`
|
|
843
|
+
- `agent-browser -p ios swipe up`
|
|
844
|
+
- `agent-browser -p ios tap @e1`
|
|
845
|
+
- `--model <name>`
|
|
846
|
+
- `AI_GATEWAY_MODEL`
|
|
847
|
+
- `-v, --verbose`
|
|
848
|
+
- `-q, --quiet`
|
|
849
|
+
- `--debug`
|
|
850
|
+
- `AGENT_BROWSER_DEBUG`
|
|
851
|
+
- `AGENT_BROWSER_CONFIG`
|
|
852
|
+
- `AGENT_BROWSER_DEFAULT_TIMEOUT`
|
|
853
|
+
- `AGENT_BROWSER_STREAM_PORT`
|
|
854
|
+
- `AGENT_BROWSER_IDLE_TIMEOUT_MS`
|
|
855
|
+
- `AGENT_BROWSER_ENCRYPTION_KEY`
|
|
856
|
+
- `AGENT_BROWSER_STATE_EXPIRE_DAYS`
|
|
857
|
+
- `AGENT_BROWSER_IOS_UDID`
|
|
858
|
+
- `AI_GATEWAY_URL`
|
|
859
|
+
- `AI_GATEWAY_API_KEY`
|
|
497
860
|
|
|
498
861
|
#### Upstream help tokens expected
|
|
499
|
-
-
|
|
500
|
-
- root help: `
|
|
501
|
-
-
|
|
502
|
-
-
|
|
503
|
-
-
|
|
504
|
-
-
|
|
505
|
-
-
|
|
506
|
-
-
|
|
507
|
-
-
|
|
508
|
-
-
|
|
862
|
+
##### Built-in skills
|
|
863
|
+
- root help: `skills get core --full`
|
|
864
|
+
- skills help: `get <name> --full`
|
|
865
|
+
- skills list: `core`
|
|
866
|
+
- skills list: `electron`
|
|
867
|
+
- skills list: `slack`
|
|
868
|
+
- skills list: `dogfood`
|
|
869
|
+
- skills list: `vercel-sandbox`
|
|
870
|
+
- skills list: `agentcore`
|
|
871
|
+
- core skill full: `agent-browser frame @e3`
|
|
872
|
+
- core skill full: `agent-browser dialog accept`
|
|
873
|
+
- core skill full: `agent-browser state save ./auth.json`
|
|
874
|
+
|
|
875
|
+
##### Core page, element, navigation, and extraction commands
|
|
876
|
+
- root help: `open <url>`
|
|
877
|
+
- root help: `click <sel>`
|
|
878
|
+
- root help: `dblclick <sel>`
|
|
879
|
+
- root help: `type <sel> <text>`
|
|
880
|
+
- root help: `fill <sel> <text>`
|
|
881
|
+
- root help: `press <key>`
|
|
882
|
+
- root help: `keyboard type <text>`
|
|
883
|
+
- root help: `keyboard inserttext <text>`
|
|
884
|
+
- root help: `hover <sel>`
|
|
885
|
+
- root help: `focus <sel>`
|
|
886
|
+
- root help: `check <sel>`
|
|
887
|
+
- root help: `uncheck <sel>`
|
|
888
|
+
- root help: `select <sel> <val...>`
|
|
889
|
+
- root help: `drag <src> <dst>`
|
|
890
|
+
- root help: `upload <sel> <files...>`
|
|
891
|
+
- root help: `download <sel> <path>`
|
|
892
|
+
- root help: `scroll <dir> [px]`
|
|
893
|
+
- root help: `scrollintoview <sel>`
|
|
894
|
+
- root help: `wait <sel|ms>`
|
|
895
|
+
- root help: `screenshot [path]`
|
|
896
|
+
- root help: `pdf <path>`
|
|
897
|
+
- root help: `snapshot`
|
|
898
|
+
- root help: `eval <js>`
|
|
899
|
+
- root help: `connect <port|url>`
|
|
900
|
+
- root help: `close [--all]`
|
|
901
|
+
- root help: `back`
|
|
902
|
+
- root help: `forward`
|
|
903
|
+
- root help: `reload`
|
|
904
|
+
- root help: `pushstate <url>`
|
|
905
|
+
- root help: `Get Info: agent-browser get <what> [selector]`
|
|
906
|
+
- root help: `Check State: agent-browser is <what> <selector>`
|
|
907
|
+
- root help: `Find Elements: agent-browser find <locator> <value> <action> [text]`
|
|
908
|
+
- root help: `Mouse: agent-browser mouse <action> [args]`
|
|
909
|
+
- root help: `Browser Settings: agent-browser set <setting> [value]`
|
|
910
|
+
- keyboard help: `type <text>`
|
|
911
|
+
- keyboard help: `inserttext <text>`
|
|
912
|
+
- screenshot help: `--full, -f`
|
|
913
|
+
- screenshot help: `--annotate`
|
|
914
|
+
- find help: `role <role>`
|
|
915
|
+
- find help: `testid <id>`
|
|
916
|
+
|
|
917
|
+
##### Sessions, state, tabs, frames, dialogs, and windows
|
|
918
|
+
- root help: `session list`
|
|
919
|
+
- state help: `save <path>`
|
|
920
|
+
- state help: `load <path>`
|
|
921
|
+
- tab help: `new --label <name> [url]`
|
|
922
|
+
- tab help: `Stable tab ids`
|
|
923
|
+
- frame help: `frame <selector|main>`
|
|
924
|
+
- dialog help: `dialog <accept|dismiss|status> [text]`
|
|
925
|
+
- window help: `window <operation>`
|
|
926
|
+
|
|
927
|
+
##### Network, storage, artifacts, diagnostics, and performance
|
|
928
|
+
- root help: `network <action>`
|
|
929
|
+
- root help: `--resource-type <csv>`
|
|
509
930
|
- root help: `cookies [get|set|clear]`
|
|
510
|
-
- root help: `
|
|
931
|
+
- root help: `cookies set --curl <file>`
|
|
932
|
+
- root help: `storage <local|session>`
|
|
511
933
|
- root help: `diff snapshot`
|
|
934
|
+
- root help: `diff screenshot --baseline`
|
|
512
935
|
- root help: `trace start|stop [path]`
|
|
513
936
|
- root help: `profiler start|stop [path]`
|
|
514
937
|
- root help: `record start <path> [url]`
|
|
938
|
+
- root help: `record stop`
|
|
515
939
|
- root help: `console [--clear]`
|
|
516
940
|
- root help: `errors [--clear]`
|
|
517
941
|
- root help: `highlight <sel>`
|
|
518
942
|
- root help: `inspect`
|
|
519
943
|
- root help: `clipboard <op> [text]`
|
|
520
944
|
- root help: `stream enable [--port <n>]`
|
|
945
|
+
- root help: `stream disable`
|
|
946
|
+
- root help: `stream status`
|
|
521
947
|
- root help: `react tree`
|
|
522
948
|
- root help: `react inspect <id>`
|
|
523
949
|
- root help: `react renders start`
|
|
524
950
|
- root help: `react renders stop [--json]`
|
|
525
951
|
- root help: `react suspense [--only-dynamic] [--json]`
|
|
526
952
|
- root help: `vitals [url] [--json]`
|
|
527
|
-
- root help: `pushstate <url>`
|
|
528
953
|
- root help: `removeinitscript <id>`
|
|
529
|
-
-
|
|
530
|
-
-
|
|
531
|
-
-
|
|
532
|
-
-
|
|
954
|
+
- network help: `request <requestId>`
|
|
955
|
+
- network help: `har <start|stop>`
|
|
956
|
+
- storage help: `set <key> <value>`
|
|
957
|
+
- diff help: `diff screenshot --baseline <f>`
|
|
958
|
+
- trace help: `trace <operation> [path]`
|
|
959
|
+
- profiler help: `--categories <list>`
|
|
960
|
+
- record help: `record restart <path.webm> [url]`
|
|
961
|
+
|
|
962
|
+
##### Batch, auth, confirmations, setup, dashboard, and AI commands
|
|
963
|
+
- root help: `batch [--bail]`
|
|
533
964
|
- root help: `auth save <name>`
|
|
965
|
+
- root help: `auth login <name>`
|
|
534
966
|
- root help: `confirm <id>`
|
|
535
967
|
- root help: `deny <id>`
|
|
536
968
|
- root help: `chat <message>`
|
|
@@ -539,9 +971,104 @@ This generated block is review data for maintainers. The human-authored referenc
|
|
|
539
971
|
- root help: `upgrade`
|
|
540
972
|
- root help: `doctor [--fix]`
|
|
541
973
|
- root help: `profiles`
|
|
542
|
-
-
|
|
543
|
-
-
|
|
544
|
-
-
|
|
974
|
+
- batch help: `--bail`
|
|
975
|
+
- auth help: `--password-stdin`
|
|
976
|
+
- dashboard help: `dashboard [start|stop] [options]`
|
|
977
|
+
- chat help: `chat <message>`
|
|
978
|
+
- doctor help: `--offline`
|
|
979
|
+
- doctor help: `--json`
|
|
980
|
+
|
|
981
|
+
##### Global flags, config, providers, policy, and environment
|
|
982
|
+
- root help: `--profile <name|path>`
|
|
983
|
+
- root help: `AGENT_BROWSER_PROFILE`
|
|
984
|
+
- root help: `--session <name>`
|
|
985
|
+
- root help: `AGENT_BROWSER_SESSION`
|
|
986
|
+
- root help: `--session-name <name>`
|
|
987
|
+
- root help: `AGENT_BROWSER_SESSION_NAME`
|
|
988
|
+
- root help: `--state <path>`
|
|
989
|
+
- root help: `AGENT_BROWSER_STATE`
|
|
990
|
+
- root help: `--auto-connect`
|
|
991
|
+
- root help: `AGENT_BROWSER_AUTO_CONNECT`
|
|
992
|
+
- root help: `--headers <json>`
|
|
993
|
+
- root help: `--init-script <path>`
|
|
994
|
+
- root help: `AGENT_BROWSER_INIT_SCRIPTS`
|
|
995
|
+
- root help: `--enable <feature>`
|
|
996
|
+
- root help: `AGENT_BROWSER_ENABLE`
|
|
997
|
+
- root help: `--executable-path <path>`
|
|
998
|
+
- root help: `AGENT_BROWSER_EXECUTABLE_PATH`
|
|
999
|
+
- root help: `--extension <path>`
|
|
1000
|
+
- root help: `AGENT_BROWSER_EXTENSIONS`
|
|
1001
|
+
- root help: `--args <args>`
|
|
1002
|
+
- root help: `AGENT_BROWSER_ARGS`
|
|
1003
|
+
- root help: `--user-agent <ua>`
|
|
1004
|
+
- root help: `AGENT_BROWSER_USER_AGENT`
|
|
1005
|
+
- root help: `--proxy <server>`
|
|
1006
|
+
- root help: `AGENT_BROWSER_PROXY`
|
|
1007
|
+
- root help: `HTTP_PROXY / HTTPS_PROXY`
|
|
1008
|
+
- root help: `ALL_PROXY`
|
|
1009
|
+
- root help: `--proxy-bypass <hosts>`
|
|
1010
|
+
- root help: `AGENT_BROWSER_PROXY_BYPASS`
|
|
1011
|
+
- root help: `NO_PROXY`
|
|
1012
|
+
- root help: `--ignore-https-errors`
|
|
1013
|
+
- root help: `AGENT_BROWSER_IGNORE_HTTPS_ERRORS`
|
|
1014
|
+
- root help: `--allow-file-access`
|
|
1015
|
+
- root help: `AGENT_BROWSER_ALLOW_FILE_ACCESS`
|
|
1016
|
+
- root help: `--headed`
|
|
1017
|
+
- root help: `AGENT_BROWSER_HEADED`
|
|
1018
|
+
- root help: `--cdp <port>`
|
|
1019
|
+
- root help: `--color-scheme <scheme>`
|
|
1020
|
+
- root help: `AGENT_BROWSER_COLOR_SCHEME`
|
|
1021
|
+
- root help: `--download-path <path>`
|
|
1022
|
+
- root help: `AGENT_BROWSER_DOWNLOAD_PATH`
|
|
1023
|
+
- root help: `--engine <name>`
|
|
1024
|
+
- root help: `AGENT_BROWSER_ENGINE`
|
|
1025
|
+
- root help: `--no-auto-dialog`
|
|
1026
|
+
- root help: `AGENT_BROWSER_NO_AUTO_DIALOG`
|
|
1027
|
+
- root help: `--json`
|
|
1028
|
+
- root help: `AGENT_BROWSER_JSON`
|
|
1029
|
+
- root help: `--annotate`
|
|
1030
|
+
- root help: `AGENT_BROWSER_ANNOTATE`
|
|
1031
|
+
- root help: `--screenshot-dir <path>`
|
|
1032
|
+
- root help: `AGENT_BROWSER_SCREENSHOT_DIR`
|
|
1033
|
+
- root help: `--screenshot-quality <n>`
|
|
1034
|
+
- root help: `AGENT_BROWSER_SCREENSHOT_QUALITY`
|
|
1035
|
+
- root help: `--screenshot-format <fmt>`
|
|
1036
|
+
- root help: `AGENT_BROWSER_SCREENSHOT_FORMAT`
|
|
1037
|
+
- root help: `--content-boundaries`
|
|
1038
|
+
- root help: `AGENT_BROWSER_CONTENT_BOUNDARIES`
|
|
1039
|
+
- root help: `--max-output <chars>`
|
|
1040
|
+
- root help: `AGENT_BROWSER_MAX_OUTPUT`
|
|
1041
|
+
- root help: `--allowed-domains <list>`
|
|
1042
|
+
- root help: `AGENT_BROWSER_ALLOWED_DOMAINS`
|
|
1043
|
+
- root help: `--action-policy <path>`
|
|
1044
|
+
- root help: `AGENT_BROWSER_ACTION_POLICY`
|
|
1045
|
+
- root help: `--confirm-actions <list>`
|
|
1046
|
+
- root help: `AGENT_BROWSER_CONFIRM_ACTIONS`
|
|
1047
|
+
- root help: `--confirm-interactive`
|
|
1048
|
+
- root help: `AGENT_BROWSER_CONFIRM_INTERACTIVE`
|
|
1049
|
+
- root help: `--provider <name>`
|
|
1050
|
+
- root help: `AGENT_BROWSER_PROVIDER`
|
|
1051
|
+
- root help: `agent-browser -p ios device list`
|
|
1052
|
+
- root help: `agent-browser -p ios swipe up`
|
|
1053
|
+
- root help: `agent-browser -p ios tap @e1`
|
|
1054
|
+
- root help: `--device <name>`
|
|
1055
|
+
- root help: `AGENT_BROWSER_IOS_DEVICE`
|
|
1056
|
+
- root help: `--model <name>`
|
|
1057
|
+
- root help: `AI_GATEWAY_MODEL`
|
|
1058
|
+
- root help: `--verbose`
|
|
1059
|
+
- root help: `--quiet`
|
|
1060
|
+
- root help: `--debug`
|
|
1061
|
+
- root help: `AGENT_BROWSER_DEBUG`
|
|
1062
|
+
- root help: `--config <path>`
|
|
1063
|
+
- root help: `AGENT_BROWSER_CONFIG`
|
|
1064
|
+
- root help: `AGENT_BROWSER_DEFAULT_TIMEOUT`
|
|
1065
|
+
- root help: `AGENT_BROWSER_STREAM_PORT`
|
|
1066
|
+
- root help: `AGENT_BROWSER_IDLE_TIMEOUT_MS`
|
|
1067
|
+
- root help: `AGENT_BROWSER_ENCRYPTION_KEY`
|
|
1068
|
+
- root help: `AGENT_BROWSER_STATE_EXPIRE_DAYS`
|
|
1069
|
+
- root help: `AGENT_BROWSER_IOS_UDID`
|
|
1070
|
+
- root help: `AI_GATEWAY_URL`
|
|
1071
|
+
- root help: `AI_GATEWAY_API_KEY`
|
|
545
1072
|
|
|
546
1073
|
</details>
|
|
547
1074
|
<!-- agent-browser-capability-baseline:end capability-token-baseline -->
|