# 工具模块导出
from .compile_project import compile_project, set_compiler_service
from .compile_file import compile_file
from .get_args import get_compiler_args
from .config import set_config_manager, search_compilers
from .environment import check_environment
from .coding_rules import get_coding_rules
from .knowledge_base import (
    set_delphi_kb_service,
    set_thirdparty_kb_service,
    search_knowledge,
    build_unified_knowledge_base,
    get_unified_knowledge_stats
)
from .thirdparty_knowledge_base import (
    build_thirdparty_knowledge_base,
    set_thirdparty_knowledge_base_service
)
from .read_source_file import (
    read_source_file,
    search_and_read_file,
    set_knowledge_base_services
)
from .async_tasks import (
    start_async_task,
    get_task_status,
    get_task_result,
    list_tasks
)
from .pasfmt import (
    format_file,
    format_code,
    set_pasfmt_path,
    get_pasfmt_path,
    download_and_install_pasfmt,
    download_and_install_pasfmt_rad,
    check_pasfmt_installation,
    check_pasfmt_rad_installation,
    compile_from_source
)
from .file_tool import handle_file_tool
from .dfm_utils import convert_dfm, set_compiler_path
from .audit import run_audit
from .dproj_tool import dproj_tool
from .manage_component import manage_component
from .code_hosting import code_hosting
from .install_package import install_package, list_installed_packages
from . import document_kb_tools
from . import create_component_dfm

__all__ = [
    # 编译工具
    'compile_project',
    'compile_file',
    'get_compiler_args',
    'set_compiler_service',
    # 配置工具
    'set_config_manager',
    'search_compilers',
    'check_environment',
    'get_coding_rules',
    # 知识库工具
    'set_delphi_kb_service',
    'set_thirdparty_kb_service',
    'search_knowledge',
    'build_unified_knowledge_base',
    'get_unified_knowledge_stats',
    # 第三方库知识库工具
    'build_thirdparty_knowledge_base',
    'set_thirdparty_knowledge_base_service',
    # 源码文件读取工具（旧，仍可用）
    'read_source_file',
    'search_and_read_file',
    'set_knowledge_base_services',
    # 异步任务工具
    'start_async_task',
    'get_task_status',
    'get_task_result',
    'list_tasks',
    # pasfmt 代码格式化工具
    'format_file',
    'format_code',
    'set_pasfmt_path',
    'get_pasfmt_path',
    'download_and_install_pasfmt',
    'download_and_install_pasfmt_rad',
    'check_pasfmt_installation',
    'check_pasfmt_rad_installation',
    'compile_from_source',
    # 统一文件工具
    'handle_file_tool',
    # DFM 转换工具
    'convert_dfm',
    'set_compiler_path',
    # 代码审计
    'run_audit',
    # 工程文件管理
    'dproj_tool',
    # 组件管理
    'manage_component',
    # 代码托管平台
    'code_hosting',
    # 组件包管理
    'install_package',
    'list_installed_packages',
    # 文档知识库
    'document_kb_tools',
    # 组件 DFM 生成（旧版，已由 manage_component 替代）
    'create_component_dfm',
]
