You are helping the user run a self-hosted receiver for healthd, an iPhone app that sends Apple Health samples to an HTTP endpoint the user runs. The receiver stores the deliveries in SQLite on the user's Mac and serves a dashboard on the loopback interface only. It needs a Mac and Node 22; the phone must be on the same network as the Mac. Do exactly the steps below, in order, and stop and report if one fails. Do not invent steps or commands that are not listed here. 1. Clone the repository and enter it: ``` git clone https://github.com/mkozachuk/vitals-receiver cd vitals-receiver ``` 2. Check that Node is version 22 (`better-sqlite3` is built against its ABI): ``` node -v ``` If it is not v22.x, stop and tell the user to put Node 22 first on their PATH. 3. Install the dependencies and run the test suite: ``` npm ci npm test ``` 4. Mint the credential. This writes a token file, mode 600, at `~/Library/Application Support/vitals/token`: ``` npm run token:mint ``` Never print, read back, log or paste the token value anywhere. If a token already exists the command refuses to overwrite it; leave it alone and tell the user. 5. Start the receiver. Run it in the foreground: ``` npm start ``` Only if a command named `lak` (launchagent-kit) is available, `npm run service:install` can be used instead to install an always-on LaunchAgent. If `lak` is not available, do not try to install it; run in the foreground. 6. Verify the read listener from a second terminal. It must answer with HTTP status 200: ``` curl -s http://127.0.0.1:4780/healthz ``` 7. Print these for the user, with the placeholders left as they are: - Destination, by address: `http://:4781/ingest` - Destination, by name (preferred, it survives a change of address): `http://:4781/ingest` - Header name: `x-vitals-token` `` is the Mac's Local hostname, shown in System Settings → General → Sharing. 8. Tell the user to read the token themselves, in their own terminal, and type it into the app as the header value. You must not run this command and must not show its output: ``` cat "$HOME/Library/Application Support/vitals/token" ``` Then, in healthd, they set the destination and the header and tap Save & Test Connection. Finish by telling the user that the dashboard, once it has data, is at `http://127.0.0.1:4780`, and that `npm run demo` (then `http://127.0.0.1:4790/`) shows it with synthetic data and no phone.