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

Function trigger_hooks

s07_skill_loading/code.py:317–322  ·  view source on GitHub ↗
(event: str, *args)

Source from the content-addressed store, hash-verified

315 HOOKS[event].append(callback)
316
317def trigger_hooks(event: str, *args):
318 for callback in HOOKS[event]:
319 result = callback(*args)
320 if result is not None:
321 return result
322 return None
323
324DENY_LIST = ["rm -rf /", "sudo", "shutdown", "reboot", "mkfs", "dd if="]
325

Callers 3

spawn_subagentFunction · 0.70
agent_loopFunction · 0.70
code.pyFile · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected