fix(omnio): scope browser clients to conversations - #54
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This is the Hermes client layer of the conversation-browser isolation work. It makes the stable Hermes session id the browser identity at every CDP, recovery, and cleanup boundary. Omnia-side browser ownership and process isolation land separately; background jobs and file paths are higher layers in this stack.
Conversation-scoped browser client
Hermes consumes an additive
BROWSER_CDP_URL_TEMPLATEand expands it with the current API session id. The same identity is sent to Toolbox recovery calls, so delegated tasks remain inside their parent conversation rather than creating another browser owner.tools/browser_tool.pyresolves the session-aware endpoint before the legacy static override and scopes recovery headers toHERMES_SESSION_ID.tools/browser_cdp_tool.pyattaches page-domain commands only when one unambiguous page exists; callers must providetarget_idwhen several pages exist.tools/browser_camofox.pyyields to the Omnio template just as it already yielded to the static CDP override.website/docs/reference/environment-variables.mddocuments the new template contract.Safe cleanup and recovery
Provider-owned Chrome processes are no longer closed by an idle
agent-browserdaemon. Hermes stops only its verified local daemon and leaves Chrome lifecycle ownership with Toolbox or the cloud provider. Snapshot and vision failures use the same scoped recovery contract and return a structured reset result that tells the agent to navigate again.Backward compatibility
Backward compatible. New Hermes uses
BROWSER_CDP_URL_TEMPLATEwhen new Omnia supplies it and falls back to the existingBROWSER_CDP_URLagainst old Omnia. Old Hermes continues to use the legacy endpoint exposed by new Omnia. No persisted data or required request field changes.Dependencies and go-live
The stronger isolation requires the paired Omnia browser-runtime stack. Either side can deploy first: mixed versions remain functional but retain legacy Brand-scoped browser sharing until both sides are present and the Sprite is reprovisioned.
Verification
scripts/run_tests.sh tests/tools/test_browser_cdp_override.py tests/tools/test_browser_cdp_tool.py tests/tools/test_browser_cleanup.py tests/tools/test_browser_resilience.py— 82 passed.git diff --check main...HEADpassed.0fb20d9e67e6ada9beb51af90eda35a600c5e5ce.Prepared with Codex.