"""Shared OKF (Open Knowledge Format) ingestion library. Three entry doors: spec-based ingestion (manifest -> connector -> deterministic materialization -> index), a bundle inbox converting common file types to OKF concepts, and import of external OKF bundles. Security is owned by llm-ingestion-guard, never reimplemented here. Note what that does and does not mean today: Door A is UNGATED. It calls no guard function on the way to disk, so a caller that materializes external or otherwise untrusted content is responsible for gating it. Do not read "security is delegated" as "safe by default": materialize_bundle writes what it is given. Doors B and C are gated by an INJECTED adapter, and `guard_adapter` is the one this library ships over the real guard -- the only module here that imports it. Importing this package does not import the guard; a Door A consumer keeps working whatever state the dependency is in. Door A (spec-based ingestion) public surface: materialize_bundle plus the typed error hierarchy rooted in IngestError. Door B (bundle inbox) public surface: process_inbox plus its result types. Its persist gate is INJECTED -- the caller supplies a Gate adapter over llm-ingestion-guard (guard_adapter.inbox_gate is the shipped one) and process_inbox obeys the verdict, making no security decision of its own. Door C (external bundle import) public surface: import_bundle plus its result types. Its gate is injected the same way, over the guard's okf.import_bundle (guard_adapter.import_gate is the shipped one): the caller declares origin and channel at the door, the gate assesses every concept, and only concepts clearing the non-blocking floor are merged. Merged concepts are written verbatim -- ownership is proven by content identity rather than by a stamp, so an occupied name is only ever re-used when the bytes already there are identical. """ from .errors import ( ExtractionError, ExtractionWarning, IngestError, ManifestError, MaterializationError, NetworkGateError, RenderError, SourceError, ) from .extract import extract_text from .importer import ( BundleDecision, FailedConcept, ImportDecision, ImportGate, ImportResult, MergedConcept, RefusedConcept, UnverifiedReference, import_bundle, ) from .inbox import ( BlockedFile, FailedFile, Gate, GateDecision, InboxResult, PersistedFile, SkippedPath, process_inbox, ) from .manifest import ( Extraction, FileSource, HttpSource, Manifest, SqlSource, load_manifest, ) from .materialize import IngestResult, materialize_bundle __version__ = "1.0.0" __all__ = [ "BlockedFile", "BundleDecision", "Extraction", "ExtractionError", "ExtractionWarning", "FailedConcept", "FailedFile", "FileSource", "Gate", "GateDecision", "HttpSource", "ImportDecision", "ImportGate", "ImportResult", "InboxResult", "IngestError", "IngestResult", "Manifest", "ManifestError", "MaterializationError", "MergedConcept", "NetworkGateError", "PersistedFile", "SkippedPath", "RefusedConcept", "RenderError", "SourceError", "SqlSource", "UnverifiedReference", "extract_text", "import_bundle", "load_manifest", "materialize_bundle", "process_inbox", ]