@driftsys/markspec 0.10.3 → 0.12.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 (458) hide show
  1. package/README.md +11 -2
  2. package/esm/ast/normalize.d.ts +4 -5
  3. package/esm/ast/normalize.d.ts.map +1 -1
  4. package/esm/ast/normalize.js +6 -37
  5. package/esm/collect/mod.d.ts +29 -9
  6. package/esm/collect/mod.d.ts.map +1 -1
  7. package/esm/collect/mod.js +36 -10
  8. package/esm/compiler/deserialize.d.ts +49 -0
  9. package/esm/compiler/deserialize.d.ts.map +1 -0
  10. package/esm/compiler/deserialize.js +139 -0
  11. package/esm/compiler/manifest.d.ts +3 -0
  12. package/esm/compiler/manifest.d.ts.map +1 -1
  13. package/esm/compiler/manifest.js +9 -3
  14. package/esm/compiler/mod.d.ts.map +1 -1
  15. package/esm/compiler/mod.js +18 -13
  16. package/esm/config/markspec.d.ts +40 -1
  17. package/esm/config/markspec.d.ts.map +1 -1
  18. package/esm/config/markspec.js +127 -2
  19. package/esm/config/mod.d.ts.map +1 -1
  20. package/esm/config/mod.js +143 -147
  21. package/esm/decl/duplicates.d.ts +29 -0
  22. package/esm/decl/duplicates.d.ts.map +1 -0
  23. package/esm/decl/duplicates.js +28 -0
  24. package/esm/decl/mod.d.ts +4 -2
  25. package/esm/decl/mod.d.ts.map +1 -1
  26. package/esm/decl/mod.js +2 -1
  27. package/esm/decl/surfaces.d.ts +29 -7
  28. package/esm/decl/surfaces.d.ts.map +1 -1
  29. package/esm/decl/surfaces.js +31 -18
  30. package/esm/discovery/mod.d.ts +24 -8
  31. package/esm/discovery/mod.d.ts.map +1 -1
  32. package/esm/discovery/mod.js +57 -21
  33. package/esm/discovery/projects.d.ts +109 -0
  34. package/esm/discovery/projects.d.ts.map +1 -0
  35. package/esm/discovery/projects.js +232 -0
  36. package/esm/formatter/entry_body.d.ts +86 -0
  37. package/esm/formatter/entry_body.d.ts.map +1 -0
  38. package/esm/formatter/entry_body.js +287 -0
  39. package/esm/formatter/mod.d.ts +13 -9
  40. package/esm/formatter/mod.d.ts.map +1 -1
  41. package/esm/formatter/mod.js +126 -50
  42. package/esm/gates/mod.d.ts +13 -2
  43. package/esm/gates/mod.d.ts.map +1 -1
  44. package/esm/gates/mod.js +41 -13
  45. package/esm/lint/runner.d.ts.map +1 -1
  46. package/esm/lint/runner.js +7 -5
  47. package/esm/lock/acquire_compile.d.ts +31 -0
  48. package/esm/lock/acquire_compile.d.ts.map +1 -0
  49. package/esm/lock/acquire_compile.js +83 -0
  50. package/esm/lock/cache_check.d.ts +28 -0
  51. package/esm/lock/cache_check.d.ts.map +1 -0
  52. package/esm/lock/cache_check.js +51 -0
  53. package/esm/lock/check.d.ts +14 -3
  54. package/esm/lock/check.d.ts.map +1 -1
  55. package/esm/lock/check.js +43 -4
  56. package/esm/lock/edge_drift.d.ts +2 -0
  57. package/esm/lock/edge_drift.d.ts.map +1 -1
  58. package/esm/lock/edge_drift.js +4 -0
  59. package/esm/lock/git_intent.d.ts +46 -0
  60. package/esm/lock/git_intent.d.ts.map +1 -0
  61. package/esm/lock/git_intent.js +111 -0
  62. package/esm/lock/mod.d.ts +11 -4
  63. package/esm/lock/mod.d.ts.map +1 -1
  64. package/esm/lock/mod.js +8 -2
  65. package/esm/lock/model.d.ts +24 -1
  66. package/esm/lock/model.d.ts.map +1 -1
  67. package/esm/lock/parser.d.ts.map +1 -1
  68. package/esm/lock/parser.js +32 -0
  69. package/esm/lock/pin_assurance.d.ts +20 -0
  70. package/esm/lock/pin_assurance.d.ts.map +1 -0
  71. package/esm/lock/pin_assurance.js +34 -0
  72. package/esm/lock/resolve.d.ts +8 -17
  73. package/esm/lock/resolve.d.ts.map +1 -1
  74. package/esm/lock/resolve.js +7 -67
  75. package/esm/lock/serializer.d.ts.map +1 -1
  76. package/esm/lock/serializer.js +23 -0
  77. package/esm/lock/upstream_common.d.ts +29 -0
  78. package/esm/lock/upstream_common.d.ts.map +1 -0
  79. package/esm/lock/upstream_common.js +38 -0
  80. package/esm/lock/upstream_deps.d.ts +63 -0
  81. package/esm/lock/upstream_deps.d.ts.map +1 -0
  82. package/esm/lock/upstream_deps.js +172 -0
  83. package/esm/lock/upstream_refs.d.ts +69 -0
  84. package/esm/lock/upstream_refs.d.ts.map +1 -0
  85. package/esm/lock/upstream_refs.js +238 -0
  86. package/esm/mod.d.ts +23 -11
  87. package/esm/mod.d.ts.map +1 -1
  88. package/esm/mod.js +20 -8
  89. package/esm/model/mod.d.ts +114 -28
  90. package/esm/model/mod.d.ts.map +1 -1
  91. package/esm/model/mod.js +76 -13
  92. package/esm/model/profile.d.ts +13 -0
  93. package/esm/model/profile.d.ts.map +1 -1
  94. package/esm/parser/code_regions.d.ts +29 -0
  95. package/esm/parser/code_regions.d.ts.map +1 -0
  96. package/esm/parser/code_regions.js +38 -0
  97. package/esm/parser/markdown.d.ts.map +1 -1
  98. package/esm/parser/markdown.js +110 -91
  99. package/esm/parser/mod.d.ts.map +1 -1
  100. package/esm/parser/mod.js +7 -1
  101. package/esm/parser/translate.d.ts.map +1 -1
  102. package/esm/parser/translate.js +5 -0
  103. package/esm/profile/manifest.d.ts.map +1 -1
  104. package/esm/profile/manifest.js +20 -3
  105. package/esm/profile/merge.js +7 -0
  106. package/esm/refs/mod.d.ts.map +1 -1
  107. package/esm/refs/mod.js +8 -19
  108. package/esm/reporter/mod.d.ts +11 -0
  109. package/esm/reporter/mod.d.ts.map +1 -1
  110. package/esm/reporter/mod.js +20 -9
  111. package/esm/typl/assemble.d.ts +53 -0
  112. package/esm/typl/assemble.d.ts.map +1 -0
  113. package/esm/typl/assemble.js +238 -0
  114. package/esm/typl/ast.d.ts +7 -1
  115. package/esm/typl/ast.d.ts.map +1 -1
  116. package/esm/typl/ast.js +3 -0
  117. package/esm/typl/bullet.d.ts +9 -7
  118. package/esm/typl/bullet.d.ts.map +1 -1
  119. package/esm/typl/bullet.js +6 -4
  120. package/esm/typl/citations.d.ts +27 -0
  121. package/esm/typl/citations.d.ts.map +1 -0
  122. package/esm/typl/citations.js +16 -0
  123. package/esm/typl/diagnostics.d.ts +2 -2
  124. package/esm/typl/diagnostics.d.ts.map +1 -1
  125. package/esm/typl/diagnostics.js +18 -0
  126. package/esm/typl/grammar.d.ts.map +1 -1
  127. package/esm/typl/grammar.js +6 -0
  128. package/esm/typl/lexer.d.ts.map +1 -1
  129. package/esm/typl/lexer.js +25 -4
  130. package/esm/typl/mod.d.ts +8 -2
  131. package/esm/typl/mod.d.ts.map +1 -1
  132. package/esm/typl/mod.js +5 -1
  133. package/esm/typl/recognize.js +2 -2
  134. package/esm/typl/registry.d.ts +1 -1
  135. package/esm/typl/resolve.d.ts +31 -0
  136. package/esm/typl/resolve.d.ts.map +1 -0
  137. package/esm/typl/resolve.js +27 -0
  138. package/esm/typl/table.d.ts +52 -0
  139. package/esm/typl/table.d.ts.map +1 -0
  140. package/esm/typl/table.js +69 -0
  141. package/esm/typl/validator.d.ts +24 -5
  142. package/esm/typl/validator.d.ts.map +1 -1
  143. package/esm/typl/validator.js +55 -75
  144. package/esm/upstream/mod.d.ts +45 -0
  145. package/esm/upstream/mod.d.ts.map +1 -0
  146. package/esm/upstream/mod.js +98 -0
  147. package/esm/upstream/project.d.ts +33 -0
  148. package/esm/upstream/project.d.ts.map +1 -0
  149. package/esm/upstream/project.js +38 -0
  150. package/esm/upstream/refs.d.ts +23 -0
  151. package/esm/upstream/refs.d.ts.map +1 -0
  152. package/esm/upstream/refs.js +71 -0
  153. package/esm/util/fence.d.ts +20 -29
  154. package/esm/util/fence.d.ts.map +1 -1
  155. package/esm/util/fence.js +42 -50
  156. package/esm/util/modals.d.ts +6 -0
  157. package/esm/util/modals.d.ts.map +1 -1
  158. package/esm/util/modals.js +37 -0
  159. package/esm/util/paths.d.ts +14 -0
  160. package/esm/util/paths.d.ts.map +1 -0
  161. package/esm/util/paths.js +22 -0
  162. package/esm/uxil/assemble.d.ts +38 -0
  163. package/esm/uxil/assemble.d.ts.map +1 -0
  164. package/esm/uxil/assemble.js +268 -0
  165. package/esm/uxil/ast.d.ts +63 -0
  166. package/esm/uxil/ast.d.ts.map +1 -0
  167. package/esm/uxil/ast.js +9 -0
  168. package/esm/uxil/citations.d.ts +27 -0
  169. package/esm/uxil/citations.d.ts.map +1 -0
  170. package/esm/uxil/citations.js +25 -0
  171. package/esm/uxil/diagnostics.d.ts +39 -0
  172. package/esm/uxil/diagnostics.d.ts.map +1 -0
  173. package/esm/uxil/diagnostics.js +135 -0
  174. package/esm/uxil/grammar.d.ts +72 -0
  175. package/esm/uxil/grammar.d.ts.map +1 -0
  176. package/esm/uxil/grammar.js +505 -0
  177. package/esm/uxil/lexer.d.ts +23 -0
  178. package/esm/uxil/lexer.d.ts.map +1 -0
  179. package/esm/uxil/lexer.js +58 -0
  180. package/esm/uxil/mod.d.ts +32 -0
  181. package/esm/uxil/mod.d.ts.map +1 -0
  182. package/esm/uxil/mod.js +11 -0
  183. package/esm/uxil/projection.d.ts +40 -0
  184. package/esm/uxil/projection.d.ts.map +1 -0
  185. package/esm/uxil/projection.js +41 -0
  186. package/esm/uxil/recognize.d.ts +16 -0
  187. package/esm/uxil/recognize.d.ts.map +1 -0
  188. package/esm/uxil/recognize.js +28 -0
  189. package/esm/uxil/registry.d.ts +37 -0
  190. package/esm/uxil/registry.d.ts.map +1 -0
  191. package/esm/uxil/registry.js +29 -0
  192. package/esm/uxil/surfaces.d.ts +36 -0
  193. package/esm/uxil/surfaces.d.ts.map +1 -0
  194. package/esm/uxil/surfaces.js +34 -0
  195. package/esm/uxil/validator.d.ts +36 -0
  196. package/esm/uxil/validator.d.ts.map +1 -0
  197. package/esm/uxil/validator.js +139 -0
  198. package/esm/uxil/vocab.d.ts +33 -0
  199. package/esm/uxil/vocab.d.ts.map +1 -0
  200. package/esm/uxil/vocab.js +36 -0
  201. package/esm/validator/body_blocks.d.ts +2 -1
  202. package/esm/validator/body_blocks.d.ts.map +1 -1
  203. package/esm/validator/body_blocks.js +80 -2
  204. package/esm/validator/caption_convention.d.ts +2 -1
  205. package/esm/validator/caption_convention.d.ts.map +1 -1
  206. package/esm/validator/caption_convention.js +2 -1
  207. package/esm/validator/corpus.d.ts +6 -0
  208. package/esm/validator/corpus.d.ts.map +1 -1
  209. package/esm/validator/corpus.js +55 -20
  210. package/esm/validator/discipline.d.ts +6 -4
  211. package/esm/validator/discipline.d.ts.map +1 -1
  212. package/esm/validator/discipline.js +6 -4
  213. package/esm/validator/mod.d.ts +1 -1
  214. package/esm/validator/mod.d.ts.map +1 -1
  215. package/esm/validator/mod.js +29 -16
  216. package/esm/validator/pipeline.d.ts +11 -1
  217. package/esm/validator/pipeline.d.ts.map +1 -1
  218. package/esm/validator/pipeline.js +76 -23
  219. package/esm/validator/trace_types.d.ts +9 -2
  220. package/esm/validator/trace_types.d.ts.map +1 -1
  221. package/esm/validator/trace_types.js +21 -5
  222. package/esm/validator/traceability.d.ts +15 -3
  223. package/esm/validator/traceability.d.ts.map +1 -1
  224. package/esm/validator/traceability.js +39 -4
  225. package/esm/validator/types.d.ts.map +1 -1
  226. package/esm/validator/types.js +11 -1
  227. package/esm/validator/uxil_family.d.ts +43 -0
  228. package/esm/validator/uxil_family.d.ts.map +1 -0
  229. package/esm/validator/uxil_family.js +52 -0
  230. package/package.json +1 -1
  231. package/script/ast/normalize.d.ts +4 -5
  232. package/script/ast/normalize.d.ts.map +1 -1
  233. package/script/ast/normalize.js +5 -36
  234. package/script/collect/mod.d.ts +29 -9
  235. package/script/collect/mod.d.ts.map +1 -1
  236. package/script/collect/mod.js +38 -10
  237. package/script/compiler/deserialize.d.ts +49 -0
  238. package/script/compiler/deserialize.d.ts.map +1 -0
  239. package/script/compiler/deserialize.js +144 -0
  240. package/script/compiler/manifest.d.ts +3 -0
  241. package/script/compiler/manifest.d.ts.map +1 -1
  242. package/script/compiler/manifest.js +10 -3
  243. package/script/compiler/mod.d.ts.map +1 -1
  244. package/script/compiler/mod.js +16 -11
  245. package/script/config/markspec.d.ts +40 -1
  246. package/script/config/markspec.d.ts.map +1 -1
  247. package/script/config/markspec.js +129 -3
  248. package/script/config/mod.d.ts.map +1 -1
  249. package/script/config/mod.js +143 -147
  250. package/script/decl/duplicates.d.ts +29 -0
  251. package/script/decl/duplicates.d.ts.map +1 -0
  252. package/script/decl/duplicates.js +31 -0
  253. package/script/decl/mod.d.ts +4 -2
  254. package/script/decl/mod.d.ts.map +1 -1
  255. package/script/decl/mod.js +4 -2
  256. package/script/decl/surfaces.d.ts +29 -7
  257. package/script/decl/surfaces.d.ts.map +1 -1
  258. package/script/decl/surfaces.js +32 -19
  259. package/script/discovery/mod.d.ts +24 -8
  260. package/script/discovery/mod.d.ts.map +1 -1
  261. package/script/discovery/mod.js +56 -20
  262. package/script/discovery/projects.d.ts +109 -0
  263. package/script/discovery/projects.d.ts.map +1 -0
  264. package/script/discovery/projects.js +240 -0
  265. package/script/formatter/entry_body.d.ts +86 -0
  266. package/script/formatter/entry_body.d.ts.map +1 -0
  267. package/script/formatter/entry_body.js +292 -0
  268. package/script/formatter/mod.d.ts +13 -9
  269. package/script/formatter/mod.d.ts.map +1 -1
  270. package/script/formatter/mod.js +124 -48
  271. package/script/gates/mod.d.ts +13 -2
  272. package/script/gates/mod.d.ts.map +1 -1
  273. package/script/gates/mod.js +50 -22
  274. package/script/lint/runner.d.ts.map +1 -1
  275. package/script/lint/runner.js +6 -4
  276. package/script/lock/acquire_compile.d.ts +31 -0
  277. package/script/lock/acquire_compile.d.ts.map +1 -0
  278. package/script/lock/acquire_compile.js +86 -0
  279. package/script/lock/cache_check.d.ts +28 -0
  280. package/script/lock/cache_check.d.ts.map +1 -0
  281. package/script/lock/cache_check.js +54 -0
  282. package/script/lock/check.d.ts +14 -3
  283. package/script/lock/check.d.ts.map +1 -1
  284. package/script/lock/check.js +43 -4
  285. package/script/lock/edge_drift.d.ts +2 -0
  286. package/script/lock/edge_drift.d.ts.map +1 -1
  287. package/script/lock/edge_drift.js +5 -0
  288. package/script/lock/git_intent.d.ts +46 -0
  289. package/script/lock/git_intent.d.ts.map +1 -0
  290. package/script/lock/git_intent.js +115 -0
  291. package/script/lock/mod.d.ts +11 -4
  292. package/script/lock/mod.d.ts.map +1 -1
  293. package/script/lock/mod.js +17 -2
  294. package/script/lock/model.d.ts +24 -1
  295. package/script/lock/model.d.ts.map +1 -1
  296. package/script/lock/parser.d.ts.map +1 -1
  297. package/script/lock/parser.js +32 -0
  298. package/script/lock/pin_assurance.d.ts +20 -0
  299. package/script/lock/pin_assurance.d.ts.map +1 -0
  300. package/script/lock/pin_assurance.js +37 -0
  301. package/script/lock/resolve.d.ts +8 -17
  302. package/script/lock/resolve.d.ts.map +1 -1
  303. package/script/lock/resolve.js +7 -68
  304. package/script/lock/serializer.d.ts.map +1 -1
  305. package/script/lock/serializer.js +23 -0
  306. package/script/lock/upstream_common.d.ts +29 -0
  307. package/script/lock/upstream_common.d.ts.map +1 -0
  308. package/script/lock/upstream_common.js +42 -0
  309. package/script/lock/upstream_deps.d.ts +63 -0
  310. package/script/lock/upstream_deps.d.ts.map +1 -0
  311. package/script/lock/upstream_deps.js +175 -0
  312. package/script/lock/upstream_refs.d.ts +69 -0
  313. package/script/lock/upstream_refs.d.ts.map +1 -0
  314. package/script/lock/upstream_refs.js +244 -0
  315. package/script/mod.d.ts +23 -11
  316. package/script/mod.d.ts.map +1 -1
  317. package/script/mod.js +55 -7
  318. package/script/model/mod.d.ts +114 -28
  319. package/script/model/mod.d.ts.map +1 -1
  320. package/script/model/mod.js +81 -14
  321. package/script/model/profile.d.ts +13 -0
  322. package/script/model/profile.d.ts.map +1 -1
  323. package/script/parser/code_regions.d.ts +29 -0
  324. package/script/parser/code_regions.d.ts.map +1 -0
  325. package/script/parser/code_regions.js +41 -0
  326. package/script/parser/markdown.d.ts.map +1 -1
  327. package/script/parser/markdown.js +108 -89
  328. package/script/parser/mod.d.ts.map +1 -1
  329. package/script/parser/mod.js +7 -1
  330. package/script/parser/translate.d.ts.map +1 -1
  331. package/script/parser/translate.js +5 -0
  332. package/script/profile/manifest.d.ts.map +1 -1
  333. package/script/profile/manifest.js +20 -3
  334. package/script/profile/merge.js +7 -0
  335. package/script/refs/mod.d.ts.map +1 -1
  336. package/script/refs/mod.js +7 -18
  337. package/script/reporter/mod.d.ts +11 -0
  338. package/script/reporter/mod.d.ts.map +1 -1
  339. package/script/reporter/mod.js +19 -8
  340. package/script/typl/assemble.d.ts +53 -0
  341. package/script/typl/assemble.d.ts.map +1 -0
  342. package/script/typl/assemble.js +241 -0
  343. package/script/typl/ast.d.ts +7 -1
  344. package/script/typl/ast.d.ts.map +1 -1
  345. package/script/typl/ast.js +3 -0
  346. package/script/typl/bullet.d.ts +9 -7
  347. package/script/typl/bullet.d.ts.map +1 -1
  348. package/script/typl/bullet.js +6 -4
  349. package/script/typl/citations.d.ts +27 -0
  350. package/script/typl/citations.d.ts.map +1 -0
  351. package/script/typl/citations.js +20 -0
  352. package/script/typl/diagnostics.d.ts +2 -2
  353. package/script/typl/diagnostics.d.ts.map +1 -1
  354. package/script/typl/diagnostics.js +18 -0
  355. package/script/typl/grammar.d.ts.map +1 -1
  356. package/script/typl/grammar.js +6 -0
  357. package/script/typl/lexer.d.ts.map +1 -1
  358. package/script/typl/lexer.js +25 -4
  359. package/script/typl/mod.d.ts +8 -2
  360. package/script/typl/mod.d.ts.map +1 -1
  361. package/script/typl/mod.js +14 -2
  362. package/script/typl/recognize.js +2 -2
  363. package/script/typl/registry.d.ts +1 -1
  364. package/script/typl/resolve.d.ts +31 -0
  365. package/script/typl/resolve.d.ts.map +1 -0
  366. package/script/typl/resolve.js +33 -0
  367. package/script/typl/table.d.ts +52 -0
  368. package/script/typl/table.d.ts.map +1 -0
  369. package/script/typl/table.js +75 -0
  370. package/script/typl/validator.d.ts +24 -5
  371. package/script/typl/validator.d.ts.map +1 -1
  372. package/script/typl/validator.js +55 -75
  373. package/script/upstream/mod.d.ts +45 -0
  374. package/script/upstream/mod.d.ts.map +1 -0
  375. package/script/upstream/mod.js +101 -0
  376. package/script/upstream/project.d.ts +33 -0
  377. package/script/upstream/project.d.ts.map +1 -0
  378. package/script/upstream/project.js +41 -0
  379. package/script/upstream/refs.d.ts +23 -0
  380. package/script/upstream/refs.d.ts.map +1 -0
  381. package/script/upstream/refs.js +74 -0
  382. package/script/util/fence.d.ts +20 -29
  383. package/script/util/fence.d.ts.map +1 -1
  384. package/script/util/fence.js +47 -54
  385. package/script/util/modals.d.ts +6 -0
  386. package/script/util/modals.d.ts.map +1 -1
  387. package/script/util/modals.js +38 -0
  388. package/script/util/paths.d.ts +14 -0
  389. package/script/util/paths.d.ts.map +1 -0
  390. package/script/util/paths.js +25 -0
  391. package/script/uxil/assemble.d.ts +38 -0
  392. package/script/uxil/assemble.d.ts.map +1 -0
  393. package/script/uxil/assemble.js +272 -0
  394. package/script/uxil/ast.d.ts +63 -0
  395. package/script/uxil/ast.d.ts.map +1 -0
  396. package/script/uxil/ast.js +10 -0
  397. package/script/uxil/citations.d.ts +27 -0
  398. package/script/uxil/citations.d.ts.map +1 -0
  399. package/script/uxil/citations.js +29 -0
  400. package/script/uxil/diagnostics.d.ts +39 -0
  401. package/script/uxil/diagnostics.d.ts.map +1 -0
  402. package/script/uxil/diagnostics.js +140 -0
  403. package/script/uxil/grammar.d.ts +72 -0
  404. package/script/uxil/grammar.d.ts.map +1 -0
  405. package/script/uxil/grammar.js +511 -0
  406. package/script/uxil/lexer.d.ts +23 -0
  407. package/script/uxil/lexer.d.ts.map +1 -0
  408. package/script/uxil/lexer.js +61 -0
  409. package/script/uxil/mod.d.ts +32 -0
  410. package/script/uxil/mod.d.ts.map +1 -0
  411. package/script/uxil/mod.js +37 -0
  412. package/script/uxil/projection.d.ts +40 -0
  413. package/script/uxil/projection.d.ts.map +1 -0
  414. package/script/uxil/projection.js +44 -0
  415. package/script/uxil/recognize.d.ts +16 -0
  416. package/script/uxil/recognize.d.ts.map +1 -0
  417. package/script/uxil/recognize.js +31 -0
  418. package/script/uxil/registry.d.ts +37 -0
  419. package/script/uxil/registry.d.ts.map +1 -0
  420. package/script/uxil/registry.js +32 -0
  421. package/script/uxil/surfaces.d.ts +36 -0
  422. package/script/uxil/surfaces.d.ts.map +1 -0
  423. package/script/uxil/surfaces.js +39 -0
  424. package/script/uxil/validator.d.ts +36 -0
  425. package/script/uxil/validator.d.ts.map +1 -0
  426. package/script/uxil/validator.js +142 -0
  427. package/script/uxil/vocab.d.ts +33 -0
  428. package/script/uxil/vocab.d.ts.map +1 -0
  429. package/script/uxil/vocab.js +41 -0
  430. package/script/validator/body_blocks.d.ts +2 -1
  431. package/script/validator/body_blocks.d.ts.map +1 -1
  432. package/script/validator/body_blocks.js +80 -2
  433. package/script/validator/caption_convention.d.ts +2 -1
  434. package/script/validator/caption_convention.d.ts.map +1 -1
  435. package/script/validator/caption_convention.js +2 -1
  436. package/script/validator/corpus.d.ts +6 -0
  437. package/script/validator/corpus.d.ts.map +1 -1
  438. package/script/validator/corpus.js +55 -19
  439. package/script/validator/discipline.d.ts +6 -4
  440. package/script/validator/discipline.d.ts.map +1 -1
  441. package/script/validator/discipline.js +6 -4
  442. package/script/validator/mod.d.ts +1 -1
  443. package/script/validator/mod.d.ts.map +1 -1
  444. package/script/validator/mod.js +29 -15
  445. package/script/validator/pipeline.d.ts +11 -1
  446. package/script/validator/pipeline.d.ts.map +1 -1
  447. package/script/validator/pipeline.js +75 -22
  448. package/script/validator/trace_types.d.ts +9 -2
  449. package/script/validator/trace_types.d.ts.map +1 -1
  450. package/script/validator/trace_types.js +20 -4
  451. package/script/validator/traceability.d.ts +15 -3
  452. package/script/validator/traceability.d.ts.map +1 -1
  453. package/script/validator/traceability.js +38 -3
  454. package/script/validator/types.d.ts.map +1 -1
  455. package/script/validator/types.js +10 -0
  456. package/script/validator/uxil_family.d.ts +43 -0
  457. package/script/validator/uxil_family.d.ts.map +1 -0
  458. package/script/validator/uxil_family.js +56 -0
