feat: add optional browser extension bridge backend#115
Draft
sleepyy-dog wants to merge 1 commit into
Draft
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.
Summary
This PR adds an optional browser-extension backend for
web-access.extension/.127.0.0.1:3457viascripts/webext-proxy.mjs.scripts/check-webext.mjsto start the bridge and report whether the extension is connected.references/browser-extension.mdand updatesSKILL.md/README.mdto prefer the extension backend while keeping CDP Proxy as fallback.Why
The current CDP flow still depends on the browser remote-debugging permission path. The extension backend follows the same broad model as local browser bridges: install/authorize the extension once, then let the local daemon communicate with the extension for normal browser operations.
CDP remains available for unsupported edge cases or workflows that need lower-level DevTools control.
Chrome Web Store question
This PR intentionally keeps the extension as a local unpacked extension. Do you think it is worth publishing this browser bridge to the Chrome Web Store later?
If yes, a follow-up could add store-specific packaging, icons/screenshots, privacy disclosure, release zip generation, and any review notes needed for the
debuggerpermission. If not, the unpacked-extension flow can remain the documented local setup.Security notes
127.0.0.1only.ws://127.0.0.1:3457/ext.Originheaders.chrome-extension://....debugger,tabs, and related permissions, so it should be installed from a trusted local checkout.Validation
node --test tests/webext-proxy.test.mjs-> 6 passing testsnode --check scripts/webext-proxy.mjs scripts/webext-proxy-lib.mjs scripts/check-webext.mjs extension/background.js127.0.0.1:3457:check-webextreported ready, openedabout:blank, evaluated JavaScript, read page info, and closed the tab.