import type { DbExec } from "../db/index.js"; export declare const DEFAULT_SEARCH_NAMESPACE = "creative_context"; export declare const PGVECTOR_REQUIRED_MESSAGE = "Vector search requires Postgres with the pgvector extension in the configured DATABASE_URL database."; export interface SearchNamespaceIdentifiers { namespace: string; ftsTable: string; ftsIndex: string; ftsAudienceIndex: string; vectorTable: string; vectorIndex: string; vectorAudienceIndex: string; } export interface PgVectorHit { vectorKey: string; embeddingSetId: string; score: number; } export interface PostgresFtsHit { chunkId: string; itemVersionId: string; score: number; } export interface RankedCandidate { key: string; value: T; score: number; reason?: string; } export interface FusedCandidate extends RankedCandidate { laneRanks: Record; reasons: string[]; } type PgVectorOptions = boolean | { namespace?: string; postgres?: boolean; /** The caller has already provisioned this namespace and dimension. */ indexInitialized?: boolean; }; export declare function searchNamespaceIdentifiers(namespace?: string, dimensions?: number): SearchNamespaceIdentifiers; export declare function assertPgVectorAvailable(postgres?: boolean): void; export declare function ensurePgVectorIndex(db: DbExec, dimensions: number, options?: PgVectorOptions): Promise; export declare function upsertPgVector(db: DbExec, input: { vectorKey: string; embeddingSetId: string; dimensions: number; vector: readonly number[]; audienceIds?: readonly string[]; updatedAt?: string; }, options?: PgVectorOptions): Promise; export declare function deletePgVectors(db: DbExec, input: { dimensions: number; vectorKeys: readonly string[]; namespace?: string; }, postgres?: boolean): Promise; export declare function queryPgVectorIndex(db: DbExec, input: { embeddingSetId: string; dimensions: number; vector: readonly number[]; limit?: number; allowedVectorKeys?: readonly string[]; allowedAudienceIds?: readonly string[]; namespace?: string; }, postgres?: boolean): Promise; export declare function ensurePostgresFts(db: DbExec, namespace?: string): Promise; export declare function upsertPostgresFtsDocument(db: DbExec, input: { chunkId: string; itemVersionId: string; title: string; summary?: string | null; body: string; audienceIds?: readonly string[]; updatedAt?: string; namespace?: string; }): Promise; export declare function queryPostgresFts(db: DbExec, input: { query: string; allowedChunkIds?: readonly string[]; allowedAudienceIds?: readonly string[]; limit?: number; namespace?: string; }): Promise; export declare function deletePostgresFtsDocuments(db: DbExec, chunkIds: readonly string[], namespace?: string): Promise; export declare function reciprocalRankFusion(lanes: Readonly[]>>, options?: { rankConstant?: number; limit?: number; }): FusedCandidate[]; export {}; //# sourceMappingURL=index.d.ts.map