capture-runtime-client 0.4.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.
Files changed (52) hide show
  1. capture_runtime_client-0.4.0/.gitignore +67 -0
  2. capture_runtime_client-0.4.0/PKG-INFO +18 -0
  3. capture_runtime_client-0.4.0/README.md +8 -0
  4. capture_runtime_client-0.4.0/project.json +25 -0
  5. capture_runtime_client-0.4.0/pyproject.toml +49 -0
  6. capture_runtime_client-0.4.0/src/capture_runtime_client/__init__.py +41 -0
  7. capture_runtime_client-0.4.0/src/capture_runtime_client/client.py +852 -0
  8. capture_runtime_client-0.4.0/src/capture_runtime_client/codec.py +124 -0
  9. capture_runtime_client-0.4.0/src/capture_runtime_client/contracts.py +272 -0
  10. capture_runtime_client-0.4.0/src/capture_runtime_client/errors.py +170 -0
  11. capture_runtime_client-0.4.0/src/capture_runtime_client/private/__init__.py +1 -0
  12. capture_runtime_client-0.4.0/src/capture_runtime_client/private/assets/__init__.py +1 -0
  13. capture_runtime_client-0.4.0/src/capture_runtime_client/private/assets/contract-set.json +1 -0
  14. capture_runtime_client-0.4.0/src/capture_runtime_client/private/assets/contract-set.sha256 +1 -0
  15. capture_runtime_client-0.4.0/src/capture_runtime_client/private/generated_models.py +627 -0
  16. capture_runtime_client-0.4.0/src/capture_runtime_client/private/schemas/__init__.py +1 -0
  17. capture_runtime_client-0.4.0/src/capture_runtime_client/private/schemas/capture-block.schema.json +151 -0
  18. capture_runtime_client-0.4.0/src/capture_runtime_client/private/schemas/capture-document.schema.json +356 -0
  19. capture_runtime_client-0.4.0/src/capture_runtime_client/private/schemas/capture-engine.schema.json +40 -0
  20. capture_runtime_client-0.4.0/src/capture_runtime_client/private/schemas/capture-event-v2.schema.json +301 -0
  21. capture_runtime_client-0.4.0/src/capture_runtime_client/private/schemas/capture-failure-v2.schema.json +40 -0
  22. capture_runtime_client-0.4.0/src/capture_runtime_client/private/schemas/capture-operation-v2.schema.json +207 -0
  23. capture_runtime_client-0.4.0/src/capture_runtime_client/private/schemas/capture-source.schema.json +34 -0
  24. capture_runtime_client-0.4.0/src/capture_runtime_client/private/schemas/error-body-v2.schema.json +34 -0
  25. capture_runtime_client-0.4.0/src/capture_runtime_client/private/schemas/error-envelope-v2.schema.json +49 -0
  26. capture_runtime_client-0.4.0/src/capture_runtime_client/private/schemas/finalize-ingestion-v2.schema.json +27 -0
  27. capture_runtime_client-0.4.0/src/capture_runtime_client/private/schemas/ingestion-v2.schema.json +127 -0
  28. capture_runtime_client-0.4.0/src/capture_runtime_client/private/schemas/open-ingestion-v2.schema.json +79 -0
  29. capture_runtime_client-0.4.0/src/capture_runtime_client/private/schemas/page-locator.schema.json +49 -0
  30. capture_runtime_client-0.4.0/src/capture_runtime_client/private/schemas/partial-capture-v2.schema.json +267 -0
  31. capture_runtime_client-0.4.0/src/capture_runtime_client/private/schemas/raw-capture-segment.schema.json +125 -0
  32. capture_runtime_client-0.4.0/src/capture_runtime_client/private/schemas/raw-capture.schema.json +260 -0
  33. capture_runtime_client-0.4.0/src/capture_runtime_client/private/schemas/report-structuring-failure-v2.schema.json +28 -0
  34. capture_runtime_client-0.4.0/src/capture_runtime_client/private/schemas/runtime-artifact-descriptor-v2.schema.json +34 -0
  35. capture_runtime_client-0.4.0/src/capture_runtime_client/private/schemas/runtime-installation-v2.schema.json +126 -0
  36. capture_runtime_client-0.4.0/src/capture_runtime_client/private/schemas/runtime-installations-v2.schema.json +143 -0
  37. capture_runtime_client-0.4.0/src/capture_runtime_client/private/schemas/runtime-model-installation-v2.schema.json +121 -0
  38. capture_runtime_client-0.4.0/src/capture_runtime_client/private/schemas/runtime-model-installations-v2.schema.json +138 -0
  39. capture_runtime_client-0.4.0/src/capture_runtime_client/private/schemas/runtime-model-option-v2.schema.json +80 -0
  40. capture_runtime_client-0.4.0/src/capture_runtime_client/private/schemas/runtime-model-options-v2.schema.json +103 -0
  41. capture_runtime_client-0.4.0/src/capture_runtime_client/private/schemas/runtime-ready.schema.json +88 -0
  42. capture_runtime_client-0.4.0/src/capture_runtime_client/private/schemas/runtime-requirement-v2.schema.json +120 -0
  43. capture_runtime_client-0.4.0/src/capture_runtime_client/private/schemas/runtime-requirements-v2.schema.json +137 -0
  44. capture_runtime_client-0.4.0/src/capture_runtime_client/private/schemas/runtime-streaming-capabilities-v2.schema.json +64 -0
  45. capture_runtime_client-0.4.0/src/capture_runtime_client/private/schemas/start-capture-v2.schema.json +59 -0
  46. capture_runtime_client-0.4.0/src/capture_runtime_client/private/schemas/start-runtime-installation-v2.schema.json +26 -0
  47. capture_runtime_client-0.4.0/src/capture_runtime_client/private/schemas/start-runtime-model-installation-v2.schema.json +21 -0
  48. capture_runtime_client-0.4.0/src/capture_runtime_client/private/schemas/time-locator.schema.json +27 -0
  49. capture_runtime_client-0.4.0/src/capture_runtime_client/py.typed +1 -0
  50. capture_runtime_client-0.4.0/src/capture_runtime_client/transport.py +158 -0
  51. capture_runtime_client-0.4.0/tests/test_client_sdk.py +546 -0
  52. capture_runtime_client-0.4.0/uv.lock +437 -0
