Repository navigation
feat(browser): host the opentask extension bridge and relay browser tools per turn - #228
Merged
Merged
Conversation
…ools per turn Closes #189
edenreich
marked this pull request as ready for review
September 14, 2026 11:29
4 tasks
…the opentask side panel
Contributor
|
🎉 This PR is included in version 0.33.0 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
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.
Summary
Makes the unchanged opentask extension connectable to the desktop app. The desktop now hosts the persistent extension-facing WebSocket bridge (default
127.0.0.1:52789, protocol percli/docs/browser-extension-protocol.md) and, per agent turn, dials the child CLI's own bridge (moved to52790viaINFER_BROWSER_USE_EXTENSION_PORT) as if it were the extension, relayingbrowser_command/browser_resultframes. Browser frames are relayed verbatim; side-panel frames are answered by the desktop (see below). A dot above the composer shows connected/disconnected while browser use is enabled.Closes #189.
Closes #229 - the approval deny shortcut is now
d(matching the Deny label) instead ofr;astill approves. Both e2e specs that pressedrupdated.Resolved open questions from the issue:
INFER_BROWSER_USE_EXTENSION_PORTalready works through the CLI's viper sidecar-env walker (verified against infer v0.192.0: the headless bridge binds the env port and logs a bind failure gracefully when it is taken).list_conversations,resume_conversation,new_session,user_message,interrupt,list_models/select_model,set_mode,list_skills,list_historyandapproval_responseitself from its own conversation store and sessions, and mirrors the running turn as raw AG-UIchat_eventframes plus the user echo.tool_request(the extension GitHub features) gets a graceful unsupportedtool_result.infersession is documented as "desktop wins while running".Changes
backend/src/browser_bridge.rs(new): extension server (/wspath + extension-origin check,browser_hellotoken gate with constant-time compare,browser_hello_ack, newest connection wins, 20s pings), per-turn CLI relay with a fast synthesizedbrowser_resulterror when no extension is connected, cleanstop()(listener closed, sockets shut down, accept thread joined). One thread per socket, no lock held across I/O.backend/src/lib.rs,backend/src/agent.rs:AppState.browser_bridge, autostart in setup, stop on exit, per-turn env + relay dial; commandsbrowser_use_status/set_browser_use_enabled(writes~/.infer/browser_use.yaml, seeds a token, preserves CLI-owned keys).backend/Cargo.toml: addtungstenite0.30 andrand0.10.BrowserBridgeDotnext to the status bar driven by thebrowser-bridgeTauri event.Docs follow-up
Filed: inference-gateway/docs#676
[DOCS] Desktop: browser use via the opentask extension