94d6858160
When the gateway is installed as a macOS launch agent and no token is configured, the service enters an infinite restart loop because launchd does not inherit shell environment variables. Auto-generate a token during `gateway install` when auth mode is `token` and no token exists, matching the existing pattern in doctor.ts and configure.gateway.ts. The token is persisted to the config file and embedded in the plist EnvironmentVariables for belt-and-suspenders reliability. Relates-to: #5103, #2433, #1690, #7749