{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "$id": "https://jellylabs.ai/schemas/tentacle.schema.json",
  "title": "Tentacle Manifest",
  "description": "Schema for jelly.yaml manifest files - Tentacle package definition",
  "type": "object",
  "required": ["name", "version", "type"],
  "properties": {
    "name": {
      "type": "string",
      "pattern": "^[a-z][a-z0-9-]*$",
      "description": "Package identifier (lowercase, hyphenated)"
    },
    "version": {
      "type": "string",
      "pattern": "^\\d+\\.\\d+\\.\\d+$",
      "description": "SemVer version string"
    },
    "type": {
      "type": "string",
      "enum": ["skill", "hook", "command", "plugin", "prompt"],
      "description": "Package type"
    },
    "description": {
      "type": "string",
      "description": "Human-readable description"
    },
    "author": {
      "type": "string",
      "description": "Package author"
    },
    "license": {
      "type": "string",
      "description": "SPDX license identifier"
    },
    "repository": {
      "type": "string",
      "format": "uri",
      "description": "Source repository URL"
    },
    "homepage": {
      "type": "string",
      "format": "uri",
      "description": "Package homepage or documentation URL"
    },
    "keywords": {
      "type": "array",
      "items": { "type": "string" },
      "description": "Search keywords for package discovery"
    },
    "dependencies": {
      "type": "object",
      "additionalProperties": {
        "type": "string",
        "description": "Version constraint (SemVer range)"
      },
      "description": "Package dependencies with version constraints"
    },
    "bin_dependencies": {
      "type": "array",
      "items": {
        "type": "object",
        "required": ["name"],
        "properties": {
          "name": {
            "type": "string",
            "description": "Binary name to check in PATH"
          },
          "install_hint": {
            "type": "string",
            "description": "Installation instructions (e.g., 'brew install d2')"
          }
        }
      },
      "description": "External binary dependencies"
    },
    "spec_version": {
      "type": "string",
      "pattern": "^\\d+$",
      "description": "Tentacle spec version this package conforms to"
    },
    "files": {
      "type": "array",
      "items": { "type": "string" },
      "description": "Files to include in package (glob patterns)"
    },
    "main": {
      "type": "string",
      "description": "Primary entry point file"
    }
  }
}
