@harusame64/desktop-touch-mcp 1.10.3 → 1.11.0

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 CHANGED
@@ -10,7 +10,7 @@
10
10
  npx -y @harusame64/desktop-touch-mcp
11
11
  ```
12
12
 
13
- 28 ツール、Rust ネイティブエンジン (UIA 2ms)、PowerShell 透過フォールバック、日本語/CJK 完全対応、MIT。上記 1 行を Claude / Cursor / VS Code Copilot の MCP 設定に追加するだけで、Notepad、Excel、Chrome、Windows Terminal、その他あらゆるアプリを Claude が操作できるようになります。
13
+ 31 ツール、Rust ネイティブエンジン (UIA 2ms)、PowerShell 透過フォールバック、日本語/CJK 完全対応、MIT。上記 1 行を Claude / Cursor / VS Code Copilot の MCP 設定に追加するだけで、Notepad、Excel、Chrome、Windows Terminal、その他あらゆるアプリを Claude が操作できるようになります。
14
14
 
15
15
  > *v0.15: Rust ネイティブエンジンにより**平均 82 倍高速化** — UIA フォーカス取得 2ms、SSE2 SIMD 画像差分 13〜15 倍速。設定不要:エンジンは自動ロード、不在時は PowerShell に透過フォールバック。*
16
16
  > *v0.15.5: **固定リリース検証** — npm ランチャーは対応する GitHub Release tag だけを取得し、Windows runtime zip を検証してから展開します。*
@@ -137,19 +137,25 @@ npm run build
137
137
 
138
138
  ---
139
139
 
140
- ## ツール一覧 (28 ツール — 26 stub catalog + 2 dynamic v2)
140
+ ## ツール一覧 (31 ツール — 29 stub catalog + 2 dynamic v2)
141
141
 
142
142
  > 📖 **詳細リファレンス**: [`docs/system-overview.md`](docs/system-overview.md) — 各ツールのパラメータ・応答形式・座標計算・レイヤーバッファ・技術ノートを網羅(英語)。
143
143
 
144
144
  ### スクリーンショット系 (5)
145
145
  | ツール | 概要 |
146
146
  |---|---|
147
- | `screenshot` | メインキャプチャ。`detail` / `dotByDot` / `dotByDotMaxDimension` / `grayscale` / `region` / `diffMode` 対応 |
147
+ | `screenshot` | メインキャプチャ。`detail` / `dotByDot` / `dotByDotMaxDimension` / `grayscale` / `region` / `diffMode` 対応。画像はインライン展開せず、ディスク保存した画像への安価なリンク `screenshot://by-ref/{id}` を返す |
148
148
  | `screenshot_background` | 背面・最小化ウィンドウをキャプチャ (PrintWindow API) |
149
149
  | `screenshot_ocr` | Windows OCR で文字と `clickAt` 座標を取得 |
150
150
  | `get_screen_info` | モニター解像度・DPI・カーソル位置 |
151
151
  | `scroll(action='capture')` | ページ全体をスクロールしながらスティッチ |
152
152
 
153
+ ### スクリーンショットキャッシュ (2)
154
+ | ツール | 概要 |
155
+ |---|---|
156
+ | `screenshot_query` | by-ref リンクの裏にあるディスクキャッシュの一覧を、ピクセルを再読込せずに取得(captureId・by-ref uri・サイズ・寸法・時刻・tag、キャッシュ全体の合計)。パスは一切返さない |
157
+ | `screenshot_gc` | 保持ポリシー(最新 N 件 / バイト上限 / 経過時間)でキャッシュを掃除。既定は dry-run(削除対象の一覧のみ)。実削除は `dryRun:false` かつ `confirm:true` の両方が必要 |
158
+
153
159
  ### ウィンドウ管理 (4)
154
160
  | ツール | 概要 |
155
161
  |---|---|
