| """Document parsing — the first half of the knowledge pipeline. | |
| PDF/DOCX in, a versioned `ParsedDocument` out. The extraction half consumes that | |
| artifact and never the parser itself, which is what keeps MinerU swappable. | |
| Additive and flag-gated: the existing unstructured path (`src/knowledge/`, | |
| Tesseract OCR -> chunk -> pgvector) is untouched and keeps running as-is. | |
| Heavy dependencies (MinerU, torch) are an optional extra — see `pyproject.toml`. | |
| Importing this package does not import them; only `parse.py` does, at call time, | |
| so the agent service starts without them installed. | |
| """ | |
| from .contracts import SCHEMA_VERSION, Chunk, Mention, ParsedDocument, TermRecord | |
| __all__ = [ | |
| "SCHEMA_VERSION", | |
| "Chunk", | |
| "Mention", | |
| "ParsedDocument", | |
| "TermRecord", | |
| ] | |