MCPcopy Create free account
hub / github.com/Noumena-Network/code / executeConfigChangeHooks

Function executeConfigChangeHooks

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

Source from the content-addressed store, hash-verified

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