@astrale-os/kernel-dsl 1.0.0-beta.13 → 1.0.0-beta.14

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.
Files changed (66) hide show
  1. package/dist/v1/addressing/key.js +2 -1
  2. package/dist/v1/addressing/patterns.d.ts +1 -0
  3. package/dist/v1/addressing/patterns.js +2 -1
  4. package/dist/v1/builder/class/property.d.ts +3 -9
  5. package/dist/v1/builder/class/property.js +1 -0
  6. package/dist/v1/builder/lowering/class.js +5 -1
  7. package/dist/v1/builder/lowering/policy.js +1 -0
  8. package/dist/v1/builder/policy/authoring.js +3 -2
  9. package/dist/v1/bundle/codec.js +2 -2
  10. package/dist/v1/bundle/diagnostic.d.ts +2 -0
  11. package/dist/v1/bundle/diagnostic.js +6 -0
  12. package/dist/v1/bundle/structure.js +2 -2
  13. package/dist/v1/domain/validation/create.d.ts +4 -1
  14. package/dist/v1/domain/validation/create.js +21 -34
  15. package/dist/v1/language/.spec/schemas/value-schema.schema.json +22 -0
  16. package/dist/v1/language/class/model/class.d.ts +4 -4
  17. package/dist/v1/language/class/model/edge.d.ts +2 -2
  18. package/dist/v1/language/class/model/property.d.ts +16 -7
  19. package/dist/v1/language/definition/metadata.d.ts +5 -0
  20. package/dist/v1/language/definition/metadata.js +7 -0
  21. package/dist/v1/language/policy/model/policy.d.ts +5 -5
  22. package/dist/v1/language/policy/normalization/normalize.js +17 -16
  23. package/dist/v1/language/validation/diagnostic.d.ts +1 -1
  24. package/dist/v1/language/validation/rule.d.ts +26 -0
  25. package/dist/v1/language/validation/rule.js +116 -0
  26. package/dist/v1/language/value/profile/meta-schema.compiled.js +4 -1
  27. package/dist/v1/language/value/profile/rules.js +13 -37
  28. package/dist/v1/language/value/profile/vocabulary.d.ts +35 -2
  29. package/dist/v1/language/value/profile/vocabulary.js +52 -5
  30. package/dist/v1/language/value/reference/registry.index.js +2 -1
  31. package/dist/v1/language/value/syntax/keywords.d.ts +3 -3
  32. package/dist/v1/language/value/syntax/keywords.js +4 -20
  33. package/dist/v1/language/value/syntax/node-path/validate.js +2 -3
  34. package/dist/v1/schema/.spec/schemas/domain-schema.schema.json +2336 -0
  35. package/dist/v1/schema/analysis/class.js +33 -15
  36. package/dist/v1/schema/compatibility/api.d.ts +1 -1
  37. package/dist/v1/schema/compatibility/coordinate.js +3 -3
  38. package/dist/v1/schema/compatibility/model.d.ts +5 -0
  39. package/dist/v1/schema/diagnostic.d.ts +17 -3
  40. package/dist/v1/schema/diagnostic.js +11 -0
  41. package/dist/v1/schema/index.d.ts +3 -1
  42. package/dist/v1/schema/index.js +1 -0
  43. package/dist/v1/schema/model/schema.d.ts +19 -1
  44. package/dist/v1/schema/normalization/domain.js +1 -0
  45. package/dist/v1/schema/resolution/closure.js +2 -1
  46. package/dist/v1/schema/resolution/context.js +3 -1
  47. package/dist/v1/schema/rule.d.ts +29 -0
  48. package/dist/v1/schema/rule.js +415 -0
  49. package/dist/v1/schema/validation/callable.d.ts +4 -1
  50. package/dist/v1/schema/validation/callable.js +10 -1
  51. package/dist/v1/schema/validation/class.js +36 -44
  52. package/dist/v1/schema/validation/core.js +3 -3
  53. package/dist/v1/schema/validation/domain.json-schema.d.ts +15 -0
  54. package/dist/v1/schema/validation/domain.json-schema.js +183 -0
  55. package/dist/v1/schema/validation/domain.structure.d.ts +4018 -0
  56. package/dist/v1/schema/validation/domain.structure.js +341 -151
  57. package/dist/v1/schema/validation/json.json-schema.d.ts +24 -0
  58. package/dist/v1/schema/validation/json.json-schema.js +36 -0
  59. package/dist/v1/schema/validation/policy/references.js +5 -21
  60. package/dist/v1/schema/validation/policy/uses.js +0 -3
  61. package/dist/v1/schema/validation/value-api.d.ts +12 -1
  62. package/dist/v1/schema/validation/value-api.js +10 -1
  63. package/dist/v1/schema/validation/value.js +3 -3
  64. package/dist/v1/schema/validation/value.json-schema.d.ts +51 -0
  65. package/dist/v1/schema/validation/value.json-schema.js +126 -0
  66. package/package.json +3 -1
