rebase
This commit is contained in:
56
app/engine/tools/register_all.py
Normal file
56
app/engine/tools/register_all.py
Normal file
@@ -0,0 +1,56 @@
|
||||
"""Build the default tool registry — instantiates and registers all tools."""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
from app.engine.tools.base import ToolRegistry
|
||||
from app.engine.tools.game import (
|
||||
AdvanceTimeTool,
|
||||
AskUserTool,
|
||||
CalcTool,
|
||||
CommentToUserTool,
|
||||
EnvGetTool,
|
||||
EnvUpdateTool,
|
||||
EntityCreateTool,
|
||||
EntityDeleteTool,
|
||||
EntityGetTool,
|
||||
EntityListTool,
|
||||
EntityUpdateTool,
|
||||
ProposeChangesTool,
|
||||
RagAddTool,
|
||||
RagQueryTool,
|
||||
RandomChoiceTool,
|
||||
RunSubagentTool,
|
||||
ScheduleTriggerTool,
|
||||
SubmitPlanTool,
|
||||
SubmitStepTool,
|
||||
SuggestActionsTool,
|
||||
UpdatePlotRailsTool,
|
||||
)
|
||||
from app.engine.tools.schema_tools import (
|
||||
SchemaAddFieldTool,
|
||||
SchemaAddTypeTool,
|
||||
SchemaModifyFieldTool,
|
||||
SchemaRemoveFieldTool,
|
||||
)
|
||||
|
||||
|
||||
def build_default_registry() -> ToolRegistry:
|
||||
"""Construct and return a ToolRegistry with all built-in tools registered."""
|
||||
reg = ToolRegistry()
|
||||
# Game tools
|
||||
for cls in [
|
||||
EntityCreateTool, EntityGetTool, EntityListTool, EntityUpdateTool,
|
||||
EntityDeleteTool, EnvUpdateTool, EnvGetTool, UpdatePlotRailsTool,
|
||||
AdvanceTimeTool, ScheduleTriggerTool, CalcTool, RandomChoiceTool,
|
||||
RagQueryTool, RagAddTool, RunSubagentTool,
|
||||
SubmitPlanTool, SubmitStepTool, SuggestActionsTool,
|
||||
]:
|
||||
reg.register(cls())
|
||||
# Interaction tools
|
||||
for cls in [AskUserTool, ProposeChangesTool, CommentToUserTool]:
|
||||
reg.register(cls())
|
||||
# Schema tools
|
||||
for cls in [SchemaAddTypeTool, SchemaAddFieldTool,
|
||||
SchemaRemoveFieldTool, SchemaModifyFieldTool]:
|
||||
reg.register(cls())
|
||||
return reg
|
||||
Reference in New Issue
Block a user