create-walle 0.6.1 → 0.6.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/bin/create-walle.js
CHANGED
|
@@ -287,11 +287,14 @@ function stopQuiet(dir, port) {
|
|
|
287
287
|
if (process.platform === 'darwin' && fs.existsSync(plist)) {
|
|
288
288
|
try { execFileSync('launchctl', ['unload', plist], { stdio: 'ignore' }); } catch {}
|
|
289
289
|
}
|
|
290
|
-
// Kill
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
290
|
+
// Kill CTM and Wall-E processes
|
|
291
|
+
const wallePort = String(parseInt(port) + 1);
|
|
292
|
+
for (const p of [port, wallePort]) {
|
|
293
|
+
try {
|
|
294
|
+
const pids = execFileSync('lsof', ['-ti', ':' + p], { encoding: 'utf8', timeout: 3000 }).trim().split('\n').filter(Boolean);
|
|
295
|
+
for (const pid of pids) { try { process.kill(parseInt(pid), 'SIGTERM'); } catch {} }
|
|
296
|
+
} catch {}
|
|
297
|
+
}
|
|
295
298
|
// Brief wait for port to free
|
|
296
299
|
const deadline = Date.now() + 5000;
|
|
297
300
|
while (Date.now() < deadline) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "create-walle",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.3",
|
|
4
4
|
"description": "Wall-E — your personal digital twin. AI agent that learns from Slack, email & calendar. Includes dashboard, chat, and 7 bundled skills.",
|
|
5
5
|
"bin": {
|
|
6
6
|
"create-walle": "bin/create-walle.js"
|
|
@@ -311,6 +311,8 @@ function handleApi(req, res, url) {
|
|
|
311
311
|
lines.push('', `WALLE_MODEL=${model}`);
|
|
312
312
|
fs.writeFileSync(envPath, lines.join('\n') + '\n', { mode: 0o600 });
|
|
313
313
|
process.env.WALLE_MODEL = model;
|
|
314
|
+
// Restart Wall-E so it picks up the new model
|
|
315
|
+
_restartWalleQuiet();
|
|
314
316
|
} catch {}
|
|
315
317
|
res.end(JSON.stringify({ ok: true, model }));
|
|
316
318
|
} else if (authError) {
|
|
@@ -501,8 +503,8 @@ function handleApi(req, res, url) {
|
|
|
501
503
|
}
|
|
502
504
|
fs.writeFileSync(envPath, lines.join('\n') + '\n', { mode: 0o600 });
|
|
503
505
|
setup.clearSetupCache(); // so next / request goes to dashboard
|
|
504
|
-
// Restart Wall-E so it picks up
|
|
505
|
-
if (apiKey || gw) {
|
|
506
|
+
// Restart Wall-E so it picks up new env vars (key, gateway, or model change)
|
|
507
|
+
if (apiKey || gw || walleModel) {
|
|
506
508
|
_restartWalleQuiet();
|
|
507
509
|
}
|
|
508
510
|
res.writeHead(200, { 'Content-Type': 'application/json' });
|