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,260 @@
1
+ {
2
+ "$defs": {
3
+ "CaptureEngine": {
4
+ "additionalProperties": false,
5
+ "properties": {
6
+ "engine": {
7
+ "minLength": 1,
8
+ "title": "Engine",
9
+ "type": "string"
10
+ },
11
+ "model": {
12
+ "minLength": 1,
13
+ "title": "Model",
14
+ "type": "string"
15
+ },
16
+ "digest": {
17
+ "pattern": "^sha256:[0-9a-f]{64}$",
18
+ "title": "Digest",
19
+ "type": "string"
20
+ },
21
+ "device": {
22
+ "anyOf": [
23
+ {
24
+ "minLength": 1,
25
+ "type": "string"
26
+ },
27
+ {
28
+ "type": "null"
29
+ }
30
+ ],
31
+ "default": null,
32
+ "title": "Device"
33
+ }
34
+ },
35
+ "required": [
36
+ "engine",
37
+ "model",
38
+ "digest"
39
+ ],
40
+ "title": "CaptureEngine",
41
+ "type": "object"
42
+ },
43
+ "CaptureSource": {
44
+ "additionalProperties": false,
45
+ "properties": {
46
+ "sha256": {
47
+ "pattern": "^[0-9a-f]{64}$",
48
+ "title": "Sha256",
49
+ "type": "string"
50
+ },
51
+ "fileName": {
52
+ "maxLength": 255,
53
+ "minLength": 1,
54
+ "title": "Filename",
55
+ "type": "string"
56
+ },
57
+ "mediaType": {
58
+ "minLength": 1,
59
+ "title": "Mediatype",
60
+ "type": "string"
61
+ },
62
+ "bytes": {
63
+ "minimum": 1,
64
+ "title": "Bytes",
65
+ "type": "integer"
66
+ }
67
+ },
68
+ "required": [
69
+ "sha256",
70
+ "fileName",
71
+ "mediaType",
72
+ "bytes"
73
+ ],
74
+ "title": "CaptureSource",
75
+ "type": "object"
76
+ },
77
+ "PageLocator": {
78
+ "additionalProperties": false,
79
+ "properties": {
80
+ "kind": {
81
+ "const": "page",
82
+ "default": "page",
83
+ "title": "Kind",
84
+ "type": "string"
85
+ },
86
+ "page": {
87
+ "minimum": 1,
88
+ "title": "Page",
89
+ "type": "integer"
90
+ },
91
+ "boundingBox": {
92
+ "anyOf": [
93
+ {
94
+ "maxItems": 4,
95
+ "minItems": 4,
96
+ "prefixItems": [
97
+ {
98
+ "type": "number"
99
+ },
100
+ {
101
+ "type": "number"
102
+ },
103
+ {
104
+ "type": "number"
105
+ },
106
+ {
107
+ "type": "number"
108
+ }
109
+ ],
110
+ "type": "array"
111
+ },
112
+ {
113
+ "type": "null"
114
+ }
115
+ ],
116
+ "default": null,
117
+ "title": "Boundingbox"
118
+ }
119
+ },
120
+ "required": [
121
+ "page"
122
+ ],
123
+ "title": "PageLocator",
124
+ "type": "object"
125
+ },
126
+ "RawCaptureSegment": {
127
+ "additionalProperties": false,
128
+ "properties": {
129
+ "segmentId": {
130
+ "minLength": 1,
131
+ "title": "Segmentid",
132
+ "type": "string"
133
+ },
134
+ "order": {
135
+ "minimum": 0,
136
+ "title": "Order",
137
+ "type": "integer"
138
+ },
139
+ "locator": {
140
+ "discriminator": {
141
+ "mapping": {
142
+ "page": "#/$defs/PageLocator",
143
+ "time": "#/$defs/TimeLocator"
144
+ },
145
+ "propertyName": "kind"
146
+ },
147
+ "oneOf": [
148
+ {
149
+ "$ref": "#/$defs/PageLocator"
150
+ },
151
+ {
152
+ "$ref": "#/$defs/TimeLocator"
153
+ }
154
+ ],
155
+ "title": "Locator"
156
+ },
157
+ "text": {
158
+ "maxLength": 2000000,
159
+ "minLength": 1,
160
+ "title": "Text",
161
+ "type": "string"
162
+ }
163
+ },
164
+ "required": [
165
+ "segmentId",
166
+ "order",
167
+ "locator",
168
+ "text"
169
+ ],
170
+ "title": "RawCaptureSegment",
171
+ "type": "object"
172
+ },
173
+ "TimeLocator": {
174
+ "additionalProperties": false,
175
+ "properties": {
176
+ "kind": {
177
+ "const": "time",
178
+ "default": "time",
179
+ "title": "Kind",
180
+ "type": "string"
181
+ },
182
+ "startMs": {
183
+ "minimum": 0,
184
+ "title": "Startms",
185
+ "type": "integer"
186
+ },
187
+ "endMs": {
188
+ "exclusiveMinimum": 0,
189
+ "title": "Endms",
190
+ "type": "integer"
191
+ }
192
+ },
193
+ "required": [
194
+ "startMs",
195
+ "endMs"
196
+ ],
197
+ "title": "TimeLocator",
198
+ "type": "object"
199
+ }
200
+ },
201
+ "additionalProperties": false,
202
+ "properties": {
203
+ "schemaVersion": {
204
+ "const": "2",
205
+ "default": "2",
206
+ "title": "Schemaversion",
207
+ "type": "string"
208
+ },
209
+ "diagnosticOnly": {
210
+ "const": true,
211
+ "default": true,
212
+ "title": "Diagnosticonly",
213
+ "type": "boolean"
214
+ },
215
+ "source": {
216
+ "$ref": "#/$defs/CaptureSource"
217
+ },
218
+ "segments": {
219
+ "items": {
220
+ "$ref": "#/$defs/RawCaptureSegment"
221
+ },
222
+ "maxItems": 10000,
223
+ "minItems": 1,
224
+ "title": "Segments",
225
+ "type": "array"
226
+ },
227
+ "sourceText": {
228
+ "maxLength": 8000000,
229
+ "minLength": 1,
230
+ "title": "Sourcetext",
231
+ "type": "string"
232
+ },
233
+ "extractionEngine": {
234
+ "$ref": "#/$defs/CaptureEngine"
235
+ },
236
+ "warnings": {
237
+ "items": {
238
+ "maxLength": 500,
239
+ "type": "string"
240
+ },
241
+ "maxItems": 1000,
242
+ "title": "Warnings",
243
+ "type": "array"
244
+ },
245
+ "createdAt": {
246
+ "format": "date-time",
247
+ "title": "Createdat",
248
+ "type": "string"
249
+ }
250
+ },
251
+ "required": [
252
+ "source",
253
+ "segments",
254
+ "sourceText",
255
+ "extractionEngine",
256
+ "createdAt"
257
+ ],
258
+ "title": "RawCapture",
259
+ "type": "object"
260
+ }
@@ -0,0 +1,28 @@
1
+ {
2
+ "additionalProperties": false,
3
+ "properties": {
4
+ "protocolVersion": {
5
+ "const": "2",
6
+ "default": "2",
7
+ "title": "Protocolversion",
8
+ "type": "string"
9
+ },
10
+ "code": {
11
+ "pattern": "^[a-z][a-z0-9_]{1,63}$",
12
+ "title": "Code",
13
+ "type": "string"
14
+ },
15
+ "message": {
16
+ "maxLength": 500,
17
+ "minLength": 1,
18
+ "title": "Message",
19
+ "type": "string"
20
+ }
21
+ },
22
+ "required": [
23
+ "code",
24
+ "message"
25
+ ],
26
+ "title": "ReportStructuringFailureV2",
27
+ "type": "object"
28
+ }
@@ -0,0 +1,34 @@
1
+ {
2
+ "additionalProperties": false,
3
+ "properties": {
4
+ "artifactUrl": {
5
+ "minLength": 1,
6
+ "title": "Artifacturl",
7
+ "type": "string"
8
+ },
9
+ "artifactFileName": {
10
+ "minLength": 1,
11
+ "title": "Artifactfilename",
12
+ "type": "string"
13
+ },
14
+ "bytes": {
15
+ "maximum": 536870912,
16
+ "minimum": 1,
17
+ "title": "Bytes",
18
+ "type": "integer"
19
+ },
20
+ "sha256": {
21
+ "pattern": "^[0-9a-f]{64}$",
22
+ "title": "Sha256",
23
+ "type": "string"
24
+ }
25
+ },
26
+ "required": [
27
+ "artifactUrl",
28
+ "artifactFileName",
29
+ "bytes",
30
+ "sha256"
31
+ ],
32
+ "title": "RuntimeArtifactDescriptorV2",
33
+ "type": "object"
34
+ }
@@ -0,0 +1,126 @@
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
+ },
56
+ "additionalProperties": false,
57
+ "properties": {
58
+ "installationId": {
59
+ "title": "Installationid",
60
+ "type": "string"
61
+ },
62
+ "requirementId": {
63
+ "enum": [
64
+ "windowsml-ocr",
65
+ "whisper-primary",
66
+ "ollama-runtime",
67
+ "capture-ollama-model"
68
+ ],
69
+ "title": "Requirementid",
70
+ "type": "string"
71
+ },
72
+ "status": {
73
+ "$ref": "#/$defs/RuntimeInstallationStatus"
74
+ },
75
+ "progress": {
76
+ "maximum": 1,
77
+ "minimum": 0,
78
+ "title": "Progress",
79
+ "type": "number"
80
+ },
81
+ "error": {
82
+ "anyOf": [
83
+ {
84
+ "$ref": "#/$defs/CaptureFailureV2"
85
+ },
86
+ {
87
+ "type": "null"
88
+ }
89
+ ],
90
+ "default": null
91
+ },
92
+ "createdAt": {
93
+ "format": "date-time",
94
+ "title": "Createdat",
95
+ "type": "string"
96
+ },
97
+ "updatedAt": {
98
+ "format": "date-time",
99
+ "title": "Updatedat",
100
+ "type": "string"
101
+ },
102
+ "completedAt": {
103
+ "anyOf": [
104
+ {
105
+ "format": "date-time",
106
+ "type": "string"
107
+ },
108
+ {
109
+ "type": "null"
110
+ }
111
+ ],
112
+ "default": null,
113
+ "title": "Completedat"
114
+ }
115
+ },
116
+ "required": [
117
+ "installationId",
118
+ "requirementId",
119
+ "status",
120
+ "progress",
121
+ "createdAt",
122
+ "updatedAt"
123
+ ],
124
+ "title": "RuntimeInstallationV2",
125
+ "type": "object"
126
+ }
@@ -0,0 +1,143 @@
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
+ "RuntimeInstallationV2": {
56
+ "additionalProperties": false,
57
+ "properties": {
58
+ "installationId": {
59
+ "title": "Installationid",
60
+ "type": "string"
61
+ },
62
+ "requirementId": {
63
+ "enum": [
64
+ "windowsml-ocr",
65
+ "whisper-primary",
66
+ "ollama-runtime",
67
+ "capture-ollama-model"
68
+ ],
69
+ "title": "Requirementid",
70
+ "type": "string"
71
+ },
72
+ "status": {
73
+ "$ref": "#/$defs/RuntimeInstallationStatus"
74
+ },
75
+ "progress": {
76
+ "maximum": 1,
77
+ "minimum": 0,
78
+ "title": "Progress",
79
+ "type": "number"
80
+ },
81
+ "error": {
82
+ "anyOf": [
83
+ {
84
+ "$ref": "#/$defs/CaptureFailureV2"
85
+ },
86
+ {
87
+ "type": "null"
88
+ }
89
+ ],
90
+ "default": null
91
+ },
92
+ "createdAt": {
93
+ "format": "date-time",
94
+ "title": "Createdat",
95
+ "type": "string"
96
+ },
97
+ "updatedAt": {
98
+ "format": "date-time",
99
+ "title": "Updatedat",
100
+ "type": "string"
101
+ },
102
+ "completedAt": {
103
+ "anyOf": [
104
+ {
105
+ "format": "date-time",
106
+ "type": "string"
107
+ },
108
+ {
109
+ "type": "null"
110
+ }
111
+ ],
112
+ "default": null,
113
+ "title": "Completedat"
114
+ }
115
+ },
116
+ "required": [
117
+ "installationId",
118
+ "requirementId",
119
+ "status",
120
+ "progress",
121
+ "createdAt",
122
+ "updatedAt"
123
+ ],
124
+ "title": "RuntimeInstallationV2",
125
+ "type": "object"
126
+ }
127
+ },
128
+ "additionalProperties": false,
129
+ "properties": {
130
+ "items": {
131
+ "items": {
132
+ "$ref": "#/$defs/RuntimeInstallationV2"
133
+ },
134
+ "title": "Items",
135
+ "type": "array"
136
+ }
137
+ },
138
+ "required": [
139
+ "items"
140
+ ],
141
+ "title": "RuntimeInstallationsV2",
142
+ "type": "object"
143
+ }
@@ -0,0 +1,121 @@
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
+ },
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
+ }