@yemi33/minions 0.1.887 → 0.1.888

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.887 (2026-04-11)
3
+ ## 0.1.888 (2026-04-11)
4
4
 
5
5
  ### Features
6
6
  - add 13 missing CC action types for full dashboard parity
@@ -18,6 +18,7 @@
18
18
  - include started_at in done/error agent status so duration renders
19
19
 
20
20
  ### Other
21
+ - refactor: extract reopenWorkItem helper to shared.js
21
22
  - simplify: fix CC regenerate-plan field name, remove dead revise-and-regenerate handler
22
23
  - remove doc-chat plan auto-pause in favour of stale banner only
23
24
  - simplify: CC actions cleanup — missing wakeEngine, redundant refresh, hardened fallback
package/engine/shared.js CHANGED
@@ -910,6 +910,19 @@ function mutateWorkItems(filePath, mutator) {
910
910
  }, { defaultValue: [] });
911
911
  }
912
912
 
913
+ /**
914
+ * Reset a done work item for re-dispatch. Clears completion/dispatch metadata.
915
+ * Caller must set description/title separately.
916
+ */
917
+ function reopenWorkItem(wi) {
918
+ wi.status = WI_STATUS.PENDING;
919
+ wi._reopened = true;
920
+ delete wi.completedAt;
921
+ delete wi.dispatched_at;
922
+ delete wi.dispatched_to;
923
+ wi._retryCount = 0;
924
+ }
925
+
913
926
  /**
914
927
  * Atomic read-modify-write for pull-requests JSON files.
915
928
  * Wraps mutateJsonFileLocked with defaultValue of [].
@@ -1043,6 +1056,7 @@ module.exports = {
1043
1056
  withFileLock,
1044
1057
  mutateJsonFileLocked,
1045
1058
  mutateWorkItems,
1059
+ reopenWorkItem,
1046
1060
  mutatePullRequests,
1047
1061
  uid,
1048
1062
  uniquePath,
package/engine.js CHANGED
@@ -1520,12 +1520,11 @@ function materializePlansAsWorkItems(config) {
1520
1520
 
1521
1521
  mutateWorkItems(wiPath, existingItems => {
1522
1522
  for (const item of projItems) {
1523
- // Re-open: only 'updated' re-opens a done work item (missing = new item, not re-open)
1523
+ // Re-open: 'updated' or 'missing' re-opens a done work item (#906)
1524
1524
  const existingWi = existingItems.find(w => w.id === item.id);
1525
- const shouldReopen = item.status === PRD_ITEM_STATUS.UPDATED;
1525
+ const shouldReopen = item.status === PRD_ITEM_STATUS.UPDATED || item.status === PRD_ITEM_STATUS.MISSING;
1526
1526
  if (existingWi && DONE_STATUSES.has(existingWi.status) && shouldReopen) {
1527
- existingWi.status = WI_STATUS.PENDING;
1528
- existingWi._reopened = true;
1527
+ shared.reopenWorkItem(existingWi);
1529
1528
  existingWi.description = buildWiDescription(item, file);
1530
1529
  existingWi.title = `Implement: ${item.name}`;
1531
1530
  created++;
@@ -1609,8 +1608,7 @@ function materializePlansAsWorkItems(config) {
1609
1608
  mutateWorkItems(rPath, items => {
1610
1609
  const target = items.find(w => w.id === itemId);
1611
1610
  if (target && DONE_STATUSES.has(target.status)) {
1612
- target.status = WI_STATUS.PENDING;
1613
- target._reopened = true;
1611
+ shared.reopenWorkItem(target);
1614
1612
  target.description = buildWiDescription(rItem, file);
1615
1613
  target.title = `Implement: ${rItem.name}`;
1616
1614
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yemi33/minions",
3
- "version": "0.1.887",
3
+ "version": "0.1.888",
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"