{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://omaflake.dev/schema/setup/v1.json",
  "title": "omaflake module values of a VM",
  "description": "setup.json in a VM's folder (plan B206): the values of its modules' fields for a VM (create, always) and whether the VM has them. A secret is in the Keychain or the Secret Service (account vm-field:<VM's omaflake ID>:<module>:<field>) – only its name is here.",
  "type": "object",
  "additionalProperties": false,
  "required": [
    "$schema"
  ],
  "properties": {
    "$schema": {
      "const": "https://omaflake.dev/schema/setup/v1.json"
    },
    "modules": {
      "type": "object",
      "description": "By module as the recipe names it (\"omaflake/github-runner\")",
      "additionalProperties": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "values": {
            "type": "object",
            "additionalProperties": {
              "type": [
                "string",
                "integer",
                "boolean"
              ]
            },
            "description": "The values given – never a secret's; a file's is its path on this computer"
          },
          "secrets": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "The secrets in the Keychain or the Secret Service"
          },
          "newSecrets": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Secrets given since the command last ran"
          },
          "applied": {
            "type": "string",
            "format": "date-time",
            "description": "When the command last took the values; missing: not since the VM was created, reset or upgraded"
          },
          "appliedValues": {
            "type": "object",
            "additionalProperties": {
              "type": [
                "string",
                "integer",
                "boolean"
              ]
            },
            "description": "The values it took then"
          }
        }
      }
    }
  }
}
