@iqai/adk 0.1.8 → 0.1.10
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 +14 -0
- package/README.md +1 -2
- package/dist/index.d.mts +88 -19
- package/dist/index.d.ts +88 -19
- package/dist/index.js +281 -97
- package/dist/index.mjs +229 -45
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
# @iqai/adk
|
|
2
2
|
|
|
3
|
+
## 0.1.10
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 83e8a58: Add create tool function to easily create tools with zod schema
|
|
8
|
+
|
|
9
|
+
## 0.1.9
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- 2711998: - adds @iqai/mcp-discord mcp definition
|
|
14
|
+
- update EnhancedRunner.ask() to take in message type LlmRequest
|
|
15
|
+
- update SamplingHandler response type to be LlmResponse | string for more flexibility when used with enhanced runner
|
|
16
|
+
|
|
3
17
|
## 0.1.8
|
|
4
18
|
|
|
5
19
|
### Patch Changes
|
package/README.md
CHANGED
|
@@ -58,7 +58,7 @@ npm install @iqai/adk
|
|
|
58
58
|
import { AgentBuilder } from '@iqai/adk';
|
|
59
59
|
|
|
60
60
|
const response = await AgentBuilder
|
|
61
|
-
.withModel("gpt-4")
|
|
61
|
+
.withModel("gpt-4.1")
|
|
62
62
|
.ask("What is the primary function of an AI agent?");
|
|
63
63
|
|
|
64
64
|
console.log(response);
|
|
@@ -129,7 +129,6 @@ async function quickQuery() {
|
|
|
129
129
|
.create("query_assistant")
|
|
130
130
|
.withModel("gemini-2.5-flash")
|
|
131
131
|
.withInstruction("You are a helpful AI. Respond clearly and concisely.")
|
|
132
|
-
.withQuickSession("my-app", "user-123")
|
|
133
132
|
.ask("What is the capital of France?");
|
|
134
133
|
|
|
135
134
|
console.log(response);
|
package/dist/index.d.mts
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
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
3
|
import { LanguageModel } from 'ai';
|
|
4
|
+
import * as z from 'zod/v4';
|
|
4
5
|
import { Client } from '@modelcontextprotocol/sdk/client/index.js';
|
|
5
6
|
import { CreateMessageRequestSchema, CreateMessageResultSchema, Tool } from '@modelcontextprotocol/sdk/types.js';
|
|
6
|
-
import { z } from 'zod';
|
|
7
|
+
import { z as z$1 } from 'zod';
|
|
7
8
|
import { Kysely, Generated } from 'kysely';
|
|
8
9
|
import { StorageOptions } from '@google-cloud/storage';
|
|
9
10
|
import { Tracer } from '@opentelemetry/api';
|
|
@@ -904,6 +905,65 @@ declare abstract class BaseTool {
|
|
|
904
905
|
private findToolWithFunctionDeclarations;
|
|
905
906
|
}
|
|
906
907
|
|
|
908
|
+
/**
|
|
909
|
+
* Configuration for creating a tool
|
|
910
|
+
*/
|
|
911
|
+
interface CreateToolConfig<T extends Record<string, any>> {
|
|
912
|
+
/** The name of the tool */
|
|
913
|
+
name: string;
|
|
914
|
+
/** A description of what the tool does */
|
|
915
|
+
description: string;
|
|
916
|
+
/** Zod schema for validating tool arguments */
|
|
917
|
+
schema: z.ZodSchema<T>;
|
|
918
|
+
/** The function to execute (can be sync or async) */
|
|
919
|
+
fn: (args: T, context?: ToolContext) => any;
|
|
920
|
+
/** Whether the tool is a long running operation */
|
|
921
|
+
isLongRunning?: boolean;
|
|
922
|
+
/** Whether the tool execution should be retried on failure */
|
|
923
|
+
shouldRetryOnFailure?: boolean;
|
|
924
|
+
/** Maximum retry attempts */
|
|
925
|
+
maxRetryAttempts?: number;
|
|
926
|
+
}
|
|
927
|
+
/**
|
|
928
|
+
* Creates a tool from a configuration object.
|
|
929
|
+
*
|
|
930
|
+
* This is a more user-friendly alternative to FunctionTool that provides:
|
|
931
|
+
* - Automatic argument validation using Zod schemas
|
|
932
|
+
* - Clear error messages for invalid inputs
|
|
933
|
+
* - Automatic JSON Schema generation for LLM function declarations
|
|
934
|
+
* - Support for both sync and async functions
|
|
935
|
+
* - Optional ToolContext parameter support
|
|
936
|
+
*
|
|
937
|
+
* @param config The tool configuration object
|
|
938
|
+
* @returns A BaseTool instance ready for use with agents
|
|
939
|
+
*
|
|
940
|
+
* @example
|
|
941
|
+
* ```typescript
|
|
942
|
+
* import { createTool } from '@iqai/adk';
|
|
943
|
+
* import { z } from 'zod';
|
|
944
|
+
*
|
|
945
|
+
* const calculatorTool = createTool({
|
|
946
|
+
* name: 'calculator',
|
|
947
|
+
* description: 'Performs basic arithmetic operations',
|
|
948
|
+
* schema: z.object({
|
|
949
|
+
* operation: z.enum(['add', 'subtract', 'multiply', 'divide']),
|
|
950
|
+
* a: z.number().describe('First number'),
|
|
951
|
+
* b: z.number().describe('Second number')
|
|
952
|
+
* }),
|
|
953
|
+
* fn: ({ operation, a, b }) => {
|
|
954
|
+
* switch (operation) {
|
|
955
|
+
* case 'add': return { result: a + b };
|
|
956
|
+
* case 'subtract': return { result: a - b };
|
|
957
|
+
* case 'multiply': return { result: a * b };
|
|
958
|
+
* case 'divide': return { result: b !== 0 ? a / b : 'Cannot divide by zero' };
|
|
959
|
+
* default: return { error: 'Unknown operation' };
|
|
960
|
+
* }
|
|
961
|
+
* }
|
|
962
|
+
* });
|
|
963
|
+
* ```
|
|
964
|
+
*/
|
|
965
|
+
declare function createTool<T extends Record<string, any>>(config: CreateToolConfig<T>): BaseTool;
|
|
966
|
+
|
|
907
967
|
/**
|
|
908
968
|
* A tool that wraps a user-defined TypeScript function.
|
|
909
969
|
*
|
|
@@ -1322,9 +1382,9 @@ declare class McpError extends Error {
|
|
|
1322
1382
|
originalError?: Error;
|
|
1323
1383
|
constructor(message: string, type: McpErrorType, originalError?: Error);
|
|
1324
1384
|
}
|
|
1325
|
-
type McpSamplingRequest = z.infer<typeof CreateMessageRequestSchema>;
|
|
1326
|
-
type McpSamplingResponse = z.infer<typeof CreateMessageResultSchema>;
|
|
1327
|
-
type SamplingHandler = (
|
|
1385
|
+
type McpSamplingRequest = z$1.infer<typeof CreateMessageRequestSchema>;
|
|
1386
|
+
type McpSamplingResponse = z$1.infer<typeof CreateMessageResultSchema>;
|
|
1387
|
+
type SamplingHandler = (request: LlmRequest) => Promise<string | LlmResponse>;
|
|
1328
1388
|
|
|
1329
1389
|
declare class McpClientService {
|
|
1330
1390
|
private config;
|
|
@@ -1443,15 +1503,23 @@ declare class McpSamplingHandler {
|
|
|
1443
1503
|
*
|
|
1444
1504
|
* const llm = new Gemini("gemini-2.0-flash-exp");
|
|
1445
1505
|
*
|
|
1446
|
-
*
|
|
1447
|
-
*
|
|
1506
|
+
* // Example 1: Return full LlmResponse
|
|
1507
|
+
* const samplingHandler1 = createSamplingHandler(async (request) => {
|
|
1448
1508
|
* const responses = [];
|
|
1449
1509
|
* for await (const response of llm.generateContentAsync(request)) {
|
|
1450
1510
|
* responses.push(response);
|
|
1451
1511
|
* }
|
|
1452
|
-
*
|
|
1453
1512
|
* return responses[responses.length - 1];
|
|
1454
1513
|
* });
|
|
1514
|
+
*
|
|
1515
|
+
* // Example 2: Return simple string
|
|
1516
|
+
* const samplingHandler2 = createSamplingHandler(async (request) => {
|
|
1517
|
+
* const lastMessage = request.contents[request.contents.length - 1].parts[0].text;
|
|
1518
|
+
* return await runner.ask(lastMessage);
|
|
1519
|
+
* });
|
|
1520
|
+
*
|
|
1521
|
+
* // Example 3: Direct function reference
|
|
1522
|
+
* const samplingHandler3 = createSamplingHandler(runner.ask);
|
|
1455
1523
|
* ```
|
|
1456
1524
|
*/
|
|
1457
1525
|
declare function createSamplingHandler(handler: SamplingHandler): SamplingHandler;
|
|
@@ -1633,6 +1701,13 @@ declare function McpOdos(config?: McpServerConfig): McpToolset;
|
|
|
1633
1701
|
* Required env vars: TELEGRAM_BOT_TOKEN
|
|
1634
1702
|
*/
|
|
1635
1703
|
declare function McpTelegram(config?: McpServerConfig): McpToolset;
|
|
1704
|
+
/**
|
|
1705
|
+
* MCP Discord - Interact with Discord via MCP protocol
|
|
1706
|
+
*
|
|
1707
|
+
* Required env vars: DISCORD_TOKEN
|
|
1708
|
+
* Optional env vars: PATH
|
|
1709
|
+
*/
|
|
1710
|
+
declare function McpDiscord(config?: McpServerConfig): McpToolset;
|
|
1636
1711
|
/**
|
|
1637
1712
|
* MCP CoinGecko - Access cryptocurrency market data and analytics
|
|
1638
1713
|
*
|
|
@@ -1737,6 +1812,7 @@ declare function getMcpTools(config: McpConfig, toolFilter?: string[] | ((tool:
|
|
|
1737
1812
|
type index$6_BaseTool = BaseTool;
|
|
1738
1813
|
declare const index$6_BaseTool: typeof BaseTool;
|
|
1739
1814
|
type index$6_BuildFunctionDeclarationOptions = BuildFunctionDeclarationOptions;
|
|
1815
|
+
type index$6_CreateToolConfig<T extends Record<string, any>> = CreateToolConfig<T>;
|
|
1740
1816
|
type index$6_ExitLoopTool = ExitLoopTool;
|
|
1741
1817
|
declare const index$6_ExitLoopTool: typeof ExitLoopTool;
|
|
1742
1818
|
type index$6_FileOperationsTool = FileOperationsTool;
|
|
@@ -1758,6 +1834,7 @@ declare const index$6_McpAtp: typeof McpAtp;
|
|
|
1758
1834
|
declare const index$6_McpBamm: typeof McpBamm;
|
|
1759
1835
|
declare const index$6_McpCoinGecko: typeof McpCoinGecko;
|
|
1760
1836
|
type index$6_McpConfig = McpConfig;
|
|
1837
|
+
declare const index$6_McpDiscord: typeof McpDiscord;
|
|
1761
1838
|
type index$6_McpError = McpError;
|
|
1762
1839
|
declare const index$6_McpError: typeof McpError;
|
|
1763
1840
|
type index$6_McpErrorType = McpErrorType;
|
|
@@ -1791,12 +1868,13 @@ declare const index$6_adkToMcpToolType: typeof adkToMcpToolType;
|
|
|
1791
1868
|
declare const index$6_buildFunctionDeclaration: typeof buildFunctionDeclaration;
|
|
1792
1869
|
declare const index$6_createFunctionTool: typeof createFunctionTool;
|
|
1793
1870
|
declare const index$6_createSamplingHandler: typeof createSamplingHandler;
|
|
1871
|
+
declare const index$6_createTool: typeof createTool;
|
|
1794
1872
|
declare const index$6_getMcpTools: typeof getMcpTools;
|
|
1795
1873
|
declare const index$6_jsonSchemaToDeclaration: typeof jsonSchemaToDeclaration;
|
|
1796
1874
|
declare const index$6_mcpSchemaToParameters: typeof mcpSchemaToParameters;
|
|
1797
1875
|
declare const index$6_normalizeJsonSchema: typeof normalizeJsonSchema;
|
|
1798
1876
|
declare namespace index$6 {
|
|
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 };
|
|
1877
|
+
export { index$6_BaseTool as BaseTool, type index$6_BuildFunctionDeclarationOptions as BuildFunctionDeclarationOptions, type index$6_CreateToolConfig as CreateToolConfig, 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_McpDiscord as McpDiscord, 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_createTool as createTool, index$6_getMcpTools as getMcpTools, index$6_jsonSchemaToDeclaration as jsonSchemaToDeclaration, index$6_mcpSchemaToParameters as mcpSchemaToParameters, index$6_normalizeJsonSchema as normalizeJsonSchema };
|
|
1800
1878
|
}
|
|
1801
1879
|
|
|
1802
1880
|
/**
|
|
@@ -3801,7 +3879,7 @@ interface FullMessage extends Content$1 {
|
|
|
3801
3879
|
* Enhanced runner interface with simplified API
|
|
3802
3880
|
*/
|
|
3803
3881
|
interface EnhancedRunner {
|
|
3804
|
-
ask(message: string | FullMessage): Promise<string>;
|
|
3882
|
+
ask(message: string | FullMessage | LlmRequest): Promise<string>;
|
|
3805
3883
|
runAsync(params: {
|
|
3806
3884
|
userId: string;
|
|
3807
3885
|
sessionId: string;
|
|
@@ -4411,15 +4489,6 @@ declare abstract class BaseLlmFlow {
|
|
|
4411
4489
|
_handleBeforeModelCallback(invocationContext: InvocationContext, llmRequest: LlmRequest, modelResponseEvent: Event): Promise<LlmResponse | undefined>;
|
|
4412
4490
|
_handleAfterModelCallback(invocationContext: InvocationContext, llmResponse: LlmResponse, modelResponseEvent: Event): Promise<LlmResponse | undefined>;
|
|
4413
4491
|
_finalizeModelResponseEvent(llmRequest: LlmRequest, llmResponse: LlmResponse, modelResponseEvent: Event): Event;
|
|
4414
|
-
/**
|
|
4415
|
-
* Logs data in a visually appealing format that works well in any terminal size.
|
|
4416
|
-
* Uses vertical layout for better readability and respects debug settings.
|
|
4417
|
-
*/
|
|
4418
|
-
_formatContentPreview(content: any): string;
|
|
4419
|
-
/**
|
|
4420
|
-
* Formats response content preview for debug logging
|
|
4421
|
-
*/
|
|
4422
|
-
_formatResponsePreview(llmResponse: LlmResponse): string;
|
|
4423
4492
|
__getLlm(invocationContext: InvocationContext): BaseLlm;
|
|
4424
4493
|
}
|
|
4425
4494
|
|
|
@@ -4975,4 +5044,4 @@ declare const traceLlmCall: (invocationContext: InvocationContext, eventId: stri
|
|
|
4975
5044
|
|
|
4976
5045
|
declare const VERSION = "0.1.0";
|
|
4977
5046
|
|
|
4978
|
-
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, type EnhancedRunner, Event, EventActions, index$1 as Events, ExitLoopTool, type File, FileOperationsTool, index as Flows, type FullMessage, 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, type MessagePart, 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, _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, 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 };
|
|
5047
|
+
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, type CreateToolConfig, DatabaseSessionService, EnhancedAuthConfig, type EnhancedRunner, Event, EventActions, index$1 as Events, ExitLoopTool, type File, FileOperationsTool, index as Flows, type FullMessage, 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, McpDiscord, 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, type MessagePart, 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, _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 };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
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
3
|
import { LanguageModel } from 'ai';
|
|
4
|
+
import * as z from 'zod/v4';
|
|
4
5
|
import { Client } from '@modelcontextprotocol/sdk/client/index.js';
|
|
5
6
|
import { CreateMessageRequestSchema, CreateMessageResultSchema, Tool } from '@modelcontextprotocol/sdk/types.js';
|
|
6
|
-
import { z } from 'zod';
|
|
7
|
+
import { z as z$1 } from 'zod';
|
|
7
8
|
import { Kysely, Generated } from 'kysely';
|
|
8
9
|
import { StorageOptions } from '@google-cloud/storage';
|
|
9
10
|
import { Tracer } from '@opentelemetry/api';
|
|
@@ -904,6 +905,65 @@ declare abstract class BaseTool {
|
|
|
904
905
|
private findToolWithFunctionDeclarations;
|
|
905
906
|
}
|
|
906
907
|
|
|
908
|
+
/**
|
|
909
|
+
* Configuration for creating a tool
|
|
910
|
+
*/
|
|
911
|
+
interface CreateToolConfig<T extends Record<string, any>> {
|
|
912
|
+
/** The name of the tool */
|
|
913
|
+
name: string;
|
|
914
|
+
/** A description of what the tool does */
|
|
915
|
+
description: string;
|
|
916
|
+
/** Zod schema for validating tool arguments */
|
|
917
|
+
schema: z.ZodSchema<T>;
|
|
918
|
+
/** The function to execute (can be sync or async) */
|
|
919
|
+
fn: (args: T, context?: ToolContext) => any;
|
|
920
|
+
/** Whether the tool is a long running operation */
|
|
921
|
+
isLongRunning?: boolean;
|
|
922
|
+
/** Whether the tool execution should be retried on failure */
|
|
923
|
+
shouldRetryOnFailure?: boolean;
|
|
924
|
+
/** Maximum retry attempts */
|
|
925
|
+
maxRetryAttempts?: number;
|
|
926
|
+
}
|
|
927
|
+
/**
|
|
928
|
+
* Creates a tool from a configuration object.
|
|
929
|
+
*
|
|
930
|
+
* This is a more user-friendly alternative to FunctionTool that provides:
|
|
931
|
+
* - Automatic argument validation using Zod schemas
|
|
932
|
+
* - Clear error messages for invalid inputs
|
|
933
|
+
* - Automatic JSON Schema generation for LLM function declarations
|
|
934
|
+
* - Support for both sync and async functions
|
|
935
|
+
* - Optional ToolContext parameter support
|
|
936
|
+
*
|
|
937
|
+
* @param config The tool configuration object
|
|
938
|
+
* @returns A BaseTool instance ready for use with agents
|
|
939
|
+
*
|
|
940
|
+
* @example
|
|
941
|
+
* ```typescript
|
|
942
|
+
* import { createTool } from '@iqai/adk';
|
|
943
|
+
* import { z } from 'zod';
|
|
944
|
+
*
|
|
945
|
+
* const calculatorTool = createTool({
|
|
946
|
+
* name: 'calculator',
|
|
947
|
+
* description: 'Performs basic arithmetic operations',
|
|
948
|
+
* schema: z.object({
|
|
949
|
+
* operation: z.enum(['add', 'subtract', 'multiply', 'divide']),
|
|
950
|
+
* a: z.number().describe('First number'),
|
|
951
|
+
* b: z.number().describe('Second number')
|
|
952
|
+
* }),
|
|
953
|
+
* fn: ({ operation, a, b }) => {
|
|
954
|
+
* switch (operation) {
|
|
955
|
+
* case 'add': return { result: a + b };
|
|
956
|
+
* case 'subtract': return { result: a - b };
|
|
957
|
+
* case 'multiply': return { result: a * b };
|
|
958
|
+
* case 'divide': return { result: b !== 0 ? a / b : 'Cannot divide by zero' };
|
|
959
|
+
* default: return { error: 'Unknown operation' };
|
|
960
|
+
* }
|
|
961
|
+
* }
|
|
962
|
+
* });
|
|
963
|
+
* ```
|
|
964
|
+
*/
|
|
965
|
+
declare function createTool<T extends Record<string, any>>(config: CreateToolConfig<T>): BaseTool;
|
|
966
|
+
|
|
907
967
|
/**
|
|
908
968
|
* A tool that wraps a user-defined TypeScript function.
|
|
909
969
|
*
|
|
@@ -1322,9 +1382,9 @@ declare class McpError extends Error {
|
|
|
1322
1382
|
originalError?: Error;
|
|
1323
1383
|
constructor(message: string, type: McpErrorType, originalError?: Error);
|
|
1324
1384
|
}
|
|
1325
|
-
type McpSamplingRequest = z.infer<typeof CreateMessageRequestSchema>;
|
|
1326
|
-
type McpSamplingResponse = z.infer<typeof CreateMessageResultSchema>;
|
|
1327
|
-
type SamplingHandler = (
|
|
1385
|
+
type McpSamplingRequest = z$1.infer<typeof CreateMessageRequestSchema>;
|
|
1386
|
+
type McpSamplingResponse = z$1.infer<typeof CreateMessageResultSchema>;
|
|
1387
|
+
type SamplingHandler = (request: LlmRequest) => Promise<string | LlmResponse>;
|
|
1328
1388
|
|
|
1329
1389
|
declare class McpClientService {
|
|
1330
1390
|
private config;
|
|
@@ -1443,15 +1503,23 @@ declare class McpSamplingHandler {
|
|
|
1443
1503
|
*
|
|
1444
1504
|
* const llm = new Gemini("gemini-2.0-flash-exp");
|
|
1445
1505
|
*
|
|
1446
|
-
*
|
|
1447
|
-
*
|
|
1506
|
+
* // Example 1: Return full LlmResponse
|
|
1507
|
+
* const samplingHandler1 = createSamplingHandler(async (request) => {
|
|
1448
1508
|
* const responses = [];
|
|
1449
1509
|
* for await (const response of llm.generateContentAsync(request)) {
|
|
1450
1510
|
* responses.push(response);
|
|
1451
1511
|
* }
|
|
1452
|
-
*
|
|
1453
1512
|
* return responses[responses.length - 1];
|
|
1454
1513
|
* });
|
|
1514
|
+
*
|
|
1515
|
+
* // Example 2: Return simple string
|
|
1516
|
+
* const samplingHandler2 = createSamplingHandler(async (request) => {
|
|
1517
|
+
* const lastMessage = request.contents[request.contents.length - 1].parts[0].text;
|
|
1518
|
+
* return await runner.ask(lastMessage);
|
|
1519
|
+
* });
|
|
1520
|
+
*
|
|
1521
|
+
* // Example 3: Direct function reference
|
|
1522
|
+
* const samplingHandler3 = createSamplingHandler(runner.ask);
|
|
1455
1523
|
* ```
|
|
1456
1524
|
*/
|
|
1457
1525
|
declare function createSamplingHandler(handler: SamplingHandler): SamplingHandler;
|
|
@@ -1633,6 +1701,13 @@ declare function McpOdos(config?: McpServerConfig): McpToolset;
|
|
|
1633
1701
|
* Required env vars: TELEGRAM_BOT_TOKEN
|
|
1634
1702
|
*/
|
|
1635
1703
|
declare function McpTelegram(config?: McpServerConfig): McpToolset;
|
|
1704
|
+
/**
|
|
1705
|
+
* MCP Discord - Interact with Discord via MCP protocol
|
|
1706
|
+
*
|
|
1707
|
+
* Required env vars: DISCORD_TOKEN
|
|
1708
|
+
* Optional env vars: PATH
|
|
1709
|
+
*/
|
|
1710
|
+
declare function McpDiscord(config?: McpServerConfig): McpToolset;
|
|
1636
1711
|
/**
|
|
1637
1712
|
* MCP CoinGecko - Access cryptocurrency market data and analytics
|
|
1638
1713
|
*
|
|
@@ -1737,6 +1812,7 @@ declare function getMcpTools(config: McpConfig, toolFilter?: string[] | ((tool:
|
|
|
1737
1812
|
type index$6_BaseTool = BaseTool;
|
|
1738
1813
|
declare const index$6_BaseTool: typeof BaseTool;
|
|
1739
1814
|
type index$6_BuildFunctionDeclarationOptions = BuildFunctionDeclarationOptions;
|
|
1815
|
+
type index$6_CreateToolConfig<T extends Record<string, any>> = CreateToolConfig<T>;
|
|
1740
1816
|
type index$6_ExitLoopTool = ExitLoopTool;
|
|
1741
1817
|
declare const index$6_ExitLoopTool: typeof ExitLoopTool;
|
|
1742
1818
|
type index$6_FileOperationsTool = FileOperationsTool;
|
|
@@ -1758,6 +1834,7 @@ declare const index$6_McpAtp: typeof McpAtp;
|
|
|
1758
1834
|
declare const index$6_McpBamm: typeof McpBamm;
|
|
1759
1835
|
declare const index$6_McpCoinGecko: typeof McpCoinGecko;
|
|
1760
1836
|
type index$6_McpConfig = McpConfig;
|
|
1837
|
+
declare const index$6_McpDiscord: typeof McpDiscord;
|
|
1761
1838
|
type index$6_McpError = McpError;
|
|
1762
1839
|
declare const index$6_McpError: typeof McpError;
|
|
1763
1840
|
type index$6_McpErrorType = McpErrorType;
|
|
@@ -1791,12 +1868,13 @@ declare const index$6_adkToMcpToolType: typeof adkToMcpToolType;
|
|
|
1791
1868
|
declare const index$6_buildFunctionDeclaration: typeof buildFunctionDeclaration;
|
|
1792
1869
|
declare const index$6_createFunctionTool: typeof createFunctionTool;
|
|
1793
1870
|
declare const index$6_createSamplingHandler: typeof createSamplingHandler;
|
|
1871
|
+
declare const index$6_createTool: typeof createTool;
|
|
1794
1872
|
declare const index$6_getMcpTools: typeof getMcpTools;
|
|
1795
1873
|
declare const index$6_jsonSchemaToDeclaration: typeof jsonSchemaToDeclaration;
|
|
1796
1874
|
declare const index$6_mcpSchemaToParameters: typeof mcpSchemaToParameters;
|
|
1797
1875
|
declare const index$6_normalizeJsonSchema: typeof normalizeJsonSchema;
|
|
1798
1876
|
declare namespace index$6 {
|
|
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 };
|
|
1877
|
+
export { index$6_BaseTool as BaseTool, type index$6_BuildFunctionDeclarationOptions as BuildFunctionDeclarationOptions, type index$6_CreateToolConfig as CreateToolConfig, 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_McpDiscord as McpDiscord, 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_createTool as createTool, index$6_getMcpTools as getMcpTools, index$6_jsonSchemaToDeclaration as jsonSchemaToDeclaration, index$6_mcpSchemaToParameters as mcpSchemaToParameters, index$6_normalizeJsonSchema as normalizeJsonSchema };
|
|
1800
1878
|
}
|
|
1801
1879
|
|
|
1802
1880
|
/**
|
|
@@ -3801,7 +3879,7 @@ interface FullMessage extends Content$1 {
|
|
|
3801
3879
|
* Enhanced runner interface with simplified API
|
|
3802
3880
|
*/
|
|
3803
3881
|
interface EnhancedRunner {
|
|
3804
|
-
ask(message: string | FullMessage): Promise<string>;
|
|
3882
|
+
ask(message: string | FullMessage | LlmRequest): Promise<string>;
|
|
3805
3883
|
runAsync(params: {
|
|
3806
3884
|
userId: string;
|
|
3807
3885
|
sessionId: string;
|
|
@@ -4411,15 +4489,6 @@ declare abstract class BaseLlmFlow {
|
|
|
4411
4489
|
_handleBeforeModelCallback(invocationContext: InvocationContext, llmRequest: LlmRequest, modelResponseEvent: Event): Promise<LlmResponse | undefined>;
|
|
4412
4490
|
_handleAfterModelCallback(invocationContext: InvocationContext, llmResponse: LlmResponse, modelResponseEvent: Event): Promise<LlmResponse | undefined>;
|
|
4413
4491
|
_finalizeModelResponseEvent(llmRequest: LlmRequest, llmResponse: LlmResponse, modelResponseEvent: Event): Event;
|
|
4414
|
-
/**
|
|
4415
|
-
* Logs data in a visually appealing format that works well in any terminal size.
|
|
4416
|
-
* Uses vertical layout for better readability and respects debug settings.
|
|
4417
|
-
*/
|
|
4418
|
-
_formatContentPreview(content: any): string;
|
|
4419
|
-
/**
|
|
4420
|
-
* Formats response content preview for debug logging
|
|
4421
|
-
*/
|
|
4422
|
-
_formatResponsePreview(llmResponse: LlmResponse): string;
|
|
4423
4492
|
__getLlm(invocationContext: InvocationContext): BaseLlm;
|
|
4424
4493
|
}
|
|
4425
4494
|
|
|
@@ -4975,4 +5044,4 @@ declare const traceLlmCall: (invocationContext: InvocationContext, eventId: stri
|
|
|
4975
5044
|
|
|
4976
5045
|
declare const VERSION = "0.1.0";
|
|
4977
5046
|
|
|
4978
|
-
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, type EnhancedRunner, Event, EventActions, index$1 as Events, ExitLoopTool, type File, FileOperationsTool, index as Flows, type FullMessage, 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, type MessagePart, 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, _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, 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 };
|
|
5047
|
+
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, type CreateToolConfig, DatabaseSessionService, EnhancedAuthConfig, type EnhancedRunner, Event, EventActions, index$1 as Events, ExitLoopTool, type File, FileOperationsTool, index as Flows, type FullMessage, 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, McpDiscord, 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, type MessagePart, 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, _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 };
|