export type HookEvent = 'pre_tool_call' | 'post_tool_call' | 'pre_llm_call' | 'post_llm_call' | 'session_start' | 'session_end'; export interface ShellHookSpec { event: HookEvent; command: string; matcher?: string; timeout: number; } export interface HookPayload { hookEventName: HookEvent; toolName?: string; toolInput?: unknown; sessionId?: string; cwd?: string; extra?: Record; } export interface HookResult { returncode: number; stdout: string; stderr: string; timedOut: boolean; elapsedMs: number; error?: string; } export interface HookDecision { action?: 'block' | 'allow'; message?: string; context?: string; } declare const DEFAULT_TIMEOUT_SECONDS = 60; declare const MAX_TIMEOUT_SECONDS = 300; interface AllowlistEntry { event: HookEvent; command: string; approvedAt: string; } export declare function resetForTests(): void; export declare function parseHooksBlock(hooksConfig: unknown): ShellHookSpec[]; export declare function registerHooks(specs: ShellHookSpec[]): void; export declare function getRegisteredHooks(): ShellHookSpec[]; export declare function iterConfiguredHooks(hooksConfig: unknown): ShellHookSpec[]; export declare function runHooksForEvent(event: HookEvent, payload: Omit): HookDecision[]; export declare function loadAllowlist(hermesHome: string): AllowlistEntry[]; export declare function saveAllowlist(entries: AllowlistEntry[]): void; export declare function isAllowlisted(event: HookEvent, command: string, hermesHome: string): boolean; export declare function recordApproval(event: HookEvent, command: string, hermesHome: string): void; export declare function revokeApproval(command: string, hermesHome: string): void; export declare function scriptIsExecutable(command: string): boolean; export { DEFAULT_TIMEOUT_SECONDS, MAX_TIMEOUT_SECONDS }; //# sourceMappingURL=shell-hooks.d.ts.map