ghost-bridge 0.7.1 → 0.9.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
@@ -16,6 +16,7 @@ Most browser-capable AI tools start a separate browser. Ghost Bridge connects AI
16
16
  - Inspect page structure, text, screenshots, errors, and network traffic
17
17
  - Search and extract script sources, even in production bundles
18
18
  - Click, type, scroll, and submit forms on the current page
19
+ - Bind multiple Chrome tabs as named targets and operate them independently
19
20
  - Share one Chrome transport across multiple MCP clients
20
21
 
21
22
  ## Quick Start
@@ -94,6 +95,14 @@ Typical prompts:
94
95
  | `get_page_content` | Text, HTML, and structured DOM extraction |
95
96
  | `get_interactive_snapshot` | Find clickable and editable elements |
96
97
  | `dispatch_action` | Click, fill, press, scroll, hover, select |
98
+ | `bind_tab` | Bind a Chrome tab as a named target such as `cases` or `app` |
99
+ | `unbind_tab` | Remove a named target binding |
100
+ | `list_targets` | Show named targets and their per-tab session status |
101
+ | `pin_current_tab` | Keep Ghost Bridge attached to the current tab while you browse elsewhere |
102
+ | `pin_tab` | Pin a target tab by tab ID, URL fragment, or title fragment |
103
+ | `unpin_tab` | Return to following the focused tab |
104
+ | `get_target_tab` | Show the current target mode and tab |
105
+ | `list_tabs` | List available Chrome tabs |
97
106
  | `list_network_requests` | Inspect captured network traffic |
98
107
  | `get_network_detail` | Read one request in detail |
99
108
  | `get_last_error` | Inspect recent console, exception, and network error events |
@@ -112,8 +121,19 @@ Recommended flow:
112
121
 
113
122
  Notes:
114
123
 
124
+ - Use `bind_tab` when a workflow spans multiple pages. For example, bind a checklist page as `cases` and a business page as `app`, then call tools with `target: "cases"` or `target: "app"`.
125
+ - All browser tools accept an optional `target` parameter. When named targets are bound, `dispatch_action` requires `target` so refs from one page are not accidentally used on another page.
126
+ - 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.
115
127
  - `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
116
128
 
129
+ Multi-page example:
130
+
131
+ ```text
132
+ Bind the current checklist tab as cases.
133
+ Bind the tab whose title contains "Orders" as app.
134
+ Read the next case from target cases, operate target app, then mark the case passed or failed back on target cases.
135
+ ```
136
+
117
137
  ## Configuration
118
138
 
119
139
  | Setting | Default | Notes |
@@ -129,13 +149,24 @@ flowchart LR
129
149
  A["AI Client<br/>Claude / Codex / Cursor"]
130
150
  B["Ghost Bridge MCP Server<br/>server.js"]
131
151
  C["Chrome Extension<br/>background.js"]
132
- D["Browser Tab<br/>Target Context"]
152
+ D["Browser Tabs<br/>Target Sessions"]
133
153
 
134
154
  A <-->|"stdio"| B
135
155
  B <-->|"WebSocket"| C
136
156
  C <-->|"CDP"| D
137
157
  ```
138
158
 
159
+ ## Troubleshooting
160
+
161
+ 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.
162
+
163
+ Run `ghost-bridge status` and check:
164
+
165
+ - `Active WebSocket Service`: the running server path should match the CLI/package you expect
166
+ - `Chrome Extension > Sync`: the installed extension should match the current package
167
+
168
+ 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.
169
+
139
170
  ## Limitations
140
171
 
141
172
  - Chrome DevTools on the target tab can conflict with `chrome.debugger.attach`