@mindstone-engineering/mcp-server-browser-automation 0.1.0 → 0.1.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/types.d.ts +1 -1
- package/dist/types.js +1 -1
- package/package.json +1 -1
- package/dist/bridge.d.ts +0 -16
- package/dist/bridge.js +0 -40
package/dist/types.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export declare const SERVER_NAME = "browser-automation-mcp-server";
|
|
2
|
-
export declare const SERVER_VERSION = "0.1.
|
|
2
|
+
export declare const SERVER_VERSION = "0.1.2";
|
|
3
3
|
export declare const DEFAULT_TIMEOUT_MS = 30000;
|
|
4
4
|
export declare const SNAPSHOT_TIMEOUT_MS = 15000;
|
|
5
5
|
export declare const SCREENSHOT_TIMEOUT_MS = 15000;
|
package/dist/types.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export const SERVER_NAME = 'browser-automation-mcp-server';
|
|
2
|
-
export const SERVER_VERSION = '0.1.
|
|
2
|
+
export const SERVER_VERSION = '0.1.2';
|
|
3
3
|
export const DEFAULT_TIMEOUT_MS = 30_000;
|
|
4
4
|
export const SNAPSHOT_TIMEOUT_MS = 15_000;
|
|
5
5
|
export const SCREENSHOT_TIMEOUT_MS = 15_000;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mindstone-engineering/mcp-server-browser-automation",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.2",
|
|
4
4
|
"description": "Browser automation MCP server — headless browser control via accessibility snapshots, navigation, form filling, screenshots, and tab management",
|
|
5
5
|
"license": "FSL-1.1-MIT",
|
|
6
6
|
"type": "module",
|
package/dist/bridge.d.ts
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Path to bridge state file, supporting both current and legacy env vars.
|
|
3
|
-
*/
|
|
4
|
-
export declare const BRIDGE_STATE_PATH: string;
|
|
5
|
-
/**
|
|
6
|
-
* Send a request to the host app bridge.
|
|
7
|
-
*
|
|
8
|
-
* The bridge is an HTTP server running inside the host app (e.g. the host application)
|
|
9
|
-
* that handles credential management and other cross-process operations.
|
|
10
|
-
*/
|
|
11
|
-
export declare const bridgeRequest: (urlPath: string, body: Record<string, unknown>) => Promise<{
|
|
12
|
-
success: boolean;
|
|
13
|
-
warning?: string;
|
|
14
|
-
error?: string;
|
|
15
|
-
}>;
|
|
16
|
-
//# sourceMappingURL=bridge.d.ts.map
|
package/dist/bridge.js
DELETED
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
import * as fs from 'fs';
|
|
2
|
-
import { REQUEST_TIMEOUT_MS } from './types.js';
|
|
3
|
-
/**
|
|
4
|
-
* Path to bridge state file, supporting both current and legacy env vars.
|
|
5
|
-
*/
|
|
6
|
-
export const BRIDGE_STATE_PATH = process.env.MCP_HOST_BRIDGE_STATE || process.env.MINDSTONE_REBEL_BRIDGE_STATE || '';
|
|
7
|
-
const loadBridgeState = () => {
|
|
8
|
-
if (!BRIDGE_STATE_PATH)
|
|
9
|
-
return null;
|
|
10
|
-
try {
|
|
11
|
-
const raw = fs.readFileSync(BRIDGE_STATE_PATH, 'utf8');
|
|
12
|
-
return JSON.parse(raw);
|
|
13
|
-
}
|
|
14
|
-
catch {
|
|
15
|
-
return null;
|
|
16
|
-
}
|
|
17
|
-
};
|
|
18
|
-
/**
|
|
19
|
-
* Send a request to the host app bridge.
|
|
20
|
-
*
|
|
21
|
-
* The bridge is an HTTP server running inside the host app (e.g. the host application)
|
|
22
|
-
* that handles credential management and other cross-process operations.
|
|
23
|
-
*/
|
|
24
|
-
export const bridgeRequest = async (urlPath, body) => {
|
|
25
|
-
const bridge = loadBridgeState();
|
|
26
|
-
if (!bridge) {
|
|
27
|
-
return { success: false, error: 'Bridge not available' };
|
|
28
|
-
}
|
|
29
|
-
const response = await fetch(`http://127.0.0.1:${bridge.port}${urlPath}`, {
|
|
30
|
-
method: 'POST',
|
|
31
|
-
signal: AbortSignal.timeout(REQUEST_TIMEOUT_MS),
|
|
32
|
-
headers: {
|
|
33
|
-
'Content-Type': 'application/json',
|
|
34
|
-
Authorization: `Bearer ${bridge.token}`,
|
|
35
|
-
},
|
|
36
|
-
body: JSON.stringify(body),
|
|
37
|
-
});
|
|
38
|
-
return response.json();
|
|
39
|
-
};
|
|
40
|
-
//# sourceMappingURL=bridge.js.map
|