ghost-bridge 0.7.0 → 0.7.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/README.md +3 -18
- package/dist/server.js +11 -11
- package/extension/background.js +10 -547
- package/extension/bg-dom.js +441 -0
- package/extension/bg-network.js +194 -0
- package/extension/manifest.json +1 -3
- package/package.json +1 -1
- package/extension/icon-32.png +0 -0
package/README.md
CHANGED
|
@@ -18,21 +18,6 @@ Most browser-capable AI tools start a separate browser. Ghost Bridge connects AI
|
|
|
18
18
|
- Click, type, scroll, and submit forms on the current page
|
|
19
19
|
- Share one Chrome transport across multiple MCP clients
|
|
20
20
|
|
|
21
|
-
## What's New in 0.6.1
|
|
22
|
-
|
|
23
|
-
- `list_network_requests` and `get_network_detail` now summarize `data:` URLs and oversized URLs so inline images and long query strings do not overwhelm model context
|
|
24
|
-
|
|
25
|
-
## What's New in 0.7.0
|
|
26
|
-
|
|
27
|
-
- The default bridge token is now the fixed local value `ghost-bridge-local` instead of a monthly rotating token, avoiding extension/server mismatches across month boundaries while keeping `GHOST_BRIDGE_TOKEN` available for manual override
|
|
28
|
-
|
|
29
|
-
## What's New in 0.6.0
|
|
30
|
-
|
|
31
|
-
- `inspect_page` now collects structured page data and interactive elements in one browser-side snapshot, reducing duplicate DOM scans and cutting one round-trip from the hot path
|
|
32
|
-
- `capture_screenshot` now defaults to JPEG for better transfer efficiency: visible viewport screenshots default to `quality: 80`, and `fullPage` screenshots default to `quality: 70`
|
|
33
|
-
- Use `format: "png"` when you need high-fidelity text rendering, 1px lines, icon edges, transparency, or pixel-level UI inspection
|
|
34
|
-
- Attachment and request cleanup paths are more robust under concurrent usage and multi-client reconnect scenarios
|
|
35
|
-
|
|
36
21
|
## Quick Start
|
|
37
22
|
|
|
38
23
|
### 1. Install
|
|
@@ -44,7 +29,7 @@ ghost-bridge init
|
|
|
44
29
|
|
|
45
30
|
`ghost-bridge init` currently writes config for:
|
|
46
31
|
|
|
47
|
-
- Claude Code: `~/.claude.json`
|
|
32
|
+
- Claude Code: `~/.claude/settings.json` or `~/.claude.json`
|
|
48
33
|
- Codex: `~/.codex/config.toml`
|
|
49
34
|
- Cursor: `~/.cursor/mcp.json`
|
|
50
35
|
- Antigravity: `~/.gemini/antigravity/mcp.json`
|
|
@@ -111,7 +96,7 @@ Typical prompts:
|
|
|
111
96
|
| `dispatch_action` | Click, fill, press, scroll, hover, select |
|
|
112
97
|
| `list_network_requests` | Inspect captured network traffic |
|
|
113
98
|
| `get_network_detail` | Read one request in detail |
|
|
114
|
-
| `get_last_error` | Inspect recent
|
|
99
|
+
| `get_last_error` | Inspect recent console, exception, and network error events |
|
|
115
100
|
| `get_script_source` | Extract page scripts |
|
|
116
101
|
| `find_by_string` | Search within bundled script content |
|
|
117
102
|
| `coverage_snapshot` | Identify active scripts quickly |
|
|
@@ -134,7 +119,7 @@ Notes:
|
|
|
134
119
|
| Setting | Default | Notes |
|
|
135
120
|
|---------|---------|-------|
|
|
136
121
|
| Port | `33333` | Set `GHOST_BRIDGE_PORT` to override |
|
|
137
|
-
| Token |
|
|
122
|
+
| Token | Monthly UUID | Set `GHOST_BRIDGE_TOKEN` to override |
|
|
138
123
|
| Auto detach | `false` | Keeps debugger attached for ongoing capture |
|
|
139
124
|
|
|
140
125
|
## Architecture
|
package/dist/server.js
CHANGED
|
@@ -28999,7 +28999,7 @@ server.setRequestHandler(ListToolsRequestSchema, async () => ({
|
|
|
28999
28999
|
tools: [
|
|
29000
29000
|
{
|
|
29001
29001
|
name: "inspect_page",
|
|
29002
|
-
description: "\
|
|
29002
|
+
description: "\u9875\u9762\u5206\u6790\u5165\u53E3\u3002\u8FD4\u56DE\u9875\u9762\u5143\u6570\u636E\u3001\u7ED3\u6784\u5316\u6458\u8981\u548C\u53EF\u4EA4\u4E92\u5143\u7D20\u6982\u89C8\uFF0C\u9002\u5408\u5148\u5FEB\u901F\u4E86\u89E3\u5F53\u524D\u9875\u9762\u3002",
|
|
29003
29003
|
inputSchema: {
|
|
29004
29004
|
type: "object",
|
|
29005
29005
|
properties: {
|
|
@@ -29025,7 +29025,7 @@ server.setRequestHandler(ListToolsRequestSchema, async () => ({
|
|
|
29025
29025
|
},
|
|
29026
29026
|
{
|
|
29027
29027
|
name: "get_last_error",
|
|
29028
|
-
description: "\u83B7\u53D6\u5F53\u524D\u6807\u7B7E\u6700\u8FD1\u7684\
|
|
29028
|
+
description: "\u83B7\u53D6\u5F53\u524D\u6807\u7B7E\u6700\u8FD1\u7684\u63A7\u5236\u53F0\u3001\u5F02\u5E38\u548C\u7F51\u7EDC\u9519\u8BEF\u4E8B\u4EF6\u3002\u9ED8\u8BA4\u53EA\u8FD4\u56DE error\uFF1B\u5982\u9700\u67E5\u770B console.log / console.warn\uFF0C\u8BF7\u4F20 severity=info / warn / all\u3002",
|
|
29029
29029
|
inputSchema: {
|
|
29030
29030
|
type: "object",
|
|
29031
29031
|
properties: {
|
|
@@ -29043,7 +29043,7 @@ server.setRequestHandler(ListToolsRequestSchema, async () => ({
|
|
|
29043
29043
|
},
|
|
29044
29044
|
{
|
|
29045
29045
|
name: "get_script_source",
|
|
29046
|
-
description: "\u6293\u53D6\u76EE\u6807\u811A\u672C\u6E90\u7801\
|
|
29046
|
+
description: "\u6293\u53D6\u76EE\u6807\u811A\u672C\u6E90\u7801\u7247\u6BB5\uFF0C\u652F\u6301\u6309 URL \u7247\u6BB5\u7B5B\u9009\u548C\u53EF\u9009 beautify\u3002",
|
|
29047
29047
|
inputSchema: {
|
|
29048
29048
|
type: "object",
|
|
29049
29049
|
properties: {
|
|
@@ -29067,7 +29067,7 @@ server.setRequestHandler(ListToolsRequestSchema, async () => ({
|
|
|
29067
29067
|
},
|
|
29068
29068
|
{
|
|
29069
29069
|
name: "find_by_string",
|
|
29070
|
-
description: "\u5728\u5F53\u524D\u9875\u9762\u811A\u672C\u5185\u6309\u5B57\u7B26\u4E32\u641C\u7D22\uFF0C\u8FD4\u56DE\u5339\u914D\
|
|
29070
|
+
description: "\u5728\u5F53\u524D\u9875\u9762\u811A\u672C\u5185\u6309\u5B57\u7B26\u4E32\u641C\u7D22\uFF0C\u8FD4\u56DE\u5339\u914D\u4E0A\u4E0B\u6587\u3002",
|
|
29071
29071
|
inputSchema: {
|
|
29072
29072
|
type: "object",
|
|
29073
29073
|
properties: {
|
|
@@ -29094,7 +29094,7 @@ server.setRequestHandler(ListToolsRequestSchema, async () => ({
|
|
|
29094
29094
|
},
|
|
29095
29095
|
{
|
|
29096
29096
|
name: "list_network_requests",
|
|
29097
|
-
description: "\u5217\u51FA\u6355\u83B7\u7684\u7F51\u7EDC\u8BF7\u6C42\uFF0C\u652F\u6301\u6309 URL\u3001\u65B9\u6CD5\u3001\u72B6\u6001\
|
|
29097
|
+
description: "\u5217\u51FA\u6355\u83B7\u7684\u7F51\u7EDC\u8BF7\u6C42\uFF0C\u652F\u6301\u6309 URL\u3001\u65B9\u6CD5\u3001\u72B6\u6001\u548C\u7C7B\u578B\u8FC7\u6EE4\u3002\u9ED8\u8BA4\u6309\u6392\u969C\u4F18\u5148\u7EA7\u6392\u5E8F\uFF1Bdata URL \u548C\u8D85\u957F URL \u4F1A\u81EA\u52A8\u6458\u8981\u5316\u3002",
|
|
29098
29098
|
inputSchema: {
|
|
29099
29099
|
type: "object",
|
|
29100
29100
|
properties: {
|
|
@@ -29113,7 +29113,7 @@ server.setRequestHandler(ListToolsRequestSchema, async () => ({
|
|
|
29113
29113
|
},
|
|
29114
29114
|
{
|
|
29115
29115
|
name: "get_network_detail",
|
|
29116
|
-
description: "\u83B7\u53D6\u5355\u4E2A\u7F51\u7EDC\u8BF7\u6C42\
|
|
29116
|
+
description: "\u83B7\u53D6\u5355\u4E2A\u7F51\u7EDC\u8BF7\u6C42\u8BE6\u60C5\uFF0C\u5305\u62EC\u8BF7\u6C42\u5934\u3001\u54CD\u5E94\u5934\u548C\u53EF\u9009\u54CD\u5E94\u4F53\uFF1B\u8D85\u957F URL \u4F1A\u81EA\u52A8\u6458\u8981\u5316\u3002",
|
|
29117
29117
|
inputSchema: {
|
|
29118
29118
|
type: "object",
|
|
29119
29119
|
properties: {
|
|
@@ -29130,7 +29130,7 @@ server.setRequestHandler(ListToolsRequestSchema, async () => ({
|
|
|
29130
29130
|
},
|
|
29131
29131
|
{
|
|
29132
29132
|
name: "perf_metrics",
|
|
29133
|
-
description: "\u83B7\u53D6\u9875\u9762\u6027\u80FD\u6307\u6807\
|
|
29133
|
+
description: "\u83B7\u53D6\u9875\u9762\u6027\u80FD\u6307\u6807\uFF0C\u5305\u62EC\u5F15\u64CE\u7EA7\u6307\u6807\u3001Web Vitals \u548C\u8D44\u6E90\u52A0\u8F7D\u6458\u8981\u3002",
|
|
29134
29134
|
inputSchema: {
|
|
29135
29135
|
type: "object",
|
|
29136
29136
|
properties: {
|
|
@@ -29147,7 +29147,7 @@ server.setRequestHandler(ListToolsRequestSchema, async () => ({
|
|
|
29147
29147
|
},
|
|
29148
29148
|
{
|
|
29149
29149
|
name: "capture_screenshot",
|
|
29150
|
-
description: "\
|
|
29150
|
+
description: "\u622A\u53D6\u5F53\u524D\u9875\u9762\u622A\u56FE\uFF0C\u9002\u5408\u770B\u9875\u9762\u5B9E\u9645\u89C6\u89C9\u6548\u679C\u3001UI \u6837\u5F0F\u548C\u5E03\u5C40\u3002\u9ED8\u8BA4\u4F18\u5148\u4F7F\u7528 JPEG\uFF1B\u9700\u8981\u6587\u5B57\u3001\u7EC6\u7EBF\u6216\u900F\u660E\u80CC\u666F\u7EC6\u8282\u65F6\u6539\u7528 PNG\u3002",
|
|
29151
29151
|
inputSchema: {
|
|
29152
29152
|
type: "object",
|
|
29153
29153
|
properties: {
|
|
@@ -29179,7 +29179,7 @@ server.setRequestHandler(ListToolsRequestSchema, async () => ({
|
|
|
29179
29179
|
},
|
|
29180
29180
|
{
|
|
29181
29181
|
name: "get_page_content",
|
|
29182
|
-
description: "\
|
|
29182
|
+
description: "\u63D0\u53D6\u5F53\u524D\u9875\u9762\u7684\u6587\u672C\u3001HTML \u6216\u7ED3\u6784\u5316\u6570\u636E\u3002\u6BD4\u622A\u56FE\u66F4\u8F7B\u91CF\uFF0C\u9002\u5408\u5148\u770B\u6587\u5B57\u3001DOM \u7ED3\u6784\u548C\u9875\u9762\u5143\u6570\u636E\uFF1B\u4E0D\u53CD\u6620 CSS\uFF0C\u4E5F\u4E0D\u542B iframe \u5185\u5BB9\u3002",
|
|
29183
29183
|
inputSchema: {
|
|
29184
29184
|
type: "object",
|
|
29185
29185
|
properties: {
|
|
@@ -29205,7 +29205,7 @@ server.setRequestHandler(ListToolsRequestSchema, async () => ({
|
|
|
29205
29205
|
},
|
|
29206
29206
|
{
|
|
29207
29207
|
name: "get_interactive_snapshot",
|
|
29208
|
-
description: "\
|
|
29208
|
+
description: "\u626B\u63CF\u5F53\u524D\u9875\u9762\u53EF\u89C1\u7684\u53EF\u4EA4\u4E92\u5143\u7D20\uFF0C\u8FD4\u56DE\u5E26 ref \u7684\u7CBE\u7B80\u5217\u8868\uFF0C\u4F9B\u540E\u7EED dispatch_action \u4F7F\u7528\u3002\u652F\u6301 Shadow DOM\uFF1B\u4EC5\u7528\u4E8E\u4EA4\u4E92\u5B9A\u4F4D\u3002",
|
|
29209
29209
|
inputSchema: {
|
|
29210
29210
|
type: "object",
|
|
29211
29211
|
properties: {
|
|
@@ -29226,7 +29226,7 @@ server.setRequestHandler(ListToolsRequestSchema, async () => ({
|
|
|
29226
29226
|
},
|
|
29227
29227
|
{
|
|
29228
29228
|
name: "dispatch_action",
|
|
29229
|
-
description: "\
|
|
29229
|
+
description: "\u5BF9 get_interactive_snapshot \u8FD4\u56DE\u7684\u5143\u7D20\u6267\u884C\u70B9\u51FB\u3001\u8F93\u5165\u3001\u6309\u952E\u3001\u6EDA\u52A8\u3001\u9009\u62E9\u3001\u60AC\u505C\u6216\u805A\u7126\u3002\u26A0\uFE0F \u4F7F\u7528\u524D\u5FC5\u987B\u5148\u8C03\u7528 get_interactive_snapshot \u83B7\u53D6 ref\uFF1B\u64CD\u4F5C\u540E\u5EFA\u8BAE\u518D\u9A8C\u8BC1\u9875\u9762\u72B6\u6001\u3002",
|
|
29230
29230
|
inputSchema: {
|
|
29231
29231
|
type: "object",
|
|
29232
29232
|
properties: {
|