capture-runtime-client 0.6.3__tar.gz → 0.7.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.6.3 → capture_runtime_client-0.7.0}/.gitignore +13 -12
- {capture_runtime_client-0.6.3 → capture_runtime_client-0.7.0}/PKG-INFO +1 -1
- {capture_runtime_client-0.6.3 → capture_runtime_client-0.7.0}/pyproject.toml +2 -2
- {capture_runtime_client-0.6.3 → capture_runtime_client-0.7.0}/src/capture_runtime_client/client.py +18 -6
- {capture_runtime_client-0.6.3 → capture_runtime_client-0.7.0}/src/capture_runtime_client/contracts.py +1 -1
- capture_runtime_client-0.7.0/src/capture_runtime_client/private/assets/contract-set.json +1 -0
- capture_runtime_client-0.7.0/src/capture_runtime_client/private/assets/contract-set.sha256 +1 -0
- {capture_runtime_client-0.6.3 → capture_runtime_client-0.7.0}/src/capture_runtime_client/private/generated_models.py +44 -16
- {capture_runtime_client-0.6.3 → capture_runtime_client-0.7.0}/src/capture_runtime_client/private/schemas/capture-document.schema.json +33 -1
- {capture_runtime_client-0.6.3 → capture_runtime_client-0.7.0}/src/capture_runtime_client/private/schemas/capture-engine.schema.json +32 -0
- {capture_runtime_client-0.6.3 → capture_runtime_client-0.7.0}/src/capture_runtime_client/private/schemas/capture-ocr-projection-v3.schema.json +1 -0
- {capture_runtime_client-0.6.3 → capture_runtime_client-0.7.0}/src/capture_runtime_client/private/schemas/capture-streaming-result.schema.json +37 -4
- {capture_runtime_client-0.6.3 → capture_runtime_client-0.7.0}/src/capture_runtime_client/private/schemas/ocr-page-scope-v2.schema.json +3 -2
- {capture_runtime_client-0.6.3 → capture_runtime_client-0.7.0}/src/capture_runtime_client/private/schemas/open-structuring-session-v2.schema.json +32 -0
- {capture_runtime_client-0.6.3 → capture_runtime_client-0.7.0}/src/capture_runtime_client/private/schemas/partial-capture-v2.schema.json +32 -0
- {capture_runtime_client-0.6.3 → capture_runtime_client-0.7.0}/src/capture_runtime_client/private/schemas/raw-capture.schema.json +36 -3
- {capture_runtime_client-0.6.3 → capture_runtime_client-0.7.0}/src/capture_runtime_client/private/schemas/runtime-installation-v2.schema.json +1 -1
- {capture_runtime_client-0.6.3 → capture_runtime_client-0.7.0}/src/capture_runtime_client/private/schemas/runtime-installations-v2.schema.json +1 -1
- {capture_runtime_client-0.6.3 → capture_runtime_client-0.7.0}/src/capture_runtime_client/private/schemas/runtime-requirement-v2.schema.json +1 -1
- {capture_runtime_client-0.6.3 → capture_runtime_client-0.7.0}/src/capture_runtime_client/private/schemas/runtime-requirements-v2.schema.json +1 -1
- {capture_runtime_client-0.6.3 → capture_runtime_client-0.7.0}/src/capture_runtime_client/private/schemas/start-capture-v2.schema.json +2 -0
- {capture_runtime_client-0.6.3 → capture_runtime_client-0.7.0}/src/capture_runtime_client/private/schemas/start-runtime-installation-v2.schema.json +1 -1
- {capture_runtime_client-0.6.3 → capture_runtime_client-0.7.0}/src/capture_runtime_client/private/schemas/structuring-provider-capability-v2.schema.json +32 -0
- {capture_runtime_client-0.6.3 → capture_runtime_client-0.7.0}/src/capture_runtime_client/private/schemas/structuring-session-v2.schema.json +32 -0
- {capture_runtime_client-0.6.3 → capture_runtime_client-0.7.0}/tests/test_client_sdk.py +94 -11
- {capture_runtime_client-0.6.3 → capture_runtime_client-0.7.0}/uv.lock +1 -1
- capture_runtime_client-0.6.3/src/capture_runtime_client/private/assets/contract-set.json +0 -1
- capture_runtime_client-0.6.3/src/capture_runtime_client/private/assets/contract-set.sha256 +0 -1
- {capture_runtime_client-0.6.3 → capture_runtime_client-0.7.0}/README.md +0 -0
- {capture_runtime_client-0.6.3 → capture_runtime_client-0.7.0}/project.json +0 -0
- {capture_runtime_client-0.6.3 → capture_runtime_client-0.7.0}/src/capture_runtime_client/__init__.py +0 -0
- {capture_runtime_client-0.6.3 → capture_runtime_client-0.7.0}/src/capture_runtime_client/_discovery.py +0 -0
- {capture_runtime_client-0.6.3 → capture_runtime_client-0.7.0}/src/capture_runtime_client/_error_mapping.py +0 -0
- {capture_runtime_client-0.6.3 → capture_runtime_client-0.7.0}/src/capture_runtime_client/_retry.py +0 -0
- {capture_runtime_client-0.6.3 → capture_runtime_client-0.7.0}/src/capture_runtime_client/_transport.py +0 -0
- {capture_runtime_client-0.6.3 → capture_runtime_client-0.7.0}/src/capture_runtime_client/codec.py +0 -0
- {capture_runtime_client-0.6.3 → capture_runtime_client-0.7.0}/src/capture_runtime_client/errors.py +0 -0
- {capture_runtime_client-0.6.3 → capture_runtime_client-0.7.0}/src/capture_runtime_client/private/__init__.py +0 -0
- {capture_runtime_client-0.6.3 → capture_runtime_client-0.7.0}/src/capture_runtime_client/private/assets/__init__.py +0 -0
- {capture_runtime_client-0.6.3 → capture_runtime_client-0.7.0}/src/capture_runtime_client/private/schemas/__init__.py +0 -0
- {capture_runtime_client-0.6.3 → capture_runtime_client-0.7.0}/src/capture_runtime_client/private/schemas/capture-block.schema.json +0 -0
- {capture_runtime_client-0.6.3 → capture_runtime_client-0.7.0}/src/capture_runtime_client/private/schemas/capture-event-v2.schema.json +0 -0
- {capture_runtime_client-0.6.3 → capture_runtime_client-0.7.0}/src/capture_runtime_client/private/schemas/capture-failure-v2.schema.json +0 -0
- {capture_runtime_client-0.6.3 → capture_runtime_client-0.7.0}/src/capture_runtime_client/private/schemas/capture-operation-v2.schema.json +0 -0
- {capture_runtime_client-0.6.3 → capture_runtime_client-0.7.0}/src/capture_runtime_client/private/schemas/capture-source.schema.json +0 -0
- {capture_runtime_client-0.6.3 → capture_runtime_client-0.7.0}/src/capture_runtime_client/private/schemas/capture-speaker.schema.json +0 -0
- {capture_runtime_client-0.6.3 → capture_runtime_client-0.7.0}/src/capture_runtime_client/private/schemas/error-body-v2.schema.json +0 -0
- {capture_runtime_client-0.6.3 → capture_runtime_client-0.7.0}/src/capture_runtime_client/private/schemas/error-envelope-v2.schema.json +0 -0
- {capture_runtime_client-0.6.3 → capture_runtime_client-0.7.0}/src/capture_runtime_client/private/schemas/finalize-ingestion-v2.schema.json +0 -0
- {capture_runtime_client-0.6.3 → capture_runtime_client-0.7.0}/src/capture_runtime_client/private/schemas/ingestion-v2.schema.json +0 -0
- {capture_runtime_client-0.6.3 → capture_runtime_client-0.7.0}/src/capture_runtime_client/private/schemas/ocr-box-v3.schema.json +0 -0
- {capture_runtime_client-0.6.3 → capture_runtime_client-0.7.0}/src/capture_runtime_client/private/schemas/ocr-compute-preflight-v2.schema.json +0 -0
- {capture_runtime_client-0.6.3 → capture_runtime_client-0.7.0}/src/capture_runtime_client/private/schemas/ocr-page-projection-v3.schema.json +0 -0
- {capture_runtime_client-0.6.3 → capture_runtime_client-0.7.0}/src/capture_runtime_client/private/schemas/ocr-point-v3.schema.json +0 -0
- {capture_runtime_client-0.6.3 → capture_runtime_client-0.7.0}/src/capture_runtime_client/private/schemas/ocr-provenance-resolved-v3.schema.json +0 -0
- {capture_runtime_client-0.6.3 → capture_runtime_client-0.7.0}/src/capture_runtime_client/private/schemas/ocr-provenance-unavailable-v3.schema.json +0 -0
- {capture_runtime_client-0.6.3 → capture_runtime_client-0.7.0}/src/capture_runtime_client/private/schemas/ocr-provenance-v3.schema.json +0 -0
- {capture_runtime_client-0.6.3 → capture_runtime_client-0.7.0}/src/capture_runtime_client/private/schemas/ocr-raster-v3.schema.json +0 -0
- {capture_runtime_client-0.6.3 → capture_runtime_client-0.7.0}/src/capture_runtime_client/private/schemas/open-ingestion-v2.schema.json +0 -0
- {capture_runtime_client-0.6.3 → capture_runtime_client-0.7.0}/src/capture_runtime_client/private/schemas/page-locator.schema.json +0 -0
- {capture_runtime_client-0.6.3 → capture_runtime_client-0.7.0}/src/capture_runtime_client/private/schemas/raw-capture-segment.schema.json +0 -0
- {capture_runtime_client-0.6.3 → capture_runtime_client-0.7.0}/src/capture_runtime_client/private/schemas/report-structuring-failure-v2.schema.json +0 -0
- {capture_runtime_client-0.6.3 → capture_runtime_client-0.7.0}/src/capture_runtime_client/private/schemas/runtime-artifact-descriptor-v2.schema.json +0 -0
- {capture_runtime_client-0.6.3 → capture_runtime_client-0.7.0}/src/capture_runtime_client/private/schemas/runtime-model-installation-v2.schema.json +0 -0
- {capture_runtime_client-0.6.3 → capture_runtime_client-0.7.0}/src/capture_runtime_client/private/schemas/runtime-model-installations-v2.schema.json +0 -0
- {capture_runtime_client-0.6.3 → capture_runtime_client-0.7.0}/src/capture_runtime_client/private/schemas/runtime-model-option-v2.schema.json +0 -0
- {capture_runtime_client-0.6.3 → capture_runtime_client-0.7.0}/src/capture_runtime_client/private/schemas/runtime-model-options-v2.schema.json +0 -0
- {capture_runtime_client-0.6.3 → capture_runtime_client-0.7.0}/src/capture_runtime_client/private/schemas/runtime-ready.schema.json +0 -0
- {capture_runtime_client-0.6.3 → capture_runtime_client-0.7.0}/src/capture_runtime_client/private/schemas/runtime-streaming-capabilities-v2.schema.json +0 -0
- {capture_runtime_client-0.6.3 → capture_runtime_client-0.7.0}/src/capture_runtime_client/private/schemas/start-runtime-model-installation-v2.schema.json +0 -0
- {capture_runtime_client-0.6.3 → capture_runtime_client-0.7.0}/src/capture_runtime_client/private/schemas/structuring-batch-v2.schema.json +0 -0
- {capture_runtime_client-0.6.3 → capture_runtime_client-0.7.0}/src/capture_runtime_client/private/schemas/structuring-semantic-block-v2.schema.json +0 -0
- {capture_runtime_client-0.6.3 → capture_runtime_client-0.7.0}/src/capture_runtime_client/private/schemas/submit-structuring-batch-v2.schema.json +0 -0
- {capture_runtime_client-0.6.3 → capture_runtime_client-0.7.0}/src/capture_runtime_client/private/schemas/time-locator.schema.json +0 -0
- {capture_runtime_client-0.6.3 → capture_runtime_client-0.7.0}/src/capture_runtime_client/py.typed +0 -0
- {capture_runtime_client-0.6.3 → capture_runtime_client-0.7.0}/src/capture_runtime_client/transport.py +0 -0
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
# See https://docs.github.com/en/get-started/getting-started-with-git/ignoring-files for more about ignoring files.
|
|
2
|
-
|
|
3
|
-
# compiled output
|
|
4
|
-
dist
|
|
5
|
-
output/
|
|
6
|
-
proofshot-artifacts/
|
|
7
|
-
tmp
|
|
8
|
-
out-tsc
|
|
9
|
-
|
|
10
|
-
# dependencies
|
|
11
|
-
node_modules
|
|
12
|
-
tools/local-registry/storage/
|
|
1
|
+
# See https://docs.github.com/en/get-started/getting-started-with-git/ignoring-files for more about ignoring files.
|
|
2
|
+
|
|
3
|
+
# compiled output
|
|
4
|
+
dist
|
|
5
|
+
output/
|
|
6
|
+
proofshot-artifacts/
|
|
7
|
+
tmp
|
|
8
|
+
out-tsc
|
|
9
|
+
|
|
10
|
+
# dependencies
|
|
11
|
+
node_modules
|
|
12
|
+
tools/local-registry/storage/
|
|
13
13
|
tools/local-registry/htpasswd
|
|
14
14
|
|
|
15
15
|
# IDEs and editors
|
|
@@ -68,3 +68,4 @@ artifacts/
|
|
|
68
68
|
|
|
69
69
|
.nx/migrate-runs
|
|
70
70
|
.venv-diarization/
|
|
71
|
+
.venv-speech-recognition/
|
|
@@ -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.7.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 = "60c622670b00e144b174c210e96773e07e7d94ec7c721b33ac65ff6c722c1d93"
|
|
19
19
|
|
|
20
20
|
[tool.hatch.build.targets.wheel]
|
|
21
21
|
packages = ["src/capture_runtime_client"]
|
{capture_runtime_client-0.6.3 → capture_runtime_client-0.7.0}/src/capture_runtime_client/client.py
RENAMED
|
@@ -702,23 +702,35 @@ def _safe_id(value: str) -> str:
|
|
|
702
702
|
return value
|
|
703
703
|
|
|
704
704
|
|
|
705
|
+
_PDF_PAGE_SELECTION_ERROR = (
|
|
706
|
+
"pdf_page_numbers must list source pages in ascending order without duplicates"
|
|
707
|
+
)
|
|
708
|
+
|
|
709
|
+
|
|
705
710
|
def _normalize_pdf_page_numbers(
|
|
706
711
|
value: Sequence[int] | None,
|
|
707
712
|
) -> tuple[int, ...] | None:
|
|
713
|
+
"""Freeze an optional PDF page selection: one-based source pages, ascending.
|
|
714
|
+
|
|
715
|
+
``(3, 7, 8, 20)`` reads those four pages; OCR pages and page locators keep
|
|
716
|
+
the same numbers. A prefix such as ``(1,)`` is the same rule.
|
|
717
|
+
"""
|
|
718
|
+
|
|
708
719
|
if value is None:
|
|
709
720
|
return None
|
|
710
721
|
if isinstance(value, (str, bytes, bytearray)):
|
|
711
|
-
raise ValueError(
|
|
722
|
+
raise ValueError(_PDF_PAGE_SELECTION_ERROR)
|
|
712
723
|
try:
|
|
713
724
|
normalized = tuple(value)
|
|
714
725
|
except TypeError as error:
|
|
715
|
-
raise ValueError(
|
|
726
|
+
raise ValueError(_PDF_PAGE_SELECTION_ERROR) from error
|
|
716
727
|
if not 1 <= len(normalized) <= 500:
|
|
717
728
|
raise ValueError("pdf_page_numbers must contain 1 to 500 pages")
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
729
|
+
previous = 0
|
|
730
|
+
for page_number in normalized:
|
|
731
|
+
if type(page_number) is not int or page_number <= previous:
|
|
732
|
+
raise ValueError(_PDF_PAGE_SELECTION_ERROR)
|
|
733
|
+
previous = page_number
|
|
722
734
|
return normalized
|
|
723
735
|
|
|
724
736
|
|
|
@@ -44,7 +44,7 @@ CAPTURE_RUNTIME_VERSION = _generated.RUNTIME_VERSION
|
|
|
44
44
|
CAPTURE_DOCUMENT_SCHEMA_ID = (
|
|
45
45
|
"https://github.com/gx-capture/capture-workbench/schema/capture-document-v2.schema.json"
|
|
46
46
|
)
|
|
47
|
-
CAPTURE_DOCUMENT_SCHEMA_SHA256 = "
|
|
47
|
+
CAPTURE_DOCUMENT_SCHEMA_SHA256 = "5452631ce9d8eea48851a819530d94920a39f41350d5575df0f8f97f82171774"
|
|
48
48
|
_CONTRACT_SET_ASSETS = files("capture_runtime_client.private.assets")
|
|
49
49
|
CAPTURE_CONTRACT_SET_SHA256 = (
|
|
50
50
|
_CONTRACT_SET_ASSETS.joinpath("contract-set.sha256").read_text(encoding="ascii").strip()
|