{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://venuemind.dev/schemas/agent-grant.schema.json",
  "title": "VenueMind Agent Grant",
  "type": "object",
  "required": [
    "id",
    "agentId",
    "organizationId",
    "projectId",
    "scopes",
    "issuedBy",
    "issuedAt",
    "expiresAt"
  ],
  "properties": {
    "id": {
      "type": "string",
      "minLength": 1
    },
    "agentId": {
      "type": "string",
      "minLength": 1
    },
    "organizationId": {
      "type": "string",
      "minLength": 1
    },
    "projectId": {
      "type": "string",
      "minLength": 1
    },
    "scopes": {
      "type": "array",
      "minItems": 1,
      "uniqueItems": true,
      "items": {
        "enum": [
          "venue:read",
          "venue:propose",
          "venue:comment",
          "venue:simulate",
          "venue:operate",
          "venue:export"
        ]
      }
    },
    "issuedBy": {
      "type": "string",
      "minLength": 1
    },
    "issuedAt": {
      "type": "string",
      "format": "date-time"
    },
    "expiresAt": {
      "type": "string",
      "format": "date-time"
    }
  },
  "additionalProperties": false
}
