import { SemanticChunker } from '../chunker/index.js'; import type { Embedder } from '../embedder/index.js'; import { type PrepareFileForIngestOptions } from '../ingest/file.js'; import { DocumentParser } from '../parser/index.js'; import type { BaseDirsConfig, BaseDirsConfigWarning } from '../utils/base-dirs.js'; import type { QualityProfile } from '../utils/visual-profile.js'; import type { VectorStore } from '../vectordb/index.js'; import type { GlobalOptions, ResolvedGlobalConfig } from './options.js'; interface IngestConfig { baseDirs: BaseDirsConfig; baseDirsWarnings: BaseDirsConfigWarning[]; dbPath: string; cacheDir: string; modelName: string; maxFileSize: number; chunkMinLength?: number; } interface IngestCliOptions { /** Repeatable, in CLI order. Empty means unset — the resolver uses env / cwd. */ baseDirs?: string[] | undefined; maxFileSize?: number | undefined; chunkMinLength?: number | undefined; visual?: boolean | undefined; images?: boolean | undefined; /** Silently ignored unless `visual` is true. Defaults to `'fast'`. */ visualQuality?: QualityProfile | undefined; } interface ParsedArgs { positional: string | undefined; options: IngestCliOptions; help: boolean; } export declare function parseArgs(args: string[]): ParsedArgs; /** * Merge global config with ingest-specific options (CLI > env > defaults). * * CLI roots are pre-validated against the sensitive-path policy here, so the * user gets `--base-dir`-attributed errors before the resolver touches disk. */ export declare function resolveConfig(globalConfig: ResolvedGlobalConfig, ingestOptions?: IngestCliOptions): Promise; /** Collaborators one CLI ingest run needs, injected as a unit. */ export interface SingleFileIngestCollaborators { dbPath: string; parser: DocumentParser; chunker: SemanticChunker; embedder: Embedder; vectorStore: VectorStore; } /** * Ingest one file, returning the number of chunks inserted. * * `options` is the shared preparation contract, passed straight through: a * `captioner` on a `.pdf` routes through VLM captioning, and `pdf-visual` is * loaded by dynamic import, so no other path pulls the VLM module in. */ export declare function ingestSingleFile(filePath: string, collaborators: SingleFileIngestCollaborators, options?: PrepareFileForIngestOptions): Promise; /** * Turn a resolved per-file request into shared preparation options. The * captioner block travels only with a non-null profile, carrying the cacheDir * `resolveGlobalConfig` validated. Shared by `ingest` and CLI `sync`, so both * reach the VLM through one mapping. */ export declare function buildFileIngestOptions(request: { images: boolean; visualProfile: QualityProfile | null; }, globalConfig: ResolvedGlobalConfig): PrepareFileForIngestOptions; export declare function runIngest(args: string[], globalOptions?: GlobalOptions): Promise; export {}; //# sourceMappingURL=ingest.d.ts.map