@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.
- package/CHANGELOG.md +2 -1
- package/engine.js +17 -15
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
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
|
-
|
|
2148
|
-
|
|
2149
|
-
|
|
2150
|
-
|
|
2151
|
-
const
|
|
2152
|
-
if (
|
|
2153
|
-
|
|
2154
|
-
|
|
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.
|
|
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"
|