@iqai/adk 0.2.1 → 0.2.2

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/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # @iqai/adk
2
2
 
3
+ ## 0.2.2
4
+
5
+ ### Patch Changes
6
+
7
+ - 0485d51: export convertMcpToolToBaseTool to convert Tool -> BaseTool
8
+
3
9
  ## 0.2.1
4
10
 
5
11
  ### Patch Changes
package/dist/index.d.mts CHANGED
@@ -32,115 +32,6 @@ declare class Logger {
32
32
  debugArray(title: string, items: Array<Record<string, any>>): void;
33
33
  }
34
34
 
35
- type McpConfig = {
36
- name: string;
37
- description: string;
38
- transport: McpTransportType;
39
- timeout?: number;
40
- retryOptions?: {
41
- maxRetries?: number;
42
- initialDelay?: number;
43
- maxDelay?: number;
44
- };
45
- headers?: Record<string, string>;
46
- cacheConfig?: {
47
- enabled?: boolean;
48
- maxAge?: number;
49
- maxSize?: number;
50
- };
51
- debug?: boolean;
52
- /**
53
- * Sampling handler for processing MCP sampling requests.
54
- * This allows MCP servers to request LLM completions through your ADK agent.
55
- */
56
- samplingHandler?: SamplingHandler;
57
- };
58
- type McpTransportType = {
59
- mode: "stdio";
60
- command: string;
61
- args: string[];
62
- env?: Record<string, string>;
63
- } | {
64
- mode: "sse";
65
- serverUrl: string;
66
- headers?: HeadersInit;
67
- };
68
- /**
69
- * Error types specific to the MCP client
70
- */
71
- declare enum McpErrorType {
72
- CONNECTION_ERROR = "connection_error",
73
- TOOL_EXECUTION_ERROR = "tool_execution_error",
74
- RESOURCE_CLOSED_ERROR = "resource_closed_error",
75
- TIMEOUT_ERROR = "timeout_error",
76
- INVALID_SCHEMA_ERROR = "invalid_schema_error",
77
- SAMPLING_ERROR = "SAMPLING_ERROR",
78
- INVALID_REQUEST_ERROR = "INVALID_REQUEST_ERROR"
79
- }
80
- /**
81
- * Custom error class for MCP-related errors
82
- */
83
- declare class McpError extends Error {
84
- type: McpErrorType;
85
- originalError?: Error;
86
- constructor(message: string, type: McpErrorType, originalError?: Error);
87
- }
88
- type McpSamplingRequest = z.infer<typeof CreateMessageRequestSchema>;
89
- type McpSamplingResponse = z.infer<typeof CreateMessageResultSchema>;
90
- type SamplingHandler = (request: LlmRequest) => Promise<string | LlmResponse>;
91
-
92
- declare class McpClientService {
93
- private config;
94
- private client;
95
- private transport;
96
- private isClosing;
97
- private mcpSamplingHandler;
98
- protected logger: Logger;
99
- constructor(config: McpConfig);
100
- /**
101
- * Initializes and returns an MCP client based on configuration.
102
- * Will create a new client if one doesn't exist yet.
103
- */
104
- initialize(): Promise<Client>;
105
- /**
106
- * Creates a transport based on the configuration.
107
- */
108
- private createTransport;
109
- /**
110
- * Re-initializes the MCP client when a session is closed.
111
- * Used by the retry mechanism.
112
- */
113
- reinitialize(): Promise<void>;
114
- /**
115
- * Cleans up resources associated with this client service.
116
- * Similar to Python's AsyncExitStack.aclose() functionality.
117
- */
118
- private cleanupResources;
119
- /**
120
- * Call an MCP tool with retry capability if the session is closed.
121
- */
122
- callTool(name: string, args: Record<string, any>): Promise<any>;
123
- /**
124
- * Closes and cleans up all resources.
125
- * Should be called when the service is no longer needed.
126
- * Similar to Python's close() method.
127
- */
128
- close(): Promise<void>;
129
- /**
130
- * Checks if the client is currently connected
131
- */
132
- isConnected(): boolean;
133
- private setupSamplingHandler;
134
- /**
135
- * Set a new ADK sampling handler
136
- */
137
- setSamplingHandler(handler: SamplingHandler): void;
138
- /**
139
- * Remove the sampling handler
140
- */
141
- removeSamplingHandler(): void;
142
- }
143
-
144
35
  /**
145
36
  * Represents the actions attached to an event.
146
37
  */
@@ -2079,6 +1970,117 @@ declare class LoadArtifactsTool extends BaseTool {
2079
1970
  private extractFunctionResponse;
2080
1971
  }
2081
1972
 
