@openagents-org/agent-launcher 0.2.37 → 0.2.39
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 +1 -4
- package/registry.json +4 -3
- package/src/installer.js +12 -5
- package/src/registry.js +9 -7
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@openagents-org/agent-launcher",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.39",
|
|
4
4
|
"description": "OpenAgents Launcher — install, configure, and run AI coding agents from your terminal",
|
|
5
5
|
"main": "src/index.js",
|
|
6
6
|
"bin": {
|
|
@@ -39,8 +39,5 @@
|
|
|
39
39
|
"dependencies": {
|
|
40
40
|
"blessed": "^0.1.81",
|
|
41
41
|
"ws": "^8.18.0"
|
|
42
|
-
},
|
|
43
|
-
"optionalDependencies": {
|
|
44
|
-
"node-pty": "^1.1.0"
|
|
45
42
|
}
|
|
46
43
|
}
|
package/registry.json
CHANGED
|
@@ -69,11 +69,12 @@
|
|
|
69
69
|
"env_vars": [
|
|
70
70
|
"ANTHROPIC_API_KEY"
|
|
71
71
|
],
|
|
72
|
-
"creds_file": "~/.claude
|
|
73
|
-
"creds_key":
|
|
72
|
+
"creds_file": "~/.claude/sessions",
|
|
73
|
+
"creds_key": null,
|
|
74
74
|
"keychain_service": "Claude Code-credentials",
|
|
75
75
|
"not_ready_message": "Not logged in. Run: claude login",
|
|
76
|
-
"login_command": "claude login"
|
|
76
|
+
"login_command": "claude login",
|
|
77
|
+
"alt_check": "claude --print hi"
|
|
77
78
|
},
|
|
78
79
|
"env_config": []
|
|
79
80
|
},
|
package/src/installer.js
CHANGED
|
@@ -103,16 +103,23 @@ class Installer {
|
|
|
103
103
|
if (process.env[v]) { ready = true; break; }
|
|
104
104
|
}
|
|
105
105
|
}
|
|
106
|
-
// Check credentials file
|
|
106
|
+
// Check credentials file or directory
|
|
107
107
|
if (!ready && checkReady.creds_file) {
|
|
108
108
|
try {
|
|
109
109
|
const credsPath = checkReady.creds_file.replace('~', os.homedir());
|
|
110
110
|
if (fs.existsSync(credsPath)) {
|
|
111
|
-
const
|
|
112
|
-
if (
|
|
113
|
-
|
|
111
|
+
const stat = fs.statSync(credsPath);
|
|
112
|
+
if (stat.isDirectory()) {
|
|
113
|
+
// Directory exists — check if it has files (e.g. session files)
|
|
114
|
+
ready = fs.readdirSync(credsPath).length > 0;
|
|
114
115
|
} else {
|
|
115
|
-
|
|
116
|
+
// File — parse JSON and check key
|
|
117
|
+
const creds = JSON.parse(fs.readFileSync(credsPath, 'utf-8'));
|
|
118
|
+
if (checkReady.creds_key) {
|
|
119
|
+
ready = !!creds[checkReady.creds_key];
|
|
120
|
+
} else {
|
|
121
|
+
ready = true;
|
|
122
|
+
}
|
|
116
123
|
}
|
|
117
124
|
}
|
|
118
125
|
} catch {}
|
package/src/registry.js
CHANGED
|
@@ -109,13 +109,15 @@ class Registry {
|
|
|
109
109
|
getEntry(agentType) {
|
|
110
110
|
const catalog = this.getCatalogSync();
|
|
111
111
|
const entry = catalog.find((e) => e.name === agentType) || null;
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
112
|
+
if (!entry) return null;
|
|
113
|
+
// Merge missing fields from bundled registry
|
|
114
|
+
const bundled = this._loadBundled();
|
|
115
|
+
const b = bundled.find((e) => e.name === agentType);
|
|
116
|
+
if (b) {
|
|
117
|
+
if (!entry.install && b.install) entry.install = b.install;
|
|
118
|
+
if (!entry.check_ready && b.check_ready) entry.check_ready = b.check_ready;
|
|
119
|
+
if (!entry.launch && b.launch) entry.launch = b.launch;
|
|
120
|
+
if ((!entry.env_config || !entry.env_config.length) && b.env_config?.length) entry.env_config = b.env_config;
|
|
119
121
|
}
|
|
120
122
|
return entry;
|
|
121
123
|
}
|