viyv-browser-mcp 0.7.1 → 0.7.2
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/dist/index.js +11 -9
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -567,13 +567,11 @@ function startBridge(options) {
|
|
|
567
567
|
if (chromeConnections.size === 0 && mcpConnections.size === 0) {
|
|
568
568
|
gracefulExit("No connections remaining");
|
|
569
569
|
}
|
|
570
|
-
if (chromeConnections.size === 0 && !orphanTimer) {
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
}
|
|
576
|
-
}, ORPHAN_TIMEOUT);
|
|
570
|
+
if (chromeConnections.size === 0 && mcpConnections.size > 0 && !orphanTimer) {
|
|
571
|
+
process.stderr.write(
|
|
572
|
+
`${LOG_PREFIX2} No Chrome connections, but ${mcpConnections.size} MCP Server(s) connected \u2014 waiting for Chrome relay
|
|
573
|
+
`
|
|
574
|
+
);
|
|
577
575
|
}
|
|
578
576
|
}
|
|
579
577
|
function setupRelayConnection(socket) {
|
|
@@ -894,7 +892,11 @@ var lastHeartbeat = null;
|
|
|
894
892
|
var chromeProfiles = [];
|
|
895
893
|
function setExtensionConnected(connected) {
|
|
896
894
|
extensionConnected = connected;
|
|
897
|
-
if (connected)
|
|
895
|
+
if (connected) {
|
|
896
|
+
lastHeartbeat = Date.now();
|
|
897
|
+
} else {
|
|
898
|
+
chromeProfiles = [];
|
|
899
|
+
}
|
|
898
900
|
}
|
|
899
901
|
function recordHeartbeat() {
|
|
900
902
|
lastHeartbeat = Date.now();
|
|
@@ -3286,7 +3288,7 @@ var scrollTool = {
|
|
|
3286
3288
|
tabId: z.coerce.number().describe("Tab ID"),
|
|
3287
3289
|
coordinate: z.tuple([z.coerce.number(), z.coerce.number()]).optional().describe("Scroll position [x, y] (required for directional scroll)"),
|
|
3288
3290
|
direction: z.enum(["up", "down", "left", "right"]).optional().describe("Scroll direction (required for directional scroll)"),
|
|
3289
|
-
amount: z.coerce.number().min(1).max(10).optional().describe("Scroll amount (default: 3)"),
|
|
3291
|
+
amount: z.coerce.number().min(1).max(10).optional().describe("Scroll amount in viewport fractions: 3 = one full viewport (default: 3)"),
|
|
3290
3292
|
ref: z.string().optional().describe("Element reference ID to scroll into view")
|
|
3291
3293
|
})
|
|
3292
3294
|
};
|