@@ -0,0 +1,2336 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://schemas.astrale.ai/dsl/v1/domain-schema",
4
+ "title": "V1 DomainSchema",
5
+ "$comment": "Generated from the structure the Kernel enforces; value schemas are in the dialect https://schemas.astrale.ai/dsl/v1/value-schema. Each check JSON Schema cannot state is named under x-astrale-rules, with its stage and the positions it constrains.",
6
+ "x-astrale-rules": {
7
+ "length-in-utf16-code-units": {
8
+ "code": "STRUCTURE_MAXIMUM",
9
+ "stage": "structure",
10
+ "statement": "A maxLength counts UTF-16 code units, where JSON Schema counts code points: a string within the bound in code points and beyond it in code units is refused.",
11
+ "positions": [
12
+ "#/$defs/core-slug",
13
+ "#/$defs/description",
14
+ "#/$defs/domain-name",
15
+ "#/$defs/icon",
16
+ "#/$defs/origin"
17
+ ]
18
+ },
19
+ "portable-json": {
20
+ "code": "DV_JSON_VALUE",
21
+ "stage": "structure",
22
+ "statement": "The document is portable JSON: as text, UTF-8 that parses, within 16,777,216 bytes, with no byte-order mark and no repeated member name; as a value, null, booleans, finite numbers other than negative zero, strings, arrays and plain objects, with no string or member name that holds U+0000 or a lone surrogate or exceeds 1,048,576 bytes of UTF-8, at most 64 nested arrays and objects, and at most 100,000 members and items in all.",
23
+ "positions": [
24
+ "#/$defs/portable-json"
25
+ ]
26
+ },
27
+ "unique-tuple-set": {
28
+ "code": "STRUCTURE_DUPLICATE_ITEM",
29
+ "stage": "structure",
30
+ "statement": "A unique tuple is a set of fields: two tuples naming the same fields in another order are one tuple, repeated.",
31
+ "positions": [
32
+ "#/$defs/edge-class/properties/unique",
33
+ "#/$defs/node-class/properties/unique"
34
+ ]
35
+ },
36
+ "value-blob": {
37
+ "code": "DV_VALUE_SCHEMA",
38
+ "valueCode": "VS_VALUE_KIND",
39
+ "stage": "rule",
40
+ "statement": "A blob is declared only by the whole schema of a Property, exactly as values.blob writes it.",
41
+ "positions": [
42
+ "#/$defs/value-schema/allOf/2/anyOf/1/properties/x-astrale-value-kind"
43
+ ]
44
+ },
45
+ "value-path": {
46
+ "code": "DV_VALUE_SCHEMA",
47
+ "valueCode": "VS_PATH_EXTENSION",
48
+ "stage": "rule",
49
+ "statement": "x-astrale-path annotates only a direct Property of a callable input object, beside exactly the $ref of the graph NodePath schema, and reads target node, cardinality one and a non-empty set of Node Class refs it accepts.",
50
+ "positions": [
51
+ "#/$defs/value-location/anyOf/1/properties/x-astrale-path"
52
+ ]
53
+ },
54
+ "value-recursion": {
55
+ "code": "DV_VALUE_SCHEMA",
56
+ "valueCode": "VS_RECURSION_PRODUCTIVE",
57
+ "stage": "rule",
58
+ "statement": "Every reference cycle of a value schema crosses a keyword that steps into the value: to a member, a member name or an item.",
59
+ "positions": [
60
+ "#/$defs/value-location/anyOf/1/properties/$ref"
61
+ ]
62
+ },
63
+ "value-reference-form": {
64
+ "code": "DV_VALUE_SCHEMA",
65
+ "valueCode": "VS_REFERENCE_FORM",
66
+ "stage": "rule",
67
+ "statement": "A $ref is a JSON Pointer fragment into its own value schema, or the id of the graph NodePath schema beside x-astrale-path.",
68
+ "positions": [
69
+ "#/$defs/value-location/anyOf/1/properties/$ref"
70
+ ]
71
+ },
72
+ "value-reference-resolution": {
73
+ "code": "DV_VALUE_SCHEMA",
74
+ "valueCode": "VS_REFERENCE_RESOLUTION",
75
+ "stage": "context",
76
+ "statement": "A $ref resolves to a location of its own value schema, and x-astrale-path accepts Node Classes of the Domain or of a direct dependency.",
77
+ "positions": [
78
+ "#/$defs/value-location/anyOf/1/properties/$ref"
79
+ ]
80
+ },
81
+ "value-regexp": {
82
+ "code": "DV_VALUE_SCHEMA",
83
+ "valueCode": "VS_REGEX_PORTABLE",
84
+ "stage": "rule",
85
+ "statement": "Every pattern, fullMatch and patternProperties name is an RFC 9485 I-Regexp within the regular-expression limits.",
86
+ "positions": [
87
+ "#/$defs/value-location/anyOf/1/properties/fullMatch",
88
+ "#/$defs/value-location/anyOf/1/properties/pattern",
89
+ "#/$defs/value-location/anyOf/1/properties/patternProperties"
90
+ ]
91
+ }
92
+ },
93
+ "type": "object",
94
+ "properties": {
95
+ "format": {
96
+ "type": "string",
97
+ "const": "astrale.dsl"
98
+ },
99
+ "version": {
100
+ "type": "string",
101
+ "const": "v1"
102
+ },
103
+ "origin": {
104
+ "$ref": "#/$defs/origin"
105
+ },
106
+ "name": {
107
+ "$ref": "#/$defs/domain-name"
108
+ },
109
+ "entrypoint": {
110
+ "$ref": "#/$defs/view-ref"
111
+ },
112
+ "dependencies": {
113
+ "type": "object",
114
+ "propertyNames": {
115
+ "$ref": "#/$defs/dependency-alias"
116
+ },
117
+ "additionalProperties": {
118
+ "$ref": "#/$defs/dependency"
119
+ }
120
+ },
121
+ "classes": {
122
+ "type": "object",
123
+ "propertyNames": {
124
+ "$ref": "#/$defs/name"
125
+ },
126
+ "additionalProperties": {
127
+ "$ref": "#/$defs/class-definition"
128
+ }
129
+ },
130
+ "functions": {
131
+ "type": "object",
132
+ "propertyNames": {
133
+ "$ref": "#/$defs/name"
134
+ },
135
+ "additionalProperties": {
136
+ "$ref": "#/$defs/function-definition"
137
+ }
138
+ },
139
+ "policies": {
140
+ "type": "object",
141
+ "propertyNames": {
142
+ "$ref": "#/$defs/name"
143
+ },
144
+ "additionalProperties": {
145
+ "$ref": "#/$defs/policy-definition"
146
+ }
147
+ },
148
+ "views": {
149
+ "type": "object",
150
+ "propertyNames": {
151
+ "$ref": "#/$defs/name"
152
+ },
153
+ "additionalProperties": {
154
+ "$ref": "#/$defs/view-definition"
155
+ }
156
+ },
157
+ "core": {
158
+ "$ref": "#/$defs/core"
159
+ }
160
+ },
161
+ "required": [
162
+ "format",
163
+ "version",
164
+ "origin",
165
+ "name",
166
+ "dependencies",
167
+ "classes",
168
+ "functions",
169
+ "policies",
170
+ "views",
171
+ "core"
172
+ ],
173
+ "additionalProperties": false,
174
+ "allOf": [
175
+ {
176
+ "$ref": "#/$defs/portable-json"
177
+ }
178
+ ],
179
+ "$defs": {
180
+ "auto": {
181
+ "type": "object",
182
+ "properties": {
183
+ "on": {
184
+ "minItems": 1,
185
+ "type": "array",
186
+ "items": {
187
+ "type": "string",
188
+ "enum": [
189
+ "create",
190
+ "update"
191
+ ]
192
+ },
193
+ "uniqueItems": true
194
+ },
195
+ "set": {
196
+ "type": "string",
197
+ "const": "instant"
198
+ }
199
+ },
200
+ "required": [
201
+ "on",
202
+ "set"
203
+ ],
204
+ "additionalProperties": false
205
+ },
206
+ "binary-input": {
207
+ "type": "object",
208
+ "properties": {
209
+ "mode": {
210
+ "type": "string",
211
+ "const": "binary"
212
+ },
213
+ "metadata": {
214
+ "$ref": "#/$defs/value-schema"
215
+ },
216
+ "maximumBytes": {
217
+ "type": "integer",
218
+ "minimum": 1,
219
+ "maximum": 9007199254740991
220
+ }
221
+ },
222
+ "required": [
223
+ "mode",
224
+ "metadata",
225
+ "maximumBytes"
226
+ ],
227
+ "additionalProperties": false
228
+ },
229
+ "callable-admission": {
230
+ "type": "object",
231
+ "properties": {
232
+ "maxAge": {
233
+ "type": "number"
234
+ }
235
+ },
236
+ "required": [
237
+ "maxAge"
238
+ ],
239
+ "additionalProperties": false
240
+ },
241
+ "callable-execution": {
242
+ "type": "object",
243
+ "properties": {
244
+ "durable": {
245
+ "type": "boolean"
246
+ }
247
+ },
248
+ "required": [
249
+ "durable"
250
+ ],
251
+ "additionalProperties": false
252
+ },
253
+ "callable-output": {
254
+ "oneOf": [
255
+ {
256
+ "type": "object",
257
+ "properties": {
258
+ "mode": {
259
+ "type": "string",
260
+ "const": "value"
261
+ },
262
+ "schema": {
263
+ "$ref": "#/$defs/value-schema"
264
+ }
265
+ },
266
+ "required": [
267
+ "mode",
268
+ "schema"
269
+ ],
270
+ "additionalProperties": false
271
+ },
272
+ {
273
+ "type": "object",
274
+ "properties": {
275
+ "mode": {
276
+ "type": "string",
277
+ "const": "stream"
278
+ },
279
+ "item": {
280
+ "$ref": "#/$defs/value-schema"
281
+ }
282
+ },
283
+ "required": [
284
+ "mode",
285
+ "item"
286
+ ],
287
+ "additionalProperties": false
288
+ },
289
+ {
290
+ "type": "object",
291
+ "properties": {
292
+ "mode": {
293
+ "type": "string",
294
+ "const": "binary"
295
+ }
296
+ },
297
+ "required": [
298
+ "mode"
299
+ ],
300
+ "additionalProperties": false
301
+ }
302
+ ]
303
+ },
304
+ "callable-policy": {
305
+ "anyOf": [
306
+ {
307
+ "type": "boolean",
308
+ "const": true
309
+ },
310
+ {
311
+ "$ref": "#/$defs/policy-check-expr"
312
+ }
313
+ ]
314
+ },
315
+ "class-definition": {
316
+ "oneOf": [
317
+ {
318
+ "$ref": "#/$defs/node-class"
319
+ },
320
+ {
321
+ "$ref": "#/$defs/edge-class"
322
+ }
323
+ ]
324
+ },
325
+ "class-policy": {
326
+ "anyOf": [
327
+ {
328
+ "type": "boolean",
329
+ "const": false
330
+ },
331
+ {
332
+ "$ref": "#/$defs/policy-ref"
333
+ }
334
+ ]
335
+ },
336
+ "class-ref": {
337
+ "type": "object",
338
+ "properties": {
339
+ "origin": {
340
+ "$ref": "#/$defs/origin"
341
+ },
342
+ "kind": {
343
+ "type": "string",
344
+ "const": "class"
345
+ },
346
+ "name": {
347
+ "$ref": "#/$defs/name"
348
+ }
349
+ },
350
+ "required": [
351
+ "origin",
352
+ "kind",
353
+ "name"
354
+ ],
355
+ "additionalProperties": false
356
+ },
357
+ "class-rule-check-expr": {
358
+ "anyOf": [
359
+ {
360
+ "type": "object",
361
+ "properties": {
362
+ "sameNode": {
363
+ "type": "object",
364
+ "properties": {
365
+ "left": {
366
+ "$ref": "#/$defs/class-rule-object"
367
+ },
368
+ "right": {
369
+ "$ref": "#/$defs/class-rule-object"
370
+ }
371
+ },
372
+ "required": [
373
+ "left",
374
+ "right"
375
+ ],
376
+ "additionalProperties": false
377
+ }
378
+ },
379
+ "required": [
380
+ "sameNode"
381
+ ],
382
+ "additionalProperties": false
383
+ },
384
+ {
385
+ "type": "object",
386
+ "properties": {
387
+ "check": {
388
+ "$ref": "#/$defs/policy-ref"
389
+ },
390
+ "object": {
391
+ "$ref": "#/$defs/class-rule-object"
392
+ }
393
+ },
394
+ "required": [
395
+ "check",
396
+ "object"
397
+ ],
398
+ "additionalProperties": false
399
+ },
400
+ {
401
+ "type": "object",
402
+ "properties": {
403
+ "allOf": {
404
+ "minItems": 1,
405
+ "type": "array",
406
+ "items": {
407
+ "$ref": "#/$defs/class-rule-check-expr"
408
+ }
409
+ }
410
+ },
411
+ "required": [
412
+ "allOf"
413
+ ],
414
+ "additionalProperties": false
415
+ },
416
+ {
417
+ "type": "object",
418
+ "properties": {
419
+ "anyOf": {
420
+ "minItems": 1,
421
+ "type": "array",
422
+ "items": {
423
+ "$ref": "#/$defs/class-rule-check-expr"
424
+ }
425
+ }
426
+ },
427
+ "required": [
428
+ "anyOf"
429
+ ],
430
+ "additionalProperties": false
431
+ }
432
+ ]
433
+ },
434
+ "class-rule-object": {
435
+ "oneOf": [
436
+ {
437
+ "type": "object",
438
+ "properties": {
439
+ "kind": {
440
+ "type": "string",
441
+ "const": "self"
442
+ }
443
+ },
444
+ "required": [
445
+ "kind"
446
+ ],
447
+ "additionalProperties": false
448
+ },
449
+ {
450
+ "type": "object",
451
+ "properties": {
452
+ "kind": {
453
+ "type": "string",
454
+ "const": "ref"
455
+ },
456
+ "ref": {
457
+ "$ref": "#/$defs/projected-member-ref"
458
+ }
459
+ },
460
+ "required": [
461
+ "kind",
462
+ "ref"
463
+ ],
464
+ "additionalProperties": false
465
+ }
466
+ ]
467
+ },
468
+ "core": {
469
+ "type": "object",
470
+ "properties": {
471
+ "nodes": {
472
+ "type": "object",
473
+ "propertyNames": {
474
+ "$ref": "#/$defs/core-slug"
475
+ },
476
+ "additionalProperties": {
477
+ "$ref": "#/$defs/core-definition"
478
+ }
479
+ },
480
+ "edges": {
481
+ "type": "array",
482
+ "items": {
483
+ "$ref": "#/$defs/core-edge"
484
+ }
485
+ }
486
+ },
487
+ "required": [
488
+ "nodes",
489
+ "edges"
490
+ ],
491
+ "additionalProperties": false
492
+ },
493
+ "core-definition": {
494
+ "type": "object",
495
+ "properties": {
496
+ "ref": {
497
+ "$ref": "#/$defs/core-ref"
498
+ },
499
+ "class": {
500
+ "$ref": "#/$defs/class-ref"
501
+ },
502
+ "properties": {
503
+ "$ref": "#/$defs/property-values"
504
+ }
505
+ },
506
+ "required": [
507
+ "ref",
508
+ "class",
509
+ "properties"
510
+ ],
511
+ "additionalProperties": false
512
+ },
513
+ "core-edge": {
514
+ "type": "object",
515
+ "properties": {
516
+ "class": {
517
+ "$ref": "#/$defs/class-ref"
518
+ },
519
+ "source": {
520
+ "$ref": "#/$defs/core-endpoint"
521
+ },
522
+ "target": {
523
+ "$ref": "#/$defs/core-endpoint"
524
+ },
525
+ "properties": {
526
+ "$ref": "#/$defs/property-values"
527
+ }
528
+ },
529
+ "required": [
530
+ "class",
531
+ "source",
532
+ "target",
533
+ "properties"
534
+ ],
535
+ "additionalProperties": false
536
+ },
537
+ "core-endpoint": {
538
+ "oneOf": [
539
+ {
540
+ "$ref": "#/$defs/method-address"
541
+ },
542
+ {
543
+ "$ref": "#/$defs/class-ref"
544
+ },
545
+ {
546
+ "$ref": "#/$defs/function-ref"
547
+ },
548
+ {
549
+ "$ref": "#/$defs/policy-ref"
550
+ },
551
+ {
552
+ "$ref": "#/$defs/view-ref"
553
+ },
554
+ {
555
+ "$ref": "#/$defs/core-ref"
556
+ },
557
+ {
558
+ "$ref": "#/$defs/domain-endpoint"
559
+ }
560
+ ]
561
+ },
562
+ "core-ref": {
563
+ "type": "object",
564
+ "properties": {
565
+ "origin": {
566
+ "$ref": "#/$defs/origin"
567
+ },
568
+ "kind": {
569
+ "type": "string",
570
+ "const": "core"
571
+ },
572
+ "name": {
573
+ "$ref": "#/$defs/core-slug"
574
+ }
575
+ },
576
+ "required": [
577
+ "origin",
578
+ "kind",
579
+ "name"
580
+ ],
581
+ "additionalProperties": false
582
+ },
583
+ "core-slug": {
584
+ "type": "string",
585
+ "minLength": 1,
586
+ "maxLength": 100,
587
+ "pattern": "^(?=.{1,100}$)[a-z][a-z0-9-]*(?:\\.[a-z][a-z0-9-]*)*$"
588
+ },
589
+ "dependency": {
590
+ "type": "object",
591
+ "properties": {
592
+ "origin": {
593
+ "$ref": "#/$defs/origin"
594
+ },
595
+ "revision": {
596
+ "$ref": "#/$defs/revision"
597
+ }
598
+ },
599
+ "required": [
600
+ "origin",
601
+ "revision"
602
+ ],
603
+ "additionalProperties": false
604
+ },
605
+ "dependency-alias": {
606
+ "type": "string",
607
+ "pattern": "^[a-z][A-Za-z0-9]*$",
608
+ "not": {
609
+ "enum": [
610
+ "prototype",
611
+ "constructor"
612
+ ]
613
+ }
614
+ },
615
+ "description": {
616
+ "type": "string",
617
+ "minLength": 1,
618
+ "maxLength": 1000
619
+ },
620
+ "directed-endpoints": {
621
+ "type": "object",
622
+ "properties": {
623
+ "source": {
624
+ "$ref": "#/$defs/directed-source-endpoint"
625
+ },
626
+ "target": {
627
+ "$ref": "#/$defs/directed-target-endpoint"
628
+ }
629
+ },
630
+ "required": [
631
+ "source",
632
+ "target"
633
+ ],
634
+ "additionalProperties": false
635
+ },
636
+ "directed-source-endpoint": {
637
+ "type": "object",
638
+ "properties": {
639
+ "role": {
640
+ "$ref": "#/$defs/name"
641
+ },
642
+ "accepts": {
643
+ "minItems": 1,
644
+ "type": "array",
645
+ "items": {
646
+ "$ref": "#/$defs/class-ref"
647
+ },
648
+ "uniqueItems": true
649
+ },
650
+ "onDelete": {
651
+ "$ref": "#/$defs/edge-lifetime"
652
+ },
653
+ "outgoing": {
654
+ "$ref": "#/$defs/edge-count"
655
+ }
656
+ },
657
+ "required": [
658
+ "role",
659
+ "accepts",
660
+ "outgoing"
661
+ ],
662
+ "additionalProperties": false
663
+ },
664
+ "directed-target-endpoint": {
665
+ "type": "object",
666
+ "properties": {
667
+ "role": {
668
+ "$ref": "#/$defs/name"
669
+ },
670
+ "accepts": {
671
+ "minItems": 1,
672
+ "type": "array",
673
+ "items": {
674
+ "$ref": "#/$defs/class-ref"
675
+ },
676
+ "uniqueItems": true
677
+ },
678
+ "onDelete": {
679
+ "$ref": "#/$defs/edge-lifetime"
680
+ },
681
+ "incoming": {
682
+ "$ref": "#/$defs/edge-count"
683
+ }
684
+ },
685
+ "required": [
686
+ "role",
687
+ "accepts",
688
+ "incoming"
689
+ ],
690
+ "additionalProperties": false
691
+ },
692
+ "domain-endpoint": {
693
+ "type": "object",
694
+ "properties": {
695
+ "kind": {
696
+ "type": "string",
697
+ "const": "domain"
698
+ }
699
+ },
700
+ "required": [
701
+ "kind"
702
+ ],
703
+ "additionalProperties": false
704
+ },
705
+ "domain-name": {
706
+ "type": "string",
707
+ "minLength": 1,
708
+ "maxLength": 100,
709
+ "description": "The display name of the Domain: one trimmed line of text.",
710
+ "pattern": "^(?:[^\\u0000-\\u001f\\u007f-\\u009f\\u0020\\u00a0\\u1680\\u2000-\\u200a\\u2028\\u2029\\u202f\\u205f\\u3000\\ufeff](?:[^\\u0000-\\u001f\\u007f-\\u009f\\u2028\\u2029]*[^\\u0000-\\u001f\\u007f-\\u009f\\u0020\\u00a0\\u1680\\u2000-\\u200a\\u2028\\u2029\\u202f\\u205f\\u3000\\ufeff])?)?$"
711
+ },
712
+ "edge-class": {
713
+ "type": "object",
714
+ "properties": {
715
+ "ref": {
716
+ "$ref": "#/$defs/class-ref"
717
+ },
718
+ "kind": {
719
+ "type": "string",
720
+ "const": "edge"
721
+ },
722
+ "abstract": {
723
+ "type": "boolean"
724
+ },
725
+ "inheritance": {
726
+ "type": "string",
727
+ "enum": [
728
+ "open",
729
+ "final"
730
+ ]
731
+ },
732
+ "description": {
733
+ "$ref": "#/$defs/description"
734
+ },
735
+ "extends": {
736
+ "type": "array",
737
+ "items": {
738
+ "$ref": "#/$defs/class-ref"
739
+ },
740
+ "uniqueItems": true
741
+ },
742
+ "properties": {
743
+ "$ref": "#/$defs/edge-property-record"
744
+ },
745
+ "constraints": {
746
+ "$ref": "#/$defs/edge-constraints"
747
+ },
748
+ "unique": {
749
+ "minItems": 1,
750
+ "type": "array",
751
+ "items": {
752
+ "minItems": 1,
753
+ "type": "array",
754
+ "items": {
755
+ "$ref": "#/$defs/edge-unique-field"
756
+ },
757
+ "uniqueItems": true
758
+ },
759
+ "uniqueItems": true
760
+ },
761
+ "orientation": {
762
+ "type": "string",
763
+ "enum": [
764
+ "directed",
765
+ "undirected"
766
+ ]
767
+ },
768
+ "endpoints": {
769
+ "anyOf": [
770
+ {
771
+ "$ref": "#/$defs/directed-endpoints"
772
+ },
773
+ {
774
+ "$ref": "#/$defs/undirected-endpoints"
775
+ }
776
+ ]
777
+ },
778
+ "policies": {
779
+ "type": "object",
780
+ "properties": {
781
+ "read": {
782
+ "$ref": "#/$defs/class-policy"
783
+ },
784
+ "traverse": {
785
+ "$ref": "#/$defs/class-policy"
786
+ }
787
+ },
788
+ "additionalProperties": false
789
+ }
790
+ },
791
+ "required": [
792
+ "ref",
793
+ "kind",
794
+ "abstract",
795
+ "extends",
796
+ "properties",
797
+ "constraints",
798
+ "orientation",
799
+ "endpoints",
800
+ "policies"
801
+ ],
802
+ "additionalProperties": false,
803
+ "if": {
804
+ "properties": {
805
+ "orientation": {
806
+ "const": "undirected"
807
+ }
808
+ },
809
+ "required": [
810
+ "orientation"
811
+ ]
812
+ },
813
+ "then": {
814
+ "properties": {
815
+ "endpoints": {
816
+ "type": "array"
817
+ },
818
+ "unique": false,
819
+ "constraints": {
820
+ "type": "object",
821
+ "properties": {
822
+ "acyclic": false
823
+ }
824
+ }
825
+ }
826
+ },
827
+ "else": {
828
+ "properties": {
829
+ "endpoints": {
830
+ "type": "object"
831
+ }
832
+ }
833
+ }
834
+ },
835
+ "edge-constraints": {
836
+ "type": "object",
837
+ "properties": {
838
+ "noSelf": {
839
+ "type": "boolean",
840
+ "const": true
841
+ },
842
+ "acyclic": {
843
+ "type": "boolean",
844
+ "const": true
845
+ }
846
+ },
847
+ "additionalProperties": false
848
+ },
849
+ "edge-count": {
850
+ "type": "string",
851
+ "enum": [
852
+ "1",
853
+ "0..*",
854
+ "1..*",
855
+ "0..1"
856
+ ]
857
+ },
858
+ "edge-lifetime": {
859
+ "type": "string",
860
+ "enum": [
861
+ "restrict",
862
+ "detach"
863
+ ]
864
+ },
865
+ "edge-property-definition": {
866
+ "type": "object",
867
+ "properties": {
868
+ "schema": {
869
+ "not": {
870
+ "type": "object",
871
+ "required": [
872
+ "x-astrale-value-kind"
873
+ ],
874
+ "properties": {
875
+ "x-astrale-value-kind": {
876
+ "const": "blob"
877
+ }
878
+ }
879
+ },
880
+ "$ref": "#/$defs/value-schema"
881
+ },
882
+ "required": {
883
+ "type": "boolean"
884
+ },
885
+ "auto": {
886
+ "$ref": "#/$defs/auto"
887
+ },
888
+ "immutable": {
889
+ "type": "string",
890
+ "enum": [
891
+ "create",
892
+ "once"
893
+ ]
894
+ },
895
+ "description": {
896
+ "$ref": "#/$defs/description"
897
+ }
898
+ },
899
+ "required": [
900
+ "schema",
901
+ "required"
902
+ ],
903
+ "additionalProperties": false
904
+ },
905
+ "edge-property-record": {
906
+ "type": "object",
907
+ "propertyNames": {
908
+ "$ref": "#/$defs/name"
909
+ },
910
+ "additionalProperties": {
911
+ "$ref": "#/$defs/edge-property-definition"
912
+ }
913
+ },
914
+ "edge-unique-field": {
915
+ "anyOf": [
916
+ {
917
+ "type": "string",
918
+ "const": "source"
919
+ },
920
+ {
921
+ "type": "string",
922
+ "const": "target"
923
+ },
924
+ {
925
+ "type": "string",
926
+ "const": "slug"
927
+ },
928
+ {
929
+ "type": "object",
930
+ "properties": {
931
+ "property": {
932
+ "$ref": "#/$defs/property-key"
933
+ }
934
+ },
935
+ "required": [
936
+ "property"
937
+ ],
938
+ "additionalProperties": false
939
+ }
940
+ ]
941
+ },
942
+ "function-definition": {
943
+ "type": "object",
944
+ "properties": {
945
+ "ref": {
946
+ "$ref": "#/$defs/function-ref"
947
+ },
948
+ "description": {
949
+ "$ref": "#/$defs/description"
950
+ },
951
+ "input": {
952
+ "anyOf": [
953
+ {
954
+ "$ref": "#/$defs/binary-input"
955
+ },
956
+ {
957
+ "not": {
958
+ "type": "object",
959
+ "required": [
960
+ "mode"
961
+ ],
962
+ "properties": {
963
+ "mode": {
964
+ "const": "binary"
965
+ }
966
+ }
967
+ },
968
+ "$ref": "#/$defs/value-schema"
969
+ }
970
+ ]
971
+ },
972
+ "output": {
973
+ "$ref": "#/$defs/callable-output"
974
+ },
975
+ "execution": {
976
+ "$ref": "#/$defs/callable-execution"
977
+ },
978
+ "admission": {
979
+ "$ref": "#/$defs/callable-admission"
980
+ },
981
+ "auth": {
982
+ "type": "string",
983
+ "enum": [
984
+ "anonymous",
985
+ "authenticated",
986
+ "authorized"
987
+ ]
988
+ },
989
+ "policy": {
990
+ "$ref": "#/$defs/callable-policy"
991
+ }
992
+ },
993
+ "required": [
994
+ "ref",
995
+ "input",
996
+ "output",
997
+ "auth"
998
+ ],
999
+ "additionalProperties": false,
1000
+ "if": {
1001
+ "properties": {
1002
+ "auth": {
1003
+ "enum": [
1004
+ "anonymous",
1005
+ "authenticated"
1006
+ ]
1007
+ }
1008
+ },
1009
+ "required": [
1010
+ "auth"
1011
+ ]
1012
+ },
1013
+ "then": {
1014
+ "properties": {
1015
+ "policy": false
1016
+ }
1017
+ }
1018
+ },
1019
+ "function-ref": {
1020
+ "type": "object",
1021
+ "properties": {
1022
+ "origin": {
1023
+ "$ref": "#/$defs/origin"
1024
+ },
1025
+ "kind": {
1026
+ "type": "string",
1027
+ "const": "function"
1028
+ },
1029
+ "name": {
1030
+ "$ref": "#/$defs/name"
1031
+ }
1032
+ },
1033
+ "required": [
1034
+ "origin",
1035
+ "kind",
1036
+ "name"
1037
+ ],
1038
+ "additionalProperties": false
1039
+ },
1040
+ "icon": {
1041
+ "type": "string",
1042
+ "minLength": 1,
1043
+ "maxLength": 8000
1044
+ },
1045
+ "incident-endpoint": {
1046
+ "type": "object",
1047
+ "properties": {
1048
+ "role": {
1049
+ "$ref": "#/$defs/name"
1050
+ },
1051
+ "accepts": {
1052
+ "minItems": 1,
1053
+ "type": "array",
1054
+ "items": {
1055
+ "$ref": "#/$defs/class-ref"
1056
+ },
1057
+ "uniqueItems": true
1058
+ },
1059
+ "onDelete": {
1060
+ "$ref": "#/$defs/edge-lifetime"
1061
+ },
1062
+ "incident": {
1063
+ "$ref": "#/$defs/edge-count"
1064
+ }
1065
+ },
1066
+ "required": [
1067
+ "role",
1068
+ "accepts",
1069
+ "incident"
1070
+ ],
1071
+ "additionalProperties": false
1072
+ },
1073
+ "json-value": {
1074
+ "anyOf": [
1075
+ {
1076
+ "type": "null"
1077
+ },
1078
+ {
1079
+ "type": "boolean"
1080
+ },
1081
+ {
1082
+ "type": "number"
1083
+ },
1084
+ {
1085
+ "type": "string"
1086
+ },
1087
+ {
1088
+ "type": "array",
1089
+ "items": {
1090
+ "$ref": "#/$defs/json-value"
1091
+ }
1092
+ },
1093
+ {
1094
+ "type": "object",
1095
+ "propertyNames": {
1096
+ "not": {
1097
+ "const": "__proto__"
1098
+ }
1099
+ },
1100
+ "additionalProperties": {
1101
+ "$ref": "#/$defs/json-value"
1102
+ }
1103
+ }
1104
+ ]
1105
+ },
1106
+ "media-type": {
1107
+ "type": "string",
1108
+ "pattern": "^[a-z0-9][a-z0-9!#$&^_.+-]{0,126}\\/[a-z0-9][a-z0-9!#$&^_.+-]{0,126}$"
1109
+ },
1110
+ "method-address": {
1111
+ "type": "object",
1112
+ "properties": {
1113
+ "kind": {
1114
+ "type": "string",
1115
+ "const": "method"
1116
+ },
1117
+ "owner": {
1118
+ "$ref": "#/$defs/class-ref"
1119
+ },
1120
+ "name": {
1121
+ "$ref": "#/$defs/name"
1122
+ }
1123
+ },
1124
+ "required": [
1125
+ "kind",
1126
+ "owner",
1127
+ "name"
1128
+ ],
1129
+ "additionalProperties": false
1130
+ },
1131
+ "method-definition": {
1132
+ "type": "object",
1133
+ "properties": {
1134
+ "description": {
1135
+ "$ref": "#/$defs/description"
1136
+ },
1137
+ "input": {
1138
+ "$ref": "#/$defs/value-schema"
1139
+ },
1140
+ "output": {
1141
+ "$ref": "#/$defs/callable-output"
1142
+ },
1143
+ "execution": {
1144
+ "$ref": "#/$defs/callable-execution"
1145
+ },
1146
+ "admission": {
1147
+ "$ref": "#/$defs/callable-admission"
1148
+ },
1149
+ "auth": {
1150
+ "type": "string",
1151
+ "enum": [
1152
+ "anonymous",
1153
+ "authenticated",
1154
+ "authorized"
1155
+ ]
1156
+ },
1157
+ "policy": {
1158
+ "$ref": "#/$defs/callable-policy"
1159
+ },
1160
+ "static": {
1161
+ "type": "boolean"
1162
+ },
1163
+ "abstract": {
1164
+ "type": "boolean"
1165
+ }
1166
+ },
1167
+ "required": [
1168
+ "input",
1169
+ "output",
1170
+ "auth",
1171
+ "static",
1172
+ "abstract"
1173
+ ],
1174
+ "additionalProperties": false,
1175
+ "if": {
1176
+ "properties": {
1177
+ "auth": {
1178
+ "enum": [
1179
+ "anonymous",
1180
+ "authenticated"
1181
+ ]
1182
+ }
1183
+ },
1184
+ "required": [
1185
+ "auth"
1186
+ ]
1187
+ },
1188
+ "then": {
1189
+ "properties": {
1190
+ "policy": false
1191
+ }
1192
+ }
1193
+ },
1194
+ "method-record": {
1195
+ "type": "object",
1196
+ "propertyNames": {
1197
+ "$ref": "#/$defs/name"
1198
+ },
1199
+ "additionalProperties": {
1200
+ "$ref": "#/$defs/method-definition"
1201
+ }
1202
+ },
1203
+ "name": {
1204
+ "type": "string",
1205
+ "pattern": "^[A-Za-z][A-Za-z0-9_]*$"
1206
+ },
1207
+ "node-class": {
1208
+ "type": "object",
1209
+ "properties": {
1210
+ "ref": {
1211
+ "$ref": "#/$defs/class-ref"
1212
+ },
1213
+ "kind": {
1214
+ "type": "string",
1215
+ "const": "node"
1216
+ },
1217
+ "abstract": {
1218
+ "type": "boolean"
1219
+ },
1220
+ "inheritance": {
1221
+ "type": "string",
1222
+ "enum": [
1223
+ "open",
1224
+ "final"
1225
+ ]
1226
+ },
1227
+ "description": {
1228
+ "$ref": "#/$defs/description"
1229
+ },
1230
+ "extends": {
1231
+ "type": "array",
1232
+ "items": {
1233
+ "$ref": "#/$defs/class-ref"
1234
+ },
1235
+ "uniqueItems": true
1236
+ },
1237
+ "properties": {
1238
+ "$ref": "#/$defs/node-property-record"
1239
+ },
1240
+ "methods": {
1241
+ "$ref": "#/$defs/method-record"
1242
+ },
1243
+ "data": {
1244
+ "type": "object",
1245
+ "properties": {
1246
+ "mediaType": {
1247
+ "$ref": "#/$defs/media-type"
1248
+ }
1249
+ },
1250
+ "required": [
1251
+ "mediaType"
1252
+ ],
1253
+ "additionalProperties": false
1254
+ },
1255
+ "icon": {
1256
+ "$ref": "#/$defs/icon"
1257
+ },
1258
+ "policies": {
1259
+ "type": "object",
1260
+ "properties": {
1261
+ "read": {
1262
+ "$ref": "#/$defs/node-class-policy"
1263
+ },
1264
+ "traverse": {
1265
+ "$ref": "#/$defs/node-class-policy"
1266
+ }
1267
+ },
1268
+ "additionalProperties": false
1269
+ },
1270
+ "unique": {
1271
+ "minItems": 1,
1272
+ "type": "array",
1273
+ "items": {
1274
+ "minItems": 1,
1275
+ "type": "array",
1276
+ "items": {
1277
+ "$ref": "#/$defs/property-key"
1278
+ },
1279
+ "uniqueItems": true
1280
+ },
1281
+ "uniqueItems": true
1282
+ }
1283
+ },
1284
+ "required": [
1285
+ "ref",
1286
+ "kind",
1287
+ "abstract",
1288
+ "extends",
1289
+ "properties",
1290
+ "methods",
1291
+ "policies"
1292
+ ],
1293
+ "additionalProperties": false
1294
+ },
1295
+ "node-class-policy": {
1296
+ "anyOf": [
1297
+ {
1298
+ "$ref": "#/$defs/class-policy"
1299
+ },
1300
+ {
1301
+ "$ref": "#/$defs/class-rule-check-expr"
1302
+ }
1303
+ ]
1304
+ },
1305
+ "node-property-definition": {
1306
+ "type": "object",
1307
+ "properties": {
1308
+ "schema": {
1309
+ "$ref": "#/$defs/value-schema"
1310
+ },
1311
+ "required": {
1312
+ "type": "boolean"
1313
+ },
1314
+ "auto": {
1315
+ "$ref": "#/$defs/auto"
1316
+ },
1317
+ "immutable": {
1318
+ "type": "string",
1319
+ "enum": [
1320
+ "create",
1321
+ "once"
1322
+ ]
1323
+ },
1324
+ "description": {
1325
+ "$ref": "#/$defs/description"
1326
+ },
1327
+ "state": {
1328
+ "$ref": "#/$defs/state-topology"
1329
+ }
1330
+ },
1331
+ "required": [
1332
+ "schema",
1333
+ "required"
1334
+ ],
1335
+ "additionalProperties": false,
1336
+ "allOf": [
1337
+ {
1338
+ "if": {
1339
+ "anyOf": [
1340
+ {
1341
+ "required": [
1342
+ "auto"
1343
+ ]
1344
+ },
1345
+ {
1346
+ "required": [
1347
+ "state"
1348
+ ]
1349
+ }
1350
+ ]
1351
+ },
1352
+ "then": {
1353
+ "properties": {
1354
+ "schema": {
1355
+ "not": {
1356
+ "type": "object",
1357
+ "required": [
1358
+ "x-astrale-value-kind"
1359
+ ],
1360
+ "properties": {
1361
+ "x-astrale-value-kind": {
1362
+ "const": "blob"
1363
+ }
1364
+ }
1365
+ }
1366
+ }
1367
+ }
1368
+ }
1369
+ }
1370
+ ]
1371
+ },
1372
+ "node-property-record": {
1373
+ "type": "object",
1374
+ "propertyNames": {
1375
+ "$ref": "#/$defs/name"
1376
+ },
1377
+ "additionalProperties": {
1378
+ "$ref": "#/$defs/node-property-definition"
1379
+ }
1380
+ },
1381
+ "origin": {
1382
+ "type": "string",
1383
+ "minLength": 3,
1384
+ "maxLength": 253,
1385
+ "pattern": "^(?:[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?\\.)+[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$"
1386
+ },
1387
+ "policy-check-expr": {
1388
+ "anyOf": [
1389
+ {
1390
+ "type": "object",
1391
+ "properties": {
1392
+ "sameNode": {
1393
+ "type": "object",
1394
+ "properties": {
1395
+ "left": {
1396
+ "$ref": "#/$defs/policy-check-object"
1397
+ },
1398
+ "right": {
1399
+ "$ref": "#/$defs/policy-check-object"
1400
+ }
1401
+ },
1402
+ "required": [
1403
+ "left",
1404
+ "right"
1405
+ ],
1406
+ "additionalProperties": false
1407
+ }
1408
+ },
1409
+ "required": [
1410
+ "sameNode"
1411
+ ],
1412
+ "additionalProperties": false
1413
+ },
1414
+ {
1415
+ "type": "object",
1416
+ "properties": {
1417
+ "check": {
1418
+ "$ref": "#/$defs/policy-ref"
1419
+ },
1420
+ "object": {
1421
+ "$ref": "#/$defs/policy-check-object"
1422
+ }
1423
+ },
1424
+ "required": [
1425
+ "check",
1426
+ "object"
1427
+ ],
1428
+ "additionalProperties": false
1429
+ },
1430
+ {
1431
+ "type": "object",
1432
+ "properties": {
1433
+ "allOf": {
1434
+ "minItems": 1,
1435
+ "type": "array",
1436
+ "items": {
1437
+ "$ref": "#/$defs/policy-check-expr"
1438
+ }
1439
+ }
1440
+ },
1441
+ "required": [
1442
+ "allOf"
1443
+ ],
1444
+ "additionalProperties": false
1445
+ },
1446
+ {
1447
+ "type": "object",
1448
+ "properties": {
1449
+ "anyOf": {
1450
+ "minItems": 1,
1451
+ "type": "array",
1452
+ "items": {
1453
+ "$ref": "#/$defs/policy-check-expr"
1454
+ }
1455
+ }
1456
+ },
1457
+ "required": [
1458
+ "anyOf"
1459
+ ],
1460
+ "additionalProperties": false
1461
+ }
1462
+ ]
1463
+ },
1464
+ "policy-check-object": {
1465
+ "oneOf": [
1466
+ {
1467
+ "type": "object",
1468
+ "properties": {
1469
+ "kind": {
1470
+ "type": "string",
1471
+ "const": "self"
1472
+ }
1473
+ },
1474
+ "required": [
1475
+ "kind"
1476
+ ],
1477
+ "additionalProperties": false
1478
+ },
1479
+ {
1480
+ "type": "object",
1481
+ "properties": {
1482
+ "kind": {
1483
+ "type": "string",
1484
+ "const": "input"
1485
+ },
1486
+ "field": {
1487
+ "$ref": "#/$defs/name"
1488
+ }
1489
+ },
1490
+ "required": [
1491
+ "kind",
1492
+ "field"
1493
+ ],
1494
+ "additionalProperties": false
1495
+ },
1496
+ {
1497
+ "type": "object",
1498
+ "properties": {
1499
+ "kind": {
1500
+ "type": "string",
1501
+ "const": "ref"
1502
+ },
1503
+ "ref": {
1504
+ "$ref": "#/$defs/projected-member-ref"
1505
+ }
1506
+ },
1507
+ "required": [
1508
+ "kind",
1509
+ "ref"
1510
+ ],
1511
+ "additionalProperties": false
1512
+ }
1513
+ ]
1514
+ },
1515
+ "policy-definition": {
1516
+ "type": "object",
1517
+ "properties": {
1518
+ "ref": {
1519
+ "$ref": "#/$defs/policy-ref"
1520
+ },
1521
+ "expression": {
1522
+ "anyOf": [
1523
+ {
1524
+ "type": "object",
1525
+ "properties": {
1526
+ "match": {
1527
+ "$ref": "#/$defs/policy-pattern-expr"
1528
+ }
1529
+ },
1530
+ "required": [
1531
+ "match"
1532
+ ],
1533
+ "additionalProperties": false
1534
+ },
1535
+ {
1536
+ "type": "object",
1537
+ "properties": {
1538
+ "allOf": {
1539
+ "minItems": 1,
1540
+ "type": "array",
1541
+ "items": {
1542
+ "$ref": "#/$defs/policy-ref"
1543
+ }
1544
+ }
1545
+ },
1546
+ "required": [
1547
+ "allOf"
1548
+ ],
1549
+ "additionalProperties": false
1550
+ },
1551
+ {
1552
+ "type": "object",
1553
+ "properties": {
1554
+ "anyOf": {
1555
+ "minItems": 1,
1556
+ "type": "array",
1557
+ "items": {
1558
+ "$ref": "#/$defs/policy-ref"
1559
+ }
1560
+ }
1561
+ },
1562
+ "required": [
1563
+ "anyOf"
1564
+ ],
1565
+ "additionalProperties": false
1566
+ }
1567
+ ]
1568
+ },
1569
+ "description": {
1570
+ "$ref": "#/$defs/description"
1571
+ }
1572
+ },
1573
+ "required": [
1574
+ "ref",
1575
+ "expression"
1576
+ ],
1577
+ "additionalProperties": false
1578
+ },
1579
+ "policy-pattern-expr": {
1580
+ "anyOf": [
1581
+ {
1582
+ "type": "object",
1583
+ "properties": {
1584
+ "sameNode": {
1585
+ "type": "object",
1586
+ "properties": {
1587
+ "left": {
1588
+ "$ref": "#/$defs/policy-pattern-node"
1589
+ },
1590
+ "right": {
1591
+ "$ref": "#/$defs/policy-pattern-node"
1592
+ }
1593
+ },
1594
+ "required": [
1595
+ "left",
1596
+ "right"
1597
+ ],
1598
+ "additionalProperties": false
1599
+ }
1600
+ },
1601
+ "required": [
1602
+ "sameNode"
1603
+ ],
1604
+ "additionalProperties": false
1605
+ },
1606
+ {
1607
+ "type": "object",
1608
+ "properties": {
1609
+ "source": {
1610
+ "$ref": "#/$defs/policy-pattern-node"
1611
+ },
1612
+ "class": {
1613
+ "$ref": "#/$defs/class-ref"
1614
+ },
1615
+ "target": {
1616
+ "$ref": "#/$defs/policy-pattern-node"
1617
+ },
1618
+ "repeat": {
1619
+ "$ref": "#/$defs/policy-repeat"
1620
+ }
1621
+ },
1622
+ "required": [
1623
+ "source",
1624
+ "class",
1625
+ "target"
1626
+ ],
1627
+ "additionalProperties": false
1628
+ },
1629
+ {
1630
+ "type": "object",
1631
+ "properties": {
1632
+ "exists": {
1633
+ "type": "object",
1634
+ "properties": {
1635
+ "nodes": {
1636
+ "minItems": 1,
1637
+ "maxItems": 4,
1638
+ "type": "array",
1639
+ "items": {
1640
+ "$ref": "#/$defs/policy-variable"
1641
+ }
1642
+ },
1643
+ "where": {
1644
+ "$ref": "#/$defs/policy-pattern-expr"
1645
+ }
1646
+ },
1647
+ "required": [
1648
+ "nodes",
1649
+ "where"
1650
+ ],
1651
+ "additionalProperties": false
1652
+ }
1653
+ },
1654
+ "required": [
1655
+ "exists"
1656
+ ],
1657
+ "additionalProperties": false
1658
+ },
1659
+ {
1660
+ "type": "object",
1661
+ "properties": {
1662
+ "allOf": {
1663
+ "minItems": 1,
1664
+ "type": "array",
1665
+ "items": {
1666
+ "$ref": "#/$defs/policy-pattern-expr"
1667
+ }
1668
+ }
1669
+ },
1670
+ "required": [
1671
+ "allOf"
1672
+ ],
1673
+ "additionalProperties": false
1674
+ },
1675
+ {
1676
+ "type": "object",
1677
+ "properties": {
1678
+ "anyOf": {
1679
+ "minItems": 1,
1680
+ "type": "array",
1681
+ "items": {
1682
+ "$ref": "#/$defs/policy-pattern-expr"
1683
+ }
1684
+ }
1685
+ },
1686
+ "required": [
1687
+ "anyOf"
1688
+ ],
1689
+ "additionalProperties": false
1690
+ }
1691
+ ]
1692
+ },
1693
+ "policy-pattern-node": {
1694
+ "oneOf": [
1695
+ {
1696
+ "type": "object",
1697
+ "properties": {
1698
+ "kind": {
1699
+ "type": "string",
1700
+ "const": "subject"
1701
+ }
1702
+ },
1703
+ "required": [
1704
+ "kind"
1705
+ ],
1706
+ "additionalProperties": false
1707
+ },
1708
+ {
1709
+ "type": "object",
1710
+ "properties": {
1711
+ "kind": {
1712
+ "type": "string",
1713
+ "const": "object"
1714
+ }
1715
+ },
1716
+ "required": [
1717
+ "kind"
1718
+ ],
1719
+ "additionalProperties": false
1720
+ },
1721
+ {
1722
+ "type": "object",
1723
+ "properties": {
1724
+ "kind": {
1725
+ "type": "string",
1726
+ "const": "source"
1727
+ }
1728
+ },
1729
+ "required": [
1730
+ "kind"
1731
+ ],
1732
+ "additionalProperties": false
1733
+ },
1734
+ {
1735
+ "type": "object",
1736
+ "properties": {
1737
+ "kind": {
1738
+ "type": "string",
1739
+ "const": "target"
1740
+ }
1741
+ },
1742
+ "required": [
1743
+ "kind"
1744
+ ],
1745
+ "additionalProperties": false
1746
+ },
1747
+ {
1748
+ "$ref": "#/$defs/policy-pattern-variable"
1749
+ },
1750
+ {
1751
+ "type": "object",
1752
+ "properties": {
1753
+ "kind": {
1754
+ "type": "string",
1755
+ "const": "ref"
1756
+ },
1757
+ "ref": {
1758
+ "$ref": "#/$defs/projected-member-ref"
1759
+ }
1760
+ },
1761
+ "required": [
1762
+ "kind",
1763
+ "ref"
1764
+ ],
1765
+ "additionalProperties": false
1766
+ }
1767
+ ]
1768
+ },
1769
+ "policy-pattern-variable": {
1770
+ "type": "object",
1771
+ "properties": {
1772
+ "kind": {
1773
+ "type": "string",
1774
+ "const": "variable"
1775
+ },
1776
+ "id": {
1777
+ "type": "integer",
1778
+ "minimum": 0,
1779
+ "maximum": 9007199254740991
1780
+ }
1781
+ },
1782
+ "required": [
1783
+ "kind",
1784
+ "id"
1785
+ ],
1786
+ "additionalProperties": false
1787
+ },
1788
+ "policy-ref": {
1789
+ "type": "object",
1790
+ "properties": {
1791
+ "origin": {
1792
+ "$ref": "#/$defs/origin"
1793
+ },
1794
+ "kind": {
1795
+ "type": "string",
1796
+ "const": "policy"
1797
+ },
1798
+ "name": {
1799
+ "$ref": "#/$defs/name"
1800
+ }
1801
+ },
1802
+ "required": [
1803
+ "origin",
1804
+ "kind",
1805
+ "name"
1806
+ ],
1807
+ "additionalProperties": false
1808
+ },
1809
+ "policy-repeat": {
1810
+ "type": "object",
1811
+ "properties": {
1812
+ "min": {
1813
+ "type": "integer",
1814
+ "minimum": 0,
1815
+ "maximum": 3
1816
+ },
1817
+ "max": {
1818
+ "type": "integer",
1819
+ "minimum": 0,
1820
+ "maximum": 3
1821
+ }
1822
+ },
1823
+ "required": [
1824
+ "min",
1825
+ "max"
1826
+ ],
1827
+ "additionalProperties": false
1828
+ },
1829
+ "policy-variable": {
1830
+ "anyOf": [
1831
+ {
1832
+ "type": "object",
1833
+ "properties": {
1834
+ "variable": {
1835
+ "$ref": "#/$defs/policy-pattern-variable"
1836
+ },
1837
+ "class": {
1838
+ "$ref": "#/$defs/class-ref"
1839
+ }
1840
+ },
1841
+ "required": [
1842
+ "variable",
1843
+ "class"
1844
+ ],
1845
+ "additionalProperties": false
1846
+ },
1847
+ {
1848
+ "type": "object",
1849
+ "properties": {
1850
+ "variable": {
1851
+ "$ref": "#/$defs/policy-pattern-variable"
1852
+ },
1853
+ "selector": {
1854
+ "$ref": "#/$defs/policy-variable-selector"
1855
+ }
1856
+ },
1857
+ "required": [
1858
+ "variable",
1859
+ "selector"
1860
+ ],
1861
+ "additionalProperties": false
1862
+ }
1863
+ ]
1864
+ },
1865
+ "policy-variable-selector": {
1866
+ "oneOf": [
1867
+ {
1868
+ "type": "object",
1869
+ "properties": {
1870
+ "kind": {
1871
+ "type": "string",
1872
+ "const": "any"
1873
+ }
1874
+ },
1875
+ "required": [
1876
+ "kind"
1877
+ ],
1878
+ "additionalProperties": false
1879
+ },
1880
+ {
1881
+ "type": "object",
1882
+ "properties": {
1883
+ "kind": {
1884
+ "type": "string",
1885
+ "const": "satisfies"
1886
+ },
1887
+ "class": {
1888
+ "$ref": "#/$defs/class-ref"
1889
+ }
1890
+ },
1891
+ "required": [
1892
+ "kind",
1893
+ "class"
1894
+ ],
1895
+ "additionalProperties": false
1896
+ }
1897
+ ]
1898
+ },
1899
+ "portable-json": {
1900
+ "anyOf": [
1901
+ {
1902
+ "type": "null"
1903
+ },
1904
+ {
1905
+ "type": "boolean"
1906
+ },
1907
+ {
1908
+ "type": "number"
1909
+ },
1910
+ {
1911
+ "$ref": "#/$defs/portable-string"
1912
+ },
1913
+ {
1914
+ "type": "array",
1915
+ "items": {
1916
+ "$ref": "#/$defs/portable-json"
1917
+ }
1918
+ },
1919
+ {
1920
+ "type": "object",
1921
+ "propertyNames": {
1922
+ "$ref": "#/$defs/portable-string"
1923
+ },
1924
+ "additionalProperties": {
1925
+ "$ref": "#/$defs/portable-json"
1926
+ }
1927
+ }
1928
+ ]
1929
+ },
1930
+ "portable-string": {
1931
+ "type": "string",
1932
+ "not": {
1933
+ "pattern": "\u0000"
1934
+ }
1935
+ },
1936
+ "projected-member-ref": {
1937
+ "oneOf": [
1938
+ {
1939
+ "$ref": "#/$defs/method-address"
1940
+ },
1941
+ {
1942
+ "$ref": "#/$defs/class-ref"
1943
+ },
1944
+ {
1945
+ "$ref": "#/$defs/function-ref"
1946
+ },
1947
+ {
1948
+ "$ref": "#/$defs/policy-ref"
1949
+ },
1950
+ {
1951
+ "$ref": "#/$defs/view-ref"
1952
+ },
1953
+ {
1954
+ "$ref": "#/$defs/core-ref"
1955
+ }
1956
+ ]
1957
+ },
1958
+ "property-key": {
1959
+ "type": "string",
1960
+ "pattern": "^(?:([a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?\\.)+[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?:class\\.[A-Za-z][A-Za-z0-9_]*\\.property\\.[A-Za-z][A-Za-z0-9_]*)$"
1961
+ },
1962
+ "property-values": {
1963
+ "type": "object",
1964
+ "propertyNames": {
1965
+ "$ref": "#/$defs/property-key"
1966
+ },
1967
+ "additionalProperties": {
1968
+ "$ref": "#/$defs/json-value"
1969
+ }
1970
+ },
1971
+ "revision": {
1972
+ "type": "string",
1973
+ "pattern": "^sha256:[0-9a-f]{64}$"
1974
+ },
1975
+ "state-topology": {
1976
+ "type": "object",
1977
+ "properties": {
1978
+ "initial": {
1979
+ "type": "string",
1980
+ "minLength": 1
1981
+ },
1982
+ "transitions": {
1983
+ "type": "object",
1984
+ "propertyNames": {
1985
+ "type": "string",
1986
+ "minLength": 1
1987
+ },
1988
+ "additionalProperties": {
1989
+ "type": "object",
1990
+ "propertyNames": {
1991
+ "type": "string",
1992
+ "minLength": 1
1993
+ },
1994
+ "additionalProperties": {
1995
+ "type": "string",
1996
+ "minLength": 1
1997
+ }
1998
+ }
1999
+ }
2000
+ },
2001
+ "required": [
2002
+ "initial",
2003
+ "transitions"
2004
+ ],
2005
+ "additionalProperties": false
2006
+ },
2007
+ "undirected-endpoints": {
2008
+ "type": "array",
2009
+ "prefixItems": [
2010
+ {
2011
+ "$ref": "#/$defs/incident-endpoint"
2012
+ },
2013
+ {
2014
+ "$ref": "#/$defs/incident-endpoint"
2015
+ }
2016
+ ],
2017
+ "minItems": 2,
2018
+ "maxItems": 2
2019
+ },
2020
+ "value-location": {
2021
+ "anyOf": [
2022
+ {
2023
+ "type": "boolean"
2024
+ },
2025
+ {
2026
+ "type": "object",
2027
+ "propertyNames": {
2028
+ "enum": [
2029
+ "$comment",
2030
+ "$defs",
2031
+ "$id",
2032
+ "$ref",
2033
+ "$schema",
2034
+ "additionalProperties",
2035
+ "allOf",
2036
+ "anyOf",
2037
+ "const",
2038
+ "contains",
2039
+ "contentEncoding",
2040
+ "contentMediaType",
2041
+ "contentSchema",
2042
+ "default",
2043
+ "dependentRequired",
2044
+ "dependentSchemas",
2045
+ "deprecated",
2046
+ "description",
2047
+ "else",
2048
+ "enum",
2049
+ "examples",
2050
+ "exclusiveMaximum",
2051
+ "exclusiveMinimum",
2052
+ "format",
2053
+ "fullMatch",
2054
+ "if",
2055
+ "items",
2056
+ "maxContains",
2057
+ "maxItems",
2058
+ "maxLength",
2059
+ "maxProperties",
2060
+ "maximum",
2061
+ "minContains",
2062
+ "minItems",
2063
+ "minLength",
2064
+ "minProperties",
2065
+ "minimum",
2066
+ "multipleOf",
2067
+ "not",
2068
+ "oneOf",
2069
+ "pattern",
2070
+ "patternProperties",
2071
+ "prefixItems",
2072
+ "properties",
2073
+ "propertyNames",
2074
+ "readOnly",
2075
+ "required",
2076
+ "then",
2077
+ "title",
2078
+ "type",
2079
+ "unevaluatedItems",
2080
+ "unevaluatedProperties",
2081
+ "uniqueItems",
2082
+ "writeOnly",
2083
+ "x-astrale-path",
2084
+ "x-astrale-value-kind"
2085
+ ]
2086
+ },
2087
+ "properties": {
2088
+ "$id": false,
2089
+ "$ref": {
2090
+ "type": "string"
2091
+ },
2092
+ "enum": {
2093
+ "type": "array",
2094
+ "uniqueItems": true
2095
+ },
2096
+ "fullMatch": {
2097
+ "type": "string"
2098
+ },
2099
+ "pattern": {
2100
+ "type": "string"
2101
+ },
2102
+ "x-astrale-path": {
2103
+ "type": "object"
2104
+ },
2105
+ "additionalProperties": {
2106
+ "$ref": "#/$defs/value-subschema"
2107
+ },
2108
+ "contains": {
2109
+ "$ref": "#/$defs/value-subschema"
2110
+ },
2111
+ "contentSchema": {
2112
+ "$ref": "#/$defs/value-subschema"
2113
+ },
2114
+ "else": {
2115
+ "$ref": "#/$defs/value-subschema"
2116
+ },
2117
+ "if": {
2118
+ "$ref": "#/$defs/value-subschema"
2119
+ },
2120
+ "items": {
2121
+ "$ref": "#/$defs/value-subschema"
2122
+ },
2123
+ "not": {
2124
+ "$ref": "#/$defs/value-subschema"
2125
+ },
2126
+ "propertyNames": {
2127
+ "$ref": "#/$defs/value-subschema"
2128
+ },
2129
+ "then": {
2130
+ "$ref": "#/$defs/value-subschema"
2131
+ },
2132
+ "unevaluatedItems": {
2133
+ "$ref": "#/$defs/value-subschema"
2134
+ },
2135
+ "unevaluatedProperties": {
2136
+ "$ref": "#/$defs/value-subschema"
2137
+ },
2138
+ "allOf": {
2139
+ "type": "array",
2140
+ "items": {
2141
+ "$ref": "#/$defs/value-subschema"
2142
+ }
2143
+ },
2144
+ "anyOf": {
2145
+ "type": "array",
2146
+ "items": {
2147
+ "$ref": "#/$defs/value-subschema"
2148
+ }
2149
+ },
2150
+ "oneOf": {
2151
+ "type": "array",
2152
+ "items": {
2153
+ "$ref": "#/$defs/value-subschema"
2154
+ }
2155
+ },
2156
+ "prefixItems": {
2157
+ "type": "array",
2158
+ "items": {
2159
+ "$ref": "#/$defs/value-subschema"
2160
+ }
2161
+ },
2162
+ "$defs": {
2163
+ "type": "object",
2164
+ "additionalProperties": {
2165
+ "$ref": "#/$defs/value-subschema"
2166
+ }
2167
+ },
2168
+ "dependentSchemas": {
2169
+ "type": "object",
2170
+ "additionalProperties": {
2171
+ "$ref": "#/$defs/value-subschema"
2172
+ }
2173
+ },
2174
+ "patternProperties": {
2175
+ "type": "object",
2176
+ "additionalProperties": {
2177
+ "$ref": "#/$defs/value-subschema"
2178
+ }
2179
+ },
2180
+ "properties": {
2181
+ "type": "object",
2182
+ "additionalProperties": {
2183
+ "$ref": "#/$defs/value-subschema"
2184
+ }
2185
+ }
2186
+ },
2187
+ "if": {
2188
+ "required": [
2189
+ "x-astrale-value-kind"
2190
+ ],
2191
+ "properties": {
2192
+ "x-astrale-value-kind": {
2193
+ "const": "instant"
2194
+ }
2195
+ }
2196
+ },
2197
+ "then": {
2198
+ "required": [
2199
+ "type"
2200
+ ],
2201
+ "properties": {
2202
+ "type": {
2203
+ "const": "string"
2204
+ }
2205
+ }
2206
+ }
2207
+ }
2208
+ ]
2209
+ },
2210
+ "value-schema": {
2211
+ "anyOf": [
2212
+ {
2213
+ "type": "boolean"
2214
+ },
2215
+ {
2216
+ "type": "object",
2217
+ "propertyNames": {
2218
+ "not": {
2219
+ "const": "__proto__"
2220
+ }
2221
+ },
2222
+ "additionalProperties": {
2223
+ "$ref": "#/$defs/json-value"
2224
+ }
2225
+ }
2226
+ ],
2227
+ "description": "A value schema of the dialect https://schemas.astrale.ai/dsl/v1/value-schema. The structure admits any boolean or object; the language admits its keywords.",
2228
+ "allOf": [
2229
+ {
2230
+ "$ref": "https://schemas.astrale.ai/dsl/v1/value-schema"
2231
+ },
2232
+ {
2233
+ "$ref": "#/$defs/value-location"
2234
+ },
2235
+ {
2236
+ "anyOf": [
2237
+ {
2238
+ "type": "boolean"
2239
+ },
2240
+ {
2241
+ "type": "object",
2242
+ "properties": {
2243
+ "$schema": {
2244
+ "const": "https://schemas.astrale.ai/dsl/v1/value-schema"
2245
+ },
2246
+ "x-astrale-value-kind": {
2247
+ "enum": [
2248
+ "instant",
2249
+ "blob"
2250
+ ]
2251
+ }
2252
+ }
2253
+ }
2254
+ ]
2255
+ }
2256
+ ]
2257
+ },
2258
+ "value-subschema": {
2259
+ "allOf": [
2260
+ {
2261
+ "$ref": "#/$defs/value-location"
2262
+ },
2263
+ {
2264
+ "anyOf": [
2265
+ {
2266
+ "type": "boolean"
2267
+ },
2268
+ {
2269
+ "type": "object",
2270
+ "properties": {
2271
+ "$schema": false,
2272
+ "x-astrale-value-kind": {
2273
+ "const": "instant"
2274
+ }
2275
+ }
2276
+ }
2277
+ ]
2278
+ }
2279
+ ]
2280
+ },
2281
+ "view-definition": {
2282
+ "type": "object",
2283
+ "properties": {
2284
+ "ref": {
2285
+ "$ref": "#/$defs/view-ref"
2286
+ },
2287
+ "description": {
2288
+ "$ref": "#/$defs/description"
2289
+ },
2290
+ "target": {
2291
+ "$ref": "#/$defs/view-target"
2292
+ }
2293
+ },
2294
+ "required": [
2295
+ "ref",
2296
+ "target"
2297
+ ],
2298
+ "additionalProperties": false
2299
+ },
2300
+ "view-ref": {
2301
+ "type": "object",
2302
+ "properties": {
2303
+ "origin": {
2304
+ "$ref": "#/$defs/origin"
2305
+ },
2306
+ "kind": {
2307
+ "type": "string",
2308
+ "const": "view"
2309
+ },
2310
+ "name": {
2311
+ "$ref": "#/$defs/name"
2312
+ }
2313
+ },
2314
+ "required": [
2315
+ "origin",
2316
+ "kind",
2317
+ "name"
2318
+ ],
2319
+ "additionalProperties": false
2320
+ },
2321
+ "view-target": {
2322
+ "type": "object",
2323
+ "properties": {
2324
+ "kind": {
2325
+ "type": "string",
2326
+ "const": "domain"
2327
+ }
2328
+ },
2329
+ "required": [
2330
+ "kind"
2331
+ ],
2332
+ "additionalProperties": false,
2333
+ "description": "Every View targets its owning Domain."
2334
+ }
2335
+ }
2336
+ }