@iqai/adk 0.1.4 → 0.1.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.mts CHANGED
@@ -1,5 +1,6 @@
1
1
  import { Part, Content as Content$1, Blob, SpeechConfig, AudioTranscriptionConfig, RealtimeInputConfig, ProactivityConfig, GenerateContentConfig, LiveConnectConfig, GroundingMetadata, GenerateContentResponseUsageMetadata, GoogleGenAI, FunctionCall } from '@google/genai';
2
2
  export { Blob, Content } from '@google/genai';
3
+ import { LanguageModel } from 'ai';
3
4
  import { Client } from '@modelcontextprotocol/sdk/client/index.js';
4
5
  import { CreateMessageRequestSchema, CreateMessageResultSchema, Tool } from '@modelcontextprotocol/sdk/types.js';
5
6
  import { z } from 'zod';
@@ -7,6 +8,29 @@ import { Kysely, Generated } from 'kysely';
7
8
  import { StorageOptions } from '@google-cloud/storage';
8
9
  import { Tracer } from '@opentelemetry/api';
9
10
 
11
+ interface LoggerOpts {
12
+ name: string;
13
+ }
14
+ declare class Logger {
15
+ name: string;
16
+ isDebugEnabled: boolean;
17
+ constructor({ name }: LoggerOpts);
18
+ private colorize;
19
+ debug(message: string, ...args: any[]): void;
20
+ info(message: string, ...args: any[]): void;
21
+ warn(message: string, ...args: any[]): void;
22
+ error(message: string, ...args: any[]): void;
23
+ /**
24
+ * Logs structured data in a visually appealing table format.
25
+ * Uses vertical layout for better readability and respects debug settings.
26
+ */
27
+ debugStructured(title: string, data: Record<string, any>): void;
28
+ /**
29
+ * Logs array data in a compact, readable format.
30
+ */
31
+ debugArray(title: string, items: Array<Record<string, any>>): void;
32
+ }
33
+
10
34
  /**
11
35
  * JSON Schema type for function parameters
12
36
  */
