/** * Context Controller * * Orchestration layer for the "optimized context" use case. * Composes SearchController + MemoryController + CompressContextTool * + SymbolGraphService to deliver token-efficient context to agents. * * Ranking pipeline (2 phases): * Phase 1 — Graph prefilter: if query looks like a symbol name, * fetch structural context (definition + references) from * the Symbol Graph (pure PostgreSQL, <20ms). * Phase 2 — Hybrid semantic search: vector + FTS5 + RRF, with * centrality boost and graph-file boosting applied. */ export interface GetOptimizedContextInput { query: string; projectId: string; projectPath?: string; maxTokens?: number; maxResults?: number; workingMemoryBudget?: number; userId?: string; sessionId?: string; includeMemories?: boolean; memoryBudgetRatio?: number; } export interface OptimizedContextResult { context: string; sources: string[]; resultsCount: number; memoriesCount: number; tokensSaved: number; compressionRatio: number; /** Number of file chunks skipped (reference token) or diff-only in this call. */ sessionCacheHits: number; /** Tokens saved specifically by the session file cache (ref + diff-only). */ tokensSavedBySessionCache: number; } export declare class ContextController { private static instance; private readonly searchCtrl; private readonly memoryCtrl; private readonly compressor; private readonly sessionCache; private constructor(); static getInstance(): ContextController; getOptimizedContext(input: GetOptimizedContextInput): Promise; private searchMemoriesSafe; private formatMemorySection; private selectWorkingSet; } //# sourceMappingURL=context-controller.d.ts.map