# This file was auto-generated by Fern from our API Definition.

# isort: skip_file

import typing
from importlib import import_module

if typing.TYPE_CHECKING:
    from .types import (
        ActionResponse,
        ActiveSessionsResult,
        Annotations,
        AnnotationsAudienceItem,
        AudioContent,
        BashCommandStatus,
        BlobResourceContents,
        BrowserInfoResult,
        BrowserViewport,
        Button,
        CallToolResult,
        CallToolResultContentItem,
        CallToolResultContentItem_Audio,
        CallToolResultContentItem_Image,
        CallToolResultContentItem_Resource,
        CallToolResultContentItem_ResourceLink,
        CallToolResultContentItem_Text,
        ClickAction,
        ConsoleRecord,
        DoubleClickAction,
        DragToAction,
        EmbeddedResource,
        FileContentEncoding,
        FileFindResult,
        FileInfo,
        FileListResult,
        FileReadResult,
        FileReplaceResult,
        FileSearchResult,
        FileUploadResult,
        FileWriteResult,
        HotkeyAction,
        HttpValidationError,
        ImageContent,
        JupyterExecuteResponse,
        JupyterInfoResponse,
        JupyterOutput,
        KeyDownAction,
        KeyUpAction,
        ListToolsResult,
        MouseDownAction,
        MouseUpAction,
        MoveToAction,
        NodeJsExecuteResponse,
        NodeJsOutput,
        NodeJsRuntimeInfo,
        PingBody,
        PressAction,
        Resolution,
        Resource,
        ResourceLink,
        Response,
        ResponseActiveSessionsResult,
        ResponseBrowserInfoResult,
        ResponseCallToolResult,
        ResponseFileFindResult,
        ResponseFileListResult,
        ResponseFileReadResult,
        ResponseFileReplaceResult,
        ResponseFileSearchResult,
        ResponseFileUploadResult,
        ResponseFileWriteResult,
        ResponseJupyterExecuteResponse,
        ResponseJupyterInfoResponse,
        ResponseListStr,
        ResponseListToolsResult,
        ResponseNodeJsExecuteResponse,
        ResponseNodeJsRuntimeInfo,
        ResponseShellCommandResult,
        ResponseShellKillResult,
        ResponseShellViewResult,
        ResponseShellWaitResult,
        ResponseShellWriteResult,
        ResponseStrReplaceEditorResult,
        RightClickAction,
        SandboxResponse,
        ScrollAction,
        SessionInfo,
        ShellCommandResult,
        ShellKillResult,
        ShellViewResult,
        ShellWaitResult,
        ShellWriteResult,
        StrReplaceEditorResult,
        TextContent,
        TextResourceContents,
        Tool,
        ToolAnnotations,
        TypingAction,
        ValidationError,
        ValidationErrorLocItem,
    )
    from .errors import UnprocessableEntityError
    from . import browser, file, jupyter, mcp, nodejs, sandbox, shell
    from .browser import (
        Action,
        Action_Click,
        Action_DoubleClick,
        Action_DragTo,
        Action_Hotkey,
        Action_KeyDown,
        Action_KeyUp,
        Action_MouseDown,
        Action_MouseUp,
        Action_MoveTo,
        Action_Press,
        Action_RightClick,
        Action_Scroll,
        Action_Typing,
    )
    from .client import AsyncSandbox, Sandbox
    from .file import Command
