import type { ModelMessage } from 'ai';
import { type HookStopResult, type NextOptions, type NextResult, type ToolResultOptions, type ToolResultResult } from './results';
import type { HookChainStateResult, HookStateAccess, StopOptions, ToolInfo } from './shared';
export interface PreToolUseHookContext extends HookStateAccess {
    toolName: string;
    toolCallId: string;
    input: Record<string, unknown>;
    tool: ToolInfo;
    getContextWindow: () => ReadonlyArray<ModelMessage>;
    next(updatedInput?: Record<string, unknown>, opts?: NextOptions): NextResult;
    toolResult(output: string, opts?: ToolResultOptions): ToolResultResult;
    stop(options?: StopOptions): HookStopResult;
}
export type PreToolUseResult = NextResult | ToolResultResult | HookStopResult;
export type PreToolUseHook = (ctx: PreToolUseHookContext) => PreToolUseResult | Promise<PreToolUseResult>;
interface PreToolUseChainInput {
    toolName: string;
    toolCallId: string;
    input: Record<string, unknown>;
    tool: ToolInfo;
    getContextWindow: () => ReadonlyArray<ModelMessage>;
    state?: Record<string, unknown>;
}
export declare function runPreToolUseHooks(hooks: PreToolUseHook[], baseCtx: PreToolUseChainInput): Promise<HookChainStateResult<PreToolUseResult>>;
export {};
//# sourceMappingURL=pre-tool-use.d.ts.map