Commit Graph

125 Commits

Author SHA1 Message Date
iven
aa6a9cbd84 feat: 新增技能编排引擎和工作流构建器组件
Some checks failed
CI / Lint & TypeCheck (push) Has been cancelled
CI / Unit Tests (push) Has been cancelled
CI / Build Frontend (push) Has been cancelled
CI / Rust Check (push) Has been cancelled
CI / Security Scan (push) Has been cancelled
CI / E2E Tests (push) Has been cancelled
refactor: 统一Hands系统常量到单个源文件
refactor: 更新Hands中文名称和描述

fix: 修复技能市场在连接状态变化时重新加载
fix: 修复身份变更提案的错误处理逻辑

docs: 更新多个功能文档的验证状态和实现位置
docs: 更新Hands系统文档

test: 添加测试文件验证工作区路径
2026-03-25 08:27:25 +08:00
iven
9c781f5f2a feat(pipeline): implement Pipeline DSL system for automated workflows
Some checks failed
CI / Lint & TypeCheck (push) Has been cancelled
CI / Unit Tests (push) Has been cancelled
CI / Build Frontend (push) Has been cancelled
CI / Rust Check (push) Has been cancelled
CI / Security Scan (push) Has been cancelled
CI / E2E Tests (push) Has been cancelled
Add complete Pipeline DSL system including:
- Rust backend (zclaw-pipeline crate) with parser, executor, and state management
- Frontend components: PipelinesPanel, PipelineResultPreview, ClassroomPreviewer
- Pipeline recommender for Agent conversation integration
- 5 pipeline templates: education, marketing, legal, research, productivity
- Documentation for Pipeline DSL architecture

Pipeline DSL enables declarative workflow definitions with:
- YAML-based configuration
- Expression resolution (${inputs.topic}, ${steps.step1.output})
- LLM integration, parallel execution, file export
- Agent smart recommendations in conversations

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-25 00:52:12 +08:00
iven
0179f947aa fix(openai): resolve DashScope/Bailian tool calling 400 errors
Some checks failed
CI / Lint & TypeCheck (push) Has been cancelled
CI / Unit Tests (push) Has been cancelled
CI / Build Frontend (push) Has been cancelled
CI / Rust Check (push) Has been cancelled
CI / Security Scan (push) Has been cancelled
CI / E2E Tests (push) Has been cancelled
- Detect providers that don't support streaming with tools (DashScope, aliyuncs, bigmodel.cn)
- Add stream_from_complete() to use non-streaming mode when tools are present
- Fix convert_response() to prioritize tool_calls over empty content
- Fix ToolUse message JSON serialization (Null -> "{}")
- Skip invalid tool calls with empty names in streaming

Root cause: DashScope Coding Plan API doesn't support stream=true with tools,
causing tool parameters to be lost or malformed.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-24 21:43:03 +08:00
iven
9981a4674e fix(skills): inject skill list into system prompt for LLM awareness
Problem: Agent could not invoke appropriate skills when user asked about
financial reports because LLM didn't know which skills were available.

Root causes:
1. System prompt lacked available skill list
2. SkillManifest struct missing 'triggers' field
3. SKILL.md loader not parsing triggers list
4. "财报" keyword not matching "财务报告" trigger

Changes:
- Add triggers field to SkillManifest struct
- Parse triggers list from SKILL.md frontmatter
- Inject skill list into system prompt in kernel.rs
- Add "财报", "财务数据", "盈利", "营收" triggers to finance-tracker
- Add "财报分析" trigger to analytics-reporter
- Document fix in troubleshooting.md

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-24 15:39:18 +08:00
iven
504d5746aa feat(skill-execution): implement execute_skill tool with full execution chain
Some checks failed
CI / Lint & TypeCheck (push) Has been cancelled
CI / Unit Tests (push) Has been cancelled
CI / Build Frontend (push) Has been cancelled
CI / Rust Check (push) Has been cancelled
CI / Security Scan (push) Has been cancelled
CI / E2E Tests (push) Has been cancelled
- Add ExecuteSkillTool for LLM to call skills during conversation
- Implement SkillExecutor trait in Kernel for skill execution
- Update AgentLoop to support tool execution with skill_executor
- Add default skills_dir configuration in KernelConfig
- Connect frontend skillMarketStore to backend skill_list command
- Update technical documentation with Skill system architecture

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-24 13:24:23 +08:00
iven
1441f98c5e feat(hands): implement 4 new Hands and fix BrowserHand registration
Some checks failed
CI / Lint & TypeCheck (push) Has been cancelled
CI / Unit Tests (push) Has been cancelled
CI / Build Frontend (push) Has been cancelled
CI / Rust Check (push) Has been cancelled
CI / Security Scan (push) Has been cancelled
CI / E2E Tests (push) Has been cancelled
- Add ResearcherHand: DuckDuckGo search, web fetch, report generation
- Add CollectorHand: data collection, aggregation, multiple output formats
- Add ClipHand: video processing (trim, convert, thumbnail, concat)
- Add TwitterHand: Twitter/X automation (tweet, retweet, like, search)
- Fix BrowserHand not registered in Kernel (critical bug)
- Add HandError variant to ZclawError enum
- Update documentation: 9/11 Hands implemented (82%)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-24 13:22:44 +08:00
iven
3ff08faa56 release(v0.2.0): streaming, MCP protocol, Browser Hand, security enhancements
## Major Features

