"""F3 — the libvirt domain-XML translation layer.

Three responsibilities, one per module:

* :mod:`mgf.vm.libvirt._xml.generate` — ``vmspec_to_xml(spec) -> str``:
  deterministic spec → domain XML (fixed element order, no virt-install).
* :mod:`mgf.vm.libvirt._xml.read` — ``xml_to_domaininfo(xml) -> DomainInfo``:
  live/defined domain XML → the core ``DomainInfo`` + state inference.
* :mod:`mgf.vm.libvirt._xml.compare` — ``semantic_equal(a, b) -> bool``:
  semantic XML equality for the define()-idempotency / SpecConflict gate.

Untrusted XML (anything that came back from libvirt or off disk) is
parsed with :mod:`defusedxml`; output is built with stdlib ElementTree.
"""

from __future__ import annotations

from mgf.vm.libvirt._xml.compare import canonicalize, semantic_equal
from mgf.vm.libvirt._xml.generate import vmspec_to_xml
from mgf.vm.libvirt._xml.read import xml_to_domaininfo

__all__ = [
    "canonicalize",
    "semantic_equal",
    "vmspec_to_xml",
    "xml_to_domaininfo",
]
