"""pmmanifest — generate PlayMolecule v2 app manifests from typed function signatures.

Public API:

* :data:`PMPath`, :class:`UI` — author-facing types (path-role string + UI marker).
* :func:`func_to_manifest`, :func:`build_app_manifest`, :func:`signature_to_inputs_model`
  — manifest generation (signature-first).
* :func:`serve` — live RJSF GUI preview.
* :func:`detect_dialect`, :func:`iter_path_values`, :func:`set_in`, :func:`resolve_ref`
  — the manifest-dialect contract shared with the execution backends.
"""

from ._types import PMPath, UI
from ._schema import (
    SPECIAL_DIR_ARGS,
    detect_dialect,
    iter_path_values,
    resolve_ref,
    set_in,
)
from ._generate import (
    build_app_manifest,
    func_to_entry,
    func_to_manifest,
    signature_to_inputs_model,
)
from ._serve import serve

try:  # version is provided by setuptools-scm at build time
    from importlib.metadata import PackageNotFoundError, version

    __version__ = version("acellera-pmmanifest")
except Exception:  # pragma: no cover
    __version__ = "0+unknown"

__all__ = [
    "PMPath",
    "UI",
    "func_to_entry",
    "func_to_manifest",
    "build_app_manifest",
    "signature_to_inputs_model",
    "serve",
    "detect_dialect",
    "iter_path_values",
    "set_in",
    "resolve_ref",
    "SPECIAL_DIR_ARGS",
    "__version__",
]
