edit(content): review batch-1 editorial pass across 24 posts (EN + ZH)
- voice: first-person throughout (we/our -> I/my), matching the post guideline - privacy: internal LAN IPs replaced with placeholder hostnames (n8n.internal, gpu-node.internal); one compose volume path generalised - ZH twins: Traditional -> Simplified characters (site serves zh-Hans), whole-file renormalisation where the twin was still Traditional - dynamicCta: true on 12 posts so the contextual dual-track CTA renders - long configs wrapped in <details class="tech-deep-dive"> with a summary naming the artefact and line count - self-hosted-tts: token refresh now writes .tmp + atomic mv, with a note on the 401 race the old truncating redirect created
This commit is contained in:
1 parent
86edd40c74
commit
68771101ea
50 files changed
+478
-375
No files matched your search
@@ -8,6 +8,7 @@ tags: ["windows", "mcp", "security", "ai-agents", "automation"]
|
||||
ogImage: /og/zh-giving-ai-your-mouse-and-keyboard-safely.jpg
|
||||
banner: /banners/giving-ai-your-mouse-and-keyboard-safely.jpg
|
||||
draft: false
|
||||
dynamicCta: true
|
||||
---
|
||||
|
||||
让 AI 模型直接操控操作系统的物理鼠标和键盘,在演示视频里看起来非常惊艳:Agent 看着你的屏幕、点击按钮、输入文本,自动搞定那些没有提供 REST API 也没有 CLI 命令行接口的老旧桌面软件。
|
||||
@@ -45,8 +46,8 @@ uvx windows-mcp serve --exclude-tools "PowerShell,Registry"
|
||||
|
||||
现代开发机环境普遍配备 2K(2560×1440)、4K 或多显示器拼接虚拟桌面。
|
||||
|
||||
当 Agent 为了定位一个元素而截取全屏快照时,原始画布尺寸的文件经常超过 2.5 MB。这会直接导致两类致命问题:
|
||||
1. **MCP 载荷上限截断**:多数 MCP 客户端(如 Claude Desktop 或终端 Agent)对单次工具返回结果有 1 MB 的尺寸限制,全量 4K 截图会直接触发 `PayloadTooLarge` 报错中断。
|
||||
在我平时使用的主力工作站上(1080p 副屏搭配 1440p 主屏,上下拼接构成了总计 2560×2520 的虚拟画布),未缩放的单张 PNG 截图体积高达 **2.8 MB**。这会直接导致两类致命问题:
|
||||
1. **MCP 载荷上限截断**:多数 MCP 客户端(如 Claude Desktop 或终端 Agent)对单次工具返回结果有 1 MB 的尺寸限制,全量原始截图会直接触发 `PayloadTooLarge` 报错中断。
|
||||
2. **上下文 Token 快速耗尽**:超大分辨率图片会吃光上下文窗口的 Token 预算,造成推理成本飙升并把先前的会话记忆过早挤出缓存。
|
||||
|
||||
### 修复方案
|
||||
@@ -56,7 +57,7 @@ uvx windows-mcp serve --exclude-tools "PowerShell,Registry"
|
||||
export WINDOWS_MCP_SCREENSHOT_SCALE="0.5"
|
||||
```
|
||||
|
||||
0.5 的缩放将横纵像素各减半,在不影响元素识别的前提下将体积削减 75%。
|
||||
0.5 的缩放将横纵像素各减半,在不影响元素识别的前提下将体积削减 75%(从 2.8 MB 暴降至约 620 KB)。
|
||||
|
||||
*坐标换算说明:* 启用缩放后,工具元数据会提示 `Screenshot Coordinate Scale: 2.0`。模型在读取缩放图像的像素坐标后,传给 `Click` 或 `Move` 时需要乘以 `2.0` 换算回实际物理屏幕像素。
|
||||
|
||||
|
||||
Reference in new issue
Block a user