gbos 1.3.1 → 1.3.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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gbos",
3
- "version": "1.3.1",
3
+ "version": "1.3.3",
4
4
  "description": "GBOS - Command line interface for GBOS services",
5
5
  "main": "src/index.js",
6
6
  "bin": {
package/src/cli.js CHANGED
@@ -6,7 +6,6 @@ const program = new Command();
6
6
  const authCommand = require('./commands/auth');
7
7
  const connectCommand = require('./commands/connect');
8
8
  const logoutCommand = require('./commands/logout');
9
- const logoCommand = require('./commands/logo');
10
9
  const { tasksCommand, nextTaskCommand, continueCommand, fallbackCommand, autoCommand } = require('./commands/tasks');
11
10
  const config = require('./lib/config');
12
11
  const { displayStatus, printBanner } = require('./lib/display');
@@ -130,13 +129,6 @@ program
130
129
  .option('-a, --all', 'Clear all stored data including machine ID')
131
130
  .action(logoutCommand);
132
131
 
133
- program
134
- .command('logo')
135
- .description('Print the GBOS logo banner')
136
- .action(() => {
137
- printBanner();
138
- });
139
-
140
132
  program
141
133
  .command('help [command]')
142
134
  .description('Display help for a specific command')
@@ -147,7 +139,7 @@ program
147
139
  cmd.outputHelp();
148
140
  } else {
149
141
  console.log(`Unknown command: ${command}`);
150
- console.log('Available commands: auth, connect, disconnect, status, tasks, next_task, continue, fallback, auto, logout, help');
142
+ console.log('Available commands: auth, connect, disconnect, status, tasks, next, continue, fallback, auto, logout, help');
151
143
  }
