#!/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,
    is_file_already_processed,
    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 (
    get_content_from_messages,
    generate_project_readme,
    save_project_readme,
    get_project_status,
    remove_project,
    list_projects,
    get_project_stats
)

# Import agent management modules
from .file_loaded_agent_manager import (
    get_global_agent_manager,
    init_global_agent_manager
)

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

from .organize_dataset_files import (
    is_file_already_processed,
    organize_single_project_files,
    organize_dataset_files
)

from .api_models import (
    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
)

from .prompt_loader import (
    load_system_prompt,
    get_available_prompt_languages,
    is_language_available,
)

__all__ = [
    # file_utils
    'download_file',
    'get_file_hash', 
    'remove_file_or_directory',
    'extract_zip_file',
    'get_document_preview',
    'is_file_already_processed',
    '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
    'get_content_from_messages',
    'generate_project_readme',
    'save_project_readme',
    'get_project_status',
    'remove_project',
    'list_projects',
    'get_project_stats',
    
    # file_loaded_agent_manager
    'get_global_agent_manager',
    'init_global_agent_manager',
    
    # agent_pool
    'AgentPool',
    'get_agent_pool',
    'set_agent_pool',
    'init_global_agent_pool',
    'get_agent_from_pool',
    'release_agent_to_pool',
    
    # organize_dataset_files
    'is_file_already_processed',
    'organize_single_project_files',
    'organize_dataset_files',
    
    # 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',
    
    # prompt_loader
    'load_system_prompt',
    'get_available_prompt_languages',
    'is_language_available'
]