from pathlib import Path

from agent_framework.mcp.tool_policy import ToolPolicyRegistry


def test_contas_tool_policies_accept_all_operation_types():
    root = Path(__file__).resolve().parents[2]
    registry = ToolPolicyRegistry(str(root / 'config' / 'tool_policies.yaml'))

    assert registry.get('cancelar_vas_avulso').operation_type == 'transactional'
    assert registry.get('contestar_cobranca').operation_type == 'transactional'
    assert registry.get('tratar_vas_estrategico').operation_type == 'conversational'
    assert registry.get('pro_rata').operation_type == 'conversational'
    assert registry.get('retomar_workflow').operation_type == 'internal'
    assert registry.defaults.operation_type == 'read_only'