@@ -0,0 +1,67 @@
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
+ tmp
6
+ out-tsc
7
+
8
+ # dependencies
9
+ node_modules
10
+ tools/local-registry/storage/
11
+ tools/local-registry/htpasswd
12
+
13
+ # IDEs and editors
14
+ /.idea
15
+ .project
16
+ .classpath
17
+ .c9/
18
+ *.launch
19
+ .settings/
20
+ *.sublime-workspace
21
+
22
+ # IDE - VSCode
23
+ .vscode/*
24
+ !.vscode/settings.json
25
+ !.vscode/tasks.json
26
+ !.vscode/launch.json
27
+ !.vscode/extensions.json
28
+
29
+ # misc
30
+ /.sass-cache
31
+ /connect.lock
32
+ /coverage
33
+ /libpeerconnection.log
34
+ npm-debug.log
35
+ yarn-error.log
36
+ testem.log
37
+ /typings
38
+
39
+ # System Files
40
+ .DS_Store
41
+ Thumbs.db
42
+
43
+ .nx/cache
44
+ .nx/workspace-data
45
+ .claude/worktrees
46
+ .claude/settings.local.json
47
+
48
+ .angular
49
+
50
+ __screenshots__/
51
+
52
+ # Python runtime
53
+ __pycache__/
54
+ *.py[cod]
55
+ .pytest_cache/
56
+ .ruff_cache/
57
+ .venv/
58
+
59
+ # Rust / Tauri
60
+ target/
61
+ apps/capture-workbench-desktop/src-tauri/gen/
62
+
63
+ # Local verification data and release output
64
+ .capture-workbench/
65
+ artifacts/
66
+
67
+ .nx/migrate-runs
@@ -0,0 +1,18 @@
1
+ Metadata-Version: 2.5
2
+ Name: capture-runtime-client
3
+ Version: 0.4.0
4
+ Summary: Capture Runtime HTTP, in-memory, discovery, and protocol client SDK.
5
+ License: MIT
6
+ Requires-Python: <3.15,>=3.12
7
+ Requires-Dist: httpx<1.0.0,>=0.27.0
8
+ Requires-Dist: pydantic<3.0.0,>=2.13.4
9
+ Description-Content-Type: text/markdown
10
+
11
+ # capture-runtime-client
12
+
13
+ Backend-side Capture Runtime client SDK. It owns loopback endpoint
14
+ validation, readiness/schema-hash negotiation, authenticated HTTP and
15
+ deterministic in-memory transports, canonical v2 request methods, SSE decoding, and
16
+ redacted common errors. Generated Pydantic models are private SDK build input;
17
+ consumers import them from `capture_runtime_client`, never from a generated
18
+ contracts package.
@@ -0,0 +1,8 @@
1
+ # capture-runtime-client
2
+
3
+ Backend-side Capture Runtime client SDK. It owns loopback endpoint
4
+ validation, readiness/schema-hash negotiation, authenticated HTTP and
5
+ deterministic in-memory transports, canonical v2 request methods, SSE decoding, and
6
+ redacted common errors. Generated Pydantic models are private SDK build input;
7
+ consumers import them from `capture_runtime_client`, never from a generated
8
+ contracts package.
@@ -0,0 +1,25 @@
1
+ {
2
+ "name": "capture-runtime-client-python",
3
+ "sourceRoot": "packages/capture-runtime-client-python/src",
4
+ "projectType": "library",
5
+ "tags": ["scope:capture", "type:sdk"],
6
+ "targets": {
7
+ "test": {
8
+ "executor": "nx:run-commands",
9
+ "options": { "command": "uv run --project packages/capture-runtime-client-python pytest packages/capture-runtime-client-python/tests" }
10
+ },
11
+ "lint": {
12
+ "executor": "nx:run-commands",
13
+ "options": { "command": "uv run --project packages/capture-runtime-client-python ruff check packages/capture-runtime-client-python/src packages/capture-runtime-client-python/tests" }
14
+ },
15
+ "typecheck": {
16
+ "executor": "nx:run-commands",
17
+ "options": { "command": "uv run --project packages/capture-runtime-client-python mypy packages/capture-runtime-client-python/src" }
18
+ },
19
+ "build": {
20
+ "executor": "nx:run-commands",
21
+ "outputs": ["{projectRoot}/dist"],
22
+ "options": { "command": "uv build --project packages/capture-runtime-client-python" }
23
+ }
24
+ }
25
+ }
@@ -0,0 +1,49 @@
1
+ [build-system]
2
+ requires = ["hatchling>=1.27.0,<2.0.0"]
3
+ build-backend = "hatchling.build"
4
+
5
+ [project]
6
+ name = "capture-runtime-client"
7
+ version = "0.4.0"
8
+ description = "Capture Runtime HTTP, in-memory, discovery, and protocol client SDK."
9
+ readme = "README.md"
10
+ requires-python = ">=3.12,<3.15"
11
+ license = { text = "MIT" }
12
+ dependencies = [
13
+ "httpx>=0.27.0,<1.0.0",
14
+ "pydantic>=2.13.4,<3.0.0",
15
+ ]
16
+
17
+ [tool.capture_runtime_client]
18
+ contract_set_sha256 = "5b93bcb557acca034386b6e9e47502efec91210331ecebabd9c470196d35fec3"
19
+
20
+ [tool.hatch.build.targets.wheel]
21
+ packages = ["src/capture_runtime_client"]
22
+
23
+ [tool.hatch.build.targets.wheel.force-include]
24
+ "src/capture_runtime_client/py.typed" = "capture_runtime_client/py.typed"
25
+ "src/capture_runtime_client/private/assets/contract-set.json" = "capture_runtime_client/private/assets/contract-set.json"
26
+ "src/capture_runtime_client/private/assets/contract-set.sha256" = "capture_runtime_client/private/assets/contract-set.sha256"
27
+
28
+ [dependency-groups]
29
+ dev = [
30
+ "mypy>=1.14.0,<2.0.0",
31
+ "pytest>=8.3.0,<9.0.0",
32
+ "ruff>=0.9.0,<1.0.0",
33
+ ]
34
+
35
+ [tool.pytest.ini_options]
36
+ pythonpath = ["src"]
37
+ testpaths = ["tests"]
38
+ addopts = "-ra"
39
+
40
+ [tool.ruff]
41
+ line-length = 100
42
+ target-version = "py312"
43
+
44
+ [tool.ruff.lint]
45
+ select = ["B", "E", "F", "I", "UP"]
46
+
47
+ [tool.mypy]
48
+ python_version = "3.12"
49
+ strict = true
@@ -0,0 +1,41 @@
1
+ """Public Capture Runtime client SDK."""
2
+
3
+ from .client import CaptureRuntimeClient, CaptureStreamingResult, CaptureUpload, RuntimeDiscovery
4
+ from .contracts import * # noqa: F401,F403
5
+ from .contracts import __all__ as _contract_names
6
+ from .errors import (
7
+ CaptureAuthenticationError,
8
+ CaptureCompatibilityError,
9
+ CaptureProtocolError,
10
+ CaptureRemoteError,
11
+ CaptureRuntimeCompatibilityError,
12
+ CaptureRuntimeError,
13
+ CaptureRuntimeProtocolError,
14
+ CaptureTransportError,
15
+ )
16
+ from .transport import (
17
+ HttpRuntimeTransport,
18
+ InMemoryRoute,
19
+ InMemoryRuntimeTransport,
20
+ validate_loopback_base_url,
21
+ )
22
+
23
+ __all__ = [
24
+ "CaptureRuntimeClient",
25
+ "CaptureAuthenticationError",
26
+ "CaptureCompatibilityError",
27
+ "CaptureProtocolError",
28
+ "CaptureRemoteError",
29
+ "CaptureTransportError",
30
+ "CaptureRuntimeCompatibilityError",
31
+ "CaptureRuntimeError",
32
+ "CaptureRuntimeProtocolError",
33
+ "CaptureStreamingResult",
34
+ "CaptureUpload",
35
+ "HttpRuntimeTransport",
36
+ "InMemoryRoute",
37
+ "InMemoryRuntimeTransport",
38
+ "RuntimeDiscovery",
39
+ "validate_loopback_base_url",
40
+ *_contract_names,
41
+ ]