@openagents-org/agent-launcher 0.2.33 → 0.2.34

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.33",
3
+ "version": "0.2.34",
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
@@ -124,6 +124,12 @@ class Daemon {
124
124
  * Restart a single agent by name.
125
125
  */
126
126
  async restartAgent(agentName) {
127
+ // Set state to 'starting' immediately so UI never sees 'stopped' during restart
128
+ if (this._processes[agentName]) {
129
+ this._processes[agentName].state = 'starting';
130
+ this._writeStatus();
131
+ }
132
+
127
133
  await this.stopAgent(agentName);
128
134
  this._stoppedAgents.delete(agentName);
129
135
 
package/src/installer.js CHANGED
@@ -91,7 +91,34 @@ class Installer {
91
91
  version = match ? match[1] : raw.split('\n')[0];
92
92
  } catch {}
93
93
 
94
- return { installed: true, binary, version };
94
+ // Check login/ready status if check_ready is defined
95
+ let ready = true;
96
+ const checkReady = entry?.check_ready;
97
+ if (checkReady) {
98
+ ready = false;
99
+ // Check env vars
100
+ if (checkReady.env_vars) {
101
+ for (const v of checkReady.env_vars) {
102
+ if (process.env[v]) { ready = true; break; }
103
+ }
104
+ }
105
+ // Check credentials file
106
+ if (!ready && checkReady.creds_file) {
107
+ try {
108
+ const credsPath = checkReady.creds_file.replace('~', os.homedir());
109
+ if (fs.existsSync(credsPath)) {
110
+ const creds = JSON.parse(fs.readFileSync(credsPath, 'utf-8'));
111
+ if (checkReady.creds_key) {
112
+ ready = !!creds[checkReady.creds_key];
113
+ } else {
114
+ ready = true;
115
+ }
116
+ }
117
+ } catch {}
118
+ }
119
+ }
120
+
121
+ return { installed: true, binary, version, ready };
95
122
  }
96
123
 
97
124
  /**