import type { LintSourceOptions, MinimumLevel, RulepackName, SlopSiftResult } from './index.js'; export interface StopHookEvent { session_id: string; hook_event_name: 'Stop'; stop_hook_active: boolean; last_assistant_message: string | null; turn_id?: string; transcript_path?: string | null; cwd?: string; } export interface StopHookOutput { decision?: 'block'; reason?: string; systemMessage?: string; } export interface StopHookOptions { level?: MinimumLevel; feedback?: 'compact' | 'detailed'; rulepacks?: readonly RulepackName[]; maxRetries?: number; maxFindings?: number; stateDirectory?: string; includeDirty?: boolean; includeTranscript?: boolean; transcriptPath?: string; cwd?: string; maxDirtyFiles?: number; maxTranscriptMessages?: number; } interface LintEngine { lintSource(filePath: string, source: string, options: LintSourceOptions): Promise; } /** Parse the shared Claude Code and Codex Stop-hook input contract. */ export declare function parseStopHookEvent(value: unknown): StopHookEvent; export declare function defaultStopHookStateDirectory(env?: NodeJS.ProcessEnv): string; /** * Lint one completed agent response and return the shared Claude Code/Codex * Stop-hook decision. Retry state prevents an unbounded correction loop. */ export declare function runStopHook(engine: LintEngine, event: StopHookEvent, options?: StopHookOptions): Promise; /** Convert hook runtime failures into a visible fail-open result. */ export declare function stopHookFailure(error: unknown): StopHookOutput; export {};