refactor: 清理未使用代码并添加未来功能标记
Some checks failed
CI / Rust Check (push) Has been cancelled
CI / Lint & TypeCheck (push) Has been cancelled
CI / Unit Tests (push) Has been cancelled
CI / Build Frontend (push) Has been cancelled
CI / Security Scan (push) Has been cancelled
CI / E2E Tests (push) Has been cancelled

style: 统一代码格式和注释风格

docs: 更新多个功能文档的完整度和状态

feat(runtime): 添加路径验证工具支持

fix(pipeline): 改进条件判断和变量解析逻辑

test(types): 为ID类型添加全面测试用例

chore: 更新依赖项和Cargo.lock文件

perf(mcp): 优化MCP协议传输和错误处理
This commit is contained in:
iven
2026-03-25 21:55:12 +08:00
parent aa6a9cbd84
commit bf6d81f9c6
109 changed files with 12271 additions and 815 deletions

View File

@@ -3,7 +3,7 @@
> **分类**: 架构层
> **优先级**: P0 - 决定性
> **成熟度**: L4 - 生产
> **最后更新**: 2026-03-24
> **最后更新**: 2026-03-25
> **验证状态**: ✅ 代码已验证
---
@@ -19,7 +19,11 @@
| 分类 | 架构层 |
| 优先级 | P0 |
| 成熟度 | L4 |
| 依赖 | Tauri Runtime |
| 依赖 | Tauri Runtime 2.x |
| Tauri 命令数量 | **80+** |
| Rust Crates | 8 个 (types, memory, runtime, kernel, skills, hands, protocols, pipeline) |
| 前端代码量 | ~30,000 行 TypeScript/React |
| 后端代码量 | ~15,000 行 Rust |
### 1.2 相关文件

View File

@@ -3,7 +3,7 @@
> **分类**: 架构层
> **优先级**: P0 - 决定性
> **成熟度**: L4 - 生产
> **最后更新**: 2026-03-24
> **最后更新**: 2026-03-25
> **验证状态**: ✅ 代码已验证
---
@@ -20,28 +20,32 @@
| 优先级 | P0 |
| 成熟度 | L4 |
| 依赖 | 无 |
| Store 数量 | **16+** |
| Store 数量 | **18+** |
| Domains 数量 | 4 (chat, hands, intelligence, shared) |
| 匁久化策略 | localStorage + IndexedDB (计划中) |
### 1.2 相关文件
### 1.2 Store 清单 (18+)
| 文件 | 路径 | 用途 | 验证状态 |
| Store | 路径 | 用途 | 验证状态 |
|------|------|------|---------|
| 连接 Store | `desktop/src/store/connectionStore.ts` | 连接状态管理 | ✅ 存在 |
| 聊天 Store | `desktop/src/store/chatStore.ts` | 消息和会话管理 | ✅ 存在 |
| 配置 Store | `desktop/src/store/configStore.ts` | 配置持久化 | ✅ 存在 |
| Agent Store | `desktop/src/store/agentStore.ts` | Agent 克隆管理 | ✅ 存在 |
| Hand Store | `desktop/src/store/handStore.ts` | Hands 触发管理 | ✅ 存在 |
| 工作流 Store | `desktop/src/store/workflowStore.ts` | 工作流管理 | ✅ 存在 |
| 团队 Store | `desktop/src/store/teamStore.ts` | 团队协作管理 | ✅ 存在 |
| Gateway Store | `desktop/src/store/gatewayStore.ts` | Gateway 客户端状态 | ✅ 存在 |
| 安全 Store | `desktop/src/store/securityStore.ts` | 安全配置管理 | ✅ 存在 |
| 会话 Store | `desktop/src/store/sessionStore.ts` | 会话持久化 | ✅ 存在 |
| 记忆图谱 Store | `desktop/src/store/memoryGraphStore.ts` | 记忆图谱状态 | ✅ 存在 |
| 离线 Store | `desktop/src/store/offlineStore.ts` | 离线模式管理 | ✅ 存在 |
| 主动学习 Store | `desktop/src/store/activeLearningStore.ts` | 主动学习状态 | ✅ 存在 |
| Browser Hand Store | `desktop/src/store/browserHandStore.ts` | Browser Hand 状态 | ✅ 存在 |
| 反馈 Store | `desktop/src/components/Feedback/feedbackStore.ts` | 反馈状态 | ✅ 存在 |
| 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 克隆管理 | ✅ 存在 |
| 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 演化状态 | ✅ 存在 |
### 1.3 Domain Stores (领域状态)
@@ -161,6 +165,76 @@ interface ChatActions {
}
```
**workflowBuilderStore** (工作流构建器):
```typescript
interface WorkflowBuilderState {
// Canvas state
canvas: WorkflowCanvas | null;
workflows: WorkflowCanvas[];
// Selection
selectedNodeId: string | null;
selectedEdgeId: string | null;
// UI state
isDragging: boolean;
isDirty: boolean;
isPreviewOpen: boolean;
validation: ValidationResult | null;
// Templates
templates: WorkflowTemplate[];
// Available items for palette
availableSkills: Array<{ id: string; name: string; description: string }>;
availableHands: Array<{ id: string; name: string; actions: string[] }>;
}
```
**meshStore** (自适应智能网格):
```typescript
interface MeshState {
recommendations: WorkflowRecommendation[];
patterns: BehaviorPattern[];
config: MeshConfig;
isLoading: boolean;
error: string | null;
lastAnalysis: string | null;
// Actions
analyze: () => Promise<void>;
acceptRecommendation: (recommendationId: string) => Promise<void>;
dismissRecommendation: (recommendationId: string) => Promise<void>;
recordActivity: (activity: ActivityType, context: PatternContext) => Promise<void>;
getPatterns: () => Promise<void>;
updateConfig: (config: Partial<MeshConfig>) => Promise<void>;
decayPatterns: () => Promise<void>;
}
```
**personaStore** (Persona 演化):
```typescript
interface PersonaEvolutionStore {
currentAgentId: string;
proposals: EvolutionProposal[];
history: EvolutionResult[];
isLoading: boolean;
error: string | null;
config: PersonaEvolverConfig | null;
state: PersonaEvolverState | null;
showProposalsPanel: boolean;
// Actions
runEvolution: (memories: MemoryEntryForAnalysis[]) => Promise<EvolutionResult | null>;
loadEvolutionHistory: (limit?: number) => Promise<void>;
applyProposal: (proposal: EvolutionProposal) => Promise<boolean>;
dismissProposal: (proposalId: string) => void;
}
```
### 3.3 Store 协调器
```typescript