capture-runtime-client 0.9.0__tar.gz → 0.11.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {capture_runtime_client-0.9.0 → capture_runtime_client-0.11.0}/.gitignore +1 -0
- {capture_runtime_client-0.9.0 → capture_runtime_client-0.11.0}/PKG-INFO +1 -1
- {capture_runtime_client-0.9.0 → capture_runtime_client-0.11.0}/project.json +10 -0
- {capture_runtime_client-0.9.0 → capture_runtime_client-0.11.0}/pyproject.toml +2 -2
- {capture_runtime_client-0.9.0 → capture_runtime_client-0.11.0}/src/capture_runtime_client/__init__.py +2 -2
- {capture_runtime_client-0.9.0 → capture_runtime_client-0.11.0}/src/capture_runtime_client/_discovery.py +19 -19
- {capture_runtime_client-0.9.0 → capture_runtime_client-0.11.0}/src/capture_runtime_client/_error_mapping.py +2 -2
- {capture_runtime_client-0.9.0 → capture_runtime_client-0.11.0}/src/capture_runtime_client/client.py +157 -190
- {capture_runtime_client-0.9.0 → capture_runtime_client-0.11.0}/src/capture_runtime_client/codec.py +6 -2
- {capture_runtime_client-0.9.0 → capture_runtime_client-0.11.0}/src/capture_runtime_client/contracts.py +79 -73
- capture_runtime_client-0.11.0/src/capture_runtime_client/private/assets/contract-set.json +1 -0
- capture_runtime_client-0.11.0/src/capture_runtime_client/private/assets/contract-set.sha256 +1 -0
- {capture_runtime_client-0.9.0 → capture_runtime_client-0.11.0}/src/capture_runtime_client/private/generated_models.py +239 -189
- {capture_runtime_client-0.9.0 → capture_runtime_client-0.11.0}/src/capture_runtime_client/private/schemas/capture-document.schema.json +18 -5
- {capture_runtime_client-0.9.0 → capture_runtime_client-0.11.0}/src/capture_runtime_client/private/schemas/capture-engine.schema.json +13 -0
- capture_runtime_client-0.9.0/src/capture_runtime_client/private/schemas/capture-event-v2.schema.json → capture_runtime_client-0.11.0/src/capture_runtime_client/private/schemas/capture-event.schema.json +31 -31
- capture_runtime_client-0.9.0/src/capture_runtime_client/private/schemas/capture-ocr-projection-v3.schema.json → capture_runtime_client-0.11.0/src/capture_runtime_client/private/schemas/capture-ocr-projection.schema.json +95 -95
- capture_runtime_client-0.9.0/src/capture_runtime_client/private/schemas/capture-operation-v2.schema.json → capture_runtime_client-0.11.0/src/capture_runtime_client/private/schemas/capture-operation.schema.json +48 -49
- capture_runtime_client-0.9.0/src/capture_runtime_client/private/schemas/capture-streaming-result.schema.json → capture_runtime_client-0.11.0/src/capture_runtime_client/private/schemas/capture-result.schema.json +88 -76
- capture_runtime_client-0.9.0/src/capture_runtime_client/private/schemas/error-body-v2.schema.json → capture_runtime_client-0.11.0/src/capture_runtime_client/private/schemas/error-body.schema.json +1 -1
- capture_runtime_client-0.9.0/src/capture_runtime_client/private/schemas/error-envelope-v2.schema.json → capture_runtime_client-0.11.0/src/capture_runtime_client/private/schemas/error-envelope.schema.json +4 -4
- capture_runtime_client-0.9.0/src/capture_runtime_client/private/schemas/finalize-ingestion-v2.schema.json → capture_runtime_client-0.11.0/src/capture_runtime_client/private/schemas/finalize-ingestion.schema.json +1 -1
- capture_runtime_client-0.9.0/src/capture_runtime_client/private/schemas/ingestion-v2.schema.json → capture_runtime_client-0.11.0/src/capture_runtime_client/private/schemas/ingestion.schema.json +8 -10
- capture_runtime_client-0.9.0/src/capture_runtime_client/private/schemas/ocr-box-v3.schema.json → capture_runtime_client-0.11.0/src/capture_runtime_client/private/schemas/ocr-box.schema.json +4 -4
- capture_runtime_client-0.9.0/src/capture_runtime_client/private/schemas/ocr-compute-preflight-v2.schema.json → capture_runtime_client-0.11.0/src/capture_runtime_client/private/schemas/ocr-compute-preflight.schema.json +6 -6
- capture_runtime_client-0.9.0/src/capture_runtime_client/private/schemas/ocr-page-projection-v3.schema.json → capture_runtime_client-0.11.0/src/capture_runtime_client/private/schemas/ocr-page-projection.schema.json +84 -84
- capture_runtime_client-0.9.0/src/capture_runtime_client/private/schemas/ocr-page-scope-v2.schema.json → capture_runtime_client-0.11.0/src/capture_runtime_client/private/schemas/ocr-page-scope.schema.json +1 -1
- capture_runtime_client-0.9.0/src/capture_runtime_client/private/schemas/ocr-point-v3.schema.json → capture_runtime_client-0.11.0/src/capture_runtime_client/private/schemas/ocr-point.schema.json +1 -1
- capture_runtime_client-0.9.0/src/capture_runtime_client/private/schemas/ocr-provenance-resolved-v3.schema.json → capture_runtime_client-0.11.0/src/capture_runtime_client/private/schemas/ocr-provenance-resolved.schema.json +2 -2
- capture_runtime_client-0.9.0/src/capture_runtime_client/private/schemas/ocr-provenance-unavailable-v3.schema.json → capture_runtime_client-0.11.0/src/capture_runtime_client/private/schemas/ocr-provenance-unavailable.schema.json +1 -1
- capture_runtime_client-0.9.0/src/capture_runtime_client/private/schemas/ocr-provenance-v3.schema.json → capture_runtime_client-0.11.0/src/capture_runtime_client/private/schemas/ocr-provenance.schema.json +20 -20
- capture_runtime_client-0.9.0/src/capture_runtime_client/private/schemas/ocr-raster-v3.schema.json → capture_runtime_client-0.11.0/src/capture_runtime_client/private/schemas/ocr-raster.schema.json +1 -1
- capture_runtime_client-0.9.0/src/capture_runtime_client/private/schemas/open-ingestion-v2.schema.json → capture_runtime_client-0.11.0/src/capture_runtime_client/private/schemas/open-ingestion.schema.json +7 -7
- capture_runtime_client-0.9.0/src/capture_runtime_client/private/schemas/open-structuring-session-v2.schema.json → capture_runtime_client-0.11.0/src/capture_runtime_client/private/schemas/open-structuring-session.schema.json +25 -24
- capture_runtime_client-0.9.0/src/capture_runtime_client/private/schemas/capture-failure-v2.schema.json → capture_runtime_client-0.11.0/src/capture_runtime_client/private/schemas/operation-failure.schema.json +1 -1
- capture_runtime_client-0.9.0/src/capture_runtime_client/private/schemas/partial-capture-v2.schema.json → capture_runtime_client-0.11.0/src/capture_runtime_client/private/schemas/partial-capture.schema.json +25 -5
- {capture_runtime_client-0.9.0 → capture_runtime_client-0.11.0}/src/capture_runtime_client/private/schemas/raw-capture.schema.json +21 -8
- capture_runtime_client-0.9.0/src/capture_runtime_client/private/schemas/report-structuring-failure-v2.schema.json → capture_runtime_client-0.11.0/src/capture_runtime_client/private/schemas/report-structuring-failure.schema.json +1 -1
- capture_runtime_client-0.9.0/src/capture_runtime_client/private/schemas/runtime-artifact-descriptor-v2.schema.json → capture_runtime_client-0.11.0/src/capture_runtime_client/private/schemas/runtime-artifact-descriptor.schema.json +1 -1
- capture_runtime_client-0.9.0/src/capture_runtime_client/private/schemas/runtime-streaming-capabilities-v2.schema.json → capture_runtime_client-0.11.0/src/capture_runtime_client/private/schemas/runtime-capabilities.schema.json +41 -12
- capture_runtime_client-0.9.0/src/capture_runtime_client/private/schemas/runtime-installation-v2.schema.json → capture_runtime_client-0.11.0/src/capture_runtime_client/private/schemas/runtime-installation.schema.json +7 -7
- capture_runtime_client-0.9.0/src/capture_runtime_client/private/schemas/runtime-installations-v2.schema.json → capture_runtime_client-0.11.0/src/capture_runtime_client/private/schemas/runtime-installations.schema.json +22 -22
- {capture_runtime_client-0.9.0 → capture_runtime_client-0.11.0}/src/capture_runtime_client/private/schemas/runtime-ready.schema.json +101 -24
- capture_runtime_client-0.9.0/src/capture_runtime_client/private/schemas/runtime-requirement-v2.schema.json → capture_runtime_client-0.11.0/src/capture_runtime_client/private/schemas/runtime-requirement.schema.json +15 -8
- capture_runtime_client-0.9.0/src/capture_runtime_client/private/schemas/runtime-requirements-v2.schema.json → capture_runtime_client-0.11.0/src/capture_runtime_client/private/schemas/runtime-requirements.schema.json +29 -22
- capture_runtime_client-0.9.0/src/capture_runtime_client/private/schemas/start-capture-v2.schema.json → capture_runtime_client-0.11.0/src/capture_runtime_client/private/schemas/start-capture.schema.json +1 -1
- capture_runtime_client-0.9.0/src/capture_runtime_client/private/schemas/start-runtime-installation-v2.schema.json → capture_runtime_client-0.11.0/src/capture_runtime_client/private/schemas/start-runtime-installation.schema.json +3 -4
- capture_runtime_client-0.9.0/src/capture_runtime_client/private/schemas/start-runtime-model-installation-v2.schema.json → capture_runtime_client-0.11.0/src/capture_runtime_client/private/schemas/start-structuring-model-installation.schema.json +1 -1
- capture_runtime_client-0.9.0/src/capture_runtime_client/private/schemas/structuring-batch-v2.schema.json → capture_runtime_client-0.11.0/src/capture_runtime_client/private/schemas/structuring-batch.schema.json +1 -1
- capture_runtime_client-0.9.0/src/capture_runtime_client/private/schemas/runtime-model-installation-v2.schema.json → capture_runtime_client-0.11.0/src/capture_runtime_client/private/schemas/structuring-model-installation.schema.json +4 -4
- capture_runtime_client-0.9.0/src/capture_runtime_client/private/schemas/runtime-model-installations-v2.schema.json → capture_runtime_client-0.11.0/src/capture_runtime_client/private/schemas/structuring-model-installations.schema.json +7 -7
- capture_runtime_client-0.9.0/src/capture_runtime_client/private/schemas/runtime-model-option-v2.schema.json → capture_runtime_client-0.11.0/src/capture_runtime_client/private/schemas/structuring-model-option.schema.json +6 -7
- capture_runtime_client-0.9.0/src/capture_runtime_client/private/schemas/runtime-model-options-v2.schema.json → capture_runtime_client-0.11.0/src/capture_runtime_client/private/schemas/structuring-model-options.schema.json +15 -16
- capture_runtime_client-0.9.0/src/capture_runtime_client/private/schemas/structuring-provider-capability-v2.schema.json → capture_runtime_client-0.11.0/src/capture_runtime_client/private/schemas/structuring-provider-capability.schema.json +14 -7
- capture_runtime_client-0.9.0/src/capture_runtime_client/private/schemas/structuring-semantic-block-v2.schema.json → capture_runtime_client-0.11.0/src/capture_runtime_client/private/schemas/structuring-semantic-block.schema.json +1 -1
- capture_runtime_client-0.9.0/src/capture_runtime_client/private/schemas/structuring-session-v2.schema.json → capture_runtime_client-0.11.0/src/capture_runtime_client/private/schemas/structuring-session.schema.json +20 -13
- capture_runtime_client-0.9.0/src/capture_runtime_client/private/schemas/submit-structuring-batch-v2.schema.json → capture_runtime_client-0.11.0/src/capture_runtime_client/private/schemas/submit-structuring-batch.schema.json +4 -4
- {capture_runtime_client-0.9.0 → capture_runtime_client-0.11.0}/tests/test_client_sdk.py +339 -97
- {capture_runtime_client-0.9.0 → capture_runtime_client-0.11.0}/uv.lock +1 -1
- capture_runtime_client-0.9.0/src/capture_runtime_client/private/assets/contract-set.json +0 -1
- capture_runtime_client-0.9.0/src/capture_runtime_client/private/assets/contract-set.sha256 +0 -1
- {capture_runtime_client-0.9.0 → capture_runtime_client-0.11.0}/README.md +0 -0
- {capture_runtime_client-0.9.0 → capture_runtime_client-0.11.0}/src/capture_runtime_client/_retry.py +0 -0
- {capture_runtime_client-0.9.0 → capture_runtime_client-0.11.0}/src/capture_runtime_client/_transport.py +0 -0
- {capture_runtime_client-0.9.0 → capture_runtime_client-0.11.0}/src/capture_runtime_client/errors.py +0 -0
- {capture_runtime_client-0.9.0 → capture_runtime_client-0.11.0}/src/capture_runtime_client/private/__init__.py +0 -0
- {capture_runtime_client-0.9.0 → capture_runtime_client-0.11.0}/src/capture_runtime_client/private/assets/__init__.py +0 -0
- {capture_runtime_client-0.9.0 → capture_runtime_client-0.11.0}/src/capture_runtime_client/private/schemas/__init__.py +0 -0
- {capture_runtime_client-0.9.0 → capture_runtime_client-0.11.0}/src/capture_runtime_client/private/schemas/capture-block.schema.json +0 -0
- {capture_runtime_client-0.9.0 → capture_runtime_client-0.11.0}/src/capture_runtime_client/private/schemas/capture-source.schema.json +0 -0
- {capture_runtime_client-0.9.0 → capture_runtime_client-0.11.0}/src/capture_runtime_client/private/schemas/capture-speaker.schema.json +0 -0
- {capture_runtime_client-0.9.0 → capture_runtime_client-0.11.0}/src/capture_runtime_client/private/schemas/page-locator.schema.json +0 -0
- {capture_runtime_client-0.9.0 → capture_runtime_client-0.11.0}/src/capture_runtime_client/private/schemas/raw-capture-segment.schema.json +0 -0
- {capture_runtime_client-0.9.0 → capture_runtime_client-0.11.0}/src/capture_runtime_client/private/schemas/time-locator.schema.json +0 -0
- {capture_runtime_client-0.9.0 → capture_runtime_client-0.11.0}/src/capture_runtime_client/py.typed +0 -0
- {capture_runtime_client-0.9.0 → capture_runtime_client-0.11.0}/src/capture_runtime_client/transport.py +0 -0
|
@@ -5,7 +5,17 @@
|
|
|
5
5
|
"tags": ["scope:capture", "type:sdk"],
|
|
6
6
|
"targets": {
|
|
7
7
|
"test": {
|
|
8
|
+
"cache": true,
|
|
8
9
|
"executor": "nx:run-commands",
|
|
10
|
+
"inputs": [
|
|
11
|
+
"default",
|
|
12
|
+
"{workspaceRoot}/packages/capture-runtime/src/capture_runtime/assets/contract-set.json",
|
|
13
|
+
"{workspaceRoot}/packages/capture-runtime/src/capture_runtime/assets/contract-set.sha256",
|
|
14
|
+
"{workspaceRoot}/packages/capture-runtime/tests/fixtures/ocr-projection-v3-perspective.json",
|
|
15
|
+
"{workspaceRoot}/packages/capture-runtime/tests/fixtures/ocr-page-selection-v3.json",
|
|
16
|
+
"{workspaceRoot}/packages/capture-runtime/tests/fixtures/ocr-projection-v3-referenced-invalid-corpus.json",
|
|
17
|
+
"{workspaceRoot}/packages/capture-runtime/tests/fixtures/speaker-wire-samples.json"
|
|
18
|
+
],
|
|
9
19
|
"options": { "command": "uv run --project packages/capture-runtime-client-python pytest packages/capture-runtime-client-python/tests" }
|
|
10
20
|
},
|
|
11
21
|
"lint": {
|
|
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "capture-runtime-client"
|
|
7
|
-
version = "0.
|
|
7
|
+
version = "0.11.0"
|
|
8
8
|
description = "Capture Runtime HTTP, in-memory, discovery, and protocol client SDK."
|
|
9
9
|
readme = "README.md"
|
|
10
10
|
requires-python = ">=3.12,<3.15"
|
|
@@ -15,7 +15,7 @@ dependencies = [
|
|
|
15
15
|
]
|
|
16
16
|
|
|
17
17
|
[tool.capture_runtime_client]
|
|
18
|
-
contract_set_sha256 = "
|
|
18
|
+
contract_set_sha256 = "7802e8b85d45e687f2ad0ee9980f03e26b5a5ad43d9df079bfacc2ddbfa6780a"
|
|
19
19
|
|
|
20
20
|
[tool.hatch.build.targets.wheel]
|
|
21
21
|
packages = ["src/capture_runtime_client"]
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"""Public Capture Runtime client SDK."""
|
|
2
2
|
|
|
3
|
-
from .client import
|
|
3
|
+
from .client import CaptureResult, CaptureRuntimeClient, CaptureUpload, RuntimeDiscovery
|
|
4
4
|
from .contracts import * # noqa: F401,F403
|
|
5
5
|
from .contracts import __all__ as _contract_names
|
|
6
6
|
from .errors import (
|
|
@@ -30,7 +30,7 @@ __all__ = [
|
|
|
30
30
|
"CaptureRuntimeCompatibilityError",
|
|
31
31
|
"CaptureRuntimeError",
|
|
32
32
|
"CaptureRuntimeProtocolError",
|
|
33
|
-
"
|
|
33
|
+
"CaptureResult",
|
|
34
34
|
"CaptureUpload",
|
|
35
35
|
"HttpRuntimeTransport",
|
|
36
36
|
"InMemoryRoute",
|
|
@@ -19,7 +19,6 @@ from .contracts import (
|
|
|
19
19
|
CAPTURE_DOCUMENT_SCHEMA_VERSION,
|
|
20
20
|
CAPTURE_RUNTIME_VERSION,
|
|
21
21
|
RuntimeReady,
|
|
22
|
-
RuntimeStreamingCapabilities,
|
|
23
22
|
StructuringMode,
|
|
24
23
|
)
|
|
25
24
|
from .errors import CaptureRuntimeCompatibilityError, CaptureRuntimeProtocolError
|
|
@@ -32,8 +31,7 @@ class RuntimeDiscovery:
|
|
|
32
31
|
"""Authenticated compatibility evidence cached by ``CaptureRuntimeClient``."""
|
|
33
32
|
|
|
34
33
|
ready: RuntimeReady
|
|
35
|
-
|
|
36
|
-
schema_sha256: str
|
|
34
|
+
capture_document_schema_sha256: str
|
|
37
35
|
contract_index: Mapping[str, Any]
|
|
38
36
|
contract_bundle: Mapping[str, Any]
|
|
39
37
|
|
|
@@ -92,14 +90,10 @@ def discover(
|
|
|
92
90
|
raise CaptureRuntimeProtocolError(
|
|
93
91
|
"Capture Runtime contract bundle is not valid JSON."
|
|
94
92
|
) from error
|
|
95
|
-
|
|
96
|
-
streaming = decode_model(
|
|
97
|
-
request("GET", "/v2/streaming/health/ready"), RuntimeStreamingCapabilities
|
|
98
|
-
)
|
|
93
|
+
capture_document_schema_sha256 = validate_contract_bundle(bundle, digest)
|
|
99
94
|
return RuntimeDiscovery(
|
|
100
95
|
ready=ready,
|
|
101
|
-
|
|
102
|
-
schema_sha256=schema_sha256,
|
|
96
|
+
capture_document_schema_sha256=capture_document_schema_sha256,
|
|
103
97
|
contract_index=index,
|
|
104
98
|
contract_bundle=bundle,
|
|
105
99
|
)
|
|
@@ -116,10 +110,10 @@ def assert_compatible(ready: RuntimeReady) -> None:
|
|
|
116
110
|
f"runtime version {ready.runtime_version} is incompatible with "
|
|
117
111
|
f"{CAPTURE_RUNTIME_VERSION}"
|
|
118
112
|
)
|
|
119
|
-
structuring_modes = ready.capabilities.
|
|
113
|
+
structuring_modes = ready.capabilities.structuring_modes
|
|
120
114
|
if (
|
|
121
|
-
StructuringMode.HOST
|
|
122
|
-
and StructuringMode.RUNTIME
|
|
115
|
+
StructuringMode.HOST not in structuring_modes
|
|
116
|
+
and StructuringMode.RUNTIME not in structuring_modes
|
|
123
117
|
):
|
|
124
118
|
failures.append("runtime exposes no structuring mode")
|
|
125
119
|
if failures:
|
|
@@ -138,7 +132,6 @@ def assert_compatible_payload(payload: Mapping[str, Any]) -> None:
|
|
|
138
132
|
|
|
139
133
|
def validate_contract_index(index: Mapping[str, Any], ready: RuntimeReady) -> None:
|
|
140
134
|
required = {
|
|
141
|
-
"catalogVersion",
|
|
142
135
|
"runtimeVersion",
|
|
143
136
|
"contractSetVersion",
|
|
144
137
|
"surfaces",
|
|
@@ -149,7 +142,13 @@ def validate_contract_index(index: Mapping[str, Any], ready: RuntimeReady) -> No
|
|
|
149
142
|
raise CaptureRuntimeProtocolError(
|
|
150
143
|
"Capture Runtime contract index is missing required fields."
|
|
151
144
|
)
|
|
152
|
-
|
|
145
|
+
# The index has no other fields: a retired one such as `catalogVersion`
|
|
146
|
+
# means the runtime serves an older contract index.
|
|
147
|
+
if not set(index).issubset(required | {"mediaType"}):
|
|
148
|
+
raise CaptureRuntimeProtocolError(
|
|
149
|
+
"Capture Runtime contract index has fields outside the contract index."
|
|
150
|
+
)
|
|
151
|
+
if index.get("contractSetVersion") != "2":
|
|
153
152
|
raise CaptureRuntimeCompatibilityError(
|
|
154
153
|
"Capture Runtime contract catalog version is unsupported."
|
|
155
154
|
)
|
|
@@ -177,7 +176,9 @@ def validate_contract_bundle(bundle: Any, digest: str) -> str:
|
|
|
177
176
|
or bundle.get("schemaDialect") != "https://json-schema.org/draft/2020-12/schema"
|
|
178
177
|
):
|
|
179
178
|
raise CaptureRuntimeProtocolError("Capture Runtime contract bundle is invalid.")
|
|
180
|
-
|
|
179
|
+
# failureCodes lists the codes a failed job reports; a host's own failure
|
|
180
|
+
# report is not checked against it.
|
|
181
|
+
for field in ("surfaces", "schemas", "operations", "problems", "failureCodes", "invariants"):
|
|
181
182
|
if not isinstance(bundle.get(field), list):
|
|
182
183
|
raise CaptureRuntimeProtocolError(
|
|
183
184
|
f"Capture Runtime contract bundle {field} is invalid."
|
|
@@ -213,11 +214,10 @@ def validate_contract_bundle(bundle: Any, digest: str) -> str:
|
|
|
213
214
|
}
|
|
214
215
|
required_paths = {
|
|
215
216
|
"/v2/health/ready",
|
|
216
|
-
"/v2/streaming/health/ready",
|
|
217
217
|
"/v2/runtime/requirements",
|
|
218
218
|
"/v2/runtime/installations",
|
|
219
|
-
"/v2/runtime/model-options",
|
|
220
|
-
"/v2/runtime/model-installations",
|
|
219
|
+
"/v2/runtime/structuring-model-options",
|
|
220
|
+
"/v2/runtime/structuring-model-installations",
|
|
221
221
|
"/v2/captures",
|
|
222
222
|
"/v2/captures/{capture_id}/events",
|
|
223
223
|
"/v2/captures/{capture_id}/raw",
|
|
@@ -286,7 +286,7 @@ def validate_contract_bundle(bundle: Any, digest: str) -> str:
|
|
|
286
286
|
ocr is None
|
|
287
287
|
or not isinstance(ocr.get("body"), Mapping)
|
|
288
288
|
or ocr["body"].get("kind") != "none"
|
|
289
|
-
or ocr.get("responseSchema") != "
|
|
289
|
+
or ocr.get("responseSchema") != "CaptureOcrProjection"
|
|
290
290
|
or 200 not in ocr.get("responseStatusCodes", [])
|
|
291
291
|
):
|
|
292
292
|
raise CaptureRuntimeCompatibilityError("Capture Runtime OCR metadata is incompatible.")
|
|
@@ -32,7 +32,7 @@ def decode_capture_operation(
|
|
|
32
32
|
return operation
|
|
33
33
|
|
|
34
34
|
|
|
35
|
-
def
|
|
35
|
+
def decode_capture_result(
|
|
36
36
|
response: httpx.Response, requested_capture_id: str
|
|
37
37
|
) -> tuple[CaptureOperation, RawCapture, CaptureDocument]:
|
|
38
38
|
"""Decode a result while preserving operation, source, and result identity."""
|
|
@@ -57,6 +57,6 @@ def decode_streaming_result(
|
|
|
57
57
|
__all__ = [
|
|
58
58
|
"decode_capture_operation",
|
|
59
59
|
"decode_response",
|
|
60
|
-
"
|
|
60
|
+
"decode_capture_result",
|
|
61
61
|
"map_http_request_error",
|
|
62
62
|
]
|