import { EventService } from "../../services/EventService";
import { AgentRenderer } from "../renderer";
import { SessionManager, TaskRegistry, SyncedAgentWatcher } from "../../services/index";
import { AttachableAgent } from "../../services/SyncedAgentWatcher";
import { BaseChatModule } from "./BaseChatModule";
import { BaseAgent } from "../../agents/index";
import { ChatCommand, ChatMode, ChatContext, ChatService } from "../types";
import { Message } from "../../clients/types";
import { ChatInteraction } from "../../types";
import { TaskInfo } from "../types";
export declare class AgentModule extends BaseChatModule {
    name: string;
    description: string;
    private attachedAgent;
    private taskRegistry;
    private sessionManager;
    private processStartTime;
    private activeAgentTaskId;
    private activeSyncedWatcher;
    private _wireAgentEvents;
    private _wireTaskId;
    private _wireAgentName;
    private remoteSyncModule;
    private _wireEventTypes;
    constructor();
    setRemoteSyncModule(module: any): void;
    getCommands(): ChatCommand[];
    private detachFromAgent;
    getModes(): ChatMode[];
    private get renderer();
    initialize(service: ChatService): Promise<void>;
    handleAgentCommand(args: string[]): Promise<void>;
    getTaskRegistry(): TaskRegistry;
    getSessionManager(): SessionManager;
    getRenderer(): AgentRenderer;
    getActiveSyncedWatcher(): SyncedAgentWatcher | undefined;
    setActiveSyncedWatcher(w: SyncedAgentWatcher | undefined): void;
    getActiveAgentTaskId(): string | undefined;
    setActiveAgentTaskId(id: string | undefined): void;
    wireAgentRendering(taskId: string, agentEvents: EventService, eventTypes: {
        toolCall?: string;
        toolUsed?: string;
        agentSay?: string;
        done: string;
    }, agentName: string): void;
    unwireAgentRendering(): void;
    rewireAgentRendering(): void;
    handleAgentsCommand(args: string[]): Promise<void>;
    getProcessStartTime(): number;
    resumeSession(sessionId: string, resumeReason?: string): Promise<void>;
    handleInput(input: string, context: ChatContext): Promise<boolean>;
    setupAgent(options: {
        agentName: string;
        input: string;
        messageId?: string;
        syncFs?: boolean;
        existingKnowhowTaskId?: string;
        provider?: string;
        model?: string;
        maxTimeLimit?: number;
        maxSpendLimit?: number;
        chatHistory?: ChatInteraction[];
        run?: boolean;
        taskId?: string;
    }): Promise<{
        agent: BaseAgent;
        taskId: string;
        formattedPrompt: any;
        initialInput: string;
        taskCompleted: Promise<string>;
    }>;
    loadThreadsForTask(taskId: string, messageId?: string): Promise<Message[][]>;
    resumeFromMessages(options: {
        agentName: string;
        input: string;
        threads: Message[][];
        messageId?: string;
        taskId?: string;
    }): Promise<{
        taskCompleted: Promise<string>;
    }>;
    getActiveTasks(): {
        taskId: string;
        agent: TaskInfo;
    }[];
    attachToTask(taskId: string): boolean;
    private saveSession;
    private updateSession;
    private startAgent;
    attachedAgentChatLoop(taskId: string, agent: AttachableAgent, initialInput?: string, initialMessages?: any[]): Promise<void>;
}
