"""Pure-domain helpers extracted from VManager's ``operations`` package.

Wave 1 of the mgf-vm-core extraction. This subpackage holds ONLY the
side-effect-free pieces of the backup/clone/migration/snapshot operations:

* :mod:`mgf.vm.core.operations.manifest` — the ``backup-manifest.json``
  schema (:class:`DiskEntry`, :class:`BackupManifest`) with its pure
  JSON (de)serialization.
* :mod:`mgf.vm.core.operations.clone_paths` — clone target-path derivation.
* :mod:`mgf.vm.core.operations.snapshot_flags` — snapshot flag encoding.
* :mod:`mgf.vm.core.operations.xml_rewrite` — domain-XML rewrite helpers
  that operate on an **already-parsed** ``Element`` injected by the
  adapter. No string parsing happens here — that is an adapter concern
  (see :mod:`mgf.vm.core.common.xml`).

The I/O-bound operation bodies (tarfile, qemu-img, mkdir, paramiko,
provider dispatch) stay in the adapter layer and are NOT ported here.
"""

from __future__ import annotations

from mgf.vm.core.operations.clone_paths import derive_clone_path
from mgf.vm.core.operations.manifest import (
    FORMAT_VERSION,
    MANIFEST_NAME,
    BackupManifest,
    DiskEntry,
)
from mgf.vm.core.operations.snapshot_flags import encode_flags
from mgf.vm.core.operations.xml_rewrite import (
    default_disk_target,
    find_parent,
    pair_disk_targets,
    rewrite_clone_domain,
    rewrite_restore_domain,
    strip_extra_whitespace,
)

__all__ = [
    "FORMAT_VERSION",
    "MANIFEST_NAME",
    "BackupManifest",
    "DiskEntry",
    "default_disk_target",
    "derive_clone_path",
    "encode_flags",
    "find_parent",
    "pair_disk_targets",
    "rewrite_clone_domain",
    "rewrite_restore_domain",
    "strip_extra_whitespace",
]
