feat: add CDP tab-group plugin handshake with silent fallback

This commit is contained in:
leeguooooo
2026-03-03 12:17:14 +09:00
parent d04cf59238
commit 2a766cfe48
19 changed files with 1079 additions and 249 deletions
+13 -8
View File
@@ -116,7 +116,7 @@ agent-browser wait --download [path] # Wait for download
Control how `open`/`navigate` handles verification or captcha interstitials:
```bash
agent-browser --risk-mode warn open https://example.com # default: retry and warn with riskSignals
agent-browser --risk-mode warn open https://example.com # default: wait for auto-clear, then retry/warn with riskSignals
agent-browser --risk-mode block open https://example.com # fail fast on detection
agent-browser --risk-mode off open https://example.com # disable detection/retry
```
@@ -134,17 +134,21 @@ Use `--download-path <dir>` (or `AGENT_BROWSER_DOWNLOAD_PATH` env) to set a defa
```bash
agent-browser open https://example.com
# Local Chromium launch auto-groups tabs under "Agent Browser Stealth"
# CDP mode groups tabs when tab-group plugin is installed
# Override the default group title
agent-browser --tab-group "My Agent Group" open https://example.com
```
Local Chromium launches auto-create/reuse the `Agent Browser Stealth` tab group and move newly opened agent tabs into that group.
CDP mode uses a browser extension handshake to group tabs.
- Supported only for local Chromium launches.
- In CDP (`--cdp` / `--auto-connect`) and cloud provider modes, the flag is ignored with a warning.
- Use `--tab-group` or `AGENT_BROWSER_TAB_GROUP` to override the default group title.
- Extension available: tabs are grouped by `session`.
- Extension missing/unavailable: silent no-op (commands still succeed).
- Default titles:
- `default` session: `Agent Browser Stealth`
- non-default: `Agent Browser Stealth • <session>`
- Use `--tab-group` / `AGENT_BROWSER_TAB_GROUP` for base title.
- Use `AGENT_BROWSER_TAB_GROUP_PLUGIN_ID` (or `--tab-group-plugin-id`) to override expected extension ID.
## Mouse
@@ -276,7 +280,7 @@ agent-browser reload # Reload page
```bash
--session <name> # Isolated browser session
--session-name <name> # Auto-save/restore session state (cookies, localStorage)
--session-name <name> # Auto-save/restore session state (defaults to --session when omitted)
--state <path> # Load storage state from JSON file
--headers <json> # HTTP headers scoped to URL's origin
--executable-path <path> # Custom browser executable
@@ -296,7 +300,8 @@ agent-browser reload # Reload page
--headed # Show browser window (not headless)
--cdp <port|url> # Connect via Chrome DevTools Protocol (port or WebSocket URL)
--auto-connect # Auto-discover and connect to running Chrome
--tab-group <name> # Override default agent tab group title (Chromium local launch only)
--tab-group <name> # Base title for agent tab groups (CDP plugin mode)
--tab-group-plugin-id <id> # Expected extension ID for tab-group handshake
--debug # Debug output (includes stealth connection type + capabilities)
```