Local-first Firefox browser control harness with a ChatMock-backed decision loop.
- Local agent server on
127.0.0.1:4317 - Firefox extension with injected overlay UI
- Server-backed extension runtime updates for the overlay/content layer
- ChatMock-backed model adapter that drives one tool call at a time
- Shared schemas, tool validation, policy checks, and task loop persistence
- Extension build that emits a Firefox-ready zip
npm installnpm run dev now bootstraps the local model path automatically:
npm run devOn the first run it will:
- build the packaged Firefox extension files in
apps/extension-firefox/dist/ - clone ChatMock into
.vendor/chatmock/ - create a local Python virtualenv
- install ChatMock's Python requirements
- run
chatmock.py loginif your ChatGPT session is not already configured - start ChatMock on
http://127.0.0.1:8000 - start the BrowserControl agent on
http://127.0.0.1:4317
If you want to point BrowserControl at an already-running ChatMock instance, set:
export BROWSERCONTROL_CHATMOCK_BASE_URL=http://127.0.0.1:8000npm run build:settings
npm run devThe debug page is served at http://127.0.0.1:4317/.
Run the focused test suite with:
npm testnpm run build:extensionThis produces:
apps/extension-firefox/dist/apps/extension-firefox/build/browsercontrol-firefox.zip
Load the zip contents in Firefox with about:debugging -> This Firefox -> Load Temporary Add-on, or unzip it first and point Firefox at manifest.json.
After the extension is installed once, the packaged add-on now acts as a bootstrap:
- On startup and before reinjection, the background script asks the local agent server for the latest extension runtime bundle.
- The bundle is cached in
storage.localand reused if the server is temporarily unavailable. - Overlay/content changes in
apps/extension-firefox/src/andapps/extension-firefox/assets/overlay.cssare served directly by the agent, so normal iteration no longer requiresnpm run build:extension. - Background-script changes still require reloading the temporary add-on in Firefox after
npm run devrebuilds the package.
- The model receives a screenshot plus a compact target map for visible interactive elements.
- The model issues one tool call at a time, such as
click_target,type_target, orgo_back. - After each interaction, BrowserControl captures a clean screenshot with the injected UI hidden and returns the refreshed target map.
What still requires a rebuild:
manifest.json- the packaged bootstrap entrypoints
- toolbar icons and other packaged metadata
The robot icon was sourced from Lucide's bot.svg icon: