# 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 (
        AcpType,
        Agent,
        AgentApiKey,
        AgentApiKeyType,
        AgentInputType,
        AgentStatus,
        AgentTaskTracker,
        ApiKeyCreateResponse,
        ApiKeyListResponse,
        ApiKeyResponse,
        ApiKeyScope,
        ApiKeyScopeRole,
        AuthorizedOperationType,
        AuthzRequest,
        AuthzSearchResponse,
        BranchListResponse,
        BranchResponse,
        ClaudeMessageContent,
        CliRefreshResponse,
        CliTokenResponse,
        CreateApiKeyResponse,
        CrossEnvSecretResponse,
        CrossEnvSecretsListResponse,
        DataContent,
        DataDelta,
        DeleteEnvResponse,
        DeleteEnvVarResponse,
        DeleteResponse,
        DeployResponse,
        DeployedSecretKey,
        DeployedSecretsResponse,
        EnvListResponse,
        EnvResponse,
        EnvSecretInfo,
        EnvVarListResponse,
        EnvVarResponse,
        EnvVarValue,
        Event,
        FileAttachment,
        FilesystemFile,
        FilesystemFileResponse,
        FilesystemResponse,
        FilesystemStatus,
        HttpValidationError,
        ListFilesResponse,
        LogLevel,
        LogListResponse,
        LogQueryEntry,
        LogSource,
        MessageAuthor,
        MessageStyle,
        MetricsIngestionResponse,
        MigrateTasksResponse,
        Namespace,
        NamespaceStatus,
        OAuthInitiateResponse,
        OAuthTokenResponse,
        OrganizationResponse,
        OtlpAttribute,
        OtlpAttributeValue,
        OtlpBodyValue,
        OtlpLogIngestionResponse,
        OtlpLogRecord,
        OtlpResource,
        OtlpResourceLogs,
        OtlpScope,
        OtlpScopeLogs,
        PaginatedMessagesResponse,
        PauseScheduleRequest,
        PresignedUrlRequest,
        PresignedUrlResponse,
        PrincipalContextEntity,
        PrincipalRequest,
        Project,
        PublishStreamEventsResponse,
        ReasoningContent,
        ReasoningContentDelta,
        ReasoningSummaryDelta,
        RedeployResponse,
        RegisterContainerResponse,
        RegistryAuthResponse,
        ResolveEnvResponse,
        RevokeAllResponse,
        RollbackRequest,
        RollbackResponse,
        ScheduleActionInfo,
        ScheduleListItem,
        ScheduleListResponse,
        ScheduleResponse,
        ScheduleSpecInfo,
        ScheduleState,
        SdkType,
        SetEnvVarResponse,
        Span,
        State,
        StreamTaskMessageDelta,
        StreamTaskMessageDone,
        StreamTaskMessageFull,
        StreamTaskMessageStart,
        SyncCompleteResponse,
        SystemFolderResponse,
        SystemFolderSyncCompleteResponse,
        SystemFolderType,
        SystemFolderTypeResponse,
        Task,
        TaskMessage,
        TaskMessageContent,
        TaskMessageContent_ClaudeMessage,
        TaskMessageContent_Data,
        TaskMessageContent_Reasoning,
        TaskMessageContent_Text,
        TaskMessageContent_ToolRequest,
        TaskMessageContent_ToolResponse,
        TaskMessageDelta,
        TaskMessageDelta_Data,
        TaskMessageDelta_ReasoningContent,
        TaskMessageDelta_ReasoningSummary,
        TaskMessageDelta_Text,
        TaskMessageDelta_ToolRequest,
        TaskMessageDelta_ToolResponse,
        TaskMessageStreamingStatus,
        TaskMessageUpdate,
        TaskMessageUpdate_Delta,
        TaskMessageUpdate_Done,
        TaskMessageUpdate_Full,
        TaskMessageUpdate_Start,
        TaskRelationships,
        TaskResponse,
        TaskStatus,
        TerminalUseResource,
        TerminalUseResourceType,
        TextContent,
        TextDelta,
        TextFormat,
        ToolRequestContent,
        ToolRequestDelta,
        ToolResponseContent,
        ToolResponseDelta,
        TraceIngestionResponse,
        TupleMembershipRequest,
        TupleRoleRequest,
        UnpauseScheduleRequest,
        UpdateTaskRequest,
        ValidationError,
        ValidationErrorLocItem,
        VersionEventContent,
        VersionEventListResponse,
        VersionEventResponse,
        VersionEventTrigger,
        VersionEventType,
        VersionListResponse,
        VersionResponse,
        VersionStatus,
        VersionSummary,
    )
    from .errors import UnprocessableEntityError
    from . import (
        agent_api_keys,
        agents,
        api_keys,
        authentication,
        authorization_internal,
        branches,
        cli_authentication,
        events,
        filesystems,
        logs,
        messages,
        namespaces,
        o_auth,
        organizations,
        projects,
        registry,
        schedules,
        spans,
        states,
        stream,
        tasks,
        telemetry,
        tracker,
        version_events,
        versions,
    )
    from .client import AsyncTerminaluseApi, TerminaluseApi
    from ._client import AsyncTerminalUse, TerminalUse
    from .messages import (
        CreateTaskMessageRequestStreamingStatus,
        MessagesListPaginatedRequestDirection,
        UpdateTaskMessageRequestStreamingStatus,
    )
    from .version import __version__
