"""Type definitions for Claude SDK.

This package re-exports all types for backwards compatibility.
Types are organized into submodules:
- base: Type aliases, literals, and thinking configuration
- agents: Agent definitions and presets
- permissions: Permission system types
- hooks: Hook system types (inputs, outputs, matchers, callbacks)
- mcp: MCP server and plugin configuration
- sandbox: Sandbox configuration
- messages: Content blocks, message types, and stream events
- options: ClaudeAgentOptions
- control: SDK control protocol types
"""

from __future__ import annotations

from .agents import AgentDefinition, SystemPromptPreset, ToolsPreset
from .base import (
    ApiKeySource,
    PermissionMode,
    PermissionBehavior,
    ReasoningEffort,
    SdkBeta,
    SettingSource,
    StopReason,
    ThinkingConfig,
    ThinkingConfigAdaptive,
    ThinkingConfigDisabled,
    ThinkingConfigEnabled,
)
from .control import (
    ControlErrorResponse,
    ControlRequestUnion,
    ControlResponse,
    SDKControlInitializeRequest,
    SDKControlInterruptRequest,
    SDKControlMcpMessageRequest,
    SDKControlPermissionRequest,
    SDKControlRequest,
    SDKControlResponse,
    SDKControlRewindFilesRequest,
    SDKControlSetPermissionModeRequest,
    SDKControlStopTaskRequest,
    SDKHookCallbackRequest,
    control_request_adapter,
)
from .hooks import (
    AsyncHookJSONOutput,
    BaseHookInput,
    HookCallback,
    HookContext,
    HookEvent,
    HookInput,
    HookJSONOutput,
    HookMatcher,
    HookSpecificOutput,
    NotificationHookInput,
    NotificationHookSpecificOutput,
    PermissionRequestHookInput,
    SessionEndHookInput,
    SessionStartHookInput,
    SetupHookInput,
    PermissionRequestHookSpecificOutput,
    PostToolUseFailureHookInput,
    PostToolUseFailureHookSpecificOutput,
    PostToolUseHookInput,
    PostToolUseHookSpecificOutput,
    PreCompactHookInput,
    PreToolUseHookInput,
    PreToolUseHookSpecificOutput,
    SessionStartHookSpecificOutput,
    StopHookInput,
    SubagentStartHookInput,
    TaskCompletedHookInput,
    TeammateIdleHookInput,
    SubagentStartHookSpecificOutput,
    SubagentStopHookInput,
    SyncHookJSONOutput,
    UserPromptSubmitHookInput,
    UserPromptSubmitHookSpecificOutput,
    WorktreeCreateHookInput,
    WorktreeRemoveHookInput,
)
from .input_types import (
    TOOL_INPUT_TYPES,
    AgentInput,
    AskUserQuestion,
    AskUserQuestionInput,
    AskUserQuestionOption,
    BashInput,
    BashOutputInput,
    ExitPlanModeInput,
    FileEditInput,
    FileReadInput,
    FileWriteInput,
    GlobInput,
    GrepInput,
    KillShellInput,
    ListMcpResourcesInput,
    NotebookEditInput,
    ReadMcpResourceInput,
    TodoItem,
    TodoWriteInput,
    ToolInput,
    WebFetchInput,
    WebSearchInput,
)
from .mcp import (
    JSONRPC_VERSION,
    JSONRPCError,
    JSONRPCErrorResponse,
    JSONRPCMessage,
    JSONRPCNotification,
    JSONRPCRequest,
    JSONRPCResponse,
    JSONRPCResultResponse,
    McpConnectionStatus,
    McpHttpServerConfig,
    McpSdkServerConfig,
    McpServerConfig,
    McpServerStatusEntry,
    McpServerVersionInfo,
    McpSSEServerConfig,
    McpStatusResponse,
    McpStdioServerConfig,
    McpToolStatus,
    RequestId,
    SdkPluginConfig,
)
from .output_types import (
    TOOL_USE_RESULT_TYPES,
    AgentAsyncLaunchedOutput,
    AgentCacheCreation,
    AgentCompletedOutput,
    AgentOutput,
    AgentOutputTextContent,
    AgentOutputUsage,
    AgentServerToolUse,
    AgentSubAgentEnteredOutput,
    AskUserQuestionItem,
    AskUserQuestionOutput,
    BashOutput,
    BashToolUseResult,
    ConfigOutput,
    EditOutput,
    EditToolUseResult,
    EnterWorktreeOutput,
    ExitPlanModeOutput,
    GitDiff,
    GlobOutput,
    GrepOutput,
    ListMcpResourcesOutput,
    McpOutput,
    McpResourceEntry,
    NotebookEditOutput,
    ReadFileInfo,
    ReadImageDimensions,
    ReadImageFileInfo,
    ReadImageOutput,
    ReadMcpResourceContentItem,
    ReadMcpResourceOutput,
    ReadNotebookFileInfo,
    ReadNotebookOutput,
    ReadOutput,
    ReadPartsFileInfo,
    ReadPartsOutput,
    ReadPdfFileInfo,
    ReadPdfOutput,
    ReadTextOutput,
    ReadToolUseResult,
    StructuredPatchHunk,
    SubscribeMcpResourceOutput,
    SubscribePollingOutput,
    TaskInfo,
    TaskOutputResult,
    TaskStopOutput,
    TodoUseResultItem,
    TodoWriteOutput,
    TodoWriteToolUseResult,
    ToolUseResult,
    UnsubscribeMcpResourceOutput,
    UnsubscribePollingOutput,
    WebFetchOutput,
    WebSearchHit,
    WebSearchOutput,
    WebSearchToolResult,
    WriteOutput,
    WriteToolUseResult,
)
from .content_blocks import (
    ContentBlock,
    TextBlock,
    ThinkingBlock,
    ToolResultBlock,
    ToolUseBlock,
    content_block_adapter,
)

