orquesta-cli 0.2.32 → 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.
@@ -2,7 +2,7 @@ import { spawn } from 'child_process';
2
2
  import { randomUUID } from 'crypto';
3
3
  import chalk from 'chalk';
4
4
  import { configManager } from '../core/config/config-manager.js';
5
- import { syncOrquestaConfigs } from '../orquesta/config-sync.js';
5
+ import { syncOrquestaConfigs, validateOrquestaToken } from '../orquesta/config-sync.js';
6
6
  import { logger } from '../utils/logger.js';
7
7
  const ORQUESTA_API = process.env['ORQUESTA_API_URL'] || 'https://getorquesta.com';
8
8
  const WS_URL = process.env['ORQUESTA_WS_URL']?.replace(/^wss?:\/\//, 'https://') || 'https://ws.orquesta.live';
@@ -72,6 +72,12 @@ export async function browserLogin() {
72
72
  });
73
73
  console.log();
74
74
  console.log(chalk.green(`✓ Logged in as ${hit.organizationName}`));
75
+ try {
76
+ await validateOrquestaToken(hit.token);
77
+ }
78
+ catch (err) {
79
+ logger.debug('Machine registration after login failed', { err });
80
+ }
75
81
  try {
76
82
  const sync = await syncOrquestaConfigs();
77
83
  if (sync.success) {
@@ -882,6 +882,23 @@ export const PlanExecuteApp = ({ llmClient: initialLlmClient, modelInfo }) => {
882
882
  };
883
883
  const result = await executeSlashCommand(userMessage, commandContext);
884
884
  if (result.handled) {
885
+ const cmdWord = userMessage.trim().split(/\s+/)[0];
886
+ if (cmdWord === '/login' || cmdWord === '/sync') {
887
+ try {
888
+ if (configManager.hasEndpoints()) {
889
+ const newClient = createLLMClient();
890
+ setLlmClient(newClient);
891
+ const ep = configManager.getCurrentEndpoint();
892
+ const m = configManager.getCurrentModel();
893
+ if (ep && m)
894
+ setCurrentModelInfo({ model: m.name, endpoint: ep.baseUrl });
895
+ logger.debug('LLMClient rebuilt after auth/config change', { cmd: cmdWord });
896
+ }
897
+ }
898
+ catch (error) {
899
+ logger.error('Failed to rebuild LLMClient after auth change', error);
900
+ }
901
+ }
885
902
  if (result.updatedContext?.messages) {
886
903
  const lastMessage = result.updatedContext.messages[result.updatedContext.messages.length - 1];
887
904
  if (lastMessage && lastMessage.role === 'assistant') {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "orquesta-cli",
3
- "version": "0.2.32",
3
+ "version": "0.2.34",
4
4
  "description": "Orquesta CLI - AI-powered coding assistant with team collaboration",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",