[claude] refactor: break up monolithic tools.py into a tools/ package (#1215) #1221
Reference in New Issue
Block a user
Delete Branch "claude/issue-1215"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Fixes #1215
What changed
Split the 1032-line
src/timmy/tools.pyinto atools/package with four focused sub-modules:tools/_base.pyToolStats,AgentTools), agno lazy imports,_TOOL_USAGEdict, tracking helperstools/file_tools.py_make_smart_read_filewrapper + toolkit factories for file-heavy agents (Echo, Quill, Seer)tools/system_tools.pycalculator/_safe_eval,consult_grok,web_fetch, + toolkit factories for Forge/Mace/Helmtools/_registry.py_register_*helpers,create_full_toolkit,create_experiment_tools,AGENT_TOOLKITSregistry, and the full tool catalog /get_all_available_toolstools/__init__.pyre-exports every public symbol so all callers (timmy.agent,dashboard.routes.tools, tests) remain import-compatible with no changes required.Tests
tox -e unitpasses — 343 tests, 0 failures.Split the 1032-line src/timmy/tools.py into four focused sub-modules: - tools/_base.py — shared types (ToolStats, AgentTools), agno lazy imports, _TOOL_USAGE dict, tracking helpers - tools/file_tools.py — _make_smart_read_file wrapper + toolkit factories for file-heavy agents (Echo, Quill, Seer) - tools/system_tools.py — calculator/_safe_eval, consult_grok, web_fetch, + toolkit factories for Forge/Mace/Helm - tools/_registry.py — all _register_* helpers, create_full_toolkit, create_experiment_tools, AGENT_TOOLKITS registry, and the full tool catalog / get_all_available_tools tools/__init__.py re-exports every public symbol so all callers (timmy.agent, dashboard.routes.tools, tests) remain import-compatible with no changes required. Fixes #1215 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>