import type { ContentBlock, Message } from '../session/session-jsonl.js'; import type { Tool } from '../tools/tool-types.js'; /** * Read reasoning text from an in-progress assistant message. * * Prefers the new `Message.thinking` array (provider-native reasoning channel, * industry-standard one-shot per-turn reasoning). Falls back to extracting * `...` tag bodies from text content blocks for legacy * sessions and for upstream models that emit inline tags inside `text_delta` * (rather than via a dedicated `thinking_delta` event). */ export declare function extractThinkingTextFromMessage(thinkingChunks: ReadonlyArray | undefined, content: ContentBlock[]): string; export declare function hasAssistantThinkingHistory(messages: readonly Message[]): boolean; export declare function isThinkingOnlyAssistantTurn(params: { visibleText: string; toolCallCount: number; thinkingChunks: ReadonlyArray; assistantContent: ContentBlock[]; }): boolean; export declare function buildVisibleAssistantText(params: { textParts: ReadonlyArray; thinkingFallback: string; }): string; /** * Some reasoning models mention "I will call tool X for URL Y" in visible text * or thinking, but never emit a tool_use. These predicates decide whether the * loop should add one corrective model turn. */ export declare function shouldNudgeMissingToolInvocationFromPlan(visibleAssistantText: string, namedWebToolRe: RegExp): boolean; export declare function shouldNudgeMissingToolInvocationFromThinking(thinkingText: string, namedWebToolRe: RegExp): boolean; export type AgentLoopToolCallDraft = { id: string; name: string; input: Record; }; export declare function injectToolCallFromPlanText(params: { toolCalls: AgentLoopToolCallDraft[]; assistantContent: ContentBlock[]; turnTextParts: string[]; messageThinkingChunks: string[]; toolsForRun: Tool[]; sessionKey: string; logInfo?: (message: string, meta?: Record) => void; }): void; export declare function normalizeAssistantToolCalls(params: { toolCalls: AgentLoopToolCallDraft[]; assistantContent: ContentBlock[]; toolsForRun: Tool[]; sessionKey: string; }): void; export declare function shouldNudgeMissingToolInvocation(params: { finalText: string; messageThinkingChunks: string[]; assistantContent: ContentBlock[]; namedWebToolRe: RegExp; }): boolean; //# sourceMappingURL=agent-loop-assistant-turn.d.ts.map