1973
+ type McpConfig = {
1974
+ name: string;
1975
+ description: string;
1976
+ transport: McpTransportType;
1977
+ timeout?: number;
1978
+ retryOptions?: {
1979
+ maxRetries?: number;
1980
+ initialDelay?: number;
1981
+ maxDelay?: number;
1982
+ };
1983
+ headers?: Record<string, string>;
1984
+ cacheConfig?: {
1985
+ enabled?: boolean;
1986
+ maxAge?: number;
1987
+ maxSize?: number;
1988
+ };
1989
+ debug?: boolean;
1990
+ /**
1991
+ * Sampling handler for processing MCP sampling requests.
1992
+ * This allows MCP servers to request LLM completions through your ADK agent.
1993
+ */
1994
+ samplingHandler?: SamplingHandler;
1995
+ };
1996
+ type McpTransportType = {
1997
+ mode: "stdio";
1998
+ command: string;
1999
+ args: string[];
2000
+ env?: Record<string, string>;
2001
+ } | {
2002
+ mode: "sse";
2003
+ serverUrl: string;
2004
+ headers?: HeadersInit;
2005
+ };
2006
+ /**
2007
+ * Error types specific to the MCP client
2008
+ */
2009
+ declare enum McpErrorType {
2010
+ CONNECTION_ERROR = "connection_error",
2011
+ TOOL_EXECUTION_ERROR = "tool_execution_error",
2012
+ RESOURCE_CLOSED_ERROR = "resource_closed_error",
2013
+ TIMEOUT_ERROR = "timeout_error",
2014
+ INVALID_SCHEMA_ERROR = "invalid_schema_error",
2015
+ SAMPLING_ERROR = "SAMPLING_ERROR",
2016
+ INVALID_REQUEST_ERROR = "INVALID_REQUEST_ERROR"
2017
+ }
2018
+ /**
2019
+ * Custom error class for MCP-related errors
2020
+ */
2021
+ declare class McpError extends Error {
2022
+ type: McpErrorType;
2023
+ originalError?: Error;
2024
+ constructor(message: string, type: McpErrorType, originalError?: Error);
2025
+ }
2026
+ type McpSamplingRequest = z.infer<typeof CreateMessageRequestSchema>;
2027
+ type McpSamplingResponse = z.infer<typeof CreateMessageResultSchema>;
2028
+ type SamplingHandler = (request: LlmRequest) => Promise<string | LlmResponse>;
2029
+
2030
+ declare class McpClientService {
2031
+ private config;
2032
+ private client;
2033
+ private transport;
2034
+ private isClosing;
2035
+ private mcpSamplingHandler;
2036
+ protected logger: Logger;
2037
+ constructor(config: McpConfig);
2038
+ /**
2039
+ * Initializes and returns an MCP client based on configuration.
2040
+ * Will create a new client if one doesn't exist yet.
2041
+ */
2042
+ initialize(): Promise<Client>;
2043
+ /**
2044
+ * Creates a transport based on the configuration.
2045
+ */
2046
+ private createTransport;
2047
+ /**
2048
+ * Re-initializes the MCP client when a session is closed.
2049
+ * Used by the retry mechanism.
2050
+ */
2051
+ reinitialize(): Promise<void>;
2052
+ /**
2053
+ * Cleans up resources associated with this client service.
2054
+ * Similar to Python's AsyncExitStack.aclose() functionality.
2055
+ */
2056
+ private cleanupResources;
2057
+ /**
2058
+ * Call an MCP tool with retry capability if the session is closed.
2059
+ */
2060
+ callTool(name: string, args: Record<string, any>): Promise<any>;
2061
+ /**
2062
+ * Closes and cleans up all resources.
2063
+ * Should be called when the service is no longer needed.
2064
+ * Similar to Python's close() method.
2065
+ */
2066
+ close(): Promise<void>;
2067
+ /**
2068
+ * Checks if the client is currently connected
2069
+ */
2070
+ isConnected(): boolean;
2071
+ private setupSamplingHandler;
2072
+ /**
2073
+ * Set a new ADK sampling handler
2074
+ */
2075
+ setSamplingHandler(handler: SamplingHandler): void;
2076
+ /**
2077
+ * Remove the sampling handler
2078
+ */
2079
+ removeSamplingHandler(): void;
2080
+ }
2081
+
2082
+ declare function convertMcpToolToBaseTool(mcpTool: Tool, client?: Client): Promise<BaseTool>;
2083
+
2082
2084
  /**
2083
2085
  * Converts an ADK-style BaseTool to an MCP tool format
2084
2086
  * Similar to Python's adk_to_mcp_tool_type function
@@ -2489,8 +2491,6 @@ declare const index$7_LoadMemoryTool: typeof LoadMemoryTool;
2489
2491
  declare const index$7_McpAbi: typeof McpAbi;
2490
2492
  declare const index$7_McpAtp: typeof McpAtp;
2491
2493
  declare const index$7_McpBamm: typeof McpBamm;
2492
- type index$7_McpClientService = McpClientService;
2493
- declare const index$7_McpClientService: typeof McpClientService;
2494
2494
  declare const index$7_McpCoinGecko: typeof McpCoinGecko;
2495
2495
  type index$7_McpConfig = McpConfig;
2496
2496
  declare const index$7_McpDiscord: typeof McpDiscord;
@@ -2526,6 +2526,7 @@ type index$7_UserInteractionTool = UserInteractionTool;
2526
2526
  declare const index$7_UserInteractionTool: typeof UserInteractionTool;
2527
2527
  declare const index$7_adkToMcpToolType: typeof adkToMcpToolType;
2528
2528
  declare const index$7_buildFunctionDeclaration: typeof buildFunctionDeclaration;
2529
+ declare const index$7_convertMcpToolToBaseTool: typeof convertMcpToolToBaseTool;
2529
2530
  declare const index$7_createFunctionTool: typeof createFunctionTool;
2530
2531
  declare const index$7_createSamplingHandler: typeof createSamplingHandler;
2531
2532
  declare const index$7_createTool: typeof createTool;
@@ -2534,7 +2535,7 @@ declare const index$7_jsonSchemaToDeclaration: typeof jsonSchemaToDeclaration;
2534
2535
  declare const index$7_mcpSchemaToParameters: typeof mcpSchemaToParameters;
2535
2536
  declare const index$7_normalizeJsonSchema: typeof normalizeJsonSchema;
2536
2537
  declare namespace index$7 {
2537
- export { index$7_AgentTool as AgentTool, type index$7_AgentToolConfig as AgentToolConfig, type index$7_BaseAgentType as BaseAgentType, index$7_BaseTool as BaseTool, type index$7_BuildFunctionDeclarationOptions as BuildFunctionDeclarationOptions, type index$7_CreateToolConfig as CreateToolConfig, type index$7_CreateToolConfigWithSchema as CreateToolConfigWithSchema, type index$7_CreateToolConfigWithoutSchema as CreateToolConfigWithoutSchema, index$7_ExitLoopTool as ExitLoopTool, index$7_FileOperationsTool as FileOperationsTool, index$7_FunctionTool as FunctionTool, index$7_GetUserChoiceTool as GetUserChoiceTool, index$7_GoogleSearch as GoogleSearch, index$7_HttpRequestTool as HttpRequestTool, index$7_LoadArtifactsTool as LoadArtifactsTool, index$7_LoadMemoryTool as LoadMemoryTool, index$7_McpAbi as McpAbi, index$7_McpAtp as McpAtp, index$7_McpBamm as McpBamm, index$7_McpClientService as McpClientService, index$7_McpCoinGecko as McpCoinGecko, type index$7_McpConfig as McpConfig, index$7_McpDiscord as McpDiscord, index$7_McpError as McpError, index$7_McpErrorType as McpErrorType, index$7_McpFilesystem as McpFilesystem, index$7_McpFraxlend as McpFraxlend, index$7_McpGeneric as McpGeneric, index$7_McpIqWiki as McpIqWiki, index$7_McpMemory as McpMemory, index$7_McpNearAgent as McpNearAgent, index$7_McpNearIntents as McpNearIntents, index$7_McpOdos as McpOdos, index$7_McpSamplingHandler as McpSamplingHandler, type index$7_McpSamplingRequest as McpSamplingRequest, type index$7_McpSamplingResponse as McpSamplingResponse, type index$7_McpServerConfig as McpServerConfig, index$7_McpTelegram as McpTelegram, index$7_McpToolset as McpToolset, type index$7_McpTransportType as McpTransportType, index$7_McpUpbit as McpUpbit, type index$7_SamplingHandler as SamplingHandler, type index$7_ToolConfig as ToolConfig, index$7_ToolContext as ToolContext, index$7_TransferToAgentTool as TransferToAgentTool, index$7_UserInteractionTool as UserInteractionTool, index$7_adkToMcpToolType as adkToMcpToolType, index$7_buildFunctionDeclaration as buildFunctionDeclaration, index$7_createFunctionTool as createFunctionTool, index$7_createSamplingHandler as createSamplingHandler, index$7_createTool as createTool, index$7_getMcpTools as getMcpTools, index$7_jsonSchemaToDeclaration as jsonSchemaToDeclaration, index$7_mcpSchemaToParameters as mcpSchemaToParameters, index$7_normalizeJsonSchema as normalizeJsonSchema };
2538
+ export { index$7_AgentTool as AgentTool, type index$7_AgentToolConfig as AgentToolConfig, type index$7_BaseAgentType as BaseAgentType, index$7_BaseTool as BaseTool, type index$7_BuildFunctionDeclarationOptions as BuildFunctionDeclarationOptions, type index$7_CreateToolConfig as CreateToolConfig, type index$7_CreateToolConfigWithSchema as CreateToolConfigWithSchema, type index$7_CreateToolConfigWithoutSchema as CreateToolConfigWithoutSchema, index$7_ExitLoopTool as ExitLoopTool, index$7_FileOperationsTool as FileOperationsTool, index$7_FunctionTool as FunctionTool, index$7_GetUserChoiceTool as GetUserChoiceTool, index$7_GoogleSearch as GoogleSearch, index$7_HttpRequestTool as HttpRequestTool, index$7_LoadArtifactsTool as LoadArtifactsTool, index$7_LoadMemoryTool as LoadMemoryTool, index$7_McpAbi as McpAbi, index$7_McpAtp as McpAtp, index$7_McpBamm as McpBamm, index$7_McpCoinGecko as McpCoinGecko, type index$7_McpConfig as McpConfig, index$7_McpDiscord as McpDiscord, index$7_McpError as McpError, index$7_McpErrorType as McpErrorType, index$7_McpFilesystem as McpFilesystem, index$7_McpFraxlend as McpFraxlend, index$7_McpGeneric as McpGeneric, index$7_McpIqWiki as McpIqWiki, index$7_McpMemory as McpMemory, index$7_McpNearAgent as McpNearAgent, index$7_McpNearIntents as McpNearIntents, index$7_McpOdos as McpOdos, index$7_McpSamplingHandler as McpSamplingHandler, type index$7_McpSamplingRequest as McpSamplingRequest, type index$7_McpSamplingResponse as McpSamplingResponse, type index$7_McpServerConfig as McpServerConfig, index$7_McpTelegram as McpTelegram, index$7_McpToolset as McpToolset, type index$7_McpTransportType as McpTransportType, index$7_McpUpbit as McpUpbit, type index$7_SamplingHandler as SamplingHandler, type index$7_ToolConfig as ToolConfig, index$7_ToolContext as ToolContext, index$7_TransferToAgentTool as TransferToAgentTool, index$7_UserInteractionTool as UserInteractionTool, index$7_adkToMcpToolType as adkToMcpToolType, index$7_buildFunctionDeclaration as buildFunctionDeclaration, index$7_convertMcpToolToBaseTool as convertMcpToolToBaseTool, index$7_createFunctionTool as createFunctionTool, index$7_createSamplingHandler as createSamplingHandler, index$7_createTool as createTool, index$7_getMcpTools as getMcpTools, index$7_jsonSchemaToDeclaration as jsonSchemaToDeclaration, index$7_mcpSchemaToParameters as mcpSchemaToParameters, index$7_normalizeJsonSchema as normalizeJsonSchema };
2538
2539
  }
2539
2540
 
2540
2541
  /**
@@ -5524,4 +5525,4 @@ declare const traceLlmCall: (invocationContext: InvocationContext, eventId: stri
5524
5525
 
5525
5526
  declare const VERSION = "0.1.0";
5526
5527
 
5527
- export { AF_FUNCTION_CALL_ID_PREFIX, type AfterAgentCallback, type AfterModelCallback, type AfterToolCallback, LlmAgent as Agent, AgentBuilder, type AgentBuilderConfig, type AgentBuilderWithSchema, AgentEvaluator, AgentTool, type AgentToolConfig, type AgentType, index$5 as Agents, AiSdkLlm, AnthropicLlm, ApiKeyCredential, ApiKeyScheme, AuthConfig, AuthCredential, AuthCredentialType, AuthHandler, AuthScheme, AuthSchemeType, AuthTool, type AuthToolArguments, AutoFlow, BaseAgent, type BaseAgentType, BaseCodeExecutor, type BaseCodeExecutorConfig, BaseLLMConnection, BaseLlm, BaseLlmFlow, BaseLlmRequestProcessor, BaseLlmResponseProcessor, type BaseMemoryService, BasePlanner, BaseSessionService, BaseTool, BasicAuthCredential, BearerTokenCredential, type BeforeAgentCallback, type BeforeModelCallback, type BeforeToolCallback, type BuildFunctionDeclarationOptions, type BuiltAgent, BuiltInCodeExecutor, BuiltInPlanner, CallbackContext, type CodeExecutionInput, type CodeExecutionResult, CodeExecutionUtils, CodeExecutorContext, type CreateToolConfig, type CreateToolConfigWithSchema, type CreateToolConfigWithoutSchema, DatabaseSessionService, EnhancedAuthConfig, type EnhancedRunner, type EvalCase, type EvalCaseResult, type EvalMetric, type EvalMetricResult, type EvalMetricResultPerInvocation, EvalResult, type EvalSet, type EvalSetResult, EvalStatus, type EvaluateConfig, index as Evaluation, type EvaluationResult, Evaluator, Event, EventActions, index$2 as Events, ExitLoopTool, type File, FileOperationsTool, FinalResponseMatchV2Evaluator, index$1 as Flows, type FullMessage, FunctionTool, GcsArtifactService, type GetSessionConfig, GetUserChoiceTool, GoogleLlm, GoogleSearch, HttpRequestTool, HttpScheme, InMemoryArtifactService, InMemoryMemoryService, InMemoryRunner, InMemorySessionService, type InstructionProvider, type IntermediateData, type Interval, type Invocation, InvocationContext, type JudgeModelOptions, LLMRegistry, LangGraphAgent, type LangGraphAgentConfig, type LangGraphNode, type ListSessionsResponse, LlmAgent, type LlmAgentConfig, LlmCallsLimitExceededError, type LlmModel, type LlmModelConfig, LlmRequest, LlmResponse, LoadArtifactsTool, LoadMemoryTool, LocalEvalService, LoopAgent, type LoopAgentConfig, McpAbi, McpAtp, McpBamm, McpClientService, McpCoinGecko, type McpConfig, McpDiscord, McpError, McpErrorType, McpFilesystem, McpFraxlend, McpGeneric, McpIqWiki, McpMemory, McpNearAgent, McpNearIntents, McpOdos, McpSamplingHandler, type McpSamplingRequest, type McpSamplingResponse, type McpServerConfig, McpTelegram, McpToolset, type McpTransportType, McpUpbit, index$4 as Memory, type MessagePart, type MetricInfo, type MetricValueInfo, index$6 as Models, OAuth2Credential, OAuth2Scheme, type OAuthFlow, type OAuthFlows, OpenAiLlm, OpenIdConnectScheme, ParallelAgent, type ParallelAgentConfig, type PerInvocationResult, PlanReActPlanner, PrebuiltMetrics, REQUEST_EUC_FUNCTION_CALL_NAME, ReadonlyContext, RougeEvaluator, RunConfig, Runner, SafetyEvaluatorV1, type SamplingHandler, type SearchMemoryResponse, SequentialAgent, type SequentialAgentConfig, type Session, type SessionInput, type SessionOptions, index$3 as Sessions, type SingleAfterModelCallback, type SingleAfterToolCallback, type SingleAgentCallback, type SingleBeforeModelCallback, type SingleBeforeToolCallback, SingleFlow, State, StreamingMode, type TelemetryConfig, TelemetryService, type ThinkingConfig, type ToolConfig, ToolContext, type ToolUnion, index$7 as Tools, TrajectoryEvaluator, TransferToAgentTool, UserInteractionTool, VERSION, VertexAiSessionService, _findFunctionCallEventIfLastEventIsFunctionResponse, adkToMcpToolType, requestProcessor$2 as agentTransferRequestProcessor, requestProcessor$6 as basicRequestProcessor, buildFunctionDeclaration, requestProcessor as codeExecutionRequestProcessor, responseProcessor as codeExecutionResponseProcessor, requestProcessor$3 as contentRequestProcessor, createAuthToolArguments, createBranchContextForSubAgent, createDatabaseSessionService, createFunctionTool, createMysqlSessionService, createPostgresSessionService, createSamplingHandler, createSqliteSessionService, createTool, generateAuthEvent, generateClientFunctionCallId, getLongRunningFunctionCalls, getMcpTools, handleFunctionCallsAsync, handleFunctionCallsLive, requestProcessor$5 as identityRequestProcessor, initializeTelemetry, injectSessionState, requestProcessor$4 as instructionsRequestProcessor, isEnhancedAuthConfig, jsonSchemaToDeclaration, mcpSchemaToParameters, mergeAgentRun, mergeParallelFunctionResponseEvents, newInvocationContextId, requestProcessor$1 as nlPlanningRequestProcessor, responseProcessor$1 as nlPlanningResponseProcessor, normalizeJsonSchema, populateClientFunctionCallId, registerProviders, removeClientFunctionCallId, requestProcessor$7 as requestProcessor, shutdownTelemetry, telemetryService, traceLlmCall, traceToolCall, tracer };
5528
+ export { AF_FUNCTION_CALL_ID_PREFIX, type AfterAgentCallback, type AfterModelCallback, type AfterToolCallback, LlmAgent as Agent, AgentBuilder, type AgentBuilderConfig, type AgentBuilderWithSchema, AgentEvaluator, AgentTool, type AgentToolConfig, type AgentType, index$5 as Agents, AiSdkLlm, AnthropicLlm, ApiKeyCredential, ApiKeyScheme, AuthConfig, AuthCredential, AuthCredentialType, AuthHandler, AuthScheme, AuthSchemeType, AuthTool, type AuthToolArguments, AutoFlow, BaseAgent, type BaseAgentType, BaseCodeExecutor, type BaseCodeExecutorConfig, BaseLLMConnection, BaseLlm, BaseLlmFlow, BaseLlmRequestProcessor, BaseLlmResponseProcessor, type BaseMemoryService, BasePlanner, BaseSessionService, BaseTool, BasicAuthCredential, BearerTokenCredential, type BeforeAgentCallback, type BeforeModelCallback, type BeforeToolCallback, type BuildFunctionDeclarationOptions, type BuiltAgent, BuiltInCodeExecutor, BuiltInPlanner, CallbackContext, type CodeExecutionInput, type CodeExecutionResult, CodeExecutionUtils, CodeExecutorContext, type CreateToolConfig, type CreateToolConfigWithSchema, type CreateToolConfigWithoutSchema, DatabaseSessionService, EnhancedAuthConfig, type EnhancedRunner, type EvalCase, type EvalCaseResult, type EvalMetric, type EvalMetricResult, type EvalMetricResultPerInvocation, EvalResult, type EvalSet, type EvalSetResult, EvalStatus, type EvaluateConfig, index as Evaluation, type EvaluationResult, Evaluator, Event, EventActions, index$2 as Events, ExitLoopTool, type File, FileOperationsTool, FinalResponseMatchV2Evaluator, index$1 as Flows, type FullMessage, FunctionTool, GcsArtifactService, type GetSessionConfig, GetUserChoiceTool, GoogleLlm, GoogleSearch, HttpRequestTool, HttpScheme, InMemoryArtifactService, InMemoryMemoryService, InMemoryRunner, InMemorySessionService, type InstructionProvider, type IntermediateData, type Interval, type Invocation, InvocationContext, type JudgeModelOptions, LLMRegistry, LangGraphAgent, type LangGraphAgentConfig, type LangGraphNode, type ListSessionsResponse, LlmAgent, type LlmAgentConfig, LlmCallsLimitExceededError, type LlmModel, type LlmModelConfig, LlmRequest, LlmResponse, LoadArtifactsTool, LoadMemoryTool, LocalEvalService, LoopAgent, type LoopAgentConfig, McpAbi, McpAtp, McpBamm, McpCoinGecko, type McpConfig, McpDiscord, McpError, McpErrorType, McpFilesystem, McpFraxlend, McpGeneric, McpIqWiki, McpMemory, McpNearAgent, McpNearIntents, McpOdos, McpSamplingHandler, type McpSamplingRequest, type McpSamplingResponse, type McpServerConfig, McpTelegram, McpToolset, type McpTransportType, McpUpbit, index$4 as Memory, type MessagePart, type MetricInfo, type MetricValueInfo, index$6 as Models, OAuth2Credential, OAuth2Scheme, type OAuthFlow, type OAuthFlows, OpenAiLlm, OpenIdConnectScheme, ParallelAgent, type ParallelAgentConfig, type PerInvocationResult, PlanReActPlanner, PrebuiltMetrics, REQUEST_EUC_FUNCTION_CALL_NAME, ReadonlyContext, RougeEvaluator, RunConfig, Runner, SafetyEvaluatorV1, type SamplingHandler, type SearchMemoryResponse, SequentialAgent, type SequentialAgentConfig, type Session, type SessionInput, type SessionOptions, index$3 as Sessions, type SingleAfterModelCallback, type SingleAfterToolCallback, type SingleAgentCallback, type SingleBeforeModelCallback, type SingleBeforeToolCallback, SingleFlow, State, StreamingMode, type TelemetryConfig, TelemetryService, type ThinkingConfig, type ToolConfig, ToolContext, type ToolUnion, index$7 as Tools, TrajectoryEvaluator, TransferToAgentTool, UserInteractionTool, VERSION, VertexAiSessionService, _findFunctionCallEventIfLastEventIsFunctionResponse, adkToMcpToolType, requestProcessor$2 as agentTransferRequestProcessor, requestProcessor$6 as basicRequestProcessor, buildFunctionDeclaration, requestProcessor as codeExecutionRequestProcessor, responseProcessor as codeExecutionResponseProcessor, requestProcessor$3 as contentRequestProcessor, convertMcpToolToBaseTool, createAuthToolArguments, createBranchContextForSubAgent, createDatabaseSessionService, createFunctionTool, createMysqlSessionService, createPostgresSessionService, createSamplingHandler, createSqliteSessionService, createTool, generateAuthEvent, generateClientFunctionCallId, getLongRunningFunctionCalls, getMcpTools, handleFunctionCallsAsync, handleFunctionCallsLive, requestProcessor$5 as identityRequestProcessor, initializeTelemetry, injectSessionState, requestProcessor$4 as instructionsRequestProcessor, isEnhancedAuthConfig, jsonSchemaToDeclaration, mcpSchemaToParameters, mergeAgentRun, mergeParallelFunctionResponseEvents, newInvocationContextId, requestProcessor$1 as nlPlanningRequestProcessor, responseProcessor$1 as nlPlanningResponseProcessor, normalizeJsonSchema, populateClientFunctionCallId, registerProviders, removeClientFunctionCallId, requestProcessor$7 as requestProcessor, shutdownTelemetry, telemetryService, traceLlmCall, traceToolCall, tracer };
package/dist/index.d.ts CHANGED
@@ -32,115 +32,6 @@ declare class Logger {
32
32
  debugArray(title: string, items: Array<Record<string, any>>): void;
33
33
  }
34
34
 
35
- type McpConfig = {
36
- name: string;
37
- description: string;
38
- transport: McpTransportType;
39
- timeout?: number;
40
- retryOptions?: {
41
- maxRetries?: number;
42
- initialDelay?: number;
43
- maxDelay?: number;
44
- };
45
- headers?: Record<string, string>;
46
- cacheConfig?: {
47
- enabled?: boolean;
48
- maxAge?: number;
49
- maxSize?: number;
50
- };
51
- debug?: boolean;
52
- /**
53
- * Sampling handler for processing MCP sampling requests.
54
- * This allows MCP servers to request LLM completions through your ADK agent.
55
- */
56
- samplingHandler?: SamplingHandler;
57
- };
58
- type McpTransportType = {
59
- mode: "stdio";
60
- command: string;
61
- args: string[];
62
- env?: Record<string, string>;
63
- } | {
64
- mode: "sse";
65
- serverUrl: string;
66
- headers?: HeadersInit;
67
- };
68
- /**
69
- * Error types specific to the MCP client
70
- */
71
- declare enum McpErrorType {
72
- CONNECTION_ERROR = "connection_error",
73
- TOOL_EXECUTION_ERROR = "tool_execution_error",
74
- RESOURCE_CLOSED_ERROR = "resource_closed_error",
75
- TIMEOUT_ERROR = "timeout_error",
76
- INVALID_SCHEMA_ERROR = "invalid_schema_error",
77
- SAMPLING_ERROR = "SAMPLING_ERROR",
78
- INVALID_REQUEST_ERROR = "INVALID_REQUEST_ERROR"
79
- }
80
- /**
81
- * Custom error class for MCP-related errors
82
- */
83
- declare class McpError extends Error {
84
- type: McpErrorType;
85
- originalError?: Error;
86
- constructor(message: string, type: McpErrorType, originalError?: Error);
87
- }
88
- type McpSamplingRequest = z.infer<typeof CreateMessageRequestSchema>;
89
- type McpSamplingResponse = z.infer<typeof CreateMessageResultSchema>;
90
- type SamplingHandler = (request: LlmRequest) => Promise<string | LlmResponse>;
91
-
92
- declare class McpClientService {
93
- private config;
94
- private client;
95
- private transport;
96
- private isClosing;
97
- private mcpSamplingHandler;
98
- protected logger: Logger;
99
- constructor(config: McpConfig);
100
- /**
101
- * Initializes and returns an MCP client based on configuration.
102
- * Will create a new client if one doesn't exist yet.
103
- */
104
- initialize(): Promise<Client>;
105
- /**
106
- * Creates a transport based on the configuration.
107
- */
108
- private createTransport;
109
- /**
110
- * Re-initializes the MCP client when a session is closed.
111
- * Used by the retry mechanism.
112
- */
113
- reinitialize(): Promise<void>;
114
- /**
115
- * Cleans up resources associated with this client service.
116
- * Similar to Python's AsyncExitStack.aclose() functionality.
117
- */
118
- private cleanupResources;
119
- /**
120
- * Call an MCP tool with retry capability if the session is closed.
121
- */
122
- callTool(name: string, args: Record<string, any>): Promise<any>;
123
- /**
124
- * Closes and cleans up all resources.
125
- * Should be called when the service is no longer needed.
126
- * Similar to Python's close() method.
127
- */
128
- close(): Promise<void>;
129
- /**
130
- * Checks if the client is currently connected
131
- */
132
- isConnected(): boolean;
133
- private setupSamplingHandler;
134
- /**
135
- * Set a new ADK sampling handler
136
- */
137
- setSamplingHandler(handler: SamplingHandler): void;
138
- /**
139
- * Remove the sampling handler
140
- */
141
- removeSamplingHandler(): void;
142
- }
143
-
144
35
  /**
145
36
  * Represents the actions attached to an event.
146
37
  */
