docs: 更新 tool-engine 移除后的文档引用

- tool-engine.md: 迁移至 AI-Core (8081),更新为内存环形缓冲区字段
- devtools.md: 移除 tool-engine 服务引用,更新启动顺序和代理路由
- architecture-analysis.md: Section 3.4 重写为 pkg/plugins 工具系统

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
2026-05-26 21:39:46 +08:00
parent 251068a7db
commit 9f3b0f386d
3 changed files with 873 additions and 19 deletions
+12 -13
View File
@@ -1,8 +1,10 @@
# Tool-Engine API
# 工具调用 API (已迁移至 AI-Core)
**Base URL:** `http://<host>:8092` | **Auth:**
> **Base URL:** `http://<host>:8081` | **Auth:** 无
> **迁移说明:** tool-engine 服务 (8092) 已移除。工具注册与调用功能已整合到 `pkg/plugins` 共享模块,由 AI-Core (8081) 直接管理。API 路径保持不变。
> **源码:** [pkg/plugins/manager/registry.go](../../backend/pkg/plugins/manager/registry.go)
工具引擎注册了 13 个内置工具,支持单次和批量执行,可选数据库持久化的调用日志。
工具注册中心管理 15+ 个内置工具,通过内存环形缓冲区 (500 条) 记录调用日志。
---
@@ -33,17 +35,14 @@
| 字段 | 类型 | 说明 |
|------|------|------|
| `id` | int | 数据库自增 ID |
| `call_id` | string | UUID v4 |
| `call_id` | string | 调用唯一标识 (纳秒时间戳) |
| `tool_name` | string | 工具名 |
| `arguments` | json.RawMessage | 调用参数 |
| `arguments` | string | 调用参数 (JSON 字符串) |
| `output` | string | 输出文本 |
| `error` | string | 错误信息 |
| `success` | bool | 是否成功 |
| `duration_ms` | int | 执行耗时 |
| `user_id` | string | 调用用户 |
| `session_id` | string | 调用会话 |
| `created_at` | string | 时间戳 |
| `timestamp` | int64 | Unix 毫秒时间戳 |
### ToolCallCount
@@ -60,7 +59,7 @@
## 1. GET /api/v1/health
```json
{ "status": "ok", "service": "tool-engine" }
{ "status": "ok", "service": "ai-core" }
```
---
@@ -147,7 +146,7 @@
## 6. GET /api/v1/tools/calls — 调用日志
需要 `DB_URL` 环境变量。未配置数据库时返回空结果
内存环形缓冲区 (500 条),无需数据库
### Query 参数
@@ -155,7 +154,7 @@
|------|------|------|
| `tool_name` | 全部 | 按工具名过滤 |
| `page` | 1 | 页码 |
| `limit` | 20 (max 100) | 每页条数 |
| `limit` | 50 (max 500) | 每页条数 |
### 响应 200
@@ -186,7 +185,7 @@
}
```
未配置数据库时全返回 0
内存缓冲区,重启后数据清零
---
+5 -6
View File
@@ -42,7 +42,7 @@ DevTools 是 Cyrene 项目的开发管理控制台,提供 Web UI + CLI 两种
### 可用服务 ID
`gateway`, `ai-core`, `memory-service`, `tool-engine`, `voice-service`, `iot-debug-service`, `plugin-manager`, `platform-bridge`, `frontend`
`gateway`, `ai-core`, `memory-service`, `voice-service`, `iot-debug-service`, `plugin-manager`, `platform-bridge`, `frontend`
### 示例
@@ -77,12 +77,12 @@ DevTools 是 Cyrene 项目的开发管理控制台,提供 Web UI + CLI 两种
| 操作 | 说明 |
|------|------|
| 一键启动 | 按依赖顺序启动全部 9 个服务 |
| 一键启动 | 按依赖顺序启动全部 8 个服务 |
| 强制重启 | 先停止全部再重新启动 |
| 单个启动/停止/重启 | 针对每个服务的独立操作 |
| 编译 | 重新编译 Go 服务并启动 |
启动顺序:memory-service → tool-engine → plugin-manager → iot-debug-service → voice-service → ai-core → platform-bridge → gateway → frontend。每步等待健康检查通过。
启动顺序:memory-service → plugin-manager → iot-debug-service → voice-service → ai-core → platform-bridge → gateway → frontend。每步等待健康检查通过。
### 2.5 性能监控 (Performance)
@@ -99,7 +99,7 @@ DevTools 是 Cyrene 项目的开发管理控制台,提供 Web UI + CLI 两种
### 2.7 工具调用 (Tool Calls)
代理到 `tool-engine`,查询工具调用记录和统计数据,按工具名筛选。
代理到 `ai-core`,查询工具调用记录和统计数据,按工具名筛选、分页
### 2.8 语音识别 (STT)
@@ -198,7 +198,7 @@ GET /api/dashboard
| `/api/clients*` | Gateway | `/api/v1/admin/clients*` |
| `/api/model-config/*` | Gateway | `/api/v1/admin/models/*` |
| `/api/iot/devices*` | IoT Debug | `/api/v1/devices*` |
| `/api/tool-calls*` | Tool-Engine | `/api/v1/tools/calls*` |
| `/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 内部 | 内存环形缓冲区 |
@@ -235,7 +235,6 @@ ws://localhost:9090/ws
| `ai-core` | AI-Core | 8081 | Go |
| `iot-debug-service` | IoT Debug | 8083 | Go |
| `memory-service` | 记忆服务 | 8091 | Go |
| `tool-engine` | 工具引擎 | 8092 | Go |
| `voice-service` | 语音识别服务 | 8093 | Go |
| `plugin-manager` | 插件管理器 | 8094 | Go |
| `platform-bridge` | 多平台桥接 | 8095 | Go |