#!/usr/bin/env node /** * oh-my-codex Notification Hook * Codex CLI fires this after each agent turn via the `notify` config. * Receives JSON payload as the last argv argument. * * Responsibilities are split into sub-modules under scripts/notify-hook/: * utils.js – pure helpers (asNumber, safeString, …) * payload-parser.js – payload field extraction * state-io.js – state file I/O and normalization * process-runner.js – child-process helper * log.js – structured event logging * auto-nudge.js – stall-pattern detection and auto-nudge * tmux-injection.js – tmux prompt injection * team-dispatch.js – durable team dispatch queue consumer * team-leader-nudge.js – leader mailbox nudge * team-worker.js – worker heartbeat and idle notification */ import { type KeywordInputClassification, type RecordSkillActivationInput, type SkillActiveState } from '../hooks/keyword-detector.js'; export interface NotifySkillActivationInput { readonly stateDir: string; readonly sourceCwd: string; readonly text: string; readonly sessionId?: string; readonly threadId?: string; readonly turnId?: string; readonly payload: Record; readonly nowIso?: string; } export interface NotifySkillActivationDependencies { readonly classifyKeywordInput?: (text: string) => KeywordInputClassification; readonly recordSkillActivation?: (input: RecordSkillActivationInput) => Promise; } /** * Records prompt skill activation using one shared input classification for the * terminal-replay check and the state writer. */ export declare function recordNotifySkillActivation(input: NotifySkillActivationInput, dependencies?: NotifySkillActivationDependencies): Promise; /** * Non-fatal notify-hook boundary for shared classification and state writes. */ export declare function recordNotifySkillActivationNonFatal(input: NotifySkillActivationInput, logsDir: string, dependencies?: NotifySkillActivationDependencies): Promise; //# sourceMappingURL=notify-hook.d.ts.map