MCPcopy Create free account
hub / github.com/AnukarOP/claude-code-leaked / executeConfigChangeHooks

Function executeConfigChangeHooks

source code/utils/hooks.ts:4216–4241  ·  view source on GitHub ↗
(
  source: ConfigChangeSource,
  filePath?: string,
  timeoutMs: number = TOOL_HOOK_EXECUTION_TIMEOUT_MS,
)

Source from the content-addressed store, hash-verified

4214 * @param timeoutMs Optional timeout in milliseconds for hook execution
4215 */
4216export async function executeConfigChangeHooks(
4217 source: ConfigChangeSource,
4218 filePath?: string,
4219 timeoutMs: number = TOOL_HOOK_EXECUTION_TIMEOUT_MS,
4220): Promise<HookOutsideReplResult[]> {
4221 const hookInput: ConfigChangeHookInput = {
4222 ...createBaseHookInput(undefined),
4223 hook_event_name: 'ConfigChange',
4224 source,
4225 file_path: filePath,
4226 }
4227
4228 const results = await executeHooksOutsideREPL({
4229 hookInput,
4230 timeoutMs,
4231 matchQuery: source,
4232 })
4233
4234 // Policy settings are enterprise-managed — hooks fire for audit logging
4235 // but must never block policy changes from being applied
4236 if (source === 'policy_settings') {
4237 return results.map(r => ({ ...r, blocked: false }))
4238 }
4239
4240 return results
4241}
4242
4243async function executeEnvHooks(
4244 hookInput: HookInput,

Callers 3

handleChangeFunction · 0.85
handleDeleteFunction · 0.85
scheduleReloadFunction · 0.85

Calls 2

createBaseHookInputFunction · 0.85
executeHooksOutsideREPLFunction · 0.85

Tested by

no test coverage detected