capture-runtime-client 0.4.0__py3-none-any.whl

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 (48) hide show
  1. capture_runtime_client/__init__.py +41 -0
  2. capture_runtime_client/client.py +852 -0
  3. capture_runtime_client/codec.py +124 -0
  4. capture_runtime_client/contracts.py +272 -0
  5. capture_runtime_client/errors.py +170 -0
  6. capture_runtime_client/private/__init__.py +1 -0
  7. capture_runtime_client/private/assets/__init__.py +1 -0
  8. capture_runtime_client/private/assets/contract-set.json +1 -0
  9. capture_runtime_client/private/assets/contract-set.sha256 +1 -0
  10. capture_runtime_client/private/generated_models.py +627 -0
  11. capture_runtime_client/private/schemas/__init__.py +1 -0
  12. capture_runtime_client/private/schemas/capture-block.schema.json +151 -0
  13. capture_runtime_client/private/schemas/capture-document.schema.json +356 -0
  14. capture_runtime_client/private/schemas/capture-engine.schema.json +40 -0
  15. capture_runtime_client/private/schemas/capture-event-v2.schema.json +301 -0
  16. capture_runtime_client/private/schemas/capture-failure-v2.schema.json +40 -0
  17. capture_runtime_client/private/schemas/capture-operation-v2.schema.json +207 -0
  18. capture_runtime_client/private/schemas/capture-source.schema.json +34 -0
  19. capture_runtime_client/private/schemas/error-body-v2.schema.json +34 -0
  20. capture_runtime_client/private/schemas/error-envelope-v2.schema.json +49 -0
  21. capture_runtime_client/private/schemas/finalize-ingestion-v2.schema.json +27 -0
  22. capture_runtime_client/private/schemas/ingestion-v2.schema.json +127 -0
  23. capture_runtime_client/private/schemas/open-ingestion-v2.schema.json +79 -0
  24. capture_runtime_client/private/schemas/page-locator.schema.json +49 -0
  25. capture_runtime_client/private/schemas/partial-capture-v2.schema.json +267 -0
  26. capture_runtime_client/private/schemas/raw-capture-segment.schema.json +125 -0
  27. capture_runtime_client/private/schemas/raw-capture.schema.json +260 -0
  28. capture_runtime_client/private/schemas/report-structuring-failure-v2.schema.json +28 -0
  29. capture_runtime_client/private/schemas/runtime-artifact-descriptor-v2.schema.json +34 -0
  30. capture_runtime_client/private/schemas/runtime-installation-v2.schema.json +126 -0
  31. capture_runtime_client/private/schemas/runtime-installations-v2.schema.json +143 -0
  32. capture_runtime_client/private/schemas/runtime-model-installation-v2.schema.json +121 -0
  33. capture_runtime_client/private/schemas/runtime-model-installations-v2.schema.json +138 -0
  34. capture_runtime_client/private/schemas/runtime-model-option-v2.schema.json +80 -0
  35. capture_runtime_client/private/schemas/runtime-model-options-v2.schema.json +103 -0
  36. capture_runtime_client/private/schemas/runtime-ready.schema.json +88 -0
  37. capture_runtime_client/private/schemas/runtime-requirement-v2.schema.json +120 -0
  38. capture_runtime_client/private/schemas/runtime-requirements-v2.schema.json +137 -0
  39. capture_runtime_client/private/schemas/runtime-streaming-capabilities-v2.schema.json +64 -0
  40. capture_runtime_client/private/schemas/start-capture-v2.schema.json +59 -0
  41. capture_runtime_client/private/schemas/start-runtime-installation-v2.schema.json +26 -0
  42. capture_runtime_client/private/schemas/start-runtime-model-installation-v2.schema.json +21 -0
  43. capture_runtime_client/private/schemas/time-locator.schema.json +27 -0
  44. capture_runtime_client/py.typed +1 -0
  45. capture_runtime_client/transport.py +158 -0
  46. capture_runtime_client-0.4.0.dist-info/METADATA +18 -0
  47. capture_runtime_client-0.4.0.dist-info/RECORD +48 -0
  48. capture_runtime_client-0.4.0.dist-info/WHEEL +4 -0
