@dynamicalsystems/idl 0.12.0 → 0.13.0

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.
@@ -0,0 +1,295 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://github.com/DynamicalSystemsGroup/dsg-idl/schema/dsg-run-job-class-v1.json",
4
+ "title": "dsg.run.job-class/1",
5
+ "$defs": {
6
+ "jobClass": {
7
+ "additionalProperties": false,
8
+ "type": "object",
9
+ "required": [
10
+ "profile",
11
+ "schemaVersion",
12
+ "kind",
13
+ "id",
14
+ "executor",
15
+ "mode",
16
+ "modeEnvironmentVariable",
17
+ "workloadArtifact",
18
+ "platforms",
19
+ "isolation",
20
+ "inputContracts",
21
+ "outputContracts",
22
+ "eventCatalog",
23
+ "decisionRequirements",
24
+ "bounds",
25
+ "handling",
26
+ "retention",
27
+ "completion",
28
+ "teardown",
29
+ "evidence",
30
+ "replay"
31
+ ],
32
+ "properties": {
33
+ "profile": {
34
+ "const": "dsg.run.job-class/1",
35
+ "type": "string"
36
+ },
37
+ "schemaVersion": {
38
+ "const": 1,
39
+ "type": "number"
40
+ },
41
+ "kind": {
42
+ "const": "job-class",
43
+ "type": "string"
44
+ },
45
+ "id": {
46
+ "minLength": 1,
47
+ "type": "string"
48
+ },
49
+ "executor": {
50
+ "minLength": 1,
51
+ "type": "string"
52
+ },
53
+ "mode": {
54
+ "minLength": 1,
55
+ "type": "string"
56
+ },
57
+ "modeEnvironmentVariable": {
58
+ "minLength": 1,
59
+ "type": "string"
60
+ },
61
+ "workloadArtifact": {
62
+ "additionalProperties": false,
63
+ "type": "object",
64
+ "required": ["orn", "sha256"],
65
+ "properties": {
66
+ "orn": {
67
+ "pattern": "^orn:[a-z][a-z0-9-]*(?:\\.[a-z][a-z0-9-]*){3}:(?:[A-Za-z0-9\\-._~:/@]|%[0-9A-Fa-f]{2})+$",
68
+ "type": "string"
69
+ },
70
+ "sha256": {
71
+ "pattern": "^[0-9a-f]{64}$",
72
+ "type": "string"
73
+ }
74
+ }
75
+ },
76
+ "platforms": {
77
+ "minItems": 1,
78
+ "uniqueItems": true,
79
+ "type": "array",
80
+ "items": {
81
+ "minLength": 1,
82
+ "type": "string"
83
+ }
84
+ },
85
+ "isolation": {
86
+ "anyOf": [
87
+ {
88
+ "const": "ephemeral",
89
+ "type": "string"
90
+ },
91
+ {
92
+ "const": "dedicated",
93
+ "type": "string"
94
+ }
95
+ ]
96
+ },
97
+ "inputContracts": {
98
+ "minItems": 1,
99
+ "uniqueItems": true,
100
+ "type": "array",
101
+ "items": {
102
+ "additionalProperties": false,
103
+ "type": "object",
104
+ "required": ["orn", "sha256"],
105
+ "properties": {
106
+ "orn": {
107
+ "pattern": "^orn:[a-z][a-z0-9-]*(?:\\.[a-z][a-z0-9-]*){3}:(?:[A-Za-z0-9\\-._~:/@]|%[0-9A-Fa-f]{2})+$",
108
+ "type": "string"
109
+ },
110
+ "sha256": {
111
+ "pattern": "^[0-9a-f]{64}$",
112
+ "type": "string"
113
+ }
114
+ }
115
+ }
116
+ },
117
+ "outputContracts": {
118
+ "minItems": 1,
119
+ "uniqueItems": true,
120
+ "type": "array",
121
+ "items": {
122
+ "additionalProperties": false,
123
+ "type": "object",
124
+ "required": ["orn", "sha256"],
125
+ "properties": {
126
+ "orn": {
127
+ "pattern": "^orn:[a-z][a-z0-9-]*(?:\\.[a-z][a-z0-9-]*){3}:(?:[A-Za-z0-9\\-._~:/@]|%[0-9A-Fa-f]{2})+$",
128
+ "type": "string"
129
+ },
130
+ "sha256": {
131
+ "pattern": "^[0-9a-f]{64}$",
132
+ "type": "string"
133
+ }
134
+ }
135
+ }
136
+ },
137
+ "eventCatalog": {
138
+ "additionalProperties": false,
139
+ "type": "object",
140
+ "required": ["orn", "sha256"],
141
+ "properties": {
142
+ "orn": {
143
+ "pattern": "^orn:[a-z][a-z0-9-]*(?:\\.[a-z][a-z0-9-]*){3}:(?:[A-Za-z0-9\\-._~:/@]|%[0-9A-Fa-f]{2})+$",
144
+ "type": "string"
145
+ },
146
+ "sha256": {
147
+ "pattern": "^[0-9a-f]{64}$",
148
+ "type": "string"
149
+ }
150
+ }
151
+ },
152
+ "decisionRequirements": {
153
+ "minItems": 1,
154
+ "uniqueItems": true,
155
+ "type": "array",
156
+ "items": {
157
+ "additionalProperties": false,
158
+ "type": "object",
159
+ "required": ["orn", "sha256"],
160
+ "properties": {
161
+ "orn": {
162
+ "pattern": "^orn:[a-z][a-z0-9-]*(?:\\.[a-z][a-z0-9-]*){3}:(?:[A-Za-z0-9\\-._~:/@]|%[0-9A-Fa-f]{2})+$",
163
+ "type": "string"
164
+ },
165
+ "sha256": {
166
+ "pattern": "^[0-9a-f]{64}$",
167
+ "type": "string"
168
+ }
169
+ }
170
+ }
171
+ },
172
+ "bounds": {
173
+ "additionalProperties": false,
174
+ "type": "object",
175
+ "required": ["maxRunSeconds", "maxGpuSeconds", "maxParallelism", "maxUsdMicroUnits"],
176
+ "properties": {
177
+ "maxRunSeconds": {
178
+ "minimum": 0,
179
+ "maximum": 9007199254740991,
180
+ "type": "integer"
181
+ },
182
+ "maxGpuSeconds": {
183
+ "minimum": 0,
184
+ "maximum": 9007199254740991,
185
+ "type": "integer"
186
+ },
187
+ "maxParallelism": {
188
+ "minimum": 0,
189
+ "maximum": 9007199254740991,
190
+ "type": "integer"
191
+ },
192
+ "maxUsdMicroUnits": {
193
+ "minimum": 0,
194
+ "maximum": 9007199254740991,
195
+ "type": "integer"
196
+ }
197
+ }
198
+ },
199
+ "handling": {
200
+ "anyOf": [
201
+ {
202
+ "const": "public",
203
+ "type": "string"
204
+ },
205
+ {
206
+ "const": "restricted",
207
+ "type": "string"
208
+ },
209
+ {
210
+ "const": "confidential",
211
+ "type": "string"
212
+ }
213
+ ]
214
+ },
215
+ "retention": {
216
+ "anyOf": [
217
+ {
218
+ "const": "ephemeral",
219
+ "type": "string"
220
+ },
221
+ {
222
+ "const": "bounded",
223
+ "type": "string"
224
+ },
225
+ {
226
+ "const": "durable",
227
+ "type": "string"
228
+ }
229
+ ]
230
+ },
231
+ "completion": {
232
+ "additionalProperties": false,
233
+ "type": "object",
234
+ "required": ["orn", "sha256"],
235
+ "properties": {
236
+ "orn": {
237
+ "pattern": "^orn:[a-z][a-z0-9-]*(?:\\.[a-z][a-z0-9-]*){3}:(?:[A-Za-z0-9\\-._~:/@]|%[0-9A-Fa-f]{2})+$",
238
+ "type": "string"
239
+ },
240
+ "sha256": {
241
+ "pattern": "^[0-9a-f]{64}$",
242
+ "type": "string"
243
+ }
244
+ }
245
+ },
246
+ "teardown": {
247
+ "additionalProperties": false,
248
+ "type": "object",
249
+ "required": ["orn", "sha256"],
250
+ "properties": {
251
+ "orn": {
252
+ "pattern": "^orn:[a-z][a-z0-9-]*(?:\\.[a-z][a-z0-9-]*){3}:(?:[A-Za-z0-9\\-._~:/@]|%[0-9A-Fa-f]{2})+$",
253
+ "type": "string"
254
+ },
255
+ "sha256": {
256
+ "pattern": "^[0-9a-f]{64}$",
257
+ "type": "string"
258
+ }
259
+ }
260
+ },
261
+ "evidence": {
262
+ "additionalProperties": false,
263
+ "type": "object",
264
+ "required": ["orn", "sha256"],
265
+ "properties": {
266
+ "orn": {
267
+ "pattern": "^orn:[a-z][a-z0-9-]*(?:\\.[a-z][a-z0-9-]*){3}:(?:[A-Za-z0-9\\-._~:/@]|%[0-9A-Fa-f]{2})+$",
268
+ "type": "string"
269
+ },
270
+ "sha256": {
271
+ "pattern": "^[0-9a-f]{64}$",
272
+ "type": "string"
273
+ }
274
+ }
275
+ },
276
+ "replay": {
277
+ "additionalProperties": false,
278
+ "type": "object",
279
+ "required": ["orn", "sha256"],
280
+ "properties": {
281
+ "orn": {
282
+ "pattern": "^orn:[a-z][a-z0-9-]*(?:\\.[a-z][a-z0-9-]*){3}:(?:[A-Za-z0-9\\-._~:/@]|%[0-9A-Fa-f]{2})+$",
283
+ "type": "string"
284
+ },
285
+ "sha256": {
286
+ "pattern": "^[0-9a-f]{64}$",
287
+ "type": "string"
288
+ }
289
+ }
290
+ }
291
+ }
292
+ }
293
+ },
294
+ "$ref": "#/$defs/jobClass"
295
+ }
@@ -0,0 +1,284 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://github.com/DynamicalSystemsGroup/dsg-idl/schema/dsg-run-workload-artifact-v1.json",
4
+ "title": "dsg.run.workload-artifact/1",
5
+ "$defs": {
6
+ "workloadArtifact": {
7
+ "additionalProperties": false,
8
+ "type": "object",
9
+ "required": [
10
+ "profile",
11
+ "schemaVersion",
12
+ "kind",
13
+ "id",
14
+ "format",
15
+ "source",
16
+ "index",
17
+ "executable",
18
+ "entrypoint"
19
+ ],
20
+ "properties": {
21
+ "profile": {
22
+ "const": "dsg.run.workload-artifact/1",
23
+ "type": "string"
24
+ },
25
+ "schemaVersion": {
26
+ "const": 1,
27
+ "type": "number"
28
+ },
29
+ "kind": {
30
+ "const": "workload-artifact",
31
+ "type": "string"
32
+ },
33
+ "id": {
34
+ "minLength": 1,
35
+ "type": "string"
36
+ },
37
+ "format": {
38
+ "const": "oci-image",
39
+ "type": "string"
40
+ },
41
+ "source": {
42
+ "additionalProperties": false,
43
+ "type": "object",
44
+ "required": ["repository", "revision", "sourceDigest"],
45
+ "properties": {
46
+ "repository": {
47
+ "minLength": 1,
48
+ "type": "string"
49
+ },
50
+ "revision": {
51
+ "pattern": "^(?:[0-9a-f]{40}|[0-9a-f]{64})$",
52
+ "type": "string"
53
+ },
54
+ "sourceDigest": {
55
+ "pattern": "^[0-9a-f]{64}$",
56
+ "type": "string"
57
+ }
58
+ }
59
+ },
60
+ "index": {
61
+ "anyOf": [
62
+ {
63
+ "type": "null"
64
+ },
65
+ {
66
+ "additionalProperties": false,
67
+ "type": "object",
68
+ "required": ["sha256", "mediaType"],
69
+ "properties": {
70
+ "sha256": {
71
+ "pattern": "^[0-9a-f]{64}$",
72
+ "type": "string"
73
+ },
74
+ "mediaType": {
75
+ "anyOf": [
76
+ {
77
+ "const": "application/vnd.oci.image.index.v1+json",
78
+ "type": "string"
79
+ },
80
+ {
81
+ "const": "application/vnd.docker.distribution.manifest.list.v2+json",
82
+ "type": "string"
83
+ }
84
+ ]
85
+ }
86
+ }
87
+ }
88
+ ]
89
+ },
90
+ "executable": {
91
+ "additionalProperties": false,
92
+ "type": "object",
93
+ "required": ["repository", "platform", "manifest", "config"],
94
+ "properties": {
95
+ "repository": {
96
+ "pattern": "^(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\\.)*[a-z0-9](?:[a-z0-9-]*[a-z0-9])?(?::[1-9][0-9]{0,4})?/[a-z0-9]+(?:[._-][a-z0-9]+)*(?:/[a-z0-9]+(?:[._-][a-z0-9]+)*)*$",
97
+ "type": "string"
98
+ },
99
+ "platform": {
100
+ "additionalProperties": false,
101
+ "type": "object",
102
+ "required": ["os", "architecture"],
103
+ "properties": {
104
+ "os": {
105
+ "minLength": 1,
106
+ "type": "string"
107
+ },
108
+ "architecture": {
109
+ "minLength": 1,
110
+ "type": "string"
111
+ },
112
+ "variant": {
113
+ "minLength": 1,
114
+ "type": "string"
115
+ }
116
+ }
117
+ },
118
+ "manifest": {
119
+ "additionalProperties": false,
120
+ "type": "object",
121
+ "required": ["sha256", "mediaType"],
122
+ "properties": {
123
+ "sha256": {
124
+ "pattern": "^[0-9a-f]{64}$",
125
+ "type": "string"
126
+ },
127
+ "mediaType": {
128
+ "anyOf": [
129
+ {
130
+ "const": "application/vnd.oci.image.manifest.v1+json",
131
+ "type": "string"
132
+ },
133
+ {
134
+ "const": "application/vnd.docker.distribution.manifest.v2+json",
135
+ "type": "string"
136
+ }
137
+ ]
138
+ }
139
+ }
140
+ },
141
+ "config": {
142
+ "additionalProperties": false,
143
+ "type": "object",
144
+ "required": ["sha256", "mediaType"],
145
+ "properties": {
146
+ "sha256": {
147
+ "pattern": "^[0-9a-f]{64}$",
148
+ "type": "string"
149
+ },
150
+ "mediaType": {
151
+ "anyOf": [
152
+ {
153
+ "const": "application/vnd.oci.image.config.v1+json",
154
+ "type": "string"
155
+ },
156
+ {
157
+ "const": "application/vnd.docker.container.image.v1+json",
158
+ "type": "string"
159
+ }
160
+ ]
161
+ }
162
+ }
163
+ }
164
+ }
165
+ },
166
+ "entrypoint": {
167
+ "minItems": 1,
168
+ "type": "array",
169
+ "items": {
170
+ "minLength": 1,
171
+ "type": "string"
172
+ }
173
+ }
174
+ }
175
+ },
176
+ "provenance": {
177
+ "additionalProperties": false,
178
+ "type": "object",
179
+ "required": [
180
+ "profile",
181
+ "schemaVersion",
182
+ "kind",
183
+ "artifact",
184
+ "source",
185
+ "build",
186
+ "transportArchiveSha256",
187
+ "observedAt",
188
+ "evidence"
189
+ ],
190
+ "properties": {
191
+ "profile": {
192
+ "const": "dsg.run.workload-artifact/1",
193
+ "type": "string"
194
+ },
195
+ "schemaVersion": {
196
+ "const": 1,
197
+ "type": "number"
198
+ },
199
+ "kind": {
200
+ "const": "workload-artifact-provenance",
201
+ "type": "string"
202
+ },
203
+ "artifact": {
204
+ "additionalProperties": false,
205
+ "type": "object",
206
+ "required": ["orn", "sha256"],
207
+ "properties": {
208
+ "orn": {
209
+ "pattern": "^orn:[a-z][a-z0-9-]*(?:\\.[a-z][a-z0-9-]*){3}:(?:[A-Za-z0-9\\-._~:/@]|%[0-9A-Fa-f]{2})+$",
210
+ "type": "string"
211
+ },
212
+ "sha256": {
213
+ "pattern": "^[0-9a-f]{64}$",
214
+ "type": "string"
215
+ }
216
+ }
217
+ },
218
+ "source": {
219
+ "additionalProperties": false,
220
+ "type": "object",
221
+ "required": ["repository", "revision", "sourceDigest"],
222
+ "properties": {
223
+ "repository": {
224
+ "minLength": 1,
225
+ "type": "string"
226
+ },
227
+ "revision": {
228
+ "pattern": "^(?:[0-9a-f]{40}|[0-9a-f]{64})$",
229
+ "type": "string"
230
+ },
231
+ "sourceDigest": {
232
+ "pattern": "^[0-9a-f]{64}$",
233
+ "type": "string"
234
+ }
235
+ }
236
+ },
237
+ "build": {
238
+ "additionalProperties": false,
239
+ "type": "object",
240
+ "required": ["orn", "sha256"],
241
+ "properties": {
242
+ "orn": {
243
+ "pattern": "^orn:[a-z][a-z0-9-]*(?:\\.[a-z][a-z0-9-]*){3}:(?:[A-Za-z0-9\\-._~:/@]|%[0-9A-Fa-f]{2})+$",
244
+ "type": "string"
245
+ },
246
+ "sha256": {
247
+ "pattern": "^[0-9a-f]{64}$",
248
+ "type": "string"
249
+ }
250
+ }
251
+ },
252
+ "transportArchiveSha256": {
253
+ "pattern": "^[0-9a-f]{64}$",
254
+ "type": "string"
255
+ },
256
+ "observedAt": {
257
+ "pattern": "^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}Z$",
258
+ "type": "string"
259
+ },
260
+ "evidence": {
261
+ "minItems": 1,
262
+ "uniqueItems": true,
263
+ "type": "array",
264
+ "items": {
265
+ "additionalProperties": false,
266
+ "type": "object",
267
+ "required": ["orn", "sha256"],
268
+ "properties": {
269
+ "orn": {
270
+ "pattern": "^orn:[a-z][a-z0-9-]*(?:\\.[a-z][a-z0-9-]*){3}:(?:[A-Za-z0-9\\-._~:/@]|%[0-9A-Fa-f]{2})+$",
271
+ "type": "string"
272
+ },
273
+ "sha256": {
274
+ "pattern": "^[0-9a-f]{64}$",
275
+ "type": "string"
276
+ }
277
+ }
278
+ }
279
+ }
280
+ }
281
+ }
282
+ },
283
+ "$ref": "#/$defs/workloadArtifact"
284
+ }