MCPcopy Index your code
hub / github.com/openai/codex-plugin-cc / main

Function main

plugins/codex/scripts/session-lifecycle-hook.mjs:116–128  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

114}
115
116async function main() {
117 const input = readHookInput();
118 const eventName = process.argv[2] ?? input.hook_event_name ?? "";
119
120 if (eventName === "SessionStart") {
121 handleSessionStart(input);
122 return;
123 }
124
125 if (eventName === "SessionEnd") {
126 await handleSessionEnd(input);
127 }
128}
129
130main().catch((error) => {
131 process.stderr.write(`${error instanceof Error ? error.message : String(error)}\n`);

Callers 1

Calls 3

handleSessionStartFunction · 0.85
handleSessionEndFunction · 0.85
readHookInputFunction · 0.70

Tested by

no test coverage detected