@yemi33/minions 0.1.469 → 0.1.471

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/CHANGELOG.md CHANGED
@@ -1,8 +1,10 @@
1
1
  # Changelog
2
2
 
3
- ## 0.1.469 (2026-04-07)
3
+ ## 0.1.471 (2026-04-07)
4
4
 
5
5
  ### Fixes
6
+ - steering resume improvements — better error logging, heartbeat restart
7
+ - prevent slow work item modal on large descriptions
6
8
  - only cache sessionId for steering when actually resuming same branch
7
9
 
8
10
  ## 0.1.468 (2026-04-07)
@@ -431,7 +431,7 @@ function openWorkItemDetail(id) {
431
431
  '<span class="dispatch-type ' + (item.type || 'implement') + '">' + escHtml(item.type || 'implement') + '</span>' +
432
432
  '<span class="prd-item-priority ' + (item.priority || '') + '">' + escHtml(item.priority || 'medium') + '</span>' +
433
433
  '</div>';
434
- html += field('Description', '<div style="font-size:12px">' + renderMd((item.description || item.title || '—').slice(0, 3000)) + '</div>');
434
+ html += field('Description', '<div style="font-size:12px">' + renderMd((item.description || item.title || '—').slice(0, 1000)) + '</div>');
435
435
  html += field('Agent', escHtml(item.dispatched_to || item.agent || 'Auto'));
436
436
  html += field('Source', escHtml(item._source || 'central'));
437
437
  if (item.created) html += field('Created', escHtml(new Date(item.created).toLocaleString()));
@@ -60,6 +60,8 @@ function copyLlmText(btn) {
60
60
  */
61
61
  function renderMd(s) {
62
62
  if (!s) return '';
63
+ // Truncate excessively long inputs to prevent regex backtracking
64
+ if (s.length > 10000) s = s.slice(0, 10000) + '\n\n…(truncated)';
63
65
  let html = escHtml(s);
64
66
 
65
67
  // 1. Extract code blocks and inline code into placeholders (protect from other transforms)
package/engine.js CHANGED
@@ -602,13 +602,19 @@ function spawnAgent(dispatchItem, config) {
602
602
  });
603
603
 
604
604
  // Re-attach to existing tracking
605
- activeProcesses.set(id, { proc: resumeProc, agentId, startedAt: procInfo.startedAt, sessionId: steerSessionId });
605
+ activeProcesses.set(id, { proc: resumeProc, agentId, startedAt: procInfo.startedAt, sessionId: steerSessionId, _steeringAt: Date.now() });
606
606
 
607
607
  // Reset output buffers so post-completion parsing only sees the resumed session
608
608
  stdout = '';
609
609
  stderr = '';
610
610
  lastOutputAt = Date.now();
611
611
 
612
+ // Restart heartbeat for the resumed process
613
+ if (heartbeatTimer) clearInterval(heartbeatTimer);
614
+ heartbeatTimer = setInterval(() => {
615
+ try { fs.appendFileSync(liveOutputPath, `\n[heartbeat] running — no output for ${Math.round((Date.now() - lastOutputAt) / 1000)}s\n`); } catch {}
616
+ }, 30000);
617
+
612
618
  // Re-wire stdout/stderr handlers (same as original)
613
619
  resumeProc.stdout.on('data', (data) => {
614
620
  const chunk = data.toString();
@@ -626,11 +632,9 @@ function spawnAgent(dispatchItem, config) {
626
632
  // Re-wire close handler for the resumed process
627
633
  resumeProc.on('close', (resumeCode) => {
628
634
  if (resumeCode !== 0) {
629
- // Resume failed don't burn a retry slot. Complete the dispatch as success
630
- // (the original work was already done up to the kill point) and let the
631
- // work item be re-discovered on the next tick if still pending.
632
- log('warn', `Steering resume for ${agentId} exited with code ${resumeCode} — completing dispatch without error`);
635
+ log('warn', `Steering resume for ${agentId} exited with code ${resumeCode} | stderr: ${stderr.slice(-300).replace(/\n/g, ' ')}`);
633
636
  activeProcesses.delete(id);
637
+ // Don't burn a retry slot — complete as success so work item stays done/dispatched
634
638
  completeDispatch(id, DISPATCH_RESULT.SUCCESS, 'Steering resume failed but original work completed', '', { processWorkItemFailure: false });
635
639
  return;
636
640
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yemi33/minions",
3
- "version": "0.1.469",
3
+ "version": "0.1.471",
4
4
  "description": "Multi-agent AI dev team that runs from ~/.minions/ — five autonomous agents share a single engine, dashboard, and knowledge base",
5
5
  "bin": {
6
6
  "minions": "bin/minions.js"