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

Function getHookEnvFilePath

src/utils/sessionEnvironment.ts:43–51  ·  view source on GitHub ↗
(
  hookEvent: 'Setup' | 'SessionStart' | 'CwdChanged' | 'FileChanged',
  hookIndex: number,
)

Source from the content-addressed store, hash-verified

41}
42
43export async function getHookEnvFilePath(
44 hookEvent: 'Setup' | 'SessionStart' | 'CwdChanged' | 'FileChanged',
45 hookIndex: number,
46): Promise<string | null> {
47 const prefix = hookEvent.toLowerCase()
48 const sessionEnvDir = await getSessionEnvDirPath()
49 if (!sessionEnvDir) return null
50 return join(sessionEnvDir, `${prefix}-hook-${hookIndex}.sh`)
51}
52
53export async function clearCwdEnvFiles(): Promise<void> {
54 try {

Callers 1

execCommandHookFunction · 0.85

Calls 1

getSessionEnvDirPathFunction · 0.85

Tested by

no test coverage detected