fix(hooks): identify Trae registrations by where they fire, not just by command
Matching the RTK command alone settled the round-1 defect, where a matcher or timeout the user had edited made uninstall report "nothing to remove" and a reinstall append a duplicate. It also went one step too far in both directions, and this restores the two distinctions that were lost with it. Presence now only counts a registration that would run for the tool RTK serves: a group with no matcher, or one naming RunCommand among its `|`-separated tools. Anything unrecognised counts as not covering RunCommand, so an install adds an entry that fires rather than skipping one that never would. Removal stays matcher-blind, which is what round 1 asked for, but skips an entry whose explicit type is not `command`: a `prompt` entry is by construction the user's, and deleting it also took the group and its `matcher` and `description` keys. The "Already updated" list was also per-run, so the rerun the documentation recommends after a write failure reported "none" while a target was fully installed. It is now seeded from the preflight, and the uninstall path — which has the same two-target failure mode — reports it too. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
N
Nicolas Le Cam committed
64a7010b21e49aadec41acea264aaf6a462740b0
Parent: ceae215