feat(app): surface browser tools as extensions - #1861
Merged
Conversation
Contributor
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
- ensureBrowserPlugin() adds opencode-chrome-devtools to workspace opencode.jsonc - resolveAgentTemplate() bakes the Electron CDP port into agent instructions - embedded.ts passes OPENCODE_BROWSER_URL env to managed OpenCode sidecar - Agent instructions now include explicit browser_url and tool names
benjaminshafii
force-pushed
the
feat/extension-browser-tools
branch
from
May 22, 2026 00:09
90290c6 to
9436dac
Compare
Member
Author
End-to-end test results (browser extension tools)Fixes in this update
Test results (dev instance,
|
| Test | Result | Details |
|---|---|---|
| Test 1: Built-in Browser navigate | PASS | Agent used browser_list → browser_navigate with correct browser_url: "http://127.0.0.1:9223". Browser panel navigated to example.com. Response: "Example Domain" |
| Test 2: Built-in Browser interaction | PASS | Full tool chain: browser_list → browser_navigate → browser_snapshot → browser_eval → browser_fill → browser_eval → browser_snapshot. Searched Google for "opencode ai", returned first result: "OpenCode | The open source AI coding agent" |
| Test 3: Chrome CDP | Skipped | Requires user Chrome with remote debugging enabled |
| Test 4: Extension toggle | PASS | Disabling OpenWork Browser via localStorage hides it from composer Extensions menu (4→3). Re-enabling restores it |
Root cause of previous failure
The opencode-chrome-devtools plugin was npm-installed but not declared in the workspace opencode.jsonc, so OpenCode never loaded it. The agent fell back to curl/webfetch because browser_navigate etc. did not exist as tools.
- ensureBrowserPlugin now removes legacy MCP entries (openwork-browser, chrome, chrome-devtools, control-chrome) and adds the plugin - Only touches OpenWork-owned workspaces or workspaces with legacy MCPs - Preserves non-browser MCP entries (e.g. openwork-ui) - Electron always exposes CDP on port 9223 (or OPENWORK_ELECTRON_REMOTE_DEBUG_PORT) so the browser plugin can connect in production builds
… evals - Remove unused OPENCODE_BROWSER_URL from embedded server env - Add evals/browser-extension-flows.md with 7 flows covering plugin loading, browser navigation, composer extensions, toggle, and stale MCP migration
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
Tests
Local typecheck
pnpm --filter @openwork/app typecheck: all errors are pre-existing ondev(motion/react, react-resizable-panels, @heroicons, xlsx modules missing). No new errors introduced by this PR.Daytona Electron test (sandbox:
openwork-eval-20260520-185458)Flow 1: Create workspace - PASS
feat/extension-browser-tools, installed depshttps://9825-wfwvlrjxrefuym5a.daytonaproxy01.net#/workspace/ws_b0a42e5bae15/sessionExtensions page - PASS
OpenWork Browser detail modal - PASS
Chrome detail modal - PASS
chrome://inspect/#remote-debugginginstructionsComposer tool menu - PASS
Browser panel - PASS
Right-pane extensions - PASS
"Connect an extension" starter card - PASS
AI Providers (regression check) - PASS
Electron logs - CLEAN
Commands run