{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://super-calendar.io/agents/capabilities.schema.json",
  "title": "Super Calendar Capability Registry",
  "type": "object",
  "required": [
    "name",
    "version",
    "surfaces",
    "domains"
  ],
  "properties": {
    "$schema": {
      "type": "string"
    },
    "name": {
      "type": "string"
    },
    "version": {
      "type": "string"
    },
    "contract_version": {
      "type": "string"
    },
    "default_validation": {
      "type": "object",
      "additionalProperties": {
        "type": "string"
      }
    },
    "surfaces": {
      "type": "object",
      "additionalProperties": {
        "type": "object",
        "required": [
          "kind",
          "description"
        ],
        "properties": {
          "kind": {
            "type": "string"
          },
          "description": {
            "type": "string"
          }
        },
        "additionalProperties": true
      }
    },
    "domains": {
      "type": "object",
      "additionalProperties": {
        "type": "object",
        "required": [
          "lifecycle",
          "public",
          "preferred_surface",
          "surfaces"
        ],
        "properties": {
          "lifecycle": {
            "type": "string",
            "enum": [
              "stable",
              "beta",
              "alpha",
              "experimental",
              "planned",
              "deprecated",
              "unknown"
            ]
          },
          "public": {
            "type": "boolean"
          },
          "preferred_surface": {
            "type": "string"
          },
          "surfaces": {
            "type": "object",
            "additionalProperties": {
              "type": "object",
              "required": [
                "enabled",
                "requires_validation"
              ],
              "properties": {
                "enabled": {
                  "oneOf": [
                    {
                      "type": "boolean"
                    },
                    {
                      "type": "string",
                      "enum": [
                        "unknown",
                        "planned"
                      ]
                    }
                  ]
                },
                "preferred": {
                  "type": "boolean"
                },
                "requires_validation": {
                  "type": "string"
                }
              },
              "additionalProperties": true
            }
          },
          "required_contracts": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "privacy": {
            "type": "object",
            "additionalProperties": true
          },
          "notes": {
            "type": "string"
          }
        },
        "additionalProperties": true
      }
    },
    "gateway": {
      "type": "object",
      "additionalProperties": true
    },
    "workflows": {
      "type": "object",
      "additionalProperties": true
    }
  },
  "additionalProperties": true
}
