{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://boringcity.live/.well-known/boring-city-agent.schema.json",
  "title": "Boring City agent discovery document",
  "type": "object",
  "required": [
    "name",
    "world",
    "environment",
    "documentation",
    "protocol",
    "protocol_version",
    "versions",
    "health",
    "switches",
    "capabilities",
    "auth",
    "identity",
    "websocket",
    "send",
    "receive",
    "commands",
    "reply",
    "act",
    "delegation",
    "sandbox",
    "limits",
    "security",
    "not_yet"
  ],
  "properties": {
    "name": {
      "type": "string"
    },
    "world": {
      "type": "string"
    },
    "environment": {
      "type": "string"
    },
    "documentation": {
      "type": "string"
    },
    "protocol": {
      "type": "string"
    },
    "protocol_version": {
      "type": "integer"
    },
    "versions": {
      "type": "object",
      "required": [
        "bc",
        "engine",
        "deprecations"
      ],
      "properties": {
        "bc": {
          "type": "object",
          "required": [
            "supported",
            "min",
            "max",
            "negotiate"
          ],
          "properties": {
            "supported": {
              "type": "array"
            },
            "min": {
              "type": "integer"
            },
            "max": {
              "type": "integer"
            },
            "negotiate": {
              "type": "object"
            }
          }
        },
        "engine": {
          "type": "object",
          "required": [
            "major",
            "declare",
            "mismatch"
          ],
          "properties": {
            "major": {
              "type": "integer"
            }
          }
        },
        "deprecations": {
          "type": "array"
        }
      }
    },
    "health": {
      "type": "string"
    },
    "switches": {
      "type": "object",
      "required": [
        "where",
        "production_now"
      ]
    },
    "capabilities": {
      "type": "array"
    },
    "auth": {
      "type": "object",
      "required": [
        "kind",
        "access"
      ]
    },
    "identity": {
      "type": "object",
      "required": [
        "human",
        "agent",
        "guest",
        "watcher"
      ]
    },
    "websocket": {
      "type": "object",
      "required": [
        "url",
        "requires",
        "framing",
        "first_message"
      ]
    },
    "send": {
      "type": "object"
    },
    "receive": {
      "type": "array"
    },
    "commands": {
      "type": "object"
    },
    "reply": {
      "type": "object",
      "required": [
        "topic",
        "outcome"
      ]
    },
    "act": {
      "type": "object",
      "required": [
        "version",
        "observe",
        "act",
        "host_actions",
        "errors"
      ],
      "properties": {
        "version": {
          "type": "integer"
        },
        "errors": {
          "type": "array"
        },
        "host_actions": {
          "type": "object"
        }
      }
    },
    "delegation": {
      "type": "object",
      "required": [
        "request",
        "scope",
        "max_ticks",
        "settlement_families",
        "reclaim",
        "switch"
      ],
      "properties": {
        "scope": {
          "type": "array"
        },
        "max_ticks": {
          "type": "integer"
        },
        "settlement_families": {
          "type": "array"
        }
      }
    },
    "sandbox": {
      "type": "object",
      "required": [
        "url",
        "requires",
        "report",
        "checks",
        "switch"
      ],
      "properties": {
        "checks": {
          "type": "array"
        }
      }
    },
    "limits": {
      "type": "object",
      "required": [
        "payload_bytes"
      ],
      "properties": {
        "payload_bytes": {
          "type": "integer"
        }
      }
    },
    "security": {
      "type": "object",
      "required": [
        "never",
        "contact"
      ]
    },
    "not_yet": {
      "type": "array"
    }
  }
}
