import { AgentRunContext } from "../agent-types.js";

//#region src/domains/run/agents/tools/tool-approval.d.ts
declare function waitForToolApproval(ctx: AgentRunContext, toolCallId: string, toolName: string, args: unknown, providerMetadata: unknown): Promise<{
  approved: false;
  deniedResult: unknown;
} | {
  approved: true;
} | {
  approved: 'pending';
}>;
declare function recordDenial(ctx: AgentRunContext, toolName: string, toolCallId: string, reason: string | undefined): void;
declare function parseAndCheckApproval<T>(ctx: AgentRunContext, toolName: string, toolCallId: string, args: T, providerMetadata: unknown, needsApproval: boolean): Promise<{
  args: T;
  denied: false;
  pendingApproval?: true;
} | {
  args: T;
  denied: true;
  result: unknown;
}>;
//#endregion
export { parseAndCheckApproval, recordDenial, waitForToolApproval };