Skip to content

webbridge v2.1.1 — 扩展空闲优化与可选 Go MCP 前端

Latest

Choose a tag to compare

@daidaiJ daidaiJ released this 20 Nov 13:52

webbridge v2.1.1

A local MCP bridge that gives agents control of the user's real browser: real tabs, logins,
extensions, and window state. Everything stays on 127.0.0.1.

This release adds the optional Go MCP front end and removes duplicate extension idle polling.
The Node entry remains the default; the extension and page scripts stay JavaScript.

Extension idle optimization

The extension previously ran two 30-second alarms: the upstream webbridge-reconcile keepalive
and a second webbridge-handoff alarm that polled /handoff even while the push WebSocket was
connected.

  • The handoff fallback now reuses webbridge-reconcile; there is only one resident 30-second
    alarm.
  • While the push WebSocket is connected, /handoff is not polled. A 5-minute watchdog checks the
    receiver and closes a silently dead push socket.
  • When the push socket is down, the 30-second fallback poll is unchanged.
  • In-flight checks are guarded so a watchdog and a handoff event cannot overlap.

Measured in a real Edge session with the push socket connected:

Metric Before After
Resident 30-second alarms 2 1
Alarm events per hour 240 120
/handoff GETs per hour 120 12
/handoff GETs per hour, push offline 120 120

A 95-second before sample produced 6 alarm events and 3 GETs; a 65-second after sample produced
2 alarm events and 0 GETs. chrome.alarms.getAll() now lists only webbridge-reconcile.

The 30-second control-channel ping remains: it is required to keep the MV3 service worker alive
for low-latency tool calls. Deeper idle savings would require accepting first-call latency while
the worker sleeps.

Optional Go MCP front end

cmd/webbridge-mcp is a functionally equivalent Go implementation of the MCP runtime. It talks
to the same daemon, shares the generated tool catalog, page scripts, and ~/.webbridge lifecycle
files, and leaves the extension and page scripts in JavaScript. Node remains the default entry
point and the source of truth for tool definitions.

Fixed-overhead measurements on the same Windows machine with the same fake daemon:

Metric Node Go
MCP connect 469 ms 44 ms
Forwarded call p50 2.30 ms 1.26 ms
Idle RSS 72 MB 14 MB
Distribution Node + 95 production npm packages one 8.8 MB binary

Build it from the extracted release directory:

npm run go:build
# dist/webbridge-mcp[.exe]

The release bundle includes cmd/, internal/, go.mod, go.sum, the catalog/build scripts,
and the Go parity and benchmark tests, so the build instructions work without cloning the repo.

Protocol documentation corrected

docs/PROTOCOL.md now matches the actual daemon-extension messages:

{ "type": "tool_call", "requestId": "call-1", "payload": { "name": "snapshot", "args": {} } }
{ "type": "tool_result", "responseToRequestId": "call-1", "payload": { "data": {} } }

It also records why loopback WebSocket + JSON is the right transport for this topology and why
HTTP long-polling, SSE + POST, WebTransport, Unix sockets, and native messaging are worse fits.

Release contents

webbridge-2.1.1.zip (956,531 bytes) contains:

  • SKILL.md and skill/SKILL.md
  • src/ Node MCP server and shared/ page scripts
  • cmd/, internal/, go.mod, go.sum for the optional Go entry
  • scripts/ Go catalog/build scripts and test/ Go parity/bench tests
  • extension/ a built, loadable unpacked MV3 extension
  • docs/, README.md, README.EN.md, INSTALL.md, DESIGN.md, SECURITY.md,
    CONTRIBUTING.md, NOTICE.md, LICENSE, package.json, package-lock.json

browser-bridge-2.1.1.zip (795,670 bytes) contains only the built extension for loading unpacked.

SHA-256:

3a7ff9a7079517698c79d7ebcb566d89a6f641113b8e4e23d8a9416e0e169a8e  webbridge-2.1.1.zip
a6431eb6ac8d15f0cf0c203f43ccd7094f582bc4c6cf88773eeffc987ae4ca1e  browser-bridge-2.1.1.zip

Verification

  • npm test: catalog, smoke, tools, capture, and lifecycle pass.
  • go test -race ./...: all Go packages pass.
  • node test/go-parity.mjs: core 13 tools / 24 calls and full 40 tools / 23 calls match.
  • Extracted release smoke: npm ci --omit=dev, npm run go:build, and Go parity pass from the
    release ZIP.
  • Real Edge: push handoff opens the popup, resume clears it, the real reconcile alarm applies a
    fallback handoff, and direct tool calls return tool_result envelopes with page content.
  • Release extension contains no __WB_PROFILE__ marker.

Install

  1. Download webbridge-2.1.1.zip and the upstream Browser Bridge daemon for your platform.
  2. Place the daemon at ~/.kimi-webbridge/bin/kimi-webbridge[.exe] or set WEBBRIDGE_BIN.
  3. Extract the zip, run npm ci --omit=dev, and load extension/ unpacked.
  4. Point the MCP client at node <extracted>/src/server.mjs.
  5. Optionally run npm run go:build and point the client at dist/webbridge-mcp[.exe].
  6. Copy SKILL.md into the client's skill directory if the client uses skills.

Notes

  • One daemon accepts one browser connection at a time.
  • The browser execution layer and daemon are upstream Browser Bridge components; see
    NOTICE.md for licensing.
  • The release does not include the local profiling build or debug patches.
  • Product interaction draws on Tabbit CLI's task/session/tab-group model; the MCP interface is
    organized around an agent workflow.