Files
zclaw_openfang/docs/features
iven f4efc823e2 refactor(types): comprehensive TypeScript type system improvements
Major type system refactoring and error fixes across the codebase:

**Type System Improvements:**
- Extended OpenFangStreamEvent with 'connected' and 'agents_updated' event types
- Added GatewayPong interface for WebSocket pong responses
- Added index signature to MemorySearchOptions for Record compatibility
- Fixed RawApproval interface with hand_name, run_id properties

**Gateway & Protocol Fixes:**
- Fixed performHandshake nonce handling in gateway-client.ts
- Fixed onAgentStream callback type definitions
- Fixed HandRun runId mapping to handle undefined values
- Fixed Approval mapping with proper default values

**Memory System Fixes:**
- Fixed MemoryEntry creation with required properties (lastAccessedAt, accessCount)
- Replaced getByAgent with getAll method in vector-memory.ts
- Fixed MemorySearchOptions type compatibility

**Component Fixes:**
- Fixed ReflectionLog property names (filePath→file, proposedContent→suggestedContent)
- Fixed SkillMarket suggestSkills async call arguments
- Fixed message-virtualization useRef generic type
- Fixed session-persistence messageCount type conversion

**Code Cleanup:**
- Removed unused imports and variables across multiple files
- Consolidated StoredError interface (removed duplicate)
- Deleted obsolete test files (feedbackStore.test.ts, memory-index.test.ts)

**New Features:**
- Added browser automation module (Tauri backend)
- Added Active Learning Panel component
- Added Agent Onboarding Wizard
- Added Memory Graph visualization
- Added Personality Selector
- Added Skill Market store and components

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-17 08:05:07 +08:00
..

ZCLAW 功能全景文档

版本: v1.0 更新日期: 2026-03-16 项目状态: 开发收尾317 测试通过


一、文档索引

1.1 架构层 (Architecture)

文档 功能 成熟度 测试覆盖
01-communication-layer.md 通信层 L4
02-state-management.md 状态管理 L4
03-security-auth.md 安全认证 L4

1.2 核心功能 (Core Features)

文档 功能 成熟度 测试覆盖
00-chat-interface.md 聊天界面 L4
01-agent-clones.md Agent 分身 L4
02-hands-system.md Hands 系统 L3
03-workflow-engine.md 工作流引擎 L3
04-team-collaboration.md 团队协作 L3
05-swarm-coordination.md 多 Agent 协作 L4

1.3 智能层 (Intelligence Layer)

文档 功能 成熟度 测试覆盖
00-agent-memory.md Agent 记忆 L4
01-identity-evolution.md 身份演化 L4
02-context-compaction.md 上下文压缩 L4
03-reflection-engine.md 自我反思 L4
04-heartbeat-proactive.md 心跳巡检 L4
05-autonomy-manager.md 自主授权 L4

1.4 上下文数据库 (Context Database)

文档 功能 成熟度 测试覆盖
00-openviking-integration.md OpenViking 集成 L4
01-vector-memory.md 向量记忆 L3
02-session-persistence.md 会话持久化 L4
03-memory-extraction.md 记忆提取 L4

1.5 Skills 生态

文档 功能 成熟度 测试覆盖
00-skill-system.md Skill 系统概述 L4
01-builtin-skills.md 内置技能 (74个) L4 N/A
02-skill-discovery.md 技能发现 L4

1.6 Hands 系统

文档 功能 成熟度 测试覆盖
00-hands-overview.md Hands 概述 (7个) L3

1.7 Tauri 后端

文档 功能 成熟度 测试覆盖
00-openfang-integration.md OpenFang 集成 L4
01-secure-storage.md 安全存储 L4
02-local-gateway.md 本地 Gateway L4

二、后续工作计划

📋 详细计划见 roadmap.md | 🧠 头脑风暴见 brainstorming-notes.md

2.1 短期计划 (1-2 周)

ID 任务 优先级 状态
S1 完善功能文档覆盖 P0 进行中
S2 添加用户反馈入口 P0 待开始
S3 优化记忆检索性能 P0 待开始
S4 优化审批 UI P1 待开始
S5 添加消息搜索功能 P1 待开始
S6 优化错误提示 P1 待开始

2.2 中期计划 (1-2 月)

ID 任务 价值 风险
M1 记忆图谱可视化
M2 技能市场 MVP
M3 主动学习引擎
M4 工作流编辑器

2.3 关键决策待定

  1. 目标用户定位: 个人 vs 团队 vs 企业?
  2. 记忆存储策略: 纯本地 vs 可选云同步?
  3. 开源策略: 完全开源 vs 核心闭源?
  4. 定价策略: 免费 vs 付费 vs 混合?

三、功能优先级矩阵 (ICE 评分)

功能 Impact Confidence Ease ICE 分 状态
Agent 记忆 10 9 7 630 已完成
身份演化 8 9 9 648 已完成
上下文压缩 9 8 6 432 已完成
心跳巡检 9 8 6 432 已完成
多 Agent 协作 9 6 4 216 已完成
自主授权 8 7 5 280 已完成
向量记忆 9 7 5 315 已完成
会话持久化 7 9 8 504 已完成

评分说明:

  • Impact (影响): 10 = 决定性功能1 = 边缘功能
  • Confidence (信心): 10 = 完全确定1 = 高度不确定
  • Ease (容易度): 10 = 极易实现1 = 极难实现
  • ICE 分 = Impact × Confidence × Ease

三、成熟度等级定义

等级 名称 描述
L0 概念 有设计想法,未实现
L1 原型 基本可用,有已知问题
L2 可用 功能完整,有测试
L3 成熟 稳定可靠,有文档
L4 生产 经过验证,可扩展

四、模块依赖关系

┌─────────────────────────────────────────────────────────────┐
│                      UI 组件层                               │
│  ChatArea │ SwarmDashboard │ RightPanel │ Settings          │
└─────────────────────────────┬───────────────────────────────┘
                              │
┌─────────────────────────────▼───────────────────────────────┐
│                      状态管理层                              │
│  chatStore │ connectionStore │ handStore │ configStore      │
└─────────────────────────────┬───────────────────────────────┘
                              │
┌─────────────────────────────▼───────────────────────────────┐
│                      智能层                                  │
│  AgentMemory │ ReflectionEngine │ AutonomyManager           │
└─────────────────────────────┬───────────────────────────────┘
                              │
┌─────────────────────────────▼───────────────────────────────┐
│                      通信层                                  │
│  GatewayClient │ VikingClient │ TauriGateway                │
└─────────────────────────────┬───────────────────────────────┘
                              │
┌─────────────────────────────▼───────────────────────────────┐
│                      后端层                                  │
│  OpenFang Kernel │ OpenViking Server │ Tauri Backend        │
└─────────────────────────────────────────────────────────────┘

五、关键指标

指标 数值
功能模块总数 25+
Skills 数量 74
Hands 数量 7
测试用例 317
测试通过率 100%
代码行数 (前端) ~15,000
代码行数 (后端) ~2,000

六、变更历史

日期 版本 变更内容
2026-03-16 v1.0 初始版本,完成全部功能文档