@yemi33/minions 0.1.959 → 0.1.960

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.959 (2026-04-14)
3
+ ## 0.1.960 (2026-04-14)
4
4
 
5
5
  ### Features
6
6
  - surface in-flight tool calls in lastAction (#1064)
@@ -47,6 +47,7 @@
47
47
  - inject cached ADO token into spawned agents (#998) (#1012)
48
48
 
49
49
  ### Other
50
+ - refactor(dashboard): extract _releaseCCTab helper and CC_LOCK_WAIT_MS constant
50
51
  - test(engine): add regression tests for autoFixConflicts flag and DEFAULTS alias
51
52
  - refactor(ado): simplify ado-status and extract build/review status helpers
52
53
  - refactor(ado): extract stripRefsHeads helper, deduplicate refs/heads/ stripping
package/dashboard.js CHANGED
@@ -473,6 +473,8 @@ let ccSession = { sessionId: null, createdAt: null, lastActiveAt: null, turnCoun
473
473
  const ccInFlightTabs = new Set(); // per-tab in-flight tracking for parallel CC requests
474
474
  const ccInFlightAborts = new Map(); // tabId → abortFn — lets a new request kill the stale LLM
475
475
  const CC_INFLIGHT_TIMEOUT_MS = 2 * 60 * 1000; // 2 minutes — auto-release if request hangs
476
+ const CC_LOCK_WAIT_MS = 200; // grace period for previous handler's finally to release lock
477
+ function _releaseCCTab(tabId) { ccInFlightTabs.delete(tabId); ccInFlightAborts.delete(tabId); }
476
478
 
477
479
  // _ccPromptHash computed after CC_STATIC_SYSTEM_PROMPT is defined (see below)
478
480
 
@@ -3401,7 +3403,7 @@ What would you like to discuss or change? When you're happy, say "approve" and I
3401
3403
  // Per-tab concurrency guard
3402
3404
  const tabId = body.tabId || 'default';
3403
3405
  if (ccInFlightTabs.has(tabId)) {
3404
- await new Promise(r => setTimeout(r, 200));
3406
+ await new Promise(r => setTimeout(r, CC_LOCK_WAIT_MS));
3405
3407
  if (ccInFlightTabs.has(tabId)) {
3406
3408
  return jsonReply(res, 429, { error: 'This tab is already processing — wait or open a new tab.' });
3407
3409
  }
@@ -3451,9 +3453,9 @@ What would you like to discuss or change? When you're happy, say "approve" and I
3451
3453
  if (sessionReset) reply.sessionReset = true;
3452
3454
  return jsonReply(res, 200, reply);
3453
3455
  } finally {
3454
- ccInFlightTabs.delete(tabId);
3456
+ _releaseCCTab(tabId);
3455
3457
  }
3456
- } catch (e) { ccInFlightTabs.delete(tabId); return jsonReply(res, 500, { error: e.message }); }
3458
+ } catch (e) { _releaseCCTab(tabId); return jsonReply(res, 500, { error: e.message }); }
3457
3459
  }
3458
3460
 
3459
3461
  /** Build a lightweight input object for SSE tool events — keeps only the fields formatToolSummary needs, with truncated string values. */
@@ -3478,7 +3480,7 @@ What would you like to discuss or change? When you're happy, say "approve" and I
3478
3480
  // Previous request still in-flight — abort its LLM (handles keep-alive abort where close event didn't fire)
3479
3481
  const prevAbort = ccInFlightAborts.get(tabId);
3480
3482
  if (prevAbort) { prevAbort(); }
3481
- await new Promise(r => setTimeout(r, 200)); // let previous finally run and release the lock
3483
+ await new Promise(r => setTimeout(r, CC_LOCK_WAIT_MS)); // let previous finally run and release the lock
3482
3484
  if (ccInFlightTabs.has(tabId)) {
3483
3485
  res.statusCode = 429; res.end('This tab is already processing'); return;
3484
3486
  }
@@ -3490,8 +3492,7 @@ What would you like to discuss or change? When you're happy, say "approve" and I
3490
3492
  let _ccStreamEnded = false;
3491
3493
  // Kill LLM process immediately if client disconnects mid-stream
3492
3494
  req.on('close', () => {
3493
- ccInFlightTabs.delete(tabId);
3494
- ccInFlightAborts.delete(tabId);
3495
+ _releaseCCTab(tabId);
3495
3496
  if (!_ccStreamEnded && _ccStreamAbort) {
3496
3497
  console.log(`[CC-stream] Client disconnected for tab ${tabId} — aborting LLM`);
3497
3498
  _ccStreamAbort();
@@ -3534,7 +3535,7 @@ What would you like to discuss or change? When you're happy, say "approve" and I
3534
3535
  }
3535
3536
  });
3536
3537
  _ccStreamAbort = llmPromise.abort;
3537
- ccInFlightAborts.set(tabId, _ccStreamAbort); // store so a new request for this tab can abort this LLM
3538
+ ccInFlightAborts.set(tabId, _ccStreamAbort);
3538
3539
  const result = await llmPromise;
3539
3540
  trackUsage('command-center', result.usage);
3540
3541
 
@@ -3616,12 +3617,10 @@ What would you like to discuss or change? When you're happy, say "approve" and I
3616
3617
 
3617
3618
  _ccStreamEnded = true; res.end();
3618
3619
  } finally {
3619
- ccInFlightTabs.delete(tabId);
3620
- ccInFlightAborts.delete(tabId);
3620
+ _releaseCCTab(tabId);
3621
3621
  }
3622
3622
  } catch (e) {
3623
- ccInFlightTabs.delete(tabId);
3624
- ccInFlightAborts.delete(tabId);
3623
+ _releaseCCTab(tabId);
3625
3624
  try { res.write('data: ' + JSON.stringify({ type: 'error', error: e.message }) + '\n\n'); } catch {}
3626
3625
  _ccStreamEnded = true; try { res.end(); } catch {}
3627
3626
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yemi33/minions",
3
- "version": "0.1.959",
3
+ "version": "0.1.960",
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"