@openagents-org/agent-launcher 0.2.79 → 0.2.81
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 +2 -1
- package/src/cli.js +2 -2
- package/src/daemon.js +1 -1
- package/src/tui.js +20 -3
package/package.json
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@openagents-org/agent-launcher",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.81",
|
|
4
4
|
"description": "OpenAgents Launcher — install, configure, and run AI coding agents from your terminal",
|
|
5
5
|
"main": "src/index.js",
|
|
6
6
|
"bin": {
|
|
7
|
+
"agn": "bin/agent-connector.js",
|
|
7
8
|
"openagents": "bin/agent-connector.js",
|
|
8
9
|
"agent-connector": "bin/agent-connector.js"
|
|
9
10
|
},
|
package/src/cli.js
CHANGED
|
@@ -454,7 +454,7 @@ async function cmdVersion() {
|
|
|
454
454
|
}
|
|
455
455
|
|
|
456
456
|
async function cmdHelp() {
|
|
457
|
-
print(`Usage:
|
|
457
|
+
print(`Usage: agn <command> [options]
|
|
458
458
|
|
|
459
459
|
Commands:
|
|
460
460
|
up [--foreground] Start daemon (background by default)
|
|
@@ -558,7 +558,7 @@ async function main() {
|
|
|
558
558
|
const handler = commands[cmd];
|
|
559
559
|
if (!handler) {
|
|
560
560
|
print(`Unknown command: ${cmd}`);
|
|
561
|
-
print('Run:
|
|
561
|
+
print('Run: agn help');
|
|
562
562
|
process.exitCode = 1;
|
|
563
563
|
return;
|
|
564
564
|
}
|
package/src/daemon.js
CHANGED
package/src/tui.js
CHANGED
|
@@ -104,13 +104,30 @@ function loadAgentRows(connector) {
|
|
|
104
104
|
if (process.env[v]) { isReady = true; break; }
|
|
105
105
|
}
|
|
106
106
|
}
|
|
107
|
-
// Check creds file (for claude)
|
|
107
|
+
// Check creds file/directory (for claude)
|
|
108
108
|
if (!isReady && cr.creds_file) {
|
|
109
109
|
const credsPath = cr.creds_file.replace('~', process.env.HOME || process.env.USERPROFILE || '');
|
|
110
110
|
try {
|
|
111
111
|
if (fs.existsSync(credsPath)) {
|
|
112
|
-
const
|
|
113
|
-
if (
|
|
112
|
+
const stat = fs.statSync(credsPath);
|
|
113
|
+
if (stat.isDirectory()) {
|
|
114
|
+
// Directory (e.g. ~/.claude/sessions) — check if it has files
|
|
115
|
+
isReady = fs.readdirSync(credsPath).length > 0;
|
|
116
|
+
} else {
|
|
117
|
+
const creds = JSON.parse(fs.readFileSync(credsPath, 'utf-8'));
|
|
118
|
+
if (cr.creds_key) isReady = !!creds[cr.creds_key];
|
|
119
|
+
else isReady = true;
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
} catch {}
|
|
123
|
+
}
|
|
124
|
+
// Also check OAuth credentials (Claude Code stores tokens in .credentials.json)
|
|
125
|
+
if (!isReady) {
|
|
126
|
+
try {
|
|
127
|
+
const oauthFile = path.join(process.env.HOME || '', '.claude', '.credentials.json');
|
|
128
|
+
if (fs.existsSync(oauthFile)) {
|
|
129
|
+
const creds = JSON.parse(fs.readFileSync(oauthFile, 'utf-8'));
|
|
130
|
+
if (creds.claudeAiOauth && creds.claudeAiOauth.accessToken) isReady = true;
|
|
114
131
|
}
|
|
115
132
|
} catch {}
|
|
116
133
|
}
|