@astrale-os/kernel-dsl 1.0.0-beta.31 → 1.0.0-beta.33

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 (72) hide show
  1. package/dist/v1/builder/callable/authoring.d.ts +2 -2
  2. package/dist/v1/builder/class/authoring.js +0 -1
  3. package/dist/v1/builder/class/input.d.ts +3 -5
  4. package/dist/v1/builder/index.d.ts +1 -1
  5. package/dist/v1/builder/lowering/class.js +0 -5
  6. package/dist/v1/builder/lowering/policy.js +24 -6
  7. package/dist/v1/builder/lowering/value/zod.js +0 -25
  8. package/dist/v1/builder/policy/authoring.d.ts +33 -7
  9. package/dist/v1/builder/policy/authoring.js +5 -2
  10. package/dist/v1/builder/policy/legacy/inputs.d.ts +8 -0
  11. package/dist/v1/builder/policy/legacy/inputs.js +1 -0
  12. package/dist/v1/compiled/admission/semantics/class.js +0 -15
  13. package/dist/v1/compiled/admission/semantics/context.d.ts +1 -2
  14. package/dist/v1/compiled/admission/semantics/policy/callable.js +2 -2
  15. package/dist/v1/compiled/admission/semantics/policy/parity.js +26 -3
  16. package/dist/v1/compiled/admission/semantics/policy/typing.js +2 -0
  17. package/dist/v1/compiled/admission/wire/class.js +1 -10
  18. package/dist/v1/compiled/admission/wire/entry.js +5 -2
  19. package/dist/v1/compiled/admission/wire/policy.js +21 -1
  20. package/dist/v1/compiled/rule.js +0 -1
  21. package/dist/v1/domain/projection/classes.js +0 -8
  22. package/dist/v1/index.d.ts +1 -1
  23. package/dist/v1/language/callable/admission.js +5 -3
  24. package/dist/v1/language/class/model/class.d.ts +1 -2
  25. package/dist/v1/language/class/resolved.d.ts +0 -7
  26. package/dist/v1/language/index.d.ts +1 -2
  27. package/dist/v1/language/index.js +1 -1
  28. package/dist/v1/language/limits.d.ts +2 -0
  29. package/dist/v1/language/limits.js +2 -0
  30. package/dist/v1/language/policy/analysis/branches.d.ts +1 -1
  31. package/dist/v1/language/policy/analysis/branches.js +6 -0
  32. package/dist/v1/language/policy/analysis/budgets.d.ts +4 -2
  33. package/dist/v1/language/policy/analysis/budgets.js +18 -3
  34. package/dist/v1/language/policy/analysis/checks.d.ts +5 -2
  35. package/dist/v1/language/policy/analysis/checks.js +12 -11
  36. package/dist/v1/language/policy/analysis/typing.d.ts +15 -2
  37. package/dist/v1/language/policy/analysis/typing.js +106 -4
  38. package/dist/v1/language/policy/model/policy.d.ts +13 -0
  39. package/dist/v1/language/policy/model/policy.js +4 -0
  40. package/dist/v1/language/policy/normalization/normalize.js +9 -2
  41. package/dist/v1/schema/.spec/schemas/domain-schema.schema.json +125 -47
  42. package/dist/v1/schema/analysis/class.d.ts +0 -8
  43. package/dist/v1/schema/analysis/class.js +0 -28
  44. package/dist/v1/schema/compatibility/comparators/classes.d.ts +1 -1
  45. package/dist/v1/schema/compatibility/comparators/classes.js +1 -11
  46. package/dist/v1/schema/compatibility/evidence.js +12 -2
  47. package/dist/v1/schema/compatibility/fields.d.ts +2 -2
  48. package/dist/v1/schema/compatibility/fields.js +1 -1
  49. package/dist/v1/schema/diagnostic.d.ts +1 -1
  50. package/dist/v1/schema/enforcement/changes.d.ts +0 -6
  51. package/dist/v1/schema/enforcement/changes.js +0 -6
  52. package/dist/v1/schema/enforcement/derived.d.ts +0 -6
  53. package/dist/v1/schema/enforcement/derived.js +0 -6
  54. package/dist/v1/schema/enforcement/fields.d.ts +0 -1
  55. package/dist/v1/schema/enforcement/fields.js +0 -1
  56. package/dist/v1/schema/enforcement/write.d.ts +0 -7
  57. package/dist/v1/schema/enforcement/write.js +0 -7
  58. package/dist/v1/schema/normalization/domain.js +1 -1
  59. package/dist/v1/schema/resolution/origins.js +7 -2
  60. package/dist/v1/schema/rule.js +6 -10
  61. package/dist/v1/schema/validation/domain.json-schema.js +3 -41
  62. package/dist/v1/schema/validation/domain.structure.d.ts +5 -10
  63. package/dist/v1/schema/validation/domain.structure.js +31 -62
  64. package/dist/v1/schema/validation/policy/budgets.js +2 -1
  65. package/dist/v1/schema/validation/policy/context.d.ts +1 -0
  66. package/dist/v1/schema/validation/policy/context.js +3 -0
  67. package/dist/v1/schema/validation/policy/references.js +4 -1
  68. package/dist/v1/schema/validation/policy/typing.js +6 -0
  69. package/dist/v1/schema/validation/policy/uses.js +24 -2
  70. package/package.json +1 -1
  71. package/dist/v1/language/class/model/data.d.ts +0 -11
  72. package/dist/v1/language/class/model/data.js +0 -2
