Commit Graph

158 Commits

Author SHA1 Message Date
iven
7abfca9d5c feat(kernel): add internal ZCLAW kernel integration with Tauri
Phase 1-3 of independence architecture:
- zclaw-types: Add ToolDefinition, ToolResult, KernelConfig, ModelConfig
- zclaw-kernel: Fix AgentInfo provider field, export config module
- desktop: Add kernel_commands for internal kernel access
- Add AgentId FromStr implementation for parsing

New Tauri commands:
- kernel_init, kernel_status, kernel_shutdown
- agent_create, agent_list, agent_get, agent_delete
- agent_chat

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-22 08:37:20 +08:00
iven
185763868a feat: production readiness improvements
## Error Handling
- Add GlobalErrorBoundary with error classification and recovery
- Add custom error types (SecurityError, ConnectionError, TimeoutError)
- Fix ErrorAlert component syntax errors

## Offline Mode
- Add offlineStore for offline state management
- Implement message queue with localStorage persistence
- Add exponential backoff reconnection (1s→60s)
- Add OfflineIndicator component with status display
- Queue messages when offline, auto-retry on reconnect

## Security Hardening
- Add AES-256-GCM encryption for chat history storage
- Add secure API key storage with OS keychain integration
- Add security audit logging system
- Add XSS prevention and input validation utilities
- Add rate limiting and token generation helpers

## CI/CD (Gitea Actions)
- Add .gitea/workflows/ci.yml for continuous integration
- Add .gitea/workflows/release.yml for release automation
- Support Windows Tauri build and release

## UI Components
- Add LoadingSpinner, LoadingOverlay, LoadingDots components
- Add MessageSkeleton, ConversationListSkeleton skeletons
- Add EmptyMessages, EmptyConversations empty states
- Integrate loading states in ChatArea and ConversationList

## E2E Tests
- Fix WebSocket mock for streaming response tests
- Fix approval endpoint route matching
- Add store state exposure for testing
- All 19 core-features tests now passing

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-22 00:03:22 +08:00
iven
ce562e8bfc feat: complete Phase 1-3 architecture optimization
Phase 1 - Security:
- Add AES-GCM encryption for localStorage fallback
- Enforce WSS protocol for non-localhost WebSocket connections
- Add URL sanitization to prevent XSS in markdown links

Phase 2 - Domain Reorganization:
- Create Intelligence Domain with Valtio store and caching
- Add unified intelligence-client for Rust backend integration
- Migrate from legacy agent-memory, heartbeat, reflection modules

Phase 3 - Core Optimization:
- Add virtual scrolling for ChatArea with react-window
- Implement LRU cache with TTL for intelligence operations
- Add message virtualization utilities

Additional:
- Add OpenFang compatibility test suite
- Update E2E test fixtures
- Add audit logging infrastructure
- Update project documentation and plans

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-21 22:11:50 +08:00
iven
815c56326b docs(phase3): add integration verification report
- Track A: Chat virtual scrolling - PASS
- Track B: Hands Worker isolation - SKIPPED (architecture already secure)
- Track C: Intelligence cache - PASS (completed in Phase 2.5)

All TypeScript compilation passed, all domain implementations verified.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-21 21:27:59 +08:00
iven
a65b3d3958 feat(chat): add virtual scrolling for large message lists
- Integrate react-window v2 List component for messages > 100
- Add VirtualizedMessageList and VirtualizedMessageRow components
- Use useVirtualizedMessages hook for dynamic height measurement
- Preserve smooth animations for small message counts (< 100)
- Auto-scroll to bottom for both virtualized and non-virtualized modes

Performance improvements:
- Only render visible messages in viewport
- Dynamic height measurement for accurate positioning
- LRU cache for message content

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-21 20:43:07 +08:00
iven
35b06f2e4a docs(phase3): add core optimization implementation plan
- Track A: Chat virtual scrolling with react-window
- Track B: Hands Web Worker isolation for security
- Track C: Intelligence caching (already completed)

Plan includes:
- File structure and task breakdown
- Code examples for each component
- Verification checklist
- Integration requirements

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-21 20:03:13 +08:00
iven
32b9b41144 feat(domains): add Intelligence Domain with Valtio store and caching
- Create types.ts with frontend-friendly types
- Create cache.ts with LRU cache + TTL support
- Create store.ts wrapping intelligence-client with reactive state
- Create hooks.ts for React component integration
- Re-export backend types for compatibility

