@btraut/browser-bridge 0.7.3 → 0.8.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +25 -1
- package/README.md +49 -4
- package/dist/api.js +3922 -3239
- package/dist/api.js.map +4 -4
- package/dist/index.js +1027 -142
- package/dist/index.js.map +4 -4
- package/extension/dist/background.js +853 -23
- package/extension/dist/background.js.map +3 -3
- package/extension/dist/content.js +84 -2
- package/extension/dist/content.js.map +2 -2
- package/extension/dist/options-ui.js +59 -1
- package/extension/dist/options-ui.js.map +2 -2
- package/extension/manifest.json +17 -5
- package/package.json +1 -1
- package/skills/browser-bridge/skill.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -6,7 +6,31 @@ The format is based on "Keep a Changelog", and this project adheres to Semantic
|
|
|
6
6
|
|
|
7
7
|
## [Unreleased]
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
## [0.8.1] - 2026-02-14
|
|
10
|
+
|
|
11
|
+
### Added
|
|
12
|
+
|
|
13
|
+
- CLI: `browser-bridge dev info` now prints resolved runtime details (host/port + source, deterministic port, worktree id, metadata path, log dir, and metadata snapshot).
|
|
14
|
+
- CLI: `browser-bridge dev activate` now resolves runtime, persists metadata for the current worktree, and opens extension options with activation query params.
|
|
15
|
+
|
|
16
|
+
### Changed
|
|
17
|
+
|
|
18
|
+
- Runtime metadata now supports persisted `extension_id` so extension targeting can survive across sessions/worktrees.
|
|
19
|
+
- Extension options activation flow now applies `corePort` from activation query params via `chrome.storage.local` and then clears the query string to prevent repeated re-application on refresh.
|
|
20
|
+
|
|
21
|
+
### Fixed
|
|
22
|
+
|
|
23
|
+
- `drive.go_back` / `drive.go_forward` no longer hang when history navigation unloads the page before content-script messaging completes; history dispatch is deferred, background completion waits for deterministic top-level navigation signals, and tab messaging now has an explicit timeout guard.
|
|
24
|
+
|
|
25
|
+
## [0.8.0] - 2026-02-14
|
|
26
|
+
|
|
27
|
+
### Changed
|
|
28
|
+
|
|
29
|
+
- `drive.click` now dispatches deferred clicks through CDP `Input.dispatchMouseEvent` in the extension background path, with locator point resolution coming from the content script.
|
|
30
|
+
- `drive.hover` and `drive.drag` now run through CDP mouse movement/press/release events in the extension background path, with HTML snapshot capture handled as a separate internal content action.
|
|
31
|
+
- `drive.key`, `drive.key_press`, and `drive.type` now route through CDP keyboard/text input commands in the extension background path, while content script target helpers only resolve/validate editable targets.
|
|
32
|
+
- `drive.select` and `drive.fill_form` now run CDP-backed focus/typing primitives first, with explicit content-script fallback for control-specific operations that CDP does not map directly.
|
|
33
|
+
- Added `docs/cdp-input-model.md` plus stronger assertions in `scripts/cli-full-tool-smoke.sh` to validate focus/value/drag side effects during CDP-input smoke runs.
|
|
10
34
|
|
|
11
35
|
## [0.7.3] - 2026-02-14
|
|
12
36
|
|
package/README.md
CHANGED
|
@@ -82,6 +82,14 @@ What makes it different:
|
|
|
82
82
|
- **Recovery-first**: sessions have an explicit state machine with `session.recover()` and `diagnostics doctor`.
|
|
83
83
|
- **Inspect beyond screenshots**: DOM snapshots (AX + HTML) and `inspect dom-diff` to detect page changes.
|
|
84
84
|
|
|
85
|
+
## Input Semantics
|
|
86
|
+
|
|
87
|
+
Drive input actions are CDP-first (Chrome DevTools Protocol `Input.*`) so click, hover, drag, key, and type behavior follows Chrome's native input pipeline instead of synthetic DOM event dispatch.
|
|
88
|
+
|
|
89
|
+
High-level helpers (`drive.select`, `drive.fill_form`) still use explicit fallback branches for control-specific operations that CDP does not model directly (for example selecting by option value/text/index).
|
|
90
|
+
|
|
91
|
+
See `docs/cdp-input-model.md` for details and smoke verification.
|
|
92
|
+
|
|
85
93
|
## 🆚 Feature Comparison
|
|
86
94
|
|
|
87
95
|
| Category | Browser Bridge | Playwright MCP | agent-browser | mcp-chrome | Claude Code + Chrome |
|
|
@@ -226,12 +234,12 @@ Codex:
|
|
|
226
234
|
codex mcp add browser-bridge -- browser-bridge mcp
|
|
227
235
|
```
|
|
228
236
|
|
|
229
|
-
Optional custom host/port:
|
|
237
|
+
Optional custom host/port (use `browser-bridge dev info` to get the current worktree port):
|
|
230
238
|
|
|
231
239
|
```bash
|
|
232
240
|
codex mcp add browser-bridge \
|
|
233
241
|
--env BROWSER_BRIDGE_CORE_HOST=127.0.0.1 \
|
|
234
|
-
--env BROWSER_BRIDGE_CORE_PORT
|
|
242
|
+
--env BROWSER_BRIDGE_CORE_PORT=<port-from-dev-info> \
|
|
235
243
|
-- browser-bridge mcp
|
|
236
244
|
```
|
|
237
245
|
|
|
@@ -241,17 +249,54 @@ Claude Code:
|
|
|
241
249
|
claude mcp add --transport stdio browser-bridge -- browser-bridge mcp
|
|
242
250
|
```
|
|
243
251
|
|
|
244
|
-
Optional custom host/port:
|
|
252
|
+
Optional custom host/port (use `browser-bridge dev info` to get the current worktree port):
|
|
245
253
|
|
|
246
254
|
```bash
|
|
247
255
|
claude mcp add --transport stdio browser-bridge \
|
|
248
256
|
--env BROWSER_BRIDGE_CORE_HOST=127.0.0.1 \
|
|
249
|
-
--env BROWSER_BRIDGE_CORE_PORT
|
|
257
|
+
--env BROWSER_BRIDGE_CORE_PORT=<port-from-dev-info> \
|
|
250
258
|
-- browser-bridge mcp
|
|
251
259
|
```
|
|
252
260
|
|
|
253
261
|
</details>
|
|
254
262
|
|
|
263
|
+
## 🔁 Multi-Worktree Dev Loop
|
|
264
|
+
|
|
265
|
+
Use this loop any time you switch worktrees.
|
|
266
|
+
|
|
267
|
+
1. Resolve runtime for the current worktree:
|
|
268
|
+
|
|
269
|
+
```bash
|
|
270
|
+
browser-bridge dev info --json
|
|
271
|
+
```
|
|
272
|
+
|
|
273
|
+
Use the `port`, `worktreeId`, `metadataPath`, and `logDir` from output.
|
|
274
|
+
|
|
275
|
+
2. Activate extension routing for this worktree (required for extension-driving tasks):
|
|
276
|
+
|
|
277
|
+
```bash
|
|
278
|
+
browser-bridge dev activate --extension-id <id>
|
|
279
|
+
```
|
|
280
|
+
|
|
281
|
+
After the first run, you can usually omit `--extension-id` because it is saved in `.context/browser-bridge/dev.json`.
|
|
282
|
+
|
|
283
|
+
3. Run your CLI/MCP workflow in this worktree.
|
|
284
|
+
|
|
285
|
+
## 🧯 Worktree Troubleshooting
|
|
286
|
+
|
|
287
|
+
- Missing extension id: Run `browser-bridge dev activate --extension-id <id>`. Or set `BROWSER_BRIDGE_EXTENSION_ID=<id>`. You can copy the id from `chrome://extensions` (enable Developer mode to see ids).
|
|
288
|
+
- Activation URL did not open in Chrome: Run `browser-bridge dev activate --json`, copy `result.activationUrl`, and open it directly in Chrome. `dev activate` uses the OS URL opener, so your default browser setting matters.
|
|
289
|
+
- Logs and per-stream JSONL inspection: Logs are under `.context/logs/browser-bridge/`. Common streams: `cli.jsonl`, `core.jsonl`, `mcp-adapter.jsonl` (plus rotated files like `core.1.jsonl`).
|
|
290
|
+
|
|
291
|
+
```bash
|
|
292
|
+
ls -1 .context/logs/browser-bridge
|
|
293
|
+
tail -n 80 .context/logs/browser-bridge/cli.jsonl
|
|
294
|
+
tail -n 80 .context/logs/browser-bridge/core.jsonl
|
|
295
|
+
tail -n 80 .context/logs/browser-bridge/mcp-adapter.jsonl
|
|
296
|
+
```
|
|
297
|
+
|
|
298
|
+
- Do not assume port `3210` across worktrees: Default port is deterministic per worktree and may differ. Always check `browser-bridge dev info` (or pass explicit `--port` / `BROWSER_BRIDGE_CORE_PORT`).
|
|
299
|
+
|
|
255
300
|
## 🩺 Diagnostics
|
|
256
301
|
|
|
257
302
|
- CLI: `browser-bridge diagnostics doctor --session-id <id>`
|