@yemi33/minions 0.1.637 → 0.1.638

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.
Files changed (3) hide show
  1. package/CHANGELOG.md +2 -1
  2. package/engine.js +17 -15
  3. package/package.json +1 -1
package/CHANGELOG.md CHANGED
@@ -1,8 +1,9 @@
1
1
  # Changelog
2
2
 
3
- ## 0.1.637 (2026-04-08)
3
+ ## 0.1.638 (2026-04-08)
4
4
 
5
5
  ### Other
6
+ - refactor: unify retry bypass pattern in discoverCentralWorkItems
6
7
  - perf: reduce CC/doc-chat tool eagerness and max-turns
7
8
 
8
9
  ## 0.1.636 (2026-04-08)
package/engine.js CHANGED
@@ -2142,23 +2142,25 @@ function discoverCentralWorkItems(config) {
2142
2142
  if (item.status !== WI_STATUS.QUEUED && item.status !== WI_STATUS.PENDING) continue;
2143
2143
 
2144
2144
  const key = `central-work-${item.id}`;
2145
- // Self-heal: if already dispatched but work item is still pending, fix the status
2146
2145
  // Skip dedup for items explicitly marked for retry (_retryCount set by engine)
2147
- if (!item._retryCount && isAlreadyDispatched(key)) {
2148
- // Only self-heal to DISPATCHED if actually in dispatch.active (agent spawned) (#480)
2149
- const existingActive = getDispatch().active?.find(d => d.meta?.dispatchKey === key);
2150
- if (existingActive) {
2151
- const m = {};
2152
- if (item.status === WI_STATUS.PENDING) { m.status = WI_STATUS.DISPATCHED; }
2153
- if (!item.dispatched_to && existingActive.agent) { m.dispatched_to = existingActive.agent; }
2154
- if (Object.keys(m).length > 0) mutations.set(item.id, m);
2146
+ const isRetry = !!item._retryCount;
2147
+ if (isAlreadyDispatched(key)) {
2148
+ if (isRetry) {
2149
+ // Retry items bypass completed-dedup but still block if in-flight
2150
+ const inFlight = [...(getDispatch().pending || []), ...(getDispatch().active || [])];
2151
+ if (inFlight.some(d => d.meta?.dispatchKey === key)) continue;
2152
+ // Not in-flight fall through to dispatch
2153
+ } else {
2154
+ // Self-heal: set DISPATCHED only when in dispatch.active (agent spawned) (#480)
2155
+ const existingActive = getDispatch().active?.find(d => d.meta?.dispatchKey === key);
2156
+ if (existingActive) {
2157
+ const m = {};
2158
+ if (item.status === WI_STATUS.PENDING) { m.status = WI_STATUS.DISPATCHED; }
2159
+ if (!item.dispatched_to && existingActive.agent) { m.dispatched_to = existingActive.agent; }
2160
+ if (Object.keys(m).length > 0) mutations.set(item.id, m);
2161
+ }
2162
+ continue;
2155
2163
  }
2156
- continue;
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
2164
  }
2163
2165
  if (isOnCooldown(key, 0)) continue;
2164
2166
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yemi33/minions",
3
- "version": "0.1.637",
3
+ "version": "0.1.638",
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"