27 lines
676 B
Python
27 lines
676 B
Python
|
|
"""Distributor registry (T03) — flavor -> distributor, the one place that knows
|
||
|
|
about all flavor edges. Adding a flavor = one entry here + one adapter module.
|
||
|
|
"""
|
||
|
|
|
||
|
|
from __future__ import annotations
|
||
|
|
|
||
|
|
from typing import Optional
|
||
|
|
|
||
|
|
from .base import BaseDistributor
|
||
|
|
from .claude import ClaudeDistributor
|
||
|
|
from .codex import CodexDistributor
|
||
|
|
from .grok import GrokDistributor
|
||
|
|
|
||
|
|
_REGISTRY: dict[str, BaseDistributor] = {
|
||
|
|
"claude": ClaudeDistributor(),
|
||
|
|
"codex": CodexDistributor(),
|
||
|
|
"grok": GrokDistributor(),
|
||
|
|
}
|
||
|
|
|
||
|
|
|
||
|
|
def get_distributor(flavor: str) -> Optional[BaseDistributor]:
|
||
|
|
return _REGISTRY.get(flavor)
|
||
|
|
|
||
|
|
|
||
|
|
def all_flavors() -> list[str]:
|
||
|
|
return list(_REGISTRY)
|