import { CompletionResponse, GenericClient, Message, MessageContent, Tool, ToolCall } from "../../clients/types";
import { IAgent } from "../interface";
import { ToolsService } from "../../services/Tools";
import { EventService } from "../../services/EventService";
import { AIClient, Clients } from "../../clients";
import { MessageProcessor } from "../../services/MessageProcessor";
export { Message, Tool, ToolCall };
export interface ModelPreference {
    model: string;
    provider: keyof typeof Clients.clients;
}
export interface AgentContext {
    Tools?: ToolsService;
    Events?: EventService;
    messageProcessor?: MessageProcessor;
    Clients?: AIClient;
}
export interface ToolCallEvent {
    toolCall: ToolCall;
    functionResp: any;
}
export declare abstract class BaseAgent implements IAgent {
    abstract name: string;
    abstract description: string;
    private status;
    private lastHealthCheckTime;
    protected provider: string;
    protected modelName: string;
    protected client: null | GenericClient;
    protected modelPreferences: ModelPreference[];
    protected currentModelPreferenceIndex: number;
    protected easyFinalAnswer: boolean;
    protected requiredToolNames: string[];
    protected maxTurns: number | null;
    protected maxSpend: number | null;
    protected maxRunTimeMs: number | null;
    protected startTimeMs: number | null;
    protected turnCount: number;
    protected totalCostUsd: number;
    protected currentThread: number;
    protected totalInputTokens: number;
    protected totalOutputTokens: number;
    protected totalCacheReadTokens: number;
    protected totalCacheWriteTokens: number;
    protected compressThreshold: number;
    protected compressMinMessages: number;
    protected threads: Message[][];
    protected pendingUserMessages: Message[];
    protected pendingMessages: Message[];
    protected taskBreakdown: string;
    protected summaries: string[];
    protected currentTaskId: string | null;
    agentEvents: EventService;
    eventTypes: {
        newThread: string;
        threadUpdate: string;
        costUpdate: string;
        agentLog: string;
        toolCall: string;
        toolUsed: string;
        agentStatus: string;
        notStarted: string;
        inProgress: string;
        done: string;
        pause: string;
        kill: string;
        unpause: string;
        agentMsg: string;
        userSay: string;
        agentSay: string;
        agentNewTask: string;
        agentTaskComplete: string;
        tokenUsage: string;
    };
    tools: ToolsService;
    events: EventService;
    messageProcessor: MessageProcessor;
    clientService: AIClient;
    disabledTools: any[];
    constructor(context: AgentContext);
    protected log(message: string, level?: "info" | "warn" | "error"): void;
    setCompressThreshold(threshold: number): void;
    getCompressThreshold(): number;
    setMaxTurns(maxTurns: number | null): void;
    setMaxSpend(maxSpend: number | null): void;
    setMaxRunTime(maxRunTimeMs: number | null): void;
    newTask(taskId?: string): void;
    register(): void;
    setModelPreferences(value: ModelPreference[]): void;
    updatePreferences(value: ModelPreference): void;
    nextModel(): void;
    getModel(): string;
    setModel(value: string): void;
    getProvider(): string;
    setProvider(value: keyof typeof Clients.clients): void;
    getClient(): GenericClient;
    setClient(client: GenericClient): void;
    setEasyFinalAnswer(value: boolean): void;
    protected isTerminationResponse(content: string): boolean;
    getEnabledTools(): Tool[];
    getEnabledToolNames(): string[];
    disableTool(toolName: string): void;
    isToolEnabled(toolName: string): boolean;
    enableTool(toolName: string): void;
    private checkLimits;
    runTime(): number;
    private shouldTerminateFromLimits;
    getTurnCount(): number;
    adjustTotalCostUsd(cost: number): void;
    getTotalCostUsd(): number;
    adjustTokenUsage(usage: any): void;
    getTokenUsage(): {
        totalInputTokens: number;
        totalOutputTokens: number;
        totalCacheReadTokens: number;
        totalCacheWriteTokens: number;
    };
    startNewThread(messages: Message[]): void;
    updateCurrentThread(messages: Message[]): void;
    getThreads(): Message[][];
    getSummaries(): string[];
    abstract getInitialMessages(userInput: string | MessageContent[]): Promise<Message[]>;
    processToolMessages(toolCall: ToolCall): Promise<any[]>;
    logMessages(messages: Message[]): void;
    formatInputContent(userInput: string): string;
    formatAiResponse(response: string): string;
    formatInputMessages(messages: Message[]): Message[];
    formatOutputMessages(messages: Message[]): Message[];
    healthCheck(): Promise<boolean>;
    selectHealthyModel(): Promise<void>;
    isRequiredToolMissing(): boolean;
    setNotHealthy(): void;
    pause(): void;
    unpause(): void;
    unpaused(): Promise<unknown>;
    kill(): Promise<void>;
    call(userInput: string | MessageContent[], _messages?: Message[], retryCount?: number): any;
    getStatusMessage(): string;
    logStatus(): void;
    addPendingMessage(message: Message): void;
    addPendingUserMessage(message: Message): void;
    getMessagesLength(messages: Message[]): number;
    detectTruncatedToolCalls(toolCalls: ToolCall[], response: CompletionResponse): {
        role: string;
        content: string;
    } | null;
    getTaskBreakdown(messages: Message[]): Promise<string>;
    compressMessages(messages: Message[], startIndex: number, endIndex: number): Promise<Message[]>;
}
