MCPcopy Create free account
hub / github.com/Louisym/MiniCC / HookConfig

Class HookConfig

tutorials/08_hook_system.py:103–113  ·  view source on GitHub ↗

Hook 配置 —— 告诉 HookRunner 有哪些 hook 命令。 pre_tool_use: 工具执行前要运行的 shell 命令列表 post_tool_use: 工具执行后要运行的 shell 命令列表 对应源码: config.rs:48-52 (RuntimeHookConfig)

Source from the content-addressed store, hash-verified

101
102@dataclass
103class HookConfig:
104 """
105 Hook 配置 —— 告诉 HookRunner 有哪些 hook 命令。
106
107 pre_tool_use: 工具执行前要运行的 shell 命令列表
108 post_tool_use: 工具执行后要运行的 shell 命令列表
109
110 对应源码: config.rs:48-52 (RuntimeHookConfig)
111 """
112 pre_tool_use: list[str] = field(default_factory=list)
113 post_tool_use: list[str] = field(default_factory=list)
114
115
116class HookRunner:

Callers 1

mainFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected