import { KnowhowSimpleClient } from "./KnowhowClient";
import { BaseAgent } from "../agents/base/base";
export interface SyncOptions {
    messageId?: string;
    existingKnowhowTaskId?: string;
    prompt: string;
}
export interface TaskSyncState {
    knowhowTaskId?: string;
    client: KnowhowSimpleClient;
    messageId?: string;
}
export declare class AgentSyncKnowhowWeb {
    private client;
    private baseUrl;
    private knowhowTaskId;
    private eventHandlersSetup;
    private finalizationPromise;
    private agent;
    private threadUpdateHandler;
    private doneHandler;
    private pendingThreadUpdatePromise;
    constructor(baseUrl?: string);
    createChatTask(options: SyncOptions): Promise<string | undefined>;
    updateChatTask(knowhowTaskId: string, agent: BaseAgent, inProgress: boolean, result?: string): Promise<void>;
    checkAndProcessPendingMessages(agent: BaseAgent, knowhowTaskId: string): Promise<void>;
    private waitForResume;
    setupAgentSync(agent: BaseAgent, knowhowTaskId?: string): Promise<void>;
    private setupEventHandlers;
    waitForFinalization(): Promise<void>;
    reset(): void;
    finalizeTask(agent: BaseAgent, knowhowTaskId: string | undefined, result: string): Promise<void>;
}
