File size: 1,218 Bytes
a9dc537
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
"""
Tools module for SPARKNET
"""

from .base_tool import BaseTool, ToolResult, ToolRegistry, get_tool_registry
from .file_tools import FileReaderTool, FileWriterTool, FileSearchTool, DirectoryListTool
from .code_tools import PythonExecutorTool, BashExecutorTool
from .gpu_tools import GPUMonitorTool, GPUSelectTool

__all__ = [
    "BaseTool",
    "ToolResult",
    "ToolRegistry",
    "get_tool_registry",
    "FileReaderTool",
    "FileWriterTool",
    "FileSearchTool",
    "DirectoryListTool",
    "PythonExecutorTool",
    "BashExecutorTool",
    "GPUMonitorTool",
    "GPUSelectTool",
]


def register_default_tools() -> ToolRegistry:
    """
    Register all default tools in the registry.

    Returns:
        ToolRegistry with default tools registered
    """
    registry = get_tool_registry()

    # File tools
    registry.register(FileReaderTool())
    registry.register(FileWriterTool())
    registry.register(FileSearchTool())
    registry.register(DirectoryListTool())

    # Code execution tools
    registry.register(PythonExecutorTool())
    registry.register(BashExecutorTool())

    # GPU tools
    registry.register(GPUMonitorTool())
    registry.register(GPUSelectTool())

    return registry