@yemi33/minions 0.1.870 → 0.1.871

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,6 +1,6 @@
1
1
  # Changelog
2
2
 
3
- ## 0.1.870 (2026-04-11)
3
+ ## 0.1.871 (2026-04-11)
4
4
 
5
5
  ### Features
6
6
  - ticking runtime counter on working agent cards
@@ -9,6 +9,7 @@
9
9
  - optimistic running state on pipeline Run Now click
10
10
 
11
11
  ### Fixes
12
+ - orphan recovery misclassifies mid-run agents as failed on engine restart
12
13
  - dep merge failures identify conflicting branch and auto-queue fix (closes #814) (#882)
13
14
  - always show doc-chat expand bar when thread is collapsed
14
15
  - poll for old process exit before steering resume (replaces fixed delay)
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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yemi33/minions",
3
- "version": "0.1.870",
3
+ "version": "0.1.871",
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"