@yemi33/minions 0.1.500 → 0.1.501
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 +10 -13
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
package/engine.js
CHANGED
|
@@ -2473,12 +2473,7 @@ async function tickInner() {
|
|
|
2473
2473
|
const activeCount = (dispatch.active || []).length;
|
|
2474
2474
|
const maxConcurrent = config.engine?.maxConcurrent || 5;
|
|
2475
2475
|
|
|
2476
|
-
|
|
2477
|
-
log('info', `At max concurrency (${activeCount}/${maxConcurrent}) — skipping dispatch`);
|
|
2478
|
-
return;
|
|
2479
|
-
}
|
|
2480
|
-
|
|
2481
|
-
const slotsAvailable = maxConcurrent - activeCount;
|
|
2476
|
+
const slotsAvailable = Math.max(0, maxConcurrent - activeCount);
|
|
2482
2477
|
|
|
2483
2478
|
// Priority dispatch: fixes > reviews > plan-to-prd > implement > verify > other
|
|
2484
2479
|
const typePriority = { 'implement:large': 0, implement: 0, fix: 1, ask: 1, review: 2, test: 3, verify: 3, plan: 4, 'plan-to-prd': 4 };
|
|
@@ -2495,23 +2490,25 @@ async function tickInner() {
|
|
|
2495
2490
|
return dp;
|
|
2496
2491
|
});
|
|
2497
2492
|
|
|
2498
|
-
//
|
|
2499
|
-
// Build set of agents currently active.
|
|
2493
|
+
// Build set of agents currently active (one task per agent at a time).
|
|
2500
2494
|
const busyAgents = new Set((dispatch.active || []).map(d => d.agent));
|
|
2501
|
-
// Bug fix #14: deduplicate pending by dispatch ID to prevent double-dispatch.
|
|
2502
|
-
// This guards against the same item appearing twice in the in-memory pending array.
|
|
2503
2495
|
const seenPendingIds = new Set();
|
|
2504
2496
|
const toDispatch = [];
|
|
2497
|
+
let generalSlots = slotsAvailable;
|
|
2498
|
+
|
|
2505
2499
|
for (const item of dispatch.pending) {
|
|
2506
|
-
if (toDispatch.length >= slotsAvailable) break;
|
|
2507
2500
|
if (seenPendingIds.has(item.id)) {
|
|
2508
2501
|
log('warn', `Duplicate dispatch ID ${item.id} in pending queue — skipping`);
|
|
2509
2502
|
continue;
|
|
2510
2503
|
}
|
|
2504
|
+
if (busyAgents.has(item.agent)) continue;
|
|
2505
|
+
// Items explicitly assigned to an agent bypass concurrency cap — dispatch if agent is free
|
|
2506
|
+
const isExplicitAssignment = !!item.meta?.item?.agent;
|
|
2507
|
+
if (!isExplicitAssignment && generalSlots <= 0) continue;
|
|
2511
2508
|
seenPendingIds.add(item.id);
|
|
2512
|
-
if (busyAgents.has(item.agent)) continue; // agent already has an active task
|
|
2513
2509
|
toDispatch.push(item);
|
|
2514
|
-
busyAgents.add(item.agent);
|
|
2510
|
+
busyAgents.add(item.agent);
|
|
2511
|
+
if (!isExplicitAssignment) generalSlots--;
|
|
2515
2512
|
}
|
|
2516
2513
|
|
|
2517
2514
|
// Dispatch items — spawnAgent moves each from pending→active on disk.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@yemi33/minions",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.501",
|
|
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"
|