import { AgentService } from "./AgentService";
import { EventService } from "./EventService";
import { AIClient } from "../clients";
import { Tool, ToolCall } from "../clients/types";
import { ToolOverrideFunction, ToolWrapper } from "./types";
import { PluginService } from "../plugins/plugins";
import { McpService } from "./Mcp";
export interface ToolContext {
    Agents?: AgentService;
    Events?: EventService;
    Clients?: AIClient;
    Tools?: ToolsService;
    Plugins?: PluginService;
    Mcp?: McpService;
    metadata?: {
        [key: string]: any;
    };
}
export declare class ToolsService {
    private context;
    tools: Tool[];
    private overrides;
    private wrappers;
    private originalFunctions;
    functions: {};
    constructor(context?: ToolContext);
    getContext(): ToolContext;
    setContext(context: ToolContext): void;
    addContext<K extends keyof ToolContext, V extends ToolContext[K]>(key: K, value: V): void;
    getTools(): Tool[];
    getToolsByNames(names: string[]): Tool[];
    copyToolsFrom(toolNames: string[], toolsService: ToolsService): void;
    getToolNames(): string[];
    getTool(name: string): Tool;
    getFunction(name: string): any;
    setFunction(name: string, func: (...args: any) => any): void;
    setFunctions(names: string[], funcs: ((...args: any) => any)[]): void;
    addTool(tool: Tool): void;
    addTools(tools: Tool[]): void;
    addFunctions(fns: {
        [fnName: string]: (...args: any) => any;
    }): void;
    defineTools(tools: Tool[], functions: {
        [fnName: string]: ((...args: any) => any) | any;
    }): void;
    callTool(toolCall: ToolCall, enabledTools?: string[]): Promise<{
        toolMessages: any[];
        toolCallId: string;
        functionName: string;
        functionArgs: any;
        functionResp: any;
    }>;
    registerOverride(pattern: string | RegExp, override: ToolOverrideFunction, priority?: number): void;
    registerWrapper(pattern: string | RegExp, wrapper: ToolWrapper, priority?: number): void;
    removeOverride(pattern: string | RegExp): void;
    removeWrapper(pattern: string | RegExp): void;
    private applyOverridesAndWrappers;
    private findMatchingOverride;
    private findMatchingWrappers;
    private tryParseJson;
    unwrapMcpResponse(response: any): any;
    getOriginalFunction(name: string): ((...args: any[]) => any) | undefined;
    clearOverrides(): void;
}
