@openagents-org/agent-launcher 0.2.61 → 0.2.62

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.61",
3
+ "version": "0.2.62",
4
4
  "description": "OpenAgents Launcher — install, configure, and run AI coding agents from your terminal",
5
5
  "main": "src/index.js",
6
6
  "bin": {
@@ -106,6 +106,14 @@ class ClaudeAdapter extends BaseAdapter {
106
106
  }
107
107
 
108
108
  _findClaudeBinary() {
109
+ const home = os.homedir();
110
+
111
+ // Tier 0: Portable install at ~/.openagents/nodejs/node_modules/.bin/
112
+ const portableBin = path.join(home, '.openagents', 'nodejs', 'node_modules', '.bin');
113
+ const ext = IS_WINDOWS ? '.cmd' : '';
114
+ const portableCandidate = path.join(portableBin, `claude${ext}`);
115
+ if (fs.existsSync(portableCandidate)) return portableCandidate;
116
+
109
117
  // Tier 1: PATH search
110
118
  try {
111
119
  if (IS_WINDOWS) {
@@ -120,12 +128,10 @@ class ClaudeAdapter extends BaseAdapter {
120
128
 
121
129
  // Tier 2: Next to current Node.js interpreter (npm global)
122
130
  const nodeBinDir = path.dirname(process.execPath);
123
- const ext = IS_WINDOWS ? '.cmd' : '';
124
131
  const nearNode = path.join(nodeBinDir, `claude${ext}`);
125
132
  if (fs.existsSync(nearNode)) return nearNode;
126
133
 
127
134
  // Tier 3: Common install locations
128
- const home = os.homedir();
129
135
  const candidates = IS_WINDOWS ? [
130
136
  path.join(process.env.APPDATA || '', 'npm', 'claude.cmd'),
131
137
  ] : [