_dynamic_imports: typing.Dict[str, str] = {
    "AcpType": ".types",
    "Agent": ".types",
    "AgentApiKey": ".types",
    "AgentApiKeyType": ".types",
    "AgentInputType": ".types",
    "AgentStatus": ".types",
    "AgentTaskTracker": ".types",
    "ApiKeyCreateResponse": ".types",
    "ApiKeyListResponse": ".types",
    "ApiKeyResponse": ".types",
    "ApiKeyScope": ".types",
    "ApiKeyScopeRole": ".types",
    "AsyncTerminalUse": "._client",
    "AsyncTerminaluseApi": ".client",
    "AuthorizedOperationType": ".types",
    "AuthzRequest": ".types",
    "AuthzSearchResponse": ".types",
    "BranchListResponse": ".types",
    "BranchResponse": ".types",
    "ClaudeMessageContent": ".types",
    "CliRefreshResponse": ".types",
    "CliTokenResponse": ".types",
    "CreateApiKeyResponse": ".types",
    "CreateTaskMessageRequestStreamingStatus": ".messages",
    "CrossEnvSecretResponse": ".types",
    "CrossEnvSecretsListResponse": ".types",
    "DataContent": ".types",
    "DataDelta": ".types",
    "DeleteEnvResponse": ".types",
    "DeleteEnvVarResponse": ".types",
    "DeleteResponse": ".types",
    "DeployResponse": ".types",
    "DeployedSecretKey": ".types",
    "DeployedSecretsResponse": ".types",
    "EnvListResponse": ".types",
    "EnvResponse": ".types",
    "EnvSecretInfo": ".types",
    "EnvVarListResponse": ".types",
    "EnvVarResponse": ".types",
    "EnvVarValue": ".types",
    "Event": ".types",
    "FileAttachment": ".types",
    "FilesystemFile": ".types",
    "FilesystemFileResponse": ".types",
    "FilesystemResponse": ".types",
    "FilesystemStatus": ".types",
    "HttpValidationError": ".types",
    "ListFilesResponse": ".types",
    "LogLevel": ".types",
    "LogListResponse": ".types",
    "LogQueryEntry": ".types",
    "LogSource": ".types",
    "MessageAuthor": ".types",
    "MessageStyle": ".types",
    "MessagesListPaginatedRequestDirection": ".messages",
    "MetricsIngestionResponse": ".types",
    "MigrateTasksResponse": ".types",
    "Namespace": ".types",
    "NamespaceStatus": ".types",
    "OAuthInitiateResponse": ".types",
    "OAuthTokenResponse": ".types",
    "OrganizationResponse": ".types",
    "OtlpAttribute": ".types",
    "OtlpAttributeValue": ".types",
    "OtlpBodyValue": ".types",
    "OtlpLogIngestionResponse": ".types",
    "OtlpLogRecord": ".types",
    "OtlpResource": ".types",
    "OtlpResourceLogs": ".types",
    "OtlpScope": ".types",
    "OtlpScopeLogs": ".types",
    "PaginatedMessagesResponse": ".types",
    "PauseScheduleRequest": ".types",
    "PresignedUrlRequest": ".types",
    "PresignedUrlResponse": ".types",
    "PrincipalContextEntity": ".types",
    "PrincipalRequest": ".types",
    "Project": ".types",
    "PublishStreamEventsResponse": ".types",
    "ReasoningContent": ".types",
    "ReasoningContentDelta": ".types",
    "ReasoningSummaryDelta": ".types",
    "RedeployResponse": ".types",
    "RegisterContainerResponse": ".types",
    "RegistryAuthResponse": ".types",
    "ResolveEnvResponse": ".types",
    "RevokeAllResponse": ".types",
    "RollbackRequest": ".types",
    "RollbackResponse": ".types",
    "ScheduleActionInfo": ".types",
    "ScheduleListItem": ".types",
    "ScheduleListResponse": ".types",
    "ScheduleResponse": ".types",
    "ScheduleSpecInfo": ".types",
    "ScheduleState": ".types",
    "SdkType": ".types",
    "SetEnvVarResponse": ".types",
    "Span": ".types",
    "State": ".types",
    "StreamTaskMessageDelta": ".types",
    "StreamTaskMessageDone": ".types",
    "StreamTaskMessageFull": ".types",
    "StreamTaskMessageStart": ".types",
    "SyncCompleteResponse": ".types",
    "SystemFolderResponse": ".types",
    "SystemFolderSyncCompleteResponse": ".types",
    "SystemFolderType": ".types",
    "SystemFolderTypeResponse": ".types",
    "Task": ".types",
    "TaskMessage": ".types",
    "TaskMessageContent": ".types",
    "TaskMessageContent_ClaudeMessage": ".types",
    "TaskMessageContent_Data": ".types",
    "TaskMessageContent_Reasoning": ".types",
    "TaskMessageContent_Text": ".types",
    "TaskMessageContent_ToolRequest": ".types",
    "TaskMessageContent_ToolResponse": ".types",
    "TaskMessageDelta": ".types",
    "TaskMessageDelta_Data": ".types",
    "TaskMessageDelta_ReasoningContent": ".types",
    "TaskMessageDelta_ReasoningSummary": ".types",
    "TaskMessageDelta_Text": ".types",
    "TaskMessageDelta_ToolRequest": ".types",
    "TaskMessageDelta_ToolResponse": ".types",
    "TaskMessageStreamingStatus": ".types",
    "TaskMessageUpdate": ".types",
    "TaskMessageUpdate_Delta": ".types",
    "TaskMessageUpdate_Done": ".types",
    "TaskMessageUpdate_Full": ".types",
    "TaskMessageUpdate_Start": ".types",
    "TaskRelationships": ".types",
    "TaskResponse": ".types",
    "TaskStatus": ".types",
    "TerminalUseResource": ".types",
    "TerminalUseResourceType": ".types",
    "TerminalUse": "._client",
    "TerminaluseApi": ".client",
    "TextContent": ".types",
    "TextDelta": ".types",
    "TextFormat": ".types",
    "ToolRequestContent": ".types",
    "ToolRequestDelta": ".types",
    "ToolResponseContent": ".types",
    "ToolResponseDelta": ".types",
    "TraceIngestionResponse": ".types",
    "TupleMembershipRequest": ".types",
    "TupleRoleRequest": ".types",
    "UnpauseScheduleRequest": ".types",
    "UnprocessableEntityError": ".errors",
    "UpdateTaskMessageRequestStreamingStatus": ".messages",
    "UpdateTaskRequest": ".types",
    "ValidationError": ".types",
    "ValidationErrorLocItem": ".types",
    "VersionEventContent": ".types",
    "VersionEventListResponse": ".types",
    "VersionEventResponse": ".types",
    "VersionEventTrigger": ".types",
    "VersionEventType": ".types",
    "VersionListResponse": ".types",
    "VersionResponse": ".types",
    "VersionStatus": ".types",
    "VersionSummary": ".types",
    "__version__": ".version",
    "agent_api_keys": ".agent_api_keys",
    "agents": ".agents",
    "api_keys": ".api_keys",
    "authentication": ".authentication",
    "authorization_internal": ".authorization_internal",
    "branches": ".branches",
    "cli_authentication": ".cli_authentication",
    "events": ".events",
    "filesystems": ".filesystems",
    "logs": ".logs",
    "messages": ".messages",
    "namespaces": ".namespaces",
    "o_auth": ".o_auth",
    "organizations": ".organizations",
    "projects": ".projects",
    "registry": ".registry",
    "schedules": ".schedules",
    "spans": ".spans",
    "states": ".states",
    "stream": ".stream",
    "tasks": ".tasks",
    "telemetry": ".telemetry",
    "tracker": ".tracker",
    "version_events": ".version_events",
    "versions": ".versions",
}


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 module_name == f".{attr_name}":
            return module
        else:
            return getattr(module, attr_name)
    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__ = [
    "AcpType",
    "Agent",
    "AgentApiKey",
    "AgentApiKeyType",
    "AgentInputType",
    "AgentStatus",
    "AgentTaskTracker",
    "ApiKeyCreateResponse",
    "ApiKeyListResponse",
    "ApiKeyResponse",
    "ApiKeyScope",
    "ApiKeyScopeRole",
    "AsyncTerminalUse",
    "AsyncTerminaluseApi",
    "AuthorizedOperationType",
    "AuthzRequest",
    "AuthzSearchResponse",
    "BranchListResponse",
    "BranchResponse",
    "ClaudeMessageContent",
    "CliRefreshResponse",
    "CliTokenResponse",
    "CreateApiKeyResponse",
    "CreateTaskMessageRequestStreamingStatus",
    "CrossEnvSecretResponse",
    "CrossEnvSecretsListResponse",
    "DataContent",
    "DataDelta",
    "DeleteEnvResponse",
    "DeleteEnvVarResponse",
    "DeleteResponse",
    "DeployResponse",
    "DeployedSecretKey",
    "DeployedSecretsResponse",
    "EnvListResponse",
    "EnvResponse",
    "EnvSecretInfo",
    "EnvVarListResponse",
    "EnvVarResponse",
    "EnvVarValue",
    "Event",
    "FileAttachment",
    "FilesystemFile",
    "FilesystemFileResponse",
    "FilesystemResponse",
    "FilesystemStatus",
    "HttpValidationError",
    "ListFilesResponse",
    "LogLevel",
    "LogListResponse",
    "LogQueryEntry",
    "LogSource",
    "MessageAuthor",
    "MessageStyle",
    "MessagesListPaginatedRequestDirection",
    "MetricsIngestionResponse",
    "MigrateTasksResponse",
    "Namespace",
    "NamespaceStatus",
    "OAuthInitiateResponse",
    "OAuthTokenResponse",
    "OrganizationResponse",
    "OtlpAttribute",
    "OtlpAttributeValue",
    "OtlpBodyValue",
    "OtlpLogIngestionResponse",
    "OtlpLogRecord",
    "OtlpResource",
    "OtlpResourceLogs",
    "OtlpScope",
    "OtlpScopeLogs",
    "PaginatedMessagesResponse",
    "PauseScheduleRequest",
    "PresignedUrlRequest",
    "PresignedUrlResponse",
    "PrincipalContextEntity",
    "PrincipalRequest",
    "Project",
    "PublishStreamEventsResponse",
    "ReasoningContent",
    "ReasoningContentDelta",
    "ReasoningSummaryDelta",
    "RedeployResponse",
    "RegisterContainerResponse",
    "RegistryAuthResponse",
    "ResolveEnvResponse",
    "RevokeAllResponse",
    "RollbackRequest",
    "RollbackResponse",
    "ScheduleActionInfo",
    "ScheduleListItem",
    "ScheduleListResponse",
    "ScheduleResponse",
    "ScheduleSpecInfo",
    "ScheduleState",
    "SdkType",
    "SetEnvVarResponse",
    "Span",
    "State",
    "StreamTaskMessageDelta",
    "StreamTaskMessageDone",
    "StreamTaskMessageFull",
    "StreamTaskMessageStart",
    "SyncCompleteResponse",
    "SystemFolderResponse",
    "SystemFolderSyncCompleteResponse",
    "SystemFolderType",
    "SystemFolderTypeResponse",
    "Task",
    "TaskMessage",
    "TaskMessageContent",
    "TaskMessageContent_ClaudeMessage",
    "TaskMessageContent_Data",
    "TaskMessageContent_Reasoning",
    "TaskMessageContent_Text",
    "TaskMessageContent_ToolRequest",
    "TaskMessageContent_ToolResponse",
    "TaskMessageDelta",
    "TaskMessageDelta_Data",
    "TaskMessageDelta_ReasoningContent",
    "TaskMessageDelta_ReasoningSummary",
    "TaskMessageDelta_Text",
    "TaskMessageDelta_ToolRequest",
    "TaskMessageDelta_ToolResponse",
    "TaskMessageStreamingStatus",
    "TaskMessageUpdate",
    "TaskMessageUpdate_Delta",
    "TaskMessageUpdate_Done",
    "TaskMessageUpdate_Full",
    "TaskMessageUpdate_Start",
    "TaskRelationships",
    "TaskResponse",
    "TaskStatus",
    "TerminalUseResource",
    "TerminalUseResourceType",
    "TerminalUse",
    "TerminaluseApi",
    "TextContent",
    "TextDelta",
    "TextFormat",
    "ToolRequestContent",
    "ToolRequestDelta",
    "ToolResponseContent",
    "ToolResponseDelta",
    "TraceIngestionResponse",
    "TupleMembershipRequest",
    "TupleRoleRequest",
    "UnpauseScheduleRequest",
    "UnprocessableEntityError",
    "UpdateTaskMessageRequestStreamingStatus",
    "UpdateTaskRequest",
    "ValidationError",
    "ValidationErrorLocItem",
    "VersionEventContent",
    "VersionEventListResponse",
    "VersionEventResponse",
    "VersionEventTrigger",
    "VersionEventType",
    "VersionListResponse",
    "VersionResponse",
    "VersionStatus",
    "VersionSummary",
    "__version__",
    "agent_api_keys",
    "agents",
    "api_keys",
    "authentication",
    "authorization_internal",
    "branches",
    "cli_authentication",
    "events",
    "filesystems",
    "logs",
    "messages",
    "namespaces",
    "o_auth",
    "organizations",
    "projects",
    "registry",
    "schedules",
    "spans",
    "states",
    "stream",
    "tasks",
    "telemetry",
    "tracker",
    "version_events",
    "versions",
]

# Custom exports (preserved across Fern regeneration)
from terminaluse.lib.sdk.agent_server import AgentServer
from terminaluse.lib.types.task_context import TaskContext
from terminaluse.lib import adk
from terminaluse.lib.utils.logging import make_logger

__all__ += ["AgentServer", "TaskContext", "adk", "make_logger"]
