Skip to content

feat: auto-launch Chromium-family browser for CDP - #29106

Merged
teknium1 merged 2 commits into
mainfrom
hermes/hermes-e82b1fb4
May 20, 2026
Merged

teknium1 merged 2 commits into
mainfrom
hermes/hermes-e82b1fb4

Conversation

@teknium1

Copy link
Copy Markdown
Collaborator

Salvage of #21612 (@H-Ali13381) onto current main. Original branch was 936 commits behind; cherry-picked the two scoped browser commits cleanly.

/browser connect now auto-launches Chrome, Chromium, Brave, or Edge — Chrome first whenever it's installed, fall through to the next family if Chrome isn't there or fails to launch. CDP readiness check is upgraded from raw TCP probe to a real /json/version HTTP probe so we don't treat random listeners on port 9222 as a connected browser. CLI/TUI/docs/tool descriptions updated from Chrome-only wording to Chromium-family.

Changes

  • hermes_cli/browser_connect.py: group launch candidates by family (Chrome → Chromium → Brave → Edge) on Linux/macOS/Windows + add explicit install paths (/opt/google/chrome, /snap/bin/brave, /opt/brave.com/..., /opt/microsoft/msedge/..., brave-browser-stable, microsoft-edge-stable, msedge); try_launch_chrome_debug() now iterates candidates and continues on Popen failure; new is_browser_debug_ready() HTTP probe
  • cli.py /browser connect: use the CDP readiness probe instead of plain TCP connect
  • tui_gateway/server.py + ui-tui/src/app/slash/commands/ops.ts: aligned messaging
  • tools/browser_camofox.py, tools/browser_cdp_tool.py, tools/browser_dialog_tool.py, hermes_cli/commands.py, hermes_cli/tips.py: Chrome-only → Chromium-family wording
  • Docs: browser-supervisor.md, integrations/index.md, slash-commands.md, configuration.md, features/browser.md, features/overview.md
  • Tests: +154 lines covering Brave/Edge candidate detection, Chrome-first precedence, multi-candidate fallback launches, CDP endpoint probing

Validation

scripts/run_tests.sh tests/cli/test_cli_browser_connect.py tests/test_tui_gateway_server.py -k 'browser_manage or ChromeDebugLaunch or browser_connect or brave or chromium or edge' → 36/36 passed (1.55s).
py_compile clean on all 6 touched Python modules.

Closes #21612.

Add browser CDP launch candidates for Chrome, Chromium, Brave, and Edge while preserving Chrome-first selection. Retry candidate launch failures instead of giving up after the first executable.

Update /browser CLI and TUI messaging, docs, and tool descriptions from Chrome-only wording to Chromium-family browser support. Add regression coverage for Brave/Edge paths, Chrome-first precedence, fallback launches, and CDP endpoint probing.
@teknium1
teknium1 merged commit 6a6766f into main May 20, 2026
17 of 18 checks passed
@teknium1
teknium1 deleted the hermes/hermes-e82b1fb4 branch May 20, 2026 05:34
@github-actions

Copy link
Copy Markdown
Contributor

🔎 Lint report: hermes/hermes-e82b1fb4 vs origin/main

ruff

Total: 0 on HEAD, 0 on base (➖ 0)

🆕 New issues: none

✅ Fixed issues: none

Unchanged: 0 pre-existing issues carried over.

ty (type checker)

Total: 8973 on HEAD, 8973 on base (➖ 0)

🆕 New issues: none

✅ Fixed issues: none

Unchanged: 4730 pre-existing issues carried over.

Diagnostics are surfaced as warnings — this check never fails the build.

@alt-glitch alt-glitch added type/feature New feature or request tool/browser Browser automation (CDP, Playwright) comp/cli CLI entry point, hermes_cli/, setup wizard comp/tui Terminal UI (ui-tui/ + tui_gateway/) P3 Low — cosmetic, nice to have labels May 20, 2026
@teknium1

Copy link
Copy Markdown
Collaborator Author

infographic

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp/cli CLI entry point, hermes_cli/, setup wizard comp/tui Terminal UI (ui-tui/ + tui_gateway/) P3 Low — cosmetic, nice to have tool/browser Browser automation (CDP, Playwright) type/feature New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants