- 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 valtio for Proxy-based state management
- Add xstate and @xstate/react for state machines
- Create domains directory structure (chat, hands, intelligence, skills)
- Create shared directory for common utilities
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 test for base64 string output
- Add test for 32-byte key length
- Add test for uniqueness
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>
- Add @vitest/coverage-v8@2.1.8 matching vitest version
- Required for test:coverage script to work
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Add vitest.config.ts with jsdom environment and path aliases
- Add tests/setup.ts with mocks for Tauri API, crypto, and localStorage
- Add test:coverage script to package.json
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Install testing framework dependencies for unit testing:
- vitest@2.1.8 - Test runner
- @testing-library/react@16.1.0 - React component testing
- @testing-library/jest-dom@6.6.3 - Jest DOM matchers
- jsdom@25.0.1 - DOM simulation environment
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Fix mock path in setup.ts to use @ alias
- Add Web Crypto polyfill for Node.js test environment
- Use pnpm exec for vitest version check
- Update Task 4.1 to note existing isLocalhost function
- Add cross-platform notes for Windows users
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Comprehensive design for 14-week architecture overhaul:
- VZustand for fine-grained reactivity
- Web Worker isolation for security
- XState for Hands state machine
- Domain-driven directory structure
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Rewrite context-compactor.test.ts to use intelligenceClient
- Rewrite heartbeat-reflection.test.ts to use intelligenceClient
- Rewrite swarm-skills.test.ts to use intelligenceClient
- Update CLAUDE.md architecture section for unified intelligence layer
All tests now mock Tauri backend calls for unit testing.
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 Bash version (real-integration-test.sh) for Linux/macOS
- Add PowerShell version (real-integration-test.ps1) for Windows
- Tests cover: Gateway connection, Model config, Agent management, API Key validation, Chat functionality, Hands triggers, Memory persistence, Configuration validation
- Update plan file to reflect P0 progress and completed P2 tasks
These scripts enable validation against real OpenFang Kernel instead of mocks.
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>
Key changes:
- Extend existing stores instead of creating new automationStore
- Use type adapter pattern instead of new type hierarchy
- Add explicit HandParamsForm parameter passing fix
- Add category mapping for 7 existing Hands
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Design for Hands/Workflow unified automation panel with:
- Visual scheduler without cron syntax
- Result stream integration into chat
- Batch operations (trigger, approve, configure)
- Real-time status via WebSocket
- Offline queue and error recovery
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
- Replace pwsh with powershell for Windows compatibility
- Add -DesktopOnly flag to skip all external services
- Add automatic port 1420 cleanup before starting
- Improve stop command to kill all related processes
- Update package.json scripts for easier access
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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>
- Update OPENVIKING_INTEGRATION with latest status
- Remove outdated plan files (now archived in docs/archive/)
- Clean up redundant documentation
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Add build artifacts to .gitignore (binaries/, *.exe, *.pdb)
- Update WORK_SUMMARY with latest progress
- Remove outdated plan files (moved to docs/archive/plans/)
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>