docs: 清理 tool-engine 残留引用 + 更新架构文档与 README

- Migration.md: 移除 tool-engine 编译/启动/验证 4 处引用
- 架构分析: 移除 Tool Engine :8092 图示和端口表行,更新 msg_type 限制说明
- README: 统一插件数量为 15

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
2026-05-27 12:46:23 +08:00
parent 4035f8b1e0
commit ee3c851d17
3 changed files with 33 additions and 38 deletions
+17 -17
View File
@@ -67,19 +67,20 @@ Cyrene(昔涟)是一个 AI 数字伴侣系统,以 React SPA 为前端,Go
│ Gin Router → JWT Auth → Rate Limiter → Handlers │
│ WebSocket Hub: 会话状态/消息缓存/IoT广播 │
│ 规则引擎: 定时/事件触发自动化 │
└───┬──────────┬──────────┬──────────┬──────────┬─────────────┘
│ SSE │ HTTP │ HTTP │ HTTP │ HTTP
▼ ▼ ▼ ▼
┌────────┐ ┌────────┐ ┌────────┐ ┌────────┐ ┌──────────────┐
│AI-Core │ │Memory │ │Tool │ │Voice │ │IoT Debug │
│ :8081 │ │:8091 │ │:8092 │ │:8093 │ │ :8083 │
│ │ │ │ │ │ │ │ │
│编排器 │ │PGVector│ │13工具 │ │whisper │ │8个模拟设备 │
│意图分析 │ │语义搜索│ │调用日志│ │edge-tts│ │toggle/set/ │
│子会话 │ │去重衰减│ │IoT客户端│ │TTS回退│ │history API │
│人格系统 │ │ │ │ │ │ │ │传感器波动 │
│思考引擎 │ │ │ │ │ │ │ │
└────┬───┘ └────┬───┘ └────┬───┘ └────┬───┘ └──────────────┘
└───┬──────────┬──────────┬──────────┬─────────────┘
│ SSE │ HTTP │ HTTP │ HTTP
▼ ▼ ▼ ▼
┌────────┐ ┌────────┐ ┌────────┐ ┌──────────────┐
│AI-Core │ │Memory │ │Voice │ │IoT Debug │
│ :8081 │ │:8091 │ │:8093 │ │ :8083 │
│ │ │ │ │ │ │ │
│编排器 │ │PGVector│ │whisper │ │8个模拟设备 │
│意图分析 │ │语义搜索│ │edge-tts│ │toggle/set/ │
│子会话 │ │去重衰减│ │TTS回退│ │history API │
│人格系统 │ │ │ │ │ │传感器波动 │
│思考引擎 │ │ │ │ │ │ │
│工具调用 │ │ │ │ │ │ │
└────┬───┘ └────┬───┘ └────┬───┘ └──────────────┘
│ │ │ │
└──────────┴──────────┴──────────┘
@@ -713,7 +714,7 @@ postgres://cyrene:cyrene_pass@localhost:5432/cyrene_ai?sslmode=disable
### 7.3 已知缺项
- `messages`缺少 `msg_type` 列——目前通过 `role` 字段区分 action/chat`role="action"` 表示动作消息)
- `messages``msg_type` 通过后端 ServerMessage 自动填充(含 markdown/code),但数据库层面未持久化该字段,历史消息查询依赖 role 判断
---
@@ -738,7 +739,7 @@ postgres://cyrene:cyrene_pass@localhost:5432/cyrene_ai?sslmode=disable
1. **LLM 合成延迟**3-4s):deepseek-v4-flash 调用是主要瓶颈,合成阶段无法被快速通道绕过
2. **"开" 字歧义**:无法将单独的 "开" 加入快速通道("开心"/"开始" 产生误判),"开灯" 等短命令仍走 LLM
3. **msg_type 数据库列缺失**messages 表使用 `role` 字段区分 action/chat,不是专用的 `msg_type`
3. **msg_type 数据库持久化**后端 ServerMessage 已自动填充 msg_type(含 markdown/code),但数据库 messages 表未存储该字段
4. **Node.js v24 Windows 原生 WebSocket bug**:频繁建立连接可能触发 libuv `UV_HANDLE_CLOSING` 断言
5. **流式审查**`parseReviewMessages()` 需要等 LLM 合成完成后才能执行,无法实时拆分
6. **`frontend/packages/shared/`** 和 **`backend/proto/`** 为空占位
@@ -746,7 +747,7 @@ postgres://cyrene:cyrene_pass@localhost:5432/cyrene_ai?sslmode=disable
### 建议改进方向
1. **LLM 响应缓存**:对相似问候/常见 IoT 命令引入语义缓存
2. **数据库迁移**:为 messages 表添加 `msg_type`
2. **数据库迁移**:为 messages 表添加 `msg_type`以持久化消息类型(当前仅 ServerMessage 传输层携带)
3. **流式审查**:在 LLM 合成过程中实时识别并分段发送 action/chat
4. **Protobuf 通信**:填充 `backend/proto/` 目录,服务间改用 gRPC
5. **WebSocket 兼容**:生产环境使用 `ws` npm 包替代原生 WebSocket
@@ -764,7 +765,6 @@ postgres://cyrene:cyrene_pass@localhost:5432/cyrene_ai?sslmode=disable
| AI-Core | 8081 | net/http + SSE |
| IoT Debug | 8083 | net/http |
| Memory | 8091 | net/http + pgvector |
| Tool Engine | 8092 | net/http |
| Voice | 8093 | net/http + whisper.cpp |
| Frontend (dev) | 5173 | Vite |
| DevTools | 9090 | Express |