Files
zclaw_openfang/docs/README.md
iven 834aa12076
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
fix: P0 panic风险修复 + P1编译warnings清零 + P2代码/文档清理
P0 安全性:
- account/handlers.rs: .unwrap() → .expect() 语义化错误信息
- relay/handlers.rs: SSE Response .unwrap() → .expect()

P1 编译质量 (6 warnings → 0):
- kernel.rs: 移除未使用的 Capability import 和 config_clone 变量
- pipeline_commands.rs: 未使用变量 id → _id
- db.rs: 移除多余括号
- relay/service.rs: 移除未使用的 StreamExt import
- telemetry/service.rs: 抑制 param_idx 未读赋值警告
- main.rs: TcpKeepalive::with_retries() Linux-only 条件编译

P2 代码清理:
- 移除 handStore/HandsPanel/HandTaskPanel/gateway-api/SchedulerPanel 调试 console.log
- SchedulerPanel: 修复 updateWorkflow 未解构导致 TS 编译错误
- 文档清理 zclaw-channels 已移除 crate 的引用
2026-03-30 11:33:47 +08:00

134 lines
6.0 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# ZCLAW 文档中心
## 快速导航
| 文档 | 说明 |
|------|------|
| [快速启动](quick-start.md) | 5 分钟内启动 ZCLAW 开发环境 |
| [开发指南](DEVELOPMENT.md) | 开发环境设置、构建、测试 |
| [用户手册](USER_MANUAL.md) | 终端用户使用指南 |
| [Agent 进化计划](ZCLAW_AGENT_INTELLIGENCE_EVOLUTION.md) | Agent 智能层发展规划 |
## 架构概述
ZCLAW 采用**内部 Kernel 架构**,所有核心能力都集成在 Tauri 桌面应用中:
```
┌─────────────────────────────────────────────────────────────────┐
│ ZCLAW 桌面应用 │
├─────────────────────────────────────────────────────────────────┤
│ │
│ ┌─────────────────┐ ┌─────────────────────────────────┐ │
│ │ React 前端 │ │ Tauri 后端 (Rust) │ │
│ │ ├─ UI 组件 │ │ ├─ zclaw-kernel (核心协调) │ │
│ │ ├─ Zustand │────▶│ ├─ zclaw-runtime (LLM 驱动) │ │
│ │ └─ KernelClient│ │ ├─ zclaw-memory (存储层) │ │
│ └─────────────────┘ │ └─ zclaw-types (基础类型) │ │
│ └─────────────────────────────────┘ │
│ │ │
│ ▼ │
│ ┌─────────────────────────────────┐ │
│ │ 多 LLM 提供商支持 │ │
│ │ Kimi | Qwen | DeepSeek | Zhipu │ │
│ │ OpenAI | Anthropic | Local │ │
│ └─────────────────────────────────┘ │
│ │
└─────────────────────────────────────────────────────────────────┘
```
**关键特性**
- **无外部依赖** - 不需要启动独立的后端进程
- **单安装包运行** - 用户安装后即可使用
- **UI 配置模型** - 在"模型与 API"设置页面配置 LLM 提供商
## 文档结构
```
docs/
├── quick-start.md # 快速启动指南
├── DEVELOPMENT.md # 开发指南
├── USER_MANUAL.md # 用户手册
├── ZCLAW_AGENT_INTELLIGENCE_EVOLUTION.md # Agent 进化计划
├── features/ # 功能文档
│ ├── 00-architecture/ # 架构设计
│ │ ├── 01-communication-layer.md # 通信层
│ │ ├── 02-state-management.md # 状态管理
│ │ └── 03-security-auth.md # 安全认证
│ ├── 01-core-features/ # 核心功能
│ ├── 02-intelligence-layer/ # 智能层
│ └── 06-tauri-backend/ # Tauri 后端
├── knowledge-base/ # 技术知识库
│ ├── troubleshooting.md # 故障排除
│ └── ...
├── archive/ # 归档文档
│ ├── completed-plans/ # 已完成的计划
│ ├── research-reports/ # 研究报告
│ └── zclaw-legacy/ # 历史遗留文档
├── plans/ # 执行计划
│ └── ...
└── test-reports/ # 测试报告
└── ...
```
## Crate 架构
ZCLAW 核心由 8 个 Rust Crate 组成:
| Crate | 层级 | 职责 |
|-------|------|------|
| `zclaw-types` | L1 | 基础类型 (AgentId, Message, Error) |
| `zclaw-memory` | L2 | 存储层 (SQLite, 会话管理) |
| `zclaw-runtime` | L3 | 运行时 (LLM 驱动, 工具, Agent 循环) |
| `zclaw-kernel` | L4 | 核心协调 (注册, 调度, 事件, 工作流) |
| `zclaw-skills` | - | 技能系统 (SKILL.md 解析, 执行器) |
| `zclaw-hands` | - | 自主能力 (Hand/Trigger 注册管理) |
| `zclaw-protocols` | - | 协议支持 (MCP, A2A) |
### 依赖关系
```
zclaw-types (无依赖)
zclaw-memory (→ types)
zclaw-runtime (→ types, memory)
zclaw-kernel (→ types, memory, runtime)
desktop/src-tauri (→ kernel, skills, hands, channels, protocols)
```
## 支持的 LLM 提供商
| Provider | Base URL | 说明 |
|----------|----------|------|
| kimi | `https://api.kimi.com/coding/v1` | Kimi Code |
| qwen | `https://dashscope.aliyuncs.com/compatible-mode/v1` | 百炼/通义千问 |
| deepseek | `https://api.deepseek.com/v1` | DeepSeek |
| zhipu | `https://open.bigmodel.cn/api/paas/v4` | 智谱 GLM |
| openai | `https://api.openai.com/v1` | OpenAI |
| anthropic | `https://api.anthropic.com` | Anthropic Claude |
| local | `http://localhost:11434/v1` | Ollama/LMStudio |
## 项目状态
- **架构迁移**: Phase 5 完成 - 内部 Kernel 集成
- **Agent 智能层**: Phase 1-3 完成
- **测试覆盖**: 161 E2E tests passing, 26 Rust tests passing
## 贡献指南
1. 新文档放在适当的目录中
2. 使用清晰的文件命名(小写、连字符分隔)
3. 计划文件使用日期前缀:`YYYY-MM-DD-description.md`
4. 完成后将计划移动到 `archive/completed-plans/`
---
**最后更新**: 2026-03-22