@harusame64/desktop-touch-mcp 0.15.2 → 0.15.4
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 +44 -6
- package/README.md +70 -9
- package/package.json +8 -3
package/README.ja.md
CHANGED
|
@@ -7,14 +7,17 @@
|
|
|
7
7
|
> **「Claude CLI にスクショを毎回コピーしていたあなたへ。」**
|
|
8
8
|
|
|
9
9
|
Claude がデスクトップを直接見て、直接操作する。
|
|
10
|
-
マウス・キーボード・スクリーンショット・Windows UI Automation・Chrome DevTools Protocol・ターミナル・SmartScroll・Reactive Perception Graph を統合した
|
|
10
|
+
マウス・キーボード・スクリーンショット・Windows UI Automation・Chrome DevTools Protocol・ターミナル・SmartScroll・Reactive Perception Graph を統合した 57 のツールを提供する MCP サーバーです。
|
|
11
11
|
|
|
12
|
-
>
|
|
12
|
+
> *v0.15: Rust ネイティブエンジンにより**平均 82 倍高速化** — UIA フォーカス取得 2ms、SSE2 SIMD 画像差分 13〜15 倍速。設定不要:エンジンは自動ロード、不在時は PowerShell に透過フォールバック。*
|
|
13
|
+
> *v0.15.4: **Set-of-Marks (SoM) ビジュアルフォールバック** — ゲーム・RDP・非対応 Electron アプリでも OCR + Rust 画像前処理で操作可能な要素を返す。UIA が完全に無効でも動作します。*
|
|
13
14
|
|
|
14
15
|
---
|
|
15
16
|
|
|
16
17
|
## 特徴
|
|
17
18
|
|
|
19
|
+
- **⚡ 高性能 Rust ネイティブコア** — UIA ブリッジと画像差分エンジンを Rust (`napi-rs` + `windows-rs`) で実装し、ネイティブ `.node` アドオンとしてロード。専用 MTA スレッドからの直接 COM 呼び出しにより PowerShell プロセス起動を排除 — `getFocusedElement` は **2ms**(160 倍高速)、`getUiElements` はバッチ型 BFS アルゴリズムでクロスプロセス RPC を最小化し **約 100ms** で完了。画像差分は **SSE2 SIMD** で 13〜15 倍のスループット。ネイティブエンジンが利用不可の場合、全関数が PowerShell に透過フォールバック — 設定不要。
|
|
20
|
+
- **🎯 Set-of-Marks (SoM) ビジュアルフォールバック** — ゲーム・RDP・非対応 Electron アプリで UIA が完全に機能しない場合でも、`screenshot(detail="text")` が Hybrid Non-CDP パイプラインを自動起動。Rust 画像前処理 → Windows OCR → クラスタリング → 赤い枠線 + 番号バッジ(`[1]`、`[2]`…)付き PNG 画像を生成し、`clickAt` 座標付きの要素リストを返します。CDP 不要。
|
|
18
21
|
- **LLM ネイティブ設計** — 人間の操作を模倣するのではなく、「LLM がいかにコンテキストを消費せず高速に動けるか」を前提に設計。`run_macro` による複数操作の一括実行(API 往復の削減)と、**MPEG P-frame 方式のレイヤー差分** (`diffMode`) を組み合わせることで、無駄な画像転送や推論ループを極限まで削ぎ落とす。
|
|
19
22
|
- **Reactive Perception Graph** — ウィンドウやブラウザタブに `lensId` を登録し、以後の action tool に渡すだけで、操作前の安全 guard と操作後の `post.perception` フィードバックを受け取れます。`screenshot` / `get_context` の反復を減らし、別ウィンドウへの誤入力や古い座標クリックを防ぎます。
|
|
20
23
|
- **日本語/CJK 完全対応** — ウィンドウタイトル取得に Win32 `GetWindowTextW` を使用。nut-js の文字化けを回避。IME バイパス入力にも対応。
|
|
@@ -22,6 +25,8 @@ Claude がデスクトップを直接見て、直接操作する。
|
|
|
22
25
|
- **座標変換不要の 1:1 モード** — `dotByDot=true` で WebP 1:1 キャプチャ。画像上のピクセル座標 = 画面座標なのでスケール計算が不要。
|
|
23
26
|
- **ブラウザキャプチャのデータ削減** — `grayscale=true`、`dotByDotMaxDimension=1280`、`windowTitle + region` の部分切り出しで、ブラウザ chrome や不要な余白を除外。重いキャプチャで 50〜70% 程度の削減を狙えます。
|
|
24
27
|
- **UIA アクション要素抽出** — `detail="text"` でボタン・入力欄の名前と `clickAt` 座標を JSON で返すため、画像を見なくても操作できる。
|
|
28
|
+
- **Chromium スマートフォールバック** — Chrome/Edge/Brave に対して `detail="text"` を使うと、低速な UIA を自動スキップし Windows OCR を実行。`hints.chromiumGuard` + `hints.ocrFallbackFired` で経路を判別可能。
|
|
29
|
+
- **CLI 自動ドック** — `dock_window` でウィンドウを画面隅にスナップ&最前面固定。`DESKTOP_TOUCH_DOCK_TITLE='@parent'` を設定すると、MCP 起動時にプロセスツリーを辿って Claude CLI をホストするターミナルを自動ドック。
|
|
25
30
|
- **緊急停止 (Failsafe)** — マウスを**画面左上コーナー (0,0 付近 10px)** に移動すると MCP サーバーが即座に終了。
|
|
26
31
|
|
|
27
32
|
---
|
|
@@ -32,7 +37,7 @@ Claude がデスクトップを直接見て、直接操作する。
|
|
|
32
37
|
|---|---|
|
|
33
38
|
| OS | Windows 10 / 11 (64-bit) |
|
|
34
39
|
| Node.js | v20 以上推奨 (v22+ で動作確認済み) |
|
|
35
|
-
| PowerShell | 5.1 以上 (Windows 標準同梱) |
|
|
40
|
+
| PowerShell | 5.1 以上 (Windows 標準同梱) — Rust ネイティブエンジン不在時のフォールバック用 |
|
|
36
41
|
| Claude CLI | `claude` コマンドが使えること |
|
|
37
42
|
|
|
38
43
|
> **注意:** nut-js のネイティブバインディングは Visual C++ 再頒布可能パッケージを必要とします。
|
|
@@ -107,7 +112,7 @@ npm install
|
|
|
107
112
|
|
|
108
113
|
---
|
|
109
114
|
|
|
110
|
-
## ツール一覧 (
|
|
115
|
+
## ツール一覧 (57 ツール)
|
|
111
116
|
|
|
112
117
|
> 📖 **詳細リファレンス**: [`docs/system-overview.md`](docs/system-overview.md) — 各ツールのパラメータ・応答形式・座標計算・レイヤーバッファ・技術ノートを網羅(英語)。
|
|
113
118
|
|
|
@@ -179,6 +184,7 @@ DOM を触る `browser_*` ツールは `includeContext:false` で末尾の `acti
|
|
|
179
184
|
| `get_context` | フォーカス中ウィンドウ・要素・カーソル・ページ状態を軽量取得 |
|
|
180
185
|
| `get_history` | 直近ツール履歴を取得 |
|
|
181
186
|
| `get_document_state` | Chromeページ状態(URL/title/readyState/scroll)をCDPで取得 |
|
|
187
|
+
| `engine_status` | 各サブシステムの動作バックエンドを返す:`uia`(Rust native または powershell)/ `imageDiff`(Rust SSE2 または typescript)。診断用 — パフォーマンス調査時に1回呼ぶ |
|
|
182
188
|
| `wait_until` | window/focus/terminal/browser DOM などの状態変化をサーバー側で待機 |
|
|
183
189
|
| `events_subscribe` / `events_poll` / `events_unsubscribe` / `events_list` | ウィンドウ出現・消滅・フォーカス変化を購読/取得 |
|
|
184
190
|
|
|
@@ -320,7 +326,7 @@ screenshot(diffMode=true) → 変化した窓だけ確認(~160 t
|
|
|
320
326
|
|
|
321
327
|
### PowerShell インジェクション対策
|
|
322
328
|
|
|
323
|
-
UIA ブリッジの
|
|
329
|
+
UIA ブリッジの PowerShell フォールバックパスでは、`-like` パターンに `escapeLike()` でワイルドカード文字 (`*`, `?`, `[`, `]`) をエスケープ済み。v0.15 以降、UIA の主パスは Rust ネイティブエンジン(直接 COM 呼び出し)のため、PowerShell は補助的なフォールバックとしてのみ使用されます。
|
|
324
330
|
|
|
325
331
|
---
|
|
326
332
|
|
|
@@ -403,12 +409,44 @@ Windows のフォアグラウンド保護機能により、ピン固定された
|
|
|
403
409
|
| 制限 | 詳細 | 回避策 |
|
|
404
410
|
|---|---|---|
|
|
405
411
|
| ゲーム・動画プレイヤーの背面キャプチャが黒またはハング | DirectX フルスクリーン等は `PW_RENDERFULLCONTENT (flag=2)` でもキャプチャ不可な場合がある | `screenshot_background(fullContent=false)` で旧フラグに切り替え、それでも黒なら前面キャプチャ (`screenshot`) を使用 |
|
|
406
|
-
| UIA 呼び出しのオーバーヘッド |
|
|
412
|
+
| UIA 呼び出しのオーバーヘッド | Rust ネイティブ: フォーカス取得 ~2ms、ツリー走査 ~100ms。PowerShell フォールバック: ~300ms | 操作前に `workspace_snapshot` で一括取得し、以降は `diffMode` で差分確認 |
|
|
407
413
|
| Chrome / WinUI3 の UIA 要素が空 | Chromium は UIA を限定的にしか公開しない | `browser_connect` + `browser_find_element` で DOM ベースのクリックを使用。視覚確認のみなら `screenshot(detail="image")` |
|
|
408
414
|
| レイヤーバッファの TTL | 90 秒操作なしでバッファが自動クリア → 次回 `diffMode` が I-frame になる | 長い待機後は `workspace_snapshot` で明示的にリセット |
|
|
409
415
|
|
|
410
416
|
---
|
|
411
417
|
|
|
418
|
+
## パフォーマンス (v0.15)
|
|
419
|
+
|
|
420
|
+
### UIA ブリッジ — Rust ネイティブ vs PowerShell
|
|
421
|
+
|
|
422
|
+
| 関数 | Rust Native | PowerShell | 高速化 |
|
|
423
|
+
|---|---|---|---|
|
|
424
|
+
| `getFocusedElement` | **2.2 ms** | 366 ms | 🚀 **163.9×** |
|
|
425
|
+
| `getUiElements` | **106.5 ms** | 346 ms | 🚀 **3.3×** |
|
|
426
|
+
| **平均** | | | **🚀 ~82×** |
|
|
427
|
+
|
|
428
|
+
### 画像差分エンジン — Rust SSE2 SIMD vs TypeScript
|
|
429
|
+
|
|
430
|
+
| 関数 | Rust SSE2 | TypeScript | 高速化 |
|
|
431
|
+
|---|---|---|---|
|
|
432
|
+
| `computeChangeFraction` (1080p) | **0.26 ms** | 3.8 ms | 🚀 **~15×** |
|
|
433
|
+
| `dHash` (1080p) | **0.09 ms** | 1.2 ms | 🚀 **~13×** |
|
|
434
|
+
|
|
435
|
+
### アーキテクチャ概要
|
|
436
|
+
|
|
437
|
+
```
|
|
438
|
+
Claude CLI → MCP Server (TypeScript)
|
|
439
|
+
├── Rust Native Engine (.node addon)
|
|
440
|
+
│ ├── UIA: 専用 MTA スレッド → 直接 COM 呼び出し
|
|
441
|
+
│ └── Image: SSE2 SIMD カーネル
|
|
442
|
+
└── PowerShell フォールバック(自動切替)
|
|
443
|
+
```
|
|
444
|
+
|
|
445
|
+
- **バッチ型 BFS**: `FindAllBuildCache(TreeScope_Children)` による階層ごとの一括フェッチ。`maxElements` 到達で即打ち切りし、巨大ツリーでもスケーラブル。
|
|
446
|
+
- **自動フォールバック**: ネイティブエンジンが利用不可の場合、全関数が PowerShell に透過切替 — 設定不要。
|
|
447
|
+
|
|
448
|
+
---
|
|
449
|
+
|
|
412
450
|
## パフォーマンス目安
|
|
413
451
|
|
|
414
452
|
| モード | 転送トークン | 用途 |
|
package/README.md
CHANGED
|
@@ -1,19 +1,22 @@
|
|
|
1
1
|
# desktop-touch-mcp
|
|
2
2
|
|
|
3
|
-
[](https://glama.ai/mcp/servers/Harusame64/desktop-touch-mcp)
|
|
4
4
|
|
|
5
5
|
[日本語](README.ja.md)
|
|
6
6
|
|
|
7
7
|
> **Stop pasting screenshots. Let Claude see and control your desktop directly.**
|
|
8
8
|
|
|
9
|
-
An MCP server that gives Claude eyes and hands on Windows —
|
|
9
|
+
An MCP server that gives Claude eyes and hands on Windows — 57 tools covering screenshots, mouse, keyboard, Windows UI Automation, Chrome DevTools Protocol, clipboard, desktop notifications, SmartScroll, and a Reactive Perception Graph for safe multi-step automation, designed from the ground up for LLM efficiency.
|
|
10
10
|
|
|
11
|
-
> *
|
|
11
|
+
> *v0.15: **82× average speedup** via Rust native engine — UIA focus queries in 2 ms, SSE2-accelerated image diffing at 13–15× native speed. Zero-config: the engine auto-loads when present, with transparent PowerShell fallback.*
|
|
12
|
+
> *v0.15.4: **Set-of-Marks (SoM) visual fallback** — games, RDP sessions, and non-accessible Electron apps now return clickable elements via OCR + Rust image preprocessing, even when UIA is completely unavailable.*
|
|
12
13
|
|
|
13
14
|
---
|
|
14
15
|
|
|
15
16
|
## Features
|
|
16
17
|
|
|
18
|
+
- **⚡ 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.
|
|
19
|
+
- **🎯 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.
|
|
17
20
|
- **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.
|
|
18
21
|
- **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` / `get_context` calls and prevents wrong-window typing or stale-coordinate clicks.
|
|
19
22
|
- **Full CJK support** — Uses Win32 `GetWindowTextW` for window titles, avoiding nut-js garbling. IME bypass input supported for Japanese/Chinese/Korean environments.
|
|
@@ -33,7 +36,7 @@ An MCP server that gives Claude eyes and hands on Windows — 56 tools covering
|
|
|
33
36
|
|---|---|
|
|
34
37
|
| OS | Windows 10 / 11 (64-bit) |
|
|
35
38
|
| Node.js | v20+ recommended (tested on v22+) |
|
|
36
|
-
| PowerShell | 5.1+ (bundled with Windows) |
|
|
39
|
+
| PowerShell | 5.1+ (bundled with Windows) — used only as fallback when the Rust native engine is unavailable |
|
|
37
40
|
| Claude CLI | `claude` command must be available |
|
|
38
41
|
|
|
39
42
|
> **Note:** nut-js native bindings require the Visual C++ Redistributable.
|
|
@@ -109,7 +112,7 @@ For a local checkout, register the built server directly:
|
|
|
109
112
|
|
|
110
113
|
---
|
|
111
114
|
|
|
112
|
-
## Tools (
|
|
115
|
+
## Tools (57 total)
|
|
113
116
|
|
|
114
117
|
> 📖 **Full command reference**: [`docs/system-overview.md`](docs/system-overview.md) — every tool's parameters, response shape, coordinate math, layer-buffer strategy, and engineering notes in one place.
|
|
115
118
|
|
|
@@ -117,7 +120,7 @@ For a local checkout, register the built server directly:
|
|
|
117
120
|
### Screenshot (5)
|
|
118
121
|
| Tool | Description |
|
|
119
122
|
|---|---|
|
|
120
|
-
| `screenshot` | Main capture. Supports `detail`, `dotByDot`, `dotByDotMaxDimension`, `grayscale`, `region` sub-crop, `diffMode` |
|
|
123
|
+
| `screenshot` | Main capture. Supports `detail`, `dotByDot`, `dotByDotMaxDimension`, `grayscale`, `region` sub-crop, `diffMode`. `detail="text"` auto-activates the SoM pipeline when UIA is blind (games, RDP, custom Electron) |
|
|
121
124
|
| `screenshot_background` | Capture a background window without focusing it (PrintWindow API) |
|
|
122
125
|
| `screenshot_ocr` | Windows.Media.Ocr on a window; returns word-level text + screen clickAt coords |
|
|
123
126
|
| `get_screen_info` | Monitor layout, DPI, cursor position |
|
|
@@ -176,6 +179,22 @@ All `browser_*` tools that touch the DOM accept `includeContext:false` to omit t
|
|
|
176
179
|
| `workspace_snapshot` | All windows: thumbnails + UI summaries in one call |
|
|
177
180
|
| `workspace_launch` | Launch an app and auto-detect the new window |
|
|
178
181
|
|
|
182
|
+
### Context / Wait / History (8)
|
|
183
|
+
| Tool | Description |
|
|
184
|
+
|---|---|
|
|
185
|
+
| `get_context` | Lightweight snapshot of focused window, element, cursor, and page state |
|
|
186
|
+
| `get_history` | Retrieve recent tool invocation history |
|
|
187
|
+
| `get_document_state` | Chrome page state (URL/title/readyState/scroll) via CDP |
|
|
188
|
+
| `engine_status` | Returns which backend is active: `uia` (native Rust or powershell) and `imageDiff` (native Rust SSE2 or typescript). Diagnostic — call once per session when troubleshooting performance |
|
|
189
|
+
| `wait_until` | Server-side wait for window/focus/terminal/browser DOM state changes |
|
|
190
|
+
| `events_subscribe` / `events_poll` / `events_unsubscribe` / `events_list` | Subscribe to and poll window appearance/disappearance/focus events |
|
|
191
|
+
|
|
192
|
+
### Terminal (2)
|
|
193
|
+
| Tool | Description |
|
|
194
|
+
|---|---|
|
|
195
|
+
| `terminal_read` | Read text from Windows Terminal / PowerShell / cmd / WSL via UIA/OCR. Supports `sinceMarker` for diff reads |
|
|
196
|
+
| `terminal_send` | Send commands to a terminal. Uses clipboard paste by default for IME safety |
|
|
197
|
+
|
|
179
198
|
### Pin / Macro (3)
|
|
180
199
|
| Tool | Description |
|
|
181
200
|
|---|---|
|
|
@@ -193,7 +212,7 @@ All `browser_*` tools that touch the DOM accept `includeContext:false` to omit t
|
|
|
193
212
|
|---|---|
|
|
194
213
|
| `notification_show` | Show a Windows system tray balloon notification — useful to alert the user when a long-running task finishes |
|
|
195
214
|
|
|
196
|
-
### Scroll (
|
|
215
|
+
### Scroll (2)
|
|
197
216
|
| Tool | Description |
|
|
198
217
|
|---|---|
|
|
199
218
|
| `scroll_to_element` | Scroll a named element into the viewport without computing scroll amounts. Chrome path: `selector` + `block` alignment. Native path: `name` + `windowTitle` via UIA ScrollItemPattern |
|
|
@@ -398,7 +417,7 @@ Script extensions (`.bat`, `.ps1`, `.vbs`, etc.) are rejected. Arguments contain
|
|
|
398
417
|
|
|
399
418
|
### PowerShell injection protection
|
|
400
419
|
|
|
401
|
-
All `-like` patterns in the UIA bridge are sanitized with `escapeLike()`, which escapes wildcard characters (`*`, `?`, `[`, `]`) before they reach PowerShell.
|
|
420
|
+
All `-like` patterns in the UIA bridge PowerShell fallback path are sanitized with `escapeLike()`, which escapes wildcard characters (`*`, `?`, `[`, `]`) before they reach PowerShell. When the Rust native engine is active, PowerShell is not invoked for UIA operations.
|
|
402
421
|
|
|
403
422
|
### Allowlist for `workspace_launch`
|
|
404
423
|
|
|
@@ -594,12 +613,54 @@ Returns `{ ok: true, result: "...", post: { perception: { status: "ok", ... } }
|
|
|
594
613
|
|
|
595
614
|
---
|
|
596
615
|
|
|
616
|
+
## Performance (v0.15 — Rust Native Engine)
|
|
617
|
+
|
|
618
|
+
The Rust native engine (`@harusame64/desktop-touch-engine`) replaces PowerShell process spawning with direct COM calls over a persistent MTA thread. It loads automatically as a `.node` addon — no configuration needed.
|
|
619
|
+
|
|
620
|
+
### UIA Benchmark (vs PowerShell baseline)
|
|
621
|
+
|
|
622
|
+
| Function | Rust Native | PowerShell | Speedup |
|
|
623
|
+
|---|---|---|---|
|
|
624
|
+
| `getFocusedElement` | **2.2 ms** | 366 ms | **163.9×** |
|
|
625
|
+
| `getUiElements` (Explorer, ~60 elements) | **106.5 ms** | 346 ms | **3.3×** |
|
|
626
|
+
| **Weighted average** | | | **~82×** |
|
|
627
|
+
|
|
628
|
+
### Image Diff Benchmark (SSE2 SIMD)
|
|
629
|
+
|
|
630
|
+
| Function | Rust (SSE2) | TypeScript | Speedup |
|
|
631
|
+
|---|---|---|---|
|
|
632
|
+
| `computeChangeFraction` (1920×1080) | **0.26 ms** | 3.8 ms | **~15×** |
|
|
633
|
+
| `dHash` (perceptual hash) | **0.09 ms** | 1.2 ms | **~13×** |
|
|
634
|
+
|
|
635
|
+
### Architecture
|
|
636
|
+
|
|
637
|
+
```
|
|
638
|
+
Claude CLI / MCP Client
|
|
639
|
+
│ stdio or HTTP (MCP protocol)
|
|
640
|
+
▼
|
|
641
|
+
desktop-touch-mcp (TypeScript)
|
|
642
|
+
│
|
|
643
|
+
├── Rust Native Engine (.node addon) ← NEW in v0.15
|
|
644
|
+
│ ├── UIA: 13 functions via napi-rs + windows-rs 0.62
|
|
645
|
+
│ │ └── Dedicated COM thread (MTA) + batch BFS algorithm
|
|
646
|
+
│ └── Image: SSE2 SIMD pixel diff + perceptual hashing
|
|
647
|
+
│
|
|
648
|
+
└── PowerShell Fallback (automatic)
|
|
649
|
+
└── Activates transparently if .node is unavailable
|
|
650
|
+
```
|
|
651
|
+
|
|
652
|
+
### Why `getUiElements` is 3.3× (not 160×)
|
|
653
|
+
|
|
654
|
+
The 160× speedup on `getFocusedElement` comes from eliminating PowerShell process startup (~200 ms) and .NET assembly loading. For `getUiElements`, the bottleneck shifts to the **UIA provider** inside the target application (e.g., Explorer) — it must enumerate its UI tree regardless of who asks. The Rust engine uses a **batch BFS algorithm** (`FindAllBuildCache` + `TreeScope_Children`) that minimizes cross-process RPC calls and supports `maxElements` early exit, making it dramatically faster on large trees (VS Code, browsers with 1000+ elements).
|
|
655
|
+
|
|
656
|
+
---
|
|
657
|
+
|
|
597
658
|
## Known limitations
|
|
598
659
|
|
|
599
660
|
| Limitation | Detail | Workaround |
|
|
600
661
|
|---|---|---|
|
|
601
662
|
| Games / video players may return black or hang in background capture | DirectX fullscreen apps may not work even with `PW_RENDERFULLCONTENT` | Retry with `screenshot_background(fullContent=false)`; if still black, use foreground `screenshot` |
|
|
602
|
-
| UIA call overhead | ~
|
|
663
|
+
| UIA call overhead | ~2 ms (focus) / ~100 ms (tree) via Rust native engine; ~300 ms via PowerShell fallback | Rust engine loads automatically; `workspace_snapshot` uses a 2 s timeout internally |
|
|
603
664
|
| Chrome / WinUI3 UIA elements are empty | Chromium exposes only limited UIA | `screenshot(detail='text')` auto-detects Chromium and falls back to Windows OCR (`hints.chromiumGuard=true`). For richer DOM access use `browser_connect` + `browser_find_element` |
|
|
604
665
|
| Chromium title-regex misses when sites rewrite `document.title` | Guard relies on the ` - Google Chrome` suffix being present; some sites push it off the end of a long title | Title is treated as plain Chrome (UIA runs). OCR path is still reachable via `ocrFallback='always'` or when UIA returns `<5` elements (`uiaSparse`) |
|
|
605
666
|
| `browser_*` CDP tools need Chrome launched with `--remote-debugging-port` | If Chrome is already running on the default profile without the flag, `browser_launch` / `browser_connect` fail. The CDP E2E suite (`tests/e2e/browser-cdp.test.ts`) will also fail in that state | Close Chrome first, then `browser_launch` will relaunch it in debug mode, or start Chrome manually with `--remote-debugging-port=9222 --user-data-dir=C:\tmp\cdp` |
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@harusame64/desktop-touch-mcp",
|
|
3
|
-
"version": "0.15.
|
|
3
|
+
"version": "0.15.4",
|
|
4
4
|
"mcpName": "io.github.Harusame64/desktop-touch-mcp",
|
|
5
5
|
"description": "LLM-native Windows computer-use MCP server with 56 tools for screenshots, UIA, mouse/keyboard, Chrome CDP, terminal, SmartScroll, and perception guards",
|
|
6
6
|
"engines": {
|
|
@@ -47,8 +47,13 @@
|
|
|
47
47
|
"dev": "tsc --watch",
|
|
48
48
|
"test": "vitest run",
|
|
49
49
|
"test:capture": "node scripts/test-capture.mjs",
|
|
50
|
-
"test:
|
|
51
|
-
"test:
|
|
50
|
+
"test:unit": "vitest run --project=unit",
|
|
51
|
+
"test:e2e": "vitest run --project=e2e",
|
|
52
|
+
"test:headed": "HEADED=1 vitest run --project=e2e",
|
|
53
|
+
"test:e2e:browser": "vitest run --project=e2e \"tests/e2e/browser-*.test.ts\"",
|
|
54
|
+
"test:e2e:window": "vitest run --project=e2e tests/e2e/dock-window.test.ts tests/e2e/dock-auto.test.ts tests/e2e/focus-integrity.test.ts tests/e2e/force-focus.test.ts tests/e2e/screenshot-electron.test.ts tests/e2e/ui-elements-cache.test.ts",
|
|
55
|
+
"test:e2e:input": "vitest run --project=e2e tests/e2e/keyboard-focus-lost.test.ts tests/e2e/mouse-focus-lost.test.ts tests/e2e/terminal.test.ts",
|
|
56
|
+
"test:e2e:perception": "vitest run --project=e2e tests/e2e/perception-mvp.test.ts tests/e2e/rich-narration-edge.test.ts",
|
|
52
57
|
"test:watch": "vitest",
|
|
53
58
|
"generate:stub-catalog": "node scripts/generate-stub-tool-catalog.mjs",
|
|
54
59
|
"check:stub-catalog": "node scripts/generate-stub-tool-catalog.mjs && git diff --exit-code src/stub-tool-catalog.ts",
|