from __future__ import annotations

from collections.abc import Iterable

from app.core.agent.processes.base import AgentProcess


class ProcessRegistry:
    def __init__(self, processes: Iterable[AgentProcess]) -> None:
        self._items = {process.version: process for process in processes}

    def get(self, version: str) -> AgentProcess | None:
        return self._items.get(version)
