import { type Embedder } from './rag-embedding.js'; import { type RagIngestResult } from './rag-ingest.js'; import type { RetrieveOptions, RetrieveResult } from './rag-runtime.js'; import { type SemanticViolation } from './semantic-validator.js'; export interface RagRetrieveDocumentOptions { readonly sourcePath: string; /** Global query fallback used when a ragRetrieve has queryParam but no matching queryParams entry. */ readonly query?: string; /** Named runtime query inputs. Values here take precedence over the global query fallback. */ readonly queryParams?: Readonly>; /** Override embedder for local, synchronous retrieval tests and tools. Provider-backed retrieval is future async work. */ readonly embedder?: Embedder; } export interface RagRetrieveDocumentEntry { readonly name: string; readonly indexName: string; readonly ragName?: string; readonly query: string; readonly retrieveOptions: RetrieveOptions; readonly result: RetrieveResult; } export interface RagRetrieveDocumentReport { readonly diagnostics: readonly SemanticViolation[]; readonly retrievals: readonly RagRetrieveDocumentEntry[]; readonly ingestion?: RagIngestResult; } /** * Execute runtime ragRetrieve declarations over declared local sources. * The current synchronous path supports memory and local-persistent vector stores * over declared local sources. Provider vector stores remain future async work. */ export declare function retrieveRagDocument(source: string, options: RagRetrieveDocumentOptions): RagRetrieveDocumentReport; export declare function ragRetrieveCorpusSourceSummary(report: RagRetrieveDocumentReport): string;