{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://catalog.lintel.tools/schemas/schemastore/amx-muse-program-descriptor/latest.json",
  "description": "A MUSE program descriptor file",
  "x-lintel": {
    "source": "https://www.schemastore.org/amx-muse.json",
    "sourceSha256": "c35c25e72d190a188b03c7cf3c0ce3abf5aa3a6dc62e78258aae3d490bec8bf5"
  },
  "type": "object",
  "properties": {
    "id": {
      "title": "Program ID",
      "description": "Globally unique program ID, special characters are not allowed",
      "type": "string",
      "pattern": "^[a-zA-z0-9_-]+$"
    },
    "description": {
      "title": "Program Description",
      "description": "A description of the program that may be used by user interfaces",
      "type": "string"
    },
    "disabled": {
      "title": "Auto-start Disabled",
      "description": "Disable the auto-start of the script on system boot",
      "type": "boolean",
      "default": false
    },
    "envvars": {
      "title": "Environment Variables",
      "description": "Name/Value pairs that can be used to set configuration of a program",
      "type": "object",
      "additionalProperties": {
        "type": "string"
      }
    },
    "scope": {
      "title": "Program Scope",
      "description": "The scope (location) to which the script belongs. Leave blank for global scope",
      "type": "string",
      "pattern": "^[a-zA-z0-9_\\.-]*$"
    },
    "provider": {
      "title": "Programming Language",
      "description": "The language the program is written in",
      "enum": [
        "groovy",
        "javascript",
        "python"
      ]
    },
    "script": {
      "title": "Program File Name",
      "description": "The file name of the main entry point of the program. Defaults to index.<extension>",
      "type": "string",
      "default": "index.{groovy,js,py}"
    }
  },
  "required": [
    "id",
    "provider"
  ],
  "additionalProperties": true
}