152
144
  } else {
153
145
  program.outputHelp();
@@ -363,9 +363,16 @@ async function connectCommand(options) {
363
363
  console.log('Skills setup results:', JSON.stringify(skillsResults, null, 2));
364
364
  }
365
365
 
366
+ // Get user name from session
367
+ const userName = session.user_first_name && session.user_last_name
368
+ ? `${session.user_first_name} ${session.user_last_name}`
369
+ : session.user_name || 'N/A';
370
+
366
371
  // Display success with banner
367
372
  displayConnectBanner({
368
373
  accountName: accountName,
374
+ userName: userName,
375
+ sessionId: connection_id,
369
376
  applicationName: applicationName,
370
377
  nodeName: node.name,
371
378
  });
@@ -27,12 +27,12 @@ const PURPLE = {
27
27
 
28
28
  // GBOS.IO ASCII Banner
29
29
  const GBOS_BANNER = [
30
- " ██████╗ ██████╗ ██████╗ ███████╗ ██╗ ██████╗ ",
31
- "██╔════╝ ██╔══██╗██╔═══██╗██╔════╝ ██║██╔═══██╗",
32
- "██║ ███╗██████╔╝██║ ██║███████╗ ██║██║ ██║",
33
- "██║ ██║██╔══██╗██║ ██║╚════██║ ██║██║ ██║",
34
- "╚██████╔╝██████╔╝╚██████╔╝███████║ ██║╚██████╔╝",
35
- " ╚═════╝ ╚═════╝ ╚═════╝ ╚══════╝ ╚═╝ ╚═════╝ "
30
+ " ██████╗ ██████╗ ██████╗ ███████╗ ██╗ ██████╗ ",
31
+ "██╔════╝ ██╔══██╗██╔═══██╗██╔════╝ ██║██╔═══██╗",
32
+ "██║ ███╗██████╔╝██║ ██║███████╗██╗██║██║ ██║",
33
+ "██║ ██║██╔══██╗██║ ██║╚════██║╚═╝██║██║ ██║",
34
+ "╚██████╔╝██████╔╝╚██████╔╝███████║ ██║╚██████╔╝",
35
+ " ╚═════╝ ╚═════╝ ╚═════╝ ╚══════╝ ╚═╝ ╚═════╝ "
36
36
  ];
37
37
 
38
38
  // 256-color fallback codes
@@ -464,6 +464,18 @@ function printBanner() {
464
464
  console.log(`${DIM}${' '.repeat(padding)} Generative Business Operating System${RESET}\n`);
465
465
  }
466
466
 
467
+ // Color definitions for status table
468
+ const TABLE_COLORS = {
469
+ white: '\x1b[37m',
470
+ red: '\x1b[31m',
471
+ green: '\x1b[32m',
472
+ blue: '\x1b[34m',
473
+ cyan: '\x1b[36m',
474
+ yellow: '\x1b[33m',
475
+ gray: '\x1b[90m',
476
+ magenta: '\x1b[35m',
477
+ };
478
+
467
479
  // Print status table with two columns
468
480
  function printStatusTable(leftColumn, rightColumn) {
469
481
  const termWidth = getTerminalWidth();
@@ -471,19 +483,33 @@ function printStatusTable(leftColumn, rightColumn) {
471
483
  const colWidth = Math.floor((tableWidth - 3) / 2); // -3 for borders and divider
472
484
  const borderColor = fg(...LOGO_NAVY);
473
485
  const labelColor = DIM;
474
- const valueColor = fg(...LOGO_LIGHT);
486
+
487
+ // Helper to get value color based on field and value
488
+ const getValueColor = (label, value) => {
489
+ const lowerLabel = (label || '').toLowerCase();
490
+ const hasValue = value && value !== 'N/A' && value !== 'Unknown';
491
+
492
+ if (lowerLabel.includes('status')) {
493
+ if (value && value.includes('Connected')) return TABLE_COLORS.green;
494
+ if (value && value.includes('Authenticated')) return TABLE_COLORS.blue;
495
+ return TABLE_COLORS.red;
496
+ }
497
+ if (lowerLabel.includes('application') || lowerLabel.includes('node')) {
498
+ return hasValue ? TABLE_COLORS.white : TABLE_COLORS.red;
499
+ }
500
+ return TABLE_COLORS.white;
501
+ };
475
502
 
476
503
  // Helper to format a row
477
504
  const formatCell = (label, value, width) => {
478
- const content = `${labelColor}${label}:${RESET} ${valueColor}${value || 'N/A'}${RESET}`;
479
- const visibleLen = `${label}: ${value || 'N/A'}`.length;
505
+ const displayValue = value || 'N/A';
506
+ const valueColor = getValueColor(label, displayValue);
507
+ const content = `${labelColor}${label}:${RESET} ${valueColor}${displayValue}${RESET}`;
508
+ const visibleLen = `${label}: ${displayValue}`.length;
480
509
  const padding = Math.max(0, width - visibleLen);
481
510
  return content + ' '.repeat(padding);
482
511
  };
483
512
 
484
- // Helper to strip ANSI codes for length calculation
485
- const stripAnsi = (str) => str.replace(/\x1b\[[0-9;]*m/g, '');
486
-
487
513
  console.log(`${borderColor}┌${'─'.repeat(colWidth)}┬${'─'.repeat(colWidth)}┐${RESET}`);
488
514
 
489
515
  const maxRows = Math.max(leftColumn.length, rightColumn.length);
@@ -504,25 +530,18 @@ function printStatusTable(leftColumn, rightColumn) {
504
530
  function displayStatus(data) {
505
531
  printBanner();
506
532
 
507
- const version = require('../../package.json').version;
508
-
509
533
  const leftColumn = [
510
- { label: 'Version', value: `v${version}` },
511
- { label: 'User', value: data.userName || 'Not authenticated' },
512
534
  { label: 'Account', value: data.accountName || 'N/A' },
535
+ { label: 'User', value: data.userName || 'Not authenticated' },
536
+ { label: 'Session', value: data.connectionId ? data.connectionId.substring(0, 12) + '...' : 'N/A' },
513
537
  ];
514
538
 
515
539
  const rightColumn = [
516
- { label: 'Status', value: data.isConnected ? '● Connected' : '○ Disconnected' },
540
+ { label: 'Status', value: data.isConnected ? '● Connected' : (data.userName ? '● Authenticated' : 'Not authenticated') },
517
541
  { label: 'Application', value: data.applicationName || 'N/A' },
518
542
  { label: 'Node', value: data.nodeName || 'N/A' },
519
543
  ];
520
544
 
521
- if (data.connectionId) {
522
- leftColumn.push({ label: 'Session', value: data.connectionId.substring(0, 8) + '...' });
523
- rightColumn.push({ label: 'Connected', value: data.connectedAt || 'N/A' });
524
- }
525
-
526
545
  printStatusTable(leftColumn, rightColumn);
527
546
  console.log('');
528
547
  }
@@ -531,44 +550,66 @@ function displayStatus(data) {
531
550
  function displayConnectBanner(data) {
532
551
  printBanner();
533
552
 
534
- const version = require('../../package.json').version;
535
-
536
553
  const leftColumn = [
537
554
  { label: 'Account', value: data.accountName || 'N/A' },
538
- { label: 'Application', value: data.applicationName || 'N/A' },
555
+ { label: 'User', value: data.userName || 'N/A' },
556
+ { label: 'Session', value: data.sessionId ? data.sessionId.substring(0, 12) + '...' : 'N/A' },
539
557
  ];
540
558
 
541
559
  const rightColumn = [
542
- { label: 'Node', value: data.nodeName || 'N/A' },
543
560
  { label: 'Status', value: '● Connected' },
561
+ { label: 'Application', value: data.applicationName || 'N/A' },
562
+ { label: 'Node', value: data.nodeName || 'N/A' },
544
563
  ];
545
564
 
546
565
  printStatusTable(leftColumn, rightColumn);
547
566
 
548
- console.log(`\n ${fg(...LOGO_LIGHT)}✓${RESET} ${BOLD}Connected!${RESET}`);
549
- console.log(` ${DIM}Run your favorite coding agent in this CLI to start working.${RESET}\n`);
567
+ // Instructions with highlighted keywords
568
+ const cmd = TABLE_COLORS.cyan;
569
+ const highlight = TABLE_COLORS.yellow;
570
+ const dim = DIM;
571
+
572
+ console.log(`\n ${fg(...LOGO_LIGHT)}✓${RESET} ${BOLD}Connected!${RESET}\n`);
573
+ console.log(` Run your favorite ${highlight}coding agent${RESET} in this CLI to start working.`);
574
+ console.log(` Use ${cmd}/gbos${RESET} to list commands or simply ask your agent to run these commands.\n`);
575
+
576
+ console.log(` ${dim}Available commands:${RESET}`);
577
+ console.log(` ${cmd}auth${RESET} ${dim}[options]${RESET} Authenticate with GBOS services`);
578
+ console.log(` ${cmd}connect${RESET} ${dim}[options]${RESET} Connect to a GBOS development node`);
579
+ console.log(` ${cmd}disconnect${RESET} Disconnect from the current GBOS node`);
580
+ console.log(` ${cmd}status${RESET} Show current authentication and connection status`);
581
+ console.log(` ${cmd}tasks${RESET} Show tasks assigned to this development node`);
582
+ console.log(` ${cmd}next${RESET} Get the next task in the queue`);
583
+ console.log(` ${cmd}continue${RESET} Continue working on current/next task`);
584
+ console.log(` ${cmd}fallback${RESET} Cancel current task and revert to last completed state`);
585
+ console.log(` ${cmd}auto${RESET} Automatically work through all tasks and poll for new ones`);
586
+ console.log(` ${cmd}logout${RESET} ${dim}[options]${RESET} Log out from GBOS services and clear credentials`);
587
+ console.log(` ${cmd}help${RESET} ${dim}[command]${RESET} Display help for a specific command\n`);
588
+
589
+ console.log(` ${dim}Supported Agents:${RESET} ${highlight}Claude${RESET}, ${highlight}Codex${RESET}, ${highlight}Gemini${RESET}, ${highlight}Cursor IDE${RESET}, ${highlight}AntiGravity IDE${RESET}, ${highlight}VS Code IDE${RESET}\n`);
550
590
  }
551
591
 
552
592
  // Display auth success with banner
553
593
  function displayAuthBanner(data) {
554
594
  printBanner();
555
595
 
556
- const version = require('../../package.json').version;
557
-
558
596
  const leftColumn = [
559
- { label: 'User', value: data.userName || 'N/A' },
560
597
  { label: 'Account', value: data.accountName || 'N/A' },
598
+ { label: 'User', value: data.userName || 'N/A' },
599
+ { label: 'Session', value: data.sessionId ? data.sessionId.substring(0, 12) + '...' : 'N/A' },
561
600
  ];
562
601
 
563
602
  const rightColumn = [
564
603
  { label: 'Status', value: '● Authenticated' },
565
- { label: 'Session', value: data.sessionId ? data.sessionId.substring(0, 8) + '...' : 'N/A' },
604
+ { label: 'Application', value: 'N/A' },
605
+ { label: 'Node', value: 'N/A' },
566
606
  ];
567
607
 
568
608
  printStatusTable(leftColumn, rightColumn);
569
609
 
610
+ const cmd = TABLE_COLORS.cyan;
570
611
  console.log(`\n ${fg(...LOGO_LIGHT)}✓${RESET} ${BOLD}Authenticated!${RESET}`);
571
- console.log(` ${DIM}Run "gbos connect" to connect to a development node.${RESET}\n`);
612
+ console.log(` ${DIM}Run${RESET} ${cmd}gbos connect${RESET} ${DIM}to connect to a development node.${RESET}\n`);
572
613
  }
573
614
 
574
615
  module.exports = {