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

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 (413) hide show
  1. package/dist/v1/addressing/class-key.js +3 -3
  2. package/dist/v1/addressing/definition-ref.js +21 -37
  3. package/dist/v1/addressing/domain-dependency.d.ts +0 -6
  4. package/dist/v1/addressing/domain-dependency.js +1 -6
  5. package/dist/v1/addressing/key.d.ts +4 -1
  6. package/dist/v1/addressing/key.js +23 -3
  7. package/dist/v1/addressing/ordering.d.ts +2 -0
  8. package/dist/v1/addressing/ordering.js +2 -0
  9. package/dist/v1/addressing/patterns.d.ts +1 -1
  10. package/dist/v1/addressing/patterns.js +2 -6
  11. package/dist/v1/builder/callable/authoring.d.ts +11 -5
  12. package/dist/v1/builder/callable/authoring.js +2 -0
  13. package/dist/v1/builder/class/authoring.d.ts +94 -224
  14. package/dist/v1/builder/class/authoring.js +30 -35
  15. package/dist/v1/builder/class/handle.d.ts +27 -0
  16. package/dist/v1/builder/class/handle.js +1 -0
  17. package/dist/v1/builder/class/input.d.ts +159 -0
  18. package/dist/v1/builder/class/projection.d.ts +129 -0
  19. package/dist/v1/builder/class/projection.js +1 -0
  20. package/dist/v1/builder/class/property.d.ts +3 -9
  21. package/dist/v1/builder/class/property.js +1 -0
  22. package/dist/v1/builder/core/authoring.d.ts +1 -1
  23. package/dist/v1/builder/index.d.ts +10 -2
  24. package/dist/v1/builder/index.js +2 -0
  25. package/dist/v1/builder/lowering/callable.js +1 -0
  26. package/dist/v1/builder/lowering/class.d.ts +9 -1
  27. package/dist/v1/builder/lowering/class.js +62 -17
  28. package/dist/v1/builder/lowering/policy.js +6 -24
  29. package/dist/v1/builder/lowering/property-keys.d.ts +27 -0
  30. package/dist/v1/builder/lowering/property-keys.js +108 -0
  31. package/dist/v1/builder/lowering/schema/compile.js +13 -6
  32. package/dist/v1/builder/lowering/schema/context.d.ts +9 -1
  33. package/dist/v1/builder/lowering/schema/context.js +36 -7
  34. package/dist/v1/builder/lowering/schema/lifetime.d.ts +11 -0
  35. package/dist/v1/builder/lowering/schema/lifetime.js +55 -0
  36. package/dist/v1/builder/lowering/value/compile.js +29 -22
  37. package/dist/v1/builder/lowering/value/file.d.ts +7 -0
  38. package/dist/v1/builder/lowering/value/file.js +14 -0
  39. package/dist/v1/builder/lowering/value/path.d.ts +1 -1
  40. package/dist/v1/builder/lowering/value/path.js +2 -4
  41. package/dist/v1/builder/lowering/value/zod.js +41 -7
  42. package/dist/v1/builder/policy/authoring.d.ts +80 -9
  43. package/dist/v1/builder/policy/authoring.js +99 -68
  44. package/dist/v1/builder/policy/legacy/edge.d.ts +28 -0
  45. package/dist/v1/builder/policy/legacy/edge.js +16 -0
  46. package/dist/v1/builder/schema/define.d.ts +0 -1
  47. package/dist/v1/builder/schema/diagnostic.d.ts +3 -2
  48. package/dist/v1/builder/schema/diagnostic.js +5 -10
  49. package/dist/v1/builder/schema/input.d.ts +4 -1
  50. package/dist/v1/builder/schema/projection/callable.d.ts +7 -5
  51. package/dist/v1/builder/schema/projection/class.d.ts +78 -16
  52. package/dist/v1/builder/schema/projection/core-input.d.ts +2 -1
  53. package/dist/v1/builder/schema/projection/domain.d.ts +13 -2
  54. package/dist/v1/builder/schema/projection/identity.d.ts +74 -9
  55. package/dist/v1/builder/schema/projection/model.d.ts +4 -2
  56. package/dist/v1/builder/schema/projection/property.d.ts +38 -4
  57. package/dist/v1/builder/schema/projection/resolved-class.d.ts +5 -4
  58. package/dist/v1/builder/schema/projection.d.ts +1 -1
  59. package/dist/v1/builder/schema/rule.d.ts +316 -0
  60. package/dist/v1/builder/schema/rule.js +192 -0
  61. package/dist/v1/builder/value/file.d.ts +34 -0
  62. package/dist/v1/builder/value/file.js +77 -0
  63. package/dist/v1/builder/value/full-match.d.ts +0 -1
  64. package/dist/v1/builder/value/full-match.js +0 -1
  65. package/dist/v1/builder/value/path-metadata.d.ts +1 -1
  66. package/dist/v1/builder/value/path.d.ts +1 -1
  67. package/dist/v1/bundle/codec.js +55 -74
  68. package/dist/v1/bundle/diagnostic.d.ts +3 -1
  69. package/dist/v1/bundle/diagnostic.js +9 -7
  70. package/dist/v1/bundle/index.d.ts +2 -0
  71. package/dist/v1/bundle/index.js +1 -0
  72. package/dist/v1/bundle/model.js +1 -1
  73. package/dist/v1/bundle/rule.d.ts +14 -0
  74. package/dist/v1/bundle/rule.js +41 -0
  75. package/dist/v1/bundle/structure.js +6 -8
  76. package/dist/v1/compiled/admission/accept.js +9 -15
  77. package/dist/v1/compiled/admission/closure.js +17 -34
  78. package/dist/v1/compiled/admission/diagnostic.d.ts +23 -1
  79. package/dist/v1/compiled/admission/diagnostic.js +40 -3
  80. package/dist/v1/compiled/admission/revision.d.ts +9 -1
  81. package/dist/v1/compiled/admission/revision.js +7 -3
  82. package/dist/v1/compiled/admission/semantics/class.d.ts +4 -1
  83. package/dist/v1/compiled/admission/semantics/class.js +48 -19
  84. package/dist/v1/compiled/admission/semantics/core.d.ts +1 -24
  85. package/dist/v1/compiled/admission/semantics/core.js +56 -24
  86. package/dist/v1/compiled/admission/semantics/edge.d.ts +2 -4
  87. package/dist/v1/compiled/admission/semantics/edge.js +6 -65
  88. package/dist/v1/compiled/admission/semantics/policy/admit.js +4 -19
  89. package/dist/v1/compiled/admission/semantics/policy/callable.js +2 -5
  90. package/dist/v1/compiled/admission/semantics/policy/contracts.d.ts +5 -20
  91. package/dist/v1/compiled/admission/semantics/policy/contracts.js +8 -21
  92. package/dist/v1/compiled/admission/semantics/policy/parity.js +44 -53
  93. package/dist/v1/compiled/admission/semantics/policy/pattern.d.ts +4 -1
  94. package/dist/v1/compiled/admission/semantics/policy/pattern.js +7 -21
  95. package/dist/v1/compiled/admission/semantics/policy/typing.d.ts +2 -24
  96. package/dist/v1/compiled/admission/semantics/policy/typing.js +19 -201
  97. package/dist/v1/compiled/admission/wire/callable.d.ts +5 -2
  98. package/dist/v1/compiled/admission/wire/callable.js +24 -20
  99. package/dist/v1/compiled/admission/wire/class.js +79 -30
  100. package/dist/v1/compiled/admission/wire/entry.d.ts +1 -1
  101. package/dist/v1/compiled/admission/wire/entry.js +36 -13
  102. package/dist/v1/compiled/admission/wire/policy.d.ts +4 -3
  103. package/dist/v1/compiled/admission/wire/policy.js +27 -20
  104. package/dist/v1/compiled/admission/wire/program.d.ts +13 -3
  105. package/dist/v1/compiled/admission/wire/program.js +39 -44
  106. package/dist/v1/compiled/admission/wire/property.d.ts +4 -1
  107. package/dist/v1/compiled/admission/wire/property.js +8 -5
  108. package/dist/v1/compiled/admission/wire/value.d.ts +0 -2
  109. package/dist/v1/compiled/admission/wire/value.js +0 -7
  110. package/dist/v1/compiled/codec/json.js +4 -3
  111. package/dist/v1/compiled/compiler/compile.js +15 -33
  112. package/dist/v1/compiled/diagnostic.d.ts +1 -1
  113. package/dist/v1/compiled/diagnostic.js +2 -3
  114. package/dist/v1/compiled/index.d.ts +2 -0
  115. package/dist/v1/compiled/index.js +1 -0
  116. package/dist/v1/compiled/loader/load.d.ts +3 -2
  117. package/dist/v1/compiled/loader/load.js +13 -52
  118. package/dist/v1/compiled/model/schema.d.ts +3 -0
  119. package/dist/v1/compiled/rule.d.ts +49 -0
  120. package/dist/v1/compiled/rule.js +169 -0
  121. package/dist/v1/domain/create.js +9 -10
  122. package/dist/v1/domain/model/domain.d.ts +2 -7
  123. package/dist/v1/domain/model/input.d.ts +19 -10
  124. package/dist/v1/domain/namespace/member-collection.js +8 -7
  125. package/dist/v1/domain/projection/classes.js +11 -8
  126. package/dist/v1/domain/validation/create.d.ts +7 -16
  127. package/dist/v1/domain/validation/create.js +35 -81
  128. package/dist/v1/index.d.ts +5 -3
  129. package/dist/v1/index.js +1 -1
  130. package/dist/v1/language/.spec/schemas/draft-2020-12.schema.json +462 -0
  131. package/dist/v1/language/.spec/schemas/value-schema.schema.json +23 -0
  132. package/dist/v1/language/callable/admission.d.ts +15 -0
  133. package/dist/v1/language/callable/admission.js +44 -0
  134. package/dist/v1/language/callable/model/callable.d.ts +10 -0
  135. package/dist/v1/language/callable/resolved.d.ts +26 -5
  136. package/dist/v1/language/chain.d.ts +7 -0
  137. package/dist/v1/language/chain.js +24 -0
  138. package/dist/v1/language/class/inheritance.d.ts +36 -5
  139. package/dist/v1/language/class/inheritance.js +85 -1
  140. package/dist/v1/language/class/lifetime.d.ts +50 -11
  141. package/dist/v1/language/class/lifetime.js +89 -20
  142. package/dist/v1/language/class/model/class.d.ts +45 -9
  143. package/dist/v1/language/class/model/edge.d.ts +31 -2
  144. package/dist/v1/language/class/model/property.d.ts +16 -7
  145. package/dist/v1/language/class/property-values.js +2 -4
  146. package/dist/v1/language/class/resolved.d.ts +9 -4
  147. package/dist/v1/language/class/unique.d.ts +143 -0
  148. package/dist/v1/language/class/unique.js +264 -0
  149. package/dist/v1/language/core/facts.d.ts +85 -0
  150. package/dist/v1/language/core/facts.js +116 -0
  151. package/dist/v1/language/cycle.d.ts +10 -0
  152. package/dist/v1/language/cycle.js +30 -0
  153. package/dist/v1/language/definition/metadata.d.ts +38 -0
  154. package/dist/v1/language/definition/metadata.js +51 -0
  155. package/dist/v1/language/freeze.d.ts +5 -0
  156. package/dist/v1/{schema/canonical → language}/freeze.js +4 -0
  157. package/dist/v1/language/index.d.ts +7 -2
  158. package/dist/v1/language/index.js +5 -1
  159. package/dist/v1/language/limits.d.ts +83 -0
  160. package/dist/v1/language/limits.js +77 -0
  161. package/dist/v1/language/policy/analysis/branches.d.ts +8 -0
  162. package/dist/v1/language/policy/analysis/branches.js +8 -8
  163. package/dist/v1/language/policy/analysis/budgets.d.ts +45 -12
  164. package/dist/v1/language/policy/analysis/budgets.js +140 -20
  165. package/dist/v1/language/policy/analysis/checks.js +8 -6
  166. package/dist/v1/language/policy/analysis/composition.d.ts +4 -0
  167. package/dist/v1/language/policy/analysis/composition.js +11 -0
  168. package/dist/v1/language/policy/analysis/typing.d.ts +51 -0
  169. package/dist/v1/language/policy/analysis/typing.js +456 -0
  170. package/dist/v1/language/policy/model/policy.d.ts +71 -9
  171. package/dist/v1/language/policy/model/policy.js +42 -4
  172. package/dist/v1/language/policy/normalization/normalize.d.ts +6 -6
  173. package/dist/v1/language/policy/normalization/normalize.js +46 -68
  174. package/dist/v1/language/suspended.d.ts +7 -0
  175. package/dist/v1/language/suspended.js +23 -0
  176. package/dist/v1/language/validation/diagnostic.d.ts +15 -1
  177. package/dist/v1/language/validation/diagnostic.js +21 -0
  178. package/dist/v1/language/validation/rule.d.ts +45 -0
  179. package/dist/v1/language/validation/rule.js +109 -0
  180. package/dist/v1/language/value/compile/fields.js +16 -16
  181. package/dist/v1/language/value/compile/load.d.ts +5 -0
  182. package/dist/v1/language/value/compile/load.js +13 -0
  183. package/dist/v1/language/value/evaluate/assertions.d.ts +5 -1
  184. package/dist/v1/language/value/evaluate/assertions.js +19 -8
  185. package/dist/v1/language/value/evaluate/evaluator.js +117 -120
  186. package/dist/v1/language/value/evaluate/preparation.d.ts +16 -0
  187. package/dist/v1/language/value/evaluate/preparation.js +100 -47
  188. package/dist/v1/language/value/evaluate/program.d.ts +2 -1
  189. package/dist/v1/language/value/evaluate/program.js +6 -6
  190. package/dist/v1/language/value/evaluate/validate.d.ts +3 -3
  191. package/dist/v1/language/value/evaluate/validate.js +15 -11
  192. package/dist/v1/language/value/evaluate/validity.optimization.d.ts +14 -0
  193. package/dist/v1/language/value/evaluate/validity.optimization.js +338 -0
  194. package/dist/v1/language/value/files.d.ts +44 -0
  195. package/dist/v1/language/value/files.js +151 -0
  196. package/dist/v1/language/value/inclusion/arrays.d.ts +3 -0
  197. package/dist/v1/language/value/inclusion/arrays.js +85 -0
  198. package/dist/v1/language/value/inclusion/assertions.d.ts +18 -0
  199. package/dist/v1/language/value/inclusion/assertions.js +28 -0
  200. package/dist/v1/language/value/inclusion/combinators.d.ts +3 -0
  201. package/dist/v1/language/value/inclusion/combinators.js +67 -0
  202. package/dist/v1/language/value/inclusion/equivalence.d.ts +4 -0
  203. package/dist/v1/language/value/inclusion/equivalence.js +76 -0
  204. package/dist/v1/language/value/inclusion/evidence.d.ts +34 -0
  205. package/dist/v1/language/value/inclusion/evidence.js +140 -0
  206. package/dist/v1/language/value/inclusion/includes.d.ts +29 -3
  207. package/dist/v1/language/value/inclusion/includes.js +58 -723
  208. package/dist/v1/language/value/inclusion/keywords.d.ts +5 -0
  209. package/dist/v1/language/value/inclusion/keywords.js +31 -0
  210. package/dist/v1/language/value/inclusion/kinds.d.ts +17 -0
  211. package/dist/v1/language/value/inclusion/kinds.js +57 -0
  212. package/dist/v1/language/value/inclusion/location.d.ts +24 -0
  213. package/dist/v1/language/value/inclusion/location.js +66 -0
  214. package/dist/v1/language/value/inclusion/numbers.d.ts +3 -0
  215. package/dist/v1/language/value/inclusion/numbers.js +41 -0
  216. package/dist/v1/language/value/inclusion/objects.d.ts +3 -0
  217. package/dist/v1/language/value/inclusion/objects.js +190 -0
  218. package/dist/v1/language/value/inclusion/strings.d.ts +3 -0
  219. package/dist/v1/language/value/inclusion/strings.js +29 -0
  220. package/dist/v1/language/value/inclusion/types.d.ts +3 -0
  221. package/dist/v1/language/value/inclusion/types.js +34 -0
  222. package/dist/v1/language/value/model/blob.d.ts +6 -0
  223. package/dist/v1/language/value/model/blob.js +8 -0
  224. package/dist/v1/language/value/model/file.d.ts +41 -0
  225. package/dist/v1/language/value/model/file.js +122 -0
  226. package/dist/v1/language/value/ordering.d.ts +14 -0
  227. package/dist/v1/language/value/ordering.js +144 -77
  228. package/dist/v1/language/value/profile/canonicalize.d.ts +6 -1
  229. package/dist/v1/language/value/profile/canonicalize.js +67 -87
  230. package/dist/v1/language/value/profile/json.validate.d.ts +12 -0
  231. package/dist/v1/language/value/profile/json.validate.js +18 -5
  232. package/dist/v1/language/value/profile/meta-schema.compiled.d.ts +1 -0
  233. package/dist/v1/language/value/profile/meta-schema.compiled.js +21 -5
  234. package/dist/v1/language/value/profile/rules.js +27 -44
  235. package/dist/v1/language/value/profile/validate.js +1 -10
  236. package/dist/v1/language/value/profile/vocabulary.d.ts +36 -2
  237. package/dist/v1/language/value/profile/vocabulary.js +58 -5
  238. package/dist/v1/language/value/reference/closure.js +6 -6
  239. package/dist/v1/language/value/reference/recursion.js +9 -48
  240. package/dist/v1/language/value/reference/references.d.ts +3 -1
  241. package/dist/v1/language/value/reference/references.js +7 -7
  242. package/dist/v1/language/value/reference/registry.index.d.ts +2 -0
  243. package/dist/v1/language/value/reference/registry.index.js +33 -16
  244. package/dist/v1/language/value/regexp/ast.js +6 -7
  245. package/dist/v1/language/value/regexp/compile.d.ts +5 -11
  246. package/dist/v1/language/value/regexp/compile.js +14 -12
  247. package/dist/v1/language/value/regexp/syntax.js +3 -2
  248. package/dist/v1/language/value/regexp/unicode.d.ts +1 -1
  249. package/dist/v1/language/value/regexp/unicode.js +1 -1
  250. package/dist/v1/language/value/syntax/keywords.d.ts +3 -3
  251. package/dist/v1/language/value/syntax/keywords.js +4 -20
  252. package/dist/v1/language/value/syntax/node-path/validate.js +2 -3
  253. package/dist/v1/language/value/syntax/pointer.d.ts +2 -0
  254. package/dist/v1/language/value/syntax/pointer.js +5 -2
  255. package/dist/v1/language/value/syntax/walk.d.ts +9 -0
  256. package/dist/v1/language/value/syntax/walk.js +37 -20
  257. package/dist/v1/schema/.spec/schemas/domain-schema.schema.json +2596 -0
  258. package/dist/v1/schema/admission/accept.d.ts +3 -1
  259. package/dist/v1/schema/admission/accept.js +6 -14
  260. package/dist/v1/schema/admission/callable.d.ts +21 -0
  261. package/dist/v1/schema/admission/callable.js +96 -0
  262. package/dist/v1/schema/analysis/class.d.ts +4 -0
  263. package/dist/v1/schema/analysis/class.js +57 -17
  264. package/dist/v1/schema/canonical/revision.d.ts +4 -1
  265. package/dist/v1/schema/canonical/revision.js +8 -5
  266. package/dist/v1/schema/compatibility/api.d.ts +4 -1
  267. package/dist/v1/schema/compatibility/api.js +2 -0
  268. package/dist/v1/schema/compatibility/comparators/callables.js +1 -1
  269. package/dist/v1/schema/compatibility/comparators/classes.d.ts +9 -4
  270. package/dist/v1/schema/compatibility/comparators/classes.js +50 -29
  271. package/dist/v1/schema/compatibility/comparators/index.d.ts +1 -1
  272. package/dist/v1/schema/compatibility/comparators/members.js +1 -1
  273. package/dist/v1/schema/compatibility/comparators/values.js +2 -2
  274. package/dist/v1/schema/compatibility/context.d.ts +5 -2
  275. package/dist/v1/schema/compatibility/context.js +8 -6
  276. package/dist/v1/schema/compatibility/coordinate.js +3 -3
  277. package/dist/v1/schema/compatibility/diff.js +2 -4
  278. package/dist/v1/schema/compatibility/extension.d.ts +11 -0
  279. package/dist/v1/schema/compatibility/extension.js +22 -0
  280. package/dist/v1/schema/compatibility/fields.d.ts +20 -4
  281. package/dist/v1/schema/compatibility/fields.js +13 -3
  282. package/dist/v1/schema/compatibility/meaning/footprint.js +16 -51
  283. package/dist/v1/schema/compatibility/model.d.ts +17 -5
  284. package/dist/v1/schema/compatibility/references.d.ts +0 -3
  285. package/dist/v1/schema/compatibility/references.js +1 -9
  286. package/dist/v1/schema/compatibility/report.js +1 -1
  287. package/dist/v1/schema/compatibility/rule.d.ts +13 -0
  288. package/dist/v1/schema/compatibility/rule.js +23 -0
  289. package/dist/v1/schema/compatibility/scope.d.ts +2 -0
  290. package/dist/v1/schema/compatibility/scope.js +4 -1
  291. package/dist/v1/schema/compatibility/structure/index.js +6 -4
  292. package/dist/v1/schema/compatibility/structure/requirements.js +58 -61
  293. package/dist/v1/schema/compatibility/versioning/index.js +1 -1
  294. package/dist/v1/schema/compatibility/versioning/surface.d.ts +1 -1
  295. package/dist/v1/schema/compatibility/versioning/surface.js +30 -2
  296. package/dist/v1/schema/compatibility/walk.d.ts +17 -0
  297. package/dist/v1/schema/compatibility/walk.js +41 -0
  298. package/dist/v1/schema/diagnostic.d.ts +17 -3
  299. package/dist/v1/schema/diagnostic.js +14 -11
  300. package/dist/v1/schema/enforcement/changes.d.ts +590 -0
  301. package/dist/v1/schema/enforcement/changes.js +566 -0
  302. package/dist/v1/schema/enforcement/derived.d.ts +236 -0
  303. package/dist/v1/schema/enforcement/derived.js +243 -0
  304. package/dist/v1/schema/enforcement/dispose.d.ts +308 -0
  305. package/dist/v1/schema/enforcement/dispose.js +275 -0
  306. package/dist/v1/schema/enforcement/facts.d.ts +89 -0
  307. package/dist/v1/schema/enforcement/facts.js +70 -0
  308. package/dist/v1/schema/enforcement/fields.d.ts +65 -0
  309. package/dist/v1/schema/enforcement/fields.js +36 -0
  310. package/dist/v1/schema/enforcement/index.d.ts +39 -0
  311. package/dist/v1/schema/enforcement/index.js +10 -0
  312. package/dist/v1/schema/enforcement/install.d.ts +1634 -0
  313. package/dist/v1/schema/enforcement/install.js +1223 -0
  314. package/dist/v1/schema/enforcement/lifecycle.d.ts +87 -0
  315. package/dist/v1/schema/enforcement/lifecycle.js +91 -0
  316. package/dist/v1/schema/enforcement/model.d.ts +253 -0
  317. package/dist/v1/schema/enforcement/model.js +1 -0
  318. package/dist/v1/schema/enforcement/obligations.d.ts +248 -0
  319. package/dist/v1/schema/enforcement/obligations.js +240 -0
  320. package/dist/v1/schema/enforcement/write.d.ts +1314 -0
  321. package/dist/v1/schema/enforcement/write.js +1017 -0
  322. package/dist/v1/schema/index.d.ts +11 -1
  323. package/dist/v1/schema/index.js +5 -0
  324. package/dist/v1/schema/model/schema.d.ts +23 -1
  325. package/dist/v1/schema/model/schema.js +1 -1
  326. package/dist/v1/schema/normalization/domain.d.ts +2 -0
  327. package/dist/v1/schema/normalization/domain.js +50 -13
  328. package/dist/v1/schema/resolution/closure.js +2 -1
  329. package/dist/v1/schema/resolution/context.js +17 -18
  330. package/dist/v1/schema/resolution/domain.d.ts +5 -0
  331. package/dist/v1/schema/resolution/domain.js +6 -12
  332. package/dist/v1/schema/resolution/origins.js +6 -8
  333. package/dist/v1/schema/rule.d.ts +25 -0
  334. package/dist/v1/schema/rule.js +459 -0
  335. package/dist/v1/schema/validation/callable.d.ts +35 -2
  336. package/dist/v1/schema/validation/callable.js +65 -9
  337. package/dist/v1/schema/validation/class.d.ts +6 -2
  338. package/dist/v1/schema/validation/class.js +128 -105
  339. package/dist/v1/schema/validation/core.js +103 -173
  340. package/dist/v1/schema/validation/domain.js +25 -15
  341. package/dist/v1/schema/validation/domain.json-schema.d.ts +15 -0
  342. package/dist/v1/schema/validation/domain.json-schema.js +222 -0
  343. package/dist/v1/schema/validation/domain.route.d.ts +6 -1
  344. package/dist/v1/schema/validation/domain.route.js +18 -0
  345. package/dist/v1/schema/validation/domain.structure.d.ts +7797 -0
  346. package/dist/v1/schema/validation/domain.structure.js +516 -160
  347. package/dist/v1/schema/validation/icon.d.ts +4 -0
  348. package/dist/v1/schema/validation/icon.js +29 -0
  349. package/dist/v1/schema/validation/json.json-schema.d.ts +40 -0
  350. package/dist/v1/schema/validation/json.json-schema.js +46 -0
  351. package/dist/v1/schema/validation/policy/budgets.d.ts +37 -2
  352. package/dist/v1/schema/validation/policy/budgets.js +94 -121
  353. package/dist/v1/schema/validation/policy/context.d.ts +6 -5
  354. package/dist/v1/schema/validation/policy/context.js +7 -10
  355. package/dist/v1/schema/validation/policy/objects.d.ts +1 -1
  356. package/dist/v1/schema/validation/policy/objects.js +6 -14
  357. package/dist/v1/schema/validation/policy/references.js +20 -62
  358. package/dist/v1/schema/validation/policy/typing.d.ts +3 -18
  359. package/dist/v1/schema/validation/policy/typing.js +22 -356
  360. package/dist/v1/schema/validation/policy/uses.d.ts +40 -3
  361. package/dist/v1/schema/validation/policy/uses.js +63 -91
  362. package/dist/v1/schema/validation/policy/validate.js +5 -5
  363. package/dist/v1/schema/validation/value-api.d.ts +27 -1
  364. package/dist/v1/schema/validation/value-api.js +37 -2
  365. package/dist/v1/schema/validation/value.d.ts +3 -0
  366. package/dist/v1/schema/validation/value.js +9 -17
  367. package/dist/v1/schema/validation/value.json-schema.d.ts +54 -0
  368. package/dist/v1/schema/validation/value.json-schema.js +163 -0
  369. package/dist/v1/schema/validation/view.js +4 -8
  370. package/dist/value/accept.d.ts +9 -3
  371. package/dist/value/accept.js +25 -1
  372. package/dist/value/canonical.d.ts +22 -1
  373. package/dist/value/canonical.js +114 -21
  374. package/dist/value/decode.d.ts +7 -0
  375. package/dist/value/decode.js +159 -9
  376. package/dist/value/equal.d.ts +9 -1
  377. package/dist/value/equal.js +37 -3
  378. package/dist/value/immutable.optimization.d.ts +2 -0
  379. package/dist/value/immutable.optimization.js +4 -0
  380. package/dist/value/index.d.ts +5 -3
  381. package/dist/value/index.js +2 -1
  382. package/dist/value/json.d.ts +2 -2
  383. package/dist/value/json.js +2 -2
  384. package/dist/value/limits.d.ts +11 -0
  385. package/dist/value/rule.d.ts +12 -0
  386. package/dist/value/rule.js +50 -0
  387. package/dist/value/types.d.ts +6 -0
  388. package/dist/value/unicode.d.ts +2 -1
  389. package/dist/value/unicode.js +2 -0
  390. package/package.json +15 -4
  391. package/dist/v1/builder/lowering/core-properties.d.ts +0 -10
  392. package/dist/v1/builder/lowering/core-properties.js +0 -76
  393. package/dist/v1/compiled/admission/semantics/cardinality.d.ts +0 -5
  394. package/dist/v1/compiled/admission/semantics/cardinality.js +0 -113
  395. package/dist/v1/compiled/admission/semantics/policy/equality.d.ts +0 -8
  396. package/dist/v1/compiled/admission/semantics/policy/equality.js +0 -27
  397. package/dist/v1/compiled/admission/semantics/policy/measure.d.ts +0 -9
  398. package/dist/v1/compiled/admission/semantics/policy/measure.js +0 -81
  399. package/dist/v1/compiled/admission/semantics/policy/variants.d.ts +0 -10
  400. package/dist/v1/compiled/admission/semantics/policy/variants.js +0 -65
  401. package/dist/v1/compiled/admission/wire/pattern.d.ts +0 -12
  402. package/dist/v1/compiled/admission/wire/pattern.js +0 -111
  403. package/dist/v1/language/class/index.d.ts +0 -8
  404. package/dist/v1/language/class/index.js +0 -1
  405. package/dist/v1/language/core/index.d.ts +0 -2
  406. package/dist/v1/language/value/index.d.ts +0 -11
  407. package/dist/v1/language/value/index.js +0 -8
  408. package/dist/v1/schema/canonical/domain.d.ts +0 -3
  409. package/dist/v1/schema/canonical/domain.digest.d.ts +0 -3
  410. package/dist/v1/schema/canonical/domain.digest.js +0 -5
  411. package/dist/v1/schema/canonical/domain.js +0 -5
  412. package/dist/v1/schema/canonical/freeze.d.ts +0 -1
  413. /package/dist/v1/{language/core/index.js → builder/class/input.js} +0 -0
