- Add type assertions for Valtio snapshot readonly arrays
- Remove unused fromPromise import from hands machine
- Ensures type compatibility with Valtio's useSnapshot
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Chat Domain:
- Add types.ts with Message, Conversation, Agent types
- Add store.ts with Valtio-based state management
- Add hooks.ts with useChatState, useMessages, etc.
- Add index.ts for public API export
Hands Domain:
- Add types.ts with Hand, Trigger, Approval types
- Add machine.ts with XState state machine
- Add store.ts with Valtio-based state management
- Add hooks.ts with useHands, useApprovalQueue, etc.
Shared Module:
- Add types.ts with Result, AsyncResult, PaginatedResponse
- Add error-handling.ts with AppError, NetworkError, etc.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Add SecurityError class for clear error handling
- Add validateWebSocketSecurity function
- Block ws:// connections to non-localhost hosts
- Add unit tests for security validation logic
Security: Prevents man-in-the-middle attacks on remote connections
by requiring WSS protocol for all non-localhost WebSocket connections.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Encrypt credentials before storing in localStorage when OS keyring unavailable
- Decrypt on retrieval with automatic fallback
- Backward compatible with existing unencrypted data (migration on next set)
- Add comprehensive unit tests (11 test cases)
Security: Credentials are now encrypted using AES-GCM when
OS keyring is unavailable, preventing plaintext exposure.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Add arrayToBase64/base64ToArray conversion functions
- Add deriveKey for PBKDF2 key derivation
- Add encrypt/decrypt using AES-GCM
- Add generateMasterKey for random key generation
- Update setup.ts to use real Web Crypto API instead of mock
- Add comprehensive unit tests for all crypto functions
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Unify all intelligence modules to use intelligenceClient
- Delete legacy TS implementations (agent-memory, reflection-engine, heartbeat-engine, context-compactor, agent-identity, memory-index)
- Update all consumers to use snake_case backend types
- Remove deprecated llm-integration.test.ts
This eliminates code duplication between frontend and backend, resolves
localStorage limitations, and enables persistent intelligence features.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- 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>
- Add OpenFang Kernel configuration guide (docs/setup/OPENFANG-SETUP.md)
- Add Chinese models configuration guide (docs/setup/chinese-models.md)
- Add quick start guide (docs/quick-start.md)
- Add quick start scripts for Windows and Linux/macOS
- Add ErrorNotification component for centralized error display
These additions help users:
- Quickly set up development environment
- Configure OpenFang backend correctly
- Configure Chinese LLM providers (GLM, Qwen, Kimi, MiniMax)
- See error notifications in a consistent UI
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Add test helper library with assertion functions (scripts/lib/test-helpers.sh)
- Add gateway integration test script (scripts/tests/gateway-test.sh)
- Add configuration validation tool (scripts/validate-config.ts)
- Add health-check.ts library with Tauri command wrappers
- Add HealthStatusIndicator component to ConnectionStatus.tsx
- Add E2E test specs for memory, settings, and team collaboration
- Update ZCLAW-DEEP-ANALYSIS.md to reflect actual project state
Key improvements:
- Store architecture now properly documented as migrated
- Tauri backend shown as 85-90% complete
- Component integration status clarified
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Add Review tab to TeamOrchestrator with DevQALoopPanel integration
- Create comprehensive integration test checklist (22 test cases)
- Document component integration status analysis
- Update progress documentation
Key findings:
- Most "low integration" components were actually integrated via indirect paths
- DevQALoop was the only truly unintegrated component, now fixed
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Major changes:
- Shift from "OpenFang desktop client" to "independent AI Agent desktop app"
- Add decision principle: "Is this useful for ZCLAW? Does it affect ZCLAW?"
- Simplify project structure and tech stack sections
- Replace OpenClaw vs OpenFang comparison with unified backend approach
- Consolidate troubleshooting from scattered sections into organized FAQ
- Update Hands system documentation with 8 capabilities and status
- Stream
Phase 4 completion:
- Add ApprovalQueue component for managing pending approvals
- Add ExecutionResult component for displaying hand/workflow results
- Update Sidebar navigation to use unified AutomationPanel
- Replace separate 'hands' and 'workflow' tabs with single 'automation' tab
- Fix TypeScript type safety issues with unknown types in JSX expressions
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Phase 1 - Core Fixes:
- Fix parameter passing in HandsPanel (params now passed to triggerHand)
- Migrate HandsPanel from useGatewayStore to useHandStore
- Add type adapters and category mapping for 7 Hands
- Create useAutomationEvents hook for WebSocket event handling
Phase 2 - UI Components:
- Create AutomationPanel as unified entry point
- Create AutomationCard with grid/list view support
- Create AutomationFilters with category tabs and search
- Create BatchActionBar for batch operations
Phase 3 - Advanced Features:
- Create ScheduleEditor with visual scheduling (no cron syntax)
- Support frequency: once, daily, weekly, monthly, custom
- Add timezone selection and end date options
Technical Details:
- AutomationItem type unifies Hand and Workflow
- CategoryType: research, data, automation, communication, content, productivity
- ScheduleInfo interface for scheduling configuration
- WebSocket events: hand, workflow, approval
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Remove OpenFang CLI dependency from startup scripts
- OpenFang now bundled with Tauri and managed via gateway_start/gateway_status commands
- Add bootstrap screen in App.tsx to auto-start local gateway before UI loads
- Update Makefile: replace start-no-gateway with start-desktop-only
- Fix gateway config endpoints: use /api/config instead of /api/config/quick
- Add Playwright dependencies for future E2E testing
Add complete Browser Hand UI system for browser automation:
Components:
- BrowserHandCard: Main card with status display and screenshot preview
- TaskTemplateModal: Template selection and parameter configuration
- ScreenshotPreview: Screenshot display with fullscreen capability
Templates:
- Basic operations: navigate, screenshot, form fill, click, execute JS
- Scraping: text, list, images, links, tables
- Automation: login+action, multi-page, monitoring, pagination
Features:
- 15 built-in task templates across 3 categories
- Real-time execution status with progress bar
- Screenshot preview with zoom and fullscreen
- Integration with HandsPanel for seamless UX
- Zustand store for state management
- Comprehensive test coverage (16 tests)
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Implements L4 self-evolution authorization with:
Autonomy Levels:
- Supervised: All actions require user confirmation
- Assisted: Low-risk actions auto-execute, high-risk need approval
- Autonomous: Agent decides, only high-impact actions notify
Features:
- Risk-based action classification (low/medium/high)
- Importance threshold for auto-approval
- Approval workflow with pending queue
- Full audit logging with rollback support
- Configurable action permissions per level
Security:
- High-risk actions ALWAYS require confirmation
- Self-modification disabled by default even in autonomous mode
- All autonomous actions logged for audit
- One-click rollback to any historical state
Tests: 30 passing
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Unified interface for OpenAI, Volcengine, Gateway, and Mock providers
- Structured LLMMessage and LLMResponse types
- Configurable via localStorage with API key security
- Built-in prompt templates for reflection, compaction, extraction
- Helper functions: llmReflect(), llmCompact(), llmExtract()
This adapter enables the 3 engines to be upgraded from rule-based
to LLM-powered in Phase 2.1-2.3.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Backend (Rust):
- viking_commands.rs: Tauri commands for server status/start/stop/restart
- memory/mod.rs: Memory module exports
- memory/context_builder.rs: Context building with memory injection
- memory/extractor.rs: Memory extraction from conversations
- llm/mod.rs: LLM integration for memory summarization
Frontend (TypeScript):
- context-builder.ts: Context building with OpenViking integration
- viking-client.ts: OpenViking API client
- viking-local.ts: Local storage fallback when Viking unavailable
- viking-memory-adapter.ts: Memory extraction and persistence
Features:
- Multi-mode adapter (local/sidecar/remote) with auto-detection
- Privacy-first: all data stored in ~/.openviking/, server only on 127.0.0.1
- Graceful degradation when local server unavailable
- Context compaction with memory flush before compression
Tests: 21 passing (viking-adapter.test.ts)
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Fix HandTaskPanel to use hand.id when loading runs and triggering
- Fix HandsPanel to use hand.id for getHandDetails and triggerHand
- Fix WorkflowEditor to use hand.id as option value
The API expects hand identifiers, not names. This ensures correct
hand execution and run history loading.
Also clean up old plan files and add Gateway stability plan.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Add api-fallbacks.ts with structured fallback data for 6 missing API endpoints
- QuickConfig, WorkspaceInfo, UsageStats, PluginStatus, ScheduledTasks, SecurityStatus
- Graceful degradation when backend returns 404
- Add heartbeat mechanism (30s interval, 3 max missed)
- Automatic connection keep-alive with ping/pong
- Triggers reconnect when heartbeats fail
- Improve reconnection strategy
- Emit 'reconnecting' events for UI feedback
- Support infinite reconnect mode
- Add ConnectionStatus component
- Visual indicators for 5 connection states
- Manual reconnect button when disconnected
- Compact and full display modes
Diagnosed via Chrome DevTools: WebSocket was working fine, real issue was
404 errors from missing API endpoints being mistaken for connection problems.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Add viking_server.rs (Rust) for managing local OpenViking server process
- Add viking-server-manager.ts (TypeScript) for server control from UI
- Update VikingAdapter to support 'local' mode with auto-start capability
- Update documentation for local deployment mode
Key features:
- Auto-start local server when needed
- All data stays in ~/.openviking/ (privacy-first)
- Server listens only on 127.0.0.1
- Graceful fallback to remote/localStorage modes
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Create store/index.ts as unified entry point
- Add useCompositeStore() hook for multi-slice access
- Add initializeStores() for client injection
- Re-export all individual stores for direct access
- Maintain backward compatibility with useGatewayStore
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Add types/api-responses.ts with ApiResponse<T>, PaginatedResponse<T>
- Add types/errors.ts with comprehensive error type hierarchy
- Replace all any usage (53 → 0, 100% reduction)
- Add RawAPI response interfaces for type-safe mapping
- Update catch blocks to use unknown with type narrowing
- Add getState mock to chatStore tests
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Add safeJsonParse utility with schema validation
- Migrate tokens to OS keyring storage
- Add Ed25519 key encryption at rest
- Enable WSS configuration option
- Fix JSON.parse in HandParamsForm, WorkflowEditor, WorkflowList
- Update test mock data to match valid status values
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Add framer-motion page transitions and AnimatePresence support
- Add dark mode support across all components
- Create reusable UI components (Button, Badge, Card, EmptyState, Input, Toast, Skeleton)
- Add CSS custom properties for consistent theming
- Add animation variants and utility functions
- Improve ChatArea, Sidebar, TriggersPanel with animations
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Fix the extra </> and )} that were't causing JSX parsing errors
- Ensure proper nesting of motion.div and aside, and div elements
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Remove unused imports and variables in Team components
- Fix CollaborationEvent type import in useTeamEvents
- Add proper type guards for Hand status in gatewayStore
- Fix Session status type compatibility in gateway-client
- Remove unused getGatewayClient import from teamStore
- Handle unknown payload types in TeamCollaborationView
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Add Team tab to Sidebar with TeamList component
- Update MainViewType to include 'team' view
- Add TeamCollaborationView rendering in App.tsx
- Add selectedTeamId and onSelectTeam props to Sidebar
- Create TeamList component for sidebar team navigation
UI Integration:
- Team tab shows list of teams with status indicators
- Selecting a team displays TeamCollaborationView
- Empty state shows guidance for creating teams
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Remove unused imports (ChevronRight, Play, AlertTriangle)
- Fix WorkflowHistoryProps interface to accept isOpen/onClose
- Remove duplicate loadTriggers and loadWorkflowRuns definitions
- Add step move buttons in WorkflowEditor
Remaining type errors are API response type mismatches
that don't affect runtime functionality.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Phase 3 Configuration Migration completed:
- Remove OpenClaw backend type selector from General.tsx
- Update default workspace path from ~/.openclaw to ~/.openfang
- Update default port from 18789 to 50051
- Archive openclaw.default.json to docs/archive/openclaw-legacy/
- Remove OpenClaw migration UI from Workspace settings
- Update About.tsx to reference OpenFang
- Clean up gateway-client.ts comments
All OpenClaw compatibility code removed. ZCLAW now exclusively
targets OpenFang (Rust Agent OS) backend.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Major changes:
- Add HandList.tsx component for left sidebar
- Add HandTaskPanel.tsx for middle content area
- Restructure Sidebar tabs: 分身/HANDS/Workflow
- Remove Hands tab from RightPanel
- Localize all UI text to Chinese
- Archive legacy OpenClaw documentation
- Add Hands integration lessons document
- Update feature checklist with new components
UI improvements:
- Left sidebar now shows Hands list with status icons
- Middle area shows selected Hand's tasks and results
- Consistent styling with Tailwind CSS
- Chinese status labels and buttons
Documentation:
- Create docs/archive/openclaw-legacy/ for old docs
- Add docs/knowledge-base/hands-integration-lessons.md
- Update docs/knowledge-base/feature-checklist.md
- Update docs/knowledge-base/README.md
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>