arisa 2.1.3 → 2.1.4

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 +20 -12
  2. package/package.json +1 -1
package/bin/arisa.js CHANGED
@@ -430,10 +430,10 @@ function step(ok, msg) {
430
430
  process.stdout.write(` ${ok ? "\u2713" : "\u2717"} ${msg}\n`);
431
431
  }
432
432
 
433
- function runAs(cmd) {
433
+ function runAsInherit(cmd) {
434
434
  return spawnSync("su", ["-", "arisa", "-c", cmd], {
435
- stdio: "pipe",
436
- timeout: 120_000,
435
+ stdio: "inherit",
436
+ timeout: 180_000,
437
437
  });
438
438
  }
439
439
 
@@ -456,10 +456,11 @@ function provisionArisaUser() {
456
456
  spawnSync("usermod", ["-aG", group, "arisa"], { stdio: "ignore" });
457
457
  }
458
458
 
459
- // 2. Install bun
460
- const bunInstall = runAs("curl -fsSL https://bun.sh/install | bash");
459
+ // 2. Install bun (downloads ~30 MB, may take a minute)
460
+ process.stdout.write(" Installing bun (this may take a minute)...\n");
461
+ const bunInstall = runAsInherit("curl -fsSL https://bun.sh/install | bash");
461
462
  if (bunInstall.status !== 0) {
462
- step(false, `Failed to install bun: ${(bunInstall.stderr || "").toString().trim()}`);
463
+ step(false, "Failed to install bun");
463
464
  process.exit(1);
464
465
  }
465
466
  step(true, "Bun installed for arisa");
@@ -470,9 +471,10 @@ function provisionArisaUser() {
470
471
  spawnSync("chown", ["-R", "arisa:arisa", dest], { stdio: "pipe" });
471
472
 
472
473
  // Install deps + global
473
- const install = runAs("cd ~/arisa && ~/.bun/bin/bun install && ~/.bun/bin/bun add -g .");
474
+ process.stdout.write(" Installing dependencies...\n");
475
+ const install = runAsInherit("cd ~/arisa && ~/.bun/bin/bun install && ~/.bun/bin/bun add -g .");
474
476
  if (install.status !== 0) {
475
- step(false, `Failed to install: ${(install.stderr || "").toString().trim()}`);
477
+ step(false, "Failed to install dependencies");
476
478
  process.exit(1);
477
479
  }
478
480
  step(true, "Arisa installed for arisa");
@@ -562,17 +564,23 @@ if (isRoot()) {
562
564
  provisionArisaUser();
563
565
  writeSystemdSystemUnit();
564
566
  spawnSync("systemctl", ["daemon-reload"], { stdio: "inherit" });
565
- spawnSync("systemctl", ["enable", "--now", "arisa"], { stdio: "inherit" });
566
- step(true, "Systemd service enabled");
567
+ spawnSync("systemctl", ["enable", "arisa"], { stdio: "inherit" });
568
+ step(true, "Systemd service enabled (auto-starts on reboot)");
569
+
570
+ process.stdout.write("\nStarting interactive setup as user arisa...\n\n");
571
+ const su = spawnSync("su", ["-", "arisa", "-c", "arisa"], {
572
+ stdio: "inherit",
573
+ });
567
574
 
568
575
  process.stdout.write(`
569
- Arisa is now running as a service.
576
+ Arisa management:
577
+ Start: systemctl start arisa
570
578
  Status: systemctl status arisa
571
579
  Logs: journalctl -u arisa -f
572
580
  Restart: systemctl restart arisa
573
581
  Stop: systemctl stop arisa
574
582
  `);
575
- process.exit(0);
583
+ process.exit(su.status ?? 0);
576
584
  }
577
585
 
578
586
  // Already provisioned — route commands to system-level systemd
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "arisa",
3
- "version": "2.1.3",
3
+ "version": "2.1.4",
4
4
  "description": "Arisa - dynamic agent runtime with daemon/core architecture that evolves through user interaction",
5
5
  "preferGlobal": true,
6
6
  "bin": {