from app.service.agent.bootstrap import get_agent_factory def test_financial_nl2sql_tool_is_registered_as_read_only() -> None: factory = get_agent_factory() tool = factory._tool_executor.registry.get("query_financial_data") assert tool.read_only is True assert tool.required_permission == "financial:nl2sql:read" assert "operator" in tool.allowed_roles assert "advisor" in tool.allowed_roles