跨平台化:移除 AppleScript + 去 macOS 硬编码

- 删除浏览器交互的 AppleScript(osascript 控 Chrome/Safari 做截图/eval/刷新/打开),
  改由外部 playwright MCP 承担;保留走 Editor.Message 的跨平台编辑器操作
- openDevDir 打开命令按平台分支(mac=open / win=explorer / linux=xdg-open)
- execPath 解析弱化靠注册表/进程查询,删掉 /Applications macOS 硬编码兜底
- editor-control 去 macOS-only 假设,ps 进程查询按平台分支(win 用 wmic)
- build-cmd Cocos 安装路径按平台拼

Win 特定逻辑(wmic、CocosDashboard 安装路径)标 TODO[win-verify],待 Windows 实测补全。

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
furao
2026-06-07 17:54:05 +08:00
parent 33b90dab22
commit bee9f89c98
6 changed files with 67 additions and 407 deletions
-5
View File
@@ -40,16 +40,11 @@
"get-status": { "methods": ["getStatus"] },
"get-mcp-config": { "methods": ["getMcpConfig"] },
"refresh-assets": { "methods": ["refreshAssets"] },
"screenshot": { "methods": ["screenshot"] },
"query-preview-url": { "methods": ["queryPreviewUrl"] },
"trigger-refresh": { "methods": ["triggerRefresh"] },
"trigger-reimport": { "methods": ["triggerReimport"] },
"soft-reload-scene": { "methods": ["softReloadScene"] },
"open-preview": { "methods": ["openPreview"] },
"screenshot-copy": { "methods": ["screenshotCopy"] },
"clean-dev-dir": { "methods": ["cleanDevDir"] },
"eval-in-preview": { "methods": ["evalInPreview"] },
"get-debug-buttons": { "methods": ["getDebugButtons"] },
"list-worktrees": { "methods": ["listWorktrees"] },
"open-dev-dir": { "methods": ["openDevDir"] }
}