Intelligence Domain provides:
- Memory: store, search, delete with caching
- Heartbeat: init, start, stop, tick operations
- Compaction: threshold check and compact
- Reflection: conversation tracking and reflection
- Identity: load, build prompt, propose changes

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-21 20:01:47 +08:00
iven
e2fb79917b docs(phase2): add Phase 2 domain reorganization changelog
- Document completed tasks and file structure
- Record technical decisions and architecture changes
- Note verification results and next steps

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-21 19:53:07 +08:00
iven
5513d5d8e4 fix(domains): resolve TypeScript type errors in domain hooks
- 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>
2026-03-21 19:52:14 +08:00
iven
7ffd5e1531 feat(domains): create domain-driven architecture for Phase 2
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>
2026-03-21 19:47:48 +08:00
iven
20eed290f8 feat(deps): add Valtio and XState for Phase 2
- 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>
2026-03-21 19:43:12 +08:00
iven
4ac6da1c88 docs: add Phase 1 changelog
- Document security enhancements (encrypted storage, WSS enforcement)
- Document test infrastructure setup
- Document migration notes and breaking changes
- Document test results and coverage

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-21 19:33:44 +08:00
iven
32c9f93a7b feat(security): enforce WSS for non-localhost connections
- 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>
2026-03-21 17:27:56 +08:00
iven
d266a1435f feat(security): add AES-GCM encryption for localStorage fallback
- 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>
2026-03-21 17:13:50 +08:00
iven
a199434e08 test(crypto): add generateMasterKey test coverage
- 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>
2026-03-21 17:07:08 +08:00
iven
f070d9151e feat(crypto): add AES-GCM encryption utilities
- 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>
2026-03-21 17:05:15 +08:00
iven
47a84f52a2 fix(test): add @vitest/coverage-v8 dependency for coverage reports
- 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>
2026-03-21 17:00:09 +08:00
iven
2c80a2c3c2 test: add Vitest configuration and setup
- 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>
2026-03-21 16:55:44 +08:00
iven
9fc17e9d36 test(desktop): add Vitest and testing dependencies
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>
2026-03-21 16:50:38 +08:00
iven
60ddb0b1e9 fix(plan): address review feedback for Phase 1 plan
- 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>
2026-03-21 16:42:38 +08:00
iven
5edb8e347f docs(plan): add Phase 1 implementation plan
Detailed plan for Security + Testing phase (2 weeks):
- Task 1.1-1.2: Test framework setup (Vitest)
- Task 2.1-2.2: Crypto utilities module
- Task 3.1: Secure storage encryption enhancement
- Task 4.1: WSS enforcement
- Task 5.1: ChatStore unit tests
- Task 6.1-6.4: Integration and verification

Each task has bite-sized steps with exact commands and expected output.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-21 16:38:04 +08:00
iven
d1c200a243 docs(spec): revise architecture optimization spec based on review
Fixes from code review:
- Fix terminology: VZustand → Valtio
- Add terminology table for clarity
- Add existing code analysis section
- Add migration mapping table
- Remove incorrect Web Worker claims
- Update Hands section to focus on XState
- Update Intelligence cache to acknowledge existing impl
- Add detailed task breakdown with estimates
- Add performance measurement methods
- Update dependency versions to specific versions
- Add 2-week buffer to timeline

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-21 16:23:57 +08:00
iven
52c5e8a732 docs(spec): add architecture optimization design spec
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>
2026-03-21 16:16:24 +08:00
iven
e5cdd36118 docs: Add comprehensive project analysis and brainstorming session documents
- ZCLAW-DEEP-ANALYSIS-v2.md: Complete analysis covering 12 dimensions
- BRAINSTORMING-SESSION.md: Brainstorming notes on architecture, tech, performance
- OPTIMIZATION-ROADMAP.md: 4-phase implementation plan
- ISSUE-TRACKER.md: 18 issues tracked with priorities
- project-systematic-analysis-plan.md: Analysis plan document
2026-03-21 16:16:16 +08:00
iven
1900abe152 test(intelligence): update tests to use intelligenceClient
- 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>
2026-03-21 15:26:35 +08:00
iven
f3ec3c8d4c feat(intelligence): complete migration to Rust backend
- 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>
2026-03-21 15:17:39 +08:00
iven
17fb1e69aa feat(intelligence): add TypeScript frontend adapter for Rust commands
Provides unified API for calling Tauri intelligence commands:

