Set-StrictMode -Version Latest $ErrorActionPreference = 'Stop' $repoRoot = Resolve-Path (Join-Path $PSScriptRoot '..\..') $protoRoot = Join-Path $repoRoot 'src\MxGateway.Contracts\Protos' $outputRoot = Join-Path $PSScriptRoot 'src\mxgateway\generated' $python = 'C:\Users\dohertj2\AppData\Local\Programs\Python\Python312\python.exe' if (-not (Test-Path $python)) { throw "Python was not found at $python. See docs/toolchain-links.md." } New-Item -ItemType Directory -Path $outputRoot -Force | Out-Null Get-ChildItem -Path (Join-Path $outputRoot '*_pb2.py') -File | Remove-Item Get-ChildItem -Path (Join-Path $outputRoot '*_pb2_grpc.py') -File | Remove-Item & $python -m grpc_tools.protoc ` "-I$protoRoot" ` "--python_out=$outputRoot" ` "--grpc_python_out=$outputRoot" ` mxaccess_gateway.proto ` mxaccess_worker.proto