{
  "$defs": {
    "AllowedValuesCriterion": {
      "additionalProperties": false,
      "properties": {
        "allowed_values": {
          "items": {
            "type": "string"
          },
          "minItems": 1,
          "title": "Allowed Values",
          "type": "array"
        },
        "criterion_type": {
          "const": "allowed_values",
          "default": "allowed_values",
          "title": "Criterion Type",
          "type": "string"
        }
      },
      "required": [
        "allowed_values"
      ],
      "title": "AllowedValuesCriterion",
      "type": "object"
    },
    "ApplicabilityKind": {
      "enum": [
        "spacecraft",
        "subsystem",
        "component",
        "mode",
        "scenario"
      ],
      "title": "ApplicabilityKind",
      "type": "string"
    },
    "ApplicabilityReference": {
      "additionalProperties": false,
      "properties": {
        "kind": {
          "$ref": "#/$defs/ApplicabilityKind"
        },
        "target_id": {
          "maxLength": 128,
          "minLength": 1,
          "pattern": "^[a-z][a-z0-9]*(?:[._:-][a-z0-9]+)*$",
          "title": "Target Id",
          "type": "string"
        }
      },
      "required": [
        "kind",
        "target_id"
      ],
      "title": "ApplicabilityReference",
      "type": "object"
    },
    "ArtifactReference": {
      "additionalProperties": false,
      "properties": {
        "artifact_id": {
          "maxLength": 128,
          "minLength": 1,
          "pattern": "^[a-z][a-z0-9]*(?:[._:-][a-z0-9]+)*$",
          "title": "Artifact Id",
          "type": "string"
        },
        "media_type": {
          "maxLength": 128,
          "minLength": 3,
          "title": "Media Type",
          "type": "string"
        },
        "relative_path": {
          "maxLength": 512,
          "minLength": 1,
          "title": "Relative Path",
          "type": "string"
        },
        "sha256": {
          "pattern": "^[0-9a-f]{64}$",
          "title": "Sha256",
          "type": "string"
        },
        "size_bytes": {
          "minimum": 0,
          "title": "Size Bytes",
          "type": "integer"
        }
      },
      "required": [
        "artifact_id",
        "media_type",
        "relative_path",
        "sha256",
        "size_bytes"
      ],
      "title": "ArtifactReference",
      "type": "object"
    },
    "BooleanCriterion": {
      "additionalProperties": false,
      "properties": {
        "criterion_type": {
          "const": "boolean",
          "default": "boolean",
          "title": "Criterion Type",
          "type": "string"
        },
        "expected": {
          "title": "Expected",
          "type": "boolean"
        }
      },
      "required": [
        "expected"
      ],
      "title": "BooleanCriterion",
      "type": "object"
    },
    "EngineeringDomain": {
      "enum": [
        "system",
        "mission",
        "environment",
        "mass",
        "power",
        "thermal",
        "propulsion",
        "adcs",
        "communications",
        "launch",
        "lifetime",
        "cost",
        "geometry",
        "placement",
        "deployables",
        "operations"
      ],
      "title": "EngineeringDomain",
      "type": "string"
    },
    "EngineeringStatement": {
      "additionalProperties": false,
      "properties": {
        "applies_to": {
          "items": {
            "$ref": "#/$defs/ApplicabilityReference"
          },
          "minItems": 1,
          "title": "Applies To",
          "type": "array"
        },
        "authority": {
          "anyOf": [
            {
              "maxLength": 200,
              "minLength": 1,
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Authority"
        },
        "criterion": {
          "discriminator": {
            "mapping": {
              "allowed_values": "#/$defs/AllowedValuesCriterion",
              "boolean": "#/$defs/BooleanCriterion",
              "range": "#/$defs/RangeCriterion",
              "scalar": "#/$defs/ScalarCriterion"
            },
            "propertyName": "criterion_type"
          },
          "oneOf": [
            {
              "$ref": "#/$defs/ScalarCriterion"
            },
            {
              "$ref": "#/$defs/RangeCriterion"
            },
            {
              "$ref": "#/$defs/BooleanCriterion"
            },
            {
              "$ref": "#/$defs/AllowedValuesCriterion"
            }
          ],
          "title": "Criterion"
        },
        "domain": {
          "$ref": "#/$defs/EngineeringDomain"
        },
        "evidence_source_ids": {
          "default": [],
          "items": {
            "maxLength": 128,
            "minLength": 1,
            "pattern": "^[a-z][a-z0-9]*(?:[._:-][a-z0-9]+)*$",
            "type": "string"
          },
          "title": "Evidence Source Ids",
          "type": "array"
        },
        "kind": {
          "$ref": "#/$defs/EngineeringStatementKind"
        },
        "metric_id": {
          "maxLength": 128,
          "minLength": 1,
          "pattern": "^[a-z][a-z0-9]*(?:[._:-][a-z0-9]+)*$",
          "title": "Metric Id",
          "type": "string"
        },
        "rationale": {
          "anyOf": [
            {
              "maxLength": 1000,
              "minLength": 1,
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Rationale"
        },
        "statement_id": {
          "maxLength": 128,
          "minLength": 1,
          "pattern": "^[a-z][a-z0-9]*(?:[._:-][a-z0-9]+)*$",
          "title": "Statement Id",
          "type": "string"
        }
      },
      "required": [
        "statement_id",
        "kind",
        "domain",
        "metric_id",
        "criterion",
        "applies_to"
      ],
      "title": "EngineeringStatement",
      "type": "object"
    },
    "EngineeringStatementKind": {
      "enum": [
        "requirement",
        "preference",
        "assumption",
        "objective",
        "authorization",
        "acceptance",
        "proposed_change"
      ],
      "title": "EngineeringStatementKind",
      "type": "string"
    },
    "EvaluationEvidence": {
      "additionalProperties": false,
      "properties": {
        "applicability": {
          "anyOf": [
            {
              "$ref": "#/$defs/ModelApplicabilityStatus"
            },
            {
              "type": "null"
            }
          ],
          "default": null
        },
        "authority_ids": {
          "default": [],
          "items": {
            "maxLength": 128,
            "minLength": 1,
            "pattern": "^[a-z][a-z0-9]*(?:[._:-][a-z0-9]+)*$",
            "type": "string"
          },
          "title": "Authority Ids",
          "type": "array"
        },
        "confidence": {
          "$ref": "#/$defs/EvidenceConfidence",
          "default": "unknown"
        },
        "evidence_id": {
          "maxLength": 128,
          "minLength": 1,
          "pattern": "^[a-z][a-z0-9]*(?:[._:-][a-z0-9]+)*$",
          "title": "Evidence Id",
          "type": "string"
        },
        "knowledge_state": {
          "$ref": "#/$defs/KnowledgeState",
          "default": "unknown"
        },
        "limitation_ids": {
          "default": [],
          "items": {
            "maxLength": 128,
            "minLength": 1,
            "pattern": "^[a-z][a-z0-9]*(?:[._:-][a-z0-9]+)*$",
            "type": "string"
          },
          "title": "Limitation Ids",
          "type": "array"
        },
        "reason": {
          "maxLength": 2000,
          "minLength": 1,
          "title": "Reason",
          "type": "string"
        },
        "source_tiers": {
          "default": [],
          "items": {
            "$ref": "#/$defs/EvidenceTier"
          },
          "title": "Source Tiers",
          "type": "array"
        },
        "sources": {
          "default": [],
          "items": {
            "$ref": "#/$defs/EvaluationSourceReference"
          },
          "title": "Sources",
          "type": "array"
        },
        "state": {
          "enum": [
            "present",
            "missing",
            "inapplicable",
            "deferred"
          ],
          "title": "State",
          "type": "string"
        },
        "unit": {
          "enum": [
            "ratio",
            "1",
            "K",
            "deg",
            "m/s",
            "s",
            "W",
            "Wh",
            "W/kg",
            "W/m3",
            "W/m2",
            "kg",
            "m3",
            "m2",
            "dB",
            "bit/day",
            "bit",
            "USD",
            "EUR",
            "GBP",
            "count",
            "composite",
            "inventory",
            "score_points",
            "text",
            "bool",
            "V",
            "A",
            "m",
            "N",
            "degC",
            "km",
            "year",
            "deg/s",
            "rpm",
            "N*m",
            "N*m*s",
            "A*m2",
            "bit/s",
            "USD_2025",
            "arcsec",
            "enum",
            "m/s2"
          ],
          "title": "Unit",
          "type": "string"
        },
        "value": {
          "anyOf": [
            {
              "type": "number"
            },
            {
              "type": "boolean"
            },
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Value"
        }
      },
      "required": [
        "evidence_id",
        "state",
        "unit",
        "reason"
      ],
      "title": "EvaluationEvidence",
      "type": "object"
    },
    "EvaluationSource": {
      "additionalProperties": false,
      "properties": {
        "artifact_index_sha256": {
          "pattern": "^[0-9a-f]{64}$",
          "title": "Artifact Index Sha256",
          "type": "string"
        },
        "candidate_id": {
          "maxLength": 128,
          "minLength": 1,
          "pattern": "^[a-z][a-z0-9]*(?:[._:-][a-z0-9]+)*$",
          "title": "Candidate Id",
          "type": "string"
        },
        "contract_version": {
          "const": "1.0.0",
          "default": "1.0.0",
          "title": "Contract Version",
          "type": "string"
        },
        "input_snapshot_sha256": {
          "pattern": "^[0-9a-f]{64}$",
          "title": "Input Snapshot Sha256",
          "type": "string"
        },
        "manifest_sha256": {
          "pattern": "^[0-9a-f]{64}$",
          "title": "Manifest Sha256",
          "type": "string"
        },
        "result_index_sha256": {
          "pattern": "^[0-9a-f]{64}$",
          "title": "Result Index Sha256",
          "type": "string"
        },
        "run_id": {
          "maxLength": 128,
          "minLength": 1,
          "pattern": "^[a-z][a-z0-9]*(?:[._:-][a-z0-9]+)*$",
          "title": "Run Id",
          "type": "string"
        }
      },
      "required": [
        "candidate_id",
        "run_id",
        "manifest_sha256",
        "input_snapshot_sha256",
        "result_index_sha256",
        "artifact_index_sha256"
      ],
      "title": "EvaluationSource",
      "type": "object"
    },
    "EvaluationSourceReference": {
      "additionalProperties": false,
      "description": "A manifest-declared capture plus a pointer, never a host file locator.",
      "properties": {
        "artifact": {
          "$ref": "#/$defs/ArtifactReference"
        },
        "component_id": {
          "anyOf": [
            {
              "maxLength": 128,
              "minLength": 1,
              "pattern": "^[a-z][a-z0-9]*(?:[._:-][a-z0-9]+)*$",
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Component Id"
        },
        "mode_id": {
          "anyOf": [
            {
              "maxLength": 128,
              "minLength": 1,
              "pattern": "^[a-z][a-z0-9]*(?:[._:-][a-z0-9]+)*$",
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Mode Id"
        },
        "pointer": {
          "default": "",
          "maxLength": 1024,
          "pattern": "^(?:/(?:[^~]|~[01])*)*$",
          "title": "Pointer",
          "type": "string"
        },
        "result_id": {
          "anyOf": [
            {
              "maxLength": 128,
              "minLength": 1,
              "pattern": "^[a-z][a-z0-9]*(?:[._:-][a-z0-9]+)*$",
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Result Id"
        },
        "scenario_id": {
          "anyOf": [
            {
              "maxLength": 128,
              "minLength": 1,
              "pattern": "^[a-z][a-z0-9]*(?:[._:-][a-z0-9]+)*$",
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Scenario Id"
        }
      },
      "required": [
        "artifact"
      ],
      "title": "EvaluationSourceReference",
      "type": "object"
    },
    "EvidenceConfidence": {
      "enum": [
        "authoritative",
        "supplier_based",
        "verified",
        "estimated",
        "assumed",
        "unknown"
      ],
      "title": "EvidenceConfidence",
      "type": "string"
    },
    "EvidenceTier": {
      "enum": [
        "verified",
        "credible",
        "engineering_estimate",
        "policy_default",
        "unknown"
      ],
      "title": "EvidenceTier",
      "type": "string"
    },
    "KnowledgeState": {
      "enum": [
        "known",
        "estimated",
        "defaulted",
        "unknown"
      ],
      "title": "KnowledgeState",
      "type": "string"
    },
    "ModelApplicabilityStatus": {
      "enum": [
        "applicable",
        "degraded",
        "unsupported"
      ],
      "title": "ModelApplicabilityStatus",
      "type": "string"
    },
    "RangeCriterion": {
      "additionalProperties": false,
      "properties": {
        "criterion_type": {
          "const": "range",
          "default": "range",
          "title": "Criterion Type",
          "type": "string"
        },
        "maximum": {
          "title": "Maximum",
          "type": "number"
        },
        "maximum_inclusive": {
          "default": true,
          "title": "Maximum Inclusive",
          "type": "boolean"
        },
        "minimum": {
          "title": "Minimum",
          "type": "number"
        },
        "minimum_inclusive": {
          "default": true,
          "title": "Minimum Inclusive",
          "type": "boolean"
        }
      },
      "required": [
        "minimum",
        "maximum"
      ],
      "title": "RangeCriterion",
      "type": "object"
    },
    "ScalarCriterion": {
      "additionalProperties": false,
      "properties": {
        "criterion_type": {
          "const": "scalar",
          "default": "scalar",
          "title": "Criterion Type",
          "type": "string"
        },
        "operator": {
          "$ref": "#/$defs/ScalarOperator"
        },
        "tolerance": {
          "anyOf": [
            {
              "exclusiveMinimum": 0.0,
              "type": "number"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Tolerance"
        },
        "value": {
          "title": "Value",
          "type": "number"
        }
      },
      "required": [
        "operator",
        "value"
      ],
      "title": "ScalarCriterion",
      "type": "object"
    },
    "ScalarOperator": {
      "enum": [
        "lt",
        "le",
        "eq",
        "ge",
        "gt",
        "approx"
      ],
      "title": "ScalarOperator",
      "type": "string"
    }
  },
  "$id": "urn:sindri:contracts:1.0.0:neutral-evidence-packet",
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "additionalProperties": false,
  "properties": {
    "evidence": {
      "default": [],
      "items": {
        "$ref": "#/$defs/EvaluationEvidence"
      },
      "title": "Evidence",
      "type": "array"
    },
    "limitations": {
      "default": [],
      "items": {
        "type": "string"
      },
      "title": "Limitations",
      "type": "array"
    },
    "project_title": {
      "maxLength": 200,
      "minLength": 1,
      "title": "Project Title",
      "type": "string"
    },
    "requirements": {
      "default": [],
      "items": {
        "$ref": "#/$defs/EngineeringStatement"
      },
      "title": "Requirements",
      "type": "array"
    },
    "schema_kind": {
      "const": "neutral_evidence_packet",
      "default": "neutral_evidence_packet",
      "title": "Schema Kind",
      "type": "string"
    },
    "schema_version": {
      "const": "1.0.0",
      "default": "1.0.0",
      "title": "Schema Version",
      "type": "string"
    },
    "source": {
      "$ref": "#/$defs/EvaluationSource"
    },
    "spacecraft_class": {
      "maxLength": 128,
      "minLength": 1,
      "pattern": "^[a-z][a-z0-9]*(?:[._:-][a-z0-9]+)*$",
      "title": "Spacecraft Class",
      "type": "string"
    }
  },
  "required": [
    "source",
    "project_title",
    "spacecraft_class"
  ],
  "title": "NeutralEvidencePacket",
  "type": "object",
  "x-sindri-contract-suite": "sindri.contracts",
  "x-sindri-contract-version": "1.0.0"
}
