import type { ChunkId, DocumentId, EmbeddingModelIdentity, KnowledgeCapsuleId, KnowledgeSourceId, VectorId, VectorRecord } from "@oscharko-dev/keiko-contracts";
import type { DatabaseSync } from "node:sqlite";
export interface ChunkRow {
    readonly id: string;
    readonly capsule_id: string;
    readonly source_id: string;
    readonly document_id: string;
    readonly parsed_unit_id: string;
    readonly order_index: number;
    readonly token_count: number;
    readonly safe_excerpt_hash: string;
}
export interface VectorInsertRow {
    readonly id: VectorId;
    readonly capsuleId: KnowledgeCapsuleId;
    readonly sourceId: KnowledgeSourceId;
    readonly documentId: DocumentId;
    readonly chunkId: ChunkId;
    readonly embedding: Uint8Array;
    readonly identity: EmbeddingModelIdentity;
    readonly storageReference: string;
    readonly createdAt: number;
}
export declare function insertVectorRow(db: DatabaseSync, row: VectorInsertRow): void;
export declare function deleteVectorsForDocument(db: DatabaseSync, capsuleId: KnowledgeCapsuleId, documentId: DocumentId): void;
export declare function deleteVectorsForCapsule(db: DatabaseSync, capsuleId: KnowledgeCapsuleId): void;
export declare function countVectorsForDocument(db: DatabaseSync, capsuleId: KnowledgeCapsuleId, documentId: DocumentId): number;
export declare function countVectorsForCapsule(db: DatabaseSync, capsuleId: KnowledgeCapsuleId): number;
export declare function selectChunksForDocument(db: DatabaseSync, capsuleId: KnowledgeCapsuleId, documentId: DocumentId): readonly ChunkRow[];
export declare function composeVectorRecord(row: VectorInsertRow): VectorRecord;
//# sourceMappingURL=vector-persist.d.ts.map