@yemi33/minions 0.1.257 → 0.1.259

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,5 +1,11 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.1.259 (2026-04-03)
4
+
5
+ ### Fixes
6
+ - CC stream clears ccInFlight on client disconnect + defensive thinking.remove
7
+ - remove last evaluate references — eval loop now creates review items
8
+
3
9
  ## 0.1.257 (2026-04-03)
4
10
 
5
11
  ### Features
@@ -192,7 +192,7 @@ async function _ccDoSend(message, skipUserMsg) {
192
192
 
193
193
  // Create streaming message bubble
194
194
  clearInterval(ccTimer);
195
- thinking.remove();
195
+ try { thinking.remove(); } catch { /* may already be removed */ }
196
196
  const streamDiv = document.createElement('div');
197
197
  streamDiv.className = 'cc-msg assistant';
198
198
  streamDiv.innerHTML = '<span style="color:var(--muted);font-size:11px">Thinking...</span>';
@@ -236,7 +236,7 @@ async function _ccDoSend(message, skipUserMsg) {
236
236
  }
237
237
  } catch (e) {
238
238
  clearInterval(ccTimer);
239
- thinking.remove();
239
+ try { thinking.remove(); } catch { /* may already be removed */ }
240
240
  const retryId = 'cc-retry-' + Date.now();
241
241
  ccAddMessage('assistant', '<span style="color:var(--red)">Error: ' + escHtml(e.message) + '</span>' +
242
242
  '<button id="' + retryId + '" onclick="ccRetryLast()" style="margin-top:6px;padding:4px 12px;background:var(--surface2);border:1px solid var(--border);border-radius:4px;color:var(--blue);cursor:pointer;font-size:11px">Retry</button>');
package/dashboard.js CHANGED
@@ -2993,6 +2993,8 @@ What would you like to discuss or change? When you're happy, say "approve" and I
2993
2993
  ccInFlightSince = Date.now();
2994
2994
 
2995
2995
  res.writeHead(200, { 'Content-Type': 'text/event-stream', 'Cache-Control': 'no-cache', 'Connection': 'keep-alive' });
2996
+ // Clear ccInFlight if client disconnects mid-stream
2997
+ req.on('close', () => { ccInFlight = false; ccInFlightSince = 0; });
2996
2998
 
2997
2999
  try {
2998
3000
  // Session management — same as non-streaming path
@@ -1266,8 +1266,8 @@ function runPostCompletionHooks(dispatchItem, agentId, code, stdout, config) {
1266
1266
  mutateJsonFileLocked(wiPath, (items) => {
1267
1267
  // For fix items, target the original implement parent; for implement, target self
1268
1268
  const evalTargetId = type === 'fix' ? meta.item._evalParentId : meta.item.id;
1269
- // Dedup: skip if an evaluate item already exists for this parent
1270
- const existing = items.find(i => i._evalParentId === evalTargetId && i.type === 'evaluate' && i.status === 'pending');
1269
+ // Dedup: skip if a review item already exists for this parent
1270
+ const existing = items.find(i => i._evalParentId === evalTargetId && i.type === 'review' && i.status === 'pending');
1271
1271
  if (existing) {
1272
1272
  log('info', `Eval loop: evaluate item ${existing.id} already exists for ${evalTargetId}, skipping`);
1273
1273
  return items;
@@ -1276,7 +1276,7 @@ function runPostCompletionHooks(dispatchItem, agentId, code, stdout, config) {
1276
1276
  const evalItem = {
1277
1277
  id: 'W-' + shared.uid(),
1278
1278
  title: `Evaluate: ${parentItem?.title || meta.item.title || evalTargetId}`,
1279
- type: 'evaluate',
1279
+ type: 'review',
1280
1280
  priority: meta.item.priority || 'high',
1281
1281
  status: 'pending',
1282
1282
  created: ts(),
@@ -1302,7 +1302,7 @@ function runPostCompletionHooks(dispatchItem, agentId, code, stdout, config) {
1302
1302
  }
1303
1303
 
1304
1304
  // Evaluate completion: parse verdict and handle eval→fix iteration loop
1305
- if (isSuccess && type === 'evaluate' && meta?.item?._evalParentId) {
1305
+ if (isSuccess && type === 'review' && meta?.item?._evalParentId) {
1306
1306
  try {
1307
1307
  const verdict = parseEvalVerdict(resultSummary || stdout);
1308
1308
  const evalLoop = config.engine?.evalLoop ?? shared.ENGINE_DEFAULTS.evalLoop;
@@ -481,7 +481,7 @@ function selectPlaybook(workType, item) {
481
481
  if (workType === 'review' && !item?._pr && !item?.pr_id) {
482
482
  return 'work-item';
483
483
  }
484
- const typeSpecificPlaybooks = ['explore', 'review', 'test', 'plan-to-prd', 'plan', 'ask', 'verify', 'decompose', 'evaluate', 'meeting-investigate', 'meeting-debate', 'meeting-conclude'];
484
+ const typeSpecificPlaybooks = ['explore', 'review', 'test', 'plan-to-prd', 'plan', 'ask', 'verify', 'decompose', 'meeting-investigate', 'meeting-debate', 'meeting-conclude'];
485
485
  return typeSpecificPlaybooks.includes(workType) ? workType : 'work-item';
486
486
  }
487
487
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yemi33/minions",
3
- "version": "0.1.257",
3
+ "version": "0.1.259",
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"