arisa 2.3.3 → 2.3.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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "arisa",
3
- "version": "2.3.3",
3
+ "version": "2.3.4",
4
4
  "description": "Arisa - dynamic agent runtime with daemon/core architecture that evolves through user interaction",
5
5
  "preferGlobal": true,
6
6
  "bin": {
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * @module shared/ai-cli
3
3
  * @role Resolve agent CLI binaries and execute them via Bun runtime.
4
- * When running as root, wraps calls with su - arisa to satisfy
4
+ * When running as root, wraps calls with su arisa to satisfy
5
5
  * Claude CLI's non-root requirement.
6
6
  */
7
7
 
@@ -12,7 +12,8 @@ export type AgentCliName = "claude" | "codex";
12
12
 
13
13
  const ARISA_USER_BUN = "/home/arisa/.bun/bin";
14
14
  const ARISA_INK_SHIM = "/home/arisa/.arisa-ink-shim.js";
15
- const ARISA_BUN_ENV = `export BUN_INSTALL=/home/arisa/.bun && export PATH=${ARISA_USER_BUN}:$PATH`;
15
+ const ARISA_HOME = "/home/arisa";
16
+ const ARISA_BUN_ENV = `export HOME=${ARISA_HOME} && export BUN_INSTALL=${ARISA_HOME}/.bun && export PATH=${ARISA_USER_BUN}:$PATH`;
16
17
 
17
18
  export function isRunningAsRoot(): boolean {
18
19
  return process.getuid?.() === 0;
@@ -100,7 +101,8 @@ export function buildBunWrappedAgentCliCommand(cli: AgentCliName, args: string[]
100
101
  const cliPath = resolveAgentCliPath(cli) || join(ARISA_USER_BUN, cli);
101
102
  const shimPath = existsSync(ARISA_INK_SHIM) ? ARISA_INK_SHIM : INK_SHIM;
102
103
  const inner = ["bun", "--preload", shimPath, cliPath, ...args].map(shellEscape).join(" ");
103
- return ["su", "-", "arisa", "-c", `${ARISA_BUN_ENV} && ${buildEnvExports()}${inner}`];
104
+ // su without "-" preserves parent env (tokens, keys); explicit HOME/PATH for arisa
105
+ return ["su", "arisa", "-s", "/bin/bash", "-c", `${ARISA_BUN_ENV} && ${buildEnvExports()}${inner}`];
104
106
  }
105
107
 
106
108
  const cliPath = resolveAgentCliPath(cli);