(event: str, *args)
| 162 | HOOKS[event].append(callback) |
| 163 | |
| 164 | def trigger_hooks(event: str, *args): |
| 165 | for callback in HOOKS[event]: |
| 166 | result = callback(*args) |
| 167 | if result is not None: # teaching shortcut: block this tool call |
| 168 | return result |
| 169 | return None |
| 170 | |
| 171 | |
| 172 | # s03 permission check logic, now wrapped as a hook |
no outgoing calls
no test coverage detected