orquesta-cli 0.2.1 → 0.2.3

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.
@@ -454,6 +454,63 @@ ${executorLines}
454
454
  },
455
455
  };
456
456
  }
457
+ if (trimmedCommand === '/login') {
458
+ let body;
459
+ try {
460
+ const { browserLogin } = await import('../setup/browser-login.js');
461
+ const result = await browserLogin();
462
+ if (result.success) {
463
+ const orq = configManager.getOrquestaConfig();
464
+ body = `Signed in to Orquesta.\n Organization: ${orq?.organizationName ?? 'Unknown'}\n Project: ${orq?.projectName ?? 'Unknown'}\n\nRun /sync to pull endpoints from the dashboard, or /model to pick one.`;
465
+ }
466
+ else {
467
+ body = `Login failed${result.error ? `: ${result.error}` : ''}.`;
468
+ }
469
+ }
470
+ catch (error) {
471
+ body = `Login error: ${error.message}`;
472
+ }
473
+ const updatedMessages = [
474
+ ...context.messages,
475
+ { role: 'assistant', content: body },
476
+ ];
477
+ context.setMessages(updatedMessages);
478
+ return { handled: true, shouldContinue: false, updatedContext: { messages: updatedMessages } };
479
+ }
480
+ if (trimmedCommand === '/logout') {
481
+ let body;
482
+ try {
483
+ const orq = configManager.getOrquestaConfig();
484
+ if (!orq?.token) {
485
+ body = 'Not signed in to Orquesta.';
486
+ }
487
+ else {
488
+ await configManager.clearOrquestaConnection();
489
+ body = `Signed out of Orquesta${orq.organizationName ? ` (${orq.organizationName})` : ''}.\nLocal LLM configurations are preserved.`;
490
+ }
491
+ }
492
+ catch (error) {
493
+ body = `Logout error: ${error.message}`;
494
+ }
495
+ const updatedMessages = [
496
+ ...context.messages,
497
+ { role: 'assistant', content: body },
498
+ ];
499
+ context.setMessages(updatedMessages);
500
+ return { handled: true, shouldContinue: false, updatedContext: { messages: updatedMessages } };
501
+ }
502
+ if (trimmedCommand === '/whoami') {
503
+ const orq = configManager.getOrquestaConfig();
504
+ const body = orq?.token
505
+ ? `Signed in to Orquesta.\n Organization: ${orq.organizationName ?? 'Unknown'}\n Project: ${orq.projectName ?? 'Unknown'}\n Connected: ${orq.connectedAt ? new Date(orq.connectedAt).toLocaleString() : 'Unknown'}`
506
+ : 'Not signed in to Orquesta.\nRun /login to authenticate.';
507
+ const updatedMessages = [
508
+ ...context.messages,
509
+ { role: 'assistant', content: body },
510
+ ];
511
+ context.setMessages(updatedMessages);
512
+ return { handled: true, shouldContinue: false, updatedContext: { messages: updatedMessages } };
513
+ }
457
514
  if (trimmedCommand === '/help') {
458
515
  const helpMessage = `
459
516
  Available commands:
@@ -469,11 +526,9 @@ Available commands:
469
526
  /cost - Estimated USD spend this process (by model)
470
527
  /route - Pin Batuta Auto tier (fast/balanced/premium/auto)
471
528
  /sync - Bidirectional sync with Orquesta dashboard (pull & push LLM configs)
472
-
473
- CLI Options (restart required):
474
- --token <token> - Connect to Orquesta with CLI token
475
- --status - Show Orquesta connection status
476
- --disconnect - Disconnect from Orquesta
529
+ /login - Sign in to Orquesta via browser (opens getorquesta.com)
530
+ /logout - Sign out of Orquesta (clears token, keeps local LLM configs)
531
+ /whoami - Show current Orquesta connection
477
532
 
478
533
  Keyboard shortcuts:
479
534
  Ctrl+C - Exit
@@ -41,6 +41,18 @@ export const SLASH_COMMANDS = [
41
41
  name: '/usage',
42
42
  description: 'Show token usage statistics',
43
43
  },
44
+ {
45
+ name: '/login',
46
+ description: 'Sign in to Orquesta via browser',
47
+ },
48
+ {
49
+ name: '/logout',
50
+ description: 'Sign out of Orquesta (keeps local LLM configs)',
51
+ },
52
+ {
53
+ name: '/whoami',
54
+ description: 'Show current Orquesta connection',
55
+ },
44
56
  {
45
57
  name: '/help',
46
58
  description: 'Show help message',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "orquesta-cli",
3
- "version": "0.2.1",
3
+ "version": "0.2.3",
4
4
  "description": "Orquesta CLI - AI-powered coding assistant with team collaboration",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",