UNPKG

adk-typescript

Version:

TypeScript port of Google's Agent Development Kit (ADK)

57 lines (56 loc) 2.45 kB
import { Event } from '../../events/Event'; import { InvocationContext } from '../../agents/InvocationContext'; import { BaseTool } from '../../tools/BaseTool'; /** * Generates a unique client function call ID * * @returns A unique function call ID string */ export declare function generateClientFunctionCallId(): string; /** * Populates client function call IDs for all function calls in an event * * @param event The event containing function calls to populate */ export declare function populateClientFunctionCallId(event: Event): void; /** * Removes client function call IDs from content parts * * @param content The content object containing parts to clean */ export declare function removeClientFunctionCallId(content: any): void; /** * Gets the set of long-running function call IDs * * @param functionCalls The list of function calls * @param toolsDict Dictionary mapping tool names to tool instances * @returns Set of function call IDs for long-running tools */ export declare function getLongRunningFunctionCalls(functionCalls: any[], toolsDict: Record<string, BaseTool>): Set<string>; /** * Generates an auth event for the requested auth configs * * @param invocationContext Invocation context * @param functionResponseEvent Function response event with auth configs * @returns Auth event or undefined if no auth configs requested */ export declare function generateAuthEvent(invocationContext: InvocationContext, functionResponseEvent: Event): Event | undefined; /** * Handles function calls for the live API * * @param invocationContext Invocation context * @param functionCallEvent Function call event * @param toolsDict Dictionary mapping tool names to tool instances * @returns Function response event */ export declare function handleFunctionCallsLive(invocationContext: InvocationContext, functionCallEvent: Event, toolsDict: Record<string, BaseTool>): Promise<Event | undefined>; /** * Handles function calls asynchronously * * @param invocationContext Invocation context * @param functionCallEvent Function call event * @param toolsDict Dictionary mapping tool names to tool instances * @param filters Optional set of function call IDs to filter * @returns Function response event */ export declare function handleFunctionCallsAsync(invocationContext: InvocationContext, functionCallEvent: Event, toolsDict: Record<string, BaseTool>, filters?: Set<string>): Promise<Event | undefined>;