@yemi33/minions 0.1.255 → 0.1.257
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 +3 -1
- package/dashboard/js/command-center.js +0 -7
- package/dashboard.js +46 -25
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
-
## 0.1.
|
|
3
|
+
## 0.1.257 (2026-04-03)
|
|
4
4
|
|
|
5
5
|
### Features
|
|
6
6
|
- streaming CC responses — text appears as it arrives via SSE
|
|
7
7
|
|
|
8
8
|
### Fixes
|
|
9
|
+
- streaming CC handler now has full parity with non-streaming
|
|
10
|
+
- remove dead 'data.actions' code from streaming CC path — caused ReferenceError
|
|
9
11
|
- CC messages no longer show as "queued" after page refresh
|
|
10
12
|
|
|
11
13
|
## 0.1.253 (2026-04-03)
|
|
@@ -234,13 +234,6 @@ async function _ccDoSend(message, skipUserMsg) {
|
|
|
234
234
|
} catch { /* incomplete JSON */ }
|
|
235
235
|
}
|
|
236
236
|
}
|
|
237
|
-
|
|
238
|
-
// Execute actions
|
|
239
|
-
if (data.actions && data.actions.length > 0) {
|
|
240
|
-
for (const action of data.actions) {
|
|
241
|
-
await ccExecuteAction(action);
|
|
242
|
-
}
|
|
243
|
-
}
|
|
244
237
|
} catch (e) {
|
|
245
238
|
clearInterval(ccTimer);
|
|
246
239
|
thinking.remove();
|
package/dashboard.js
CHANGED
|
@@ -2994,36 +2994,57 @@ What would you like to discuss or change? When you're happy, say "approve" and I
|
|
|
2994
2994
|
|
|
2995
2995
|
res.writeHead(200, { 'Content-Type': 'text/event-stream', 'Cache-Control': 'no-cache', 'Connection': 'keep-alive' });
|
|
2996
2996
|
|
|
2997
|
-
|
|
2998
|
-
|
|
2999
|
-
|
|
3000
|
-
|
|
3001
|
-
const { callLLMStreaming, trackEngineUsage: trackUsage } = require('./engine/llm');
|
|
3002
|
-
const result = await callLLMStreaming(prompt, CC_STATIC_SYSTEM_PROMPT, {
|
|
3003
|
-
timeout: 900000, label: 'command-center', model: 'sonnet', maxTurns: 50,
|
|
3004
|
-
allowedTools: 'Bash,Read,Write,Edit,Glob,Grep,WebFetch,WebSearch',
|
|
3005
|
-
sessionId,
|
|
3006
|
-
onChunk: (text) => {
|
|
3007
|
-
try { res.write('data: ' + JSON.stringify({ type: 'chunk', text }) + '\n\n'); } catch {}
|
|
2997
|
+
try {
|
|
2998
|
+
// Session management — same as non-streaming path
|
|
2999
|
+
if (body.sessionId && body.sessionId !== ccSession.sessionId) {
|
|
3000
|
+
ccSession = { sessionId: null, createdAt: null, lastActiveAt: null, turnCount: 0 };
|
|
3008
3001
|
}
|
|
3009
|
-
|
|
3010
|
-
|
|
3002
|
+
const wasResume = !!(ccSessionValid() && ccSession.sessionId);
|
|
3003
|
+
const sessionId = wasResume ? ccSession.sessionId : null;
|
|
3004
|
+
const preamble = buildCCStatePreamble();
|
|
3005
|
+
const prompt = preamble + '\n\n---\n\n' + body.message;
|
|
3006
|
+
|
|
3007
|
+
const { callLLMStreaming, trackEngineUsage: trackUsage } = require('./engine/llm');
|
|
3008
|
+
const result = await callLLMStreaming(prompt, CC_STATIC_SYSTEM_PROMPT, {
|
|
3009
|
+
timeout: 900000, label: 'command-center', model: 'sonnet', maxTurns: 50,
|
|
3010
|
+
allowedTools: 'Bash,Read,Write,Edit,Glob,Grep,WebFetch,WebSearch',
|
|
3011
|
+
sessionId,
|
|
3012
|
+
onChunk: (text) => {
|
|
3013
|
+
try { res.write('data: ' + JSON.stringify({ type: 'chunk', text }) + '\n\n'); } catch {}
|
|
3014
|
+
}
|
|
3015
|
+
});
|
|
3016
|
+
trackUsage('command-center', result.usage);
|
|
3011
3017
|
|
|
3012
|
-
|
|
3013
|
-
|
|
3014
|
-
|
|
3015
|
-
|
|
3016
|
-
|
|
3017
|
-
|
|
3018
|
+
// Handle failure — same error reporting as non-streaming
|
|
3019
|
+
if (result.code !== 0 || !result.text) {
|
|
3020
|
+
const debugInfo = result.code !== 0 ? `(exit code ${result.code})` : '(empty response)';
|
|
3021
|
+
const stderrTail = (result.stderr || '').trim().split('\n').filter(Boolean).slice(-3).join(' | ');
|
|
3022
|
+
const retryHint = ccSession.sessionId
|
|
3023
|
+
? 'Your session is still active — just send your message again to retry.'
|
|
3024
|
+
: 'Try clicking **New Session** and sending your message again.';
|
|
3025
|
+
res.write('data: ' + JSON.stringify({ type: 'done', text: `I had trouble processing that ${debugInfo}. ${stderrTail ? 'Detail: ' + stderrTail : ''}\n\n${retryHint}`, actions: [], sessionId: ccSession.sessionId }) + '\n\n');
|
|
3026
|
+
res.end();
|
|
3027
|
+
return;
|
|
3028
|
+
}
|
|
3018
3029
|
|
|
3019
|
-
|
|
3020
|
-
|
|
3021
|
-
|
|
3022
|
-
|
|
3023
|
-
|
|
3024
|
-
|
|
3030
|
+
// Update session
|
|
3031
|
+
const now = Date.now();
|
|
3032
|
+
if (result.sessionId) {
|
|
3033
|
+
ccSession = { sessionId: result.sessionId, createdAt: ccSession.createdAt || now, lastActiveAt: now, turnCount: (ccSession.turnCount || 0) + 1 };
|
|
3034
|
+
safeWrite(path.join(ENGINE_DIR, 'cc-session.json'), ccSession);
|
|
3035
|
+
}
|
|
3036
|
+
|
|
3037
|
+
// Send final result with actions
|
|
3038
|
+
const { text: displayText, actions } = parseCCActions(result.text);
|
|
3039
|
+
res.write('data: ' + JSON.stringify({ type: 'done', text: displayText, actions, sessionId: ccSession.sessionId, newSession: !wasResume }) + '\n\n');
|
|
3040
|
+
res.end();
|
|
3041
|
+
} finally {
|
|
3042
|
+
ccInFlight = false;
|
|
3043
|
+
ccInFlightSince = 0;
|
|
3044
|
+
}
|
|
3025
3045
|
} catch (e) {
|
|
3026
3046
|
ccInFlight = false;
|
|
3047
|
+
ccInFlightSince = 0;
|
|
3027
3048
|
try { res.write('data: ' + JSON.stringify({ type: 'error', error: e.message }) + '\n\n'); } catch {}
|
|
3028
3049
|
try { res.end(); } catch {}
|
|
3029
3050
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@yemi33/minions",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.257",
|
|
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"
|