agentgui 1.0.197 → 1.0.198
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/server.js +5 -1
package/package.json
CHANGED
package/server.js
CHANGED
|
@@ -573,7 +573,11 @@ const server = http.createServer(async (req, res) => {
|
|
|
573
573
|
if (!pkg.scripts || !pkg.scripts[script]) { sendJSON(req, res, 400, { error: `Script "${script}" not found` }); return; }
|
|
574
574
|
} catch { sendJSON(req, res, 400, { error: 'No package.json' }); return; }
|
|
575
575
|
|
|
576
|
-
const
|
|
576
|
+
const childEnv = { ...process.env, FORCE_COLOR: '1' };
|
|
577
|
+
delete childEnv.PORT;
|
|
578
|
+
delete childEnv.BASE_URL;
|
|
579
|
+
delete childEnv.HOT_RELOAD;
|
|
580
|
+
const child = spawn('npm', ['run', script], { cwd: wd, stdio: ['ignore', 'pipe', 'pipe'], detached: true, env: childEnv });
|
|
577
581
|
activeScripts.set(conversationId, { process: child, script, startTime: Date.now() });
|
|
578
582
|
broadcastSync({ type: 'script_started', conversationId, script, timestamp: Date.now() });
|
|
579
583
|
|