import { YagrConfigService, type YagrConfigStoreLike } from '../config/yagr-config-service.js';
import type { EngineRuntimePort } from '../engine/engine.js';
import type { GatewayRuntimeHandle } from './types.js';
import type { YagrPhaseEvent, YagrRunOptions, YagrStateEvent, YagrToolEvent } from '../types.js';
export interface WebUiGatewayStatus {
    configured: boolean;
    host: string;
    port: number;
    url: string;
}
type WebUiChatStreamEvent = {
    type: 'start';
    sessionId: string;
    message: string;
} | {
    type: 'phase';
    phase: string;
    status: 'started' | 'completed';
    message: string;
} | {
    type: 'state';
    state: string;
    message: string;
} | {
    type: 'progress';
    tone: 'info' | 'success' | 'error';
    title: string;
    detail?: string;
    phase?: string;
} | {
    type: 'text-delta';
    delta: string;
} | {
    type: 'final';
    sessionId: string;
    response: string;
    finalState: string;
    requiredActions?: Array<{
        title: string;
        message: string;
    }>;
} | {
    type: 'error';
    error: string;
} | {
    type: 'embed';
    kind: 'workflow';
    workflowId: string;
    url: string;
    targetUrl?: string;
    title?: string;
    diagram?: string;
};
export declare function mapToolEventToWebUiStreamEvent(event: YagrToolEvent): WebUiChatStreamEvent | undefined;
export declare function mapPhaseEventToWebUiStreamEvent(event: YagrPhaseEvent): WebUiChatStreamEvent | undefined;
export declare function mapStateEventToWebUiStreamEvent(event: YagrStateEvent): WebUiChatStreamEvent | undefined;
export declare function getWebUiGatewayStatus(configService?: YagrConfigStoreLike): WebUiGatewayStatus;
export declare function createWebUiGatewayRuntime(engineResolver: () => Promise<EngineRuntimePort>, options?: YagrRunOptions, configService?: YagrConfigService): GatewayRuntimeHandle;
export {};
//# sourceMappingURL=webui.d.ts.map