{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "urn:altium-monkey:schema:compilation_c0",
  "type": "object",
  "properties": {
    "schema": {
      "type": "string",
      "const": "altium_monkey.compilation.c0"
    },
    "root_definition_ref": {
      "$ref": "#/$defs/CompilationIdentity"
    },
    "definitions": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/CompilationDefinition"
      }
    },
    "issues": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/CompilationIssue"
      }
    }
  },
  "required": [
    "schema",
    "root_definition_ref",
    "definitions",
    "issues"
  ],
  "unevaluatedProperties": {
    "not": {}
  },
  "description": "Shared compiled product: natural Design or System root, one electrical owner.",
  "$defs": {
    "CompilationIdentity": {
      "type": "string",
      "minLength": 1,
      "description": "Opaque local identity; native source selectors are not model references."
    },
    "CompilationDefinition": {
      "type": "object",
      "properties": {
        "id": {
          "$ref": "#/$defs/CompilationIdentity"
        },
        "kind": {
          "$ref": "#/$defs/CompilationKind"
        },
        "instances": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/CompilationInstance"
          }
        },
        "terminals": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/CompilationTerminal"
          }
        },
        "nets": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/CompilationNet"
          }
        },
        "net_bridges": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/NetBridge"
          },
          "description": "Net-tie components (kinds 3 and 4); the nets they join stay separate."
        },
        "bridged_groups": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/BridgedNetGroup"
          }
        },
        "project": {
          "$ref": "#/$defs/CompilationProject"
        },
        "selected_variant": {
          "$ref": "#/$defs/CompilationNullableText"
        },
        "variants": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/CompilationVariant"
          }
        },
        "source": {
          "$ref": "#/$defs/CompilationDefinitionSource"
        },
        "schematic": {
          "$ref": "#/$defs/CompilationSchematic"
        },
        "boards": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/CompilationBoard"
          }
        },
        "issues": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/CompilationDefinitionIssue"
          }
        }
      },
      "required": [
        "id",
        "kind",
        "instances",
        "terminals",
        "nets",
        "net_bridges",
        "bridged_groups",
        "selected_variant",
        "variants",
        "boards",
        "issues"
      ],
      "unevaluatedProperties": {
        "not": {}
      }
    },
    "CompilationIssue": {
      "type": "object",
      "properties": {
        "source": {
          "$ref": "#/$defs/SourceOccurrence"
        },
        "target": {
          "$ref": "#/$defs/NetOccurrence"
        },
        "realized_page_ref": {
          "$ref": "#/$defs/CompilationIdentity"
        },
        "reason": {
          "$ref": "#/$defs/CompilationReason"
        }
      },
      "required": [
        "reason"
      ],
      "unevaluatedProperties": {
        "not": {}
      },
      "description": "When present, complete-product page scope names a realized drawing page."
    },
    "CompilationKind": {
      "anyOf": [
        {
          "type": "string",
          "const": "design"
        },
        {
          "type": "string",
          "const": "system"
        }
      ]
    },
    "CompilationInstance": {
      "type": "object",
      "properties": {
        "id": {
          "$ref": "#/$defs/StructuralIdentity"
        },
        "definition_ref": {
          "$ref": "#/$defs/StructuralIdentity"
        },
        "component": {
          "$ref": "#/$defs/CompilationComponent"
        }
      },
      "required": [
        "id"
      ],
      "unevaluatedProperties": {
        "not": {}
      }
    },
    "CompilationTerminal": {
      "type": "object",
      "properties": {
        "id": {
          "$ref": "#/$defs/StructuralIdentity"
        },
        "instance_ref": {
          "$ref": "#/$defs/StructuralIdentity"
        },
        "pin": {
          "$ref": "#/$defs/CompilationPin"
        }
      },
      "required": [
        "id"
      ],
      "unevaluatedProperties": {
        "not": {}
      }
    },
    "CompilationNet": {
      "type": "object",
      "properties": {
        "id": {
          "$ref": "#/$defs/StructuralIdentity"
        },
        "name": {
          "type": "string",
          "description": "Compiled primary name when one exists. System closure has no primary."
        },
        "members": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/StructuralMember"
          }
        },
        "naming": {
          "$ref": "#/$defs/NetNamingSummary"
        }
      },
      "required": [
        "id",
        "members"
      ],
      "unevaluatedProperties": {
        "not": {}
      }
    },
    "NetBridge": {
      "type": "object",
      "properties": {
        "instance_ref": {
          "$ref": "#/$defs/StructuralIdentity"
        },
        "designator": {
          "type": "string"
        },
        "kind": {
          "$ref": "#/$defs/NetBridgeKind"
        },
        "pins": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/NetBridgePin"
          }
        },
        "net_refs": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/StructuralIdentity"
          },
          "description": "The distinct nets of its pins, in net order."
        }
      },
      "required": [
        "instance_ref",
        "designator",
        "kind",
        "pins",
        "net_refs"
      ],
      "unevaluatedProperties": {
        "not": {}
      },
      "description": "A component that deliberately joins nets on the board, such as a net tie.\nThe joined nets stay separate nets: this records the intended short only.\nAt schematic level a bridge covers all its pins (all its terminals, in\nterminal order). Which pads its board copper actually joins, island by\nisland, is a board fact this graph does not hold."
    },
    "BridgedNetGroup": {
      "type": "object",
      "properties": {
        "net_refs": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/StructuralIdentity"
          },
          "minItems": 2,
          "description": "In net order."
        },
        "bridge_refs": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/StructuralIdentity"
          },
          "minItems": 1,
          "description": "The bridges joining these nets, in bridge order."
        },
        "designators": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "The designators of bridge_refs, in the same order."
        }
      },
      "required": [
        "net_refs",
        "bridge_refs",
        "designators"
      ],
      "unevaluatedProperties": {
        "not": {}
      },
      "description": "Nets joined by bridges, transitively, with the bridges that join them.\nOnly groups of two or more nets are listed, in order of their first net."
    },
    "CompilationProject": {
      "type": "object",
      "properties": {
        "name": {
          "$ref": "#/$defs/CompilationNullableText"
        },
        "entry_path": {
          "$ref": "#/$defs/CompilationNullableText"
        },
        "parameters": {
          "$ref": "#/$defs/CompilationParameters"
        }
      },
      "required": [
        "name",
        "entry_path",
        "parameters"
      ],
      "unevaluatedProperties": {
        "not": {}
      }
    },
    "CompilationNullableText": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "CompilationVariant": {
      "type": "object",
      "properties": {
        "name": {
          "type": "string",
          "minLength": 1
        },
        "parameters": {
          "$ref": "#/$defs/CompilationParameters"
        },
        "changes": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/CompilationVariantChange"
          }
        },
        "issues": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/LocalIssue"
          }
        }
      },
      "required": [
        "name",
        "parameters",
        "changes",
        "issues"
      ],
      "unevaluatedProperties": {
        "not": {}
      }
    },
    "CompilationDefinitionSource": {
      "anyOf": [
        {
          "$ref": "#/$defs/CompilationDesignSource"
        },
        {
          "$ref": "#/$defs/SystemSource"
        }
      ]
    },
    "CompilationSchematic": {
      "type": "object",
      "properties": {
        "pages": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/CompilationPage"
          }
        },
        "bodies": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/CompilationBody"
          }
        },
        "contacts": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/CompilationContact"
          }
        },
        "local_islands": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/CompilationIsland"
          }
        },
        "hierarchy_links": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/CompilationHierarchyLink"
          }
        },
        "issues": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/LocalIssue"
          }
        }
      },
      "required": [
        "pages",
        "bodies",
        "contacts",
        "local_islands",
        "hierarchy_links",
        "issues"
      ],
      "unevaluatedProperties": {
        "not": {}
      }
    },
    "CompilationBoard": {
      "anyOf": [
        {
          "$ref": "#/$defs/CompilationAvailableBoard"
        },
        {
          "$ref": "#/$defs/CompilationUnavailableBoard"
        }
      ]
    },
    "CompilationDefinitionIssue": {
      "anyOf": [
        {
          "$ref": "#/$defs/CompilationCoverageIssue"
        },
        {
          "$ref": "#/$defs/CompilationComponentAdmissionIssue"
        }
      ]
    },
    "SourceOccurrence": {
      "type": "object",
      "properties": {
        "instance_path": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/Identity"
          }
        },
        "source_key": {
          "$ref": "#/$defs/CompiledSourceKey"
        }
      },
      "required": [
        "instance_path",
        "source_key"
      ],
      "unevaluatedProperties": {
        "not": {}
      }
    },
    "NetOccurrence": {
      "type": "object",
      "properties": {
        "instance_path": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/Identity"
          }
        },
        "net_ref": {
          "$ref": "#/$defs/Identity"
        }
      },
      "required": [
        "instance_path",
        "net_ref"
      ],
      "unevaluatedProperties": {
        "not": {}
      },
      "description": "Query paths traverse composite instances from the loaded root."
    },
    "CompilationReason": {
      "type": "string",
      "minLength": 1
    },
    "StructuralIdentity": {
      "type": "string",
      "minLength": 1,
      "description": "Definition-local opaque nonempty identity. Names and source paths are not refs."
    },
    "CompilationComponent": {
      "type": "object",
      "properties": {
        "base": {
          "$ref": "#/$defs/CompilationComponentBase"
        },
        "includes_in_netlist": {
          "type": "boolean"
        },
        "includes_in_bom": {
          "type": "boolean"
        },
        "altium": {
          "$ref": "#/$defs/CompilationAltiumComponent"
        }
      },
      "required": [
        "base",
        "includes_in_netlist",
        "includes_in_bom"
      ],
      "unevaluatedProperties": {
        "not": {}
      }
    },
    "CompilationPin": {
      "type": "object",
      "properties": {
        "hardware_designation": {
          "type": "string",
          "minLength": 1
        },
        "pin_name": {
          "$ref": "#/$defs/CompilationNullableText"
        },
        "electrical_type": {
          "$ref": "#/$defs/CompilationNullableText"
        }
      },
      "required": [
        "hardware_designation",
        "pin_name",
        "electrical_type"
      ],
      "unevaluatedProperties": {
        "not": {}
      }
    },
    "StructuralMember": {
      "anyOf": [
        {
          "$ref": "#/$defs/StructuralTerminalMember"
        },
        {
          "$ref": "#/$defs/StructuralChildNetMember"
        }
      ]
    },
    "NetNamingSummary": {
      "type": "object",
      "properties": {
        "auto_named": {
          "type": "boolean"
        },
        "aliases": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "original_name": {
          "$ref": "#/$defs/NullableText"
        },
        "override_name": {
          "$ref": "#/$defs/NullableText"
        },
        "origin": {
          "$ref": "#/$defs/NamingOrigin"
        }
      },
      "required": [
        "auto_named",
        "aliases",
        "original_name",
        "override_name",
        "origin"
      ],
      "unevaluatedProperties": {
        "not": {}
      },
      "description": "Report facts omit the redundant definition-local net_ref."
    },
    "NetBridgeKind": {
      "anyOf": [
        {
          "type": "string",
          "const": "net_tie_bom"
        },
        {
          "type": "string",
          "const": "net_tie_no_bom"
        }
      ],
      "description": "Component kinds that bridge nets: Altium Net Tie, In BOM (kind 3) or No BOM (kind 4)."
    },
    "NetBridgePin": {
      "type": "object",
      "properties": {
        "terminal_ref": {
          "$ref": "#/$defs/StructuralIdentity"
        },
        "hardware_designation": {
          "type": "string",
          "description": "Pin designation, for reading; terminal_ref is the identity."
        },
        "net_ref": {
          "$ref": "#/$defs/StructuralIdentity"
        }
      },
      "required": [
        "terminal_ref",
        "hardware_designation"
      ],
      "unevaluatedProperties": {
        "not": {}
      },
      "description": "One pin of a bridge component; net_ref is absent when the pin is on no net."
    },
    "CompilationParameters": {
      "type": "object",
      "properties": {},
      "unevaluatedProperties": {
        "type": "string"
      }
    },
    "CompilationVariantChange": {
      "type": "object",
      "properties": {
        "instance_ref": {
          "$ref": "#/$defs/CompilationIdentity"
        },
        "fitted": {
          "type": "boolean"
        },
        "value": {
          "type": "string"
        },
        "footprint": {
          "type": "string"
        },
        "parameters": {
          "$ref": "#/$defs/CompilationParameters"
        }
      },
      "required": [
        "instance_ref"
      ],
      "unevaluatedProperties": {
        "not": {}
      }
    },
    "LocalIssue": {
      "type": "object",
      "properties": {
        "source_key": {
          "$ref": "#/$defs/CompiledSourceKey"
        },
        "reason": {
          "$ref": "#/$defs/Reason"
        }
      },
      "required": [
        "reason"
      ],
      "unevaluatedProperties": {
        "not": {}
      }
    },
    "CompilationDesignSource": {
      "type": "object",
      "properties": {
        "kind": {
          "type": "string",
          "const": "design"
        },
        "entry_path": {
          "type": "string"
        },
        "compile_context": {
          "$ref": "#/$defs/CompileContext"
        },
        "fields": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/CompilationField"
          }
        },
        "source_bindings": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/CompilationSourceBinding"
          }
        },
        "naming_gaps": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/NamingGap"
          }
        },
        "diagnostics": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/CompilationNativeDiagnostic"
          }
        }
      },
      "required": [
        "kind",
        "entry_path",
        "compile_context",
        "fields",
        "source_bindings",
        "naming_gaps",
        "diagnostics"
      ],
      "unevaluatedProperties": {
        "not": {}
      }
    },
    "SystemSource": {
      "type": "object",
      "properties": {
        "kind": {
          "type": "string",
          "const": "system"
        },
        "project_path": {
          "type": "string"
        },
        "modules": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/SystemModule"
          }
        },
        "entries": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/SystemEntry"
          }
        },
        "pins": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/SystemPin"
          }
        },
        "connections": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/SystemConnection"
          }
        },
        "physical_connections": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/PhysicalConnection"
          }
        },
        "links": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/SystemLink"
          }
        },
        "drawing_associations": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/SystemDrawingAssociation"
          },
          "description": "Absent means drawing decoding not supplied, never a proven empty page."
        },
        "issues": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/LocalIssue"
          }
        }
      },
      "required": [
        "kind",
        "project_path",
        "modules",
        "entries",
        "pins",
        "connections",
        "physical_connections",
        "links",
        "issues"
      ],
      "unevaluatedProperties": {
        "not": {}
      }
    },
    "CompilationPage": {
      "type": "object",
      "properties": {
        "id": {
          "$ref": "#/$defs/CompilationIdentity"
        },
        "document_path": {
          "type": "string",
          "minLength": 1
        },
        "physical_document_key": {
          "type": "string",
          "minLength": 1
        },
        "display_name": {
          "type": "string"
        },
        "sheet_number": {
          "type": "string"
        },
        "instance_order": {
          "$ref": "#/$defs/SignedInt64"
        },
        "parent": {
          "$ref": "#/$defs/CompilationPageParent"
        },
        "altium": {
          "$ref": "#/$defs/CompilationAltiumPage"
        }
      },
      "required": [
        "id",
        "document_path",
        "physical_document_key",
        "display_name",
        "sheet_number",
        "instance_order"
      ],
      "unevaluatedProperties": {
        "not": {}
      }
    },
    "CompilationBody": {
      "type": "object",
      "properties": {
        "id": {
          "$ref": "#/$defs/CompilationIdentity"
        },
        "page_ref": {
          "$ref": "#/$defs/CompilationIdentity"
        },
        "source": {
          "$ref": "#/$defs/CompilationSourceEvidence"
        },
        "instance_binding": {
          "$ref": "#/$defs/InstanceBinding"
        },
        "part": {
          "type": "integer",
          "minimum": -2147483648,
          "maximum": 2147483647
        },
        "display_mode": {
          "type": "integer",
          "minimum": -2147483648,
          "maximum": 2147483647
        },
        "authored": {
          "$ref": "#/$defs/CompilationAuthoredComponent"
        }
      },
      "required": [
        "id",
        "page_ref",
        "source",
        "instance_binding",
        "part",
        "display_mode",
        "authored"
      ],
      "unevaluatedProperties": {
        "not": {}
      }
    },
    "CompilationContact": {
      "type": "object",
      "properties": {
        "id": {
          "$ref": "#/$defs/CompilationIdentity"
        },
        "page_ref": {
          "$ref": "#/$defs/CompilationIdentity"
        },
        "source": {
          "$ref": "#/$defs/CompilationSourceEvidence"
        },
        "body_ref": {
          "$ref": "#/$defs/CompilationIdentity"
        },
        "role": {
          "$ref": "#/$defs/CompilationContactRole"
        },
        "name": {
          "type": "string"
        },
        "hardware_designation": {
          "type": "string"
        },
        "terminal_binding": {
          "$ref": "#/$defs/CompilationTerminalBinding"
        }
      },
      "required": [
        "id",
        "page_ref",
        "source",
        "role",
        "name",
        "hardware_designation",
        "terminal_binding"
      ],
      "unevaluatedProperties": {
        "not": {}
      }
    },
    "CompilationIsland": {
      "type": "object",
      "properties": {
        "id": {
          "$ref": "#/$defs/CompilationIdentity"
        },
        "page_ref": {
          "$ref": "#/$defs/CompilationIdentity"
        },
        "name": {
          "type": "string"
        },
        "qualified_name": {
          "type": "string"
        },
        "aliases": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "contact_refs": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/CompilationIdentity"
          }
        },
        "net_binding": {
          "$ref": "#/$defs/NetBinding"
        }
      },
      "required": [
        "id",
        "page_ref",
        "name",
        "qualified_name",
        "aliases",
        "contact_refs",
        "net_binding"
      ],
      "unevaluatedProperties": {
        "not": {}
      }
    },
    "CompilationHierarchyLink": {
      "type": "object",
      "properties": {
        "parent_contact_ref": {
          "$ref": "#/$defs/CompilationIdentity"
        },
        "child_contact_ref": {
          "$ref": "#/$defs/CompilationIdentity"
        }
      },
      "required": [
        "parent_contact_ref",
        "child_contact_ref"
      ],
      "unevaluatedProperties": {
        "not": {}
      }
    },
    "CompilationAvailableBoard": {
      "type": "object",
      "properties": {
        "status": {
          "type": "string",
          "const": "available"
        },
        "document_path": {
          "type": "string",
          "minLength": 1
        },
        "units": {
          "type": "string",
          "const": "mm"
        },
        "position_mode": {
          "$ref": "#/$defs/CompilationPositionMode"
        },
        "placements": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/CompilationBoardPlacement"
          }
        },
        "issues": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/LocalIssue"
          }
        }
      },
      "required": [
        "status",
        "document_path",
        "units",
        "position_mode",
        "placements",
        "issues"
      ],
      "unevaluatedProperties": {
        "not": {}
      }
    },
    "CompilationUnavailableBoard": {
      "type": "object",
      "properties": {
        "status": {
          "type": "string",
          "const": "unavailable"
        },
        "document_path": {
          "type": "string",
          "minLength": 1
        },
        "reason": {
          "$ref": "#/$defs/CompilationReason"
        }
      },
      "required": [
        "status",
        "document_path",
        "reason"
      ],
      "unevaluatedProperties": {
        "not": {}
      }
    },
    "CompilationCoverageIssue": {
      "type": "object",
      "properties": {
        "kind": {
          "type": "string",
          "const": "coverage"
        },
        "area": {
          "$ref": "#/$defs/CompilationCoverageArea"
        },
        "reason": {
          "$ref": "#/$defs/CompilationReason"
        }
      },
      "required": [
        "kind",
        "area",
        "reason"
      ],
      "unevaluatedProperties": {
        "not": {}
      }
    },
    "CompilationComponentAdmissionIssue": {
      "type": "object",
      "properties": {
        "kind": {
          "type": "string",
          "const": "component_admission"
        },
        "reason": {
          "$ref": "#/$defs/CompilationReason"
        },
        "physical_document_key": {
          "type": "string",
          "minLength": 1,
          "description": "Primary compiled owner only; multipart source bodies retain their own scope."
        },
        "source_bodies": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/CompilationAdmissionBody"
          }
        },
        "known_component": {
          "$ref": "#/$defs/CompilationComponent"
        }
      },
      "required": [
        "kind",
        "reason",
        "physical_document_key",
        "source_bodies",
        "known_component"
      ],
      "unevaluatedProperties": {
        "not": {}
      }
    },
    "Identity": {
      "type": "string",
      "minLength": 1
    },
    "CompiledSourceKey": {
      "anyOf": [
        {
          "$ref": "#/$defs/SchematicSourceKey"
        },
        {
          "$ref": "#/$defs/SystemSourceKey"
        },
        {
          "$ref": "#/$defs/SystemDrawingSourceKey"
        }
      ]
    },
    "CompilationComponentBase": {
      "type": "object",
      "properties": {
        "designator": {
          "type": "string"
        },
        "logical_designator": {
          "type": "string"
        },
        "value": {
          "type": "string"
        },
        "description": {
          "type": "string"
        },
        "library_ref": {
          "type": "string"
        },
        "footprint": {
          "type": "string"
        },
        "parameters": {
          "$ref": "#/$defs/CompilationParameters"
        },
        "fitted": {
          "type": "boolean"
        }
      },
      "required": [
        "designator",
        "logical_designator",
        "value",
        "description",
        "library_ref",
        "footprint",
        "parameters",
        "fitted"
      ],
      "unevaluatedProperties": {
        "not": {}
      },
      "description": "Base/no-variant compiled facts, distinct from authored source expressions."
    },
    "CompilationAltiumComponent": {
      "type": "object",
      "properties": {
        "component_kind": {
          "type": "string"
        },
        "component_kind_value": {
          "type": "integer",
          "minimum": -2147483648,
          "maximum": 2147483647
        },
        "design_item_id": {
          "type": "string"
        },
        "annotation_state": {
          "type": "string"
        },
        "annotation_locked": {
          "type": "boolean"
        },
        "declared_pin_count": {
          "$ref": "#/$defs/SignedInt64"
        },
        "declared_all_pin_count": {
          "$ref": "#/$defs/SignedInt64"
        },
        "declared_subpart_count": {
          "$ref": "#/$defs/SignedInt64"
        }
      },
      "required": [
        "component_kind",
        "component_kind_value",
        "design_item_id",
        "annotation_state",
        "annotation_locked",
        "declared_pin_count",
        "declared_all_pin_count",
        "declared_subpart_count"
      ],
      "unevaluatedProperties": {
        "not": {}
      },
      "description": "Provider declarations are not physical terminal or PCB-pad cardinalities."
    },
    "StructuralTerminalMember": {
      "type": "object",
      "properties": {
        "type": {
          "type": "string",
          "const": "terminal"
        },
        "terminal_ref": {
          "$ref": "#/$defs/StructuralIdentity"
        }
      },
      "required": [
        "type",
        "terminal_ref"
      ],
      "unevaluatedProperties": {
        "not": {}
      },
      "description": "Membership is stored once, at its owning definition."
    },
    "StructuralChildNetMember": {
      "type": "object",
      "properties": {
        "type": {
          "type": "string",
          "const": "child_net"
        },
        "instance_ref": {
          "$ref": "#/$defs/StructuralIdentity"
        },
        "net_ref": {
          "$ref": "#/$defs/StructuralIdentity"
        }
      },
      "required": [
        "type",
        "instance_ref",
        "net_ref"
      ],
      "unevaluatedProperties": {
        "not": {}
      },
      "description": "Immediate child binding. Deep instance paths are derived by traversal."
    },
    "NullableText": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "NamingOrigin": {
      "anyOf": [
        {
          "$ref": "#/$defs/KnownNamingOrigin"
        },
        {
          "$ref": "#/$defs/UnavailableNamingOrigin"
        }
      ]
    },
    "Reason": {
      "type": "string",
      "minLength": 1
    },
    "CompileContext": {
      "anyOf": [
        {
          "$ref": "#/$defs/KnownCompileContext"
        },
        {
          "$ref": "#/$defs/UnavailableCompileContext"
        }
      ]
    },
    "CompilationField": {
      "type": "object",
      "properties": {
        "source_key": {
          "$ref": "#/$defs/SchematicSourceKey"
        },
        "field": {
          "$ref": "#/$defs/NameField"
        },
        "raw_value": {
          "type": "string"
        },
        "contexts": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/CompilationFieldContext"
          }
        }
      },
      "required": [
        "source_key",
        "field",
        "raw_value",
        "contexts"
      ],
      "unevaluatedProperties": {
        "not": {}
      }
    },
    "CompilationSourceBinding": {
      "type": "object",
      "properties": {
        "source_key": {
          "$ref": "#/$defs/SchematicSourceKey"
        },
        "physical_document_key": {
          "type": "string",
          "minLength": 1
        },
        "targets": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/LocalElectricalTarget"
          }
        },
        "issues": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/LocalIssue"
          }
        }
      },
      "required": [
        "source_key",
        "physical_document_key",
        "targets",
        "issues"
      ],
      "unevaluatedProperties": {
        "not": {}
      }
    },
    "NamingGap": {
      "type": "object",
      "properties": {
        "net_ref": {
          "$ref": "#/$defs/NullableIdentity"
        },
        "source_key": {
          "$ref": "#/$defs/SchematicSourceKey"
        },
        "reason": {
          "$ref": "#/$defs/Reason"
        }
      },
      "required": [
        "net_ref",
        "reason"
      ],
      "unevaluatedProperties": {
        "not": {}
      },
      "description": "Null target means an unscoped naming gap in this owning Design definition."
    },
    "CompilationNativeDiagnostic": {
      "type": "object",
      "properties": {
        "severity": {
          "type": "string"
        },
        "code": {
          "type": "string"
        },
        "message": {
          "type": "string"
        },
        "native_owner_kind": {
          "type": "string"
        },
        "native_owner_key": {
          "$ref": "#/$defs/CompilationNullableText"
        },
        "native_source_key": {
          "$ref": "#/$defs/CompilationNullableText",
          "description": "Original opaque diagnostic source_id; not an owner or governed model ref."
        }
      },
      "required": [
        "severity",
        "code",
        "message",
        "native_owner_kind",
        "native_owner_key",
        "native_source_key"
      ],
      "unevaluatedProperties": {
        "not": {}
      }
    },
    "SystemModule": {
      "type": "object",
      "properties": {
        "source_key": {
          "$ref": "#/$defs/SystemSourceKey"
        },
        "designator": {
          "$ref": "#/$defs/NullableText"
        },
        "instance_binding": {
          "$ref": "#/$defs/InstanceBinding"
        }
      },
      "required": [
        "source_key",
        "designator",
        "instance_binding"
      ],
      "unevaluatedProperties": {
        "not": {}
      }
    },
    "SystemEntry": {
      "type": "object",
      "properties": {
        "source_key": {
          "$ref": "#/$defs/SystemSourceKey"
        },
        "owner_source_key": {
          "$ref": "#/$defs/SystemSourceKey"
        },
        "designator": {
          "$ref": "#/$defs/NullableText"
        }
      },
      "required": [
        "source_key",
        "owner_source_key",
        "designator"
      ],
      "unevaluatedProperties": {
        "not": {}
      }
    },
    "SystemPin": {
      "type": "object",
      "properties": {
        "source_key": {
          "$ref": "#/$defs/SystemSourceKey"
        },
        "entry_source_key": {
          "$ref": "#/$defs/NullableSystemSourceKey",
          "description": "Effective native entry association; original maps are not asserted inverses."
        },
        "pin_number": {
          "$ref": "#/$defs/NullableText"
        },
        "pin_name": {
          "$ref": "#/$defs/NullableText"
        },
        "snapshot_name": {
          "$ref": "#/$defs/NullableText"
        },
        "resolved_snapshot_name": {
          "$ref": "#/$defs/NullableText"
        },
        "child_binding": {
          "$ref": "#/$defs/ChildBinding"
        },
        "system_net_binding": {
          "$ref": "#/$defs/NetBinding"
        }
      },
      "required": [
        "source_key",
        "entry_source_key",
        "pin_number",
        "pin_name",
        "snapshot_name",
        "resolved_snapshot_name",
        "child_binding",
        "system_net_binding"
      ],
      "unevaluatedProperties": {
        "not": {}
      }
    },
    "SystemConnection": {
      "type": "object",
      "properties": {
        "source_key": {
          "$ref": "#/$defs/SystemSourceKey"
        },
        "designator": {
          "$ref": "#/$defs/NullableText"
        }
      },
      "required": [
        "source_key",
        "designator"
      ],
      "unevaluatedProperties": {
        "not": {}
      }
    },
    "PhysicalConnection": {
      "type": "object",
      "properties": {
        "source_key": {
          "$ref": "#/$defs/SystemSourceKey"
        },
        "connection_source_key": {
          "$ref": "#/$defs/SystemSourceKey"
        }
      },
      "required": [
        "source_key",
        "connection_source_key"
      ],
      "unevaluatedProperties": {
        "not": {}
      }
    },
    "SystemLink": {
      "type": "object",
      "properties": {
        "source_key": {
          "$ref": "#/$defs/SystemSourceKey"
        },
        "physical_connection_source_key": {
          "$ref": "#/$defs/SystemSourceKey"
        },
        "endpoints": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/LinkEndpoint"
          },
          "minItems": 2,
          "maxItems": 2
        },
        "defined_name": {
          "$ref": "#/$defs/NullableName"
        },
        "derived_name": {
          "$ref": "#/$defs/NullableName"
        },
        "system_net_binding": {
          "$ref": "#/$defs/NetBinding"
        }
      },
      "required": [
        "source_key",
        "physical_connection_source_key",
        "endpoints",
        "defined_name",
        "derived_name",
        "system_net_binding"
      ],
      "unevaluatedProperties": {
        "not": {}
      }
    },
    "SystemDrawingAssociation": {
      "type": "object",
      "properties": {
        "drawing_source_key": {
          "$ref": "#/$defs/SystemDrawingSourceKey"
        },
        "logical_source_keys": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/SystemSourceKey"
          }
        },
        "issues": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/LocalIssue"
          }
        }
      },
      "required": [
        "drawing_source_key",
        "logical_source_keys",
        "issues"
      ],
      "unevaluatedProperties": {
        "not": {}
      },
      "description": "Native drawing binder evidence, not geometry or canonical electrical membership."
    },
    "SignedInt64": {
      "type": "integer",
      "description": "Signed 64-bit JSON integer shared by schema and Rust boundaries.",
      "x-altium-monkey-signed-integer-width": 64,
      "minimum": -9223372036854775808,
      "maximum": 9223372036854775807
    },
    "CompilationPageParent": {
      "type": "object",
      "properties": {
        "page_ref": {
          "$ref": "#/$defs/CompilationIdentity"
        },
        "sheet_symbol": {
          "$ref": "#/$defs/CompilationSourceEvidence"
        }
      },
      "required": [
        "page_ref",
        "sheet_symbol"
      ],
      "unevaluatedProperties": {
        "not": {}
      }
    },
    "CompilationAltiumPage": {
      "type": "object",
      "properties": {
        "physical_instance_path": {
          "type": "string"
        },
        "channel_index": {
          "$ref": "#/$defs/SignedInt64"
        },
        "channel_prefix": {
          "type": "string"
        },
        "channel_alpha": {
          "type": "string"
        },
        "room_name": {
          "type": "string"
        },
        "physical_room_name": {
          "type": "string"
        },
        "document_number": {
          "type": "string"
        }
      },
      "required": [
        "physical_instance_path",
        "channel_index",
        "channel_prefix",
        "channel_alpha",
        "room_name",
        "physical_room_name",
        "document_number"
      ],
      "unevaluatedProperties": {
        "not": {}
      }
    },
    "CompilationSourceEvidence": {
      "anyOf": [
        {
          "$ref": "#/$defs/CompilationExactSource"
        },
        {
          "$ref": "#/$defs/CompilationUnavailableSource"
        },
        {
          "$ref": "#/$defs/CompilationAmbiguousSource"
        }
      ]
    },
    "InstanceBinding": {
      "anyOf": [
        {
          "$ref": "#/$defs/ExactInstance"
        },
        {
          "$ref": "#/$defs/Unresolved"
        },
        {
          "$ref": "#/$defs/Ambiguous"
        },
        {
          "$ref": "#/$defs/NotApplicable"
        }
      ]
    },
    "CompilationAuthoredComponent": {
      "type": "object",
      "properties": {
        "designator": {
          "type": "string"
        },
        "value": {
          "type": "string"
        },
        "description": {
          "type": "string"
        },
        "library_ref": {
          "type": "string"
        },
        "footprint": {
          "type": "string"
        },
        "parameters": {
          "$ref": "#/$defs/CompilationParameters"
        }
      },
      "required": [
        "designator",
        "value",
        "description",
        "library_ref",
        "footprint",
        "parameters"
      ],
      "unevaluatedProperties": {
        "not": {}
      }
    },
    "CompilationContactRole": {
      "anyOf": [
        {
          "type": "string",
          "const": "component_pin"
        },
        {
          "type": "string",
          "const": "port"
        },
        {
          "type": "string",
          "const": "sheet_entry"
        },
        {
          "type": "string",
          "const": "harness_entry"
        },
        {
          "type": "string",
          "const": "power_port"
        }
      ]
    },
    "CompilationTerminalBinding": {
      "anyOf": [
        {
          "$ref": "#/$defs/CompilationExactTerminal"
        },
        {
          "$ref": "#/$defs/Unresolved"
        },
        {
          "$ref": "#/$defs/Ambiguous"
        },
        {
          "$ref": "#/$defs/NotApplicable"
        }
      ]
    },
    "NetBinding": {
      "anyOf": [
        {
          "$ref": "#/$defs/ExactNet"
        },
        {
          "$ref": "#/$defs/Unresolved"
        },
        {
          "$ref": "#/$defs/Ambiguous"
        },
        {
          "$ref": "#/$defs/NotApplicable"
        }
      ]
    },
    "CompilationPositionMode": {
      "anyOf": [
        {
          "type": "string",
          "const": "altium-pick-place"
        },
        {
          "type": "string",
          "const": "component-origin"
        }
      ]
    },
    "CompilationBoardPlacement": {
      "type": "object",
      "properties": {
        "designator": {
          "type": "string"
        },
        "value": {
          "type": "string"
        },
        "footprint": {
          "type": "string"
        },
        "description": {
          "type": "string"
        },
        "parameters": {
          "$ref": "#/$defs/CompilationParameters"
        },
        "layer": {
          "type": "string"
        },
        "center_x": {
          "type": "number"
        },
        "center_y": {
          "type": "number"
        },
        "rotation": {
          "type": "number"
        },
        "instance_binding": {
          "$ref": "#/$defs/InstanceBinding"
        }
      },
      "required": [
        "designator",
        "value",
        "footprint",
        "description",
        "parameters",
        "layer",
        "center_x",
        "center_y",
        "rotation",
        "instance_binding"
      ],
      "unevaluatedProperties": {
        "not": {}
      }
    },
    "CompilationCoverageArea": {
      "anyOf": [
        {
          "type": "string",
          "const": "components"
        },
        {
          "type": "string",
          "const": "terminals"
        },
        {
          "type": "string",
          "const": "schematic"
        },
        {
          "type": "string",
          "const": "variants"
        },
        {
          "type": "string",
          "const": "boards"
        }
      ]
    },
    "CompilationAdmissionBody": {
      "type": "object",
      "properties": {
        "physical_document_key": {
          "type": "string",
          "minLength": 1
        },
        "source": {
          "$ref": "#/$defs/CompilationSourceEvidence"
        }
      },
      "required": [
        "physical_document_key",
        "source"
      ],
      "unevaluatedProperties": {
        "not": {}
      },
      "description": "Failed admission facts have no identity, membership or mutation target."
    },
    "SchematicSourceKey": {
      "type": "object",
      "properties": {
        "kind": {
          "type": "string",
          "const": "schematic"
        },
        "document_path": {
          "type": "string"
        },
        "locator": {
          "$ref": "#/$defs/OwnedSourceLocator"
        }
      },
      "required": [
        "kind",
        "document_path",
        "locator"
      ],
      "unevaluatedProperties": {
        "not": {}
      }
    },
    "SystemSourceKey": {
      "type": "object",
      "properties": {
        "kind": {
          "type": "string",
          "const": "system"
        },
        "document_path": {
          "type": "string"
        },
        "object_kind": {
          "$ref": "#/$defs/SystemObjectKind"
        },
        "owner_path": {
          "type": "array",
          "items": {
            "type": "integer",
            "minimum": -2147483648,
            "maximum": 2147483647
          },
          "minItems": 1
        }
      },
      "required": [
        "kind",
        "document_path",
        "object_kind",
        "owner_path"
      ],
      "unevaluatedProperties": {
        "not": {}
      }
    },
    "SystemDrawingSourceKey": {
      "type": "object",
      "properties": {
        "kind": {
          "type": "string",
          "const": "system_drawing"
        },
        "document_path": {
          "type": "string"
        },
        "page_member": {
          "type": "string"
        },
        "item_id": {
          "type": "integer",
          "minimum": -2147483648,
          "maximum": 2147483647
        }
      },
      "required": [
        "kind",
        "document_path",
        "page_member",
        "item_id"
      ],
      "unevaluatedProperties": {
        "not": {}
      },
      "description": "Authored MBS drawing item, distinct from a logical pin or connection."
    },
    "KnownNamingOrigin": {
      "type": "object",
      "properties": {
        "status": {
          "type": "string",
          "const": "known"
        },
        "kind": {
          "$ref": "#/$defs/NamingOriginKind",
          "description": "Origin of original_name before any retained override, not auto_named."
        },
        "winning_field": {
          "$ref": "#/$defs/LocalWinningField",
          "description": "Present only when the actual resolver selected this exact source field."
        }
      },
      "required": [
        "status",
        "kind"
      ],
      "unevaluatedProperties": {
        "not": {}
      }
    },
    "UnavailableNamingOrigin": {
      "type": "object",
      "properties": {
        "status": {
          "type": "string",
          "const": "unavailable"
        },
        "reason": {
          "$ref": "#/$defs/Reason"
        }
      },
      "required": [
        "status",
        "reason"
      ],
      "unevaluatedProperties": {
        "not": {}
      }
    },
    "KnownCompileContext": {
      "type": "object",
      "properties": {
        "status": {
          "type": "string",
          "const": "known"
        },
        "hierarchy_mode": {
          "type": "string",
          "description": "Existing compiler spelling, including STRICT_HIERARCHICAL and raw modes."
        },
        "hierarchy_mode_value": {
          "type": "integer",
          "minimum": -2147483648,
          "maximum": 2147483647
        },
        "effective_hierarchy_mode": {
          "type": "string"
        },
        "allow_port_net_names": {
          "type": "boolean"
        },
        "allow_sheet_entry_net_names": {
          "type": "boolean"
        },
        "netlist_single_pin_nets": {
          "type": "boolean"
        },
        "append_sheet_number_to_local_nets": {
          "type": "boolean"
        },
        "power_port_names_take_priority": {
          "type": "boolean"
        },
        "name_nets_hierarchically": {
          "type": "boolean"
        },
        "auto_sheet_numbering": {
          "type": "boolean"
        },
        "allow_device_sheet_editing": {
          "type": "boolean"
        },
        "channel_designator_format": {
          "type": "string"
        },
        "channel_room_naming_style": {
          "type": "integer",
          "minimum": -2147483648,
          "maximum": 2147483647
        },
        "channel_room_level_separator": {
          "type": "string"
        },
        "new_indexing_of_sheet_symbols": {
          "type": "boolean"
        },
        "reorder_documents_on_compile": {
          "type": "boolean"
        },
        "push_eco_to_annotation_file": {
          "type": "boolean"
        },
        "deferred_options": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "Actual compiler-deferred inputs; these are not active scope options."
        }
      },
      "required": [
        "status",
        "hierarchy_mode",
        "hierarchy_mode_value",
        "effective_hierarchy_mode",
        "allow_port_net_names",
        "allow_sheet_entry_net_names",
        "netlist_single_pin_nets",
        "append_sheet_number_to_local_nets",
        "power_port_names_take_priority",
        "name_nets_hierarchically",
        "auto_sheet_numbering",
        "allow_device_sheet_editing",
        "channel_designator_format",
        "channel_room_naming_style",
        "channel_room_level_separator",
        "new_indexing_of_sheet_symbols",
        "reorder_documents_on_compile",
        "push_eco_to_annotation_file",
        "deferred_options"
      ],
      "unevaluatedProperties": {
        "not": {}
      },
      "description": "Frozen resolved options already owned by AltiumProjectCompileOptions."
    },
    "UnavailableCompileContext": {
      "type": "object",
      "properties": {
        "status": {
          "type": "string",
          "const": "unavailable"
        },
        "reason": {
          "$ref": "#/$defs/Reason"
        }
      },
      "required": [
        "status",
        "reason"
      ],
      "unevaluatedProperties": {
        "not": {}
      }
    },
    "NameField": {
      "anyOf": [
        {
          "type": "string",
          "const": "Name"
        },
        {
          "type": "string",
          "const": "Text"
        }
      ],
      "description": "Authored naming field families. Record-kind checks remain semantic."
    },
    "CompilationFieldContext": {
      "type": "object",
      "properties": {
        "physical_document_key": {
          "type": "string",
          "minLength": 1
        },
        "net_ref": {
          "$ref": "#/$defs/CompilationIdentity"
        },
        "effective_value": {
          "type": "string"
        },
        "removed": {
          "type": "boolean"
        }
      },
      "required": [
        "physical_document_key",
        "net_ref",
        "effective_value",
        "removed"
      ],
      "unevaluatedProperties": {
        "not": {}
      }
    },
    "LocalElectricalTarget": {
      "anyOf": [
        {
          "$ref": "#/$defs/LocalNetTarget"
        },
        {
          "$ref": "#/$defs/LocalTerminalTarget"
        },
        {
          "$ref": "#/$defs/LocalInstanceTarget"
        }
      ]
    },
    "NullableIdentity": {
      "anyOf": [
        {
          "$ref": "#/$defs/Identity"
        },
        {
          "type": "null"
        }
      ]
    },
    "NullableSystemSourceKey": {
      "anyOf": [
        {
          "$ref": "#/$defs/SystemSourceKey"
        },
        {
          "type": "null"
        }
      ]
    },
    "ChildBinding": {
      "anyOf": [
        {
          "$ref": "#/$defs/ExactChildTerminal"
        },
        {
          "$ref": "#/$defs/Unresolved"
        },
        {
          "$ref": "#/$defs/Ambiguous"
        },
        {
          "$ref": "#/$defs/NotApplicable"
        }
      ]
    },
    "LinkEndpoint": {
      "anyOf": [
        {
          "$ref": "#/$defs/PresentEndpoint"
        },
        {
          "$ref": "#/$defs/NoPinEndpoint"
        },
        {
          "$ref": "#/$defs/UnresolvedEndpoint"
        },
        {
          "$ref": "#/$defs/AmbiguousEndpoint"
        }
      ]
    },
    "NullableName": {
      "anyOf": [
        {
          "$ref": "#/$defs/NonemptyName"
        },
        {
          "type": "null"
        }
      ]
    },
    "CompilationExactSource": {
      "type": "object",
      "properties": {
        "status": {
          "type": "string",
          "const": "exact"
        },
        "source_key": {
          "$ref": "#/$defs/SchematicSourceKey"
        }
      },
      "required": [
        "status",
        "source_key"
      ],
      "unevaluatedProperties": {
        "not": {}
      }
    },
    "CompilationUnavailableSource": {
      "type": "object",
      "properties": {
        "status": {
          "type": "string",
          "const": "unavailable"
        },
        "document_path": {
          "type": "string"
        },
        "record_kind": {
          "$ref": "#/$defs/RecordKind"
        },
        "observed_unique_id": {
          "$ref": "#/$defs/CompilationNullableText"
        },
        "reason": {
          "$ref": "#/$defs/CompilationReason"
        }
      },
      "required": [
        "status",
        "document_path",
        "record_kind",
        "observed_unique_id",
        "reason"
      ],
      "unevaluatedProperties": {
        "not": {}
      }
    },
    "CompilationAmbiguousSource": {
      "type": "object",
      "properties": {
        "status": {
          "type": "string",
          "const": "ambiguous"
        },
        "document_path": {
          "type": "string"
        },
        "record_kind": {
          "$ref": "#/$defs/RecordKind"
        },
        "observed_unique_id": {
          "$ref": "#/$defs/CompilationNullableText"
        },
        "reason": {
          "$ref": "#/$defs/CompilationReason"
        }
      },
      "required": [
        "status",
        "document_path",
        "record_kind",
        "observed_unique_id",
        "reason"
      ],
      "unevaluatedProperties": {
        "not": {}
      }
    },
    "ExactInstance": {
      "type": "object",
      "properties": {
        "status": {
          "type": "string",
          "const": "exact"
        },
        "instance_ref": {
          "$ref": "#/$defs/Identity"
        }
      },
      "required": [
        "status",
        "instance_ref"
      ],
      "unevaluatedProperties": {
        "not": {}
      }
    },
    "Unresolved": {
      "type": "object",
      "properties": {
        "status": {
          "type": "string",
          "const": "unresolved"
        },
        "reason": {
          "$ref": "#/$defs/Reason"
        }
      },
      "required": [
        "status",
        "reason"
      ],
      "unevaluatedProperties": {
        "not": {}
      }
    },
    "Ambiguous": {
      "type": "object",
      "properties": {
        "status": {
          "type": "string",
          "const": "ambiguous"
        },
        "reason": {
          "$ref": "#/$defs/Reason"
        }
      },
      "required": [
        "status",
        "reason"
      ],
      "unevaluatedProperties": {
        "not": {}
      }
    },
    "NotApplicable": {
      "type": "object",
      "properties": {
        "status": {
          "type": "string",
          "const": "not_applicable"
        },
        "reason": {
          "$ref": "#/$defs/Reason"
        }
      },
      "required": [
        "status",
        "reason"
      ],
      "unevaluatedProperties": {
        "not": {}
      }
    },
    "CompilationExactTerminal": {
      "type": "object",
      "properties": {
        "status": {
          "type": "string",
          "const": "exact"
        },
        "terminal_ref": {
          "$ref": "#/$defs/CompilationIdentity"
        }
      },
      "required": [
        "status",
        "terminal_ref"
      ],
      "unevaluatedProperties": {
        "not": {}
      }
    },
    "ExactNet": {
      "type": "object",
      "properties": {
        "status": {
          "type": "string",
          "const": "exact"
        },
        "net_ref": {
          "$ref": "#/$defs/Identity"
        }
      },
      "required": [
        "status",
        "net_ref"
      ],
      "unevaluatedProperties": {
        "not": {}
      }
    },
    "OwnedSourceLocator": {
      "anyOf": [
        {
          "$ref": "#/$defs/PersistedUidLocator"
        },
        {
          "$ref": "#/$defs/SourceOrdinalLocator"
        }
      ]
    },
    "SystemObjectKind": {
      "anyOf": [
        {
          "type": "string",
          "const": "module"
        },
        {
          "type": "string",
          "const": "entry"
        },
        {
          "type": "string",
          "const": "pin"
        },
        {
          "type": "string",
          "const": "connection"
        },
        {
          "type": "string",
          "const": "physical_connection"
        },
        {
          "type": "string",
          "const": "pin_pair"
        }
      ],
      "description": "Native logical kinds already admitted by the System source inventory."
    },
    "NamingOriginKind": {
      "anyOf": [
        {
          "type": "string",
          "const": "authored"
        },
        {
          "type": "string",
          "const": "generated"
        },
        {
          "type": "string",
          "const": "derived"
        }
      ]
    },
    "LocalWinningField": {
      "type": "object",
      "properties": {
        "source_key": {
          "$ref": "#/$defs/SchematicSourceKey"
        },
        "field": {
          "$ref": "#/$defs/NameField"
        }
      },
      "required": [
        "source_key",
        "field"
      ],
      "unevaluatedProperties": {
        "not": {}
      },
      "description": "Exact source field selected by a retained naming decision, not value equality."
    },
    "LocalNetTarget": {
      "type": "object",
      "properties": {
        "kind": {
          "type": "string",
          "const": "net"
        },
        "net_ref": {
          "$ref": "#/$defs/Identity"
        }
      },
      "required": [
        "kind",
        "net_ref"
      ],
      "unevaluatedProperties": {
        "not": {}
      }
    },
    "LocalTerminalTarget": {
      "type": "object",
      "properties": {
        "kind": {
          "type": "string",
          "const": "terminal"
        },
        "terminal_ref": {
          "$ref": "#/$defs/Identity"
        }
      },
      "required": [
        "kind",
        "terminal_ref"
      ],
      "unevaluatedProperties": {
        "not": {}
      }
    },
    "LocalInstanceTarget": {
      "type": "object",
      "properties": {
        "kind": {
          "type": "string",
          "const": "instance"
        },
        "instance_ref": {
          "$ref": "#/$defs/Identity"
        }
      },
      "required": [
        "kind",
        "instance_ref"
      ],
      "unevaluatedProperties": {
        "not": {}
      }
    },
    "ExactChildTerminal": {
      "type": "object",
      "properties": {
        "status": {
          "type": "string",
          "const": "exact"
        },
        "target": {
          "$ref": "#/$defs/ChildTerminalTarget"
        }
      },
      "required": [
        "status",
        "target"
      ],
      "unevaluatedProperties": {
        "not": {}
      }
    },
    "PresentEndpoint": {
      "type": "object",
      "properties": {
        "status": {
          "type": "string",
          "const": "present"
        },
        "source_key": {
          "$ref": "#/$defs/SystemSourceKey"
        }
      },
      "required": [
        "status",
        "source_key"
      ],
      "unevaluatedProperties": {
        "not": {}
      }
    },
    "NoPinEndpoint": {
      "type": "object",
      "properties": {
        "status": {
          "type": "string",
          "const": "no_pin"
        }
      },
      "required": [
        "status"
      ],
      "unevaluatedProperties": {
        "not": {}
      }
    },
    "UnresolvedEndpoint": {
      "type": "object",
      "properties": {
        "status": {
          "type": "string",
          "const": "unresolved"
        },
        "source_pin_id": {
          "$ref": "#/$defs/NullableNativePinId"
        },
        "reason": {
          "$ref": "#/$defs/Reason"
        }
      },
      "required": [
        "status",
        "source_pin_id",
        "reason"
      ],
      "unevaluatedProperties": {
        "not": {}
      },
      "description": "A missing/null native side is distinct from the persisted NoPin sentinel."
    },
    "AmbiguousEndpoint": {
      "type": "object",
      "properties": {
        "status": {
          "type": "string",
          "const": "ambiguous"
        },
        "source_pin_id": {
          "type": "integer",
          "minimum": -2147483648,
          "maximum": 2147483647
        },
        "reason": {
          "$ref": "#/$defs/Reason"
        }
      },
      "required": [
        "status",
        "source_pin_id",
        "reason"
      ],
      "unevaluatedProperties": {
        "not": {}
      }
    },
    "NonemptyName": {
      "type": "string",
      "minLength": 1
    },
    "RecordKind": {
      "anyOf": [
        {
          "type": "string",
          "const": "line"
        },
        {
          "type": "string",
          "const": "rectangle"
        },
        {
          "type": "string",
          "const": "round_rectangle"
        },
        {
          "type": "string",
          "const": "ellipse"
        },
        {
          "type": "string",
          "const": "arc"
        },
        {
          "type": "string",
          "const": "elliptical_arc"
        },
        {
          "type": "string",
          "const": "polygon"
        },
        {
          "type": "string",
          "const": "polyline"
        },
        {
          "type": "string",
          "const": "bezier"
        },
        {
          "type": "string",
          "const": "pie_chart"
        },
        {
          "type": "string",
          "const": "component"
        },
        {
          "type": "string",
          "const": "pin"
        },
        {
          "type": "string",
          "const": "ieee_symbol"
        },
        {
          "type": "string",
          "const": "label"
        },
        {
          "type": "string",
          "const": "parameter"
        },
        {
          "type": "string",
          "const": "designator"
        },
        {
          "type": "string",
          "const": "image"
        },
        {
          "type": "string",
          "const": "note"
        },
        {
          "type": "string",
          "const": "text_frame"
        },
        {
          "type": "string",
          "const": "wire"
        },
        {
          "type": "string",
          "const": "bus"
        },
        {
          "type": "string",
          "const": "bus_entry"
        },
        {
          "type": "string",
          "const": "junction"
        },
        {
          "type": "string",
          "const": "net_label"
        },
        {
          "type": "string",
          "const": "power_port"
        },
        {
          "type": "string",
          "const": "port"
        },
        {
          "type": "string",
          "const": "no_erc"
        },
        {
          "type": "string",
          "const": "sheet_symbol"
        },
        {
          "type": "string",
          "const": "sheet_entry"
        },
        {
          "type": "string",
          "const": "sheet"
        },
        {
          "type": "string",
          "const": "sheet_name"
        },
        {
          "type": "string",
          "const": "file_name"
        },
        {
          "type": "string",
          "const": "implementation_list"
        },
        {
          "type": "string",
          "const": "implementation"
        },
        {
          "type": "string",
          "const": "map_definer"
        },
        {
          "type": "string",
          "const": "harness_connector"
        },
        {
          "type": "string",
          "const": "harness_entry"
        },
        {
          "type": "string",
          "const": "harness_type"
        },
        {
          "type": "string",
          "const": "signal_harness"
        },
        {
          "type": "string",
          "const": "harness_splice"
        },
        {
          "type": "string",
          "const": "harness_layout_label"
        },
        {
          "type": "string",
          "const": "harness_layout_connection_point"
        },
        {
          "type": "string",
          "const": "harness_bundle"
        },
        {
          "type": "string",
          "const": "harness_covering"
        },
        {
          "type": "string",
          "const": "template"
        },
        {
          "type": "string",
          "const": "parameter_set"
        },
        {
          "type": "string",
          "const": "compile_mask"
        },
        {
          "type": "string",
          "const": "blanket"
        },
        {
          "type": "string",
          "const": "hyperlink"
        },
        {
          "type": "string",
          "const": "file_header"
        },
        {
          "type": "string",
          "const": "map_definer_list"
        },
        {
          "type": "string",
          "const": "impl_params"
        }
      ]
    },
    "PersistedUidLocator": {
      "type": "object",
      "properties": {
        "kind": {
          "type": "string",
          "const": "persisted_uid"
        },
        "owner_source_key": {
          "$ref": "#/$defs/NullableSourceKey"
        },
        "record_kind": {
          "$ref": "#/$defs/RecordKind"
        },
        "unique_id": {
          "type": "string"
        }
      },
      "required": [
        "kind",
        "owner_source_key",
        "record_kind",
        "unique_id"
      ],
      "unevaluatedProperties": {
        "not": {}
      }
    },
    "SourceOrdinalLocator": {
      "type": "object",
      "properties": {
        "kind": {
          "type": "string",
          "const": "source_ordinal"
        },
        "owner_source_key": {
          "$ref": "#/$defs/NullableSourceKey"
        },
        "record_kind": {
          "$ref": "#/$defs/RecordKind"
        },
        "source_ordinal": {
          "$ref": "#/$defs/Nat"
        }
      },
      "required": [
        "kind",
        "owner_source_key",
        "record_kind",
        "source_ordinal"
      ],
      "unevaluatedProperties": {
        "not": {}
      }
    },
    "ChildTerminalTarget": {
      "type": "object",
      "properties": {
        "instance_path": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/Identity"
          }
        },
        "terminal_ref": {
          "$ref": "#/$defs/Identity"
        }
      },
      "required": [
        "instance_path",
        "terminal_ref"
      ],
      "unevaluatedProperties": {
        "not": {}
      },
      "description": "Stored child path is anchored at its owning System definition."
    },
    "NullableNativePinId": {
      "anyOf": [
        {
          "type": "integer",
          "minimum": -2147483648,
          "maximum": 2147483647
        },
        {
          "type": "null"
        }
      ],
      "description": "Raw native nullable pin side; the NoPin sentinel has its own endpoint kind."
    },
    "NullableSourceKey": {
      "anyOf": [
        {
          "$ref": "#/$defs/SourceKey"
        },
        {
          "type": "null"
        }
      ]
    },
    "Nat": {
      "type": "integer",
      "minimum": 0,
      "maximum": 9007199254740991,
      "description": "JSON-safe nonnegative integer."
    },
    "SourceKey": {
      "type": "string",
      "pattern": "^source:sha256:[0-9a-f]{64}$",
      "description": "Document-scoped source identity digest."
    }
  }
}