_dynamic_imports: typing.Dict[str, str] = {
    "Action": ".browser",
    "ActionResponse": ".types",
    "Action_Click": ".browser",
    "Action_DoubleClick": ".browser",
    "Action_DragTo": ".browser",
    "Action_Hotkey": ".browser",
    "Action_KeyDown": ".browser",
    "Action_KeyUp": ".browser",
    "Action_MouseDown": ".browser",
    "Action_MouseUp": ".browser",
    "Action_MoveTo": ".browser",
    "Action_Press": ".browser",
    "Action_RightClick": ".browser",
    "Action_Scroll": ".browser",
    "Action_Typing": ".browser",
    "ActiveSessionsResult": ".types",
    "Annotations": ".types",
    "AnnotationsAudienceItem": ".types",
    "AsyncSandbox": ".client",
    "AudioContent": ".types",
    "BashCommandStatus": ".types",
    "BlobResourceContents": ".types",
    "BrowserInfoResult": ".types",
    "BrowserViewport": ".types",
    "Button": ".types",
    "CallToolResult": ".types",
    "CallToolResultContentItem": ".types",
    "CallToolResultContentItem_Audio": ".types",
    "CallToolResultContentItem_Image": ".types",
    "CallToolResultContentItem_Resource": ".types",
    "CallToolResultContentItem_ResourceLink": ".types",
    "CallToolResultContentItem_Text": ".types",
    "ClickAction": ".types",
    "Command": ".file",
    "ConsoleRecord": ".types",
    "DoubleClickAction": ".types",
    "DragToAction": ".types",
    "EmbeddedResource": ".types",
    "FileContentEncoding": ".types",
    "FileFindResult": ".types",
    "FileInfo": ".types",
    "FileListResult": ".types",
    "FileReadResult": ".types",
    "FileReplaceResult": ".types",
    "FileSearchResult": ".types",
    "FileUploadResult": ".types",
    "FileWriteResult": ".types",
    "HotkeyAction": ".types",
    "HttpValidationError": ".types",
    "ImageContent": ".types",
    "JupyterExecuteResponse": ".types",
    "JupyterInfoResponse": ".types",
    "JupyterOutput": ".types",
    "KeyDownAction": ".types",
    "KeyUpAction": ".types",
    "ListToolsResult": ".types",
    "MouseDownAction": ".types",
    "MouseUpAction": ".types",
    "MoveToAction": ".types",
    "NodeJsExecuteResponse": ".types",
    "NodeJsOutput": ".types",
    "NodeJsRuntimeInfo": ".types",
    "PingBody": ".types",
    "PressAction": ".types",
    "Resolution": ".types",
    "Resource": ".types",
    "ResourceLink": ".types",
    "Response": ".types",
    "ResponseActiveSessionsResult": ".types",
    "ResponseBrowserInfoResult": ".types",
    "ResponseCallToolResult": ".types",
    "ResponseFileFindResult": ".types",
    "ResponseFileListResult": ".types",
    "ResponseFileReadResult": ".types",
    "ResponseFileReplaceResult": ".types",
    "ResponseFileSearchResult": ".types",
    "ResponseFileUploadResult": ".types",
    "ResponseFileWriteResult": ".types",
    "ResponseJupyterExecuteResponse": ".types",
    "ResponseJupyterInfoResponse": ".types",
    "ResponseListStr": ".types",
    "ResponseListToolsResult": ".types",
    "ResponseNodeJsExecuteResponse": ".types",
    "ResponseNodeJsRuntimeInfo": ".types",
    "ResponseShellCommandResult": ".types",
    "ResponseShellKillResult": ".types",
    "ResponseShellViewResult": ".types",
    "ResponseShellWaitResult": ".types",
    "ResponseShellWriteResult": ".types",
    "ResponseStrReplaceEditorResult": ".types",
    "RightClickAction": ".types",
    "Sandbox": ".client",
    "SandboxResponse": ".types",
    "ScrollAction": ".types",
    "SessionInfo": ".types",
    "ShellCommandResult": ".types",
    "ShellKillResult": ".types",
    "ShellViewResult": ".types",
    "ShellWaitResult": ".types",
    "ShellWriteResult": ".types",
    "StrReplaceEditorResult": ".types",
    "TextContent": ".types",
    "TextResourceContents": ".types",
    "Tool": ".types",
    "ToolAnnotations": ".types",
    "TypingAction": ".types",
    "UnprocessableEntityError": ".errors",
    "ValidationError": ".types",
    "ValidationErrorLocItem": ".types",
    "browser": ".",
    "file": ".",
    "jupyter": ".",
    "mcp": ".",
    "nodejs": ".",
    "providers": ".",
    "sandbox": ".",
    "shell": ".",
}


