import { type ModelMessage, type TelemetryOptions, type ToolSet, type TypedToolResult } from "ai"; import type { HarnessToolLookup } from "#harness/types.js"; import type { InputRequest } from "#shared/input.js"; import type { HandleEventFn } from "#harness/types.js"; type ToolResponsePart = Extract["content"][number]; export interface ApprovedCallResult { readonly part: Extract; } /** What the model reads for an approved call the turn's cancellation cut short. */ export declare const APPROVED_CALL_INTERRUPTED_MESSAGE = "The turn was cancelled while this approved tool call was running. It may have partially run; it was not retried."; /** * Runs approved local calls before the model reads their results. Like the calls a model step * runs inline, each streams its progress and result as it goes. The lifecycle owner places the * results in the steps that made the calls. */ export declare function runApprovedCalls(input: { readonly requests: readonly InputRequest[]; /** The entries of the step that asked, which the approved calls run. */ readonly tools: HarnessToolLookup; readonly approvedTools?: ReadonlySet; /** The conversation the tools read as `ctx.messages`. */ readonly messages: readonly ModelMessage[]; readonly position: { readonly sequence: number; readonly stepIndex: number; readonly turnId: string; }; readonly publish: HandleEventFn; readonly abortSignal: AbortSignal | undefined; /** The step attempt's telemetry, which hears each execution as the AI SDK reports it. */ readonly telemetry?: TelemetryOptions; }): Promise<{ readonly settled: readonly ApprovedCallResult[]; readonly toolResults: readonly TypedToolResult[]; }>; export {};