{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://www.agentscore.com/schemas/ucp/com-agentscore-identity-v1.json",
  "title": "AgentScore identity capability config (com.agentscore.identity) v1",
  "description": "Schema for the `config` object of a `com.agentscore.identity` capability binding inside a UCP profile's `capabilities`. The capability declares an AgentScore-gated merchant; the merchant's transactional endpoint runs the AgentScore identity gate (KYC, sanctions, age, jurisdiction) before settlement. Multi-parents `dev.ucp.shopping.checkout` and `dev.ucp.shopping.cart` so a UCP-aware agent reading either parent capability also picks up the AgentScore claims contract. UCP itself does not define identity; this fills the gap for trust-mode commerce. The wrapper fields are defined by UCP itself; this schema validates only the config payload. All config fields are optional; merchant declares which AgentScore checks the gate enforces.",
  "type": "object",
  "properties": {
    "require_kyc": {
      "type": "boolean",
      "description": "Gate denies if the operator/account behind the agent is not Stripe-Identity-verified."
    },
    "require_sanctions_clear": {
      "type": "boolean",
      "description": "Gate denies if the operator/account is flagged by OpenSanctions screening (OFAC, UN, EU, UK, etc.)."
    },
    "min_age": {
      "type": "integer",
      "minimum": 0,
      "description": "Gate denies if the verified age (from KYC) is below this threshold. Common values: 18, 21."
    },
    "allowed_jurisdictions": {
      "type": "array",
      "items": { "type": "string", "pattern": "^[A-Z]{2}$" },
      "description": "ISO-3166-1 alpha-2 country codes the gate accepts. Empty/absent allows any. Mutually exclusive with `blocked_jurisdictions`."
    },
    "blocked_jurisdictions": {
      "type": "array",
      "items": { "type": "string", "pattern": "^[A-Z]{2}$" },
      "description": "ISO-3166-1 alpha-2 country codes the gate denies. Empty/absent denies none. Mutually exclusive with `allowed_jurisdictions`."
    }
  },
  "not": {
    "required": ["allowed_jurisdictions", "blocked_jurisdictions"]
  },
  "additionalProperties": true
}
