feat: add OCR document types and ports

OcrDocumentElement extends the layout element with text; OcrDocumentResult stays independent because the parent's defaulted call_stats forbids a required markdown field. OcrDocumentTransport is a separate Protocol so existing OcrTransport implementers keep passing isinstance.
This commit is contained in:
2026-10-21 23:20:53 -04:00
parent b31df842a8
commit 398b16e136
6 changed files with 185 additions and 3 deletions
+2
View File
@@ -22,6 +22,8 @@ def test_ocr_public_surface_exported():
"OcrTextResult",
"OcrLayoutResult",
"OcrLayoutElement",
"OcrDocumentResult",
"OcrDocumentElement",
):
assert hasattr(polygateway, name), name
assert name in polygateway.__all__, name