# Choose and check the agent file

Calls go to https://supply.coronium.ai. `/kit/index.json` lists what this server publishes now, with `"schema": 2`: stop on another number or none. Each file has `name`, `sha256`, `bytes`, `way`, `os`, `arch`, `kind`, `state`, `checked` and `limits`.

## Steps

1. Pick a file by `os`, `arch` and `kind`. `uname -m` prints `x86_64` for `amd64`, `aarch64` or `arm64` for `arm64`, `armv7l` for `armv7` and `armv6l` for `armv6`. A MIPS router prints `mips` either way: take `mipsle` when its firmware names a little-endian architecture such as `mipsel_24kc`. `kind` is `kit` for the Linux kit, `docker` for the image, `binary` for the program alone, and `install` and `uninstall` for the scripts that make the program a service on macOS and Windows and remove it, whose `arch` is `any`.

```sh
umask 077
SUPPLY=${SUPPLY:-https://supply.coronium.ai}
curl -fsS "$SUPPLY/kit/index.json" -o coronium-kit.json
jq -r '.files[] | select(.os == "linux" and .arch == "amd64") | "\(.name) \(.kind) \(.state) \(.limits | join(","))"' coronium-kit.json
```

Expect: one line per file of that system. Only a `preview` file needs the owner's yes, to its state and each of its `limits`, whatever `checked` reads. Safe to repeat: yes.

2. Download the file and check it against the list.

```sh
umask 077
SUPPLY=${SUPPLY:-https://supply.coronium.ai}
FILE=coronium-agent-linux-amd64
curl -fsSLO "$SUPPLY/kit/$FILE"
jq -r --arg f "$FILE" '.files[] | select(.name == $f) | "\(.sha256)  \(.name)"' coronium-kit.json | sha256sum -c
```

Expect: `coronium-agent-linux-amd64: OK`; stop on anything else. Nothing is signed yet: the list is as trustworthy as its HTTPS connection. Safe to repeat: yes.

## Then

Linux with systemd and a person at its terminal: [the Linux kit](/guides/device-linux-kit.md). A Docker host: [the image](/guides/device-docker.md). A service on [macOS](/guides/device-macos.md) or [Windows](/guides/device-windows.md): its installer. Anything else, a container among them, or no person at the terminal: [the program alone](/guides/device-program.md).

## Every file

The table is the next build's.

<!-- facts:begin kit.files -->
| Way | `os` | `arch` | `kind` | `state` | `limits` |
|---|---|---|---|---|---|
| Linux agent kit | `linux` | `amd64` | `kit` | `available` | `system_ca_roots_required` |
| Docker image | `linux` | `amd64` | `docker` | `available` | `not_run_by_coronium` |
| Linux agent kit | `linux` | `amd64` | `binary` | `available` | `system_ca_roots_required` |
| Linux agent kit | `linux` | `arm64` | `kit` | `available` | `not_run_by_coronium`, `system_ca_roots_required` |
| Docker image | `linux` | `arm64` | `docker` | `available` | `not_run_by_coronium` |
| Linux agent kit | `linux` | `arm64` | `binary` | `available` | `not_run_by_coronium`, `system_ca_roots_required` |
| Linux agent kit | `linux` | `armv7` | `binary` | `preview` | `not_run_by_coronium`, `system_ca_roots_required` |
| Linux agent kit | `linux` | `armv6` | `binary` | `preview` | `not_run_by_coronium`, `system_ca_roots_required` |
| Linux agent kit | `linux` | `riscv64` | `binary` | `preview` | `not_run_by_coronium`, `system_ca_roots_required` |
| Routers | `linux` | `mips` | `binary` | `preview` | `not_run_by_coronium`, `no_installer`, `system_ca_roots_required`, `large_for_small_flash` |
| Routers | `linux` | `mipsle` | `binary` | `preview` | `not_run_by_coronium`, `no_installer`, `system_ca_roots_required`, `large_for_small_flash` |
| Windows | `windows` | `amd64` | `binary` | `available` | `not_run_by_coronium`, `unsigned` |
| Windows | `windows` | `arm64` | `binary` | `available` | `not_run_by_coronium`, `unsigned` |
| Windows | `windows` | `any` | `install` | `available` | `not_run_by_coronium`, `unsigned`, `starts_at_login` |
| Windows | `windows` | `any` | `uninstall` | `available` | `not_run_by_coronium`, `unsigned` |
| macOS | `darwin` | `arm64` | `binary` | `preview` | `not_run_by_coronium`, `unsigned` |
| macOS | `darwin` | `any` | `install` | `preview` | `not_run_by_coronium`, `starts_at_login` |
| macOS | `darwin` | `any` | `uninstall` | `preview` | `not_run_by_coronium` |
| Android app SDK | `android` | `arm64_x86_64` | `aar` | `preview` | `sharing_apps_only`, `notice_proposed`, `container_run_only` |
<!-- facts:end kit.files -->

What Coronium observed of each file: [the program alone](/guides/device-program.md), Each system.

`version` is the published agent's. `GET /app/api/devices` returns, as `agent`, the name each device's agent gave its relay, such as `agent/0.1.0`, or null when its relay reported none. A name states a version, not a build: two builds of one version read the same.

<!-- facts:begin kit.words -->
States:

- `available`: Coronium took this exact file through its whole check on this system: digest checked, started by the published steps, connected to the relay, one billed request with bytes billed equal to bytes carried, then stopped and removed by the published steps. `checked` is the day of that record when it holds this file's SHA-256, and null otherwise. A file that also carries `not_run_by_coronium` is available by the owner's decision, without that check.
- `preview`: Built for this system, its header read back from its bytes, and not yet through that whole check here. Use it only when the device's owner accepts that and each of its limits.
- `not_available`: There is no file for this way. The way names its reason.

Limits:

- `not_run_by_coronium`: No run of this file on this system is recorded against its row.
- `unsigned`: Not code-signed: the system may warn about it or block it.
- `no_installer`: No installer and no service: you start it from a shell.
- `starts_at_login`: Its service belongs to one user and starts when that user logs in, not when the machine starts: after a restart it is back once that user has logged in.
- `system_ca_roots_required`: Needs the system's certificate roots (the ca-certificates package), which minimal, container and router images often lack. The Docker image carries its own.
- `large_for_small_flash`: Large for a router with 8 to 16 MB of flash.
- `sharing_apps_only`: Only for an app whose stated main purpose is sharing its user's connection, in a store that allows that or given out directly. A store allows proxying for others at most as an app's own purpose, and one forbids it outright: never inside a game, a utility or any other app.
- `notice_proposed`: The notice the library shows its user is proposed and not yet approved: the supply site enrols no device under it, and in an app that is not debuggable the library opens no consent screen.
- `container_run_only`: Run end to end on a development Android instance only, never on a phone: an ARM64 phone, real charging, the system's battery limits and mobile networks are not yet checked.

Reasons a way has no file:

- `platform_policy`: The platform's review rules allow background services only for listed purposes, and a proxy is not one. None is planned.
- `not_built`: Not built, or this build left its files out.
<!-- facts:end kit.words -->

A sharing kit inside another developer's product is not built.
