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:
@@ -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)
|
||||||
Reference in New Issue
Block a user