docs: audit reports + feature docs + skills + admin-v2 + config sync
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

Update audit tracker, roadmap, architecture docs,
add admin-v2 Roles page + Billing tests,
sync CLAUDE.md, Cargo.toml, docker-compose.yml,
add deep-research / frontend-design / chart-visualization skills

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
iven
2026-04-02 19:25:00 +08:00
parent 28299807b6
commit 8898bb399e
48 changed files with 7388 additions and 173 deletions

View File

@@ -3,7 +3,7 @@
> **分类**: 架构层
> **优先级**: P0 - 决定性
> **成熟度**: L4 - 生产
> **最后更新**: 2026-03-28
> **最后更新**: 2026-04-01
> **验证状态**: 代码已验证
---
@@ -20,10 +20,10 @@
| 优先级 | P0 |
| 成熟度 | L4 |
| 依赖 | Tauri Runtime 2.x |
| Tauri 命令数量 | **58+** (kernel 29 + pipeline 13 + viking 13 + llm 3) |
| Rust Crates | 11 个 (types, memory, runtime, kernel, skills, hands, protocols, pipeline, growth, channels, saas) |
| Tauri 命令数量 | **175** (kernel 34 + pipeline 10 + browser 22 + intelligence 35 + memory 14 + cli 13 + viking 13 + llm 3 + secure_storage 4 + classroom 27) |
| Rust Crates | 10 个 (types, memory, runtime, kernel, skills, hands, protocols, pipeline, growth, saas) |
| 连接模式 | 3 种 (Tauri Kernel / Gateway WebSocket / SaaS Cloud) |
| SaaS API 路由 | 76+ (Axum + PostgreSQL) |
| SaaS API 路由 | 58 (Axum + PostgreSQL, 10 模块 + 1 health) |
### 1.2 相关文件
@@ -367,4 +367,4 @@ try {
---
**最后更新**: 2026-03-28
**最后更新**: 2026-04-01

View File

@@ -3,7 +3,7 @@
> **分类**: 架构层
> **优先级**: P0 - 决定性
> **成熟度**: L4 - 生产
> **最后更新**: 2026-03-25
> **最后更新**: 2026-04-01
> **验证状态**: ✅ 代码已验证
---
@@ -20,32 +20,29 @@
| 优先级 | P0 |
| 成熟度 | L4 |
| 依赖 | 无 |
| Store 数量 | **18+** |
| Domains 数量 | 4 (chat, hands, intelligence, shared) |
| Store 数量 | **14** |
| Domains 数量 | 4 (chat, hands, intelligence, saas) |
| 匁久化策略 | localStorage + IndexedDB (计划中) |
### 1.2 Store 清单 (18+)
### 1.2 Store 清单 (14 个实际存在的 Store)
| Store | 路径 | 用途 | 验证状态 |
|------|------|------|---------|
| connectionStore | `desktop/src/store/connectionStore.ts` | 连接状态管理 | ✅ 存在 |
| chatStore | `desktop/src/store/chatStore.ts` | 消息和会话管理 | ✅ 存在 |
| configStore | `desktop/src/store/configStore.ts` | 配置持久化 | ✅ 存在 |
| agentStore | `desktop/src/store/agentStore.ts` | Agent 克隆管理 | ✅ 存在 |
| browserHandStore | `desktop/src/store/browserHandStore.ts` | Browser Hand 状态 | ✅ 存在 |
| chatStore | `desktop/src/store/chatStore.ts` | 消息和会话管理 (DeerFlow 视觉) | ✅ 存在 |
| configStore | `desktop/src/store/configStore.ts` | 配置持久化 | ✅ 存在 |
| connectionStore | `desktop/src/store/connectionStore.ts` | 连接状态管理 | ✅ 存在 |
| handStore | `desktop/src/store/handStore.ts` | Hands 触发管理 | ✅ 存在 |
| workflowStore | `desktop/src/store/workflowStore.ts` | 工作流管理 | ✅ 存在 |
| workflowBuilderStore | `desktop/src/store/workflowBuilderStore.ts` | 工作流构建器状态 | ✅ 存在 |
| teamStore | `desktop/src/store/teamStore.ts` | 团队协作管理 | ✅ 存在 |
| gatewayStore | `desktop/src/store/gatewayStore.ts` | Gateway 客户端状态 | ✅ 存在 |
| securityStore | `desktop/src/store/securityStore.ts` | 安全配置管理 | ✅ 存在 |
| sessionStore | `desktop/src/store/sessionStore.ts` | 会话持久化 | ✅ 存在 |
| memoryGraphStore | `desktop/src/store/memoryGraphStore.ts` | 记忆图谱状态 | ✅ 存在 |
| offlineStore | `desktop/src/store/offlineStore.ts` | 离线模式管理 | ✅ 存在 |
| activeLearningStore | `desktop/src/store/activeLearningStore.ts` | 主动学习状态 | ✅ 存在 |
| browserHandStore | `desktop/src/store/browserHandStore.ts` | Browser Hand 状态 | ✅ 存在 |
| skillMarketStore | `desktop/src/store/skillMarketStore.ts` | 技能市场状态 | ✅ 存在 |
| meshStore | `desktop/src/store/meshStore.ts` | 自适应智能网格状态 | ✅ 存在 |
| personaStore | `desktop/src/store/personaStore.ts` | Persona 演化状态 | ✅ 存在 |
| saasStore | `desktop/src/store/saasStore.ts` | SaaS 平台集成 (登录/配置/Prompt OTA) | ✅ 存在 |
| securityStore | `desktop/src/store/securityStore.ts` | 安全配置管理 | ✅ 存在 |
| sessionStore | `desktop/src/store/sessionStore.ts` | 会话持久化 | ✅ 存在 |
| workflowBuilderStore | `desktop/src/store/workflowBuilderStore.ts` | 工作流构建器状态 | ✅ 存在 |
| workflowStore | `desktop/src/store/workflowStore.ts` | 工作流管理 | ✅ 存在 |
> **注**: 以下 Store 在早期文档中出现但已被移除或合并: teamStore (多 Agent 功能 feature-gated), meshStore, personaStore (合并到 identity 系统), activeLearningStore, skillMarketStore, gatewayStore (功能合并到 connectionStore)
### 1.3 Domain Stores (领域状态)

View File

@@ -3,7 +3,7 @@
> **分类**: 架构层
> **优先级**: P0 - 决定性
> **成熟度**: L4 - 生产
> **最后更新**: 2026-03-16
> **最后更新**: 2026-04-01
---
@@ -11,7 +11,7 @@
### 1.1 基本信息
安全认证模块负责 ZCLAW 与 ZCLAW 之间的身份验证和凭证安全存储,支持 Ed25519 设备认证JWT 会话令牌。
安全认证模块负责 ZCLAW 的身份验证和凭证安全存储,支持 Ed25519 设备认证JWT 会话令牌、TOTP 2FA、HttpOnly Cookie 等多种安全机制
| 属性 | 值 |
|------|-----|
@@ -172,7 +172,34 @@ async function storeDeviceKeys(publicKey: string, privateKey: string) {
- [x] JWT Token 管理
- [x] 设备注册和审批
- [x] 跨平台支持
- [x] localStorage 降级
- [x] localStorage 降级 (AES-GCM 加密)
### 5.1.1 安全渗透测试 V1 修复 (2026-03-31)
> 整体评级: **B+** (良好) | 5 HIGH + 10 MEDIUM 全部已修复 | 12 个安全控制项全部 PASS
**SaaS 后端安全修复:**
- [x] JWT `password_version` 机制 — 密码修改自动使所有已签发 JWT 失效
- [x] 账户锁定 — 5 次登录失败后锁定 15 分钟
- [x] 邮箱验证 — RFC 5322 正则 + 254 字符长度限制
- [x] JWT 密钥保护 — `#[cfg(debug_assertions)]` 保护的 fallbackrelease 模式拒绝启动
- [x] TOTP 加密密钥独立化 — 生产环境强制 `ZCLAW_TOTP_ENCRYPTION_KEY` (64 hex)
- [x] TOTP/API Key 加密 — AES-256-GCM + 随机 Nonce
- [x] 密码存储 — Argon2id + OsRng 随机盐
- [x] Refresh Token 轮换 — 单次使用 + 撤销校验
**网络安全:**
- [x] Cookie 安全 — HttpOnly + Secure + SameSite=Strict + 路径作用域
- [x] CORS 白名单 — 生产强制白名单,缺失拒绝启动
- [x] 限流持久化 — PostgreSQL 滑动窗口,重启不丢失
- [x] XFF 信任链 — 仅信任配置的代理 IP
**前端安全:**
- [x] CSP 加固 — 移除 `unsafe-inline` script
- [x] Admin Token — HttpOnly Cookie 传递JS 不存储 token
- [x] Pipeline 日志脱敏 — Debug 日志截断 + 仅记录 keys
**详细报告**: [SECURITY_PENETRATION_TEST_V1.md](../SECURITY_PENETRATION_TEST_V1.md)
### 5.2 测试覆盖
@@ -194,11 +221,21 @@ async function storeDeviceKeys(publicKey: string, privateKey: string) {
## 六、演化路线
### 6.1 短期计划1-2 周)
### 6.1 已完成
- [x] TOTP 双因素认证 (AES-256-GCM 加密存储)
- [x] JWT password_version 密码修改使旧 token 失效
- [x] 账户锁定机制 (5 次失败 → 锁 15 分钟)
- [x] HttpOnly Cookie 认证模式
- [x] CSP 加固 (移除 unsafe-inline)
- [x] CORS 白名单强制
- [x] 限流持久化 (PostgreSQL)
### 6.2 短期计划1-2 周)
- [ ] 添加生物识别支持 (Touch ID / Windows Hello)
### 6.2 中期计划1-2 月)
### 6.3 中期计划1-2 月)
- [ ] 支持 FIDO2 硬件密钥
- [ ] 速率限制从 DashMap 迁移到 Redis (多实例部署)
### 6.3 长期愿景
- [ ] 去中心化身份 (DID)