import type { ModelMessage, UserContent } from "ai";
import type { StepInput } from "#harness/types.js";
type StaleResponseConversion = {
    readonly kind: "unchanged";
    readonly stepInput?: StepInput;
} | {
    readonly displayMessage: string | UserContent;
    readonly kind: "converted";
    readonly stepInput: StepInput;
};
/**
 * A response is stale when its request ID is not in the currently pending
 * HITL batch: the request was already answered, cleared by a follow-up
 * message, or cancelled.
 *
 * Responses for pending requests stay structured; stale responses become
 * plain user-message text. A stale response never reaches structured HITL
 * processing, so a stale approval cannot authorize an earlier tool call.
 * Request details recovered from history are best-effort model context.
 */
export declare function convertStaleResponsesToUserMessage(input: {
    readonly history: readonly ModelMessage[];
    readonly pendingRequestIds: ReadonlySet<string>;
    readonly stepInput?: StepInput;
}): StaleResponseConversion;
export {};
