arisa 2.3.54 → 2.3.55

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/arisa.js CHANGED
@@ -501,7 +501,7 @@ if (isRoot() && arisaUserExists()) {
501
501
 
502
502
  // Pre-flight: install missing CLIs while still root (before su arisa).
503
503
  // arisa user has read+execute but NOT write access to root's bun dir.
504
- // Interactive when TTY asks which CLIs to install.
504
+ // Uses @inquirer/prompts checkbox when available (same UI as setup.ts).
505
505
  async function preflightInstallClis() {
506
506
  const clis = {
507
507
  claude: "@anthropic-ai/claude-code",
@@ -529,20 +529,30 @@ async function preflightInstallClis() {
529
529
  let toInstall = missing;
530
530
 
531
531
  if (process.stdin.isTTY) {
532
- const rl = require("node:readline");
533
- const ask = (q) =>
534
- new Promise((resolve) => {
535
- const iface = rl.createInterface({ input: process.stdin, output: process.stdout });
536
- iface.question(q, (a) => { iface.close(); resolve(a.trim()); });
532
+ // Try @inquirer/prompts for the same checkbox UI as setup.ts
533
+ let inq = null;
534
+ try { inq = await import("@inquirer/prompts"); } catch {}
535
+
536
+ if (inq) {
537
+ const selected = await inq.checkbox({
538
+ message: "Install missing CLIs? (space to select, enter to confirm)",
539
+ choices: missing.map((cli) => ({
540
+ name: `${cli.name === "claude" ? "Claude" : "Codex"} (${cli.pkg})`,
541
+ value: cli,
542
+ checked: true,
543
+ })),
537
544
  });
538
-
539
- toInstall = [];
540
- for (const cli of missing) {
541
- const label = cli.name === "claude" ? "Claude" : "Codex";
542
- const answer = await ask(`Install ${label} (${cli.pkg})? (Y/n): `);
543
- if (answer.toLowerCase() !== "n") {
544
- toInstall.push(cli);
545
- }
545
+ toInstall = selected;
546
+ } else {
547
+ // Fallback: simple Y/n
548
+ const rl = require("node:readline");
549
+ const ask = (q) =>
550
+ new Promise((resolve) => {
551
+ const iface = rl.createInterface({ input: process.stdin, output: process.stdout });
552
+ iface.question(q, (a) => { iface.close(); resolve(a.trim()); });
553
+ });
554
+ const answer = await ask("\nInstall missing CLIs? (Y/n): ");
555
+ if (answer.toLowerCase() === "n") toInstall = [];
546
556
  }
547
557
  }
548
558
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "arisa",
3
- "version": "2.3.54",
3
+ "version": "2.3.55",
4
4
  "description": "Arisa - dynamic agent runtime with daemon/core architecture that evolves through user interaction",
5
5
  "keywords": [
6
6
  "tinyclaw",
@@ -140,20 +140,23 @@ export async function runSetup(): Promise<boolean> {
140
140
  }
141
141
 
142
142
  // ─── Phase 2: CLI Installation ──────────────────────────────────
143
+ // When running as root, bin/arisa.js pre-flight already handled CLI
144
+ // installation with the interactive checkbox before switching to arisa.
145
+ // This phase is only needed for direct (non-root) runs.
143
146
 
144
147
  if (process.stdin.isTTY) {
145
148
  let claudeInstalled = isAgentCliInstalled("claude");
146
149
  let codexInstalled = isAgentCliInstalled("codex");
147
150
 
148
- console.log("\nCLI Status:");
149
- console.log(` ${claudeInstalled ? "✓" : "✗"} Claude${claudeInstalled ? "" : " — not installed"}`);
150
- console.log(` ${codexInstalled ? "✓" : "✗"} Codex${codexInstalled ? "" : " — not installed"}`);
151
-
152
151
  const missing: AgentCliName[] = [];
153
152
  if (!claudeInstalled) missing.push("claude");
154
153
  if (!codexInstalled) missing.push("codex");
155
154
 
156
155
  if (missing.length > 0) {
156
+ console.log("\nCLI Status:");
157
+ console.log(` ${claudeInstalled ? "✓" : "✗"} Claude${claudeInstalled ? "" : " — not installed"}`);
158
+ console.log(` ${codexInstalled ? "✓" : "✗"} Codex${codexInstalled ? "" : " — not installed"}`);
159
+
157
160
  let toInstall: AgentCliName[] = [];
158
161
 
159
162
  if (inq) {