@astrale-os/kernel-dsl 0.2.0-beta.8 → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (321) hide show
  1. package/dist/v1/addressing/class-key.js +5 -4
  2. package/dist/v1/addressing/method-key.js +3 -2
  3. package/dist/v1/addressing/patterns.d.ts +0 -5
  4. package/dist/v1/addressing/patterns.js +5 -5
  5. package/dist/v1/builder/callable/authoring.d.ts +87 -41
  6. package/dist/v1/builder/callable/authoring.js +29 -14
  7. package/dist/v1/builder/class/authoring.d.ts +311 -36
  8. package/dist/v1/builder/class/authoring.js +3 -4
  9. package/dist/v1/builder/class/property.d.ts +16 -8
  10. package/dist/v1/builder/class/property.js +21 -5
  11. package/dist/v1/builder/core/authoring.d.ts +28 -13
  12. package/dist/v1/builder/core/authoring.js +22 -2
  13. package/dist/v1/builder/index.d.ts +9 -8
  14. package/dist/v1/builder/index.js +2 -2
  15. package/dist/v1/builder/lowering/callable.d.ts +3 -1
  16. package/dist/v1/builder/lowering/callable.js +43 -51
  17. package/dist/v1/builder/lowering/class.d.ts +7 -0
  18. package/dist/v1/builder/lowering/class.js +79 -29
  19. package/dist/v1/builder/lowering/core.d.ts +3 -2
  20. package/dist/v1/builder/lowering/core.js +9 -6
  21. package/dist/v1/builder/lowering/policy.d.ts +8 -1
  22. package/dist/v1/builder/lowering/policy.js +35 -0
  23. package/dist/v1/builder/lowering/schema/capture.js +9 -4
  24. package/dist/v1/builder/lowering/schema/compile.d.ts +2 -2
  25. package/dist/v1/builder/lowering/schema/compile.js +15 -2
  26. package/dist/v1/builder/lowering/schema/context.d.ts +11 -8
  27. package/dist/v1/builder/lowering/schema/context.js +59 -29
  28. package/dist/v1/builder/lowering/schema/ownership.d.ts +3 -3
  29. package/dist/v1/builder/lowering/schema/ownership.js +2 -1
  30. package/dist/v1/builder/lowering/value/compile.js +14 -4
  31. package/dist/v1/builder/lowering/value/zod.d.ts +7 -6
  32. package/dist/v1/builder/lowering/value/zod.js +16 -7
  33. package/dist/v1/builder/lowering/view.d.ts +4 -3
  34. package/dist/v1/builder/lowering/view.js +2 -14
  35. package/dist/v1/builder/policy/authoring.d.ts +23 -6
  36. package/dist/v1/builder/policy/authoring.js +35 -8
  37. package/dist/v1/builder/schema/define.d.ts +8 -5
  38. package/dist/v1/builder/schema/diagnostic.d.ts +1 -1
  39. package/dist/v1/builder/schema/handle.d.ts +2 -1
  40. package/dist/v1/builder/schema/input.d.ts +9 -1
  41. package/dist/v1/builder/schema/projection/callable.d.ts +51 -0
  42. package/dist/v1/builder/schema/projection/callable.js +1 -0
  43. package/dist/v1/builder/schema/projection/class.d.ts +89 -0
  44. package/dist/v1/builder/schema/projection/class.js +1 -0
  45. package/dist/v1/builder/schema/projection/core-input.d.ts +32 -0
  46. package/dist/v1/builder/schema/projection/core-input.js +1 -0
  47. package/dist/v1/builder/schema/projection/domain.d.ts +59 -0
  48. package/dist/v1/builder/schema/projection/domain.js +1 -0
  49. package/dist/v1/builder/schema/projection/identity.d.ts +39 -0
  50. package/dist/v1/builder/schema/projection/identity.js +1 -0
  51. package/dist/v1/builder/schema/projection/model.d.ts +59 -0
  52. package/dist/v1/builder/schema/projection/model.js +1 -0
  53. package/dist/v1/builder/schema/projection/property.d.ts +32 -0
  54. package/dist/v1/builder/schema/projection/property.js +1 -0
  55. package/dist/v1/builder/schema/projection/resolved-class.d.ts +76 -0
  56. package/dist/v1/builder/schema/projection/resolved-class.js +1 -0
  57. package/dist/v1/builder/schema/projection.d.ts +4 -258
  58. package/dist/v1/builder/value/full-match.js +6 -3
  59. package/dist/v1/builder/value/path.d.ts +2 -2
  60. package/dist/v1/builder/value/path.js +2 -2
  61. package/dist/v1/builder/view/authoring.d.ts +6 -14
  62. package/dist/v1/builder/view/authoring.js +13 -5
  63. package/dist/v1/bundle/structure.d.ts +2 -1
  64. package/dist/v1/compiled/admission/accept.d.ts +1 -1
  65. package/dist/v1/compiled/admission/accept.js +11 -814
  66. package/dist/v1/compiled/admission/closure.d.ts +3 -0
  67. package/dist/v1/compiled/admission/closure.js +173 -0
  68. package/dist/v1/compiled/admission/diagnostic.d.ts +7 -0
  69. package/dist/v1/compiled/admission/diagnostic.js +13 -0
  70. package/dist/v1/compiled/admission/revision.js +9 -1
  71. package/dist/v1/compiled/admission/semantics/cardinality.d.ts +5 -0
  72. package/dist/v1/compiled/admission/semantics/cardinality.js +113 -0
  73. package/dist/v1/compiled/admission/semantics/class.d.ts +5 -0
  74. package/dist/v1/compiled/admission/semantics/class.js +125 -0
  75. package/dist/v1/compiled/admission/semantics/context.d.ts +60 -0
  76. package/dist/v1/compiled/admission/semantics/context.js +81 -0
  77. package/dist/v1/compiled/admission/semantics/core.d.ts +35 -0
  78. package/dist/v1/compiled/admission/semantics/core.js +123 -0
  79. package/dist/v1/compiled/admission/semantics/edge.d.ts +8 -0
  80. package/dist/v1/compiled/admission/semantics/edge.js +89 -0
  81. package/dist/v1/compiled/admission/semantics/policy/admit.d.ts +4 -0
  82. package/dist/v1/compiled/admission/semantics/policy/admit.js +63 -0
  83. package/dist/v1/compiled/admission/semantics/policy/callable.d.ts +5 -0
  84. package/dist/v1/compiled/admission/semantics/policy/callable.js +72 -0
  85. package/dist/v1/compiled/admission/semantics/policy/contracts.d.ts +24 -0
  86. package/dist/v1/compiled/admission/semantics/policy/contracts.js +45 -0
  87. package/dist/v1/compiled/admission/semantics/policy/equality.d.ts +8 -0
  88. package/dist/v1/compiled/admission/semantics/policy/equality.js +27 -0
  89. package/dist/v1/compiled/admission/semantics/policy/measure.d.ts +9 -0
  90. package/dist/v1/compiled/admission/semantics/policy/measure.js +81 -0
  91. package/dist/v1/compiled/admission/semantics/policy/parity.d.ts +4 -0
  92. package/dist/v1/compiled/admission/semantics/policy/parity.js +139 -0
  93. package/dist/v1/compiled/admission/semantics/policy/pattern.d.ts +8 -0
  94. package/dist/v1/compiled/admission/semantics/policy/pattern.js +78 -0
  95. package/dist/v1/compiled/admission/semantics/policy/typing.d.ts +28 -0
  96. package/dist/v1/compiled/admission/semantics/policy/typing.js +206 -0
  97. package/dist/v1/compiled/admission/semantics/policy/variants.d.ts +10 -0
  98. package/dist/v1/compiled/admission/semantics/policy/variants.js +65 -0
  99. package/dist/v1/compiled/admission/semantics.d.ts +1 -1
  100. package/dist/v1/compiled/admission/semantics.js +8 -1078
  101. package/dist/v1/compiled/admission/wire/callable.d.ts +6 -0
  102. package/dist/v1/compiled/admission/wire/callable.js +90 -0
  103. package/dist/v1/compiled/admission/wire/class.d.ts +4 -0
  104. package/dist/v1/compiled/admission/wire/class.js +133 -0
  105. package/dist/v1/compiled/admission/wire/core.d.ts +5 -0
  106. package/dist/v1/compiled/admission/wire/core.js +32 -0
  107. package/dist/v1/compiled/admission/wire/dependency.d.ts +14 -0
  108. package/dist/v1/compiled/admission/wire/dependency.js +43 -0
  109. package/dist/v1/compiled/admission/wire/entry.d.ts +5 -0
  110. package/dist/v1/compiled/admission/wire/entry.js +100 -0
  111. package/dist/v1/compiled/admission/wire/pattern.d.ts +12 -0
  112. package/dist/v1/compiled/admission/wire/pattern.js +111 -0
  113. package/dist/v1/compiled/admission/wire/policy.d.ts +10 -0
  114. package/dist/v1/compiled/admission/wire/policy.js +189 -0
  115. package/dist/v1/compiled/admission/wire/program.d.ts +4 -0
  116. package/dist/v1/compiled/admission/wire/program.js +52 -0
  117. package/dist/v1/compiled/admission/wire/property.d.ts +4 -0
  118. package/dist/v1/compiled/admission/wire/property.js +74 -0
  119. package/dist/v1/compiled/admission/wire/reference.d.ts +8 -0
  120. package/dist/v1/compiled/admission/wire/reference.js +33 -0
  121. package/dist/v1/compiled/admission/wire/value.d.ts +29 -0
  122. package/dist/v1/compiled/admission/wire/value.js +98 -0
  123. package/dist/v1/compiled/admission/wire/view.d.ts +3 -0
  124. package/dist/v1/compiled/admission/wire/view.js +17 -0
  125. package/dist/v1/compiled/compiler/compile.js +43 -11
  126. package/dist/v1/compiled/generated.d.ts +10 -0
  127. package/dist/v1/compiled/generated.js +15 -0
  128. package/dist/v1/compiled/loader/load.d.ts +5 -0
  129. package/dist/v1/compiled/loader/load.js +18 -4
  130. package/dist/v1/compiled/model/schema.d.ts +16 -7
  131. package/dist/v1/domain/create.js +18 -28
  132. package/dist/v1/domain/model/domain.d.ts +0 -1
  133. package/dist/v1/domain/model/input.d.ts +3 -0
  134. package/dist/v1/domain/projection/classes.js +13 -41
  135. package/dist/v1/domain/validation/create.d.ts +2 -0
  136. package/dist/v1/domain/validation/create.js +12 -0
  137. package/dist/v1/index.d.ts +5 -2
  138. package/dist/v1/index.js +3 -1
  139. package/dist/v1/language/callable/composition.d.ts +27 -0
  140. package/dist/v1/language/callable/composition.js +52 -0
  141. package/dist/v1/language/callable/executable.d.ts +6 -0
  142. package/dist/v1/language/callable/executable.js +4 -0
  143. package/dist/v1/language/callable/model/callable.d.ts +34 -9
  144. package/dist/v1/language/callable/model/callable.js +3 -1
  145. package/dist/v1/language/callable/resolved.d.ts +23 -8
  146. package/dist/v1/language/class/facets.d.ts +5 -2
  147. package/dist/v1/language/class/inheritance.d.ts +12 -0
  148. package/dist/v1/language/class/inheritance.js +25 -0
  149. package/dist/v1/language/class/lifetime.d.ts +17 -0
  150. package/dist/v1/language/class/lifetime.js +26 -0
  151. package/dist/v1/language/class/model/class.d.ts +8 -4
  152. package/dist/v1/language/class/model/property.d.ts +4 -2
  153. package/dist/v1/language/class/property-values.js +5 -2
  154. package/dist/v1/language/class/resolved.d.ts +25 -15
  155. package/dist/v1/language/core/model/core.d.ts +7 -1
  156. package/dist/v1/language/core/resolved.d.ts +6 -2
  157. package/dist/v1/language/definition/metadata.d.ts +8 -0
  158. package/dist/v1/language/definition/metadata.js +12 -0
  159. package/dist/v1/language/index.d.ts +9 -0
  160. package/dist/v1/language/index.js +6 -0
  161. package/dist/v1/language/policy/analysis/branches.d.ts +4 -3
  162. package/dist/v1/language/policy/analysis/branches.js +54 -12
  163. package/dist/v1/language/policy/analysis/budgets.js +1 -1
  164. package/dist/v1/language/policy/analysis/checks.d.ts +28 -0
  165. package/dist/v1/language/policy/analysis/checks.js +80 -0
  166. package/dist/v1/language/policy/index.d.ts +1 -0
  167. package/dist/v1/language/policy/index.js +1 -0
  168. package/dist/v1/language/policy/model/policy.d.ts +71 -5
  169. package/dist/v1/language/policy/model/policy.js +52 -1
  170. package/dist/v1/language/policy/normalization/normalize.d.ts +12 -1
  171. package/dist/v1/language/policy/normalization/normalize.js +178 -44
  172. package/dist/v1/language/state/index.d.ts +3 -0
  173. package/dist/v1/language/state/index.js +1 -0
  174. package/dist/v1/language/state/machine.d.ts +28 -0
  175. package/dist/v1/language/state/machine.js +40 -0
  176. package/dist/v1/language/state/topology.d.ts +14 -0
  177. package/dist/v1/language/state/topology.js +69 -0
  178. package/dist/v1/language/value/compile/fields.d.ts +1 -1
  179. package/dist/v1/language/value/compile/load.d.ts +4 -2
  180. package/dist/v1/language/value/compile/load.js +22 -1
  181. package/dist/v1/language/value/compile/model.d.ts +16 -1
  182. package/dist/v1/language/value/evaluate/assertions.d.ts +2 -0
  183. package/dist/v1/language/value/evaluate/assertions.js +13 -0
  184. package/dist/v1/language/value/evaluate/evaluator.js +111 -28
  185. package/dist/v1/language/value/evaluate/preparation.d.ts +10 -1
  186. package/dist/v1/language/value/evaluate/preparation.js +17 -26
  187. package/dist/v1/language/value/evaluate/program.js +1 -1
  188. package/dist/v1/language/value/evaluate/validate.d.ts +6 -2
  189. package/dist/v1/language/value/evaluate/validate.js +18 -11
  190. package/dist/v1/language/value/inclusion/includes.d.ts +9 -0
  191. package/dist/v1/language/value/inclusion/includes.js +777 -0
  192. package/dist/v1/language/value/model/blob.d.ts +31 -0
  193. package/dist/v1/language/value/model/blob.js +90 -0
  194. package/dist/v1/language/value/model/instant.d.ts +0 -2
  195. package/dist/v1/language/value/model/instant.js +1 -1
  196. package/dist/v1/language/value/model/schema.d.ts +2 -1
  197. package/dist/v1/language/value/model/schema.js +1 -5
  198. package/dist/v1/language/value/ordering.d.ts +2 -0
  199. package/dist/v1/language/value/ordering.js +4 -8
  200. package/dist/v1/language/value/profile/json.validate.js +1 -1
  201. package/dist/v1/language/value/profile/rules.js +48 -12
  202. package/dist/v1/language/value/reference/registry.d.ts +2 -1
  203. package/dist/v1/language/value/regexp/ast.js +3 -64
  204. package/dist/v1/language/value/regexp/compile.d.ts +32 -3
  205. package/dist/v1/language/value/regexp/compile.js +117 -21
  206. package/dist/v1/language/value/regexp/matcher.d.ts +6 -3
  207. package/dist/v1/language/value/regexp/matcher.js +185 -28
  208. package/dist/v1/language/value/regexp/syntax.d.ts +12 -1
  209. package/dist/v1/language/value/regexp/syntax.js +14 -2
  210. package/dist/v1/language/value/regexp/unicode.d.ts +32 -0
  211. package/dist/v1/language/value/regexp/unicode.js +139 -0
  212. package/dist/v1/language/value/syntax/full-match.js +8 -5
  213. package/dist/v1/language/value/syntax/node-path/validate.js +4 -6
  214. package/dist/v1/language/view/model/view.d.ts +2 -4
  215. package/dist/v1/language/view/resolved.d.ts +2 -2
  216. package/dist/v1/schema/analysis/class.d.ts +36 -6
  217. package/dist/v1/schema/analysis/class.js +31 -66
  218. package/dist/v1/schema/canonical/revision.d.ts +2 -1
  219. package/dist/v1/schema/canonical/revision.js +4 -1
  220. package/dist/v1/schema/compatibility/api.d.ts +3 -0
  221. package/dist/v1/schema/compatibility/api.js +2 -0
  222. package/dist/v1/schema/compatibility/comparators/callables.d.ts +39 -0
  223. package/dist/v1/schema/compatibility/comparators/callables.js +101 -0
  224. package/dist/v1/schema/compatibility/comparators/classes.d.ts +47 -0
  225. package/dist/v1/schema/compatibility/comparators/classes.js +160 -0
  226. package/dist/v1/schema/compatibility/comparators/index.d.ts +12 -0
  227. package/dist/v1/schema/compatibility/comparators/index.js +53 -0
  228. package/dist/v1/schema/compatibility/comparators/members.d.ts +4 -0
  229. package/dist/v1/schema/compatibility/comparators/members.js +49 -0
  230. package/dist/v1/schema/compatibility/comparators/values.d.ts +5 -0
  231. package/dist/v1/schema/compatibility/comparators/values.js +37 -0
  232. package/dist/v1/schema/compatibility/compare.d.ts +5 -0
  233. package/dist/v1/schema/compatibility/compare.js +23 -0
  234. package/dist/v1/schema/compatibility/context.d.ts +19 -0
  235. package/dist/v1/schema/compatibility/context.js +49 -0
  236. package/dist/v1/schema/compatibility/coordinate.d.ts +40 -0
  237. package/dist/v1/schema/compatibility/coordinate.js +38 -0
  238. package/dist/v1/schema/compatibility/diff.d.ts +12 -0
  239. package/dist/v1/schema/compatibility/diff.js +39 -0
  240. package/dist/v1/schema/compatibility/evidence.d.ts +16 -0
  241. package/dist/v1/schema/compatibility/evidence.js +62 -0
  242. package/dist/v1/schema/compatibility/fields.d.ts +194 -0
  243. package/dist/v1/schema/compatibility/fields.js +94 -0
  244. package/dist/v1/schema/compatibility/index.d.ts +6 -0
  245. package/dist/v1/schema/compatibility/index.js +3 -0
  246. package/dist/v1/schema/compatibility/meaning/footprint.d.ts +7 -0
  247. package/dist/v1/schema/compatibility/meaning/footprint.js +59 -0
  248. package/dist/v1/schema/compatibility/meaning/index.d.ts +3 -0
  249. package/dist/v1/schema/compatibility/meaning/index.js +16 -0
  250. package/dist/v1/schema/compatibility/model.d.ts +131 -0
  251. package/dist/v1/schema/compatibility/model.js +1 -0
  252. package/dist/v1/schema/compatibility/references.d.ts +38 -0
  253. package/dist/v1/schema/compatibility/references.js +149 -0
  254. package/dist/v1/schema/compatibility/report.d.ts +27 -0
  255. package/dist/v1/schema/compatibility/report.js +100 -0
  256. package/dist/v1/schema/compatibility/scope.d.ts +36 -0
  257. package/dist/v1/schema/compatibility/scope.js +110 -0
  258. package/dist/v1/schema/compatibility/structure/index.d.ts +3 -0
  259. package/dist/v1/schema/compatibility/structure/index.js +40 -0
  260. package/dist/v1/schema/compatibility/structure/inheritance.d.ts +7 -0
  261. package/dist/v1/schema/compatibility/structure/inheritance.js +68 -0
  262. package/dist/v1/schema/compatibility/structure/requirements.d.ts +7 -0
  263. package/dist/v1/schema/compatibility/structure/requirements.js +97 -0
  264. package/dist/v1/schema/compatibility/subjects.d.ts +39 -0
  265. package/dist/v1/schema/compatibility/subjects.js +143 -0
  266. package/dist/v1/schema/compatibility/versioning/index.d.ts +8 -0
  267. package/dist/v1/schema/compatibility/versioning/index.js +50 -0
  268. package/dist/v1/schema/compatibility/versioning/members.d.ts +12 -0
  269. package/dist/v1/schema/compatibility/versioning/members.js +47 -0
  270. package/dist/v1/schema/compatibility/versioning/surface.d.ts +11 -0
  271. package/dist/v1/schema/compatibility/versioning/surface.js +61 -0
  272. package/dist/v1/schema/diagnostic.d.ts +1 -1
  273. package/dist/v1/schema/fingerprint.d.ts +2 -0
  274. package/dist/v1/schema/fingerprint.js +1 -0
  275. package/dist/v1/schema/index.d.ts +4 -3
  276. package/dist/v1/schema/index.js +2 -1
  277. package/dist/v1/schema/model/schema.d.ts +8 -11
  278. package/dist/v1/schema/normalization/domain.js +57 -13
  279. package/dist/v1/schema/resolution/definition.index.d.ts +1 -2
  280. package/dist/v1/schema/resolution/definition.index.js +0 -3
  281. package/dist/v1/schema/resolution/domain.d.ts +4 -1
  282. package/dist/v1/schema/resolution/domain.js +26 -18
  283. package/dist/v1/schema/resolution/origins.d.ts +28 -5
  284. package/dist/v1/schema/resolution/origins.js +68 -31
  285. package/dist/v1/schema/validation/callable.d.ts +4 -0
  286. package/dist/v1/schema/validation/callable.js +39 -0
  287. package/dist/v1/schema/validation/class.d.ts +10 -0
  288. package/dist/v1/schema/validation/class.js +79 -60
  289. package/dist/v1/schema/validation/core.js +83 -55
  290. package/dist/v1/schema/validation/domain.d.ts +2 -1
  291. package/dist/v1/schema/validation/domain.js +2 -0
  292. package/dist/v1/schema/validation/domain.structure.d.ts +0 -2
  293. package/dist/v1/schema/validation/domain.structure.js +214 -171
  294. package/dist/v1/schema/validation/policy/budgets.js +36 -6
  295. package/dist/v1/schema/validation/policy/context.js +5 -16
  296. package/dist/v1/schema/validation/policy/objects.d.ts +4 -0
  297. package/dist/v1/schema/validation/policy/objects.js +71 -0
  298. package/dist/v1/schema/validation/policy/references.js +16 -4
  299. package/dist/v1/schema/validation/policy/typing.d.ts +2 -0
  300. package/dist/v1/schema/validation/policy/typing.js +55 -7
  301. package/dist/v1/schema/validation/policy/uses.js +73 -99
  302. package/dist/v1/schema/validation/value-api.d.ts +2 -0
  303. package/dist/v1/schema/validation/value-api.js +1 -0
  304. package/dist/v1/schema/validation/value.js +7 -1
  305. package/dist/v1/schema/validation/view.js +14 -9
  306. package/dist/value/accept.d.ts +9 -0
  307. package/dist/value/accept.js +106 -7
  308. package/dist/value/canonical.d.ts +3 -0
  309. package/dist/value/canonical.js +22 -6
  310. package/dist/value/immutable.optimization.d.ts +15 -0
  311. package/dist/value/immutable.optimization.js +34 -0
  312. package/dist/value/index.d.ts +1 -1
  313. package/dist/value/index.js +1 -1
  314. package/dist/value/json.d.ts +1 -1
  315. package/dist/value/json.js +1 -1
  316. package/dist/value/limits.d.ts +1 -1
  317. package/dist/value/unicode.d.ts +4 -1
  318. package/dist/value/unicode.js +28 -0
  319. package/package.json +20 -5
  320. package/dist/v1/schema/compatibility/meaning.d.ts +0 -29
  321. package/dist/v1/schema/compatibility/meaning.js +0 -605
