feat: add doctor command for diagnosing installs and cleaning stale daemon state (#1254)

* feat: add `doctor` command for install diagnostics and cleanup

Adds `agent-browser doctor`, a one-shot diagnostic that checks
environment, Chrome install, daemon state, config, encryption key,
providers, network reachability, and a live headless launch test.
Auto-cleans stale `.sock` / `.pid` / `.version` / `.stream` sidecar
files on every run. Destructive repairs (reinstall Chrome, purge old
state, close version-mismatched daemons, generate missing encryption
key) are gated behind `--fix`. Supports `--offline`, `--quick`, and
`--json`.

* fixes
This commit is contained in:
Chris Tate
2026-04-16 18:20:41 -05:00
committed by GitHub
parent 4cc6ca40b7
commit 14ece9b3ad
21 changed files with 2294 additions and 125 deletions
+4
View File
@@ -771,6 +771,10 @@ pub fn clean_args(args: &[String]) -> Vec<String> {
"--verbose",
"-q",
"--quiet",
// doctor-specific flags; harmless on other commands (ignored)
"--offline",
"--quick",
"--fix",
];
// Global flags that always take a value (need to skip the next arg too)
const GLOBAL_FLAGS_WITH_VALUE: &[&str] = &[