You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Share One Registration Helper Between the Agent-Safety Installer's PreToolUse Hooks #3517
host-setup/agent-safety/claude/install.py now registers two PreToolUse hooks, gh-write-guard.py under the Bash matcher and model-tier-guard.py under Agent|Workflow. Each has its own copy of the same two blocks:
In registration_problems, a loop counts named entries, checks the command with runs_hook, checks the matcher with matcher_sees_tool, and reports "not registered" and "registered N times". The two loops differ only in hook name, deployed path, tool list, and message wording.
In main, a strip-then-register block removes every entry naming the hook, then appends one entry to the group with that hook's matcher. The SessionEnd sweep has a third copy.
A later fix to registration logic has to be made in each copy. Fold each pair into one helper, one taking the hook name, deployed path, and tools to check, and one taking the event list, hook name, group selector, and entry.
Raised by the local strict review on #3516 and deferred by the maintainer to its own change, so that fix landed without the refactor.
Activity
Map Model Tiers in One Config and Refuse an Unrequested Highest-Tier …
Share One Registration Helper Between the Agent-Safety Installer's Ho…
Promote Model Tier Config and Shared Installer Hook Registration to M…