@harusame64/desktop-touch-mcp 1.12.0 → 1.12.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.ja.md +26 -2
- package/README.md +40 -2
- package/bin/launcher.js +3 -3
- package/package.json +7 -7
package/README.ja.md
CHANGED
|
@@ -22,6 +22,7 @@ npx -y @harusame64/desktop-touch-mcp
|
|
|
22
22
|
- **⚡ 高性能 Rust ネイティブコア** — UIA ブリッジと画像差分エンジンを Rust (`napi-rs` + `windows-rs`) で実装し、ネイティブ `.node` アドオンとしてロード。専用 MTA スレッドからの直接 COM 呼び出しにより PowerShell プロセス起動を排除 — `getFocusedElement` は **2ms**(160 倍高速)、`getUiElements` はバッチ型 BFS アルゴリズムでクロスプロセス RPC を最小化し **約 100ms** で完了。画像差分は **SSE2 SIMD** で 13〜15 倍のスループット。ネイティブエンジンが利用不可の場合、全関数が PowerShell に透過フォールバック — 設定不要。
|
|
23
23
|
- **🎯 Set-of-Marks (SoM) ビジュアルフォールバック** — ゲーム・RDP・非対応 Electron アプリで UIA が完全に機能しない場合でも、`screenshot(detail="text")` が Hybrid Non-CDP パイプラインを自動起動。Rust 画像前処理 → Windows OCR → クラスタリング → 赤い枠線 + 番号バッジ(`[1]`、`[2]`…)付き PNG 画像を生成し、`clickAt` 座標付きの要素リストを返します。CDP 不要。
|
|
24
24
|
- **🔁 視覚のみ対象での 1 コール確認** — UIA が効かない対象(Electron・PWA・ゲーム・自前描画キャンバス・RDP ウィンドウ)では、`desktop_act` が操作後の確認を応答自体に畳み込めます。成功時にオプションの `roiCapture` ——「変化した領域だけ」を切り出した PNG + そこに今ある要素の lease なしプレビュー —— を同梱するので、別途 `desktop_state` + `screenshot` を呼ばずに「クリックの結果」と「次の対象」を確認できます。視覚のみ対象では変化があれば**デフォルトで付与**されます(`returnCapture:"on-change"`)。`returnCapture:"never"` で抑止、`"always"` で常時付与。構造化対象(ブラウザ/CDP・UIA リッチなネイティブ)には付与されないため、それらの応答は不変です(そこは `desktop_state` の方が安価かつ正確)。
|
|
25
|
+
- **🔐 Key Locker — SSH / sudo のパスワードをターミナルが自動入力** — 認証情報はロッカー自身のセキュアダイアログに一度だけ入力して、この PC 上に暗号化保存(Windows DPAPI)— アシスタントには一切見えません。以後は `key_locker(action='launch_console')` で開いたコンソールで `ssh` / `sudo` を実行するだけで、隠しパスワードプロンプトに自動入力されます(既定では入力毎に確認あり)。詳細は [Key Locker](#key-locker-ターミナル認証情報の自動入力) 参照。
|
|
25
26
|
- **LLM ネイティブ設計** — 人間の操作を模倣するのではなく、「LLM がいかにコンテキストを消費せず高速に動けるか」を前提に設計。`run_macro` による複数操作の一括実行(API 往復の削減)と、**MPEG P-frame 方式のレイヤー差分** (`diffMode`) を組み合わせることで、無駄な画像転送や推論ループを極限まで削ぎ落とす。
|
|
26
27
|
- **Reactive Perception Graph** — ウィンドウやブラウザタブに `lensId` を登録し、以後の action tool に渡すだけで、操作前の安全 guard と操作後の `post.perception` フィードバックを受け取れます。`screenshot` / `desktop_state` の反復を減らし、別ウィンドウへの誤入力や古い座標クリックを防ぎます。
|
|
27
28
|
- **日本語/CJK 完全対応** — ウィンドウタイトル取得に Win32 `GetWindowTextW` を使用。nut-js の文字化けを回避。IME バイパス入力にも対応。
|
|
@@ -331,6 +332,29 @@ terminal({
|
|
|
331
332
|
- **未完の構文で終わる入力は即座に reject**(`ExitModeUnsafeInput`)。閉じていない引用符 / here-doc / `$(…)` / 末尾の `\` または PowerShell バッククォートなどはハングせず弾きます。
|
|
332
333
|
- exit mode は配送を自前制御するため、配送系の `sendOptions`(`method` / `preferClipboard` / `pressEnter` / `chunkSize` / `pasteKey`)は `InvalidArgs` で reject します(focus 系オプションは利用可)。
|
|
333
334
|
|
|
335
|
+
---
|
|
336
|
+
|
|
337
|
+
## Key Locker (ターミナル認証情報の自動入力)
|
|
338
|
+
|
|
339
|
+
`ssh user@host` や `sudo …` は通常、アシスタントが安全に入力できない「隠しパスワードプロンプト」で止まります。Key Locker は SSH 鍵のパスフレーズや sudo / ログインパスワードをこの PC 上に暗号化保存し(Windows DPAPI, current user)、対象コマンドがプロンプトに達すると自動で入力します。秘密情報の入力はロッカー自身のセキュアダイアログへの一度きり — アシスタントには一切見えず、MCP チャネルを通ることもありません。
|
|
340
|
+
|
|
341
|
+
```js
|
|
342
|
+
// 1. 認証情報を一度だけ登録 — デスクトップにセキュアダイアログが開く
|
|
343
|
+
key_locker({ action:'save', uri:'ssh://user@host:22' })
|
|
344
|
+
|
|
345
|
+
// 2. 自動入力対応コンソールを起動(paneId が返る)
|
|
346
|
+
key_locker({ action:'launch_console' }) // → { paneId:'12345678', windowTitle:'…' }
|
|
347
|
+
|
|
348
|
+
// 3. その pane にコマンドを流す — プロンプトでパスワードが自動入力される
|
|
349
|
+
terminal({ action:'send', paneId:'12345678', input:'ssh user@host' })
|
|
350
|
+
```
|
|
351
|
+
|
|
352
|
+
- **自動入力は `launch_console` で開いたコンソールでのみ発火** — 既存のターミナルには決して入力しません。開くのは通常の可視な Windows コンソールなので、目視でき、任意のプロンプトで人間が引き継いで直接入力もできます。
|
|
353
|
+
- **既定では自動入力の度に確認ダイアログ**が出ます。binding 単位で `set_policy` により確認を省略可。保存済み認証情報の管理は `list` / `status` / `forget`。
|
|
354
|
+
- `terminal` の `read` / `send` は `windowTitle` の代わりに `paneId` を受け取れます — `ssh` ログインでウィンドウタイトルが変わっても同じ窓を正確に狙えます。
|
|
355
|
+
- 対応 binding URI: `ssh://user@host:22`、`sudo://host/user`、`https-cred://host`、SSH 鍵パスフレーズ(`sshkey:SHA256:…`)。`ssh` の登録はホスト鍵が `known_hosts` にあることが前提です(先に一度手動で接続してください)。
|
|
356
|
+
- Windows 専用。機能全体の無効化は `DESKTOP_TOUCH_DISABLE_KEY_LOCKER=1`。セキュアダイアログは未署名の実行ファイルのため、初回起動時に Windows SmartScreen の「発行元不明」警告が出ることがあります([前提環境](#前提環境)の注意参照)。
|
|
357
|
+
|
|
334
358
|
---
|
|
335
359
|
## ブラウザ CDP 自動化
|
|
336
360
|
|
|
@@ -699,9 +723,9 @@ keyboard(action='type')(use_clipboard=true) を使うこと(IME バイパス
|
|
|
699
723
|
|
|
700
724
|
---
|
|
701
725
|
|
|
702
|
-
## 🚀
|
|
726
|
+
## 🚀 5,000+ Downloads!
|
|
703
727
|
|
|
704
|
-
おかげさまで
|
|
728
|
+
おかげさまで5,000ダウンロードを突破しました!この実験的なツールを試し、
|
|
705
729
|
Issue や PR、バグ報告で貢献してくれたすべての方に感謝します。皆さんの声が
|
|
706
730
|
次のリリースをより良くしてくれました。一緒に育ててくれてありがとう!
|
|
707
731
|
|
package/README.md
CHANGED
|
@@ -23,6 +23,7 @@ npx -y @harusame64/desktop-touch-mcp
|
|
|
23
23
|
- **⚡ High-performance Rust Native Core** — The UIA bridge and image-diff engine are written in Rust (`napi-rs` + `windows-rs`) and loaded as a native `.node` addon. Direct COM calls from a dedicated MTA thread eliminate PowerShell process spawning — `getFocusedElement` completes in **2 ms** (160× faster), and `getUiElements` returns full trees in **~100 ms** with a batch BFS algorithm that minimizes cross-process RPC. Image-diff operations use **SSE2 SIMD** for 13–15× throughput. When the native engine is unavailable, every function transparently falls back to PowerShell — zero config required.
|
|
24
24
|
- **🎯 Set-of-Marks (SoM) visual fallback** — Games, RDP sessions, and non-accessible Electron apps return clickable elements even when UIA is completely blind. `screenshot(detail="text")` automatically detects UIA sparsity and activates a Hybrid Non-CDP pipeline: Rust-powered grayscale + bilinear upscale → Windows OCR → clustering → red bounding-box annotation with numbered badges (`[1]`, `[2]`…). Two parallel representations returned: a visual PNG for spatial orientation and a semantic `elements[]` list with `clickAt` coords — no CDP required.
|
|
25
25
|
- **🔁 One-call confirmation on visual-only targets** — On UIA-blind targets (Electron, PWAs, games, custom canvases, RDP windows), `desktop_act` can fold the post-action confirmation into its own response: an optional `roiCapture` carrying a PNG crop of *just the region that changed* plus a lease-less preview of the controls now visible there. The agent confirms what its click did and finds the next target without a separate `desktop_state` + `screenshot`. On visual-only targets it is **on by default** for a visible change (`returnCapture:"on-change"`); pass `returnCapture:"never"` to suppress it, or `"always"` to force it. Never attached on structured targets (browser/CDP, UIA-rich native), where `desktop_state` is cheaper and exact — so those responses are unchanged.
|
|
26
|
+
- **🔐 Key Locker — the terminal autofills your SSH / sudo passwords** — Save a credential once into the locker's own secure dialog (stored encrypted on your machine with Windows DPAPI; never shown to the assistant), then run `ssh` / `sudo` in a console opened by `key_locker(action='launch_console')` — the password is filled in automatically when the hidden prompt appears, with a per-fill confirmation prompt by default. See [Key Locker](#key-locker-terminal-credential-autofill).
|
|
26
27
|
- **LLM-native design** — Built around how LLMs think, not how humans click. `run_macro` batches multiple operations into a single API call; `diffMode` sends only the windows that changed since the last frame. Minimal tokens, minimal round-trips.
|
|
27
28
|
- **Reactive Perception Graph** — Register a `lensId` for a window or browser tab, pass it to action tools, and get guard-checked `post.perception` feedback after each action. It reduces repeated `screenshot` / `desktop_state` calls and prevents wrong-window typing or stale-coordinate clicks.
|
|
28
29
|
- **Full CJK support** — Uses Win32 `GetWindowTextW` for window titles, avoiding nut-js garbling. IME bypass input supported for Japanese/Chinese/Korean environments.
|
|
@@ -294,6 +295,43 @@ terminal({
|
|
|
294
295
|
|
|
295
296
|
---
|
|
296
297
|
|
|
298
|
+
## Key Locker (terminal credential autofill)
|
|
299
|
+
|
|
300
|
+
Running `ssh user@host` or `sudo …` normally stops at a hidden password prompt an
|
|
301
|
+
assistant can't safely type into. Key Locker stores your SSH key passphrases and
|
|
302
|
+
sudo / login passwords encrypted on your machine (Windows DPAPI, current user) and
|
|
303
|
+
fills them in automatically when a bound command reaches its prompt. The secret is
|
|
304
|
+
typed once into the locker's own secure dialog — it is never shown to the assistant
|
|
305
|
+
and never travels through the MCP channel.
|
|
306
|
+
|
|
307
|
+
```js
|
|
308
|
+
// 1. Save the credential once — opens a secure dialog on your desktop
|
|
309
|
+
key_locker({ action:'save', uri:'ssh://user@host:22' })
|
|
310
|
+
|
|
311
|
+
// 2. Open an autofill-capable console (returns its paneId)
|
|
312
|
+
key_locker({ action:'launch_console' }) // → { paneId:'12345678', windowTitle:'…' }
|
|
313
|
+
|
|
314
|
+
// 3. Run the command through that pane — the password is filled at the prompt
|
|
315
|
+
terminal({ action:'send', paneId:'12345678', input:'ssh user@host' })
|
|
316
|
+
```
|
|
317
|
+
|
|
318
|
+
- **Autofill only fires in a console opened by `launch_console`** — a pre-existing
|
|
319
|
+
terminal is never autofilled. The console is a classic visible Windows console,
|
|
320
|
+
so you can watch it and take over at any prompt yourself.
|
|
321
|
+
- **Every autofill asks you to confirm by default**; opt a binding out with
|
|
322
|
+
`set_policy`. `list` / `status` / `forget` manage saved credentials.
|
|
323
|
+
- `terminal` `read` / `send` accept `paneId` as an alternative to `windowTitle` —
|
|
324
|
+
it targets that exact window even after an `ssh` login renames its title.
|
|
325
|
+
- Supported binding URIs: `ssh://user@host:22`, `sudo://host/user`,
|
|
326
|
+
`https-cred://host`, and SSH key passphrases (`sshkey:SHA256:…`). An `ssh`
|
|
327
|
+
save needs the host key already in `known_hosts` (connect to the host once first).
|
|
328
|
+
- Windows only. Disable the whole feature with `DESKTOP_TOUCH_DISABLE_KEY_LOCKER=1`.
|
|
329
|
+
The secure dialog is an unsigned helper executable — Windows SmartScreen may show
|
|
330
|
+
an "unknown publisher" warning on first run (see the note under
|
|
331
|
+
[Requirements](#requirements)).
|
|
332
|
+
|
|
333
|
+
---
|
|
334
|
+
|
|
297
335
|
## Browser CDP automation
|
|
298
336
|
|
|
299
337
|
For web automation, connect Chrome or Edge with the remote debugging port enabled — no Selenium or Playwright needed.
|
|
@@ -809,9 +847,9 @@ For `desktop_discover` warnings (`visual_provider_unavailable`, `visual_provider
|
|
|
809
847
|
|
|
810
848
|
---
|
|
811
849
|
|
|
812
|
-
## 🚀
|
|
850
|
+
## 🚀 5,000+ Downloads!
|
|
813
851
|
|
|
814
|
-
This project just passed **
|
|
852
|
+
This project just passed **5,000+ downloads**. Huge thanks to everyone who
|
|
815
853
|
tried an experimental desktop-automation MCP server, filed issues, opened PRs,
|
|
816
854
|
and shared what broke. Every bug report made the next release better.
|
|
817
855
|
Thank you for building with me!
|
package/bin/launcher.js
CHANGED
|
@@ -18,15 +18,15 @@ import path from "node:path";
|
|
|
18
18
|
import { Readable } from "node:stream";
|
|
19
19
|
import { pipeline } from "node:stream/promises";
|
|
20
20
|
|
|
21
|
-
const PACKAGE_VERSION = "1.12.
|
|
21
|
+
const PACKAGE_VERSION = "1.12.2";
|
|
22
22
|
const RELEASE_TAG = `v${PACKAGE_VERSION}`;
|
|
23
23
|
const REPO_API_URL = `https://api.github.com/repos/Harusame64/desktop-touch-mcp/releases/tags/${RELEASE_TAG}`;
|
|
24
24
|
const ASSET_NAME = "desktop-touch-mcp-windows.zip";
|
|
25
25
|
const RELEASE_METADATA_FILE = ".desktop-touch-release.json";
|
|
26
26
|
const RELEASE_MANIFEST = {
|
|
27
|
-
tagName: "v1.12.
|
|
27
|
+
tagName: "v1.12.2",
|
|
28
28
|
assetName: ASSET_NAME,
|
|
29
|
-
sha256: "
|
|
29
|
+
sha256: "521ab0baaa90403fa7f0bf4f7f4bde15c352b0bd5cd6e5cc7bacf135cd35c66b",
|
|
30
30
|
};
|
|
31
31
|
const CACHE_ROOT = process.env.DESKTOP_TOUCH_MCP_HOME
|
|
32
32
|
? path.resolve(process.env.DESKTOP_TOUCH_MCP_HOME)
|
package/package.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@harusame64/desktop-touch-mcp",
|
|
3
|
-
"version": "1.12.
|
|
3
|
+
"version": "1.12.2",
|
|
4
4
|
"mcpName": "io.github.Harusame64/desktop-touch-mcp",
|
|
5
|
-
"description": "Let Claude, Cursor, or any MCP client see and operate your Windows 10/11 desktop.
|
|
5
|
+
"description": "Let Claude, Cursor, or any MCP client see and operate your Windows 10/11 desktop. 32 tools for screenshots, UI Automation, Chrome CDP, keyboard/mouse, terminal, with semantic discover-then-act targeting and per-action perception guards that avoid wrong-window typing and stale-coordinate clicks.",
|
|
6
6
|
"keywords": [
|
|
7
7
|
"mcp",
|
|
8
8
|
"mcp-server",
|
|
@@ -106,16 +106,16 @@
|
|
|
106
106
|
"devDependencies": {
|
|
107
107
|
"@eslint/js": "^10.0.1",
|
|
108
108
|
"@modelcontextprotocol/sdk": "^1.10.0",
|
|
109
|
-
"@napi-rs/cli": "^3.7.
|
|
109
|
+
"@napi-rs/cli": "^3.7.3",
|
|
110
110
|
"@nut-tree-fork/nut-js": "^4.2.6",
|
|
111
|
-
"@types/node": "^26.1.
|
|
111
|
+
"@types/node": "^26.1.1",
|
|
112
112
|
"@types/ws": "^8.18.1",
|
|
113
|
-
"eslint": "^10.
|
|
114
|
-
"fast-check": "^4.
|
|
113
|
+
"eslint": "^10.7.0",
|
|
114
|
+
"fast-check": "^4.9.0",
|
|
115
115
|
"globals": "^17.7.0",
|
|
116
116
|
"sharp": "^0.35.3",
|
|
117
117
|
"typescript": "^6.0.2",
|
|
118
|
-
"typescript-eslint": "^8.
|
|
118
|
+
"typescript-eslint": "^8.63.0",
|
|
119
119
|
"vitest": "^4.1.10",
|
|
120
120
|
"ws": "^8.21.0",
|
|
121
121
|
"zod": "^4.3.6"
|