@yemi33/minions 0.1.847 → 0.1.849

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.847 (2026-04-11)
3
+ ## 0.1.849 (2026-04-11)
4
4
 
5
5
  ### Features
6
6
  - optimistic UI updates for all remaining dashboard pages
@@ -9,6 +9,7 @@
9
9
  - stale PRD shows Regenerate PRD + Resume as-is buttons
10
10
 
11
11
  ### Fixes
12
+ - PID file leak in indirect spawn + kb-sweep race condition (#821)
12
13
  - KB create modal stays open on API error for retry
13
14
  - steering resume failure no longer silently marked as SUCCESS
14
15
  - cli.js reads PID files from wrong directory on reattach
@@ -24,6 +25,7 @@
24
25
  - diff-aware plan-to-prd triggered by Resume, not auto-dispatch
25
26
 
26
27
  ### Other
28
+ - docs: update CLAUDE.md with plan resume, PR protection, dashboard UX patterns
27
29
  - perf: reduce steering detection latency from 3s to 1s
28
30
  - remove: /api/prd/regenerate endpoint (destructive delete + fresh gen)
29
31
  - refactor: migrate handlePrdRegenerate and handlePlansExecute to queuePlanToPrd
package/dashboard.js CHANGED
@@ -1887,6 +1887,9 @@ const server = http.createServer(async (req, res) => {
1887
1887
  global._kbSweepInFlight = false;
1888
1888
  }
1889
1889
  if (global._kbSweepInFlight) return jsonReply(res, 409, { error: 'sweep already in progress' });
1890
+ // Generation token prevents stale finally blocks from clearing the flag for a new sweep
1891
+ const sweepToken = Date.now() + Math.random();
1892
+ global._kbSweepToken = sweepToken;
1890
1893
  global._kbSweepInFlight = true;
1891
1894
  global._kbSweepStartedAt = Date.now();
1892
1895
  try {
@@ -2028,7 +2031,7 @@ If nothing to do: { "duplicates": [], "reclassify": [], "remove": [] }`;
2028
2031
  const summary = `${merged} duplicates merged, ${removed} stale removed, ${reclassified} reclassified${pruned ? ', ' + pruned + ' old swept files pruned' : ''}`;
2029
2032
  safeWrite(path.join(ENGINE_DIR, 'kb-swept.json'), JSON.stringify({ timestamp: new Date().toISOString(), summary }));
2030
2033
  return jsonReply(res, 200, { ok: true, summary, plan });
2031
- } catch (e) { return jsonReply(res, 500, { error: e.message }); } finally { global._kbSweepInFlight = false; }
2034
+ } catch (e) { return jsonReply(res, 500, { error: e.message }); } finally { if (global._kbSweepToken === sweepToken) global._kbSweepInFlight = false; }
2032
2035
  }
2033
2036
 
2034
2037
  async function handlePlansList(req, res) {
package/engine/llm.js CHANGED
@@ -108,7 +108,9 @@ function _spawnProcess(promptText, sysPromptText, { direct, label, model, maxTur
108
108
  const sysPath = path.join(tmpDir, `${label}-sys-${id}.md`);
109
109
  safeWrite(promptPath, promptText);
110
110
  safeWrite(sysPath, sysPromptText || '');
111
- cleanupFiles.push(promptPath, sysPath);
111
+ // spawn-agent.js derives a PID file from prompt path — include it in cleanup to prevent leaks
112
+ const pidPath = promptPath.replace(/prompt-/, 'pid-').replace(/\.md$/, '.pid');
113
+ cleanupFiles.push(promptPath, sysPath, pidPath);
112
114
 
113
115
  const spawnScript = path.join(ENGINE_DIR, 'spawn-agent.js');
114
116
  const args = [
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yemi33/minions",
3
- "version": "0.1.847",
3
+ "version": "0.1.849",
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"