@openagents-org/agent-launcher 0.1.12 → 0.1.14

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.1.12",
3
+ "version": "0.1.14",
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/registry.json CHANGED
@@ -88,6 +88,8 @@
88
88
  ],
89
89
  "install": {
90
90
  "binary": "code",
91
+ "verify": "code --list-extensions 2>/dev/null | grep -qi claude-dev",
92
+ "verify_win": "code --list-extensions 2>nul | findstr /i claude-dev",
91
93
  "macos": "code --install-extension saoudrizwan.claude-dev",
92
94
  "linux": "code --install-extension saoudrizwan.claude-dev",
93
95
  "windows": "code --install-extension saoudrizwan.claude-dev"
@@ -166,6 +168,8 @@
166
168
  ],
167
169
  "install": {
168
170
  "binary": "gh",
171
+ "verify": "gh copilot --version >/dev/null 2>&1",
172
+ "verify_win": "gh copilot --version >nul 2>nul",
169
173
  "macos": "gh extension install github/gh-copilot",
170
174
  "linux": "gh extension install github/gh-copilot",
171
175
  "windows": "gh extension install github/gh-copilot"
@@ -185,6 +189,8 @@
185
189
  "builtin": true,
186
190
  "install": {
187
191
  "binary": "cursor",
192
+ "verify": "cursor --version 2>/dev/null | grep -qi cursor",
193
+ "verify_win": "cursor --version 2>nul | findstr /i cursor",
188
194
  "requires": [
189
195
  null
190
196
  ],
package/src/installer.js CHANGED
@@ -35,6 +35,18 @@ class Installer {
35
35
  * Checks binary on PATH first, then marker files.
36
36
  */
37
37
  isInstalled(agentType) {
38
+ // Use verify command if available for accurate detection
39
+ const entry = this.registry.getEntry(agentType);
40
+ const IS_WINDOWS = process.platform === 'win32';
41
+ const verifyCmd = entry && entry.install
42
+ ? (IS_WINDOWS ? entry.install.verify_win : entry.install.verify)
43
+ : null;
44
+ if (verifyCmd) {
45
+ try {
46
+ require('child_process').execSync(verifyCmd, { stdio: 'ignore', timeout: 5000 });
47
+ return true;
48
+ } catch { return false; }
49
+ }
38
50
  if (this._whichBinary(agentType)) return true;
39
51
  if (this._hasMarker(agentType)) {
40
52
  // Marker exists but binary not found — stale marker, clean it up
package/src/paths.js CHANGED
@@ -124,6 +124,9 @@ function _addWindowsPaths(dirs) {
124
124
  // npm global bin
125
125
  if (appData) _push(dirs, path.join(appData, 'npm'));
126
126
 
127
+ // Portable Node.js installed by OpenAgents Launcher
128
+ _push(dirs, path.join(HOME, '.openagents', 'nodejs'));
129
+
127
130
  // Node.js install
128
131
  _push(dirs, path.join(programFiles, 'nodejs'));
129
132
 
package/src/tui.js CHANGED
@@ -93,10 +93,19 @@ function loadAgentRows(connector) {
93
93
  }
94
94
 
95
95
  function loadCatalog(connector) {
96
+ const { execSync } = require('child_process');
96
97
  const entries = connector.registry.getCatalogSync();
97
98
  return entries.map(e => {
98
99
  let installed = false;
99
- try { const { whichBinary } = require('./paths'); installed = !!whichBinary((e.install && e.install.binary) || e.name); } catch {}
100
+
101
+ // If a verify command exists, use it for accurate detection
102
+ const verifyCmd = IS_WINDOWS ? (e.install && e.install.verify_win) : (e.install && e.install.verify);
103
+ if (verifyCmd) {
104
+ try { execSync(verifyCmd, { stdio: 'ignore', timeout: 5000 }); installed = true; } catch {}
105
+ } else {
106
+ try { const { whichBinary } = require('./paths'); installed = !!whichBinary((e.install && e.install.binary) || e.name); } catch {}
107
+ }
108
+
100
109
  if (!installed) {
101
110
  try {
102
111
  const f = path.join(connector._configDir, 'installed_agents.json');