import type { CallToolResult } from "@modelcontextprotocol/sdk/types.js";
import type { ConsentManager } from "./consent-manager.js";
import type { McpServerManager } from "./server-manager.js";
import { type UiHostContext, type UiMessageParams, type UiModelContextParams, type UiResourceContent, type UiSessionMessages, type UiStreamSummary } from "./types.js";
export interface UiServerOptions {
    serverName: string;
    toolName: string;
    toolArgs: Record<string, unknown>;
    resource: UiResourceContent;
    manager: McpServerManager;
    consentManager: ConsentManager;
    hostContext?: UiHostContext;
    initialResultPromise?: Promise<CallToolResult>;
    sessionToken?: string;
    port?: number;
    onMessage?: (params: UiMessageParams) => Promise<void> | void;
    onContextUpdate?: (params: UiModelContextParams) => Promise<void> | void;
    onComplete?: (reason: string) => void;
}
export interface UiServerHandle {
    url: string;
    port: number;
    sessionToken: string;
    serverName: string;
    toolName: string;
    close: (reason?: string) => void;
    sendToolInput: (args: Record<string, unknown>) => void;
    sendToolResult: (result: CallToolResult) => void;
    sendResultPatch: (result: CallToolResult) => void;
    sendToolCancelled: (reason: string) => void;
    sendHostContext: (context: UiHostContext) => void;
    /** Get accumulated messages from this session */
    getSessionMessages: () => UiSessionMessages;
    getStreamSummary: () => UiStreamSummary | undefined;
}
export declare function startUiServer(options: UiServerOptions): Promise<UiServerHandle>;
//# sourceMappingURL=ui-server.d.ts.map