@@ -0,0 +1,51 @@
1
+ import type * as language from '../../../language/index.js';
2
+ import type { Method, CallableProjection, Function } from '../../callable/authoring.js';
3
+ import type { RecordField, ClassInputOf, AbstractOf } from './identity.js';
4
+ import type { MethodProjection, FunctionProjection } from './model.js';
5
+ type MethodExecutableOf<OwnerAbstract extends boolean, MethodAbstract extends boolean> = MethodAbstract extends false ? true : OwnerAbstract extends false ? true : false;
6
+ type MethodFieldsOf<Value> = RecordField<ClassInputOf<Value>, 'methods'>;
7
+ interface AuthoredMethodEntry<Owner, Name extends string, Value extends Method> {
8
+ readonly owner: Owner;
9
+ readonly name: Name;
10
+ readonly value: Value;
11
+ }
12
+ type OwnMethodEntries<Value, Static extends boolean> = {
13
+ [Name in keyof MethodFieldsOf<Value>]: MethodFieldsOf<Value>[Name] extends infer MethodValue extends Method ? CallableConfig<MethodValue> extends {
14
+ readonly static: true;
15
+ } ? Static extends true ? AuthoredMethodEntry<Value, Extract<Name, string>, MethodValue> : never : Static extends false ? AuthoredMethodEntry<Value, Extract<Name, string>, MethodValue> : never : never;
16
+ }[keyof MethodFieldsOf<Value>];
17
+ type CallableConfig<Value> = Value extends Method<infer Config> ? Config extends CallableProjection ? Config : never : Value extends Function<infer Config> ? Config extends CallableProjection ? Config : never : never;
18
+ type CallableInputValue<Value extends Method | Function> = CallableConfig<Value>['input'];
19
+ type CallableOutputValue<Value extends Method | Function> = CallableConfig<Value>['output'];
20
+ type CallableExecutionOf<Value extends Method | Function> = CallableConfig<Value>['execution'];
21
+ type CallableStaticOf<Value extends Method> = CallableConfig<Value> extends {
22
+ readonly static: true;
23
+ } ? true : false;
24
+ type CallableAbstractOf<Value extends Method> = CallableConfig<Value> extends {
25
+ readonly abstract: infer Abstract extends boolean;
26
+ } ? Abstract : false;
27
+ type CallableAuthOf<Value extends Method | Function> = CallableConfig<Value>['auth'];
28
+ type MethodProjectionOfEntry<Origin extends string, OwnerName extends string, Entry> = Entry extends language.ResolvedMethod ? MethodProjectionOfResolved<Entry> : Entry extends AuthoredMethodEntry<infer Owner, infer Name, infer Value> ? MethodProjection<CallableInputValue<Value>, CallableOutputValue<Value>, CallableStaticOf<Value>, CallableAbstractOf<Value>, CallableAuthOf<Value>, Name, language.MethodKey<Origin, OwnerName, Name>, MethodExecutableOf<AbstractOf<ClassInputOf<Owner>>, CallableAbstractOf<Value>>, CallableExecutionOf<Value>> : never;
29
+ type MethodProjectionOfEntries<Origin extends string, OwnerName extends string, Entries> = Entries extends unknown ? MethodProjectionOfEntry<Origin, OwnerName, Entries> : never;
30
+ type MethodProjectionOfResolved<Value> = Value extends language.ResolvedMethod<infer Input, infer Output, infer Static, infer Abstract, infer Auth, infer _Policy, infer Key> & {
31
+ readonly name: infer Name extends string;
32
+ } ? MethodProjection<Input, Output, Static, Abstract, Auth, Name, Key, Value['executable'], Value['execution']> : never;
33
+ /** Capture each Method through its qualified lookup key. */
34
+ export type MethodsOfCollection<Value> = Value extends {
35
+ readonly byKey: infer ByKey extends Readonly<Record<language.MethodKey, language.ResolvedMethod>>;
36
+ } ? MethodProjectionOfResolved<ByKey[keyof ByKey]> : never;
37
+ /** Project the instance Methods declared directly by one Class. */
38
+ export type OwnInstanceMethodProjectionsOf<Origin extends string, Name extends string, Value> = MethodProjectionOfEntries<Origin, Name, OwnMethodEntries<Value, false>>;
39
+ /** Project the static Methods declared directly by one Class. */
40
+ export type OwnStaticMethodProjectionsOf<Origin extends string, Name extends string, Value> = MethodProjectionOfEntries<Origin, Name, OwnMethodEntries<Value, true>>;
41
+ /** Bind an authored Function to its exact Domain coordinates. */
42
+ export type FunctionProjectionOfAuthoring<Origin extends string, Name extends string, Value> = Value extends Function ? FunctionProjection<CallableInputValue<Value>, CallableOutputValue<Value>, CallableAuthOf<Value>, language.FunctionRef<Name> & {
43
+ readonly origin: Origin;
44
+ }, language.DefinitionKey<Origin, 'function', Name>, CallableExecutionOf<Value>> : never;
45
+ /** Restore a resolved Function while preserving its execution modifier. */
46
+ export type ResolvedFunctionOfProjection<Value extends FunctionProjection> = Value extends FunctionProjection<infer Input, infer Output, infer Auth, infer Ref, infer Key, infer Execution> ? language.ResolvedFunction<Input, Output, Auth, language.CallablePolicy> & {
47
+ readonly ref: Ref;
48
+ readonly key: Key;
49
+ readonly execution: Execution;
50
+ } : never;
51
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,89 @@
1
+ import type * as language from '../../../language/index.js';
2
+ import type { NodeClass, DirectedEdgeClass, UndirectedEdgeClass, ClassReferenceProjection, Class, ProjectionOfClass } from '../../class/authoring.js';
3
+ import type { DomainSchemaInput } from '../input.js';
4
+ import type { OwnInstanceMethodProjectionsOf, OwnStaticMethodProjectionsOf } from './callable.js';
5
+ import type { AbstractOf, ConstraintsOf, ResolveLazy, LocalNameOfReference, ClassesInputOf, LocalNameOf } from './identity.js';
6
+ import type { ClassProjection } from './model.js';
7
+ import type { EffectivePropertyProjectionsOf, OwnPropertyProjectionsOf } from './property.js';
8
+ import type { ClassProjectionOfResolved, ExactClass } from './resolved-class.js';
9
+ type ProjectedClassDefinition<Origin extends string, Name extends string, Value> = Value extends NodeClass<infer Config> ? language.NodeClassDefinition & {
10
+ readonly ref: language.ClassRef<Name> & {
11
+ readonly origin: Origin;
12
+ };
13
+ readonly kind: 'node';
14
+ readonly abstract: AbstractOf<Config>;
15
+ } : Value extends DirectedEdgeClass<infer Input> ? Input extends {
16
+ readonly source: infer Source extends {
17
+ readonly as: string;
18
+ readonly outgoing: language.EdgeCount;
19
+ };
20
+ readonly target: infer Target extends {
21
+ readonly as: string;
22
+ readonly incoming: language.EdgeCount;
23
+ };
24
+ } ? language.EdgeClassDefinition & {
25
+ readonly ref: language.ClassRef<Name> & {
26
+ readonly origin: Origin;
27
+ };
28
+ readonly kind: 'edge';
29
+ readonly abstract: AbstractOf<Input>;
30
+ readonly orientation: 'directed';
31
+ readonly endpoints: {
32
+ readonly source: language.DirectedSourceEndpoint & {
33
+ readonly role: Source['as'];
34
+ readonly outgoing: Source['outgoing'];
35
+ };
36
+ readonly target: language.DirectedTargetEndpoint & {
37
+ readonly role: Target['as'];
38
+ readonly incoming: Target['incoming'];
39
+ };
40
+ };
41
+ readonly constraints: language.DirectedEdgeConstraints & ConstraintsOf<Input>;
42
+ } : never : Value extends UndirectedEdgeClass<infer Input> ? Input extends {
43
+ readonly endpoints: readonly [
44
+ infer First extends {
45
+ readonly as: string;
46
+ readonly incident: language.EdgeCount;
47
+ },
48
+ infer Second extends {
49
+ readonly as: string;
50
+ readonly incident: language.EdgeCount;
51
+ }
52
+ ];
53
+ } ? language.EdgeClassDefinition & {
54
+ readonly ref: language.ClassRef<Name> & {
55
+ readonly origin: Origin;
56
+ };
57
+ readonly kind: 'edge';
58
+ readonly abstract: AbstractOf<Input>;
59
+ readonly orientation: 'undirected';
60
+ readonly endpoints: readonly [
61
+ language.IncidentEndpoint & {
62
+ readonly role: First['as'];
63
+ readonly incident: First['incident'];
64
+ },
65
+ language.IncidentEndpoint & {
66
+ readonly role: Second['as'];
67
+ readonly incident: Second['incident'];
68
+ }
69
+ ];
70
+ readonly constraints: language.UndirectedEdgeConstraints & ConstraintsOf<Input>;
71
+ } : never : never;
72
+ type ParentInputsOfConfig<Config> = Config extends {
73
+ readonly extends?: infer Parents extends readonly unknown[];
74
+ } ? Parents : readonly [];
75
+ type ParentClassProjectionOf<Origin extends string, Parent, Root extends DomainSchemaInput, Seen> = ResolveLazy<Parent> extends infer Resolved ? Resolved extends ClassReferenceProjection<infer _Kind, infer _Identity, infer _Properties, infer _InstanceMethods, infer _StaticMethods> ? LocalNameOfReference<Root, Resolved> extends infer Name extends string ? Name extends keyof ClassesInputOf<Root> ? ShallowClassProjectionOfAuthoring<Origin, Name, Extract<ClassesInputOf<Root>[Name], Class>, Root> : never : never : Resolved extends ClassProjection ? Resolved : Resolved extends language.AnyResolvedClass ? ClassProjectionOfResolved<ExactClass<Resolved>> : LocalNameOf<Root, Resolved> extends infer Name extends string ? Resolved extends Seen ? never : ClassProjectionOfAuthoring<Origin, Name, Resolved, Root, Seen | Resolved> : never : never;
76
+ type ParentClassProjectionTuple<Origin extends string, Parents extends readonly unknown[], Root extends DomainSchemaInput, Seen> = Parents extends readonly [] ? readonly [] : Parents extends readonly [infer Parent, ...infer Rest] ? readonly [
77
+ ParentClassProjectionOf<Origin, Parent, Root, Seen>,
78
+ ...ParentClassProjectionTuple<Origin, Rest, Root, Seen>
79
+ ] : readonly ParentClassProjectionOf<Origin, Parents[number], Root, Seen>[];
80
+ /** A shallow parent retains member contracts without expanding another parent tuple. */
81
+ type ShallowClassProjectionOfAuthoring<Origin extends string, Name extends string, Value, Root extends DomainSchemaInput> = ClassProjectionWithParents<Origin, Name, Value, Root, readonly language.AnyResolvedClass[]>;
82
+ /** Project each authored Class independently before computing its parent tuple. */
83
+ export type ClassProjectionOfAuthoring<Origin extends string, Name extends string, Value, Root extends DomainSchemaInput, Seen = Value> = Value extends Class ? ClassProjectionWithParents<Origin, Name, Value, Root, ParentClassProjectionTuple<Origin, ParentInputsOfConfig<ProjectionOfClass<Extract<Value, Class>>>, Root, Seen>> : never;
84
+ type ClassProjectionWithParents<Origin extends string, Name extends string, Value, Root extends DomainSchemaInput, Parents extends readonly unknown[]> = Value extends NodeClass<infer _Config> ? ClassProjection<'node', Extract<ProjectedClassDefinition<Origin, Name, Value>, language.NodeClassDefinition>, language.ClassRef<Name> & {
85
+ readonly origin: Origin;
86
+ }, language.DefinitionKey<Origin, 'class', Name>, Parents, EffectivePropertyProjectionsOf<Origin, Name, Value, Root>, OwnInstanceMethodProjectionsOf<Origin, Name, Value>, OwnStaticMethodProjectionsOf<Origin, Name, Value>, OwnPropertyProjectionsOf<Origin, Name, Value>, OwnInstanceMethodProjectionsOf<Origin, Name, Value>, OwnStaticMethodProjectionsOf<Origin, Name, Value>> : Value extends DirectedEdgeClass | UndirectedEdgeClass ? ClassProjection<'edge', Extract<ProjectedClassDefinition<Origin, Name, Value>, language.EdgeClassDefinition>, language.ClassRef<Name> & {
87
+ readonly origin: Origin;
88
+ }, language.DefinitionKey<Origin, 'class', Name>, Parents, EffectivePropertyProjectionsOf<Origin, Name, Value, Root>, never, never, OwnPropertyProjectionsOf<Origin, Name, Value>, never, never> : never;
89
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,32 @@
1
+ import type * as language from '../../../language/index.js';
2
+ import type { BlobReceipt } from '../../../language/value/model/blob.js';
3
+ import type { Class, AuthoredPropertyProjection } from '../../class/authoring.js';
4
+ import type { ResolveLazy, IsMultiple } from './identity.js';
5
+ import type { EffectivePropertyEntriesOfClass } from './property.js';
6
+ /** Derive required, optional and forbidden Core Property inputs by name. */
7
+ export type CoreNamedPropertyInput<ClassValue> = ResolveLazy<ClassValue> extends infer Resolved ? Resolved extends Class ? CorePropertyInputFromAuthoredProjections<EffectivePropertyEntriesOfClass<Resolved>> : Resolved extends language.ResolvedClass ? language.PropertyInputOf<Resolved> : never : never;
8
+ /** Allow exact named Core inputs or canonical qualified Property keys. */
9
+ export type CorePropertyInput<ClassValue> = CoreNamedPropertyInput<ClassValue> | Readonly<Record<language.PropertyKey, language.PropertyValue>>;
10
+ type AuthoredProjectionName<Entry> = Entry extends AuthoredPropertyProjection<unknown, unknown, boolean, infer Name> ? Name : never;
11
+ type AuthoredProjectionInput<Entry> = Entry extends AuthoredPropertyProjection<infer Input, unknown, boolean, string> ? Input : never;
12
+ type CoreProjectionInput<Entry> = Entry extends AuthoredPropertyProjection<infer Input, infer Output, boolean, string> ? Input extends BlobReceipt ? Output : Input : never;
13
+ type AuthoredProjectionRequired<Entry> = Entry extends AuthoredPropertyProjection<unknown, unknown, infer Required, string> ? Required : false;
14
+ type UniqueAuthoredProjections<Entries> = Entries extends unknown ? IsMultiple<Extract<Entries, {
15
+ readonly name: AuthoredProjectionName<Entries>;
16
+ }>> extends true ? never : Entries : never;
17
+ type CoreAuthoredProjections<Entries> = UniqueAuthoredProjections<Entries> extends infer Entry ? Entry extends unknown ? [AuthoredProjectionInput<Entry>] extends [never] ? never : Entry : never : never;
18
+ type RequiredAuthoredPropertyNames<Entries> = CoreAuthoredProjections<Entries> extends infer Entry ? Entry extends unknown ? AuthoredProjectionRequired<Entry> extends true ? AuthoredProjectionName<Entry> : never : never : never;
19
+ type OptionalAuthoredPropertyNames<Entries> = Exclude<AuthoredProjectionName<CoreAuthoredProjections<Entries>>, RequiredAuthoredPropertyNames<Entries>>;
20
+ type AutomaticAuthoredPropertyNames<Entries> = UniqueAuthoredProjections<Entries> extends infer Entry ? Entry extends unknown ? [AuthoredProjectionInput<Entry>] extends [never] ? AuthoredProjectionName<Entry> : never : never : never;
21
+ type CorePropertyInputFromAuthoredProjections<Entries> = Readonly<{
22
+ [Name in RequiredAuthoredPropertyNames<Entries>]: CoreProjectionInput<Extract<CoreAuthoredProjections<Entries>, {
23
+ readonly name: Name;
24
+ }>>;
25
+ } & {
26
+ [Name in OptionalAuthoredPropertyNames<Entries>]?: CoreProjectionInput<Extract<CoreAuthoredProjections<Entries>, {
27
+ readonly name: Name;
28
+ }>>;
29
+ } & {
30
+ [Name in AutomaticAuthoredPropertyNames<Entries>]?: never;
31
+ }>;
32
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,59 @@
1
+ import type { Revision } from '../../../addressing/index.js';
2
+ import type * as domain from '../../../domain/model/domain.js';
3
+ import type * as language from '../../../language/index.js';
4
+ import type { DomainSchema, DomainOfSchema } from '../../../schema/model/schema.js';
5
+ import type { DomainSchemaInput } from '../input.js';
6
+ import type { FunctionProjectionOfAuthoring, ResolvedFunctionOfProjection } from './callable.js';
7
+ import type { ClassProjectionOfAuthoring } from './class.js';
8
+ import type { ClassesInputOf, RecordField } from './identity.js';
9
+ import type { DomainProjection, ClassProjection, FunctionProjection } from './model.js';
10
+ import type { ResolvedClassOfProjection } from './resolved-class.js';
11
+ type ProjectionOfInput<Origin extends string, Input extends DomainSchemaInput> = DomainProjection<{
12
+ readonly [Name in keyof ClassesInputOf<Input>]: ClassProjectionOfAuthoring<Origin, Extract<Name, string>, ClassesInputOf<Input>[Name], Input>;
13
+ }, {
14
+ readonly [Name in keyof FunctionsInputOf<Input>]: FunctionProjectionOfAuthoring<Origin, Extract<Name, string>, FunctionsInputOf<Input>[Name]>;
15
+ }, {
16
+ readonly [Name in keyof PoliciesInputOf<Input>]: language.ResolvedPolicy & {
17
+ readonly ref: language.PolicyRef<Extract<Name, string>> & {
18
+ readonly origin: Origin;
19
+ };
20
+ readonly key: language.DefinitionKey<Origin, 'policy', Extract<Name, string>>;
21
+ };
22
+ }, {
23
+ readonly [Name in keyof ViewsInputOf<Input>]: language.ResolvedView & {
24
+ readonly ref: language.ViewRef<Extract<Name, string>> & {
25
+ readonly origin: Origin;
26
+ };
27
+ readonly key: language.DefinitionKey<Origin, 'view', Extract<Name, string>>;
28
+ };
29
+ }, {
30
+ readonly [Name in keyof CoreNodesInputOf<Input>]: language.ResolvedCoreDefinition & {
31
+ readonly ref: language.CoreRef<Extract<Name, string>> & {
32
+ readonly origin: Origin;
33
+ };
34
+ readonly key: language.DefinitionKey<Origin, 'core', Extract<Name, string>>;
35
+ };
36
+ }, DependencySchemasOf<Input>>;
37
+ interface DomainOfProjection<Projection extends DomainProjection> extends domain.Domain<{
38
+ readonly [Name in keyof Projection['classes']]: ResolvedClassOfProjection<Extract<Projection['classes'][Name], ClassProjection>>;
39
+ }, {
40
+ readonly [Name in keyof Projection['functions']]: ResolvedFunctionOfProjection<Extract<Projection['functions'][Name], FunctionProjection>>;
41
+ }, Extract<Projection['policies'], Readonly<Record<string, language.ResolvedPolicy>>>, Extract<Projection['views'], Readonly<Record<string, language.ResolvedView>>>, Extract<Projection['core'], Readonly<Record<string, language.ResolvedCoreDefinition>>>, Revision> {
42
+ readonly dependencies: domain.DependencyDomainNamespace<{
43
+ readonly [Alias in keyof Projection['dependencies']]: Projection['dependencies'][Alias] extends infer Dependency extends DomainSchema ? DomainOfSchema<Dependency> : never;
44
+ }>;
45
+ }
46
+ /** Resolve compact authored witnesses into the exact public Domain type. */
47
+ export type ResolvedDomainOfInput<Origin extends string, Input extends DomainSchemaInput> = DomainOfProjection<ProjectionOfInput<Origin, Input>>;
48
+ type DependenciesInputOf<Input extends DomainSchemaInput> = RecordField<Input, 'dependencies'>;
49
+ type DependencySchemasOf<Input extends DomainSchemaInput> = {
50
+ readonly [Alias in keyof DependenciesInputOf<Input>]: DependenciesInputOf<Input>[Alias];
51
+ };
52
+ type FunctionsInputOf<Input extends DomainSchemaInput> = RecordField<Input, 'functions'>;
53
+ type PoliciesInputOf<Input extends DomainSchemaInput> = RecordField<Input, 'policies'>;
54
+ type ViewsInputOf<Input extends DomainSchemaInput> = RecordField<Input, 'views'>;
55
+ type CoreInputOf<Input extends DomainSchemaInput> = Input extends {
56
+ readonly core?: infer CoreValue;
57
+ } ? NonNullable<CoreValue> : Record<never, never>;
58
+ type CoreNodesInputOf<Input extends DomainSchemaInput> = RecordField<CoreInputOf<Input>, 'nodes'>;
59
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,39 @@
1
+ import type { NodeClass, DirectedEdgeClass, UndirectedEdgeClass, ClassReferenceProjection, ClassReferenceProjectionOf, Class, ClassIdentityProjectionOf, ClassOwnerProjectionOf, ClassOwnerProjection, ClassIdentityProjection } from '../../class/authoring.js';
2
+ import type { DomainSchemaInput } from '../input.js';
3
+ /** Extract an authored abstract modifier with its default. */
4
+ export type AbstractOf<Config> = Config extends {
5
+ readonly abstract: infer Abstract extends boolean;
6
+ } ? Abstract : false;
7
+ /** Extract only the authored Edge constraints. */
8
+ export type ConstraintsOf<Options> = Options extends {
9
+ readonly constraints?: infer Constraints;
10
+ } ? NonNullable<Constraints> : Record<never, never>;
11
+ /** Extract one optional named declaration dictionary. */
12
+ export type RecordField<Value, Key extends PropertyKey> = Key extends keyof Value ? NonNullable<Value[Key]> extends Readonly<Record<string, unknown>> ? NonNullable<Value[Key]> : Record<never, never> : Record<never, never>;
13
+ /** Select the local Class dictionary of a schema input. */
14
+ export type ClassesInputOf<Input extends DomainSchemaInput> = RecordField<Input, 'classes'>;
15
+ /** Unwrap lazy references within the existing 32-step inference budget. */
16
+ export type ResolveLazy<Value, Depth extends readonly unknown[] = []> = Depth['length'] extends 32 ? Value : Value extends () => infer Resolved ? ResolveLazy<Resolved, readonly [...Depth, unknown]> : Value;
17
+ /** Extract the compact projection retained by a Class handle. */
18
+ export type ClassInputOf<Value> = Value extends NodeClass<infer Input> ? Input : Value extends DirectedEdgeClass<infer Input> ? Input : Value extends UndirectedEdgeClass<infer Input> ? Input : never;
19
+ type Same<Left, Right> = [Left] extends [Right] ? ([Right] extends [Left] ? true : false) : false;
20
+ /** Find a local Class by its exact authoring handle type. */
21
+ export type LocalNameOf<Root extends DomainSchemaInput, Value> = {
22
+ [Name in keyof ClassesInputOf<Root>]: Same<ClassesInputOf<Root>[Name], Value> extends true ? Name : never;
23
+ }[keyof ClassesInputOf<Root>];
24
+ /** Find a local Class by its retained reference projection. */
25
+ export type LocalNameOfReference<Root extends DomainSchemaInput, Value> = {
26
+ [Name in keyof ClassesInputOf<Root>]: Value extends ClassReferenceProjection<'node' | 'edge', unknown, unknown, unknown, unknown> ? Same<ClassReferenceProjectionOf<Extract<ClassesInputOf<Root>[Name], Class>>, Value> extends true ? Name : never : never;
27
+ }[keyof ClassesInputOf<Root>];
28
+ type LocalNameOfIdentity<Root extends DomainSchemaInput, Value> = {
29
+ [Name in keyof ClassesInputOf<Root>]: Same<ClassIdentityProjectionOf<Extract<ClassesInputOf<Root>[Name], Class>>, Value> extends true ? Name : never;
30
+ }[keyof ClassesInputOf<Root>];
31
+ type LocalNameOfOwner<Root extends DomainSchemaInput, Value> = {
32
+ [Name in keyof ClassesInputOf<Root>]: Same<ClassOwnerProjectionOf<Extract<ClassesInputOf<Root>[Name], Class>>, Value> extends true ? Name : never;
33
+ }[keyof ClassesInputOf<Root>];
34
+ type UnionIsMultiple<Value, Whole = Value> = Value extends unknown ? [Whole] extends [Value] ? false : true : never;
35
+ /** Distinguish ambiguous unions from one exact member. */
36
+ export type IsMultiple<Value> = true extends UnionIsMultiple<Value> ? true : false;
37
+ /** Recover the local declaring Class name for an effective member. */
38
+ export type OwnerNameOf<Root extends DomainSchemaInput, CurrentName extends string, Owner> = Owner extends 'self' ? CurrentName : Owner extends ClassOwnerProjection ? Extract<LocalNameOfOwner<Root, Owner>, string> : Owner extends ClassIdentityProjection ? Extract<LocalNameOfIdentity<Root, Owner>, string> : never;
39
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,59 @@
1
+ import type * as language from '../../../language/index.js';
2
+ import type { StateTopology } from '../../../language/state/index.js';
3
+ /** A Property’s exact value, input, ownership and requiredness contracts. */
4
+ export interface PropertyProjection<Value = unknown, Required extends boolean = boolean, Name extends string = string, Key extends language.PropertyKey = language.PropertyKey, State extends StateTopology | undefined = StateTopology | undefined, Input = Value> {
5
+ readonly value: Value;
6
+ readonly required: Required;
7
+ readonly name: Name;
8
+ readonly key: Key;
9
+ readonly state?: State;
10
+ readonly input: Input;
11
+ }
12
+ /** A Method’s exact callable, ownership and executable contracts. */
13
+ export interface MethodProjection<Input = unknown, Output = unknown, Static extends boolean = boolean, Abstract extends boolean = boolean, Auth extends language.FunctionAuth = language.FunctionAuth, Name extends string = string, Key extends language.MethodKey = language.MethodKey, Executable extends boolean = boolean, Execution extends language.CallableExecution | undefined = language.CallableExecution | undefined> {
14
+ readonly input: Input;
15
+ readonly output: Output;
16
+ readonly static: Static;
17
+ readonly abstract: Abstract;
18
+ readonly executable: Executable;
19
+ readonly auth: Auth;
20
+ readonly name: Name;
21
+ readonly key: Key;
22
+ readonly execution: Execution;
23
+ }
24
+ /** A Function’s exact callable and declaration contracts. */
25
+ export interface FunctionProjection<Input = unknown, Output = unknown, Auth extends language.FunctionAuth = language.FunctionAuth, Ref extends language.FunctionRef = language.FunctionRef, Key extends language.DefinitionKey<string, 'function'> = language.DefinitionKey<string, 'function'>, Execution extends language.CallableExecution | undefined = language.CallableExecution | undefined> {
26
+ readonly input: Input;
27
+ readonly output: Output;
28
+ readonly auth: Auth;
29
+ readonly ref: Ref;
30
+ readonly key: Key;
31
+ readonly execution: Execution;
32
+ }
33
+ /** A compact Class witness with effective members and exact self facets. */
34
+ export interface ClassProjection<Kind extends language.ClassKind = language.ClassKind, Definition extends Extract<language.ClassDefinition, {
35
+ readonly kind: Kind;
36
+ }> = Extract<language.ClassDefinition, {
37
+ readonly kind: Kind;
38
+ }>, Ref extends language.ClassRef = language.ClassRef, Key extends language.DefinitionKey<string, 'class'> = language.DefinitionKey<string, 'class'>, Parents extends readonly unknown[] = readonly unknown[], Properties extends PropertyProjection = PropertyProjection, InstanceMethods extends MethodProjection = MethodProjection, StaticMethods extends MethodProjection = MethodProjection, SelfProperties extends PropertyProjection = PropertyProjection, SelfInstanceMethods extends MethodProjection = MethodProjection, SelfStaticMethods extends MethodProjection = MethodProjection> {
39
+ readonly kind: Kind;
40
+ readonly definition: Definition;
41
+ readonly ref: Ref;
42
+ readonly key: Key;
43
+ readonly parents: Parents;
44
+ readonly properties: Properties;
45
+ readonly methods: InstanceMethods;
46
+ readonly staticMethods: StaticMethods;
47
+ readonly selfProperties: SelfProperties;
48
+ readonly selfMethods: SelfInstanceMethods;
49
+ readonly selfStaticMethods: SelfStaticMethods;
50
+ }
51
+ /** The named declaration and direct-dependency witnesses of one Domain. */
52
+ export interface DomainProjection<Classes extends Readonly<Record<string, unknown>> = Readonly<Record<string, unknown>>, Functions extends Readonly<Record<string, unknown>> = Readonly<Record<string, unknown>>, Policies extends Readonly<Record<string, unknown>> = Readonly<Record<string, unknown>>, Views extends Readonly<Record<string, unknown>> = Readonly<Record<string, unknown>>, CoreNodes extends Readonly<Record<string, unknown>> = Readonly<Record<string, unknown>>, Dependencies extends Readonly<Record<string, unknown>> = Readonly<Record<string, unknown>>> {
53
+ readonly classes: Classes;
54
+ readonly functions: Functions;
55
+ readonly policies: Policies;
56
+ readonly views: Views;
57
+ readonly core: CoreNodes;
58
+ readonly dependencies: Dependencies;
59
+ }
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,32 @@
1
+ import type * as language from '../../../language/index.js';
2
+ import type { AuthoredPropertyProjection } from '../../class/authoring.js';
3
+ import type { DomainSchemaInput } from '../input.js';
4
+ import type { RecordField, ClassInputOf, OwnerNameOf } from './identity.js';
5
+ import type { PropertyProjection } from './model.js';
6
+ type PropertyFieldsOf<Value> = RecordField<ClassInputOf<Value>, 'properties'>;
7
+ interface AuthoredPropertyEntry<Owner, Name extends string, Field> {
8
+ readonly owner: Owner;
9
+ readonly name: Name;
10
+ readonly field: Field;
11
+ }
12
+ type OwnPropertyEntries<Value> = {
13
+ [Name in keyof PropertyFieldsOf<Value>]: AuthoredPropertyEntry<Value, Extract<Name, string>, PropertyFieldsOf<Value>[Name]>;
14
+ }[keyof PropertyFieldsOf<Value>];
15
+ type PropertyProjectionOfResolved<Value> = Value extends language.ResolvedProperty<infer PropertyValue, infer Required, infer State, infer Input> & {
16
+ readonly name: infer Name extends string;
17
+ readonly key: infer Key extends language.PropertyKey;
18
+ } ? PropertyProjection<PropertyValue, Required, Name, Key, State, Input> : never;
19
+ /** Capture every Property by its unambiguous qualified key. */
20
+ export type PropertiesOfCollection<Value> = Value extends {
21
+ readonly byKey: infer ByKey extends Readonly<Record<language.PropertyKey, language.ResolvedProperty<unknown, boolean>>>;
22
+ } ? PropertyProjectionOfResolved<ByKey[keyof ByKey]> : never;
23
+ /** Project Properties declared directly by one Class. */
24
+ export type OwnPropertyProjectionsOf<Origin extends string, Name extends string, Value> = OwnPropertyEntries<Value> extends infer Entry ? Entry extends AuthoredPropertyEntry<unknown, infer PropertyName, infer Field> ? Field extends AuthoredPropertyProjection<infer Input, infer Output, infer Required, string, unknown, infer State> ? PropertyProjection<Output, Required, PropertyName, language.PropertyKey<Origin, Name, PropertyName>, State, Input> : never : never : never;
25
+ /** Select the flat effective Property witnesses of a Class handle. */
26
+ export type EffectivePropertyEntriesOfClass<Value> = ClassInputOf<Value> extends {
27
+ readonly effectiveProperties: infer Properties;
28
+ } ? Properties : never;
29
+ type EffectivePropertyProjectionOfEntry<Origin extends string, CurrentName extends string, Root extends DomainSchemaInput, Entry> = Entry extends language.ResolvedProperty ? PropertyProjectionOfResolved<Entry> : Entry extends AuthoredPropertyProjection<infer Input, infer Output, infer Required, infer PropertyName, infer Owner, infer State> ? OwnerNameOf<Root, CurrentName, Owner> extends infer OwnerName extends string ? PropertyProjection<Output, Required, PropertyName, language.PropertyKey<Origin, OwnerName, PropertyName>, State, Input> : never : never;
30
+ /** Bind effective Property witnesses to their declaring Class coordinates. */
31
+ export type EffectivePropertyProjectionsOf<Origin extends string, Name extends string, Value, Root extends DomainSchemaInput> = EffectivePropertyEntriesOfClass<Value> extends infer Entry ? Entry extends unknown ? EffectivePropertyProjectionOfEntry<Origin, Name, Root, Entry> : never : never;
32
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,76 @@
1
+ import type * as language from '../../../language/index.js';
2
+ import type { MethodsOfCollection } from './callable.js';
3
+ import type { IsMultiple } from './identity.js';
4
+ import type { ClassProjection, PropertyProjection, MethodProjection } from './model.js';
5
+ import type { PropertiesOfCollection } from './property.js';
6
+ type EmptyMethodCollection = language.ResolvedMethodCollection<Record<never, never>>;
7
+ /** Retain exact dependency Class contracts with one shallow parent layer. */
8
+ export type ClassProjectionOfResolved<Value> = Value extends language.AnyResolvedClass ? ResolvedClassProjection<Value, ShallowClassProjectionTupleOfResolved<Value['extends']>> : never;
9
+ type ShallowClassProjectionOfResolved<Value> = ResolvedClassProjection<Value, readonly language.AnyResolvedClass[]>;
10
+ type ResolvedClassProjection<Value, Parents extends readonly unknown[]> = Value extends language.AnyResolvedClass & {
11
+ readonly ref: infer Ref extends language.ClassRef;
12
+ readonly key: infer Key extends language.DefinitionKey<string, 'class'>;
13
+ } ? ClassProjection<Value['kind'], Extract<Value['definition'], Extract<language.ClassDefinition, {
14
+ readonly kind: Value['kind'];
15
+ }>>, Ref, Key, Parents, PropertiesOfCollection<Value['properties']>, MethodsOfCollection<Value['methods']>, MethodsOfCollection<Value['static']['methods']>, PropertiesOfCollection<Value['self']['properties']>, MethodsOfCollection<Value['self']['methods']>, MethodsOfCollection<Value['self']['static']['methods']>> : never;
16
+ type ShallowClassProjectionTupleOfResolved<Parents extends readonly unknown[]> = Parents extends readonly [] ? readonly [] : Parents extends readonly [infer Parent, ...infer Rest] ? readonly [
17
+ ShallowClassProjectionOfResolved<ExactClass<Parent>>,
18
+ ...ShallowClassProjectionTupleOfResolved<Rest>
19
+ ] : readonly ShallowClassProjectionOfResolved<ExactClass<Parents[number]>>[];
20
+ /** Keep only Classes whose origin and declaration name remain literal. */
21
+ export type ExactClass<Value> = Value extends {
22
+ readonly key: infer Key extends language.DefinitionKey<string, 'class'>;
23
+ } ? Key extends `${infer Origin}:class.${infer Name}` ? string extends Origin ? never : string extends Name ? never : Value : never : never;
24
+ type ResolvedParentTupleOfProjection<Parents extends readonly unknown[]> = Parents extends readonly [] ? readonly [] : Parents extends readonly [infer Parent, ...infer Rest] ? readonly [
25
+ Parent extends ClassProjection ? ResolvedClassOfProjection<Parent> : Extract<Parent, language.AnyResolvedClass>,
26
+ ...ResolvedParentTupleOfProjection<Rest>
27
+ ] : readonly (Parents[number] extends ClassProjection ? ResolvedClassOfProjection<Parents[number]> : Extract<Parents[number], language.AnyResolvedClass>)[];
28
+ /** Restore the resolved Class surface from its compact witness. */
29
+ export type ResolvedClassOfProjection<Value extends ClassProjection> = Value extends ClassProjection<infer Kind, infer Definition, infer Ref, infer Key, infer Parents, infer Properties, infer InstanceMethods, infer StaticMethods, infer SelfProperties, infer SelfInstanceMethods, infer SelfStaticMethods> ? Key extends `${infer Origin}:class.${infer Name}` ? string extends Origin ? language.AnyResolvedClass : string extends Name ? language.AnyResolvedClass : ResolvedClassWithKind<Kind, Definition, Ref, Key, Parents, SelfProperties, SelfInstanceMethods, SelfStaticMethods, Properties, InstanceMethods, StaticMethods> : language.AnyResolvedClass : language.AnyResolvedClass;
30
+ type ResolvedClassWithKind<Kind extends language.ClassKind, Definition extends Extract<language.ClassDefinition, {
31
+ readonly kind: Kind;
32
+ }>, Ref extends language.ClassRef, Key extends language.DefinitionKey<string, 'class'>, Parents extends readonly unknown[], SelfProperties extends PropertyProjection, SelfInstanceMethods extends MethodProjection, SelfStaticMethods extends MethodProjection, Properties extends PropertyProjection, InstanceMethods extends MethodProjection, StaticMethods extends MethodProjection> = Kind extends 'node' ? language.ResolvedClass<'node', PropertyCollectionOfProjection<Properties>, MethodCollectionOfProjection<InstanceMethods>, MethodCollectionOfProjection<StaticMethods>, PropertyCollectionOfProjection<SelfProperties>, MethodCollectionOfProjection<SelfInstanceMethods>, MethodCollectionOfProjection<SelfStaticMethods>, Extract<Definition, language.NodeClassDefinition>, ResolvedParentTupleOfProjection<Parents>> & {
33
+ readonly ref: Ref;
34
+ readonly key: Key;
35
+ } : Kind extends 'edge' ? language.ResolvedClass<'edge', PropertyCollectionOfProjection<Properties>, EmptyMethodCollection, EmptyMethodCollection, PropertyCollectionOfProjection<SelfProperties>, EmptyMethodCollection, EmptyMethodCollection, Extract<Definition, language.EdgeClassDefinition>, ResolvedParentTupleOfProjection<Parents>> & {
36
+ readonly ref: Ref;
37
+ readonly key: Key;
38
+ } : never;
39
+ type PropertyCollectionOperation = 'byKey' | 'get' | 'from';
40
+ type ResolvedPropertyOfProjection<Value> = Value extends PropertyProjection<infer PropertyValue, infer Required, infer Name, infer Key, infer State, infer Input> ? language.ResolvedProperty<PropertyValue, Required, State, Input> & {
41
+ readonly name: Name;
42
+ readonly key: Key;
43
+ } : never;
44
+ type ProjectionPropertyByKey<Entries extends PropertyProjection> = Readonly<{
45
+ [Key in Entries['key']]: ResolvedPropertyOfProjection<Extract<Entries, {
46
+ readonly key: Key;
47
+ }>>;
48
+ }>;
49
+ type ProjectionPropertyByName<Entries extends PropertyProjection> = Readonly<{
50
+ [Name in Entries['name'] as IsMultiple<Extract<Entries, {
51
+ readonly name: Name;
52
+ }>> extends true ? never : Name extends PropertyCollectionOperation ? never : Name]: ResolvedPropertyOfProjection<Extract<Entries, {
53
+ readonly name: Name;
54
+ }>>;
55
+ }>;
56
+ /** Restore qualified lookup and unambiguous named Property access. */
57
+ type PropertyCollectionOfProjection<Entries extends PropertyProjection> = language.ResolvedPropertyCollection<ProjectionPropertyByKey<Entries>, ProjectionPropertyByName<Entries>>;
58
+ type MethodCollectionOperation = 'byKey' | 'get';
59
+ type ResolvedMethodOfProjection<Value> = Value extends MethodProjection<infer Input, infer Output, infer Static, infer Abstract, infer Auth, infer Name, infer Key, infer Executable, infer Execution> ? language.ResolvedMethod<Input, Output, Static, Abstract, Auth, language.CallablePolicy, Key> & {
60
+ readonly name: Name;
61
+ readonly executable: Executable;
62
+ readonly execution: Execution;
63
+ } : never;
64
+ type ProjectionMethodByKey<Entries extends MethodProjection> = Readonly<{
65
+ [Key in Entries['key']]: ResolvedMethodOfProjection<Extract<Entries, {
66
+ readonly key: Key;
67
+ }>>;
68
+ }>;
69
+ type ProjectionMethodByName<Entries extends MethodProjection> = Readonly<{
70
+ [Name in Entries['name'] as Name extends MethodCollectionOperation ? never : Name]: ResolvedMethodOfProjection<Extract<Entries, {
71
+ readonly name: Name;
72
+ }>>;
73
+ }>;
74
+ /** Restore qualified Method lookup and permitted named shortcuts. */
75
+ type MethodCollectionOfProjection<Entries extends MethodProjection> = language.ResolvedMethodCollection<ProjectionMethodByKey<Entries>, ProjectionMethodByName<Entries>>;
76
+ export {};