### Streaming Response System
- Implement LlmDriver trait with `stream()` method returning async Stream
- Add SSE parsing for Anthropic and OpenAI API streaming
- Integrate Tauri event system for frontend streaming (`stream:chunk` events)
- Add StreamChunk types: Delta, ToolStart, ToolEnd, Complete, Error

### MCP Protocol Implementation
- Add MCP JSON-RPC 2.0 types (mcp_types.rs)
- Implement stdio-based MCP transport (mcp_transport.rs)
- Support tool discovery, execution, and resource operations

### Browser Hand Implementation
- Complete browser automation with Playwright-style actions
- Support Navigate, Click, Type, Scrape, Screenshot, Wait actions
- Add educational Hands: Whiteboard, Slideshow, Speech, Quiz

### Security Enhancements
- Implement command whitelist/blacklist for shell_exec tool
- Add SSRF protection with private IP blocking
- Create security.toml configuration file

## Test Improvements
- Fix test import paths (security-utils, setup)
- Fix vi.mock hoisting issues with vi.hoisted()
- Update test expectations for validateUrl and sanitizeFilename
- Add getUnsupportedLocalGatewayStatus mock

## Documentation Updates
- Update architecture documentation
- Improve configuration reference
- Add quick-start guide updates

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-24 03:24:24 +08:00
iven
4ba0a531aa docs: add v0.2.0 release implementation plan
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-24 01:34:17 +08:00
iven
fb263a8ae2 docs: add v0.2.0 release plan design document
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-24 01:16:52 +08:00
iven
6c64d704d7 docs: add self-evolution documentation and fix SOUL.md persistence
Some checks failed
CI / Lint & TypeCheck (push) Has been cancelled
CI / Unit Tests (push) Has been cancelled
CI / Build Frontend (push) Has been cancelled
CI / Rust Check (push) Has been cancelled
CI / Security Scan (push) Has been cancelled
CI / E2E Tests (push) Has been cancelled
- Create 01-identity-evolution.md: Identity system architecture (SOUL.md, USER.md, change proposals, version management)
- Create 04-heartbeat-engine.md: Proactive behavior system (heartbeat config, alerts, proactivity levels)
- Create 06-context-compaction.md: Context compression system (token management, summarization, information retention)
- Update ZCLAW_AGENT_INTELLIGENCE_EVOLUTION.md: Add Phase 5 self-evolution UX roadmap
- Fix AgentOnboardingWizard: Persist SOUL.md and USER.md after agent creation
- Fix llm-service: Add Tauri kernel mode detection for memory system LLM calls
- Fix kernel: Kernel config takes priority over agent's persisted model

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-24 00:38:31 +08:00
iven
afb48f7b80 docs: add v0.2.0 release design spec
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-23 23:24:08 +08:00
iven
ae4bf815e3 fix(kernel): 使用 Kernel 配置的 model 而非 Agent 持久化的旧值
Some checks failed
CI / Lint & TypeCheck (push) Has been cancelled
CI / Unit Tests (push) Has been cancelled
CI / Build Frontend (push) Has been cancelled
CI / Rust Check (push) Has been cancelled
CI / Security Scan (push) Has been cancelled
CI / E2E Tests (push) Has been cancelled
问题:在"模型与 API"页面切换模型后,对话仍使用旧模型
根因:Agent 配置从数据库恢复,其 model 字段优先于 Kernel 配置

