@openagents-org/agent-launcher 0.2.38 → 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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openagents-org/agent-launcher",
3
- "version": "0.2.38",
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": {
package/registry.json CHANGED
@@ -69,11 +69,12 @@
69
69
  "env_vars": [
70
70
  "ANTHROPIC_API_KEY"
71
71
  ],
72
- "creds_file": "~/.claude/.credentials.json",
73
- "creds_key": "claudeAiOauth",
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 creds = JSON.parse(fs.readFileSync(credsPath, 'utf-8'));
112
- if (checkReady.creds_key) {
113
- ready = !!creds[checkReady.creds_key];
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
- ready = true;
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
- // If the cached entry is missing install info, merge with bundled
113
- if (entry && !entry.install) {
114
- const bundled = this._loadBundled();
115
- const bundledEntry = bundled.find((e) => e.name === agentType);
116
- if (bundledEntry && bundledEntry.install) {
117
- return { ...entry, install: bundledEntry.install };
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
  }