|
|
""" |
|
|
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() |
|
|
|
|
|
|
|
|
registry.register(FileReaderTool()) |
|
|
registry.register(FileWriterTool()) |
|
|
registry.register(FileSearchTool()) |
|
|
registry.register(DirectoryListTool()) |
|
|
|
|
|
|
|
|
registry.register(PythonExecutorTool()) |
|
|
registry.register(BashExecutorTool()) |
|
|
|
|
|
|
|
|
registry.register(GPUMonitorTool()) |
|
|
registry.register(GPUSelectTool()) |
|
|
|
|
|
return registry |
|
|
|