"""Core module for rclaude - frontend-agnostic components."""

from .claude_client import (
    create_client,
    create_permission_handler,
    dummy_pretool_hook,
    fetch_context,
    get_local_claude_cli,
    process_response,
)
from .events import (
    ErrorEvent,
    Event,
    PermissionRequestEvent,
    QuestionEvent,
    ReturnToTerminalEvent,
    SessionEndEvent,
    SessionStartEvent,
    SupersededEvent,
    TextEvent,
    ToolCallEvent,
    ToolResultEvent,
    UserMessageEvent,
)
from .permissions import (
    APPROVAL_REQUIRED_TOOLS,
    EDIT_TOOLS,
    MODE_DISPLAY,
    VALID_MODES,
    PermissionChecker,
    add_permission_rule,
    can_resume_session,
    check_permission_rule,
    format_mode_display,
    format_mode_short,
    format_model_short,
    generate_permission_rule,
    generate_smart_bash_rule,
    load_permission_rules,
    parse_context_output,
    validate_permission_mode,
)
from .session import (
    ContextUsage,
    PendingPermission,
    PendingQuestion,
    PermissionMode,
    Session,
    SessionManager,
    SessionUsage,
    get_session_manager,
)

__all__ = [
    # Claude Client
    'create_client',
    'create_permission_handler',
    'dummy_pretool_hook',
    'fetch_context',
    'get_local_claude_cli',
    'process_response',
    # Events
    'Event',
    'ErrorEvent',
    'TextEvent',
    'ToolCallEvent',
    'ToolResultEvent',
    'QuestionEvent',
    'PermissionRequestEvent',
    'UserMessageEvent',
    'SessionStartEvent',
    'SessionEndEvent',
    'ReturnToTerminalEvent',
    'SupersededEvent',
    # Session
    'Session',
    'SessionManager',
    'get_session_manager',
    'PendingQuestion',
    'PendingPermission',
    'SessionUsage',
    'ContextUsage',
    'PermissionMode',
    # Permissions
    'PermissionChecker',
    'APPROVAL_REQUIRED_TOOLS',
    'EDIT_TOOLS',
    'VALID_MODES',
    'MODE_DISPLAY',
    'format_mode_display',
    'validate_permission_mode',
    'format_mode_short',
    'format_model_short',
    'parse_context_output',
    'generate_permission_rule',
    'load_permission_rules',
    'check_permission_rule',
    'add_permission_rule',
    'generate_smart_bash_rule',
    'can_resume_session',
]
