{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/sealgate-ai/json-schema/sealgate-ai-autoconfig-cache-response-schema.json",
  "title": "AutoconfigCacheResponse",
  "description": "Response for GET config-perms/cache.",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/sealgate-ai-config-perms-api-openapi.yml#/components/schemas/AutoconfigCacheResponse",
  "properties": {
    "entries": {
      "items": {
        "$ref": "#/$defs/AutoconfigCacheEntry"
      },
      "type": "array",
      "title": "Entries",
      "description": "Cache entries"
    },
    "count": {
      "type": "integer",
      "title": "Count",
      "description": "Number of entries"
    },
    "server": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Server",
      "description": "Server filter applied"
    }
  },
  "type": "object",
  "required": [
    "entries",
    "count"
  ],
  "$defs": {
    "AutoconfigCacheEntry": {
      "properties": {
        "id": {
          "type": "integer",
          "title": "Id",
          "description": "Cache entry ID"
        },
        "server_id": {
          "type": "integer",
          "title": "Server Id",
          "description": "Server ID"
        },
        "server_name": {
          "type": "string",
          "title": "Server Name",
          "description": "Server name"
        },
        "item_type": {
          "type": "string",
          "title": "Item Type",
          "description": "Item type (tool, resource, prompt)"
        },
        "item_name": {
          "type": "string",
          "title": "Item Name",
          "description": "Item name"
        },
        "flags": {
          "additionalProperties": true,
          "type": "object",
          "title": "Flags",
          "description": "Permission flags"
        },
        "domain": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Domain",
          "description": "Domain (owner only)"
        }
      },
      "type": "object",
      "required": [
        "id",
        "server_id",
        "server_name",
        "item_type",
        "item_name"
      ],
      "title": "AutoconfigCacheEntry",
      "description": "A single autoconfig cache entry."
    }
  }
}