Files
hermes-agent/scripts
alt-glitch 3bb8a40b45 refactor(tools): an explicit list of tool modules replaces the folder scan
discover_builtin_tools() imports the modules named in
tools.registry._TOOL_MODULES, in that order, each inside the same try as
before: a module that fails to import is logged and skipped, and the rest
still register. The safe worker still loads only its three modules. The list
is today's scan result in today's order, 38 modules.

Gone with the scan: the AST parse of every tools/*.py at startup, its verdict
cache in HERMES_HOME/cache/tool_discovery_cache.json (an existing file is left
alone and no longer read), the skip set NOT_TOOL_MODULES, which no release
shipped, and the tools_dir parameter, which only tests of the scan passed.

scripts/check_tool_discovery.py now compares the list with the tracked files
under tools/ that call registry.register() at their top level, and fails on
either difference. It reads the list from the text of tools/registry.py and
holds the predicate itself, so the guard imports no application code. A listed
module inside a package must be <pkg>/tool.py in a package with an __init__.py.

Adding a built-in tool is now three edits: the tool file, its name in
_TOOL_MODULES, and its toolset. `just check` names a tool file that is missing
from the list.
2026-11-30 23:20:42 +05:30
..
…
…
…