@astrale-os/kernel-dsl 0.2.0-beta.9 → 1.0.0-beta.2

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 +138 -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 +19 -3
  320. package/dist/v1/schema/compatibility/meaning.d.ts +0 -29
  321. package/dist/v1/schema/compatibility/meaning.js +0 -605
@@ -1,258 +1,4 @@
1
- import type { Value as PortableValue } from '@astrale-os/kernel-dsl/value';
2
- import type { z } from 'zod';
3
- import type { Revision } from '../../addressing/index.js';
4
- import type * as domain from '../../domain/model/domain.js';
5
- import type * as language from '../../language/index.js';
6
- import type { DomainOfSchema, DomainSchema } from '../../schema/model/schema.js';
7
- import type { Function, Method, StreamOutput, BinaryOutput } from '../callable/authoring.js';
8
- import type { Class, DirectedEdgeClass, NodeClass, UndirectedEdgeClass } from '../class/authoring.js';
9
- import type { AutoProperty, Property, PropertyOptions, ValueSchemaInput } from '../class/property.js';
10
- import type { TypedValueSchema } from '../value/schema.js';
11
- import type { DomainSchemaInput } from './input.js';
12
- export type DomainOfInput<Origin extends string, Input extends DomainSchemaInput> = Omit<domain.Domain<{
13
- readonly [Name in keyof ClassesInputOf<Input>]: ResolvedClassOfAuthoring<Origin, Extract<Name, string>, ClassesInputOf<Input>[Name], Input>;
14
- }, {
15
- readonly [Name in keyof FunctionsInputOf<Input>]: ResolvedFunctionOfAuthoring<Origin, Extract<Name, string>, FunctionsInputOf<Input>[Name]>;
16
- }, {
17
- readonly [Name in keyof PoliciesInputOf<Input>]: language.ResolvedPolicy & {
18
- readonly ref: language.PolicyRef<Extract<Name, string>> & {
19
- readonly origin: Origin;
20
- };
21
- readonly key: language.DefinitionKey<Origin, 'policy', Extract<Name, string>>;
22
- };
23
- }, {
24
- readonly [Name in keyof ViewsInputOf<Input>]: language.ResolvedView & {
25
- readonly ref: language.ViewRef<Extract<Name, string>> & {
26
- readonly origin: Origin;
27
- };
28
- readonly key: language.DefinitionKey<Origin, 'view', Extract<Name, string>>;
29
- };
30
- }, {
31
- readonly [Name in keyof CoreNodesInputOf<Input>]: language.ResolvedCoreDefinition & {
32
- readonly ref: language.CoreRef<Extract<Name, string>> & {
33
- readonly origin: Origin;
34
- };
35
- readonly key: language.DefinitionKey<Origin, 'core', Extract<Name, string>>;
36
- };
37
- }, Revision>, 'dependencies'> & {
38
- readonly dependencies: domain.DependencyDomainNamespace<DirectDependenciesOf<Input>>;
39
- };
40
- type DependenciesInputOf<Input extends DomainSchemaInput> = RecordField<Input, 'dependencies'>;
41
- /**
42
- * Project exact direct witnesses already carried by dependency Schemas.
43
- * This intentionally never reopens their authored inputs or computes a typed closure.
44
- */
45
- export type DirectDependenciesOf<Input extends DomainSchemaInput> = {
46
- readonly [Alias in keyof DependenciesInputOf<Input>]: DependenciesInputOf<Input>[Alias] extends infer Dependency extends DomainSchema ? DomainOfSchema<Dependency> : never;
47
- };
48
- export type ResolvedClassOfAuthoring<Origin extends string, Name extends string, Value, Root extends DomainSchemaInput, Seen = Value> = Value extends NodeClass ? language.ResolvedClass<'node', PropertyCollectionOf<Origin, EffectivePropertyEntries<Value>, Root>, MethodCollectionOf<Origin, EffectiveMethodEntries<Value, false>, Root>, MethodCollectionOf<Origin, EffectiveMethodEntries<Value, true>, Root>, PropertyCollectionOf<Origin, OwnPropertyEntries<Value>, Root>, MethodCollectionOf<Origin, OwnMethodEntries<Value, false>, Root>, MethodCollectionOf<Origin, OwnMethodEntries<Value, true>, Root>, Extract<ProjectedClassDefinition<Origin, Name, Value>, language.NodeClassDefinition>, ResolvedParentsOf<Origin, Value, Root, Seen>> & {
49
- readonly ref: language.ClassRef<Name> & {
50
- readonly origin: Origin;
51
- };
52
- readonly key: language.DefinitionKey<Origin, 'class', Name>;
53
- } : Value extends DirectedEdgeClass | UndirectedEdgeClass ? language.ResolvedClass<'edge', PropertyCollectionOf<Origin, EffectivePropertyEntries<Value>, Root>, EmptyMethodCollection, EmptyMethodCollection, PropertyCollectionOf<Origin, OwnPropertyEntries<Value>, Root>, EmptyMethodCollection, EmptyMethodCollection, Extract<ProjectedClassDefinition<Origin, Name, Value>, language.EdgeClassDefinition>, ResolvedParentsOf<Origin, Value, Root, Seen>> & {
54
- readonly ref: language.ClassRef<Name> & {
55
- readonly origin: Origin;
56
- };
57
- readonly key: language.DefinitionKey<Origin, 'class', Name>;
58
- } : never;
59
- type EmptyMethodCollection = language.ResolvedMethodCollection<Record<never, never>>;
60
- type AbstractOf<Config> = Config extends {
61
- readonly abstract: infer Abstract extends boolean;
62
- } ? Abstract : false;
63
- type ConstraintsOf<Options> = Options extends {
64
- readonly constraints?: infer Constraints;
65
- } ? NonNullable<Constraints> : Record<never, never>;
66
- type ProjectedClassDefinition<Origin extends string, Name extends string, Value> = Value extends NodeClass<infer Config> ? language.NodeClassDefinition & {
67
- readonly ref: language.ClassRef<Name> & {
68
- readonly origin: Origin;
69
- };
70
- readonly kind: 'node';
71
- readonly abstract: AbstractOf<Config>;
72
- } : Value extends DirectedEdgeClass<infer Input> ? language.EdgeClassDefinition & {
73
- readonly ref: language.ClassRef<Name> & {
74
- readonly origin: Origin;
75
- };
76
- readonly kind: 'edge';
77
- readonly abstract: AbstractOf<Input>;
78
- readonly orientation: 'directed';
79
- readonly endpoints: {
80
- readonly source: language.DirectedSourceEndpoint & {
81
- readonly role: Input['source']['as'];
82
- readonly outgoing: Input['source']['outgoing'];
83
- };
84
- readonly target: language.DirectedTargetEndpoint & {
85
- readonly role: Input['target']['as'];
86
- readonly incoming: Input['target']['incoming'];
87
- };
88
- };
89
- readonly constraints: language.DirectedEdgeConstraints & ConstraintsOf<Input>;
90
- } : Value extends UndirectedEdgeClass<infer Input> ? language.EdgeClassDefinition & {
91
- readonly ref: language.ClassRef<Name> & {
92
- readonly origin: Origin;
93
- };
94
- readonly kind: 'edge';
95
- readonly abstract: AbstractOf<Input>;
96
- readonly orientation: 'undirected';
97
- readonly endpoints: readonly [
98
- language.IncidentEndpoint & {
99
- readonly role: Input['endpoints'][0]['as'];
100
- readonly incident: Input['endpoints'][0]['incident'];
101
- },
102
- language.IncidentEndpoint & {
103
- readonly role: Input['endpoints'][1]['as'];
104
- readonly incident: Input['endpoints'][1]['incident'];
105
- }
106
- ];
107
- readonly constraints: language.UndirectedEdgeConstraints & ConstraintsOf<Input>;
108
- } : never;
109
- 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>;
110
- type ClassesInputOf<Input extends DomainSchemaInput> = RecordField<Input, 'classes'>;
111
- type FunctionsInputOf<Input extends DomainSchemaInput> = RecordField<Input, 'functions'>;
112
- type PoliciesInputOf<Input extends DomainSchemaInput> = RecordField<Input, 'policies'>;
113
- type ViewsInputOf<Input extends DomainSchemaInput> = RecordField<Input, 'views'>;
114
- type CoreInputOf<Input extends DomainSchemaInput> = Input extends {
115
- readonly core?: infer CoreValue;
116
- } ? NonNullable<CoreValue> : Record<never, never>;
117
- type CoreNodesInputOf<Input extends DomainSchemaInput> = RecordField<CoreInputOf<Input>, 'nodes'>;
118
- type ResolveLazy<Value, Depth extends readonly unknown[] = []> = Depth['length'] extends 32 ? Value : Value extends () => infer Resolved ? ResolveLazy<Resolved, readonly [...Depth, unknown]> : Value;
119
- type ClassInputOf<Value> = Value extends NodeClass<infer Input> ? Input : Value extends DirectedEdgeClass<infer Input> ? Input : Value extends UndirectedEdgeClass<infer Input> ? Input : never;
120
- type ParentsOf<Value> = ClassInputOf<Value> extends {
121
- readonly extends?: readonly (infer Parent)[];
122
- } ? ResolveLazy<Parent> : never;
123
- type ParentInputsOf<Value> = ClassInputOf<Value> extends {
124
- readonly extends?: infer Parents extends readonly unknown[];
125
- } ? Parents : readonly [];
126
- type ResolvedParentOf<Origin extends string, Parent, Root extends DomainSchemaInput, Seen> = ResolveLazy<Parent> extends infer Resolved ? Resolved extends language.ResolvedClass ? Resolved : LocalNameOf<Root, Resolved> extends infer Name extends string ? Resolved extends Seen ? Resolved extends NodeClass ? language.ResolvedClass<'node'> & {
127
- readonly key: language.DefinitionKey<Origin, 'class', Name>;
128
- } : language.ResolvedClass<'edge'> & {
129
- readonly key: language.DefinitionKey<Origin, 'class', Name>;
130
- } : ResolvedClassOfAuthoring<Origin, Name, Resolved, Root, Seen | Resolved> : never : never;
131
- type ResolvedParentsOf<Origin extends string, Value, Root extends DomainSchemaInput, Seen> = ResolvedParentTuple<Origin, ParentInputsOf<Value>, Root, Seen>;
132
- type ResolvedParentTuple<Origin extends string, Parents extends readonly unknown[], Root extends DomainSchemaInput, Seen> = Parents extends readonly [] ? readonly [] : Parents extends readonly [infer Parent, ...infer Rest] ? readonly [
133
- ResolvedParentOf<Origin, Parent, Root, Seen>,
134
- ...ResolvedParentTuple<Origin, Rest, Root, Seen>
135
- ] : readonly ResolvedParentOf<Origin, Parents[number], Root, Seen>[];
136
- type Same<Left, Right> = [Left] extends [Right] ? ([Right] extends [Left] ? true : false) : false;
137
- type LocalNameOf<Root extends DomainSchemaInput, Value> = {
138
- [Name in keyof ClassesInputOf<Root>]: Same<ClassesInputOf<Root>[Name], Value> extends true ? Name : never;
139
- }[keyof ClassesInputOf<Root>];
140
- type PropertyFieldsOf<Value> = RecordField<ClassInputOf<Value>, 'properties'>;
141
- interface AuthoredPropertyEntry<Owner, Name extends string, Field> {
142
- readonly owner: Owner;
143
- readonly name: Name;
144
- readonly field: Field;
145
- }
146
- type OwnPropertyEntries<Value> = {
147
- [Name in keyof PropertyFieldsOf<Value>]: AuthoredPropertyEntry<Value, Extract<Name, string>, PropertyFieldsOf<Value>[Name]>;
148
- }[keyof PropertyFieldsOf<Value>];
149
- type ParentPropertyEntries<Parent, Seen> = Parent extends language.ResolvedClass ? language.PropertiesOf<Parent>['byKey'][keyof language.PropertiesOf<Parent>['byKey']] : Parent extends Class ? EffectivePropertyEntries<Parent, Seen> : never;
150
- type EffectivePropertyEntries<Value, Seen = never> = Value extends Seen ? never : OwnPropertyEntries<Value> | (ParentsOf<Value> extends infer Parent ? Parent extends unknown ? ParentPropertyEntries<Parent, Seen | Value> : never : never);
151
- type PropertySchemaOf<Field> = Field extends AutoProperty<infer Value> ? PropertySchemaOf<Value> : Field extends Property<infer Schema, PropertyOptions> ? Schema : Field;
152
- type PropertyOptionsOf<Field> = Field extends AutoProperty<infer Value> ? PropertyOptionsOf<Value> : Field extends Property<ValueSchemaInput, infer Options> ? Options : Record<never, never>;
153
- type ValueOutputOf<Schema> = Schema extends TypedValueSchema<infer Value> ? Value : Schema extends z.ZodType ? z.output<Schema> : PortableValue;
154
- type ValueInputOf<Schema> = Schema extends TypedValueSchema<infer Value> ? Value : Schema extends z.ZodType ? z.input<Schema> : PortableValue;
155
- type PropertyRequiredOf<Field> = PropertyOptionsOf<Field> extends {
156
- readonly required: infer Required extends boolean;
157
- } ? Required : undefined extends ValueInputOf<PropertySchemaOf<Field>> ? false : true;
158
- export type CorePropertyInput<ClassValue> = ResolveLazy<ClassValue> extends infer Resolved ? Resolved extends Class ? CorePropertyInputFromEntries<EffectivePropertyEntries<Resolved>> : Resolved extends language.ResolvedClass ? language.PropertyInputOf<Resolved> : never : never;
159
- type PropertyEntryName<Entry> = Entry extends {
160
- readonly name: infer Name extends string;
161
- } ? Name : never;
162
- type PropertyEntryValue<Entry> = Entry extends language.ResolvedProperty<infer Value, boolean> ? Value : Entry extends AuthoredPropertyEntry<unknown, string, infer Field> ? ValueInputOf<PropertySchemaOf<Field>> : never;
163
- type PropertyEntryRequired<Entry> = Entry extends language.ResolvedProperty<unknown, infer Required> ? Required : Entry extends AuthoredPropertyEntry<unknown, string, infer Field> ? PropertyRequiredOf<Field> : false;
164
- type UniquePropertyEntries<Entries> = Entries extends unknown ? IsMultiple<Extract<Entries, {
165
- readonly name: PropertyEntryName<Entries>;
166
- }>> extends true ? never : Entries : never;
167
- type RequiredPropertyNames<Entries> = UniquePropertyEntries<Entries> extends infer Entry ? Entry extends unknown ? PropertyEntryRequired<Entry> extends true ? PropertyEntryName<Entry> : never : never : never;
168
- type OptionalPropertyNames<Entries> = Exclude<PropertyEntryName<UniquePropertyEntries<Entries>>, RequiredPropertyNames<Entries>>;
169
- type CorePropertyInputFromEntries<Entries> = Readonly<({
170
- [Name in RequiredPropertyNames<Entries>]: PropertyEntryValue<Extract<UniquePropertyEntries<Entries>, {
171
- readonly name: Name;
172
- }>>;
173
- } & {
174
- [Name in OptionalPropertyNames<Entries>]?: PropertyEntryValue<Extract<UniquePropertyEntries<Entries>, {
175
- readonly name: Name;
176
- }>>;
177
- }) | Record<language.PropertyKey, language.PropertyValue>>;
178
- type ProjectedProperty<Origin extends string, Entry, Root extends DomainSchemaInput> = Entry extends language.ResolvedProperty ? Entry : Entry extends AuthoredPropertyEntry<infer Owner, infer Name, infer Field> ? LocalNameOf<Root, Owner> extends infer OwnerName extends string ? language.ResolvedProperty<ValueOutputOf<PropertySchemaOf<Field>>, PropertyRequiredOf<Field>> & {
179
- readonly name: Name;
180
- readonly key: language.PropertyKey<Origin, OwnerName, Name>;
181
- } : never : never;
182
- type ProjectedPropertyUnion<Origin extends string, Entries, Root extends DomainSchemaInput> = Entries extends unknown ? ProjectedProperty<Origin, Entries, Root> : never;
183
- type UnionIsMultiple<Value, Whole = Value> = Value extends unknown ? [Whole] extends [Value] ? false : true : never;
184
- type IsMultiple<Value> = true extends UnionIsMultiple<Value> ? true : false;
185
- type PropertyByKey<Origin extends string, Entries, Root extends DomainSchemaInput> = Readonly<{
186
- [Key in ProjectedPropertyUnion<Origin, Entries, Root>['key']]: Extract<ProjectedPropertyUnion<Origin, Entries, Root>, {
187
- readonly key: Key;
188
- }>;
189
- }>;
190
- type PropertyByName<Origin extends string, Entries, Root extends DomainSchemaInput> = Readonly<{
191
- [Name in ProjectedPropertyUnion<Origin, Entries, Root>['name'] as IsMultiple<Extract<ProjectedPropertyUnion<Origin, Entries, Root>, {
192
- readonly name: Name;
193
- }>> extends true ? never : Name extends PropertyCollectionOperation ? never : Name]: Extract<ProjectedPropertyUnion<Origin, Entries, Root>, {
194
- readonly name: Name;
195
- }>;
196
- }>;
197
- type PropertyCollectionOperation = 'byKey' | 'get' | 'from';
198
- type PropertyCollectionOf<Origin extends string, Entries, Root extends DomainSchemaInput> = language.ResolvedPropertyCollection<PropertyByKey<Origin, Entries, Root>, PropertyByName<Origin, Entries, Root>>;
199
- type MethodFieldsOf<Value> = RecordField<ClassInputOf<Value>, 'methods'>;
200
- interface AuthoredMethodEntry<Owner, Name extends string, Value extends Method> {
201
- readonly owner: Owner;
202
- readonly name: Name;
203
- readonly value: Value;
204
- }
205
- type OwnMethodEntries<Value, Static extends boolean> = {
206
- [Name in keyof MethodFieldsOf<Value>]: MethodFieldsOf<Value>[Name] extends infer MethodValue extends Method ? CallableConfig<MethodValue> extends {
207
- readonly static: true;
208
- } ? Static extends true ? AuthoredMethodEntry<Value, Extract<Name, string>, MethodValue> : never : Static extends false ? AuthoredMethodEntry<Value, Extract<Name, string>, MethodValue> : never : never;
209
- }[keyof MethodFieldsOf<Value>];
210
- type ParentMethodEntries<Parent, Static extends boolean, Seen> = Parent extends language.ResolvedClass<'node'> ? Static extends true ? language.StaticMethodsOf<Parent>['byKey'][keyof language.StaticMethodsOf<Parent>['byKey']] : language.MethodsOf<Parent>['byKey'][keyof language.MethodsOf<Parent>['byKey']] : Parent extends NodeClass ? EffectiveMethodEntries<Parent, Static, Seen> : never;
211
- type RemoveMethodNames<Entries, Names> = Entries extends {
212
- readonly name: infer Name;
213
- } ? Name extends Names ? never : Entries : never;
214
- type EffectiveMethodEntries<Value, Static extends boolean, Seen = never> = Value extends Seen ? never : OwnMethodEntries<Value, Static> extends infer Own ? Own | RemoveMethodNames<ParentsOf<Value> extends infer Parent ? Parent extends unknown ? ParentMethodEntries<Parent, Static, Seen | Value> : never : never, Own extends {
215
- readonly name: infer Name;
216
- } ? Name : never> : never;
217
- type CallableConfig<Value> = Value extends Method<infer Config> ? Config : Value extends Function<infer Config> ? Config : never;
218
- type CallableInputValue<Value extends Method | Function> = ValueInputOf<CallableConfig<Value>['input']>;
219
- type CallableOutputValue<Value extends Method | Function> = CallableConfig<Value>['output'] extends StreamOutput<infer Item> ? {
220
- readonly mode: 'stream';
221
- readonly item: ValueOutputOf<Item>;
222
- } : CallableConfig<Value>['output'] extends BinaryOutput ? {
223
- readonly mode: 'binary';
224
- } : {
225
- readonly mode: 'value';
226
- readonly value: ValueOutputOf<CallableConfig<Value>['output']>;
227
- };
228
- type ProjectedMethod<Origin extends string, Entry, Root extends DomainSchemaInput> = Entry extends language.ResolvedMethod ? Entry : Entry extends AuthoredMethodEntry<infer Owner, infer Name, infer Value> ? LocalNameOf<Root, Owner> extends infer OwnerName extends string ? language.ResolvedMethod<CallableInputValue<Value>, CallableOutputValue<Value>, CallableStaticOf<Value>, CallableInheritanceOf<Value>, CallableAuthOf<Value>, CallablePolicyOf<Value>, language.MethodKey<Origin, OwnerName, Name>> & {
229
- readonly name: Name;
230
- } : never : never;
231
- type CallableStaticOf<Value extends Method> = CallableConfig<Value> extends {
232
- readonly static: true;
233
- } ? true : false;
234
- type CallableInheritanceOf<Value extends Method> = CallableConfig<Value> extends {
235
- readonly inheritance: infer Inheritance extends language.MethodInheritance;
236
- } ? Inheritance : 'default';
237
- type CallableAuthOf<Value extends Method | Function> = CallableConfig<Value>['auth'];
238
- type CallablePolicyOf<Value extends Method | Function> = CallableAuthOf<Value> extends 'authorized' ? language.PolicyCheckExpression : never;
239
- type ProjectedMethodUnion<Origin extends string, Entries, Root extends DomainSchemaInput> = Entries extends unknown ? ProjectedMethod<Origin, Entries, Root> : never;
240
- type MethodByKey<Origin extends string, Entries, Root extends DomainSchemaInput> = Readonly<{
241
- [Key in ProjectedMethodUnion<Origin, Entries, Root>['key']]: Extract<ProjectedMethodUnion<Origin, Entries, Root>, {
242
- readonly key: Key;
243
- }>;
244
- }>;
245
- type MethodByName<Origin extends string, Entries, Root extends DomainSchemaInput> = Readonly<{
246
- [Name in ProjectedMethodUnion<Origin, Entries, Root>['name'] as Name extends MethodCollectionOperation ? never : Name]: Extract<ProjectedMethodUnion<Origin, Entries, Root>, {
247
- readonly name: Name;
248
- }>;
249
- }>;
250
- type MethodCollectionOperation = 'byKey' | 'get';
251
- type MethodCollectionOf<Origin extends string, Entries, Root extends DomainSchemaInput> = language.ResolvedMethodCollection<MethodByKey<Origin, Entries, Root>, MethodByName<Origin, Entries, Root>>;
252
- type ResolvedFunctionOfAuthoring<Origin extends string, Name extends string, Value> = Value extends Function ? language.ResolvedFunction<CallableInputValue<Value>, CallableOutputValue<Value>, CallableAuthOf<Value>, CallablePolicyOf<Value>> & {
253
- readonly ref: language.FunctionRef<Name> & {
254
- readonly origin: Origin;
255
- };
256
- readonly key: language.DefinitionKey<Origin, 'function', Name>;
257
- } : never;
258
- export {};
1
+ export type { PropertyProjection, MethodProjection, FunctionProjection, ClassProjection, DomainProjection, } from './projection/model.js';
2
+ export type { ResolvedDomainOfInput } from './projection/domain.js';
3
+ export type { CoreNamedPropertyInput, CorePropertyInput } from './projection/core-input.js';
4
+ export type { ClassProjectionOfResolved } from './projection/resolved-class.js';
@@ -1,11 +1,14 @@
1
- import { isIRegexp } from '../../language/value/regexp/syntax.js';
1
+ import { refuseIRegexp, stateBudgetMessage } from '../../language/value/regexp/syntax.js';
2
2
  import { fullMatch as languageFullMatch, } from '../../language/value/syntax/full-match.js';
