@yemi33/minions 0.1.1054 → 0.1.1055

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,11 +1,12 @@
1
1
  # Changelog
2
2
 
3
- ## 0.1.1054 (2026-04-17)
3
+ ## 0.1.1055 (2026-04-17)
4
4
 
5
5
  ### Features
6
6
  - seed realActivityMap at spawn time, stamp pid in live-output (#1200)
7
7
 
8
8
  ### Fixes
9
+ - guard undefined agent in pending dispatch loop (closes #1206) (#1210)
9
10
  - improve fallback meeting conclusion
10
11
  - remove command center chevron
11
12
  - stamp live-output.log stub before spawn (#1198)
package/engine.js CHANGED
@@ -3483,6 +3483,35 @@ async function tickInner() {
3483
3483
  log('warn', `Duplicate dispatch ID ${item.id} in pending queue — skipping`);
3484
3484
  continue;
3485
3485
  }
3486
+ // #1206: Guard against undefined/non-string item.agent. A corrupted dispatch
3487
+ // entry (manual edit, serialization round-trip, cleared field) would otherwise
3488
+ // be handed to spawnAgent, which crashes with `TypeError: "path" argument must
3489
+ // be of type string. Received undefined` and re-queues — every tick. Try to
3490
+ // resolve a fallback via routing; if none is available, skip this tick.
3491
+ if (!item.agent || typeof item.agent !== 'string') {
3492
+ const fallback = resolveAgent(item.type || WORK_TYPE.FIX, config);
3493
+ if (!fallback) {
3494
+ log('warn', `Pending dispatch ${item.id} has no agent and routing returned no fallback — skipping`);
3495
+ continue;
3496
+ }
3497
+ log('info', `Pending dispatch ${item.id} missing agent; routed → ${fallback} (#1206 guard)`);
3498
+ item.agent = fallback;
3499
+ item.agentName = config.agents[fallback]?.name || tempAgents.get(fallback)?.name || fallback;
3500
+ item.agentRole = config.agents[fallback]?.role || tempAgents.get(fallback)?.role || 'Agent';
3501
+ // Persist so the fix survives across ticks even if this dispatch is skipped
3502
+ // later in the loop (branch lock, concurrency cap, agent busy, etc.).
3503
+ try {
3504
+ mutateDispatch((dp) => {
3505
+ const p = (dp.pending || []).find(d => d.id === item.id);
3506
+ if (p) {
3507
+ p.agent = item.agent;
3508
+ p.agentName = item.agentName;
3509
+ p.agentRole = item.agentRole;
3510
+ }
3511
+ return dp;
3512
+ });
3513
+ } catch (e) { log('warn', `Persist agent resolution for ${item.id} failed: ${e.message}`); }
3514
+ }
3486
3515
  if (busyAgents.has(item.agent)) {
3487
3516
  // Agent busy reassignment: if item has been waiting on a busy agent past the threshold,
3488
3517
  // try to find an alternative agent via routing. Skip explicitly assigned items.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yemi33/minions",
3
- "version": "0.1.1054",
3
+ "version": "0.1.1055",
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"