{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "$id": "https://www.dsh.so/data/install.schema.json",
  "title": "InstallVerificationRecord",
  "description": "Public JSON Schema for https://www.dsh.so/data/install/<id>.json — single-plugin sandbox install-test (verification level L4) result, derived at build time from append-only verification records. There is deliberately no bulk snapshot endpoint for this dataset.",
  "type": "object",
  "required": [
    "schema",
    "id",
    "name",
    "installTest",
    "links",
    "license"
  ],
  "additionalProperties": false,
  "properties": {
    "schema": {
      "type": "string",
      "const": "https://www.dsh.so/data/install.schema.json"
    },
    "id": {
      "type": "string",
      "pattern": "^[a-z0-9]+(-[a-z0-9]+)*$"
    },
    "name": {
      "type": "string"
    },
    "installTest": {
      "type": "object",
      "required": [
        "state",
        "level"
      ],
      "additionalProperties": false,
      "properties": {
        "state": {
          "enum": [
            "passed",
            "failed",
            "unknown",
            "untested"
          ]
        },
        "level": {
          "const": "L4"
        },
        "verdict": {
          "enum": [
            "passed",
            "failed",
            "unknown"
          ]
        },
        "channel": {
          "enum": [
            "npm",
            "source"
          ]
        },
        "profileId": {
          "type": "string"
        },
        "checkedAt": {
          "type": "string"
        },
        "sourceRecordId": {
          "type": "string"
        },
        "environment": {
          "type": "object",
          "additionalProperties": false,
          "properties": {
            "dshVersion": {
              "type": "string"
            },
            "dshCliVersion": {
              "type": [
                "string",
                "null"
              ]
            },
            "os": {
              "type": "string"
            },
            "arch": {
              "type": "string"
            },
            "adapterId": {
              "type": "string"
            }
          }
        }
      }
    },
    "links": {
      "type": "object",
      "required": [
        "plugin",
        "badge",
        "verificationLevels"
      ],
      "additionalProperties": false,
      "properties": {
        "plugin": {
          "type": "string"
        },
        "badge": {
          "type": "string"
        },
        "verificationLevels": {
          "type": "string"
        }
      }
    },
    "license": {
      "type": "object",
      "required": [
        "data",
        "reuse",
        "attribution"
      ],
      "additionalProperties": false,
      "properties": {
        "data": {
          "type": "string"
        },
        "reuse": {
          "type": "string"
        },
        "attribution": {
          "type": "string"
        }
      }
    }
  }
}