Interface HookMatcher<E extends HookEvent>

All Known Implementing Classes:
HookMatcher.All, HookMatcher.Predicate, HookMatcher.Regex

public sealed interface HookMatcher<E extends HookEvent> permits HookMatcher.Regex<E>, HookMatcher.Predicate<E>, HookMatcher.All<E>
Filters whether a Hook fires for a given event (issue #58). Sealed so the dispatcher's dispatch path is exhaustive.
  • HookMatcher.Regex — matches when the event's HookEvent.eventType() matches the supplied regex. Default matcher for "fire on every PreToolUse" style.
  • HookMatcher.Predicate — arbitrary typed predicate on the event. Use when matching requires inspecting payload fields (e.g. tool name, input shape).
  • HookMatcher.All — unconditional match; useful for logging hooks that observe every event in their category.
Since:
0.5.0 (issue #58)