arona-agent 1.1.5 → 1.1.7
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 +4 -4
- package/README_en.md +4 -4
- package/bin/arona.mjs +3 -3
- package/package.json +4 -2
- package/src/config.ts +6 -6
- package/src/gui/index.ts +1 -1
- package/src/gui/setup_backend.ts +2 -2
- package/src/index.ts +15 -9
package/README.md
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
|
|
7
7
|
> 谁不想在电脑上养一只 ~~香香软软~~ 可可爱爱的阿洛娜呢?
|
|
8
8
|
|
|
9
|
-

|
|
10
10
|
|
|
11
11
|
基于 [Pi SDK](https://www.npmjs.com/package/@earendil-works/pi-coding-agent) 构建的终端对话式 AI Agent,集成 Computer Use、TTS / STT、桌面宠物与持久记忆。
|
|
12
12
|
|
|
@@ -38,8 +38,8 @@ npm u -g arona-agent
|
|
|
38
38
|
# 禁用TTS+STT并启动
|
|
39
39
|
arona --no-voice
|
|
40
40
|
|
|
41
|
-
#
|
|
42
|
-
arona --
|
|
41
|
+
# 以命令行启动
|
|
42
|
+
arona --cli
|
|
43
43
|
|
|
44
44
|
# 补全/重新克隆某角色音色
|
|
45
45
|
arona voice add [<角色名>] # 不带角色名则进入 TUI 选择未补全的角色
|
|
@@ -96,7 +96,7 @@ arona doctor
|
|
|
96
96
|
| `tavilyApiKey` | Tavily API Key | — |
|
|
97
97
|
| `pythonPath` | Python 路径 | `python3` |
|
|
98
98
|
| `autoLoadSkills` | 启动时自动从 `~/.agents` 补全缺失的Skill | `true` |
|
|
99
|
-
| `
|
|
99
|
+
| `CLIEnabled` | 裸 `arona` 启动时进入命令行 | `false` |
|
|
100
100
|
| `mcpServers` | MCP 服务器 JSON | `{}` |
|
|
101
101
|
|
|
102
102
|
模型名前缀自动检测:若 `model` 不含 `/`,按模型名前缀或 `apiBaseUrl` 域名自动补 `provider/`。
|
package/README_en.md
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|

|
|
6
6
|
|
|
7
|
-

|
|
8
8
|
|
|
9
9
|
A terminal-based conversational AI Agent built on the [Pi SDK](https://www.npmjs.com/package/@earendil-works/pi-coding-agent), featuring Computer Use, TTS / STT, desktop pets and persistent memory.
|
|
10
10
|
|
|
@@ -36,8 +36,8 @@ npm u -g arona-agent
|
|
|
36
36
|
# Launch with TTS/STT disabled
|
|
37
37
|
arona --no-voice
|
|
38
38
|
|
|
39
|
-
#
|
|
40
|
-
arona --
|
|
39
|
+
# Use --cli for the command line
|
|
40
|
+
arona --cli
|
|
41
41
|
|
|
42
42
|
# Clone/re-clone a character's voice
|
|
43
43
|
arona voice add [<character-name>] # omit the name to enter the TUI for missing voices
|
|
@@ -93,7 +93,7 @@ All configuration lives in the JSON file `~/.arona/settings.json`, mostly genera
|
|
|
93
93
|
| `tavilyApiKey` | Tavily API key | — |
|
|
94
94
|
| `pythonPath` | Python path | `python3` |
|
|
95
95
|
| `autoLoadSkills` | Automatically load missing Skills from `~/.agents` on startup | `true` |
|
|
96
|
-
| `
|
|
96
|
+
| `CLIEnabled` | Launch the CLI when running bare `arona` | `false` |
|
|
97
97
|
| `mcpServers` | MCP server JSON | `{}` |
|
|
98
98
|
|
|
99
99
|
Model prefix auto-detection: if `model` contains no `/`, a `provider/` prefix is added automatically based on the model name prefix or the `apiBaseUrl` domain.
|
package/bin/arona.mjs
CHANGED
|
@@ -26,9 +26,9 @@ if (bundledEntries.length) {
|
|
|
26
26
|
const isSetup = args[0] === 'setup';
|
|
27
27
|
const isVoice = args[0] === 'voice';
|
|
28
28
|
const isDoctor = args[0] === 'doctor';
|
|
29
|
-
|
|
30
|
-
const target = isSetup ? 'src/setup.ts' : isVoice ? 'src/voice_cli.ts' : isDoctor ? 'src/doctor.ts' :
|
|
31
|
-
const passArgs = (isSetup || isVoice || isDoctor) ? args.slice(1) :
|
|
29
|
+
// 裸 `arona` 默认进 GUI:src/index.ts 依据 --cli / settings.json CLIEnabled 自行分流
|
|
30
|
+
const target = isSetup ? 'src/setup.ts' : isVoice ? 'src/voice_cli.ts' : isDoctor ? 'src/doctor.ts' : 'src/index.ts';
|
|
31
|
+
const passArgs = (isSetup || isVoice || isDoctor) ? args.slice(1) : args;
|
|
32
32
|
|
|
33
33
|
// tsx 以库形式随包内置:直接用当前 node 运行其 CLI,避免依赖 node_modules/.bin
|
|
34
34
|
// (Windows 包里没有 .cmd shim,且跨平台无需 PATH 里能找到 node)。
|
package/package.json
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "arona-agent",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.7",
|
|
4
4
|
"description": "Terminal AI Agent with desktop pet Arona — eye-tracking pupils, voice cloning, Computer Use, TTS/STT, MCP.",
|
|
5
|
+
"keywords": ["voice-clone", "Blue Archive", "blue-archive", "ai-agent", "arona", "computer-use", "desktop-pet"],
|
|
5
6
|
"license": "MIT",
|
|
6
7
|
"type": "module",
|
|
7
8
|
"bin": {
|
|
@@ -15,7 +16,8 @@
|
|
|
15
16
|
"assets/",
|
|
16
17
|
"bin/",
|
|
17
18
|
"requirements.txt",
|
|
18
|
-
"README_en.md"
|
|
19
|
+
"README_en.md",
|
|
20
|
+
"README.md"
|
|
19
21
|
],
|
|
20
22
|
"scripts": {
|
|
21
23
|
"start": "tsx src/index.ts",
|
package/src/config.ts
CHANGED
|
@@ -98,8 +98,8 @@ interface AronaConfig {
|
|
|
98
98
|
mcpServers: Record<string, McpServerConfig>;
|
|
99
99
|
// 启动时是否从 ~/.agents/skills 补全缺失 Skill(默认 true)
|
|
100
100
|
autoLoadSkills: boolean;
|
|
101
|
-
//
|
|
102
|
-
|
|
101
|
+
// CLI 模式开关(settings.json CLIEnabled === true;默认启动 GUI)
|
|
102
|
+
cliEnabled: boolean;
|
|
103
103
|
}
|
|
104
104
|
|
|
105
105
|
interface Settings {
|
|
@@ -138,8 +138,8 @@ interface Settings {
|
|
|
138
138
|
mcpServers?: Record<string, McpServerConfig>;
|
|
139
139
|
// 启动时是否从 ~/.agents/skills 补全缺失 Skill(默认 true)
|
|
140
140
|
autoLoadSkills?: boolean;
|
|
141
|
-
//
|
|
142
|
-
|
|
141
|
+
// CLI 模式开关(用户手写字段;true 时裸 `arona` 启动进命令行,默认 GUI)
|
|
142
|
+
CLIEnabled?: boolean;
|
|
143
143
|
}
|
|
144
144
|
|
|
145
145
|
/**
|
|
@@ -299,8 +299,8 @@ function loadConfig(): AronaConfig {
|
|
|
299
299
|
// 显式 false 才关闭(不填/true 保持原有补全行为)
|
|
300
300
|
autoLoadSkills: s.autoLoadSkills !== false,
|
|
301
301
|
|
|
302
|
-
//
|
|
303
|
-
|
|
302
|
+
// CLI 模式:settings.json CLIEnabled === true 时裸 `arona` 启动进命令行(默认 GUI)
|
|
303
|
+
cliEnabled: s.CLIEnabled === true,
|
|
304
304
|
};
|
|
305
305
|
}
|
|
306
306
|
|
package/src/gui/index.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// GUI 模式入口:Node 后端父进程 + Electron 窗口子进程(###GUI### 行协议,与桌宠桥同模式)。
|
|
2
|
-
//
|
|
2
|
+
// 启动条件:裸 `arona`(默认入口,src/index.ts 分流到本文件;--cli / settings.json CLIEnabled: true 时走命令行)。
|
|
3
3
|
import { spawn, type ChildProcessWithoutNullStreams } from "child_process";
|
|
4
4
|
import { join } from "path";
|
|
5
5
|
import chalk from "chalk";
|
package/src/gui/setup_backend.ts
CHANGED
|
@@ -259,8 +259,8 @@ export async function runGuiSetup(form: GuiSetupForm, emit: Emit): Promise<boole
|
|
|
259
259
|
mcpServers: existing.mcpServers || {},
|
|
260
260
|
autoLoadSkills: existing.autoLoadSkills ?? true,
|
|
261
261
|
};
|
|
262
|
-
// 保留用户手写
|
|
263
|
-
if (typeof existing.
|
|
262
|
+
// 保留用户手写 CLIEnabled
|
|
263
|
+
if (typeof existing.CLIEnabled === "boolean") settings.CLIEnabled = existing.CLIEnabled;
|
|
264
264
|
|
|
265
265
|
writeFileSync(SETTINGS_FILE, JSON.stringify(settings, null, 2) + "\n");
|
|
266
266
|
emit({ type: "setup_log", step: "save", line: t(`✓ 配置已保存到 ${SETTINGS_FILE}`, `✓ Configuration saved to ${SETTINGS_FILE}`) });
|
package/src/index.ts
CHANGED
|
@@ -19,8 +19,9 @@ function runSetupWizard(): Promise<number> {
|
|
|
19
19
|
const tsxBin = process.platform === "win32"
|
|
20
20
|
? join(PROJECT_ROOT, "node_modules", ".bin", "tsx.cmd")
|
|
21
21
|
: join(PROJECT_ROOT, "node_modules", ".bin", "tsx");
|
|
22
|
+
const wizardArgs = process.argv.slice(2).filter((a) => a !== "--cli");
|
|
22
23
|
return new Promise((resolve) => {
|
|
23
|
-
const child = spawn(tsxBin, [join(PROJECT_ROOT, "src", "setup.ts"), ...
|
|
24
|
+
const child = spawn(tsxBin, [join(PROJECT_ROOT, "src", "setup.ts"), ...wizardArgs], {
|
|
24
25
|
cwd: process.cwd(),
|
|
25
26
|
stdio: "inherit",
|
|
26
27
|
shell: process.platform === "win32",
|
|
@@ -30,7 +31,8 @@ function runSetupWizard(): Promise<number> {
|
|
|
30
31
|
});
|
|
31
32
|
}
|
|
32
33
|
|
|
33
|
-
|
|
34
|
+
/** 命令行模式(默认 GUI;--cli / settings.json CLIEnabled: true / --resume= 时进入本函数)。 */
|
|
35
|
+
async function runCli() {
|
|
34
36
|
// 首次运行引导:无 settings.json 时直接进入 setup 向导,配置完成后继续 REPL
|
|
35
37
|
if (!settingsExist()) {
|
|
36
38
|
console.log(chalk.yellow(t("未找到配置文件,正在进入初始化向导…", "Config file not found. Starting the setup wizard…")));
|
|
@@ -48,13 +50,6 @@ async function main() {
|
|
|
48
50
|
refreshLanguage();
|
|
49
51
|
}
|
|
50
52
|
|
|
51
|
-
// GUI 模式(settings.json GUIEnabled: true;--gui 由 bin/arona.mjs 直接路由到 src/gui/index.ts)
|
|
52
|
-
if (config.guiEnabled) {
|
|
53
|
-
const { runGui } = await import("./gui/index.ts");
|
|
54
|
-
await runGui();
|
|
55
|
-
return;
|
|
56
|
-
}
|
|
57
|
-
|
|
58
53
|
if (!config.apiKey) {
|
|
59
54
|
console.log(chalk.yellow(t("警告:未找到 LLM API Key,请运行 arona setup 配置。", "Warning: LLM API Key not found. Run `arona setup` to configure.")));
|
|
60
55
|
}
|
|
@@ -118,6 +113,17 @@ async function main() {
|
|
|
118
113
|
await repl.start();
|
|
119
114
|
}
|
|
120
115
|
|
|
116
|
+
async function main() {
|
|
117
|
+
// 默认启动 GUI;--cli / settings.json CLIEnabled: true 时进入命令行。
|
|
118
|
+
// --resume= 恢复会话历史仅在终端 REPL 里展示,也一并路由到 CLI 以保持原行为。
|
|
119
|
+
if (process.argv.includes("--cli") || config.cliEnabled || process.argv.some((a) => a.startsWith("--resume="))) {
|
|
120
|
+
await runCli();
|
|
121
|
+
return;
|
|
122
|
+
}
|
|
123
|
+
const { runGui } = await import("./gui/index.ts");
|
|
124
|
+
await runGui();
|
|
125
|
+
}
|
|
126
|
+
|
|
121
127
|
main().catch((err) => {
|
|
122
128
|
console.error(chalk.red(t("致命错误:", "Fatal error: ") + (err instanceof Error ? err.message : err)));
|
|
123
129
|
process.exit(1);
|