1
0

feat: add thought_search tool for querying Timmy's thinking history (#260)

Co-authored-by: Kimi Agent <kimi@timmy.local>
Co-committed-by: Kimi Agent <kimi@timmy.local>
This commit is contained in:
2026-03-15 19:35:58 -04:00
committed by hermes
parent 80aba0bf6d
commit bcbdc7d7cb
3 changed files with 203 additions and 6 deletions

View File

@@ -619,6 +619,17 @@ def _register_gematria_tool(toolkit: Toolkit) -> None:
logger.debug("Gematria tool not available")
def _register_thinking_tools(toolkit: Toolkit) -> None:
"""Register thinking/introspection tools for self-reflection."""
try:
from timmy.thinking import search_thoughts
toolkit.register(search_thoughts, name="thought_search")
except (ImportError, AttributeError) as exc:
logger.warning("Tool execution failed (Thinking tools registration): %s", exc)
logger.debug("Thinking tools not available")
def create_full_toolkit(base_dir: str | Path | None = None):
"""Create a full toolkit with all available tools (for the orchestrator).
@@ -646,6 +657,7 @@ def create_full_toolkit(base_dir: str | Path | None = None):
_register_introspection_tools(toolkit)
_register_delegation_tools(toolkit)
_register_gematria_tool(toolkit)
_register_thinking_tools(toolkit)
# Gitea issue management is now provided by the gitea-mcp server
# (wired in as MCPTools in agent.py, not registered here)
@@ -837,6 +849,11 @@ def _introspection_tool_catalog() -> dict:
"description": "Search past conversation logs for messages, tool calls, errors, and decisions",
"available_in": ["orchestrator"],
},
"thought_search": {
"name": "Thought Search",
"description": "Query Timmy's own thought history for past reflections and insights",
"available_in": ["orchestrator"],
},
}