@yemi33/minions 0.1.1750 → 0.1.1751
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 +4 -1
- package/dashboard.js +32 -0
- package/engine/copilot-models.json +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
package/dashboard.js
CHANGED
|
@@ -7389,6 +7389,33 @@ What would you like to discuss or change? When you're happy, say "approve" and I
|
|
|
7389
7389
|
}
|
|
7390
7390
|
});
|
|
7391
7391
|
|
|
7392
|
+
// Crash handlers — install before listen() so a rogue Promise rejection or
|
|
7393
|
+
// thrown error in any request handler is logged via shared.log instead of
|
|
7394
|
+
// silently killing the dashboard with no audit trail.
|
|
7395
|
+
//
|
|
7396
|
+
// Mirrors the pattern in engine/cli.js, but tuned for a long-running HTTP
|
|
7397
|
+
// server: unhandledRejection is logged-and-recovered (transient bugs in
|
|
7398
|
+
// individual requests should not take down the whole process), while
|
|
7399
|
+
// uncaughtException sets process.exitCode = 1 and lets pending writes flush
|
|
7400
|
+
// (per Node docs, the process state is undefined after an uncaught exception,
|
|
7401
|
+
// so the safe move is to log, mark exit-non-zero, and let the runtime tear
|
|
7402
|
+
// down naturally rather than calling process.exit() synchronously).
|
|
7403
|
+
function _installCrashHandlers() {
|
|
7404
|
+
process.on('unhandledRejection', (reason) => {
|
|
7405
|
+
const msg = reason instanceof Error ? reason.stack || reason.message : String(reason);
|
|
7406
|
+
console.error(`[dashboard] Unhandled promise rejection: ${msg}`);
|
|
7407
|
+
try { shared.log('error', `dashboard unhandledRejection: ${msg}`); } catch { /* best effort */ }
|
|
7408
|
+
});
|
|
7409
|
+
|
|
7410
|
+
process.on('uncaughtException', (err) => {
|
|
7411
|
+
const msg = err instanceof Error ? err.stack || err.message : String(err);
|
|
7412
|
+
console.error(`[dashboard] Uncaught exception: ${msg}`);
|
|
7413
|
+
try { shared.log('error', `dashboard uncaughtException: ${msg}`); } catch { /* best effort */ }
|
|
7414
|
+
try { shared.flushLogs(); } catch { /* best effort */ }
|
|
7415
|
+
process.exitCode = 1;
|
|
7416
|
+
});
|
|
7417
|
+
}
|
|
7418
|
+
|
|
7392
7419
|
// Exported for testing — pure helpers with no hidden side effects.
|
|
7393
7420
|
// Production entry points use the closures directly; tests import via require('./dashboard').
|
|
7394
7421
|
module.exports = {
|
|
@@ -7418,12 +7445,17 @@ module.exports = {
|
|
|
7418
7445
|
_formatCcApiRoutesIndex,
|
|
7419
7446
|
_formatCcCliCommandsIndex,
|
|
7420
7447
|
_resetPreambleCache,
|
|
7448
|
+
_installCrashHandlers,
|
|
7421
7449
|
};
|
|
7422
7450
|
|
|
7423
7451
|
// Start the HTTP server only when run directly (node dashboard.js).
|
|
7424
7452
|
// When required as a module (e.g. by unit tests), skip the listen/watchdog/signal
|
|
7425
7453
|
// handlers so tests can import exported helpers without binding to port 7331.
|
|
7426
7454
|
if (require.main === module) {
|
|
7455
|
+
// Install crash handlers FIRST so any error during bootstrap (HTML assembly,
|
|
7456
|
+
// engine reads, port binding) is captured rather than dying silently.
|
|
7457
|
+
_installCrashHandlers();
|
|
7458
|
+
|
|
7427
7459
|
server.listen(PORT, '127.0.0.1', () => {
|
|
7428
7460
|
console.log(`\n Minions Mission Control`);
|
|
7429
7461
|
console.log(` -----------------------------------`);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@yemi33/minions",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.1751",
|
|
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"
|