refactor: DevTools → ethend 重命名 + 加入生产环境

- 目录 devtools/ → ethend/
- CLI 脚本 devtools.sh/.bat → ethend.sh/.bat
- 环境变量 DEVTOOLS_PORT → ETHEND_PORT
- docker-compose.yml 新增 ethend 服务(生产部署)
- 同步更新全部文档、注释和配置文件

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
2026-05-30 09:32:36 +08:00
parent 27187997b3
commit 365f5ceb2f
30 changed files with 455 additions and 189 deletions
+17 -17
View File
@@ -1,12 +1,12 @@
# Cyrene DevTools 文档
# Cyrene ethend 文档
DevTools 是 Cyrene 项目的开发管理控制台,提供 Web UI + CLI 两种使用方式。默认端口 **9090**
ethend 是 Cyrene 项目的开发管理控制台,提供 Web UI + CLI 两种使用方式。默认端口 **9090**
---
## 目录
1. [CLI 命令 (devtools.sh)](#1-cli-命令)
1. [CLI 命令 (ethend.sh)](#1-cli-命令)
2. [Web 控制台面板](#2-web-控制台面板)
3. [REST API](#3-rest-api)
@@ -14,16 +14,16 @@ DevTools 是 Cyrene 项目的开发管理控制台,提供 Web UI + CLI 两种
## 1. CLI 命令
`./devtools.sh [命令] [选项]`
`./ethend.sh [命令] [选项]`
### 基本命令
| 命令 | 说明 |
|------|------|
| `start` | 启动 DevTools 控制台 |
| `start` | 启动 ethend 控制台 |
| `start --build` | 编译全部后端服务后启动 |
| `start --fresh` | 强制重启全部后端服务后启动 |
| `stop` | 停止 DevTools 控制台 |
| `stop` | 停止 ethend 控制台 |
| `status` | 查看所有服务状态(运行/停止、PID、uptime) |
| `logs <服务ID> [行数]` | 查看服务日志 |
| `build [服务ID]` | 编译服务(不指定则编译全部) |
@@ -36,7 +36,7 @@ DevTools 是 Cyrene 项目的开发管理控制台,提供 Web UI + CLI 两种
| 选项 | 说明 |
|------|------|
| `--port, -p <端口>` | 指定 DevTools 端口 (默认: 9090) |
| `--port, -p <端口>` | 指定 ethend 端口 (默认: 9090) |
| `--fresh` | 启动前强制重启全部后端服务 |
| `--build` | 启动前编译全部服务 |
@@ -47,12 +47,12 @@ DevTools 是 Cyrene 项目的开发管理控制台,提供 Web UI + CLI 两种
### 示例
```bash
./devtools.sh # 快速启动
./devtools.sh start --build # 编译后启动
./devtools.sh start --fresh # 全新重启
./devtools.sh logs gateway 20 # 查看 Gateway 最近 20 行日志
./devtools.sh build ai-core # 仅编译 AI-Core
./devtools.sh db:status # 检查数据库状态
./ethend.sh # 快速启动
./ethend.sh start --build # 编译后启动
./ethend.sh start --fresh # 全新重启
./ethend.sh logs gateway 20 # 查看 Gateway 最近 20 行日志
./ethend.sh build ai-core # 仅编译 AI-Core
./ethend.sh db:status # 检查数据库状态
```
---
@@ -139,13 +139,13 @@ STT 转录日志(内存环形缓冲,最多 200 条),支持上传音频
## 3. REST API
DevTools 自身暴露的 REST API,供脚本和外部工具使用。
ethend 自身暴露的 REST API,供脚本和外部工具使用。
### 健康检查
```
GET /api/health
→ { "status": "ok", "service": "cyrene-devtools", "uptime": 3600, "wsClients": 2 }
→ { "status": "ok", "service": "cyrene-ethend", "uptime": 3600, "wsClients": 2 }
```
### 服务管理
@@ -191,7 +191,7 @@ GET /api/dashboard
所有代理路由自动获取 Gateway JWT Token(通过 admin 凭据登录并缓存)。
| DevTools 路径 | 目标服务 | 实际路径 |
| ethend 路径 | 目标服务 | 实际路径 |
|---------------|----------|----------|
| `/api/memory/*` | Gateway | `/api/v1/memory/*` |
| `/api/sessions*` | Gateway | `/api/v1/admin/sessions*` |
@@ -201,7 +201,7 @@ GET /api/dashboard
| `/api/tool-calls*` | AI-Core | `/api/v1/tools/calls*` |
| `/api/voice/status` | Voice-Service | `/api/v1/status` |
| `/api/voice/transcribe` | Voice-Service | `/api/v1/transcribe` |
| `/api/voice/logs` | DevTools 内部 | 内存环形缓冲区 |
| `/api/voice/logs` | ethend 内部 | 内存环形缓冲区 |
| `/api/v1/thinking*` | Memory-Service | `/api/v1/thinking*` |
| `/api/memory-timeline` | Memory-Service | 合并 Memories + Thinking |
| `/api/chat-platforms/*` | Platform-Bridge | `/api/v1/*` |
+8 -8
View File
@@ -25,7 +25,7 @@
- [自定义 Hooks](#44-自定义-hooks)
- [API 模块](#45-api-模块)
- [WebSocket 消息流](#46-websocket-消息流)
5. [DevTools (9090) — 调试工具](#五devtools-9090--调试工具)
5. [ethend (9090) — 调试工具](#五ethend-9090--调试工具)
6. [对话管线详解](#六对话管线详解)
7. [数据库设计](#七数据库设计)
8. [安全性](#八安全性)
@@ -588,9 +588,9 @@ App
---
## 五、DevTools (:9090) — 调试工具
## 五、ethend (:9090) — 调试工具
**目录**`devtools/`
**目录**`ethend/`
**类型**Node.js Express 应用
### 5.1 服务管理
@@ -616,14 +616,14 @@ App
### 5.3 关键配置
**构建命令**[config.js](devtools/src/config.js)):
**构建命令**[config.js](ethend/src/config.js)):
```javascript
buildCommand: 'go',
buildArgs: ['build', '-o', isWin ? 'main.exe' : 'main', './cmd/main.go'],
goBin: GO_BIN
```
所有 Go 服务统一编译为 `main.exe`Windows),DevTools 通过 `./main` 启动。**自定义二进制名称不会被 DevTools 识别。**
所有 Go 服务统一编译为 `main.exe`Windows),ethend 通过 `./main` 启动。**自定义二进制名称不会被 ethend 识别。**
---
@@ -767,7 +767,7 @@ postgres://cyrene:cyrene_pass@localhost:5432/cyrene_ai?sslmode=disable
| Memory | 8091 | net/http + pgvector |
| Voice | 8093 | net/http + whisper.cpp |
| Frontend (dev) | 5173 | Vite |
| DevTools | 9090 | Express |
| ethend | 9090 | Express |
### 常用命令
@@ -777,7 +777,7 @@ cd backend/ai-core && GOWORK=off go build -o main.exe ./cmd/main.go
cd backend/gateway && GOWORK=off go build -o main.exe ./cmd/main.go
# ... 其他服务同理
# 或通过 DevTools API
# 或通过 ethend API
curl -X POST http://localhost:9090/api/services/ai-core/build
curl -X POST http://localhost:9090/api/services/gateway/build
@@ -845,7 +845,7 @@ Phase 6 新增,位于 `backend/models.json``.gitignore` 已排除)。格
}
```
**配置管理 API**Gateway adminDevTools 代理提供 UI):
**配置管理 API**Gateway adminethend 代理提供 UI):
| Method | Path | Description |
|--------|------|-------------|
+1
View File
@@ -26,6 +26,7 @@ docker compose logs -f
| memory-service | 8091 (内部) | 记忆检索 |
| voice-service | 8093 (内部) | 语音识别 |
| iot-debug-service | 8083 (内部) | IoT 调试 |
| ethend | 9090 (外部) | 管理控制台 |
| postgres | 5432 (内部) | 数据库 (pgvector/pg16) |
| redis | 6379 (内部) | 缓存 |
| qdrant | 6333 (内部) | 向量数据库 |
+1 -1
View File
@@ -85,7 +85,7 @@ HOST_EXEC_MAX_TIMEOUT=300
## 验证
DevTools 或 API 测试:
ethend 或 API 测试:
```bash
# 通过 API 发送消息,让昔涟使用 os_exec