{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://flynnstudios.dev/agents/catalog.schema.json",
  "title": "Flynn Studios agent catalog",
  "description": "Public agent discovery feed (flynn.agents_catalog_public.v0, schema_version 0.1). WIM publishes this schema as schema; the storefront file uses schema_id. Products are the approved public listings only. Every status is available_soon. Prices, licensing, package hashes, delivery keys, approval notes, Drive ids, QA validation notes, and checkout URLs are not part of this document. sales_enabled and checkout_enabled remain false.",
  "type": "object",
  "additionalProperties": false,
  "required": [
    "schema_id",
    "schema_version",
    "site",
    "feed_url",
    "human_catalog_url",
    "pairing_label",
    "sales_enabled",
    "checkout_enabled",
    "updated_at",
    "timezone",
    "note",
    "product_count",
    "products"
  ],
  "properties": {
    "schema_id": {
      "const": "flynn.agents_catalog_public.v0"
    },
    "schema_version": {
      "const": "0.1"
    },
    "site": {
      "const": "https://flynnstudios.dev"
    },
    "feed_url": {
      "const": "https://flynnstudios.dev/agents/catalog.json"
    },
    "human_catalog_url": {
      "const": "https://flynnstudios.dev/catalog.json"
    },
    "pairing_label": {
      "const": "Goes well with"
    },
    "sales_enabled": {
      "const": false
    },
    "checkout_enabled": {
      "const": false
    },
    "updated_at": {
      "type": "string",
      "minLength": 1,
      "maxLength": 80,
      "description": "Copied from the WIM agent slice. The contract timezone is America/Chicago."
    },
    "timezone": {
      "const": "America/Chicago"
    },
    "note": {
      "const": "Discovery only. Checkout is off. Every listing is Available soon."
    },
    "product_count": {
      "type": "integer",
      "minimum": 0
    },
    "products": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/product"
      }
    }
  },
  "$defs": {
    "product": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "id",
        "slug",
        "title",
        "short_description",
        "status",
        "version",
        "engine",
        "platform",
        "compatibility",
        "pairs_with"
      ],
      "properties": {
        "id": {
          "type": "string",
          "minLength": 1,
          "maxLength": 128
        },
        "slug": {
          "type": "string",
          "minLength": 1,
          "maxLength": 128
        },
        "title": {
          "type": "string",
          "minLength": 1,
          "maxLength": 200
        },
        "short_description": {
          "type": "string",
          "minLength": 1,
          "maxLength": 500
        },
        "status": {
          "const": "available_soon"
        },
        "version": {
          "type": "string",
          "minLength": 1,
          "maxLength": 64
        },
        "engine": {
          "type": "array",
          "items": {
            "type": "string",
            "minLength": 1,
            "maxLength": 80
          }
        },
        "platform": {
          "type": "array",
          "items": {
            "type": "string",
            "minLength": 1,
            "maxLength": 80
          }
        },
        "compatibility": {
          "type": "object",
          "additionalProperties": false,
          "required": ["engine", "platform"],
          "properties": {
            "engine": {
              "type": "array",
              "items": {
                "type": "string",
                "minLength": 1,
                "maxLength": 80
              }
            },
            "platform": {
              "type": "array",
              "items": {
                "type": "string",
                "minLength": 1,
                "maxLength": 80
              }
            }
          }
        },
        "pairs_with": {
          "type": "array",
          "items": {
            "type": "string",
            "minLength": 1,
            "maxLength": 128
          }
        },
        "updated_at": {
          "type": "string",
          "minLength": 1,
          "maxLength": 80,
          "description": "Copied from the WIM handoff. The contract timezone is America/Chicago."
        }
      }
    }
  }
}
