docs(wiki): 同步知识库 — 04-21 经验积累+Skill工具调用修复
Some checks failed
CI / Lint & TypeCheck (push) Has been cancelled
CI / Unit Tests (push) Has been cancelled
CI / Build Frontend (push) Has been cancelled
CI / Rust Check (push) Has been cancelled
CI / Security Scan (push) Has been cancelled
CI / E2E Tests (push) Has been cancelled

This commit is contained in:
iven
2026-04-21 01:12:51 +08:00
parent c1dea6e07a
commit 2f5e9f1755
10 changed files with 194 additions and 109 deletions

View File

@@ -1,6 +1,6 @@
---
title: Hands + Skills + MCP
updated: 2026-04-17
updated: 2026-04-19
status: active
tags: [module, hands, skills, mcp]
---
@@ -20,7 +20,7 @@ tags: [module, hands, skills, mcp]
## 代码逻辑
### Hands (9 启用)
### Hands (7 注册: 6 TOML + 1 系统内部)
每个 Hand 有独立的 `hands/<Name>.HAND.toml` 配置和 `crates/zclaw-hands/src/hands/` 下的 Rust 实现。
@@ -31,13 +31,20 @@ tags: [module, hands, skills, mcp]
| Researcher | 深度研究 | LLM | 22 | `hands/researcher.HAND.toml` |
| Clip | 视频处理 | FFmpeg | 30 | `hands/clip.HAND.toml` |
| Twitter | Twitter 自动化 (12 API v2) | OAuth 1.0a | 25 | `hands/twitter.HAND.toml` |
| Whiteboard | 白板演示 | — | — | `hands/whiteboard.HAND.toml` |
| Slideshow | 幻灯片生成 | — | 13 | `hands/slideshow.HAND.toml` |
| Speech | 语音合成 | Browser TTS | — | `hands/speech.HAND.toml` |
| Quiz | 测验生成 | — | — | `hands/quiz.HAND.toml` |
| _reminder | 定时提醒 (系统内部) | — | — | 无 TOML代码注册 |
Hands 测试分布(前 5: Clip(30), Twitter(25), Researcher(22), Slideshow(13), Browser(8)
Hands 测试分布(前 5: Clip(30), Twitter(25), Researcher(22), Browser(8), Collector(8)
### 已删除 Hands (04-17 Phase 5 空壳清理)
| Hand | 原状态 | 删除原因 |
|------|--------|----------|
| Whiteboard | 有 HAND.toml + Rust (422行) | 空壳实现,无真实功能,已删除 |
| Slideshow | 有 HAND.toml + Rust (797行) | 空壳实现,无真实功能,已删除 |
| Speech | 有 HAND.toml + Rust (442行) | 空壳实现,无真实功能,已删除 |
净减 ~5400 行。
### 禁用 Hands
@@ -194,12 +201,12 @@ MCP 工具在 ToolRegistry 中使用限定名 `service_name.tool_name` 避免冲
| 文件 | 职责 |
|------|------|
| `crates/zclaw-hands/src/hands/` | 10 个 Hand 实现 ( _reminder) |
| `crates/zclaw-hands/src/hands/` | 7 个 Hand 实现 (6 有 TOML + _reminder 系统内部) |
| `crates/zclaw-runtime/src/nl_schedule.rs` | 中文时间→cron 解析器 |
| `crates/zclaw-skills/src/semantic_router.rs` | TF-IDF 语义路由 |
| `crates/zclaw-skills/src/` | 技能解析和索引 |
| `skills/*/SKILL.md` | 75 个技能定义 |
| `hands/*.HAND.toml` | 9 个 Hand 配置 |
| `hands/*.HAND.toml` | 6 个 Hand 配置 |
| `crates/zclaw-protocols/src/mcp_tool_adapter.rs` | MCP 工具适配器 + 服务管理 |
| `crates/zclaw-protocols/src/mcp.rs` | MCP 协议类型 + BasicMcpClient |
| `crates/zclaw-runtime/src/tool/builtin/mcp_tool.rs` | McpToolWrapper (Tool trait 桥接) |