import type { CapsuleLifecycleState, ChunkId, DocumentId, EmbeddingModelIdentity, KnowledgeCapsuleId, KnowledgeSourceId, ParserIdentity, VectorId } from "./local-knowledge.js";
export type DocumentStatus = "pending" | "extracted" | "skipped" | "failed" | "unsupported";
export declare const DOCUMENT_STATUSES: readonly DocumentStatus[];
export interface DocumentRecord {
    readonly id: DocumentId;
    readonly capsuleId: KnowledgeCapsuleId;
    readonly sourceId: KnowledgeSourceId;
    readonly documentPath: string;
    readonly sizeBytes: number;
    readonly mediaType: string;
    readonly contentHash: string;
    readonly parser: ParserIdentity;
    readonly lastExtractedAt: number;
    readonly status: DocumentStatus;
    readonly safeDisplayName: string;
}
export interface PageBoundingBox {
    readonly x: number;
    readonly y: number;
    readonly w: number;
    readonly h: number;
}
export interface PageRecord {
    readonly documentId: DocumentId;
    readonly pageNumber: number;
    readonly pageLabel?: string;
    readonly characterStart: number;
    readonly characterEnd: number;
    readonly boundingBox?: PageBoundingBox;
}
export interface SectionRecord {
    readonly documentId: DocumentId;
    readonly sectionPath: readonly string[];
    readonly characterStart: number;
    readonly characterEnd: number;
}
export type ParsedUnit = {
    readonly kind: "page";
    readonly documentId: DocumentId;
    readonly pageNumber: number;
    readonly pageLabel?: string;
    readonly characterStart: number;
    readonly characterEnd: number;
} | {
    readonly kind: "section";
    readonly documentId: DocumentId;
    readonly sectionPath: readonly string[];
    readonly characterStart: number;
    readonly characterEnd: number;
} | {
    readonly kind: "json-path";
    readonly documentId: DocumentId;
    readonly jsonPointer: string;
    readonly characterStart: number;
    readonly characterEnd: number;
} | {
    readonly kind: "csv-row";
    readonly documentId: DocumentId;
    readonly tableName: string;
    readonly rowIndex: number;
    readonly characterStart: number;
    readonly characterEnd: number;
} | {
    readonly kind: "html-block";
    readonly documentId: DocumentId;
    readonly headingPath?: readonly string[];
    readonly characterStart: number;
    readonly characterEnd: number;
} | {
    readonly kind: "unsupported-media";
    readonly documentId: DocumentId;
    readonly reason: string;
};
export type ParsedUnitKind = ParsedUnit["kind"];
export declare const PARSED_UNIT_KINDS: readonly ParsedUnitKind[];
export interface ChunkRecord {
    readonly id: ChunkId;
    readonly capsuleId: KnowledgeCapsuleId;
    readonly sourceId: KnowledgeSourceId;
    readonly documentId: DocumentId;
    readonly parsedUnit: ParsedUnit;
    readonly orderIndex: number;
    readonly tokenCount: number;
    readonly safeExcerptHash: string;
}
export interface VectorRecord {
    readonly id: VectorId;
    readonly chunkId: ChunkId;
    readonly capsuleId: KnowledgeCapsuleId;
    readonly sourceId: KnowledgeSourceId;
    readonly documentId: DocumentId;
    readonly embeddingIdentity: EmbeddingModelIdentity;
    readonly vectorDimensions: number;
    readonly storageReference: string;
    readonly createdAt: number;
}
export interface CitationReference {
    readonly documentId: DocumentId;
    readonly capsuleId: KnowledgeCapsuleId;
    readonly sourceId: KnowledgeSourceId;
    readonly chunkId: ChunkId;
    readonly pageNumber?: number;
    readonly pageLabel?: string;
    readonly sectionPath?: readonly string[];
    readonly characterStart?: number;
    readonly characterEnd?: number;
    readonly safeDisplayName: string;
}
export interface RetrievalReference {
    readonly chunkId: ChunkId;
    readonly capsuleId: KnowledgeCapsuleId;
    readonly score: number;
    readonly citation: CitationReference;
}
export type ParserDiagnosticSeverity = "info" | "warning" | "error";
export declare const PARSER_DIAGNOSTIC_SEVERITIES: readonly ParserDiagnosticSeverity[];
export interface ParserDiagnostic {
    readonly severity: ParserDiagnosticSeverity;
    readonly code: string;
    readonly message: string;
    readonly documentId?: DocumentId;
    readonly pageNumber?: number;
}
export interface ParserResult {
    readonly documentId: DocumentId;
    readonly parser: ParserIdentity;
    readonly pages: readonly PageRecord[];
    readonly sections: readonly SectionRecord[];
    readonly units: readonly ParsedUnit[];
    readonly diagnostics: readonly ParserDiagnostic[];
    readonly extractedAt: number;
}
export type IndexingJobStatus = "queued" | "running" | "succeeded" | "failed" | "cancelled";
export declare const INDEXING_JOB_STATUSES: readonly IndexingJobStatus[];
export interface IndexingJobError {
    readonly code: string;
    readonly message: string;
}
export interface IndexingJobRecord {
    readonly id: string;
    readonly capsuleId: KnowledgeCapsuleId;
    readonly sourceIds: readonly KnowledgeSourceId[];
    readonly startedAt: number;
    readonly finishedAt?: number;
    readonly status: IndexingJobStatus;
    readonly totalDocuments: number;
    readonly processedDocuments: number;
    readonly failedDocuments: number;
    readonly skippedDocuments: number;
    readonly lastError?: IndexingJobError;
}
export interface CapsuleHealth {
    readonly capsuleId: KnowledgeCapsuleId;
    readonly lifecycleState: CapsuleLifecycleState;
    readonly storageSizeBytes: number;
    readonly documentCount: number;
    readonly chunkCount: number;
    readonly vectorCount: number;
    readonly lastIndexedAt?: number;
    readonly embeddingIdentity: EmbeddingModelIdentity;
    readonly vectorCompatible: boolean;
    readonly failedDocuments: number;
    readonly skippedDocuments: number;
    readonly unsupportedDocuments: number;
    readonly unsupportedGuidance: readonly string[];
    readonly staleReasons: readonly string[];
}
export interface CapsuleDeleteRequest {
    readonly capsuleId: KnowledgeCapsuleId;
    readonly deleteIndex: boolean;
    readonly deleteSources: false;
}
//# sourceMappingURL=local-knowledge-records.d.ts.map