@yemi33/minions 0.1.635 → 0.1.636

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,9 @@
1
1
  # Changelog
2
2
 
3
- ## 0.1.635 (2026-04-08)
3
+ ## 0.1.636 (2026-04-08)
4
+
5
+ ### Fixes
6
+ - retry items bypass completed-dedup in isAlreadyDispatched
4
7
 
5
8
  ### Other
6
9
  - perf: extend caches, skip doc re-send on session resume
package/engine.js CHANGED
@@ -1696,15 +1696,28 @@ function discoverFromWorkItems(config, project) {
1696
1696
  delete item._resumedAt;
1697
1697
  needsWrite = true;
1698
1698
  }
1699
+ // Skip dedup for items explicitly marked for retry (_retryCount set by engine)
1700
+ const isRetry = !!item._retryCount;
1699
1701
  if (isAlreadyDispatched(key)) {
1700
- // Only self-heal to DISPATCHED if actually in dispatch.active (agent spawned) (#480)
1701
- const existingActive = getDispatch().active?.find(d => d.meta?.dispatchKey === key);
1702
- if (existingActive) {
1703
- if (item.status === WI_STATUS.PENDING) { item.status = WI_STATUS.DISPATCHED; needsWrite = true; }
1704
- if (!item.dispatched_to && existingActive.agent) { item.dispatched_to = existingActive.agent; needsWrite = true; }
1702
+ // Retry items should bypass the completed-dedup but still block if in-flight
1703
+ if (isRetry) {
1704
+ const inFlight = [...(getDispatch().pending || []), ...(getDispatch().active || [])];
1705
+ if (!inFlight.some(d => d.meta?.dispatchKey === key)) {
1706
+ // Not in-flight allow retry to proceed
1707
+ } else {
1708
+ if (item._pendingReason !== 'already_dispatched') { item._pendingReason = 'already_dispatched'; needsWrite = true; }
1709
+ skipped.gated++; continue;
1710
+ }
1711
+ } else {
1712
+ // Only self-heal to DISPATCHED if actually in dispatch.active (agent spawned) (#480)
1713
+ const existingActive = getDispatch().active?.find(d => d.meta?.dispatchKey === key);
1714
+ if (existingActive) {
1715
+ if (item.status === WI_STATUS.PENDING) { item.status = WI_STATUS.DISPATCHED; needsWrite = true; }
1716
+ if (!item.dispatched_to && existingActive.agent) { item.dispatched_to = existingActive.agent; needsWrite = true; }
1717
+ }
1718
+ if (item._pendingReason !== 'already_dispatched') { item._pendingReason = 'already_dispatched'; needsWrite = true; }
1719
+ skipped.gated++; continue;
1705
1720
  }
1706
- if (item._pendingReason !== 'already_dispatched') { item._pendingReason = 'already_dispatched'; needsWrite = true; }
1707
- skipped.gated++; continue;
1708
1721
  }
1709
1722
  if (isOnCooldown(key, cooldownMs)) {
1710
1723
  if (item._pendingReason !== 'cooldown') { item._pendingReason = 'cooldown'; needsWrite = true; }
@@ -2130,7 +2143,8 @@ function discoverCentralWorkItems(config) {
2130
2143
 
2131
2144
  const key = `central-work-${item.id}`;
2132
2145
  // Self-heal: if already dispatched but work item is still pending, fix the status
2133
- if (isAlreadyDispatched(key)) {
2146
+ // Skip dedup for items explicitly marked for retry (_retryCount set by engine)
2147
+ if (!item._retryCount && isAlreadyDispatched(key)) {
2134
2148
  // Only self-heal to DISPATCHED if actually in dispatch.active (agent spawned) (#480)
2135
2149
  const existingActive = getDispatch().active?.find(d => d.meta?.dispatchKey === key);
2136
2150
  if (existingActive) {
@@ -2141,6 +2155,11 @@ function discoverCentralWorkItems(config) {
2141
2155
  }
2142
2156
  continue;
2143
2157
  }
2158
+ // Still block if actively in flight (pending or active dispatch)
2159
+ if (item._retryCount && isAlreadyDispatched(key)) {
2160
+ const inFlight = [...(getDispatch().pending || []), ...(getDispatch().active || [])];
2161
+ if (inFlight.some(d => d.meta?.dispatchKey === key)) continue;
2162
+ }
2144
2163
  if (isOnCooldown(key, 0)) continue;
2145
2164
 
2146
2165
  const workType = item.type || 'implement';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yemi33/minions",
3
- "version": "0.1.635",
3
+ "version": "0.1.636",
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"