ghost-bridge 0.6.2 → 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 +1 -12
- package/dist/cli.js +4 -4
- package/dist/server.js +111 -41
- package/extension/background.js +12 -553
- package/extension/bg-dom.js +441 -0
- package/extension/bg-network.js +194 -0
- package/extension/manifest.json +1 -3
- package/extension/offscreen.js +5 -7
- package/package.json +1 -1
- package/extension/icon-32.png +0 -0
package/README.md
CHANGED
|
@@ -18,17 +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.6.0
|
|
26
|
-
|
|
27
|
-
- `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
|
|
28
|
-
- `capture_screenshot` now defaults to JPEG for better transfer efficiency: visible viewport screenshots default to `quality: 80`, and `fullPage` screenshots default to `quality: 70`
|
|
29
|
-
- Use `format: "png"` when you need high-fidelity text rendering, 1px lines, icon edges, transparency, or pixel-level UI inspection
|
|
30
|
-
- Attachment and request cleanup paths are more robust under concurrent usage and multi-client reconnect scenarios
|
|
31
|
-
|
|
32
21
|
## Quick Start
|
|
33
22
|
|
|
34
23
|
### 1. Install
|
|
@@ -107,7 +96,7 @@ Typical prompts:
|
|
|
107
96
|
| `dispatch_action` | Click, fill, press, scroll, hover, select |
|
|
108
97
|
| `list_network_requests` | Inspect captured network traffic |
|
|
109
98
|
| `get_network_detail` | Read one request in detail |
|
|
110
|
-
| `get_last_error` | Inspect recent
|
|
99
|
+
| `get_last_error` | Inspect recent console, exception, and network error events |
|
|
111
100
|
| `get_script_source` | Extract page scripts |
|
|
112
101
|
| `find_by_string` | Search within bundled script content |
|
|
113
102
|
| `coverage_snapshot` | Identify active scripts quickly |
|
package/dist/cli.js
CHANGED
|
@@ -5505,14 +5505,14 @@ function getJsonClientDefinition(name, configPath, options = {}) {
|
|
|
5505
5505
|
function getClientDefinitions() {
|
|
5506
5506
|
const homeDir = getHomeDir();
|
|
5507
5507
|
const claudeDir = path2.join(homeDir, ".claude");
|
|
5508
|
-
const claudeSettingsPath = path2.join(claudeDir, "settings.json");
|
|
5509
5508
|
const claudeLegacyPath = path2.join(homeDir, ".claude.json");
|
|
5510
5509
|
const cursorDir = path2.join(homeDir, ".cursor");
|
|
5511
5510
|
const antigravityDir = path2.join(homeDir, ".gemini", "antigravity");
|
|
5511
|
+
const hasClaudeLegacy = import_fs_extra.default.existsSync(claudeLegacyPath);
|
|
5512
5512
|
return [
|
|
5513
|
-
getJsonClientDefinition("Claude Code
|
|
5514
|
-
shouldCreate:
|
|
5515
|
-
isAvailable: () =>
|
|
5513
|
+
getJsonClientDefinition("Claude Code (~/.claude.json)", claudeLegacyPath, {
|
|
5514
|
+
shouldCreate: hasClaudeLegacy || import_fs_extra.default.existsSync(claudeDir),
|
|
5515
|
+
isAvailable: () => hasClaudeLegacy || import_fs_extra.default.existsSync(claudeDir)
|
|
5516
5516
|
}),
|
|
5517
5517
|
{
|
|
5518
5518
|
name: "Codex",
|
package/dist/server.js
CHANGED
|
@@ -28536,14 +28536,11 @@ var GHOST_BRIDGE_VERSION = packageJson.version;
|
|
|
28536
28536
|
|
|
28537
28537
|
// src/server.js
|
|
28538
28538
|
var BASE_PORT = Number(process.env.GHOST_BRIDGE_PORT || 33333);
|
|
28539
|
-
|
|
28540
|
-
|
|
28541
|
-
const firstDayOfMonth = new Date(now.getFullYear(), now.getMonth(), 1, 0, 0, 0, 0);
|
|
28542
|
-
return String(firstDayOfMonth.getTime());
|
|
28543
|
-
}
|
|
28544
|
-
var WS_TOKEN = process.env.GHOST_BRIDGE_TOKEN || getMonthlyToken();
|
|
28539
|
+
var DEFAULT_WS_TOKEN = "ghost-bridge-local";
|
|
28540
|
+
var WS_TOKEN = process.env.GHOST_BRIDGE_TOKEN || DEFAULT_WS_TOKEN;
|
|
28545
28541
|
var RESPONSE_TIMEOUT = 8e3;
|
|
28546
28542
|
var PORT_INFO_FILE = path2.join(os.tmpdir(), "ghost-bridge-port.json");
|
|
28543
|
+
var SERVER_STARTED_AT = (/* @__PURE__ */ new Date()).toISOString();
|
|
28547
28544
|
var chromeConnection = null;
|
|
28548
28545
|
var activeConnection = null;
|
|
28549
28546
|
var actualPort = BASE_PORT;
|
|
@@ -28580,35 +28577,87 @@ function getExistingService() {
|
|
|
28580
28577
|
return null;
|
|
28581
28578
|
}
|
|
28582
28579
|
}
|
|
28583
|
-
function
|
|
28580
|
+
function probeExistingService(port) {
|
|
28584
28581
|
return new Promise((resolve) => {
|
|
28585
28582
|
const url2 = new URL(`ws://localhost:${port}`);
|
|
28586
|
-
|
|
28583
|
+
url2.searchParams.set("role", "probe");
|
|
28587
28584
|
const ws = new import_websocket.default(url2.toString());
|
|
28585
|
+
let settled = false;
|
|
28586
|
+
const finish = (result) => {
|
|
28587
|
+
if (settled) return;
|
|
28588
|
+
settled = true;
|
|
28589
|
+
clearTimeout(timeout);
|
|
28590
|
+
try {
|
|
28591
|
+
if (ws.readyState === import_websocket.default.CONNECTING || ws.readyState === import_websocket.default.OPEN) {
|
|
28592
|
+
ws.close();
|
|
28593
|
+
}
|
|
28594
|
+
} catch {
|
|
28595
|
+
}
|
|
28596
|
+
resolve(result);
|
|
28597
|
+
};
|
|
28588
28598
|
const timeout = setTimeout(() => {
|
|
28589
|
-
|
|
28590
|
-
resolve(false);
|
|
28599
|
+
finish(null);
|
|
28591
28600
|
}, 2e3);
|
|
28592
28601
|
ws.on("message", (data) => {
|
|
28593
28602
|
try {
|
|
28594
28603
|
const msg = JSON.parse(data.toString());
|
|
28595
28604
|
if (msg.type === "identity" && msg.service === "ghost-bridge") {
|
|
28596
|
-
|
|
28597
|
-
ws.close();
|
|
28598
|
-
resolve(true);
|
|
28605
|
+
finish(msg);
|
|
28599
28606
|
}
|
|
28600
28607
|
} catch {
|
|
28601
28608
|
}
|
|
28602
28609
|
});
|
|
28603
28610
|
ws.on("error", () => {
|
|
28604
|
-
|
|
28605
|
-
resolve(false);
|
|
28611
|
+
finish(null);
|
|
28606
28612
|
});
|
|
28607
28613
|
ws.on("close", () => {
|
|
28608
|
-
|
|
28614
|
+
finish(null);
|
|
28609
28615
|
});
|
|
28610
28616
|
});
|
|
28611
28617
|
}
|
|
28618
|
+
function sleep(ms) {
|
|
28619
|
+
return new Promise((resolve) => setTimeout(resolve, ms));
|
|
28620
|
+
}
|
|
28621
|
+
async function waitForPortAvailable(port, timeoutMs = 5e3) {
|
|
28622
|
+
const deadline = Date.now() + timeoutMs;
|
|
28623
|
+
while (Date.now() < deadline) {
|
|
28624
|
+
if (await isPortAvailable(port)) {
|
|
28625
|
+
return true;
|
|
28626
|
+
}
|
|
28627
|
+
await sleep(100);
|
|
28628
|
+
}
|
|
28629
|
+
return isPortAvailable(port);
|
|
28630
|
+
}
|
|
28631
|
+
async function stopExistingService(pid, port) {
|
|
28632
|
+
if (!pid || pid === process.pid) {
|
|
28633
|
+
return false;
|
|
28634
|
+
}
|
|
28635
|
+
log(`\u68C0\u6D4B\u5230\u65E7\u5B9E\u4F8B token \u4E0D\u4E00\u81F4\uFF0C\u51C6\u5907\u505C\u6B62\u65E7\u5B9E\u4F8B (PID: ${pid})`);
|
|
28636
|
+
try {
|
|
28637
|
+
process.kill(pid, "SIGTERM");
|
|
28638
|
+
} catch (e) {
|
|
28639
|
+
if (e.code === "ESRCH") {
|
|
28640
|
+
log(`\u65E7\u5B9E\u4F8B PID ${pid} \u5DF2\u4E0D\u5B58\u5728`);
|
|
28641
|
+
return true;
|
|
28642
|
+
}
|
|
28643
|
+
throw e;
|
|
28644
|
+
}
|
|
28645
|
+
const released = await waitForPortAvailable(port, 5e3);
|
|
28646
|
+
if (!released) {
|
|
28647
|
+
throw new Error(`\u65E7\u5B9E\u4F8B (PID: ${pid}) \u672A\u5728\u9884\u671F\u65F6\u95F4\u5185\u91CA\u653E\u7AEF\u53E3 ${port}`);
|
|
28648
|
+
}
|
|
28649
|
+
if (fs2.existsSync(PORT_INFO_FILE)) {
|
|
28650
|
+
try {
|
|
28651
|
+
const info = JSON.parse(fs2.readFileSync(PORT_INFO_FILE, "utf-8"));
|
|
28652
|
+
if (info.pid === pid) {
|
|
28653
|
+
fs2.unlinkSync(PORT_INFO_FILE);
|
|
28654
|
+
}
|
|
28655
|
+
} catch {
|
|
28656
|
+
}
|
|
28657
|
+
}
|
|
28658
|
+
log(`\u2705 \u65E7\u5B9E\u4F8B\u5DF2\u9000\u51FA\uFF0C\u7AEF\u53E3 ${port} \u53EF\u7531\u65B0\u5B9E\u4F8B\u63A5\u7BA1`);
|
|
28659
|
+
return true;
|
|
28660
|
+
}
|
|
28612
28661
|
function isPortAvailable(port) {
|
|
28613
28662
|
return new Promise((resolve) => {
|
|
28614
28663
|
const server2 = net.createServer();
|
|
@@ -28634,12 +28683,16 @@ async function initWebSocketService() {
|
|
|
28634
28683
|
const existing = getExistingService();
|
|
28635
28684
|
if (existing) {
|
|
28636
28685
|
log(`\u68C0\u6D4B\u5230\u73B0\u6709\u670D\u52A1 (PID: ${existing.pid}, \u7AEF\u53E3: ${existing.port})\uFF0C\u9A8C\u8BC1\u4E2D...`);
|
|
28637
|
-
const
|
|
28638
|
-
if (
|
|
28639
|
-
|
|
28640
|
-
|
|
28641
|
-
|
|
28642
|
-
|
|
28686
|
+
const probe = await probeExistingService(existing.port);
|
|
28687
|
+
if (probe?.service === "ghost-bridge") {
|
|
28688
|
+
if (probe.token === WS_TOKEN) {
|
|
28689
|
+
actualPort = existing.port;
|
|
28690
|
+
isMainInstance = false;
|
|
28691
|
+
log(`\u2705 \u590D\u7528\u73B0\u6709\u670D\u52A1\uFF0C\u7AEF\u53E3 ${actualPort}`);
|
|
28692
|
+
return null;
|
|
28693
|
+
}
|
|
28694
|
+
const oldPid = Number(probe.pid) || existing.pid;
|
|
28695
|
+
await stopExistingService(oldPid, existing.port);
|
|
28643
28696
|
} else {
|
|
28644
28697
|
log(`\u274C \u73B0\u6709\u670D\u52A1\u9A8C\u8BC1\u5931\u8D25\uFF0C\u542F\u52A8\u65B0\u670D\u52A1...`);
|
|
28645
28698
|
try {
|
|
@@ -28649,14 +28702,19 @@ async function initWebSocketService() {
|
|
|
28649
28702
|
}
|
|
28650
28703
|
}
|
|
28651
28704
|
if (!await isPortAvailable(BASE_PORT)) {
|
|
28652
|
-
const
|
|
28653
|
-
if (
|
|
28654
|
-
|
|
28655
|
-
|
|
28656
|
-
|
|
28657
|
-
|
|
28705
|
+
const probe = await probeExistingService(BASE_PORT);
|
|
28706
|
+
if (probe?.service === "ghost-bridge") {
|
|
28707
|
+
if (probe.token === WS_TOKEN) {
|
|
28708
|
+
actualPort = BASE_PORT;
|
|
28709
|
+
isMainInstance = false;
|
|
28710
|
+
log(`\u2705 \u590D\u7528\u56FA\u5B9A\u7AEF\u53E3\u4E0A\u7684\u73B0\u6709\u670D\u52A1\uFF0C\u7AEF\u53E3 ${actualPort}`);
|
|
28711
|
+
return null;
|
|
28712
|
+
}
|
|
28713
|
+
await stopExistingService(Number(probe.pid), BASE_PORT);
|
|
28714
|
+
}
|
|
28715
|
+
if (!await isPortAvailable(BASE_PORT)) {
|
|
28716
|
+
throw new Error(`\u56FA\u5B9A\u7AEF\u53E3 ${BASE_PORT} \u5DF2\u88AB\u5176\u4ED6\u8FDB\u7A0B\u5360\u7528\uFF0C\u8BF7\u91CA\u653E\u8BE5\u7AEF\u53E3\u6216\u901A\u8FC7 GHOST_BRIDGE_PORT \u6307\u5B9A\u5176\u4ED6\u7AEF\u53E3`);
|
|
28658
28717
|
}
|
|
28659
|
-
throw new Error(`\u56FA\u5B9A\u7AEF\u53E3 ${BASE_PORT} \u5DF2\u88AB\u5176\u4ED6\u8FDB\u7A0B\u5360\u7528\uFF0C\u8BF7\u91CA\u653E\u8BE5\u7AEF\u53E3\u6216\u901A\u8FC7 GHOST_BRIDGE_PORT \u6307\u5B9A\u5176\u4ED6\u7AEF\u53E3`);
|
|
28660
28718
|
}
|
|
28661
28719
|
const wss2 = await startWebSocketServer();
|
|
28662
28720
|
isMainInstance = true;
|
|
@@ -28666,7 +28724,7 @@ async function initWebSocketService() {
|
|
|
28666
28724
|
port: actualPort,
|
|
28667
28725
|
wsUrl: `ws://localhost:${actualPort}`,
|
|
28668
28726
|
pid: process.pid,
|
|
28669
|
-
startedAt:
|
|
28727
|
+
startedAt: SERVER_STARTED_AT
|
|
28670
28728
|
}, null, 2)
|
|
28671
28729
|
);
|
|
28672
28730
|
log(`\u{1F4DD} \u7AEF\u53E3\u4FE1\u606F\u5DF2\u5199\u5165: ${PORT_INFO_FILE}`);
|
|
@@ -28678,6 +28736,18 @@ if (wss) {
|
|
|
28678
28736
|
const url2 = new URL(req.url || "/", "http://localhost");
|
|
28679
28737
|
const token = url2.searchParams.get("token") || "";
|
|
28680
28738
|
const role = url2.searchParams.get("role") || "";
|
|
28739
|
+
if (role === "probe") {
|
|
28740
|
+
ws.send(JSON.stringify({
|
|
28741
|
+
type: "identity",
|
|
28742
|
+
service: "ghost-bridge",
|
|
28743
|
+
token: WS_TOKEN,
|
|
28744
|
+
pid: process.pid,
|
|
28745
|
+
port: actualPort,
|
|
28746
|
+
startedAt: SERVER_STARTED_AT
|
|
28747
|
+
}));
|
|
28748
|
+
ws.close(1e3, "Probe complete");
|
|
28749
|
+
return;
|
|
28750
|
+
}
|
|
28681
28751
|
if (WS_TOKEN && token !== WS_TOKEN) {
|
|
28682
28752
|
log(`\u62D2\u7EDD\u8FDE\u63A5\uFF1Atoken \u4E0D\u5339\u914D (\u6536\u5230: ${token}, \u671F\u671B: ${WS_TOKEN})`);
|
|
28683
28753
|
ws.close(1008, "Bad token");
|
|
@@ -28929,7 +28999,7 @@ server.setRequestHandler(ListToolsRequestSchema, async () => ({
|
|
|
28929
28999
|
tools: [
|
|
28930
29000
|
{
|
|
28931
29001
|
name: "inspect_page",
|
|
28932
|
-
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",
|
|
28933
29003
|
inputSchema: {
|
|
28934
29004
|
type: "object",
|
|
28935
29005
|
properties: {
|
|
@@ -28955,7 +29025,7 @@ server.setRequestHandler(ListToolsRequestSchema, async () => ({
|
|
|
28955
29025
|
},
|
|
28956
29026
|
{
|
|
28957
29027
|
name: "get_last_error",
|
|
28958
|
-
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",
|
|
28959
29029
|
inputSchema: {
|
|
28960
29030
|
type: "object",
|
|
28961
29031
|
properties: {
|
|
@@ -28973,7 +29043,7 @@ server.setRequestHandler(ListToolsRequestSchema, async () => ({
|
|
|
28973
29043
|
},
|
|
28974
29044
|
{
|
|
28975
29045
|
name: "get_script_source",
|
|
28976
|
-
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",
|
|
28977
29047
|
inputSchema: {
|
|
28978
29048
|
type: "object",
|
|
28979
29049
|
properties: {
|
|
@@ -28997,7 +29067,7 @@ server.setRequestHandler(ListToolsRequestSchema, async () => ({
|
|
|
28997
29067
|
},
|
|
28998
29068
|
{
|
|
28999
29069
|
name: "find_by_string",
|
|
29000
|
-
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",
|
|
29001
29071
|
inputSchema: {
|
|
29002
29072
|
type: "object",
|
|
29003
29073
|
properties: {
|
|
@@ -29024,7 +29094,7 @@ server.setRequestHandler(ListToolsRequestSchema, async () => ({
|
|
|
29024
29094
|
},
|
|
29025
29095
|
{
|
|
29026
29096
|
name: "list_network_requests",
|
|
29027
|
-
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",
|
|
29028
29098
|
inputSchema: {
|
|
29029
29099
|
type: "object",
|
|
29030
29100
|
properties: {
|
|
@@ -29043,7 +29113,7 @@ server.setRequestHandler(ListToolsRequestSchema, async () => ({
|
|
|
29043
29113
|
},
|
|
29044
29114
|
{
|
|
29045
29115
|
name: "get_network_detail",
|
|
29046
|
-
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",
|
|
29047
29117
|
inputSchema: {
|
|
29048
29118
|
type: "object",
|
|
29049
29119
|
properties: {
|
|
@@ -29060,7 +29130,7 @@ server.setRequestHandler(ListToolsRequestSchema, async () => ({
|
|
|
29060
29130
|
},
|
|
29061
29131
|
{
|
|
29062
29132
|
name: "perf_metrics",
|
|
29063
|
-
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",
|
|
29064
29134
|
inputSchema: {
|
|
29065
29135
|
type: "object",
|
|
29066
29136
|
properties: {
|
|
@@ -29077,7 +29147,7 @@ server.setRequestHandler(ListToolsRequestSchema, async () => ({
|
|
|
29077
29147
|
},
|
|
29078
29148
|
{
|
|
29079
29149
|
name: "capture_screenshot",
|
|
29080
|
-
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",
|
|
29081
29151
|
inputSchema: {
|
|
29082
29152
|
type: "object",
|
|
29083
29153
|
properties: {
|
|
@@ -29109,7 +29179,7 @@ server.setRequestHandler(ListToolsRequestSchema, async () => ({
|
|
|
29109
29179
|
},
|
|
29110
29180
|
{
|
|
29111
29181
|
name: "get_page_content",
|
|
29112
|
-
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",
|
|
29113
29183
|
inputSchema: {
|
|
29114
29184
|
type: "object",
|
|
29115
29185
|
properties: {
|
|
@@ -29135,7 +29205,7 @@ server.setRequestHandler(ListToolsRequestSchema, async () => ({
|
|
|
29135
29205
|
},
|
|
29136
29206
|
{
|
|
29137
29207
|
name: "get_interactive_snapshot",
|
|
29138
|
-
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",
|
|
29139
29209
|
inputSchema: {
|
|
29140
29210
|
type: "object",
|
|
29141
29211
|
properties: {
|
|
@@ -29156,7 +29226,7 @@ server.setRequestHandler(ListToolsRequestSchema, async () => ({
|
|
|
29156
29226
|
},
|
|
29157
29227
|
{
|
|
29158
29228
|
name: "dispatch_action",
|
|
29159
|
-
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",
|
|
29160
29230
|
inputSchema: {
|
|
29161
29231
|
type: "object",
|
|
29162
29232
|
properties: {
|