@openagents-org/agent-launcher 0.2.65 → 0.2.66

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": "@openagents-org/agent-launcher",
3
- "version": "0.2.65",
3
+ "version": "0.2.66",
4
4
  "description": "OpenAgents Launcher — install, configure, and run AI coding agents from your terminal",
5
5
  "main": "src/index.js",
6
6
  "bin": {
@@ -268,12 +268,28 @@ class ClaudeAdapter extends BaseAdapter {
268
268
  this._log('Could not find openagents binary — MCP tools may not be available');
269
269
  }
270
270
 
271
+ // On Windows, .cmd shims can't be used as MCP server commands —
272
+ // resolve to node.exe + the actual JS entry point
273
+ let mcpCommand = oaBin;
274
+ let mcpFinalArgs = mcpArgs;
275
+ if (IS_WINDOWS && oaBin.toLowerCase().endsWith('.cmd')) {
276
+ const cmdContent = fs.readFileSync(oaBin, 'utf-8');
277
+ const jsMatch = cmdContent.match(/%dp0%\\([^\s"*?]+\.js)/i);
278
+ if (jsMatch) {
279
+ const cmdDir = path.dirname(path.resolve(oaBin));
280
+ const jsPath = path.resolve(cmdDir, jsMatch[1]);
281
+ const nodeExe = path.join(os.homedir(), '.openagents', 'nodejs', 'node.exe');
282
+ mcpCommand = fs.existsSync(nodeExe) ? nodeExe : 'node';
283
+ mcpFinalArgs = [jsPath, ...mcpArgs];
284
+ }
285
+ }
286
+
271
287
  const mcpConfig = {
272
288
  mcpServers: {
273
289
  'openagents-workspace': {
274
290
  type: 'stdio',
275
- command: oaBin,
276
- args: mcpArgs,
291
+ command: mcpCommand,
292
+ args: mcpFinalArgs,
277
293
  env: { OA_WORKSPACE_TOKEN: this.token },
278
294
  },
279
295
  },