@@ -816,6 +840,7 @@ declare abstract class BaseTool {
816
840
  * Maximum delay for retry in ms
817
841
  */
818
842
  maxRetryDelay: number;
843
+ protected logger: Logger;
819
844
  /**
820
845
  * Constructor for BaseTool
821
846
  */
@@ -983,7 +1008,7 @@ declare function createFunctionTool(func: (...args: any[]) => any, options?: {
983
1008
  * Simple GoogleSearch tool implementation
984
1009
  */
985
1010
  declare class GoogleSearch extends BaseTool {
986
- private logger;
1011
+ protected logger: Logger;
987
1012
  /**
988
1013
  * Constructor for GoogleSearch
989
1014
  */
@@ -1126,7 +1151,7 @@ declare class UserInteractionTool extends BaseTool {
1126
1151
  * Tool that allows an agent to exit the current execution loop
1127
1152
  */
1128
1153
  declare class ExitLoopTool extends BaseTool {
1129
- private logger;
1154
+ protected logger: Logger;
1130
1155
  /**
1131
1156
  * Constructor for ExitLoopTool
1132
1157
  */
@@ -1141,7 +1166,7 @@ declare class ExitLoopTool extends BaseTool {
1141
1166
  * Tool that allows an agent to get a choice from the user
1142
1167
  */
1143
1168
  declare class GetUserChoiceTool extends BaseTool {
1144
- private logger;
1169
+ protected logger: Logger;
1145
1170
  /**
1146
1171
  * Constructor for GetUserChoiceTool
1147
1172
  */
@@ -1165,7 +1190,7 @@ declare class GetUserChoiceTool extends BaseTool {
1165
1190
  * Tool that allows an agent to transfer control to another agent
1166
1191
  */
1167
1192
  declare class TransferToAgentTool extends BaseTool {
1168
- private logger;
1193
+ protected logger: Logger;
1169
1194
  /**
1170
1195
  * Constructor for TransferToAgentTool
1171
1196
  */
@@ -1182,7 +1207,7 @@ declare class TransferToAgentTool extends BaseTool {
1182
1207
  * Tool that allows an agent to load memories relevant to a query
1183
1208
  */
1184
1209
  declare class LoadMemoryTool extends BaseTool {
1185
- private logger;
1210
+ protected logger: Logger;
1186
1211
  /**
1187
1212
  * Constructor for LoadMemoryTool
1188
1213
  */
@@ -1307,7 +1332,7 @@ declare class McpClientService {
1307
1332
  private transport;
1308
1333
  private isClosing;
1309
1334
  private mcpSamplingHandler;
1310
- private logger;
1335
+ protected logger: Logger;
1311
1336
  constructor(config: McpConfig);
1312
1337
  /**
1313
1338
  * Initializes and returns an MCP client based on configuration.
@@ -1378,7 +1403,7 @@ declare function mcpSchemaToParameters(mcpTool: Tool): JSONSchema;
1378
1403
  * between MCP format and ADK format
1379
1404
  */
1380
1405
  declare class McpSamplingHandler {
1381
- private logger;
1406
+ protected logger: Logger;
1382
1407
  private samplingHandler;
1383
1408
  constructor(samplingHandler: SamplingHandler);
1384
1409
  /**
@@ -1442,8 +1467,8 @@ declare function createSamplingHandler(handler: SamplingHandler): SamplingHandle
1442
1467
  * ```typescript
1443
1468
  * // Old verbose way:
1444
1469
  * const toolset = new McpToolset({
1445
- * name: "Near Intent Swaps MCP Client",
1446
- * description: "Client for Near Intent Swaps",
1470
+ * name: "Near Intents Swaps MCP Client",
1471
+ * description: "Client for Near Intents Swaps",
1447
1472
  * debug: env.DEBUG,
1448
1473
  * retryOptions: { maxRetries: 2, initialDelay: 200 },
1449
1474
  * transport: {
@@ -1590,7 +1615,7 @@ declare function McpIqWiki(config?: McpServerConfig): McpToolset;
1590
1615
  */
1591
1616
  declare function McpNearAgent(config?: McpServerConfig): McpToolset;
1592
1617
  /**
1593
- * MCP NEAR Intent Swaps - NEAR Protocol intent swaps functionality
1618
+ * MCP Near Intents Swaps - NEAR Protocol intent swaps functionality
1594
1619
  *
1595
1620
  * Required env vars: ACCOUNT_ID, ACCOUNT_KEY
1596
1621
  * Optional env vars: NEAR_NETWORK_ID, NEAR_NODE_URL, NEAR_GAS_LIMIT
@@ -1608,6 +1633,12 @@ declare function McpOdos(config?: McpServerConfig): McpToolset;
1608
1633
  * Required env vars: TELEGRAM_BOT_TOKEN
1609
1634
  */
1610
1635
  declare function McpTelegram(config?: McpServerConfig): McpToolset;
1636
+ /**
1637
+ * MCP CoinGecko - Access cryptocurrency market data and analytics
1638
+ *
1639
+ * Optional env vars: COINGECKO_PRO_API_KEY, COINGECKO_DEMO_API_KEY, COINGECKO_ENVIRONMENT
1640
+ */
1641
+ declare function McpCoinGecko(config?: McpServerConfig): McpToolset;
1611
1642
  /**
1612
1643
  * Popular third-party MCP servers
1613
1644
  * These can be added as we expand support for community MCP servers
@@ -1725,6 +1756,7 @@ declare const index$6_LoadMemoryTool: typeof LoadMemoryTool;
1725
1756
  declare const index$6_McpAbi: typeof McpAbi;
1726
1757
  declare const index$6_McpAtp: typeof McpAtp;
1727
1758
  declare const index$6_McpBamm: typeof McpBamm;
1759
+ declare const index$6_McpCoinGecko: typeof McpCoinGecko;
1728
1760
  type index$6_McpConfig = McpConfig;
1729
1761
  type index$6_McpError = McpError;
1730
1762
  declare const index$6_McpError: typeof McpError;
@@ -1764,7 +1796,7 @@ declare const index$6_jsonSchemaToDeclaration: typeof jsonSchemaToDeclaration;
1764
1796
  declare const index$6_mcpSchemaToParameters: typeof mcpSchemaToParameters;
1765
1797
  declare const index$6_normalizeJsonSchema: typeof normalizeJsonSchema;
1766
1798
  declare namespace index$6 {
1767
- export { index$6_BaseTool as BaseTool, type index$6_BuildFunctionDeclarationOptions as BuildFunctionDeclarationOptions, index$6_ExitLoopTool as ExitLoopTool, index$6_FileOperationsTool as FileOperationsTool, index$6_FunctionTool as FunctionTool, index$6_GetUserChoiceTool as GetUserChoiceTool, index$6_GoogleSearch as GoogleSearch, index$6_HttpRequestTool as HttpRequestTool, index$6_LoadArtifactsTool as LoadArtifactsTool, index$6_LoadMemoryTool as LoadMemoryTool, index$6_McpAbi as McpAbi, index$6_McpAtp as McpAtp, index$6_McpBamm as McpBamm, type index$6_McpConfig as McpConfig, index$6_McpError as McpError, index$6_McpErrorType as McpErrorType, index$6_McpFilesystem as McpFilesystem, index$6_McpFraxlend as McpFraxlend, index$6_McpGeneric as McpGeneric, index$6_McpIqWiki as McpIqWiki, index$6_McpMemory as McpMemory, index$6_McpNearAgent as McpNearAgent, index$6_McpNearIntentSwaps as McpNearIntentSwaps, index$6_McpOdos as McpOdos, index$6_McpSamplingHandler as McpSamplingHandler, type index$6_McpSamplingRequest as McpSamplingRequest, type index$6_McpSamplingResponse as McpSamplingResponse, type index$6_McpServerConfig as McpServerConfig, index$6_McpTelegram as McpTelegram, index$6_McpToolset as McpToolset, type index$6_McpTransportType as McpTransportType, type index$6_SamplingHandler as SamplingHandler, type index$6_ToolConfig as ToolConfig, index$6_ToolContext as ToolContext, index$6_TransferToAgentTool as TransferToAgentTool, index$6_UserInteractionTool as UserInteractionTool, index$6_adkToMcpToolType as adkToMcpToolType, index$6_buildFunctionDeclaration as buildFunctionDeclaration, index$6_createFunctionTool as createFunctionTool, index$6_createSamplingHandler as createSamplingHandler, index$6_getMcpTools as getMcpTools, index$6_jsonSchemaToDeclaration as jsonSchemaToDeclaration, index$6_mcpSchemaToParameters as mcpSchemaToParameters, index$6_normalizeJsonSchema as normalizeJsonSchema };
1799
+ export { index$6_BaseTool as BaseTool, type index$6_BuildFunctionDeclarationOptions as BuildFunctionDeclarationOptions, index$6_ExitLoopTool as ExitLoopTool, index$6_FileOperationsTool as FileOperationsTool, index$6_FunctionTool as FunctionTool, index$6_GetUserChoiceTool as GetUserChoiceTool, index$6_GoogleSearch as GoogleSearch, index$6_HttpRequestTool as HttpRequestTool, index$6_LoadArtifactsTool as LoadArtifactsTool, index$6_LoadMemoryTool as LoadMemoryTool, index$6_McpAbi as McpAbi, index$6_McpAtp as McpAtp, index$6_McpBamm as McpBamm, index$6_McpCoinGecko as McpCoinGecko, type index$6_McpConfig as McpConfig, index$6_McpError as McpError, index$6_McpErrorType as McpErrorType, index$6_McpFilesystem as McpFilesystem, index$6_McpFraxlend as McpFraxlend, index$6_McpGeneric as McpGeneric, index$6_McpIqWiki as McpIqWiki, index$6_McpMemory as McpMemory, index$6_McpNearAgent as McpNearAgent, index$6_McpNearIntentSwaps as McpNearIntentSwaps, index$6_McpOdos as McpOdos, index$6_McpSamplingHandler as McpSamplingHandler, type index$6_McpSamplingRequest as McpSamplingRequest, type index$6_McpSamplingResponse as McpSamplingResponse, type index$6_McpServerConfig as McpServerConfig, index$6_McpTelegram as McpTelegram, index$6_McpToolset as McpToolset, type index$6_McpTransportType as McpTransportType, type index$6_SamplingHandler as SamplingHandler, type index$6_ToolConfig as ToolConfig, index$6_ToolContext as ToolContext, index$6_TransferToAgentTool as TransferToAgentTool, index$6_UserInteractionTool as UserInteractionTool, index$6_adkToMcpToolType as adkToMcpToolType, index$6_buildFunctionDeclaration as buildFunctionDeclaration, index$6_createFunctionTool as createFunctionTool, index$6_createSamplingHandler as createSamplingHandler, index$6_getMcpTools as getMcpTools, index$6_jsonSchemaToDeclaration as jsonSchemaToDeclaration, index$6_mcpSchemaToParameters as mcpSchemaToParameters, index$6_normalizeJsonSchema as normalizeJsonSchema };
1768
1800
  }
1769
1801
 
1770
1802
  /**
@@ -1912,6 +1944,10 @@ declare class LlmResponse {
1912
1944
  * Reason why the model finished generating.
1913
1945
  */
1914
1946
  finishReason?: string;
1947
+ /**
1948
+ * Error object if the response is an error.
1949
+ */
1950
+ error?: Error;
1915
1951
  /**
1916
1952
  * Creates a new LlmResponse.
1917
1953
  */
@@ -1923,6 +1959,19 @@ declare class LlmResponse {
1923
1959
  * @returns The LlmResponse.
1924
1960
  */
1925
1961
  static create(generateContentResponse: GenerateContentResponse): LlmResponse;
1962
+ /**
1963
+ * Creates an LlmResponse from an error.
1964
+ *
1965
+ * @param error The error object or message.
1966
+ * @param options Additional options for the error response.
1967
+ * @param options.errorCode A specific error code for the response.
1968
+ * @param options.model The model that was being used when the error occurred.
1969
+ * @returns The LlmResponse.
1970
+ */
1971
+ static fromError(error: unknown, options?: {
1972
+ errorCode?: string;
1973
+ model?: string;
1974
+ }): LlmResponse;
1926
1975
  }
1927
1976
 
1928
1977
  /**
@@ -1978,6 +2027,7 @@ declare abstract class BaseLlm {
1978
2027
  * The name of the LLM, e.g. gemini-1.5-flash or gemini-1.5-flash-001.
1979
2028
  */
1980
2029
  model: string;
2030
+ protected logger: Logger;
1981
2031
  /**
1982
2032
  * Constructor for BaseLlm
1983
2033
  */
@@ -2035,7 +2085,6 @@ declare class GoogleLlm extends BaseLlm {
2035
2085
  private _liveApiClient?;
2036
2086
  private _apiBackend?;
2037
2087
  private _trackingHeaders?;
2038
- private logger;
2039
2088
  /**
2040
2089
  * Constructor for Gemini
2041
2090
  */
@@ -2076,14 +2125,6 @@ declare class GoogleLlm extends BaseLlm {
2076
2125
  * Builds function declaration log string.
2077
2126
  */
2078
2127
  private buildFunctionDeclarationLog;
2079
- /**
2080
- * Builds request log string.
2081
- */
2082
- private buildRequestLog;
2083
- /**
2084
- * Builds response log string.
2085
- */
2086
- private buildResponseLog;
2087
2128
  /**
2088
2129
  * Provides the api client.
2089
2130
  */
@@ -2111,6 +2152,7 @@ declare class GoogleLlm extends BaseLlm {
2111
2152
  */
2112
2153
  declare class AnthropicLlm extends BaseLlm {
2113
2154
  private _client?;
2155
+ protected logger: Logger;
2114
2156
  /**
2115
2157
  * Constructor for Anthropic LLM
2116
2158
  */
@@ -2233,17 +2275,48 @@ declare class OpenAiLlm extends BaseLlm {
2233
2275
  */
2234
2276
  private hasInlineData;
2235
2277
  /**
2236
- * Build request log string for debugging (similar to Google LLM)
2278
+ * Gets the OpenAI client
2237
2279
  */
2238
- private buildRequestLog;
2280
+ private get client();
2281
+ }
2282
+
2283
+ /**
2284
+ * AI SDK integration that accepts a pre-configured LanguageModel.
2285
+ * Enables ADK to work with any provider supported by Vercel's AI SDK.
2286
+ */
2287
+ declare class AiSdkLlm extends BaseLlm {
2288
+ private modelInstance;
2289
+ protected logger: Logger;
2239
2290
  /**
2240
- * Build response log string for debugging (similar to Google LLM)
2291
+ * Constructor accepts a pre-configured LanguageModel instance
2292
+ * @param model - Pre-configured LanguageModel from provider(modelName)
2241
2293
  */
2242
- private buildResponseLog;
2294
+ constructor(modelInstance: LanguageModel);
2243
2295
  /**
2244
- * Gets the OpenAI client
2296
+ * Returns empty array - following Python ADK pattern
2245
2297
  */
2246
- private get client();
2298
+ static supportedModels(): string[];
2299
+ protected generateContentAsyncImpl(request: LlmRequest, stream?: boolean): AsyncGenerator<LlmResponse, void, unknown>;
2300
+ /**
2301
+ * Convert ADK LlmRequest to AI SDK CoreMessage format
2302
+ */
2303
+ private convertToAiSdkMessages;
2304
+ /**
2305
+ * Convert ADK tools to AI SDK tools format
2306
+ */
2307
+ private convertToAiSdkTools;
2308
+ /**
2309
+ * Convert ADK Content to AI SDK CoreMessage
2310
+ */
2311
+ private contentToAiSdkMessage;
2312
+ /**
2313
+ * Map ADK role to AI SDK role
2314
+ */
2315
+ private mapRole;
2316
+ /**
2317
+ * Map AI SDK finish reason to ADK finish reason
2318
+ */
2319
+ private mapFinishReason;
2247
2320
  }
2248
2321
 
2249
2322
  /**
@@ -2261,6 +2334,7 @@ declare class LLMRegistry {
2261
2334
  * Map of model name regex to LLM class
2262
2335
  */
2263
2336
  private static llmRegistry;
2337
+ private static logger;
2264
2338
  /**
2265
2339
  * Creates a new LLM instance
2266
2340
  *
@@ -2793,6 +2867,8 @@ declare class OAuth2Credential extends AuthCredential {
2793
2867
  * Models module exports - consolidated to match Python structure
2794
2868
  */
2795
2869
 
2870
+ type index$5_AiSdkLlm = AiSdkLlm;
2871
+ declare const index$5_AiSdkLlm: typeof AiSdkLlm;
2796
2872
  type index$5_AnthropicLlm = AnthropicLlm;
2797
2873
  declare const index$5_AnthropicLlm: typeof AnthropicLlm;
2798
2874
  type index$5_ApiKeyCredential = ApiKeyCredential;
@@ -2850,7 +2926,7 @@ declare const index$5_State: typeof State;
2850
2926
  type index$5_ThinkingConfig = ThinkingConfig;
2851
2927
  declare const index$5_registerProviders: typeof registerProviders;
2852
2928
  declare namespace index$5 {
2853
- export { index$5_AnthropicLlm as AnthropicLlm, index$5_ApiKeyCredential as ApiKeyCredential, index$5_ApiKeyScheme as ApiKeyScheme, index$5_AuthConfig as AuthConfig, index$5_AuthCredential as AuthCredential, index$5_AuthCredentialType as AuthCredentialType, index$5_AuthHandler as AuthHandler, index$5_AuthScheme as AuthScheme, index$5_AuthSchemeType as AuthSchemeType, index$5_BaseLLMConnection as BaseLLMConnection, index$5_BaseLlm as BaseLlm, type index$5_BaseMemoryService as BaseMemoryService, index$5_BasicAuthCredential as BasicAuthCredential, index$5_BearerTokenCredential as BearerTokenCredential, index$5_Blob as Blob, Content$1 as Content, type index$5_FunctionDeclaration as FunctionDeclaration, index$5_GoogleLlm as GoogleLlm, index$5_HttpScheme as HttpScheme, type index$5_JSONSchema as JSONSchema, index$5_LLMRegistry as LLMRegistry, index$5_LlmRequest as LlmRequest, index$5_LlmResponse as LlmResponse, index$5_OAuth2Credential as OAuth2Credential, index$5_OAuth2Scheme as OAuth2Scheme, type index$5_OAuthFlow as OAuthFlow, type index$5_OAuthFlows as OAuthFlows, index$5_OpenAiLlm as OpenAiLlm, index$5_OpenIdConnectScheme as OpenIdConnectScheme, type index$5_SearchMemoryResponse as SearchMemoryResponse, type index$5_Session as Session, index$5_State as State, type index$5_ThinkingConfig as ThinkingConfig, index$5_registerProviders as registerProviders };
2929
+ export { index$5_AiSdkLlm as AiSdkLlm, index$5_AnthropicLlm as AnthropicLlm, index$5_ApiKeyCredential as ApiKeyCredential, index$5_ApiKeyScheme as ApiKeyScheme, index$5_AuthConfig as AuthConfig, index$5_AuthCredential as AuthCredential, index$5_AuthCredentialType as AuthCredentialType, index$5_AuthHandler as AuthHandler, index$5_AuthScheme as AuthScheme, index$5_AuthSchemeType as AuthSchemeType, index$5_BaseLLMConnection as BaseLLMConnection, index$5_BaseLlm as BaseLlm, type index$5_BaseMemoryService as BaseMemoryService, index$5_BasicAuthCredential as BasicAuthCredential, index$5_BearerTokenCredential as BearerTokenCredential, index$5_Blob as Blob, Content$1 as Content, type index$5_FunctionDeclaration as FunctionDeclaration, index$5_GoogleLlm as GoogleLlm, index$5_HttpScheme as HttpScheme, type index$5_JSONSchema as JSONSchema, index$5_LLMRegistry as LLMRegistry, index$5_LlmRequest as LlmRequest, index$5_LlmResponse as LlmResponse, index$5_OAuth2Credential as OAuth2Credential, index$5_OAuth2Scheme as OAuth2Scheme, type index$5_OAuthFlow as OAuthFlow, type index$5_OAuthFlows as OAuthFlows, index$5_OpenAiLlm as OpenAiLlm, index$5_OpenIdConnectScheme as OpenIdConnectScheme, type index$5_SearchMemoryResponse as SearchMemoryResponse, type index$5_Session as Session, index$5_State as State, type index$5_ThinkingConfig as ThinkingConfig, index$5_registerProviders as registerProviders };
2854
2930
  }
2855
2931
 
2856
2932
  /**
@@ -3084,6 +3160,101 @@ declare abstract class BaseAgent {
3084
3160
  private setParentAgentForSubAgents;
3085
3161
  }
3086
3162
 
3163
+ interface File {
3164
+ /** The name of the file with file extension (e.g., "file.csv") */
3165
+ name: string;
3166
+ /** The base64-encoded bytes of the file content */
3167
+ content: string;
3168
+ /** The mime type of the file (e.g., "image/png") */
3169
+ mimeType: string;
3170
+ }
3171
+ interface CodeExecutionInput {
3172
+ /** The code to execute */
3173
+ code: string;
3174
+ /** The input files available to the code */
3175
+ inputFiles: File[];
3176
+ /** The execution ID for the stateful code execution */
3177
+ executionId?: string;
3178
+ }
3179
+ interface CodeExecutionResult {
3180
+ /** The standard output of the code execution */
3181
+ stdout: string;
3182
+ /** The standard error of the code execution */
3183
+ stderr: string;
3184
+ /** The output files from the code execution */
3185
+ outputFiles: File[];
3186
+ }
3187
+ declare class CodeExecutionUtils {
3188
+ /**
3189
+ * Gets the file content as a base64-encoded string
3190
+ */
3191
+ static getEncodedFileContent(data: string | ArrayBuffer): string;
3192
+ private static isBase64Encoded;
3193
+ /**
3194
+ * Extracts the first code block from the content and truncates everything after it
3195
+ */
3196
+ static extractCodeAndTruncateContent(content: Content$1, codeBlockDelimiters: Array<[string, string]>): string | null;
3197
+ private static escapeRegex;
3198
+ /**
3199
+ * Builds an executable code part with code string
3200
+ */
3201
+ static buildExecutableCodePart(code: string): Part;
3202
+ /**
3203
+ * Builds the code execution result part from the code execution result
3204
+ */
3205
+ static buildCodeExecutionResultPart(codeExecutionResult: CodeExecutionResult): Part;
3206
+ /**
3207
+ * Converts the code execution parts to text parts in a Content
3208
+ */
3209
+ static convertCodeExecutionParts(content: Content$1, codeBlockDelimiter: [string, string], executionResultDelimiters: [string, string]): void;
3210
+ }
3211
+
3212
+ interface BaseCodeExecutorConfig {
3213
+ /**
3214
+ * If true, extract and process data files from the model request
3215
+ * and attach them to the code executor.
3216
+ * Supported data file MimeTypes are [text/csv].
3217
+ * Default to false.
3218
+ */
3219
+ optimizeDataFile?: boolean;
3220
+ /**
3221
+ * Whether the code executor is stateful. Default to false.
3222
+ */
3223
+ stateful?: boolean;
3224
+ /**
3225
+ * The number of attempts to retry on consecutive code execution errors.
3226
+ * Default to 2.
3227
+ */
3228
+ errorRetryAttempts?: number;
3229
+ /**
3230
+ * The list of the enclosing delimiters to identify the code blocks.
3231
+ * For example, the delimiter ['```python\n', '\n```'] can be
3232
+ * used to identify code blocks with the following format:
3233
+ *
3234
+ * ```python
3235
+ * print("hello")
3236
+ * ```
3237
+ */
3238
+ codeBlockDelimiters?: Array<[string, string]>;
3239
+ /**
3240
+ * The delimiters to format the code execution result.
3241
+ */
3242
+ executionResultDelimiters?: [string, string];
3243
+ }
3244
+ declare abstract class BaseCodeExecutor {
3245
+ protected readonly config: Required<BaseCodeExecutorConfig>;
3246
+ constructor(config?: BaseCodeExecutorConfig);
3247
+ /**
3248
+ * Executes code and returns the code execution result.
3249
+ */
3250
+ abstract executeCode(invocationContext: InvocationContext, codeExecutionInput: CodeExecutionInput): Promise<CodeExecutionResult>;
3251
+ get optimizeDataFile(): boolean;
3252
+ get stateful(): boolean;
3253
+ get errorRetryAttempts(): number;
3254
+ get codeBlockDelimiters(): Array<[string, string]>;
3255
+ get executionResultDelimiters(): [string, string];
3256
+ }
3257
+
3087
3258
  /**
3088
3259
  * Abstract base class for all planners.
3089
3260
  *
@@ -3119,7 +3290,7 @@ type ToolUnion = BaseTool | ((...args: any[]) => any);
3119
3290
  /**
3120
3291
  * Configuration for LlmAgent
3121
3292
  */
3122
- interface LlmAgentConfig {
3293
+ interface LlmAgentConfig<T extends BaseLlm = BaseLlm> {
3123
3294
  /**
3124
3295
  * Name of the agent
3125
3296
  */
@@ -3132,7 +3303,7 @@ interface LlmAgentConfig {
3132
3303
  * The LLM model to use
3133
3304
  * When not set, the agent will inherit the model from its ancestor
3134
3305
  */
3135
- model?: string | BaseLlm;
3306
+ model?: string | T | LanguageModel;
3136
3307
  /**
3137
3308
  * Instructions for the LLM model, guiding the agent's behavior
3138
3309
  */
@@ -3146,6 +3317,10 @@ interface LlmAgentConfig {
3146
3317
  * Tools available to this agent
3147
3318
  */
3148
3319
  tools?: ToolUnion[];
3320
+ /**
3321
+ * Code executor for this agent
3322
+ */
3323
+ codeExecutor?: BaseCodeExecutor;
3149
3324
  /**
3150
3325
  * Disallows LLM-controlled transferring to the parent agent
3151
3326
  */
@@ -3205,12 +3380,12 @@ interface LlmAgentConfig {
3205
3380
  /**
3206
3381
  * LLM-based Agent
3207
3382
  */
3208
- declare class LlmAgent extends BaseAgent {
3383
+ declare class LlmAgent<T extends BaseLlm = BaseLlm> extends BaseAgent {
3209
3384
  /**
3210
3385
  * The model to use for the agent
3211
3386
  * When not set, the agent will inherit the model from its ancestor
3212
3387
  */
3213
- model: string | BaseLlm;
3388
+ model: string | T | LanguageModel;
3214
3389
  /**
3215
3390
  * Instructions for the LLM model, guiding the agent's behavior
3216
3391
  */
@@ -3224,6 +3399,10 @@ declare class LlmAgent extends BaseAgent {
3224
3399
  * Tools available to this agent
3225
3400
  */
3226
3401
  tools: ToolUnion[];
3402
+ /**
3403
+ * Code executor for this agent
3404
+ */
3405
+ codeExecutor?: BaseCodeExecutor;
3227
3406
  /**
3228
3407
  * Disallows LLM-controlled transferring to the parent agent
3229
3408
  */
@@ -3276,11 +3455,11 @@ declare class LlmAgent extends BaseAgent {
3276
3455
  * The output schema when agent replies
3277
3456
  */
3278
3457
  outputSchema?: any;
3279
- private logger;
3458
+ protected logger: Logger;
3280
3459
  /**
3281
3460
  * Constructor for LlmAgent
3282
3461
  */
3283
- constructor(config: LlmAgentConfig);
3462
+ constructor(config: LlmAgentConfig<T>);
3284
3463
  /**
3285
3464
  * The resolved model field as BaseLLM
3286
3465
  * This method is only for use by Agent Development Kit
@@ -3515,7 +3694,7 @@ declare class LangGraphAgent extends BaseAgent {
3515
3694
  * Results from node executions
3516
3695
  */
3517
3696
  private results;
3518
- private logger;
3697
+ protected logger: Logger;
3519
3698
  /**
3520
3699
  * Constructor for LangGraphAgent
3521
3700
  */
@@ -3576,7 +3755,7 @@ declare class LangGraphAgent extends BaseAgent {
3576
3755
  * processing, event generation, and interaction with various services like
3577
3756
  * artifact storage, session management, and memory.
3578
3757
  */
3579
- declare class Runner {
3758
+ declare class Runner<T extends BaseAgent = BaseAgent> {
3580
3759
  /**
3581
3760
  * The app name of the runner.
3582
3761
  */
@@ -3584,7 +3763,7 @@ declare class Runner {
3584
3763
  /**
3585
3764
  * The root agent to run.
3586
3765
  */
3587
- agent: BaseAgent;
3766
+ agent: T;
3588
3767
  /**
3589
3768
  * The artifact service for the runner.
3590
3769
  */
@@ -3597,12 +3776,13 @@ declare class Runner {
3597
3776
  * The memory service for the runner.
3598
3777
  */
3599
3778
  memoryService?: BaseMemoryService;
3779
+ protected logger: Logger;
3600
3780
  /**
3601
3781
  * Initializes the Runner.
3602
3782
  */
3603
3783
  constructor({ appName, agent, artifactService, sessionService, memoryService, }: {
3604
3784
  appName: string;
3605
- agent: BaseAgent;
3785
+ agent: T;
3606
3786
  artifactService?: BaseArtifactService;
3607
3787
  sessionService: BaseSessionService;
3608
3788
  memoryService?: BaseMemoryService;
@@ -3647,7 +3827,7 @@ declare class Runner {
3647
3827
  /**
3648
3828
  * An in-memory Runner for testing and development.
3649
3829
  */
3650
- declare class InMemoryRunner extends Runner {
3830
+ declare class InMemoryRunner<T extends BaseAgent = BaseAgent> extends Runner<T> {
3651
3831
  /**
3652
3832
  * Deprecated. Please don't use. The in-memory session service for the runner.
3653
3833
  */
@@ -3655,7 +3835,7 @@ declare class InMemoryRunner extends Runner {
3655
3835
  /**
3656
3836
  * Initializes the InMemoryRunner.
3657
3837
  */
3658
- constructor(agent: BaseAgent, { appName }?: {
3838
+ constructor(agent: T, { appName }?: {
3659
3839
  appName?: string;
3660
3840
  });
3661
3841
  }
@@ -3665,7 +3845,7 @@ declare class InMemoryRunner extends Runner {
3665
3845
  */
3666
3846
  interface AgentBuilderConfig {
3667
3847
  name: string;
3668
- model?: string;
3848
+ model?: string | BaseLlm | LanguageModel;
3669
3849
  description?: string;
3670
3850
  instruction?: string;
3671
3851
  tools?: BaseTool[];
@@ -3724,6 +3904,10 @@ type AgentType = "llm" | "sequential" | "parallel" | "loop" | "langgraph";
3724
3904
  * .withModel("gemini-2.5-flash")
3725
3905
  * .withSession(sessionService, "user123", "myApp")
3726
3906
  * .build();
3907
+ *
3908
+ * // Using an AI SDK provider directly
3909
+ * import { google } from "@ai-sdk/google";
3910
+ * const response = await AgentBuilder.withModel(google()).ask("Hi");
3727
3911
  * ```
3728
3912
  */
3729
3913
  declare class AgentBuilder {
@@ -3745,13 +3929,13 @@ declare class AgentBuilder {
3745
3929
  * @param model The model identifier (e.g., "gemini-2.5-flash")
3746
3930
  * @returns New AgentBuilder instance with model set
3747
3931
  */
3748
- static withModel(model: string): AgentBuilder;
3932
+ static withModel(model: string | BaseLlm | LanguageModel): AgentBuilder;
3749
3933
  /**
3750
3934
  * Set the model for the agent
3751
3935
  * @param model The model identifier (e.g., "gemini-2.5-flash")
3752
3936
  * @returns This builder instance for chaining
3753
3937
  */
3754
- withModel(model: string): this;
3938
+ withModel(model: string | BaseLlm | LanguageModel): this;
3755
3939
  /**
3756
3940
  * Set the description for the agent
3757
3941
  * @param description Agent description
@@ -3855,9 +4039,9 @@ type index$4_LangGraphAgent = LangGraphAgent;
3855
4039
  declare const index$4_LangGraphAgent: typeof LangGraphAgent;
3856
4040
  type index$4_LangGraphAgentConfig = LangGraphAgentConfig;
3857
4041
  type index$4_LangGraphNode = LangGraphNode;
3858
- type index$4_LlmAgent = LlmAgent;
4042
+ type index$4_LlmAgent<T extends BaseLlm = BaseLlm> = LlmAgent<T>;
3859
4043
  declare const index$4_LlmAgent: typeof LlmAgent;
3860
- type index$4_LlmAgentConfig = LlmAgentConfig;
4044
+ type index$4_LlmAgentConfig<T extends BaseLlm = BaseLlm> = LlmAgentConfig<T>;
3861
4045
  type index$4_LlmCallsLimitExceededError = LlmCallsLimitExceededError;
3862
4046
  declare const index$4_LlmCallsLimitExceededError: typeof LlmCallsLimitExceededError;
3863
4047
  type index$4_LoopAgent = LoopAgent;
@@ -4253,7 +4437,7 @@ declare namespace index$1 {
4253
4437
  declare abstract class BaseLlmFlow {
4254
4438
  requestProcessors: Array<any>;
4255
4439
  responseProcessors: Array<any>;
4256
- private logger;
4440
+ protected logger: Logger;
4257
4441
  runAsync(invocationContext: InvocationContext): AsyncGenerator<Event>;
4258
4442
  runLive(invocationContext: InvocationContext): AsyncGenerator<Event>;
4259
4443
  _runOneStepAsync(invocationContext: InvocationContext): AsyncGenerator<Event>;
@@ -4267,6 +4451,15 @@ declare abstract class BaseLlmFlow {
4267
4451
  _handleBeforeModelCallback(invocationContext: InvocationContext, llmRequest: LlmRequest, modelResponseEvent: Event): Promise<LlmResponse | undefined>;
4268
4452
  _handleAfterModelCallback(invocationContext: InvocationContext, llmResponse: LlmResponse, modelResponseEvent: Event): Promise<LlmResponse | undefined>;
4269
4453
  _finalizeModelResponseEvent(llmRequest: LlmRequest, llmResponse: LlmResponse, modelResponseEvent: Event): Event;
4454
+ /**
4455
+ * Logs data in a visually appealing format that works well in any terminal size.
4456
+ * Uses vertical layout for better readability and respects debug settings.
4457
+ */
4458
+ _formatContentPreview(content: any): string;
4459
+ /**
4460
+ * Formats response content preview for debug logging
4461
+ */
4462
+ _formatResponsePreview(llmResponse: LlmResponse): string;
4270
4463
  __getLlm(invocationContext: InvocationContext): BaseLlm;
4271
4464
  }
4272
4465
 
@@ -4405,39 +4598,83 @@ declare const requestProcessor$1: NlPlanningRequestProcessor;
4405
4598
  */
4406
4599
  declare const responseProcessor$1: NlPlanningResponseProcessor;
4407
4600
 
4601
+ /**
4602
+ * The persistent context used to configure the code executor.
4603
+ */
4604
+ declare class CodeExecutorContext {
4605
+ private readonly context;
4606
+ private readonly sessionState;
4607
+ constructor(sessionState: State);
4608
+ /**
4609
+ * Gets the state delta to update in the persistent session state.
4610
+ */
4611
+ getStateDelta(): Record<string, any>;
4612
+ /**
4613
+ * Gets the session ID for the code executor.
4614
+ */
4615
+ getExecutionId(): string | null;
4616
+ /**
4617
+ * Sets the session ID for the code executor.
4618
+ */
4619
+ setExecutionId(sessionId: string): void;
4620
+ /**
4621
+ * Gets the processed file names from the session state.
4622
+ */
4623
+ getProcessedFileNames(): string[];
4624
+ /**
4625
+ * Adds the processed file names to the session state.
4626
+ */
4627
+ addProcessedFileNames(fileNames: string[]): void;
4628
+ /**
4629
+ * Gets the code executor input files from the session state.
4630
+ */
4631
+ getInputFiles(): File[];
4632
+ /**
4633
+ * Adds the input files to the code executor context.
4634
+ */
4635
+ addInputFiles(inputFiles: File[]): void;
4636
+ /**
4637
+ * Removes the input files and processed file names from the code executor context.
4638
+ */
4639
+ clearInputFiles(): void;
4640
+ /**
4641
+ * Gets the error count from the session state.
4642
+ */
4643
+ getErrorCount(invocationId: string): number;
4644
+ /**
4645
+ * Increments the error count for the given invocation ID.
4646
+ */
4647
+ incrementErrorCount(invocationId: string): void;
4648
+ /**
4649
+ * Resets the error count for the given invocation ID.
4650
+ */
4651
+ resetErrorCount(invocationId: string): void;
4652
+ /**
4653
+ * Updates the code execution result.
4654
+ */
4655
+ updateCodeExecutionResult(invocationId: string, code: string, resultStdout: string, resultStderr: string): void;
4656
+ /**
4657
+ * Gets the code executor context from the session state.
4658
+ */
4659
+ private getCodeExecutorContext;
4660
+ }
4661
+
4408
4662
  /**
4409
4663
  * Request processor for code execution
4410
- * This is a placeholder implementation that will be enhanced when code-executors are ready
4411
4664
  */
4412
4665
  declare class CodeExecutionRequestProcessor extends BaseLlmRequestProcessor {
4413
4666
  runAsync(invocationContext: InvocationContext, llmRequest: LlmRequest): AsyncGenerator<Event>;
4414
- /**
4415
- * Placeholder for pre-processor logic
4416
- * TODO: Implement when code-executors are ready
4417
- */
4418
- private runPreProcessor;
4419
4667
  }
4420
4668
  /**
4421
4669
  * Response processor for code execution
4422
- * This is a placeholder implementation that will be enhanced when code-executors are ready
4423
4670
  */
4424
4671
  declare class CodeExecutionResponseProcessor extends BaseLlmResponseProcessor {
4425
4672
  runAsync(invocationContext: InvocationContext, llmResponse: LlmResponse): AsyncGenerator<Event>;
4426
- /**
4427
- * Placeholder for post-processor logic
4428
- * TODO: Implement when code-executors are ready
4429
- */
4430
- private runPostProcessor;
4431
4673
  }
4432
4674
  /**
4433
- * Exported request processor instance for use in flow configurations
4434
- * Ready to be connected when code-executors module is implemented
4675
+ * Exported processor instances
4435
4676
  */
4436
4677
  declare const requestProcessor: CodeExecutionRequestProcessor;
4437
- /**
4438
- * Exported response processor instance for use in flow configurations
4439
- * Ready to be connected when code-executors module is implemented
4440
- */
4441
4678
  declare const responseProcessor: CodeExecutionResponseProcessor;
4442
4679
 
4443
4680
  declare const AF_FUNCTION_CALL_ID_PREFIX = "adk-";
@@ -4530,6 +4767,21 @@ declare namespace index {
4530
4767
  */
4531
4768
  declare function injectSessionState(template: string, readonlyContext: ReadonlyContext): Promise<string>;
4532
4769
 
4770
+ /**
4771
+ * A code executor that uses the Model's built-in code executor.
4772
+ *
4773
+ * Currently only supports Gemini 2.0+ models, but will be expanded to
4774
+ * other models.
4775
+ */
4776
+ declare class BuiltInCodeExecutor extends BaseCodeExecutor {
4777
+ constructor(config?: BaseCodeExecutorConfig);
4778
+ executeCode(invocationContext: InvocationContext, codeExecutionInput: CodeExecutionInput): Promise<CodeExecutionResult>;
4779
+ /**
4780
+ * Pre-process the LLM request for Gemini 2.0+ models to use the code execution tool
4781
+ */
4782
+ processLlmRequest(llmRequest: LlmRequest): void;
4783
+ }
4784
+
4533
4785
  /**
4534
4786
  * The built-in planner that uses model's built-in thinking features.
4535
4787
  */
@@ -4668,4 +4920,4 @@ declare const traceLlmCall: (invocationContext: InvocationContext, eventId: stri
4668
4920
 
4669
4921
  declare const VERSION = "0.1.0";
4670
4922
 
4671
- export { AF_FUNCTION_CALL_ID_PREFIX, type AfterAgentCallback, LlmAgent as Agent, AgentBuilder, type AgentBuilderConfig, type AgentType, index$4 as Agents, AnthropicLlm, ApiKeyCredential, ApiKeyScheme, AuthConfig, AuthCredential, AuthCredentialType, AuthHandler, AuthScheme, AuthSchemeType, AuthTool, type AuthToolArguments, AutoFlow, BaseAgent, BaseLLMConnection, BaseLlm, BaseLlmFlow, BaseLlmRequestProcessor, BaseLlmResponseProcessor, type BaseMemoryService, BasePlanner, BaseSessionService, BaseTool, BasicAuthCredential, BearerTokenCredential, type BeforeAgentCallback, type BuildFunctionDeclarationOptions, type BuiltAgent, BuiltInPlanner, CallbackContext, DatabaseSessionService, EnhancedAuthConfig, Event, EventActions, index$1 as Events, ExitLoopTool, FileOperationsTool, index as Flows, type FunctionDeclaration, FunctionTool, GcsArtifactService, type GetSessionConfig, GetUserChoiceTool, GoogleLlm, GoogleSearch, HttpRequestTool, HttpScheme, InMemoryArtifactService, InMemoryMemoryService, InMemoryRunner, InMemorySessionService, type InstructionProvider, InvocationContext, type JSONSchema, LLMRegistry, LangGraphAgent, type LangGraphAgentConfig, type LangGraphNode, type ListSessionsResponse, LlmAgent, type LlmAgentConfig, LlmCallsLimitExceededError, LlmRequest, LlmResponse, LoadArtifactsTool, LoadMemoryTool, LoopAgent, type LoopAgentConfig, McpAbi, McpAtp, McpBamm, type McpConfig, McpError, McpErrorType, McpFilesystem, McpFraxlend, McpGeneric, McpIqWiki, McpMemory, McpNearAgent, McpNearIntentSwaps, McpOdos, McpSamplingHandler, type McpSamplingRequest, type McpSamplingResponse, type McpServerConfig, McpTelegram, McpToolset, type McpTransportType, index$3 as Memory, index$5 as Models, OAuth2Credential, OAuth2Scheme, type OAuthFlow, type OAuthFlows, OpenAiLlm, OpenIdConnectScheme, ParallelAgent, type ParallelAgentConfig, PlanReActPlanner, REQUEST_EUC_FUNCTION_CALL_NAME, ReadonlyContext, RunConfig, Runner, type SamplingHandler, type SearchMemoryResponse, SequentialAgent, type SequentialAgentConfig, type Session, type SessionConfig, index$2 as Sessions, type SingleAgentCallback, SingleFlow, State, StreamingMode, type TelemetryConfig, TelemetryService, type ThinkingConfig, type ToolConfig, ToolContext, type ToolUnion, index$6 as Tools, TransferToAgentTool, UserInteractionTool, VERSION, VertexAiSessionService, adkToMcpToolType, requestProcessor$2 as agentTransferRequestProcessor, requestProcessor$6 as basicRequestProcessor, buildFunctionDeclaration, requestProcessor as codeExecutionRequestProcessor, responseProcessor as codeExecutionResponseProcessor, requestProcessor$3 as contentRequestProcessor, createAuthToolArguments, createDatabaseSessionService, createFunctionTool, createMysqlSessionService, createPostgresSessionService, createSamplingHandler, createSqliteSessionService, generateAuthEvent, generateClientFunctionCallId, getLongRunningFunctionCalls, getMcpTools, handleFunctionCallsAsync, handleFunctionCallsLive, requestProcessor$5 as identityRequestProcessor, initializeTelemetry, injectSessionState, requestProcessor$4 as instructionsRequestProcessor, isEnhancedAuthConfig, jsonSchemaToDeclaration, mcpSchemaToParameters, mergeParallelFunctionResponseEvents, newInvocationContextId, requestProcessor$1 as nlPlanningRequestProcessor, responseProcessor$1 as nlPlanningResponseProcessor, normalizeJsonSchema, populateClientFunctionCallId, registerProviders, removeClientFunctionCallId, requestProcessor$7 as requestProcessor, shutdownTelemetry, telemetryService, traceLlmCall, traceToolCall, tracer };
4923
+ export { AF_FUNCTION_CALL_ID_PREFIX, type AfterAgentCallback, LlmAgent as Agent, AgentBuilder, type AgentBuilderConfig, type AgentType, index$4 as Agents, AiSdkLlm, AnthropicLlm, ApiKeyCredential, ApiKeyScheme, AuthConfig, AuthCredential, AuthCredentialType, AuthHandler, AuthScheme, AuthSchemeType, AuthTool, type AuthToolArguments, AutoFlow, BaseAgent, BaseCodeExecutor, type BaseCodeExecutorConfig, BaseLLMConnection, BaseLlm, BaseLlmFlow, BaseLlmRequestProcessor, BaseLlmResponseProcessor, type BaseMemoryService, BasePlanner, BaseSessionService, BaseTool, BasicAuthCredential, BearerTokenCredential, type BeforeAgentCallback, type BuildFunctionDeclarationOptions, type BuiltAgent, BuiltInCodeExecutor, BuiltInPlanner, CallbackContext, type CodeExecutionInput, type CodeExecutionResult, CodeExecutionUtils, CodeExecutorContext, DatabaseSessionService, EnhancedAuthConfig, Event, EventActions, index$1 as Events, ExitLoopTool, type File, FileOperationsTool, index as Flows, type FunctionDeclaration, FunctionTool, GcsArtifactService, type GetSessionConfig, GetUserChoiceTool, GoogleLlm, GoogleSearch, HttpRequestTool, HttpScheme, InMemoryArtifactService, InMemoryMemoryService, InMemoryRunner, InMemorySessionService, type InstructionProvider, InvocationContext, type JSONSchema, LLMRegistry, LangGraphAgent, type LangGraphAgentConfig, type LangGraphNode, type ListSessionsResponse, LlmAgent, type LlmAgentConfig, LlmCallsLimitExceededError, LlmRequest, LlmResponse, LoadArtifactsTool, LoadMemoryTool, LoopAgent, type LoopAgentConfig, McpAbi, McpAtp, McpBamm, McpCoinGecko, type McpConfig, McpError, McpErrorType, McpFilesystem, McpFraxlend, McpGeneric, McpIqWiki, McpMemory, McpNearAgent, McpNearIntentSwaps, McpOdos, McpSamplingHandler, type McpSamplingRequest, type McpSamplingResponse, type McpServerConfig, McpTelegram, McpToolset, type McpTransportType, index$3 as Memory, index$5 as Models, OAuth2Credential, OAuth2Scheme, type OAuthFlow, type OAuthFlows, OpenAiLlm, OpenIdConnectScheme, ParallelAgent, type ParallelAgentConfig, PlanReActPlanner, REQUEST_EUC_FUNCTION_CALL_NAME, ReadonlyContext, RunConfig, Runner, type SamplingHandler, type SearchMemoryResponse, SequentialAgent, type SequentialAgentConfig, type Session, type SessionConfig, index$2 as Sessions, type SingleAgentCallback, SingleFlow, State, StreamingMode, type TelemetryConfig, TelemetryService, type ThinkingConfig, type ToolConfig, ToolContext, type ToolUnion, index$6 as Tools, TransferToAgentTool, UserInteractionTool, VERSION, VertexAiSessionService, adkToMcpToolType, requestProcessor$2 as agentTransferRequestProcessor, requestProcessor$6 as basicRequestProcessor, buildFunctionDeclaration, requestProcessor as codeExecutionRequestProcessor, responseProcessor as codeExecutionResponseProcessor, requestProcessor$3 as contentRequestProcessor, createAuthToolArguments, createDatabaseSessionService, createFunctionTool, createMysqlSessionService, createPostgresSessionService, createSamplingHandler, createSqliteSessionService, generateAuthEvent, generateClientFunctionCallId, getLongRunningFunctionCalls, getMcpTools, handleFunctionCallsAsync, handleFunctionCallsLive, requestProcessor$5 as identityRequestProcessor, initializeTelemetry, injectSessionState, requestProcessor$4 as instructionsRequestProcessor, isEnhancedAuthConfig, jsonSchemaToDeclaration, mcpSchemaToParameters, mergeParallelFunctionResponseEvents, newInvocationContextId, requestProcessor$1 as nlPlanningRequestProcessor, responseProcessor$1 as nlPlanningResponseProcessor, normalizeJsonSchema, populateClientFunctionCallId, registerProviders, removeClientFunctionCallId, requestProcessor$7 as requestProcessor, shutdownTelemetry, telemetryService, traceLlmCall, traceToolCall, tracer };