genbox 1.0.36 → 1.0.37

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.
@@ -193,10 +193,14 @@ exports.statusCommand = new commander_1.Command('status')
193
193
  const dbStatus = target.status; // 'provisioning' | 'running' | 'error' etc.
194
194
  const setupDuration = target.setupDuration;
195
195
  const setupCompletedAt = target.setupCompletedAt;
196
- // If DB says RUNNING and we have setupCompletedAt, setup is complete
197
- if (dbStatus === 'running' && setupCompletedAt) {
198
- const durationStr = setupDuration ? formatDuration(setupDuration) : 'unknown';
199
- console.log(chalk_1.default.green(`[SUCCESS] Setup completed! (took ${durationStr})`));
196
+ // If DB says RUNNING, setup is complete (use DB as source of truth)
197
+ if (dbStatus === 'running') {
198
+ if (setupCompletedAt && setupDuration) {
199
+ console.log(chalk_1.default.green(`[SUCCESS] Setup completed! (took ${formatDuration(setupDuration)})`));
200
+ }
201
+ else {
202
+ console.log(chalk_1.default.green(`[SUCCESS] Genbox is running`));
203
+ }
200
204
  console.log('');
201
205
  // Show billing info
202
206
  const billing = {
@@ -322,7 +326,21 @@ exports.statusCommand = new commander_1.Command('status')
322
326
  console.log(chalk_1.default.dim(' Run `genbox connect` to investigate.'));
323
327
  return;
324
328
  }
325
- // Fallback: try legacy cloud-init check for backwards compatibility
329
+ // If DB says TERMINATED
330
+ if (dbStatus === 'terminated') {
331
+ const destroyReason = target.destroyReason;
332
+ console.log(chalk_1.default.red(`[TERMINATED] Genbox has been destroyed`));
333
+ if (destroyReason) {
334
+ console.log(chalk_1.default.dim(` Reason: ${destroyReason}`));
335
+ }
336
+ return;
337
+ }
338
+ // If DB says STOPPED
339
+ if (dbStatus === 'stopped') {
340
+ console.log(chalk_1.default.yellow('[STOPPED] Genbox is stopped'));
341
+ return;
342
+ }
343
+ // Fallback: try legacy cloud-init check for backwards compatibility (should rarely reach here)
326
344
  let status = sshExec(target.ipAddress, keyPath, 'cloud-init status 2>&1');
327
345
  if (!status || status.includes('not found')) {
328
346
  // No cloud-init, check our status file
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "genbox",
3
- "version": "1.0.36",
3
+ "version": "1.0.37",
4
4
  "description": "Genbox CLI - AI-Powered Development Environments",
5
5
  "main": "dist/index.js",
6
6
  "bin": {