"""Provider registry (v3). get_provider(id) returns a Provider instance for the daemon to poll. Anthropic is real; OpenAI and z.ai return a StubProvider until M2/M3 land, so selecting them never crashes the loop. """ from __future__ import annotations from .base import Provider, ProviderStatus, StubProvider from .anthropic import AnthropicProvider # Brand accents / labels for the not-yet-implemented providers, so the stub still # carries the right theme hint to the watch once firmware theming lands. _STUB_META = { "openai": ("OpenAI Codex", "10a37f"), "zai": ("z.ai GLM", "3859ff"), } def get_provider(pid: str) -> Provider: if pid == "anthropic": return AnthropicProvider() label, accent = _STUB_META.get(pid, (pid, "d97757")) return StubProvider(pid, label=label, accent=accent) __all__ = ["Provider", "ProviderStatus", "StubProvider", "AnthropicProvider", "get_provider"]