sync: Shanghai-U9 2026-09-03 MCP 排除清单补 Codex 桌面自带的 cua_repl(WindowsApps 路径原先认不出)
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) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018FykpdV2Y4RUWXU5PtoLqh
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user