@yemi33/minions 0.1.1906 → 0.1.1907
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/bin/minions.js +19 -3
- package/engine/copilot-models.json +1 -1
- package/engine/restart-health.js +1 -1
- package/package.json +1 -1
package/bin/minions.js
CHANGED
|
@@ -168,12 +168,26 @@ function killMinionsProcesses(patterns) {
|
|
|
168
168
|
} catch {}
|
|
169
169
|
}
|
|
170
170
|
|
|
171
|
+
/** Open append-mode FDs under engine/ for detached-process stdio. If the file
|
|
172
|
+
* can't be opened we fall back to 'ignore' rather than blocking the restart. */
|
|
173
|
+
function _openStdioLog(name) {
|
|
174
|
+
try {
|
|
175
|
+
const dir = path.join(MINIONS_HOME, 'engine');
|
|
176
|
+
if (!fs.existsSync(dir)) fs.mkdirSync(dir, { recursive: true });
|
|
177
|
+
return fs.openSync(path.join(dir, name), 'a');
|
|
178
|
+
} catch { return 'ignore'; }
|
|
179
|
+
}
|
|
180
|
+
|
|
171
181
|
/** Spawn a detached dashboard with self-open suppressed — the CLI decides
|
|
172
|
-
* when to open a browser based on whether a real tab reconnects post-health.
|
|
182
|
+
* when to open a browser based on whether a real tab reconnects post-health.
|
|
183
|
+
* stdout/stderr land in engine/dashboard-stdio.log so silent startup crashes
|
|
184
|
+
* leave a postmortem instead of vanishing. */
|
|
173
185
|
function spawnDashboard() {
|
|
174
186
|
const env = { ...process.env, MINIONS_NO_AUTO_OPEN: '1' };
|
|
187
|
+
const out = _openStdioLog('dashboard-stdio.log');
|
|
188
|
+
const err = _openStdioLog('dashboard-stdio.log');
|
|
175
189
|
const proc = spawn(process.execPath, [path.join(MINIONS_HOME, 'dashboard.js')], {
|
|
176
|
-
cwd: MINIONS_HOME, stdio: 'ignore', detached: true, windowsHide: true, env
|
|
190
|
+
cwd: MINIONS_HOME, stdio: ['ignore', out, err], detached: true, windowsHide: true, env
|
|
177
191
|
});
|
|
178
192
|
proc.unref();
|
|
179
193
|
return proc;
|
|
@@ -736,8 +750,10 @@ if (!cmd || cmd === 'help' || cmd === '--help' || cmd === '-h') {
|
|
|
736
750
|
// Clear stale beacons AFTER the kill so the old dashboard's last writes
|
|
737
751
|
// can't repopulate the file in the gap between clear and shutdown.
|
|
738
752
|
_clearDashboardBrowserState(MINIONS_HOME);
|
|
753
|
+
const engineOut = _openStdioLog('engine-stdio.log');
|
|
754
|
+
const engineErr = _openStdioLog('engine-stdio.log');
|
|
739
755
|
const engineProc = spawn(process.execPath, [path.join(MINIONS_HOME, 'engine.js'), 'start', ...rest], {
|
|
740
|
-
cwd: MINIONS_HOME, stdio: 'ignore', detached: true, windowsHide: true
|
|
756
|
+
cwd: MINIONS_HOME, stdio: ['ignore', engineOut, engineErr], detached: true, windowsHide: true
|
|
741
757
|
});
|
|
742
758
|
engineProc.unref();
|
|
743
759
|
console.log(`\n Engine started (PID: ${engineProc.pid})`);
|
package/engine/restart-health.js
CHANGED
|
@@ -92,7 +92,7 @@ async function checkRestartHealth(options = {}) {
|
|
|
92
92
|
const engineAlive = pid ? isAlive(pid) : false;
|
|
93
93
|
const engineOk = control && control.state === 'running' && engineAlive;
|
|
94
94
|
|
|
95
|
-
const dashboard = await getJson(dashboardUrl,
|
|
95
|
+
const dashboard = await getJson(dashboardUrl, 3000);
|
|
96
96
|
const dashboardStatus = dashboard && dashboard.json && dashboard.json.status;
|
|
97
97
|
const dashboardOk = !!(dashboard && dashboard.ok && dashboardStatus === 'healthy');
|
|
98
98
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@yemi33/minions",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.1907",
|
|
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"
|