from .messages import (
    AssistantMessage,
    AssistantMessageError,
    BaseSystemMessage,
    CompactBoundarySystemMessage,
    HookResponseSystemMessage,
    HookStartedSystemMessage,
    InitSystemMessage,
    McpServerStatus,
    Message,
    ModelUsage,
    BaseResultMessage,
    ResultErrorMessage,
    ResultMessage,
    ResultSuccessMessage,
    SDKPermissionDenial,
    SDKSessionInfo,
    StatusSystemMessage,
    StreamEvent,
    AuthStatusMessage,
    FilesPersistedSystemMessage,
    HookProgressSystemMessage,
    TaskNotificationSystemMessage,
    TaskProgressSystemMessage,
    TaskProgressUsage,
    TaskStartedSystemMessage,
    ToolProgressMessage,
    ToolUseSummaryMessage,
    TriggerMetadata,
    Usage,
    UserMessage,
    UserPromptMessage,
    UserPromptMessageContent,
    system_message_adapter,
)
from .options import ClaudeAgentOptions
from .options import (
    BaseSessionConfig,
    ContinueLatest,
    ListSessionsOptions,
    NewSession,
    ResumeSession,
    SessionConfig,
    resolve_session_config,
)
from .permissions import (
    CanUseTool,
    OnUserQuestion,
    PermissionResult,
    PermissionResultAllow,
    PermissionResultDeny,
    PermissionRuleValue,
    PermissionUpdate,
    PermissionUpdateDestination,
    ToolPermissionContext,
)
from .sandbox import SandboxIgnoreViolations, SandboxNetworkConfig, SandboxSettings

