/** * Internal Hooks Types and Zod Schemas * * Validation schemas for hook configurations and runtime execution context */ import * as z from "zod"; import type { ToolCallRequest, ToolMessage } from "langchain"; /** * Zod schema for individual hook configuration */ export declare const HookSchema: z.ZodObject<{ type: z.ZodLiteral<"command">; command: z.ZodString; timeout: z.ZodDefault>; }, z.core.$strip>; /** * Zod schema for hook matcher (PreToolUse, PostToolUse) */ export declare const HookMatcherSchema: z.ZodObject<{ matcher: z.ZodOptional; hooks: z.ZodArray; command: z.ZodString; timeout: z.ZodDefault>; }, z.core.$strip>>; }, z.core.$strip>; /** * Zod schema for Stop hooks (no matcher) */ export declare const StopHookSchema: z.ZodObject<{ hooks: z.ZodArray; command: z.ZodString; timeout: z.ZodDefault>; }, z.core.$strip>>; }, z.core.$strip>; /** * Zod schema for complete hooks configuration */ export declare const HooksConfigSchema: z.ZodObject<{ PreToolUse: z.ZodOptional; hooks: z.ZodArray; command: z.ZodString; timeout: z.ZodDefault>; }, z.core.$strip>>; }, z.core.$strip>>>; PostToolUse: z.ZodOptional; hooks: z.ZodArray; command: z.ZodString; timeout: z.ZodDefault>; }, z.core.$strip>>; }, z.core.$strip>>>; Stop: z.ZodOptional; command: z.ZodString; timeout: z.ZodDefault>; }, z.core.$strip>>; }, z.core.$strip>>>; }, z.core.$strip>; /** * Hook event names */ export type HookEventName = "PreToolUse" | "PostToolUse" | "Stop"; /** * Runtime context for hook execution * Contains all data needed to execute hooks for a specific event */ export interface HookExecutionContext { /** Unique session identifier */ sessionId: string; /** Current working directory */ cwd: string; /** Tool call request (for PreToolUse/PostToolUse) */ toolCallRequest?: ToolCallRequest; /** Tool result (for PostToolUse only) */ toolResult?: ToolMessage; }