{
  "description": "Use nanobot from Matrix rooms.",
  "requirements": "Homeserver, account token, room access",
  "setup": {
    "docsLabel": "Open Matrix setup",
    "officialLabel": "Open Matrix clients",
    "tryIt": "Invite the Matrix account into a room and send a test message.",
    "summary": "Matrix needs a homeserver account and either password login or an access token.",
    "steps": [
      "Create or choose a Matrix account for nanobot.",
      "Enter the homeserver, user ID, and either password or access-token credentials.",
      "Save and enable Matrix, invite the account to a room, and send a test message."
    ],
    "fields": {
      "homeserver": {
        "label": "Homeserver",
        "placeholder": "https://matrix.org"
      },
      "userId": {
        "label": "User ID",
        "placeholder": "@nanobot:matrix.org"
      },
      "password": {
        "label": "Password",
        "placeholder": "••••••",
        "help": "Use either password login or access token login."
      },
      "accessToken": {
        "label": "Access token",
        "placeholder": "Optional token login",
        "help": "Preferred when your Matrix client exposes an access token."
      },
      "deviceId": {
        "label": "Device ID",
        "placeholder": "Required with an access token",
        "help": "Copy the device ID associated with the access token. Password login does not need it."
      },
      "groupPolicy": {
        "label": "Group behavior",
        "choices": {
          "mention": "Mention only",
          "open": "All messages",
          "allowlist": "Allowlist"
        }
      }
    }
  }
}
