import type { StopReason } 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, ToolContext } from '../tools/tool-types.js'; import type { ToolHookRegistry } from '../tools/tool-hooks.js'; import type { AgentLoopMutableState } from './agent-loop-state.js'; import type { ToolLoopGuardState } from '../tools/tool-loop-guard.js'; import type { LoopControlSignal } from './agent-loop-context-prep.js'; import type { AgentLoopExtensions } from './agent-loop-types.js'; import type { PendingToolAbortStore } from './pending-tool-aborts.js'; export interface ProcessLlmResponseParams { state: AgentLoopMutableState; runId: string; assistantContent: ContentBlock[]; messageThinkingChunks: string[]; toolCalls: { id: string; name: string; input: Record; }[]; turnTextParts: string[]; streamStopReason: StopReason | undefined; maxTurns: number; maxOutputContinuations: number; abortSignal: AbortSignal; isQuiet: boolean; sessionKey: string; currentMessages: Message[]; assistantBuffer: Message[]; resolveToolsForRun: () => Tool[]; toolCtx: ToolContext; toolHooks?: ToolHookRegistry; toolTimeoutMs: number; toolHeartbeatIntervalMs: number; skipHeartbeatToolNames: Set; parallelSafeTools: Set; loadToolsMetaName?: string; toolLoopGuard: ToolLoopGuardState; maxToolCalls?: number; checkToolApproval?: (call: { id: string; name: string; input: unknown; abortSignal: AbortSignal; }) => Promise<{ approved: boolean; decision: string; } | null>; guardAssistantOutput?: (request: { sessionKey: string; runId: string; turn: number; response: string; stopReason?: string; }) => Promise<{ approved: true; response?: string; } | { approved: false; reason: string; response?: string; }>; completionGate?: AgentLoopExtensions['completionGate']; delayedVisibleDeltas?: boolean; toolAbortSignalFor?: (toolCallId: string) => AbortSignal | undefined; enrichToolContext?: (baseCtx: ToolContext, sessionKey: string) => ToolContext; evaluateSteering: () => Message[]; appendMessage: (sessionKey: string, msg: Message) => Promise; push: (event: MiniAgentEvent) => void; buildCorrectionMessage: (systemText: string) => Message; pendingToolAborts: PendingToolAbortStore; } export interface ProcessLlmResponseResult { control: LoopControlSignal; } export declare function processLlmResponse(params: ProcessLlmResponseParams): Promise; //# sourceMappingURL=agent-loop-response.d.ts.map