__all__ = [
    # base
    "ApiKeySource",
    "PermissionMode",
    "ReasoningEffort",
    "SdkBeta",
    "SettingSource",
    "StopReason",
    "ThinkingConfig",
    "ThinkingConfigAdaptive",
    "ThinkingConfigDisabled",
    "ThinkingConfigEnabled",
    # agents
    "AgentDefinition",
    "SystemPromptPreset",
    "ToolsPreset",
    # permissions
    "CanUseTool",
    "OnUserQuestion",
    "PermissionBehavior",
    "PermissionResult",
    "PermissionResultAllow",
    "PermissionResultDeny",
    "PermissionRuleValue",
    "PermissionUpdate",
    "PermissionUpdateDestination",
    "ToolPermissionContext",
    # hooks
    "AsyncHookJSONOutput",
    "BaseHookInput",
    "HookCallback",
    "HookContext",
    "HookEvent",
    "HookInput",
    "HookJSONOutput",
    "HookMatcher",
    "HookSpecificOutput",
    "NotificationHookInput",
    "NotificationHookSpecificOutput",
    "PermissionRequestHookInput",
    "SessionEndHookInput",
    "SessionStartHookInput",
    "SetupHookInput",
    "PermissionRequestHookSpecificOutput",
    "PostToolUseFailureHookInput",
    "PostToolUseFailureHookSpecificOutput",
    "PostToolUseHookInput",
    "PostToolUseHookSpecificOutput",
    "PreCompactHookInput",
    "PreToolUseHookInput",
    "PreToolUseHookSpecificOutput",
    "SessionStartHookSpecificOutput",
    "StopHookInput",
    "SubagentStartHookInput",
    "TaskCompletedHookInput",
    "TeammateIdleHookInput",
    "SubagentStartHookSpecificOutput",
    "SubagentStopHookInput",
    "SyncHookJSONOutput",
    "UserPromptSubmitHookInput",
    "UserPromptSubmitHookSpecificOutput",
    "WorktreeCreateHookInput",
    "WorktreeRemoveHookInput",
    # mcp
    "JSONRPC_VERSION",
    "JSONRPCError",
    "JSONRPCErrorResponse",
    "JSONRPCMessage",
    "JSONRPCNotification",
    "JSONRPCRequest",
    "JSONRPCResponse",
    "JSONRPCResultResponse",
    "McpConnectionStatus",
    "McpHttpServerConfig",
    "McpSdkServerConfig",
    "McpServerConfig",
    "McpServerStatusEntry",
    "McpServerVersionInfo",
    "McpSSEServerConfig",
    "McpStatusResponse",
    "McpStdioServerConfig",
    "McpToolStatus",
    "RequestId",
    "SdkPluginConfig",
    # sandbox
    "SandboxIgnoreViolations",
    "SandboxNetworkConfig",
    "SandboxSettings",
    # messages
    "AssistantMessage",
    "AssistantMessageError",
    "BaseSystemMessage",
    "CompactBoundarySystemMessage",
    "ContentBlock",
    "HookResponseSystemMessage",
    "HookStartedSystemMessage",
    "InitSystemMessage",
    "McpServerStatus",
    "Message",
    "ModelUsage",
    "BaseResultMessage",
    "ResultErrorMessage",
    "ResultMessage",
    "ResultSuccessMessage",
    "SDKPermissionDenial",
    "SDKSessionInfo",
    "StatusSystemMessage",
    "StreamEvent",
    "AuthStatusMessage",
    "FilesPersistedSystemMessage",
    "HookProgressSystemMessage",
    "TaskNotificationSystemMessage",
    "TaskProgressSystemMessage",
    "TaskProgressUsage",
    "TaskStartedSystemMessage",
    "TextBlock",
    "ThinkingBlock",
    "ToolProgressMessage",
    "ToolResultBlock",
    "ToolUseBlock",
    "ToolUseSummaryMessage",
    "TriggerMetadata",
    "Usage",
    "UserMessage",
    "UserPromptMessage",
    "UserPromptMessageContent",
    "content_block_adapter",
    "system_message_adapter",
    # options
    "ClaudeAgentOptions",
    "BaseSessionConfig",
    "ContinueLatest",
    "ListSessionsOptions",
    "NewSession",
    "ResumeSession",
    "SessionConfig",
    "resolve_session_config",
    # control
    "ControlErrorResponse",
    "ControlRequestUnion",
    "ControlResponse",
    "SDKControlInitializeRequest",
    "SDKControlInterruptRequest",
    "SDKControlMcpMessageRequest",
    "SDKControlPermissionRequest",
    "SDKControlRequest",
    "SDKControlResponse",
    "SDKControlRewindFilesRequest",
    "SDKControlSetPermissionModeRequest",
    "SDKControlStopTaskRequest",
    "SDKHookCallbackRequest",
    "control_request_adapter",
    "ToolInput",
    "TOOL_INPUT_TYPES",
    "AgentInput",
    "AskUserQuestion",
    "AskUserQuestionInput",
    "AskUserQuestionOption",
    "BashInput",
    "BashOutputInput",
    "FileEditInput",
    "FileReadInput",
    "FileWriteInput",
    "GlobInput",
    "GrepInput",
    "KillShellInput",
    "NotebookEditInput",
    "WebFetchInput",
    "WebSearchInput",
    "TodoItem",
    "TodoWriteInput",
    "ExitPlanModeInput",
    "ListMcpResourcesInput",
    "ReadMcpResourceInput",
    # output_types (actual tool_use_result wire format)
    "TOOL_USE_RESULT_TYPES",
    "AgentAsyncLaunchedOutput",
    "AgentCacheCreation",
    "AgentCompletedOutput",
    "AgentOutput",
    "AgentOutputTextContent",
    "AgentOutputUsage",
    "AgentServerToolUse",
    "AgentSubAgentEnteredOutput",
    "AskUserQuestionItem",
    "AskUserQuestionOutput",
    "BashOutput",
    "ConfigOutput",
    "EditOutput",
    "EnterWorktreeOutput",
    "ExitPlanModeOutput",
    "GitDiff",
    "GlobOutput",
    "GrepOutput",
    "ListMcpResourcesOutput",
    "McpOutput",
    "McpResourceEntry",
    "NotebookEditOutput",
    "ReadFileInfo",
    "ReadImageDimensions",
    "ReadImageFileInfo",
    "ReadImageOutput",
    "ReadMcpResourceContentItem",
    "ReadMcpResourceOutput",
    "ReadNotebookFileInfo",
    "ReadNotebookOutput",
    "ReadOutput",
    "ReadPartsFileInfo",
    "ReadPartsOutput",
    "ReadPdfFileInfo",
    "ReadPdfOutput",
    "ReadTextOutput",
    "StructuredPatchHunk",
    "SubscribeMcpResourceOutput",
    "SubscribePollingOutput",
    "TaskInfo",
    "TaskOutputResult",
    "TaskStopOutput",
    "TodoWriteOutput",
    "ToolUseResult",
    "UnsubscribeMcpResourceOutput",
    "UnsubscribePollingOutput",
    "WebFetchOutput",
    "WebSearchHit",
    "WebSearchOutput",
    "WebSearchToolResult",
    "WriteOutput",
    # backwards-compat aliases (old tool_use_results.py names)
    "BashToolUseResult",
    "EditToolUseResult",
    "ReadToolUseResult",
    "TodoUseResultItem",
    "TodoWriteToolUseResult",
    "WriteToolUseResult",
]