@@ -1 +1 @@
1
- {"version":3,"file":"manifest.d.ts","sourceRoot":"","sources":["../../src/profile/manifest.ts"],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M,uBAAuB,aAKlC,CAAC;AAEH,4CAA4C;AAC5C,MAAM,WAAW,mBAAmB;IAClC,QAAQ,CAAC,QAAQ,EAAE,eAAe,GAAG,IAAI,CAAC;IAC1C,QAAQ,CAAC,WAAW,EAAE,SAAS,UAAU,EAAE,CAAC;CAC7C;AAo1CD;;;;;GAKG;AACH,wBAAgB,aAAa,CAC3B,OAAO,EAAE,MAAM,EACf,UAAU,SAAoB,GAC7B,mBAAmB,CAyMrB"}
@@ -12,6 +12,7 @@ exports.parseManifest = parseManifest;
12
12
  const yaml_1 = require("@std/yaml");
13
13
  const mod_js_1 = require("../model/mod.js");
14
14
  const display_id_js_1 = require("./display_id.js");
15
+ const paths_js_1 = require("../util/paths.js");
15
16
  const VALUE_TYPE_SET = new Set(mod_js_1.VALUE_TYPES);
16
17
  exports.ALLOWED_ROOT_KEYS = new Set([
17
18
  "$schema",
@@ -45,6 +46,7 @@ exports.ALLOWED_TYPE_KEYS = new Set([
45
46
  "traceability",
46
47
  "color",
47
48
  "discipline",
49
+ "declares",
48
50
  ]);
49
51
  exports.ALLOWED_DOC_TYPE_KEYS = new Set(["id", "contains", "description"]);
50
52
  exports.ALLOWED_DOCUMENTS_KEYS = new Set(["types", "frontMatter"]);
@@ -981,6 +983,21 @@ function parseTypeDef(name, raw, sourcePath, diagnostics) {
981
983
  }
982
984
  discipline = r.discipline;
983
985
  }
986
+ // uxil S9 (#727): `declares: ux-surface` designates a uxil declaring
987
+ // entry type. Closed vocabulary — reject anything else at load time.
988
+ let declares;
989
+ if (r.declares !== undefined) {
990
+ if (r.declares !== "ux-surface") {
991
+ diagnostics.push({
992
+ code: "PROFILE-TYPE-009",
993
+ severity: "error",
994
+ message: `${ctx}: 'declares' value '${r.declares}' is not recognised (expected 'ux-surface')`,
995
+ location: { file: sourcePath, line: 1, column: 1 },
996
+ });
997
+ return undefined;
998
+ }
999
+ declares = r.declares;
1000
+ }
984
1001
  const description = typeof r.description === "string"
985
1002
  ? r.description
986
1003
  : undefined;
@@ -998,6 +1015,7 @@ function parseTypeDef(name, raw, sourcePath, diagnostics) {
998
1015
  color,
999
1016
  description,
1000
1017
  discipline,
1018
+ declares,
1001
1019
  };
1002
1020
  }
1003
1021
  function parseTypesMap(raw, sourcePath, diagnostics) {
@@ -1146,11 +1164,10 @@ function parseDeliversSection(raw, sourcePath, diagnostics) {
1146
1164
  });
1147
1165
  continue;
1148
1166
  }
