@yemi33/minions 0.1.958 → 0.1.959

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,6 +1,6 @@
1
1
  # Changelog
2
2
 
3
- ## 0.1.958 (2026-04-14)
3
+ ## 0.1.959 (2026-04-14)
4
4
 
5
5
  ### Features
6
6
  - surface in-flight tool calls in lastAction (#1064)
@@ -25,6 +25,7 @@
25
25
  - add missing branch_name to central dispatch vars (#967)
26
26
 
27
27
  ### Fixes
28
+ - fix CC queued message 'already processing' and thinking UX stacking
28
29
  - enforce --timeout 1 on all azureauth calls to prevent agent orphans (#1063)
29
30
  - cancel steering kill watcher on resume spawn (#1052) (#1062)
30
31
  - suppress warn for optional template variables (#1061)
@@ -44,7 +45,6 @@
44
45
  - show doc-chat badges on Notes and KB items (#1016)
45
46
  - steering kill on no-session re-queues dispatch instead of erroring (#1015)
46
47
  - inject cached ADO token into spawned agents (#998) (#1012)
47
- - qaAbort race + skip kill on completed doc-chat
48
48
 
49
49
  ### Other
50
50
  - test(engine): add regression tests for autoFixConflicts flag and DEFAULTS alias
@@ -547,8 +547,9 @@ async function _ccDoSend(message, skipUserMsg, forceTabId) {
547
547
  // 429 = server still releasing previous request (abort race) — retry silently up to 3 times
548
548
  if (res.status === 429 && (!activeTab._429retries || activeTab._429retries < 3)) {
549
549
  activeTab._429retries = (activeTab._429retries || 0) + 1;
550
+ _cleanupStreamDiv(); // remove current thinking div — prevents stacking on each retry
550
551
  await new Promise(function(r) { setTimeout(r, 1500); });
551
- return await _ccDoSend(message, true); // retry with skipUserMsg=true (already displayed)
552
+ return await _ccDoSend(message, true, forceTabId || activeTabId); // retry pass tabId so timer closures don't fight
552
553
  }
553
554
  activeTab._429retries = 0;
554
555
  _cleanupStreamDiv();
package/dashboard.js CHANGED
@@ -471,6 +471,7 @@ setInterval(() => {
471
471
  const CC_SESSION_MAX_TURNS = Infinity;
472
472
  let ccSession = { sessionId: null, createdAt: null, lastActiveAt: null, turnCount: 0 };
473
473
  const ccInFlightTabs = new Set(); // per-tab in-flight tracking for parallel CC requests
474
+ const ccInFlightAborts = new Map(); // tabId → abortFn — lets a new request kill the stale LLM
474
475
  const CC_INFLIGHT_TIMEOUT_MS = 2 * 60 * 1000; // 2 minutes — auto-release if request hangs
475
476
 
476
477
  // _ccPromptHash computed after CC_STATIC_SYSTEM_PROMPT is defined (see below)
@@ -3400,7 +3401,10 @@ What would you like to discuss or change? When you're happy, say "approve" and I
3400
3401
  // Per-tab concurrency guard
3401
3402
  const tabId = body.tabId || 'default';
3402
3403
  if (ccInFlightTabs.has(tabId)) {
3403
- return jsonReply(res, 429, { error: 'This tab is already processing — wait or open a new tab.' });
3404
+ await new Promise(r => setTimeout(r, 200));
3405
+ if (ccInFlightTabs.has(tabId)) {
3406
+ return jsonReply(res, 429, { error: 'This tab is already processing — wait or open a new tab.' });
3407
+ }
3404
3408
  }
3405
3409
  ccInFlightTabs.add(tabId);
3406
3410
 
@@ -3471,7 +3475,13 @@ What would you like to discuss or change? When you're happy, say "approve" and I
3471
3475
  if (!body.message) { res.statusCode = 400; res.end('message required'); return; }
3472
3476
  const tabId = body.tabId || 'default';
3473
3477
  if (ccInFlightTabs.has(tabId)) {
3474
- res.statusCode = 429; res.end('This tab is already processing'); return;
3478
+ // Previous request still in-flight — abort its LLM (handles keep-alive abort where close event didn't fire)
3479
+ const prevAbort = ccInFlightAborts.get(tabId);
3480
+ if (prevAbort) { prevAbort(); }
3481
+ await new Promise(r => setTimeout(r, 200)); // let previous finally run and release the lock
3482
+ if (ccInFlightTabs.has(tabId)) {
3483
+ res.statusCode = 429; res.end('This tab is already processing'); return;
3484
+ }
3475
3485
  }
3476
3486
  ccInFlightTabs.add(tabId);
3477
3487
 
@@ -3481,6 +3491,7 @@ What would you like to discuss or change? When you're happy, say "approve" and I
3481
3491
  // Kill LLM process immediately if client disconnects mid-stream
3482
3492
  req.on('close', () => {
3483
3493
  ccInFlightTabs.delete(tabId);
3494
+ ccInFlightAborts.delete(tabId);
3484
3495
  if (!_ccStreamEnded && _ccStreamAbort) {
3485
3496
  console.log(`[CC-stream] Client disconnected for tab ${tabId} — aborting LLM`);
3486
3497
  _ccStreamAbort();
@@ -3523,6 +3534,7 @@ What would you like to discuss or change? When you're happy, say "approve" and I
3523
3534
  }
3524
3535
  });
3525
3536
  _ccStreamAbort = llmPromise.abort;
3537
+ ccInFlightAborts.set(tabId, _ccStreamAbort); // store so a new request for this tab can abort this LLM
3526
3538
  const result = await llmPromise;
3527
3539
  trackUsage('command-center', result.usage);
3528
3540
 
@@ -3605,9 +3617,11 @@ What would you like to discuss or change? When you're happy, say "approve" and I
3605
3617
  _ccStreamEnded = true; res.end();
3606
3618
  } finally {
3607
3619
  ccInFlightTabs.delete(tabId);
3620
+ ccInFlightAborts.delete(tabId);
3608
3621
  }
3609
3622
  } catch (e) {
3610
3623
  ccInFlightTabs.delete(tabId);
3624
+ ccInFlightAborts.delete(tabId);
3611
3625
  try { res.write('data: ' + JSON.stringify({ type: 'error', error: e.message }) + '\n\n'); } catch {}
3612
3626
  _ccStreamEnded = true; try { res.end(); } catch {}
3613
3627
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yemi33/minions",
3
- "version": "0.1.958",
3
+ "version": "0.1.959",
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"