arisa 2.2.7 → 2.2.9

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.
Files changed (2) hide show
  1. package/bin/arisa.js +7 -11
  2. package/package.json +1 -1
package/bin/arisa.js CHANGED
@@ -580,14 +580,10 @@ function canUseSystemdSystem() {
580
580
  }
581
581
 
582
582
  function runArisaForeground() {
583
- // Detach child + exit parent immediately to free parent bun memory (~50-100MB).
584
- // On 1GB VPS, two bun processes trigger OOM.
585
- const child = spawn("su", ["-", "arisa", "-c", `${ARISA_BUN_ENV} && export ARISA_PROJECT_DIR=${SHARED_ARISA_ROOT} && exec /home/arisa/.bun/bin/bun ${sharedDaemonEntry}`], {
583
+ const result = spawnSync("su", ["-", "arisa", "-c", `${ARISA_BUN_ENV} && export ARISA_PROJECT_DIR=${SHARED_ARISA_ROOT} && exec /home/arisa/.bun/bin/bun ${sharedDaemonEntry}`], {
586
584
  stdio: "inherit",
587
- detached: true,
588
585
  });
589
- child.unref();
590
- process.exit(0);
586
+ return result.status ?? 1;
591
587
  }
592
588
 
593
589
  // ── Root guard ──────────────────────────────────────────────────────
@@ -603,7 +599,7 @@ if (isRoot()) {
603
599
  }
604
600
 
605
601
  process.stdout.write("\nStarting interactive setup as user arisa...\n\n");
606
- runArisaForeground(); // exits parent process internally
602
+ process.exit(runArisaForeground());
607
603
  }
608
604
 
609
605
  // Already provisioned — route commands
@@ -622,7 +618,7 @@ if (isRoot()) {
622
618
  if (isDefaultInvocation) {
623
619
  if (!isArisaConfigured()) {
624
620
  process.stdout.write("Arisa is not configured yet. Starting interactive setup...\n\n");
625
- runArisaForeground(); // exits parent process internally
621
+ process.exit(runArisaForeground());
626
622
  }
627
623
  if (hasSystemd) {
628
624
  if (isSystemdActive()) {
@@ -632,13 +628,13 @@ if (isRoot()) {
632
628
  }
633
629
  }
634
630
  // No systemd → foreground
635
- runArisaForeground(); // exits parent process internally
631
+ process.exit(runArisaForeground());
636
632
  }
637
633
 
638
634
  switch (command) {
639
635
  case "start":
640
636
  if (hasSystemd) process.exit(startSystemdSystem());
641
- runArisaForeground(); // exits parent process internally
637
+ process.exit(runArisaForeground());
642
638
  break;
643
639
  case "stop":
644
640
  if (hasSystemd) process.exit(stopSystemdSystem());
@@ -657,7 +653,7 @@ if (isRoot()) {
657
653
  break;
658
654
  case "daemon":
659
655
  case "run":
660
- runArisaForeground(); // exits parent process internally
656
+ process.exit(runArisaForeground());
661
657
  default:
662
658
  process.stderr.write(`Unknown command: ${command}\n\n`);
663
659
  printHelp();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "arisa",
3
- "version": "2.2.7",
3
+ "version": "2.2.9",
4
4
  "description": "Arisa - dynamic agent runtime with daemon/core architecture that evolves through user interaction",
5
5
  "preferGlobal": true,
6
6
  "bin": {