From 553b16f595cda8c03ed577df06388213c87f7e68 Mon Sep 17 00:00:00 2001 From: jkooe <62494645+jkooe@users.noreply.github.com> Date: Wed, 30 Sep 2026 01:27:55 +0800 Subject: [PATCH] =?UTF-8?q?docs:=20=E5=8F=A3=E5=BE=84=E6=9B=B4=E6=96=B0?= =?UTF-8?q?=E5=88=B0=20v15=EF=BC=88=E5=9B=BE=E5=83=8F=E6=A8=A1=E6=9D=BF?= =?UTF-8?q?=E5=8C=B9=E9=85=8D=20/=20=E5=8A=A9=E6=89=8B=E6=8F=90=E9=80=9F?= =?UTF-8?q?=EF=BC=89+=20=E4=B8=89=E6=9D=A1=E8=85=BF=E5=AE=9A=E4=BD=8D?= =?UTF-8?q?=E8=AF=B4=E6=98=8E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 77adab5..7ce4ccb 100644 --- a/README.md +++ b/README.md @@ -24,14 +24,14 @@ nodeagent 把一台 Windows 机器的能力**标准化成一组可授权、可 | **自持** | `system.agent.restart` | **受控重启自身**(配置变更后让它生效,不会失联) | | **异步任务** | `system.task.list` · `system.task.get` · `system.task.kill` | 长命令后台执行 + 增量续读 + 终止(`exec` 加 `async:true`) | | **软件** | `app.list` · `app.install` | 已装软件(注册表 + winget)、winget 静默安装 | -| **屏幕** | `screen.info` · `screen.capture` · `screen.record` · `screen.find` | 显示器 / 截屏 / **录屏为帧序列** / **按名字找元素取坐标**(含区域与等待) | +| **屏幕** | `screen.info` · `screen.capture` · `screen.record` · `screen.find` | 显示器 / 截屏 / **录屏为帧序列** / **元素定位三引擎**(UIA 控件树 → OCR 文字 → **图像模板**) | | **窗口** | `window.list` · `window.focus` | 枚举可见窗口(精确矩形)/ 置前聚焦(**Windows + macOS**) | | **文件** | `fs.list` · `fs.stat` · `fs.read` · `fs.write` | 列目录 / 元信息 / 分块读 / 原子写 | | **输入** | `input.mouse.move` · `input.mouse.click` · `input.mouse.scroll` · `input.mouse.drag` · `input.key.type` · `input.key.press` | 键鼠控制(🔒 **默认禁用**),含**拖拽**与**按键序列/连按** | | **剪贴板** | `clip.get` · `clip.set` | 读写文本**或图片**(PNG Base64) | | **事件订阅** | `event.watch` · `event.unwatch` · `event.list` · `event.poll` | 文件变动 / 进程启停 / 端口开闭,**主动推送**(无需轮询) | -**36 项能力** · **32 个 MCP 工具** · **101 项单元测试** · **21 项端到端用例**(CI 在真实 Windows 上验证) +**36 项能力** · **32 个 MCP 工具** · **114 项单元测试** · **26 项端到端用例**(CI 在真实 Windows 上验证) > 关键里程碑:**GUI 语义**(`window.list` + `screen.find`,UIA 找不到自动降级 OCR) > 让 AI 从「看得到画面但读不懂界面」变成「按名字取坐标点下去」。 @@ -280,7 +280,14 @@ nodeagent group add 办公机 win_a,win_b # 设备分组 nodeagent fanout system.info --nodes @办公机 # 按组并发下发 ``` -### GUI 语义(找到元素再点,不猜坐标) +### GUI 语义(三条腿:控件树 / 文字 / 图像) + +```bash +nodeagent screen find "确定" # UIA → OCR 自动降级 +nodeagent screen find "登录" --method ocr --wait-ms 5000 # 等界面加载出来 +nodeagent screen find "" --method image --template C:\icons\save.png --threshold 0.9 + # 纯图标控件:按图找坐标 +``` ```bash nodeagent invoke window.list --args '{"title_pattern":"记事本"}' @@ -359,7 +366,7 @@ node apps/cli/dist/index.js connect hub.example.com --port 443 --hub-token