@@ -0,0 +1,236 @@
1
+ import type { AnyResolvedClass, ResolvedProperty } from '../../language/class/resolved.js';
2
+ import type { EnforcementSubject } from './model.js';
3
+ /**
4
+ * What a declaration means once composed: what the Kernel derives from a Schema or from a stored
5
+ * fact, whatever any request asks. The other tables state what is refused and what happens to data;
6
+ * they read these meanings without restating them.
7
+ */
8
+ export interface DerivedMeaning {
9
+ /** What the meaning is derived from: the fields a Schema declares, or a fact of the Kernel's. */
10
+ readonly subjects: readonly [EnforcementSubject, ...EnforcementSubject[]];
11
+ /** The meaning, in plain sentences. */
12
+ readonly statement: string;
13
+ /** The Codegraph laws which state it. */
14
+ readonly laws: readonly [string, ...string[]];
15
+ }
16
+ declare const rows: {
17
+ CLASS_ROOT: {
18
+ subjects: ["class.extends", "class.kind"];
19
+ statement: string;
20
+ laws: [string, string];
21
+ };
22
+ CLASS_SATISFACTION: {
23
+ subjects: ["class.extends"];
24
+ statement: string;
25
+ laws: [string];
26
+ };
27
+ PROPERTIES_EFFECTIVE: {
28
+ subjects: ["class.properties", "class.extends"];
29
+ statement: string;
30
+ laws: [string];
31
+ };
32
+ DATA_ONE_OWNER: {
33
+ subjects: ["class.data", "class.extends"];
34
+ statement: string;
35
+ laws: [string];
36
+ };
37
+ ENDPOINT_LIFETIME: {
38
+ subjects: ["endpoint.onDelete", "endpoint.accepts", "endpoint.outgoing", "endpoint.incoming", "endpoint.incident", "class.inheritance"];
39
+ statement: string;
40
+ laws: [string, string, string];
41
+ };
42
+ EDGE_CONTRACT_INHERITED: {
43
+ subjects: ["class.extends", "class.orientation", "class.constraints", "endpoint.accepts", "endpoint.outgoing", "endpoint.incoming", "endpoint.incident"];
44
+ statement: string;
45
+ laws: [string];
46
+ };
47
+ UNDIRECTED_ROLES_OVERLAP: {
48
+ subjects: ["endpoint.accepts", "endpoint.incident"];
49
+ statement: string;
50
+ laws: [string];
51
+ };
52
+ UNIQUE_COVERS: {
53
+ subjects: ["class.unique", "class.extends"];
54
+ statement: string;
55
+ laws: [string, string, string, string];
56
+ };
57
+ UNIQUE_KEY: {
58
+ subjects: ["class.unique"];
59
+ statement: string;
60
+ laws: [string, string, string, string];
61
+ };
62
+ UNIQUE_SPELLING: {
63
+ subjects: ["class.unique"];
64
+ statement: string;
65
+ laws: [string, string];
66
+ };
67
+ PROPERTY_ORDERING: {
68
+ subjects: ["property.schema"];
69
+ statement: string;
70
+ laws: [string, string];
71
+ };
72
+ AUTO_EXPLICIT: {
73
+ subjects: ["property.auto"];
74
+ statement: string;
75
+ laws: [string];
76
+ };
77
+ REVISION_SET_ORDER: {
78
+ subjects: ["schema.document"];
79
+ statement: string;
80
+ laws: [string];
81
+ };
82
+ REVISION_NAME: {
83
+ subjects: ["schema.document"];
84
+ statement: string;
85
+ laws: [string];
86
+ };
87
+ REVISION_AUTHORING_INDEPENDENT: {
88
+ subjects: ["schema.document"];
89
+ statement: string;
90
+ laws: [string];
91
+ };
92
+ REVISION_OF_ROOT: {
93
+ subjects: ["schema.document"];
94
+ statement: string;
95
+ laws: [string];
96
+ };
97
+ COMPILED_BYTES: {
98
+ subjects: ["schema.document"];
99
+ statement: string;
100
+ laws: [string];
101
+ };
102
+ COMPILED_READS_AS_SOURCE: {
103
+ subjects: ["schema.document"];
104
+ statement: string;
105
+ laws: [string];
106
+ };
107
+ COMPILED_READS_ITS_REVISION: {
108
+ subjects: ["schema.document"];
109
+ statement: string;
110
+ laws: [string, string, string, string];
111
+ };
112
+ COORDINATE_KEY: {
113
+ subjects: ["schema.document"];
114
+ statement: string;
115
+ laws: [string, string, string, string];
116
+ };
117
+ CLOSURE_RETAINED: {
118
+ subjects: ["schema.document"];
119
+ statement: string;
120
+ laws: [string];
121
+ };
122
+ VALUE_EQUAL: {
123
+ subjects: ["property.schema", "value"];
124
+ statement: string;
125
+ laws: [string, string, string];
126
+ };
127
+ VALUE_CANONICAL: {
128
+ subjects: ["value"];
129
+ statement: string;
130
+ laws: [string, string];
131
+ };
132
+ VALUE_INSTANT: {
133
+ subjects: ["property.schema", "value"];
134
+ statement: string;
135
+ laws: [string];
136
+ };
137
+ VALUE_PATTERN: {
138
+ subjects: ["property.schema"];
139
+ statement: string;
140
+ laws: [string];
141
+ };
142
+ VALUE_EVALUATION: {
143
+ subjects: ["property.schema", "value"];
144
+ statement: string;
145
+ laws: [string, string, string];
146
+ };
147
+ VALUE_INCLUSION: {
148
+ subjects: ["property.schema"];
149
+ statement: string;
150
+ laws: [string, string];
151
+ };
152
+ NODE_IDENTITY: {
153
+ subjects: ["fact.node"];
154
+ statement: string;
155
+ laws: [string, string];
156
+ };
157
+ EDGE_IDENTITY: {
158
+ subjects: ["fact.edge"];
159
+ statement: string;
160
+ laws: [string, string];
161
+ };
162
+ GRAPH_OPEN: {
163
+ subjects: ["fact.node", "fact.edge"];
164
+ statement: string;
165
+ laws: [string, string];
166
+ };
167
+ DEFINITION_PROJECTION: {
168
+ subjects: ["fact.projection"];
169
+ statement: string;
170
+ laws: [string, string, string, string, string];
171
+ };
172
+ COMPARISON_FOOTPRINT: {
173
+ subjects: ["schema.comparison"];
174
+ statement: string;
175
+ laws: [string, string, string, string];
176
+ };
177
+ COMPARISON_REFERENCE_LEVEL: {
178
+ subjects: ["schema.comparison"];
179
+ statement: string;
180
+ laws: [string, string, string, string];
181
+ };
182
+ COMPARISON_UNCHANGED: {
183
+ subjects: ["schema.comparison"];
184
+ statement: string;
185
+ laws: [string, string, string];
186
+ };
187
+ STRUCTURAL_COMPARISON: {
188
+ subjects: ["schema.comparison"];
189
+ statement: string;
190
+ laws: [string, string, string];
191
+ };
192
+ REQUIRED_BUMP: {
193
+ subjects: ["schema.comparison"];
194
+ statement: string;
195
+ laws: [string, string];
196
+ };
197
+ COMPARISON_SOURCE: {
198
+ subjects: ["schema.comparison"];
199
+ statement: string;
200
+ laws: [string];
201
+ };
202
+ };
203
+ export type DerivedId = keyof typeof rows;
204
+ export declare const DERIVED: Readonly<Record<DerivedId, DerivedMeaning>>;
205
+ /**
206
+ * Where a member of a resolved Class or Property comes from. `declared`: its declaration as written.
207
+ * A row of `DERIVED`: what that row states. `calls`: the calling surface, which these tables leave
208
+ * out. A member added to the resolved types does not compile until it is classified here.
209
+ */
210
+ export type ResolvedMemberSource = 'declared' | 'calls' | DerivedId;
211
+ /** A member of a resolved Class or Property, by the surface it reads as. */
212
+ export type ResolvedMember = `class.${keyof AnyResolvedClass}` | `property.${Exclude<keyof ResolvedProperty, `__${string}`>}`;
213
+ export declare const RESOLVED_MEMBERS: Readonly<{
214
+ 'class.ref': "declared";
215
+ 'class.key': "declared";
216
+ 'class.kind': "declared";
217
+ 'class.abstract': "declared";
218
+ 'class.definition': "declared";
219
+ 'class.extends': "declared";
220
+ 'class.policies': "declared";
221
+ 'class.data': "DATA_ONE_OWNER";
222
+ 'class.properties': "PROPERTIES_EFFECTIVE";
223
+ 'class.methods': "calls";
224
+ 'class.static': "calls";
225
+ 'class.self': "declared";
226
+ 'class.satisfies': "CLASS_SATISFACTION";
227
+ 'class.validateProperties': "VALUE_EVALUATION";
228
+ 'property.owner': "declared";
229
+ 'property.name': "declared";
230
+ 'property.key': "declared";
231
+ 'property.definition': "declared";
232
+ 'property.ordering': "PROPERTY_ORDERING";
233
+ 'property.validate': "VALUE_EVALUATION";
234
+ 'property.program': "VALUE_EVALUATION";
235
+ }>;
236
+ export {};
@@ -0,0 +1,243 @@
1
+ import { deepFreeze } from '../../language/freeze.js';
2
+ const rows = {
3
+ CLASS_ROOT: {
4
+ subjects: ['class.extends', 'class.kind'],
5
+ statement: 'Every Node Class satisfies the Kernel Class Node, and every Edge Class of either orientation the Kernel Class Edge, with or without a declared parent. A document need not spell this parent, and one that does keeps it as authored. A Class named Node or Edge at another origin is an ordinary Class.',
6
+ laws: ['LANGUAGE-CLASS-GRAPH-ROOTS', 'DOMAIN-GRAPH-ROOTS-NOT-AUTHORED'],
7
+ },
8
+ CLASS_SATISFACTION: {
9
+ subjects: ['class.extends'],
10
+ statement: 'A Class satisfies itself and every Class of its kind it reaches through `extends`, and no other. A later Domain does not change this between two existing Classes.',
11
+ laws: ['DV-CLASS-SATISFACTION'],
12
+ },
13
+ PROPERTIES_EFFECTIVE: {
14
+ subjects: ['class.properties', 'class.extends'],
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
+ laws: ['LANGUAGE-PROPERTY-ADDITIVE'],
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
+ ENDPOINT_LIFETIME: {
24
+ subjects: [
25
+ 'endpoint.onDelete',
26
+ 'endpoint.accepts',
27
+ 'endpoint.outgoing',
28
+ 'endpoint.incoming',
29
+ 'endpoint.incident',
30
+ 'class.inheritance',
31
+ ],
32
+ statement: "An endpoint of an Edge Class has the `onDelete` it declares. Where it declares none, it reads the Schemas in scope alone: it detaches when it can hold a Node of another Domain, because it accepts a Class its Domain does not own, or an own Class that is `open` or that an own `open` Class extends, unless an endpoint of the Class requires an Edge; every other endpoint restricts. The Kernel's own relations read the Kernel's Classes as closed.",
33
+ laws: ['LANGUAGE-EDGE-LIFETIME', 'DV-EDGE-LIFETIME', 'KS-RELATION-LIFETIMES'],
34
+ },
35
+ EDGE_CONTRACT_INHERITED: {
36
+ subjects: [
37
+ 'class.extends',
38
+ 'class.orientation',
39
+ 'class.constraints',
40
+ 'endpoint.accepts',
41
+ 'endpoint.outgoing',
42
+ 'endpoint.incoming',
43
+ 'endpoint.incident',
44
+ ],
45
+ statement: 'An Edge Class that extends an ordinary Edge Class keeps its orientation, its constraints and its Properties, and each endpoint accepts only what the parent accepts there, within the parent counts. The Kernel Edge root holds no contract, so it admits both orientations.',
46
+ laws: ['DV-EDGE-CLASS-COMPOSITION'],
47
+ },
48
+ UNDIRECTED_ROLES_OVERLAP: {
49
+ subjects: ['endpoint.accepts', 'endpoint.incident'],
50
+ statement: 'The two roles of an undirected Edge Class may accept overlapping Classes, and a Node that fits both is bound by each on its own: no Schema promises they stay disjoint.',
51
+ laws: ['DV-EDGE-UNDIRECTED'],
52
+ },
53
+ UNIQUE_COVERS: {
54
+ subjects: ['class.unique', 'class.extends'],
55
+ statement: 'A tuple a Class declares in `unique` covers the Class and its descendants, which need not declare it again, and two facts of different covered Classes compete under it.',
56
+ laws: ['DV-NODE-UNIQUE', 'DV-EDGE-UNIQUE', 'GF-NODE-UNIQUE', 'GF-EDGE-UNIQUE'],
57
+ },
58
+ UNIQUE_KEY: {
59
+ subjects: ['class.unique'],
60
+ statement: 'Two facts hold one key when they share the value of every field of a tuple: endpoints by NodeId, slugs by exact text, Properties by canonical Value, nothing normalized. A fact missing a field of a tuple holds no key under it, and competes with nothing.',
61
+ laws: ['DV-NODE-UNIQUE', 'DV-EDGE-UNIQUE', 'GF-NODE-UNIQUE', 'GF-EDGE-UNIQUE'],
62
+ },
63
+ UNIQUE_SPELLING: {
64
+ subjects: ['class.unique'],
65
+ statement: 'One set of tuples has one spelling: the source, the target, the slug, then Properties by key in code-point order, and tuples in that order.',
66
+ laws: ['DV-NODE-UNIQUE', 'DV-EDGE-UNIQUE'],
67
+ },
68
+ PROPERTY_ORDERING: {
69
+ subjects: ['property.schema'],
70
+ statement: 'A Property orders as boolean, number, string or instant only when every value its schema admits is of that one scalar kind, as a conservative reading of the schema shows. A schema that also admits null, an array or an object, or one the reading does not settle, such as one that rules the other kinds out through `not` or `if`, gives it no ordering. Only the schema decides: no annotation keyword, example or stored value does.',
71
+ laws: ['VS-ORDERING-CLASSIFICATION', 'COMPILED-PROPERTY-ORDERING'],
72
+ },
73
+ AUTO_EXPLICIT: {
74
+ subjects: ['property.auto'],
75
+ statement: 'A Property is automatic only by the `auto` contract it declares: never by its value kind, its name, its Class or its inheritance.',
76
+ laws: ['DS-PROPERTY-AUTO-EXPLICIT'],
77
+ },
78
+ REVISION_SET_ORDER: {
79
+ subjects: ['schema.document'],
80
+ statement: 'Permuting a declared semantic set keeps the canonical bytes and the revision. Every other array keeps its order, and the revision reads that order.',
81
+ laws: ['DC-SET-ORDER'],
82
+ },
83
+ REVISION_NAME: {
84
+ subjects: ['schema.document'],
85
+ statement: 'The name of a Domain, and its entrypoint and its icon when it declares them, are part of its canonical bytes and of its revision.',
86
+ laws: ['DC-DOMAIN-METADATA'],
87
+ },
88
+ REVISION_AUTHORING_INDEPENDENT: {
89
+ subjects: ['schema.document'],
90
+ statement: 'A document authored directly and the Builder authoring that means the same are one canonical document, with one revision.',
91
+ laws: ['BUILDER-CANONICAL-PRODUCT'],
92
+ },
93
+ REVISION_OF_ROOT: {
94
+ subjects: ['schema.document'],
95
+ statement: 'A Bundle does not change the identity of the Domain it carries: the revision of its root reads the canonical bytes of the root alone.',
96
+ laws: ['DSB-IDENTITY'],
97
+ },
98
+ COMPILED_BYTES: {
99
+ subjects: ['schema.document'],
100
+ statement: 'One admitted closure compiles to one sequence of bytes on every host, and a category escape reads the Unicode 17.0 table the compiler pins, never the Unicode of the host.',
101
+ laws: ['COMPILED-DETERMINISTIC'],
102
+ },
103
+ COMPILED_READS_AS_SOURCE: {
104
+ subjects: ['schema.document'],
105
+ statement: 'Loading the compiled form of a document observes what resolving the document observes, in the same order, except that only the resolved source exposes its provenance.',
106
+ laws: ['COMPILED-DOMAIN-EQUIVALENT'],
107
+ },
108
+ COMPILED_READS_ITS_REVISION: {
109
+ subjects: ['schema.document'],
110
+ statement: 'An admitted compiled document means what its revision covers. Its value graphs, pattern machines, orderings and Callable fields are derived again, and whatever the document carries for them is ignored.',
111
+ laws: [
112
+ 'COMPILED-VALUE-GRAPH',
113
+ 'COMPILED-PATTERNS-DECIDE-BY-SOURCE',
114
+ 'COMPILED-PROPERTY-ORDERING',
115
+ 'COMPILED-CALLABLE-FIELDS',
116
+ ],
117
+ },
118
+ COORDINATE_KEY: {
119
+ subjects: ['schema.document'],
120
+ statement: 'A Definition, a Property and a Method each print to one key, distinct coordinates print to distinct keys, and a text is a key of at most one kind.',
121
+ laws: [
122
+ 'DSL-V1-ADDRESSING-GUARDS-EXACT',
123
+ 'DSL-V1-ADDRESSING-KEY-KINDS-DISJOINT',
124
+ 'DSL-V1-ADDRESSING-KEY-ROUND-TRIP',
125
+ 'DSL-V1-ADDRESSING-REF-INDEX',
126
+ ],
127
+ },
128
+ CLOSURE_RETAINED: {
129
+ subjects: ['schema.document'],
130
+ statement: 'An accepted Schema keeps the exact dependency closure it was accepted with, whatever the lookup answers later.',
131
+ laws: ['DV-ACCEPTANCE-CONTEXT'],
132
+ },
133
+ VALUE_EQUAL: {
134
+ subjects: ['property.schema', 'value'],
135
+ statement: 'Two values are equal exactly when their canonical JSON texts are: equal scalars, Arrays item by item in order, Objects with the same names and equal values in any member order. `const`, `enum` and `uniqueItems` compare this way, for every value the limits of the validation admit.',
136
+ laws: ['VALUE-EQUALITY', 'VS-UNIQUE-ITEMS', 'VS-COMPARISON-WITHIN-ADMISSION'],
137
+ },
138
+ VALUE_CANONICAL: {
139
+ subjects: ['value'],
140
+ statement: 'The canonical text of a value is its RFC 8785 JSON. Decoding reads exactly one strict JSON value, and refuses a duplicate name, a number past the binary64 range and one that resolves to negative zero. Any other number reads as its nearest binary64, as `1e-999` reads as 0.',
141
+ laws: ['VALUE-CANONICAL', 'VALUE-DECODE'],
142
+ },
143
+ VALUE_INSTANT: {
144
+ subjects: ['property.schema', 'value'],
145
+ statement: 'An instant is a proleptic-Gregorian YYYY-MM-DDTHH:mm:ss.sssZ from year 0000 through 9999, in UTC, with three millisecond digits and no leap second. Code-point order of its text is chronological order, and two different texts are two different milliseconds.',
146
+ laws: ['VS-VALUE-KIND'],
147
+ },
148
+ VALUE_PATTERN: {
149
+ subjects: ['property.schema'],
150
+ statement: '`pattern` searches a string and `fullMatch` matches all of it, in one bounded I-Regexp grammar, whose category escapes read Unicode 17.0 on every host.',
151
+ laws: ['VS-REGEX-PORTABLE'],
152
+ },
153
+ VALUE_EVALUATION: {
154
+ subjects: ['property.schema', 'value'],
155
+ statement: 'Evaluating a value the limits admit against an admitted schema always answers, whatever the length of its chains of references and the number of its failures. It lists one failure once, however many references reach its location, reads references only in the schema closure it prepared, and decides on the snapshot admission returned.',
156
+ laws: ['VS-EVALUATION-OWN-STACK', 'VS-REFERENCE-RESOLUTION', 'VS-INSTANCE-READS-ITS-SNAPSHOT'],
157
+ },
158
+ VALUE_INCLUSION: {
159
+ subjects: ['property.schema'],
160
+ statement: 'One value program includes another only when it admits every value the other admits. A question it cannot prove within its budget, 256 open pairs and 1,000,000 locations read, answers false: that is why a change can be judged narrowing and validated although it narrows nothing.',
161
+ laws: ['VS-INCLUSION-SOUND', 'VS-INCLUSION-BUDGET'],
162
+ },
163
+ NODE_IDENTITY: {
164
+ subjects: ['fact.node'],
165
+ statement: 'A NodeId is 1 to 255 ASCII characters among letters, digits and `._-`. Two Nodes are one Node exactly when their NodeIds are equal byte for byte: case, punctuation and the format of an allocator carry no identity. NodeIds sort by their unsigned bytes, a prefix first.',
166
+ laws: ['ND-IDENTITY', 'ORDER-NODE-UTF8'],
167
+ },
168
+ EDGE_IDENTITY: {
169
+ subjects: ['fact.edge'],
170
+ statement: 'Edge keys sort by source NodeId, target NodeId, then Class key. A Graph holds one Node per NodeId and one Edge per key, and refuses a repeat even when the two facts are equal.',
171
+ laws: ['ORDER-EDGE-IDENTITY', 'GF-UNIQUE'],
172
+ },
173
+ GRAPH_OPEN: {
174
+ subjects: ['fact.node', 'fact.edge'],
175
+ statement: 'A Graph is one finite observation: a fact it does not hold is neither deleted nor known to be absent, and an Edge in it needs neither endpoint Node in it. A difference of two Graphs is its additions and replacements, or only its conflicts when a Node changes Class, and never a deletion.',
176
+ laws: ['GF-PARTIAL', 'GF-DELTA'],
177
+ },
178
+ DEFINITION_PROJECTION: {
179
+ subjects: ['fact.projection'],
180
+ statement: 'Installing a Domain projects each of its Definitions as one Node at its canonical NodePath with exactly one `of_domain` Edge, its member locator. The Domain Node holds the name and, as `iconSmall`, `iconMedium` or `iconLarge`, the drawing of each size its icon declares, and one `entrypoint` Edge joins it to the View it declares, none without one. A Core Edge endpoint that is no Core Node is a path into the projected declarations.',
181
+ laws: [
182
+ 'KS-DECLARATION-LOCATORS',
183
+ 'KS-PROJECTION',
184
+ 'KS-DOMAIN-NAME-AND-ENTRYPOINT',
185
+ 'KS-DOMAIN-ICON',
186
+ 'KS-CORE-ENDPOINT-PROJECTION',
187
+ ],
188
+ },
189
+ COMPARISON_FOOTPRINT: {
190
+ subjects: ['schema.comparison'],
191
+ statement: "What a dependent relies on is the closure of what it references, at two levels: a Class it extends at inheritance level, any other at reference level, and ancestors and Edge endpoint contracts only at inheritance level. Beyond that closure a comparison also reads what the dependent's own Policies rely on, such as the orientation and endpoint Classes of an Edge a Policy pattern matches, and, for a Class the dependent extends, a parent closed to it and a requirement the target adds.",
192
+ laws: ['DM-FOOTPRINT', 'DM-POLICY-RELIANCE', 'DM-CLASS-INHERITANCE', 'DM-STRUCTURE'],
193
+ },
194
+ COMPARISON_REFERENCE_LEVEL: {
195
+ subjects: ['schema.comparison'],
196
+ statement: 'A Class used at reference level keeps its existence, kind, abstractness, Edge orientation and effective Properties, and its uniqueness tuples: every tuple covering an Edge Class, and the tuples a Node Class declares itself. Its effective Methods it keeps by meaning only. At inheritance level it also keeps its ancestors with their own tuples, class policies, Data, and Edge endpoints and constraints. An added optional or automatic Property, Method or ancestor satisfies both levels, unless it obliges a dependent that inherits: an added abstract Method fails its structure, and a required Property, declared or inherited, both.',
197
+ laws: ['DM-USAGE', 'DM-FIELDS', 'DM-CLASS-PROPERTIES', 'DM-STRUCTURE'],
198
+ },
199
+ COMPARISON_UNCHANGED: {
200
+ subjects: ['schema.comparison'],
201
+ statement: 'A coordinate is unchanged only when the same Key exists with an identical meaning at its level. Annotation keywords are no meaning, `x-astrale-path` is, and, by meaning, additions outside the footprint count only as a required non-automatic Property on an inherited Class.',
202
+ laws: ['DM-COMPARISON', 'DM-ANNOTATIONS', 'DM-FIELDS'],
203
+ },
204
+ STRUCTURAL_COMPARISON: {
205
+ subjects: ['schema.comparison'],
206
+ statement: 'A structural comparison keeps data obligations and declared member requirements, and refuses a parent the dependent extends that the target no longer declares `open`, unless the dependent holds its binding to the target. A Function, Method or Class it declares as a capability is a root of the comparison, and a capability of another origin is ignored.',
207
+ laws: ['DM-STRUCTURE', 'DM-CAPABILITY-ROOTS', 'DM-CLASS-INHERITANCE'],
208
+ },
209
+ REQUIRED_BUMP: {
210
+ subjects: ['schema.comparison'],
211
+ statement: 'The bump a change requires reads no version number: each observation is major when a requirement on it fails, minor when it is an addition and patch otherwise, the change takes the highest of them, and equal revisions require a patch. On the oracle catalog, a change below major leaves every dependent of the previous version structurally compatible.',
212
+ laws: ['DM-REQUIRED-BUMP', 'DM-BUMP-SOUND'],
213
+ },
214
+ COMPARISON_SOURCE: {
215
+ subjects: ['schema.comparison'],
216
+ statement: 'A dependency comparison reads the source from the closure the dependent retained at the compared origin: no caller supplies its bytes.',
217
+ laws: ['DM-SOURCE-EXACT'],
218
+ },
219
+ };
220
+ export const DERIVED = deepFreeze(rows);
221
+ export const RESOLVED_MEMBERS = deepFreeze({
222
+ 'class.ref': 'declared',
223
+ 'class.key': 'declared',
224
+ 'class.kind': 'declared',
225
+ 'class.abstract': 'declared',
226
+ 'class.definition': 'declared',
227
+ 'class.extends': 'declared',
228
+ 'class.policies': 'declared',
229
+ 'class.data': 'DATA_ONE_OWNER',
230
+ 'class.properties': 'PROPERTIES_EFFECTIVE',
231
+ 'class.methods': 'calls',
232
+ 'class.static': 'calls',
233
+ 'class.self': 'declared',
234
+ 'class.satisfies': 'CLASS_SATISFACTION',
235
+ 'class.validateProperties': 'VALUE_EVALUATION',
236
+ 'property.owner': 'declared',
237
+ 'property.name': 'declared',
238
+ 'property.key': 'declared',
239
+ 'property.definition': 'declared',
240
+ 'property.ordering': 'PROPERTY_ORDERING',
241
+ 'property.validate': 'VALUE_EVALUATION',
242
+ 'property.program': 'VALUE_EVALUATION',
243
+ });