/**
 * Generic pre-execution approval gate for tools.
 *
 * Wraps a ToolDefinition with a user-approval prompt before executing.
 */
import type { TSchema } from '@sinclair/typebox';
import type { ToolDefinition, ToolExecutionContext } from '../../core/core-types.js';
import { type ApprovalChoice, type ApprovalGate, type ApprovalRequest } from './types.js';
/** Wrap a tool with a pre-execution approval gate that prompts when policy requires it. */
export declare function withPreApproval<T extends TSchema, D>(tool: ToolDefinition<T>, approval: ApprovalGate<D>, buildRequest: (params: Record<string, unknown>, ctx: ToolExecutionContext | undefined) => ApprovalRequest<D> | Promise<ApprovalRequest<D>>, options?: {
    alwaysPrompt?: boolean;
    isContentSafe?: (params: Record<string, unknown>, ctx: ToolExecutionContext | undefined) => boolean | Promise<boolean>;
    onRequested?: (request: ApprovalRequest<D>) => void;
    onAccepted?: (request: ApprovalRequest<D>, choice: ApprovalChoice) => void;
    onRejected?: (request: ApprovalRequest<D>) => void;
    isApprovedChoiceAllowed?: (request: ApprovalRequest<D>, choice: ApprovalChoice) => boolean | Promise<boolean>;
    describeApprovedChoice?: (request: ApprovalRequest<D>, choice: ApprovalChoice) => string | undefined;
    applyApprovalContext?: (ctx: ToolExecutionContext | undefined, params: Record<string, unknown>, request: ApprovalRequest<D>, choice: ApprovalChoice) => ToolExecutionContext | undefined | Promise<ToolExecutionContext | undefined>;
}): ToolDefinition<T>;
//# sourceMappingURL=tool-approval.d.ts.map