claude-code/TODO.md
claude-code-best 722d59b6d5 feat: 实现 @ant/computer-use-swift — macOS JXA/screencapture
用 JXA + screencapture 替代原始 Swift 原生模块:
- display.getSize/listAll: CGGetActiveDisplayList/NSScreen 获取显示器信息
- apps.listRunning: System Events 获取前台应用列表
- apps.listInstalled: 扫描 /Applications 目录
- apps.open/unhide: AppleScript 应用控制
- apps.appUnderPoint: NSWorkspace frontmostApplication
- screenshot.captureExcluding/captureRegion: screencapture 命令
- resolvePrepareCapture: 截图 + base64 编码

实测:display 返回 {width:1710, height:1112},running apps 正确识别。

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-01 08:48:04 +08:00

1.2 KiB
Raw Blame History

TODO

尽可能实现下面的包, 使得与主包的关系完全吻合

Packages

  • url-handler-napi — URL 处理 NAPI 模块 (签名修正,保持 null fallback)

  • modifiers-napi — 修饰键检测 NAPI 模块 (Bun FFI + Carbon)

  • audio-capture-napi — 音频捕获 NAPI 模块 (SoX/arecord)

  • color-diff-napi — 颜色差异计算 NAPI 模块 (纯 TS 实现)

  • image-processor-napi — 图像处理 NAPI 模块 (sharp + osascript 剪贴板)

  • @ant/computer-use-swift — Computer Use Swift 原生模块 (macOS JXA/screencapture 实现)

  • @ant/computer-use-mcp — Computer Use MCP 服务 (类型安全 stub + sentinel apps + targetImageSize)

  • @ant/computer-use-input — Computer Use 输入模块 (macOS AppleScript/JXA 实现)

工程化能力

  • 代码格式化与校验
  • 冗余代码检查
  • git hook 的配置
  • 代码健康度检查
  • Biome lint 规则调优(适配反编译代码,关闭格式化避免大规模 diff
  • 单元测试基础设施搭建 (test runner 配置)
  • CI/CD 流水线 (GitHub Actions)