@openagents-org/agent-launcher 0.2.47 → 0.2.48

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.47",
3
+ "version": "0.2.48",
4
4
  "description": "OpenAgents Launcher — install, configure, and run AI coding agents from your terminal",
5
5
  "main": "src/index.js",
6
6
  "bin": {
@@ -460,6 +460,7 @@ class OpenClawAdapter extends BaseAdapter {
460
460
  // This is the proper way to add custom LLM endpoints to OpenClaw.
461
461
  // See: https://docs.openclaw.ai/concepts/model-providers
462
462
  try {
463
+ fs.mkdirSync(OPENCLAW_STATE_DIR, { recursive: true });
463
464
  let config = {};
464
465
  try { config = JSON.parse(fs.readFileSync(configFile, 'utf-8')); } catch {}
465
466
 
@@ -478,6 +479,20 @@ class OpenClawAdapter extends BaseAdapter {
478
479
 
479
480
  fs.writeFileSync(configFile, JSON.stringify(config, null, 2), 'utf-8');
480
481
  } catch {}
482
+
483
+ // Also write auth-profiles.json for the custom provider
484
+ try {
485
+ const agentDir = path.join(OPENCLAW_STATE_DIR, 'agents', 'main', 'agent');
486
+ fs.mkdirSync(agentDir, { recursive: true });
487
+ const authFile = path.join(agentDir, 'auth-profiles.json');
488
+ let authData = { version: 1, profiles: {} };
489
+ try { authData = JSON.parse(fs.readFileSync(authFile, 'utf-8')); } catch {}
490
+ authData.profiles = authData.profiles || {};
491
+ authData.profiles['custom:manual'] = { type: 'token', provider: 'custom', token: apiKey };
492
+ authData.lastGood = authData.lastGood || {};
493
+ authData.lastGood.custom = 'custom:manual';
494
+ fs.writeFileSync(authFile, JSON.stringify(authData, null, 2), 'utf-8');
495
+ } catch {}
481
496
  }
482
497
  }
483
498
  }