At publish time, the binaries for every supported platform are downloaded by build/prepare-binaries.js, verified against binaries.lock.json (SHA256), and placed under bin/<target>/rg[.exe]. They ship inside the npm tarball.
At runtime, lib/index.js resolves rgPath from process.platform/process.arch to the correct bin/<target>/<binary>.
There is no postinstall step and no runtime network access.