/**
 * Context Assembly Utilities
 *
 * Provides utilities for assembling, formatting, and optimizing context
 * from retrieved chunks for LLM consumption.
 *
 * Features:
 * - Context window management (token-aware truncation)
 * - Citation formatting
 * - Context deduplication
 * - Relevance-based ordering
 * - Context summarization
 */
import type { Chunk, VectorQueryResult } from "../types.js";
import type { ContextAssemblyOptions, ContextWindow } from "../../types/index.js";
export type { CitationFormat } from "../../types/index.js";
export type { ContextAssemblyOptions } from "../../types/index.js";
export type { ContextWindow } from "../../types/index.js";
/**
 * Assemble context from retrieved results
 *
 * Combines multiple chunks into a coherent context string
 * suitable for LLM consumption.
 *
 * @param results - Retrieved chunks or query results
 * @param options - Assembly options
 * @returns Assembled context string
 *
 * @example
 * ```typescript
 * const context = assembleContext(results, {
 *   maxTokens: 4000,
 *   citationFormat: 'numbered',
 *   deduplicate: true
 * });
 * ```
 */
export declare function assembleContext(results: Array<Chunk | VectorQueryResult>, options?: ContextAssemblyOptions): string;
/**
 * Format context with inline citations
 *
 * @param results - Retrieved results
 * @param options - Formatting options
 * @returns Context with citations and citation list
 */
export declare function formatContextWithCitations(results: Array<Chunk | VectorQueryResult>, options?: ContextAssemblyOptions & {
    returnCitations?: boolean;
}): {
    context: string;
    citations: string[];
};
/**
 * Create a context window with detailed tracking
 *
 * @param results - Retrieved results
 * @param options - Assembly options
 * @returns Context window with metadata
 */
export declare function createContextWindow(results: Array<Chunk | VectorQueryResult>, options?: ContextAssemblyOptions): ContextWindow;
/**
 * Summarize context using LLM
 *
 * @param context - Context to summarize
 * @param maxLength - Maximum summary length
 * @param provider - LLM provider instance
 * @returns Summarized context
 */
export declare function summarizeContext(context: string, maxLength?: number, provider?: {
    generate: (params: {
        prompt: string;
        maxTokens: number;
        temperature: number;
    }) => Promise<{
        content?: string;
    } | null>;
}): Promise<string>;
/**
 * Order chunks by document structure (if available)
 */
export declare function orderByDocumentStructure(chunks: Chunk[]): Chunk[];
/**
 * Extract key sentences from chunks for summary
 */
export declare function extractKeySentences(text: string, count?: number): string[];
