@openagents-org/agent-launcher 0.2.43 → 0.2.44

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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/src/installer.js +15 -2
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openagents-org/agent-launcher",
3
- "version": "0.2.43",
3
+ "version": "0.2.44",
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
@@ -146,7 +146,7 @@ class Installer {
146
146
 
147
147
  // Use bundled node/npm if system npm not available
148
148
  if (cmd.startsWith('npm install')) {
149
- const args = cmd.replace('npm install', 'install');
149
+ const args = cmd.replace('npm install', 'install --ignore-scripts');
150
150
  cmd = this._resolveNpmCommand(args);
151
151
  }
152
152
 
@@ -181,7 +181,7 @@ class Installer {
181
181
  // Resolve npm command
182
182
  let cmd = rawCmd;
183
183
  if (rawCmd.startsWith('npm install')) {
184
- const args = rawCmd.replace('npm install', 'install --loglevel=verbose');
184
+ const args = rawCmd.replace('npm install', 'install --loglevel=verbose --ignore-scripts');
185
185
  cmd = this._resolveNpmCommand(args);
186
186
  } else if (rawCmd.startsWith('pip install') || rawCmd.startsWith('pipx install')) {
187
187
  cmd = rawCmd; // pip commands stay as-is
@@ -236,9 +236,22 @@ class Installer {
236
236
 
237
237
  const output = await this._execShell(uninstallCmd);
238
238
  this._markUninstalled(agentType);
239
+ // Clean stale shims on Windows (npm sometimes leaves .cmd/.ps1 files behind)
240
+ this._cleanStaleShims(agentType);
239
241
  return { success: true, output };
240
242
  }
241
243
 
244
+ _cleanStaleShims(agentType) {
245
+ const entry = this.registry.getEntry(agentType);
246
+ const binary = entry && entry.install ? entry.install.binary : agentType;
247
+ if (!binary) return;
248
+ const portableDir = path.join(os.homedir(), '.openagents', 'nodejs');
249
+ for (const ext of ['', '.cmd', '.ps1']) {
250
+ const shimPath = path.join(portableDir, binary + ext);
251
+ try { if (fs.existsSync(shimPath)) fs.unlinkSync(shimPath); } catch {}
252
+ }
253
+ }
254
+
242
255
  /**
243
256
  * Uninstall with streaming output via callback.
244
257
  */