import type { Entity, Relationship } from '@cortex/core'; import type { SQLiteStore } from './sqlite-store.js'; import type { VectorStore } from './vector-store.js'; export interface QueryContext { entities: Entity[]; relationships: Relationship[]; totalTokensEstimate: number; } export interface QueryEngineOptions { maxContextTokens?: number; maxResultEntities?: number; ftsWeight?: number; vectorWeight?: number; } export declare class QueryEngine { private sqliteStore; private vectorStore; private maxContextTokens; private maxResultEntities; private ftsWeight; private vectorWeight; constructor(sqliteStore: SQLiteStore, vectorStore: VectorStore, options?: QueryEngineOptions); assembleContext(query: string, queryEmbedding?: Float32Array, projectId?: string): Promise; private filterByPrivacy; /** * Converts a natural language query to an FTS5-safe keyword query. * FTS5 uses AND semantics by default, so "what is the architecture" would * require ALL words to match. We strip stop words and use OR semantics so * entities matching ANY meaningful keyword are returned. */ private buildFtsQuery; private ftsSearch; private mergeAndRank; } //# sourceMappingURL=query-engine.d.ts.map