@openagents-org/agent-launcher 0.2.14 → 0.2.16

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.14",
3
+ "version": "0.2.16",
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/daemon.js CHANGED
@@ -209,14 +209,13 @@ class Daemon {
209
209
  }
210
210
  } catch {}
211
211
 
212
- // Wait for process to die
213
- for (let i = 0; i < 20; i++) {
214
- if (!Daemon._isAlive(pid)) {
215
- try { fs.unlinkSync(pidFile); } catch {}
216
- try { fs.unlinkSync(statusFile); } catch {}
217
- return true;
218
- }
219
- // Busy-wait 500ms (sync, used only in CLI stop command)
212
+ // Always clean up PID and status files after kill attempt
213
+ try { fs.unlinkSync(pidFile); } catch {}
214
+ try { fs.unlinkSync(statusFile); } catch {}
215
+
216
+ // Wait briefly for process to die
217
+ for (let i = 0; i < 5; i++) {
218
+ if (!Daemon._isAlive(pid)) return true;
220
219
  execSync(IS_WINDOWS ? 'ping -n 2 127.0.0.1 >nul' : 'sleep 0.5', {
221
220
  stdio: 'ignore', timeout: 5000,
222
221
  });
package/src/utils.js CHANGED
@@ -46,7 +46,7 @@ function testLLMConnection(env) {
46
46
  };
47
47
  body = JSON.stringify({
48
48
  model: model || 'gpt-4o-mini',
49
- max_tokens: 32,
49
+ max_completion_tokens: 32,
50
50
  messages: [{ role: 'user', content: 'Say hi in 5 words.' }],
51
51
  });
52
52
  }