{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://deepbom.org/schemas/deepbom-evidence-links-v1.schema.json",
  "title": "DEEPBOM optional metadata input, connection IR and bounded host summary",
  "description": "Structural contract only. Semantic validators additionally enforce exact source binding, role compatibility, hash recomputation, coverage conservation, case collisions, file boundaries and byte limits. This is a DEEPBOM contract, not an OMOP or CycloneDX standard extension.",
  "oneOf": [
    {
      "type": "object",
      "properties": {
        "schema": {
          "const": "deepbom.evidence_link_input.v1"
        },
        "subject": {
          "type": "object",
          "properties": {
            "artifact_sha256": {
              "type": "string",
              "pattern": "^[a-f0-9]{64}$"
            },
            "artifact_set_sha256": {
              "anyOf": [
                {
                  "type": "string",
                  "pattern": "^[a-f0-9]{64}$"
                },
                {
                  "type": "null"
                }
              ]
            },
            "model_ir_sha256": {
              "type": "string",
              "pattern": "^[a-f0-9]{64}$"
            }
          },
          "required": [
            "artifact_sha256",
            "artifact_set_sha256"
          ],
          "additionalProperties": false
        },
        "nodes": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "maxLength": 256,
                "pattern": "^[a-zA-Z0-9][a-zA-Z0-9._:/#-]*$"
              },
              "kind": {
                "enum": [
                  "model_artifact",
                  "dataset",
                  "data_release",
                  "manifest",
                  "cohort_definition",
                  "feature_contract",
                  "software",
                  "environment",
                  "run",
                  "evaluation_report",
                  "quality_report",
                  "protocol",
                  "bom",
                  "document"
                ]
              },
              "name": {
                "type": "string",
                "maxLength": 4096,
                "minLength": 1,
                "pattern": "\\S"
              },
              "version": {
                "type": "string",
                "maxLength": 4096,
                "minLength": 1,
                "pattern": "\\S"
              },
              "uri": {
                "type": "string",
                "maxLength": 4096,
                "minLength": 1,
                "pattern": "\\S"
              },
              "sha256": {
                "type": "string",
                "pattern": "^[a-f0-9]{64}$"
              },
              "file": {
                "type": "string",
                "maxLength": 1024,
                "pattern": "^(?!/)(?!.*\\\\)(?!.*:)(?!.*(?:^|/)\\.{1,2}(?:/|$))[^/]+(?:/[^/]+)*$"
              },
              "attributes": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "name": {
                      "type": "string",
                      "maxLength": 256,
                      "minLength": 1,
                      "pattern": "\\S"
                    },
                    "value": {
                      "anyOf": [
                        {
                          "type": "string",
                          "maxLength": 4096
                        },
                        {
                          "type": "boolean"
                        },
                        {
                          "type": "null"
                        },
                        {
                          "type": "number",
                          "minimum": -9007199254740991,
                          "maximum": 9007199254740991
                        }
                      ]
                    }
                  },
                  "required": [
                    "name",
                    "value"
                  ],
                  "additionalProperties": false
                },
                "maxItems": 128
              },
              "bom": {
                "type": "object",
                "properties": {
                  "format": {
                    "type": "string",
                    "maxLength": 4096,
                    "minLength": 1,
                    "pattern": "\\S"
                  },
                  "spec_version": {
                    "type": "string",
                    "maxLength": 4096,
                    "minLength": 1,
                    "pattern": "\\S"
                  },
                  "document_id": {
                    "type": "string",
                    "maxLength": 4096,
                    "minLength": 1,
                    "pattern": "\\S"
                  },
                  "document_version": {
                    "anyOf": [
                      {
                        "type": "integer",
                        "minimum": 1,
                        "maximum": 9007199254740991
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "element_ref": {
                    "type": "string",
                    "maxLength": 4096,
                    "minLength": 1,
                    "pattern": "\\S"
                  }
                },
                "required": [
                  "format",
                  "spec_version",
                  "document_id",
                  "document_version",
                  "element_ref"
                ],
                "additionalProperties": false
              }
            },
            "required": [
              "id",
              "kind",
              "name"
            ],
            "additionalProperties": false
          },
          "maxItems": 256
        },
        "relationships": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "maxLength": 256,
                "pattern": "^[a-zA-Z0-9][a-zA-Z0-9._:/#-]*$"
              },
              "from": {
                "type": "string",
                "maxLength": 256,
                "pattern": "^[a-zA-Z0-9][a-zA-Z0-9._:/#-]*$"
              },
              "to": {
                "type": "string",
                "maxLength": 256,
                "pattern": "^[a-zA-Z0-9][a-zA-Z0-9._:/#-]*$"
              },
              "role": {
                "enum": [
                  "associated_with",
                  "uses_training_data",
                  "uses_evaluation_data",
                  "uses_calibration_data",
                  "derived_from",
                  "generated_by",
                  "uses_code",
                  "uses_environment",
                  "defined_by",
                  "uses_features",
                  "evaluated_by",
                  "has_quality_report",
                  "references_bom",
                  "documented_by"
                ]
              },
              "evidence_refs": {
                "type": "array",
                "items": {
                  "type": "string",
                  "maxLength": 256,
                  "pattern": "^[a-zA-Z0-9][a-zA-Z0-9._:/#-]*$"
                },
                "maxItems": 256,
                "uniqueItems": true
              }
            },
            "required": [
              "id",
              "from",
              "to",
              "role"
            ],
            "additionalProperties": false
          },
          "maxItems": 1024
        }
      },
      "required": [
        "schema",
        "subject",
        "nodes",
        "relationships"
      ],
      "additionalProperties": false
    },
    {
      "type": "object",
      "properties": {
        "schema": {
          "const": "deepbom.omop_metadata_input.v1"
        },
        "subject": {
          "type": "object",
          "properties": {
            "artifact_sha256": {
              "type": "string",
              "pattern": "^[a-f0-9]{64}$"
            },
            "artifact_set_sha256": {
              "anyOf": [
                {
                  "type": "string",
                  "pattern": "^[a-f0-9]{64}$"
                },
                {
                  "type": "null"
                }
              ]
            },
            "model_ir_sha256": {
              "type": "string",
              "pattern": "^[a-f0-9]{64}$"
            }
          },
          "required": [
            "artifact_sha256",
            "artifact_set_sha256"
          ],
          "additionalProperties": false
        },
        "nodes": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "maxLength": 256,
                "pattern": "^[a-zA-Z0-9][a-zA-Z0-9._:/#-]*$"
              },
              "kind": {
                "enum": [
                  "model_artifact",
                  "dataset",
                  "data_release",
                  "manifest",
                  "cohort_definition",
                  "feature_contract",
                  "software",
                  "environment",
                  "run",
                  "evaluation_report",
                  "quality_report",
                  "protocol",
                  "bom",
                  "document"
                ]
              },
              "name": {
                "type": "string",
                "maxLength": 4096,
                "minLength": 1,
                "pattern": "\\S"
              },
              "version": {
                "type": "string",
                "maxLength": 4096,
                "minLength": 1,
                "pattern": "\\S"
              },
              "uri": {
                "type": "string",
                "maxLength": 4096,
                "minLength": 1,
                "pattern": "\\S"
              },
              "sha256": {
                "type": "string",
                "pattern": "^[a-f0-9]{64}$"
              },
              "file": {
                "type": "string",
                "maxLength": 1024,
                "pattern": "^(?!/)(?!.*\\\\)(?!.*:)(?!.*(?:^|/)\\.{1,2}(?:/|$))[^/]+(?:/[^/]+)*$"
              },
              "attributes": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "name": {
                      "type": "string",
                      "maxLength": 256,
                      "minLength": 1,
                      "pattern": "\\S"
                    },
                    "value": {
                      "anyOf": [
                        {
                          "type": "string",
                          "maxLength": 4096
                        },
                        {
                          "type": "boolean"
                        },
                        {
                          "type": "null"
                        },
                        {
                          "type": "number",
                          "minimum": -9007199254740991,
                          "maximum": 9007199254740991
                        }
                      ]
                    }
                  },
                  "required": [
                    "name",
                    "value"
                  ],
                  "additionalProperties": false
                },
                "maxItems": 128
              },
              "bom": {
                "type": "object",
                "properties": {
                  "format": {
                    "type": "string",
                    "maxLength": 4096,
                    "minLength": 1,
                    "pattern": "\\S"
                  },
                  "spec_version": {
                    "type": "string",
                    "maxLength": 4096,
                    "minLength": 1,
                    "pattern": "\\S"
                  },
                  "document_id": {
                    "type": "string",
                    "maxLength": 4096,
                    "minLength": 1,
                    "pattern": "\\S"
                  },
                  "document_version": {
                    "anyOf": [
                      {
                        "type": "integer",
                        "minimum": 1,
                        "maximum": 9007199254740991
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "element_ref": {
                    "type": "string",
                    "maxLength": 4096,
                    "minLength": 1,
                    "pattern": "\\S"
                  }
                },
                "required": [
                  "format",
                  "spec_version",
                  "document_id",
                  "document_version",
                  "element_ref"
                ],
                "additionalProperties": false
              }
            },
            "required": [
              "id",
              "kind",
              "name"
            ],
            "additionalProperties": false
          },
          "maxItems": 256
        },
        "relationships": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "maxLength": 256,
                "pattern": "^[a-zA-Z0-9][a-zA-Z0-9._:/#-]*$"
              },
              "from": {
                "type": "string",
                "maxLength": 256,
                "pattern": "^[a-zA-Z0-9][a-zA-Z0-9._:/#-]*$"
              },
              "to": {
                "type": "string",
                "maxLength": 256,
                "pattern": "^[a-zA-Z0-9][a-zA-Z0-9._:/#-]*$"
              },
              "role": {
                "enum": [
                  "associated_with",
                  "uses_training_data",
                  "uses_evaluation_data",
                  "uses_calibration_data",
                  "derived_from",
                  "generated_by",
                  "uses_code",
                  "uses_environment",
                  "defined_by",
                  "uses_features",
                  "evaluated_by",
                  "has_quality_report",
                  "references_bom",
                  "documented_by"
                ]
              },
              "evidence_refs": {
                "type": "array",
                "items": {
                  "type": "string",
                  "maxLength": 256,
                  "pattern": "^[a-zA-Z0-9][a-zA-Z0-9._:/#-]*$"
                },
                "maxItems": 256,
                "uniqueItems": true
              }
            },
            "required": [
              "id",
              "from",
              "to",
              "role"
            ],
            "additionalProperties": false
          },
          "maxItems": 1024
        },
        "omop": {
          "type": "object",
          "properties": {
            "cdm_version": {
              "type": "string",
              "maxLength": 256,
              "minLength": 1,
              "pattern": "\\S"
            },
            "instance_id": {
              "type": "string",
              "maxLength": 256,
              "minLength": 1,
              "pattern": "\\S"
            },
            "release_id": {
              "type": "string",
              "maxLength": 256,
              "minLength": 1,
              "pattern": "\\S"
            },
            "cdm_source": {
              "anyOf": [
                {
                  "type": "object",
                  "maxProperties": 128,
                  "propertyNames": {
                    "type": "string",
                    "pattern": "^[a-zA-Z][a-zA-Z0-9_]*$",
                    "maxLength": 128
                  },
                  "additionalProperties": {
                    "anyOf": [
                      {
                        "type": "string",
                        "maxLength": 4096
                      },
                      {
                        "type": "boolean"
                      },
                      {
                        "type": "null"
                      },
                      {
                        "type": "number",
                        "minimum": -9007199254740991,
                        "maximum": 9007199254740991
                      }
                    ]
                  }
                },
                {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "maxProperties": 128,
                    "propertyNames": {
                      "type": "string",
                      "pattern": "^[a-zA-Z][a-zA-Z0-9_]*$",
                      "maxLength": 128
                    },
                    "additionalProperties": {
                      "anyOf": [
                        {
                          "type": "string",
                          "maxLength": 4096
                        },
                        {
                          "type": "boolean"
                        },
                        {
                          "type": "null"
                        },
                        {
                          "type": "number",
                          "minimum": -9007199254740991,
                          "maximum": 9007199254740991
                        }
                      ]
                    }
                  },
                  "maxItems": 1,
                  "minItems": 1
                }
              ]
            }
          },
          "required": [
            "cdm_version",
            "instance_id",
            "release_id",
            "cdm_source"
          ],
          "additionalProperties": false
        }
      },
      "required": [
        "schema",
        "subject",
        "nodes",
        "relationships",
        "omop"
      ],
      "additionalProperties": false
    },
    {
      "type": "object",
      "properties": {
        "schema": {
          "const": "deepbom.evidence_link_ir.v1"
        },
        "method_version": {
          "const": "1.0.0"
        },
        "hash_contract": {
          "type": "object",
          "properties": {
            "algorithm": {
              "const": "SHA-256"
            },
            "canonicalization": {
              "const": "RFC8785-JCS"
            },
            "source_encoding": {
              "const": "UTF-8"
            },
            "excluded_pointers": {
              "const": [
                "/evidence_link_ir_sha256"
              ]
            }
          },
          "required": [
            "algorithm",
            "canonicalization",
            "source_encoding",
            "excluded_pointers"
          ],
          "additionalProperties": false
        },
        "source": {
          "type": "object",
          "properties": {
            "artifact_sha256": {
              "type": "string",
              "pattern": "^[a-f0-9]{64}$"
            },
            "artifact_set_sha256": {
              "anyOf": [
                {
                  "type": "string",
                  "pattern": "^[a-f0-9]{64}$"
                },
                {
                  "type": "null"
                }
              ]
            },
            "model_ir_sha256": {
              "type": "string",
              "pattern": "^[a-f0-9]{64}$"
            }
          },
          "required": [
            "artifact_sha256",
            "artifact_set_sha256",
            "model_ir_sha256"
          ],
          "additionalProperties": false
        },
        "input_document": {
          "oneOf": [
            {
              "type": "object",
              "properties": {
                "schema": {
                  "const": "deepbom.evidence_link_input.v1"
                },
                "subject": {
                  "type": "object",
                  "properties": {
                    "artifact_sha256": {
                      "type": "string",
                      "pattern": "^[a-f0-9]{64}$"
                    },
                    "artifact_set_sha256": {
                      "anyOf": [
                        {
                          "type": "string",
                          "pattern": "^[a-f0-9]{64}$"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "model_ir_sha256": {
                      "type": "string",
                      "pattern": "^[a-f0-9]{64}$"
                    }
                  },
                  "required": [
                    "artifact_sha256",
                    "artifact_set_sha256"
                  ],
                  "additionalProperties": false
                },
                "nodes": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "maxLength": 256,
                        "pattern": "^[a-zA-Z0-9][a-zA-Z0-9._:/#-]*$"
                      },
                      "kind": {
                        "enum": [
                          "model_artifact",
                          "dataset",
                          "data_release",
                          "manifest",
                          "cohort_definition",
                          "feature_contract",
                          "software",
                          "environment",
                          "run",
                          "evaluation_report",
                          "quality_report",
                          "protocol",
                          "bom",
                          "document"
                        ]
                      },
                      "name": {
                        "type": "string",
                        "maxLength": 4096,
                        "minLength": 1,
                        "pattern": "\\S"
                      },
                      "version": {
                        "type": "string",
                        "maxLength": 4096,
                        "minLength": 1,
                        "pattern": "\\S"
                      },
                      "uri": {
                        "type": "string",
                        "maxLength": 4096,
                        "minLength": 1,
                        "pattern": "\\S"
                      },
                      "sha256": {
                        "type": "string",
                        "pattern": "^[a-f0-9]{64}$"
                      },
                      "file": {
                        "type": "string",
                        "maxLength": 1024,
                        "pattern": "^(?!/)(?!.*\\\\)(?!.*:)(?!.*(?:^|/)\\.{1,2}(?:/|$))[^/]+(?:/[^/]+)*$"
                      },
                      "attributes": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "name": {
                              "type": "string",
                              "maxLength": 256,
                              "minLength": 1,
                              "pattern": "\\S"
                            },
                            "value": {
                              "anyOf": [
                                {
                                  "type": "string",
                                  "maxLength": 4096
                                },
                                {
                                  "type": "boolean"
                                },
                                {
                                  "type": "null"
                                },
                                {
                                  "type": "number",
                                  "minimum": -9007199254740991,
                                  "maximum": 9007199254740991
                                }
                              ]
                            }
                          },
                          "required": [
                            "name",
                            "value"
                          ],
                          "additionalProperties": false
                        },
                        "maxItems": 128
                      },
                      "bom": {
                        "type": "object",
                        "properties": {
                          "format": {
                            "type": "string",
                            "maxLength": 4096,
                            "minLength": 1,
                            "pattern": "\\S"
                          },
                          "spec_version": {
                            "type": "string",
                            "maxLength": 4096,
                            "minLength": 1,
                            "pattern": "\\S"
                          },
                          "document_id": {
                            "type": "string",
                            "maxLength": 4096,
                            "minLength": 1,
                            "pattern": "\\S"
                          },
                          "document_version": {
                            "anyOf": [
                              {
                                "type": "integer",
                                "minimum": 1,
                                "maximum": 9007199254740991
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "element_ref": {
                            "type": "string",
                            "maxLength": 4096,
                            "minLength": 1,
                            "pattern": "\\S"
                          }
                        },
                        "required": [
                          "format",
                          "spec_version",
                          "document_id",
                          "document_version",
                          "element_ref"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "required": [
                      "id",
                      "kind",
                      "name"
                    ],
                    "additionalProperties": false
                  },
                  "maxItems": 256
                },
                "relationships": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "maxLength": 256,
                        "pattern": "^[a-zA-Z0-9][a-zA-Z0-9._:/#-]*$"
                      },
                      "from": {
                        "type": "string",
                        "maxLength": 256,
                        "pattern": "^[a-zA-Z0-9][a-zA-Z0-9._:/#-]*$"
                      },
                      "to": {
                        "type": "string",
                        "maxLength": 256,
                        "pattern": "^[a-zA-Z0-9][a-zA-Z0-9._:/#-]*$"
                      },
                      "role": {
                        "enum": [
                          "associated_with",
                          "uses_training_data",
                          "uses_evaluation_data",
                          "uses_calibration_data",
                          "derived_from",
                          "generated_by",
                          "uses_code",
                          "uses_environment",
                          "defined_by",
                          "uses_features",
                          "evaluated_by",
                          "has_quality_report",
                          "references_bom",
                          "documented_by"
                        ]
                      },
                      "evidence_refs": {
                        "type": "array",
                        "items": {
                          "type": "string",
                          "maxLength": 256,
                          "pattern": "^[a-zA-Z0-9][a-zA-Z0-9._:/#-]*$"
                        },
                        "maxItems": 256,
                        "uniqueItems": true
                      }
                    },
                    "required": [
                      "id",
                      "from",
                      "to",
                      "role"
                    ],
                    "additionalProperties": false
                  },
                  "maxItems": 1024
                }
              },
              "required": [
                "schema",
                "subject",
                "nodes",
                "relationships"
              ],
              "additionalProperties": false
            },
            {
              "type": "object",
              "properties": {
                "schema": {
                  "const": "deepbom.omop_metadata_input.v1"
                },
                "subject": {
                  "type": "object",
                  "properties": {
                    "artifact_sha256": {
                      "type": "string",
                      "pattern": "^[a-f0-9]{64}$"
                    },
                    "artifact_set_sha256": {
                      "anyOf": [
                        {
                          "type": "string",
                          "pattern": "^[a-f0-9]{64}$"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "model_ir_sha256": {
                      "type": "string",
                      "pattern": "^[a-f0-9]{64}$"
                    }
                  },
                  "required": [
                    "artifact_sha256",
                    "artifact_set_sha256"
                  ],
                  "additionalProperties": false
                },
                "nodes": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "maxLength": 256,
                        "pattern": "^[a-zA-Z0-9][a-zA-Z0-9._:/#-]*$"
                      },
                      "kind": {
                        "enum": [
                          "model_artifact",
                          "dataset",
                          "data_release",
                          "manifest",
                          "cohort_definition",
                          "feature_contract",
                          "software",
                          "environment",
                          "run",
                          "evaluation_report",
                          "quality_report",
                          "protocol",
                          "bom",
                          "document"
                        ]
                      },
                      "name": {
                        "type": "string",
                        "maxLength": 4096,
                        "minLength": 1,
                        "pattern": "\\S"
                      },
                      "version": {
                        "type": "string",
                        "maxLength": 4096,
                        "minLength": 1,
                        "pattern": "\\S"
                      },
                      "uri": {
                        "type": "string",
                        "maxLength": 4096,
                        "minLength": 1,
                        "pattern": "\\S"
                      },
                      "sha256": {
                        "type": "string",
                        "pattern": "^[a-f0-9]{64}$"
                      },
                      "file": {
                        "type": "string",
                        "maxLength": 1024,
                        "pattern": "^(?!/)(?!.*\\\\)(?!.*:)(?!.*(?:^|/)\\.{1,2}(?:/|$))[^/]+(?:/[^/]+)*$"
                      },
                      "attributes": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "name": {
                              "type": "string",
                              "maxLength": 256,
                              "minLength": 1,
                              "pattern": "\\S"
                            },
                            "value": {
                              "anyOf": [
                                {
                                  "type": "string",
                                  "maxLength": 4096
                                },
                                {
                                  "type": "boolean"
                                },
                                {
                                  "type": "null"
                                },
                                {
                                  "type": "number",
                                  "minimum": -9007199254740991,
                                  "maximum": 9007199254740991
                                }
                              ]
                            }
                          },
                          "required": [
                            "name",
                            "value"
                          ],
                          "additionalProperties": false
                        },
                        "maxItems": 128
                      },
                      "bom": {
                        "type": "object",
                        "properties": {
                          "format": {
                            "type": "string",
                            "maxLength": 4096,
                            "minLength": 1,
                            "pattern": "\\S"
                          },
                          "spec_version": {
                            "type": "string",
                            "maxLength": 4096,
                            "minLength": 1,
                            "pattern": "\\S"
                          },
                          "document_id": {
                            "type": "string",
                            "maxLength": 4096,
                            "minLength": 1,
                            "pattern": "\\S"
                          },
                          "document_version": {
                            "anyOf": [
                              {
                                "type": "integer",
                                "minimum": 1,
                                "maximum": 9007199254740991
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "element_ref": {
                            "type": "string",
                            "maxLength": 4096,
                            "minLength": 1,
                            "pattern": "\\S"
                          }
                        },
                        "required": [
                          "format",
                          "spec_version",
                          "document_id",
                          "document_version",
                          "element_ref"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "required": [
                      "id",
                      "kind",
                      "name"
                    ],
                    "additionalProperties": false
                  },
                  "maxItems": 256
                },
                "relationships": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "maxLength": 256,
                        "pattern": "^[a-zA-Z0-9][a-zA-Z0-9._:/#-]*$"
                      },
                      "from": {
                        "type": "string",
                        "maxLength": 256,
                        "pattern": "^[a-zA-Z0-9][a-zA-Z0-9._:/#-]*$"
                      },
                      "to": {
                        "type": "string",
                        "maxLength": 256,
                        "pattern": "^[a-zA-Z0-9][a-zA-Z0-9._:/#-]*$"
                      },
                      "role": {
                        "enum": [
                          "associated_with",
                          "uses_training_data",
                          "uses_evaluation_data",
                          "uses_calibration_data",
                          "derived_from",
                          "generated_by",
                          "uses_code",
                          "uses_environment",
                          "defined_by",
                          "uses_features",
                          "evaluated_by",
                          "has_quality_report",
                          "references_bom",
                          "documented_by"
                        ]
                      },
                      "evidence_refs": {
                        "type": "array",
                        "items": {
                          "type": "string",
                          "maxLength": 256,
                          "pattern": "^[a-zA-Z0-9][a-zA-Z0-9._:/#-]*$"
                        },
                        "maxItems": 256,
                        "uniqueItems": true
                      }
                    },
                    "required": [
                      "id",
                      "from",
                      "to",
                      "role"
                    ],
                    "additionalProperties": false
                  },
                  "maxItems": 1024
                },
                "omop": {
                  "type": "object",
                  "properties": {
                    "cdm_version": {
                      "type": "string",
                      "maxLength": 256,
                      "minLength": 1,
                      "pattern": "\\S"
                    },
                    "instance_id": {
                      "type": "string",
                      "maxLength": 256,
                      "minLength": 1,
                      "pattern": "\\S"
                    },
                    "release_id": {
                      "type": "string",
                      "maxLength": 256,
                      "minLength": 1,
                      "pattern": "\\S"
                    },
                    "cdm_source": {
                      "anyOf": [
                        {
                          "type": "object",
                          "maxProperties": 128,
                          "propertyNames": {
                            "type": "string",
                            "pattern": "^[a-zA-Z][a-zA-Z0-9_]*$",
                            "maxLength": 128
                          },
                          "additionalProperties": {
                            "anyOf": [
                              {
                                "type": "string",
                                "maxLength": 4096
                              },
                              {
                                "type": "boolean"
                              },
                              {
                                "type": "null"
                              },
                              {
                                "type": "number",
                                "minimum": -9007199254740991,
                                "maximum": 9007199254740991
                              }
                            ]
                          }
                        },
                        {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "maxProperties": 128,
                            "propertyNames": {
                              "type": "string",
                              "pattern": "^[a-zA-Z][a-zA-Z0-9_]*$",
                              "maxLength": 128
                            },
                            "additionalProperties": {
                              "anyOf": [
                                {
                                  "type": "string",
                                  "maxLength": 4096
                                },
                                {
                                  "type": "boolean"
                                },
                                {
                                  "type": "null"
                                },
                                {
                                  "type": "number",
                                  "minimum": -9007199254740991,
                                  "maximum": 9007199254740991
                                }
                              ]
                            }
                          },
                          "maxItems": 1,
                          "minItems": 1
                        }
                      ]
                    }
                  },
                  "required": [
                    "cdm_version",
                    "instance_id",
                    "release_id",
                    "cdm_source"
                  ],
                  "additionalProperties": false
                }
              },
              "required": [
                "schema",
                "subject",
                "nodes",
                "relationships",
                "omop"
              ],
              "additionalProperties": false
            }
          ]
        },
        "input_sha256": {
          "type": "string",
          "pattern": "^[a-f0-9]{64}$"
        },
        "profile": {
          "type": "object",
          "properties": {
            "id": {
              "enum": [
                "deepbom.omop_metadata_profile.v1",
                "deepbom.generic_metadata_profile.v1"
              ]
            },
            "status": {
              "enum": [
                "supported_import_profile",
                "unsupported_cdm_version"
              ]
            },
            "cdm_version": {
              "type": "string",
              "maxLength": 4096,
              "minLength": 1,
              "pattern": "\\S"
            },
            "missing_source_fields": {
              "type": "array",
              "items": {
                "type": "string",
                "maxLength": 4096,
                "minLength": 1,
                "pattern": "\\S"
              },
              "maxItems": 128
            }
          },
          "required": [
            "id",
            "status"
          ],
          "additionalProperties": false
        },
        "nodes": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "maxLength": 256,
                "pattern": "^[a-zA-Z0-9][a-zA-Z0-9._:/#-]*$"
              },
              "kind": {
                "enum": [
                  "model_artifact",
                  "dataset",
                  "data_release",
                  "manifest",
                  "cohort_definition",
                  "feature_contract",
                  "software",
                  "environment",
                  "run",
                  "evaluation_report",
                  "quality_report",
                  "protocol",
                  "bom",
                  "document"
                ]
              },
              "name": {
                "type": "string",
                "maxLength": 4096,
                "minLength": 1,
                "pattern": "\\S"
              },
              "version": {
                "type": "string",
                "maxLength": 4096,
                "minLength": 1,
                "pattern": "\\S"
              },
              "uri": {
                "type": "string",
                "maxLength": 4096,
                "minLength": 1,
                "pattern": "\\S"
              },
              "sha256": {
                "type": "string",
                "pattern": "^[a-f0-9]{64}$"
              },
              "file": {
                "type": "string",
                "maxLength": 1024,
                "pattern": "^(?!/)(?!.*\\\\)(?!.*:)(?!.*(?:^|/)\\.{1,2}(?:/|$))[^/]+(?:/[^/]+)*$"
              },
              "attributes": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "name": {
                      "type": "string",
                      "maxLength": 256,
                      "minLength": 1,
                      "pattern": "\\S"
                    },
                    "value": {
                      "anyOf": [
                        {
                          "type": "string",
                          "maxLength": 4096
                        },
                        {
                          "type": "boolean"
                        },
                        {
                          "type": "null"
                        },
                        {
                          "type": "number",
                          "minimum": -9007199254740991,
                          "maximum": 9007199254740991
                        }
                      ]
                    }
                  },
                  "required": [
                    "name",
                    "value"
                  ],
                  "additionalProperties": false
                },
                "maxItems": 131
              },
              "bom": {
                "type": "object",
                "properties": {
                  "format": {
                    "type": "string",
                    "maxLength": 4096,
                    "minLength": 1,
                    "pattern": "\\S"
                  },
                  "spec_version": {
                    "type": "string",
                    "maxLength": 4096,
                    "minLength": 1,
                    "pattern": "\\S"
                  },
                  "document_id": {
                    "type": "string",
                    "maxLength": 4096,
                    "minLength": 1,
                    "pattern": "\\S"
                  },
                  "document_version": {
                    "anyOf": [
                      {
                        "type": "integer",
                        "minimum": 1,
                        "maximum": 9007199254740991
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "element_ref": {
                    "type": "string",
                    "maxLength": 4096,
                    "minLength": 1,
                    "pattern": "\\S"
                  }
                },
                "required": [
                  "format",
                  "spec_version",
                  "document_id",
                  "document_version",
                  "element_ref"
                ],
                "additionalProperties": false
              },
              "evidence_class": {
                "enum": [
                  "OBSERVED_SERIALIZED_ARTIFACT",
                  "DECLARED_UNVERIFIED"
                ]
              }
            },
            "required": [
              "id",
              "kind",
              "name",
              "attributes",
              "evidence_class"
            ],
            "additionalProperties": false
          },
          "maxItems": 258
        },
        "relationships": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "maxLength": 256,
                "pattern": "^[a-zA-Z0-9][a-zA-Z0-9._:/#-]*$"
              },
              "from": {
                "type": "string",
                "maxLength": 256,
                "pattern": "^[a-zA-Z0-9][a-zA-Z0-9._:/#-]*$"
              },
              "to": {
                "type": "string",
                "maxLength": 256,
                "pattern": "^[a-zA-Z0-9][a-zA-Z0-9._:/#-]*$"
              },
              "role": {
                "enum": [
                  "associated_with",
                  "uses_training_data",
                  "uses_evaluation_data",
                  "uses_calibration_data",
                  "derived_from",
                  "generated_by",
                  "uses_code",
                  "uses_environment",
                  "defined_by",
                  "uses_features",
                  "evaluated_by",
                  "has_quality_report",
                  "references_bom",
                  "documented_by"
                ]
              },
              "evidence_refs": {
                "type": "array",
                "items": {
                  "type": "string",
                  "maxLength": 256,
                  "pattern": "^[a-zA-Z0-9][a-zA-Z0-9._:/#-]*$"
                },
                "maxItems": 256,
                "uniqueItems": true
              },
              "evidence_class": {
                "const": "DECLARED_UNVERIFIED"
              },
              "resolution": {
                "enum": [
                  "resolved",
                  "unresolved",
                  "kind_mismatch"
                ]
              },
              "claim_verification": {
                "const": "not_assessed"
              }
            },
            "required": [
              "id",
              "from",
              "to",
              "role",
              "evidence_refs",
              "evidence_class",
              "resolution",
              "claim_verification"
            ],
            "additionalProperties": false
          },
          "maxItems": 1025
        },
        "observations": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "node_ref": {
                "type": "string",
                "maxLength": 256,
                "pattern": "^[a-zA-Z0-9][a-zA-Z0-9._:/#-]*$"
              },
              "sha256": {
                "type": "string",
                "pattern": "^[a-f0-9]{64}$"
              },
              "byte_length": {
                "type": "integer",
                "minimum": 0,
                "maximum": 33554432
              },
              "document": {
                "type": "object"
              }
            },
            "required": [
              "node_ref",
              "sha256",
              "byte_length"
            ],
            "additionalProperties": false
          },
          "maxItems": 256
        },
        "checks": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "subject_ref": {
                "type": "string",
                "maxLength": 256,
                "pattern": "^[a-zA-Z0-9][a-zA-Z0-9._:/#-]*$"
              },
              "kind": {
                "type": "string",
                "maxLength": 4096,
                "minLength": 1,
                "pattern": "\\S"
              },
              "status": {
                "enum": [
                  "match",
                  "mismatch",
                  "not_assessed",
                  "unresolved",
                  "unsupported"
                ]
              },
              "message": {
                "type": "string",
                "maxLength": 4096,
                "minLength": 1,
                "pattern": "\\S"
              }
            },
            "required": [
              "subject_ref",
              "kind",
              "status",
              "message"
            ],
            "additionalProperties": false
          },
          "maxItems": 1000000
        },
        "field_ledger": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "source_document": {
                "enum": [
                  "input_document",
                  "evidence_link_ir"
                ]
              },
              "source_pointer": {
                "type": "string",
                "maxLength": 4096,
                "minLength": 1,
                "pattern": "\\S"
              },
              "subject_ref": {
                "type": "string",
                "maxLength": 256,
                "pattern": "^[a-zA-Z0-9][a-zA-Z0-9._:/#-]*$"
              },
              "name": {
                "type": "string",
                "maxLength": 4096
              },
              "value": {},
              "status": {
                "enum": [
                  "mapped_declared",
                  "preserved_unsupported_mapping"
                ]
              }
            },
            "required": [
              "source_document",
              "source_pointer",
              "subject_ref",
              "name",
              "value",
              "status"
            ],
            "additionalProperties": false
          },
          "maxItems": 1000000
        },
        "coverage": {
          "type": "object",
          "properties": {
            "node_count": {
              "type": "integer",
              "minimum": 0,
              "maximum": 1000000
            },
            "relationship_count": {
              "type": "integer",
              "minimum": 0,
              "maximum": 1000000
            },
            "observed_file_count": {
              "type": "integer",
              "minimum": 0,
              "maximum": 1000000
            },
            "check_count": {
              "type": "integer",
              "minimum": 0,
              "maximum": 1000000
            },
            "field_count": {
              "type": "integer",
              "minimum": 0,
              "maximum": 1000000
            },
            "mapped_declared_field_count": {
              "type": "integer",
              "minimum": 0,
              "maximum": 1000000
            },
            "unsupported_field_count": {
              "type": "integer",
              "minimum": 0,
              "maximum": 1000000
            },
            "attested_relationship_count": {
              "type": "integer",
              "minimum": 0,
              "maximum": 1000000
            },
            "check_counts": {
              "type": "object",
              "properties": {
                "match": {
                  "type": "integer",
                  "minimum": 0,
                  "maximum": 1000000
                },
                "mismatch": {
                  "type": "integer",
                  "minimum": 0,
                  "maximum": 1000000
                },
                "not_assessed": {
                  "type": "integer",
                  "minimum": 0,
                  "maximum": 1000000
                },
                "unresolved": {
                  "type": "integer",
                  "minimum": 0,
                  "maximum": 1000000
                },
                "unsupported": {
                  "type": "integer",
                  "minimum": 0,
                  "maximum": 1000000
                }
              },
              "required": [
                "match",
                "mismatch",
                "not_assessed",
                "unresolved",
                "unsupported"
              ],
              "additionalProperties": false
            }
          },
          "required": [
            "node_count",
            "relationship_count",
            "observed_file_count",
            "check_count",
            "field_count",
            "mapped_declared_field_count",
            "unsupported_field_count",
            "attested_relationship_count",
            "check_counts"
          ],
          "additionalProperties": false
        },
        "verdict": {
          "type": "object",
          "properties": {
            "status": {
              "type": "string",
              "enum": [
                "contradiction_observed",
                "incomplete",
                "no_contradiction_observed"
              ]
            },
            "scope": {
              "const": "binding_reference_and_supplied_file_consistency"
            },
            "metadata_truth_verified": {
              "const": false
            },
            "publisher_authenticity": {
              "const": "not_verified"
            }
          },
          "required": [
            "status",
            "scope",
            "metadata_truth_verified",
            "publisher_authenticity"
          ],
          "additionalProperties": false
        },
        "interpretation_boundary": {
          "type": "string",
          "maxLength": 4096,
          "minLength": 1,
          "pattern": "\\S"
        },
        "evidence_link_ir_sha256": {
          "type": "string",
          "pattern": "^[a-f0-9]{64}$"
        }
      },
      "required": [
        "schema",
        "method_version",
        "hash_contract",
        "source",
        "input_document",
        "input_sha256",
        "profile",
        "nodes",
        "relationships",
        "observations",
        "checks",
        "field_ledger",
        "coverage",
        "verdict",
        "interpretation_boundary",
        "evidence_link_ir_sha256"
      ],
      "additionalProperties": false
    },
    {
      "type": "object",
      "properties": {
        "schema": {
          "type": "string",
          "const": "deepbom.evidence_link_summary.v1"
        },
        "artifact_sha256": {
          "type": "string",
          "pattern": "^[a-f0-9]{64}$"
        },
        "model_ir_sha256": {
          "type": "string",
          "pattern": "^[a-f0-9]{64}$"
        },
        "evidence_link_ir_sha256": {
          "type": "string",
          "pattern": "^[a-f0-9]{64}$"
        },
        "status": {
          "type": "string",
          "enum": [
            "contradiction_observed",
            "incomplete",
            "no_contradiction_observed"
          ]
        },
        "node_count": {
          "type": "integer",
          "minimum": 0,
          "maximum": 1000000
        },
        "relationship_count": {
          "type": "integer",
          "minimum": 0,
          "maximum": 1000000
        },
        "observed_file_count": {
          "type": "integer",
          "minimum": 0,
          "maximum": 1000000
        },
        "check_count": {
          "type": "integer",
          "minimum": 0,
          "maximum": 1000000
        },
        "field_count": {
          "type": "integer",
          "minimum": 0,
          "maximum": 1000000
        },
        "mapped_declared_field_count": {
          "type": "integer",
          "minimum": 0,
          "maximum": 1000000
        },
        "unsupported_field_count": {
          "type": "integer",
          "minimum": 0,
          "maximum": 1000000
        },
        "attested_relationship_count": {
          "type": "integer",
          "minimum": 0,
          "maximum": 1000000
        },
        "check_counts": {
          "type": "object",
          "properties": {
            "match": {
              "type": "integer",
              "minimum": 0,
              "maximum": 1000000
            },
            "mismatch": {
              "type": "integer",
              "minimum": 0,
              "maximum": 1000000
            },
            "not_assessed": {
              "type": "integer",
              "minimum": 0,
              "maximum": 1000000
            },
            "unresolved": {
              "type": "integer",
              "minimum": 0,
              "maximum": 1000000
            },
            "unsupported": {
              "type": "integer",
              "minimum": 0,
              "maximum": 1000000
            }
          },
          "required": [
            "match",
            "mismatch",
            "not_assessed",
            "unresolved",
            "unsupported"
          ],
          "additionalProperties": false
        },
        "metadata_truth_verified": {
          "type": "boolean",
          "const": false
        },
        "publisher_authenticity": {
          "type": "string",
          "const": "not_verified"
        }
      },
      "required": [
        "schema",
        "artifact_sha256",
        "model_ir_sha256",
        "evidence_link_ir_sha256",
        "status",
        "node_count",
        "relationship_count",
        "observed_file_count",
        "check_count",
        "field_count",
        "mapped_declared_field_count",
        "unsupported_field_count",
        "attested_relationship_count",
        "check_counts",
        "metadata_truth_verified",
        "publisher_authenticity"
      ],
      "additionalProperties": false
    }
  ]
}
