SetupThe setup service
How it runs
RoachNet Setup starts roachnet-runtime --setup and talks to it on 127.0.0.1, on an ephemeral port. The service takes no token; it answers only a loopback Host, and JSON bodies must be sent as application/json. It stops when Setup quits, but never in the middle of an install.
GET /api/state returns the saved installer settings, companion token included. That is one reason the service answers only a loopback Host.
Try it by hand
Pin the port with ROACHNET_SETUP_PORT, then call it:
ROACHNET_SETUP_PORT=38080 ~/RoachNet/app/RoachNet.app/Contents/Helpers/roachnet-runtime --setup &
SETUP=http://127.0.0.1:38080
curl -s "$SETUP/api/health"POST /api/install starts a real install. With "dryRun": true in the body it returns a finished preview task and changes nothing, which is the safe way to explore.
Install phases
An install reports its progress through GET /api/state. Each phase starts at this percentage:
| Progress | Phase |
|---|---|
| 5 | Inspect the Mac |
| 12 | Validate the plan: 2 GiB free, or 5 GiB with RoachClaw |
| 24 | Stage beside the target folder |
| 38 | RoachClaw (RoachInference is inside the helper, so nothing extra installs) |
| 52 | Write the install manifest |
| 64 | Copy RoachNet.app |
| 76 | Start the staged runtime until /api/health answers |
| 88 | Swap the install folder in and carry storage across |
| 94 | Point the RoachNet hostname at loopback |
| 98 | Launch |
A failure removes the staging folder and leaves the previous install alone.
Every route
| Method | Path | What it does |
|---|---|---|
| GET | /api/state | Installer state Machine checks, saved choices and the current or last install task, in one read. |
| POST | /api/config | Save installer choices Normalizes and saves setup choices without installing anything. |
| POST | /api/install | Start the install Starts the staged install and returns at once. Poll /api/state for progress. |
| POST | /api/launch | Open RoachNet Opens the installed native app. |
| POST | /api/container-runtime/start | Container runtime (retired) Still routed so a client that asks gets a clear no. Always a 400. |
| GET | /api/health | Setup health Liveness for the setup service. |
6 routes, from the route data the route browser uses, checked against Router.swift at tag v1.1.4.
Related
- Command line covers
roachnet-runtime --install, the headless install Homebrew uses. - Install RoachNet on a Mac