fix: bulletproof command handler + auto-restart + README overhaul

- sendStreamingMessage: replaced broken simulated streaming with reliable
  HTML send + stripped plain text fallback (was silently failing)
- Added global unhandledRejection guard (catches async errors that
  sequentialize middleware would swallow)
- restart.sh: auto-restart loop on crash (3s delay) instead of bare node
- README: comprehensive update with self-learning memory, curiosity engine,
  memory architecture diagram, updated command table, updated comparison
This commit is contained in:
admin
2026-05-05 14:49:49 +00:00
Unverified
parent a84df42932
commit 050dc6ebe3
4 changed files with 171 additions and 33 deletions

View File

@@ -727,6 +727,11 @@ export async function initBot(config, api, tools, skills, agents) {
logger.error('Bot error:', err.message || err);
});
// ── Global unhandled rejection guard ──
process.on('unhandledRejection', (reason, promise) => {
logger.error('Unhandled rejection:', reason?.message || reason);
});
// ── Express + WebSocket server (keep for webhook compatibility) ──
const app = express();
app.use(express.json());