import type { ProductIntelligenceExecuteInput } from "./product-intelligence.js";
type ChatTitleConversation = {
    id: string;
    orgId: string;
    title: string;
    forkedFromConversationId?: string | null;
};
type ChatTitleMessage = {
    id: string;
    role: string;
    kind: string;
    body: string;
    structuredPayload?: Record<string, unknown> | null;
};
type ChatTitleStore = {
    listMessages(conversationId: string, options?: {
        includeTranscript?: boolean;
    }): Promise<ChatTitleMessage[] | null>;
    updateDefaultTitle(id: string, title: string, expectedCurrentTitle?: string): Promise<ChatTitleConversation | null>;
    replaceSystemGeneratedTitle(id: string, expectedTitle: string, title: string): Promise<ChatTitleConversation | null>;
};
type ProductIntelligenceRunner = {
    execute(input: ProductIntelligenceExecuteInput): Promise<unknown>;
};
export type ChatTitleGenerationOptions = {
    expectedCurrentTitle?: string | null;
};
export declare function buildChatTitlePromptFromMessages(messages: ChatTitleMessage[]): string | null;
export declare function chatTitleGenerationService(input: {
    chats: ChatTitleStore;
    productIntelligence: ProductIntelligenceRunner;
}): {
    startAutomaticGeneration: (conversation: ChatTitleConversation, userMessage: ChatTitleMessage, options?: ChatTitleGenerationOptions) => void;
};
export {};
//# sourceMappingURL=chat-title-generation.d.ts.map