@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,278 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://github.com/DynamicalSystemsGroup/dsg-idl/schema/dsg-kernel-bootstrap-v1.json",
4
+ "title": "dsg.kernel.bootstrap/1",
5
+ "$defs": {
6
+ "intent": {
7
+ "additionalProperties": false,
8
+ "type": "object",
9
+ "required": [
10
+ "version",
11
+ "operation",
12
+ "action",
13
+ "lineage",
14
+ "humanRoot",
15
+ "signer",
16
+ "scope",
17
+ "resources",
18
+ "planSha256",
19
+ "preconditionsSha256",
20
+ "createdAt",
21
+ "expiresAt",
22
+ "maxUses",
23
+ "cost",
24
+ "testOnly"
25
+ ],
26
+ "properties": {
27
+ "version": {
28
+ "const": "dsg.kernel.bootstrap/1",
29
+ "type": "string"
30
+ },
31
+ "operation": {
32
+ "minLength": 1,
33
+ "type": "string"
34
+ },
35
+ "action": {
36
+ "anyOf": [
37
+ {
38
+ "const": "initialize_kernel_record",
39
+ "type": "string"
40
+ },
41
+ {
42
+ "const": "restore_kernel_record",
43
+ "type": "string"
44
+ },
45
+ {
46
+ "const": "cutover_single_writer",
47
+ "type": "string"
48
+ },
49
+ {
50
+ "const": "enroll_human_root",
51
+ "type": "string"
52
+ }
53
+ ]
54
+ },
55
+ "lineage": {
56
+ "minLength": 1,
57
+ "type": "string"
58
+ },
59
+ "humanRoot": {
60
+ "minLength": 1,
61
+ "type": "string"
62
+ },
63
+ "signer": {
64
+ "pattern": "^orn:[a-z][a-z0-9-]*(?:\\.[a-z][a-z0-9-]*){3}:(?:[A-Za-z0-9\\-._~:/@]|%[0-9A-Fa-f]{2})+$",
65
+ "type": "string"
66
+ },
67
+ "scope": {
68
+ "minLength": 1,
69
+ "type": "string"
70
+ },
71
+ "resources": {
72
+ "minItems": 1,
73
+ "uniqueItems": true,
74
+ "type": "array",
75
+ "items": {
76
+ "additionalProperties": false,
77
+ "type": "object",
78
+ "required": ["identity", "specSha256"],
79
+ "properties": {
80
+ "identity": {
81
+ "minLength": 1,
82
+ "type": "string"
83
+ },
84
+ "specSha256": {
85
+ "pattern": "^[0-9a-f]{64}$",
86
+ "type": "string"
87
+ }
88
+ }
89
+ }
90
+ },
91
+ "planSha256": {
92
+ "pattern": "^[0-9a-f]{64}$",
93
+ "type": "string"
94
+ },
95
+ "preconditionsSha256": {
96
+ "pattern": "^[0-9a-f]{64}$",
97
+ "type": "string"
98
+ },
99
+ "createdAt": {
100
+ "minLength": 1,
101
+ "type": "string"
102
+ },
103
+ "expiresAt": {
104
+ "minLength": 1,
105
+ "type": "string"
106
+ },
107
+ "maxUses": {
108
+ "const": 1,
109
+ "type": "number"
110
+ },
111
+ "cost": {
112
+ "additionalProperties": false,
113
+ "type": "object",
114
+ "required": ["currency", "maxMicroUsd", "assumptionsSha256"],
115
+ "properties": {
116
+ "currency": {
117
+ "const": "USD",
118
+ "type": "string"
119
+ },
120
+ "maxMicroUsd": {
121
+ "minimum": 0,
122
+ "maximum": 9007199254740991,
123
+ "type": "integer"
124
+ },
125
+ "assumptionsSha256": {
126
+ "pattern": "^[0-9a-f]{64}$",
127
+ "type": "string"
128
+ }
129
+ }
130
+ },
131
+ "testOnly": {
132
+ "type": "boolean"
133
+ }
134
+ }
135
+ },
136
+ "signed": {
137
+ "additionalProperties": false,
138
+ "type": "object",
139
+ "required": ["body", "signature"],
140
+ "properties": {
141
+ "body": {
142
+ "additionalProperties": false,
143
+ "type": "object",
144
+ "required": [
145
+ "version",
146
+ "operation",
147
+ "action",
148
+ "lineage",
149
+ "humanRoot",
150
+ "signer",
151
+ "scope",
152
+ "resources",
153
+ "planSha256",
154
+ "preconditionsSha256",
155
+ "createdAt",
156
+ "expiresAt",
157
+ "maxUses",
158
+ "cost",
159
+ "testOnly"
160
+ ],
161
+ "properties": {
162
+ "version": {
163
+ "const": "dsg.kernel.bootstrap/1",
164
+ "type": "string"
165
+ },
166
+ "operation": {
167
+ "minLength": 1,
168
+ "type": "string"
169
+ },
170
+ "action": {
171
+ "anyOf": [
172
+ {
173
+ "const": "initialize_kernel_record",
174
+ "type": "string"
175
+ },
176
+ {
177
+ "const": "restore_kernel_record",
178
+ "type": "string"
179
+ },
180
+ {
181
+ "const": "cutover_single_writer",
182
+ "type": "string"
183
+ },
184
+ {
185
+ "const": "enroll_human_root",
186
+ "type": "string"
187
+ }
188
+ ]
189
+ },
190
+ "lineage": {
191
+ "minLength": 1,
192
+ "type": "string"
193
+ },
194
+ "humanRoot": {
195
+ "minLength": 1,
196
+ "type": "string"
197
+ },
198
+ "signer": {
199
+ "pattern": "^orn:[a-z][a-z0-9-]*(?:\\.[a-z][a-z0-9-]*){3}:(?:[A-Za-z0-9\\-._~:/@]|%[0-9A-Fa-f]{2})+$",
200
+ "type": "string"
201
+ },
202
+ "scope": {
203
+ "minLength": 1,
204
+ "type": "string"
205
+ },
206
+ "resources": {
207
+ "minItems": 1,
208
+ "uniqueItems": true,
209
+ "type": "array",
210
+ "items": {
211
+ "additionalProperties": false,
212
+ "type": "object",
213
+ "required": ["identity", "specSha256"],
214
+ "properties": {
215
+ "identity": {
216
+ "minLength": 1,
217
+ "type": "string"
218
+ },
219
+ "specSha256": {
220
+ "pattern": "^[0-9a-f]{64}$",
221
+ "type": "string"
222
+ }
223
+ }
224
+ }
225
+ },
226
+ "planSha256": {
227
+ "pattern": "^[0-9a-f]{64}$",
228
+ "type": "string"
229
+ },
230
+ "preconditionsSha256": {
231
+ "pattern": "^[0-9a-f]{64}$",
232
+ "type": "string"
233
+ },
234
+ "createdAt": {
235
+ "minLength": 1,
236
+ "type": "string"
237
+ },
238
+ "expiresAt": {
239
+ "minLength": 1,
240
+ "type": "string"
241
+ },
242
+ "maxUses": {
243
+ "const": 1,
244
+ "type": "number"
245
+ },
246
+ "cost": {
247
+ "additionalProperties": false,
248
+ "type": "object",
249
+ "required": ["currency", "maxMicroUsd", "assumptionsSha256"],
250
+ "properties": {
251
+ "currency": {
252
+ "const": "USD",
253
+ "type": "string"
254
+ },
255
+ "maxMicroUsd": {
256
+ "minimum": 0,
257
+ "maximum": 9007199254740991,
258
+ "type": "integer"
259
+ },
260
+ "assumptionsSha256": {
261
+ "pattern": "^[0-9a-f]{64}$",
262
+ "type": "string"
263
+ }
264
+ }
265
+ },
266
+ "testOnly": {
267
+ "type": "boolean"
268
+ }
269
+ }
270
+ },
271
+ "signature": {
272
+ "pattern": "^[0-9a-f]{128}$",
273
+ "type": "string"
274
+ }
275
+ }
276
+ }
277
+ }
278
+ }
@@ -0,0 +1,205 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://github.com/DynamicalSystemsGroup/dsg-idl/schema/dsg-kernel-dispatch-consume-v1.json",
4
+ "title": "dsg.kernel.dispatch-consume/1",
5
+ "$defs": {
6
+ "request": {
7
+ "additionalProperties": false,
8
+ "type": "object",
9
+ "required": [
10
+ "profile",
11
+ "operationId",
12
+ "generation",
13
+ "caseOrn",
14
+ "envelopeSha256",
15
+ "lawSha256",
16
+ "reservation",
17
+ "requestedAt",
18
+ "renewal"
19
+ ],
20
+ "properties": {
21
+ "profile": {
22
+ "const": "dsg.kernel.dispatch-consume/1",
23
+ "type": "string"
24
+ },
25
+ "operationId": {
26
+ "minLength": 1,
27
+ "type": "string"
28
+ },
29
+ "generation": {
30
+ "minimum": 0,
31
+ "type": "integer"
32
+ },
33
+ "caseOrn": {
34
+ "pattern": "^orn:[a-z][a-z0-9-]*(?:\\.[a-z][a-z0-9-]*){3}:(?:[A-Za-z0-9\\-._~:/@]|%[0-9A-Fa-f]{2})+$",
35
+ "type": "string"
36
+ },
37
+ "envelopeSha256": {
38
+ "pattern": "^[0-9a-f]{64}$",
39
+ "type": "string"
40
+ },
41
+ "lawSha256": {
42
+ "pattern": "^[0-9a-f]{64}$",
43
+ "type": "string"
44
+ },
45
+ "reservation": {
46
+ "additionalProperties": false,
47
+ "type": "object",
48
+ "required": ["orn", "sha256"],
49
+ "properties": {
50
+ "orn": {
51
+ "pattern": "^orn:[a-z][a-z0-9-]*(?:\\.[a-z][a-z0-9-]*){3}:(?:[A-Za-z0-9\\-._~:/@]|%[0-9A-Fa-f]{2})+$",
52
+ "type": "string"
53
+ },
54
+ "sha256": {
55
+ "pattern": "^[0-9a-f]{64}$",
56
+ "type": "string"
57
+ }
58
+ }
59
+ },
60
+ "requestedAt": {
61
+ "pattern": "^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}Z$",
62
+ "type": "string"
63
+ },
64
+ "renewal": {
65
+ "type": "boolean"
66
+ }
67
+ }
68
+ },
69
+ "lease": {
70
+ "additionalProperties": false,
71
+ "type": "object",
72
+ "required": [
73
+ "profile",
74
+ "leaseId",
75
+ "operationId",
76
+ "generation",
77
+ "caseOrn",
78
+ "envelopeSha256",
79
+ "lawSha256",
80
+ "reservation",
81
+ "consumedAt",
82
+ "expiresAt",
83
+ "maxSkewSeconds",
84
+ "renewal",
85
+ "fresh"
86
+ ],
87
+ "properties": {
88
+ "profile": {
89
+ "const": "dsg.kernel.dispatch-consume/1",
90
+ "type": "string"
91
+ },
92
+ "leaseId": {
93
+ "pattern": "^[0-9a-f]{64}$",
94
+ "type": "string"
95
+ },
96
+ "operationId": {
97
+ "minLength": 1,
98
+ "type": "string"
99
+ },
100
+ "generation": {
101
+ "minimum": 0,
102
+ "type": "integer"
103
+ },
104
+ "caseOrn": {
105
+ "pattern": "^orn:[a-z][a-z0-9-]*(?:\\.[a-z][a-z0-9-]*){3}:(?:[A-Za-z0-9\\-._~:/@]|%[0-9A-Fa-f]{2})+$",
106
+ "type": "string"
107
+ },
108
+ "envelopeSha256": {
109
+ "pattern": "^[0-9a-f]{64}$",
110
+ "type": "string"
111
+ },
112
+ "lawSha256": {
113
+ "pattern": "^[0-9a-f]{64}$",
114
+ "type": "string"
115
+ },
116
+ "reservation": {
117
+ "additionalProperties": false,
118
+ "type": "object",
119
+ "required": ["orn", "sha256"],
120
+ "properties": {
121
+ "orn": {
122
+ "pattern": "^orn:[a-z][a-z0-9-]*(?:\\.[a-z][a-z0-9-]*){3}:(?:[A-Za-z0-9\\-._~:/@]|%[0-9A-Fa-f]{2})+$",
123
+ "type": "string"
124
+ },
125
+ "sha256": {
126
+ "pattern": "^[0-9a-f]{64}$",
127
+ "type": "string"
128
+ }
129
+ }
130
+ },
131
+ "consumedAt": {
132
+ "pattern": "^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}Z$",
133
+ "type": "string"
134
+ },
135
+ "expiresAt": {
136
+ "pattern": "^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}Z$",
137
+ "type": "string"
138
+ },
139
+ "maxSkewSeconds": {
140
+ "minimum": 0,
141
+ "maximum": 300,
142
+ "type": "integer"
143
+ },
144
+ "renewal": {
145
+ "const": "new-authorization-required",
146
+ "type": "string"
147
+ },
148
+ "fresh": {
149
+ "type": "boolean"
150
+ }
151
+ }
152
+ },
153
+ "refusal": {
154
+ "additionalProperties": false,
155
+ "type": "object",
156
+ "required": ["profile", "code", "issues"],
157
+ "properties": {
158
+ "profile": {
159
+ "const": "dsg.kernel.dispatch-consume/1",
160
+ "type": "string"
161
+ },
162
+ "code": {
163
+ "anyOf": [
164
+ {
165
+ "const": "unknown_operation",
166
+ "type": "string"
167
+ },
168
+ {
169
+ "const": "no_reservation",
170
+ "type": "string"
171
+ },
172
+ {
173
+ "const": "binding_mismatch",
174
+ "type": "string"
175
+ },
176
+ {
177
+ "const": "revoked",
178
+ "type": "string"
179
+ },
180
+ {
181
+ "const": "authority_refused",
182
+ "type": "string"
183
+ },
184
+ {
185
+ "const": "renewal_requires_existing_consumption",
186
+ "type": "string"
187
+ },
188
+ {
189
+ "const": "unavailable",
190
+ "type": "string"
191
+ }
192
+ ]
193
+ },
194
+ "issues": {
195
+ "minItems": 1,
196
+ "type": "array",
197
+ "items": {
198
+ "minLength": 1,
199
+ "type": "string"
200
+ }
201
+ }
202
+ }
203
+ }
204
+ }
205
+ }
@@ -0,0 +1,151 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://github.com/DynamicalSystemsGroup/dsg-idl/schema/dsg-kernel-ordinary-authority-v1.json",
4
+ "title": "dsg.kernel.ordinary-authority/1",
5
+ "$defs": {
6
+ "authority": {
7
+ "additionalProperties": false,
8
+ "type": "object",
9
+ "required": [
10
+ "version",
11
+ "reference",
12
+ "actor",
13
+ "publicKeyHex",
14
+ "keyClass",
15
+ "designation",
16
+ "scope",
17
+ "validity",
18
+ "ceilings",
19
+ "revoked"
20
+ ],
21
+ "properties": {
22
+ "version": {
23
+ "const": "dsg.kernel.ordinary-authority/1",
24
+ "type": "string"
25
+ },
26
+ "reference": {
27
+ "minLength": 1,
28
+ "type": "string"
29
+ },
30
+ "actor": {
31
+ "pattern": "^orn:[a-z][a-z0-9-]*(?:\\.[a-z][a-z0-9-]*){3}:(?:[A-Za-z0-9\\-._~:/@]|%[0-9A-Fa-f]{2})+$",
32
+ "type": "string"
33
+ },
34
+ "publicKeyHex": {
35
+ "pattern": "^[0-9a-f]{64}$",
36
+ "type": "string"
37
+ },
38
+ "keyClass": {
39
+ "anyOf": [
40
+ {
41
+ "const": "synthetic-test-only",
42
+ "type": "string"
43
+ },
44
+ {
45
+ "const": "human-authority",
46
+ "type": "string"
47
+ }
48
+ ]
49
+ },
50
+ "designation": {
51
+ "additionalProperties": false,
52
+ "type": "object",
53
+ "required": ["role", "designationReference"],
54
+ "properties": {
55
+ "role": {
56
+ "const": "law-issuer",
57
+ "type": "string"
58
+ },
59
+ "designationReference": {
60
+ "minLength": 1,
61
+ "type": "string"
62
+ }
63
+ }
64
+ },
65
+ "scope": {
66
+ "additionalProperties": false,
67
+ "type": "object",
68
+ "required": ["scopeReference", "actions", "workloadClasses", "regions"],
69
+ "properties": {
70
+ "scopeReference": {
71
+ "minLength": 1,
72
+ "type": "string"
73
+ },
74
+ "actions": {
75
+ "minItems": 1,
76
+ "uniqueItems": true,
77
+ "type": "array",
78
+ "items": {
79
+ "minLength": 1,
80
+ "type": "string"
81
+ }
82
+ },
83
+ "workloadClasses": {
84
+ "minItems": 1,
85
+ "uniqueItems": true,
86
+ "type": "array",
87
+ "items": {
88
+ "minLength": 1,
89
+ "type": "string"
90
+ }
91
+ },
92
+ "regions": {
93
+ "minItems": 1,
94
+ "uniqueItems": true,
95
+ "type": "array",
96
+ "items": {
97
+ "minLength": 1,
98
+ "type": "string"
99
+ }
100
+ }
101
+ }
102
+ },
103
+ "validity": {
104
+ "additionalProperties": false,
105
+ "type": "object",
106
+ "required": ["notBefore", "notAfter"],
107
+ "properties": {
108
+ "notBefore": {
109
+ "pattern": "^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}Z$",
110
+ "type": "string"
111
+ },
112
+ "notAfter": {
113
+ "pattern": "^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}Z$",
114
+ "type": "string"
115
+ }
116
+ }
117
+ },
118
+ "ceilings": {
119
+ "additionalProperties": false,
120
+ "type": "object",
121
+ "required": [
122
+ "gpuSecondsPerPersonUtcWeek",
123
+ "usdMicroUnitsPerPersonUtcMonth",
124
+ "usdMicroUnitsPerOrganizationUtcMonth"
125
+ ],
126
+ "properties": {
127
+ "gpuSecondsPerPersonUtcWeek": {
128
+ "minimum": 0,
129
+ "maximum": 9007199254740991,
130
+ "type": "integer"
131
+ },
132
+ "usdMicroUnitsPerPersonUtcMonth": {
133
+ "minimum": 0,
134
+ "maximum": 9007199254740991,
135
+ "type": "integer"
136
+ },
137
+ "usdMicroUnitsPerOrganizationUtcMonth": {
138
+ "minimum": 0,
139
+ "maximum": 9007199254740991,
140
+ "type": "integer"
141
+ }
142
+ }
143
+ },
144
+ "revoked": {
145
+ "type": "boolean"
146
+ }
147
+ }
148
+ }
149
+ },
150
+ "$ref": "#/$defs/authority"
151
+ }