mirror of
https://github.com/yuaotian/go-cursor-help.git
synced 2026-03-07 14:24:37 +00:00
feat(cursor_hook): 增强storage.json telemetry字段保护机制
- 🔧 补齐核心ID字段(machineId、macMachineId、devDeviceId、sqmId)用于Hook与storage.json保护
- 新增normalizeFilePath函数规范化文件路径处理(兼容string/Buffer/URL等类型)
- 实现coerceContentToUtf8Text函数统一文本内容编码处理
- 扩展fs模块Hook覆盖appendFile、createWriteStream、open/close等API
- 添加fd追踪机制保护基于文件描述符的storage.json写入操作
- 优化注册表读取拦截逻辑增强健壮性
- 完善错误处理和日志输出机制
```