import { Tool, JSONToolOutput, BaseToolOptions, ToolEmitter, ToolInput, BaseToolRunOptions } from '../base.js'; import { RunContext } from '../../context.js'; import { z } from 'zod'; import { AnyToolSchemaLike } from '../../internals/helpers/schema.js'; import { estypes, ClientOptions, Client } from '@elastic/elasticsearch'; import 'ajv'; import '../../errors.js'; import '../../internals/types.js'; import '../../internals/helpers/guards.js'; import '../../internals/serializable.js'; import 'promise-based-task'; import '../../cache/base.js'; import '../../emitter-kHxkUxco.js'; import '../../internals/helpers/promise.js'; import 'zod-to-json-schema'; /** * Copyright 2025 © BeeAI a Series of LF Projects, LLC * SPDX-License-Identifier: Apache-2.0 */ interface ElasticSearchToolOptions extends BaseToolOptions { connection: ClientOptions; } type ElasticSearchToolResult = estypes.CatIndicesResponse | estypes.IndicesGetMappingResponse | estypes.SearchResponse; declare const ElasticSearchAction: { readonly ListIndices: "LIST_INDICES"; readonly GetIndexDetails: "GET_INDEX_DETAILS"; readonly Search: "SEARCH"; }; declare class ElasticSearchTool extends Tool, ElasticSearchToolOptions> { name: string; description: string; inputSchema(): z.ZodObject<{ action: z.ZodNativeEnum<{ readonly ListIndices: "LIST_INDICES"; readonly GetIndexDetails: "GET_INDEX_DETAILS"; readonly Search: "SEARCH"; }>; indexName: z.ZodOptional; query: z.ZodOptional; start: z.ZodOptional>; size: z.ZodOptional>; }, "strip", z.ZodTypeAny, { action: "LIST_INDICES" | "GET_INDEX_DETAILS" | "SEARCH"; start?: number | undefined; indexName?: string | undefined; query?: string | undefined; size?: number | undefined; }, { action: "LIST_INDICES" | "GET_INDEX_DETAILS" | "SEARCH"; start?: number | undefined; indexName?: string | undefined; query?: string | undefined; size?: number | undefined; }>; readonly emitter: ToolEmitter, JSONToolOutput>; protected validateInput(schema: AnyToolSchemaLike, input: unknown): asserts input is ToolInput; constructor(options: ElasticSearchToolOptions); protected client(): Promise; protected _run(input: ToolInput, _options: Partial, run: RunContext): Promise>; protected listIndices(signal?: AbortSignal): Promise; protected getIndexDetails(input: ToolInput, signal: AbortSignal): Promise; protected search(input: ToolInput, signal: AbortSignal): Promise; } export { ElasticSearchAction, ElasticSearchTool, type ElasticSearchToolOptions, type ElasticSearchToolResult };