feat: add spawn tracker and deepsearch tool with configurable depth limits

Implement spawn_tracker module to enforce recursive agent spawning limits via R_MAX_SPAWN_DEPTH and R_MAX_TOTAL_SPAWNS environment variables, replacing the previous max_subagents parameter in tool_agent.c. Add tool_deepsearch.c implementing an iterative multi-query research algorithm with configurable system message, and register the new source files in Makefile build targets.
This commit is contained in:
2026-02-10 20:20:19 +00:00
parent 866647d5ac
commit 28b8f44147
8 changed files with 894 additions and 138 deletions
+18 -16
View File
@@ -11,6 +11,7 @@ BINDIR = bin
SRC_CORE = $(SRCDIR)/r_error.c \
$(SRCDIR)/r_config.c \
$(SRCDIR)/spawn_tracker.c \
$(SRCDIR)/tool_registry.c \
$(SRCDIR)/db.c \
$(SRCDIR)/http_client.c \
@@ -23,22 +24,23 @@ SRC_CORE = $(SRCDIR)/r_error.c \
$(SRCDIR)/main.c
SRC_TOOLS = $(TOOLSDIR)/tools_init.c \
$(TOOLSDIR)/tool_terminal.c \
$(TOOLSDIR)/tool_file.c \
$(TOOLSDIR)/tool_db.c \
$(TOOLSDIR)/tool_http.c \
$(TOOLSDIR)/tool_python.c \
$(TOOLSDIR)/tool_indexer.c \
$(TOOLSDIR)/tool_code.c \
$(TOOLSDIR)/tool_file_edit.c \
$(TOOLSDIR)/tool_system.c \
$(TOOLSDIR)/tool_enterprise.c \
$(TOOLSDIR)/tool_research.c \
$(TOOLSDIR)/tool_network.c \
$(TOOLSDIR)/tool_dns.c \
$(TOOLSDIR)/tool_automation.c \
$(TOOLSDIR)/tool_csv.c \
$(TOOLSDIR)/tool_agent.c
$(TOOLSDIR)/tool_terminal.c \
$(TOOLSDIR)/tool_file.c \
$(TOOLSDIR)/tool_db.c \
$(TOOLSDIR)/tool_http.c \
$(TOOLSDIR)/tool_python.c \
$(TOOLSDIR)/tool_indexer.c \
$(TOOLSDIR)/tool_code.c \
$(TOOLSDIR)/tool_file_edit.c \
$(TOOLSDIR)/tool_system.c \
$(TOOLSDIR)/tool_enterprise.c \
$(TOOLSDIR)/tool_research.c \
$(TOOLSDIR)/tool_network.c \
$(TOOLSDIR)/tool_dns.c \
$(TOOLSDIR)/tool_automation.c \
$(TOOLSDIR)/tool_csv.c \
$(TOOLSDIR)/tool_agent.c \
$(TOOLSDIR)/tool_deepsearch.c
SRC = $(SRC_CORE) $(SRC_TOOLS)