{
  "$id": "https://oaslananka.github.io/a2amesh/schemas/agent-card.schema.json",
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "anyOf": [
    {
      "additionalProperties": false,
      "properties": {
        "capabilities": {
          "additionalProperties": false,
          "properties": {
            "backgroundJobs": { "type": "boolean" },
            "extendedAgentCard": { "type": "boolean" },
            "mcpCompatible": { "type": "boolean" },
            "pushNotifications": { "type": "boolean" },
            "stateTransitionHistory": { "type": "boolean" },
            "streaming": { "type": "boolean" }
          },
          "type": "object"
        },
        "defaultInputModes": { "items": { "type": "string" }, "type": "array" },
        "defaultOutputModes": { "items": { "type": "string" }, "type": "array" },
        "description": { "type": "string" },
        "documentationUrl": { "format": "uri", "type": "string" },
        "extensions": {
          "items": {
            "additionalProperties": false,
            "properties": {
              "required": { "type": "boolean" },
              "uri": { "format": "uri", "type": "string" },
              "version": { "type": "string" }
            },
            "required": ["uri"],
            "type": "object"
          },
          "type": "array"
        },
        "iconUrl": { "format": "uri", "type": "string" },
        "modelHints": { "items": { "type": "string" }, "type": "array" },
        "name": { "type": "string" },
        "protocolBinding": { "type": "string" },
        "protocolVersion": { "enum": ["1.0", "1.2"], "type": "string" },
        "provider": {
          "additionalProperties": false,
          "properties": {
            "name": { "type": "string" },
            "url": { "format": "uri", "type": "string" }
          },
          "required": ["name", "url"],
          "type": "object"
        },
        "security": {
          "items": {
            "additionalProperties": { "items": { "type": "string" }, "type": "array" },
            "propertyNames": { "type": "string" },
            "type": "object"
          },
          "type": "array"
        },
        "securitySchemes": {
          "items": {
            "oneOf": [
              {
                "additionalProperties": false,
                "properties": {
                  "description": { "type": "string" },
                  "id": { "type": "string" },
                  "in": { "enum": ["header", "query"], "type": "string" },
                  "name": { "type": "string" },
                  "type": { "const": "apiKey", "type": "string" }
                },
                "required": ["type", "id", "in", "name"],
                "type": "object"
              },
              {
                "additionalProperties": false,
                "properties": {
                  "algorithms": { "items": { "type": "string" }, "type": "array" },
                  "audience": {
                    "anyOf": [
                      { "type": "string" },
                      { "items": { "type": "string" }, "type": "array" }
                    ]
                  },
                  "bearerFormat": { "type": "string" },
                  "description": { "type": "string" },
                  "id": { "type": "string" },
                  "issuer": { "type": "string" },
                  "jwksUri": { "format": "uri", "type": "string" },
                  "scheme": { "const": "bearer", "type": "string" },
                  "type": { "const": "http", "type": "string" }
                },
                "required": ["type", "id", "scheme"],
                "type": "object"
              },
              {
                "additionalProperties": false,
                "properties": {
                  "algorithms": { "items": { "type": "string" }, "type": "array" },
                  "audience": {
                    "anyOf": [
                      { "type": "string" },
                      { "items": { "type": "string" }, "type": "array" }
                    ]
                  },
                  "description": { "type": "string" },
                  "id": { "type": "string" },
                  "issuer": { "type": "string" },
                  "jwksUri": { "format": "uri", "type": "string" },
                  "openIdConnectUrl": { "format": "uri", "type": "string" },
                  "type": { "const": "openIdConnect", "type": "string" }
                },
                "required": ["type", "id", "openIdConnectUrl"],
                "type": "object"
              }
            ]
          },
          "type": "array"
        },
        "signatures": {
          "items": {
            "additionalProperties": false,
            "properties": {
              "algorithm": { "enum": ["ES256", "RS256", "EdDSA"], "type": "string" },
              "jws": { "type": "string" },
              "keyId": { "type": "string" }
            },
            "required": ["algorithm", "keyId", "jws"],
            "type": "object"
          },
          "type": "array"
        },
        "signedAt": {
          "format": "date-time",
          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$",
          "type": "string"
        },
        "skills": {
          "items": {
            "additionalProperties": false,
            "properties": {
              "description": { "type": "string" },
              "examples": { "items": { "type": "string" }, "type": "array" },
              "id": { "type": "string" },
              "inputModes": { "items": { "type": "string" }, "type": "array" },
              "name": { "type": "string" },
              "outputModes": { "items": { "type": "string" }, "type": "array" },
              "tags": { "items": { "type": "string" }, "type": "array" }
            },
            "required": ["id", "name", "description"],
            "type": "object"
          },
          "type": "array"
        },
        "supportedInterfaces": {
          "items": {
            "additionalProperties": false,
            "properties": {
              "protocolBinding": { "enum": ["HTTP+JSON", "gRPC", "WebSocket"], "type": "string" },
              "protocolVersion": { "enum": ["0.3", "1.0", "1.2"], "type": "string" },
              "url": { "format": "uri", "type": "string" }
            },
            "required": ["url", "protocolBinding", "protocolVersion"],
            "type": "object"
          },
          "type": "array"
        },
        "transport": { "enum": ["http", "sse", "ws", "grpc"], "type": "string" },
        "url": { "format": "uri", "type": "string" },
        "version": { "type": "string" }
      },
      "required": ["protocolVersion", "name", "description", "url", "version"],
      "type": "object"
    },
    {
      "additionalProperties": false,
      "properties": {
        "authentication": {
          "items": {
            "oneOf": [
              {
                "additionalProperties": false,
                "properties": {
                  "description": { "type": "string" },
                  "id": { "type": "string" },
                  "in": { "enum": ["header", "query"], "type": "string" },
                  "name": { "type": "string" },
                  "type": { "const": "apiKey", "type": "string" }
                },
                "required": ["type", "id", "in", "name"],
                "type": "object"
              },
              {
                "additionalProperties": false,
                "properties": {
                  "algorithms": { "items": { "type": "string" }, "type": "array" },
                  "audience": {
                    "anyOf": [
                      { "type": "string" },
                      { "items": { "type": "string" }, "type": "array" }
                    ]
                  },
                  "bearerFormat": { "type": "string" },
                  "description": { "type": "string" },
                  "id": { "type": "string" },
                  "issuer": { "type": "string" },
                  "jwksUri": { "format": "uri", "type": "string" },
                  "scheme": { "const": "bearer", "type": "string" },
                  "type": { "const": "http", "type": "string" }
                },
                "required": ["type", "id", "scheme"],
                "type": "object"
              },
              {
                "additionalProperties": false,
                "properties": {
                  "algorithms": { "items": { "type": "string" }, "type": "array" },
                  "audience": {
                    "anyOf": [
                      { "type": "string" },
                      { "items": { "type": "string" }, "type": "array" }
                    ]
                  },
                  "description": { "type": "string" },
                  "id": { "type": "string" },
                  "issuer": { "type": "string" },
                  "jwksUri": { "format": "uri", "type": "string" },
                  "openIdConnectUrl": { "format": "uri", "type": "string" },
                  "type": { "const": "openIdConnect", "type": "string" }
                },
                "required": ["type", "id", "openIdConnectUrl"],
                "type": "object"
              }
            ]
          },
          "type": "array"
        },
        "capabilities": {
          "additionalProperties": false,
          "properties": {
            "backgroundJobs": { "type": "boolean" },
            "extendedAgentCard": { "type": "boolean" },
            "mcpCompatible": { "type": "boolean" },
            "pushNotifications": { "type": "boolean" },
            "stateTransitionHistory": { "type": "boolean" },
            "streaming": { "type": "boolean" }
          },
          "type": "object"
        },
        "defaultInputMode": { "type": "string" },
        "defaultOutputMode": { "type": "string" },
        "description": { "type": "string" },
        "iconUrl": { "format": "uri", "type": "string" },
        "name": { "type": "string" },
        "protocolVersion": { "const": "0.3", "type": "string" },
        "provider": {
          "additionalProperties": false,
          "properties": {
            "name": { "type": "string" },
            "url": { "format": "uri", "type": "string" }
          },
          "required": ["name", "url"],
          "type": "object"
        },
        "skills": {
          "items": {
            "additionalProperties": false,
            "properties": {
              "description": { "type": "string" },
              "examples": { "items": { "type": "string" }, "type": "array" },
              "id": { "type": "string" },
              "inputModes": { "items": { "type": "string" }, "type": "array" },
              "name": { "type": "string" },
              "outputModes": { "items": { "type": "string" }, "type": "array" },
              "tags": { "items": { "type": "string" }, "type": "array" }
            },
            "required": ["id", "name", "description"],
            "type": "object"
          },
          "type": "array"
        },
        "supportsAuthenticatedExtendedCard": { "type": "boolean" },
        "url": { "format": "uri", "type": "string" },
        "version": { "type": "string" }
      },
      "required": ["protocolVersion", "name", "description", "url", "version"],
      "type": "object"
    }
  ],
  "description": "Agent2Agent Agent Card payloads accepted by A2A Mesh.",
  "title": "A2A Mesh Agent Card",
  "x-a2a-source": {
    "schemaSymbol": "AnyAgentCardSchema",
    "sourceFile": "packages/runtime/src/types/agent-card.ts",
    "typeSymbol": "AnyAgentCard"
  }
}