@@ -4,18 +4,6 @@
4
4
  "title": "V1 DomainSchema",
5
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
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
7
  "portable-json": {
20
8
  "code": "DV_JSON_VALUE",
21
9
  "stage": "structure",
@@ -317,7 +305,7 @@
317
305
  ]
318
306
  },
319
307
  "callable-policy": {
320
- "anyOf": [
308
+ "oneOf": [
321
309
  {
322
310
  "type": "boolean",
323
311
  "const": true
@@ -359,7 +347,7 @@
359
347
  "additionalProperties": false
360
348
  },
361
349
  "class-rule-check-expr": {
362
- "anyOf": [
350
+ "oneOf": [
363
351
  {
364
352
  "type": "object",
365
353
  "properties": {
@@ -401,6 +389,28 @@
401
389
  ],
402
390
  "additionalProperties": false
403
391
  },
392
+ {
393
+ "type": "object",
394
+ "properties": {
395
+ "check": {
396
+ "$ref": "#/$defs/policy-ref"
397
+ },
398
+ "input": {
399
+ "type": "object",
400
+ "propertyNames": {
401
+ "$ref": "#/$defs/name"
402
+ },
403
+ "additionalProperties": {
404
+ "$ref": "#/$defs/class-rule-object"
405
+ }
406
+ }
407
+ },
408
+ "required": [
409
+ "check",
410
+ "input"
411
+ ],
412
+ "additionalProperties": false
413
+ },
404
414
  {
405
415
  "type": "object",
406
416
  "properties": {
@@ -586,12 +596,12 @@
586
596
  },
587
597
  "core-slug": {
588
598
  "type": "string",
589
- "pattern": "^(?=.{1,100}$)[a-z][a-z0-9-]*(?:\\.[a-z][a-z0-9-]*)*$",
590
599
  "minLength": 1,
591
- "maxLength": 100
600
+ "maxLength": 100,
601
+ "pattern": "^(?=.{1,100}$)[a-z][a-z0-9-]*(?:\\.[a-z][a-z0-9-]*)*$"
592
602
  },
593
603
  "create-policy": {
594
- "anyOf": [
604
+ "oneOf": [
595
605
  {
596
606
  "type": "boolean",
597
607
  "const": true
@@ -602,7 +612,7 @@
602
612
  ]
603
613
  },
604
614
  "create-rule-check-expr": {
605
- "anyOf": [
615
+ "oneOf": [
606
616
  {
607
617
  "type": "object",
608
618
  "properties": {
@@ -686,6 +696,42 @@
686
696
  ],
687
697
  "additionalProperties": false
688
698
  },
699
+ {
700
+ "type": "object",
701
+ "properties": {
702
+ "check": {
703
+ "$ref": "#/$defs/policy-ref"
704
+ },
705
+ "input": {
706
+ "type": "object",
707
+ "propertyNames": {
708
+ "$ref": "#/$defs/name"
709
+ },
710
+ "additionalProperties": {
711
+ "type": "object",
712
+ "properties": {
713
+ "kind": {
714
+ "type": "string",
715
+ "const": "ref"
716
+ },
717
+ "ref": {
718
+ "$ref": "#/$defs/projected-member-ref"
719
+ }
720
+ },
721
+ "required": [
722
+ "kind",
723
+ "ref"
724
+ ],
725
+ "additionalProperties": false
726
+ }
727
+ }
728
+ },
729
+ "required": [
730
+ "check",
731
+ "input"
732
+ ],
733
+ "additionalProperties": false
734
+ },
689
735
  {
690
736
  "type": "object",
691
737
  "properties": {
@@ -933,7 +979,7 @@
933
979
  ]
934
980
  },
935
981
  "endpoints": {
936
- "anyOf": [
982
+ "oneOf": [
937
983
  {
938
984
  "$ref": "#/$defs/directed-endpoints"
939
985
  },
@@ -1088,7 +1134,7 @@
1088
1134
  }
1089
1135
  },
1090
1136
  "edge-unique-field": {
1091
- "anyOf": [
1137
+ "oneOf": [
1092
1138
  {
1093
1139
  "type": "string",
1094
1140
  "const": "source"
@@ -1143,7 +1189,7 @@
1143
1189
  "$ref": "#/$defs/description"
1144
1190
  },
1145
1191
  "input": {
1146
- "anyOf": [
1192
+ "oneOf": [
1147
1193
  {
1148
1194
  "$ref": "#/$defs/binary-input"
1149
1195
  },
@@ -1265,7 +1311,7 @@
1265
1311
  "additionalProperties": false
1266
1312
  },
1267
1313
  "json-value": {
1268
- "anyOf": [
1314
+ "oneOf": [
1269
1315
  {
1270
1316
  "type": "null"
1271
1317
  },
@@ -1297,10 +1343,6 @@
1297
1343
  }
1298
1344
  ]
1299
1345
  },
1300
- "media-type": {
1301
- "type": "string",
1302
- "pattern": "^[a-z0-9][a-z0-9!#$&^_.+-]{0,126}\\/[a-z0-9][a-z0-9!#$&^_.+-]{0,126}$"
1303
- },
1304
1346
  "method-address": {
1305
1347
  "type": "object",
1306
1348
  "properties": {
@@ -1434,18 +1476,6 @@
1434
1476
  "methods": {
1435
1477
  "$ref": "#/$defs/method-record"
1436
1478
  },
1437
- "data": {
1438
- "type": "object",
1439
- "properties": {
1440
- "mediaType": {
1441
- "$ref": "#/$defs/media-type"
1442
- }
1443
- },
1444
- "required": [
1445
- "mediaType"
1446
- ],
1447
- "additionalProperties": false
1448
- },
1449
1479
  "icon": {
1450
1480
  "$ref": "#/$defs/icon"
1451
1481
  },
@@ -1572,7 +1602,7 @@
1572
1602
  }
1573
1603
  },
1574
1604
  "observation-policy": {
1575
- "anyOf": [
1605
+ "oneOf": [
1576
1606
  {
1577
1607
  "type": "boolean",
1578
1608
  "const": false
@@ -1587,9 +1617,9 @@
1587
1617
  },
1588
1618
  "origin": {
1589
1619
  "type": "string",
1590
- "pattern": "^(?:[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?\\.)+[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$",
1591
1620
  "minLength": 3,
1592
- "maxLength": 253
1621
+ "maxLength": 253,
1622
+ "pattern": "^(?:[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?\\.)+[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$"
1593
1623
  },
1594
1624
  "path-annotation": {
1595
1625
  "type": "object",
@@ -1619,7 +1649,7 @@
1619
1649
  "additionalProperties": false
1620
1650
  },
1621
1651
  "policy-check-expr": {
1622
- "anyOf": [
1652
+ "oneOf": [
1623
1653
  {
1624
1654
  "type": "object",
1625
1655
  "properties": {
@@ -1661,6 +1691,28 @@
1661
1691
  ],
1662
1692
  "additionalProperties": false
1663
1693
  },
1694
+ {
1695
+ "type": "object",
1696
+ "properties": {
1697
+ "check": {
1698
+ "$ref": "#/$defs/policy-ref"
1699
+ },
1700
+ "input": {
1701
+ "type": "object",
1702
+ "propertyNames": {
1703
+ "$ref": "#/$defs/name"
1704
+ },
1705
+ "additionalProperties": {
1706
+ "$ref": "#/$defs/policy-check-object"
1707
+ }
1708
+ }
1709
+ },
1710
+ "required": [
1711
+ "check",
1712
+ "input"
1713
+ ],
1714
+ "additionalProperties": false
1715
+ },
1664
1716
  {
1665
1717
  "type": "object",
1666
1718
  "properties": {
@@ -1753,7 +1805,7 @@
1753
1805
  "$ref": "#/$defs/policy-ref"
1754
1806
  },
1755
1807
  "expression": {
1756
- "anyOf": [
1808
+ "oneOf": [
1757
1809
  {
1758
1810
  "type": "object",
1759
1811
  "properties": {
@@ -1800,6 +1852,15 @@
1800
1852
  }
1801
1853
  ]
1802
1854
  },
1855
+ "input": {
1856
+ "type": "object",
1857
+ "propertyNames": {
1858
+ "$ref": "#/$defs/name"
1859
+ },
1860
+ "additionalProperties": {
1861
+ "$ref": "#/$defs/class-ref"
1862
+ }
1863
+ },
1803
1864
  "description": {
1804
1865
  "$ref": "#/$defs/description"
1805
1866
  }
@@ -1811,7 +1872,7 @@
1811
1872
  "additionalProperties": false
1812
1873
  },
1813
1874
  "policy-pattern-expr": {
1814
- "anyOf": [
1875
+ "oneOf": [
1815
1876
  {
1816
1877
  "type": "object",
1817
1878
  "properties": {
@@ -1939,6 +2000,23 @@
1939
2000
  ],
1940
2001
  "additionalProperties": false
1941
2002
  },
2003
+ {
2004
+ "type": "object",
2005
+ "properties": {
2006
+ "kind": {
2007
+ "type": "string",
2008
+ "const": "input"
2009
+ },
2010
+ "name": {
2011
+ "$ref": "#/$defs/name"
2012
+ }
2013
+ },
2014
+ "required": [
2015
+ "kind",
2016
+ "name"
2017
+ ],
2018
+ "additionalProperties": false
2019
+ },
1942
2020
  {
1943
2021
  "type": "object",
1944
2022
  "properties": {
@@ -2061,7 +2139,7 @@
2061
2139
  "additionalProperties": false
2062
2140
  },
2063
2141
  "policy-variable": {
2064
- "anyOf": [
2142
+ "oneOf": [
2065
2143
  {
2066
2144
  "type": "object",
2067
2145
  "properties": {
@@ -2450,7 +2528,7 @@
2450
2528
  ]
2451
2529
  },
2452
2530
  "value-schema": {
2453
- "anyOf": [
2531
+ "oneOf": [
2454
2532
  {
2455
2533
  "type": "boolean"
2456
2534
  },
@@ -2579,7 +2657,7 @@
2579
2657
  "description": "Every View targets its owning Domain."
2580
2658
  },
2581
2659
  "write-policy": {
2582
- "anyOf": [
2660
+ "oneOf": [
2583
2661
  {
2584
2662
  "type": "boolean",
2585
2663
  "const": true
@@ -1,7 +1,6 @@
1
1
  import type { ClassRef } from '../../addressing/index.js';
2
2
  import type { MethodDefinition } from '../../language/callable/model/callable.js';
3
3
  import type { ClassDefinition } from '../../language/class/model/class.js';
4
- import type { DataDefinition } from '../../language/class/model/data.js';
5
4
  import type { PropertyAuto, PropertyImmutability } from '../../language/class/model/property.js';
6
5
  import type { StateTopology } from '../../language/state/index.js';
7
6
  import type { JsonSchema } from '../../language/value/model/schema.js';
@@ -25,16 +24,10 @@ export interface EffectiveMethod {
25
24
  readonly name: string;
26
25
  readonly declaration: MethodDefinition;
27
26
  }
28
- interface EffectiveData {
29
- readonly identity: string;
30
- readonly owner: ClassRef;
31
- readonly declaration: DataDefinition;
32
- }
33
27
  export interface DefinitionAnalysis extends MethodComposition<EffectiveMethod> {
34
28
  readonly ref: ClassRef;
35
29
  readonly declaration: ClassDefinition;
36
30
  readonly properties: ReadonlyMap<PropertyKey, EffectiveField>;
37
- readonly data?: EffectiveData;
38
31
  }
39
32
  export interface DefinitionAnalysisResult {
40
33
  readonly definitions: ReadonlyMap<string, DefinitionAnalysis>;
@@ -72,4 +65,3 @@ export declare function methodSignature(value: MethodDefinition): {
72
65
  durable: boolean;
73
66
  } | undefined;
74
67
  };
75
- export {};
@@ -65,13 +65,11 @@ export function analyzeDefinitions(environment) {
65
65
  return analysis === undefined ? [] : [analysis];
66
66
  });
67
67
  const properties = mergeFields(parentAnalyses.map((parent) => parent.properties), ownFields(ref, declaration));
68
- const data = mergeData(ref, declaration, parentAnalyses, report);
69
68
  const methods = mergeMethods(ref, declaration, parentAnalyses, report);
70
69
  const analysis = {
71
70
  ref,
72
71
  declaration,
73
72
  properties,
74
- ...(data === undefined ? {} : { data }),
75
73
  ...methods,
76
74
  };
77
75
  result.set(key, analysis);
@@ -113,32 +111,6 @@ function mergeFields(inherited, own) {
113
111
  }
114
112
  return result;
115
113
  }
116
- function mergeData(owner, declaration, parents, report) {
117
- let effective;
118
- for (const parent of parents) {
119
- if (parent.data === undefined)
120
- continue;
121
- if (effective === undefined) {
122
- effective = parent.data;
123
- continue;
124
- }
125
- if (effective.identity !== parent.data.identity) {
126
- const index = declaration.extends.findIndex((ref) => definitionRefIndex(ref) === definitionRefIndex(parent.ref));
127
- report('DV_DATA_COMPOSITION', `/extends/${index}`, `Data has distinct declaring owners ${formatDefinitionRef(effective.owner)} and ${formatDefinitionRef(parent.data.owner)}.`);
128
- }
129
- }
130
- const own = 'data' in declaration ? declaration.data : undefined;
131
- if (own === undefined)
132
- return effective;
133
- if (effective !== undefined) {
134
- report('DV_DATA_COMPOSITION', '/data', `Data redeclares the inherited contract from ${formatDefinitionRef(effective.owner)}.`);
135
- }
136
- return {
137
- identity: `${definitionRefIndex(owner)}\u0000data`,
138
- owner,
139
- declaration: own,
140
- };
141
- }
142
114
  function mergeMethods(owner, declaration, parents, report) {
143
115
  const own = new Map(Object.entries('methods' in declaration ? declaration.methods : {}).map(([name, method]) => [
144
116
  name,
@@ -14,7 +14,7 @@ interface ClassRequirement {
14
14
  * A reference needs the Class to exist with its kind, abstractness and orientation, and, for an
15
15
  * Edge, the uniqueness tuples that cover it, its ancestors' included: a dependent may name one of
16
16
  * its Edges by any of them. Inheritance additionally takes on the source ancestors, class
17
- * policies, data contract and, for an Edge, the endpoint and constraint contracts. A target
17
+ * policies and, for an Edge, the endpoint and constraint contracts. A target
18
18
  * projected onto a source requirement keeps only the ancestors the source named, so a superset
19
19
  * satisfies it while a removal changes it.
20
20
  */
@@ -12,7 +12,7 @@ import { semanticValueSchema } from './values.js';
12
12
  * A reference needs the Class to exist with its kind, abstractness and orientation, and, for an
13
13
  * Edge, the uniqueness tuples that cover it, its ancestors' included: a dependent may name one of
14
14
  * its Edges by any of them. Inheritance additionally takes on the source ancestors, class
15
- * policies, data contract and, for an Edge, the endpoint and constraint contracts. A target
15
+ * policies and, for an Edge, the endpoint and constraint contracts. A target
16
16
  * projected onto a source requirement keeps only the ancestors the source named, so a superset
17
17
  * satisfies it while a removal changes it.
18
18
  */
@@ -36,16 +36,6 @@ export function classMeaning(context, coordinate, level, onto) {
36
36
  policies: Object.fromEntries(Object.entries(declaration.policies)
37
37
  .filter(([, policy]) => policy !== undefined)
38
38
  .map(([role, policy]) => [role, classPolicyMeaning(policy)])),
39
- ...(declaration.kind === 'node'
40
- ? {
41
- data: analysis.data === undefined
42
- ? null
43
- : {
44
- owner: keyForDefinitionRef(analysis.data.owner),
45
- declaration: analysis.data.declaration,
46
- },
47
- }
48
- : {}),
49
39
  ...(covering.length === 0 ? {} : { unique: covering }),
50
40
  };
51
41
  const meaning = {
@@ -24,8 +24,8 @@ export function evidenceOf({ kind, version, scope, entries, assessments, }) {
24
24
  .map((observation) => [
25
25
  entry.subject.key,
26
26
  evidenceFacet(observation.facet),
27
- observation.before === undefined ? null : fingerprintMeaning(observation.before),
28
- observation.after === undefined ? null : fingerprintMeaning(observation.after),
27
+ evidenceMeaning(observation.facet, observation.before),
28
+ evidenceMeaning(observation.facet, observation.after),
29
29
  ])),
30
30
  assessments: [...assessments]
31
31
  .sort((a, b) => compareUnicode(`${a.subject.key}#${evidenceFacet(a.observation.facet)}`, `${b.subject.key}#${evidenceFacet(b.observation.facet)}`) ||
@@ -47,6 +47,16 @@ export function evidenceOf({ kind, version, scope, entries, assessments, }) {
47
47
  export function losesProperties({ entries }) {
48
48
  return entries.some(({ observations }) => observations.some(({ facet }) => facet === 'class.properties'));
49
49
  }
50
+ /**
51
+ * The inherited meaning of a Node Class kept a data facet, which no schema declares any more: it is
52
+ * always `null`, and evidence keeps it so the same inputs keep their fingerprint.
53
+ */
54
+ function evidenceMeaning(facet, meaning) {
55
+ if (meaning === undefined)
56
+ return null;
57
+ const node = facet === 'class.inherit' && meaning.kind === 'node';
58
+ return fingerprintMeaning(node ? { ...meaning, data: null } : meaning);
59
+ }
50
60
  /** Version-1 evidence keeps its original tags independently of public facet names. */
51
61
  function evidenceFacet(facet) {
52
62
  switch (facet) {
@@ -30,7 +30,6 @@ export declare const CLASS_FIELDS: Readonly<{
30
30
  orientation: "always";
31
31
  extends: "inherit";
32
32
  policies: "inherit";
33
- data: "inherit";
34
33
  endpoints: "inherit";
35
34
  constraints: "inherit";
36
35
  unique: "always";
@@ -87,6 +86,7 @@ export declare const POLICY_FIELDS: Readonly<{
87
86
  excluded: 'identity';
88
87
  }>;
89
88
  expression: "always";
89
+ input: "always";
90
90
  description: Readonly<{
91
91
  excluded: 'annotation';
92
92
  }>;
@@ -129,7 +129,6 @@ export declare const FIELD_ROLES: Readonly<{
129
129
  orientation: "always";
130
130
  extends: "inherit";
131
131
  policies: "inherit";
132
- data: "inherit";
133
132
  endpoints: "inherit";
134
133
  constraints: "inherit";
135
134
  unique: "always";
@@ -179,6 +178,7 @@ export declare const FIELD_ROLES: Readonly<{
179
178
  excluded: 'identity';
180
179
  }>;
181
180
  expression: "always";
181
+ input: "always";
182
182
  description: Readonly<{
183
183
  excluded: 'annotation';
184
184
  }>;
@@ -13,7 +13,6 @@ export const CLASS_FIELDS = Object.freeze({
13
13
  orientation: 'always',
14
14
  extends: 'inherit',
15
15
  policies: 'inherit',
16
- data: 'inherit',
17
16
  endpoints: 'inherit',
18
17
  constraints: 'inherit',
19
18
  // A uniqueness tuple bounds every write of the Classes it covers and what a step through them
@@ -55,6 +54,7 @@ export const CALLABLE_FIELDS = Object.freeze({
55
54
  export const POLICY_FIELDS = Object.freeze({
56
55
  ref: IDENTITY,
57
56
  expression: 'always',
57
+ input: 'always',
58
58
  description: ANNOTATION,
59
59
  });
60
60
  export const VIEW_FIELDS = Object.freeze({
@@ -2,7 +2,7 @@ import type { DiagnosticCode as LanguageDiagnosticCode } from '../language/valid
2
2
  import type { Diagnostic as LanguageDiagnostic } from '../language/validation/diagnostic.js';
3
3
  import type { DiagnosticCode as CompatibilityDiagnosticCode } from './compatibility/model.js';
4
4
  /** The codes a Schema document is refused with, one per rule of `RULES`. */
5
- export type SchemaDiagnosticCode = 'DV_ACCEPTANCE_CONTEXT' | 'DV_CALLABLE_ADMISSION' | 'DV_CALLABLE_AUTH' | 'DV_CALLABLE_IO' | 'DV_CLASS_ABSTRACT' | 'DV_CLASS_ACYCLIC' | 'DV_CLASS_INHERITANCE' | 'DV_CLASS_KIND' | 'DV_CORE_EDGE_CLASS' | 'DV_CORE_EDGE_CONSTRAINTS' | 'DV_CORE_EDGE_KEY' | 'DV_CORE_EDGE_PROPERTIES' | 'DV_CORE_EDGE_UNIQUE' | 'DV_CORE_NODE_CLASS' | 'DV_CORE_NODE_PROPERTIES' | 'DV_CORE_NODE_UNIQUE' | 'DV_CORE_REF' | 'DV_DATA_COMPOSITION' | 'DV_DEPENDENCY_ACYCLIC' | 'DV_DEPENDENCY_DIRECT' | 'DV_DEPENDENCY_EXACT' | 'DV_DEPENDENCY_LIMITS' | 'DV_DEPENDENCY_REVISION_COHERENCE' | 'DV_DEPENDENCY_UNIQUE' | 'DV_DOMAIN_ICON' | 'DV_EDGE_ACCEPTS' | 'DV_EDGE_CLASS_COMPOSITION' | 'DV_EDGE_FOREIGN_MINIMUM' | 'DV_EDGE_LIFETIME' | 'DV_EDGE_ROLE' | 'DV_EDGE_UNIQUE' | 'DV_ENTRYPOINT' | 'DV_INHERITANCE_LIMITS' | 'DV_JSON_VALUE' | 'DV_METHOD_ABSTRACT' | 'DV_METHOD_COMPOSITION' | 'DV_NODE_UNIQUE' | 'DV_PROPERTY_AUTO' | 'DV_PROPERTY_IMMUTABLE' | 'DV_PROPERTY_STATE' | 'DV_REF_RESOLVES' | 'DV_VALUE_SCHEMA' | 'PL_BUDGET' | 'PL_COMPOSITION' | 'PL_CONNECTIVITY' | 'PL_REF' | 'PL_REPEAT' | 'PL_TARGET' | 'PL_TYPING' | 'PL_USE' | 'PL_VARIABLE_SCOPE' | 'STRUCTURE_BINARY_INPUT' | 'STRUCTURE_CALLABLE_POLICY_AUTH' | 'STRUCTURE_DEPENDENCY_ALIAS' | 'STRUCTURE_DOMAIN_NAME' | 'STRUCTURE_DUPLICATE_ITEM' | 'STRUCTURE_EDGE_BLOB' | 'STRUCTURE_EDGE_ORIENTATION' | 'STRUCTURE_FORMAT' | 'STRUCTURE_KEY' | 'STRUCTURE_MAXIMUM' | 'STRUCTURE_MINIMUM' | 'STRUCTURE_PROPERTY_KEY' | 'STRUCTURE_PROTO_KEY' | 'STRUCTURE_REQUIRED' | 'STRUCTURE_STATE_TRANSITIONS' | 'STRUCTURE_TYPE' | 'STRUCTURE_UNION' | 'STRUCTURE_UNKNOWN_FIELD' | 'STRUCTURE_VALUE' | 'UNSUPPORTED_DOCUMENT_FORMAT' | 'UNSUPPORTED_DSL_VERSION';
5
+ export type SchemaDiagnosticCode = 'DV_ACCEPTANCE_CONTEXT' | 'DV_CALLABLE_ADMISSION' | 'DV_CALLABLE_AUTH' | 'DV_CALLABLE_IO' | 'DV_CLASS_ABSTRACT' | 'DV_CLASS_ACYCLIC' | 'DV_CLASS_INHERITANCE' | 'DV_CLASS_KIND' | 'DV_CORE_EDGE_CLASS' | 'DV_CORE_EDGE_CONSTRAINTS' | 'DV_CORE_EDGE_KEY' | 'DV_CORE_EDGE_PROPERTIES' | 'DV_CORE_EDGE_UNIQUE' | 'DV_CORE_NODE_CLASS' | 'DV_CORE_NODE_PROPERTIES' | 'DV_CORE_NODE_UNIQUE' | 'DV_CORE_REF' | 'DV_DEPENDENCY_ACYCLIC' | 'DV_DEPENDENCY_DIRECT' | 'DV_DEPENDENCY_EXACT' | 'DV_DEPENDENCY_LIMITS' | 'DV_DEPENDENCY_REVISION_COHERENCE' | 'DV_DEPENDENCY_UNIQUE' | 'DV_DOMAIN_ICON' | 'DV_EDGE_ACCEPTS' | 'DV_EDGE_CLASS_COMPOSITION' | 'DV_EDGE_FOREIGN_MINIMUM' | 'DV_EDGE_LIFETIME' | 'DV_EDGE_ROLE' | 'DV_EDGE_UNIQUE' | 'DV_ENTRYPOINT' | 'DV_INHERITANCE_LIMITS' | 'DV_JSON_VALUE' | 'DV_METHOD_ABSTRACT' | 'DV_METHOD_COMPOSITION' | 'DV_NODE_UNIQUE' | 'DV_PROPERTY_AUTO' | 'DV_PROPERTY_IMMUTABLE' | 'DV_PROPERTY_STATE' | 'DV_REF_RESOLVES' | 'DV_VALUE_SCHEMA' | 'PL_BUDGET' | 'PL_COMPOSITION' | 'PL_CONNECTIVITY' | 'PL_REF' | 'PL_REPEAT' | 'PL_TARGET' | 'PL_TYPING' | 'PL_USE' | 'PL_VARIABLE_SCOPE' | 'STRUCTURE_BINARY_INPUT' | 'STRUCTURE_CALLABLE_POLICY_AUTH' | 'STRUCTURE_DEPENDENCY_ALIAS' | 'STRUCTURE_DOMAIN_NAME' | 'STRUCTURE_DUPLICATE_ITEM' | 'STRUCTURE_EDGE_BLOB' | 'STRUCTURE_EDGE_ORIENTATION' | 'STRUCTURE_FORMAT' | 'STRUCTURE_KEY' | 'STRUCTURE_MAXIMUM' | 'STRUCTURE_MINIMUM' | 'STRUCTURE_PROPERTY_KEY' | 'STRUCTURE_PROTO_KEY' | 'STRUCTURE_REQUIRED' | 'STRUCTURE_STATE_TRANSITIONS' | 'STRUCTURE_TYPE' | 'STRUCTURE_UNION' | 'STRUCTURE_UNKNOWN_FIELD' | 'STRUCTURE_VALUE' | 'UNSUPPORTED_DOCUMENT_FORMAT' | 'UNSUPPORTED_DSL_VERSION';
6
6
  /**
7
7
  * A Schema refuses a document with its own codes, and a comparison request with the
8
8
  * compatibility codes. `pointer` names the position the refused rule applies to, in the document
@@ -203,12 +203,6 @@ export declare const CHANGES: Readonly<{
203
203
  readonly owes: readonly [];
204
204
  readonly refused: readonly ["IDENTITY_CLASS_REMOVED"];
205
205
  };
206
- readonly CLASS_DATA_CHANGED: {
207
- readonly subjects: readonly ["class.data"];
208
- readonly statement: 'A changed data facet owes nothing: neither the Runtime nor a store reads it.';
209
- readonly bump: 'major';
210
- readonly owes: readonly [];
211
- };
212
206
  readonly CLASS_INHERITANCE_CHANGED: {
213
207
  readonly subjects: readonly ["class.inheritance"];
214
208
  readonly statement: 'A Class moved between internal and final owes nothing: no other Domain could extend it, and only acceptance reads the rule.';
@@ -180,12 +180,6 @@ export const CHANGES = deepFreeze({
180
180
  owes: [],
181
181
  refused: ['IDENTITY_CLASS_REMOVED'],
182
182
  },
183
- CLASS_DATA_CHANGED: {
184
- subjects: ['class.data'],
185
- statement: 'A changed data facet owes nothing: neither the Runtime nor a store reads it.',
186
- bump: 'major',
187
- owes: [],
188
- },
189
183
  CLASS_INHERITANCE_CHANGED: {
190
184
  subjects: ['class.inheritance'],
191
185
  statement: 'A Class moved between internal and final owes nothing: no other Domain could extend it, and only acceptance reads the rule.',
@@ -29,11 +29,6 @@ declare const rows: {
29
29
  statement: string;
30
30
  laws: [string];
31
31
  };
32
- DATA_ONE_OWNER: {
33
- subjects: ["class.data", "class.extends"];
34
- statement: string;
35
- laws: [string];
36
- };
37
32
  ENDPOINT_LIFETIME: {
38
33
  subjects: ["endpoint.onDelete", "endpoint.accepts", "endpoint.outgoing", "endpoint.incoming", "endpoint.incident", "class.inheritance"];
39
34
  statement: string;
@@ -218,7 +213,6 @@ export declare const RESOLVED_MEMBERS: Readonly<{
218
213
  'class.definition': "declared";
219
214
  'class.extends': "declared";
220
215
  'class.policies': "declared";
221
- 'class.data': "DATA_ONE_OWNER";
222
216
  'class.properties': "PROPERTIES_EFFECTIVE";
223
217
  'class.methods': "calls";
224
218
  'class.static': "calls";
@@ -15,11 +15,6 @@ const rows = {
15
15
  statement: 'The Properties of a Class are its own and those of its ancestors, one per full key: a Property reached by two paths counts once, and two Properties of one name with different owners both stay. A short name reads a Property only when one Property holds it.',
16
16
  laws: ['LANGUAGE-PROPERTY-ADDITIVE'],
17
17
  },
18
- DATA_ONE_OWNER: {
19
- subjects: ['class.data', 'class.extends'],
20
- statement: 'A Node Class has the Data one Node Class declares: its own, or the one its ancestors inherit from one owner, however many paths reach it.',
21
- laws: ['DV-DATA-COMPOSITION'],
22
- },
23
18
  ENDPOINT_LIFETIME: {
24
19
  subjects: [
25
20
  'endpoint.onDelete',
@@ -226,7 +221,6 @@ export const RESOLVED_MEMBERS = deepFreeze({
226
221
  'class.definition': 'declared',
227
222
  'class.extends': 'declared',
228
223
  'class.policies': 'declared',
229
- 'class.data': 'DATA_ONE_OWNER',
230
224
  'class.properties': 'PROPERTIES_EFFECTIVE',
231
225
  'class.methods': 'calls',
232
226
  'class.static': 'calls',
@@ -26,7 +26,6 @@ export declare const FIELDS: Readonly<{
26
26
  readonly 'class.policies': {
27
27
  readonly outside: 'authority';
28
28
  };
29
- readonly 'class.data': 'rows';
30
29
  readonly 'class.endpoints': {
31
30
  readonly through: 'endpoint';
32
31
  };
@@ -11,7 +11,6 @@ export const FIELDS = deepFreeze({
11
11
  'class.orientation': 'rows',
12
12
  'class.extends': 'rows',
13
13
  'class.policies': { outside: 'authority' },
14
- 'class.data': 'rows',
15
14
  'class.endpoints': { through: 'endpoint' },
16
15
  'class.constraints': { through: 'constraint' },
17
16
  'class.unique': 'rows',
@@ -1094,13 +1094,6 @@ export declare const WRITE: Readonly<{
1094
1094
  readonly does: 'abstain';
1095
1095
  readonly statement: 'The annotations of a value program, `format` among them, refuse no value.';
1096
1096
  };
1097
- readonly CLASS_DATA_UNENFORCED: {
1098
- readonly phase: 'write';
1099
- readonly layer: 'structure';
1100
- readonly subjects: readonly ["class.data"];
1101
- readonly does: 'abstain';
1102
- readonly statement: 'The payload media type a Node Class declares refuses no write: the Kernel holds no payload of it.';
1103
- };
1104
1097
  readonly GUARD_BEYOND_CALLER_VIEW_UNENFORCED: {
1105
1098
  readonly phase: 'write';
1106
1099
  readonly layer: 'identity';
@@ -847,13 +847,6 @@ export const WRITE = deepFreeze({
847
847
  does: 'abstain',
848
848
  statement: 'The annotations of a value program, `format` among them, refuse no value.',
849
849
  },
850
- CLASS_DATA_UNENFORCED: {
851
- phase: 'write',
852
- layer: 'structure',
853
- subjects: ['class.data'],
854
- does: 'abstain',
855
- statement: 'The payload media type a Node Class declares refuses no write: the Kernel holds no payload of it.',
856
- },
857
850
  GUARD_BEYOND_CALLER_VIEW_UNENFORCED: {
858
851
  phase: 'write',
859
852
  layer: 'identity',