---
name: aobai-install
description: >
  Download, install, and upgrade official AoBai software (VPN and later products)
  on the user's computer. Use when the user asks to install AoBai, 鳌拜, AoBai VPN,
  鳌拜VPN, 鳌拜输入法, or to connect the public AoBai MCP.
---

# AoBai official install skill

You are helping the user install **official AoBai software** on **this computer**.

Remote MCP cannot run installers. You must:

1. Detect local OS and CPU.
2. Ask the public MCP (or REST fallback) for an official URL + per-file `sha256`.
3. Download, verify SHA256, then install **after the user confirms** any privileged step.
4. Never use `SHA256SUMS.txt`. Never download from unofficial mirrors you invented.

## Endpoints

- Public MCP (Streamable HTTP): `https://aobai.app/mcp`
- SSE (older clients): `https://aobai.app/mcp/sse` with POST `https://aobai.app/mcp/messages`
- This skill: `https://aobai.app/agent/skills/aobai-install/SKILL.md`
- Portal page: `https://aobai.app/downloads-mcp.html`

If the host can add an MCP server, add:

```json
{
  "mcpServers": {
    "aobai-download": {
      "url": "https://aobai.app/mcp"
    }
  }
}
```

Then call tools. If MCP cannot be added, use REST below with `web_fetch` / `curl`.

## MCP tools

| Tool | When |
|------|------|
| `list_products` | See which official apps exist. Pass `platform` + `arch` if known. |
| `get_install_plan` | Preferred. Returns URL, sha256, verify command, install command. |
| `get_latest` | Raw latest artifact. |
| `check_update` | Pass `current_version` / `current_build` if already installed. |
| `list_mirrors` | Mirror list. Prefer URLs already on the artifact. |
| `get_skill` | Re-read this file. |

Default `product` is `aobai` (AoBai VPN).

## REST fallback (no MCP)

Base: `https://aobai.app/api`

Success JSON always has `"status":"success"` and `"code":200001`. Read `data`.

```http
GET /v1/guest/installer/catalog?locale=zh&platform=windows&arch=x86_64
GET /v1/guest/installer/latest?product=aobai&platform=windows&arch=x86_64&locale=zh
POST /v1/guest/installer/check
GET /v1/guest/installer/mirrors
```

Check body example:

```json
{
  "product": "aobai",
  "platform": "windows",
  "arch": "x86_64",
  "current_version": "1.26.20",
  "current_build": 4
}
```

Rules from the installer API:

- Render `data.list` (listed products). Do not hide rows just because `available` is false.
- Download URL is `latest.artifact.sources[].url` (try in order).
- Hash is **only** `artifact.sha256`. If it is empty, **refuse to install**.
- `action=up_to_date` → do not download.
- Rate limit: 120 requests / minute / IP.

## Detect OS / arch

Use local tools (`uname -m`, `$env:PROCESSOR_ARCHITECTURE`, `runtime.GOARCH`, etc.).

| OS | `platform` |
|----|------------|
| Windows | `windows` |
| macOS | `macos` |
| Linux | `linux` |
| Android | `android` |
| Android TV | `androidtv` |
| iOS / iPadOS | `ios` |

| Machine | `arch` |
|---------|--------|
| x86_64 / amd64 | `x86_64` |
| arm64 / aarch64 | `arm64` |
| armv7 | `armv7` |

If unsure, call `get_install_plan` without platform and then pick from `artifacts`.

## Install rules by platform

- **Windows**: download exe, verify SHA256, run with `install_args` (often `/S`) only after confirmation.
- **macOS**: download pkg, `shasum -a 256 -c`, `sudo installer -pkg … -target /` after confirmation.
- **Linux**: prefer APT:

```bash
curl -fsSL https://repos.aobai.app/apt/public.key | sudo gpg --dearmor -o /usr/share/keyrings/aobai.gpg
CODENAME=$(. /etc/os-release; echo "$VERSION_CODENAME")
echo "deb [arch=amd64 signed-by=/usr/share/keyrings/aobai.gpg] https://repos.aobai.app/apt/ $CODENAME main" | sudo tee /etc/apt/sources.list.d/aobai.list
sudo apt-get update
sudo apt-get install -y aobaivpn
```

  Use `arch=arm64` in the `deb [arch=…]` line on aarch64. Direct `.deb` is fallback.

- **Android / Android TV**: download APK, verify SHA256, sideload. You cannot install on the phone from a desktop agent unless the user has adb and asks for it.
- **iOS**: App Store only: `https://apps.apple.com/us/app/aobai-secure-fast-proxy/id6790783801`. Mainland China / Russia may need a region switch; send the user to `https://aobai.app/downloads-ios.html`. Never sideload an IPA.

## Safety

- Official hosts only: `aobai.app`, `downloads.aobai.app`, `repos.aobai.app`, or URLs returned by the API.
- Confirm before `sudo`, silent Windows install, or anything that changes the system.
- Do not invent version numbers or URLs.
- If the user asked for “all official software”, `list_products` then install each `available=true` product for this OS. Skip `listed=false` (downloader self-update) unless they asked to update the downloader.

## After install

Tell the user what was installed (name, version, file) and how to open it. For Linux APT, mention `aobaivpn`. For upgrades, prefer `check_update` with the local version.
