4343
4444$ErrorActionPreference = " Stop"
4545
46- $Script :InstallerVersion = " 1.9.8"
46+ $Script :InstallerVersion = " 1.10.0"
47+ $Script :AgencyXTesterPluginPrompted = $false
4748
4849try {
4950 [Console ]::OutputEncoding = [System.Text.Encoding ]::UTF8
@@ -838,6 +839,34 @@ function Register-ClaudeDesktop([string]$CommandPath) {
838839 Warn " Restart Claude Desktop to load the X-Tester MCP server."
839840}
840841
842+ function Offer-AgencyXTesterPluginUpdate {
843+ if ($Script :AgencyXTesterPluginPrompted ) { return }
844+ $Script :AgencyXTesterPluginPrompted = $true
845+
846+ $agency = Get-Command " agency" - ErrorAction SilentlyContinue
847+ if (-not $agency ) { return }
848+ $agencyPath = $agency.Source
849+ if ($null -eq $Host.UI.RawUI ) {
850+ Info " Agency CLI detected; skipping cxe-xtester plugin prompt in non-interactive host."
851+ return
852+ }
853+
854+ Write-Host " "
855+ $answer = Read-Host " Agency CLI detected. Install/update xtester Agency plugin cxe-xtester from playground? [Y/n]"
856+ if (-not ([string ]::IsNullOrWhiteSpace($answer ) -or $answer -match ' ^(y|yes)$' )) {
857+ Info " Skipping Agency cxe-xtester plugin update."
858+ return
859+ }
860+
861+ Invoke-Step " Updating Agency cxe-xtester plugin" {
862+ & $agencyPath plugin uninstall cxe- xtester
863+ if ($LASTEXITCODE -ne 0 ) {
864+ Warn " agency plugin uninstall cxe-xtester exited with code $LASTEXITCODE ; continuing with install."
865+ }
866+ Invoke-External $agencyPath @ (" plugin" , " install" , " mp:cxe-xtester@playground" )
867+ }
868+ }
869+
841870function Register-ClaudeCode ([string ]$CommandPath ) {
842871 $claude = Get-Command " claude" - ErrorAction SilentlyContinue
843872 if (-not $claude ) {
@@ -846,6 +875,8 @@ function Register-ClaudeCode([string]$CommandPath) {
846875 return
847876 }
848877
878+ Offer- AgencyXTesterPluginUpdate
879+
849880 try {
850881 Invoke-Step " Registering X-Tester MCP with Claude Code" {
851882 Invoke-External $claude.Source @ (" mcp" , " add" , $ServerName , $CommandPath )
@@ -1015,7 +1046,7 @@ $selectedClients = Expand-Clients
10151046if (-not $SkipClientInstall `
10161047 -and ($selectedClients -contains ' copilot' ) `
10171048 -and (-not ($selectedClients -contains ' claude-code' )) `
1018- -and ($Host .UI.RawUI -ne $null ) `
1049+ -and ($null -ne $Host .UI.RawUI ) `
10191050 -and (Get-Command ' claude' - ErrorAction SilentlyContinue)) {
10201051 Write-Host " "
10211052 $answer = Read-Host " Claude Code CLI detected. Also register X-Tester MCP with Claude Code? [Y/n]"
@@ -1033,7 +1064,7 @@ if (-not $SkipClientInstall `
10331064if (-not $SkipClientInstall `
10341065 -and ($selectedClients -contains ' copilot' ) `
10351066 -and (-not ($selectedClients -contains ' vscode' )) `
1036- -and ($Host .UI.RawUI -ne $null ) `
1067+ -and ($null -ne $Host .UI.RawUI ) `
10371068 -and (Get-Command ' code' - ErrorAction SilentlyContinue)) {
10381069 Write-Host " "
10391070 $answer = Read-Host " VS Code detected. Also register X-Tester MCP with VS Code (user profile)? [Y/n]"
0 commit comments