Metadata-Version: 2.4
Name: sky-lite-desktop
Version: 1.0.0
Summary: Windows desktop GUI automation exposed as an MCP stdio server (UI Automation + SendInput + PrintWindow/WGC).
Author: sky-lite
License: MIT
Keywords: mcp,computer-use,windows,automation,uiautomation
Classifier: Environment :: Win32 (MS Windows)
Classifier: Programming Language :: Python :: 3
Classifier: Operating System :: Microsoft :: Windows
Requires-Python: >=3.10
Description-Content-Type: text/markdown
Requires-Dist: uiautomation==2.0.29
Requires-Dist: pillow==12.3.0
Provides-Extra: wgc
Requires-Dist: windows-capture==2.0.1; extra == "wgc"
Provides-Extra: sdk
Requires-Dist: mcp==2.2.0; extra == "sdk"

# sky-lite-desktop

Windows 桌面 GUI 自动化，以 **MCP stdio 服务**形式提供给 AI 调用。

底层用三件系统能力组合：**UI Automation**（读界面结构与元素）+ **SendInput**（合成鼠标键盘）
+ **Windows.Graphics.Capture**（截屏，失败自动回退 PrintWindow）。

## 安装

无需手动安装依赖，MCP 宿主通过 `uvx` 拉起即可：

```bash
uvx --from sky-lite-desktop sky-lite-mcp
```

或本地安装后运行：

```bash
pip install sky-lite-desktop
sky-lite-mcp
```

需要 Windows 10 1809+ / Python 3.10+。

## 工具

13 个桌面操作方法 + 5 个定时与画布方法，共 18 个：

```
观测   list_apps  list_windows  get_window  get_window_state
输入   click  type_text  press_key  scroll  set_value  drag
       perform_secondary_action  activate_window
定时   hold_keys  sequence  mouse_move
画面   capture_frames  compare_shots
```

## 安全设计

- **硬拒绝清单**：终端/shell、锁屏与 UAC、安全软件、密码管理器、Windows 键组合
  在工具层直接拒绝，不依赖模型自觉。
- **双重确认**：高危动作（删除/发送/支付/安装/授权等）需要显式 `confirm=true`，
  代码侧对危险动词做机械兜底。
- **纯本地**：不联网、不上传截图与文本、不需要账号凭证。策略配置存于
  `~/.sky-lite/policy.json`，可自行增删拒绝项。

## 限制

仅 Windows；需要可交互桌面会话（锁屏 / RDP 断开时不可用）；自绘界面没有可访问性树，
只能用坐标加连拍比对。

## 许可

MIT
