/**
 * Provenance interfaces for OCR Provenance MCP System
 *
 * Comprehensive provenance tracking for complete data lineage.
 * Every data transformation creates a provenance record.
 */
/**
 * Types of provenance records in the chain
 * Each type has a fixed chain depth
 */
export var ProvenanceType;
(function (ProvenanceType) {
    /** Original source file (depth 0) */
    ProvenanceType["DOCUMENT"] = "DOCUMENT";
    /** Text extracted via Datalab OCR (depth 1) */
    ProvenanceType["OCR_RESULT"] = "OCR_RESULT";
    /** Text segment with overlap (depth 2) */
    ProvenanceType["CHUNK"] = "CHUNK";
    /** Extracted image from document (depth 2, parallel to CHUNK) */
    ProvenanceType["IMAGE"] = "IMAGE";
    /** VLM analysis output describing an image (depth 3) */
    ProvenanceType["VLM_DESCRIPTION"] = "VLM_DESCRIPTION";
    /** Structured extraction from page_schema (depth 2, parallel to CHUNK) */
    ProvenanceType["EXTRACTION"] = "EXTRACTION";
    /** Form fill result (depth 0, parallel to DOCUMENT) */
    ProvenanceType["FORM_FILL"] = "FORM_FILL";
    /** Comparison between two documents (depth 2, parallel to CHUNK) */
    ProvenanceType["COMPARISON"] = "COMPARISON";
    /** Document clustering result (depth 2, parallel to CHUNK) */
    ProvenanceType["CLUSTERING"] = "CLUSTERING";
    /** 768-dim vector from nomic model (depth 3 from CHUNK, depth 4 from VLM_DESCRIPTION) */
    ProvenanceType["EMBEDDING"] = "EMBEDDING";
})(ProvenanceType || (ProvenanceType = {}));
/**
 * Chain depth for each provenance type
 * Note: EMBEDDING depth is 3 when derived from CHUNK, but 4 when derived from VLM_DESCRIPTION.
 * The actual depth is computed dynamically from the parent chain.
 */
// NOTE: EMBEDDING depth is 3 for chunk-derived embeddings only.
// VLM description embeddings use depth 4 and bypass createProvenance() - see pipeline.ts
export const PROVENANCE_CHAIN_DEPTH = {
    [ProvenanceType.DOCUMENT]: 0,
    [ProvenanceType.OCR_RESULT]: 1,
    [ProvenanceType.CHUNK]: 2,
    [ProvenanceType.IMAGE]: 2, // Same depth as CHUNK (parallel branch)
    [ProvenanceType.VLM_DESCRIPTION]: 3, // After IMAGE
    [ProvenanceType.EXTRACTION]: 2, // Same depth as CHUNK (parallel branch)
    [ProvenanceType.FORM_FILL]: 0, // Same depth as DOCUMENT (form fill is a root-level operation)
    [ProvenanceType.COMPARISON]: 2, // Same depth as CHUNK (parallel branch)
    [ProvenanceType.CLUSTERING]: 2, // Same depth as CHUNK (parallel branch)
    [ProvenanceType.EMBEDDING]: 3 // Chunk-derived only; VLM embeddings use depth 4 (built in pipeline.ts)
};
//# sourceMappingURL=provenance.js.map