colana 1.0.0-beta.72 → 1.0.0-beta.74

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": "colana",
3
- "version": "1.0.0-beta.72",
3
+ "version": "1.0.0-beta.74",
4
4
  "description": "Agent-First. Multiplied. Multi-agent command center for AI coding agents.",
5
5
  "type": "module",
6
6
  "main": "server/index.js",
package/public/app.js CHANGED
@@ -869,6 +869,12 @@ async function launchPersonalAgent() {
869
869
  task: 'Personal Assistant',
870
870
  mode: 'pty',
871
871
  }, { repair: err.code === 'BROKEN_INSTALL' });
872
+ } else if (err.code === 'GATEWAY_AUTH_MISSING') {
873
+ showToast(err.message || 'The Personal Agent needs an API key. Open Settings to add one.', 'warning', 8000);
874
+ openSettingsModal().then(() => {
875
+ const el = document.getElementById('settings-openclaw-model');
876
+ if (el) el.scrollIntoView({ behavior: 'smooth', block: 'center' });
877
+ });
872
878
  } else {
873
879
  showToast('Failed to start personal agent: ' + (err.message || err), 'error');
874
880
  }
@@ -12,7 +12,7 @@ import fs from 'fs';
12
12
  import config from './config.js';
13
13
  import { commandExistsSync, resolveNpmGlobalEntryPoint } from './platform.js';
14
14
  import { isGitRepo } from './git-ops.js';
15
- import { readAuthStore, getOpenClawConfig } from './openclaw-config.js';
15
+ import { readAuthStore, getOpenClawConfig, syncAuthProfilesFromEnv } from './openclaw-config.js';
16
16
  import { refreshPathAfterInstall } from './auto-installer.js';
17
17
 
18
18
  /**
@@ -198,6 +198,8 @@ function checkAiderGitRepo(projectPath) {
198
198
 
199
199
  /**
200
200
  * OpenClaw checks: config must exist and auth profiles must have at least one key.
201
+ * Syncs environment API keys (e.g. ANTHROPIC_API_KEY from Settings) into OpenClaw's
202
+ * auth-profiles.json before checking, so keys saved in Colana are available to the gateway.
201
203
  */
202
204
  function checkOpenClawConfig() {
203
205
  const cfg = getOpenClawConfig();
@@ -211,6 +213,12 @@ function checkOpenClawConfig() {
211
213
  };
212
214
  }
213
215
 
216
+ // Sync API keys from process.env (loaded from Colana Settings) into OpenClaw's
217
+ // auth-profiles.json. This ensures keys saved via the wizard or Settings panel
218
+ // are available before we check — otherwise the gateway ensure (which also syncs)
219
+ // never gets reached because this preflight fails first.
220
+ syncAuthProfilesFromEnv();
221
+
214
222
  const store = readAuthStore();
215
223
  const hasKey = Object.values(store.profiles || {}).some(p => p.key);
216
224
  if (!hasKey) {
@@ -218,8 +226,8 @@ function checkOpenClawConfig() {
218
226
  ok: false,
219
227
  code: 'GATEWAY_AUTH_MISSING',
220
228
  httpStatus: 400,
221
- message: 'No API key configured for the Personal Agent.',
222
- fix: 'Add a key in Settings > Personal AI Agents.',
229
+ message: 'The Personal Agent needs an API key to call AI models. Subscription auth (Claude, Gemini) doesn\'t carry over — add an Anthropic or OpenAI API key in Settings.',
230
+ fix: 'Open Settings > Personal AI Agents and enter an API key.',
223
231
  };
224
232
  }
225
233