feat(maf): add secure roundtable workflow runtime

This commit is contained in:
董宏凯 committed 2026-08-01 17:51:53 +08:00
1 parent e690475e6e
commit bd4131b4e2
52 files changed
+10315 -96

No files matched your search

@@ -0,0 +1,33 @@
"""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(),
)