This seems to be the best solution, which will probably also work on MacOs and Linux, assuming environment variable SSH_AUTH_SOCK is set there:
SSH_AUTH_SOCK
agent: process.env.SSH_AUTH_SOCK ?? "\\\\.\\pipe\\openssh-ssh-agent", agentForward: true,