@yemi33/minions 0.1.268 → 0.1.270

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,13 @@
1
1
  # Changelog
2
2
 
3
- ## 0.1.268 (2026-04-03)
3
+ ## 0.1.270 (2026-04-03)
4
4
 
5
5
  ### Features
6
6
  - CC streaming shows cumulative tool list with loading dots
7
7
 
8
8
  ### Fixes
9
+ - agent and engine usage tables both have 7 columns for alignment
10
+ - streaming CC was popping user messages from _ccMessages
9
11
  - process remaining SSE buffer after stream ends + fallback finalization
10
12
  - Thinking... indicator shows alongside tool calls until text arrives
11
13
  - use safeJson instead of JSON.parse(safeRead()) in trigger-verify handler
@@ -242,7 +242,7 @@ async function _ccDoSend(message, skipUserMsg) {
242
242
  } else if (evt.type === 'done') {
243
243
  // Replace streaming div with a proper ccAddMessage
244
244
  streamDiv.remove();
245
- _ccMessages.pop(); // remove the placeholder we pushed
245
+ // placeholder was added with skipSave=true — nothing to pop
246
246
  const ccElapsed = Math.round((Date.now() - ccStartTime) / 1000);
247
247
  const rendered = renderMd(evt.text || streamedText || '');
248
248
  ccAddMessage('assistant', rendered + '<div style="font-size:9px;color:var(--muted);margin-top:6px;display:flex;justify-content:flex-end;padding-right:30px">' + ccElapsed + 's</div>');
@@ -252,7 +252,7 @@ async function _ccDoSend(message, skipUserMsg) {
252
252
  }
253
253
  } else if (evt.type === 'error') {
254
254
  streamDiv.remove();
255
- _ccMessages.pop();
255
+ // placeholder was skipSave — no pop needed
256
256
  ccAddMessage('assistant', '<span style="color:var(--red)">' + escHtml(evt.error) + '</span>');
257
257
  }
258
258
  } catch { /* incomplete JSON */ }
@@ -266,7 +266,7 @@ async function _ccDoSend(message, skipUserMsg) {
266
266
  const evt = JSON.parse(line.slice(6));
267
267
  if (evt.type === 'done') {
268
268
  streamDiv.remove();
269
- _ccMessages.pop();
269
+ // placeholder was skipSave — no pop needed
270
270
  const ccElapsed = Math.round((Date.now() - ccStartTime) / 1000);
271
271
  const rendered = renderMd(evt.text || streamedText || '');
272
272
  ccAddMessage('assistant', rendered + '<div style="font-size:9px;color:var(--muted);margin-top:6px;display:flex;justify-content:flex-end;padding-right:30px">' + ccElapsed + 's</div>');
@@ -284,7 +284,6 @@ async function _ccDoSend(message, skipUserMsg) {
284
284
  // If stream ended without a 'done' event, finalize with whatever we have
285
285
  if (streamDiv.parentNode) {
286
286
  streamDiv.remove();
287
- _ccMessages.pop();
288
287
  if (streamedText) {
289
288
  const ccElapsed = Math.round((Date.now() - ccStartTime) / 1000);
290
289
  ccAddMessage('assistant', renderMd(streamedText) + '<div style="font-size:9px;color:var(--muted);margin-top:6px;display:flex;justify-content:flex-end;padding-right:30px">' + ccElapsed + 's</div>');
@@ -203,15 +203,16 @@ function renderTokenUsage(metrics) {
203
203
  if (engineEntries.length > 0) {
204
204
  const labels = { 'consolidation': 'Consolidation', 'command-center': 'Command Center', 'doc-chat': 'Doc Chat', 'kb-sweep': 'KB Sweep', 'schedule-parse': 'Schedule Parse' };
205
205
  html += '<div style="font-size:10px;color:var(--muted);margin:12px 0 4px;font-weight:600;text-transform:uppercase;letter-spacing:0.5px">Engine Usage</div>';
206
- html += '<table class="token-agent-table"><thead><tr><th>Operation</th><th>Cost</th><th>Calls</th><th>Input</th><th>Output</th><th>$/call</th></tr></thead><tbody>';
206
+ html += '<table class="token-agent-table"><thead><tr><th>Operation</th><th>Calls</th><th>Cost</th><th>Input</th><th>Output</th><th>Cache</th><th>$/call</th></tr></thead><tbody>';
207
207
  for (const [cat, e] of engineEntries.sort((a, b) => (b[1].costUsd || 0) - (a[1].costUsd || 0))) {
208
208
  const perCall = (e.calls || 0) > 0 ? fmtCost((e.costUsd || 0) / e.calls) : '-';
209
209
  html += '<tr>' +
210
210
  '<td style="font-weight:600">' + escHtml(labels[cat] || cat) + '</td>' +
211
- '<td>' + fmtCost(e.costUsd || 0) + '</td>' +
212
211
  '<td>' + (e.calls || 0) + '</td>' +
212
+ '<td>' + fmtCost(e.costUsd || 0) + '</td>' +
213
213
  '<td>' + fmtTokens(e.inputTokens || 0) + '</td>' +
214
214
  '<td>' + fmtTokens(e.outputTokens || 0) + '</td>' +
215
+ '<td>' + fmtTokens(e.cacheRead || 0) + '</td>' +
215
216
  '<td style="color:var(--muted)">' + perCall + '</td>' +
216
217
  '</tr>';
217
218
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yemi33/minions",
3
- "version": "0.1.268",
3
+ "version": "0.1.270",
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"