@yemi33/minions 0.1.1741 → 0.1.1742
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/copilot-models.json +1 -1
- package/engine.js +20 -2
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
package/engine.js
CHANGED
|
@@ -4326,6 +4326,17 @@ async function tickInner() {
|
|
|
4326
4326
|
|
|
4327
4327
|
// Build set of agents currently active (one task per agent at a time).
|
|
4328
4328
|
const busyAgents = new Set((dispatch.active || []).map(d => d.agent));
|
|
4329
|
+
// W-motc4y1n000t1a5f: Track agents that already have a pending dispatch in
|
|
4330
|
+
// the queue. Reassignment routes (busy / unspawned-temp) must not move a
|
|
4331
|
+
// dispatch onto an agent who already has their own pending entry — order-
|
|
4332
|
+
// dependent iteration would otherwise double-book that agent. Seeded once
|
|
4333
|
+
// from the snapshot of pending and updated on successful reassignment.
|
|
4334
|
+
const pendingAgents = new Set();
|
|
4335
|
+
for (const p of (dispatch.pending || [])) {
|
|
4336
|
+
if (typeof p.agent === 'string' && p.agent && p.agent !== routing.ANY_AGENT) {
|
|
4337
|
+
pendingAgents.add(p.agent);
|
|
4338
|
+
}
|
|
4339
|
+
}
|
|
4329
4340
|
// Branch mutex: track branches locked by active dispatches to prevent concurrent writes
|
|
4330
4341
|
const lockedBranches = new Set();
|
|
4331
4342
|
for (const d of (dispatch.active || [])) {
|
|
@@ -4409,9 +4420,12 @@ async function tickInner() {
|
|
|
4409
4420
|
const isUnspawnedTemp = item.agent?.startsWith('temp-') && !busyAgents.has(item.agent);
|
|
4410
4421
|
if (isUnspawnedTemp) {
|
|
4411
4422
|
const altAgent = resolvePendingDispatchAgent(item, config);
|
|
4412
|
-
|
|
4423
|
+
// W-motc4y1n000t1a5f: don't reassign onto an agent who already has
|
|
4424
|
+
// their own pending dispatch — that would double-book the alt.
|
|
4425
|
+
if (altAgent && altAgent !== item.agent && !pendingAgents.has(altAgent)) {
|
|
4413
4426
|
const prevAgent = item.agent;
|
|
4414
4427
|
assignPendingDispatchAgent(item, altAgent, config);
|
|
4428
|
+
pendingAgents.add(altAgent);
|
|
4415
4429
|
log('info', `Reassigning ${item.id} from unspawned temp ${prevAgent} to ${altAgent} — temp agent never spawned`);
|
|
4416
4430
|
// Persist reassignment to dispatch.json so it survives restarts/ticks
|
|
4417
4431
|
persistPendingDispatchAgent(item);
|
|
@@ -4427,10 +4441,14 @@ async function tickInner() {
|
|
|
4427
4441
|
continue; // Valid hard pin — keep waiting for pinned agent
|
|
4428
4442
|
}
|
|
4429
4443
|
// agent busy and idle alternative available — reroute immediately (no threshold)
|
|
4444
|
+
// W-motc4y1n000t1a5f: pendingAgents check prevents reassigning onto an
|
|
4445
|
+
// agent who already has their own pending dispatch (order-dependent
|
|
4446
|
+
// double-book in the meeting fan-out scenario).
|
|
4430
4447
|
const altAgent = resolvePendingDispatchAgent(item, config);
|
|
4431
|
-
if (altAgent && altAgent !== originalAgent && !busyAgents.has(altAgent)) {
|
|
4448
|
+
if (altAgent && altAgent !== originalAgent && !busyAgents.has(altAgent) && !pendingAgents.has(altAgent)) {
|
|
4432
4449
|
log('info', `Reassigning ${item.id} from ${originalAgent} to ${altAgent} — agent busy and idle alternative available`);
|
|
4433
4450
|
assignPendingDispatchAgent(item, altAgent, config);
|
|
4451
|
+
pendingAgents.add(altAgent);
|
|
4434
4452
|
persistPendingDispatchAgent(item);
|
|
4435
4453
|
// Fall through to branch mutex / concurrency checks below
|
|
4436
4454
|
} else if (isSoftFixDispatch(item)) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@yemi33/minions",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.1742",
|
|
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"
|