orquesta-cli 0.2.84 → 0.2.85

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.
Files changed (2) hide show
  1. package/dist/cli.js +31 -0
  2. package/package.json +1 -1
package/dist/cli.js CHANGED
@@ -41,6 +41,36 @@ async function readPromptFromStdin() {
41
41
  }
42
42
  return Buffer.concat(chunks).toString('utf-8').trim();
43
43
  }
44
+ async function ensureBatutaFromEnv() {
45
+ const token = process.env['ORQUESTA_TOKEN'];
46
+ if (!token)
47
+ return;
48
+ const apiUrl = (process.env['ORQUESTA_API_URL'] || 'https://getorquesta.com').replace(/\/+$/, '');
49
+ if (configManager.getAllEndpoints().some((e) => e.id === 'batuta-proxy')) {
50
+ await configManager.removeEndpoint('batuta-proxy');
51
+ }
52
+ await configManager.addEndpoint({
53
+ id: 'batuta-proxy',
54
+ name: 'Batuta',
55
+ baseUrl: `${apiUrl}/api/v1`,
56
+ apiKey: token,
57
+ provider: 'batuta',
58
+ models: [{
59
+ id: 'batuta-auto',
60
+ name: 'Batuta Auto (smart routing)',
61
+ maxTokens: 200000,
62
+ enabled: true,
63
+ healthStatus: 'healthy',
64
+ lastHealthCheck: new Date(),
65
+ }],
66
+ createdAt: new Date(),
67
+ updatedAt: new Date(),
68
+ });
69
+ if (!configManager.getCurrentEndpoint()) {
70
+ await configManager.setCurrentEndpoint('batuta-proxy');
71
+ await configManager.setCurrentModel('batuta-auto');
72
+ }
73
+ }
44
74
  async function resolveHookToken(explicitToken) {
45
75
  await configManager.initialize();
46
76
  const saved = configManager.getOrquestaConfig();
@@ -129,6 +159,7 @@ program
129
159
  return;
130
160
  }
131
161
  await configManager.initialize();
162
+ await ensureBatutaFromEnv();
132
163
  if (shouldShowOnboarding()) {
133
164
  await runOnboarding();
134
165
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "orquesta-cli",
3
- "version": "0.2.84",
3
+ "version": "0.2.85",
4
4
  "description": "Orquesta CLI - AI-powered coding assistant with team collaboration",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",