from __future__ import annotations

from dataclasses import dataclass

from app.agents.registry.builtins import (
    BUILTIN_AGENT_MANIFESTS,
    BUILTIN_CAPABILITY_MANIFESTS,
    BUILTIN_SPECIALIST_TEMPLATE_MANIFESTS,
    BUILTIN_SUB_COMMANDER_MANIFESTS,
)
from app.agents.registry.models import (
    AgentManifest,
    CapabilityManifest,
    SpecialistTemplateManifest,
    SubCommanderManifest,
)


@dataclass(frozen=True)
class RegistryBundle:
    agents: tuple[AgentManifest, ...]
    sub_commanders: tuple[SubCommanderManifest, ...]
    capabilities: tuple[CapabilityManifest, ...]
    specialist_templates: tuple[SpecialistTemplateManifest, ...]


def load_builtin_registry_bundle() -> RegistryBundle:
    return RegistryBundle(
        agents=BUILTIN_AGENT_MANIFESTS,
        sub_commanders=BUILTIN_SUB_COMMANDER_MANIFESTS,
        capabilities=BUILTIN_CAPABILITY_MANIFESTS,
        specialist_templates=BUILTIN_SPECIALIST_TEMPLATE_MANIFESTS,
    )
