nothumanallowed 15.1.23 → 15.1.25
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/constants.mjs +1 -1
- package/src/server/routes/webcraft.mjs +22 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "nothumanallowed",
|
|
3
|
-
"version": "15.1.
|
|
3
|
+
"version": "15.1.25",
|
|
4
4
|
"description": "NotHumanAllowed — 38 AI agents, 80 tools, Studio (visual agentic workflows). Email, calendar, browser automation, screen capture, canvas, cron/heartbeat, Alexandria E2E messaging, GitHub, Notion, Slack, voice chat, free AI (Liara), 28 languages. Zero-dependency CLI.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
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 = '15.1.
|
|
8
|
+
export const VERSION = '15.1.25';
|
|
9
9
|
export const BASE_URL = 'https://nothumanallowed.com/cli';
|
|
10
10
|
export const API_BASE = 'https://nothumanallowed.com/api/v1';
|
|
11
11
|
|
|
@@ -112,6 +112,13 @@ class SandboxManager {
|
|
|
112
112
|
if (this.isRunning()) {
|
|
113
113
|
emit({ type: 'phase', phase: 'cleanup', msg: 'Stopping previous sandbox...' });
|
|
114
114
|
await this.stop();
|
|
115
|
+
// CRITICAL: `stop()` sets `_stoppedByUser = true` so the dying process'
|
|
116
|
+
// crash isn't misreported. We MUST reset it here, otherwise the brand
|
|
117
|
+
// new sandbox we're about to spawn will exit silently on any crash —
|
|
118
|
+
// bypassing both Tier 1 (npm install) and Tier 2 (LLM/rename) autofix.
|
|
119
|
+
// This was the root cause of the "require is not defined — no autofix
|
|
120
|
+
// ever runs" bug. The flag intent is per-process, not persistent.
|
|
121
|
+
this._stoppedByUser = false;
|
|
115
122
|
}
|
|
116
123
|
|
|
117
124
|
if (!fs.existsSync(projectDir)) {
|
|
@@ -242,9 +249,22 @@ class SandboxManager {
|
|
|
242
249
|
|
|
243
250
|
// ── Crash handling — auto-fix missing modules ─────────────────────────
|
|
244
251
|
const exitCode = typeof healthy === 'object' ? healthy.exitCode : -1;
|
|
245
|
-
// If user pressed Stop, don't report as crash
|
|
246
|
-
|
|
252
|
+
// If user pressed Stop, don't report as crash. We ALSO log this so we
|
|
253
|
+
// can see in the UI when the stoppedByUser flag is what's blocking the
|
|
254
|
+
// autofix flow (was a real bug pre-15.1.24).
|
|
255
|
+
if (this._stoppedByUser) {
|
|
256
|
+
emit({ type: 'warn', msg: 'Crash handling skipped: _stoppedByUser=true (user pressed Stop, or previous stop() leaked the flag). If this is unexpected, restart nha ui to pick up the latest fix.' });
|
|
257
|
+
return;
|
|
258
|
+
}
|
|
247
259
|
emit({ type: 'status', msg: `Process exited with code ${exitCode}` });
|
|
260
|
+
// Surface the captured stderr right away so the user sees the REAL error
|
|
261
|
+
// (not just the post-Tier-2 summary). This is the diagnostic gold.
|
|
262
|
+
if (stderrBuf && stderrBuf.trim()) {
|
|
263
|
+
const stderrSnippet = stderrBuf.split('\n').slice(0, 12).join('\n');
|
|
264
|
+
emit({ type: 'log', msg: `[stderr captured]\n${stderrSnippet}` });
|
|
265
|
+
} else {
|
|
266
|
+
emit({ type: 'warn', msg: 'Process exited but no stderr was captured — exit may have been instant.' });
|
|
267
|
+
}
|
|
248
268
|
|
|
249
269
|
// ── Tier 1: missing module → npm install + retry ─────────────────────
|
|
250
270
|
const missingMatch = stderrBuf.match(/Cannot find module ['"]([^'"]+)['"]/);
|