使用 AppleScript + JXA (JavaScript for Automation) 实现完整 API: - moveMouse: CGEvent 鼠标移动 - key/keys: System Events 键盘输入(支持修饰键组合) - mouseLocation: CGEvent 查询当前鼠标位置 - mouseButton: CGEvent 鼠标点击/按下/释放 - mouseScroll: CGEvent 滚轮事件 - typeText: System Events 文本输入 - getFrontmostAppInfo: 获取前台应用 bundleId + 名称 兼容 require() 调用方式(所有方法作为命名导出)。 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1.1 KiB
1.1 KiB
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-input— Computer Use 输入模块 (macOS AppleScript/JXA 实现)
工程化能力
- 代码格式化与校验
- 冗余代码检查
- git hook 的配置
- 代码健康度检查
- Biome lint 规则调优(适配反编译代码,关闭格式化避免大规模 diff)
- 单元测试基础设施搭建 (test runner 配置)
- CI/CD 流水线 (GitHub Actions)