MCPcopy Index your code
hub / github.com/shareAI-lab/learn-claude-code / trigger_hooks

Function trigger_hooks

s04_hooks/code.py:164–169  ·  view source on GitHub ↗
(event: str, *args)

Source from the content-addressed store, hash-verified

162 HOOKS[event].append(callback)
163
164def 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

Callers 2

agent_loopFunction · 0.70
code.pyFile · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected