arisa 2.0.2 ā 2.0.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/README.md +8 -10
- package/bin/arisa.js +1 -1
- package/package.json +2 -2
- package/src/core/index.ts +3 -5
- package/src/core/onboarding.ts +4 -4
- package/src/daemon/setup.ts +12 -2
package/README.md
CHANGED
|
@@ -10,21 +10,19 @@ Arisa is intentionally dynamic: the project grows as the user builds a relations
|
|
|
10
10
|
|
|
11
11
|
Arisa can execute actions with operational control over the system where it runs. Before deploying it, make sure you understand and accept the associated security risks. It is strongly recommended to run Arisa in an isolated environment (for example, a Docker container or a dedicated VPS) that does not store sensitive information or critical assets.
|
|
12
12
|
|
|
13
|
-
##
|
|
14
|
-
|
|
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:
|
|
13
|
+
## Requirements and Installation
|
|
18
14
|
|
|
19
15
|
```bash
|
|
20
|
-
|
|
21
|
-
export PATH="$BUN_INSTALL/bin:$PATH"
|
|
22
|
-
```
|
|
16
|
+
curl -fsSL https://bun.sh/install | bash # Install Bun https://bun.sh
|
|
23
17
|
|
|
24
|
-
|
|
25
|
-
bun
|
|
18
|
+
bun add -g @anthropic-ai/claude-code # Install Claude CLI (both or one is required)
|
|
19
|
+
bun add -g @openai/codex # Install Codex CLI (both or one is required)
|
|
20
|
+
|
|
21
|
+
bun add -g arisa # Install Arisa CLI
|
|
26
22
|
```
|
|
27
23
|
|
|
24
|
+
## Commands
|
|
25
|
+
|
|
28
26
|
```bash
|
|
29
27
|
arisa # Foreground daemon mode (Ctrl+C to stop)
|
|
30
28
|
arisa start # Start as service (enables autostart with systemd --user)
|
package/bin/arisa.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "arisa",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.4",
|
|
4
4
|
"description": "Arisa - dynamic agent runtime with daemon/core architecture that evolves through user interaction",
|
|
5
5
|
"preferGlobal": true,
|
|
6
6
|
"bin": {
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
"bun": ">=1.0.0"
|
|
21
21
|
},
|
|
22
22
|
"scripts": {
|
|
23
|
-
"arisa": "
|
|
23
|
+
"arisa": "bun ./bin/arisa.js",
|
|
24
24
|
"daemon": "bun src/daemon/index.ts",
|
|
25
25
|
"dev": "bun --watch src/core/index.ts",
|
|
26
26
|
"start": "bun src/daemon/index.ts",
|
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>
|
|
168
|
-
: "<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");
|
|
@@ -178,9 +178,7 @@ ${messageText}`;
|
|
|
178
178
|
if (msg.command === "/claude") {
|
|
179
179
|
const deps = checkDeps();
|
|
180
180
|
if (!deps.claude) {
|
|
181
|
-
const hint =
|
|
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>";
|
|
181
|
+
const hint = "<code>bun add -g @anthropic-ai/claude-code</code>";
|
|
184
182
|
return Response.json({ text: `Claude CLI is not installed.\n${hint}` } as CoreResponse);
|
|
185
183
|
}
|
|
186
184
|
backendState.set(msg.chatId, "claude");
|
package/src/core/onboarding.ts
CHANGED
|
@@ -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>
|
|
89
|
+
lines.push("Claude: <code>bun add -g @anthropic-ai/claude-code</code>");
|
|
90
90
|
}
|
|
91
|
-
lines.push("Codex: <code>
|
|
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>
|
|
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>
|
|
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
|
}
|
package/src/daemon/setup.ts
CHANGED
|
@@ -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`);
|