Skip to content

Commit 25cd14a

Browse files
committed
Merge remote-tracking branch 'origin/feature/electron-client-0.6' into feature/electron-client-0.6
2 parents f532171 + 00739c5 commit 25cd14a

28 files changed

+233
-75
lines changed

.github/workflows/release-electron.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ jobs:
6868
echo "Release $TAG already exists"
6969
else
7070
gh release create "$TAG" \
71-
--title "Nuwax Agent (Electron) ${{ steps.version.outputs.version }}" \
71+
--title "NuwaxBot (Electron) ${{ steps.version.outputs.version }}" \
7272
--notes-file release_notes.txt \
7373
--repo "$GITHUB_REPOSITORY"
7474
echo "Created release $TAG"

crates/agent-electron-client/AGENTS.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -214,11 +214,11 @@ Each engine runs in an isolated environment:
214214
```typescript
215215
{
216216
// App-internal dependencies injected
217-
PATH: '~/.nuwax-agent/node_modules/.bin:~/.nuwax-agent/bin:$PATH',
218-
NODE_PATH: '~/.nuwax-agent/node_modules',
217+
PATH: '~/.nuwaxbot/node_modules/.bin:~/.nuwaxbot/bin:$PATH',
218+
NODE_PATH: '~/.nuwaxbot/node_modules',
219219

220220
// Isolated home
221-
HOME: '/tmp/nuwax-agent-run-xxx',
221+
HOME: '/tmp/nuwaxbot-run-xxx',
222222
XDG_CONFIG_HOME: '/tmp/.../.config',
223223
CLAUDE_CONFIG_DIR: '/tmp/.../.claude',
224224
NUWAXCODE_CONFIG_DIR: '/tmp/.../.nuwaxcode',
@@ -299,34 +299,34 @@ permissionManager.approveRequest(requestId, alwaysAllow);
299299
| **nuwax-file-server** | npm-local | File service |
300300
| **claude-code-acp-ts** | npm-local | Claude Code ACP implementation |
301301
| **nuwaxcode** | npm-local | Nuwaxcode ACP implementation |
302-
| **nuwax-mcp-stdio-proxy** | npm ^1.0.0 + npm-local | MCP 聚合代理;应用依赖自带,也可在 ~/.nuwax-agent/node_modules 安装覆盖 |
302+
| **nuwax-mcp-stdio-proxy** | npm ^1.0.0 + npm-local | MCP 聚合代理;应用依赖自带,也可在 ~/.nuwaxbot/node_modules 安装覆盖 |
303303

304304
> **Note**: Node.js is NOT a required dependency — Electron bundles its own Node runtime.
305305
306306
### Installation Locations
307307

308308
```
309-
~/.nuwax-agent/
309+
~/.nuwaxbot/
310310
├── engines/ # Agent engines
311311
├── workspaces/ # Session workspaces
312312
├── node_modules/ # Local npm packages
313313
│ ├── .bin/ # Executable symlinks (injected into PATH)
314314
│ └── mcp-servers # MCP servers (isolated)
315315
├── bin/ # App binaries
316316
├── logs/ # Application logs
317-
└── nuwax-agent.db # SQLite database
317+
└── nuwaxbot.db # SQLite database
318318
```
319319

320-
> **Important**: All data is stored under `~/.nuwax-agent/`. The Electron `app.getPath('userData')` path is NOT used.
320+
> **Important**: All data is stored under `~/.nuwaxbot/`. The Electron `app.getPath('userData')` path is NOT used.
321321
322322
### Environment Injection
323323

324324
All child processes (engines, file server, lanproxy, agent runner) receive injected environment variables:
325325

326326
```typescript
327327
{
328-
PATH: '~/.nuwax-agent/node_modules/.bin:~/.nuwax-agent/bin:resources/uv/bin:$PATH',
329-
NODE_PATH: '~/.nuwax-agent/node_modules',
328+
PATH: '~/.nuwaxbot/node_modules/.bin:~/.nuwaxbot/bin:resources/uv/bin:$PATH',
329+
NODE_PATH: '~/.nuwaxbot/node_modules',
330330
}
331331
```
332332

crates/agent-electron-client/CHANGELOG.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -267,13 +267,13 @@ Renderer Process (React)
267267

268268
#### Directory Structure
269269
```
270-
~/.nuwax-agent/
270+
~/.nuwaxbot/
271271
├── engines/ # Agent engines (claude-code, nuwaxcode)
272272
├── workspaces/ # Session workspaces
273273
├── node_modules/ # Local npm packages
274274
│ └── mcp-servers # MCP servers (isolated)
275275
├── logs/ # Application logs
276-
└── nuwax-agent.db # SQLite database
276+
└── nuwaxbot.db # SQLite database
277277
```
278278

279279
---

crates/agent-electron-client/docs/architecture/ISOLATION.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ status: design
7070
## 目录结构设计
7171

7272
```
73-
~/.nuwax-agent/
73+
~/.nuwaxbot/
7474
├── core/ # 应用核心区(只读)
7575
│ ├── engines/ # 引擎二进制(应用管理)
7676
│ └── config/ # 应用配置(用户通过 UI 修改)
@@ -99,8 +99,8 @@ status: design
9999
// 应用核心:严格隔离
100100
const coreEnv = {
101101
PATH: [
102-
'~/.nuwax-agent/core/engines',
103-
'~/.nuwax-agent/core/bin',
102+
'~/.nuwaxbot/core/engines',
103+
'~/.nuwaxbot/core/bin',
104104
].join(':'),
105105
// 最小化环境变量
106106
};
@@ -113,8 +113,8 @@ const coreEnv = {
113113
const agentEnv = {
114114
// 核心工具(来自应用)
115115
PATH: [
116-
'~/.nuwax-agent/core/engines',
117-
'~/.nuwax-agent/core/bin',
116+
'~/.nuwaxbot/core/engines',
117+
'~/.nuwaxbot/core/bin',
118118
],
119119

120120
// Agent 工作区(Agent 可添加)
@@ -174,7 +174,7 @@ interface AgentCapabilities {
174174
await capabilities.installNpmPackage('jq'); // 安装到工作区
175175

176176
// 结果
177-
~/.nuwax-agent/workspace/{session-id}/node_modules/.bin/jq
177+
~/.nuwaxbot/workspace/{session-id}/node_modules/.bin/jq
178178
// ✅ Agent 可以使用
179179
// ✅ 不污染用户环境
180180
// ✅ 会话结束可清理
@@ -190,7 +190,7 @@ await capabilities.installNpmPackage('jq'); // 安装到工作区
190190
await capabilities.installNpmPackage('@nuwax/nuwaxcode@latest');
191191

192192
// 结果
193-
~/.nuwax-agent/workspace/{session-id}/node_modules/.bin/nuwaxcode
193+
~/.nuwaxbot/workspace/{session-id}/node_modules/.bin/nuwaxcode
194194
// ✅ Agent 使用新版本
195195
// ✅ 应用核心引擎不受影响
196196
// ✅ 可以回滚
@@ -209,7 +209,7 @@ if (!await capabilities.hasCommand('cargo')) {
209209
}
210210

211211
// 结果
212-
~/.nuwax-agent/workspace/{session-id}/tools/bin/cargo
212+
~/.nuwaxbot/workspace/{session-id}/tools/bin/cargo
213213
// ✅ Agent 可以编译项目
214214
// ✅ 不影响用户系统
215215
```

crates/agent-electron-client/docs/architecture/OVERVIEW.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,7 @@ interface EvolutionControl {
221221
## 数据目录结构
222222

223223
```
224-
~/.nuwax-agent/
224+
~/.nuwaxbot/
225225
├── soul/ # Agent 自我认知
226226
│ ├── soul.md # 主灵魂文件
227227
│ ├── principles.md # 学习到的原则

crates/agent-electron-client/docs/architecture/REF-OPENCLAW.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -810,7 +810,7 @@ export type ProgramContext = {
810810
// 版本信息
811811
version: string;
812812

813-
// 路径信息(必须与项目约束一致:~/.nuwax-agent
813+
// 路径信息(必须与项目约束一致:~/.nuwaxbot
814814
paths: {
815815
homeDir: string;
816816
appDataDir: string;
@@ -842,7 +842,7 @@ function resolveAppPaths() {
842842
return {
843843
homeDir,
844844
appDataDir,
845-
dbPath: path.join(appDataDir, 'nuwax-agent.db'),
845+
dbPath: path.join(appDataDir, 'nuwaxbot.db'),
846846
logsDir: path.join(appDataDir, 'logs'),
847847
};
848848
}
@@ -1209,7 +1209,7 @@ CREATE TABLE IF NOT EXISTS workflow_runs (
12091209
| 优先级 | 改进项 | 难度 | 预期价值 | 涉及文件 |
12101210
|--------|--------|------|----------|----------|
12111211
| 🔴 P0 | 统一 IPC 注册系统(稳定代理 + 一次加载) ||| `src/main/ipc/*` |
1212-
| 🔴 P0 | 程序上下文模式(路径约束对齐 `~/.nuwax-agent`||| `src/main/context.ts` |
1212+
| 🔴 P0 | 程序上下文模式(路径约束对齐 `~/.nuwaxbot`||| `src/main/context.ts` |
12131213
| 🔴 P0 | 运行时环境双模式(strict/compat) ||| `src/main/services/system/*` |
12141214
| 🟡 P1 | 统一事件总线 ||| `src/services/common/event-bus.ts` |
12151215
| 🟡 P1 | Lobster Runtime 集成(run/resume) ||| `src/main/services/workflow/*` |
@@ -1222,7 +1222,7 @@ CREATE TABLE IF NOT EXISTS workflow_runs (
12221222

12231223
1. **创建程序上下文**
12241224
- 新建 `src/main/context.ts`
1225-
- 路径统一到 `app.getPath('home') + '/.nuwax-agent'`
1225+
- 路径统一到 `app.getPath('home') + '/.nuwaxbot'`
12261226
- 重构 `main.ts` 使用上下文
12271227
- 提取服务初始化逻辑
12281228

@@ -1264,7 +1264,7 @@ CREATE TABLE IF NOT EXISTS workflow_runs (
12641264
### 5.3 兼容性考虑
12651265

12661266
- 保持现有 IPC API 不变(使用适配器模式)
1267-
- 保持数据目录约束不变:所有持久化数据继续落在 `~/.nuwax-agent/`
1267+
- 保持数据目录约束不变:所有持久化数据继续落在 `~/.nuwaxbot/`
12681268
- 默认使用 `strict`,仅在显式配置下切换到 `compat`
12691269
- 分阶段迁移,不破坏现有功能
12701270
- 添加废弃警告,逐步过渡

crates/agent-electron-client/docs/architecture/RUNTIME-ENV-PROFILES.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ status: design
3535

3636
### 3.1 strict(默认)
3737

38-
- 路径:应用内优先(`~/.nuwax-agent/node_modules/.bin`, `~/.nuwax-agent/bin`
38+
- 路径:应用内优先(`~/.nuwaxbot/node_modules/.bin`, `~/.nuwaxbot/bin`
3939
- 配置:隔离 `HOME/XDG/CLAUDE_CONFIG_DIR/NUWAXCODE_CONFIG_DIR`
4040
- npm/uv:使用应用内缓存、镜像和目录
4141
- 不透传用户级敏感变量
@@ -126,7 +126,7 @@ export function buildRuntimeEnv(options: BuildRuntimeEnvOptions): Record<string,
126126

127127
兼容性遗留需处理:
128128

129-
- `src/main/services/packages/packageManager.ts` 仍使用 `userData` 路径,应统一到 `~/.nuwax-agent`
129+
- `src/main/services/packages/packageManager.ts` 仍使用 `userData` 路径,应统一到 `~/.nuwaxbot`
130130

131131
---
132132

crates/agent-electron-client/docs/architecture/STORAGE.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ status: design
2626
## 目录结构
2727

2828
```
29-
~/.nuwax-agent/
29+
~/.nuwaxbot/
3030
├── soul/ # Agent 自我认知
3131
│ ├── soul.md # 主灵魂文件
3232
│ ├── principles.md # 学习到的原则
@@ -645,7 +645,7 @@ class MarkdownMemoryReader implements MemoryReader {
645645
向量可以存储在以下位置:
646646

647647
```
648-
~/.nuwax-agent/
648+
~/.nuwaxbot/
649649
├── memory/
650650
│ ├── index.json # 原有索引
651651
│ └── embeddings.json # 新增:向量索引(可选)

crates/agent-electron-client/docs/operations/LOGGING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# 日志设计说明
22

3-
主进程日志目录:`~/.nuwax-agent/logs/`(开发与正式共用该路径,行为由是否打包区分)。
3+
主进程日志目录:`~/.nuwaxbot/logs/`(开发与正式共用该路径,行为由是否打包区分)。
44

55
## 问题与目标
66

crates/agent-electron-client/docs/operations/STARTUP-CHECKLIST.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
**方式二:从 SQLite 读取(应用未运行时)**
3232

3333
```bash
34-
DB="$HOME/.nuwax-agent/nuwax-agent.db"
34+
DB="$HOME/.nuwaxbot/nuwaxbot.db"
3535

3636
# step1_config 内含 agentPort、fileServerPort(JSON)
3737
sqlite3 "$DB" "SELECT value FROM settings WHERE key='step1_config';"
@@ -73,7 +73,7 @@ lsof -i :$LANPROXY_LOCAL_PORT
7373
**一键检查(推荐,与应用内聚合逻辑一致):**
7474

7575
```bash
76-
# 从 ~/.nuwax-agent/nuwax-agent.db 读配置并检查占用(需系统有 sqlite3)
76+
# 从 ~/.nuwaxbot/nuwaxbot.db 读配置并检查占用(需系统有 sqlite3)
7777
npm run check-ports
7878
# 开发模式含 Vite 端口
7979
npm run check-ports:dev
@@ -82,7 +82,7 @@ npm run check-ports:dev
8282
**或手动从 SQLite 读取后检查(需已安装 sqlite3):**
8383

8484
```bash
85-
DB="$HOME/.nuwax-agent/nuwax-agent.db"
85+
DB="$HOME/.nuwaxbot/nuwaxbot.db"
8686
get_port() { sqlite3 "$DB" "SELECT value FROM settings WHERE key='$1';" 2>/dev/null; }
8787
step1=$(get_port 'step1_config')
8888
agent_port=$(echo "$step1" | sed -n 's/.*"agentPort":\([0-9]*\).*/\1/p'); agent_port=${agent_port:-60001}
@@ -212,4 +212,4 @@ npm run dev
212212

213213
---
214214

215-
*文档依据 `~/.nuwax-agent/logs/latest.log` 常见错误整理,最后更新:2026-02-27*
215+
*文档依据 `~/.nuwaxbot/logs/latest.log` 常见错误整理,最后更新:2026-02-27*

0 commit comments

Comments
 (0)