"""
Roneia Core - 数字人框架核心模块 (客户端版)

包含:
- builtin_skills: 内置 Skill 代码
- permission_manager: 权限管理
- protocol: 云端-本地通信协议
"""

from .permission_manager import (
    PermissionManager,
    PermissionRequest,
    AuthorizationStatus,
    terminal_authorization_callback,
    tkinter_authorization_callback,
    set_tkinter_cancel_flag,
    check_tkinter_cancel_flag,
    TaskCancelledException,
    auto_grant_callback,
)

from .protocol import (
    Message,
    MessageType,
    ErrorCode as ProtocolErrorCode,
    create_task_request,
    create_task_response,
    create_skill_call,
    create_skill_result,
    create_auth_request,
    create_auth_response,
    create_error,
    create_heartbeat,
    validate_message,
)

__version__ = "0.1.0"
__all__ = [
    # Permission Manager
    "PermissionManager",
    "PermissionRequest",
    "AuthorizationStatus",
    "terminal_authorization_callback",
    "tkinter_authorization_callback",
    "set_tkinter_cancel_flag",
    "check_tkinter_cancel_flag",
    "TaskCancelledException",
    "auto_grant_callback",
    # Protocol
    "Message",
    "MessageType",
    "ProtocolErrorCode",
    "create_task_request",
    "create_task_response",
    "create_skill_call",
    "create_skill_result",
    "create_auth_request",
    "create_auth_response",
    "create_error",
    "create_heartbeat",
    "validate_message",
]
