{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/fillo-so/json-schema/fillo-so-agent-grant-schema.json",
  "title": "AgentGrant",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/fillo-so-agents-api-openapi.yml#/components/schemas/AgentGrant",
  "type": "object",
  "required": [
    "id",
    "client",
    "scopes",
    "approvalPolicy",
    "createdAt",
    "lastUsedAt",
    "expiresAt",
    "expired"
  ],
  "properties": {
    "id": {
      "type": "string",
      "description": "The grant id — also the value a revocation must confirm with."
    },
    "client": {
      "type": "string"
    },
    "scopes": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "approvalPolicy": {
      "type": "string",
      "enum": [
        "ask",
        "auto"
      ],
      "description": "`ask` sends every outward action to a human approval link first; `auto` runs Tier B directly. Destructive actions always need the link."
    },
    "createdAt": {
      "type": "string",
      "format": "date-time"
    },
    "lastUsedAt": {
      "type": [
        "string",
        "null"
      ],
      "format": "date-time"
    },
    "expiresAt": {
      "type": [
        "string",
        "null"
      ],
      "format": "date-time"
    },
    "expired": {
      "type": "boolean"
    }
  }
}