@yemi33/minions 0.1.408 → 0.1.410
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 +10 -0
- package/dashboard.js +7 -3
- package/engine/cli.js +9 -3
- package/engine/timeout.js +13 -5
- package/engine.js +7 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,15 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.1.410 (2026-04-06)
|
|
4
|
+
|
|
5
|
+
### Fixes
|
|
6
|
+
- steering messages retry instead of being silently dropped
|
|
7
|
+
|
|
8
|
+
## 0.1.409 (2026-04-06)
|
|
9
|
+
|
|
10
|
+
### Fixes
|
|
11
|
+
- npm version check — use npm.cmd on Windows, log errors, expose in API
|
|
12
|
+
|
|
3
13
|
## 0.1.408 (2026-04-06)
|
|
4
14
|
|
|
5
15
|
### Fixes
|
package/dashboard.js
CHANGED
|
@@ -181,15 +181,18 @@ async function checkNpmVersion() {
|
|
|
181
181
|
try {
|
|
182
182
|
// Use npm view — respects user's .npmrc proxy/registry config (unlike raw https.get)
|
|
183
183
|
const { execFile } = require('child_process');
|
|
184
|
+
// On Windows, detached processes may not have npm on PATH — use npm.cmd explicitly
|
|
185
|
+
const npmCmd = process.platform === 'win32' ? 'npm.cmd' : 'npm';
|
|
184
186
|
const version = await new Promise((resolve, reject) => {
|
|
185
|
-
execFile(
|
|
187
|
+
execFile(npmCmd, ['view', PKG_NAME, 'version'], { timeout: 15000, windowsHide: true, env: process.env }, (err, stdout) => {
|
|
186
188
|
if (err) reject(err); else resolve((stdout || '').trim());
|
|
187
189
|
});
|
|
188
190
|
});
|
|
189
191
|
_npmVersionCache = { latest: version || null, checkedAt: new Date().toISOString() };
|
|
190
192
|
_npmVersionCacheTs = now;
|
|
191
|
-
} catch {
|
|
192
|
-
|
|
193
|
+
} catch (e) {
|
|
194
|
+
console.error('[version-check] npm view failed:', e.message?.split('\n')[0]);
|
|
195
|
+
_npmVersionCache = _npmVersionCache || { latest: null, checkedAt: null, error: e.message?.split('\n')[0] || 'check failed' };
|
|
193
196
|
}
|
|
194
197
|
return _npmVersionCache;
|
|
195
198
|
}
|
|
@@ -338,6 +341,7 @@ function getStatus() {
|
|
|
338
341
|
stale: engineStale || dashboardStale,
|
|
339
342
|
latest: _npmVersionCache?.latest || null,
|
|
340
343
|
updateAvailable: !!(diskVersion && _npmVersionCache?.latest && _npmVersionCache.latest !== diskVersion && _compareVersions(_npmVersionCache.latest, diskVersion) > 0),
|
|
344
|
+
_npmCheckError: _npmVersionCache?.error || null,
|
|
341
345
|
};
|
|
342
346
|
})(),
|
|
343
347
|
timestamp: new Date().toISOString(),
|
package/engine/cli.js
CHANGED
|
@@ -149,8 +149,8 @@ const commands = {
|
|
|
149
149
|
if (agentPid && agentPid > 0) {
|
|
150
150
|
try {
|
|
151
151
|
if (process.platform === 'win32') {
|
|
152
|
-
const out = exec(`tasklist /FI "PID eq ${agentPid}" /NH`, { encoding: 'utf8', timeout: 3000 });
|
|
153
|
-
if (!
|
|
152
|
+
const out = exec(`tasklist /FI "PID eq ${agentPid}" /NH`, { encoding: 'utf8', timeout: 3000 }).trim();
|
|
153
|
+
if (!new RegExp(`\\b${agentPid}\\b`).test(out)) agentPid = null;
|
|
154
154
|
} else {
|
|
155
155
|
process.kill(agentPid, 0);
|
|
156
156
|
}
|
|
@@ -158,7 +158,13 @@ const commands = {
|
|
|
158
158
|
}
|
|
159
159
|
|
|
160
160
|
if (agentPid) {
|
|
161
|
-
|
|
161
|
+
// Load sessionId from session.json for steering support
|
|
162
|
+
let sessionId = null;
|
|
163
|
+
try {
|
|
164
|
+
const sj = safeJson(path.join(AGENTS_DIR, agentId, 'session.json'));
|
|
165
|
+
if (sj?.sessionId) sessionId = sj.sessionId;
|
|
166
|
+
} catch {}
|
|
167
|
+
e.activeProcesses.set(item.id, { proc: { pid: agentPid > 0 ? agentPid : null }, agentId, startedAt: item.created_at, reattached: true, sessionId });
|
|
162
168
|
// Sync work item status to dispatched — direct file write to avoid lifecycle lazy init issues
|
|
163
169
|
if (item.meta?.item?.id && item.meta?.project?.localPath) {
|
|
164
170
|
try {
|
package/engine/timeout.js
CHANGED
|
@@ -60,16 +60,24 @@ function checkSteering(config) {
|
|
|
60
60
|
const steerPath = path.join(AGENTS_DIR, info.agentId, 'steer.md');
|
|
61
61
|
if (!fs.existsSync(steerPath)) continue;
|
|
62
62
|
|
|
63
|
-
const message = safeRead(steerPath);
|
|
64
|
-
try { fs.unlinkSync(steerPath); } catch { /* cleanup */ }
|
|
65
|
-
if (!message) continue;
|
|
66
|
-
|
|
67
63
|
const sessionId = info.sessionId;
|
|
68
64
|
if (!sessionId) {
|
|
69
|
-
|
|
65
|
+
// No sessionId yet — check stale (>5 min means it'll never arrive)
|
|
66
|
+
try {
|
|
67
|
+
const age = Date.now() - fs.statSync(steerPath).mtimeMs;
|
|
68
|
+
if (age > 300000) {
|
|
69
|
+
log('warn', `Steering: no sessionId for ${info.agentId} after 5m — deleting stale message`);
|
|
70
|
+
try { fs.unlinkSync(steerPath); } catch {}
|
|
71
|
+
}
|
|
72
|
+
} catch {}
|
|
73
|
+
// Leave steer.md in place — retry next tick when sessionId may be available
|
|
70
74
|
continue;
|
|
71
75
|
}
|
|
72
76
|
|
|
77
|
+
const message = safeRead(steerPath);
|
|
78
|
+
try { fs.unlinkSync(steerPath); } catch { /* cleanup */ }
|
|
79
|
+
if (!message) continue;
|
|
80
|
+
|
|
73
81
|
log('info', `Steering: killing ${info.agentId} (${id}) for session resume with human message`);
|
|
74
82
|
|
|
75
83
|
// Kill current process
|
package/engine.js
CHANGED
|
@@ -696,7 +696,13 @@ function spawnAgent(dispatchItem, config) {
|
|
|
696
696
|
}, 3000);
|
|
697
697
|
|
|
698
698
|
// Track process — even if PID isn't available yet (async on Windows)
|
|
699
|
-
|
|
699
|
+
// Pre-load sessionId from session.json so steering works immediately on resume
|
|
700
|
+
let initialSessionId = null;
|
|
701
|
+
try {
|
|
702
|
+
const sj = safeJson(path.join(AGENTS_DIR, agentId, 'session.json'));
|
|
703
|
+
if (sj?.sessionId && sj.dispatchId === id) initialSessionId = sj.sessionId;
|
|
704
|
+
} catch {}
|
|
705
|
+
activeProcesses.set(id, { proc, agentId, startedAt, sessionId: initialSessionId });
|
|
700
706
|
|
|
701
707
|
// Log PID and persist to registry
|
|
702
708
|
if (proc.pid) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@yemi33/minions",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.410",
|
|
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"
|