nothumanallowed 6.4.1 → 6.4.3
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/package.json +1 -1
- package/src/commands/ui.mjs +8 -4
- package/src/constants.mjs +1 -1
- package/src/services/web-ui.mjs +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "nothumanallowed",
|
|
3
|
-
"version": "6.4.
|
|
3
|
+
"version": "6.4.3",
|
|
4
4
|
"description": "NotHumanAllowed — 38 AI agents for security, code, DevOps, data & daily ops. Per-agent memory, Telegram + Discord auto-responder, proactive intelligence daemon, voice chat, plugin system.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
package/src/commands/ui.mjs
CHANGED
|
@@ -490,6 +490,11 @@ export async function cmdUI(args) {
|
|
|
490
490
|
// ── Route Handlers ──────────────────────────────────────────────────────
|
|
491
491
|
|
|
492
492
|
async function handleRequest(req, res) {
|
|
493
|
+
// Skip WebSocket upgrade requests — handled by server.on('upgrade')
|
|
494
|
+
if (req.headers.upgrade && req.headers.upgrade.toLowerCase() === 'websocket') {
|
|
495
|
+
return; // Don't respond — let the upgrade event handle it
|
|
496
|
+
}
|
|
497
|
+
|
|
493
498
|
const start = Date.now();
|
|
494
499
|
const url = new URL(req.url, `http://${HOST}:${port}`);
|
|
495
500
|
const pathname = url.pathname;
|
|
@@ -533,8 +538,8 @@ export async function cmdUI(args) {
|
|
|
533
538
|
return;
|
|
534
539
|
}
|
|
535
540
|
|
|
536
|
-
// ── Favicon + Apple touch icons (
|
|
537
|
-
if (pathname === '/favicon.ico' || pathname.startsWith('/apple-touch-icon')) {
|
|
541
|
+
// ── Favicon + Apple touch icons + browser probes (suppress 404) ────
|
|
542
|
+
if (pathname === '/favicon.ico' || pathname.startsWith('/apple-touch-icon') || pathname.startsWith('/.well-known')) {
|
|
538
543
|
res.writeHead(204);
|
|
539
544
|
res.end();
|
|
540
545
|
return;
|
|
@@ -887,11 +892,10 @@ export async function cmdUI(args) {
|
|
|
887
892
|
|
|
888
893
|
const server = http.createServer(handleRequest);
|
|
889
894
|
|
|
890
|
-
// ── WebSocket
|
|
895
|
+
// ── WebSocket on same port as HTTP (upgrade handler) ──────────────────
|
|
891
896
|
const wsClients = new Set();
|
|
892
897
|
|
|
893
898
|
server.on('upgrade', (req, socket, head) => {
|
|
894
|
-
if (req.url !== '/ws') { socket.destroy(); return; }
|
|
895
899
|
const key = req.headers['sec-websocket-key'];
|
|
896
900
|
if (!key) { socket.destroy(); return; }
|
|
897
901
|
|
package/src/constants.mjs
CHANGED
|
@@ -5,7 +5,7 @@ import { fileURLToPath } from 'url';
|
|
|
5
5
|
const __filename = fileURLToPath(import.meta.url);
|
|
6
6
|
const __dirname = path.dirname(__filename);
|
|
7
7
|
|
|
8
|
-
export const VERSION = '6.4.
|
|
8
|
+
export const VERSION = '6.4.3';
|
|
9
9
|
export const BASE_URL = 'https://nothumanallowed.com/cli';
|
|
10
10
|
export const API_BASE = 'https://nothumanallowed.com/api/v1';
|
|
11
11
|
|
package/src/services/web-ui.mjs
CHANGED
|
@@ -880,7 +880,7 @@ var ws = null;
|
|
|
880
880
|
var wsReconnectTimer = null;
|
|
881
881
|
function connectWebSocket() {
|
|
882
882
|
try {
|
|
883
|
-
ws = new WebSocket('ws://' + window.location.host
|
|
883
|
+
ws = new WebSocket('ws://' + window.location.host);
|
|
884
884
|
} catch(e) { return; }
|
|
885
885
|
|
|
886
886
|
ws.onopen = function() {
|