import type { LanguageModel, Output } from 'ai'; import type { AgentRuntimeConfig } from './agent-runtime'; import type { AgentExecutionCounter, BuiltTool, JSONObject } from '../../types'; import type { AgentPersistenceOptions, ExecutionOptions } from '../../types/sdk/agent'; import type { AgentMessageList } from '../model/message-list'; import type { DeferredToolManager } from '../tools/deferred-tool-manager'; import { toAiSdkProviderTools } from '../tools/tool-adapter'; export interface StaticLoopContext { model: LanguageModel; aiProviderTools: ReturnType; reasoning: AgentRuntimeConfig['reasoning']; providerOptions?: Record; outputSpec?: ReturnType; maxOutputTokens?: number; } export declare class RuntimeContextBuilder { private readonly config; private readonly deferredToolManager; constructor(config: AgentRuntimeConfig, deferredToolManager: DeferredToolManager | undefined); get modelId(): string; buildStaticLoopContext(execOptions?: ExecutionOptions & { persistence?: AgentPersistenceOptions; }): StaticLoopContext; buildToolLoopContext(aiProviderTools: ReturnType, persistence?: AgentPersistenceOptions, executionCounter?: AgentExecutionCounter): { toolMap: Map; aiTools: { [x: string]: import("ai", { with: { "resolution-mode": "import" } }).Tool; }; hasTools: boolean; effectiveInstructions: string; volatileInstructions: string | undefined; staticToolCacheName: string | undefined; }; private getStaticToolCacheName; getCurrentTools(persistence?: AgentPersistenceOptions, executionCounter?: AgentExecutionCounter): BuiltTool[]; hydrateDeferredToolsFromList(list: AgentMessageList): void; private relaxStrictJsonSchemaIfNeeded; private createRecallMemoryToolForRun; private composeEffectiveInstructions; private buildThinkingProviderOptions; private buildCallProviderOptions; }