gbos 1.1.5 → 1.1.6

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/images/ss1.png ADDED
Binary file
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gbos",
3
- "version": "1.1.5",
3
+ "version": "1.1.6",
4
4
  "description": "GBOS - Command line interface for GBOS services",
5
5
  "main": "src/index.js",
6
6
  "bin": {
@@ -109,28 +109,35 @@ async function authCommand(options) {
109
109
  refresh_token,
110
110
  expires_in: tokenExpires,
111
111
  user_id,
112
+ user_name,
113
+ user_email,
112
114
  account_id,
115
+ account_name,
113
116
  session_id,
114
117
  } = statusResponse.data;
115
118
 
116
- // Calculate token expiration
117
- const tokenExpiresAt = new Date(Date.now() + tokenExpires * 1000).toISOString();
119
+ // Calculate token expiration - default to 24 hours if not provided or too short
120
+ const expiresInSeconds = tokenExpires && tokenExpires > 60 ? tokenExpires : 86400;
121
+ const tokenExpiresAt = new Date(Date.now() + expiresInSeconds * 1000).toISOString();
118
122
 
119
- // Save session
123
+ // Save session with names
120
124
  config.saveSession({
121
125
  access_token,
122
126
  refresh_token,
123
127
  token_expires_at: tokenExpiresAt,
124
128
  user_id,
129
+ user_name: user_name || user_email || `User ${user_id}`,
130
+ user_email,
125
131
  account_id,
132
+ account_name: account_name || `Account ${account_id}`,
126
133
  session_id,
127
134
  authenticated_at: new Date().toISOString(),
128
135
  });
129
136
 
130
- // Display success with logo
137
+ // Display success with logo - use names
131
138
  displayAuthSuccess({
132
- userId: user_id,
133
- accountId: account_id,
139
+ userName: user_name || user_email || `User ${user_id}`,
140
+ accountName: account_name || `Account ${account_id}`,
134
141
  sessionId: session_id,
135
142
  });
136
143
 
@@ -174,17 +174,21 @@ async function connectCommand(options) {
174
174
 
175
175
  const { connection_id, node } = connectResponse.data;
176
176
 
177
- // Get session info for account name
178
- let accountName = 'N/A';
179
- try {
180
- const sessionInfo = await api.getSession();
181
- accountName = sessionInfo.data?.account?.name || 'N/A';
182
- } catch (e) {
183
- // Ignore session fetch errors
177
+ // Get session info (already has account_name from auth)
178
+ const session = config.loadSession() || {};
179
+
180
+ // Try to get account name from session API if not stored
181
+ let accountName = session.account_name;
182
+ if (!accountName) {
183
+ try {
184
+ const sessionInfo = await api.getSession();
185
+ accountName = sessionInfo.data?.account?.name || `Account ${session.account_id}`;
186
+ } catch (e) {
187
+ accountName = `Account ${session.account_id}`;
188
+ }
184
189
  }
185
190
 
186
191
  // Save connection to session
187
- const session = config.loadSession() || {};
188
192
  config.saveConnection({
189
193
  connection_id,
190
194
  node: {
@@ -208,12 +212,8 @@ async function connectCommand(options) {
208
212
  // Display success with logo and summary
209
213
  displayConnectSuccess({
210
214
  accountName: accountName,
211
- accountId: session.account_id,
212
215
  applicationName: selectedApplication?.name || 'N/A',
213
216
  nodeName: node.name,
214
- nodeId: node.id,
215
- connectionId: connection_id,
216
- userId: session.user_id,
217
217
  });
218
218
 
219
219
  } catch (error) {
@@ -198,10 +198,10 @@ function combineLogoAndText(logoLines, textLines) {
198
198
  return combined;
199
199
  }
200
200
 
201
- // Display logo with connection details
201
+ // Display logo with connection details (Claude Code style - clean, minimal)
202
202
  function displayLogoWithDetails(details = null) {
203
203
  const logoPath = path.join(__dirname, '../../images/logo.png');
204
- const termWidth = getTerminalWidth();
204
+ const version = require('../../package.json').version;
205
205
 
206
206
  // Render logo at ~24 chars wide, 6 rows tall (12 pixel rows with half-blocks)
207
207
  let logoLines = imageToPixels(logoPath, 24, 6);
@@ -214,30 +214,16 @@ function displayLogoWithDetails(details = null) {
214
214
  const leftSide = combineLogoAndText(logoLines, textLines);
215
215
  const leftWidth = 70; // Account for escape codes
216
216
 
217
- // Build right side (details box)
218
- const rightWidth = Math.max(30, termWidth - 75);
217
+ // Build right side - Claude Code style (clean lines, no boxes)
219
218
  const rightLines = [];
220
219
 
221
220
  if (details) {
222
- rightLines.push(`${colors.purple4}┌${'─'.repeat(rightWidth - 2)}┐${RESET}`);
223
- rightLines.push(`${colors.purple4}│${RESET} ${BOLD}${colors.purple5}Connected${RESET}${' '.repeat(rightWidth - 12)}${colors.purple4}│${RESET}`);
224
- rightLines.push(`${colors.purple4}├${'─'.repeat(rightWidth - 2)}┤${RESET}`);
225
-
226
- const addField = (label, value, valueColor = colors.white) => {
227
- const val = (value || 'N/A').toString().substring(0, rightWidth - label.length - 6);
228
- const padding = ' '.repeat(Math.max(0, rightWidth - label.length - val.length - 5));
229
- rightLines.push(`${colors.purple4}│${RESET} ${colors.purple7}${label}${RESET} ${valueColor}${val}${RESET}${padding}${colors.purple4}│${RESET}`);
230
- };
231
-
232
- addField('Account:', details.accountName, colors.white);
233
- addField('App:', details.applicationName, colors.purple5);
234
- addField('Node:', details.nodeName, colors.purple4);
235
- addField('ID:', details.nodeId, colors.dim);
236
- if (details.connectionId) {
237
- addField('Conn:', details.connectionId.substring(0, 18) + '...', colors.dim);
238
- }
239
-
240
- rightLines.push(`${colors.purple4}└${'─'.repeat(rightWidth - 2)}┘${RESET}`);
221
+ // Title line with version
222
+ rightLines.push(`${BOLD}${colors.purple5}GBOS${RESET} ${DIM}v${version}${RESET}`);
223
+ // Account and App on same line
224
+ rightLines.push(`${colors.white}${details.accountName || 'N/A'}${RESET} ${DIM}·${RESET} ${colors.purple5}${details.applicationName || 'N/A'}${RESET}`);
225
+ // Node info
226
+ rightLines.push(`${DIM}${details.nodeName || 'N/A'}${RESET}`);
241
227
  }
242
228
 
243
229
  // Print side by side
@@ -263,7 +249,7 @@ function displayLogo() {
263
249
 
264
250
  function displayAuthSuccess(data) {
265
251
  const logoPath = path.join(__dirname, '../../images/logo.png');
266
- const termWidth = getTerminalWidth();
252
+ const version = require('../../package.json').version;
267
253
 
268
254
  let logoLines = imageToPixels(logoPath, 24, 6);
269
255
  if (!logoLines) logoLines = COMPACT_LOGO;
@@ -272,26 +258,13 @@ function displayAuthSuccess(data) {
272
258
  const leftSide = combineLogoAndText(logoLines, textLines);
273
259
  const leftWidth = 70;
274
260
 
275
- const rightWidth = Math.max(30, termWidth - 75);
261
+ // Claude Code style - clean lines, no boxes
276
262
  const rightLines = [];
277
-
278
- rightLines.push(`${colors.purple4}┌${'─'.repeat(rightWidth - 2)}┐${RESET}`);
279
- rightLines.push(`${colors.purple4}│${RESET} ${BOLD}${colors.purple5}✓ Authenticated${RESET}${' '.repeat(rightWidth - 18)}${colors.purple4}│${RESET}`);
280
- rightLines.push(`${colors.purple4}├${'─'.repeat(rightWidth - 2)}┤${RESET}`);
281
-
282
- const addField = (label, value) => {
283
- const val = (value || 'N/A').toString().substring(0, rightWidth - label.length - 6);
284
- const padding = ' '.repeat(Math.max(0, rightWidth - label.length - val.length - 5));
285
- rightLines.push(`${colors.purple4}│${RESET} ${colors.purple7}${label}${RESET} ${colors.white}${val}${RESET}${padding}${colors.purple4}│${RESET}`);
286
- };
287
-
288
- addField('User:', data.userId);
289
- addField('Account:', data.accountId);
290
- addField('Session:', (data.sessionId || '').substring(0, 24) + '...');
291
-
292
- rightLines.push(`${colors.purple4}└${'─'.repeat(rightWidth - 2)}┘${RESET}`);
263
+ rightLines.push(`${BOLD}${colors.purple5}GBOS${RESET} ${DIM}v${version}${RESET}`);
264
+ rightLines.push(`${colors.purple5}✓${RESET} ${colors.white}Authenticated${RESET}`);
265
+ rightLines.push(`${colors.white}${data.userName || 'N/A'}${RESET} ${DIM}·${RESET} ${colors.purple5}${data.accountName || 'N/A'}${RESET}`);
293
266
  rightLines.push('');
294
- rightLines.push(`${colors.purple7}${DIM}Run "gbos connect" to connect${RESET}`);
267
+ rightLines.push(`${DIM}Run "gbos connect" to connect${RESET}`);
295
268
 
296
269
  console.log('');
297
270
  const maxLines = Math.max(leftSide.length, rightLines.length);