chrome-bridge-mcp 1.32.0 → 1.32.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.
|
@@ -23,6 +23,10 @@ export function buildMarkdown(doc) {
|
|
|
23
23
|
|
|
24
24
|
const attr = (el, name) => (el.getAttribute ? el.getAttribute(name) : null);
|
|
25
25
|
const clean = (s) => String(s || '').replace(/\s+/g, ' ').trim();
|
|
26
|
+
// childNodes e querySelectorAll sono NodeList nel browser: niente map,
|
|
27
|
+
// filter né some. Senza la copia in array il markdown tornava vuoto su ogni
|
|
28
|
+
// pagina dalla 1.11.0 (test nodelist_markdown).
|
|
29
|
+
const list = (l) => Array.from(l || []);
|
|
26
30
|
|
|
27
31
|
// Dimensioni: il rect è la verità quando c'è un layout, ma su un'immagine non
|
|
28
32
|
// ancora disposta (o in test) restano solo gli attributi.
|
|
@@ -54,7 +58,7 @@ export function buildMarkdown(doc) {
|
|
|
54
58
|
}
|
|
55
59
|
return '';
|
|
56
60
|
}
|
|
57
|
-
const kids = (node.childNodes
|
|
61
|
+
const kids = list(node.childNodes).map(inline).join('');
|
|
58
62
|
if (tag === 'A') {
|
|
59
63
|
const href = attr(node, 'href');
|
|
60
64
|
const label = clean(kids);
|
|
@@ -70,19 +74,19 @@ export function buildMarkdown(doc) {
|
|
|
70
74
|
return kids;
|
|
71
75
|
};
|
|
72
76
|
|
|
73
|
-
const cellsOf = (row) => (row.childNodes
|
|
77
|
+
const cellsOf = (row) => list(row.childNodes)
|
|
74
78
|
.filter((n) => n.nodeType === 1 && (n.tagName === 'TD' || n.tagName === 'TH'))
|
|
75
79
|
.map((c) => clean(c.textContent).replace(/\|/g, '\\|'));
|
|
76
80
|
|
|
77
81
|
const renderTable = (table) => {
|
|
78
|
-
const rows = (table.querySelectorAll ? table.querySelectorAll('tr') : [])
|
|
82
|
+
const rows = list(table.querySelectorAll ? table.querySelectorAll('tr') : []);
|
|
79
83
|
if (!rows.length) return;
|
|
80
84
|
const all = rows.map(cellsOf).filter((r) => r.length);
|
|
81
85
|
if (!all.length) return;
|
|
82
86
|
|
|
83
87
|
// Gli header veri, non un segnaposto: la prima riga se contiene th,
|
|
84
88
|
// altrimenti colonne numerate.
|
|
85
|
-
const firstHasTh = (rows[0].childNodes
|
|
89
|
+
const firstHasTh = list(rows[0].childNodes).some((n) => n.nodeType === 1 && n.tagName === 'TH');
|
|
86
90
|
const header = firstHasTh ? all[0] : all[0].map((_, i) => `col${i + 1}`);
|
|
87
91
|
const body = firstHasTh ? all.slice(1) : all;
|
|
88
92
|
const width = header.length;
|
|
@@ -139,7 +143,7 @@ export function buildMarkdown(doc) {
|
|
|
139
143
|
|
|
140
144
|
// Sommario delle immagini grandi: dice al modello se vale la pena chiedere
|
|
141
145
|
// uno screenshot, al costo di una riga.
|
|
142
|
-
const imgs = (d.body?.querySelectorAll ? d.body.querySelectorAll('img') : [])
|
|
146
|
+
const imgs = list(d.body?.querySelectorAll ? d.body.querySelectorAll('img') : []);
|
|
143
147
|
const significant = imgs.filter((img) => { const { w, h } = sizeOf(img); return w >= 100 && h >= 100; });
|
|
144
148
|
if (significant.length) {
|
|
145
149
|
out.push(`_${significant.length} image(s) at least 100x100 on this page — take a screenshot if the visual matters._`, '');
|
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.32.1",
|
|
5
5
|
"description": "Bridge your browser to Claude Code: 69 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",
|
package/npm-shrinkwrap.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "chrome-bridge-mcp",
|
|
3
|
-
"version": "1.32.
|
|
3
|
+
"version": "1.32.1",
|
|
4
4
|
"lockfileVersion": 3,
|
|
5
5
|
"requires": true,
|
|
6
6
|
"packages": {
|
|
7
7
|
"": {
|
|
8
8
|
"name": "chrome-bridge-mcp",
|
|
9
|
-
"version": "1.32.
|
|
9
|
+
"version": "1.32.1",
|
|
10
10
|
"license": "MIT",
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"@jridgewell/trace-mapping": "^0.3.31",
|
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.32.
|
|
4
|
+
"version": "1.32.1",
|
|
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). 69 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",
|