# AUTO-GENERATED FILE — DO NOT EDIT
# Generated by scripts/generate_constants.py
# Source: schema/runtime_types.json (single source of truth)

"""Auto-generated runtime type constants from schema/runtime_types.json."""

from enum import Enum


class RuntimeType(Enum):
    """Supported runtime types (auto-generated from schema/runtime_types.json)."""

    PYTHON = "python"
    JAVASCRIPT = "javascript"
    RUST = "rust"
    C = "c"
    WASM = "wasm"
    LEAN = "lean"
    R = "r"
    JULIA = "julia"
    LLM = "llm"
    LAMBDA = "lambda"
    NETWORK = "network"
    LOADER = "loader"
    COLLECTION_LOADER = "collection_loader"


RUNTIME_ALIASES: dict[str, str] = {
    "node": "javascript",
    "js": "javascript",
    "py": "python",
    "ts": "javascript",
}
"""Maps shorthand names to canonical runtime IDs."""


def resolve_runtime_alias(name: str) -> str:
    """Resolve a runtime name through shared aliases.

    E.g., 'node' -> 'javascript', 'py' -> 'python'.
    """
    return RUNTIME_ALIASES.get(name.lower(), name.lower())
