arisa 2.3.20 → 2.3.21

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 +11 -7
  2. package/package.json +1 -1
package/bin/arisa.js CHANGED
@@ -3,7 +3,6 @@
3
3
  const { spawn, spawnSync } = require("node:child_process");
4
4
  const {
5
5
  closeSync,
6
- cpSync,
7
6
  existsSync,
8
7
  mkdirSync,
9
8
  openSync,
@@ -12,7 +11,7 @@ const {
12
11
  writeFileSync,
13
12
  } = require("node:fs");
14
13
  const { homedir, platform } = require("node:os");
15
- const { join, resolve } = require("node:path");
14
+ const { dirname, join, resolve } = require("node:path");
16
15
 
17
16
  const pkgRoot = resolve(__dirname, "..");
18
17
  const daemonEntry = join(pkgRoot, "src", "daemon", "index.ts");
@@ -474,10 +473,8 @@ if (isRoot() && arisaUserExists()) {
474
473
 
475
474
  // One-time migration from root's data dir
476
475
  if (existsSync(rootDataDir) && !existsSync(arisaDataDir)) {
477
- try {
478
- cpSync(rootDataDir, arisaDataDir, { recursive: true });
479
- spawnSync("chown", ["-R", "arisa:arisa", arisaDataDir], { stdio: "ignore" });
480
- } catch {}
476
+ spawnSync("cp", ["-r", rootDataDir, arisaDataDir], { stdio: "ignore" });
477
+ spawnSync("chown", ["-R", "arisa:arisa", arisaDataDir], { stdio: "ignore" });
481
478
  }
482
479
 
483
480
  // Ensure arisa data dir exists with correct ownership
@@ -486,7 +483,14 @@ if (isRoot() && arisaUserExists()) {
486
483
  spawnSync("chown", ["-R", "arisa:arisa", arisaDataDir], { stdio: "ignore" });
487
484
  }
488
485
 
489
- // Ensure arisa can read project files (Core runs as arisa with bun --watch)
486
+ // Ensure arisa can traverse to and read project files.
487
+ // When installed globally under /root/.bun/..., parent dirs are mode 700.
488
+ // Add o+x (traverse only, not read) on each ancestor so arisa can reach pkgRoot.
489
+ let traverseDir = pkgRoot;
490
+ while (traverseDir !== "/") {
491
+ spawnSync("chmod", ["o+x", traverseDir], { stdio: "ignore" });
492
+ traverseDir = dirname(traverseDir);
493
+ }
490
494
  spawnSync("chmod", ["-R", "o+rX", pkgRoot], { stdio: "ignore" });
491
495
 
492
496
  // All processes use arisa's data dir (inherited by Daemon → Core)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "arisa",
3
- "version": "2.3.20",
3
+ "version": "2.3.21",
4
4
  "description": "Arisa - dynamic agent runtime with daemon/core architecture that evolves through user interaction",
5
5
  "keywords": [
6
6
  "tinyclaw",