"""Compile a validated scene, and optionally a housing GLB, into a runtime package. Stage 2 and stage 5 deliverables (``docs/architecture/studio-3d-stages.md``). Offline only: this tool is what turns a Blender export and the legacy NPZ geometry into the ``.oryscene`` payload the runtime loads. It bakes the coordinate transform, the sampling table and the LOD once, so the runtime never repeats that work; it signs with a key from the build environment, so no signing key ever reaches a customer runtime. Until stage 2 lands, no package is produced and the exit code is non-zero, so a release script cannot ship a package that was never compiled. """ from __future__ import annotations import argparse import sys from pathlib import Path _STAGE = "stage 2 (asset contracts) and stage 5 (release protection)" def main(argv: list[str] | None = None) -> int: parser = argparse.ArgumentParser(description=__doc__.splitlines()[0]) parser.add_argument("--legacy-dir", type=Path, default=None, help="legacy NPZ export") parser.add_argument("--map", type=Path, default=None, help="run-time UV mapping (npz)") parser.add_argument("--housing", type=Path, default=None, help="housing GLB") parser.add_argument("--output", type=Path, required=True, help="package to write") parser.add_argument("--asset-id", default="finger-display") parser.add_argument("--version", default="0.0.0") args = parser.parse_args(argv) print( "not_implemented: " f"{_STAGE}. Would write {args.output} from " f"legacy={args.legacy_dir} map={args.map} housing={args.housing} " f"as {args.asset_id} {args.version}." ) return 2 if __name__ == "__main__": sys.exit(main())