from .stock import StockAgent
from .music import MusicAgent
from .insta import InstaAgent
from .realestate import RealestateAgent
from .lotto import LottoAgent
from .youtube import YouTubeResearchAgent
from .youtube_publisher import YoutubePublisherAgent

AGENT_REGISTRY = {}

def init_agents():
    AGENT_REGISTRY["stock"] = StockAgent()
    AGENT_REGISTRY["music"] = MusicAgent()
    AGENT_REGISTRY["insta"] = InstaAgent()
    AGENT_REGISTRY["realestate"] = RealestateAgent()
    AGENT_REGISTRY["lotto"] = LottoAgent()
    AGENT_REGISTRY["youtube"] = YouTubeResearchAgent()
    AGENT_REGISTRY["youtube_publisher"] = YoutubePublisherAgent()

def get_agent(agent_id: str):
    return AGENT_REGISTRY.get(agent_id)

def get_all_agent_states() -> list:
    return [
        {"agent_id": aid, "state": agent.state, "detail": agent.state_detail}
        for aid, agent in AGENT_REGISTRY.items()
    ]