- memory: store, search, get, delete, stats, export/import
- heartbeat: init, start, stop, tick, config management
- compactor: token estimation, threshold check, compact
- reflection: should_reflect, reflect, history, state
- identity: get/update files, proposals, snapshots

Usage:
```typescript
import { intelligence } from './intelligence-backend';
await intelligence.memory.store({ ... });
await intelligence.heartbeat.start('agent-1');
```

Part of Phase 4: Integration and documentation.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-21 00:54:31 +08:00
iven
d97c03fb28 docs(plan): update intelligence layer migration progress
Phase 2-3 complete:
- Heartbeat Engine: 
- Context Compactor: 
- Reflection Engine: 
- Agent Identity: 

Added implementation progress tracking section with:
- Completed modules table
- List of implemented Tauri commands
- Pending work items

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-21 00:53:31 +08:00
iven
ef8f5cdb43 feat(intelligence): complete Phase 2-3 migration to Rust
Phase 2 - Core Engines:
- Heartbeat Engine: Periodic proactive checks with quiet hours support
- Context Compactor: Token estimation and message summarization
  - CJK character handling (1.5 tokens per char)
  - Rule-based summary generation

Phase 3 - Advanced Features:
- Reflection Engine: Pattern analysis and improvement suggestions
- Agent Identity: SOUL.md/AGENTS.md/USER.md management
  - Proposal-based changes (requires user approval)
  - Snapshot history for rollback

All modules include:
- Tauri commands for frontend integration
- Unit tests
- Re-exported types via mod.rs

Reference: docs/plans/INTELLIGENCE-LAYER-MIGRATION.md

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-21 00:52:44 +08:00
iven
0db8a2822f feat(backend): implement Phase 1 of Intelligence Layer Migration
- Add SQLite-based persistent memory storage (persistent.rs)
- Create memory persistence Tauri commands (memory_commands.rs)
- Add sqlx dependency to Cargo.toml for SQLite support
- Update memory module to export new persistent types
- Register memory commands in Tauri invoke handler
- Add comprehensive migration plan document

Phase 1 delivers:
- PersistentMemory struct with SQLite storage
- MemoryStoreState for Tauri state management
- 10 memory commands: init, store, get, search, delete,
  delete_all, stats, export, import, db_path
- Full-text search capability
- Cross-session memory retention

Reference: docs/plans/INTELLIGENCE-LAYER-MIGRATION.md

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-21 00:36:06 +08:00
iven
48a430fc97 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>
2026-03-21 00:28:03 +08:00
iven
54ccc0a7b0 feat(test): add real environment integration test scripts
- 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>
2026-03-21 00:25:32 +08:00
iven
d3a4de2480 docs: add setup guides and error notification component
- 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>
2026-03-21 00:17:44 +08:00
iven
c5d91cf9f0 feat: add integration test framework and health check improvements
- 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>
2026-03-21 00:09:47 +08:00
iven
ce522de7e9 feat: integrate DevQALoop into TeamOrchestrator and add integration test checklist
- 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>
2026-03-20 23:27:16 +08:00
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
6f72442531 docs(guide): rewrite CLAUDE.md with ZCLAW-first perspective
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
2026-03-20 19:30:09 +08:00
iven
3518fc8ece feat(automation): complete unified automation system redesign
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>
2026-03-18 17:12:05 +08:00
iven
3a7631e035 feat(automation): implement unified automation system with Hands and Workflows
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>
2026-03-18 16:32:18 +08:00
iven
dfeb286591 docs(plan): add automation system redesign implementation plan
Four phases:
- P1: Fix core issues (param passing, store migration, WebSocket events)
- P2: UI refactor (AutomationPanel, AutomationCard, filters)
- P3: Advanced features (ScheduleEditor, batch operations)
- P4: Workflow integration (ApprovalQueue, ExecutionResult)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-18 15:55:18 +08:00
iven
c856673936 docs(spec): update automation design with review feedback
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>
2026-03-18 15:14:36 +08:00
iven
552efb513b docs(spec): add automation system redesign specification
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>
2026-03-18 15:10:55 +08:00
iven
e262200f1e 首页布局优化前 2026-03-17 23:26:16 +08:00
iven
74dbf42644 refactor(startup): simplify stack to Tauri-managed OpenFang + optional ChromeDriver
- 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
2026-03-17 14:08:03 +08:00
iven
6c6d21400c fix(scripts): use powershell instead of pwsh and add DesktopOnly mode
- 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>
2026-03-17 09:40:16 +08:00
iven
d890fa1858 feat(scripts): add unified startup scripts for full stack development
Add comprehensive startup scripts for managing all ZCLAW services:

