@ricsam/browser-mcp 0.3.26 → 0.3.28
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 +2 -2
- package/dist/{chunk-swy0qtx0.js → chunk-0w5sk2a1.js} +1 -2
- package/dist/chunk-1q7hk8dj.js +7 -0
- package/dist/{chunk-51fbjjza.js → chunk-j5a43hxw.js} +691 -692
- package/dist/{chunk-cy1a8r79.js → chunk-j8pdx3wj.js} +4 -6
- package/dist/{chunk-zv1900tw.js → chunk-r2g1qf64.js} +4 -7
- package/dist/chunk-svgr9p5z.js +6 -0
- package/dist/{chunk-g3yyvtve.js → chunk-v77jfzyx.js} +6 -9
- package/dist/main.js +5 -8
- package/package.json +1 -1
- package/dist/chunk-1sjcwr28.js +0 -4
- package/dist/chunk-42sbfmcv.js +0 -7
- package/dist/chunk-6st21tsd.js +0 -7
- /package/dist/{chunk-v483gpt7.js → chunk-6e06hyfa.js} +0 -0
- /package/dist/{chunk-j6psfksr.js → chunk-sxdnmsez.js} +0 -0
|
@@ -1,7 +1,3 @@
|
|
|
1
|
-
// cli/src/forward/connector.ts
|
|
2
|
-
import net from "node:net";
|
|
3
|
-
import WebSocket from "ws";
|
|
4
|
-
|
|
5
1
|
// shared/forwarding.ts
|
|
6
2
|
var FORWARD = { path: "/api/forward/v1", maxPayload: 16384, window: 65536, maxStreams: 32, maxBuffered: 2097152, maxLeases: 128, maxScopeLeases: 8, maxTtl: 900000, heartbeatMs: 1e4, deadMs: 35000 };
|
|
7
3
|
function frame(type, id = 0, data = new Uint8Array) {
|
|
@@ -28,7 +24,7 @@ function credit(id, n) {
|
|
|
28
24
|
new DataView(b.buffer).setUint32(0, n);
|
|
29
25
|
return frame(5 /* Credit */, id, b);
|
|
30
26
|
}
|
|
31
|
-
function
|
|
27
|
+
function sameScope2(a, b) {
|
|
32
28
|
return a.browserId === b.browserId && a.tokenId === b.tokenId && a.sessionKey === b.sessionKey && a.instanceId === b.instanceId;
|
|
33
29
|
}
|
|
34
30
|
function loopback(value) {
|
|
@@ -56,6 +52,8 @@ function validateCapability(c) {
|
|
|
56
52
|
}
|
|
57
53
|
|
|
58
54
|
// cli/src/forward/connector.ts
|
|
55
|
+
import net from "node:net";
|
|
56
|
+
import WebSocket from "ws";
|
|
59
57
|
async function connectForward(cap) {
|
|
60
58
|
validateCapability(cap);
|
|
61
59
|
const ws = new WebSocket(cap.url, { headers: cap.headers, maxPayload: FORWARD.maxPayload + 5, perMessageDeflate: false, handshakeTimeout: 1e4 });
|
|
@@ -252,4 +250,4 @@ async function connectForward(cap) {
|
|
|
252
250
|
return { closed, close: () => close(), status: () => ({ ready, activeConnections: streams.size, lastError }) };
|
|
253
251
|
}
|
|
254
252
|
|
|
255
|
-
export { FORWARD,
|
|
253
|
+
export { FORWARD, sameScope2, connectForward };
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import {
|
|
2
|
+
readCapability,
|
|
2
3
|
capabilityFetch,
|
|
3
|
-
exclusiveOutput
|
|
4
|
-
|
|
5
|
-
} from "./chunk-v483gpt7.js";
|
|
6
|
-
import"./chunk-1sjcwr28.js";
|
|
4
|
+
exclusiveOutput
|
|
5
|
+
} from "./chunk-6e06hyfa.js";
|
|
7
6
|
|
|
8
7
|
// cli/src/agent/files.ts
|
|
9
8
|
import { open, constants, unlink } from "node:fs/promises";
|
|
@@ -77,7 +76,5 @@ async function runFilesCommand(args) {
|
|
|
77
76
|
throw new Error("Usage: files upload|download --capability private.json|- --input|--output PATH");
|
|
78
77
|
}
|
|
79
78
|
export {
|
|
80
|
-
|
|
81
|
-
runFilesCommand,
|
|
82
|
-
uploadFile
|
|
79
|
+
runFilesCommand
|
|
83
80
|
};
|
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
} from "./chunk-
|
|
2
|
+
serializeSecrets,
|
|
3
|
+
parseSecrets
|
|
4
|
+
} from "./chunk-sxdnmsez.js";
|
|
5
5
|
import {
|
|
6
|
+
readCapability,
|
|
6
7
|
capabilityFetch,
|
|
7
|
-
exclusiveOutput
|
|
8
|
-
|
|
9
|
-
} from "./chunk-v483gpt7.js";
|
|
10
|
-
import"./chunk-1sjcwr28.js";
|
|
8
|
+
exclusiveOutput
|
|
9
|
+
} from "./chunk-6e06hyfa.js";
|
|
11
10
|
|
|
12
11
|
// cli/src/agent/secrets.ts
|
|
13
12
|
import { spawn } from "node:child_process";
|
|
@@ -92,7 +91,5 @@ async function runSecretsCommand(args) {
|
|
|
92
91
|
throw new Error("Usage: secrets export|exec --capability private.json|- --format json|dotenv --output PATH | -- executable args");
|
|
93
92
|
}
|
|
94
93
|
export {
|
|
95
|
-
execSecrets,
|
|
96
|
-
exportSecrets,
|
|
97
94
|
runSecretsCommand
|
|
98
95
|
};
|
package/dist/main.js
CHANGED
|
@@ -1,12 +1,9 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import {
|
|
3
|
-
__require
|
|
4
|
-
} from "./chunk-1sjcwr28.js";
|
|
5
2
|
|
|
6
3
|
// cli/src/main.ts
|
|
7
4
|
var args = process.argv.slice(2);
|
|
8
5
|
var command = args.shift();
|
|
9
|
-
var version = async () => (await import("./chunk-
|
|
6
|
+
var version = async () => (await import("./chunk-svgr9p5z.js")).CLI_VERSION;
|
|
10
7
|
async function main() {
|
|
11
8
|
if (!command || command === "--help" || command === "help") {
|
|
12
9
|
console.log(`@ricsam/browser-mcp ${await version()}
|
|
@@ -23,13 +20,13 @@ Browser dependencies load only for browser commands. No automatic Chrome downloa
|
|
|
23
20
|
return;
|
|
24
21
|
}
|
|
25
22
|
if (command === "browser")
|
|
26
|
-
return (await import("./chunk-
|
|
23
|
+
return (await import("./chunk-j5a43hxw.js")).runBrowser(args);
|
|
27
24
|
if (command === "files")
|
|
28
|
-
return (await import("./chunk-
|
|
25
|
+
return (await import("./chunk-r2g1qf64.js")).runFilesCommand(args);
|
|
29
26
|
if (command === "secrets")
|
|
30
|
-
return (await import("./chunk-
|
|
27
|
+
return (await import("./chunk-v77jfzyx.js")).runSecretsCommand(args);
|
|
31
28
|
if (command === "forward")
|
|
32
|
-
return (await import("./chunk-
|
|
29
|
+
return (await import("./chunk-0w5sk2a1.js")).runForward(args);
|
|
33
30
|
throw new Error("Unknown command. Use --help.");
|
|
34
31
|
}
|
|
35
32
|
main().catch((error) => {
|
package/package.json
CHANGED
package/dist/chunk-1sjcwr28.js
DELETED
package/dist/chunk-42sbfmcv.js
DELETED
package/dist/chunk-6st21tsd.js
DELETED
|
File without changes
|
|
File without changes
|