feat: add parallel mode and idle daemon shutdown

This commit is contained in:
leeguooooo
2026-03-05 13:40:34 +09:00
parent 8880aa2f35
commit 5970579d7c
16 changed files with 775 additions and 330 deletions
+19 -5
View File
@@ -208,13 +208,15 @@ agent-browser get text @e1 --json
### Parallel Workflows
```bash
agent-browser --session-name site1 open https://site-a.com
agent-browser --session-name site2 open https://site-b.com
agent-browser --parallel site1 open https://site-a.com
agent-browser --parallel site2 open https://site-b.com
agent-browser --session-name site1 snapshot -i
agent-browser --session-name site2 snapshot -i
agent-browser --parallel site1 snapshot -i
agent-browser --parallel site2 snapshot -i
```
Use `--parallel <name>` for stateless throughput tasks (navigation, extraction, checks). For login/auth continuity, use `--session-name` instead.
### Connect to Existing Chrome
By default in this fork, commands without `--cdp` auto-attach to your existing browser with this order:
@@ -244,6 +246,18 @@ agent-browser --wait-until domcontentloaded open https://example.com
pnpm run check:turnstile-testkey
```
### Daemon Lifecycle
Daemons auto-shutdown after 10 minutes of inactivity.
Use `--resident` for long-running workflows that should not auto-close:
```bash
agent-browser --resident open https://example.com
# keep running until explicit close
agent-browser close
```
### Color Scheme (Dark Mode)
```bash
@@ -489,7 +503,7 @@ These behaviors are always active. For sensitive sites, combine with `--headed`
## Session Management and Cleanup
`--session` is ignored in this fork. The runtime always uses one default session. Use `--session-name` to isolate persistence when needed.
`--session` is ignored in this fork. Runtime defaults to `default`; use `--parallel <name>` for isolated concurrent channels, and `--session-name` for persistence isolation.
Always close your browser session when done to avoid leaked processes: