File size: 836 Bytes
32d14f4
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
"""Client for the BrainRL region selection environment."""

try:
    from openenv.core.mcp_client import MCPToolClient
except ImportError:  # pragma: no cover
    class MCPToolClient:  # type: ignore[no-redef]
        """Placeholder used when OpenEnv is not installed for local inspection."""

        def __init__(self, *args, **kwargs):
            raise ImportError("openenv-core is required to use BrainRegionSelectionClient")


class BrainRegionSelectionClient(MCPToolClient):
    """MCP client for BrainRL.

    Example:
        >>> async with BrainRegionSelectionClient(base_url="http://localhost:8000") as env:
        ...     await env.reset(task="roi_selection")
        ...     state = await env.call_tool("get_selection_state")
        ...     result = await env.call_tool("take_action", region_id="pSTS")
    """

    pass