import type { AssistantMessage, ToolResultMessage } from "../types"; /** Runtime settings for cross-turn tool-call repetition detection. */ export interface ToolCallLoopGuardOptions { readonly threshold: number; readonly exemptTools: readonly string[]; } /** A completed assistant turn plus the tool results it produced. */ export interface ToolCallLoopTurn { readonly message: AssistantMessage; readonly toolResults: readonly ToolResultMessage[]; } /** Details needed to steer the model away from a repeated tool call. */ export interface RepeatedToolCallDetection { readonly kind: "repeated_tool_call"; readonly toolName: string; readonly count: number; readonly resultSummary: string; readonly argumentsSummary: string; } /** Detects consecutive identical assistant tool calls across model turns. */ export declare class ToolCallLoopGuard { #private; constructor(options: ToolCallLoopGuardOptions); /** Records one completed turn and returns the threshold hit, if any. */ recordTurn(turn: ToolCallLoopTurn): RepeatedToolCallDetection | null; }