@@ -235,6 +241,11 @@ DOM を触る `browser_*` ツールは `includeContext:false` で末尾の `acti
235
241
  | `scroll(action='to_element')` | 要素名またはCSS selectorで対象をviewportへスクロール |
236
242
  | `scroll(action='smart')` | CDP → UIA → 画像binary-searchの統合スクロール。ネスト・仮想リスト・sticky header対応 |
237
243
 
244
+ ### Office (Excel) (1)
245
+ | ツール | 概要 |
246
+ |---|---|
247
+ | `excel` | Excel VBA マクロを COM 経由で記述・実行。`action='run_vba'` はマクロを管理下の Trusted Location に書き込んで実行、`action='check_access_vbom'` は読み取り専用の事前チェック。数式だけでは届かない処理を VBA で実行。初回のみ `node scripts/enable-access-vbom.mjs` |
248
+
238
249
  ---
239
250
 
240
251
  ## 推奨ワークフロー (v1.0.0)
@@ -537,15 +548,27 @@ V1 ツールはすべてそのまま動作します。再インストール不
537
548
 
538
549
  フラグのセマンティクス(完全一致: 文字列 `"1"` のみ有効):
539
550
 
540
- | `DISABLE_FUKUWARAI_V2` | `ENABLE_FUKUWARAI_V2` | V2 状態 |
551
+ | `DISABLE_FUKUWARAI_V2` | V2 状態 |
552
+ |---|---|
553
+ | 未設定 / `"1"` 以外 | **ON**(デフォルト) |
554
+ | `"1"` | **OFF**(kill switch) |
555
+
556
+ ### スクリーンショットキャッシュ (by-ref ストレージ)
557
+
558
+ `screenshot` などの画像系応答は、ピクセルを毎回インライン展開する代わりに、ディスク保存した画像への安価なリンク `screenshot://by-ref/{id}` を返します(look→act→confirm の反復が大幅に低トークン化)。キャッシュは自動で上限管理され、`screenshot_query` / `screenshot_gc` で確認・掃除できます。
559
+
560
+ | 環境変数 | デフォルト | 効果 |
541
561
  |---|---|---|
542
- | 未設定 / `"1"` 以外 | 未設定 / `"1"` 以外 | **ON**(デフォルト) |
543
- | 未設定 / `"1"` 以外 | `"1"` | ON(後方互換で受理、後述) |
544
- | `"1"` | 任意 | **OFF** — DISABLE が優先 |
562
+ | `DESKTOP_TOUCH_SCREENSHOTS_DIR` | *(ユーザー別キャッシュ)* | キャッシュ保存先を固定。既定フォルダが作成・書き込み不可(ロックダウン PC など)の場合、この値 runtime dir → OS の一時フォルダの順に書き込み可否を自動判定し、最初に書ける場所を使う(キャッシュを諦めない)。 |
563
+ | `DESKTOP_TOUCH_SCREENSHOT_MAX_COUNT` | `200` | 保持する最大キャプチャ数。 |
564
+ | `DESKTOP_TOUCH_SCREENSHOT_MAX_BYTES` | `256 MiB` | ディスク上のキャッシュ総量の上限。 |
565
+ | `DESKTOP_TOUCH_SCREENSHOT_MAX_AGE_MS` | *(無効)* | この経過時間(ms)より古いキャプチャを削除(opt-in)。 |
566
+ | `DESKTOP_TOUCH_SCREENSHOT_AUTOPRUNE` | `on` | 新規保存のたびに自動で間引く。`0` で無効化。 |
567
+ | `DESKTOP_TOUCH_SCREENSHOT_MIN_EVICT_AGE_MS` | `60000` | この時間(ms)より新しいキャプチャは自動退避しない。同一 PC 上で別の AI/プロセスが大量キャプチャしていても、渡したばかりの by-ref リンクが開けるよう保護。`0` で無効化。 |
545
568
 
546
- ### 非推奨: `DESKTOP_TOUCH_ENABLE_FUKUWARAI_V2`
569
+ ### 削除済み: `DESKTOP_TOUCH_ENABLE_FUKUWARAI_V2`
547
570
 
548
- v0.16.x での opt-in フラグです。v0.17 では後方互換として受理されますが、サーバー起動時に非推奨の警告が表示されます。v0.18 で完全に削除されます。アップグレード時にはこのフラグを設定から削除してください。
571
+ v0.16.x での opt-in フラグです。v0.17 以降は V2 がデフォルト ON のため、このフラグは効果を持たず、設定から削除して問題ありません。V2 を無効化するには `DESKTOP_TOUCH_DISABLE_FUKUWARAI_V2=1` を設定してください。
549
572
 
550
573
  ### V2 が失敗した場合のリカバリ
551
574
 