修复:
- kernel.rs: send_message/send_message_stream 始终使用 Kernel 的当前 model
- openai.rs: 添加 User-Agent header 解决 Coding Plan API 405 错误
- kernel_commands.rs: 添加详细调试日志便于追踪配置传递
- troubleshooting.md: 记录此问题的排查过程和解决方案

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-23 22:56:06 +08:00
iven
e8b9e813a6 chore: cleanup phase 5, remove external runtime dependencies 2026-03-22 09:43:01 +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
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
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
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
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
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
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
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
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
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
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
iven
721e400bd0 docs: finalize documentation cleanup
- 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>
2026-03-16 10:00:17 +08:00
iven
a7582cb135 chore: clean up old plan files and update gitignore
- 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>
2026-03-16 09:59:39 +08:00
iven
f9a3816e54 docs: update work summary with OpenViking installation status
- Python 3.12 installed via winget
- OpenViking v0.2.6 installed successfully
- API key configuration required for server startup
- Updated next steps with configuration instructions

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-16 09:39:28 +08:00
iven
131b9c93ae docs: update OpenViking installation requirements
- Add Python version compatibility notes (3.10-3.12 required)
- Add Windows-specific installation instructions
- Add conda/WSL alternatives for Python 3.13+ users
- Update binaries README with system requirements table
- Clarify that CLI requires server to run

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-16 08:28:27 +08:00
iven
0eb30c0531 docs: reorganize documentation structure
- Create docs/README.md as documentation index
- Add WORK_SUMMARY_2026-03-16.md for today's work
- Move test reports to docs/test-reports/
- Move completed plans to docs/archive/completed-plans/
- Move research reports to docs/archive/research-reports/
- Move technical reference to docs/knowledge-base/
- Move all plans from root plans/ to docs/plans/

New structure:
docs/
├── README.md                         # Documentation index
├── DEVELOPMENT.md                    # Development guide
├── OPENVIKING_INTEGRATION.md         # OpenViking integration
├── USER_MANUAL.md                    # User manual
├── ZCLAW_AGENT_INTELLIGENCE_EVOLUTION.md
├── archive/                          # Archived documents
├── knowledge-base/                   # Technical knowledge
├── plans/                            # Execution plans
└── test-reports/                     # Test reports

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-16 08:21:01 +08:00
iven
c8202d04e0 feat(viking): add local server management for privacy-first deployment
- 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>
2026-03-16 08:14:44 +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
iven
04ddf94123 feat: implement ZCLAW Agent Intelligence Evolution Phase 1-3
Phase 1: Persistent Memory + Identity Dynamic Evolution
- agent-memory.ts: MemoryManager with localStorage persistence, keyword search, deduplication, importance scoring, pruning, markdown export
- agent-identity.ts: AgentIdentityManager with per-agent SOUL/AGENTS/USER.md, change proposals with approval workflow, snapshot rollback
- memory-extractor.ts: Rule-based conversation memory extraction (Phase 1), LLM extraction prompt ready for Phase 2
- MemoryPanel.tsx: Memory browsing UI with search, type filter, delete, export (integrated as 4th tab in RightPanel)

Phase 2: Context Governance
- context-compactor.ts: Token estimation, threshold monitoring (soft/hard), memory flush before compaction, rule-based summarization
- chatStore integration: auto-compact when approaching token limits

Phase 3: Proactive Intelligence + Self-Reflection
- heartbeat-engine.ts: Periodic checks (pending tasks, memory health, idle greeting), quiet hours, proactivity levels (silent/light/standard/autonomous)
- reflection-engine.ts: Pattern analysis from memory corpus, improvement suggestions, identity change proposals, meta-memory creation

Chat Flow Integration (chatStore.ts):
- Pre-send: context compaction check -> memory search -> identity system prompt injection
- Post-complete: async memory extraction -> reflection conversation tracking -> auto-trigger reflection

Tests: 274 passing across 12 test files
- agent-memory.test.ts: 42 tests
- context-compactor.test.ts: 23 tests
- heartbeat-reflection.test.ts: 28 tests
- chatStore.test.ts: 11 tests (no regressions)

Refs: ZCLAW_AGENT_INTELLIGENCE_EVOLUTION.md updated with implementation progress
2026-03-15 22:24:57 +08:00
iven
4862e79b2b chore: add react-window and @types/react-window dependencies 2026-03-15 21:08:47 +08:00