import type { Context as PiContext, Model, StopReason, StreamFunction, ThinkingLevel } from '../../provider/pi-ai-types.js'; import type { MiniAgentEvent } from '../subagent/agent-events.js'; import type { ContentBlock, Message } from '../session/session-jsonl.js'; import type { Tool } from '../tools/tool-types.js'; import type { AgentLoopMutableState } from './agent-loop-state.js'; import type { CompactHookRegistry } from './compact-hooks.js'; import type { LoopControlSignal } from './agent-loop-context-prep.js'; import type { AgentLoopLlmUsage } from './agent-loop-types.js'; export interface ExecuteLlmTurnParams { state: AgentLoopMutableState; modelDef: Model; piContext: PiContext; streamFn: StreamFunction; apiKey?: string; temperature?: number; reasoning?: ThinkingLevel; maxLLMRetries?: number; topP?: number; abortSignal: AbortSignal; messagesForModel: Message[]; toolsForRun: Tool[]; sessionKey: string; runId: string; runStartMs: number; push: (event: MiniAgentEvent) => void; currentMessages: Message[]; prepareCompaction: (params: { messages: Message[]; sessionKey: string; runId: string; forceCompaction?: boolean; includeThinking?: boolean; abortSignal?: AbortSignal; }) => Promise<{ summary?: string; summaryMessage?: Message; messages?: Message[]; droppedMessages?: number; checkpointOutline?: string[]; usage?: AgentLoopLlmUsage[]; }>; replaceMessages?: (sessionKey: string, messages: Message[]) => Promise; compactHooks?: CompactHookRegistry; recordLlmUsage: (record: { runId: string; providerId: string; model: string; inputTokens: number; outputTokens: number; cacheReadTokens?: number; cacheCreationTokens?: number; durationMs: number; success: boolean; error?: string; }) => Promise; lastMessageNeedsToolFollowUpLlm: (messages: Message[]) => boolean; suppressVisibleDeltas?: boolean; } export interface ExecuteLlmTurnResult { control: LoopControlSignal; assistantContent: ContentBlock[]; messageThinkingChunks: string[]; toolCalls: { id: string; name: string; input: Record; }[]; turnTextParts: string[]; streamStopReason: StopReason | undefined; } export declare function executeLlmTurn(params: ExecuteLlmTurnParams): Promise; //# sourceMappingURL=agent-loop-llm-call.d.ts.map