groove-dev 0.25.19 → 0.25.21

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.
@@ -437,9 +437,14 @@ For normal file edits within your scope, proceed without review.
437
437
  }
438
438
  });
439
439
 
440
- // Capture stderr
440
+ // Capture stderr — collect for crash reporting
441
+ const stderrBuf = [];
441
442
  proc.stderr.on('data', (chunk) => {
442
- logStream.write(`[stderr] ${chunk}`);
443
+ const text = chunk.toString();
444
+ logStream.write(`[stderr] ${text}`);
445
+ stderrBuf.push(text);
446
+ // Keep last 2KB of stderr for crash reporting
447
+ while (stderrBuf.join('').length > 2048) stderrBuf.shift();
443
448
  });
444
449
 
445
450
  // Handle process exit
@@ -456,6 +461,9 @@ For normal file edits within your scope, proceed without review.
456
461
  ? 'completed'
457
462
  : 'crashed';
458
463
 
464
+ // Capture crash error from stderr for UI display
465
+ const crashError = finalStatus === 'crashed' ? stderrBuf.join('').trim().slice(-500) : null;
466
+
459
467
  registry.update(agent.id, { status: finalStatus, pid: null });
460
468
 
461
469
  // Record lifecycle event for timeline
@@ -474,6 +482,7 @@ For normal file edits within your scope, proceed without review.
474
482
  code,
475
483
  signal,
476
484
  status: finalStatus,
485
+ error: crashError || undefined,
477
486
  });
478
487
 
479
488
  // Refresh MCP config — remove integrations no longer needed by running agents
@@ -497,6 +506,14 @@ For normal file edits within your scope, proceed without review.
497
506
 
498
507
  this.handles.delete(agent.id);
499
508
  registry.update(agent.id, { status: 'crashed', pid: null });
509
+ this.daemon.broadcast({
510
+ type: 'agent:exit',
511
+ agentId: agent.id,
512
+ code: null,
513
+ signal: null,
514
+ status: 'crashed',
515
+ error: err.message,
516
+ });
500
517
  });
501
518
 
502
519
  return agent;