/** * Smart Context Window Packing * Given a question/task, returns the most relevant files and symbols * that fit within a given token budget. Helps agents minimize waste. */ export interface ContextItem { file: string; startLine?: number; endLine?: number; content: string; /** 0-1 score */ relevance: number; /** Why this item was included */ reason: string; estimatedTokens: number; } export interface ContextPackResult { items: ContextItem[]; totalTokens: number; budget: number; filesIncluded: number; filesSkipped: number; strategy: string; } /** * Pack the most relevant context for a given question within a token budget. * @param cwd - The working directory to scan. * @param options - Configuration options. * @param options.query - The search query. * @param options.maxTokens - Maximum token budget. * @param options.includeImports - Whether to include imported files. * @param options.includeSymbols - Whether to include symbols. * @param options.maxFiles - Maximum number of files to include. * @returns The packed context result. */ export declare function packContext(cwd: string, options: { query: string; maxTokens?: number; includeImports?: boolean; includeSymbols?: boolean; maxFiles?: number; }): Promise; //# sourceMappingURL=context-pack.d.ts.map