import type { SemanticChunker } from '../chunker/index.js'; import type { EmbedderInterface } from '../chunker/semantic-chunker.js'; import type { DocumentParser } from '../parser/index.js'; import type { QualityProfile } from '../utils/visual-profile.js'; import type { VectorChunk, VisualAttachment } from '../vectordb/index.js'; import { buildChunksFromParseResult } from './compute.js'; import { type CaptionerConfig } from './visual.js'; /** Collaborators one file ingest run needs, injected as a unit. */ export interface FileIngestCollaborators { parser: DocumentParser; chunker: SemanticChunker; embedder: EmbedderInterface; } export interface PrepareFileForIngestOptions { images: boolean; captioner?: CaptionerConfig; } export interface PreparedFileIngest { filePath: string; chunks: Awaited>['chunks']; embeddings: number[][]; title: string | null; contentHash: string; /** Requested visual intent of this run: a profile for a captioned PDF, `null` otherwise. */ visualProfile: QualityProfile | null; visualAttachments: Map; omittedImageCount: number; } export declare function buildPreparedFileVectorChunks(prepared: PreparedFileIngest): VectorChunk[]; /** * Prepare one validated source file for persistence without touching storage or * process output. The source hash is read before parsing so a concurrent rewrite * remains visible to the next sync instead of being paired with stale chunks. * * The visual profile is resolved from the request before any caption outcome is * known, so it records what was asked for: a run with no qualifying region or a * tolerated caption failure still carries the requested profile. */ export declare function prepareFileForIngest(filePath: string, collaborators: FileIngestCollaborators, options: PrepareFileForIngestOptions): Promise; //# sourceMappingURL=file.d.ts.map