This commit is contained in:
Mikan
2026-06-20 19:13:05 +03:00
parent 32575e217e
commit 8514c63ec6
193 changed files with 22105 additions and 11660 deletions

View 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