@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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@browserbridge/bbx",
3
- "version": "1.7.1",
3
+ "version": "1.7.2",
4
4
  "private": false,
5
5
  "keywords": [
6
6
  "agent-tools",
@@ -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 packageRoot = path.resolve(path.dirname(fileURLToPath(import.meta.url)), '../../..');
44
- const mcpServerBinPath = path.join(packageRoot, 'packages', 'mcp-server', 'src', 'bin.js');
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: process.execPath,
99
- args: [mcpServerBinPath],
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: [process.execPath, mcpServerBinPath],
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: process.execPath,
139
- args: [mcpServerBinPath],
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(process.execPath)}`,
271
- `args = ${JSON.stringify([mcpServerBinPath])}`,
269
+ `command = ${JSON.stringify(MCP_COMMAND)}`,
270
+ `args = ${JSON.stringify(MCP_ARGS)}`,
272
271
  '',
273
272
  ].join('\n');
274
273
  }