@ixo/domain.md 0.3.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.
- package/LICENSE +201 -0
- package/NOTICE +6 -0
- package/README.md +30 -0
- package/assets/domain-md.schema.json +1103 -0
- package/assets/oracle-capsule-jcs-vectors.json +57 -0
- package/assets/oracle-capsule-manifest-contract.md +72 -0
- package/assets/oracle-capsule-source-lock.schema.json +45 -0
- package/assets/oracle-capsule.schema.json +265 -0
- package/assets/rules.json +275 -0
- package/assets/spec.md +1434 -0
- package/assets/template-manifest.schema.json +57 -0
- package/dist/capsule/index.d.ts +75 -0
- package/dist/capsule/index.js +20 -0
- package/dist/capsule/index.js.map +1 -0
- package/dist/chunk-BYBC2TSS.js +597 -0
- package/dist/chunk-BYBC2TSS.js.map +1 -0
- package/dist/chunk-G7PZJYAJ.js +31826 -0
- package/dist/chunk-G7PZJYAJ.js.map +1 -0
- package/dist/chunk-R6QZRNEX.js +164 -0
- package/dist/chunk-R6QZRNEX.js.map +1 -0
- package/dist/chunk-T3STBWXP.js +46 -0
- package/dist/chunk-T3STBWXP.js.map +1 -0
- package/dist/chunk-W7MRQP7I.js +862 -0
- package/dist/chunk-W7MRQP7I.js.map +1 -0
- package/dist/chunk-XDIWMZVF.js +1150 -0
- package/dist/chunk-XDIWMZVF.js.map +1 -0
- package/dist/cli-KcUIQEiE.d.ts +171 -0
- package/dist/cli.d.ts +2 -0
- package/dist/cli.js +400 -0
- package/dist/cli.js.map +1 -0
- package/dist/index.d.ts +12 -0
- package/dist/index.js +83 -0
- package/dist/index.js.map +1 -0
- package/dist/resolver-B3mwnjJq.d.ts +96 -0
- package/dist/spec.d.ts +20 -0
- package/dist/spec.js +23 -0
- package/dist/spec.js.map +1 -0
- package/dist/templates/index.d.ts +7 -0
- package/dist/templates/index.js +24 -0
- package/dist/templates/index.js.map +1 -0
- package/dist/workers-Dr8B8a2O.d.ts +19 -0
- package/dist/workers.d.ts +3 -0
- package/dist/workers.js +31 -0
- package/dist/workers.js.map +1 -0
- package/package.json +97 -0
- package/src/capsule/canonical.ts +74 -0
- package/src/capsule/index.ts +10 -0
- package/src/capsule/json.ts +373 -0
- package/src/capsule/types.ts +63 -0
- package/src/capsule/validate.ts +551 -0
- package/src/cli.ts +405 -0
- package/src/compiled-validators.d.ts +7 -0
- package/src/compiled-validators.js +32512 -0
- package/src/constants.ts +250 -0
- package/src/diff.ts +111 -0
- package/src/export.ts +28 -0
- package/src/index.ts +36 -0
- package/src/lint.ts +42 -0
- package/src/parser.ts +174 -0
- package/src/sarif.ts +49 -0
- package/src/semantic.ts +1156 -0
- package/src/spec.ts +48 -0
- package/src/templates/errors.ts +3 -0
- package/src/templates/index.ts +11 -0
- package/src/templates/manifest.ts +94 -0
- package/src/templates/render.ts +435 -0
- package/src/templates/resolver.ts +200 -0
- package/src/templates/types.ts +98 -0
- package/src/types.ts +195 -0
- package/src/workers.ts +6 -0
|
@@ -0,0 +1,1103 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "urn:ixo:domain-md:schema:1.0.0-rc.3",
|
|
4
|
+
"title": "IXO domain.md frontmatter",
|
|
5
|
+
"description": "Structural and profile-specific validation for domain.md 1.0.0-rc.3. Semantic and runtime conformance checks remain mandatory.",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"required": [
|
|
8
|
+
"version",
|
|
9
|
+
"kind",
|
|
10
|
+
"conformance",
|
|
11
|
+
"document_revision",
|
|
12
|
+
"name",
|
|
13
|
+
"description",
|
|
14
|
+
"last_updated",
|
|
15
|
+
"domain",
|
|
16
|
+
"source_of_truth",
|
|
17
|
+
"documents",
|
|
18
|
+
"constitution",
|
|
19
|
+
"agent_default_mode",
|
|
20
|
+
"controllers",
|
|
21
|
+
"rights",
|
|
22
|
+
"privacy",
|
|
23
|
+
"validation",
|
|
24
|
+
"critical_do_not"
|
|
25
|
+
],
|
|
26
|
+
"properties": {
|
|
27
|
+
"version": { "const": "1.0.0-rc.3" },
|
|
28
|
+
"kind": { "const": "domain.md" },
|
|
29
|
+
"conformance": { "$ref": "#/$defs/conformance" },
|
|
30
|
+
"document_revision": { "$ref": "#/$defs/nonEmptyString" },
|
|
31
|
+
"name": { "$ref": "#/$defs/nonEmptyString" },
|
|
32
|
+
"description": { "$ref": "#/$defs/nonEmptyString" },
|
|
33
|
+
"last_updated": { "$ref": "#/$defs/date" },
|
|
34
|
+
"maintainers": {
|
|
35
|
+
"type": "array",
|
|
36
|
+
"items": {
|
|
37
|
+
"type": "object",
|
|
38
|
+
"required": ["id", "name", "role", "contact"],
|
|
39
|
+
"properties": {
|
|
40
|
+
"id": { "$ref": "#/$defs/did" },
|
|
41
|
+
"name": { "$ref": "#/$defs/nonEmptyString" },
|
|
42
|
+
"role": { "$ref": "#/$defs/nonEmptyString" },
|
|
43
|
+
"contact": { "type": ["string", "null"] }
|
|
44
|
+
},
|
|
45
|
+
"additionalProperties": false
|
|
46
|
+
}
|
|
47
|
+
},
|
|
48
|
+
"domain": { "$ref": "#/$defs/domain" },
|
|
49
|
+
"source_of_truth": { "$ref": "#/$defs/sourceOfTruth" },
|
|
50
|
+
"documents": { "$ref": "#/$defs/documents" },
|
|
51
|
+
"constitution": { "$ref": "#/$defs/constitution" },
|
|
52
|
+
"agent_default_mode": { "$ref": "#/$defs/agentDefaultMode" },
|
|
53
|
+
"controllers": { "$ref": "#/$defs/controllers" },
|
|
54
|
+
"services": { "$ref": "#/$defs/services" },
|
|
55
|
+
"resources": { "$ref": "#/$defs/resources" },
|
|
56
|
+
"rights": { "$ref": "#/$defs/rights" },
|
|
57
|
+
"claims": { "$ref": "#/$defs/claims" },
|
|
58
|
+
"linked_entities": { "$ref": "#/$defs/linkedEntities" },
|
|
59
|
+
"accounts": { "$ref": "#/$defs/accounts" },
|
|
60
|
+
"pods": { "$ref": "#/$defs/pods" },
|
|
61
|
+
"agents": { "$ref": "#/$defs/agents" },
|
|
62
|
+
"privacy": { "$ref": "#/$defs/privacy" },
|
|
63
|
+
"graph_policy": { "$ref": "#/$defs/graphPolicy" },
|
|
64
|
+
"validation": { "$ref": "#/$defs/validation" },
|
|
65
|
+
"critical_do_not": {
|
|
66
|
+
"type": "array",
|
|
67
|
+
"minItems": 1,
|
|
68
|
+
"uniqueItems": true,
|
|
69
|
+
"items": { "$ref": "#/$defs/nonEmptyString" }
|
|
70
|
+
},
|
|
71
|
+
"governance": { "type": "object" },
|
|
72
|
+
"protocols": {
|
|
73
|
+
"type": "array",
|
|
74
|
+
"minItems": 1,
|
|
75
|
+
"items": {
|
|
76
|
+
"type": "object",
|
|
77
|
+
"required": ["id", "version", "constraints"],
|
|
78
|
+
"properties": {
|
|
79
|
+
"id": { "$ref": "#/$defs/did" },
|
|
80
|
+
"version": { "$ref": "#/$defs/nonEmptyString" },
|
|
81
|
+
"constraints": { "type": "array", "items": { "$ref": "#/$defs/nonEmptyString" } }
|
|
82
|
+
},
|
|
83
|
+
"additionalProperties": false
|
|
84
|
+
}
|
|
85
|
+
},
|
|
86
|
+
"asset": { "type": "object" },
|
|
87
|
+
"deed": { "type": "object" },
|
|
88
|
+
"protocol": { "type": "object" },
|
|
89
|
+
"investment": { "type": "object" },
|
|
90
|
+
"x-oracle-capsule": { "$ref": "#/$defs/oracleCapsuleBinding" }
|
|
91
|
+
},
|
|
92
|
+
"patternProperties": {
|
|
93
|
+
"^x-[a-z0-9][a-z0-9-]*$": true
|
|
94
|
+
},
|
|
95
|
+
"additionalProperties": true,
|
|
96
|
+
"allOf": [
|
|
97
|
+
{
|
|
98
|
+
"if": {
|
|
99
|
+
"properties": {
|
|
100
|
+
"conformance": {
|
|
101
|
+
"properties": { "profile": { "enum": ["persisted_draft", "anchored", "runtime"] } },
|
|
102
|
+
"required": ["profile"]
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
},
|
|
106
|
+
"then": {
|
|
107
|
+
"properties": {
|
|
108
|
+
"documents": {
|
|
109
|
+
"properties": {
|
|
110
|
+
"entries": {
|
|
111
|
+
"items": {
|
|
112
|
+
"properties": {
|
|
113
|
+
"uri": { "$ref": "#/$defs/uri" },
|
|
114
|
+
"cid": { "$ref": "#/$defs/cid" }
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
},
|
|
123
|
+
{
|
|
124
|
+
"if": {
|
|
125
|
+
"properties": {
|
|
126
|
+
"conformance": {
|
|
127
|
+
"properties": { "profile": { "enum": ["anchored", "runtime"] } },
|
|
128
|
+
"required": ["profile"]
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
},
|
|
132
|
+
"then": {
|
|
133
|
+
"properties": {
|
|
134
|
+
"domain": {
|
|
135
|
+
"properties": {
|
|
136
|
+
"id": { "$ref": "#/$defs/did" },
|
|
137
|
+
"iid": { "$ref": "#/$defs/did" }
|
|
138
|
+
}
|
|
139
|
+
},
|
|
140
|
+
"source_of_truth": {
|
|
141
|
+
"properties": { "iid_document": { "$ref": "#/$defs/did" } }
|
|
142
|
+
},
|
|
143
|
+
"documents": {
|
|
144
|
+
"properties": {
|
|
145
|
+
"anchoring": {
|
|
146
|
+
"properties": {
|
|
147
|
+
"method": { "enum": ["iid_linked_resource", "content_address", "resolver"] },
|
|
148
|
+
"reference": { "$ref": "#/$defs/nonEmptyString" },
|
|
149
|
+
"verified_at": { "$ref": "#/$defs/dateTime" }
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
},
|
|
157
|
+
{
|
|
158
|
+
"if": {
|
|
159
|
+
"properties": {
|
|
160
|
+
"domain": {
|
|
161
|
+
"properties": { "class": { "type": "string" } },
|
|
162
|
+
"required": ["class"]
|
|
163
|
+
}
|
|
164
|
+
},
|
|
165
|
+
"required": ["domain"]
|
|
166
|
+
},
|
|
167
|
+
"then": {
|
|
168
|
+
"properties": {
|
|
169
|
+
"domain": {
|
|
170
|
+
"properties": { "class_binding": true },
|
|
171
|
+
"required": ["class_binding"]
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
},
|
|
176
|
+
{
|
|
177
|
+
"if": {
|
|
178
|
+
"properties": {
|
|
179
|
+
"domain": {
|
|
180
|
+
"properties": { "type": { "enum": ["dao", "organisation"] } },
|
|
181
|
+
"required": ["type"]
|
|
182
|
+
}
|
|
183
|
+
},
|
|
184
|
+
"required": ["domain"]
|
|
185
|
+
},
|
|
186
|
+
"then": { "required": ["governance"] }
|
|
187
|
+
},
|
|
188
|
+
{
|
|
189
|
+
"if": {
|
|
190
|
+
"properties": {
|
|
191
|
+
"domain": { "properties": { "type": { "const": "project" } }, "required": ["type"] }
|
|
192
|
+
},
|
|
193
|
+
"required": ["domain"]
|
|
194
|
+
},
|
|
195
|
+
"then": { "required": ["protocols", "pods", "claims", "accounts"] }
|
|
196
|
+
},
|
|
197
|
+
{
|
|
198
|
+
"if": {
|
|
199
|
+
"properties": {
|
|
200
|
+
"domain": { "properties": { "type": { "const": "asset" } }, "required": ["type"] }
|
|
201
|
+
},
|
|
202
|
+
"required": ["domain"]
|
|
203
|
+
},
|
|
204
|
+
"then": { "required": ["asset"] }
|
|
205
|
+
},
|
|
206
|
+
{
|
|
207
|
+
"if": {
|
|
208
|
+
"properties": {
|
|
209
|
+
"domain": { "properties": { "type": { "const": "deed" } }, "required": ["type"] }
|
|
210
|
+
},
|
|
211
|
+
"required": ["domain"]
|
|
212
|
+
},
|
|
213
|
+
"then": { "required": ["deed"] }
|
|
214
|
+
},
|
|
215
|
+
{
|
|
216
|
+
"if": {
|
|
217
|
+
"properties": {
|
|
218
|
+
"domain": { "properties": { "type": { "const": "protocol" } }, "required": ["type"] }
|
|
219
|
+
},
|
|
220
|
+
"required": ["domain"]
|
|
221
|
+
},
|
|
222
|
+
"then": { "required": ["protocol"] }
|
|
223
|
+
},
|
|
224
|
+
{
|
|
225
|
+
"if": {
|
|
226
|
+
"properties": {
|
|
227
|
+
"domain": {
|
|
228
|
+
"properties": { "type": { "enum": ["investment", "portfolio"] } },
|
|
229
|
+
"required": ["type"]
|
|
230
|
+
}
|
|
231
|
+
},
|
|
232
|
+
"required": ["domain"]
|
|
233
|
+
},
|
|
234
|
+
"then": { "required": ["investment"] }
|
|
235
|
+
},
|
|
236
|
+
{
|
|
237
|
+
"if": {
|
|
238
|
+
"properties": {
|
|
239
|
+
"domain": {
|
|
240
|
+
"properties": {
|
|
241
|
+
"type": { "enum": ["dao", "organisation", "project", "protocol", "marketplace", "pod"] }
|
|
242
|
+
},
|
|
243
|
+
"required": ["type"]
|
|
244
|
+
}
|
|
245
|
+
},
|
|
246
|
+
"required": ["domain"]
|
|
247
|
+
},
|
|
248
|
+
"then": {
|
|
249
|
+
"properties": {
|
|
250
|
+
"constitution": {
|
|
251
|
+
"properties": {
|
|
252
|
+
"status": { "enum": ["draft", "adopted", "in_force", "suspended", "superseded"] }
|
|
253
|
+
}
|
|
254
|
+
}
|
|
255
|
+
}
|
|
256
|
+
}
|
|
257
|
+
},
|
|
258
|
+
{
|
|
259
|
+
"if": {
|
|
260
|
+
"properties": {
|
|
261
|
+
"agent_default_mode": {
|
|
262
|
+
"properties": { "mode": { "enum": ["bounded_evaluate", "bounded_execute"] } },
|
|
263
|
+
"required": ["mode"]
|
|
264
|
+
}
|
|
265
|
+
},
|
|
266
|
+
"required": ["agent_default_mode"]
|
|
267
|
+
},
|
|
268
|
+
"then": {
|
|
269
|
+
"properties": {
|
|
270
|
+
"constitution": {
|
|
271
|
+
"properties": {
|
|
272
|
+
"status": { "enum": ["draft", "adopted", "in_force", "suspended", "superseded"] }
|
|
273
|
+
}
|
|
274
|
+
}
|
|
275
|
+
}
|
|
276
|
+
}
|
|
277
|
+
},
|
|
278
|
+
{
|
|
279
|
+
"if": {
|
|
280
|
+
"properties": {
|
|
281
|
+
"controllers": {
|
|
282
|
+
"properties": {
|
|
283
|
+
"summary": {
|
|
284
|
+
"properties": { "agent_controllers_allowed": { "const": true } },
|
|
285
|
+
"required": ["agent_controllers_allowed"]
|
|
286
|
+
}
|
|
287
|
+
},
|
|
288
|
+
"required": ["summary"]
|
|
289
|
+
}
|
|
290
|
+
},
|
|
291
|
+
"required": ["controllers"]
|
|
292
|
+
},
|
|
293
|
+
"then": {
|
|
294
|
+
"properties": {
|
|
295
|
+
"constitution": {
|
|
296
|
+
"properties": {
|
|
297
|
+
"status": { "enum": ["draft", "adopted", "in_force", "suspended", "superseded"] }
|
|
298
|
+
}
|
|
299
|
+
}
|
|
300
|
+
}
|
|
301
|
+
}
|
|
302
|
+
},
|
|
303
|
+
{
|
|
304
|
+
"if": {
|
|
305
|
+
"properties": {
|
|
306
|
+
"agents": {
|
|
307
|
+
"properties": { "entries": { "type": "array", "minItems": 1 } },
|
|
308
|
+
"required": ["entries"]
|
|
309
|
+
}
|
|
310
|
+
},
|
|
311
|
+
"required": ["agents"]
|
|
312
|
+
},
|
|
313
|
+
"then": {
|
|
314
|
+
"properties": {
|
|
315
|
+
"constitution": {
|
|
316
|
+
"properties": {
|
|
317
|
+
"status": { "enum": ["draft", "adopted", "in_force", "suspended", "superseded"] }
|
|
318
|
+
}
|
|
319
|
+
}
|
|
320
|
+
}
|
|
321
|
+
}
|
|
322
|
+
}
|
|
323
|
+
],
|
|
324
|
+
"$defs": {
|
|
325
|
+
"nonEmptyString": { "type": "string", "minLength": 1, "maxLength": 10000 },
|
|
326
|
+
"date": { "type": "string", "format": "date" },
|
|
327
|
+
"dateTime": { "type": "string", "format": "date-time" },
|
|
328
|
+
"duration": { "type": "string", "pattern": "^P(?!$).+" },
|
|
329
|
+
"did": { "type": "string", "pattern": "^did:ixo:[A-Za-z0-9._:%-]+$" },
|
|
330
|
+
"draftId": {
|
|
331
|
+
"type": "string",
|
|
332
|
+
"pattern": "^(did:ixo:[A-Za-z0-9._:%-]+|urn:uuid:[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$"
|
|
333
|
+
},
|
|
334
|
+
"uri": { "type": "string", "minLength": 1, "pattern": "^[A-Za-z][A-Za-z0-9+.-]*:" },
|
|
335
|
+
"cid": { "type": "string", "pattern": "^b[a-z2-7]{10,}$" },
|
|
336
|
+
"sha256": { "type": "string", "pattern": "^[0-9a-f]{64}$" },
|
|
337
|
+
"semver": {
|
|
338
|
+
"type": "string",
|
|
339
|
+
"pattern": "^(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)(?:-[0-9A-Za-z-]+(?:\\.[0-9A-Za-z-]+)*)?(?:\\+[0-9A-Za-z-]+(?:\\.[0-9A-Za-z-]+)*)?$"
|
|
340
|
+
},
|
|
341
|
+
"oracleCapsuleBinding": {
|
|
342
|
+
"type": "object",
|
|
343
|
+
"required": ["contract", "manifest"],
|
|
344
|
+
"properties": {
|
|
345
|
+
"contract": { "const": "ixo.earth/oracle-capsule/v0alpha1" },
|
|
346
|
+
"manifest": {
|
|
347
|
+
"type": "object",
|
|
348
|
+
"required": ["uri", "cid", "sha256", "media_type", "schema", "version"],
|
|
349
|
+
"properties": {
|
|
350
|
+
"uri": {
|
|
351
|
+
"type": "string",
|
|
352
|
+
"pattern": "^(ipfs://b[a-z2-7]{10,}(?:/[^?#]*)?|https://[^/?#]+/[^?#]*|file:[^?#]+)$"
|
|
353
|
+
},
|
|
354
|
+
"cid": { "$ref": "#/$defs/cid" },
|
|
355
|
+
"sha256": { "$ref": "#/$defs/sha256" },
|
|
356
|
+
"media_type": { "const": "application/vnd.ixo.oracle-capsule+json" },
|
|
357
|
+
"schema": { "const": "urn:ixo:domain-md:x-oracle-capsule:manifest:0.1.0" },
|
|
358
|
+
"version": { "$ref": "#/$defs/semver" }
|
|
359
|
+
},
|
|
360
|
+
"additionalProperties": false
|
|
361
|
+
}
|
|
362
|
+
},
|
|
363
|
+
"additionalProperties": false
|
|
364
|
+
},
|
|
365
|
+
"stringArray": { "type": "array", "uniqueItems": true, "items": { "$ref": "#/$defs/nonEmptyString" } },
|
|
366
|
+
"didArray": { "type": "array", "uniqueItems": true, "items": { "$ref": "#/$defs/did" } },
|
|
367
|
+
"amount": {
|
|
368
|
+
"type": "object",
|
|
369
|
+
"required": ["amount", "denom"],
|
|
370
|
+
"properties": {
|
|
371
|
+
"amount": { "type": "string", "pattern": "^(0|[1-9][0-9]*)$" },
|
|
372
|
+
"denom": { "type": "string", "pattern": "^[A-Za-z0-9/._:-]+$" }
|
|
373
|
+
},
|
|
374
|
+
"additionalProperties": false
|
|
375
|
+
},
|
|
376
|
+
"conformance": {
|
|
377
|
+
"type": "object",
|
|
378
|
+
"required": ["spec_version", "schema", "profile"],
|
|
379
|
+
"properties": {
|
|
380
|
+
"spec_version": { "const": "1.0.0-rc.3" },
|
|
381
|
+
"schema": { "const": "urn:ixo:domain-md:schema:1.0.0-rc.3" },
|
|
382
|
+
"profile": { "enum": ["authoring_draft", "persisted_draft", "anchored", "runtime"] }
|
|
383
|
+
},
|
|
384
|
+
"additionalProperties": false
|
|
385
|
+
},
|
|
386
|
+
"domain": {
|
|
387
|
+
"type": "object",
|
|
388
|
+
"required": ["id", "iid", "type", "class", "network", "status", "purpose", "operating_boundary"],
|
|
389
|
+
"properties": {
|
|
390
|
+
"id": { "$ref": "#/$defs/draftId" },
|
|
391
|
+
"iid": { "anyOf": [{ "$ref": "#/$defs/did" }, { "type": "null" }] },
|
|
392
|
+
"type": {
|
|
393
|
+
"enum": ["dao", "organisation", "person", "project", "asset", "commodity", "financial_instrument", "property_right", "agreement", "deed", "work", "protocol", "investment", "oracle", "service", "claim", "credential", "evidence", "decision", "outcome", "event", "process", "relationship", "information_object", "normative_object", "capability", "biological_entity", "network", "dataset", "device", "place", "portfolio", "marketplace", "pod", "claim_collection", "custom"]
|
|
394
|
+
},
|
|
395
|
+
"class": { "anyOf": [{ "$ref": "#/$defs/did" }, { "type": "null" }] },
|
|
396
|
+
"class_binding": {
|
|
397
|
+
"type": "object",
|
|
398
|
+
"required": ["resource", "cid", "version", "merge_policy"],
|
|
399
|
+
"properties": {
|
|
400
|
+
"resource": { "$ref": "#/$defs/uri" },
|
|
401
|
+
"cid": { "$ref": "#/$defs/cid" },
|
|
402
|
+
"version": { "$ref": "#/$defs/nonEmptyString" },
|
|
403
|
+
"merge_policy": { "const": "local_explicit_only" }
|
|
404
|
+
},
|
|
405
|
+
"additionalProperties": false
|
|
406
|
+
},
|
|
407
|
+
"network": {
|
|
408
|
+
"type": "object",
|
|
409
|
+
"required": ["chain_id", "environment", "resolver", "blocksync_endpoint", "rpc_endpoint"],
|
|
410
|
+
"properties": {
|
|
411
|
+
"chain_id": { "$ref": "#/$defs/nonEmptyString" },
|
|
412
|
+
"environment": { "enum": ["mainnet", "testnet", "devnet", "local"] },
|
|
413
|
+
"resolver": { "$ref": "#/$defs/nonEmptyString" },
|
|
414
|
+
"blocksync_endpoint": { "type": ["string", "null"] },
|
|
415
|
+
"rpc_endpoint": { "type": ["string", "null"] }
|
|
416
|
+
},
|
|
417
|
+
"additionalProperties": false
|
|
418
|
+
},
|
|
419
|
+
"status": { "enum": ["draft", "active", "paused", "deprecated", "archived"] },
|
|
420
|
+
"purpose": { "$ref": "#/$defs/nonEmptyString" },
|
|
421
|
+
"operating_boundary": { "$ref": "#/$defs/nonEmptyString" }
|
|
422
|
+
},
|
|
423
|
+
"additionalProperties": false
|
|
424
|
+
},
|
|
425
|
+
"sourceOfTruth": {
|
|
426
|
+
"type": "object",
|
|
427
|
+
"required": ["protocol_state", "iid_document", "conflict_resolution_order", "authority_scopes"],
|
|
428
|
+
"properties": {
|
|
429
|
+
"protocol_state": { "$ref": "#/$defs/nonEmptyString" },
|
|
430
|
+
"iid_document": { "anyOf": [{ "$ref": "#/$defs/did" }, { "type": "null" }] },
|
|
431
|
+
"graph_query_layer": { "type": ["string", "null"] },
|
|
432
|
+
"private_collaboration": { "type": ["string", "null"] },
|
|
433
|
+
"claims_registry": { "type": ["string", "null"] },
|
|
434
|
+
"evidence_store": { "type": ["string", "null"] },
|
|
435
|
+
"code_repository": { "type": ["string", "null"] },
|
|
436
|
+
"ontology_contexts": {
|
|
437
|
+
"type": "array",
|
|
438
|
+
"items": {
|
|
439
|
+
"type": "object",
|
|
440
|
+
"required": ["uri", "purpose"],
|
|
441
|
+
"properties": { "uri": { "$ref": "#/$defs/uri" }, "purpose": { "$ref": "#/$defs/nonEmptyString" } },
|
|
442
|
+
"additionalProperties": false
|
|
443
|
+
}
|
|
444
|
+
},
|
|
445
|
+
"conflict_resolution_order": {
|
|
446
|
+
"type": "array",
|
|
447
|
+
"minItems": 1,
|
|
448
|
+
"uniqueItems": true,
|
|
449
|
+
"items": { "$ref": "#/$defs/sourceName" }
|
|
450
|
+
},
|
|
451
|
+
"authority_scopes": {
|
|
452
|
+
"type": "array",
|
|
453
|
+
"minItems": 1,
|
|
454
|
+
"items": {
|
|
455
|
+
"type": "object",
|
|
456
|
+
"required": ["fact", "sources"],
|
|
457
|
+
"properties": {
|
|
458
|
+
"fact": { "enum": ["controller", "right", "account_balance", "claim_status", "credential_status", "flow_state", "domain_intent", "custom"] },
|
|
459
|
+
"sources": { "type": "array", "minItems": 1, "uniqueItems": true, "items": { "$ref": "#/$defs/sourceName" } }
|
|
460
|
+
},
|
|
461
|
+
"additionalProperties": false
|
|
462
|
+
}
|
|
463
|
+
}
|
|
464
|
+
},
|
|
465
|
+
"additionalProperties": false
|
|
466
|
+
},
|
|
467
|
+
"sourceName": {
|
|
468
|
+
"enum": ["protocol_state", "iid_document", "udid", "credential", "claim", "claim_collection_state", "blocksync", "matrix_state", "domain_md", "user_prompt", "agent_memory"]
|
|
469
|
+
},
|
|
470
|
+
"constitution": {
|
|
471
|
+
"type": "object",
|
|
472
|
+
"required": ["status", "reason", "subject", "type", "subject_profile"],
|
|
473
|
+
"properties": {
|
|
474
|
+
"status": { "enum": ["not_applicable", "draft", "adopted", "in_force", "suspended", "superseded"] },
|
|
475
|
+
"reason": { "anyOf": [{ "$ref": "#/$defs/nonEmptyString" }, { "type": "null" }] },
|
|
476
|
+
"subject": { "$ref": "#/$defs/draftId" },
|
|
477
|
+
"type": { "$ref": "#/$defs/uri" },
|
|
478
|
+
"subject_profile": { "$ref": "#/$defs/constitutionalSubjectProfile" },
|
|
479
|
+
"legal_effect": { "$ref": "#/$defs/legalEffect" },
|
|
480
|
+
"norms": { "$ref": "#/$defs/stringArray" },
|
|
481
|
+
"instruments": {
|
|
482
|
+
"type": "array",
|
|
483
|
+
"items": { "$ref": "#/$defs/constitutionalInstrument" }
|
|
484
|
+
},
|
|
485
|
+
"governance": { "$ref": "#/$defs/constitutionalGovernance" },
|
|
486
|
+
"execution": { "$ref": "#/$defs/constitutionalExecution" },
|
|
487
|
+
"constitutional_ai": { "$ref": "#/$defs/constitutionalAI" }
|
|
488
|
+
},
|
|
489
|
+
"allOf": [
|
|
490
|
+
{
|
|
491
|
+
"if": {
|
|
492
|
+
"properties": { "status": { "const": "not_applicable" } },
|
|
493
|
+
"required": ["status"]
|
|
494
|
+
},
|
|
495
|
+
"then": {
|
|
496
|
+
"not": {
|
|
497
|
+
"anyOf": [
|
|
498
|
+
{ "required": ["legal_effect"] },
|
|
499
|
+
{ "required": ["norms"] },
|
|
500
|
+
{ "required": ["instruments"] },
|
|
501
|
+
{ "required": ["governance"] },
|
|
502
|
+
{ "required": ["execution"] },
|
|
503
|
+
{ "required": ["constitutional_ai"] }
|
|
504
|
+
]
|
|
505
|
+
},
|
|
506
|
+
"properties": {
|
|
507
|
+
"reason": { "$ref": "#/$defs/nonEmptyString" }
|
|
508
|
+
}
|
|
509
|
+
},
|
|
510
|
+
"else": {
|
|
511
|
+
"required": ["legal_effect", "norms", "instruments", "governance", "execution", "constitutional_ai"],
|
|
512
|
+
"properties": {
|
|
513
|
+
"instruments": { "minItems": 1 },
|
|
514
|
+
"norms": { "minItems": 1 }
|
|
515
|
+
}
|
|
516
|
+
}
|
|
517
|
+
}
|
|
518
|
+
],
|
|
519
|
+
"additionalProperties": false
|
|
520
|
+
},
|
|
521
|
+
"constitutionalSubjectProfile": {
|
|
522
|
+
"type": "object",
|
|
523
|
+
"required": [
|
|
524
|
+
"subject_types",
|
|
525
|
+
"archetypes",
|
|
526
|
+
"identity",
|
|
527
|
+
"purposes",
|
|
528
|
+
"interests",
|
|
529
|
+
"values",
|
|
530
|
+
"rights",
|
|
531
|
+
"obligations",
|
|
532
|
+
"capabilities",
|
|
533
|
+
"claims",
|
|
534
|
+
"wallets",
|
|
535
|
+
"authorities",
|
|
536
|
+
"memory",
|
|
537
|
+
"evidence_policies",
|
|
538
|
+
"evaluation_policies",
|
|
539
|
+
"decision_policies",
|
|
540
|
+
"settlement_policies",
|
|
541
|
+
"governance",
|
|
542
|
+
"custodians",
|
|
543
|
+
"stewards",
|
|
544
|
+
"owners",
|
|
545
|
+
"beneficiaries",
|
|
546
|
+
"oracles",
|
|
547
|
+
"agentic_twins"
|
|
548
|
+
],
|
|
549
|
+
"properties": {
|
|
550
|
+
"subject_types": {
|
|
551
|
+
"type": "array",
|
|
552
|
+
"minItems": 1,
|
|
553
|
+
"uniqueItems": true,
|
|
554
|
+
"items": { "$ref": "#/$defs/uri" }
|
|
555
|
+
},
|
|
556
|
+
"archetypes": {
|
|
557
|
+
"type": "array",
|
|
558
|
+
"uniqueItems": true,
|
|
559
|
+
"items": { "$ref": "#/$defs/uri" }
|
|
560
|
+
},
|
|
561
|
+
"identity": {
|
|
562
|
+
"type": "array",
|
|
563
|
+
"minItems": 1,
|
|
564
|
+
"uniqueItems": true,
|
|
565
|
+
"items": { "$ref": "#/$defs/nonEmptyString" }
|
|
566
|
+
},
|
|
567
|
+
"purposes": { "$ref": "#/$defs/stringArray" },
|
|
568
|
+
"interests": { "$ref": "#/$defs/stringArray" },
|
|
569
|
+
"values": { "$ref": "#/$defs/stringArray" },
|
|
570
|
+
"rights": { "$ref": "#/$defs/stringArray" },
|
|
571
|
+
"obligations": { "$ref": "#/$defs/stringArray" },
|
|
572
|
+
"capabilities": { "$ref": "#/$defs/stringArray" },
|
|
573
|
+
"claims": { "$ref": "#/$defs/stringArray" },
|
|
574
|
+
"wallets": { "$ref": "#/$defs/stringArray" },
|
|
575
|
+
"authorities": { "$ref": "#/$defs/stringArray" },
|
|
576
|
+
"memory": { "$ref": "#/$defs/stringArray" },
|
|
577
|
+
"evidence_policies": { "$ref": "#/$defs/stringArray" },
|
|
578
|
+
"evaluation_policies": { "$ref": "#/$defs/stringArray" },
|
|
579
|
+
"decision_policies": { "$ref": "#/$defs/stringArray" },
|
|
580
|
+
"settlement_policies": { "$ref": "#/$defs/stringArray" },
|
|
581
|
+
"governance": { "$ref": "#/$defs/stringArray" },
|
|
582
|
+
"custodians": { "$ref": "#/$defs/stringArray" },
|
|
583
|
+
"stewards": { "$ref": "#/$defs/stringArray" },
|
|
584
|
+
"owners": { "$ref": "#/$defs/stringArray" },
|
|
585
|
+
"beneficiaries": { "$ref": "#/$defs/stringArray" },
|
|
586
|
+
"oracles": { "$ref": "#/$defs/stringArray" },
|
|
587
|
+
"agentic_twins": { "$ref": "#/$defs/stringArray" }
|
|
588
|
+
},
|
|
589
|
+
"additionalProperties": false
|
|
590
|
+
},
|
|
591
|
+
"legalEffect": {
|
|
592
|
+
"type": "object",
|
|
593
|
+
"required": ["status", "jurisdiction", "authority_evidence"],
|
|
594
|
+
"properties": {
|
|
595
|
+
"status": { "enum": ["none", "claimed", "verified", "unknown"] },
|
|
596
|
+
"jurisdiction": { "anyOf": [{ "$ref": "#/$defs/uri" }, { "type": "null" }] },
|
|
597
|
+
"authority_evidence": { "$ref": "#/$defs/stringArray" }
|
|
598
|
+
},
|
|
599
|
+
"additionalProperties": false
|
|
600
|
+
},
|
|
601
|
+
"constitutionalInstrument": {
|
|
602
|
+
"type": "object",
|
|
603
|
+
"required": ["document_ref", "type", "functions", "canonical", "effective_from", "effective_until"],
|
|
604
|
+
"properties": {
|
|
605
|
+
"document_ref": { "$ref": "#/$defs/nonEmptyString" },
|
|
606
|
+
"type": { "$ref": "#/$defs/uri" },
|
|
607
|
+
"functions": {
|
|
608
|
+
"type": "array",
|
|
609
|
+
"minItems": 1,
|
|
610
|
+
"uniqueItems": true,
|
|
611
|
+
"items": { "enum": ["constitutive", "governing", "amending", "interpretive", "executable"] }
|
|
612
|
+
},
|
|
613
|
+
"canonical": { "type": "boolean" },
|
|
614
|
+
"effective_from": { "anyOf": [{ "$ref": "#/$defs/dateTime" }, { "type": "null" }] },
|
|
615
|
+
"effective_until": { "anyOf": [{ "$ref": "#/$defs/dateTime" }, { "type": "null" }] }
|
|
616
|
+
},
|
|
617
|
+
"additionalProperties": false
|
|
618
|
+
},
|
|
619
|
+
"constitutionalGovernance": {
|
|
620
|
+
"type": "object",
|
|
621
|
+
"required": ["authority_sources", "decision_procedure", "amendment_procedure", "interpretation_procedure", "dispute_resolution_procedure", "suspension_procedure", "dissolution_procedure"],
|
|
622
|
+
"properties": {
|
|
623
|
+
"authority_sources": { "type": "array", "minItems": 1, "uniqueItems": true, "items": { "$ref": "#/$defs/nonEmptyString" } },
|
|
624
|
+
"decision_procedure": { "anyOf": [{ "$ref": "#/$defs/nonEmptyString" }, { "type": "null" }] },
|
|
625
|
+
"amendment_procedure": { "anyOf": [{ "$ref": "#/$defs/nonEmptyString" }, { "type": "null" }] },
|
|
626
|
+
"interpretation_procedure": { "anyOf": [{ "$ref": "#/$defs/nonEmptyString" }, { "type": "null" }] },
|
|
627
|
+
"dispute_resolution_procedure": { "anyOf": [{ "$ref": "#/$defs/nonEmptyString" }, { "type": "null" }] },
|
|
628
|
+
"suspension_procedure": { "anyOf": [{ "$ref": "#/$defs/nonEmptyString" }, { "type": "null" }] },
|
|
629
|
+
"dissolution_procedure": { "anyOf": [{ "$ref": "#/$defs/nonEmptyString" }, { "type": "null" }] }
|
|
630
|
+
},
|
|
631
|
+
"additionalProperties": false
|
|
632
|
+
},
|
|
633
|
+
"constitutionalExecution": {
|
|
634
|
+
"type": "object",
|
|
635
|
+
"required": ["mode", "implementations", "conformance_tests", "enforcement_points", "failure_policy", "human_review_required_for"],
|
|
636
|
+
"properties": {
|
|
637
|
+
"mode": { "enum": ["human_interpreted", "machine_assisted", "machine_executable", "hybrid"] },
|
|
638
|
+
"implementations": { "$ref": "#/$defs/stringArray" },
|
|
639
|
+
"conformance_tests": { "$ref": "#/$defs/stringArray" },
|
|
640
|
+
"enforcement_points": { "$ref": "#/$defs/stringArray" },
|
|
641
|
+
"failure_policy": { "enum": ["deny", "pause_and_escalate"] },
|
|
642
|
+
"human_review_required_for": { "$ref": "#/$defs/stringArray" }
|
|
643
|
+
},
|
|
644
|
+
"allOf": [
|
|
645
|
+
{
|
|
646
|
+
"if": {
|
|
647
|
+
"properties": { "mode": { "enum": ["machine_executable", "hybrid"] } },
|
|
648
|
+
"required": ["mode"]
|
|
649
|
+
},
|
|
650
|
+
"then": {
|
|
651
|
+
"properties": {
|
|
652
|
+
"implementations": { "minItems": 1 },
|
|
653
|
+
"conformance_tests": { "minItems": 1 },
|
|
654
|
+
"enforcement_points": { "minItems": 1 },
|
|
655
|
+
"human_review_required_for": { "minItems": 1 }
|
|
656
|
+
}
|
|
657
|
+
}
|
|
658
|
+
}
|
|
659
|
+
],
|
|
660
|
+
"additionalProperties": false
|
|
661
|
+
},
|
|
662
|
+
"constitutionalAI": {
|
|
663
|
+
"type": "object",
|
|
664
|
+
"required": ["mode", "applies_to_agents", "principles", "critique_procedure", "revision_procedure", "decision_procedure", "model_profile", "conflict_policy", "audit_record"],
|
|
665
|
+
"properties": {
|
|
666
|
+
"mode": { "enum": ["none", "context_only", "critique_and_revise", "policy_evaluate", "hybrid"] },
|
|
667
|
+
"applies_to_agents": { "$ref": "#/$defs/stringArray" },
|
|
668
|
+
"principles": { "$ref": "#/$defs/stringArray" },
|
|
669
|
+
"critique_procedure": { "anyOf": [{ "$ref": "#/$defs/nonEmptyString" }, { "type": "null" }] },
|
|
670
|
+
"revision_procedure": { "anyOf": [{ "$ref": "#/$defs/nonEmptyString" }, { "type": "null" }] },
|
|
671
|
+
"decision_procedure": { "anyOf": [{ "$ref": "#/$defs/nonEmptyString" }, { "type": "null" }] },
|
|
672
|
+
"model_profile": { "anyOf": [{ "$ref": "#/$defs/nonEmptyString" }, { "type": "null" }] },
|
|
673
|
+
"conflict_policy": { "const": "canonical_authority_prevails" },
|
|
674
|
+
"audit_record": { "anyOf": [{ "$ref": "#/$defs/nonEmptyString" }, { "type": "null" }] }
|
|
675
|
+
},
|
|
676
|
+
"additionalProperties": false
|
|
677
|
+
},
|
|
678
|
+
"documents": {
|
|
679
|
+
"type": "object",
|
|
680
|
+
"required": ["anchoring", "not_applicable", "entries"],
|
|
681
|
+
"properties": {
|
|
682
|
+
"anchoring": {
|
|
683
|
+
"type": "object",
|
|
684
|
+
"required": ["method", "reference", "cid", "verified_at"],
|
|
685
|
+
"properties": {
|
|
686
|
+
"method": { "enum": ["none", "iid_linked_resource", "content_address", "resolver"] },
|
|
687
|
+
"reference": { "type": ["string", "null"] },
|
|
688
|
+
"cid": { "anyOf": [{ "$ref": "#/$defs/cid" }, { "type": "null" }] },
|
|
689
|
+
"verified_at": { "anyOf": [{ "$ref": "#/$defs/dateTime" }, { "type": "null" }] }
|
|
690
|
+
},
|
|
691
|
+
"additionalProperties": false
|
|
692
|
+
},
|
|
693
|
+
"not_applicable": {
|
|
694
|
+
"type": "array",
|
|
695
|
+
"uniqueItems": true,
|
|
696
|
+
"items": { "enum": ["governance", "data-policy", "agents", "operations"] }
|
|
697
|
+
},
|
|
698
|
+
"entries": {
|
|
699
|
+
"type": "array",
|
|
700
|
+
"minItems": 2,
|
|
701
|
+
"items": { "$ref": "#/$defs/document" },
|
|
702
|
+
"allOf": [
|
|
703
|
+
{ "contains": { "properties": { "role": { "const": "description" } }, "required": ["role"] }, "minContains": 1, "maxContains": 1 },
|
|
704
|
+
{ "contains": { "properties": { "role": { "const": "changelog" } }, "required": ["role"] }, "minContains": 1, "maxContains": 1 },
|
|
705
|
+
{ "contains": { "properties": { "role": { "const": "manifest" } }, "required": ["role"] }, "minContains": 0, "maxContains": 1 }
|
|
706
|
+
]
|
|
707
|
+
}
|
|
708
|
+
},
|
|
709
|
+
"additionalProperties": false
|
|
710
|
+
},
|
|
711
|
+
"document": {
|
|
712
|
+
"type": "object",
|
|
713
|
+
"required": ["id", "role", "category", "manifest_type", "name", "uri", "cid", "media_type", "version", "owner", "update_authority", "authority", "disclosure_pass", "required_for_tasks", "sensitivity", "access_policy", "agent_use", "freshness", "supersedes"],
|
|
714
|
+
"properties": {
|
|
715
|
+
"id": { "$ref": "#/$defs/nonEmptyString" },
|
|
716
|
+
"role": { "type": "string", "pattern": "^(description|changelog|manifest|operations|governance|data-policy|agents|compliance|risk-register|custom|x-[a-z0-9-]+)$" },
|
|
717
|
+
"category": { "enum": ["universal", "manifest", "operational", "advanced", "extension"] },
|
|
718
|
+
"manifest_type": { "type": ["string", "null"], "pattern": "^(charter|dossier|prospectus|terms|specification|datasheet|device-profile|custom)$" },
|
|
719
|
+
"name": { "$ref": "#/$defs/nonEmptyString" },
|
|
720
|
+
"uri": { "anyOf": [{ "$ref": "#/$defs/uri" }, { "type": "null" }] },
|
|
721
|
+
"cid": { "anyOf": [{ "$ref": "#/$defs/cid" }, { "type": "null" }] },
|
|
722
|
+
"media_type": { "type": "string", "pattern": "^[A-Za-z0-9!#$&^_.+-]+/[A-Za-z0-9!#$&^_.+-]+$" },
|
|
723
|
+
"version": { "type": ["string", "null"] },
|
|
724
|
+
"owner": { "$ref": "#/$defs/did" },
|
|
725
|
+
"update_authority": { "$ref": "#/$defs/didArray" },
|
|
726
|
+
"authority": { "enum": ["interpretive", "defining", "advisory"] },
|
|
727
|
+
"disclosure_pass": { "type": "integer", "minimum": 1, "maximum": 3 },
|
|
728
|
+
"required_for_tasks": { "$ref": "#/$defs/stringArray" },
|
|
729
|
+
"sensitivity": { "$ref": "#/$defs/sensitivity" },
|
|
730
|
+
"access_policy": { "$ref": "#/$defs/accessPolicy" },
|
|
731
|
+
"agent_use": {
|
|
732
|
+
"type": "object",
|
|
733
|
+
"required": ["read", "cite", "summarize"],
|
|
734
|
+
"properties": { "read": { "type": "boolean" }, "cite": { "type": "boolean" }, "summarize": { "type": "boolean" } },
|
|
735
|
+
"additionalProperties": false
|
|
736
|
+
},
|
|
737
|
+
"freshness": {
|
|
738
|
+
"type": "object",
|
|
739
|
+
"required": ["last_verified", "max_age"],
|
|
740
|
+
"properties": {
|
|
741
|
+
"last_verified": { "anyOf": [{ "$ref": "#/$defs/date" }, { "type": "null" }] },
|
|
742
|
+
"max_age": { "anyOf": [{ "$ref": "#/$defs/duration" }, { "type": "null" }] }
|
|
743
|
+
},
|
|
744
|
+
"additionalProperties": false
|
|
745
|
+
},
|
|
746
|
+
"supersedes": { "type": ["string", "null"] }
|
|
747
|
+
},
|
|
748
|
+
"additionalProperties": false
|
|
749
|
+
},
|
|
750
|
+
"sensitivity": { "enum": ["public", "internal", "confidential", "restricted", "regulated"] },
|
|
751
|
+
"accessPolicy": { "enum": ["public", "controller_only", "role_based", "capability_based", "matrix_room", "private", "custom"] },
|
|
752
|
+
"agentDefaultMode": {
|
|
753
|
+
"type": "object",
|
|
754
|
+
"required": ["mode", "overrides", "human_review_required_for"],
|
|
755
|
+
"properties": {
|
|
756
|
+
"mode": { "enum": ["read_only", "propose_only", "bounded_evaluate", "bounded_execute"] },
|
|
757
|
+
"overrides": {
|
|
758
|
+
"type": "object",
|
|
759
|
+
"properties": {
|
|
760
|
+
"move_value": { "const": false },
|
|
761
|
+
"issue_credentials": { "const": false },
|
|
762
|
+
"change_rights": { "const": false },
|
|
763
|
+
"change_rubrics": { "const": false }
|
|
764
|
+
},
|
|
765
|
+
"additionalProperties": { "type": "boolean" }
|
|
766
|
+
},
|
|
767
|
+
"human_review_required_for": { "$ref": "#/$defs/stringArray" }
|
|
768
|
+
},
|
|
769
|
+
"additionalProperties": false
|
|
770
|
+
},
|
|
771
|
+
"controllers": {
|
|
772
|
+
"type": "object",
|
|
773
|
+
"required": ["summary", "entries"],
|
|
774
|
+
"properties": {
|
|
775
|
+
"summary": {
|
|
776
|
+
"type": "object",
|
|
777
|
+
"required": ["primary_controller", "governance_model", "agent_controllers_allowed"],
|
|
778
|
+
"properties": {
|
|
779
|
+
"primary_controller": { "$ref": "#/$defs/did" },
|
|
780
|
+
"governance_model": { "enum": ["single_controller", "multisig", "dao", "group", "hybrid", "protocol_controlled"] },
|
|
781
|
+
"agent_controllers_allowed": { "type": "boolean" }
|
|
782
|
+
},
|
|
783
|
+
"additionalProperties": false
|
|
784
|
+
},
|
|
785
|
+
"entries": { "type": "array", "minItems": 1, "items": { "$ref": "#/$defs/controller" } }
|
|
786
|
+
},
|
|
787
|
+
"additionalProperties": false
|
|
788
|
+
},
|
|
789
|
+
"controller": {
|
|
790
|
+
"type": "object",
|
|
791
|
+
"required": ["id", "type", "name", "role", "verification_methods", "addresses", "authorities", "approval_policy", "limitations", "audit_requirements"],
|
|
792
|
+
"properties": {
|
|
793
|
+
"id": { "$ref": "#/$defs/did" },
|
|
794
|
+
"type": { "enum": ["human", "organisation", "dao", "group", "multisig", "agent", "service", "module_account", "protocol"] },
|
|
795
|
+
"name": { "$ref": "#/$defs/nonEmptyString" },
|
|
796
|
+
"role": { "$ref": "#/$defs/nonEmptyString" },
|
|
797
|
+
"verification_methods": { "type": "array", "items": { "type": "object" } },
|
|
798
|
+
"addresses": { "type": "array", "items": { "type": "object" } },
|
|
799
|
+
"authorities": { "$ref": "#/$defs/stringArray" },
|
|
800
|
+
"approval_policy": { "type": "object" },
|
|
801
|
+
"limitations": { "$ref": "#/$defs/stringArray" },
|
|
802
|
+
"audit_requirements": { "type": "object" }
|
|
803
|
+
},
|
|
804
|
+
"additionalProperties": false
|
|
805
|
+
},
|
|
806
|
+
"services": {
|
|
807
|
+
"type": "object",
|
|
808
|
+
"required": ["entries"],
|
|
809
|
+
"properties": { "entries": { "type": "array", "items": { "$ref": "#/$defs/service" } } },
|
|
810
|
+
"additionalProperties": false
|
|
811
|
+
},
|
|
812
|
+
"service": {
|
|
813
|
+
"type": "object",
|
|
814
|
+
"required": ["id", "type", "name", "endpoint", "service_did", "auth", "allowed_agent_uses", "forbidden_agent_uses", "data_classification", "canonical", "fallback_service"],
|
|
815
|
+
"properties": {
|
|
816
|
+
"id": { "$ref": "#/$defs/nonEmptyString" },
|
|
817
|
+
"type": { "$ref": "#/$defs/nonEmptyString" },
|
|
818
|
+
"name": { "$ref": "#/$defs/nonEmptyString" },
|
|
819
|
+
"endpoint": { "$ref": "#/$defs/nonEmptyString" },
|
|
820
|
+
"service_did": { "anyOf": [{ "$ref": "#/$defs/did" }, { "type": "null" }] },
|
|
821
|
+
"auth": { "type": "object", "required": ["method", "required_scopes"], "properties": { "method": { "$ref": "#/$defs/nonEmptyString" }, "required_scopes": { "$ref": "#/$defs/stringArray" } }, "additionalProperties": false },
|
|
822
|
+
"allowed_agent_uses": { "$ref": "#/$defs/stringArray" },
|
|
823
|
+
"forbidden_agent_uses": { "$ref": "#/$defs/stringArray" },
|
|
824
|
+
"data_classification": { "$ref": "#/$defs/sensitivity" },
|
|
825
|
+
"canonical": { "type": "boolean" },
|
|
826
|
+
"fallback_service": { "type": ["string", "null"] },
|
|
827
|
+
"rate_limits": { "type": ["string", "null"] },
|
|
828
|
+
"verification": { "type": "object" }
|
|
829
|
+
},
|
|
830
|
+
"additionalProperties": false
|
|
831
|
+
},
|
|
832
|
+
"resources": {
|
|
833
|
+
"type": "object",
|
|
834
|
+
"required": ["entries"],
|
|
835
|
+
"properties": { "entries": { "type": "array", "items": { "$ref": "#/$defs/resource" } } },
|
|
836
|
+
"additionalProperties": false
|
|
837
|
+
},
|
|
838
|
+
"resource": {
|
|
839
|
+
"type": "object",
|
|
840
|
+
"required": ["id", "type", "name", "uri", "cid", "hash", "version", "owner", "update_authority", "access_policy", "sensitivity", "agent_use", "freshness", "canonical_for"],
|
|
841
|
+
"properties": {
|
|
842
|
+
"id": { "$ref": "#/$defs/nonEmptyString" },
|
|
843
|
+
"type": { "$ref": "#/$defs/nonEmptyString" },
|
|
844
|
+
"name": { "$ref": "#/$defs/nonEmptyString" },
|
|
845
|
+
"uri": { "$ref": "#/$defs/uri" },
|
|
846
|
+
"cid": { "anyOf": [{ "$ref": "#/$defs/cid" }, { "type": "null" }] },
|
|
847
|
+
"hash": { "type": ["string", "null"] },
|
|
848
|
+
"version": { "type": ["string", "null"] },
|
|
849
|
+
"owner": { "$ref": "#/$defs/did" },
|
|
850
|
+
"update_authority": { "$ref": "#/$defs/didArray" },
|
|
851
|
+
"access_policy": { "$ref": "#/$defs/accessPolicy" },
|
|
852
|
+
"sensitivity": { "$ref": "#/$defs/sensitivity" },
|
|
853
|
+
"agent_use": { "type": "object" },
|
|
854
|
+
"freshness": { "type": "object" },
|
|
855
|
+
"canonical_for": { "$ref": "#/$defs/stringArray" }
|
|
856
|
+
},
|
|
857
|
+
"additionalProperties": false
|
|
858
|
+
},
|
|
859
|
+
"rights": {
|
|
860
|
+
"type": "object",
|
|
861
|
+
"required": ["agent_baseline", "entries"],
|
|
862
|
+
"properties": {
|
|
863
|
+
"agent_baseline": {
|
|
864
|
+
"type": "object",
|
|
865
|
+
"required": ["require_explicit_grant_for"],
|
|
866
|
+
"properties": { "require_explicit_grant_for": { "$ref": "#/$defs/stringArray" } },
|
|
867
|
+
"additionalProperties": false
|
|
868
|
+
},
|
|
869
|
+
"entries": { "type": "array", "items": { "$ref": "#/$defs/right" } }
|
|
870
|
+
},
|
|
871
|
+
"additionalProperties": false
|
|
872
|
+
},
|
|
873
|
+
"right": {
|
|
874
|
+
"type": "object",
|
|
875
|
+
"required": ["id", "type", "effect", "subject", "object", "action", "capability", "conditions", "revocation", "audit"],
|
|
876
|
+
"properties": {
|
|
877
|
+
"id": { "$ref": "#/$defs/nonEmptyString" },
|
|
878
|
+
"type": { "$ref": "#/$defs/nonEmptyString" },
|
|
879
|
+
"effect": { "enum": ["allow", "deny"] },
|
|
880
|
+
"subject": { "$ref": "#/$defs/did" },
|
|
881
|
+
"object": { "$ref": "#/$defs/nonEmptyString" },
|
|
882
|
+
"action": { "$ref": "#/$defs/nonEmptyString" },
|
|
883
|
+
"capability": { "type": "object", "required": ["format", "reference"], "properties": { "format": { "$ref": "#/$defs/nonEmptyString" }, "reference": { "type": ["string", "null"] } }, "additionalProperties": false },
|
|
884
|
+
"conditions": {
|
|
885
|
+
"type": "object",
|
|
886
|
+
"required": ["flow_state", "claim_type", "max_value", "not_before", "expiry", "role_required", "credential_required", "human_review"],
|
|
887
|
+
"properties": {
|
|
888
|
+
"flow_state": { "type": ["string", "null"] },
|
|
889
|
+
"claim_type": { "type": ["string", "null"] },
|
|
890
|
+
"max_value": { "anyOf": [{ "$ref": "#/$defs/amount" }, { "type": "null" }] },
|
|
891
|
+
"not_before": { "anyOf": [{ "$ref": "#/$defs/dateTime" }, { "type": "null" }] },
|
|
892
|
+
"expiry": { "anyOf": [{ "$ref": "#/$defs/dateTime" }, { "type": "null" }] },
|
|
893
|
+
"role_required": { "type": ["string", "null"] },
|
|
894
|
+
"credential_required": { "type": ["string", "null"] },
|
|
895
|
+
"human_review": { "type": "boolean" }
|
|
896
|
+
},
|
|
897
|
+
"additionalProperties": false
|
|
898
|
+
},
|
|
899
|
+
"revocation": { "type": "object" },
|
|
900
|
+
"audit": { "type": "object" }
|
|
901
|
+
},
|
|
902
|
+
"additionalProperties": false
|
|
903
|
+
},
|
|
904
|
+
"claims": {
|
|
905
|
+
"type": "object",
|
|
906
|
+
"required": ["collections"],
|
|
907
|
+
"properties": {
|
|
908
|
+
"collections": { "type": "array", "minItems": 1, "items": { "$ref": "#/$defs/claimCollection" } },
|
|
909
|
+
"linked_claims": { "type": "array", "items": { "type": "object" } }
|
|
910
|
+
},
|
|
911
|
+
"additionalProperties": false
|
|
912
|
+
},
|
|
913
|
+
"claimCollection": {
|
|
914
|
+
"type": "object",
|
|
915
|
+
"required": ["id", "name", "purpose", "owner", "claim_types"],
|
|
916
|
+
"properties": {
|
|
917
|
+
"id": { "$ref": "#/$defs/nonEmptyString" },
|
|
918
|
+
"name": { "$ref": "#/$defs/nonEmptyString" },
|
|
919
|
+
"purpose": { "$ref": "#/$defs/nonEmptyString" },
|
|
920
|
+
"owner": { "$ref": "#/$defs/did" },
|
|
921
|
+
"claim_types": { "type": "array", "minItems": 1, "items": { "$ref": "#/$defs/claimType" } }
|
|
922
|
+
},
|
|
923
|
+
"additionalProperties": false
|
|
924
|
+
},
|
|
925
|
+
"claimType": {
|
|
926
|
+
"type": "object",
|
|
927
|
+
"required": ["id", "schema", "schema_version", "fact_schema", "evidence_requirements", "evaluation_kit", "rubric", "evaluator_right", "determiner_right", "udid", "allowed_outcomes", "human_review_policy", "next_actions"],
|
|
928
|
+
"properties": {
|
|
929
|
+
"id": { "$ref": "#/$defs/nonEmptyString" },
|
|
930
|
+
"schema": { "$ref": "#/$defs/nonEmptyString" },
|
|
931
|
+
"schema_version": { "$ref": "#/$defs/nonEmptyString" },
|
|
932
|
+
"fact_schema": { "$ref": "#/$defs/nonEmptyString" },
|
|
933
|
+
"evidence_requirements": {
|
|
934
|
+
"type": "array",
|
|
935
|
+
"minItems": 1,
|
|
936
|
+
"items": {
|
|
937
|
+
"type": "object",
|
|
938
|
+
"required": ["resource_id", "required", "max_age", "sensitivity"],
|
|
939
|
+
"properties": {
|
|
940
|
+
"resource_id": { "$ref": "#/$defs/nonEmptyString" },
|
|
941
|
+
"required": { "type": "boolean" },
|
|
942
|
+
"max_age": { "anyOf": [{ "$ref": "#/$defs/duration" }, { "type": "null" }] },
|
|
943
|
+
"sensitivity": { "$ref": "#/$defs/sensitivity" }
|
|
944
|
+
},
|
|
945
|
+
"additionalProperties": false
|
|
946
|
+
}
|
|
947
|
+
},
|
|
948
|
+
"evaluation_kit": { "type": ["string", "null"] },
|
|
949
|
+
"rubric": {
|
|
950
|
+
"type": "object",
|
|
951
|
+
"required": ["resource_id", "version", "order", "disqualifiers", "reason_codes"],
|
|
952
|
+
"properties": {
|
|
953
|
+
"resource_id": { "$ref": "#/$defs/nonEmptyString" },
|
|
954
|
+
"version": { "$ref": "#/$defs/nonEmptyString" },
|
|
955
|
+
"order": { "$ref": "#/$defs/stringArray" },
|
|
956
|
+
"disqualifiers": { "$ref": "#/$defs/stringArray" },
|
|
957
|
+
"reason_codes": { "$ref": "#/$defs/stringArray" }
|
|
958
|
+
},
|
|
959
|
+
"additionalProperties": false
|
|
960
|
+
},
|
|
961
|
+
"evaluator_right": { "$ref": "#/$defs/nonEmptyString" },
|
|
962
|
+
"determiner_right": { "$ref": "#/$defs/nonEmptyString" },
|
|
963
|
+
"udid": { "type": "object", "required": ["required", "schema", "record_authority"], "properties": { "required": { "type": "boolean" }, "schema": { "$ref": "#/$defs/nonEmptyString" }, "record_authority": { "$ref": "#/$defs/nonEmptyString" } }, "additionalProperties": false },
|
|
964
|
+
"allowed_outcomes": { "$ref": "#/$defs/stringArray" },
|
|
965
|
+
"human_review_policy": { "type": "object", "required": ["required_for", "reviewer_right", "approval_proof"], "properties": { "required_for": { "$ref": "#/$defs/stringArray" }, "reviewer_right": { "$ref": "#/$defs/nonEmptyString" }, "approval_proof": { "$ref": "#/$defs/nonEmptyString" } }, "additionalProperties": false },
|
|
966
|
+
"next_actions": {
|
|
967
|
+
"type": "array",
|
|
968
|
+
"minItems": 1,
|
|
969
|
+
"items": {
|
|
970
|
+
"type": "object",
|
|
971
|
+
"required": ["outcome", "flow_id", "transition", "settlement_policy"],
|
|
972
|
+
"properties": {
|
|
973
|
+
"outcome": { "$ref": "#/$defs/nonEmptyString" },
|
|
974
|
+
"flow_id": { "$ref": "#/$defs/nonEmptyString" },
|
|
975
|
+
"transition": { "$ref": "#/$defs/nonEmptyString" },
|
|
976
|
+
"settlement_policy": { "type": ["string", "null"] }
|
|
977
|
+
},
|
|
978
|
+
"additionalProperties": false
|
|
979
|
+
}
|
|
980
|
+
}
|
|
981
|
+
},
|
|
982
|
+
"additionalProperties": false
|
|
983
|
+
},
|
|
984
|
+
"linkedEntities": { "type": "object", "properties": { "entries": { "type": "array", "items": { "type": "object" } } }, "required": ["entries"], "additionalProperties": false },
|
|
985
|
+
"accounts": {
|
|
986
|
+
"type": "object",
|
|
987
|
+
"required": ["entries"],
|
|
988
|
+
"properties": { "entries": { "type": "array", "minItems": 1, "items": { "$ref": "#/$defs/account" } } },
|
|
989
|
+
"additionalProperties": false
|
|
990
|
+
},
|
|
991
|
+
"account": {
|
|
992
|
+
"type": "object",
|
|
993
|
+
"required": ["name", "address", "chain_id", "owner", "purpose", "asset_types", "controllers", "authz_grants", "spending_policy", "settlement_triggers", "audit"],
|
|
994
|
+
"properties": {
|
|
995
|
+
"name": { "$ref": "#/$defs/nonEmptyString" },
|
|
996
|
+
"address": { "$ref": "#/$defs/nonEmptyString" },
|
|
997
|
+
"chain_id": { "$ref": "#/$defs/nonEmptyString" },
|
|
998
|
+
"owner": { "$ref": "#/$defs/did" },
|
|
999
|
+
"purpose": { "$ref": "#/$defs/nonEmptyString" },
|
|
1000
|
+
"asset_types": { "$ref": "#/$defs/stringArray" },
|
|
1001
|
+
"controllers": { "$ref": "#/$defs/didArray" },
|
|
1002
|
+
"authz_grants": { "type": "array", "items": { "type": "object" } },
|
|
1003
|
+
"spending_policy": {
|
|
1004
|
+
"type": "object",
|
|
1005
|
+
"required": ["max_single_transaction", "daily_limit", "allowed_recipients", "requires_claim", "requires_udid", "requires_human_approval"],
|
|
1006
|
+
"properties": {
|
|
1007
|
+
"max_single_transaction": { "anyOf": [{ "$ref": "#/$defs/amount" }, { "type": "null" }] },
|
|
1008
|
+
"daily_limit": { "anyOf": [{ "$ref": "#/$defs/amount" }, { "type": "null" }] },
|
|
1009
|
+
"allowed_recipients": { "$ref": "#/$defs/stringArray" },
|
|
1010
|
+
"requires_claim": { "type": "boolean" },
|
|
1011
|
+
"requires_udid": { "type": "boolean" },
|
|
1012
|
+
"requires_human_approval": { "type": "boolean" }
|
|
1013
|
+
},
|
|
1014
|
+
"additionalProperties": false
|
|
1015
|
+
},
|
|
1016
|
+
"settlement_triggers": { "type": "array", "items": { "type": "object" } },
|
|
1017
|
+
"audit": { "type": "object" }
|
|
1018
|
+
},
|
|
1019
|
+
"additionalProperties": false
|
|
1020
|
+
},
|
|
1021
|
+
"pods": {
|
|
1022
|
+
"type": "object",
|
|
1023
|
+
"required": ["entries"],
|
|
1024
|
+
"properties": { "entries": { "type": "array", "minItems": 1, "items": { "$ref": "#/$defs/pod" } } },
|
|
1025
|
+
"additionalProperties": false
|
|
1026
|
+
},
|
|
1027
|
+
"pod": {
|
|
1028
|
+
"type": "object",
|
|
1029
|
+
"required": ["id", "name", "purpose", "matrix_room", "members", "roles", "blueprints", "flows", "value_mechanisms"],
|
|
1030
|
+
"properties": {
|
|
1031
|
+
"id": { "$ref": "#/$defs/nonEmptyString" },
|
|
1032
|
+
"name": { "$ref": "#/$defs/nonEmptyString" },
|
|
1033
|
+
"purpose": { "$ref": "#/$defs/nonEmptyString" },
|
|
1034
|
+
"matrix_room": { "type": ["string", "null"] },
|
|
1035
|
+
"members": { "$ref": "#/$defs/didArray" },
|
|
1036
|
+
"roles": { "type": "array", "items": { "type": "object" } },
|
|
1037
|
+
"blueprints": { "type": "array", "items": { "type": "object" } },
|
|
1038
|
+
"flows": { "type": "array", "minItems": 1, "items": { "$ref": "#/$defs/flow" } },
|
|
1039
|
+
"value_mechanisms": { "$ref": "#/$defs/stringArray" }
|
|
1040
|
+
},
|
|
1041
|
+
"additionalProperties": false
|
|
1042
|
+
},
|
|
1043
|
+
"flow": {
|
|
1044
|
+
"type": "object",
|
|
1045
|
+
"required": ["id", "name", "trigger", "initial_state", "states", "human_review_states", "allowed_agent_actions", "disabled_agent_actions", "transitions"],
|
|
1046
|
+
"properties": {
|
|
1047
|
+
"id": { "$ref": "#/$defs/nonEmptyString" },
|
|
1048
|
+
"name": { "$ref": "#/$defs/nonEmptyString" },
|
|
1049
|
+
"trigger": { "type": "object", "required": ["type", "reference"], "properties": { "type": { "enum": ["manual", "claim", "protocol_event", "schedule", "webhook", "custom"] }, "reference": { "type": ["string", "null"] } }, "additionalProperties": false },
|
|
1050
|
+
"initial_state": { "$ref": "#/$defs/nonEmptyString" },
|
|
1051
|
+
"states": { "type": "array", "minItems": 1, "uniqueItems": true, "items": { "$ref": "#/$defs/nonEmptyString" } },
|
|
1052
|
+
"human_review_states": { "$ref": "#/$defs/stringArray" },
|
|
1053
|
+
"allowed_agent_actions": { "$ref": "#/$defs/stringArray" },
|
|
1054
|
+
"disabled_agent_actions": { "$ref": "#/$defs/stringArray" },
|
|
1055
|
+
"transitions": { "type": "array", "minItems": 1, "items": { "$ref": "#/$defs/transition" } }
|
|
1056
|
+
},
|
|
1057
|
+
"additionalProperties": false
|
|
1058
|
+
},
|
|
1059
|
+
"transition": {
|
|
1060
|
+
"type": "object",
|
|
1061
|
+
"required": ["id", "from", "to", "actor_rights", "required_evidence", "checks", "human_review", "effects"],
|
|
1062
|
+
"properties": {
|
|
1063
|
+
"id": { "$ref": "#/$defs/nonEmptyString" },
|
|
1064
|
+
"from": { "$ref": "#/$defs/nonEmptyString" },
|
|
1065
|
+
"to": { "$ref": "#/$defs/nonEmptyString" },
|
|
1066
|
+
"actor_rights": { "$ref": "#/$defs/stringArray" },
|
|
1067
|
+
"required_evidence": { "$ref": "#/$defs/stringArray" },
|
|
1068
|
+
"checks": { "$ref": "#/$defs/stringArray" },
|
|
1069
|
+
"human_review": { "type": "boolean" },
|
|
1070
|
+
"effects": { "$ref": "#/$defs/stringArray" }
|
|
1071
|
+
},
|
|
1072
|
+
"additionalProperties": false
|
|
1073
|
+
},
|
|
1074
|
+
"agents": { "type": "object", "required": ["entries"], "properties": { "entries": { "type": "array", "items": { "type": "object" } } }, "additionalProperties": false },
|
|
1075
|
+
"privacy": {
|
|
1076
|
+
"type": "object",
|
|
1077
|
+
"required": ["default_policy", "protocol_layer", "unauthorized_read_behavior"],
|
|
1078
|
+
"properties": {
|
|
1079
|
+
"default_policy": { "enum": ["public_by_exception", "private_by_default", "mixed"] },
|
|
1080
|
+
"protocol_layer": { "type": "object", "required": ["may_publish", "must_not_publish"], "properties": { "may_publish": { "$ref": "#/$defs/stringArray" }, "must_not_publish": { "$ref": "#/$defs/stringArray" } }, "additionalProperties": false },
|
|
1081
|
+
"service_layer": { "type": "object" },
|
|
1082
|
+
"redaction": { "type": "object" },
|
|
1083
|
+
"unauthorized_read_behavior": { "enum": ["deny", "redact", "request_capability", "escalate"] }
|
|
1084
|
+
},
|
|
1085
|
+
"additionalProperties": false
|
|
1086
|
+
},
|
|
1087
|
+
"graphPolicy": { "type": "object" },
|
|
1088
|
+
"validation": {
|
|
1089
|
+
"type": "object",
|
|
1090
|
+
"required": ["lint_profile", "max_document_bytes", "max_linked_document_bytes", "required_sections", "required_frontmatter", "stale_after", "review_required_for_changes_to"],
|
|
1091
|
+
"properties": {
|
|
1092
|
+
"lint_profile": { "enum": ["strict", "standard", "permissive"] },
|
|
1093
|
+
"max_document_bytes": { "type": "integer", "minimum": 1, "maximum": 1048576 },
|
|
1094
|
+
"max_linked_document_bytes": { "type": "integer", "minimum": 1, "maximum": 2097152 },
|
|
1095
|
+
"required_sections": { "$ref": "#/$defs/stringArray" },
|
|
1096
|
+
"required_frontmatter": { "$ref": "#/$defs/stringArray" },
|
|
1097
|
+
"stale_after": { "$ref": "#/$defs/duration" },
|
|
1098
|
+
"review_required_for_changes_to": { "$ref": "#/$defs/stringArray" }
|
|
1099
|
+
},
|
|
1100
|
+
"additionalProperties": false
|
|
1101
|
+
}
|
|
1102
|
+
}
|
|
1103
|
+
}
|