Windows (PowerShell):
- start.ps1 / start-all.ps1 - Unified service launcher
- Supports -NoBrowser, -NoGateway, -Dev, -Stop flags

Unix (Bash):
- start.sh - Cross-platform launcher for macOS/Linux

Makefile:
- make start / make start-unix
- make desktop / make desktop-build
- make setup / make test / make clean

pnpm commands:
- pnpm start - Start all services
- pnpm start:dev - Development mode with hot reload
- pnpm start:no-browser - Skip ChromeDriver
- pnpm start:no-gateway - Skip OpenFang gateway
- pnpm desktop - Start Tauri only
- pnpm chromedriver - Start ChromeDriver only

Services managed:
1. ChromeDriver (port 4444) - Browser automation
2. OpenFang Gateway (port 4200) - AI Agent runtime
3. Tauri Desktop - React + Rust frontend

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-17 09:23:44 +08:00
iven
6bd9b841aa feat(browser-hand): implement Browser Hand UI components
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>
2026-03-17 08:56:02 +08:00
iven
69c874ed59 docs(spec): add Browser Hand UI design specification
Design for browser automation UI component integrated into HandsPanel:
- Dual trigger mechanism: frontend templates + agent scripts
- Real-time status + screenshot preview
- Complete template system (basic, scraping, automation)
- Task runner with progress tracking

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-17 08:14:41 +08:00
iven
f4efc823e2 refactor(types): comprehensive TypeScript type system improvements
Major type system refactoring and error fixes across the codebase:

**Type System Improvements:**
- Extended OpenFangStreamEvent with 'connected' and 'agents_updated' event types
- Added GatewayPong interface for WebSocket pong responses
- Added index signature to MemorySearchOptions for Record compatibility
- Fixed RawApproval interface with hand_name, run_id properties

**Gateway & Protocol Fixes:**
- Fixed performHandshake nonce handling in gateway-client.ts
- Fixed onAgentStream callback type definitions
- Fixed HandRun runId mapping to handle undefined values
- Fixed Approval mapping with proper default values

**Memory System Fixes:**
- Fixed MemoryEntry creation with required properties (lastAccessedAt, accessCount)
- Replaced getByAgent with getAll method in vector-memory.ts
- Fixed MemorySearchOptions type compatibility

**Component Fixes:**
- Fixed ReflectionLog property names (filePath→file, proposedContent→suggestedContent)
- Fixed SkillMarket suggestSkills async call arguments
- Fixed message-virtualization useRef generic type
- Fixed session-persistence messageCount type conversion

**Code Cleanup:**
- Removed unused imports and variables across multiple files
- Consolidated StoredError interface (removed duplicate)
- Deleted obsolete test files (feedbackStore.test.ts, memory-index.test.ts)

**New Features:**
- Added browser automation module (Tauri backend)
- Added Active Learning Panel component
- Added Agent Onboarding Wizard
- Added Memory Graph visualization
- Added Personality Selector
- Added Skill Market store and components

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-17 08:05:07 +08:00
iven
adfd7024df docs(claude): restructure documentation management and add feedback system
- Restructure §8 from "文档沉淀规则" to "文档管理规则" with 4 subsections
  - Add docs/ structure with features/ and knowledge-base/ directories
  - Add feature documentation template with 7 sections (概述/设计初衷/技术设计/预期作用/实际效果/演化路线/头脑风暴)
  - Add feature update trigger matrix (新增/修改/完成/问题/反馈)
  - Add documentation quality checklist
- Add §16
2026-03-16 13:54:03 +08:00