shell-cluster
Advanced tools
+12
-6
| { | ||
| "name": "shell-cluster", | ||
| "version": "1.0.11", | ||
| "version": "1.0.12", | ||
| "description": "Decentralized remote shell access via tunnels — Node.js server with node-pty and xterm-headless", | ||
@@ -16,2 +16,5 @@ "main": "src/index.js", | ||
| "start": "node src/index.js", | ||
| "test": "jest --forceExit --detectOpenHandles", | ||
| "test:unit": "jest --testPathPattern='tests/unit' --forceExit", | ||
| "test:e2e": "jest --testPathPattern='tests/e2e' --forceExit --detectOpenHandles", | ||
| "postinstall": "node scripts/postinstall.js" | ||
@@ -38,9 +41,12 @@ }, | ||
| "dependencies": { | ||
| "@iarna/toml": "^2.2.5", | ||
| "@xterm/addon-serialize": "^0.13.0", | ||
| "@xterm/headless": "^5.5.0", | ||
| "commander": "^12.0.0", | ||
| "node-pty": "^1.0.0", | ||
| "@xterm/headless": "^5.5.0", | ||
| "@xterm/addon-serialize": "^0.13.0", | ||
| "ws": "^8.18.0", | ||
| "@iarna/toml": "^2.2.5", | ||
| "commander": "^12.0.0" | ||
| "ws": "^8.18.0" | ||
| }, | ||
| "devDependencies": { | ||
| "jest": "^30.3.0" | ||
| } | ||
| } |
+9
-0
@@ -137,2 +137,11 @@ /** | ||
| // Global error handlers for diagnostics | ||
| process.on('uncaughtException', (err) => { | ||
| console.error(`[Daemon] UNCAUGHT EXCEPTION: ${err.message}`); | ||
| console.error(err.stack); | ||
| }); | ||
| process.on('unhandledRejection', (reason) => { | ||
| console.error(`[Daemon] UNHANDLED REJECTION:`, reason); | ||
| }); | ||
| // Verify node-pty before anything else | ||
@@ -139,0 +148,0 @@ if (this._shellManager.ptyError) { |
+11
-2
@@ -139,3 +139,8 @@ /** | ||
| if (session._disposed) return; | ||
| terminal.write(data); | ||
| try { | ||
| terminal.write(data); | ||
| } catch (e) { | ||
| console.error(`[ShellManager] terminal.write threw session=${sessionId}: ${e.message}`); | ||
| return; | ||
| } | ||
| // Track DEC private mode changes | ||
@@ -154,3 +159,7 @@ let m; | ||
| for (const cb of session._outputs) { | ||
| cb(sessionId, buf); | ||
| try { | ||
| cb(sessionId, buf); | ||
| } catch (e) { | ||
| console.error(`[ShellManager] output callback threw session=${sessionId}: ${e.message}`); | ||
| } | ||
| } | ||
@@ -157,0 +166,0 @@ }); |
@@ -73,2 +73,10 @@ /** | ||
| httpServer.on('error', reject); | ||
| httpServer.on('clientError', (err, socket) => { | ||
| console.error(`[ShellServer] Client error: ${err.message}`); | ||
| }); | ||
| wss.on('error', (err) => { | ||
| console.error(`[ShellServer] WSS error: ${err.message}`); | ||
| }); | ||
| }); | ||
@@ -75,0 +83,0 @@ } |
AI-detected potential code anomaly
Supply chain riskAI has identified unusual behaviors that may pose a security risk.
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
AI-detected potential code anomaly
Supply chain riskAI has identified unusual behaviors that may pose a security risk.
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
118724
0.96%3330
0.7%1
Infinity%