/** * ollama_corpus_amend — update one file's chunks in a corpus without a * full refresh. * * INVARIANT CAVEAT: the corpus is normally a SNAPSHOT OF DISK. This tool * bypasses that — `new_content` does not have to exist on disk, and the * corpus is mutated in place from the caller-supplied string. Callers * are responsible for keeping source files in sync with what they amend * (or for explicitly accepting the divergence). The manifest records * `has_amended_content: true` so corpus_list / corpus_health surface the * invariant break; a subsequent clean index/refresh clears the flag and * re-establishes the snapshot contract. * * Tier: Embed. Takes the per-corpus lock. The new chunks are embedded * using the manifest's declared embed_model (refusing silently different * active tier) and the manifest's stored chunk params (unless the caller * explicitly overrides). Existing chunks for `file_path` are removed * first, so re-amending the same file never accumulates duplicates. */ import { z } from "zod"; import type { Envelope } from "../envelope.js"; import type { RunContext } from "../runContext.js"; export declare const corpusAmendSchema: z.ZodObject<{ corpus: z.ZodString; file_path: z.ZodString; new_content: z.ZodString; chunk_chars: z.ZodOptional; chunk_overlap: z.ZodOptional; }, z.core.$strip>; export type CorpusAmendInput = z.infer; export interface CorpusAmendResult { corpus: string; file_path: string; chunks_removed: number; chunks_added: number; embed_model_resolved: string | null; } export declare function handleCorpusAmend(input: CorpusAmendInput, ctx: RunContext): Promise>; //# sourceMappingURL=corpusAmend.d.ts.map