/** * Document ingest — the write side of the pipeline: a file on disk (or a * capture envelope) becomes an indexed, versioned, searchable document. * * One pass per document: guard the input, resolve the capture envelope's * identity, extract and hash the text, chunk and enrich it, store every chunk, * and only then commit the version record. An incomplete store commits * nothing, which is what makes a re-ingest repair it. * * Split out of document-pipeline.ts. * * @module v1/cli/knowledge/document-ingest */ import type { FileEntry } from '../capabilities/types.js'; import { type MetadataCache } from './document-index.js'; import type { BatchIngestResult, IngestResult } from './document-types.js'; /** @internal — shared with okf-bundle, which extracts text the same way. */ export declare function toFileEntry(filePath: string): FileEntry; export declare function ingestDocument(filePath: string, scope?: string, rootDir?: string, _metadataCache?: MetadataCache): Promise; export declare function ingestDirectory(dirPath: string, scope?: string, opts?: { rootDir?: string; onProgress?: (file: string, done: number, total: number) => void; }): Promise; //# sourceMappingURL=document-ingest.d.ts.map