@yemi33/minions 0.1.517 → 0.1.518
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 +5 -0
- package/engine/queries.js +16 -0
- package/engine.js +16 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
package/engine/queries.js
CHANGED
|
@@ -777,6 +777,22 @@ function getPrdInfo(config) {
|
|
|
777
777
|
const url = pr?.url || (project?.prUrlBase ? project.prUrlBase + wi._pr.replace('PR-', '') : '');
|
|
778
778
|
prdToPr[wi.id] = [{ id: wi._pr, url, title: pr?.title || '', status: pr?.status || 'active', _project: project?.name || '' }];
|
|
779
779
|
}
|
|
780
|
+
// Aggregate sub-task PRs to decomposed parent (sub-tasks aren't PRD items but their PRs should show)
|
|
781
|
+
for (const pr of allPrs) {
|
|
782
|
+
for (const itemId of (pr.prdItems || [])) {
|
|
783
|
+
// Find if this is a sub-task with a parent
|
|
784
|
+
const allItems = Object.values(wiById);
|
|
785
|
+
const wi = allItems.find(w => w.id === itemId && w.parent_id);
|
|
786
|
+
if (!wi) continue;
|
|
787
|
+
const parentId = wi.parent_id;
|
|
788
|
+
if (!prdToPr[parentId]) prdToPr[parentId] = [];
|
|
789
|
+
if (!prdToPr[parentId].some(p => p.id === pr.id)) {
|
|
790
|
+
const project = projects.find(p => p.name === pr._project) || projects[0] || null;
|
|
791
|
+
const url = pr.url || (project?.prUrlBase ? project.prUrlBase + pr.id.replace('PR-', '') : '');
|
|
792
|
+
prdToPr[parentId].push({ id: pr.id, url, title: pr.title || '', status: pr.status || 'active', _project: pr._project || '' });
|
|
793
|
+
}
|
|
794
|
+
}
|
|
795
|
+
}
|
|
780
796
|
|
|
781
797
|
// PRD JSON status is the source of truth — kept in sync with work item by syncPrdItemStatus.
|
|
782
798
|
// Map from PRD JSON values to display values (pending → missing for undispatched items)
|
package/engine.js
CHANGED
|
@@ -1696,6 +1696,22 @@ function discoverFromWorkItems(config, project) {
|
|
|
1696
1696
|
} catch (err) { log('warn', `discoverFromWorkItems: skipping ${item.id}: ${err.message}`); }
|
|
1697
1697
|
}
|
|
1698
1698
|
|
|
1699
|
+
// Auto-promote decomposed parents to done when all sub-tasks complete
|
|
1700
|
+
for (const item of items) {
|
|
1701
|
+
if (item.status !== WI_STATUS.DECOMPOSED || !item._subItemIds?.length) continue;
|
|
1702
|
+
const allSubsDone = item._subItemIds.every(sid => {
|
|
1703
|
+
const sub = items.find(i => i.id === sid);
|
|
1704
|
+
return sub && DONE_STATUSES.has(sub.status);
|
|
1705
|
+
});
|
|
1706
|
+
if (allSubsDone) {
|
|
1707
|
+
item.status = WI_STATUS.DONE;
|
|
1708
|
+
if (!item.completedAt) item.completedAt = ts();
|
|
1709
|
+
needsWrite = true;
|
|
1710
|
+
log('info', `Decomposed parent ${item.id} → done (all ${item._subItemIds.length} sub-tasks complete)`);
|
|
1711
|
+
if (item.sourcePlan) syncPrdItemStatus(item.id, WI_STATUS.DONE, item.sourcePlan);
|
|
1712
|
+
}
|
|
1713
|
+
}
|
|
1714
|
+
|
|
1699
1715
|
// Write back updated statuses (always, since we mark items dispatched before newWork check)
|
|
1700
1716
|
if (newWork.length > 0) {
|
|
1701
1717
|
const workItemsPath = projectWorkItemsPath(project);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@yemi33/minions",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.518",
|
|
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"
|