@dynamicalsystems/idl 0.7.0 → 0.8.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,345 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://github.com/DynamicalSystemsGroup/dsg-idl/schema/dsg-kernel-standing-order-activation-v1.json",
4
+ "title": "dsg.kernel.standing-order-activation/1",
5
+ "$defs": {
6
+ "activation": {
7
+ "additionalProperties": false,
8
+ "type": "object",
9
+ "required": [
10
+ "profile",
11
+ "activationId",
12
+ "expectedPreviousActivation",
13
+ "law",
14
+ "enrollment",
15
+ "intent",
16
+ "roots",
17
+ "revocation",
18
+ "actor",
19
+ "mode",
20
+ "activatedAt"
21
+ ],
22
+ "properties": {
23
+ "profile": {
24
+ "const": "dsg.kernel.standing-order-activation/1",
25
+ "type": "string"
26
+ },
27
+ "activationId": {
28
+ "pattern": "^orn:[a-z][a-z0-9-]*(?:\\.[a-z][a-z0-9-]*){3}:(?:[A-Za-z0-9\\-._~:/@]|%[0-9A-Fa-f]{2})+$",
29
+ "type": "string"
30
+ },
31
+ "expectedPreviousActivation": {
32
+ "anyOf": [
33
+ {
34
+ "additionalProperties": false,
35
+ "type": "object",
36
+ "required": ["orn", "sha256"],
37
+ "properties": {
38
+ "orn": {
39
+ "pattern": "^orn:[a-z][a-z0-9-]*(?:\\.[a-z][a-z0-9-]*){3}:(?:[A-Za-z0-9\\-._~:/@]|%[0-9A-Fa-f]{2})+$",
40
+ "type": "string"
41
+ },
42
+ "sha256": {
43
+ "pattern": "^[0-9a-f]{64}$",
44
+ "type": "string"
45
+ }
46
+ }
47
+ },
48
+ {
49
+ "type": "null"
50
+ }
51
+ ]
52
+ },
53
+ "law": {
54
+ "additionalProperties": false,
55
+ "type": "object",
56
+ "required": ["orn", "sha256"],
57
+ "properties": {
58
+ "orn": {
59
+ "pattern": "^orn:[a-z][a-z0-9-]*(?:\\.[a-z][a-z0-9-]*){3}:(?:[A-Za-z0-9\\-._~:/@]|%[0-9A-Fa-f]{2})+$",
60
+ "type": "string"
61
+ },
62
+ "sha256": {
63
+ "pattern": "^[0-9a-f]{64}$",
64
+ "type": "string"
65
+ }
66
+ }
67
+ },
68
+ "enrollment": {
69
+ "additionalProperties": false,
70
+ "type": "object",
71
+ "required": ["orn", "sha256"],
72
+ "properties": {
73
+ "orn": {
74
+ "pattern": "^orn:[a-z][a-z0-9-]*(?:\\.[a-z][a-z0-9-]*){3}:(?:[A-Za-z0-9\\-._~:/@]|%[0-9A-Fa-f]{2})+$",
75
+ "type": "string"
76
+ },
77
+ "sha256": {
78
+ "pattern": "^[0-9a-f]{64}$",
79
+ "type": "string"
80
+ }
81
+ }
82
+ },
83
+ "intent": {
84
+ "additionalProperties": false,
85
+ "type": "object",
86
+ "required": ["orn", "sha256"],
87
+ "properties": {
88
+ "orn": {
89
+ "pattern": "^orn:[a-z][a-z0-9-]*(?:\\.[a-z][a-z0-9-]*){3}:(?:[A-Za-z0-9\\-._~:/@]|%[0-9A-Fa-f]{2})+$",
90
+ "type": "string"
91
+ },
92
+ "sha256": {
93
+ "pattern": "^[0-9a-f]{64}$",
94
+ "type": "string"
95
+ }
96
+ }
97
+ },
98
+ "roots": {
99
+ "additionalProperties": false,
100
+ "type": "object",
101
+ "required": ["orn", "sha256"],
102
+ "properties": {
103
+ "orn": {
104
+ "pattern": "^orn:[a-z][a-z0-9-]*(?:\\.[a-z][a-z0-9-]*){3}:(?:[A-Za-z0-9\\-._~:/@]|%[0-9A-Fa-f]{2})+$",
105
+ "type": "string"
106
+ },
107
+ "sha256": {
108
+ "pattern": "^[0-9a-f]{64}$",
109
+ "type": "string"
110
+ }
111
+ }
112
+ },
113
+ "revocation": {
114
+ "additionalProperties": false,
115
+ "type": "object",
116
+ "required": ["orn", "sha256"],
117
+ "properties": {
118
+ "orn": {
119
+ "pattern": "^orn:[a-z][a-z0-9-]*(?:\\.[a-z][a-z0-9-]*){3}:(?:[A-Za-z0-9\\-._~:/@]|%[0-9A-Fa-f]{2})+$",
120
+ "type": "string"
121
+ },
122
+ "sha256": {
123
+ "pattern": "^[0-9a-f]{64}$",
124
+ "type": "string"
125
+ }
126
+ }
127
+ },
128
+ "actor": {
129
+ "pattern": "^orn:[a-z][a-z0-9-]*(?:\\.[a-z][a-z0-9-]*){3}:(?:[A-Za-z0-9\\-._~:/@]|%[0-9A-Fa-f]{2})+$",
130
+ "type": "string"
131
+ },
132
+ "mode": {
133
+ "anyOf": [
134
+ {
135
+ "const": "synthetic-test-only",
136
+ "type": "string"
137
+ },
138
+ {
139
+ "const": "human-authority",
140
+ "type": "string"
141
+ }
142
+ ]
143
+ },
144
+ "activatedAt": {
145
+ "pattern": "^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}Z$",
146
+ "type": "string"
147
+ }
148
+ }
149
+ },
150
+ "signed": {
151
+ "additionalProperties": false,
152
+ "type": "object",
153
+ "required": ["body", "signer", "signature"],
154
+ "properties": {
155
+ "body": {
156
+ "additionalProperties": false,
157
+ "type": "object",
158
+ "required": [
159
+ "profile",
160
+ "activationId",
161
+ "expectedPreviousActivation",
162
+ "law",
163
+ "enrollment",
164
+ "intent",
165
+ "roots",
166
+ "revocation",
167
+ "actor",
168
+ "mode",
169
+ "activatedAt"
170
+ ],
171
+ "properties": {
172
+ "profile": {
173
+ "const": "dsg.kernel.standing-order-activation/1",
174
+ "type": "string"
175
+ },
176
+ "activationId": {
177
+ "pattern": "^orn:[a-z][a-z0-9-]*(?:\\.[a-z][a-z0-9-]*){3}:(?:[A-Za-z0-9\\-._~:/@]|%[0-9A-Fa-f]{2})+$",
178
+ "type": "string"
179
+ },
180
+ "expectedPreviousActivation": {
181
+ "anyOf": [
182
+ {
183
+ "additionalProperties": false,
184
+ "type": "object",
185
+ "required": ["orn", "sha256"],
186
+ "properties": {
187
+ "orn": {
188
+ "pattern": "^orn:[a-z][a-z0-9-]*(?:\\.[a-z][a-z0-9-]*){3}:(?:[A-Za-z0-9\\-._~:/@]|%[0-9A-Fa-f]{2})+$",
189
+ "type": "string"
190
+ },
191
+ "sha256": {
192
+ "pattern": "^[0-9a-f]{64}$",
193
+ "type": "string"
194
+ }
195
+ }
196
+ },
197
+ {
198
+ "type": "null"
199
+ }
200
+ ]
201
+ },
202
+ "law": {
203
+ "additionalProperties": false,
204
+ "type": "object",
205
+ "required": ["orn", "sha256"],
206
+ "properties": {
207
+ "orn": {
208
+ "pattern": "^orn:[a-z][a-z0-9-]*(?:\\.[a-z][a-z0-9-]*){3}:(?:[A-Za-z0-9\\-._~:/@]|%[0-9A-Fa-f]{2})+$",
209
+ "type": "string"
210
+ },
211
+ "sha256": {
212
+ "pattern": "^[0-9a-f]{64}$",
213
+ "type": "string"
214
+ }
215
+ }
216
+ },
217
+ "enrollment": {
218
+ "additionalProperties": false,
219
+ "type": "object",
220
+ "required": ["orn", "sha256"],
221
+ "properties": {
222
+ "orn": {
223
+ "pattern": "^orn:[a-z][a-z0-9-]*(?:\\.[a-z][a-z0-9-]*){3}:(?:[A-Za-z0-9\\-._~:/@]|%[0-9A-Fa-f]{2})+$",
224
+ "type": "string"
225
+ },
226
+ "sha256": {
227
+ "pattern": "^[0-9a-f]{64}$",
228
+ "type": "string"
229
+ }
230
+ }
231
+ },
232
+ "intent": {
233
+ "additionalProperties": false,
234
+ "type": "object",
235
+ "required": ["orn", "sha256"],
236
+ "properties": {
237
+ "orn": {
238
+ "pattern": "^orn:[a-z][a-z0-9-]*(?:\\.[a-z][a-z0-9-]*){3}:(?:[A-Za-z0-9\\-._~:/@]|%[0-9A-Fa-f]{2})+$",
239
+ "type": "string"
240
+ },
241
+ "sha256": {
242
+ "pattern": "^[0-9a-f]{64}$",
243
+ "type": "string"
244
+ }
245
+ }
246
+ },
247
+ "roots": {
248
+ "additionalProperties": false,
249
+ "type": "object",
250
+ "required": ["orn", "sha256"],
251
+ "properties": {
252
+ "orn": {
253
+ "pattern": "^orn:[a-z][a-z0-9-]*(?:\\.[a-z][a-z0-9-]*){3}:(?:[A-Za-z0-9\\-._~:/@]|%[0-9A-Fa-f]{2})+$",
254
+ "type": "string"
255
+ },
256
+ "sha256": {
257
+ "pattern": "^[0-9a-f]{64}$",
258
+ "type": "string"
259
+ }
260
+ }
261
+ },
262
+ "revocation": {
263
+ "additionalProperties": false,
264
+ "type": "object",
265
+ "required": ["orn", "sha256"],
266
+ "properties": {
267
+ "orn": {
268
+ "pattern": "^orn:[a-z][a-z0-9-]*(?:\\.[a-z][a-z0-9-]*){3}:(?:[A-Za-z0-9\\-._~:/@]|%[0-9A-Fa-f]{2})+$",
269
+ "type": "string"
270
+ },
271
+ "sha256": {
272
+ "pattern": "^[0-9a-f]{64}$",
273
+ "type": "string"
274
+ }
275
+ }
276
+ },
277
+ "actor": {
278
+ "pattern": "^orn:[a-z][a-z0-9-]*(?:\\.[a-z][a-z0-9-]*){3}:(?:[A-Za-z0-9\\-._~:/@]|%[0-9A-Fa-f]{2})+$",
279
+ "type": "string"
280
+ },
281
+ "mode": {
282
+ "anyOf": [
283
+ {
284
+ "const": "synthetic-test-only",
285
+ "type": "string"
286
+ },
287
+ {
288
+ "const": "human-authority",
289
+ "type": "string"
290
+ }
291
+ ]
292
+ },
293
+ "activatedAt": {
294
+ "pattern": "^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}Z$",
295
+ "type": "string"
296
+ }
297
+ }
298
+ },
299
+ "signer": {
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
+ "signature": {
304
+ "pattern": "^[0-9a-f]{128}$",
305
+ "type": "string"
306
+ }
307
+ }
308
+ },
309
+ "event": {
310
+ "additionalProperties": false,
311
+ "type": "object",
312
+ "required": ["profile", "kind", "stream", "activation"],
313
+ "properties": {
314
+ "profile": {
315
+ "const": "dsg.kernel.standing-order-activation/1",
316
+ "type": "string"
317
+ },
318
+ "kind": {
319
+ "const": "standing_order_activated",
320
+ "type": "string"
321
+ },
322
+ "stream": {
323
+ "pattern": "^orn:[a-z][a-z0-9-]*(?:\\.[a-z][a-z0-9-]*){3}:(?:[A-Za-z0-9\\-._~:/@]|%[0-9A-Fa-f]{2})+$",
324
+ "type": "string"
325
+ },
326
+ "activation": {
327
+ "additionalProperties": false,
328
+ "type": "object",
329
+ "required": ["orn", "sha256"],
330
+ "properties": {
331
+ "orn": {
332
+ "pattern": "^orn:[a-z][a-z0-9-]*(?:\\.[a-z][a-z0-9-]*){3}:(?:[A-Za-z0-9\\-._~:/@]|%[0-9A-Fa-f]{2})+$",
333
+ "type": "string"
334
+ },
335
+ "sha256": {
336
+ "pattern": "^[0-9a-f]{64}$",
337
+ "type": "string"
338
+ }
339
+ }
340
+ }
341
+ }
342
+ }
343
+ },
344
+ "$ref": "#/$defs/event"
345
+ }
@@ -0,0 +1,71 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://github.com/DynamicalSystemsGroup/dsg-idl/schema/dsg-run-decision-v1.json",
4
+ "title": "dsg.run.decision/1",
5
+ "$defs": {
6
+ "decision": {
7
+ "additionalProperties": false,
8
+ "type": "object",
9
+ "required": [
10
+ "profile",
11
+ "runId",
12
+ "requestDigest",
13
+ "decision",
14
+ "cause",
15
+ "decidedAt",
16
+ "decider",
17
+ "signature"
18
+ ],
19
+ "properties": {
20
+ "profile": {
21
+ "const": "dsg.run.decision/1",
22
+ "type": "string"
23
+ },
24
+ "runId": {
25
+ "minLength": 1,
26
+ "type": "string"
27
+ },
28
+ "requestDigest": {
29
+ "pattern": "^[0-9a-f]{64}$",
30
+ "type": "string"
31
+ },
32
+ "decision": {
33
+ "anyOf": [
34
+ {
35
+ "const": "approved",
36
+ "type": "string"
37
+ },
38
+ {
39
+ "const": "refused",
40
+ "type": "string"
41
+ }
42
+ ]
43
+ },
44
+ "cause": {
45
+ "anyOf": [
46
+ {
47
+ "minLength": 1,
48
+ "type": "string"
49
+ },
50
+ {
51
+ "type": "null"
52
+ }
53
+ ]
54
+ },
55
+ "decidedAt": {
56
+ "pattern": "^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}Z$",
57
+ "type": "string"
58
+ },
59
+ "decider": {
60
+ "pattern": "^orn:[a-z][a-z0-9-]*(?:\\.[a-z][a-z0-9-]*){3}:(?:[A-Za-z0-9\\-._~:/@]|%[0-9A-Fa-f]{2})+$",
61
+ "type": "string"
62
+ },
63
+ "signature": {
64
+ "minLength": 1,
65
+ "type": "string"
66
+ }
67
+ }
68
+ }
69
+ },
70
+ "$ref": "#/$defs/decision"
71
+ }
@@ -0,0 +1,101 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://github.com/DynamicalSystemsGroup/dsg-idl/schema/dsg-run-event-v1.json",
4
+ "title": "dsg.run.event/1",
5
+ "$defs": {
6
+ "event": {
7
+ "additionalProperties": false,
8
+ "type": "object",
9
+ "required": ["profile", "operation", "sequence", "at", "kind", "catalogSha256", "payload"],
10
+ "properties": {
11
+ "profile": {
12
+ "const": "dsg.run.event/1",
13
+ "type": "string"
14
+ },
15
+ "operation": {
16
+ "minLength": 1,
17
+ "type": "string"
18
+ },
19
+ "sequence": {
20
+ "minimum": 1,
21
+ "maximum": 9007199254740991,
22
+ "type": "integer"
23
+ },
24
+ "at": {
25
+ "pattern": "^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}Z$",
26
+ "type": "string"
27
+ },
28
+ "kind": {
29
+ "minLength": 1,
30
+ "type": "string"
31
+ },
32
+ "catalogSha256": {
33
+ "pattern": "^[0-9a-f]{64}$",
34
+ "type": "string"
35
+ },
36
+ "payload": {
37
+ "type": "object",
38
+ "patternProperties": {
39
+ "^(.*)$": {}
40
+ }
41
+ }
42
+ }
43
+ },
44
+ "streamSeal": {
45
+ "additionalProperties": false,
46
+ "type": "object",
47
+ "required": [
48
+ "profile",
49
+ "operation",
50
+ "catalogSha256",
51
+ "streamSha256",
52
+ "eventCount",
53
+ "gaps",
54
+ "truncatedAtSequence"
55
+ ],
56
+ "properties": {
57
+ "profile": {
58
+ "const": "dsg.run.event/1",
59
+ "type": "string"
60
+ },
61
+ "operation": {
62
+ "minLength": 1,
63
+ "type": "string"
64
+ },
65
+ "catalogSha256": {
66
+ "pattern": "^[0-9a-f]{64}$",
67
+ "type": "string"
68
+ },
69
+ "streamSha256": {
70
+ "pattern": "^[0-9a-f]{64}$",
71
+ "type": "string"
72
+ },
73
+ "eventCount": {
74
+ "minimum": 0,
75
+ "maximum": 9007199254740991,
76
+ "type": "integer"
77
+ },
78
+ "gaps": {
79
+ "type": "array",
80
+ "items": {
81
+ "minimum": 1,
82
+ "maximum": 9007199254740991,
83
+ "type": "integer"
84
+ }
85
+ },
86
+ "truncatedAtSequence": {
87
+ "anyOf": [
88
+ {
89
+ "minimum": 1,
90
+ "type": "integer"
91
+ },
92
+ {
93
+ "type": "null"
94
+ }
95
+ ]
96
+ }
97
+ }
98
+ }
99
+ },
100
+ "$ref": "#/$defs/event"
101
+ }
@@ -0,0 +1,107 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://github.com/DynamicalSystemsGroup/dsg-idl/schema/dsg-run-request-v1.json",
4
+ "title": "dsg.run.request/1",
5
+ "$defs": {
6
+ "request": {
7
+ "additionalProperties": false,
8
+ "type": "object",
9
+ "required": ["profile", "experiment", "workload", "inputs", "ceilings", "purpose", "window"],
10
+ "properties": {
11
+ "profile": {
12
+ "const": "dsg.run.request/1",
13
+ "type": "string"
14
+ },
15
+ "experiment": {
16
+ "additionalProperties": false,
17
+ "type": "object",
18
+ "required": ["digest", "title", "workloadClass"],
19
+ "properties": {
20
+ "digest": {
21
+ "pattern": "^[0-9a-f]{64}$",
22
+ "type": "string"
23
+ },
24
+ "title": {
25
+ "minLength": 1,
26
+ "type": "string"
27
+ },
28
+ "workloadClass": {
29
+ "minLength": 1,
30
+ "type": "string"
31
+ }
32
+ }
33
+ },
34
+ "workload": {
35
+ "additionalProperties": false,
36
+ "type": "object",
37
+ "required": ["orn", "sha256"],
38
+ "properties": {
39
+ "orn": {
40
+ "pattern": "^orn:[a-z][a-z0-9-]*(?:\\.[a-z][a-z0-9-]*){3}:(?:[A-Za-z0-9\\-._~:/@]|%[0-9A-Fa-f]{2})+$",
41
+ "type": "string"
42
+ },
43
+ "sha256": {
44
+ "pattern": "^[0-9a-f]{64}$",
45
+ "type": "string"
46
+ }
47
+ }
48
+ },
49
+ "inputs": {
50
+ "minItems": 1,
51
+ "type": "array",
52
+ "items": {
53
+ "additionalProperties": false,
54
+ "type": "object",
55
+ "required": ["orn", "sha256"],
56
+ "properties": {
57
+ "orn": {
58
+ "pattern": "^orn:[a-z][a-z0-9-]*(?:\\.[a-z][a-z0-9-]*){3}:(?:[A-Za-z0-9\\-._~:/@]|%[0-9A-Fa-f]{2})+$",
59
+ "type": "string"
60
+ },
61
+ "sha256": {
62
+ "pattern": "^[0-9a-f]{64}$",
63
+ "type": "string"
64
+ }
65
+ }
66
+ }
67
+ },
68
+ "ceilings": {
69
+ "additionalProperties": false,
70
+ "type": "object",
71
+ "required": ["maxRunSeconds", "maxGpuSeconds", "maxParallelism", "costBoundMicroUsd"],
72
+ "properties": {
73
+ "maxRunSeconds": {
74
+ "minimum": 0,
75
+ "maximum": 9007199254740991,
76
+ "type": "integer"
77
+ },
78
+ "maxGpuSeconds": {
79
+ "minimum": 0,
80
+ "maximum": 9007199254740991,
81
+ "type": "integer"
82
+ },
83
+ "maxParallelism": {
84
+ "minimum": 0,
85
+ "maximum": 9007199254740991,
86
+ "type": "integer"
87
+ },
88
+ "costBoundMicroUsd": {
89
+ "minimum": 0,
90
+ "maximum": 9007199254740991,
91
+ "type": "integer"
92
+ }
93
+ }
94
+ },
95
+ "purpose": {
96
+ "minLength": 1,
97
+ "type": "string"
98
+ },
99
+ "window": {
100
+ "minLength": 1,
101
+ "type": "string"
102
+ }
103
+ }
104
+ }
105
+ },
106
+ "$ref": "#/$defs/request"
107
+ }