@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
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cache_check.d.ts","sourceRoot":"","sources":["../../src/lock/cache_check.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAGH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAClD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAC3C,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AAa7C;;;;GAIG;AACH,wBAAsB,mBAAmB,CACvC,SAAS,EAAE,SAAS,QAAQ,EAAE,EAC9B,SAAS,EAAE,MAAM,EACjB,QAAQ,EAAE,QAAQ,GACjB,OAAO,CAAC,UAAU,EAAE,CAAC,CAevB"}
@@ -0,0 +1,51 @@
1
+ /**
2
+ * @module core/lock/cache_check
3
+ *
4
+ * Offline upstream cache-integrity check — the MSL-L212 cache-drift case
5
+ * (Task 9). For every locked upstream row that carries a `snapshot` hash
6
+ * (a federated registry or git-repository dependency), verify its cache
7
+ * under `<cacheRoot>/<id>/` is still present and hash-intact.
8
+ *
9
+ * Reuses {@linkcode probeCacheSnapshot} — the exact probe
10
+ * `resolveProjectReferences`'s keep/restore flow already uses
11
+ * (`upstream_refs.ts`, Task 5) — so `markspec check` and `markspec lock`
12
+ * never disagree on what "cache intact" means. Rows without a `snapshot`
13
+ * (legacy registry rows predating this field, or upstream kinds that never
14
+ * carry one — reference, profile) are skipped: there is nothing to verify
15
+ * offline.
16
+ *
17
+ * Pure module: file access only via the injected {@linkcode ReadFile}.
18
+ */
19
+ import { join } from "@std/path";
20
+ import { probeCacheSnapshot } from "./upstream_refs.js";
21
+ function cacheDriftDiagnostic(id) {
22
+ return {
23
+ code: "MSL-L212",
24
+ severity: "error",
25
+ message: `upstream '${id}' cache snapshot is missing or does not match markspec.lock — run 'markspec lock'`,
26
+ location: undefined,
27
+ };
28
+ }
29
+ /**
30
+ * Verify every snapshot-carrying upstream row's cache under `cacheRoot`.
31
+ * One `MSL-L212` diagnostic per row whose cache is missing or whose
32
+ * entries-file hash no longer matches the locked `snapshot`.
33
+ */
34
+ export async function verifyUpstreamCache(upstreams, cacheRoot, readFile) {
35
+ const diagnostics = [];
36
+ for (const upstream of upstreams) {
37
+ if (upstream.kind !== "registry" && upstream.kind !== "dependency") {
38
+ continue; // references/profiles never carry a cache snapshot
39
+ }
40
+ if (upstream.snapshot === undefined)
41
+ continue; // legacy row — skip
42
+ // join() at construction (#771): a template concat would mix the
43
+ // platform separator with a literal `/` — the Windows drift class
44
+ // that bit slices 2 and 4. Writer and reader must agree byte-for-byte.
45
+ const dir = join(cacheRoot, upstream.id);
46
+ const intact = await probeCacheSnapshot(dir, upstream.snapshot, readFile);
47
+ if (!intact)
48
+ diagnostics.push(cacheDriftDiagnostic(upstream.id));
49
+ }
50
+ return diagnostics;
51
+ }
@@ -6,11 +6,18 @@
6
6
  * category. Pure function — no I/O.
7
7
  *
8
8
  * Drift categories:
9
- * - MSL-L202 — upstream in resolved but missing from lockfile
10
- * - MSL-L203 — upstream in lockfile but missing from resolved
9
+ * - MSL-L202 — upstream in resolved but missing from lockfile (also:
10
+ * a declared reference with no lockfile registry row)
11
+ * - MSL-L203 — upstream in lockfile but missing from resolved (also:
12
+ * a locked registry row no longer declared in project.yaml)
11
13
  * - MSL-L210 — hash mismatch (same identity, different bytes)
12
14
  * - MSL-L211 — profile resolved-version drift (npm range now resolves a different exact version)
13
15
  * - MSL-L212 — canonical edge hash drift (traceability graph changed)
16
+ *
17
+ * Federated registry rows (org `references:`) are checked by pure
18
+ * id-presence against `declaredReferenceIds` — no hash comparison.
19
+ * Content integrity for those rows is the offline cache gate (a later
20
+ * task), not this online-vs-lockfile comparison.
14
21
  */
15
22
  import type { Diagnostic } from "../model/mod.js";
16
23
  import type { Lockfile } from "./model.js";
@@ -19,6 +26,10 @@ import type { ResolvedUpstreams } from "./resolve.js";
19
26
  * Compare locked vs resolved upstreams; return one diagnostic per drift
20
27
  * case. An empty result means the lockfile is in sync with the current
21
28
  * project state.
29
+ *
30
+ * @param declaredReferenceIds - Upstream ids derived from
31
+ * `config.references` (via `deriveUpstreamId`) — the id-presence
32
+ * comparison set for federated registry rows.
22
33
  */
