feat(registry): añade factories para registry y policy_store

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
Juan
2026-05-10 10:40:16 +02:00
co-authored by Claude Opus 4.7
parent 5cbec0d5d8
commit b297f25e2c
@@ -0,0 +1,17 @@
"""Factories para AgentRegistry y PolicyStore basados en Settings."""
from __future__ import annotations
from agentforge_core.config import Settings
from agentforge_core.registry.policy_store import FileSystemPolicyStore
from agentforge_core.registry.repository import FileSystemAgentRegistry
def build_agent_registry(settings: Settings) -> FileSystemAgentRegistry:
"""Construye el registry de agentes apuntando a ``settings.agents_dir``."""
return FileSystemAgentRegistry(settings.agents_dir)
def build_policy_store(settings: Settings) -> FileSystemPolicyStore:
"""Construye el store de políticas apuntando a ``settings.policies_dir``."""
return FileSystemPolicyStore(settings.policies_dir)