import type { CommandPolicy, HookPayload } from '../types.mts'; import type { HookHarness } from './types.mts'; /** * What a pre-tool-use hook writes and exits with. Exit 2 is the block all four harnesses honor. * Claude, Codex, and Grok surface the stderr reason; Cursor surfaces the stdout JSON. Exit 0 with * empty stdio is no opinion. */ export type PreToolUseResult = { exitCode: 0 | 2; stderr: string; stdout: string; }; export type PreToolUseOptions = { harness?: HookHarness | undefined; /** True only when the harness marked the session attended (see isAttendedClaudeSession). */ attended?: boolean | undefined; /** See EvaluateOptions.automationContext. */ automationContext?: boolean | undefined; cwd?: string | undefined; }; export declare function preToolUseOutput(payload: HookPayload, policy: CommandPolicy | undefined, options?: PreToolUseOptions): PreToolUseResult;