tools/ holds model tools. These 36 files register none: they decide whether
a command or a write may run, detect dangerous commands, and ask a person
(approval prompts, gateway clarify, slash confirmations). They move to a new
root package, approval/, with command detection in approval/detection/.
tools/approval.py becomes approval/gate.py and tools/approval_detection.py
becomes approval/detection/patterns.py; the other files drop the approval_
prefix or keep their stem. 79 tests whose subject is a moved file move to
tests/approval/, whose conftest.py imports the autouse fixtures of
tests/tools/conftest.py they ran under.
Function bodies are unchanged and every import stays where it was. Loggers
follow their modules: the five module loggers that logged as tools.approval
now log as approval.gate, and approval joins the tools entry of
hermes_logging.COMPONENT_PREFIXES, so `hermes logs --component tools` shows
the same lines. approval also joins packages.find, FIRST_PARTY_MODULE_ROOTS,
_KNOWN_LOGGER_ROOTS, the plugin isolation audit, six check scripts, the P33
profile-scope pattern and the test fixtures that list root packages.
Ten old names keep a file at the old path, each a MOVES key, a
REQUIRED_NAMES row and a file written by scripts/move/generate_shims.py:
tools.approval and tools.clarify_gateway are on the published plugin API,
and all ten are imported inside functions on every turn, message, tool call
or human prompt by a process started on a release up to v0.23.5, which
keeps running its old code after an update swaps the checkout. Five more
modules that pinned catalog plugins import keep their old name through a
MOVES key with no file, listed in the plugin guide.
Both new packages call rebind_loaded_modules from their __init__, so a
session that outlives the update keeps the one gate it already holds: a
notifier registered before the update still reaches a background child's
approval request.