/**
 * CLI Prompt Builder
 * Prompt concatenation + multi-turn formatting helpers
 */
import type { ConversationRecord, ConversationTurn } from './cli-executor-state.js';
export type PromptFormat = 'plain' | 'yaml' | 'json';
/**
 * Merge multiple conversations into a unified context
 * Returns merged turns sorted by timestamp with source tracking
 */
export interface MergedTurn extends ConversationTurn {
    source_id: string;
}
export interface MergeResult {
    mergedTurns: MergedTurn[];
    sourceConversations: ConversationRecord[];
    totalDuration: number;
}
export declare function mergeConversations(conversations: ConversationRecord[]): MergeResult;
/**
 * Build prompt from merged conversations
 */
export declare function buildMergedPrompt(mergeResult: MergeResult, newPrompt: string, format?: PromptFormat): string;
/**
 * Turn data structure for concatenation
 */
interface TurnData {
    turn: number;
    timestamp?: string;
    role: 'user' | 'assistant';
    content: string;
    status?: string;
    duration_ms?: number;
    source_id?: string;
}
/**
 * Prompt concatenation options
 */
export interface ConcatOptions {
    format: PromptFormat;
    includeMetadata?: boolean;
    includeTurnMarkers?: boolean;
    maxOutputLength?: number;
}
/**
 * PromptConcatenator - Dedicated class for building multi-turn prompts
 * Supports multiple output formats: plain text, YAML, JSON
 */
export declare class PromptConcatenator {
    private turns;
    private options;
    private metadata;
    constructor(options?: Partial<ConcatOptions>);
    /**
     * Set metadata for the conversation
     */
    setMetadata(key: string, value: unknown): this;
    /**
     * Add a user turn
     */
    addUserTurn(content: string, options?: Partial<Omit<TurnData, 'role' | 'content'>>): this;
    /**
     * Add an assistant turn
     */
    addAssistantTurn(content: string, options?: Partial<Omit<TurnData, 'role' | 'content'>>): this;
    /**
     * Add a conversation turn from ConversationTurn
     */
    addFromConversationTurn(turn: ConversationTurn, sourceId?: string): this;
    /**
     * Load turns from an existing conversation
     */
    loadConversation(conversation: ConversationRecord): this;
    /**
     * Build the final prompt in plain text format
     */
    private buildPlainText;
    /**
     * Build the final prompt in YAML format
     */
    private buildYaml;
    /**
     * Build the final prompt in JSON format
     */
    private buildJson;
    /**
     * Helper to format YAML values
     */
    private yamlValue;
    /**
     * Build the final prompt string
     */
    build(newPrompt: string): string;
    /**
     * Reset the concatenator for reuse
     */
    reset(): this;
}
/**
 * Create a prompt concatenator with specified options
 */
export declare function createPromptConcatenator(options?: Partial<ConcatOptions>): PromptConcatenator;
/**
 * Quick helper to build a multi-turn prompt in any format
 */
export declare function buildPrompt(conversation: ConversationRecord, newPrompt: string, format?: PromptFormat): string;
/**
 * Build multi-turn prompt with full conversation history
 * Uses the PromptConcatenator with plain text format by default
 */
export declare function buildMultiTurnPrompt(conversation: ConversationRecord, newPrompt: string, format?: PromptFormat): string;
export {};
//# sourceMappingURL=cli-prompt-builder.d.ts.map