@dynamicalsystems/idl 0.6.1

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,207 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://github.com/DynamicalSystemsGroup/dsg-idl/schema/dsg-registry-revocations-v1.json",
4
+ "title": "dsg.registry.revocations/1",
5
+ "$defs": {
6
+ "snapshot": {
7
+ "additionalProperties": false,
8
+ "type": "object",
9
+ "required": [
10
+ "domain",
11
+ "version",
12
+ "issuedAt",
13
+ "expiresAt",
14
+ "previousSha256",
15
+ "testOnly",
16
+ "signerKey",
17
+ "revoked",
18
+ "trustHistory"
19
+ ],
20
+ "properties": {
21
+ "domain": {
22
+ "const": "dsg.registry.revocations/1",
23
+ "type": "string"
24
+ },
25
+ "version": {
26
+ "minimum": 1,
27
+ "maximum": 9007199254740991,
28
+ "type": "integer"
29
+ },
30
+ "issuedAt": {
31
+ "minimum": 0,
32
+ "maximum": 9007199254740991,
33
+ "type": "integer"
34
+ },
35
+ "expiresAt": {
36
+ "minimum": 0,
37
+ "maximum": 9007199254740991,
38
+ "type": "integer"
39
+ },
40
+ "previousSha256": {
41
+ "anyOf": [
42
+ {
43
+ "pattern": "^[0-9a-f]{64}$",
44
+ "type": "string"
45
+ },
46
+ {
47
+ "type": "null"
48
+ }
49
+ ]
50
+ },
51
+ "testOnly": {
52
+ "const": true,
53
+ "type": "boolean"
54
+ },
55
+ "signerKey": {
56
+ "pattern": "^[0-9a-f]{64}$",
57
+ "type": "string"
58
+ },
59
+ "revoked": {
60
+ "type": "array",
61
+ "items": {
62
+ "additionalProperties": false,
63
+ "type": "object",
64
+ "required": ["kind", "id", "effectiveAt", "reason"],
65
+ "properties": {
66
+ "kind": {
67
+ "anyOf": [
68
+ {
69
+ "const": "principal",
70
+ "type": "string"
71
+ },
72
+ {
73
+ "const": "standing-order",
74
+ "type": "string"
75
+ },
76
+ {
77
+ "const": "law",
78
+ "type": "string"
79
+ },
80
+ {
81
+ "const": "class",
82
+ "type": "string"
83
+ },
84
+ {
85
+ "const": "key",
86
+ "type": "string"
87
+ }
88
+ ]
89
+ },
90
+ "id": {
91
+ "minLength": 1,
92
+ "type": "string"
93
+ },
94
+ "effectiveAt": {
95
+ "minimum": 0,
96
+ "maximum": 9007199254740991,
97
+ "type": "integer"
98
+ },
99
+ "reason": {
100
+ "minLength": 1,
101
+ "type": "string"
102
+ }
103
+ }
104
+ }
105
+ },
106
+ "trustHistory": {
107
+ "type": "array",
108
+ "items": {
109
+ "additionalProperties": false,
110
+ "type": "object",
111
+ "required": [
112
+ "principal",
113
+ "publicKey",
114
+ "role",
115
+ "action",
116
+ "effectiveAt",
117
+ "authoritySha256",
118
+ "replacesKey"
119
+ ],
120
+ "properties": {
121
+ "principal": {
122
+ "minLength": 1,
123
+ "type": "string"
124
+ },
125
+ "publicKey": {
126
+ "pattern": "^[0-9a-f]{64}$",
127
+ "type": "string"
128
+ },
129
+ "role": {
130
+ "anyOf": [
131
+ {
132
+ "const": "human",
133
+ "type": "string"
134
+ },
135
+ {
136
+ "const": "release",
137
+ "type": "string"
138
+ },
139
+ {
140
+ "const": "collector",
141
+ "type": "string"
142
+ }
143
+ ]
144
+ },
145
+ "action": {
146
+ "anyOf": [
147
+ {
148
+ "const": "enroll",
149
+ "type": "string"
150
+ },
151
+ {
152
+ "const": "rotate",
153
+ "type": "string"
154
+ },
155
+ {
156
+ "const": "compromise",
157
+ "type": "string"
158
+ }
159
+ ]
160
+ },
161
+ "effectiveAt": {
162
+ "minimum": 0,
163
+ "maximum": 9007199254740991,
164
+ "type": "integer"
165
+ },
166
+ "authoritySha256": {
167
+ "pattern": "^[0-9a-f]{64}$",
168
+ "type": "string"
169
+ },
170
+ "replacesKey": {
171
+ "anyOf": [
172
+ {
173
+ "pattern": "^[0-9a-f]{64}$",
174
+ "type": "string"
175
+ },
176
+ {
177
+ "type": "null"
178
+ }
179
+ ]
180
+ }
181
+ }
182
+ }
183
+ }
184
+ }
185
+ },
186
+ "pointer": {
187
+ "additionalProperties": false,
188
+ "type": "object",
189
+ "required": ["version", "sha256", "url"],
190
+ "properties": {
191
+ "version": {
192
+ "minimum": 1,
193
+ "maximum": 9007199254740991,
194
+ "type": "integer"
195
+ },
196
+ "sha256": {
197
+ "pattern": "^[0-9a-f]{64}$",
198
+ "type": "string"
199
+ },
200
+ "url": {
201
+ "pattern": "^/revocations/v/[1-9][0-9]*/snapshot\\.json$",
202
+ "type": "string"
203
+ }
204
+ }
205
+ }
206
+ }
207
+ }
@@ -0,0 +1,471 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://github.com/DynamicalSystemsGroup/dsg-idl/schema/dsg-run-operation-v1.json",
4
+ "title": "dsg.run.operation/1",
5
+ "$defs": {
6
+ "request": {
7
+ "additionalProperties": false,
8
+ "type": "object",
9
+ "required": [
10
+ "profile",
11
+ "operationId",
12
+ "case",
13
+ "workspace",
14
+ "expectedGeneration",
15
+ "before",
16
+ "planDigest",
17
+ "document",
18
+ "authority",
19
+ "reservation"
20
+ ],
21
+ "properties": {
22
+ "profile": {
23
+ "const": "dsg.run.operation/1",
24
+ "type": "string"
25
+ },
26
+ "operationId": {
27
+ "minLength": 1,
28
+ "type": "string"
29
+ },
30
+ "case": {
31
+ "additionalProperties": false,
32
+ "type": "object",
33
+ "required": ["orn", "sha256"],
34
+ "properties": {
35
+ "orn": {
36
+ "pattern": "^orn:[a-z][a-z0-9-]*(?:\\.[a-z][a-z0-9-]*){3}:(?:[A-Za-z0-9\\-._~:/@]|%[0-9A-Fa-f]{2})+$",
37
+ "type": "string"
38
+ },
39
+ "sha256": {
40
+ "pattern": "^[0-9a-f]{64}$",
41
+ "type": "string"
42
+ }
43
+ }
44
+ },
45
+ "workspace": {
46
+ "minLength": 1,
47
+ "type": "string"
48
+ },
49
+ "expectedGeneration": {
50
+ "minimum": 0,
51
+ "maximum": 9007199254740991,
52
+ "type": "integer"
53
+ },
54
+ "before": {
55
+ "additionalProperties": false,
56
+ "type": "object",
57
+ "required": ["operationId", "planDigest"],
58
+ "properties": {
59
+ "operationId": {
60
+ "anyOf": [
61
+ {
62
+ "minLength": 1,
63
+ "type": "string"
64
+ },
65
+ {
66
+ "type": "null"
67
+ }
68
+ ]
69
+ },
70
+ "planDigest": {
71
+ "anyOf": [
72
+ {
73
+ "pattern": "^[0-9a-f]{64}$",
74
+ "type": "string"
75
+ },
76
+ {
77
+ "type": "null"
78
+ }
79
+ ]
80
+ }
81
+ }
82
+ },
83
+ "planDigest": {
84
+ "pattern": "^[0-9a-f]{64}$",
85
+ "type": "string"
86
+ },
87
+ "document": {
88
+ "additionalProperties": false,
89
+ "type": "object",
90
+ "required": [
91
+ "schemaVersion",
92
+ "classContract",
93
+ "law",
94
+ "workload",
95
+ "inputs",
96
+ "resources",
97
+ "costBound",
98
+ "placement",
99
+ "results",
100
+ "secrets"
101
+ ],
102
+ "properties": {
103
+ "schemaVersion": {
104
+ "const": 1,
105
+ "type": "number"
106
+ },
107
+ "classContract": {
108
+ "additionalProperties": false,
109
+ "type": "object",
110
+ "required": ["orn", "sha256"],
111
+ "properties": {
112
+ "orn": {
113
+ "pattern": "^orn:[a-z][a-z0-9-]*(?:\\.[a-z][a-z0-9-]*){3}:(?:[A-Za-z0-9\\-._~:/@]|%[0-9A-Fa-f]{2})+$",
114
+ "type": "string"
115
+ },
116
+ "sha256": {
117
+ "pattern": "^[0-9a-f]{64}$",
118
+ "type": "string"
119
+ }
120
+ }
121
+ },
122
+ "law": {
123
+ "additionalProperties": false,
124
+ "type": "object",
125
+ "required": ["bundle", "registryRelease"],
126
+ "properties": {
127
+ "bundle": {
128
+ "additionalProperties": false,
129
+ "type": "object",
130
+ "required": ["orn", "sha256"],
131
+ "properties": {
132
+ "orn": {
133
+ "pattern": "^orn:[a-z][a-z0-9-]*(?:\\.[a-z][a-z0-9-]*){3}:(?:[A-Za-z0-9\\-._~:/@]|%[0-9A-Fa-f]{2})+$",
134
+ "type": "string"
135
+ },
136
+ "sha256": {
137
+ "pattern": "^[0-9a-f]{64}$",
138
+ "type": "string"
139
+ }
140
+ }
141
+ },
142
+ "registryRelease": {
143
+ "additionalProperties": false,
144
+ "type": "object",
145
+ "required": ["orn", "sha256"],
146
+ "properties": {
147
+ "orn": {
148
+ "pattern": "^orn:[a-z][a-z0-9-]*(?:\\.[a-z][a-z0-9-]*){3}:(?:[A-Za-z0-9\\-._~:/@]|%[0-9A-Fa-f]{2})+$",
149
+ "type": "string"
150
+ },
151
+ "sha256": {
152
+ "pattern": "^[0-9a-f]{64}$",
153
+ "type": "string"
154
+ }
155
+ }
156
+ }
157
+ }
158
+ },
159
+ "workload": {
160
+ "additionalProperties": false,
161
+ "type": "object",
162
+ "required": ["orn", "sha256"],
163
+ "properties": {
164
+ "orn": {
165
+ "pattern": "^orn:[a-z][a-z0-9-]*(?:\\.[a-z][a-z0-9-]*){3}:(?:[A-Za-z0-9\\-._~:/@]|%[0-9A-Fa-f]{2})+$",
166
+ "type": "string"
167
+ },
168
+ "sha256": {
169
+ "pattern": "^[0-9a-f]{64}$",
170
+ "type": "string"
171
+ }
172
+ }
173
+ },
174
+ "inputs": {
175
+ "type": "array",
176
+ "items": {
177
+ "additionalProperties": false,
178
+ "type": "object",
179
+ "required": ["orn", "sha256"],
180
+ "properties": {
181
+ "orn": {
182
+ "pattern": "^orn:[a-z][a-z0-9-]*(?:\\.[a-z][a-z0-9-]*){3}:(?:[A-Za-z0-9\\-._~:/@]|%[0-9A-Fa-f]{2})+$",
183
+ "type": "string"
184
+ },
185
+ "sha256": {
186
+ "pattern": "^[0-9a-f]{64}$",
187
+ "type": "string"
188
+ }
189
+ }
190
+ }
191
+ },
192
+ "resources": {
193
+ "additionalProperties": false,
194
+ "type": "object",
195
+ "required": ["maxGpuSeconds", "maxRunSeconds", "maxParallelism"],
196
+ "properties": {
197
+ "maxGpuSeconds": {
198
+ "minimum": 0,
199
+ "maximum": 9007199254740991,
200
+ "type": "integer"
201
+ },
202
+ "maxRunSeconds": {
203
+ "minimum": 0,
204
+ "maximum": 9007199254740991,
205
+ "type": "integer"
206
+ },
207
+ "maxParallelism": {
208
+ "minimum": 0,
209
+ "maximum": 9007199254740991,
210
+ "type": "integer"
211
+ }
212
+ }
213
+ },
214
+ "costBound": {
215
+ "additionalProperties": false,
216
+ "type": "object",
217
+ "required": ["orn", "sha256"],
218
+ "properties": {
219
+ "orn": {
220
+ "pattern": "^orn:[a-z][a-z0-9-]*(?:\\.[a-z][a-z0-9-]*){3}:(?:[A-Za-z0-9\\-._~:/@]|%[0-9A-Fa-f]{2})+$",
221
+ "type": "string"
222
+ },
223
+ "sha256": {
224
+ "pattern": "^[0-9a-f]{64}$",
225
+ "type": "string"
226
+ }
227
+ }
228
+ },
229
+ "placement": {
230
+ "additionalProperties": false,
231
+ "type": "object",
232
+ "required": ["orn", "sha256"],
233
+ "properties": {
234
+ "orn": {
235
+ "pattern": "^orn:[a-z][a-z0-9-]*(?:\\.[a-z][a-z0-9-]*){3}:(?:[A-Za-z0-9\\-._~:/@]|%[0-9A-Fa-f]{2})+$",
236
+ "type": "string"
237
+ },
238
+ "sha256": {
239
+ "pattern": "^[0-9a-f]{64}$",
240
+ "type": "string"
241
+ }
242
+ }
243
+ },
244
+ "results": {
245
+ "additionalProperties": false,
246
+ "type": "object",
247
+ "required": ["orn", "sha256"],
248
+ "properties": {
249
+ "orn": {
250
+ "pattern": "^orn:[a-z][a-z0-9-]*(?:\\.[a-z][a-z0-9-]*){3}:(?:[A-Za-z0-9\\-._~:/@]|%[0-9A-Fa-f]{2})+$",
251
+ "type": "string"
252
+ },
253
+ "sha256": {
254
+ "pattern": "^[0-9a-f]{64}$",
255
+ "type": "string"
256
+ }
257
+ }
258
+ },
259
+ "secrets": {
260
+ "type": "array",
261
+ "items": {
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
+ }
277
+ }
278
+ },
279
+ "authority": {
280
+ "additionalProperties": false,
281
+ "type": "object",
282
+ "required": ["orn", "sha256"],
283
+ "properties": {
284
+ "orn": {
285
+ "pattern": "^orn:[a-z][a-z0-9-]*(?:\\.[a-z][a-z0-9-]*){3}:(?:[A-Za-z0-9\\-._~:/@]|%[0-9A-Fa-f]{2})+$",
286
+ "type": "string"
287
+ },
288
+ "sha256": {
289
+ "pattern": "^[0-9a-f]{64}$",
290
+ "type": "string"
291
+ }
292
+ }
293
+ },
294
+ "reservation": {
295
+ "additionalProperties": false,
296
+ "type": "object",
297
+ "required": ["orn", "sha256"],
298
+ "properties": {
299
+ "orn": {
300
+ "pattern": "^orn:[a-z][a-z0-9-]*(?:\\.[a-z][a-z0-9-]*){3}:(?:[A-Za-z0-9\\-._~:/@]|%[0-9A-Fa-f]{2})+$",
301
+ "type": "string"
302
+ },
303
+ "sha256": {
304
+ "pattern": "^[0-9a-f]{64}$",
305
+ "type": "string"
306
+ }
307
+ }
308
+ }
309
+ }
310
+ },
311
+ "accepted": {
312
+ "additionalProperties": false,
313
+ "type": "object",
314
+ "required": ["profile", "operationId", "actionId", "generation", "planDigest", "acceptedAt"],
315
+ "properties": {
316
+ "profile": {
317
+ "const": "dsg.run.operation/1",
318
+ "type": "string"
319
+ },
320
+ "operationId": {
321
+ "minLength": 1,
322
+ "type": "string"
323
+ },
324
+ "actionId": {
325
+ "minLength": 1,
326
+ "type": "string"
327
+ },
328
+ "generation": {
329
+ "minimum": 0,
330
+ "maximum": 9007199254740991,
331
+ "type": "integer"
332
+ },
333
+ "planDigest": {
334
+ "pattern": "^[0-9a-f]{64}$",
335
+ "type": "string"
336
+ },
337
+ "acceptedAt": {
338
+ "minLength": 1,
339
+ "type": "string"
340
+ }
341
+ }
342
+ },
343
+ "readback": {
344
+ "additionalProperties": false,
345
+ "type": "object",
346
+ "required": [
347
+ "operationId",
348
+ "generation",
349
+ "planDigest",
350
+ "execution",
351
+ "cleanup",
352
+ "evidence",
353
+ "evidenceRef",
354
+ "cost"
355
+ ],
356
+ "properties": {
357
+ "operationId": {
358
+ "minLength": 1,
359
+ "type": "string"
360
+ },
361
+ "generation": {
362
+ "minimum": 0,
363
+ "maximum": 9007199254740991,
364
+ "type": "integer"
365
+ },
366
+ "planDigest": {
367
+ "pattern": "^[0-9a-f]{64}$",
368
+ "type": "string"
369
+ },
370
+ "execution": {
371
+ "anyOf": [
372
+ {
373
+ "const": "queued",
374
+ "type": "string"
375
+ },
376
+ {
377
+ "const": "running",
378
+ "type": "string"
379
+ },
380
+ {
381
+ "const": "succeeded",
382
+ "type": "string"
383
+ },
384
+ {
385
+ "const": "failed",
386
+ "type": "string"
387
+ },
388
+ {
389
+ "const": "canceled",
390
+ "type": "string"
391
+ },
392
+ {
393
+ "const": "unknown",
394
+ "type": "string"
395
+ }
396
+ ]
397
+ },
398
+ "cleanup": {
399
+ "anyOf": [
400
+ {
401
+ "const": "pending",
402
+ "type": "string"
403
+ },
404
+ {
405
+ "const": "present",
406
+ "type": "string"
407
+ },
408
+ {
409
+ "const": "absent",
410
+ "type": "string"
411
+ },
412
+ {
413
+ "const": "unknown",
414
+ "type": "string"
415
+ }
416
+ ]
417
+ },
418
+ "evidence": {
419
+ "anyOf": [
420
+ {
421
+ "const": "pending",
422
+ "type": "string"
423
+ },
424
+ {
425
+ "const": "ready",
426
+ "type": "string"
427
+ }
428
+ ]
429
+ },
430
+ "evidenceRef": {
431
+ "anyOf": [
432
+ {
433
+ "additionalProperties": false,
434
+ "type": "object",
435
+ "required": ["orn", "sha256"],
436
+ "properties": {
437
+ "orn": {
438
+ "pattern": "^orn:[a-z][a-z0-9-]*(?:\\.[a-z][a-z0-9-]*){3}:(?:[A-Za-z0-9\\-._~:/@]|%[0-9A-Fa-f]{2})+$",
439
+ "type": "string"
440
+ },
441
+ "sha256": {
442
+ "pattern": "^[0-9a-f]{64}$",
443
+ "type": "string"
444
+ }
445
+ }
446
+ },
447
+ {
448
+ "type": "null"
449
+ }
450
+ ]
451
+ },
452
+ "cost": {
453
+ "anyOf": [
454
+ {
455
+ "const": "reserved",
456
+ "type": "string"
457
+ },
458
+ {
459
+ "const": "provisional",
460
+ "type": "string"
461
+ },
462
+ {
463
+ "const": "reconciled",
464
+ "type": "string"
465
+ }
466
+ ]
467
+ }
468
+ }
469
+ }
470
+ }
471
+ }