@yemi33/minions 0.1.158 → 0.1.160

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,15 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.1.160 (2026-04-02)
4
+
5
+ ### Engine
6
+ - engine/lifecycle.js
7
+
8
+ ## 0.1.159 (2026-04-02)
9
+
10
+ ### Engine
11
+ - engine/queries.js
12
+
3
13
  ## 0.1.158 (2026-04-02)
4
14
 
5
15
  ### Engine
@@ -494,12 +494,13 @@ function updateWorkItemStatus(meta, status, reason) {
494
494
  }
495
495
 
496
496
  function syncPrdItemStatus(itemId, status, sourcePlan) {
497
- if (!itemId) return;
497
+ if (!itemId || !sourcePlan) return; // sourcePlan required to prevent cross-PRD contamination
498
498
  try {
499
499
  const prdDir = path.join(MINIONS_DIR, 'prd');
500
- const files = sourcePlan ? [sourcePlan] : require('fs').readdirSync(prdDir).filter(f => f.endsWith('.json'));
500
+ const files = [sourcePlan];
501
501
  for (const pf of files) {
502
502
  const fpath = path.join(prdDir, pf);
503
+ if (!fs.existsSync(fpath)) continue; // skip archived/deleted PRDs
503
504
  mutateJsonFileLocked(fpath, (plan) => {
504
505
  if (!plan?.missing_features) return plan;
505
506
  const feature = plan.missing_features.find(f => f.id === itemId);
package/engine/queries.js CHANGED
@@ -490,14 +490,11 @@ function getWorkItems(config) {
490
490
  if (pr) item._prUrl = pr.url;
491
491
  }
492
492
  if (!item._pr) {
493
- const prLinks = shared.getPrLinks();
494
- const linkedPrId = Object.entries(prLinks).find(([, v]) => v === item.id)?.[0];
495
- if (linkedPrId) {
496
- item._pr = linkedPrId;
497
- const linkedPr = allPrs.find(p => p.id === linkedPrId);
498
- if (linkedPr) item._prUrl = linkedPr.url;
499
- } else {
500
- // no further fallback — pr-links.json and wi._pr are the sources of truth
493
+ // Derive from PR.prdItems (single source of truth)
494
+ const linkedPr = allPrs.find(p => (p.prdItems || []).includes(item.id));
495
+ if (linkedPr) {
496
+ item._pr = linkedPr.id;
497
+ item._prUrl = linkedPr.url;
501
498
  }
502
499
  }
503
500
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yemi33/minions",
3
- "version": "0.1.158",
3
+ "version": "0.1.160",
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"