23
- export declare function checkDrift(locked: Lockfile, resolved: ResolvedUpstreams): Diagnostic[];
34
+ export declare function checkDrift(locked: Lockfile, resolved: ResolvedUpstreams, declaredReferenceIds: readonly string[]): Diagnostic[];
24
35
  //# sourceMappingURL=check.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"check.d.ts","sourceRoot":"","sources":["../../src/lock/check.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAClD,OAAO,KAAK,EAAE,QAAQ,EAAsC,MAAM,YAAY,CAAC;AAC/E,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAC;AAEtD;;;;GAIG;AACH,wBAAgB,UAAU,CACxB,MAAM,EAAE,QAAQ,EAChB,QAAQ,EAAE,iBAAiB,GAC1B,UAAU,EAAE,CAyHd"}
1
+ {"version":3,"file":"check.d.ts","sourceRoot":"","sources":["../../src/lock/check.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AAEH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAClD,OAAO,KAAK,EACV,QAAQ,EAIT,MAAM,YAAY,CAAC;AACpB,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAC;AAGtD;;;;;;;;GAQG;AACH,wBAAgB,UAAU,CACxB,MAAM,EAAE,QAAQ,EAChB,QAAQ,EAAE,iBAAiB,EAC3B,oBAAoB,EAAE,SAAS,MAAM,EAAE,GACtC,UAAU,EAAE,CA4Jd"}
package/esm/lock/check.js CHANGED
@@ -6,18 +6,30 @@
6
6
  * category. Pure function — no I/O.
7
7
  *
8
8
  * Drift categories:
9
- * - MSL-L202 — upstream in resolved but missing from lockfile
10
- * - MSL-L203 — upstream in lockfile but missing from resolved
9
+ * - MSL-L202 — upstream in resolved but missing from lockfile (also:
10
+ * a declared reference with no lockfile registry row)
11
+ * - MSL-L203 — upstream in lockfile but missing from resolved (also:
12
+ * a locked registry row no longer declared in project.yaml)
11
13
  * - MSL-L210 — hash mismatch (same identity, different bytes)
12
14
  * - MSL-L211 — profile resolved-version drift (npm range now resolves a different exact version)
13
15
  * - MSL-L212 — canonical edge hash drift (traceability graph changed)
16
+ *
17
+ * Federated registry rows (org `references:`) are checked by pure
18
+ * id-presence against `declaredReferenceIds` — no hash comparison.
19
+ * Content integrity for those rows is the offline cache gate (a later
20
+ * task), not this online-vs-lockfile comparison.
14
21
  */
22
+ import { formatEdgeDriftMessage } from "./edge_drift.js";
15
23
  /**
16
24
  * Compare locked vs resolved upstreams; return one diagnostic per drift
17
25
  * case. An empty result means the lockfile is in sync with the current
18
26
  * project state.
27
+ *
28
+ * @param declaredReferenceIds - Upstream ids derived from
29
+ * `config.references` (via `deriveUpstreamId`) — the id-presence
30
+ * comparison set for federated registry rows.
19
31
  */
20
- export function checkDrift(locked, resolved) {
32
+ export function checkDrift(locked, resolved, declaredReferenceIds) {
21
33
  const diags = [];
22
34
  // -------------------------------------------------------------------------
23
35
  // References — match by slug.
@@ -113,13 +125,40 @@ export function checkDrift(locked, resolved) {
113
125
  }
114
126
  }
115
127
  // -------------------------------------------------------------------------
128
+ // Federated registries — pure id-presence against declared references.
129
+ // No hash comparison: content integrity is the offline cache gate.
130
+ // -------------------------------------------------------------------------
131
+ const lockedRegistries = locked.upstreams.filter((u) => u.kind === "registry");
132
+ const lockedRegistryIds = new Set(lockedRegistries.map((r) => r.id));
133
+ for (const id of declaredReferenceIds) {
134
+ if (!lockedRegistryIds.has(id)) {
135
+ diags.push({
136
+ code: "MSL-L202",
137
+ severity: "error",
138
+ message: `declared reference '${id}' has no lockfile row — run 'markspec lock'`,
139
+ location: undefined,
140
+ });
141
+ }
142
+ }
143
+ const declaredRegistryIds = new Set(declaredReferenceIds);
144
+ for (const row of lockedRegistries) {
145
+ if (!declaredRegistryIds.has(row.id)) {
146
+ diags.push({
147
+ code: "MSL-L203",
148
+ severity: "error",
149
+ message: `locked reference '${row.id}' is no longer declared in project.yaml — run 'markspec lock'`,
150
+ location: undefined,
151
+ });
152
+ }
153
+ }
154
+ // -------------------------------------------------------------------------
116
155
  // Canonical edge hash — single comparison, MSL-L212 on mismatch.
117
156
  // -------------------------------------------------------------------------
118
157
  if (locked.generatedCache.edgesHash !== resolved.canonicalEdgeHash) {
119
158
  diags.push({
120
159
  code: "MSL-L212",
121
160
  severity: "error",
122
- message: `Canonical edge hash drifted: locked ${locked.generatedCache.edgesHash} (${locked.generatedCache.edgesCount} edges) vs current ${resolved.canonicalEdgeHash} (${resolved.canonicalEdgeCount} edges).`,
161
+ message: formatEdgeDriftMessage(locked.generatedCache.edgesCount, resolved.canonicalEdgeCount),
123
162
  location: undefined,
124
163
  });
125
164
  }
@@ -18,6 +18,8 @@ export interface OfflineEdgeDrift {
18
18
  /** Edge count in the current project graph. */
19
19
  readonly currentCount: number;
20
20
  }
21
+ /** Build the actionable edge-drift message shared by CLI and core checks. */
22
+ export declare function formatEdgeDriftMessage(lockedCount: number, currentCount: number): string;
21
23
  /**
22
24
  * Compare the current project graph's canonical edge hash against a
23
25
  * lockfile's generated-cache. Offline by design — no upstream resolution.
@@ -1 +1 @@
1
- {"version":3,"file":"edge_drift.d.ts","sourceRoot":"","sources":["../../src/lock/edge_drift.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,iBAAiB,CAAC;AAC7C,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAIjD,qEAAqE;AACrE,MAAM,WAAW,gBAAgB;IAC/B,2EAA2E;IAC3E,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAC;IAC1B,6DAA6D;IAC7D,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B,+CAA+C;IAC/C,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAC;CAC/B;AAED;;;;;;;;GAQG;AACH,wBAAsB,sBAAsB,CAC1C,cAAc,EAAE,SAAS,KAAK,EAAE,EAChC,KAAK,EAAE,cAAc,GACpB,OAAO,CAAC,gBAAgB,CAAC,CAQ3B"}
1
+ {"version":3,"file":"edge_drift.d.ts","sourceRoot":"","sources":["../../src/lock/edge_drift.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,iBAAiB,CAAC;AAC7C,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAIjD,qEAAqE;AACrE,MAAM,WAAW,gBAAgB;IAC/B,2EAA2E;IAC3E,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAC;IAC1B,6DAA6D;IAC7D,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B,+CAA+C;IAC/C,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAC;CAC/B;AAED,6EAA6E;AAC7E,wBAAgB,sBAAsB,CACpC,WAAW,EAAE,MAAM,EACnB,YAAY,EAAE,MAAM,GACnB,MAAM,CAER;AAED;;;;;;;;GAQG;AACH,wBAAsB,sBAAsB,CAC1C,cAAc,EAAE,SAAS,KAAK,EAAE,EAChC,KAAK,EAAE,cAAc,GACpB,OAAO,CAAC,gBAAgB,CAAC,CAQ3B"}
@@ -9,6 +9,10 @@
9
9
  */
10
10
  import { extractEdgeQuads } from "./resolve.js";
11
11
  import { hashCanonicalEdges } from "./canonical_edges.js";
12
+ /** Build the actionable edge-drift message shared by CLI and core checks. */
13
+ export function formatEdgeDriftMessage(lockedCount, currentCount) {
14
+ return `traceability edges drifted from markspec.lock: locked ${lockedCount} edge(s), current ${currentCount} — run \`markspec lock\` to refresh. (After upgrading MarkSpec this can also fire once because traceability inputs now include source-file doc comments; re-running \`markspec lock\` clears it.)`;
15
+ }
12
16
  /**
13
17
  * Compare the current project graph's canonical edge hash against a
14
18
  * lockfile's generated-cache. Offline by design — no upstream resolution.
@@ -0,0 +1,46 @@
1
+ /**
2
+ * @module core/lock/git_intent
3
+ *
4
+ * Pure git-intent resolution for federated dependencies (design §4.3).
5
+ * Parses `git ls-remote --symref` output into a {@linkcode RefList} and
6
+ * resolves a declared version intent (`auto` | `<tag>` | `<branch>` |
7
+ * `<sha>`) to an exact commit + a resolution-kind label. No I/O — the CLI
8
+ * runs git and hands the raw stdout in; unit tests feed fixture strings.
9
+ */
10
+ export interface GitRef {
11
+ readonly name: string;
12
+ readonly kind: "tag" | "branch";
13
+ readonly sha: string;
14
+ }
15
+ export interface RefList {
16
+ readonly refs: readonly GitRef[];
17
+ readonly headSha?: string;
18
+ readonly defaultBranch?: string;
19
+ }
20
+ export interface ResolvedIntent {
21
+ readonly sha: string;
22
+ readonly resolved: string;
23
+ }
24
+ /**
25
+ * Parse `git ls-remote --symref <url>` output. Peeled annotated-tag lines
26
+ * (`refs/tags/x^{}`) override the tag-object sha with the underlying commit
27
+ * — that commit is what a checkout resolves to and what we pin.
28
+ */
29
+ export declare function parseLsRemote(stdout: string): RefList;
30
+ /**
31
+ * Resolve a declared intent to an exact `{ sha, resolved }`.
32
+ *
33
+ * - `auto` → highest valid-semver tag (leading `v` tolerated); if none, the
34
+ * default-branch head.
35
+ * - a name matching a tag → `tag:<name>` (tag wins if a branch shares the name).
36
+ * - a name matching a branch → `branch:<name>`.
37
+ * - a 40-hex string (any case) → normalized to lowercase → `sha:<sha>` (the
38
+ * acquire step validates it). Lowercasing keeps the pin byte-identical
39
+ * regardless of the case a developer typed, so two lockfiles never differ
40
+ * on sha case alone.
41
+ * - otherwise → `{ error }`.
42
+ */
43
+ export declare function resolveIntent(intent: string, refs: RefList): ResolvedIntent | {
44
+ error: string;
45
+ };
46
+ //# sourceMappingURL=git_intent.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"git_intent.d.ts","sourceRoot":"","sources":["../../src/lock/git_intent.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAIH,MAAM,WAAW,MAAM;IACrB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,IAAI,EAAE,KAAK,GAAG,QAAQ,CAAC;IAChC,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;CACtB;AAED,MAAM,WAAW,OAAO;IACtB,QAAQ,CAAC,IAAI,EAAE,SAAS,MAAM,EAAE,CAAC;IACjC,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,aAAa,CAAC,EAAE,MAAM,CAAC;CACjC;AAED,MAAM,WAAW,cAAc;IAC7B,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;CAC3B;AAQD;;;;GAIG;AACH,wBAAgB,aAAa,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CA0CrD;AAED;;;;;;;;;;;;GAYG;AACH,wBAAgB,aAAa,CAC3B,MAAM,EAAE,MAAM,EACd,IAAI,EAAE,OAAO,GACZ,cAAc,GAAG;IAAE,KAAK,EAAE,MAAM,CAAA;CAAE,CAiCpC"}
@@ -0,0 +1,111 @@
1
+ /**
2
+ * @module core/lock/git_intent
3
+ *
4
+ * Pure git-intent resolution for federated dependencies (design §4.3).
5
+ * Parses `git ls-remote --symref` output into a {@linkcode RefList} and
6
+ * resolves a declared version intent (`auto` | `<tag>` | `<branch>` |
7
+ * `<sha>`) to an exact commit + a resolution-kind label. No I/O — the CLI
8
+ * runs git and hands the raw stdout in; unit tests feed fixture strings.
9
+ */
10
+ import { compare, tryParse } from "@std/semver";
11
+ const SHA_RE = /^[0-9a-fA-F]{40}$/;
12
+ /** Strip a single leading `v`/`V` so `v2.1.0` parses as semver. */
13
+ function semverText(tag) {
14
+ return /^[vV]/.test(tag) ? tag.slice(1) : tag;
15
+ }
16
+ /**
17
+ * Parse `git ls-remote --symref <url>` output. Peeled annotated-tag lines
18
+ * (`refs/tags/x^{}`) override the tag-object sha with the underlying commit
19
+ * — that commit is what a checkout resolves to and what we pin.
20
+ */
21
+ export function parseLsRemote(stdout) {
22
+ const branches = new Map();
23
+ const tags = new Map();
24
+ let headSha;
25
+ let defaultBranch;
26
+ for (const raw of stdout.split("\n")) {
27
+ const line = raw.trimEnd();
28
+ if (line.length === 0)
29
+ continue;
30
+ if (line.startsWith("ref: ")) {
31
+ // `ref: refs/heads/main\tHEAD` — the symref for HEAD.
32
+ const m = line.match(/^ref:\s+refs\/heads\/(\S+)\s+HEAD$/);
33
+ if (m)
34
+ defaultBranch = m[1];
35
+ continue;
36
+ }
37
+ const tab = line.indexOf("\t");
38
+ if (tab < 0)
39
+ continue;
40
+ const sha = line.slice(0, tab);
41
+ const ref = line.slice(tab + 1);
42
+ if (ref === "HEAD") {
43
+ headSha = sha;
44
+ }
45
+ else if (ref.startsWith("refs/heads/")) {
46
+ branches.set(ref.slice("refs/heads/".length), sha);
47
+ }
48
+ else if (ref.startsWith("refs/tags/")) {
49
+ const rest = ref.slice("refs/tags/".length);
50
+ const peeled = rest.endsWith("^{}");
51
+ const name = peeled ? rest.slice(0, -3) : rest;
52
+ // A peeled line always wins; a bare tag line only sets the sha if no
53
+ // peeled sha was recorded yet.
54
+ if (peeled || !tags.has(name))
55
+ tags.set(name, sha);
56
+ }
57
+ }
58
+ const refs = [
59
+ ...[...branches].map(([name, sha]) => ({
60
+ name,
61
+ kind: "branch",
62
+ sha,
63
+ })),
64
+ ...[...tags].map(([name, sha]) => ({ name, kind: "tag", sha })),
65
+ ];
66
+ return { refs, headSha, defaultBranch };
67
+ }
68
+ /**
69
+ * Resolve a declared intent to an exact `{ sha, resolved }`.
70
+ *
71
+ * - `auto` → highest valid-semver tag (leading `v` tolerated); if none, the
72
+ * default-branch head.
73
+ * - a name matching a tag → `tag:<name>` (tag wins if a branch shares the name).
74
+ * - a name matching a branch → `branch:<name>`.
75
+ * - a 40-hex string (any case) → normalized to lowercase → `sha:<sha>` (the
76
+ * acquire step validates it). Lowercasing keeps the pin byte-identical
77
+ * regardless of the case a developer typed, so two lockfiles never differ
78
+ * on sha case alone.
79
+ * - otherwise → `{ error }`.
80
+ */
81
+ export function resolveIntent(intent, refs) {
82
+ if (intent === "auto") {
83
+ const semverTags = refs.refs
84
+ .filter((r) => r.kind === "tag")
85
+ .map((r) => ({ r, v: tryParse(semverText(r.name)) }))
86
+ .filter((x) => x.v !== undefined)
87
+ .sort((a, b) => compare(b.v, a.v));
88
+ if (semverTags.length > 0) {
89
+ const top = semverTags[0].r;
90
+ return { sha: top.sha, resolved: `tag:${top.name}` };
91
+ }
92
+ if (refs.headSha !== undefined) {
93
+ return {
94
+ sha: refs.headSha,
95
+ resolved: `branch:${refs.defaultBranch ?? "HEAD"}`,
96
+ };
97
+ }
98
+ return { error: "intent 'auto': remote has no tags and no HEAD" };
99
+ }
100
+ const tag = refs.refs.find((r) => r.kind === "tag" && r.name === intent);
101
+ if (tag)
102
+ return { sha: tag.sha, resolved: `tag:${tag.name}` };
103
+ const branch = refs.refs.find((r) => r.kind === "branch" && r.name === intent);
104
+ if (branch)
105
+ return { sha: branch.sha, resolved: `branch:${branch.name}` };
106
+ if (SHA_RE.test(intent)) {
107
+ const sha = intent.toLowerCase();
108
+ return { sha, resolved: `sha:${sha}` };
109
+ }
110
+ return { error: `intent '${intent}' matched no tag or branch on the remote` };
111
+ }
package/esm/lock/mod.d.ts CHANGED
@@ -5,18 +5,25 @@
5
5
  * model, upstream resolution, drift detection. The public boundary
6
6
  * for both `markspec lock` and `markspec compile --frozen`.
7
7
  */
8
- export type { BoundEntry, BoundEntryBinding, GeneratedCache, LockedAttributes, LockEdge, Lockfile, LockfileMeta, LockfileToolchain, Upstream, UpstreamProfile, UpstreamReference, UpstreamRegistry, } from "./model.js";
8
+ export type { BoundEntry, BoundEntryBinding, GeneratedCache, LockedAttributes, LockEdge, Lockfile, LockfileMeta, LockfileToolchain, Upstream, UpstreamDependency, UpstreamProfile, UpstreamReference, UpstreamRegistry, } from "./model.js";
9
9
  export { LOCKFILE_SCHEMA_VERSION } from "./model.js";
10
10
  export { serializeLockfile } from "./serializer.js";
11
11
  export { parseLockfile } from "./parser.js";
12
12
  export type { ParseLockfileResult } from "./parser.js";
13
+ export { dependencyPinAssurance } from "./pin_assurance.js";
13
14
  export { isBelowFloor } from "./compare.js";
14
15
  export { checkDrift } from "./check.js";
15
16
  export { sha256Bytes, sha256String } from "./hash.js";
16
17
  export { canonicalEdgeJson, hashCanonicalEdges } from "./canonical_edges.js";
17
18
  export type { EdgeQuad } from "./canonical_edges.js";
18
- export { detectOfflineEdgeDrift } from "./edge_drift.js";
19
+ export { detectOfflineEdgeDrift, formatEdgeDriftMessage, } from "./edge_drift.js";
19
20
  export type { OfflineEdgeDrift } from "./edge_drift.js";
20
- export { extractEdgeLedger, extractEdgeQuads, resolveBoundEntries, resolveProfileChain, resolveReferences, resolveRegistries, resolveUpstreams, } from "./resolve.js";
21
- export type { FetchUrl, ReadFile, ResolvedBoundEntry, ResolvedProfile, ResolvedReference, ResolvedRegistry, ResolvedUpstreams, ResolveUpstreamsOptions, } from "./resolve.js";
21
+ export { verifyUpstreamCache } from "./cache_check.js";
22
+ export { extractEdgeLedger, extractEdgeQuads, resolveBoundEntries, resolveProfileChain, resolveReferences, resolveUpstreams, } from "./resolve.js";
23
+ export type { FetchUrl, ReadFile, ResolvedBoundEntry, ResolvedProfile, ResolvedReference, ResolvedUpstreams, ResolveUpstreamsOptions, } from "./resolve.js";
24
+ export { deriveUpstreamId, resolveProjectReferences, upstreamCacheRoot, } from "./upstream_refs.js";
25
+ export type { ResolveProjectReferencesOptions, ResolveProjectReferencesResult, UpstreamRefsIO, } from "./upstream_refs.js";
26
+ export { type GitIO, resolveProjectDependencies, type ResolveProjectDependenciesOptions, type ResolveProjectDependenciesResult, type UpstreamDepsIO, } from "./upstream_deps.js";
27
+ export { type AcquireCompileIO, compileAcquiredTree, type CompiledSnapshot, } from "./acquire_compile.js";
28
+ export { type GitRef, parseLsRemote, type RefList, type ResolvedIntent, resolveIntent, } from "./git_intent.js";
22
29
  //# sourceMappingURL=mod.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"mod.d.ts","sourceRoot":"","sources":["../../src/lock/mod.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,YAAY,EACV,UAAU,EACV,iBAAiB,EACjB,cAAc,EACd,gBAAgB,EAChB,QAAQ,EACR,QAAQ,EACR,YAAY,EACZ,iBAAiB,EACjB,QAAQ,EACR,eAAe,EACf,iBAAiB,EACjB,gBAAgB,GACjB,MAAM,YAAY,CAAC;AACpB,OAAO,EAAE,uBAAuB,EAAE,MAAM,YAAY,CAAC;AAErD,OAAO,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AACpD,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAC5C,YAAY,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AAEvD,OAAO,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAE5C,OAAO,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAExC,OAAO,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AAEtD,OAAO,EAAE,iBAAiB,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC7E,YAAY,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAErD,OAAO,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAC;AACzD,YAAY,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AAExD,OAAO,EACL,iBAAiB,EACjB,gBAAgB,EAChB,mBAAmB,EACnB,mBAAmB,EACnB,iBAAiB,EACjB,iBAAiB,EACjB,gBAAgB,GACjB,MAAM,cAAc,CAAC;AACtB,YAAY,EACV,QAAQ,EACR,QAAQ,EACR,kBAAkB,EAClB,eAAe,EACf,iBAAiB,EACjB,gBAAgB,EAChB,iBAAiB,EACjB,uBAAuB,GACxB,MAAM,cAAc,CAAC"}
1
+ {"version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cAAc,CAAC;AAEtB,OAAO,EACL,gBAAgB,EAChB,wBAAwB,EACxB,iBAAiB,GAClB,MAAM,oBAAoB,CAAC;AAC5B,YAAY,EACV,+BAA+B,EAC/B,8BAA8B,EAC9B,cAAc,GACf,MAAM,oBAAoB,CAAC;AAE5B,OAAO,EACL,KAAK,KAAK,EACV,0BAA0B,EAC1B,KAAK,iCAAiC,EACtC,KAAK,gCAAgC,EACrC,KAAK,cAAc,GACpB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EACL,KAAK,gBAAgB,EACrB,mBAAmB,EACnB,KAAK,gBAAgB,GACtB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EACL,KAAK,MAAM,EACX,aAAa,EACb,KAAK,OAAO,EACZ,KAAK,cAAc,EACnB,aAAa,GACd,MAAM,iBAAiB,CAAC"}
package/esm/lock/mod.js CHANGED
@@ -8,9 +8,15 @@
8
8
  export { LOCKFILE_SCHEMA_VERSION } from "./model.js";
9
9
  export { serializeLockfile } from "./serializer.js";
10
10
  export { parseLockfile } from "./parser.js";
11
+ export { dependencyPinAssurance } from "./pin_assurance.js";
11
12
  export { isBelowFloor } from "./compare.js";
12
13
  export { checkDrift } from "./check.js";
13
14
  export { sha256Bytes, sha256String } from "./hash.js";
14
15
  export { canonicalEdgeJson, hashCanonicalEdges } from "./canonical_edges.js";
15
- export { detectOfflineEdgeDrift } from "./edge_drift.js";
16
- export { extractEdgeLedger, extractEdgeQuads, resolveBoundEntries, resolveProfileChain, resolveReferences, resolveRegistries, resolveUpstreams, } from "./resolve.js";
16
+ export { detectOfflineEdgeDrift, formatEdgeDriftMessage, } from "./edge_drift.js";
17
+ export { verifyUpstreamCache } from "./cache_check.js";
18
+ export { extractEdgeLedger, extractEdgeQuads, resolveBoundEntries, resolveProfileChain, resolveReferences, resolveUpstreams, } from "./resolve.js";
19
+ export { deriveUpstreamId, resolveProjectReferences, upstreamCacheRoot, } from "./upstream_refs.js";
20
+ export { resolveProjectDependencies, } from "./upstream_deps.js";
21
+ export { compileAcquiredTree, } from "./acquire_compile.js";
22
+ export { parseLsRemote, resolveIntent, } from "./git_intent.js";
@@ -39,9 +39,32 @@ export interface UpstreamRegistry {
39
39
  readonly api: string;
40
40
  readonly resolvedManifestHash: string;
41
41
  readonly markspecSchema: number;
42
+ /** Upstream project.version, when published. */
43
+ readonly version?: string;
44
+ /** sha256 of the entries data-file bytes. */
45
+ readonly snapshot?: string;
46
+ /** RFC3339 — when this pin was created/moved. */
47
+ readonly lockedAt?: string;
48
+ }
49
+ /** A resolved federated git-repository upstream dependency. */
50
+ export interface UpstreamDependency {
51
+ readonly kind: "dependency";
52
+ readonly id: string;
53
+ /** Git repository URL (remote or local path). */
54
+ readonly url: string;
55
+ /** `"auto"` | `<tag>` | `<branch>` — the requested resolution intent. */
56
+ readonly intent: string;
57
+ /** `"tag:<t>"` | `"branch:<b>"` | `"sha:<s>"` — what actually resolved. */
58
+ readonly resolved: string;
59
+ /** Exact resolved commit. */
60
+ readonly sha: string;
61
+ /** sha256 of the cached entries data file. */
62
+ readonly snapshot: string;
63
+ /** RFC3339 — when this pin was created/moved. */
64
+ readonly lockedAt: string;
42
65
  }
43
66
  /** Discriminated union of upstream kinds. */
44
- export type Upstream = UpstreamReference | UpstreamProfile | UpstreamRegistry;
67
+ export type Upstream = UpstreamReference | UpstreamProfile | UpstreamRegistry | UpstreamDependency;
45
68
  /** A locked attribute on a binding — attribute name → upstream value hash. */
46
69
  export type LockedAttributes = ReadonlyMap<string, string>;
47
70
  /** One External-id binding within a bound entry. */
@@ -1 +1 @@
1
- {"version":3,"file":"model.d.ts","sourceRoot":"","sources":["../../src/lock/model.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,qCAAqC;AACrC,MAAM,WAAW,iBAAiB;IAChC,QAAQ,CAAC,IAAI,EAAE,WAAW,CAAC;IAC3B,6DAA6D;IAC7D,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,wDAAwD;IACxD,QAAQ,CAAC,EAA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C;IACxC,QAAQ,CAAC,YAAY,EAAE,SAAS,UAAU,EAAE,CAAC;IAC7C,2DAA2D;IAC3D,QAAQ,CAAC,KAAK,EAAE,SAAS,QAAQ,EAAE,CAAC;IACpC,QAAQ,CAAC,cAAc,EAAE,cAAc,CAAC;CACzC;AAED,uCAAuC;AACvC,eAAO,MAAM,uBAAuB,IAAI,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"parser.d.ts","sourceRoot":"","sources":["../../src/lock/parser.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAGH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAClD,OAAO,EAIL,KAAK,QAAQ,EAId,MAAM,YAAY,CAAC;AAUpB,4CAA4C;AAC5C,MAAM,WAAW,mBAAmB;IAClC,QAAQ,CAAC,QAAQ,CAAC,EAAE,QAAQ,CAAC;IAC7B,QAAQ,CAAC,WAAW,EAAE,SAAS,UAAU,EAAE,CAAC;CAC7C;AAED;;;;;GAKG;AACH,wBAAgB,aAAa,CAAC,IAAI,EAAE,MAAM,GAAG,mBAAmB,CA4P/D"}
1
+ {"version":3,"file":"parser.d.ts","sourceRoot":"","sources":["../../src/lock/parser.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAGH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAClD,OAAO,EAIL,KAAK,QAAQ,EAId,MAAM,YAAY,CAAC;AAUpB,4CAA4C;AAC5C,MAAM,WAAW,mBAAmB;IAClC,QAAQ,CAAC,QAAQ,CAAC,EAAE,QAAQ,CAAC;IAC7B,QAAQ,CAAC,WAAW,EAAE,SAAS,UAAU,EAAE,CAAC;CAC7C;AAED;;;;;GAKG;AACH,wBAAgB,aAAa,CAAC,IAAI,EAAE,MAAM,GAAG,mBAAmB,CAmS/D"}
@@ -132,12 +132,44 @@ export function parseLockfile(toml) {
132
132
  resolvedManifestHash === undefined || markspecSchemaN === undefined) {
133
133
  return diag("MSL-L001", `[[upstream.registry]] entry ${i}: missing required field 'id', 'api', 'resolved-manifest-hash', or 'markspec-schema'`);
134
134
  }
135
+ const version = reg.version;
136
+ const snapshot = reg.snapshot;
137
+ const lockedAt = reg["locked-at"];
135
138
  upstreams.push({
136
139
  kind: "registry",
137
140
  id,
138
141
  api,
139
142
  resolvedManifestHash,
140
143
  markspecSchema: markspecSchemaN,
144
+ ...(version !== undefined ? { version } : {}),
145
+ ...(snapshot !== undefined ? { snapshot } : {}),
146
+ ...(lockedAt !== undefined ? { lockedAt } : {}),
147
+ });
148
+ }
149
+ const deps = upstreamRoot.dependency ?? [];
150
+ for (let i = 0; i < deps.length; i++) {
151
+ const dep = deps[i];
152
+ const id = requireString(dep, "id");
153
+ const url = requireString(dep, "url");
154
+ const intent = requireString(dep, "intent");
155
+ const resolved = requireString(dep, "resolved");
156
+ const sha = requireString(dep, "sha");
157
+ const snapshot = requireString(dep, "snapshot");
158
+ const lockedAt = requireString(dep, "locked-at");
159
+ if (id === undefined || url === undefined || intent === undefined ||
160
+ resolved === undefined || sha === undefined ||
161
+ snapshot === undefined || lockedAt === undefined) {
162
+ return diag("MSL-L001", `[[upstream.dependency]] entry ${i}: missing required field 'id', 'url', 'intent', 'resolved', 'sha', 'snapshot', or 'locked-at'`);
163
+ }
164
+ upstreams.push({
165
+ kind: "dependency",
166
+ id,
167
+ url,
168
+ intent,
169
+ resolved,
170
+ sha,
171
+ snapshot,
172
+ lockedAt,
141
173
  });
142
174
  }
143
175
  }
@@ -0,0 +1,20 @@
1
+ /**
2
+ * @module core/lock/pin_assurance
3
+ *
4
+ * Release-assurance advisory for federated dependencies (design §4.4). Every
5
+ * `[[upstream.dependency]]` pin that resolved to a branch or bare sha (rather
6
+ * than a tag) is an "unreleased" pin. Below `check --strict` this is a gentle
7
+ * project-level advisory; `check --strict` promotes the warning to an error,
8
+ * making it the release gate — you cannot release against a dependency that
9
+ * never baselined. Pure.
10
+ */
11
+ import type { Diagnostic } from "../model/mod.js";
12
+ import type { Lockfile } from "./model.js";
13
+ /**
14
+ * Emit one `MSL-L215` warning per `[[upstream.dependency]]` row whose
15
+ * `resolved` value is not a tag pin (`branch:*` or `sha:*`). Returns an
16
+ * empty array for an all-tag lockfile or an undefined lockfile (no
17
+ * `markspec.lock` present).
18
+ */
19
+ export declare function dependencyPinAssurance(lockfile: Lockfile | undefined): Diagnostic[];
20
+ //# sourceMappingURL=pin_assurance.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pin_assurance.d.ts","sourceRoot":"","sources":["../../src/lock/pin_assurance.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAClD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAE3C;;;;;GAKG;AACH,wBAAgB,sBAAsB,CACpC,QAAQ,EAAE,QAAQ,GAAG,SAAS,GAC7B,UAAU,EAAE,CAiBd"}
@@ -0,0 +1,34 @@
1
+ /**
2
+ * @module core/lock/pin_assurance
3
+ *
4
+ * Release-assurance advisory for federated dependencies (design §4.4). Every
5
+ * `[[upstream.dependency]]` pin that resolved to a branch or bare sha (rather
6
+ * than a tag) is an "unreleased" pin. Below `check --strict` this is a gentle
7
+ * project-level advisory; `check --strict` promotes the warning to an error,
8
+ * making it the release gate — you cannot release against a dependency that
9
+ * never baselined. Pure.
10
+ */
11
+ /**
12
+ * Emit one `MSL-L215` warning per `[[upstream.dependency]]` row whose
13
+ * `resolved` value is not a tag pin (`branch:*` or `sha:*`). Returns an
14
+ * empty array for an all-tag lockfile or an undefined lockfile (no
15
+ * `markspec.lock` present).
16
+ */
17
+ export function dependencyPinAssurance(lockfile) {
18
+ if (!lockfile)
19
+ return [];
20
+ const out = [];
21
+ for (const u of lockfile.upstreams) {
22
+ if (u.kind !== "dependency")
23
+ continue;
24
+ if (u.resolved.startsWith("tag:"))
25
+ continue;
26
+ out.push({
27
+ code: "MSL-L215",
28
+ severity: "warning",
29
+ message: `dependency '${u.id}' is pinned to an unreleased state (${u.resolved} @ ${u.sha.slice(0, 12)}); release builds (check --strict) require a tagged pin — ask the upstream to cut a tag, then run 'markspec lock --update=${u.id}'`,
30
+ location: undefined,
31
+ });
32
+ }
33
+ return out;
34
+ }