Phase 6.1: ToolRegistry infrastructure - Add ToolManifest with ToolCategory, PermissionClass, SideEffectScope - Add ToolRegistry singleton with register/get/unregister/list/search - Add BaseTool abstract class with ReadTool/WriteTool/DBWriteTool/ExternalTool/NetworkTool subclasses - Add migration layer for backward compatibility Phase 6.2: Hook interception system - Add HookType (PRE_TOOL_USE, POST_TOOL_USE, TOOL_ERROR, TOOL_SKIP) - Add HookManager with singleton for hook registration - Add HookExecutor for pre/post/error hook execution Phase 6.3: Streaming execution - Add StreamingToolExecutor with batch execution support Phase 6.4: New builtin tools - Add file_tools: GlobTool, GrepTool, ReadFileTool, WriteFileTool - Add system_tools: BashTool, PowerShellTool - Add dev_tools: LSPTools, GitTool - Add collaboration_tools: TeamAgentTool, TaskBroadcastTool Tests: 29 passed
44 lines
758 B
Python
44 lines
758 B
Python
"""内置工具集 - Phase 6.4
|
|
|
|
新的内置工具,使用 BaseTool 基类。
|
|
"""
|
|
|
|
from app.agents.tools.builtins.file_tools import (
|
|
GlobTool,
|
|
GrepTool,
|
|
ReadFileTool,
|
|
WriteFileTool,
|
|
)
|
|
|
|
from app.agents.tools.builtins.system_tools import (
|
|
BashTool,
|
|
PowerShellTool,
|
|
)
|
|
|
|
from app.agents.tools.builtins.dev_tools import (
|
|
LSPTools,
|
|
GitTool,
|
|
)
|
|
|
|
from app.agents.tools.builtins.collaboration_tools import (
|
|
TeamAgentTool,
|
|
TaskBroadcastTool,
|
|
)
|
|
|
|
__all__ = [
|
|
# File tools
|
|
"GlobTool",
|
|
"GrepTool",
|
|
"ReadFileTool",
|
|
"WriteFileTool",
|
|
# System tools
|
|
"BashTool",
|
|
"PowerShellTool",
|
|
# Dev tools
|
|
"LSPTools",
|
|
"GitTool",
|
|
# Collaboration tools
|
|
"TeamAgentTool",
|
|
"TaskBroadcastTool",
|
|
]
|