iven
1cf3f585d3
refactor(store): split gatewayStore into specialized domain stores
...
Major restructuring:
- Split monolithic gatewayStore into 5 focused stores:
- connectionStore: WebSocket connection and gateway lifecycle
- configStore: quickConfig, workspaceInfo, MCP services
- agentStore: clones, usage stats, agent management
- handStore: hands, approvals, triggers, hand runs
- workflowStore: workflows, workflow runs, execution
- Update all components to use new stores with selector pattern
- Remove
2026-03-20 22:14:13 +08:00
iven
137f1a32fa
feat: implement Phase 4 - Multi-Agent Swarm + Skill Discovery
...
Phase 4a: Agent Swarm Collaboration Framework (agent-swarm.ts)
- AgentSwarm class with configurable coordinator + specialist agents
- Three collaboration modes: Sequential (chain), Parallel (concurrent), Debate (multi-round)
- Auto task decomposition based on specialist capabilities
- Debate consensus detection with keyword similarity heuristic
- Rule-based result aggregation with structured markdown output
- Specialist management (add/update/remove) and config updates
- History persistence to localStorage (last 25 tasks)
- Memory integration: saves task completion as lesson memories
Phase 4b: Skill Discovery Engine (skill-discovery.ts)
- SkillDiscoveryEngine with 12 built-in skill definitions from skills/ directory
- Multi-signal search: name, description, triggers, capabilities, category matching
- Conversation-based skill recommendation via topic extraction (CN + EN patterns)
- Memory-augmented confidence scoring for suggestions
- Skill registration, install status toggle, category filtering
- localStorage persistence for skill index and suggestion cache
Phase 4c: chatStore Integration
- dispatchSwarmTask(description, style): creates and executes swarm task, adds result as message
- searchSkills(query): exposes skill search to UI layer
Tests: 317 passing across 13 test files (43 new for swarm + skills)
- AgentSwarm: createTask, sequential/parallel/debate execution, history, specialist mgmt
- SkillDiscovery: search, suggest, register, persist, categories
Refs: ZCLAW_AGENT_INTELLIGENCE_EVOLUTION.md updated - all 4 phases complete
2026-03-15 22:44:18 +08:00