@yemi33/minions 0.1.870 → 0.1.872

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,14 +1,16 @@
1
1
  # Changelog
2
2
 
3
- ## 0.1.870 (2026-04-11)
3
+ ## 0.1.872 (2026-04-11)
4
4
 
5
5
  ### Features
6
+ - show last task duration in thought-process tab when agent is idle
6
7
  - ticking runtime counter on working agent cards
7
8
  - show run duration on agent cards and thought-process tab
8
9
  - live runtime counter on agent live output tab
9
10
  - optimistic running state on pipeline Run Now click
10
11
 
11
12
  ### Fixes
13
+ - orphan recovery misclassifies mid-run agents as failed on engine restart
12
14
  - dep merge failures identify conflicting branch and auto-queue fix (closes #814) (#882)
13
15
  - always show doc-chat expand bar when thread is collapsed
14
16
  - poll for old process exit before steering resume (replaces fixed delay)
@@ -57,6 +57,19 @@ function renderDetailContent(detail, tab) {
57
57
  html += 'Running: ' + (rHr > 0 ? rHr + 'h ' : '') + rMin + 'm ' + rSec + 's\n';
58
58
  }
59
59
  }
60
+ // Show last completed task duration when idle (status cleared after 5min)
61
+ if (detail.statusData.status === 'idle' && detail.recentDispatches && detail.recentDispatches.length > 0) {
62
+ var last = detail.recentDispatches[0];
63
+ if (last.task) html += 'Last task: ' + escHtml(last.task.slice(0, 100)) + '\n';
64
+ if (last.started_at && last.completed_at) {
65
+ var lMs = new Date(last.completed_at).getTime() - new Date(last.started_at).getTime();
66
+ if (lMs > 0) {
67
+ var lSec = Math.floor(lMs / 1000) % 60, lMin = Math.floor(lMs / 60000) % 60, lHr = Math.floor(lMs / 3600000);
68
+ html += 'Duration: ' + (lHr > 0 ? lHr + 'h ' : '') + lMin + 'm ' + lSec + 's\n';
69
+ }
70
+ }
71
+ if (last.result) html += 'Result: <span style="color:var(--' + (last.result === 'error' ? 'red' : 'green') + ')">' + escHtml(last.result) + '</span>\n';
72
+ }
60
73
  html += '</div>';
61
74
  if (detail.statusData.resultSummary) {
62
75
  html += '<h4>Last Result</h4><div class="section" style="border-left:3px solid var(--green);padding-left:12px">' + renderMd(detail.statusData.resultSummary) + '</div>';
package/engine/cli.js CHANGED
@@ -228,15 +228,20 @@ const commands = {
228
228
  const agentId = item.agent;
229
229
  const outputPath = path.join(MINIONS_DIR, 'agents', agentId, 'live-output.log');
230
230
  try {
231
- const stat = fs.statSync(outputPath);
232
231
  const output = fs.readFileSync(outputPath, 'utf8');
233
232
 
234
- // Check for completion markers in output
235
- const hasResult = output.includes('"type":"result"') || output.includes('"type": "result"');
236
- const hasError = output.includes('"is_error":true') || output.includes('"is_error": true');
237
- if (!hasResult && !hasError) continue;
233
+ // Only process if the session actually emitted a result line — no result means the
234
+ // session was still running when the engine died and should be requeued, not failed.
235
+ // Tool-level is_error:true (e.g. a Read on a missing file) must not be confused with
236
+ // a session-level error, so we scope the is_error check to the result line only.
237
+ const resultIdx = output.search(/"type"\s*:\s*"result"/);
238
+ if (resultIdx === -1) continue;
238
239
 
239
- let isSuccess = hasResult && !hasError;
240
+ const resultLineEnd = output.indexOf('\n', resultIdx);
241
+ const resultLine = output.slice(resultIdx, resultLineEnd === -1 ? output.length : resultLineEnd);
242
+ const hasError = resultLine.includes('"is_error":true') || resultLine.includes('"is_error": true');
243
+
244
+ let isSuccess = !hasError;
240
245
 
241
246
  // Extract PRs from output first — if PRs were created, the agent succeeded
242
247
  // regardless of intermediate error lines in the log
package/engine/queries.js CHANGED
@@ -375,7 +375,7 @@ function getAgentDetail(id) {
375
375
  .map(d => ({
376
376
  id: d.id, task: d.task || '', type: d.type || '',
377
377
  result: d.result || '', reason: d.reason || '',
378
- completed_at: d.completed_at || '',
378
+ started_at: d.started_at || '', completed_at: d.completed_at || '',
379
379
  }));
380
380
  } catch { /* optional */ }
381
381
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yemi33/minions",
3
- "version": "0.1.870",
3
+ "version": "0.1.872",
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"