chrome-bridge-mcp 1.23.4 → 1.24.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 CHANGED
@@ -57,10 +57,13 @@ element refs, `click(ref="n1")` follows with no discovery turn in between.
57
57
  For `execute_js`, enable **Allow user scripts** in `chrome://extensions` →
58
58
  Chrome Bridge → Details (on Chrome 135-137, enable Developer Mode instead).
59
59
 
60
- **As a plugin, without a clone:** in Claude Code,
60
+ **As a plugin, without a clone:** inside a Claude Code session,
61
61
  `/plugin install chrome-bridge --marketplace frsorrentino/chrome-bridge`
62
62
  (one command, Claude Code 2.1.275+; on older versions `/plugin marketplace add
63
- frsorrentino/chrome-bridge` then `/plugin install chrome-bridge@chrome-bridge`)
63
+ frsorrentino/chrome-bridge` then `/plugin install chrome-bridge@chrome-bridge`).
64
+ From a shell, `claude plugin install` has no `--marketplace` option: run
65
+ `claude plugin marketplace add frsorrentino/chrome-bridge`, then
66
+ `claude plugin install chrome-bridge@chrome-bridge`. Either way the plugin
64
67
  registers the MCP server from npm (all capabilities) together with the recipes
65
68
  skill; clients that read [Agent Plugins 1.0](https://agent-plugins.org) get the
66
69
  same from `plugin.json` + `mcp.json`. The extension still comes from the Web
@@ -17,6 +17,13 @@
17
17
  if (buf.length >= MAX) buf.shift(); // ring buffer: tieni i più recenti, non i primi 1000
18
18
  buf.push(entry);
19
19
  };
20
+ // Un Error passato a console.error diventava "{}" (JSON.stringify non vede
21
+ // message e stack, che non sono enumerabili): lo stack è l'unica cosa che
22
+ // read_console(sourcemap) può riportare ai sorgenti. Duck typing e non
23
+ // instanceof, perché un Error di un iframe viene da un altro realm.
24
+ const errorText = (v) => (v && typeof v === 'object' && typeof v.message === 'string'
25
+ ? (typeof v.stack === 'string' && v.stack ? v.stack : `${v.name || 'Error'}: ${v.message}`)
26
+ : null);
20
27
  for (const method of ['log', 'warn', 'error', 'info', 'debug']) {
21
28
  const orig = console[method].bind(console);
22
29
  console[method] = (...args) => {
@@ -24,7 +31,7 @@
24
31
  push({
25
32
  level: method,
26
33
  args: args.map((a) => {
27
- try { return typeof a === 'object' ? JSON.stringify(a) : String(a); }
34
+ try { return errorText(a) ?? (typeof a === 'object' ? JSON.stringify(a) : String(a)); }
28
35
  catch { return String(a); }
29
36
  }),
30
37
  timestamp: Date.now(),
@@ -34,12 +41,20 @@
34
41
  };
35
42
  }
36
43
  window.addEventListener('error', (e) => {
37
- try { push({ level: 'error', args: [`Uncaught ${e.message} at ${e.filename || '?'}:${e.lineno || 0}`], timestamp: Date.now() }); } catch {}
44
+ try {
45
+ // Con la colonna il frame diventa url:riga:colonna, risolvibile dalla source map.
46
+ const stack = errorText(e.error);
47
+ push({
48
+ level: 'error',
49
+ args: [stack ? `Uncaught ${stack}` : `Uncaught ${e.message} at ${e.filename || '?'}:${e.lineno || 0}:${e.colno || 0}`],
50
+ timestamp: Date.now(),
51
+ });
52
+ } catch {}
38
53
  }, true);
39
54
  window.addEventListener('unhandledrejection', (e) => {
40
55
  try {
41
56
  let reason;
42
- try { reason = String(e.reason); } catch { reason = '<unstringifiable>'; }
57
+ try { reason = errorText(e.reason) ?? String(e.reason); } catch { reason = '<unstringifiable>'; }
43
58
  push({ level: 'error', args: [`Unhandled rejection: ${reason}`], timestamp: Date.now() });
44
59
  } catch {}
45
60
  });
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "manifest_version": 3,
3
3
  "name": "Chrome Bridge for Claude Code",
4
- "version": "1.23.4",
4
+ "version": "1.24.0",
5
5
  "description": "Bridge your browser to Claude Code: 60 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/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.23.4",
4
+ "version": "1.24.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). 60 tools; about half the cost of Claude in Chrome, measured; ChromeOS included.",
7
7
  "main": "server/index.js",
@@ -93,7 +93,7 @@ export const MessageType = Object.freeze({
93
93
  });
94
94
 
95
95
  // Versione
96
- export const VERSION = '1.23.4';
96
+ export const VERSION = '1.24.0';
97
97
 
98
98
  // Configurazione
99
99
  export const DEFAULT_PORT = 8765;