/// <reference types="node" />
import * as events from 'events';
import Conversation, { AssistantUser, ConversationOptions } from './conversation';
import { Message } from './protocol';
import { FormattedChunk } from './card-output/text-formatter';
import type Engine from '../engine';
interface NotificationDelegate {
    notify(data: {
        appId: string;
        icon: string | null;
        raw: Record<string, unknown>;
        type: string;
        formatted: FormattedChunk[];
    }): Promise<void>;
    notifyError(data: {
        appId: string;
        icon: string | null;
        error: Error;
    }): Promise<void>;
}
declare type ConverseInput = {
    type: 'command';
    text: string;
} | {
    type: 'parsed';
    json: any;
    title?: string;
} | {
    type: 'tt';
    code: string;
};
export default class Assistant extends events.EventEmitter {
    private _engine;
    private _formatter;
    private _nluModelUrl;
    private _outputs;
    private _conversations;
    private _lastConversation;
    constructor(engine: Engine, nluModelUrl?: string);
    start(): Promise<void>;
    stop(): Promise<void>;
    converse(command: ConverseInput, user: AssistantUser, conversationId: string): Promise<{
        conversationId: string;
        messages: Message[];
        askSpecial: string | null;
    }>;
    addNotificationOutput(output: NotificationDelegate): void;
    removeNotificationOutput(output: NotificationDelegate): void;
    notifyAll(appId: string, icon: string | null, outputType: string, outputValue: Record<string, unknown>): Promise<void>;
    notifyErrorAll(appId: string, icon: string | null, error: Error): Promise<void>;
    getConversation(id?: string): Conversation | null;
    getOrOpenConversation(id: string, user: AssistantUser, options: ConversationOptions): Promise<Conversation>;
    openConversation(id: string, user: AssistantUser, options: ConversationOptions): Conversation;
    closeConversation(id: string): void;
}
export {};
