iven
bc12f6899a
feat(saas): Phase 4 端到端完善 — 设备注册、离线支持、配置迁移、集成测试
...
- 后端: devices 表 + register/heartbeat/list 端点 (UPSERT 语义)
- 桌面端: 设备 ID 持久化 + 5 分钟心跳 + 离线状态指示
- saas-client: 重试逻辑 (2 次指数退避) + isServerReachable 跟踪
- ConfigMigrationWizard: 3 步向导 (方向选择→冲突解决→结果)
- SaaSSettings: 修改密码折叠面板 + 迁移向导入口
- 集成测试: 21 个测试全部通过 (含设备注册/UPSERT/心跳、密码修改、E2E 生命周期)
- 修复 ConfigMigrationWizard merge 分支变量遮蔽 bug
2026-03-27 15:07:03 +08:00
iven
8cce2283f7
fix(saas): P0 安全修复 + P1 功能补全 — 角色提升、Admin 引导、IP 记录、密码修改
...
P0 安全修复:
- 修复 account update 自角色提升漏洞: 非 admin 用户更新自己时剥离 role 字段
- 添加 Admin 引导机制: accounts 表为空时自动从环境变量创建 super_admin
P1 功能补全:
- 所有 17 个 log_operation 调用点传入真实客户端 IP (ConnectInfo + X-Forwarded-For)
- AuthContext 新增 client_ip 字段, middleware 层自动提取
- main.rs 使用 into_make_service_with_connect_info 启用 SocketAddr 注入
- 新增 PUT /api/v1/auth/password 密码修改端点 (验证旧密码 + argon2 哈希)
- 桌面端 SaaS 设置页添加密码修改 UI (折叠式表单)
- SaaSClient 添加 changePassword() 方法
- 集成测试修复: 注入模拟 ConnectInfo 适配 onshot 测试模式
2026-03-27 14:45:47 +08:00
iven
15450ca895
feat(saas): Phase 3 桌面端 SaaS 集成 — 客户端、Store、UI、LLM 适配器
...
- saas-client.ts: SaaS HTTP 客户端 (登录/注册/Token/模型列表/Chat Relay/配置同步)
- saasStore.ts: Zustand 状态管理 (登录态、连接模式、可用模型、localStorage 持久化)
- connectionStore.ts: 集成 SaaS 模式分支 (connect() 优先检查 SaaS 连接模式)
- llm-service.ts: SaasLLMAdapter 实现 (通过 SaaS Relay 代理 LLM 调用)
- SaaSLogin.tsx: 登录/注册表单 (服务器地址、用户名、密码、邮箱)
- SaaSStatus.tsx: 连接状态展示 (账号信息、健康检查、可用模型列表)
- SaaSSettings.tsx: SaaS 设置页面入口 (登录态切换、功能列表)
- SettingsLayout.tsx: 添加 SaaS 平台菜单项
- store/index.ts: 导出 useSaaSStore
2026-03-27 14:21:23 +08:00
iven
80d98b35a5
fix(audit): v5 审计修复 8 项 — 条件编译、安全加固、冗余清理
...
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
- N1: Whiteboard Export 动作标注 demo=true
- N2/N3: Director + A2A 通过 #[cfg(feature)] 条件编译隔离
- N4: viking_adapter 文本匹配降级为 LOW(生产路径走 SqliteStorage)
- N5: 移除冗余 compactor_compact_llm Tauri 命令注册
- M3: hand_approve/hand_cancel 添加 hand_id 验证防跨 Hand 审批
- N7: scheduled_task 文档注释标注 PLANNNED
- 新增 COMPREHENSIVE_AUDIT_V5.md 独立审计报告
- 更新 DEEP_AUDIT_REPORT.md 追加修复记录(累计 32 项)
2026-03-27 12:33:44 +08:00
iven
256dba49db
fix(audit): 第五轮审计修复 — 反思LLM分析、语义路由、并行执行、错误中文化
...
- P2: 反思引擎接入 LLM 深度行为分析 (analyze_patterns_with_llm)
- P3-M6: 语义路由 RuntimeLlmIntentDriver 真实 LLM 匹配
- P3-L1: V2 Pipeline execute_parallel 改用 buffer_unordered 真正并行
- P3-S10: Rust 用户可见错误提示统一中文化
累计修复 27 项,完成度 ~72% → ~78%
2026-03-27 12:10:48 +08:00
iven
30b2515f07
feat(audit): 审计修复第四轮 — 跨会话搜索、LLM压缩集成、Presentation渲染器
...
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
- S9: MessageSearch 新增 Session/Global 双模式,Global 调用 VikingStorage memory_search
- M4b: LLM 压缩器集成到 kernel AgentLoop,支持 use_llm 配置切换
- M4c: 压缩时自动提取记忆到 VikingStorage (runtime + tauri 双路径)
- H6: 新增 ChartRenderer(recharts)、Document/Slideshow 完整渲染
- 累计修复 23 项,整体完成度 ~72%,真实可用率 ~80%
2026-03-27 11:44:14 +08:00
iven
7ae6990c97
fix(audit): 修复深度审计 P2 问题 — 自主授权后端守卫、反思历史累积、心跳持久化
...
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
- M5-补: hand_execute/skill_execute 接收 autonomy_level 参数,后端三层守卫
(supervised 全部审批 / assisted 尊重 needs_approval / autonomous 跳过)
- M3: hand_approve/hand_cancel 移除 _hand_name 下划线,添加审计日志
- M4-补: 反思历史累积存储到 reflection:history:{agent_id} 数组(最多20条)
get_history 优先读持久化历史,保留 latest key 向后兼容
- 心跳历史: VikingStorage 持久化 HeartbeatResult 数组,tick() 也存历史
heartbeat_init 恢复历史,重启后不丢失
- L2: 确认 gatewayStore 仅注释引用,无需修改
- 身份回滚: 确认 IdentityChangeProposal.tsx 已实现 HistoryItem + restoreSnapshot
- 更新 DEEP_AUDIT_REPORT.md 完成度 72% (核心 92%, 真实可用 80%)
2026-03-27 11:32:35 +08:00
iven
b7bc9ddcb1
fix(audit): 修复深度审计 P1/P2 问题 — 记忆统一、持久化、前端适配
...
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
H3: 重写 memory_commands.rs 统一到 VikingStorage 单一存储,移除双写
H4: 心跳引擎 record_interaction() 持久化到 VikingStorage,启动时恢复
M4: 反思结果/状态持久化到 VikingStorage metadata,重启后自动恢复
- HandApprovalModal import 修正 (handStore 替代 gatewayStore)
- kernel-client.ts 幽灵调用替换为 kernel_status
- PersistentMemoryStore dead_code warnings 清理
- 审计报告和 README 更新至 v0.6.3,完成度 58%→62%
2026-03-27 09:59:55 +08:00
iven
a71c4138cc
fix(audit): 修复深度审计发现的 P0/P1 问题 (8项)
...
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
基于 DEEP_AUDIT_REPORT.md 修复 2 CRITICAL + 4 HIGH + 1 MEDIUM 问题:
- C1: PromptOnly 技能集成 LLM 调用 — 定义 LlmCompleter trait,
通过 LlmDriverAdapter 桥接 zclaw_runtime::LlmDriver,
PromptOnlySkill.execute() 现在调用 LLM 生成内容
- C2: 反思引擎空记忆 bug — 新增 query_memories_for_reflection()
从 VikingStorage 查询真实记忆传入 reflect()
- H7: Agent Store 接口适配 — KernelClient 添加 listClones/createClone/
deleteClone/updateClone 方法,映射到 agent_* 命令
- H8: Hand 审批检查 — hand_execute 执行前检查 needs_approval,
需审批返回 pending_approval 状态
- M1: 幽灵命令注册 — 注册 hand_get/hand_run_status/hand_run_list
三个 Tauri 桩命令
- H1/H2: SpeechHand/TwitterHand 添加 demo 标签
- H5: 归档过时 VERIFICATION_REPORT
文档更新: DEEP_AUDIT_REPORT.md 标记修复状态,README.md 更新
关键指标和变更历史。整体完成度从 ~50% 提升至 ~58%。
2026-03-27 09:36:50 +08:00
iven
eed347e1a6
feat: 实现循环防护和安全验证功能
...
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(loop_guard): 为LoopGuard添加Clone派生
feat(capabilities): 实现CapabilityManager.validate()安全验证
fix(agentStore): 添加token用量追踪
chore: 删除未实现的Predictor/Lead HAND.toml文件
style(Credits): 移除假数据并标注开发中状态
refactor(Skills): 动态加载技能卡片
perf(configStore): 为定时任务添加localStorage降级
docs: 更新功能文档和版本变更记录
2026-03-27 07:56:53 +08:00
iven
0d4fa96b82
refactor: 统一项目名称从OpenFang到ZCLAW
...
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
重构所有代码和文档中的项目名称,将OpenFang统一更新为ZCLAW。包括:
- 配置文件中的项目名称
- 代码注释和文档引用
- 环境变量和路径
- 类型定义和接口名称
- 测试用例和模拟数据
同时优化部分代码结构,移除未使用的模块,并更新相关依赖项。
2026-03-27 07:36:03 +08:00
iven
8bcabbfb43
refactor: 代码质量清理 - 移除死代码和遗留别名
...
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
基于全面审计报告的 P0-P2 修复工作:
P0 (已完成):
- intelligence 模块: 精确注释 dead_code 标注原因(Tauri runtime 注册)
- compactor.rs: 实现 LLM 摘要生成(compact_with_llm)
- pipeline_commands.rs: 替换 println! 为 tracing 宏
P1 (已完成):
- 移除 8 个 gateway_* 向后兼容别名(OpenClaw 遗留)
- 前端 tauri-gateway.ts 改为调用 zclaw_* 命令
- 清理 generation.rs 6 个重复的实例方法(-217 行)
- A2A dead_code 注释更新
P2 (已完成):
- Predictor/Lead HAND.toml 设置 enabled=false
- Wasm/Native SkillMode 添加未实现说明
- browser/mod.rs 移除未使用的 re-export(消除 4 个警告)
文档更新:
- feature-checklist.md 从 v0.4.0 更新到 v0.6.0
- CLAUDE.md Hands 状态更新
验证: cargo check 零警告, 42 测试通过, 净减 371 行代码
2026-03-27 00:54:57 +08:00
iven
9a77fd4645
fix(intelligence): 精确化 dead_code 标注并实现 LLM 上下文压缩
...
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
- 将 intelligence/llm/memory/browser 模块的 dead_code 注释从模糊的
"reserved for future" 改为明确说明 Tauri invoke_handler 运行时注册机制
- 为 identity.rs 中 3 个真正未使用的方法添加 #[allow(dead_code)]
- 实现 compactor use_llm: true 功能:新增 compact_with_llm 方法和
compactor_compact_llm Tauri 命令,支持 LLM 驱动的对话摘要生成
- 将 pipeline_commands.rs 中 40+ 处 println!/eprintln! 调试输出替换为
tracing::debug!/warn!/error! 结构化日志
- 移除 intelligence/mod.rs 中不必要的 #[allow(unused_imports)]
2026-03-27 00:43:14 +08:00
iven
c3996573aa
refactor: 移除 Team 和 Swarm 协作功能
...
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
功能论证结论:Team(团队)和 Swarm(协作)为零后端支持的
纯前端 localStorage 空壳,Pipeline 系统已完全覆盖其全部能力。
删除 16 个文件,约 7,950 行代码:
- 5 个组件:TeamCollaborationView, TeamOrchestrator, TeamList, DevQALoop, SwarmDashboard
- 1 个 Store:teamStore.ts
- 3 个 Client/库:team-client.ts, useTeamEvents.ts, agent-swarm.ts
- 1 个类型文件:team.ts
- 4 个测试文件
- 1 个文档(归档 swarm-coordination.md)
修改 4 个文件:
- Sidebar.tsx:移除"团队"和"协作"导航项
- App.tsx:移除 team/swarm 视图路由
- types/index.ts:移除 team 类型导出
- chatStore.ts:移除 dispatchSwarmTask 方法
更新 CHANGELOG.md 和功能文档 README.md
2026-03-26 20:27:19 +08:00
iven
978dc5cdd8
fix(安全): 修复HTML导出中的XSS漏洞并清理调试日志
...
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(日志): 替换console.log为tracing日志系统
style(代码): 移除未使用的代码和依赖项
feat(测试): 添加端到端测试文档和CI工作流
docs(变更日志): 更新CHANGELOG.md记录0.1.0版本变更
perf(构建): 更新依赖版本并优化CI流程
2026-03-26 19:49:03 +08:00
iven
b8d565a9eb
chore: 清理测试结果和构建缓存文件
...
删除旧的测试截图、构建缓存文件和失败的测试结果记录
2026-03-26 19:46:13 +08:00
iven
14f8d4d3ad
feat(presentation): add Smart Presentation Layer for Pipeline output
...
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 PresentationAnalyzer in Rust backend (13 tests passing)
- Add PresentationContainer with auto type detection
- Add TypeSwitcher for manual type switching
- Add ChartRenderer, QuizRenderer, SlideshowRenderer, DocumentRenderer
- Integrate ResultModal into PipelinesPanel for result display
- Update docs: pipeline-overview.md, README.md, roadmap.md
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com >
2026-03-26 18:32:23 +08:00
iven
9ee23e444c
fix(dev-server): 修复开发服务器和前端兼容性问题
...
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
修复内容:
1. 修复 dev_server.rs 编译错误 - 使用 Vec::new() 替代数组转换
2. 修复 pipeline-client.ts - 添加 Tauri 运行时检测和开发服务器 fallback
3. 更新 troubleshooting.md - 添加开发服务器使用说明
测试结果:
- 所有前端模块正常加载
- 开发服务器 API 响应正确
- 类型检查通过
2026-03-26 18:10:55 +08:00
iven
85bf47bebb
feat(dev-server): 添加开发模式 HTTP/WebSocket 服务器
...
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
功能:
- 创建 dev_server.rs 模块,提供 HTTP/WebSocket API
- 使用 feature flag \dev-server\ 控制编译
- 仅绑定 localhost:50051,安全限制 CORS
- 生产构建不包含此模块
使用方式:
- pnpm tauri:dev:web - 启动带开发服务器的 Tauri
- pnpm tauri:dev - 常规开发模式(无服务器)
安全:
- 仅 localhost 绑定
- CORS 限制为 Vite 开发端口
- 通过 feature flag 完全移除生产代码
2026-03-26 17:38:53 +08:00
iven
b7f3d94950
fix(presentation): 修复 presentation 模块类型错误和语法问题
...
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
- 创建 types.ts 定义完整的类型系统
- 重写 DocumentRenderer.tsx 修复语法错误
- 重写 QuizRenderer.tsx 修复语法错误
- 重写 PresentationContainer.tsx 添加类型守卫
- 重写 TypeSwitcher.tsx 修复类型引用
- 更新 index.ts 移除不存在的 ChartRenderer 导出
审计结果:
- 类型检查: 通过
- 单元测试: 222 passed
- 构建: 成功
2026-03-26 17:19:28 +08:00
iven
d0c6319fc1
feat: 添加ESLint和Prettier配置并优化代码结构
...
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
style: 格式化代码文件并修复样式问题
docs: 新增部署文档和系统要求文档
test: 更新测试截图和覆盖率报告
refactor: 重构SchedulerPanel加载状态逻辑
ci: 添加lint和format脚本到package.json
build: 更新依赖项并添加开发工具
chore: 添加验证报告和上线审查计划
2026-03-26 08:02:23 +08:00
iven
bf6d81f9c6
refactor: 清理未使用代码并添加未来功能标记
...
CI / Rust Check (push) Has been cancelled
CI / Lint & TypeCheck (push) Has been cancelled
CI / Unit Tests (push) Has been cancelled
CI / Build Frontend (push) Has been cancelled
CI / Security Scan (push) Has been cancelled
CI / E2E Tests (push) Has been cancelled
style: 统一代码格式和注释风格
docs: 更新多个功能文档的完整度和状态
feat(runtime): 添加路径验证工具支持
fix(pipeline): 改进条件判断和变量解析逻辑
test(types): 为ID类型添加全面测试用例
chore: 更新依赖项和Cargo.lock文件
perf(mcp): 优化MCP协议传输和错误处理
2026-03-25 21:55:12 +08:00
iven
aa6a9cbd84
feat: 新增技能编排引擎和工作流构建器组件
...
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
...
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
504d5746aa
feat(skill-execution): implement execute_skill tool with full execution chain
...
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
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
d6df52b43f
feat(streaming): implement real streaming in KernelClient
...
Update chatStream method to use real Tauri event-based streaming:
- Add StreamChatEvent types matching Rust backend
- Set up Tauri event listener for 'stream:chunk' events
- Route events to appropriate callbacks (onDelta, onTool, onComplete, onError)
- Clean up listener on completion or error
- Remove simulated streaming fallback
This completes the frontend streaming integration for Chunk 4.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com >
2026-03-24 01:53:02 +08:00
iven
936c922081
feat(streaming): add Tauri streaming chat command
...
Add agent_chat_stream Tauri command that:
- Accepts StreamChatRequest with agent_id, session_id, message
- Gets streaming receiver from kernel.send_message_stream()
- Spawns background task to emit Tauri events ("stream:chunk")
- Emits StreamChatEvent types (Delta, ToolStart, ToolEnd, Complete, Error)
- Includes session_id for frontend routing
Registered in lib.rs invoke_handler.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com >
2026-03-24 01:50:47 +08:00
iven
5c8b1b53ce
feat(intelligence): add reflection config persistence and proactive personality suggestions
...
Config Persistence:
- Save reflection config to localStorage
- Load config on startup with fallback defaults
- Auto-sync config changes to backend
Proactive Personality Suggestions (P2):
- Add check_personality_improvement to heartbeat engine
- Detects user correction patterns (啰嗦/简洁, etc.)
- Add check_learning_opportunities to heartbeat engine
- Identifies learning opportunities from conversations
- Both checks generate HeartbeatAlert when thresholds met
These enhancements complete the self-evolution capability chain.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com >
2026-03-24 01:08:24 +08:00
iven
3286ffe77e
fix(intelligence): sync reflection config to enable identity proposals
...
- Initialize reflection engine with allow_soul_modification: true
- Sync config changes to backend when loading data
- Ensures reflection can generate identity change proposals
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com >
2026-03-24 01:03:33 +08:00
iven
bfad61c3da
feat(intelligence): add self-evolution UI for identity change proposals
...
P1.1: Identity Change Proposal UI
- Create IdentityChangeProposal.tsx with diff view for SOUL.md changes
- Add approve/reject buttons with visual feedback
- Show evolution history timeline with restore capability
P1.2: Connect Reflection Engine to Identity Proposals
- Update ReflectionLog.tsx to convert reflection proposals to identity proposals
- Add ReflectionIdentityProposal type for non-persisted proposals
- Auto-create identity proposals when reflection detects personality changes
P1.3: Evolution History and Rollback
- Display identity snapshots with timestamps
- One-click restore to previous personality versions
- Visual diff between current and proposed content
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com >
2026-03-24 00:51:03 +08:00
iven
6c64d704d7
docs: add self-evolution documentation and fix SOUL.md persistence
...
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
a389082dd4
fix(llm-service): 在内核模式下使用 Tauri invoke 而非 HTTP 端点
...
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/agents/default/message 导致 ECONNREFUSED
根因:GatewayLLMAdapter 在内核模式下仍使用外部 OpenFang HTTP 端点
修复:检测 Tauri 运行时,使用 agent_chat Tauri 命令代替 HTTP 请求
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com >
2026-03-23 23:59:50 +08:00
iven
cbd3da46a3
chore: remove debug logging
...
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
Remove temporary console.log and eprintln! statements added during
troubleshooting the model configuration issue.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com >
2026-03-23 23:06:20 +08:00
iven
ae4bf815e3
fix(kernel): 使用 Kernel 配置的 model 而非 Agent 持久化的旧值
...
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
2fb914c965
fix: UTF-8 boundary issue in compactor and remove openfang-runtime from bundle
2026-03-22 09:23:19 +08:00
iven
f9fefc1557
chore: remove openfang-runtime and update start script
2026-03-22 09:04:39 +08:00
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
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
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
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
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