refactor(skills): add skill-adapter and refactor SkillMarket

- Add skill-adapter.ts to bridge configStore and UI skill formats
- Refactor SkillMarket to use new skill-adapter instead of skill-discovery
- Add health check state to connectionStore
- Update multiple components with improved typing
- Clean up test artifacts and add new test results
- Update README and add skill-market-mvp plan

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
iven
2026-03-21 00:28:03 +08:00
parent 54ccc0a7b0
commit 48a430fc97
50 changed files with 1523 additions and 360 deletions

View File

@@ -8,8 +8,8 @@
*/
import { useState, useEffect, useCallback, useMemo } from 'react';
import { useGatewayStore } from '../../store/gatewayStore';
import { useWorkflowStore } from '../../store/workflowStore';
import { useHandStore } from '../../store/handStore';
import { useWorkflowStore, type Workflow } from '../../store/workflowStore';
import {
type AutomationItem,
type CategoryType,
@@ -51,15 +51,14 @@ export function AutomationPanel({
onSelect,
showBatchActions = true,
}: AutomationPanelProps) {
// Store state - use gatewayStore which has the actual data
const hands = useGatewayStore(s => s.hands);
const workflows = useGatewayStore(s => s.workflows);
const isLoading = useGatewayStore(s => s.isLoading);
const loadHands = useGatewayStore(s => s.loadHands);
const loadWorkflows = useGatewayStore(s => s.loadWorkflows);
const triggerHand = useGatewayStore(s => s.triggerHand);
// workflowStore for triggerWorkflow (not in gatewayStore)
const triggerWorkflow = useWorkflowStore(s => s.triggerWorkflow);
// Store state - use domain stores
const hands = useHandStore((s) => s.hands);
const workflows = useWorkflowStore((s) => s.workflows);
const isLoading = useHandStore((s) => s.isLoading) || useWorkflowStore((s) => s.isLoading);
const loadHands = useHandStore((s) => s.loadHands);
const loadWorkflows = useWorkflowStore((s) => s.loadWorkflows);
const triggerHand = useHandStore((s) => s.triggerHand);
const triggerWorkflow = useWorkflowStore((s) => s.triggerWorkflow);
// UI state
const [selectedCategory, setSelectedCategory] = useState<CategoryType>(initialCategory);