crawlio-browser 1.4.7 → 1.4.8
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/mcp-server/index.js
CHANGED
|
@@ -7,7 +7,7 @@ import {
|
|
|
7
7
|
WS_PORT,
|
|
8
8
|
WS_RECONNECT_GRACE,
|
|
9
9
|
WS_STALE_THRESHOLD
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-EYPPJZP7.js";
|
|
11
11
|
|
|
12
12
|
// src/mcp-server/index.ts
|
|
13
13
|
import { randomBytes as randomBytes2 } from "crypto";
|
|
@@ -446,11 +446,25 @@ var WebSocketBridge = class {
|
|
|
446
446
|
} catch {
|
|
447
447
|
}
|
|
448
448
|
await new Promise((resolve2, reject) => {
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
449
|
+
let attempts = 0;
|
|
450
|
+
const tryListen = () => {
|
|
451
|
+
const onError = (err) => {
|
|
452
|
+
if (err.code === "EADDRINUSE" && attempts < 3) {
|
|
453
|
+
attempts++;
|
|
454
|
+
console.error(`[Bridge] Port ${WS_PORT} still in use, retry ${attempts}/3...`);
|
|
455
|
+
setTimeout(tryListen, 1e3 * attempts);
|
|
456
|
+
} else {
|
|
457
|
+
reject(err);
|
|
458
|
+
}
|
|
459
|
+
};
|
|
460
|
+
this.httpServer.once("error", onError);
|
|
461
|
+
this.httpServer.listen(WS_PORT, WS_HOST, () => {
|
|
462
|
+
this.httpServer.removeListener("error", onError);
|
|
463
|
+
console.error(`[Bridge] WebSocket server listening on ws://${WS_HOST}:${WS_PORT}`);
|
|
464
|
+
resolve2();
|
|
465
|
+
});
|
|
466
|
+
};
|
|
467
|
+
tryListen();
|
|
454
468
|
});
|
|
455
469
|
}
|
|
456
470
|
get isConnected() {
|
|
@@ -1429,7 +1443,7 @@ function createTools(bridge2, crawlio2) {
|
|
|
1429
1443
|
// --- AI orchestration tools ---
|
|
1430
1444
|
{
|
|
1431
1445
|
name: "connect_tab",
|
|
1432
|
-
description: "
|
|
1446
|
+
description: "Pin a specific browser tab for all subsequent commands. Optional \u2014 without this, tools auto-connect to the active tab. Three modes: (1) provide a URL to find or create a tab, (2) provide a tabId to connect to a specific tab, (3) no args to pin the active tab. Starts CDP capture automatically.",
|
|
1433
1447
|
inputSchema: {
|
|
1434
1448
|
type: "object",
|
|
1435
1449
|
properties: {
|
|
@@ -4042,7 +4056,7 @@ function createCodeModeTools(bridge2, crawlio2) {
|
|
|
4042
4056
|
process.title = "Crawlio Agent";
|
|
4043
4057
|
var initMode = process.argv.includes("init") || process.argv.includes("--setup") || process.argv.includes("setup");
|
|
4044
4058
|
if (initMode) {
|
|
4045
|
-
const { runInit } = await import("./init-
|
|
4059
|
+
const { runInit } = await import("./init-4LUNCDCD.js");
|
|
4046
4060
|
await runInit(process.argv.slice(2));
|
|
4047
4061
|
process.exit(0);
|
|
4048
4062
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "crawlio-browser",
|
|
3
|
-
"version": "1.4.
|
|
3
|
+
"version": "1.4.8",
|
|
4
4
|
"description": "MCP server with 96 CDP-backed tools for browser automation — screenshots, DOM, network capture, framework detection, cookies, storage, session recording, performance metrics via Chrome",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/mcp-server/index.js",
|