fix(audit): 修复深度审计 P1/P2 问题 — 记忆统一、持久化、前端适配
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
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
H3: 重写 memory_commands.rs 统一到 VikingStorage 单一存储,移除双写 H4: 心跳引擎 record_interaction() 持久化到 VikingStorage,启动时恢复 M4: 反思结果/状态持久化到 VikingStorage metadata,重启后自动恢复 - HandApprovalModal import 修正 (handStore 替代 gatewayStore) - kernel-client.ts 幽灵调用替换为 kernel_status - PersistentMemoryStore dead_code warnings 清理 - 审计报告和 README 更新至 v0.6.3,完成度 58%→62%
This commit is contained in:
@@ -1,12 +1,12 @@
|
||||
# ZCLAW 功能全景文档
|
||||
|
||||
> **版本**: v0.6.2
|
||||
> **版本**: v0.6.3
|
||||
> **更新日期**: 2026-03-27
|
||||
> **项目状态**: 完整 Rust Workspace 架构,10 个核心 Crates,69 技能,Pipeline DSL + Smart Presentation + Agent Growth System
|
||||
> **整体完成度**: ~58% (基于 2026-03-27 深度审计 + P0/P1 修复后)
|
||||
> **整体完成度**: ~62% (基于 2026-03-27 深度审计 + 两轮修复后)
|
||||
> **架构**: Tauri 桌面应用,Rust Workspace (10 crates) + React 前端
|
||||
>
|
||||
> **审计修复 (2026-03-27)**: 修复 2 个 CRITICAL + 4 个 HIGH + 1 个 MEDIUM 问题,详见 [DEEP_AUDIT_REPORT.md](./DEEP_AUDIT_REPORT.md)
|
||||
> **审计修复 (2026-03-27)**: 修复 2 个 CRITICAL + 6 个 HIGH + 2 个 MEDIUM 问题,详见 [DEEP_AUDIT_REPORT.md](./DEEP_AUDIT_REPORT.md)
|
||||
|
||||
> **重要**: ZCLAW 采用 Rust Workspace 架构,包含 10 个分层 Crates (types → memory → runtime → kernel → skills/hands/protocols/pipeline/growth/channels),所有核心能力集成在 Tauri 桌面应用中
|
||||
|
||||
@@ -38,11 +38,11 @@
|
||||
| [00-agent-memory.md](02-intelligence-layer/00-agent-memory.md) | Agent 记忆 | L3-L4 (90%) | ✅ pre-hook (FTS5+TF-IDF+Embedding) | ✅ SqliteStorage |
|
||||
| [01-identity-evolution.md](02-intelligence-layer/01-identity-evolution.md) | 身份演化 | L2 (70%) | ✅ pre-hook (SOUL.md → system prompt) | ✅ Rust 实现 |
|
||||
| [06-context-compaction.md](02-intelligence-layer/06-context-compaction.md) | 上下文压缩 | L2-L3 (75%) | ✅ 已接入内核 (AgentLoop, LLM 摘要) | ✅ Rust 实现 |
|
||||
| [03-reflection-engine.md](02-intelligence-layer/03-reflection-engine.md) | 自我反思 | L2 (55%) | ✅ post-hook (自动触发 + 真实记忆) | ✅ Rust 实现 |
|
||||
| 心跳巡检 | 心跳巡检 | L2-L3 (70%) | ✅ post-hook (record_interaction) | ✅ Rust 实现 |
|
||||
| [03-reflection-engine.md](02-intelligence-layer/03-reflection-engine.md) | 自我反思 | L2 (60%) | ✅ post-hook (自动触发 + 真实记忆 + 持久化) | ✅ Rust 实现 |
|
||||
| 心跳巡检 | 心跳巡检 | L2-L3 (70%) | ✅ post-hook (record_interaction + VikingStorage 持久化) | ✅ Rust 实现 |
|
||||
| [05-autonomy-manager.md](02-intelligence-layer/05-autonomy-manager.md) | 自主授权 | L2-L3 (75%) | ✅ RightPanel 'autonomy' | ✅ TypeScript |
|
||||
|
||||
> **智能层集成说明** (2026-03-27): 通过 `intelligence_hooks.rs` 将 identity、memory context、heartbeat、reflection 接入 `agent_chat_stream` 流程。compactor 已在内核 AgentLoop 集成 (15k token 阈值)。反思引擎已修复空记忆 bug (C2),现在从 VikingStorage 查询真实记忆进行分析。已清理死代码: pattern_detector、recommender、mesh、persona_evolver、trigger_evaluator。
|
||||
> **智能层集成说明** (2026-03-27): 通过 `intelligence_hooks.rs` 将 identity、memory context、heartbeat、reflection 接入 `agent_chat_stream` 流程。compactor 已在内核 AgentLoop 集成 (15k token 阈值)。反思引擎已修复空记忆 bug (C2),现在从 VikingStorage 查询真实记忆进行分析。反思结果和状态已持久化到 VikingStorage metadata,重启后自动恢复 (H4/M4)。心跳引擎交互记录已持久化,idle-greeting 检查跨重启生效 (H4)。记忆系统已统一到 VikingStorage 单一存储 (H3)。已清理死代码: pattern_detector、recommender、mesh、persona_evolver、trigger_evaluator。
|
||||
|
||||
### 1.4 上下文数据库 (Context Database)
|
||||
|
||||
@@ -289,6 +289,7 @@ skills hands protocols pipeline growth channels
|
||||
|
||||
| 日期 | 版本 | 变更内容 |
|
||||
|------|------|---------|
|
||||
| 2026-03-27 | v0.6.3 | **审计修复 (P1/P2)**: H3 记忆双存储统一到 VikingStorage、H4 心跳引擎持久化 + 启动恢复、M4 反思结果持久化。整体完成度 58%→62%。|
|
||||
| 2026-03-27 | v0.6.2 | **审计修复 (P0/P1)**: C1 PromptOnly LLM 集成、C2 反思引擎空记忆修复、H7 Agent Store 接口适配、H8 Hand 审批检查、M1 幽灵命令注册、H1/H2 demo 标记、H5 归档过时报告。整体完成度 50%→58%。|
|
||||
| 2026-03-27 | v0.6.1 | **功能完整性修复**: 激活 LoopGuard 循环防护、实现 CapabilityManager.validate() 安全验证、handStore/workflowStore KernelClient 适配器、Credits 标注开发中、Skills 动态化、ScheduledTasks localStorage 降级、token 用量追踪 |
|
||||
| 2026-03-27 | v0.6.0a | **全面审计更新**:所有成熟度标注调整为实际完成度 (平均 68%),新增清理记录 |
|
||||
@@ -322,7 +323,16 @@ skills hands protocols pipeline growth channels
|
||||
| TwitterHand demo 标记 | H2 | 添加 `"demo"` 标签到 twitter.rs 和 twitter.HAND.toml |
|
||||
| 归档过时报告 | H5 | VERIFICATION_REPORT.md 顶部添加归档声明 |
|
||||
|
||||
### 7.2 代码清理
|
||||
### 7.2 审计修复 (P1/P2 第二轮)
|
||||
|
||||
| 修复项 | ID | 说明 |
|
||||
|--------|-----|------|
|
||||
| 记忆双存储统一 | H3 | 完全重写 `memory_commands.rs`,统一委派到 VikingStorage,移除 PersistentMemoryStore 双写 |
|
||||
| 心跳引擎持久化 | H4 | `record_interaction()` 持久化到 VikingStorage metadata,`heartbeat_init()` 启动时恢复 |
|
||||
| 反思结果持久化 | M4 | `reflect()` 后持久化 ReflectionState/Result 到 VikingStorage,重启后自动恢复 |
|
||||
| 清理 dead_code warnings | — | PersistentMemoryStore impl 添加 `#[allow(dead_code)]`,移除未使用的 `build_uri` |
|
||||
|
||||
### 7.3 代码清理
|
||||
|
||||
| 清理项 | 说明 |
|
||||
|--------|------|
|
||||
|
||||
Reference in New Issue
Block a user