import { BaseToolOptions, Tool, JSONToolOutput, ToolEmitter, ToolInput, BaseToolRunOptions } from '../base.cjs';
import { AnyToolSchemaLike } from '../../internals/helpers/schema.cjs';
import { ClientConfig, ShowCollectionsResponse, DescribeCollectionResponse, SearchRes, MilvusClient } from '@zilliz/milvus2-sdk-node';
import { z } from 'zod';
import 'ajv';
import '../../context.cjs';
import '../../emitter-BWtGHYn0.cjs';
import '../../internals/types.cjs';
import '../../internals/helpers/guards.cjs';
import '../../internals/serializable.cjs';
import '../../internals/helpers/promise.cjs';
import '../../errors.cjs';
import 'promise-based-task';
import '../../cache/base.cjs';
import 'zod-to-json-schema';

/**
 * Copyright 2025 IBM Corp.
 *
 * 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.
 */

interface MilvusToolOptions extends BaseToolOptions {
    connection: ClientConfig;
}
type MilvusSearchToolResult = ShowCollectionsResponse | DescribeCollectionResponse | SearchRes;
declare enum MilvusAction {
    ListCollections = "ListCollections",
    GetCollectionInfo = "GetCollectionInfo",
    Search = "Search",
    Insert = "Insert",
    Delete = "Delete"
}
declare class MilvusDatabaseTool extends Tool<JSONToolOutput<MilvusSearchToolResult>, MilvusToolOptions> {
    name: string;
    description: string;
    inputSchema(): z.ZodObject<{
        action: z.ZodNativeEnum<typeof MilvusAction>;
        collectionName: z.ZodOptional<z.ZodString>;
        vector: z.ZodOptional<z.ZodArray<z.ZodNumber, "many">>;
        vectors: z.ZodOptional<z.ZodArray<z.ZodArray<z.ZodNumber, "many">, "many">>;
        topK: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
        filter: z.ZodOptional<z.ZodString>;
        metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
        ids: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodString, z.ZodNumber]>, "many">>;
        searchOutput: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
    }, "strip", z.ZodTypeAny, {
        action: MilvusAction;
        filter?: string | undefined;
        metadata?: Record<string, any> | undefined;
        collectionName?: string | undefined;
        vector?: number[] | undefined;
        vectors?: number[][] | undefined;
        topK?: number | undefined;
        ids?: (string | number)[] | undefined;
        searchOutput?: string[] | undefined;
    }, {
        action: MilvusAction;
        filter?: string | undefined;
        metadata?: Record<string, any> | undefined;
        collectionName?: string | undefined;
        vector?: number[] | undefined;
        vectors?: number[][] | undefined;
        topK?: number | undefined;
        ids?: (string | number)[] | undefined;
        searchOutput?: string[] | undefined;
    }>;
    readonly emitter: ToolEmitter<ToolInput<this>, JSONToolOutput<MilvusSearchToolResult>>;
    protected validateInput(schema: AnyToolSchemaLike, input: unknown): asserts input is ToolInput<this>;
    protected client(): Promise<MilvusClient>;
    protected _run(input: ToolInput<this>, _options: Partial<BaseToolRunOptions>): Promise<JSONToolOutput<any>>;
    protected listCollections(): Promise<string[]>;
    protected getCollectionInfo(collectionName: string): Promise<any>;
    protected insert(input: ToolInput<this>): Promise<any>;
    protected search(input: ToolInput<this>): Promise<any>;
    protected delete(input: ToolInput<this>): Promise<any>;
}

export { MilvusAction, MilvusDatabaseTool, type MilvusSearchToolResult, type MilvusToolOptions };