@@ -669,6 +692,14 @@ keyboard(action='type')(use_clipboard=true) を使うこと(IME バイパス
669
692
 
670
693
  ---
671
694
 
695
+ ## 🚀 3,000+ Downloads!
696
+
697
+ おかげさまで3,000ダウンロードを突破しました!この実験的なツールを試し、
698
+ Issue や PR、バグ報告で貢献してくれたすべての方に感謝します。皆さんの声が
699
+ 次のリリースをより良くしてくれました。一緒に育ててくれてありがとう!
700
+
701
+ ---
702
+
672
703
  ## ライセンス
673
704
 
674
705
  MIT
package/README.md CHANGED
@@ -10,7 +10,7 @@
10
10
  npx -y @harusame64/desktop-touch-mcp
11
11
  ```
12
12
 
13
- 29 tools, native Rust engine (UIA in 2 ms), zero-config PowerShell fallback, full CJK support, MIT licensed. Add the snippet above to your Claude / Cursor / VS Code Copilot config and Claude can drive Notepad, Excel, Chrome, Windows Terminal, and any other app on your machine.
13
+ 31 tools, native Rust engine (UIA in 2 ms), zero-config PowerShell fallback, full CJK support, MIT licensed. Add the snippet above to your Claude / Cursor / VS Code Copilot config and Claude can drive Notepad, Excel, Chrome, Windows Terminal, and any other app on your machine.
14
14
 
15
15
  > **Why this over pixel-clicking?** Two ideas run through every tool: **discover-then-act** — `desktop_discover` returns interactive entities with short-lived leases instead of raw coordinates, so `desktop_act` operates on *what* you mean, not *where* it was — and **per-action perception guards** that verify the target window's identity and bounds before input lands, catching wrong-window typing and stale-coordinate clicks before they happen.
16
16
  >
@@ -141,7 +141,7 @@ For a local checkout, register the built server directly:
141
141
 
142
142
  ---
143
143
 
144
- ## Tools (29 Optimized Tools)
144
+ ## Tools (31 Optimized Tools)
145
145
 
146
146
  > 📖 **Full Reference**: [`docs/system-overview.md`](docs/system-overview.md) — Exhaustive guide on parameters, return schemas, and coordinate math.
147
147
 
@@ -155,7 +155,8 @@ For a local checkout, register the built server directly:
155
155
  | Tool | Description |
156
156
  |---|---|
157
157
  | `desktop_state` | Lightweight check of focus, active window, cursor, and Auto-Perception attention signal. |
158
- | `screenshot` | Multi-mode capture: `detail='text'` (UIA/OCR), `diffMode` (P-frame), `dotByDot` (1:1), and `background`. |
158
+ | `screenshot` | Multi-mode capture: `detail='text'` (UIA/OCR), `diffMode` (P-frame), `dotByDot` (1:1), and `background`. Returns a cheap `screenshot://by-ref/{id}` link to the saved image instead of inlining pixels every time. |
159
+ | `screenshot_query` / `screenshot_gc` | Inspect and prune the on-disk screenshot cache behind the by-ref links: `screenshot_query` lists saved captures without re-reading pixels; `screenshot_gc` reclaims space by retention policy (dry-run by default). |
159
160
  | `workspace_snapshot` | Instant session orientation: all window thumbnails + UI summaries in one call. |
160
161
  | `server_status` | Diagnostic check for native engine health and feature activation. |
161
162
 
@@ -357,6 +358,19 @@ Keep Claude CLI visible while operating other apps full-screen. Set env vars in
357
358
 
358
359
  > **Input routing gotcha:** when a pinned window is active (e.g. Claude CLI), `keyboard(action='type')` / `keyboard(action='press')` send keys to it, **not** the app you wanted to type into. Always call `focus_window(title=...)` before keyboard operations, then verify `isActive=true` via `screenshot(detail='meta')`.
359
360
 
361
+ ### Screenshot cache (by-ref storage)
362
+
363
+ `screenshot` and the other visual results return a cheap `screenshot://by-ref/{id}` link to an image saved on disk instead of inlining the pixels every time, so routine look-act-confirm loops cost far fewer tokens. The cache bounds itself automatically and `screenshot_query` / `screenshot_gc` let you inspect and prune it. Tune the storage with:
364
+
365
+ | Env var | Default | Notes |
366
+ |---|---|---|
367
+ | `DESKTOP_TOUCH_SCREENSHOTS_DIR` | *(per-user cache dir)* | Pin the cache to a specific folder. If the default folder can't be created or written (e.g. corporate policy blocking new folders under your profile), the server auto-probes this → the runtime dir → an OS temp folder and uses the first writable one instead of giving up on the cache. |
368
+ | `DESKTOP_TOUCH_SCREENSHOT_MAX_COUNT` | `200` | Keep at most this many captures in the cache. |
369
+ | `DESKTOP_TOUCH_SCREENSHOT_MAX_BYTES` | `256 MiB` | Cap the total cache size on disk. |
370
+ | `DESKTOP_TOUCH_SCREENSHOT_MAX_AGE_MS` | *(off)* | Drop captures older than this many milliseconds (opt-in). |
371
+ | `DESKTOP_TOUCH_SCREENSHOT_AUTOPRUNE` | `on` | Auto-trim the cache as new captures are saved. Set `0` to disable. |
372
+ | `DESKTOP_TOUCH_SCREENSHOT_MIN_EVICT_AGE_MS` | `60000` | Never auto-evict a capture younger than this (ms), so a by-ref link you were just handed survives long enough to open even when another AI/process on the same PC is also capturing. `0` disables. |
373
+
360
374
  ### Auto Perception (always-on)
361
375
 
362
376
  Phase 4 privatizes the explicit `perception_*` tool family — the v0.12 Auto
@@ -739,15 +753,14 @@ All V1 tools continue to work without interruption — no reinstall required. Re
739
753
 
740
754
  Flag semantics (exact-match: only the literal string `"1"` counts):
741
755
 
742
- | `DISABLE_FUKUWARAI_V2` | `ENABLE_FUKUWARAI_V2` | V2 state |
743
- |---|---|---|
744
- | unset / not `"1"` | unset / not `"1"` | **ON** (default) |
745
- | unset / not `"1"` | `"1"` | ON (legacy flag — see below) |
746
- | `"1"` | any | **OFF** — DISABLE wins |
756
+ | `DISABLE_FUKUWARAI_V2` | V2 state |
757
+ |---|---|
758
+ | unset / not `"1"` | **ON** (default) |
759
+ | `"1"` | **OFF** (kill switch) |
747
760
 
748
- ### Deprecated: `DESKTOP_TOUCH_ENABLE_FUKUWARAI_V2`
761
+ ### Removed: `DESKTOP_TOUCH_ENABLE_FUKUWARAI_V2`
749
762
 
750
- This was the opt-in switch in v0.16.x. It is still accepted for backward compatibility but no longer required — the server prints a deprecation warning on startup when it is set. Remove it from your config; V2 is on by default.
763
+ This was the opt-in switch in v0.16.x. V2 is on by default since v0.17, so the flag no longer has any effect and is safe to delete from your config. To turn V2 off, set `DESKTOP_TOUCH_DISABLE_FUKUWARAI_V2=1`.
751
764
 
752
765
  ### Recovery when V2 fails
753
766
 
@@ -790,6 +803,15 @@ For `desktop_discover` warnings (`visual_provider_unavailable`, `visual_provider
790
803
 
791
804
  ---
792
805
 
806
+ ## 🚀 3,000+ Downloads!
807
+
808
+ This project just passed **3,000+ downloads**. Huge thanks to everyone who
809
+ tried an experimental desktop-automation MCP server, filed issues, opened PRs,
810
+ and shared what broke. Every bug report made the next release better.
811
+ Thank you for building with me!
812
+
813
+ ---
814
+
793
815
  ## License
794
816
 
795
817
  MIT
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.10.3";
21
+ const PACKAGE_VERSION = "1.11.0";
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.10.3",
27
+ tagName: "v1.11.0",
28
28
  assetName: ASSET_NAME,
29
- sha256: "940b518d92f7678d02289560bddd68f34e8813e76ab5d051feb0da31d6865cf1",
29
+ sha256: "67e0ae927a9a3edc499d0f437a7f9395b52c8e32fd79147c853d308686f65e04",
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.10.3",
3
+ "version": "1.11.0",
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. 29 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.",
5
+ "description": "Let Claude, Cursor, or any MCP client see and operate your Windows 10/11 desktop. 31 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",
@@ -100,22 +100,23 @@
100
100
  "build:rs": "node scripts/build-rs.mjs --release",
101
101
  "build:rs:debug": "node scripts/build-rs.mjs --debug",
102
102
  "artifacts:rs": "napi artifacts",
103
- "bench:envelope-size": "node benches/l4_envelope_size.mjs"
103
+ "bench:envelope-size": "node benches/l4_envelope_size.mjs",
104
+ "bench:wgc-latency": "node benches/wgc_latency.mjs"
104
105
  },
105
106
  "devDependencies": {
106
107
  "@eslint/js": "^10.0.1",
107
108
  "@modelcontextprotocol/sdk": "^1.10.0",
108
- "@napi-rs/cli": "^3.7.0",
109
+ "@napi-rs/cli": "^3.7.2",
109
110
  "@nut-tree-fork/nut-js": "^4.2.6",
110
- "@types/node": "^25.9.2",
111
+ "@types/node": "^26.0.0",
111
112
  "@types/ws": "^8.18.1",
112
- "eslint": "^10.4.1",
113
+ "eslint": "^10.5.0",
113
114
  "fast-check": "^4.8.0",
114
115
  "globals": "^17.5.0",
115
- "sharp": "^0.34.5",
116
+ "sharp": "^0.35.2",
116
117
  "typescript": "^6.0.2",
117
- "typescript-eslint": "^8.60.1",
118
- "vitest": "^4.1.8",
118
+ "typescript-eslint": "^8.61.1",
119
+ "vitest": "^4.1.9",
119
120
  "ws": "^8.21.0",
120
121
  "zod": "^4.3.6"
121
122
  }