ghost-bridge 0.7.0 → 0.8.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 +20 -18
- package/dist/cli.js +266 -140
- package/dist/server.js +137 -38
- package/extension/background.js +246 -628
- package/extension/bg-dom.js +441 -0
- package/extension/bg-network.js +194 -0
- package/extension/manifest.json +1 -3
- package/extension/offscreen.js +64 -21
- package/extension/popup.html +72 -54
- package/extension/popup.js +72 -42
- 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`
|
|
@@ -109,9 +94,14 @@ Typical prompts:
|
|
|
109
94
|
| `get_page_content` | Text, HTML, and structured DOM extraction |
|
|
110
95
|
| `get_interactive_snapshot` | Find clickable and editable elements |
|
|
111
96
|
| `dispatch_action` | Click, fill, press, scroll, hover, select |
|
|
97
|
+
| `pin_current_tab` | Keep Ghost Bridge attached to the current tab while you browse elsewhere |
|
|
98
|
+
| `pin_tab` | Pin a target tab by tab ID, URL fragment, or title fragment |
|
|
99
|
+
| `unpin_tab` | Return to following the focused tab |
|
|
100
|
+
| `get_target_tab` | Show the current target mode and tab |
|
|
101
|
+
| `list_tabs` | List available Chrome tabs |
|
|
112
102
|
| `list_network_requests` | Inspect captured network traffic |
|
|
113
103
|
| `get_network_detail` | Read one request in detail |
|
|
114
|
-
| `get_last_error` | Inspect recent
|
|
104
|
+
| `get_last_error` | Inspect recent console, exception, and network error events |
|
|
115
105
|
| `get_script_source` | Extract page scripts |
|
|
116
106
|
| `find_by_string` | Search within bundled script content |
|
|
117
107
|
| `coverage_snapshot` | Identify active scripts quickly |
|
|
@@ -127,6 +117,7 @@ Recommended flow:
|
|
|
127
117
|
|
|
128
118
|
Notes:
|
|
129
119
|
|
|
120
|
+
- Use `pin_current_tab` when you are debugging a page and need to switch to other tabs without changing the AI target. Use `unpin_tab` to restore the original follow-focused-tab behavior.
|
|
130
121
|
- `list_network_requests` and `get_network_detail` automatically summarize `data:` URLs and very long URLs so inline images or oversized query strings do not overwhelm model context
|
|
131
122
|
|
|
132
123
|
## Configuration
|
|
@@ -134,7 +125,7 @@ Notes:
|
|
|
134
125
|
| Setting | Default | Notes |
|
|
135
126
|
|---------|---------|-------|
|
|
136
127
|
| Port | `33333` | Set `GHOST_BRIDGE_PORT` to override |
|
|
137
|
-
| Token |
|
|
128
|
+
| Token | Monthly UUID | Set `GHOST_BRIDGE_TOKEN` to override |
|
|
138
129
|
| Auto detach | `false` | Keeps debugger attached for ongoing capture |
|
|
139
130
|
|
|
140
131
|
## Architecture
|
|
@@ -151,6 +142,17 @@ flowchart LR
|
|
|
151
142
|
C <-->|"CDP"| D
|
|
152
143
|
```
|
|
153
144
|
|
|
145
|
+
## Troubleshooting
|
|
146
|
+
|
|
147
|
+
If the popup shows `No Bridge` / `Not Found`, it means the Chrome extension could not find a Ghost Bridge WebSocket service on the configured port. It does not necessarily mean your AI client is closed.
|
|
148
|
+
|
|
149
|
+
Run `ghost-bridge status` and check:
|
|
150
|
+
|
|
151
|
+
- `Active WebSocket Service`: the running server path should match the CLI/package you expect
|
|
152
|
+
- `Chrome Extension > Sync`: the installed extension should match the current package
|
|
153
|
+
|
|
154
|
+
If either is out of sync, run `ghost-bridge init`, reload the Chrome extension, and restart the MCP client so the browser, extension copy, and server process all point at the same build.
|
|
155
|
+
|
|
154
156
|
## Limitations
|
|
155
157
|
|
|
156
158
|
- Chrome DevTools on the target tab can conflict with `chrome.debugger.attach`
|