# 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 with its installer, `docker` for the image, `binary` for the program alone.

```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. Use one only when the device's owner accepts its `state` and each of its `limits`. 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

Run [the Linux kit](/guides/device-linux-kit.md), [the image](/guides/device-docker.md) or [the program alone](/guides/device-program.md).

## Every file

The table speaks for the next build and `/kit/index.json` for what this server publishes now. A dated note speaks only for the digest it names.

<!-- 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` | `preview` | `not_run_by_coronium` |
| Linux agent kit | `linux` | `amd64` | `binary` | `available` | `system_ca_roots_required` |
| Linux agent kit | `linux` | `arm64` | `kit` | `preview` | `not_run_by_coronium`, `system_ca_roots_required` |
| Docker image | `linux` | `arm64` | `docker` | `preview` | `not_run_by_coronium` |
| Linux agent kit | `linux` | `arm64` | `binary` | `preview` | `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` | `preview` | `not_run_by_coronium`, `unsigned`, `no_installer` |
| Windows | `windows` | `arm64` | `binary` | `preview` | `not_run_by_coronium`, `unsigned`, `no_installer` |
| macOS | `darwin` | `arm64` | `binary` | `preview` | `not_run_by_coronium`, `unsigned`, `no_installer` |
<!-- facts:end kit.files -->

What Coronium observed of each published file is under Each system in [the program alone](/guides/device-program.md).

<!-- 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.
- `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.
- `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.

Reasons a way has no file:

- `store_policy`: The app store allows proxying for others only as an app's own main purpose, so Coronium offers no SDK for store apps. Run the agent on a computer or router on the same connection instead.
- `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.
