chrome-bridge-mcp 1.30.4 → 1.30.5
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/extension/manifest.json +1 -1
- package/extension/service-worker.js +22 -5
- package/package.json +1 -1
- package/server/protocol.js +1 -1
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.30.
|
|
4
|
+
"version": "1.30.5",
|
|
5
5
|
"description": "Bridge your browser to Claude Code: 67 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",
|
|
@@ -4821,10 +4821,25 @@ async function cmdDragAndDrop({ source_selector, target_selector, mode = 'html5'
|
|
|
4821
4821
|
const results = await chrome.scripting.executeScript({
|
|
4822
4822
|
target: scriptTarget(tabId, frame_id),
|
|
4823
4823
|
func: async (srcSel, tgtSel, dndMode) => {
|
|
4824
|
-
|
|
4825
|
-
|
|
4826
|
-
|
|
4827
|
-
|
|
4824
|
+
function deepQuery(sel) {
|
|
4825
|
+
if (!sel.includes('>>>')) return document.querySelector(sel);
|
|
4826
|
+
const parts = sel.split('>>>').map((s) => s.trim());
|
|
4827
|
+
let ctx = document;
|
|
4828
|
+
for (let i = 0; i < parts.length; i++) {
|
|
4829
|
+
const found = ctx.querySelector(parts[i]);
|
|
4830
|
+
if (!found) return null;
|
|
4831
|
+
if (i === parts.length - 1) return found;
|
|
4832
|
+
if (!found.shadowRoot) return null;
|
|
4833
|
+
ctx = found.shadowRoot;
|
|
4834
|
+
}
|
|
4835
|
+
return null;
|
|
4836
|
+
}
|
|
4837
|
+
// Un throw qui arrivava come result undefined e diventava {dragged:false}:
|
|
4838
|
+
// un selettore ">>>" (SyntaxError per querySelector) falliva in silenzio.
|
|
4839
|
+
const src = deepQuery(srcSel);
|
|
4840
|
+
if (!src) return { missing: 'Source', selector: srcSel };
|
|
4841
|
+
const tgt = deepQuery(tgtSel);
|
|
4842
|
+
if (!tgt) return { missing: 'Target', selector: tgtSel };
|
|
4828
4843
|
src.scrollIntoView({ block: 'center', behavior: 'instant' });
|
|
4829
4844
|
const sr = src.getBoundingClientRect();
|
|
4830
4845
|
const tr = tgt.getBoundingClientRect();
|
|
@@ -4867,7 +4882,9 @@ async function cmdDragAndDrop({ source_selector, target_selector, mode = 'html5'
|
|
|
4867
4882
|
args: [source_selector, target_selector, mode],
|
|
4868
4883
|
world: 'MAIN',
|
|
4869
4884
|
});
|
|
4870
|
-
|
|
4885
|
+
const out = elementOutcome(results, source_selector);
|
|
4886
|
+
if (out.missing) throw new Error(`${out.missing} element not found: ${out.selector} (no element matches; check it with query_dom)`);
|
|
4887
|
+
return out;
|
|
4871
4888
|
}
|
|
4872
4889
|
|
|
4873
4890
|
// --- clipboard ---
|
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.30.
|
|
4
|
+
"version": "1.30.5",
|
|
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). 67 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",
|