Commit Graph

4 Commits

Author SHA1 Message Date
Teknium
433e420be4 refactor(browser): drop /browser use, the browser.manage use action and the downgrade notice
browser_exec is the only core browser path, so there is no Browser Use /
built-in tools switch to flip and no silent downgrade to announce.

- classic CLI, Ink TUI and the gateway browser.manage RPC lose the `use`
  action (contract regenerated: BrowserAction, enabled, browser_use);
- /browser status no longer reports a mode; the Chromium-fallback line for
  Lightpanda and the dead "chrome" engine row go with the built-in tools;
- browser_backend_notice leaves the session snapshot, the CLI banner and
  the canonical contract.

TUI locale packs and _keys.tui.json drop the five slashCmd.ops.browser
keys whose only caller was `/browser use`.
2026-10-23 01:41:24 -07:00
Teknium
084d1189a9 fix(gateway): /browser connect and disconnect run in the session's profile
637e3c682e and 386669d219 refused connect/disconnect on any gateway that
can multiplex. Multiplexing is the default, so no one could live-connect a
browser from Ink, Desktop or the classic CLI.

browser.manage now publishes and withdraws the requesting profile's live
endpoint and reaps only that profile's browsers (the per-profile scope from
the previous commit). It runs in the session's profile_home or the ticket's
home (_profile_scoped; dispatch_legacy binds a foreign ticket's scope), so
the multiplex refusal in ws_legacy_fallback is removed, with its
browser_profile_shared code, the classic CLI mapping and the 17 locale
strings that d10d0c5aef added. The classic CLI still refuses connect and
disconnect against a remote gateway (Desktop's rule).

Tests (real legacy fallback, real SessionAuthorities, real WS socket):
connect from A leaves B on its own endpoint; a profile hot-served after A's
connect resolves its own; A's disconnect leaves B's live connection and
browsers; a single-profile gateway connects as before.

Refs #134889 (CLI-9)
2026-10-18 21:49:56 -07:00
Teknium
d10d0c5aef fix(cli): show the gateway's named /browser refusal, not request_failed
The real GatewayClient keeps only bounded reason codes from an owner's
error, so the multi-profile /browser refusal (prose only) reached the
classic CLI as "request_failed". The owner now sends
data.reason=browser_profile_shared beside the prose, and the CLI maps that
code to its own catalog text (all 17 locales). Remote prose stays
sanitized.

Review #141357 (F5).

Refs #134889 (CLI-9)
2026-10-18 20:38:37 -07:00
Teknium
e7cea8729c fix(cli): classic /browser goes to the gateway as browser.manage, profile-safe
The browser tools run in the gateway, but the classic CLI's /browser connect
rewrote only its own process's BROWSER_CDP_URL, so nothing the agent used
changed. Ink and Desktop already send browser.manage.

- Classic CLI: on a gateway session, /browser connect|disconnect|status|use
  call browser.manage (session-bound). connect/disconnect are refused locally
  against a remote (non-loopback HERMES_TUI_GATEWAY_URL) gateway, Desktop's rule.
- Gateway (ws_legacy_fallback): connect/disconnect now run when the owner
  serves ONE profile (every chat on it is that profile's), and are refused by
  name when it serves several. The live CDP endpoint and the browser reap are
  process-wide, and there is no per-profile browser scope in this lane, so a
  browser one profile connects can never reach another profile's sessions.
  status/use still answer everywhere.

Refs #134889 (CLI-9)
Refs #141321
2026-10-18 19:52:35 -07:00