v1.5.2 — 优化更新 / Optimization Update
优化更新 / Optimization Update
性能与内存 / Performance & Memory
-
默认启动时不再自动打开设置窗口,降低常驻内存占用。
-
宠物窗口不再维护完整事件列表;设置窗口仍保留事件历史展示。
-
拆分 renderer 状态逻辑,降低主渲染文件复杂度。
-
Reduced default resident memory by no longer opening the settings window on startup.
-
Avoided keeping the full event list in the pet renderer; the settings window still keeps event history for display.
-
Split renderer state logic into reusable modules to reduce main renderer complexity.
自动更新与发布可靠性 / Auto Update & Release Reliability
-
新增真实的「启动时自动检查更新」开关,默认开启。
-
更新状态增加上次检查时间,并接入诊断中心。
-
CI / Release 流程新增 lint 检查和产物校验。
-
Added a real auto-update startup switch, enabled by default.
-
Improved update status reporting with last-check timestamps and Doctor diagnostics.
-
Added CI/release lint checks and release artifact validation.
Hook 与连接安全 / Hook & Connection Safety
-
保留用户已有 Claude Code hooks,不再覆盖用户自定义配置。
-
修复旧 Clawd hook 命令时保留用户 hooks,并清理过期 Clawd hook。
-
固定本地 token 改为随机生成,通过本地 connection 配置共享,避免暴露在 hook 命令中。
-
Preserved user-defined Claude Code hooks instead of overwriting them.
-
Repaired stale Clawd hook commands safely while keeping user hooks intact.
-
Replaced the fixed local token with a generated token shared through a local connection config instead of exposing it in hook commands.
数据可靠性 / Data Reliability
-
settings / history / stats / token cache / hook 配置写入改为原子 JSON 写入,并增加备份恢复。
-
设置和统计导入增加校验,并在导入前备份当前数据。
-
Added atomic JSON writes with backup fallback for settings, history, stats, token cache, and hook config updates.
-
Added safer settings/stat import validation and import backups.
安全与插件加固 / Security & Plugin Hardening
-
限制外部链接只能打开可信 HTTPS GitHub 域名。
-
本地 HTTP event server 增加事件校验、请求大小限制和权限 payload 校验。
-
限制插件 stdout/stderr 内存增长,并显示 manifest 解析错误。
-
UI 中明确提示受信任插件拥有本机 Node.js 权限。
-
Restricted external URL opening to trusted HTTPS GitHub domains.
-
Added local HTTP event validation, request size limits, and permission payload validation.
-
Limited plugin stdout/stderr memory growth and surfaced plugin manifest errors.
-
Clarified trusted plugin permissions in the UI.
维护性与测试 / Maintainability & Tests
-
拆分 auto-updater、hook manager、event-server helpers、StatsPanel、useCompanion 等模块。
-
增加 hooks、event validation、atomic JSON、plugin errors、settings defaults、forwarder CLI options 等测试。
-
Split auto-updater, hook manager, event-server helpers, stats panel, and companion state into smaller modules.
-
Added tests for hooks, event validation, atomic JSON, plugin errors, settings defaults, and forwarder CLI options.
验证 / Validation
npm run lintnpm run typechecknpm testnpm run distnpm run dist:validate