@@ -0,0 +1,138 @@
1
+ {
2
+ "$defs": {
3
+ "CaptureFailureV2": {
4
+ "additionalProperties": false,
5
+ "properties": {
6
+ "code": {
7
+ "pattern": "^[a-z][a-z0-9_]{1,63}$",
8
+ "title": "Code",
9
+ "type": "string"
10
+ },
11
+ "message": {
12
+ "maxLength": 500,
13
+ "minLength": 1,
14
+ "title": "Message",
15
+ "type": "string"
16
+ },
17
+ "stage": {
18
+ "anyOf": [
19
+ {
20
+ "minLength": 1,
21
+ "type": "string"
22
+ },
23
+ {
24
+ "type": "null"
25
+ }
26
+ ],
27
+ "default": null,
28
+ "title": "Stage"
29
+ },
30
+ "retryable": {
31
+ "default": false,
32
+ "title": "Retryable",
33
+ "type": "boolean"
34
+ }
35
+ },
36
+ "required": [
37
+ "code",
38
+ "message"
39
+ ],
40
+ "title": "CaptureFailureV2",
41
+ "type": "object"
42
+ },
43
+ "RuntimeInstallationStatus": {
44
+ "enum": [
45
+ "queued",
46
+ "running",
47
+ "completed",
48
+ "failed",
49
+ "cancelled",
50
+ "manual_action_required"
51
+ ],
52
+ "title": "RuntimeInstallationStatus",
53
+ "type": "string"
54
+ },
55
+ "RuntimeModelInstallationV2": {
56
+ "additionalProperties": false,
57
+ "properties": {
58
+ "installationId": {
59
+ "title": "Installationid",
60
+ "type": "string"
61
+ },
62
+ "optionId": {
63
+ "minLength": 1,
64
+ "title": "Optionid",
65
+ "type": "string"
66
+ },
67
+ "status": {
68
+ "$ref": "#/$defs/RuntimeInstallationStatus"
69
+ },
70
+ "progress": {
71
+ "maximum": 1,
72
+ "minimum": 0,
73
+ "title": "Progress",
74
+ "type": "number"
75
+ },
76
+ "error": {
77
+ "anyOf": [
78
+ {
79
+ "$ref": "#/$defs/CaptureFailureV2"
80
+ },
81
+ {
82
+ "type": "null"
83
+ }
84
+ ],
85
+ "default": null
86
+ },
87
+ "createdAt": {
88
+ "format": "date-time",
89
+ "title": "Createdat",
90
+ "type": "string"
91
+ },
92
+ "updatedAt": {
93
+ "format": "date-time",
94
+ "title": "Updatedat",
95
+ "type": "string"
96
+ },
97
+ "completedAt": {
98
+ "anyOf": [
99
+ {
100
+ "format": "date-time",
101
+ "type": "string"
102
+ },
103
+ {
104
+ "type": "null"
105
+ }
106
+ ],
107
+ "default": null,
108
+ "title": "Completedat"
109
+ }
110
+ },
111
+ "required": [
112
+ "installationId",
113
+ "optionId",
114
+ "status",
115
+ "progress",
116
+ "createdAt",
117
+ "updatedAt"
118
+ ],
119
+ "title": "RuntimeModelInstallationV2",
120
+ "type": "object"
121
+ }
122
+ },
123
+ "additionalProperties": false,
124
+ "properties": {
125
+ "items": {
126
+ "items": {
127
+ "$ref": "#/$defs/RuntimeModelInstallationV2"
128
+ },
129
+ "title": "Items",
130
+ "type": "array"
131
+ }
132
+ },
133
+ "required": [
134
+ "items"
135
+ ],
136
+ "title": "RuntimeModelInstallationsV2",
137
+ "type": "object"
138
+ }
@@ -0,0 +1,80 @@
1
+ {
2
+ "$defs": {
3
+ "RuntimeModelOptionStatus": {
4
+ "enum": [
5
+ "not-installed",
6
+ "installed",
7
+ "active"
8
+ ],
9
+ "title": "RuntimeModelOptionStatus",
10
+ "type": "string"
11
+ }
12
+ },
13
+ "additionalProperties": false,
14
+ "properties": {
15
+ "optionId": {
16
+ "minLength": 1,
17
+ "title": "Optionid",
18
+ "type": "string"
19
+ },
20
+ "displayName": {
21
+ "minLength": 1,
22
+ "title": "Displayname",
23
+ "type": "string"
24
+ },
25
+ "modelReference": {
26
+ "minLength": 1,
27
+ "title": "Modelreference",
28
+ "type": "string"
29
+ },
30
+ "expectedDigest": {
31
+ "anyOf": [
32
+ {
33
+ "pattern": "^[0-9a-f]{64}$",
34
+ "type": "string"
35
+ },
36
+ {
37
+ "type": "null"
38
+ }
39
+ ],
40
+ "default": null,
41
+ "title": "Expecteddigest"
42
+ },
43
+ "expectedBytes": {
44
+ "anyOf": [
45
+ {
46
+ "minimum": 1,
47
+ "type": "integer"
48
+ },
49
+ {
50
+ "type": "null"
51
+ }
52
+ ],
53
+ "default": null,
54
+ "title": "Expectedbytes"
55
+ },
56
+ "profileId": {
57
+ "minLength": 1,
58
+ "title": "Profileid",
59
+ "type": "string"
60
+ },
61
+ "profileSpecSha256": {
62
+ "pattern": "^[0-9a-f]{64}$",
63
+ "title": "Profilespecsha256",
64
+ "type": "string"
65
+ },
66
+ "status": {
67
+ "$ref": "#/$defs/RuntimeModelOptionStatus"
68
+ }
69
+ },
70
+ "required": [
71
+ "optionId",
72
+ "displayName",
73
+ "modelReference",
74
+ "profileId",
75
+ "profileSpecSha256",
76
+ "status"
77
+ ],
78
+ "title": "RuntimeModelOptionV2",
79
+ "type": "object"
80
+ }
@@ -0,0 +1,103 @@
1
+ {
2
+ "$defs": {
3
+ "RuntimeModelOptionStatus": {
4
+ "enum": [
5
+ "not-installed",
6
+ "installed",
7
+ "active"
8
+ ],
9
+ "title": "RuntimeModelOptionStatus",
10
+ "type": "string"
11
+ },
12
+ "RuntimeModelOptionV2": {
13
+ "additionalProperties": false,
14
+ "properties": {
15
+ "optionId": {
16
+ "minLength": 1,
17
+ "title": "Optionid",
18
+ "type": "string"
19
+ },
20
+ "displayName": {
21
+ "minLength": 1,
22
+ "title": "Displayname",
23
+ "type": "string"
24
+ },
25
+ "modelReference": {
26
+ "minLength": 1,
27
+ "title": "Modelreference",
28
+ "type": "string"
29
+ },
30
+ "expectedDigest": {
31
+ "anyOf": [
32
+ {
33
+ "pattern": "^[0-9a-f]{64}$",
34
+ "type": "string"
35
+ },
36
+ {
37
+ "type": "null"
38
+ }
39
+ ],
40
+ "default": null,
41
+ "title": "Expecteddigest"
42
+ },
43
+ "expectedBytes": {
44
+ "anyOf": [
45
+ {
46
+ "minimum": 1,
47
+ "type": "integer"
48
+ },
49
+ {
50
+ "type": "null"
51
+ }
52
+ ],
53
+ "default": null,
54
+ "title": "Expectedbytes"
55
+ },
56
+ "profileId": {
57
+ "minLength": 1,
58
+ "title": "Profileid",
59
+ "type": "string"
60
+ },
61
+ "profileSpecSha256": {
62
+ "pattern": "^[0-9a-f]{64}$",
63
+ "title": "Profilespecsha256",
64
+ "type": "string"
65
+ },
66
+ "status": {
67
+ "$ref": "#/$defs/RuntimeModelOptionStatus"
68
+ }
69
+ },
70
+ "required": [
71
+ "optionId",
72
+ "displayName",
73
+ "modelReference",
74
+ "profileId",
75
+ "profileSpecSha256",
76
+ "status"
77
+ ],
78
+ "title": "RuntimeModelOptionV2",
79
+ "type": "object"
80
+ }
81
+ },
82
+ "additionalProperties": false,
83
+ "properties": {
84
+ "catalogSha256": {
85
+ "pattern": "^[0-9a-f]{64}$",
86
+ "title": "Catalogsha256",
87
+ "type": "string"
88
+ },
89
+ "items": {
90
+ "items": {
91
+ "$ref": "#/$defs/RuntimeModelOptionV2"
92
+ },
93
+ "title": "Items",
94
+ "type": "array"
95
+ }
96
+ },
97
+ "required": [
98
+ "catalogSha256",
99
+ "items"
100
+ ],
101
+ "title": "RuntimeModelOptionsV2",
102
+ "type": "object"
103
+ }
@@ -0,0 +1,88 @@
1
+ {
2
+ "additionalProperties": false,
3
+ "description": "General v2 readiness payload shared by runtime clients.",
4
+ "properties": {
5
+ "ready": {
6
+ "title": "Ready",
7
+ "type": "boolean"
8
+ },
9
+ "service": {
10
+ "const": "capture-runtime",
11
+ "default": "capture-runtime",
12
+ "title": "Service",
13
+ "type": "string"
14
+ },
15
+ "apiVersion": {
16
+ "const": "2.0",
17
+ "default": "2.0",
18
+ "title": "Apiversion",
19
+ "type": "string"
20
+ },
21
+ "runtimeVersion": {
22
+ "const": "0.4.0",
23
+ "default": "0.4.0",
24
+ "title": "Runtimeversion",
25
+ "type": "string"
26
+ },
27
+ "captureDocumentSchemaVersion": {
28
+ "const": "2",
29
+ "default": "2",
30
+ "title": "Capturedocumentschemaversion",
31
+ "type": "string"
32
+ },
33
+ "captureDocumentSchemaSha256": {
34
+ "anyOf": [
35
+ {
36
+ "pattern": "^[0-9a-f]{64}$",
37
+ "type": "string"
38
+ },
39
+ {
40
+ "type": "null"
41
+ }
42
+ ],
43
+ "default": null,
44
+ "title": "Capturedocumentschemasha256"
45
+ },
46
+ "schemaSha256": {
47
+ "anyOf": [
48
+ {
49
+ "pattern": "^[0-9a-f]{64}$",
50
+ "type": "string"
51
+ },
52
+ {
53
+ "type": "null"
54
+ }
55
+ ],
56
+ "default": null,
57
+ "title": "Schemasha256"
58
+ },
59
+ "contractSetVersion": {
60
+ "const": "2",
61
+ "default": "2",
62
+ "title": "Contractsetversion",
63
+ "type": "string"
64
+ },
65
+ "capabilities": {
66
+ "additionalProperties": true,
67
+ "title": "Capabilities",
68
+ "type": "object"
69
+ },
70
+ "message": {
71
+ "anyOf": [
72
+ {
73
+ "type": "string"
74
+ },
75
+ {
76
+ "type": "null"
77
+ }
78
+ ],
79
+ "default": null,
80
+ "title": "Message"
81
+ }
82
+ },
83
+ "required": [
84
+ "ready"
85
+ ],
86
+ "title": "RuntimeReady",
87
+ "type": "object"
88
+ }
@@ -0,0 +1,120 @@
1
+ {
2
+ "$defs": {
3
+ "RuntimeArtifactDescriptorV2": {
4
+ "additionalProperties": false,
5
+ "properties": {
6
+ "artifactUrl": {
7
+ "minLength": 1,
8
+ "title": "Artifacturl",
9
+ "type": "string"
10
+ },
11
+ "artifactFileName": {
12
+ "minLength": 1,
13
+ "title": "Artifactfilename",
14
+ "type": "string"
15
+ },
16
+ "bytes": {
17
+ "maximum": 536870912,
18
+ "minimum": 1,
19
+ "title": "Bytes",
20
+ "type": "integer"
21
+ },
22
+ "sha256": {
23
+ "pattern": "^[0-9a-f]{64}$",
24
+ "title": "Sha256",
25
+ "type": "string"
26
+ }
27
+ },
28
+ "required": [
29
+ "artifactUrl",
30
+ "artifactFileName",
31
+ "bytes",
32
+ "sha256"
33
+ ],
34
+ "title": "RuntimeArtifactDescriptorV2",
35
+ "type": "object"
36
+ },
37
+ "RuntimeRequirementStatus": {
38
+ "enum": [
39
+ "ready",
40
+ "missing",
41
+ "installable",
42
+ "manual_action_required",
43
+ "unavailable"
44
+ ],
45
+ "title": "RuntimeRequirementStatus",
46
+ "type": "string"
47
+ }
48
+ },
49
+ "additionalProperties": false,
50
+ "properties": {
51
+ "requirementId": {
52
+ "enum": [
53
+ "windowsml-ocr",
54
+ "whisper-primary",
55
+ "ollama-runtime",
56
+ "capture-ollama-model"
57
+ ],
58
+ "title": "Requirementid",
59
+ "type": "string"
60
+ },
61
+ "kind": {
62
+ "minLength": 1,
63
+ "title": "Kind",
64
+ "type": "string"
65
+ },
66
+ "displayName": {
67
+ "minLength": 1,
68
+ "title": "Displayname",
69
+ "type": "string"
70
+ },
71
+ "status": {
72
+ "$ref": "#/$defs/RuntimeRequirementStatus"
73
+ },
74
+ "requiredFor": {
75
+ "items": {
76
+ "type": "string"
77
+ },
78
+ "title": "Requiredfor",
79
+ "type": "array"
80
+ },
81
+ "installStrategy": {
82
+ "minLength": 1,
83
+ "title": "Installstrategy",
84
+ "type": "string"
85
+ },
86
+ "detail": {
87
+ "anyOf": [
88
+ {
89
+ "type": "string"
90
+ },
91
+ {
92
+ "type": "null"
93
+ }
94
+ ],
95
+ "default": null,
96
+ "title": "Detail"
97
+ },
98
+ "artifact": {
99
+ "anyOf": [
100
+ {
101
+ "$ref": "#/$defs/RuntimeArtifactDescriptorV2"
102
+ },
103
+ {
104
+ "type": "null"
105
+ }
106
+ ],
107
+ "default": null
108
+ }
109
+ },
110
+ "required": [
111
+ "requirementId",
112
+ "kind",
113
+ "displayName",
114
+ "status",
115
+ "requiredFor",
116
+ "installStrategy"
117
+ ],
118
+ "title": "RuntimeRequirementV2",
119
+ "type": "object"
120
+ }
@@ -0,0 +1,137 @@
1
+ {
2
+ "$defs": {
3
+ "RuntimeArtifactDescriptorV2": {
4
+ "additionalProperties": false,
5
+ "properties": {
6
+ "artifactUrl": {
7
+ "minLength": 1,
8
+ "title": "Artifacturl",
9
+ "type": "string"
10
+ },
11
+ "artifactFileName": {
12
+ "minLength": 1,
13
+ "title": "Artifactfilename",
14
+ "type": "string"
15
+ },
16
+ "bytes": {
17
+ "maximum": 536870912,
18
+ "minimum": 1,
19
+ "title": "Bytes",
20
+ "type": "integer"
21
+ },
22
+ "sha256": {
23
+ "pattern": "^[0-9a-f]{64}$",
24
+ "title": "Sha256",
25
+ "type": "string"
26
+ }
27
+ },
28
+ "required": [
29
+ "artifactUrl",
30
+ "artifactFileName",
31
+ "bytes",
32
+ "sha256"
33
+ ],
34
+ "title": "RuntimeArtifactDescriptorV2",
35
+ "type": "object"
36
+ },
37
+ "RuntimeRequirementStatus": {
38
+ "enum": [
39
+ "ready",
40
+ "missing",
41
+ "installable",
42
+ "manual_action_required",
43
+ "unavailable"
44
+ ],
45
+ "title": "RuntimeRequirementStatus",
46
+ "type": "string"
47
+ },
48
+ "RuntimeRequirementV2": {
49
+ "additionalProperties": false,
50
+ "properties": {
51
+ "requirementId": {
52
+ "enum": [
53
+ "windowsml-ocr",
54
+ "whisper-primary",
55
+ "ollama-runtime",
56
+ "capture-ollama-model"
57
+ ],
58
+ "title": "Requirementid",
59
+ "type": "string"
60
+ },
61
+ "kind": {
62
+ "minLength": 1,
63
+ "title": "Kind",
64
+ "type": "string"
65
+ },
66
+ "displayName": {
67
+ "minLength": 1,
68
+ "title": "Displayname",
69
+ "type": "string"
70
+ },
71
+ "status": {
72
+ "$ref": "#/$defs/RuntimeRequirementStatus"
73
+ },
74
+ "requiredFor": {
75
+ "items": {
76
+ "type": "string"
77
+ },
78
+ "title": "Requiredfor",
79
+ "type": "array"
80
+ },
81
+ "installStrategy": {
82
+ "minLength": 1,
83
+ "title": "Installstrategy",
84
+ "type": "string"
85
+ },
86
+ "detail": {
87
+ "anyOf": [
88
+ {
89
+ "type": "string"
90
+ },
91
+ {
92
+ "type": "null"
93
+ }
94
+ ],
95
+ "default": null,
96
+ "title": "Detail"
97
+ },
98
+ "artifact": {
99
+ "anyOf": [
100
+ {
101
+ "$ref": "#/$defs/RuntimeArtifactDescriptorV2"
102
+ },
103
+ {
104
+ "type": "null"
105
+ }
106
+ ],
107
+ "default": null
108
+ }
109
+ },
110
+ "required": [
111
+ "requirementId",
112
+ "kind",
113
+ "displayName",
114
+ "status",
115
+ "requiredFor",
116
+ "installStrategy"
117
+ ],
118
+ "title": "RuntimeRequirementV2",
119
+ "type": "object"
120
+ }
121
+ },
122
+ "additionalProperties": false,
123
+ "properties": {
124
+ "items": {
125
+ "items": {
126
+ "$ref": "#/$defs/RuntimeRequirementV2"
127
+ },
128
+ "title": "Items",
129
+ "type": "array"
130
+ }
131
+ },
132
+ "required": [
133
+ "items"
134
+ ],
135
+ "title": "RuntimeRequirementsV2",
136
+ "type": "object"
137
+ }