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

Function executeEnvHooks

src/utils/hooks.ts:4245–4262  ·  view source on GitHub ↗
(
  hookInput: HookInput,
  timeoutMs: number,
)

Source from the content-addressed store, hash-verified

4243}
4244
4245async function executeEnvHooks(
4246 hookInput: HookInput,
4247 timeoutMs: number,
4248): Promise<{
4249 results: HookOutsideReplResult[]
4250 watchPaths: string[]
4251 systemMessages: string[]
4252}> {
4253 const results = await executeHooksOutsideREPL({ hookInput, timeoutMs })
4254 if (results.length > 0) {
4255 invalidateSessionEnvCache()
4256 }
4257 const watchPaths = results.flatMap(r => r.watchPaths ?? [])
4258 const systemMessages = results
4259 .map(r => r.systemMessage)
4260 .filter((m): m is string => !!m)
4261 return { results, watchPaths, systemMessages }
4262}
4263
4264export function executeCwdChangedHooks(
4265 oldCwd: string,

Callers 2

executeCwdChangedHooksFunction · 0.85
executeFileChangedHooksFunction · 0.85

Calls 2

executeHooksOutsideREPLFunction · 0.85

Tested by

no test coverage detected