@browserbridge/bbx 1.7.1 → 1.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/package.json
CHANGED
|
@@ -3,7 +3,6 @@
|
|
|
3
3
|
import fs from 'node:fs';
|
|
4
4
|
import os from 'node:os';
|
|
5
5
|
import path from 'node:path';
|
|
6
|
-
import { fileURLToPath } from 'node:url';
|
|
7
6
|
|
|
8
7
|
/** @typedef {import('./types.js').McpClientName} McpClientName */
|
|
9
8
|
|
|
@@ -40,8 +39,8 @@ export function isMcpClientName(value) {
|
|
|
40
39
|
}
|
|
41
40
|
|
|
42
41
|
const BROWSER_BRIDGE_SERVER_NAME = 'browser-bridge';
|
|
43
|
-
const
|
|
44
|
-
const
|
|
42
|
+
const MCP_COMMAND = 'bbx';
|
|
43
|
+
const MCP_ARGS = Object.freeze(['mcp', 'serve']);
|
|
45
44
|
|
|
46
45
|
/**
|
|
47
46
|
* @returns {string}
|
|
@@ -95,15 +94,15 @@ export function getMcpConfigShape(clientName) {
|
|
|
95
94
|
*/
|
|
96
95
|
function createBaseServerConfig(clientName) {
|
|
97
96
|
const serverConfig = {
|
|
98
|
-
command:
|
|
99
|
-
args: [
|
|
97
|
+
command: MCP_COMMAND,
|
|
98
|
+
args: [...MCP_ARGS],
|
|
100
99
|
env: {},
|
|
101
100
|
};
|
|
102
101
|
|
|
103
102
|
if (clientName === 'opencode') {
|
|
104
103
|
return {
|
|
105
104
|
type: 'local',
|
|
106
|
-
command: [
|
|
105
|
+
command: [MCP_COMMAND, ...MCP_ARGS],
|
|
107
106
|
};
|
|
108
107
|
}
|
|
109
108
|
return serverConfig;
|
|
@@ -135,8 +134,8 @@ export function buildMcpConfig(clientName) {
|
|
|
135
134
|
return {
|
|
136
135
|
mcp_servers: {
|
|
137
136
|
[BROWSER_BRIDGE_SERVER_NAME]: {
|
|
138
|
-
command:
|
|
139
|
-
args: [
|
|
137
|
+
command: MCP_COMMAND,
|
|
138
|
+
args: [...MCP_ARGS],
|
|
140
139
|
},
|
|
141
140
|
},
|
|
142
141
|
};
|
|
@@ -267,8 +266,8 @@ export async function getMcpConfigPaths(clientName, options) {
|
|
|
267
266
|
function formatCodexServerBlock() {
|
|
268
267
|
return [
|
|
269
268
|
`[mcp_servers."${BROWSER_BRIDGE_SERVER_NAME}"]`,
|
|
270
|
-
`command = ${JSON.stringify(
|
|
271
|
-
`args = ${JSON.stringify(
|
|
269
|
+
`command = ${JSON.stringify(MCP_COMMAND)}`,
|
|
270
|
+
`args = ${JSON.stringify(MCP_ARGS)}`,
|
|
272
271
|
'',
|
|
273
272
|
].join('\n');
|
|
274
273
|
}
|