#!/usr/bin/env python3
"""
Utils package for qwen-agent.
"""

from .file_utils import (
    download_file,
    get_file_hash,
    remove_file_or_directory,
    extract_zip_file,
    get_document_preview,
    load_processed_files_log,
    save_processed_files_log
)

from .dataset_manager import (
    download_dataset_files,
    generate_dataset_structure,
    remove_dataset_directory,
    remove_dataset_directory_by_key
)

from .project_manager import (
    generate_project_readme,
    save_project_readme,
    get_project_status,
    remove_project,
    list_projects,
    get_project_stats
)


from .system_optimizer import (
    setup_system_optimizations
)

from .agent_pool import (
    AgentPool,
    get_agent_pool,
    set_agent_pool,
    init_global_agent_pool,
    get_agent_from_pool,
    release_agent_to_pool
)


from .api_models import (
    Message,
    DatasetRequest,
    ChatRequest,
    DatasetResponse,
    ChatCompletionResponse,
    ChatResponse,
    ErrorResponse,
    HealthCheckResponse,
    SystemStatusResponse,
    CacheStatusResponse,
    ProjectStatusResponse,
    ProjectListResponse,
    ProjectStatsResponse,
    ProjectActionResponse,
    QueueTaskRequest,
    IncrementalTaskRequest,
    QueueTaskResponse,
    QueueStatusResponse,
    TaskStatusResponse,
    create_success_response,
    create_error_response,
    create_chat_response,
    BatchSaveChatRequest,
    BatchSaveChatResponse
)

from .multi_project_manager import (
    create_robot_project,
    get_unique_folder_name,
    copy_dataset_folder,
    generate_robot_readme
)



__all__ = [
    # file_utils
    'download_file',
    'get_file_hash', 
    'remove_file_or_directory',
    'extract_zip_file',
    'get_document_preview',
    'load_processed_files_log',
    'save_processed_files_log',
    
    # dataset_manager
    'download_dataset_files',
    'generate_dataset_structure',
    'remove_dataset_directory',
    'remove_dataset_directory_by_key',
    
    # project_manager
    'generate_project_readme',
    'save_project_readme',
    'get_project_status',
    'remove_project',
    'list_projects',
    'get_project_stats',
    
    # agent_pool
    'AgentPool',
    'get_agent_pool',
    'set_agent_pool',
    'init_global_agent_pool',
    'get_agent_from_pool',
    'release_agent_to_pool',
    
    
    # api_models
    'Message',
    'DatasetRequest',
    'ChatRequest', 
    'DatasetResponse',
    'ChatCompletionResponse',
    'ChatResponse',
    'ErrorResponse',
    'HealthCheckResponse',
    'SystemStatusResponse',
    'CacheStatusResponse',
    'ProjectStatusResponse',
    'ProjectListResponse',
    'ProjectStatsResponse',
    'ProjectActionResponse',
    'QueueTaskRequest',
    'QueueTaskResponse',
    'QueueStatusResponse',
    'TaskStatusResponse',
    'create_success_response',
    'create_error_response',
    'create_chat_response',
    'BatchSaveChatRequest',
    'BatchSaveChatResponse',

    # multi_project_manager
    'create_robot_project',
    'get_unique_folder_name',
    'copy_dataset_folder',
    'generate_robot_readme',


]
