/** Configuration used by embedding. */ export interface EmbeddingConfig { /** * Optional model string in "provider/model" format. * * When omitted or set to `"auto"`, Veryfront chooses the runtime default: * a local embedding model by default, automatically switching to the * Veryfront Cloud embedding default when cloud bootstrap is present. */ model?: string; documentPrefix?: string; queryPrefix?: string; batchSize?: number; } /** Public API contract for embedding. */ export interface Embedding { model: string; /** Embed a single text. Applies queryPrefix if configured. */ embed(text: string): Promise; /** Embed multiple texts. Applies documentPrefix if configured. Batches automatically. */ embedMany(texts: string[]): Promise; } /** Options accepted by chunk. */ export interface ChunkOptions { maxChars?: number; overlap?: number; separators?: string[]; } /** Configuration used by vector store. */ export interface VectorStoreConfig { embedder: Embedding; } /** Options accepted by search. */ export interface SearchOptions { topK?: number; threshold?: number; filter?: Record; strategy?: "dense" | "hybrid" | "mmr"; lambda?: number; } /** Result returned from search. */ export interface SearchResult { text: string; score: number; metadata?: Record; } /** Public API contract for vector store. */ export interface VectorStore { add(texts: string[], metadata?: Record[]): Promise; search(query: string, options?: SearchOptions): Promise; clear(): void; size: number; } /** Public API contract for rag document meta. */ export interface RagDocumentMeta { id: string; title: string; source: string; type: string; createdAt: number; url?: string; } /** Public API contract for rag chunk. */ export interface RagChunk { id: string; documentId: string; text: string; embedding: number[]; index: number; } /** Public API contract for rag store data. */ export interface RagStoreData { documents: RagDocumentMeta[]; chunks: RagChunk[]; } /** Public API contract for rag store backend. */ export type RagStoreBackend = "auto" | "local-json" | "veryfront-cloud"; /** Configuration used by rag store. */ export interface RagStoreConfig { model?: string; backend?: RagStoreBackend; branch?: string; storagePath?: string; contentDir?: string; contentExtensions?: string[]; chunkOptions?: ChunkOptions; documentPrefix?: string; queryPrefix?: string; batchSize?: number; } /** Result returned from rag search. */ export interface RagSearchResult { text: string; score: number; documentId: string; title: string; source: string; type: string; } /** Options accepted by rag search. */ export interface RagSearchOptions { topK?: number; threshold?: number; } /** Options accepted when refreshing an existing rag document. */ export interface RagRefreshOptions { title?: string; source?: string; type?: string; } /** Public API contract for rag store. */ export interface RagStore { ingest(title: string, text: string, meta?: { source?: string; type?: string; }): Promise; refreshDocument?(id: string, text: string, meta?: RagRefreshOptions): Promise; search(query: string, options?: RagSearchOptions): Promise; listDocuments(): Promise; removeDocument(id: string): Promise; indexContentDir(): Promise; } //# sourceMappingURL=types.d.ts.map