{
  "tools": {
    "atel_capabilities": {
      "inputSchema": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "host": {
            "type": "string",
            "description": "省略时取请求头 X-Atel-Host。"
          }
        },
        "additionalProperties": false
      },
      "outputSchema": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "required": [
          "skillVersion",
          "minSkillVersion",
          "handoffModes",
          "hostAdapted",
          "polling",
          "scenarios",
          "features",
          "limits",
          "requestId"
        ],
        "properties": {
          "skillVersion": {
            "type": "string"
          },
          "minSkillVersion": {
            "type": "string"
          },
          "handoffModes": {
            "type": "array",
            "items": {
              "enum": [
                "url_elicitation",
                "link",
                "push",
                "poll"
              ]
            }
          },
          "hostAdapted": {
            "type": "boolean"
          },
          "polling": {
            "type": "object",
            "required": [
              "defaultSeconds",
              "minSeconds",
              "maxSeconds",
              "pendingVerificationSeconds",
              "maxWaitSeconds"
            ],
            "properties": {
              "defaultSeconds": {
                "const": 15
              },
              "minSeconds": {
                "const": 5
              },
              "maxSeconds": {
                "const": 60
              },
              "pendingVerificationSeconds": {
                "const": 60
              },
              "maxWaitSeconds": {
                "const": 30
              }
            }
          },
          "scenarios": {
            "const": [
              "http402"
            ]
          },
          "features": {
            "type": "object",
            "required": [
              "bitrefillGiftCards",
              "vaultCheckout"
            ],
            "properties": {
              "bitrefillGiftCards": {
                "type": "boolean",
                "description": "由 FEATURE_BITREFILL 决定。"
              },
              "vaultCheckout": {
                "const": true
              }
            }
          },
          "limits": {
            "type": "object",
            "required": [
              "quantityMax",
              "requirementNoteMax",
              "userUtteranceMax"
            ],
            "properties": {
              "quantityMax": {
                "const": 20
              },
              "requirementNoteMax": {
                "const": 2000
              },
              "userUtteranceMax": {
                "const": 2000
              }
            }
          },
          "requestId": {
            "type": "string",
            "minLength": 1,
            "maxLength": 64
          }
        }
      }
    },
    "atel_signup_status": {
      "inputSchema": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "required": [
          "inviteId",
          "identity"
        ],
        "properties": {
          "inviteId": {
            "type": "string",
            "pattern": "^inv_[0-7][0-9A-HJKMNP-TV-Z]{25}$",
            "minLength": 30,
            "maxLength": 30
          },
          "identity": {
            "type": "object",
            "oneOf": [
              {
                "required": [
                  "type",
                  "clientId",
                  "clientAssertion"
                ],
                "properties": {
                  "type": {
                    "const": "oauth"
                  },
                  "clientId": {
                    "type": "string",
                    "minLength": 1
                  },
                  "clientAssertion": {
                    "type": "string",
                    "minLength": 1
                  }
                },
                "additionalProperties": false
              },
              {
                "required": [
                  "type",
                  "did",
                  "identitySignature"
                ],
                "properties": {
                  "type": {
                    "const": "did"
                  },
                  "did": {
                    "type": "string",
                    "pattern": "^did:(web|key):\\S",
                    "not": {
                      "pattern": "\\s"
                    }
                  },
                  "identitySignature": {
                    "type": "string",
                    "minLength": 1
                  }
                },
                "additionalProperties": false
              }
            ]
          }
        },
        "additionalProperties": false
      },
      "outputSchema": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "required": [
          "status",
          "pollAfterSeconds",
          "requestId"
        ],
        "properties": {
          "status": {
            "enum": [
              "pending",
              "completed_bound",
              "completed_unbound",
              "expired"
            ]
          },
          "pollAfterSeconds": {
            "type": "integer",
            "const": 15
          },
          "requestId": {
            "type": "string",
            "minLength": 1,
            "maxLength": 64
          },
          "userId": false,
          "email": false,
          "emailNormalized": false,
          "profileDraft": false,
          "profileConfirmed": false,
          "displayName": false,
          "address": false,
          "phone": false
        }
      }
    }
  }
}
