@yemi33/minions 0.1.745 → 0.1.746

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,10 +1,13 @@
1
1
  # Changelog
2
2
 
3
- ## 0.1.745 (2026-04-09)
3
+ ## 0.1.746 (2026-04-09)
4
4
 
5
5
  ### Features
6
6
  - CC multi-tab conversations with session resume
7
7
 
8
+ ### Fixes
9
+ - CC tabs use per-tab sessions, not shared global session
10
+
8
11
  ## 0.1.744 (2026-04-09)
9
12
 
10
13
  ### Features
@@ -113,10 +113,7 @@ function ccNewTab(skipServerReset) {
113
113
  var tab = { id: tabId, title: 'New chat', sessionId: null, messages: [] };
114
114
  _ccTabs.push(tab);
115
115
  _ccActiveTabId = tabId;
116
- // Reset server session for new tab
117
- if (!skipServerReset) {
118
- fetch('/api/command-center/new-session', { method: 'POST' }).catch(function() {});
119
- }
116
+ // New tab starts with null sessionId — server creates fresh session on first message
120
117
  // Abort any in-flight request
121
118
  ccAbort();
122
119
  _ccSending = false;
@@ -462,7 +459,7 @@ async function _ccDoSend(message, skipUserMsg) {
462
459
  // Stream response via SSE — shows text as it arrives
463
460
  var res = await fetch('/api/command-center/stream', {
464
461
  method: 'POST', headers: { 'Content-Type': 'application/json' },
465
- body: JSON.stringify({ message: message, tabId: activeTabId }),
462
+ body: JSON.stringify({ message: message, tabId: activeTabId, sessionId: activeTab.sessionId || null }),
466
463
  signal: _ccAbortController ? _ccAbortController.signal : AbortSignal.timeout(960000)
467
464
  });
468
465
 
package/dashboard.js CHANGED
@@ -3333,12 +3333,16 @@ What would you like to discuss or change? When you're happy, say "approve" and I
3333
3333
  req.on('close', () => { ccInFlight = false; ccInFlightSince = 0; if (_ccStreamAbort) _ccStreamAbort(); });
3334
3334
 
3335
3335
  try {
3336
- // Session management — same as non-streaming path
3337
- if (body.sessionId && body.sessionId !== ccSession.sessionId) {
3336
+ // Session management — per-tab: use sessionId from request if provided
3337
+ const tabSessionId = body.sessionId || null;
3338
+ if (tabSessionId) {
3339
+ // Resume the tab's specific session
3340
+ ccSession = { sessionId: tabSessionId, createdAt: ccSession.createdAt, lastActiveAt: Date.now(), turnCount: ccSession.turnCount || 0, _promptHash: _ccPromptHash };
3341
+ } else if (!ccSessionValid()) {
3338
3342
  ccSession = { sessionId: null, createdAt: null, lastActiveAt: null, turnCount: 0 };
3339
3343
  }
3340
- const wasResume = !!(ccSessionValid() && ccSession.sessionId);
3341
- const sessionId = wasResume ? ccSession.sessionId : null;
3344
+ const wasResume = !!tabSessionId || !!(ccSessionValid() && ccSession.sessionId);
3345
+ const sessionId = tabSessionId || (wasResume ? ccSession.sessionId : null);
3342
3346
  const preamble = wasResume ? '' : buildCCStatePreamble();
3343
3347
  const prompt = (preamble ? preamble + '\n\n---\n\n' : '') + body.message;
3344
3348
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yemi33/minions",
3
- "version": "0.1.745",
3
+ "version": "0.1.746",
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"