@yemi33/minions 0.1.309 → 0.1.311

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.
Files changed (3) hide show
  1. package/CHANGELOG.md +8 -0
  2. package/engine.js +22 -12
  3. package/package.json +1 -1
package/CHANGELOG.md CHANGED
@@ -1,5 +1,13 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.1.311 (2026-04-03)
4
+
5
+ ### Fixes
6
+ - wrap all tickInner phases in try-catch for resilient dispatch
7
+
8
+ ### Other
9
+ - refactor: simplify tick resilience — safe() helper, per-spawn catch, discovery guard
10
+
3
11
  ## 0.1.309 (2026-04-03)
4
12
 
5
13
  ### Fixes
package/engine.js CHANGED
@@ -2182,16 +2182,16 @@ async function tickInner() {
2182
2182
  const config = getConfig();
2183
2183
  tickCount++;
2184
2184
 
2185
+ // Helper: run a phase, log + continue on error
2186
+ const safe = (label, fn) => { try { fn(); } catch (e) { log('warn', `${label}: ${e.message}`); } };
2187
+
2185
2188
  // 1. Check for timed-out agents, steering messages, and idle threshold
2186
- checkTimeouts(config);
2187
- checkSteering(config);
2188
- checkIdleThreshold(config);
2189
+ safe('checkTimeouts', () => checkTimeouts(config));
2190
+ safe('checkSteering', () => checkSteering(config));
2191
+ safe('checkIdleThreshold', () => checkIdleThreshold(config));
2189
2192
 
2190
2193
  // 1b. Check for meeting round timeouts
2191
- try {
2192
- const { checkMeetingTimeouts } = require('./engine/meeting');
2193
- checkMeetingTimeouts(config);
2194
- } catch (e) { log('warn', 'check meeting timeouts: ' + e.message); }
2194
+ safe('meetingTimeouts', () => { const { checkMeetingTimeouts } = require('./engine/meeting'); checkMeetingTimeouts(config); });
2195
2195
 
2196
2196
  // In stopping state, only track agent completions — skip discovery and dispatch
2197
2197
  if (control.state === 'stopping') {
@@ -2200,11 +2200,11 @@ async function tickInner() {
2200
2200
  }
2201
2201
 
2202
2202
  // 2. Consolidate inbox
2203
- consolidateInbox(config);
2203
+ safe('consolidateInbox', () => consolidateInbox(config));
2204
2204
 
2205
2205
  // 2.5. Periodic cleanup + MCP sync (every 10 ticks = ~5 minutes)
2206
2206
  if (tickCount % 10 === 0) {
2207
- runCleanup(config);
2207
+ safe('runCleanup', () => runCleanup(config));
2208
2208
  }
2209
2209
 
2210
2210
  // 2.6. Poll PR status: build, review, merge (every 6 ticks = ~3 minutes)
@@ -2335,10 +2335,16 @@ async function tickInner() {
2335
2335
  }
2336
2336
 
2337
2337
  // 3. Discover new work from sources
2338
- discoverWork(config);
2338
+ let discoveryOk = true;
2339
+ try { discoverWork(config); } catch (e) { log('warn', 'discoverWork: ' + e.message); discoveryOk = false; }
2339
2340
 
2340
2341
  // 4. Update snapshot
2341
- updateSnapshot(config);
2342
+ safe('updateSnapshot', () => updateSnapshot(config));
2343
+
2344
+ if (!discoveryOk) {
2345
+ log('warn', 'Skipping dispatch — discovery failed, stale data risk');
2346
+ return;
2347
+ }
2342
2348
 
2343
2349
  // 5. Process pending dispatches — auto-spawn agents
2344
2350
  const dispatch = getDispatch();
@@ -2391,7 +2397,11 @@ async function tickInner() {
2391
2397
  const dispatched = new Set();
2392
2398
  for (const item of toDispatch) {
2393
2399
  if (!dispatched.has(item.id)) {
2394
- const proc = spawnAgent(item, config);
2400
+ let proc;
2401
+ try { proc = spawnAgent(item, config); } catch (spawnErr) {
2402
+ log('error', `spawnAgent exception for ${item.id}: ${spawnErr.message}`);
2403
+ proc = null;
2404
+ }
2395
2405
  if (proc === null) {
2396
2406
  // spawnAgent failed (e.g., worktree creation error). It already called
2397
2407
  // completeDispatch internally which handles retry logic, but log at the
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yemi33/minions",
3
- "version": "0.1.309",
3
+ "version": "0.1.311",
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"