@openagents-org/agent-launcher 0.2.58 → 0.2.60

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.58",
3
+ "version": "0.2.60",
4
4
  "description": "OpenAgents Launcher — install, configure, and run AI coding agents from your terminal",
5
5
  "main": "src/index.js",
6
6
  "bin": {
package/src/installer.js CHANGED
@@ -42,7 +42,15 @@ class Installer {
42
42
  const entry = this.registry.getEntry(agentType);
43
43
  const npmPkg = entry && entry.install ? entry.install.npm_package : null;
44
44
  const binary = entry && entry.install ? entry.install.binary : agentType;
45
- const pkgDir = path.join(globalModules, npmPkg || binary);
45
+ // Extract actual npm package name from install command (e.g. "npm install -g @anthropic-ai/claude-code" → "@anthropic-ai/claude-code")
46
+ const installCmd = entry && entry.install ? this._getInstallCommand(entry.install) : null;
47
+ let npmPkgFromCmd = null;
48
+ if (!npmPkg && installCmd && installCmd.includes('npm install')) {
49
+ const match = installCmd.match(/npm install\s+(?:-g\s+)?(@?[\w-]+(?:\/[\w-]+)?)(?:@\S*)?$/);
50
+ if (match) npmPkgFromCmd = match[1];
51
+ }
52
+ const pkgName = npmPkg || npmPkgFromCmd || binary;
53
+ const pkgDir = path.join(globalModules, pkgName);
46
54
  if (fs.existsSync(path.join(pkgDir, 'package.json'))) return true;
47
55
 
48
56
  // Marker file alone is not enough — package may have been pruned
package/src/paths.js CHANGED
@@ -42,8 +42,9 @@ function getExtraBinDirs() {
42
42
  if (nodeDir) _push(dirs, nodeDir);
43
43
  } catch {}
44
44
 
45
- // Add portable Node.js directory (~/.openagents/nodejs/)
45
+ // Add portable Node.js directory (~/.openagents/nodejs/) and agent binaries
46
46
  const portableNode = path.join(HOME, '.openagents', 'nodejs');
47
+ _push(dirs, path.join(portableNode, 'node_modules', '.bin'));
47
48
  _push(dirs, portableNode);
48
49
 
49
50
  // Filter to existing directories only, deduplicate