UNPKG

adk-typescript

Version:

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

121 lines (120 loc) 2.99 kB
/** * Copyright 2025 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ import { BaseTool } from '../BaseTool'; /** * Options for creating an ApplicationIntegrationToolset */ export interface ApplicationIntegrationToolsetOptions { /** * Integration name */ integration?: string; /** * Trigger name */ trigger?: string; /** * Connection name */ connection?: string; /** * Entity operations */ entityOperations?: string[]; /** * Actions */ actions?: string[]; /** * Tool name */ toolName?: string; /** * Tool instructions */ toolInstructions?: string; /** * Service account JSON */ serviceAccountJson?: string; } /** * Toolset for Application Integration */ export declare class ApplicationIntegrationToolset { private readonly project; private readonly location; /** * Integration client */ private integrationClient; /** * Connections client */ private connectionsClient; /** * OpenAPI toolset */ private openApiToolset; /** * OpenAPI spec parser */ private openApiSpecParser; /** * Tools */ private tools; /** * Creates a new ApplicationIntegrationToolset * * @param project GCP project ID * @param location GCP location * @param options Options for creating the toolset */ constructor(project: string, location: string, options: ApplicationIntegrationToolsetOptions); /** * Validates required parameters * @param options Options to validate * @throws Error if parameters are invalid */ private validateParams; /** * Creates an auth credential * @param serviceAccountJson Service account JSON credentials * @returns Auth credential */ private createAuthCredential; /** * Sets up tools for integration * @param authCredential Auth credential */ private setupIntegrationTools; /** * Sets up tools for connection * @param connection Connection name * @param entityOperations Entity operations * @param actions Actions * @param toolName Tool name * @param toolInstructions Tool instructions * @param authCredential Auth credential */ private setupConnectionTools; /** * Gets the tools * @returns The tools */ getTools(): BaseTool[]; }