From ecc913c4f18e33f5b00ce381d01f63e54d3d7b72 Mon Sep 17 00:00:00 2001 From: bowei Date: Thu, 3 Sep 2026 02:52:05 +0800 Subject: [PATCH] =?UTF-8?q?sync:=20Shanghai-U9=202026-09-03=20MCP=20?= =?UTF-8?q?=E6=8E=92=E9=99=A4=E6=B8=85=E5=8D=95=E8=A1=A5=20Codex=20?= =?UTF-8?q?=E6=A1=8C=E9=9D=A2=E8=87=AA=E5=B8=A6=E7=9A=84=20cua=5Frepl?= =?UTF-8?q?=EF=BC=88WindowsApps=20=E8=B7=AF=E5=BE=84=E5=8E=9F=E5=85=88?= =?UTF-8?q?=E8=AE=A4=E4=B8=8D=E5=87=BA=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Test-CodexManaged 原来只按名字认 node_repl、按路径认 .codex\runtimes 与 .codex\plugins\cache。Codex 更新后新增的 cua_repl 的 command 在 C:\Program Files\WindowsApps\OpenAI.Codex_...\app\ChatGPT.exe,两条都不命中, 于是被当成"Codex 独有的可移植 MCP"报进差集,险些复制到 Claude 侧。 名字集合加 cua_repl,路径再认 WindowsApps\OpenAI.Codex 与 OpenAI\Codex\。 原有的 .codex 路径正则一字未动。tests PASS;重跑审计 exit 0,四项 Matched。 Co-Authored-By: Claude Opus 5 (1M context) Claude-Session: https://claude.ai/code/session_018FykpdV2Y4RUWXU5PtoLqh --- tools-sync/scripts/sync_mcp_registrations.ps1 | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/tools-sync/scripts/sync_mcp_registrations.ps1 b/tools-sync/scripts/sync_mcp_registrations.ps1 index 4ae2055..7e9b4b5 100644 --- a/tools-sync/scripts/sync_mcp_registrations.ps1 +++ b/tools-sync/scripts/sync_mcp_registrations.ps1 @@ -100,9 +100,12 @@ print(json.dumps(data.get("mcp_servers", {}), ensure_ascii=False)) } function Test-CodexManaged($Mcp) { - if ($Mcp.name -eq "node_repl") { return $true } + if ($Mcp.name -in @("node_repl", "cua_repl")) { return $true } $command = [string]$Mcp.command - return ($command -match '(?i)[\\/]\.codex[\\/](runtimes|plugins[\\/]cache)[\\/]') + if ($command -match '(?i)[\\/]\.codex[\\/](runtimes|plugins[\\/]cache)[\\/]') { return $true } + # The Codex desktop app also bundles MCPs from its own install dir (MSIX + # WindowsApps, or AppData\Local\OpenAI\Codex). Host-owned, not portable. + return ($command -match '(?i)[\\/](WindowsApps[\\/]OpenAI\.Codex|OpenAI[\\/]Codex[\\/])') } function Get-PortableMcps($Map, [string]$Side) {