from __future__ import annotations

from typing import Any

from flask import jsonify


def register(app) -> None:
    """Register the lightweight health endpoint on the Flask app."""

    @app.route("/api/healthz")
    def healthz() -> Any:
        """Return the basic liveness payload used by probes and tests."""

        return jsonify({"ok": True})
