{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://catalog.lintel.tools/schemas/schemastore/hashgraph-online-skill-manifest/latest.json",
  "title": "Hashgraph Online Skill Manifest",
  "description": "Manifest for Registry Broker skill packages published to the HOL skills registry.",
  "x-lintel": {
    "source": "https://raw.githubusercontent.com/hashgraph-online/skill-publish/main/schemas/skill.schema.json",
    "sourceSha256": "a0b7024d237928b00521cefb1b474542e3574114387e7706813954801cc630ef",
    "fileMatch": [
      "**/.hol/skill.json",
      "**/hol/skill.json",
      "hol-skill.json"
    ],
    "parsers": [
      "json"
    ]
  },
  "type": "object",
  "properties": {
    "$schema": {
      "type": "string",
      "format": "uri"
    },
    "name": {
      "type": "string",
      "minLength": 1
    },
    "version": {
      "type": "string",
      "minLength": 1
    },
    "description": {
      "type": "string",
      "minLength": 1
    },
    "homepage": {
      "type": "string",
      "format": "uri"
    },
    "author": {
      "type": "string",
      "minLength": 1
    },
    "license": {
      "type": "string",
      "minLength": 1
    },
    "repository": {
      "type": "object",
      "properties": {
        "type": {
          "type": "string",
          "minLength": 1
        },
        "url": {
          "type": "string",
          "format": "uri"
        }
      },
      "required": [
        "type",
        "url"
      ],
      "additionalProperties": false
    },
    "keywords": {
      "type": "array",
      "items": {
        "type": "string",
        "minLength": 1
      }
    },
    "skill": {
      "type": "object",
      "properties": {
        "name": {
          "type": "string",
          "minLength": 1
        },
        "emoji": {
          "type": "string",
          "minLength": 1
        },
        "category": {
          "type": "string",
          "minLength": 1
        },
        "api_base": {
          "type": "string",
          "format": "uri"
        },
        "protocols": {
          "type": "array",
          "items": {
            "type": "string",
            "minLength": 1
          }
        },
        "capabilities": {
          "type": "array",
          "items": {
            "type": "string",
            "minLength": 1
          }
        },
        "files": {
          "type": "object",
          "properties": {
            "skill": {
              "type": "string",
              "format": "uri"
            },
            "metadata": {
              "type": "string",
              "format": "uri"
            },
            "llms": {
              "type": "string",
              "format": "uri"
            },
            "docs": {
              "type": "string",
              "format": "uri"
            }
          },
          "required": [
            "skill",
            "metadata",
            "docs"
          ],
          "additionalProperties": false
        }
      },
      "required": [
        "name",
        "category",
        "api_base",
        "protocols",
        "capabilities",
        "files"
      ],
      "additionalProperties": false
    },
    "api": {
      "type": "object",
      "properties": {
        "base_url": {
          "type": "string",
          "format": "uri"
        },
        "authentication": {
          "type": "object",
          "properties": {
            "type": {
              "type": "string",
              "minLength": 1
            },
            "header": {
              "type": "string",
              "minLength": 1
            },
            "format": {
              "type": "string"
            }
          },
          "required": [
            "type",
            "header"
          ],
          "additionalProperties": false
        },
        "endpoints": {
          "type": "object",
          "additionalProperties": {
            "type": "string",
            "minLength": 1
          }
        },
        "rate_limits": {
          "type": "object",
          "additionalProperties": {
            "type": "string",
            "minLength": 1
          }
        }
      },
      "required": [
        "base_url",
        "authentication",
        "endpoints"
      ],
      "additionalProperties": false
    },
    "integrations": {
      "type": "object",
      "additionalProperties": {
        "type": "object",
        "additionalProperties": true
      }
    },
    "permissions": {
      "type": "object",
      "properties": {
        "scripts": {
          "$ref": "#/$defs/scriptPermissionsMap"
        }
      },
      "additionalProperties": false
    },
    "scriptPermissions": {
      "$ref": "#/$defs/scriptPermissionsMap"
    },
    "stats": {
      "type": "object",
      "additionalProperties": true
    }
  },
  "$defs": {
    "scriptPermission": {
      "type": "object",
      "properties": {
        "network": {
          "type": "boolean"
        },
        "filesystem": {
          "type": "string",
          "enum": [
            "read-only",
            "read-write"
          ]
        }
      },
      "required": [
        "network",
        "filesystem"
      ],
      "additionalProperties": false
    },
    "scriptPermissionsMap": {
      "type": "object",
      "propertyNames": {
        "type": "string",
        "pattern": "^scripts/.+"
      },
      "additionalProperties": {
        "$ref": "#/$defs/scriptPermission"
      }
    }
  },
  "additionalProperties": false,
  "required": [
    "name",
    "version",
    "description",
    "homepage",
    "skill",
    "api"
  ]
}
