@yemi33/minions 0.1.1761 → 0.1.1762

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,5 +1,10 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.1.1762 (2026-05-07)
4
+
5
+ ### Fixes
6
+ - detach agent process group so engine death never kills agents
7
+
3
8
  ## 0.1.1761 (2026-05-07)
4
9
 
5
10
  ### Fixes
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "runtime": "copilot",
3
3
  "models": null,
4
- "cachedAt": "2026-05-07T00:43:24.079Z"
4
+ "cachedAt": "2026-05-07T00:54:25.703Z"
5
5
  }
package/engine.js CHANGED
@@ -1094,10 +1094,17 @@ async function spawnAgent(dispatchItem, config) {
1094
1094
 
1095
1095
  let proc;
1096
1096
  try {
1097
+ // `detached: true` puts the agent in its own process group (POSIX) / job
1098
+ // object (Windows), so when the engine dies — gracefully via stop, abruptly
1099
+ // via taskkill, or because of a crash — the agent keeps running and can be
1100
+ // re-attached on next start via PID file + live-output.log. We do NOT call
1101
+ // proc.unref(): the engine still tracks exit while it's alive; detached
1102
+ // only kicks in when the engine itself goes away.
1097
1103
  proc = runFile(process.execPath, spawnArgs, {
1098
1104
  cwd,
1099
1105
  stdio: ['pipe', 'pipe', 'pipe'],
1100
1106
  env: childEnv,
1107
+ detached: true,
1101
1108
  });
1102
1109
  } catch (spawnErr) {
1103
1110
  // Synchronous spawn failure — record it to the (already-stamped) log so the
@@ -1308,10 +1315,12 @@ async function spawnAgent(dispatchItem, config) {
1308
1315
  }
1309
1316
  let resumeProc;
1310
1317
  try {
1318
+ // detached so the resumed steering session also survives engine death (matches initial spawn)
1311
1319
  resumeProc = runFile(process.execPath, [spawnScript, steerPromptPath, sysPromptPath, ...resumeArgs], {
1312
1320
  cwd,
1313
1321
  stdio: ['pipe', 'pipe', 'pipe'],
1314
1322
  env: childEnv,
1323
+ detached: true,
1315
1324
  });
1316
1325
  } catch (e) {
1317
1326
  log('warn', `Steering: spawn failed for ${agentId}: ${e.message}`);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yemi33/minions",
3
- "version": "0.1.1761",
3
+ "version": "0.1.1762",
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"