arisa 2.0.2 → 2.0.3

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/README.md CHANGED
@@ -13,16 +13,10 @@ Arisa can execute actions with operational control over the system where it runs
13
13
  ## Commands
14
14
 
15
15
  Requires [Bun](https://bun.sh).
16
- For Bun global installs, use your user environment (do not use `sudo`).
17
- If needed, configure Bun's user-local install directory:
16
+ For Bun global installs, use your user environment.
18
17
 
19
18
  ```bash
20
- export BUN_INSTALL="$HOME/.bun"
21
- export PATH="$BUN_INSTALL/bin:$PATH"
22
- ```
23
-
24
- ```bash
25
- bun install -g arisa # Global install from package registry (recommended)
19
+ bun add -g arisa # Global install from package registry (recommended)
26
20
  ```
27
21
 
28
22
  ```bash
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "arisa",
3
- "version": "2.0.2",
3
+ "version": "2.0.3",
4
4
  "description": "Arisa - dynamic agent runtime with daemon/core architecture that evolves through user interaction",
5
5
  "preferGlobal": true,
6
6
  "bin": {
package/src/core/index.ts CHANGED
@@ -164,8 +164,8 @@ ${messageText}`;
164
164
  const deps = checkDeps();
165
165
  if (!deps.codex) {
166
166
  const hint = deps.os === "macOS"
167
- ? "<code>npm install -g @openai/codex</code>"
168
- : "<code>npm install -g @openai/codex</code>";
167
+ ? "<code>bun add -g @openai/codex</code>"
168
+ : "<code>bun add -g @openai/codex</code>";
169
169
  return Response.json({ text: `Codex CLI is not installed.\n${hint}` } as CoreResponse);
170
170
  }
171
171
  backendState.set(msg.chatId, "codex");
@@ -179,8 +179,8 @@ ${messageText}`;
179
179
  const deps = checkDeps();
180
180
  if (!deps.claude) {
181
181
  const hint = deps.os === "macOS"
182
- ? "<code>brew install claude-code</code> o <code>npm install -g @anthropic-ai/claude-code</code>"
183
- : "<code>npm install -g @anthropic-ai/claude-code</code>";
182
+ ? "<code>brew install claude-code</code> or <code>bun add -g @anthropic-ai/claude-code</code>"
183
+ : "<code>bun add -g @anthropic-ai/claude-code</code>";
184
184
  return Response.json({ text: `Claude CLI is not installed.\n${hint}` } as CoreResponse);
185
185
  }
186
186
  backendState.set(msg.chatId, "claude");
@@ -86,9 +86,9 @@ export async function getOnboarding(chatId: string): Promise<{ message: string;
86
86
  if (deps.os === "macOS") {
87
87
  lines.push("Claude: <code>brew install claude-code</code>");
88
88
  } else {
89
- lines.push("Claude: <code>npm install -g @anthropic-ai/claude-code</code>");
89
+ lines.push("Claude: <code>bun add -g @anthropic-ai/claude-code</code>");
90
90
  }
91
- lines.push("Codex: <code>npm install -g @openai/codex</code>\n");
91
+ lines.push("Codex: <code>bun add -g @openai/codex</code>\n");
92
92
  lines.push("Install one and message me again.");
93
93
  return { message: lines.join("\n"), blocking: true };
94
94
  }
@@ -100,9 +100,9 @@ export async function getOnboarding(chatId: string): Promise<{ message: string;
100
100
  const lines = [`<b>Arisa</b> — using <b>${using}</b>`];
101
101
 
102
102
  if (!deps.claude) {
103
- lines.push("Claude CLI not installed. Add it with <code>npm install -g @anthropic-ai/claude-code</code>");
103
+ lines.push("Claude CLI not installed. Add it with <code>bun add -g @anthropic-ai/claude-code</code>");
104
104
  } else if (!deps.codex) {
105
- lines.push("Codex CLI not installed. Add it with <code>npm install -g @openai/codex</code>");
105
+ lines.push("Codex CLI not installed. Add it with <code>bun add -g @openai/codex</code>");
106
106
  } else {
107
107
  lines.push("Use /codex or /claude to switch backend.");
108
108
  }
@@ -12,8 +12,10 @@
12
12
  import { existsSync, readFileSync, writeFileSync, mkdirSync } from "fs";
13
13
  import { dirname, join } from "path";
14
14
  import { dataDir } from "../shared/paths";
15
+ import { secrets } from "../shared/secrets";
15
16
 
16
17
  const ENV_PATH = join(dataDir, ".env");
18
+ const SETUP_DONE_KEY = "ARISA_SETUP_COMPLETE";
17
19
 
18
20
  function loadExistingEnv(): Record<string, string> {
19
21
  if (!existsSync(ENV_PATH)) return {};
@@ -44,10 +46,13 @@ async function prompt(question: string): Promise<string> {
44
46
 
45
47
  export async function runSetup(): Promise<boolean> {
46
48
  const vars = loadExistingEnv();
49
+ const telegramSecret = await secrets.telegram();
50
+ const openaiSecret = await secrets.openai();
47
51
  let changed = false;
52
+ const setupDone = vars[SETUP_DONE_KEY] === "1" || process.env[SETUP_DONE_KEY] === "1";
48
53
 
49
54
  // Required: TELEGRAM_BOT_TOKEN
50
- if (!vars.TELEGRAM_BOT_TOKEN && !process.env.TELEGRAM_BOT_TOKEN) {
55
+ if (!vars.TELEGRAM_BOT_TOKEN && !process.env.TELEGRAM_BOT_TOKEN && !telegramSecret) {
51
56
  console.log("\nšŸ”§ Arisa Setup\n");
52
57
  console.log("Telegram Bot Token required. Get one from @BotFather on Telegram.");
53
58
  const token = await prompt("TELEGRAM_BOT_TOKEN: ");
@@ -60,7 +65,7 @@ export async function runSetup(): Promise<boolean> {
60
65
  }
61
66
 
62
67
  // Optional: OPENAI_API_KEY
63
- if (!vars.OPENAI_API_KEY && !process.env.OPENAI_API_KEY) {
68
+ if (!vars.OPENAI_API_KEY && !process.env.OPENAI_API_KEY && !openaiSecret && !setupDone) {
64
69
  if (!changed) console.log("\nšŸ”§ Arisa Setup\n");
65
70
  console.log("\nOpenAI API Key (optional — enables voice transcription + image analysis).");
66
71
  const key = await prompt("OPENAI_API_KEY (enter to skip): ");
@@ -70,6 +75,11 @@ export async function runSetup(): Promise<boolean> {
70
75
  }
71
76
  }
72
77
 
78
+ if (!setupDone) {
79
+ vars[SETUP_DONE_KEY] = "1";
80
+ changed = true;
81
+ }
82
+
73
83
  if (changed) {
74
84
  saveEnv(vars);
75
85
  console.log(`\nConfig saved to ${ENV_PATH}\n`);