/** * LLM Execution Runtime * * Handles prompt building and the LLM tool loop. * Delegates provider-specific logic to ProviderAdapter implementations. */ import { type ToolFunction, type ResolvedTooledPromptConfig, type ContentPart, type PromptContent, type ResolvedSchema } from './types.js'; import type { TooledPromptEmitter } from './events.js'; import type { Store } from './store.js'; import type { Usage } from './providers/types.js'; export { parseSSEStream } from './streaming.js'; /** * Build the final prompt content from template parts and resolved values. * Returns a plain string when no images are present (zero behavior change), * or a ContentPart[] array when images exist. */ export declare function buildPromptText(strings: TemplateStringsArray, values: unknown[]): PromptContent; /** * Run the LLM tool loop until completion or max iterations. * * When schema is provided, returns T directly (throws on error). * When no schema, returns string message (throws on error). * * @param promptText - The prompt text to send to the LLM * @param tools - Array of tool functions available to the LLM * @param config - Resolved configuration (all values already merged) * @param emitter - Event emitter for streaming events * @param schema - Optional resolved schema for structured output * @param returnStore - Optional return store; when filled, the tool loop exits early * @param systemPrompt - Optional processed system prompt text * @param systemImages - Optional images extracted from system prompt * @param history - Optional previous conversation messages to prepend */ export declare function runToolLoop(promptText: PromptContent, tools: ToolFunction[], config: ResolvedTooledPromptConfig, emitter: TooledPromptEmitter, schema?: ResolvedSchema, returnStore?: Store, systemPrompt?: PromptContent, systemImages?: ContentPart[], history?: unknown[]): Promise<{ result: T; messages: unknown[]; usage?: Usage; }>; //# sourceMappingURL=executor.d.ts.map