/** * Vector DB export — convert crawled screens to embedding-ready chunks. * * Produces a JSONL file where each line is one chunk ready for upsert into * Pinecone, Qdrant, Weaviate, or any vector store. The embedding itself is * NOT generated here (requires an embedding model at the user's end) — we * produce the text chunks + metadata, and the caller embeds them. * * Format per line (JSONL): * { * "id": "-", * "text": "", * "metadata": { * "screenId": "...", * "projectId": "...", * "tenantId": "...", * "url": "...", * "screenName": "...", * "chunkIndex": 0, * "totalChunks": 3, * "crawledAt": "2026-...", * "wordCount": 142 * } * } */ export interface VectorChunk { id: string; text: string; metadata: { screenId: string; projectId: string; tenantId: string; url: string; screenName: string; chunkIndex: number; totalChunks: number; crawledAt: string; wordCount: number; }; } export interface ScreenRecord { id: string; name: string; url: string; projectId: string; tenantId: string; markdown?: string | null; markdownPath?: string | null; updatedAt?: Date; } export declare function exportScreensToVectorJsonl(screens: ScreenRecord[], outputPath: string, opts?: { maxChunkWords?: number; readMarkdownFromPath?: boolean; }): Promise<{ totalChunks: number; skipped: number; }>; /** * Pinecone-compatible upsert batch format. * Call this after generating embeddings to produce the final upsert payload. */ export declare function toPineconeUpsert(chunks: VectorChunk[], embeddings: number[][], namespace?: string): Array<{ id: string; values: number[]; metadata: VectorChunk['metadata']; }>; /** * Qdrant-compatible point format. */ export declare function toQdrantPoints(chunks: VectorChunk[], embeddings: number[][]): Array<{ id: string; vector: number[]; payload: VectorChunk['metadata'] & { text: string; }; }>;