Commit Graph

10 Commits

Author SHA1 Message Date
Laith Weinberger a31809b83d preserve error exit code 2026-03-25 17:15:34 -04:00
Laith Weinberger c9ea2fb1cf fix daemon orphaning when external browser dies on --connect/--cdp-url 2026-03-25 17:07:03 -04:00
ShawnPana 54f3febdfa address PR review comments: fix cloud v2 --help, guard double signal, error to stderr, stale port
- Narrow cloud --help intercept to only fire when --help is immediately
  after 'cloud', so 'cloud v2 --help' still shows OpenAPI endpoints
- Guard signal handler against concurrent shutdown tasks on repeated signals
- Route error response bodies to stderr in cloud REST commands
- Replace stale port 49200 in README Windows troubleshooting
2026-03-19 22:04:34 -07:00
ShawnPana c5885e9e06 store shutdown task reference to prevent browser orphaning on signal exit
await the shutdown task in run() so browser cleanup (kill/stop) completes
before the event loop tears down. Previously, asyncio.run() could cancel
the shutdown mid-cleanup, leaving Chrome processes orphaned.
2026-03-19 21:55:14 -07:00
ShawnPana 9980a9ea4f remove redundant string quotes on type annotations in daemon.py 2026-03-19 21:21:18 -07:00
ShawnPana bff2918558 add --connect flag for Chrome auto-discovery and fix daemon shutdown for external browsers
Adds `--connect` to auto-discover running Chrome instances via DevToolsActivePort
files and well-known port probing, eliminating manual CDP URL construction. Fixes
daemon process hanging on `close` when connected to external browsers (--connect,
--cdp-url, cloud) by calling stop() (disconnect) instead of kill() (terminate).
2026-03-18 09:41:58 -07:00
ShawnPana 3318f56318 simplify CLI infrastructure: single-session daemon, remove install modes, streamline setup
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-15 10:12:41 -07:00
ShawnPana 0dc2fc5a6f remove run command and agent infrastructure from CLI
The `run` command pulled in heavy SDK dependencies (openai, anthropic,
google), had a bug (await on sync get_llm), and is superseded by
`browser-use cloud` for agent execution. CLI is now purely a browser
automation interface.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-12 11:44:13 -07:00
ShawnPana 4be221386b changes 2026-03-11 12:57:50 -07:00
ShawnPana 859cb97063 simplify daemon architecture: single session, socket-as-liveness, no PID/lock files
Replace the multi-session server (server.py, SessionRegistry, portalocker locking,
PID files, orphan detection) with a minimal daemon (daemon.py) that holds one
BrowserSession in memory. Socket file existence = alive. Auto-exits when browser
dies via CDP watchdog.

-2277 lines, +142 lines across 20 files.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-03 19:05:44 -08:00