"""Shared helpers for MAF roundtable unit tests.""" from __future__ import annotations from typing import Any from app.maf_roundtable.service import MafRoundtableService from deerflow.config import get_app_config from deerflow.config.maf_roundtable_config import MafRoundtableConfig class FakeAgentStore: """Treat every agent id as visible to any user (tests only).""" async def get_visible(self, agent_id: str, user_id: str) -> dict[str, Any]: return {"id": agent_id, "user_id": user_id} def make_maf_service( store, *, enabled: bool = True, admin_diagnostic_access: bool = True, config: MafRoundtableConfig | None = None, ) -> MafRoundtableService: return MafRoundtableService( store, enabled=enabled, admin_diagnostic_access=admin_diagnostic_access, config=config, agent_store=FakeAgentStore(), app_config=get_app_config(), )