@yemi33/minions 0.1.930 → 0.1.932

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.930 (2026-04-14)
3
+ ## 0.1.932 (2026-04-14)
4
4
 
5
5
  ### Features
6
6
  - add adoPollEnabled/ghPollEnabled engine settings
@@ -21,6 +21,10 @@
21
21
  - add red dot notification on CC tab when response completes (#934) (#946)
22
22
 
23
23
  ### Fixes
24
+ - prevent _consolidationInFlight race from stale force-reset timeout (#1023)
25
+ - stop perpetual ADO poll retry when token unavailable (#1021)
26
+ - await discoverPipelineWork instead of fire-and-forget .catch (#1020)
27
+ - add unhandledRejection/uncaughtException handlers to engine process (#1019)
24
28
  - show doc-chat badges on Notes and KB items (#1016)
25
29
  - steering kill on no-session re-queues dispatch instead of erroring (#1015)
26
30
  - inject cached ADO token into spawned agents (#998) (#1012)
@@ -37,10 +41,6 @@
37
41
  - PRD item status stuck at dispatched when fix completes (#989)
38
42
  - dep merge ancestor pruning + pre-flight simulation (#958) (#979)
39
43
  - add MAX_TURNS failure class and fix enum count test (#983)
40
- - prevent Create Plan from meeting saving doc-chat context bleed (#980)
41
- - plan completion incorrectly overrides awaiting-approval status (#970) (#978)
42
- - CC queued messages sent to wrong tab after tab switch
43
- - pass sysPromptPath instead of steerPromptPath as system prompt in steering resume (#962)
44
44
 
45
45
  ### Other
46
46
  - test(preflight): add unit tests for findClaudeBinary, runPreflight, printPreflight, checkOrExit (#953)
package/engine/ado.js CHANGED
@@ -252,7 +252,8 @@ async function pollPrStatus(config) {
252
252
  const token = await getAdoToken();
253
253
  if (!token) {
254
254
  log('warn', 'Skipping PR status poll — no ADO token available');
255
- _adoPollHadAuthFailure = true; // trigger retry on next tick
255
+ // Don't set _adoPollHadAuthFailure getAdoToken() has its own 10-min backoff,
256
+ // and setting the flag would hammer pollPrStatus() every tick with no useful work.
256
257
  return;
257
258
  }
258
259
 
package/engine/cli.js CHANGED
@@ -493,6 +493,23 @@ const commands = {
493
493
 
494
494
  process.on('SIGTERM', () => gracefulShutdown('SIGTERM'));
495
495
  process.on('SIGINT', () => gracefulShutdown('SIGINT'));
496
+
497
+ // Crash handlers — log the error and exit cleanly so the process is detectable as crashed
498
+ process.on('unhandledRejection', (reason) => {
499
+ const msg = reason instanceof Error ? reason.stack || reason.message : String(reason);
500
+ console.error(`[FATAL] Unhandled promise rejection: ${msg}`);
501
+ try { shared.log('fatal', `Unhandled promise rejection: ${msg}`); } catch { /* best effort */ }
502
+ try { shared.flushLogs(); } catch { /* best effort */ }
503
+ process.exit(1);
504
+ });
505
+
506
+ process.on('uncaughtException', (err) => {
507
+ const msg = err instanceof Error ? err.stack || err.message : String(err);
508
+ console.error(`[FATAL] Uncaught exception: ${msg}`);
509
+ try { shared.log('fatal', `Uncaught exception: ${msg}`); } catch { /* best effort */ }
510
+ try { shared.flushLogs(); } catch { /* best effort */ }
511
+ process.exit(1);
512
+ });
496
513
  },
497
514
 
498
515
  stop() {
@@ -18,6 +18,7 @@ const { getInboxFiles, getNotes, INBOX_DIR, ENGINE_DIR, MINIONS_DIR,
18
18
  // Track in-flight LLM consolidation to prevent concurrent runs
19
19
  let _consolidationInFlight = false;
20
20
  let _consolidationStartedAt = 0;
21
+ let _forceResetTimeout = null; // force-reset handle; cancelled by _clearProcessingState
21
22
  const _processingFiles = new Set(); // files currently being consolidated (race guard)
22
23
 
23
24
  function consolidateInbox(config) {
@@ -113,6 +114,9 @@ Use today's date: ${dateStamp()}`;
113
114
 
114
115
  function consolidateWithLLM(items, existingNotes, files, config) {
115
116
 
117
+ // Cancel any stale force-reset from a prior run before starting fresh
118
+ clearTimeout(_forceResetTimeout);
119
+ _forceResetTimeout = null;
116
120
  _consolidationInFlight = true;
117
121
  _consolidationStartedAt = Date.now();
118
122
  for (const f of files) _processingFiles.add(f);
@@ -180,18 +184,21 @@ function consolidateWithLLM(items, existingNotes, files, config) {
180
184
  const timeout = setTimeout(() => {
181
185
  log('warn', 'LLM consolidation timed out after 3m — killing and falling back to regex');
182
186
  shared.killGracefully(proc, 10000);
183
- setTimeout(() => {
184
- if (_consolidationInFlight) {
185
- _consolidationInFlight = false;
186
- _processingFiles.clear();
187
- log('warn', 'Consolidation flag force-reset after SIGKILL');
188
- }
187
+ _forceResetTimeout = setTimeout(() => {
188
+ if (!_cleared) log('warn', 'Consolidation flag force-reset after SIGKILL');
189
+ _clearProcessingState();
189
190
  }, 10000);
190
191
  }, 180000);
191
192
 
193
+ let _cleared = false; // idempotency guard — both 'error' and 'close' can fire for the same process
192
194
  function _clearProcessingState() {
195
+ if (_cleared) return;
196
+ _cleared = true;
197
+ clearTimeout(_forceResetTimeout);
198
+ _forceResetTimeout = null;
193
199
  for (const f of files) _processingFiles.delete(f);
194
200
  _consolidationInFlight = false;
201
+ _consolidationStartedAt = 0;
195
202
  }
196
203
 
197
204
  proc.on('close', (code) => {
package/engine.js CHANGED
@@ -2990,7 +2990,7 @@ async function discoverWork(config) {
2990
2990
  // Pipeline orchestration — check stage completions and start ready stages
2991
2991
  try {
2992
2992
  const { discoverPipelineWork } = require('./engine/pipeline');
2993
- discoverPipelineWork(config).catch(e => log('warn', 'discover pipeline work: ' + e.message));
2993
+ await discoverPipelineWork(config);
2994
2994
  } catch (e) { log('warn', 'discover pipeline work: ' + e.message); }
2995
2995
 
2996
2996
  // Periodic plan completion sweep — catch PRDs that completed while engine was down
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yemi33/minions",
3
- "version": "0.1.930",
3
+ "version": "0.1.932",
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"