feat: complete Phase 1-3 architecture optimization

Phase 1 - Security:
- Add AES-GCM encryption for localStorage fallback
- Enforce WSS protocol for non-localhost WebSocket connections
- Add URL sanitization to prevent XSS in markdown links

Phase 2 - Domain Reorganization:
- Create Intelligence Domain with Valtio store and caching
- Add unified intelligence-client for Rust backend integration
- Migrate from legacy agent-memory, heartbeat, reflection modules

Phase 3 - Core Optimization:
- Add virtual scrolling for ChatArea with react-window
- Implement LRU cache with TTL for intelligence operations
- Add message virtualization utilities

Additional:
- Add OpenFang compatibility test suite
- Update E2E test fixtures
- Add audit logging infrastructure
- Update project documentation and plans

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
iven
2026-03-21 22:11:50 +08:00
parent 815c56326b
commit ce562e8bfc
36 changed files with 5241 additions and 201 deletions

View File

@@ -138,7 +138,8 @@ pub async fn memory_delete(
.as_ref()
.ok_or_else(|| "Memory store not initialized".to_string())?;
store.delete(&id).await
store.delete(&id).await?;
Ok(())
}
/// Delete all memories for an agent
@@ -153,7 +154,7 @@ pub async fn memory_delete_all(
.as_ref()
.ok_or_else(|| "Memory store not initialized".to_string())?;
store.delete_all_for_agent(&agent_id).await
store.delete_by_agent(&agent_id).await
}
/// Get memory statistics