@@ -2079,6 +1970,117 @@ declare class LoadArtifactsTool extends BaseTool {
2079
1970
  private extractFunctionResponse;
2080
1971
  }
2081
1972
 
1973
+ type McpConfig = {
1974
+ name: string;
1975
+ description: string;
1976
+ transport: McpTransportType;
1977
+ timeout?: number;
1978
+ retryOptions?: {
1979
+ maxRetries?: number;
1980
+ initialDelay?: number;
1981
+ maxDelay?: number;
1982
+ };
1983
+ headers?: Record<string, string>;
1984
+ cacheConfig?: {
1985
+ enabled?: boolean;
1986
+ maxAge?: number;
1987
+ maxSize?: number;
1988
+ };
1989
+ debug?: boolean;
1990
+ /**
1991
+ * Sampling handler for processing MCP sampling requests.
1992
+ * This allows MCP servers to request LLM completions through your ADK agent.
1993
+ */
1994
+ samplingHandler?: SamplingHandler;
1995
+ };
1996
+ type McpTransportType = {
1997
+ mode: "stdio";
1998
+ command: string;
1999
+ args: string[];
2000
+ env?: Record<string, string>;
2001
+ } | {
2002
+ mode: "sse";
2003
+ serverUrl: string;
2004
+ headers?: HeadersInit;
2005
+ };
2006
+ /**
2007
+ * Error types specific to the MCP client
2008
+ */
2009
+ declare enum McpErrorType {
2010
+ CONNECTION_ERROR = "connection_error",
2011
+ TOOL_EXECUTION_ERROR = "tool_execution_error",
2012
+ RESOURCE_CLOSED_ERROR = "resource_closed_error",
2013
+ TIMEOUT_ERROR = "timeout_error",
2014
+ INVALID_SCHEMA_ERROR = "invalid_schema_error",
2015
+ SAMPLING_ERROR = "SAMPLING_ERROR",
2016
+ INVALID_REQUEST_ERROR = "INVALID_REQUEST_ERROR"
2017
+ }
2018
+ /**
2019
+ * Custom error class for MCP-related errors
2020
+ */
2021
+ declare class McpError extends Error {
2022
+ type: McpErrorType;
2023
+ originalError?: Error;
2024
+ constructor(message: string, type: McpErrorType, originalError?: Error);
2025
+ }
2026
+ type McpSamplingRequest = z.infer<typeof CreateMessageRequestSchema>;
2027
+ type McpSamplingResponse = z.infer<typeof CreateMessageResultSchema>;
2028
+ type SamplingHandler = (request: LlmRequest) => Promise<string | LlmResponse>;
2029
+
2030
+ declare class McpClientService {
2031
+ private config;
2032
+ private client;
2033
+ private transport;
2034
+ private isClosing;
2035
+ private mcpSamplingHandler;
2036
+ protected logger: Logger;
2037
+ constructor(config: McpConfig);
2038
+ /**
2039
+ * Initializes and returns an MCP client based on configuration.
2040
+ * Will create a new client if one doesn't exist yet.
2041
+ */
2042
+ initialize(): Promise<Client>;
2043
+ /**
2044
+ * Creates a transport based on the configuration.
2045
+ */
2046
+ private createTransport;
2047
+ /**
2048
+ * Re-initializes the MCP client when a session is closed.
2049
+ * Used by the retry mechanism.
2050
+ */
2051
+ reinitialize(): Promise<void>;
2052
+ /**
2053
+ * Cleans up resources associated with this client service.
2054
+ * Similar to Python's AsyncExitStack.aclose() functionality.
2055
+ */
2056
+ private cleanupResources;
2057
+ /**
2058
+ * Call an MCP tool with retry capability if the session is closed.
2059
+ */
2060
+ callTool(name: string, args: Record<string, any>): Promise<any>;
2061
+ /**
2062
+ * Closes and cleans up all resources.
2063
+ * Should be called when the service is no longer needed.
2064
+ * Similar to Python's close() method.
2065
+ */
2066
+ close(): Promise<void>;
2067
+ /**
2068
+ * Checks if the client is currently connected
2069
+ */
2070
+ isConnected(): boolean;
2071
+ private setupSamplingHandler;
2072
+ /**
2073
+ * Set a new ADK sampling handler
2074
+ */
2075
+ setSamplingHandler(handler: SamplingHandler): void;
2076
+ /**
2077
+ * Remove the sampling handler
2078
+ */
2079
+ removeSamplingHandler(): void;
2080
+ }
2081
+
2082
+ declare function convertMcpToolToBaseTool(mcpTool: Tool, client?: Client): Promise<BaseTool>;
2083
+
2082
2084
  /**
2083
2085
  * Converts an ADK-style BaseTool to an MCP tool format
2084
2086
  * Similar to Python's adk_to_mcp_tool_type function
@@ -2489,8 +2491,6 @@ declare const index$7_LoadMemoryTool: typeof LoadMemoryTool;
2489
2491
  declare const index$7_McpAbi: typeof McpAbi;
2490
2492
  declare const index$7_McpAtp: typeof McpAtp;
2491
2493
  declare const index$7_McpBamm: typeof McpBamm;
2492
- type index$7_McpClientService = McpClientService;
2493
- declare const index$7_McpClientService: typeof McpClientService;
2494
2494
  declare const index$7_McpCoinGecko: typeof McpCoinGecko;
2495
2495
  type index$7_McpConfig = McpConfig;
2496
2496
  declare const index$7_McpDiscord: typeof McpDiscord;
@@ -2526,6 +2526,7 @@ type index$7_UserInteractionTool = UserInteractionTool;
2526
2526
  declare const index$7_UserInteractionTool: typeof UserInteractionTool;
2527
2527
  declare const index$7_adkToMcpToolType: typeof adkToMcpToolType;
2528
2528
  declare const index$7_buildFunctionDeclaration: typeof buildFunctionDeclaration;
2529
+ declare const index$7_convertMcpToolToBaseTool: typeof convertMcpToolToBaseTool;
2529
2530
  declare const index$7_createFunctionTool: typeof createFunctionTool;
2530
2531
  declare const index$7_createSamplingHandler: typeof createSamplingHandler;
2531
2532
  declare const index$7_createTool: typeof createTool;
@@ -2534,7 +2535,7 @@ declare const index$7_jsonSchemaToDeclaration: typeof jsonSchemaToDeclaration;
2534
2535
  declare const index$7_mcpSchemaToParameters: typeof mcpSchemaToParameters;
2535
2536
  declare const index$7_normalizeJsonSchema: typeof normalizeJsonSchema;
2536
2537
  declare namespace index$7 {
2537
- export { index$7_AgentTool as AgentTool, type index$7_AgentToolConfig as AgentToolConfig, type index$7_BaseAgentType as BaseAgentType, index$7_BaseTool as BaseTool, type index$7_BuildFunctionDeclarationOptions as BuildFunctionDeclarationOptions, type index$7_CreateToolConfig as CreateToolConfig, type index$7_CreateToolConfigWithSchema as CreateToolConfigWithSchema, type index$7_CreateToolConfigWithoutSchema as CreateToolConfigWithoutSchema, index$7_ExitLoopTool as ExitLoopTool, index$7_FileOperationsTool as FileOperationsTool, index$7_FunctionTool as FunctionTool, index$7_GetUserChoiceTool as GetUserChoiceTool, index$7_GoogleSearch as GoogleSearch, index$7_HttpRequestTool as HttpRequestTool, index$7_LoadArtifactsTool as LoadArtifactsTool, index$7_LoadMemoryTool as LoadMemoryTool, index$7_McpAbi as McpAbi, index$7_McpAtp as McpAtp, index$7_McpBamm as McpBamm, index$7_McpClientService as McpClientService, index$7_McpCoinGecko as McpCoinGecko, type index$7_McpConfig as McpConfig, index$7_McpDiscord as McpDiscord, index$7_McpError as McpError, index$7_McpErrorType as McpErrorType, index$7_McpFilesystem as McpFilesystem, index$7_McpFraxlend as McpFraxlend, index$7_McpGeneric as McpGeneric, index$7_McpIqWiki as McpIqWiki, index$7_McpMemory as McpMemory, index$7_McpNearAgent as McpNearAgent, index$7_McpNearIntents as McpNearIntents, index$7_McpOdos as McpOdos, index$7_McpSamplingHandler as McpSamplingHandler, type index$7_McpSamplingRequest as McpSamplingRequest, type index$7_McpSamplingResponse as McpSamplingResponse, type index$7_McpServerConfig as McpServerConfig, index$7_McpTelegram as McpTelegram, index$7_McpToolset as McpToolset, type index$7_McpTransportType as McpTransportType, index$7_McpUpbit as McpUpbit, type index$7_SamplingHandler as SamplingHandler, type index$7_ToolConfig as ToolConfig, index$7_ToolContext as ToolContext, index$7_TransferToAgentTool as TransferToAgentTool, index$7_UserInteractionTool as UserInteractionTool, index$7_adkToMcpToolType as adkToMcpToolType, index$7_buildFunctionDeclaration as buildFunctionDeclaration, index$7_createFunctionTool as createFunctionTool, index$7_createSamplingHandler as createSamplingHandler, index$7_createTool as createTool, index$7_getMcpTools as getMcpTools, index$7_jsonSchemaToDeclaration as jsonSchemaToDeclaration, index$7_mcpSchemaToParameters as mcpSchemaToParameters, index$7_normalizeJsonSchema as normalizeJsonSchema };
2538
+ export { index$7_AgentTool as AgentTool, type index$7_AgentToolConfig as AgentToolConfig, type index$7_BaseAgentType as BaseAgentType, index$7_BaseTool as BaseTool, type index$7_BuildFunctionDeclarationOptions as BuildFunctionDeclarationOptions, type index$7_CreateToolConfig as CreateToolConfig, type index$7_CreateToolConfigWithSchema as CreateToolConfigWithSchema, type index$7_CreateToolConfigWithoutSchema as CreateToolConfigWithoutSchema, index$7_ExitLoopTool as ExitLoopTool, index$7_FileOperationsTool as FileOperationsTool, index$7_FunctionTool as FunctionTool, index$7_GetUserChoiceTool as GetUserChoiceTool, index$7_GoogleSearch as GoogleSearch, index$7_HttpRequestTool as HttpRequestTool, index$7_LoadArtifactsTool as LoadArtifactsTool, index$7_LoadMemoryTool as LoadMemoryTool, index$7_McpAbi as McpAbi, index$7_McpAtp as McpAtp, index$7_McpBamm as McpBamm, index$7_McpCoinGecko as McpCoinGecko, type index$7_McpConfig as McpConfig, index$7_McpDiscord as McpDiscord, index$7_McpError as McpError, index$7_McpErrorType as McpErrorType, index$7_McpFilesystem as McpFilesystem, index$7_McpFraxlend as McpFraxlend, index$7_McpGeneric as McpGeneric, index$7_McpIqWiki as McpIqWiki, index$7_McpMemory as McpMemory, index$7_McpNearAgent as McpNearAgent, index$7_McpNearIntents as McpNearIntents, index$7_McpOdos as McpOdos, index$7_McpSamplingHandler as McpSamplingHandler, type index$7_McpSamplingRequest as McpSamplingRequest, type index$7_McpSamplingResponse as McpSamplingResponse, type index$7_McpServerConfig as McpServerConfig, index$7_McpTelegram as McpTelegram, index$7_McpToolset as McpToolset, type index$7_McpTransportType as McpTransportType, index$7_McpUpbit as McpUpbit, type index$7_SamplingHandler as SamplingHandler, type index$7_ToolConfig as ToolConfig, index$7_ToolContext as ToolContext, index$7_TransferToAgentTool as TransferToAgentTool, index$7_UserInteractionTool as UserInteractionTool, index$7_adkToMcpToolType as adkToMcpToolType, index$7_buildFunctionDeclaration as buildFunctionDeclaration, index$7_convertMcpToolToBaseTool as convertMcpToolToBaseTool, index$7_createFunctionTool as createFunctionTool, index$7_createSamplingHandler as createSamplingHandler, index$7_createTool as createTool, index$7_getMcpTools as getMcpTools, index$7_jsonSchemaToDeclaration as jsonSchemaToDeclaration, index$7_mcpSchemaToParameters as mcpSchemaToParameters, index$7_normalizeJsonSchema as normalizeJsonSchema };
2538
2539
  }
2539
2540
 
2540
2541
  /**
@@ -5524,4 +5525,4 @@ declare const traceLlmCall: (invocationContext: InvocationContext, eventId: stri
5524
5525
 
5525
5526
  declare const VERSION = "0.1.0";
5526
5527
 
5527
- export { AF_FUNCTION_CALL_ID_PREFIX, type AfterAgentCallback, type AfterModelCallback, type AfterToolCallback, LlmAgent as Agent, AgentBuilder, type AgentBuilderConfig, type AgentBuilderWithSchema, AgentEvaluator, AgentTool, type AgentToolConfig, type AgentType, index$5 as Agents, AiSdkLlm, AnthropicLlm, ApiKeyCredential, ApiKeyScheme, AuthConfig, AuthCredential, AuthCredentialType, AuthHandler, AuthScheme, AuthSchemeType, AuthTool, type AuthToolArguments, AutoFlow, BaseAgent, type BaseAgentType, BaseCodeExecutor, type BaseCodeExecutorConfig, BaseLLMConnection, BaseLlm, BaseLlmFlow, BaseLlmRequestProcessor, BaseLlmResponseProcessor, type BaseMemoryService, BasePlanner, BaseSessionService, BaseTool, BasicAuthCredential, BearerTokenCredential, type BeforeAgentCallback, type BeforeModelCallback, type BeforeToolCallback, type BuildFunctionDeclarationOptions, type BuiltAgent, BuiltInCodeExecutor, BuiltInPlanner, CallbackContext, type CodeExecutionInput, type CodeExecutionResult, CodeExecutionUtils, CodeExecutorContext, type CreateToolConfig, type CreateToolConfigWithSchema, type CreateToolConfigWithoutSchema, DatabaseSessionService, EnhancedAuthConfig, type EnhancedRunner, type EvalCase, type EvalCaseResult, type EvalMetric, type EvalMetricResult, type EvalMetricResultPerInvocation, EvalResult, type EvalSet, type EvalSetResult, EvalStatus, type EvaluateConfig, index as Evaluation, type EvaluationResult, Evaluator, Event, EventActions, index$2 as Events, ExitLoopTool, type File, FileOperationsTool, FinalResponseMatchV2Evaluator, index$1 as Flows, type FullMessage, FunctionTool, GcsArtifactService, type GetSessionConfig, GetUserChoiceTool, GoogleLlm, GoogleSearch, HttpRequestTool, HttpScheme, InMemoryArtifactService, InMemoryMemoryService, InMemoryRunner, InMemorySessionService, type InstructionProvider, type IntermediateData, type Interval, type Invocation, InvocationContext, type JudgeModelOptions, LLMRegistry, LangGraphAgent, type LangGraphAgentConfig, type LangGraphNode, type ListSessionsResponse, LlmAgent, type LlmAgentConfig, LlmCallsLimitExceededError, type LlmModel, type LlmModelConfig, LlmRequest, LlmResponse, LoadArtifactsTool, LoadMemoryTool, LocalEvalService, LoopAgent, type LoopAgentConfig, McpAbi, McpAtp, McpBamm, McpClientService, McpCoinGecko, type McpConfig, McpDiscord, McpError, McpErrorType, McpFilesystem, McpFraxlend, McpGeneric, McpIqWiki, McpMemory, McpNearAgent, McpNearIntents, McpOdos, McpSamplingHandler, type McpSamplingRequest, type McpSamplingResponse, type McpServerConfig, McpTelegram, McpToolset, type McpTransportType, McpUpbit, index$4 as Memory, type MessagePart, type MetricInfo, type MetricValueInfo, index$6 as Models, OAuth2Credential, OAuth2Scheme, type OAuthFlow, type OAuthFlows, OpenAiLlm, OpenIdConnectScheme, ParallelAgent, type ParallelAgentConfig, type PerInvocationResult, PlanReActPlanner, PrebuiltMetrics, REQUEST_EUC_FUNCTION_CALL_NAME, ReadonlyContext, RougeEvaluator, RunConfig, Runner, SafetyEvaluatorV1, type SamplingHandler, type SearchMemoryResponse, SequentialAgent, type SequentialAgentConfig, type Session, type SessionInput, type SessionOptions, index$3 as Sessions, type SingleAfterModelCallback, type SingleAfterToolCallback, type SingleAgentCallback, type SingleBeforeModelCallback, type SingleBeforeToolCallback, SingleFlow, State, StreamingMode, type TelemetryConfig, TelemetryService, type ThinkingConfig, type ToolConfig, ToolContext, type ToolUnion, index$7 as Tools, TrajectoryEvaluator, TransferToAgentTool, UserInteractionTool, VERSION, VertexAiSessionService, _findFunctionCallEventIfLastEventIsFunctionResponse, adkToMcpToolType, requestProcessor$2 as agentTransferRequestProcessor, requestProcessor$6 as basicRequestProcessor, buildFunctionDeclaration, requestProcessor as codeExecutionRequestProcessor, responseProcessor as codeExecutionResponseProcessor, requestProcessor$3 as contentRequestProcessor, createAuthToolArguments, createBranchContextForSubAgent, createDatabaseSessionService, createFunctionTool, createMysqlSessionService, createPostgresSessionService, createSamplingHandler, createSqliteSessionService, createTool, generateAuthEvent, generateClientFunctionCallId, getLongRunningFunctionCalls, getMcpTools, handleFunctionCallsAsync, handleFunctionCallsLive, requestProcessor$5 as identityRequestProcessor, initializeTelemetry, injectSessionState, requestProcessor$4 as instructionsRequestProcessor, isEnhancedAuthConfig, jsonSchemaToDeclaration, mcpSchemaToParameters, mergeAgentRun, mergeParallelFunctionResponseEvents, newInvocationContextId, requestProcessor$1 as nlPlanningRequestProcessor, responseProcessor$1 as nlPlanningResponseProcessor, normalizeJsonSchema, populateClientFunctionCallId, registerProviders, removeClientFunctionCallId, requestProcessor$7 as requestProcessor, shutdownTelemetry, telemetryService, traceLlmCall, traceToolCall, tracer };
5528
+ export { AF_FUNCTION_CALL_ID_PREFIX, type AfterAgentCallback, type AfterModelCallback, type AfterToolCallback, LlmAgent as Agent, AgentBuilder, type AgentBuilderConfig, type AgentBuilderWithSchema, AgentEvaluator, AgentTool, type AgentToolConfig, type AgentType, index$5 as Agents, AiSdkLlm, AnthropicLlm, ApiKeyCredential, ApiKeyScheme, AuthConfig, AuthCredential, AuthCredentialType, AuthHandler, AuthScheme, AuthSchemeType, AuthTool, type AuthToolArguments, AutoFlow, BaseAgent, type BaseAgentType, BaseCodeExecutor, type BaseCodeExecutorConfig, BaseLLMConnection, BaseLlm, BaseLlmFlow, BaseLlmRequestProcessor, BaseLlmResponseProcessor, type BaseMemoryService, BasePlanner, BaseSessionService, BaseTool, BasicAuthCredential, BearerTokenCredential, type BeforeAgentCallback, type BeforeModelCallback, type BeforeToolCallback, type BuildFunctionDeclarationOptions, type BuiltAgent, BuiltInCodeExecutor, BuiltInPlanner, CallbackContext, type CodeExecutionInput, type CodeExecutionResult, CodeExecutionUtils, CodeExecutorContext, type CreateToolConfig, type CreateToolConfigWithSchema, type CreateToolConfigWithoutSchema, DatabaseSessionService, EnhancedAuthConfig, type EnhancedRunner, type EvalCase, type EvalCaseResult, type EvalMetric, type EvalMetricResult, type EvalMetricResultPerInvocation, EvalResult, type EvalSet, type EvalSetResult, EvalStatus, type EvaluateConfig, index as Evaluation, type EvaluationResult, Evaluator, Event, EventActions, index$2 as Events, ExitLoopTool, type File, FileOperationsTool, FinalResponseMatchV2Evaluator, index$1 as Flows, type FullMessage, FunctionTool, GcsArtifactService, type GetSessionConfig, GetUserChoiceTool, GoogleLlm, GoogleSearch, HttpRequestTool, HttpScheme, InMemoryArtifactService, InMemoryMemoryService, InMemoryRunner, InMemorySessionService, type InstructionProvider, type IntermediateData, type Interval, type Invocation, InvocationContext, type JudgeModelOptions, LLMRegistry, LangGraphAgent, type LangGraphAgentConfig, type LangGraphNode, type ListSessionsResponse, LlmAgent, type LlmAgentConfig, LlmCallsLimitExceededError, type LlmModel, type LlmModelConfig, LlmRequest, LlmResponse, LoadArtifactsTool, LoadMemoryTool, LocalEvalService, LoopAgent, type LoopAgentConfig, McpAbi, McpAtp, McpBamm, McpCoinGecko, type McpConfig, McpDiscord, McpError, McpErrorType, McpFilesystem, McpFraxlend, McpGeneric, McpIqWiki, McpMemory, McpNearAgent, McpNearIntents, McpOdos, McpSamplingHandler, type McpSamplingRequest, type McpSamplingResponse, type McpServerConfig, McpTelegram, McpToolset, type McpTransportType, McpUpbit, index$4 as Memory, type MessagePart, type MetricInfo, type MetricValueInfo, index$6 as Models, OAuth2Credential, OAuth2Scheme, type OAuthFlow, type OAuthFlows, OpenAiLlm, OpenIdConnectScheme, ParallelAgent, type ParallelAgentConfig, type PerInvocationResult, PlanReActPlanner, PrebuiltMetrics, REQUEST_EUC_FUNCTION_CALL_NAME, ReadonlyContext, RougeEvaluator, RunConfig, Runner, SafetyEvaluatorV1, type SamplingHandler, type SearchMemoryResponse, SequentialAgent, type SequentialAgentConfig, type Session, type SessionInput, type SessionOptions, index$3 as Sessions, type SingleAfterModelCallback, type SingleAfterToolCallback, type SingleAgentCallback, type SingleBeforeModelCallback, type SingleBeforeToolCallback, SingleFlow, State, StreamingMode, type TelemetryConfig, TelemetryService, type ThinkingConfig, type ToolConfig, ToolContext, type ToolUnion, index$7 as Tools, TrajectoryEvaluator, TransferToAgentTool, UserInteractionTool, VERSION, VertexAiSessionService, _findFunctionCallEventIfLastEventIsFunctionResponse, adkToMcpToolType, requestProcessor$2 as agentTransferRequestProcessor, requestProcessor$6 as basicRequestProcessor, buildFunctionDeclaration, requestProcessor as codeExecutionRequestProcessor, responseProcessor as codeExecutionResponseProcessor, requestProcessor$3 as contentRequestProcessor, convertMcpToolToBaseTool, createAuthToolArguments, createBranchContextForSubAgent, createDatabaseSessionService, createFunctionTool, createMysqlSessionService, createPostgresSessionService, createSamplingHandler, createSqliteSessionService, createTool, generateAuthEvent, generateClientFunctionCallId, getLongRunningFunctionCalls, getMcpTools, handleFunctionCallsAsync, handleFunctionCallsLive, requestProcessor$5 as identityRequestProcessor, initializeTelemetry, injectSessionState, requestProcessor$4 as instructionsRequestProcessor, isEnhancedAuthConfig, jsonSchemaToDeclaration, mcpSchemaToParameters, mergeAgentRun, mergeParallelFunctionResponseEvents, newInvocationContextId, requestProcessor$1 as nlPlanningRequestProcessor, responseProcessor$1 as nlPlanningResponseProcessor, normalizeJsonSchema, populateClientFunctionCallId, registerProviders, removeClientFunctionCallId, requestProcessor$7 as requestProcessor, shutdownTelemetry, telemetryService, traceLlmCall, traceToolCall, tracer };