1167
+ const normalized = path.replaceAll("\\", "/");
1149
1168
  // PROFILE-DELIVERS-003 — the path must stay inside the profile
1150
1169
  // directory: no absolute paths (POSIX or drive-letter), no `..`.
1151
- const normalized = path.replaceAll("\\", "/");
1152
- if (normalized.startsWith("/") || /^[A-Za-z]:/.test(normalized) ||
1153
- normalized.split("/").includes("..")) {
1170
+ if ((0, paths_js_1.isUnsafeRelPath)(path)) {
1154
1171
  diagnostics.push({
1155
1172
  code: "PROFILE-DELIVERS-003",
1156
1173
  severity: "error",
@@ -124,6 +124,7 @@ function foldTier(base, tier, diagnostics) {
124
124
  attrDescriptions: mapFromAttrDescriptions(td.attributes, origin),
125
125
  relationDescriptions: mapFromTraceDescriptions(td.traceability, origin),
126
126
  discipline: { value: td.discipline, origin },
127
+ declares: { value: td.declares, origin },
127
128
  };
128
129
  types.set(name, { value: eff, origin });
129
130
  }
@@ -402,6 +403,10 @@ function tightenType(existing, child, childOrigin, diagnostics) {
402
403
  const discipline = child.discipline !== undefined
403
404
  ? { value: child.discipline, origin: childOrigin }
404
405
  : effExisting.discipline;
406
+ // Declares (uxil S9 #727): child wins when set; otherwise parent stays.
407
+ const declares = child.declares !== undefined
408
+ ? { value: child.declares, origin: childOrigin }
409
+ : effExisting.declares ?? { value: undefined, origin: existing.origin };
405
410
  const attrDescriptions = mergeDescriptionMap(effExisting.attrDescriptions, child.attributes.map((a) => ({ name: a.name, desc: a.description })), childOrigin);
406
411
  const relationDescriptions = mergeDescriptionMap(effExisting.relationDescriptions, [...child.traceability.entries()].map(([name, r]) => ({
407
412
  name,
@@ -420,6 +425,7 @@ function tightenType(existing, child, childOrigin, diagnostics) {
420
425
  attrDescriptions,
421
426
  relationDescriptions,
422
427
  discipline,
428
+ declares,
423
429
  };
424
430
  const overrides = [
425
431
  ...(existing.overrides ?? []),
@@ -741,6 +747,7 @@ function mapFromTypes(types, origin) {
741
747
  attrDescriptions: mapFromAttrDescriptions(td.attributes, origin),
742
748
  relationDescriptions: mapFromTraceDescriptions(td.traceability, origin),
743
749
  discipline: { value: td.discipline, origin },
750
+ declares: { value: td.declares, origin },
744
751
  };
745
752
  out.set(name, { value: eff, origin });
746
753
  }
@@ -1 +1 @@
1
- {"version":3,"file":"mod.d.ts","sourceRoot":"","sources":["../../src/refs/mod.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,iBAAiB,CAAC;AAO7C,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAG/C;;;;GAIG;AACH,eAAO,MAAM,oBAAoB,EAAE,WAAW,CAAC,MAAM,CAGnD,CAAC;AAEH,iFAAiF;AACjF,MAAM,WAAW,QAAQ;IACvB,QAAQ,CAAC,eAAe,EAAE,WAAW,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACtD,QAAQ,CAAC,eAAe,EAAE,WAAW,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CACvD;AAED;;;;GAIG;AACH,wBAAgB,aAAa,CAAC,OAAO,EAAE,SAAS,KAAK,EAAE,GAAG,QAAQ,CAajE;AAcD;;;;;GAKG;AACH,wBAAgB,gBAAgB,CAC9B,OAAO,EAAE,MAAM,EACf,OAAO,EAAE,SAAS,KAAK,EAAE,EACzB,KAAK,EAAE,QAAQ,EACf,MAAM,EAAE,SAAS,QAAQ,EAAE,GAC1B;IAAE,MAAM,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,OAAO,CAAA;CAAE,CAgHtC"}
1
+ {"version":3,"file":"mod.d.ts","sourceRoot":"","sources":["../../src/refs/mod.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,iBAAiB,CAAC;AAO7C,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAG/C;;;;GAIG;AACH,eAAO,MAAM,oBAAoB,EAAE,WAAW,CAAC,MAAM,CAGnD,CAAC;AAEH,iFAAiF;AACjF,MAAM,WAAW,QAAQ;IACvB,QAAQ,CAAC,eAAe,EAAE,WAAW,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACtD,QAAQ,CAAC,eAAe,EAAE,WAAW,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CACvD;AAED;;;;GAIG;AACH,wBAAgB,aAAa,CAAC,OAAO,EAAE,SAAS,KAAK,EAAE,GAAG,QAAQ,CAajE;AAcD;;;;;GAKG;AACH,wBAAgB,gBAAgB,CAC9B,OAAO,EAAE,MAAM,EACf,OAAO,EAAE,SAAS,KAAK,EAAE,EACzB,KAAK,EAAE,QAAQ,EACf,MAAM,EAAE,SAAS,QAAQ,EAAE,GAC1B;IAAE,MAAM,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,OAAO,CAAA;CAAE,CAqGtC"}
@@ -90,25 +90,17 @@ function canonicalizeRefs(content, entries, index, ledger) {
90
90
  };
91
91
  const lines = content.split("\n");
92
92
  let changed = false;
93
- // Track fenced-code regions so illustrative trailers inside ``` / ~~~
94
- // blocks (e.g. `Realizes: 01HGW...` in a ```markdown example) are never
95
- // "healed" against the real ref index — the same verbatim-region rule
96
- // every other fmt pass honors (§5.1; cf. `collapseBlankLines`). Without
97
- // this, `markspec fmt` rewrites example IDs in spec/ADR docs on every run
98
- // (#668). The parser/validator already treat fenced content as inert.
99
- let inFence = false;
93
+ // Share CommonMark fence boundaries with other prose passes. Compute them
94
+ // once so both the main loop and continuation loop remain linear (#705).
95
+ const fencedLines = (0, fence_js_1.fencedCodeLines)(content);
100
96
  for (let i = 0; i < lines.length; i++) {
97
+ if (fencedLines.has(i))
98
+ continue;
101
99
  // Strip a trailing CR before matching so CRLF files are handled (the
102
100
  // trailer regex ends in `$`, which `\r` would block) and re-append it on
103
101
  // rewrite so line endings stay byte-for-byte lossless.
104
102
  const cr = lines[i].endsWith("\r");
105
103
  const bare = cr ? lines[i].slice(0, -1) : lines[i];
106
- if (fence_js_1.FENCE_RE.test(bare)) {
107
- inFence = !inFence;
108
- continue;
109
- }
110
- if (inFence)
111
- continue;
112
104
  const m = TRACE_TRAILER_RE.exec(bare);
113
105
  if (!m)
114
106
  continue;
@@ -135,11 +127,8 @@ function canonicalizeRefs(content, entries, index, ledger) {
135
127
  j++;
136
128
  const crj = lines[j].endsWith("\r");
137
129
  const barej = crj ? lines[j].slice(0, -1) : lines[j];
138
- // A fence marker is never continuation text. An indented one (e.g.
139
- // ` ```md`) would otherwise match CONTINUATION_LINE_RE and be
140
- // swallowed here without toggling `inFence`, desyncing fence tracking
141
- // for the rest of the file. Back out and let the outer loop toggle it.
142
- if (fence_js_1.FENCE_RE.test(barej)) {
130
+ // Fence delimiters and fenced content cannot continue a trace value.
131
+ if (fencedLines.has(j)) {
143
132
  j--;
144
133
  break;
145
134
  }
@@ -19,6 +19,17 @@ export interface ReportOptions {
19
19
  readonly scope?: string;
20
20
  /** Filter entries by label value. */
21
21
  readonly label?: string;
22
+ /**
23
+ * Declared upstream ids from `project.yaml`'s `dependencies:` (federated
24
+ * upstream, slice 4), derived via `deriveUpstreamId`. Used by the
25
+ * `coverage` report to classify an upstream-origin entry: an id in this
26
+ * set participates in coverage like a project entry (a `dependencies:`
27
+ * upstream); an upstream-origin entry whose id is NOT in this set is a
28
+ * `references:` leaf, excluded from the orphan/unsatisfied gap lists.
29
+ * Defaults to empty — every upstream-origin entry is treated as a
30
+ * reference leaf.
31
+ */
32
+ readonly dependencyUpstreamIds?: ReadonlySet<string>;
22
33
  }
23
34
  /**
24
35
  * Generate a report from compiled traceability graph.
@@ -1 +1 @@
1
- {"version":3,"file":"mod.d.ts","sourceRoot":"","sources":["../../src/reporter/mod.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAIxD,8BAA8B;AAC9B,MAAM,MAAM,UAAU,GAAG,cAAc,GAAG,UAAU,CAAC;AAErD,gCAAgC;AAChC,MAAM,MAAM,YAAY,GAAG,IAAI,GAAG,MAAM,GAAG,KAAK,CAAC;AAEjD,sCAAsC;AACtC,MAAM,WAAW,aAAa;IAC5B,mBAAmB;IACnB,QAAQ,CAAC,IAAI,EAAE,UAAU,CAAC;IAC1B,qBAAqB;IACrB,QAAQ,CAAC,MAAM,EAAE,YAAY,CAAC;IAC9B,2DAA2D;IAC3D,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC;IACxB,qCAAqC;IACrC,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC;CACzB;AAED;;;;;;GAMG;AACH,wBAAgB,MAAM,CAAC,MAAM,EAAE,aAAa,EAAE,OAAO,EAAE,aAAa,GAAG,MAAM,CAO5E"}
1
+ {"version":3,"file":"mod.d.ts","sourceRoot":"","sources":["../../src/reporter/mod.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAQxD,8BAA8B;AAC9B,MAAM,MAAM,UAAU,GAAG,cAAc,GAAG,UAAU,CAAC;AAErD,gCAAgC;AAChC,MAAM,MAAM,YAAY,GAAG,IAAI,GAAG,MAAM,GAAG,KAAK,CAAC;AAEjD,sCAAsC;AACtC,MAAM,WAAW,aAAa;IAC5B,mBAAmB;IACnB,QAAQ,CAAC,IAAI,EAAE,UAAU,CAAC;IAC1B,qBAAqB;IACrB,QAAQ,CAAC,MAAM,EAAE,YAAY,CAAC;IAC9B,2DAA2D;IAC3D,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC;IACxB,qCAAqC;IACrC,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC;IACxB;;;;;;;;;OASG;IACH,QAAQ,CAAC,qBAAqB,CAAC,EAAE,WAAW,CAAC,MAAM,CAAC,CAAC;CACtD;AAED;;;;;;GAMG;AACH,wBAAgB,MAAM,CAAC,MAAM,EAAE,aAAa,EAAE,OAAO,EAAE,aAAa,GAAG,MAAM,CAY5E"}
@@ -20,7 +20,7 @@ function report(result, options) {
20
20
  if (options.kind === "traceability") {
21
21
  return formatTraceability(result, entries, options.format);
22
22
  }
23
- return formatCoverage(result, entries, options.format);
23
+ return formatCoverage(result, entries, options.format, options.dependencyUpstreamIds);
24
24
  }
25
25
  // ---------------------------------------------------------------------------
26
26
  // Filtering
@@ -53,7 +53,7 @@ function filterEntries(result, scope, label) {
53
53
  * Markdown, and JSON rows all agree on the same value.
54
54
  */
55
55
  function originCell(entry) {
56
- return entry.origin ? (0, mod_js_1.formatEntryOrigin)(entry.origin) : "project";
56
+ return (0, mod_js_1.isCorpusEntry)(entry) ? (0, mod_js_1.formatEntryOrigin)(entry.origin) : "project";
57
57
  }
58
58
  function buildTraceRows(result, entries) {
59
59
  return entries.map((entry) => {
@@ -98,7 +98,8 @@ function formatTraceability(result, entries, format) {
98
98
  const lines = rows.map((r) => `| ${r.id} | ${r.title} | ${r.entryType} | ${r.origin} | ${r.satisfies || "\u2014"} | ${r.satisfiedBy || "\u2014"} |`);
99
99
  return [header, sep, ...lines].join("\n");
100
100
  }
101
- function computeCoverage(result, entries) {
101
+ function computeCoverage(result, entries, opts = {}) {
102
+ const { dependencyUpstreamIds } = opts;
102
103
  const byType = {};
103
104
  const orphans = [];
104
105
  const unsatisfied = [];
@@ -108,13 +109,22 @@ function computeCoverage(result, entries) {
108
109
  // Bucket by profile-declared type when available, fall back to shape.
109
110
  const t = entry.type ?? (entry.shape === "Reference" ? "ref" : "untyped");
110
111
  byType[t] = (byType[t] ?? 0) + 1;
112
+ // Federated upstream (slice 4): a `references:` upstream entry is a
113
+ // traceability leaf — no coverage expectation points at or from it, so
114
+ // it is excluded from both gap lists below. A `dependencies:` upstream
115
+ // entry (its upstreamId present in `dependencyUpstreamIds`) participates
116
+ // like a project entry — this branch is inert until slice 3 loads
117
+ // dependency entries, but the classification is exercised here so it's
118
+ // ready when they do.
119
+ const isReferenceLeaf = (0, mod_js_1.isUpstreamEntry)(entry) &&
120
+ !(dependencyUpstreamIds?.has(entry.origin.upstreamId) ?? false);
111
121
  const fwd = result.forward.get(entry.displayId) ?? [];
112
122
  const rev = result.reverse.get(entry.displayId) ?? [];
113
123
  const hasSatisfies = fwd.some((l) => l.kind === "satisfies");
114
- if (hasSatisfies) {
124
+ if (hasSatisfies && !isReferenceLeaf) {
115
125
  withSatisfies++;
116
126
  }
117
- else if (entry.shape === "Authored") {
127
+ else if (entry.shape === "Authored" && !isReferenceLeaf) {
118
128
  withoutSatisfies++;
119
129
  orphans.push(entry.displayId);
120
130
  }
@@ -123,7 +133,8 @@ function computeCoverage(result, entries) {
123
133
  // profile-specific; a profile-aware reporter layer refines this.
124
134
  const hasSatisfiedBy = rev.some((l) => l.kind === "satisfies");
125
135
  if (entry.type &&
126
- !hasSatisfiedBy) {
136
+ !hasSatisfiedBy &&
137
+ !isReferenceLeaf) {
127
138
  unsatisfied.push(entry.displayId);
128
139
  }
129
140
  }
@@ -135,8 +146,8 @@ function computeCoverage(result, entries) {
135
146
  gaps: { orphans, unsatisfied },
136
147
  };
137
148
  }
138
- function formatCoverage(result, entries, format) {
139
- const stats = computeCoverage(result, entries);
149
+ function formatCoverage(result, entries, format, dependencyUpstreamIds) {
150
+ const stats = computeCoverage(result, entries, { dependencyUpstreamIds });
140
151
  if (format === "json") {
141
152
  return JSON.stringify(stats, null, 2);
142
153
  }
@@ -0,0 +1,53 @@
1
+ /**
2
+ * @module typl/assemble
3
+ *
4
+ * Entry-level typl assembly (#723, #724): extracts declarations from the four
5
+ * surfaces (fence / bullet / inline / table), resolves published names through
6
+ * the base-resolution engine (core/decl/resolve), and aggregates the
7
+ * result into the `Entry.types` TyplBlock. Moved out of parser/markdown.ts
8
+ * so the parser calls one function.
9
+ *
10
+ * Resolution rules (design spec D5):
11
+ * - a `: namespace` binding establishes a base; nested-bullet namespaces
12
+ * scope their subtree (innermost wins); the root namespace (no
13
+ * namespace ancestor) scopes the whole entry body, order-independent;
14
+ * - a table's `Table:` caption may carry a base (#724); a table row
15
+ * resolves against that caption base first (innermost, #722 rule 3),
16
+ * then the root — the caption base is not itself a root and never sets
17
+ * `rootNamespace`;
18
+ * - relative names (`$.x`) resolve to absolute dotted names before
19
+ * aggregation — Entry.types carries absolute names only;
20
+ * - namespace bindings are scaffolding: excluded from bindings;
21
+ * - a relative name with no base is TYPL-010 (binding dropped);
22
+ * - a second root is TYPL-012 (first root wins);
23
+ * - inline/fence relative refs resolve against the root base only.
24
+ */
25
+ import type { BodyBlock } from "../ast/nodes.js";
26
+ import type { BodyToken, Diagnostic } from "../model/mod.js";
27
+ import type { TyplBlock } from "./ast.js";
28
+ /**
29
+ * Assemble one entry's typl declarations into its `Entry.types` block.
30
+ *
31
+ * Extracts declarations from the four embedding surfaces (fenced code,
32
+ * bullet glossary, inline code spans, table rows), resolves every relative
33
+ * `$.x` name against the caption/root/nested-namespace bases in scope (see
34
+ * the module doc's resolution rules), and aggregates the result.
35
+ *
36
+ * @param bodyAst - The entry body's parsed block AST (fence + bullet + table
37
+ * surfaces walk this).
38
+ * @param bodyTokens - The entry body's flat token stream (the inline
39
+ * surface walks this).
40
+ * @param file - Source file path, for bridging diagnostics back to
41
+ * file-relative positions.
42
+ * @param bodyStartLine - 1-based line the entry body starts on, added to
43
+ * each surface's body-relative range to get a file-relative line.
44
+ * @returns `types` — the assembled `TyplBlock`, omitted when the entry
45
+ * declares nothing (no bindings, no typedefs, no root namespace) — plus
46
+ * any diagnostics raised during extraction or resolution (TYPL-010,
47
+ * TYPL-012, and bridged parse diagnostics).
48
+ */
49
+ export declare function assembleTyplTypes(bodyAst: readonly BodyBlock[], bodyTokens: readonly BodyToken[], file: string, bodyStartLine: number): {
50
+ types?: TyplBlock;
51
+ diagnostics: Diagnostic[];
52
+ };
53
+ //# sourceMappingURL=assemble.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"assemble.d.ts","sourceRoot":"","sources":["../../src/typl/assemble.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AACjD,OAAO,KAAK,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAC7D,OAAO,KAAK,EAAoB,SAAS,EAAE,MAAM,UAAU,CAAC;AAkC5D;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,wBAAgB,iBAAiB,CAC/B,OAAO,EAAE,SAAS,SAAS,EAAE,EAC7B,UAAU,EAAE,SAAS,SAAS,EAAE,EAChC,IAAI,EAAE,MAAM,EACZ,aAAa,EAAE,MAAM,GACpB;IAAE,KAAK,CAAC,EAAE,SAAS,CAAC;IAAC,WAAW,EAAE,UAAU,EAAE,CAAA;CAAE,CAqOlD"}
@@ -0,0 +1,241 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.assembleTyplTypes = assembleTyplTypes;
4
+ const mod_js_1 = require("../decl/mod.js");
5
+ const bridge_js_1 = require("./bridge.js");
6
+ const diagnostics_js_1 = require("./diagnostics.js");
7
+ const fence_js_1 = require("./fence.js");
8
+ const bullet_js_1 = require("./bullet.js");
9
+ const inline_js_1 = require("./inline.js");
10
+ const table_js_1 = require("./table.js");
11
+ const grammar_js_1 = require("./grammar.js");
12
+ const resolve_js_1 = require("./resolve.js");
13
+ /**
14
+ * Assemble one entry's typl declarations into its `Entry.types` block.
15
+ *
16
+ * Extracts declarations from the four embedding surfaces (fenced code,
17
+ * bullet glossary, inline code spans, table rows), resolves every relative
18
+ * `$.x` name against the caption/root/nested-namespace bases in scope (see
19
+ * the module doc's resolution rules), and aggregates the result.
20
+ *
21
+ * @param bodyAst - The entry body's parsed block AST (fence + bullet + table
22
+ * surfaces walk this).
23
+ * @param bodyTokens - The entry body's flat token stream (the inline
24
+ * surface walks this).
25
+ * @param file - Source file path, for bridging diagnostics back to
26
+ * file-relative positions.
27
+ * @param bodyStartLine - 1-based line the entry body starts on, added to
28
+ * each surface's body-relative range to get a file-relative line.
29
+ * @returns `types` — the assembled `TyplBlock`, omitted when the entry
30
+ * declares nothing (no bindings, no typedefs, no root namespace) — plus
31
+ * any diagnostics raised during extraction or resolution (TYPL-010,
32
+ * TYPL-012, and bridged parse diagnostics).
33
+ */
34
+ function assembleTyplTypes(bodyAst, bodyTokens, file, bodyStartLine) {
35
+ const diagnostics = [];
36
+ const blocks = [];
37
+ // Map bullet-extraction index → blocks[] index, for parent lookups.
38
+ const bulletBlockIndex = [];
39
+ for (const fence of (0, fence_js_1.extractTyplFences)(bodyAst)) {
40
+ const result = (0, grammar_js_1.parseTyplBlock)(fence.source);
41
+ const lineOffset = bodyStartLine + fence.range.start.line - 1;
42
+ for (const td of result.diagnostics) {
43
+ diagnostics.push((0, bridge_js_1.bridgeTyplDiagnostic)(td, file, lineOffset));
44
+ }
45
+ blocks.push({ ...result.ast, file, lineOffset });
46
+ }
47
+ const bullets = (0, bullet_js_1.extractTyplBulletsNested)(bodyAst);
48
+ for (const bullet of bullets) {
49
+ const result = (0, grammar_js_1.parseTyplBlock)(bullet.source);
50
+ const lineOffset = bodyStartLine + bullet.range.start.line - 2;
51
+ for (const td of result.diagnostics) {
52
+ diagnostics.push((0, bridge_js_1.bridgeTyplDiagnostic)(td, file, lineOffset));
53
+ }
54
+ bulletBlockIndex.push(blocks.length);
55
+ blocks.push({
56
+ ...result.ast,
57
+ file,
58
+ lineOffset,
59
+ bulletParent: bullet.parent,
60
+ });
61
+ }
62
+ for (const inline of (0, inline_js_1.extractTyplInlines)(bodyTokens)) {
63
+ const result = (0, grammar_js_1.parseTyplBlock)(inline.source);
64
+ const lineOffset = inline.location.line - 1;
65
+ for (const td of result.diagnostics) {
66
+ diagnostics.push((0, bridge_js_1.bridgeTyplDiagnostic)(td, inline.location.file, lineOffset));
67
+ }
68
+ blocks.push({ ...result.ast, file: inline.location.file, lineOffset });
69
+ }
70
+ // Table rows (#724): each recognized data row is one binding. Its range
71
+ // points AT the row's own line (like the bullet surface, not the fence
72
+ // whose range points at the opening ``` a line above its content), so the
73
+ // diagnostic offset subtracts 2, matching the bullet path. The `Table:`
74
+ // caption base — when the caption text is an absolute typl name — scopes
75
+ // the row's relative refs (see `scopeFor`); the caption base is not a
76
+ // namespace binding, so it takes no part in Pass A root detection or Pass B.
77
+ for (const row of (0, table_js_1.extractTyplTable)(bodyAst)) {
78
+ const result = (0, grammar_js_1.parseTyplBlock)(row.source);
79
+ const lineOffset = bodyStartLine + row.range.start.line - 2;
80
+ for (const td of result.diagnostics) {
81
+ diagnostics.push((0, bridge_js_1.bridgeTyplDiagnostic)(td, file, lineOffset));
82
+ }
83
+ const captionBase = row.captionText !== undefined
84
+ ? (0, table_js_1.typlTableCaptionBase)(row.captionText)
85
+ : undefined;
86
+ blocks.push({
87
+ ...result.ast,
88
+ file,
89
+ lineOffset,
90
+ ...(captionBase !== undefined ? { captionBase } : {}),
91
+ });
92
+ }
93
+ // Emit a bridged typl diagnostic for a binding in blocks[i].
94
+ const emit = (code, params, i, position) => {
95
+ const td = (0, diagnostics_js_1.typlDiagnostic)(code, params, position);
96
+ diagnostics.push((0, bridge_js_1.bridgeTyplDiagnostic)(td, blocks[i].file, blocks[i].lineOffset));
97
+ };
98
+ // blockHasNamespace / hasNamespaceAncestor are static structure checks
99
+ // (independent of resolution), so Pass A is order-independent.
100
+ const blockHasNamespace = blocks.map((b) => b.bindings.some((x) => x.kind === "namespace"));
101
+ const hasNamespaceAncestor = (i) => {
102
+ let p = blocks[i].bulletParent;
103
+ while (p !== undefined) {
104
+ const idx = bulletBlockIndex[p];
105
+ if (blockHasNamespace[idx])
106
+ return true;
107
+ p = blocks[idx].bulletParent;
108
+ }
109
+ return false;
110
+ };
111
+ // ── Pass A: find the root ────────────────────────────────────────────
112
+ // Root candidate = an ABSOLUTE namespace binding with no namespace
113
+ // ancestor in its bullet chain (a relative namespace can never be a
114
+ // root — it needs a base itself). checkSingleRoot (core/decl) enforces
115
+ // the one-root invariant; its bare contract also flags zero candidates
116
+ // as a failure ("no-root"), but an entry with no namespace binding at
117
+ // all is a normal, error-free shape here — only "multiple-roots"
118
+ // produces diagnostics, first candidate in source order wins (order-
119
+ // independent for authors: the root scopes the whole body).
120
+ const rootCandidates = [];
121
+ for (let i = 0; i < blocks.length; i++) {
122
+ for (const binding of blocks[i].bindings) {
123
+ if (binding.kind !== "namespace")
124
+ continue;
125
+ if (!resolve_js_1.TYPL_REF_OPS.isAbsolute(binding.name))
126
+ continue;
127
+ if (hasNamespaceAncestor(i))
128
+ continue;
129
+ rootCandidates.push({
130
+ path: (0, resolve_js_1.typlPathOf)(binding.name),
131
+ blockIndex: i,
132
+ position: binding.position,
133
+ });
134
+ }
135
+ }
136
+ const rootCheck = (0, mod_js_1.checkSingleRoot)(rootCandidates);
137
+ let rootPath;
138
+ if (rootCheck.ok) {
139
+ rootPath = rootCheck.root.path;
140
+ }
141
+ else if (rootCheck.reason === "multiple-roots") {
142
+ rootPath = rootCheck.roots[0].path;
143
+ for (let k = 1; k < rootCheck.roots.length; k++) {
144
+ const extra = rootCheck.roots[k];
145
+ emit("TYPL-012", { first: `$${rootPath}` }, extra.blockIndex, extra.position);
146
+ }
147
+ }
148
+ // "no-root" → rootPath stays undefined; not an error.
149
+ // basePathOfBlock[i] = the base path blocks[i] provides to its bullet
150
+ // subtree, or undefined. One base slot per block: a block with several
151
+ // namespace bindings keeps the last (bullet blocks hold a single
152
+ // declaration in practice).
153
+ const basePathOfBlock = blocks.map(() => undefined);
154
+ /**
155
+ * Scope chain for blocks[i], innermost-first, terminated by the root base.
156
+ * Which frames a block sees depends on its surface: a bullet block walks
157
+ * its bullet-ancestor bases; a table-row block contributes its `Table:`
158
+ * caption base (#724); fence/inline blocks have neither and see the root
159
+ * only. The frame kinds don't combine in practice — a table row carries no
160
+ * `bulletParent`, so a table nested inside a bullet-namespace subtree sees
161
+ * only its caption base + the root, not the enclosing bullet base (known
162
+ * limitation, #724). Built immutably per call.
163
+ */
164
+ const scopeFor = (i) => {
165
+ const chain = []; // innermost first
166
+ let p = blocks[i].bulletParent;
167
+ while (p !== undefined) {
168
+ const idx = bulletBlockIndex[p];
169
+ const base = basePathOfBlock[idx];
170
+ if (base !== undefined)
171
+ chain.push(base);
172
+ p = blocks[idx].bulletParent;
173
+ }
174
+ let scope = rootPath !== undefined
175
+ ? { base: rootPath }
176
+ : undefined;
177
+ for (let k = chain.length - 1; k >= 0; k--) {
178
+ scope = { base: chain[k], parent: scope };
179
+ }
180
+ // A table row resolves against its caption base first (#722 rule 3):
181
+ // innermost, above the bullet chain and the root.
182
+ const captionBase = blocks[i].captionBase;
183
+ if (captionBase !== undefined)
184
+ scope = { base: captionBase, parent: scope };
185
+ return scope;
186
+ };
187
+ // ── Pass B: establish bases ──────────────────────────────────────────
188
+ // Source order is parents-before-children (bullet extraction is
189
+ // depth-first), so an ancestor's base is always resolved before its
190
+ // descendants need it. A relative namespace resolves against its own
191
+ // chain (TYPL-010 when there is none). Extra roots (TYPL-012 in Pass A)
192
+ // establish no base.
193
+ for (let i = 0; i < blocks.length; i++) {
194
+ for (const binding of blocks[i].bindings) {
195
+ if (binding.kind !== "namespace")
196
+ continue;
197
+ if (resolve_js_1.TYPL_REF_OPS.isAbsolute(binding.name)) {
198
+ const path = (0, resolve_js_1.typlPathOf)(binding.name);
199
+ const isExtraRoot = !hasNamespaceAncestor(i) && path !== rootPath;
200
+ if (!isExtraRoot)
201
+ basePathOfBlock[i] = path;
202
+ continue;
203
+ }
204
+ const res = (0, mod_js_1.resolveRef)(binding.name, scopeFor(i), resolve_js_1.TYPL_REF_OPS);
205
+ if (!res.ok) {
206
+ emit("TYPL-010", { name: binding.name }, i, binding.position);
207
+ continue;
208
+ }
209
+ basePathOfBlock[i] = (0, resolve_js_1.typlPathOf)(res.ref);
210
+ }
211
+ }
212
+ // ── Pass C: resolve every non-namespace binding to an absolute name ──
213
+ const allBindings = [];
214
+ const allTypedefs = [];
215
+ for (let i = 0; i < blocks.length; i++) {
216
+ const block = blocks[i];
217
+ for (const binding of block.bindings) {
218
+ if (binding.kind === "namespace")
219
+ continue; // scaffolding (D8)
220
+ const res = (0, mod_js_1.resolveRef)(binding.name, scopeFor(i), resolve_js_1.TYPL_REF_OPS);
221
+ if (!res.ok) {
222
+ emit("TYPL-010", { name: binding.name }, i, binding.position);
223
+ continue;
224
+ }
225
+ allBindings.push(res.ref === binding.name ? binding : { ...binding, name: res.ref });
226
+ }
227
+ allTypedefs.push(...block.typedefs);
228
+ }
229
+ if (allBindings.length === 0 && allTypedefs.length === 0 &&
230
+ rootPath === undefined) {
231
+ return { diagnostics };
232
+ }
233
+ return {
234
+ types: {
235
+ bindings: allBindings,
236
+ typedefs: allTypedefs,
237
+ ...(rootPath !== undefined ? { rootNamespace: rootPath } : {}),
238
+ },
239
+ diagnostics,
240
+ };
241
+ }
@@ -8,7 +8,7 @@
8
8
  * Closed kind vocabulary. `value` is the default kind when an author omits
9
9
  * it from a binding.
10
10
  */
11
- export declare const KINDS: readonly ["value", "event", "signal", "command", "state", "const", "config", "document", "stream"];
11
+ export declare const KINDS: readonly ["value", "event", "signal", "command", "state", "const", "config", "document", "stream", "namespace"];
12
12
  export type Kind = typeof KINDS[number];
13
13
  /** Schema AST — one discriminated union covering all shape variants. */
14
14
  export type Shape = {
@@ -83,5 +83,11 @@ export type Statement = Binding | Typedef;
83
83
  export interface TyplBlock {
84
84
  readonly bindings: readonly Binding[];
85
85
  readonly typedefs: readonly Typedef[];
86
+ /**
87
+ * The entry's root namespace path (no `$`, e.g. `"powertrain.brake"`),
88
+ * when the entry declares one (#723). The validator resolves relative
89
+ * citations against it.
90
+ */
91
+ readonly rootNamespace?: string;
86
92
  }
87
93
  //# sourceMappingURL=ast.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"ast.d.ts","sourceRoot":"","sources":["../../src/typl/ast.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH;;;GAGG;AACH,eAAO,MAAM,KAAK,oGAUR,CAAC;AACX,MAAM,MAAM,IAAI,GAAG,OAAO,KAAK,CAAC,MAAM,CAAC,CAAC;AAExC,wEAAwE;AACxE,MAAM,MAAM,KAAK,GACb;IAAE,IAAI,EAAE,WAAW,CAAC;IAAC,IAAI,EAAE,KAAK,GAAG,OAAO,GAAG,MAAM,GAAG,QAAQ,GAAG,OAAO,CAAA;CAAE,GAC1E;IACA,IAAI,EAAE,OAAO,CAAC;IACd,IAAI,EAAE,KAAK,GAAG,OAAO,CAAC;IACtB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB,GACC;IACA,IAAI,EAAE,QAAQ,CAAC;IACf,IAAI,EAAE,QAAQ,GAAG,OAAO,CAAC;IACzB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB,GACC;IAAE,IAAI,EAAE,SAAS,CAAC;IAAC,KAAK,EAAE,MAAM,CAAC;IAAC,KAAK,CAAC,EAAE,MAAM,CAAA;CAAE,GAClD;IACA,IAAI,EAAE,OAAO,CAAC;IACd,OAAO,EAAE,KAAK,CAAC;IACf,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB,GACC;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,SAAS,CAAC,MAAM,GAAG,MAAM,GAAG,OAAO,CAAC,EAAE,CAAA;CAAE,GAChE;IAAE,IAAI,E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21,4 +21,7 @@ exports.KINDS = [
21
21
  "config",
22
22
  "document",
23
23
  "stream",
24
+ // Published-tier scaffolding (#723): a namespace declaration creates a
25
+ // base for relative refs; it is not a symbol and carries no shape.
26
+ "namespace",
24
27
  ];
@@ -6,19 +6,21 @@
6
6
  * `type X = …` typedef). A thin wrapper over the shared
7
7
  * declaration-surface machinery (core/decl): it supplies typl's text
8
8
  * recognizer and re-exports the common declaration node as
9
- * {@linkcode TyplBulletExtraction}. Mixed lists are supported — matching
10
- * items are extracted, non-matching bullets are left alone.
9
+ * {@linkcode TyplNestedBulletExtraction}. Mixed lists are supported —
10
+ * matching items are extracted, non-matching bullets are left alone.
11
11
  *
12
12
  * See ADR-019.
13
13
  */
14
14
  import type { BodyBlock } from "../ast/nodes.js";
15
- import { type BlockDeclaration } from "../decl/mod.js";
16
- /** A single typl bullet item found inside a body: `{ source, range }`. */
17
- export type TyplBulletExtraction = BlockDeclaration;
15
+ import { type NestedBlockDeclaration } from "../decl/mod.js";
16
+ /** A typl bullet declaration with its structural parent link (#723). */
17
+ export type TyplNestedBulletExtraction = NestedBlockDeclaration;
18
18
  /**
19
19
  * Walk a body AST and return every bullet-list item whose first paragraph
20
20
  * is a typl declaration, in source order (depth-first, recursing into
21
- * nested lists). Delegates traversal to {@linkcode extractBulletDeclarations}.
21
+ * nested lists), each with a `parent` link for base-resolution scope
22
+ * chains. Delegates traversal to
23
+ * {@linkcode extractNestedBulletDeclarations}.
22
24
  */
23
- export declare function extractTyplBullets(blocks: readonly BodyBlock[]): readonly TyplBulletExtraction[];
25
+ export declare function extractTyplBulletsNested(blocks: readonly BodyBlock[]): readonly TyplNestedBulletExtraction[];
24
26
  //# sourceMappingURL=bullet.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"bullet.d.ts","sourceRoot":"","sources":["../../src/typl/bullet.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AACH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AACjD,OAAO,EACL,KAAK,gBAAgB,EAEtB,MAAM,gBAAgB,CAAC;AAGxB,0EAA0E;AAC1E,MAAM,MAAM,oBAAoB,GAAG,gBAAgB,CAAC;AAEpD;;;;GAIG;AACH,wBAAgB,kBAAkB,CAChC,MAAM,EAAE,SAAS,SAAS,EAAE,GAC3B,SAAS,oBAAoB,EAAE,CAEjC"}
1
+ {"version":3,"file":"bullet.d.ts","sourceRoot":"","sources":["../../src/typl/bullet.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AACH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AACjD,OAAO,EAEL,KAAK,sBAAsB,EAC5B,MAAM,gBAAgB,CAAC;AAGxB,wEAAwE;AACxE,MAAM,MAAM,0BAA0B,GAAG,sBAAsB,CAAC;AAEhE;;;;;;GAMG;AACH,wBAAgB,wBAAwB,CACtC,MAAM,EAAE,SAAS,SAAS,EAAE,GAC3B,SAAS,0BAA0B,EAAE,CAEvC"}