* dashboard

* fix: re-apply download behavior on recording context (#1019)

* fix: re-apply download behavior on recording context

record start creates a new browser context via Target.createBrowserContext.
Browser.setDownloadBehavior called at launch only applies to the default
context, so downloads in the recording context are silently dropped.

Fix:
1. Store download_path on BrowserManager (from LaunchOptions)
2. After creating the recording context, call Browser.setDownloadBehavior
   with the new browserContextId

This ensures downloads work during recording.

Fixes #1018

* fix: add download_path to third BrowserManager constructor (auto_connect_cdp)

* fix: reap zombie Chrome process and fast-detect crash for auto-restart (#1023)

When Chrome crashes (e.g. SIGTRAP from CHECK() assertion), the daemon
now:

1. Reaps the zombie immediately via a SIGCHLD handler in the event loop
   that calls waitpid(-1, WNOHANG)
2. Detects the crash instantly on the next command via a non-blocking
   try_wait() check (has_process_exited), avoiding the 3-second CDP
   timeout that is_connection_alive() would incur
3. Auto-relaunches Chrome transparently for the caller

Fixes #1017

Co-authored-by: ctate <366502+ctate@users.noreply.github.com>

* fix: route keyboard type through text input (#1014)

* fix: handle --clear flag in console command (#1015)

The console and errors commands parsed --clear from CLI args but the
action handlers silently ignored the flag. The handlers did not accept
the cmd parameter so they had no way to read the clear field.

Changes:
- Add clear_console() method to EventTracker in network.rs
- Update handle_console to accept cmd, read the clear field, and clear
  the buffer when --clear is passed (returns {cleared: true})
- Update call site in execute_command to pass cmd

Co-authored-by: xuyongliang <yongliang.xyl@alibaba-inc.com>

* chore: patch release - ### Bug Fixes

- **Re-apply download behavior on r... (#1025)

* Add runtime stream enable/disable/status commands (#951)

* Add runtime stream management commands

* Run rustfmt and satisfy clippy

* Fix stream disable cleanup semantics

* Format stream disable regression tests

* fix: retain radio/checkbox elements in compact snapshot tree (#1008)

compact_tree() checked for "[ref=" to identify lines worth keeping, but
radio and checkbox elements render as e.g. [checked=false, ref=e1] where
the "[" opens before "checked=", not "ref=". Dropping the leading bracket
so the check is just "ref=" fixes the match for all elements with refs.

Fixes #1006

Co-authored-by: ctate <366502+ctate@users.noreply.github.com>

* chore: version packages (#1027)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

* fixes

* dashboard

* fixes

* remove observe

* fmt

* fixes

* fixes

* jotai

* fmt

* upload dashboard

---------

Co-authored-by: Stefan Smiljkovic <stefan@vanila.io>
Co-authored-by: ctate <366502+ctate@users.noreply.github.com>
Co-authored-by: zhanba <c5e1856@gmail.com>
Co-authored-by: xuyongliang <478439790@qq.com>
Co-authored-by: xuyongliang <yongliang.xyl@alibaba-inc.com>
Co-authored-by: Thomas Kosiewski <thoma471@googlemail.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
This commit is contained in:
Chris Tate
2026-03-26 08:43:35 -07:00
committed by GitHub
co-authored by ctate github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Stefan Smiljkovic zhanba xuyongliang xuyongliang Thomas Kosiewski
parent 63f03b8e06
commit f9174513c2
58 changed files with 17881 additions and 108 deletions
+49 -5
View File
@@ -1596,12 +1596,15 @@ Examples:
r##"
agent-browser close - Close the browser
Usage: agent-browser close
Usage: agent-browser close [options]
Closes the browser instance for the current session.
Aliases: quit, exit
Options:
--all Close all active sessions
Global Options:
--json Output as JSON
--session <name> Use specific session
@@ -1609,6 +1612,7 @@ Global Options:
Examples:
agent-browser close
agent-browser close --session mysession
agent-browser close --all
"##
}
@@ -2388,6 +2392,40 @@ Examples:
"##
}
// === Dashboard ===
"dashboard" => {
r##"
agent-browser dashboard - Observability dashboard
Usage: agent-browser dashboard [start|stop|install] [options]
Manage the observability dashboard, a local web UI that shows live
browser viewports and command activity feeds for all sessions.
Subcommands:
start [--port <n>] Start the dashboard server (default port: 4848)
stop Stop the dashboard server
install Download and install the dashboard to ~/.agent-browser/dashboard/
Running 'agent-browser dashboard' with no subcommand is equivalent to 'dashboard start'.
The dashboard runs as a standalone background process, independent of
browser sessions. All sessions automatically stream to the dashboard.
Options:
--port <n> Port for the dashboard server (default: 4848)
Global Options:
--json Output as JSON
Examples:
agent-browser dashboard install
agent-browser dashboard start
agent-browser dashboard start --port 8080
agent-browser dashboard stop
"##
}
// === Connect ===
"connect" => {
r##"
@@ -2446,8 +2484,8 @@ Notes:
- 'stream enable' creates the WebSocket server.
- WebSocket clients trigger frame streaming automatically.
- 'screencast_start' and 'screencast_stop' still control explicit CDP screencasts.
- AGENT_BROWSER_STREAM_PORT only affects daemon startup; use 'stream enable'
for sessions that are already running.
- Streaming is always enabled. Set AGENT_BROWSER_STREAM_PORT to bind to a
specific port instead of the default OS-assigned port.
Global Options:
--json Output as JSON
@@ -2652,7 +2690,7 @@ Core Commands:
snapshot Accessibility tree with refs (for AI)
eval <js> Run JavaScript
connect <port|url> Connect to browser via CDP
close Close browser
close [--all] Close browser (--all closes every session)
Navigation:
back Go back
@@ -2729,10 +2767,16 @@ Sessions:
session Show current session name
session list List active sessions
Dashboard:
dashboard [start] Start the dashboard server (default port: 4848)
dashboard start --port <n> Start on a specific port
dashboard stop Stop the dashboard server
Setup:
install Install browser binaries
install --with-deps Also install system dependencies (Linux)
upgrade Upgrade to the latest version
dashboard install Install the observability dashboard
Snapshot Options:
-i, --interactive Only interactive elements
@@ -2827,7 +2871,7 @@ Environment:
AGENT_BROWSER_SESSION_NAME Auto-save/load state persistence name
AGENT_BROWSER_STATE_EXPIRE_DAYS Auto-delete saved states older than N days (default: 30)
AGENT_BROWSER_ENCRYPTION_KEY 64-char hex key for AES-256-GCM session encryption
AGENT_BROWSER_STREAM_PORT Enable WebSocket streaming on port (e.g., 9223)
AGENT_BROWSER_STREAM_PORT Override WebSocket streaming port (default: OS-assigned)
AGENT_BROWSER_IDLE_TIMEOUT_MS Auto-shutdown daemon after N ms of inactivity (disabled by default)
AGENT_BROWSER_IOS_DEVICE Default iOS device name
AGENT_BROWSER_IOS_UDID Default iOS device UDID