@openagents-org/agent-launcher 0.2.62 → 0.2.63

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.62",
3
+ "version": "0.2.63",
4
4
  "description": "OpenAgents Launcher — install, configure, and run AI coding agents from your terminal",
5
5
  "main": "src/index.js",
6
6
  "bin": {
@@ -349,12 +349,15 @@ class ClaudeAdapter extends BaseAdapter {
349
349
  // visible console windows and Unicode path issues
350
350
  if (IS_WINDOWS && cmd[0].toLowerCase().endsWith('.cmd')) {
351
351
  // Resolve .cmd shim → actual JS entry point
352
+ // npm shims use %dp0% (directory of the .cmd file) as a relative base
353
+ const cmdDir = path.dirname(path.resolve(cmd[0]));
352
354
  const cmdContent = fs.readFileSync(cmd[0], 'utf-8');
353
- const jsMatch = cmdContent.match(/"([^"]+\.js)"/);
355
+ const jsMatch = cmdContent.match(/"?%dp0%\\([^"*?]+\.js)"?/i);
354
356
  if (jsMatch) {
357
+ const jsPath = path.resolve(cmdDir, jsMatch[1]);
355
358
  const nodeExe = path.join(os.homedir(), '.openagents', 'nodejs', 'node.exe');
356
359
  const nodeBin = fs.existsSync(nodeExe) ? nodeExe : 'node';
357
- cmd = [nodeBin, jsMatch[1], ...cmd.slice(1)];
360
+ cmd = [nodeBin, jsPath, ...cmd.slice(1)];
358
361
  } else {
359
362
  cmd = ['cmd.exe', '/c', ...cmd];
360
363
  }