def __getattr__(attr_name: str) -> typing.Any:
    module_name = _dynamic_imports.get(attr_name)
    if module_name is None:
        raise AttributeError(f"No {attr_name} found in _dynamic_imports for module name -> {__name__}")
    try:
        module = import_module(module_name, __package__)
        # If the module_name is ".", it means we're importing a submodule
        # In that case, return the module itself, not an attribute from it
        if module_name == ".":
            return module
        # Otherwise, try to get the attribute from the module
        result = getattr(module, attr_name)
        return result
    except ImportError as e:
        raise ImportError(f"Failed to import {attr_name} from {module_name}: {e}") from e
    except AttributeError as e:
        raise AttributeError(f"Failed to get {attr_name} from {module_name}: {e}") from e


def __dir__():
    lazy_attrs = list(_dynamic_imports.keys())
    return sorted(lazy_attrs)


__all__ = [
    "Action",
    "ActionResponse",
    "Action_Click",
    "Action_DoubleClick",
    "Action_DragTo",
    "Action_Hotkey",
    "Action_KeyDown",
    "Action_KeyUp",
    "Action_MouseDown",
    "Action_MouseUp",
    "Action_MoveTo",
    "Action_Press",
    "Action_RightClick",
    "Action_Scroll",
    "Action_Typing",
    "ActiveSessionsResult",
    "Annotations",
    "AnnotationsAudienceItem",
    "AsyncSandbox",
    "AudioContent",
    "BashCommandStatus",
    "BlobResourceContents",
    "BrowserInfoResult",
    "BrowserViewport",
    "Button",
    "CallToolResult",
    "CallToolResultContentItem",
    "CallToolResultContentItem_Audio",
    "CallToolResultContentItem_Image",
    "CallToolResultContentItem_Resource",
    "CallToolResultContentItem_ResourceLink",
    "CallToolResultContentItem_Text",
    "ClickAction",
    "Command",
    "ConsoleRecord",
    "DoubleClickAction",
    "DragToAction",
    "EmbeddedResource",
    "FileContentEncoding",
    "FileFindResult",
    "FileInfo",
    "FileListResult",
    "FileReadResult",
    "FileReplaceResult",
    "FileSearchResult",
    "FileUploadResult",
    "FileWriteResult",
    "HotkeyAction",
    "HttpValidationError",
    "ImageContent",
    "JupyterExecuteResponse",
    "JupyterInfoResponse",
    "JupyterOutput",
    "KeyDownAction",
    "KeyUpAction",
    "ListToolsResult",
    "MouseDownAction",
    "MouseUpAction",
    "MoveToAction",
    "NodeJsExecuteResponse",
    "NodeJsOutput",
    "NodeJsRuntimeInfo",
    "PingBody",
    "PressAction",
    "Resolution",
    "Resource",
    "ResourceLink",
    "Response",
    "ResponseActiveSessionsResult",
    "ResponseBrowserInfoResult",
    "ResponseCallToolResult",
    "ResponseFileFindResult",
    "ResponseFileListResult",
    "ResponseFileReadResult",
    "ResponseFileReplaceResult",
    "ResponseFileSearchResult",
    "ResponseFileUploadResult",
    "ResponseFileWriteResult",
    "ResponseJupyterExecuteResponse",
    "ResponseJupyterInfoResponse",
    "ResponseListStr",
    "ResponseListToolsResult",
    "ResponseNodeJsExecuteResponse",
    "ResponseNodeJsRuntimeInfo",
    "ResponseShellCommandResult",
    "ResponseShellKillResult",
    "ResponseShellViewResult",
    "ResponseShellWaitResult",
    "ResponseShellWriteResult",
    "ResponseStrReplaceEditorResult",
    "RightClickAction",
    "Sandbox",
    "SandboxResponse",
    "ScrollAction",
    "SessionInfo",
    "ShellCommandResult",
    "ShellKillResult",
    "ShellViewResult",
    "ShellWaitResult",
    "ShellWriteResult",
    "StrReplaceEditorResult",
    "TextContent",
    "TextResourceContents",
    "Tool",
    "ToolAnnotations",
    "TypingAction",
    "UnprocessableEntityError",
    "ValidationError",
    "ValidationErrorLocItem",
    "browser",
    "file",
    "jupyter",
    "mcp",
    "nodejs",
    "providers",
    "sandbox",
    "shell",
]
