Event-aware reduction for Hooks v2 command output.
Map native tool arguments to the compatible wire input object.
Return value when it is composed only of allowlisted sequences.
Allowed tokens are OSC 0/1/2/9/99/777 (BEL or ST terminated)
and bare BEL. Any other escape or control content rejects the entire value.
Reduce ordered handler results into an event-specific decision.