3
3
  import { fail } from '../schema/diagnostic.js';
4
4
  export { fullMatchSource } from '../../language/value/syntax/full-match.js';
5
5
  /** Authoring facade preserving the Builder-owned diagnostic for invalid source syntax. */
6
6
  export function fullMatch(source) {
7
- if (!isIRegexp(source)) {
8
- fail('BUILDER_FULL_MATCH_INVALID', '/fullMatch', 'fullMatch(...) requires a complete RFC 9485 I-Regexp source.');
7
+ const refusal = refuseIRegexp(source);
8
+ if (refusal !== undefined) {
9
+ fail('BUILDER_FULL_MATCH_INVALID', '/fullMatch', refusal === 'syntax'
10
+ ? 'fullMatch(...) requires a complete RFC 9485 I-Regexp source.'
11
+ : stateBudgetMessage('fullMatch(...)'));
9
12
  }
10
13
  return languageFullMatch(source);
11
14
  }
@@ -1,7 +1,7 @@
1
- import { z } from 'zod';
1
+ import { type ZodString } from 'zod';
2
2
  import type { NodeClassReferenceInput } from '../class/authoring.js';
3
3
  declare const PATH_ACCEPTS: unique symbol;
4
- export type PathAuthoring<Accepts extends readonly NodeClassReferenceInput[] = readonly NodeClassReferenceInput[]> = z.ZodString & {
4
+ export type PathAuthoring<Accepts extends readonly NodeClassReferenceInput[] = readonly NodeClassReferenceInput[]> = ZodString & {
5
5
  readonly [PATH_ACCEPTS]: Accepts;
6
6
  };
7
7
  export declare function path<const Accepts extends readonly NodeClassReferenceInput[]>(...accepts: Accepts): PathAuthoring<Accepts>;
@@ -1,11 +1,11 @@
1
- import { z } from 'zod';
1
+ import { string } from 'zod';
2
2
  import { fail } from '../schema/diagnostic.js';
3
3
  import { rememberPath } from './path-metadata.js';
4
4
  export function path(...accepts) {
5
5
  if (accepts.length === 0) {
6
6
  fail('BUILDER_PATH_EMPTY', '', 'path(...) requires at least one Node Definition.');
7
7
  }
8
- const schema = z.string();
8
+ const schema = string();
9
9
  rememberPath(schema, accepts);
10
10
  return schema;
11
11
  }
@@ -1,21 +1,13 @@
1
- import type { NodeClassReferenceInput } from '../class/authoring.js';
2
1
  import type { AUTHORING } from '../schema/handle.js';
3
- declare const VIEW_INPUT: unique symbol;
4
- export type ViewDefinitionTargetsInput = readonly [
5
- NodeClassReferenceInput,
6
- ...NodeClassReferenceInput[]
7
- ];
8
- export type ViewTargetInput = 'domain' | NodeClassReferenceInput | ViewDefinitionTargetsInput;
2
+ /** A View always targets its owning Domain; it declares no Class or Node target. */
9
3
  export interface ViewInput {
10
4
  readonly description?: string;
11
- readonly target?: ViewTargetInput;
5
+ /** Removed: every View targets its owning Domain. Refused at compile time and at runtime. */
6
+ readonly target?: never;
12
7
  }
13
- export interface View<out Config extends ViewInput = ViewInput> {
8
+ export interface View {
14
9
  readonly [AUTHORING]: 'view';
15
- readonly [VIEW_INPUT]: Config;
16
10
  }
17
- export type ViewAuthoringInput<Value extends View> = Value extends View<infer Config> ? Config : never;
18
11
  /** Internal lowering access; View authoring handles expose no public configuration object. */
19
- export declare function viewAuthoringInput<const Value extends View>(value: Value): ViewAuthoringInput<Value>;
20
- export declare function view<const Config extends ViewInput>(config: Config & Record<Exclude<keyof Config, keyof ViewInput>, never>): View<Config>;
21
- export {};
12
+ export declare function viewAuthoringInput(value: View): ViewInput;
13
+ export declare function view<const Config extends ViewInput>(config: Config & Record<Exclude<keyof Config, keyof ViewInput>, never>): View;
@@ -1,11 +1,19 @@
1
- import { assertKnownKeys } from '../schema/diagnostic.js';
1
+ import { assertKnownKeys, fail } from '../schema/diagnostic.js';
2
2
  import { authoringValue } from '../schema/handle.js';
3
- const VIEW_INPUT = Symbol('astrale.v1.view-input');
3
+ const viewInputs = new WeakMap();
4
4
  /** Internal lowering access; View authoring handles expose no public configuration object. */
5
5
  export function viewAuthoringInput(value) {
6
- return value[VIEW_INPUT];
6
+ const input = viewInputs.get(value);
7
+ if (input === undefined)
8
+ throw new TypeError('Unknown View authoring handle.');
9
+ return input;
7
10
  }
8
11
  export function view(config) {
9
- assertKnownKeys(config, ['description', 'target']);
10
- return authoringValue('view', { [VIEW_INPUT]: { ...config } });
12
+ if (Object.hasOwn(config, 'target')) {
13
+ fail('BUILDER_VIEW', '/target', 'View target is removed: every View targets its owning Domain. Select a Node inside the View frontend instead.');
14
+ }
15
+ assertKnownKeys(config, ['description']);
16
+ const value = authoringValue('view', {});
17
+ viewInputs.set(value, { ...config });
18
+ return value;
11
19
  }
@@ -1,7 +1,8 @@
1
1
  import type { Value as JsonValue } from '@astrale-os/kernel-dsl/value';
2
2
  import type { DomainSchemaIR } from '../schema/model/schema.js';
3
- export interface DomainSchemaBundleStructure {
3
+ interface DomainSchemaBundleStructure {
4
4
  readonly root: DomainSchemaIR;
5
5
  readonly closure: readonly DomainSchemaIR[];
6
6
  }
7
7
  export declare function parseDomainSchemaBundleStructure(input: JsonValue): DomainSchemaBundleStructure;
8
+ export {};
@@ -1,3 +1,3 @@
1
- import type { CompiledSchema } from '../model/schema.js';
1
+ import { type CompiledSchema } from '../model/schema.js';
2
2
  /** Admit one detached compiled closure before indices and declarations become executable. */
3
3
  export declare function acceptCompiledSchema(input: unknown): CompiledSchema;