import type { ToolSet } from 'ai'; export type HookExec = (command: string, options: { shell: true; input: string; timeout: number; cwd?: string; reject: false; }) => Promise<{ exitCode?: number; stdout?: unknown; stderr?: unknown; timedOut?: boolean; }>; export type HookSpec = { matcher?: string; command: string; timeoutMs?: number; }; export type ToolHooks = { preToolUse?: HookSpec[]; postToolUse?: HookSpec[]; }; export type WithHooksInit = { cwd?: string; onWarn?: (message: string) => void; exec?: HookExec; }; export declare const DEFAULT_HOOK_TIMEOUT_MS = 30000; export declare const MAX_HOOK_FEEDBACK_CHARS = 4000; export type HookBlockedResult = { ok: false; blockedByHook: true; reason: string; }; export declare function hookMatches(matcher: string | undefined, toolName: string): boolean; export declare function withHooks(tools: T, hooks: ToolHooks, init?: WithHooksInit): T;