{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "title": "Aitherium awpack .toolpack.yaml Manifest",
  "type": "object",
  "required": [
    "id",
    "name",
    "version",
    "description"
  ],
  "properties": {
    "id": {
      "type": "string",
      "pattern": "^[a-z][a-z0-9._-]{2,63}$",
      "description": "Unique pack id (PKA002). First segment must not be aither, aitherium, adk, or awdk (PKA003)."
    },
    "name": {
      "type": "string",
      "minLength": 1
    },
    "version": {
      "type": "string",
      "pattern": "^\\d+\\.\\d+\\.\\d+"
    },
    "description": {
      "type": "string",
      "minLength": 1
    },
    "category": {
      "type": "string",
      "default": "tool_packs"
    },
    "tier": {
      "type": "string",
      "enum": [
        "community",
        "free",
        "builder",
        "professional",
        "enterprise"
      ]
    },
    "author": {
      "type": "string"
    },
    "tags": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "tool_modules": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "entitlements": {
      "type": "array",
      "items": {
        "type": "string"
      }
    }
  },
  "entrypoint": "__init__.py exposing def register(registry) -> int (PKA005)",
  "checks": [
    "PKA001: manifest parses",
    "PKA002: id matches ^[a-z][a-z0-9._-]{2,63}$",
    "PKA003: id does not claim reserved namespaces (aither, aitherium, adk, awdk)",
    "PKA004: semver + name + description present",
    "PKA005: entry point exposes register(registry)",
    "PKA006: declared ui/persona files exist",
    "PKA007: no symlinks inside pack directory",
    "PKA008: no secret-shaped literals in source",
    "PKA009: tier is valid"
  ]
}
