@yemi33/minions 0.1.462 → 0.1.463
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 +5 -0
- package/engine/timeout.js +4 -0
- package/engine.js +6 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
package/engine/timeout.js
CHANGED
|
@@ -211,6 +211,8 @@ function checkTimeouts(config) {
|
|
|
211
211
|
if (!hasProcess && silentMs > effectiveTimeout && Date.now() > engineRestartGraceUntil) {
|
|
212
212
|
// No tracked process AND no recent output past effective timeout AND grace period expired → orphaned
|
|
213
213
|
log('warn', `Orphan detected: ${item.agent} (${item.id}) — no process tracked, silent for ${silentSec}s${isBlocking ? ' (blocking timeout exceeded)' : ''}`);
|
|
214
|
+
// Clear session so retry starts fresh
|
|
215
|
+
try { shared.safeUnlink(path.join(AGENTS_DIR, item.agent, 'session.json')); } catch {}
|
|
214
216
|
deadItems.push({ item, reason: `Orphaned — no process, silent for ${silentSec}s` });
|
|
215
217
|
} else if (hasProcess && silentMs > effectiveTimeout) {
|
|
216
218
|
// Has process but no output past effective timeout → hung
|
|
@@ -220,6 +222,8 @@ function checkTimeouts(config) {
|
|
|
220
222
|
shared.killGracefully(procInfo.proc, 5000);
|
|
221
223
|
activeProcesses.delete(item.id);
|
|
222
224
|
}
|
|
225
|
+
// Clear session so retry starts fresh instead of resuming the killed session
|
|
226
|
+
try { shared.safeUnlink(path.join(AGENTS_DIR, item.agent, 'session.json')); } catch {}
|
|
223
227
|
deadItems.push({ item, reason: `Hung — no output for ${silentSec}s` });
|
|
224
228
|
}
|
|
225
229
|
// If has process and recent output → healthy, let it run
|
package/engine.js
CHANGED
|
@@ -562,6 +562,12 @@ function spawnAgent(dispatchItem, config) {
|
|
|
562
562
|
if (heartbeatTimer) { clearInterval(heartbeatTimer); heartbeatTimer = null; }
|
|
563
563
|
log('info', `Agent ${agentId} (${id}) exited with code ${code}`);
|
|
564
564
|
|
|
565
|
+
// Clear stale session if resume failed — prevents burning all retries on the same bad session
|
|
566
|
+
if (code !== 0 && cachedSessionId && stderr.includes('No conversation found')) {
|
|
567
|
+
log('warn', `Stale session ${cachedSessionId} for ${agentId} — clearing session.json`);
|
|
568
|
+
try { shared.safeUnlink(path.join(AGENTS_DIR, agentId, 'session.json')); } catch {}
|
|
569
|
+
}
|
|
570
|
+
|
|
565
571
|
// Check if this was a steering kill — re-spawn with resume
|
|
566
572
|
const procInfo = activeProcesses.get(id);
|
|
567
573
|
if (procInfo?._steeringMessage) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@yemi33/minions",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.463",
|
|
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"
|