chrome-bridge-mcp 1.28.0 → 1.29.0
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/README.md +1 -1
- package/extension/manifest.json +1 -1
- package/extension/service-worker.js +24 -2
- package/package.json +1 -1
- package/server/protocol.js +1 -1
package/README.md
CHANGED
|
@@ -25,7 +25,7 @@ CI. Self-hosted, local-only. Works on ChromeOS.
|
|
|
25
25
|
**Requires** Node.js 18+ and Chrome 135+.
|
|
26
26
|
|
|
27
27
|
```bash
|
|
28
|
-
git clone
|
|
28
|
+
git clone https://github.com/frsorrentino/chrome-bridge.git
|
|
29
29
|
cd chrome-bridge && ./install.sh
|
|
30
30
|
```
|
|
31
31
|
|
package/extension/manifest.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"manifest_version": 3,
|
|
3
3
|
"name": "Chrome Bridge for Claude Code",
|
|
4
|
-
"version": "1.
|
|
4
|
+
"version": "1.29.0",
|
|
5
5
|
"description": "Bridge your browser to Claude Code: 66 token-efficient web-dev automation tools over a local WebSocket. ChromeOS included.",
|
|
6
6
|
"homepage_url": "https://github.com/frsorrentino/chrome-bridge",
|
|
7
7
|
"minimum_chrome_version": "135",
|
|
@@ -1266,6 +1266,25 @@ async function cmdReadPage({ mode = 'text', tab_id, frame_id }) {
|
|
|
1266
1266
|
|
|
1267
1267
|
// --- create_tab ---
|
|
1268
1268
|
|
|
1269
|
+
// Bounds reali di una finestra appena creata, confrontati con quelli chiesti.
|
|
1270
|
+
// Il window manager può cambiarli in silenzio: su ChromeOS una finestra di
|
|
1271
|
+
// 320 px nasce larga 501 (15-16/09). Senza il confronto il chiamante misura a
|
|
1272
|
+
// una larghezza che non ha.
|
|
1273
|
+
async function windowBoundsReport(windowId, requested) {
|
|
1274
|
+
const asked = Object.fromEntries(Object.entries(requested).filter(([, v]) => typeof v === 'number'));
|
|
1275
|
+
if (!Object.keys(asked).length) return {};
|
|
1276
|
+
const w = await chrome.windows.get(windowId);
|
|
1277
|
+
const actual = { left: w.left, top: w.top, width: w.width, height: w.height };
|
|
1278
|
+
const differ = Object.keys(asked).filter((k) => actual[k] !== asked[k]);
|
|
1279
|
+
return {
|
|
1280
|
+
window_bounds: actual,
|
|
1281
|
+
...(differ.length && {
|
|
1282
|
+
bounds_note: `The window manager changed ${differ.map((k) => `${k} ${asked[k]}→${actual[k]}`).join(', ')}`
|
|
1283
|
+
+ ' (on ChromeOS a window is at least ~500 px wide). For a narrower viewport use emulate_media({device:{width,height}}) (visual group, debugger).',
|
|
1284
|
+
}),
|
|
1285
|
+
};
|
|
1286
|
+
}
|
|
1287
|
+
|
|
1269
1288
|
async function cmdCreateTab({ url, active = true, new_window = false, left, top, width, height }) {
|
|
1270
1289
|
if (new_window) {
|
|
1271
1290
|
// windows.create con i bounds apre direttamente sul monitor scelto: left è
|
|
@@ -1280,9 +1299,11 @@ async function cmdCreateTab({ url, active = true, new_window = false, left, top,
|
|
|
1280
1299
|
if (url && tab) {
|
|
1281
1300
|
await waitForComplete(tab.id);
|
|
1282
1301
|
const updated = await chrome.tabs.get(tab.id);
|
|
1283
|
-
return { id: updated.id, url: updated.url, title: updated.title, window_id: win.id
|
|
1302
|
+
return { id: updated.id, url: updated.url, title: updated.title, window_id: win.id,
|
|
1303
|
+
...await windowBoundsReport(win.id, { left, top, width, height }) };
|
|
1284
1304
|
}
|
|
1285
|
-
return { id: tab?.id, url: tab?.url || 'chrome://newtab', title: tab?.title || '', window_id: win.id
|
|
1305
|
+
return { id: tab?.id, url: tab?.url || 'chrome://newtab', title: tab?.title || '', window_id: win.id,
|
|
1306
|
+
...await windowBoundsReport(win.id, { left, top, width, height }) };
|
|
1286
1307
|
}
|
|
1287
1308
|
const opts = { active };
|
|
1288
1309
|
if (url) opts.url = url;
|
|
@@ -1452,6 +1473,7 @@ async function cmdMoveTab({ tab_id, window_id, new_window = false, window_type,
|
|
|
1452
1473
|
new_window: true,
|
|
1453
1474
|
index: 0,
|
|
1454
1475
|
same_window: before.windowId === win.id,
|
|
1476
|
+
...await windowBoundsReport(win.id, { left, top, width, height }),
|
|
1455
1477
|
};
|
|
1456
1478
|
}
|
|
1457
1479
|
const moved = await chrome.tabs.move(tab_id, { windowId: window_id, index });
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "chrome-bridge-mcp",
|
|
3
3
|
"mcpName": "io.github.frsorrentino/chrome-bridge",
|
|
4
|
-
"version": "1.
|
|
4
|
+
"version": "1.29.0",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"description": "Chrome Bridge by frsorrentino: MCP server that lets Claude Code borrow a tab from your own logged-in Chrome and hand it back — logins, 2FA and CAPTCHAs stay with you (handoff). 66 tools; 2.8-4.3× cheaper and up to 9.3× fewer turns than Claude in Chrome, measured; ChromeOS included.",
|
|
7
7
|
"main": "server/index.js",
|