import type { SqliteDatabase } from '../db/adapter.js'; import type { PreparedSemanticQuery, VectorSearchBackend } from '../embedding/types.js'; import { type EntryKind, type EntryStatus } from '../serialization/validate.js'; import { type EntryRecord } from './entries.js'; export type RetrievalLane = 'exact-signal' | 'word-fts' | 'trigram' | 'like' | 'tag' | 'semantic'; export interface HybridSearchRuntime { readonly semantic?: { readonly query: PreparedSemanticQuery; readonly backend: VectorSearchBackend; }; } export interface HybridSearchInput { workspace: string; query: string; limit: number; kind?: EntryKind; status?: EntryStatus; tag?: string; includeSuperseded?: boolean; } export interface RetrievalCandidate { entryId: string; fusedScore: number; laneRanks: Partial>; matchedSignals: string[]; reasons: string[]; } /** Decide eligibility only after the entry and the complete parent snapshot decode. */ export declare function isRetrievableEntry(database: SqliteDatabase, entry: EntryRecord): boolean; /** Count current entries in one workspace that are eligible for ordinary retrieval. */ export declare function retrievableWorkspaceEntryCount(database: SqliteDatabase, workspace: string): number; export declare function hybridSearch(database: SqliteDatabase, input: HybridSearchInput, runtime?: HybridSearchRuntime): RetrievalCandidate[]; //# sourceMappingURL=hybrid-retrieval.d.ts.map