#!/usr/bin/env python3
"""Generate baseline model file from upstream proto/spec hints.

The first iteration keeps models permissive and typed via DynamicPayload.
"""

from __future__ import annotations

from pathlib import Path

ROOT = Path(__file__).resolve().parents[1]
OUT = ROOT / "src/omni/generated/models.py"


def main() -> None:
    OUT.write_text(
        '''"""Generated baseline models.\n\nThis file is generated by scripts/generate_models.py.\n"""\n\nfrom __future__ import annotations\n\nfrom pydantic import BaseModel, ConfigDict\n\n\nclass GeneratedModel(BaseModel):\n    model_config = ConfigDict(extra=\"allow\")\n\n\nclass DynamicPayload(GeneratedModel):\n    pass\n''',
        encoding="utf-8",
    )
    print(f"wrote {OUT}")


if __name__ == "__main__":
    main()
