@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,115 @@
1
+ "use strict";
2
+ /**
3
+ * @module core/lock/git_intent
4
+ *
5
+ * Pure git-intent resolution for federated dependencies (design §4.3).
6
+ * Parses `git ls-remote --symref` output into a {@linkcode RefList} and
7
+ * resolves a declared version intent (`auto` | `<tag>` | `<branch>` |
8
+ * `<sha>`) to an exact commit + a resolution-kind label. No I/O — the CLI
9
+ * runs git and hands the raw stdout in; unit tests feed fixture strings.
10
+ */
11
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ exports.parseLsRemote = parseLsRemote;
13
+ exports.resolveIntent = resolveIntent;
14
+ const semver_1 = require("@std/semver");
15
+ const SHA_RE = /^[0-9a-fA-F]{40}$/;
16
+ /** Strip a single leading `v`/`V` so `v2.1.0` parses as semver. */
17
+ function semverText(tag) {
18
+ return /^[vV]/.test(tag) ? tag.slice(1) : tag;
19
+ }
20
+ /**
21
+ * Parse `git ls-remote --symref <url>` output. Peeled annotated-tag lines
22
+ * (`refs/tags/x^{}`) override the tag-object sha with the underlying commit
23
+ * — that commit is what a checkout resolves to and what we pin.
24
+ */
25
+ function parseLsRemote(stdout) {
26
+ const branches = new Map();
27
+ const tags = new Map();
28
+ let headSha;
29
+ let defaultBranch;
30
+ for (const raw of stdout.split("\n")) {
31
+ const line = raw.trimEnd();
32
+ if (line.length === 0)
33
+ continue;
34
+ if (line.startsWith("ref: ")) {
35
+ // `ref: refs/heads/main\tHEAD` — the symref for HEAD.
36
+ const m = line.match(/^ref:\s+refs\/heads\/(\S+)\s+HEAD$/);
37
+ if (m)
38
+ defaultBranch = m[1];
39
+ continue;
40
+ }
41
+ const tab = line.indexOf("\t");
42
+ if (tab < 0)
43
+ continue;
44
+ const sha = line.slice(0, tab);
45
+ const ref = line.slice(tab + 1);
46
+ if (ref === "HEAD") {
47
+ headSha = sha;
48
+ }
49
+ else if (ref.startsWith("refs/heads/")) {
50
+ branches.set(ref.slice("refs/heads/".length), sha);
51
+ }
52
+ else if (ref.startsWith("refs/tags/")) {
53
+ const rest = ref.slice("refs/tags/".length);
54
+ const peeled = rest.endsWith("^{}");
55
+ const name = peeled ? rest.slice(0, -3) : rest;
56
+ // A peeled line always wins; a bare tag line only sets the sha if no
57
+ // peeled sha was recorded yet.
58
+ if (peeled || !tags.has(name))
59
+ tags.set(name, sha);
60
+ }
61
+ }
62
+ const refs = [
63
+ ...[...branches].map(([name, sha]) => ({
64
+ name,
65
+ kind: "branch",
66
+ sha,
67
+ })),
68
+ ...[...tags].map(([name, sha]) => ({ name, kind: "tag", sha })),
69
+ ];
70
+ return { refs, headSha, defaultBranch };
71
+ }
72
+ /**
73
+ * Resolve a declared intent to an exact `{ sha, resolved }`.
74
+ *
75
+ * - `auto` → highest valid-semver tag (leading `v` tolerated); if none, the
76
+ * default-branch head.
77
+ * - a name matching a tag → `tag:<name>` (tag wins if a branch shares the name).
78
+ * - a name matching a branch → `branch:<name>`.
79
+ * - a 40-hex string (any case) → normalized to lowercase → `sha:<sha>` (the
80
+ * acquire step validates it). Lowercasing keeps the pin byte-identical
81
+ * regardless of the case a developer typed, so two lockfiles never differ
82
+ * on sha case alone.
83
+ * - otherwise → `{ error }`.
84
+ */
85
+ function resolveIntent(intent, refs) {
86
+ if (intent === "auto") {
87
+ const semverTags = refs.refs
88
+ .filter((r) => r.kind === "tag")
89
+ .map((r) => ({ r, v: (0, semver_1.tryParse)(semverText(r.name)) }))
90
+ .filter((x) => x.v !== undefined)
91
+ .sort((a, b) => (0, semver_1.compare)(b.v, a.v));
92
+ if (semverTags.length > 0) {
93
+ const top = semverTags[0].r;
94
+ return { sha: top.sha, resolved: `tag:${top.name}` };
95
+ }
96
+ if (refs.headSha !== undefined) {
97
+ return {
98
+ sha: refs.headSha,
99
+ resolved: `branch:${refs.defaultBranch ?? "HEAD"}`,
100
+ };
101
+ }
102
+ return { error: "intent 'auto': remote has no tags and no HEAD" };
103
+ }
104
+ const tag = refs.refs.find((r) => r.kind === "tag" && r.name === intent);
105
+ if (tag)
106
+ return { sha: tag.sha, resolved: `tag:${tag.name}` };
107
+ const branch = refs.refs.find((r) => r.kind === "branch" && r.name === intent);
108
+ if (branch)
109
+ return { sha: branch.sha, resolved: `branch:${branch.name}` };
110
+ if (SHA_RE.test(intent)) {
111
+ const sha = intent.toLowerCase();
112
+ return { sha, resolved: `sha:${sha}` };
113
+ }
114
+ return { error: `intent '${intent}' matched no tag or branch on the remote` };
115
+ }
@@ -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,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W,CAAC;AAEtD,OAAO,EAAE,iBAAiB,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC7E,YAAY,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAErD,OAAO,EACL,sBAAsB,EACtB,sBAAsB,GACvB,MAAM,iBAAiB,CAAC;AACzB,YAAY,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AAExD,OAAO,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAEvD,OAAO,EACL,iBAAiB,EACjB,gBAAgB,EAChB,mBAAmB,EACnB,mBAAmB,EACnB,iBAAiB,EACjB,gBAAgB,GACjB,MAAM,cAAc,CAAC;AACtB,YAAY,EACV,QAAQ,EACR,QAAQ,EACR,kBAAkB,EAClB,eAAe,EACf,iBAAiB,EACjB,iBAAiB,EACjB,uBAAuB,GACxB,MAAM,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"}
@@ -7,13 +7,15 @@
7
7
  * for both `markspec lock` and `markspec compile --frozen`.
8
8
  */
9
9
  Object.defineProperty(exports, "__esModule", { value: true });
10
- exports.resolveUpstreams = exports.resolveRegistries = exports.resolveReferences = exports.resolveProfileChain = exports.resolveBoundEntries = exports.extractEdgeQuads = exports.extractEdgeLedger = exports.detectOfflineEdgeDrift = exports.hashCanonicalEdges = exports.canonicalEdgeJson = exports.sha256String = exports.sha256Bytes = exports.checkDrift = exports.isBelowFloor = exports.parseLockfile = exports.serializeLockfile = exports.LOCKFILE_SCHEMA_VERSION = void 0;
10
+ exports.resolveIntent = exports.parseLsRemote = exports.compileAcquiredTree = exports.resolveProjectDependencies = exports.upstreamCacheRoot = exports.resolveProjectReferences = exports.deriveUpstreamId = exports.resolveUpstreams = exports.resolveReferences = exports.resolveProfileChain = exports.resolveBoundEntries = exports.extractEdgeQuads = exports.extractEdgeLedger = exports.verifyUpstreamCache = exports.formatEdgeDriftMessage = exports.detectOfflineEdgeDrift = exports.hashCanonicalEdges = exports.canonicalEdgeJson = exports.sha256String = exports.sha256Bytes = exports.checkDrift = exports.isBelowFloor = exports.dependencyPinAssurance = exports.parseLockfile = exports.serializeLockfile = exports.LOCKFILE_SCHEMA_VERSION = void 0;
11
11
  var model_js_1 = require("./model.js");
12
12
  Object.defineProperty(exports, "LOCKFILE_SCHEMA_VERSION", { enumerable: true, get: function () { return model_js_1.LOCKFILE_SCHEMA_VERSION; } });
13
13
  var serializer_js_1 = require("./serializer.js");
14
14
  Object.defineProperty(exports, "serializeLockfile", { enumerable: true, get: function () { return serializer_js_1.serializeLockfile; } });
15
15
  var parser_js_1 = require("./parser.js");
16
16
  Object.defineProperty(exports, "parseLockfile", { enumerable: true, get: function () { return parser_js_1.parseLockfile; } });
17
+ var pin_assurance_js_1 = require("./pin_assurance.js");
18
+ Object.defineProperty(exports, "dependencyPinAssurance", { enumerable: true, get: function () { return pin_assurance_js_1.dependencyPinAssurance; } });
17
19
  var compare_js_1 = require("./compare.js");
18
20
  Object.defineProperty(exports, "isBelowFloor", { enumerable: true, get: function () { return compare_js_1.isBelowFloor; } });
19
21
  var check_js_1 = require("./check.js");
@@ -26,11 +28,24 @@ Object.defineProperty(exports, "canonicalEdgeJson", { enumerable: true, get: fun
26
28
  Object.defineProperty(exports, "hashCanonicalEdges", { enumerable: true, get: function () { return canonical_edges_js_1.hashCanonicalEdges; } });
27
29
  var edge_drift_js_1 = require("./edge_drift.js");
28
30
  Object.defineProperty(exports, "detectOfflineEdgeDrift", { enumerable: true, get: function () { return edge_drift_js_1.detectOfflineEdgeDrift; } });
31
+ Object.defineProperty(exports, "formatEdgeDriftMessage", { enumerable: true, get: function () { return edge_drift_js_1.formatEdgeDriftMessage; } });
32
+ var cache_check_js_1 = require("./cache_check.js");
33
+ Object.defineProperty(exports, "verifyUpstreamCache", { enumerable: true, get: function () { return cache_check_js_1.verifyUpstreamCache; } });
29
34
  var resolve_js_1 = require("./resolve.js");
30
35
  Object.defineProperty(exports, "extractEdgeLedger", { enumerable: true, get: function () { return resolve_js_1.extractEdgeLedger; } });
31
36
  Object.defineProperty(exports, "extractEdgeQuads", { enumerable: true, get: function () { return resolve_js_1.extractEdgeQuads; } });
32
37
  Object.defineProperty(exports, "resolveBoundEntries", { enumerable: true, get: function () { return resolve_js_1.resolveBoundEntries; } });
33
38
  Object.defineProperty(exports, "resolveProfileChain", { enumerable: true, get: function () { return resolve_js_1.resolveProfileChain; } });
34
39
  Object.defineProperty(exports, "resolveReferences", { enumerable: true, get: function () { return resolve_js_1.resolveReferences; } });
35
- Object.defineProperty(exports, "resolveRegistries", { enumerable: true, get: function () { return resolve_js_1.resolveRegistries; } });
36
40
  Object.defineProperty(exports, "resolveUpstreams", { enumerable: true, get: function () { return resolve_js_1.resolveUpstreams; } });
41
+ var upstream_refs_js_1 = require("./upstream_refs.js");
42
+ Object.defineProperty(exports, "deriveUpstreamId", { enumerable: true, get: function () { return upstream_refs_js_1.deriveUpstreamId; } });
43
+ Object.defineProperty(exports, "resolveProjectReferences", { enumerable: true, get: function () { return upstream_refs_js_1.resolveProjectReferences; } });
44
+ Object.defineProperty(exports, "upstreamCacheRoot", { enumerable: true, get: function () { return upstream_refs_js_1.upstreamCacheRoot; } });
45
+ var upstream_deps_js_1 = require("./upstream_deps.js");
46
+ Object.defineProperty(exports, "resolveProjectDependencies", { enumerable: true, get: function () { return upstream_deps_js_1.resolveProjectDependencies; } });
47
+ var acquire_compile_js_1 = require("./acquire_compile.js");
48
+ Object.defineProperty(exports, "compileAcquiredTree", { enumerable: true, get: function () { return acquire_compile_js_1.compileAcquiredTree; } });
49
+ var git_intent_js_1 = require("./git_intent.js");
50
+ Object.defineProperty(exports, "parseLsRemote", { enumerable: true, get: function () { return git_intent_js_1.parseLsRemote; } });
51
+ Object.defineProperty(exports, "resolveIntent", { enumerable: true, get: function () { return git_intent_js_1.resolveIntent; } });
@@ -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 b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,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,iEAAiE;IACjE,QAAQ,CAAC,SAAS,CAAC,EAAE,iBAAiB,CAAC;CACxC;AAED,gCAAgC;AAChC,MAAM,WAAW,QAAQ;IACvB,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,IAAI,EAAE,YAAY,CAAC;IAC5B,QAAQ,CAAC,SAAS,EAAE,SAAS,QAAQ,EAAE,CAAC;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"}
@@ -135,12 +135,44 @@ function parseLockfile(toml) {
135
135
  resolvedManifestHash === undefined || markspecSchemaN === undefined) {
136
136
  return diag("MSL-L001", `[[upstream.registry]] entry ${i}: missing required field 'id', 'api', 'resolved-manifest-hash', or 'markspec-schema'`);
137
137
  }
138
+ const version = reg.version;
139
+ const snapshot = reg.snapshot;
140
+ const lockedAt = reg["locked-at"];
138
141
  upstreams.push({
139
142
  kind: "registry",
140
143
  id,
141
144
  api,
142
145
  resolvedManifestHash,
143
146
  markspecSchema: markspecSchemaN,
147
+ ...(version !== undefined ? { version } : {}),
148
+ ...(snapshot !== undefined ? { snapshot } : {}),
149
+ ...(lockedAt !== undefined ? { lockedAt } : {}),
150
+ });
151
+ }
152
+ const deps = upstreamRoot.dependency ?? [];
153
+ for (let i = 0; i < deps.length; i++) {
154
+ const dep = deps[i];
155
+ const id = requireString(dep, "id");
156
+ const url = requireString(dep, "url");
157
+ const intent = requireString(dep, "intent");
158
+ const resolved = requireString(dep, "resolved");
159
+ const sha = requireString(dep, "sha");
160
+ const snapshot = requireString(dep, "snapshot");
161
+ const lockedAt = requireString(dep, "locked-at");
162
+ if (id === undefined || url === undefined || intent === undefined ||
163
+ resolved === undefined || sha === undefined ||
164
+ snapshot === undefined || lockedAt === undefined) {
165
+ return diag("MSL-L001", `[[upstream.dependency]] entry ${i}: missing required field 'id', 'url', 'intent', 'resolved', 'sha', 'snapshot', or 'locked-at'`);
166
+ }
167
+ upstreams.push({
168
+ kind: "dependency",
169
+ id,
170
+ url,
171
+ intent,
172
+ resolved,
173
+ sha,
174
+ snapshot,
175
+ lockedAt,
144
176
  });
145
177
  }
146
178
  }
@@ -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,37 @@
1
+ "use strict";
2
+ /**
3
+ * @module core/lock/pin_assurance
4
+ *
5
+ * Release-assurance advisory for federated dependencies (design §4.4). Every
6
+ * `[[upstream.dependency]]` pin that resolved to a branch or bare sha (rather
7
+ * than a tag) is an "unreleased" pin. Below `check --strict` this is a gentle
8
+ * project-level advisory; `check --strict` promotes the warning to an error,
9
+ * making it the release gate — you cannot release against a dependency that
10
+ * never baselined. Pure.
11
+ */
12
+ Object.defineProperty(exports, "__esModule", { value: true });
13
+ exports.dependencyPinAssurance = dependencyPinAssurance;
14
+ /**
15
+ * Emit one `MSL-L215` warning per `[[upstream.dependency]]` row whose
16
+ * `resolved` value is not a tag pin (`branch:*` or `sha:*`). Returns an
17
+ * empty array for an all-tag lockfile or an undefined lockfile (no
18
+ * `markspec.lock` present).
19
+ */
20
+ function dependencyPinAssurance(lockfile) {
21
+ if (!lockfile)
22
+ return [];
23
+ const out = [];
24
+ for (const u of lockfile.upstreams) {
25
+ if (u.kind !== "dependency")
26
+ continue;
27
+ if (u.resolved.startsWith("tag:"))
28
+ continue;
29
+ out.push({
30
+ code: "MSL-L215",
31
+ severity: "warning",
32
+ 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}'`,
33
+ location: undefined,
34
+ });
35
+ }
36
+ return out;
37
+ }
@@ -11,7 +11,7 @@
11
11
  */
12
12
  import type { Diagnostic, Entry, ProfileChain, ProjectConfig } from "../model/mod.js";
13
13
  import type { Mapping } from "../sync/mod.js";
14
- import type { BoundEntry, LockEdge, UpstreamProfile, UpstreamReference, UpstreamRegistry } from "./model.js";
14
+ import type { BoundEntry, LockEdge, UpstreamProfile, UpstreamReference } from "./model.js";
15
15
  import { type EdgeQuad } from "./canonical_edges.js";
16
16
  /**
17
17
  * Callback to fetch a URL. Returns the bytes on success, or an
@@ -57,11 +57,6 @@ export interface ResolvedProfile {
57
57
  readonly upstream: UpstreamProfile;
58
58
  readonly diagnostics: readonly Diagnostic[];
59
59
  }
60
- /** A federated registry that resolved. */
61
- export interface ResolvedRegistry {
62
- readonly upstream: UpstreamRegistry;
63
- readonly diagnostics: readonly Diagnostic[];
64
- }
65
60
  /** A bound entry's locked-attribute snapshot. */
66
61
  export interface ResolvedBoundEntry {
67
62
  readonly boundEntry: BoundEntry;
@@ -71,7 +66,6 @@ export interface ResolvedBoundEntry {
71
66
  export interface ResolvedUpstreams {
72
67
  readonly references: readonly ResolvedReference[];
73
68
  readonly profiles: readonly ResolvedProfile[];
74
- readonly registries: readonly ResolvedRegistry[];
75
69
  readonly boundEntries: readonly ResolvedBoundEntry[];
76
70
  /** sha256:* of the canonical edge serialization. */
77
71
  readonly canonicalEdgeHash: string;
@@ -117,11 +111,14 @@ export declare function extractEdgeQuads(entries: readonly Entry[]): EdgeQuad[];
117
111
  export declare function extractEdgeLedger(entries: readonly Entry[], byDisplayId: ReadonlyMap<string, Entry>, byId: ReadonlyMap<string, Entry>): LockEdge[];
118
112
  /**
119
113
  * Resolve every upstream the lockfile needs: References, profile chain
120
- * tiers, federated registries, and bound entries. Computes the
121
- * canonical edge hash from the same entry set. Returns the aggregate
122
- * `ResolvedUpstreams` payload ready for {@link serializeLockfile}.
114
+ * tiers, and bound entries. Computes the canonical edge hash from the
115
+ * same entry set. Returns the aggregate `ResolvedUpstreams` payload
116
+ * ready for {@link serializeLockfile}. Federated registry rows (org
117
+ * `references:`) are resolved separately by
118
+ * {@linkcode resolveProjectReferences} in `upstream_refs.ts` — the CLI
119
+ * composes both into the final lockfile's `upstreams` list.
123
120
  *
124
- * The four sub-resolvers run sequentially (not concurrently) because
121
+ * The sub-resolvers run sequentially (not concurrently) because
125
122
  * (a) the callbacks they share — `fetchUrl`, `readFile` — may themselves
126
123
  * serialize work, and (b) the diagnostics output is easier to reason
127
124
  * about with a deterministic order. Wrap inside `Promise.all` only when
@@ -139,12 +136,6 @@ export declare function resolveUpstreams(opts: ResolveUpstreamsOptions): Promise
139
136
  * the previous tier's id. The root tier has `extends: undefined`.
140
137
  */
141
138
  export declare function resolveProfileChain(chain: ProfileChain | readonly never[], readFile: ReadFile): Promise<ResolvedProfile[]>;
142
- /**
143
- * Resolve federated parent registries (and the fallback, when not already
144
- * listed). Each URL's `<url>/manifest` is fetched; the body is parsed
145
- * loosely for `markspec-schema` (defaults to 1 on parse failure).
146
- */
147
- export declare function resolveRegistries(config: ProjectConfig, fetchUrl: FetchUrl): Promise<ResolvedRegistry[]>;
148
139
  /**
149
140
  * Resolve every entry carrying `External-id:` attributes into a
150
141
  * `ResolvedBoundEntry`. For each External-id, look up the mapping by
@@ -1 +1 @@
1
- {"version":3,"file":"resolve.d.ts","sourceRoot":"","sources":["../../src/lock/resolve.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,KAAK,EACV,UAAU,EACV,KAAK,EACL,YAAY,EAEZ,aAAa,EACd,MAAM,iBAAiB,CAAC;AAMzB,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC;AAE9C,OAAO,KAAK,EACV,UAAU,EAEV,QAAQ,EACR,eAAe,EACf,iBAAiB,EACjB,gBAAgB,EACjB,MAAM,YAAY,CAAC;AAEpB,OAAO,EAAE,KAAK,QAAQ,EAAsB,MAAM,sBAAsB,CAAC;AAEzE;;;;;GAKG;AACH,MAAM,MAAM,QAAQ,GAAG,CACrB,GAAG,EAAE,MAAM,KACR,OAAO,CAAC,UAAU,GAAG;IAAE,KAAK,EAAE,MAAM,CAAA;CAAE,CAAC,CAAC;AAE7C;;;;;GAKG;AACH,MAAM,MAAM,QAAQ,GAAG,CACrB,IAAI,EAAE,MAAM,KACT,OAAO,CAAC,UAAU,GAAG;IAAE,KAAK,EAAE,MAAM,CAAA;CAAE,CAAC,CAAC;AAE7C,8CAA8C;AAC9C,MAAM,WAAW,uBAAuB;IACtC,QAAQ,CAAC,OAAO,EAAE,SAAS,KAAK,EAAE,CAAC;IACnC;;;;OAIG;IACH,QAAQ,CAAC,YAAY,EAAE,YAAY,GAAG,SAAS,KAAK,EAAE,CAAC;IACvD,QAAQ,CAAC,MAAM,EAAE,aAAa,CAAC;IAC/B,QAAQ,CAAC,QAAQ,EAAE,SAAS,OAAO,EAAE,CAAC;IACtC,QAAQ,CAAC,QAAQ,EAAE,QAAQ,CAAC;IAC5B,QAAQ,CAAC,QAAQ,EAAE,QAAQ,CAAC;IAC5B,gFAAgF;IAChF,QAAQ,CAAC,GAAG,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AAE,uBAAuB,GAC5B,OAAO,CAAC,iBAAiB,CAAC,CAwC5B;AAmCD;;;;;;;;;GASG;AACH,wBAAsB,mBAAmB,CACvC,KAAK,EAAE,YAAY,GAAG,SAAS,KAAK,EAAE,EACtC,QAAQ,EAAE,QAAQ,GACjB,OAAO,CAAC,eAAe,EAAE,CAAC,CAkC5B;AAMD;;;;;;;;;;GAUG;AACH,wBAAsB,mBAAmB,CACvC,OAAO,EAAE,SAAS,KAAK,EAAE,EACzB,QAAQ,EAAE,SAAS,OAAO,EAAE,GAC3B,OAAO,CAAC,kBAAkB,EAAE,CAAC,CAuD/B"}
@@ -16,7 +16,6 @@ exports.extractEdgeQuads = extractEdgeQuads;
16
16
  exports.extractEdgeLedger = extractEdgeLedger;
17
17
  exports.resolveUpstreams = resolveUpstreams;
18
18
  exports.resolveProfileChain = resolveProfileChain;
19
- exports.resolveRegistries = resolveRegistries;
20
19
  exports.resolveBoundEntries = resolveBoundEntries;
21
20
  const mod_js_1 = require("../model/mod.js");
22
21
  const locked_attributes_js_1 = require("../sync/locked_attributes.js");
@@ -179,11 +178,14 @@ function extractEdgeLedger(entries, byDisplayId, byId) {
179
178
  }
180
179
  /**
181
180
  * Resolve every upstream the lockfile needs: References, profile chain
182
- * tiers, federated registries, and bound entries. Computes the
183
- * canonical edge hash from the same entry set. Returns the aggregate
184
- * `ResolvedUpstreams` payload ready for {@link serializeLockfile}.
181
+ * tiers, and bound entries. Computes the canonical edge hash from the
182
+ * same entry set. Returns the aggregate `ResolvedUpstreams` payload
183
+ * ready for {@link serializeLockfile}. Federated registry rows (org
184
+ * `references:`) are resolved separately by
185
+ * {@linkcode resolveProjectReferences} in `upstream_refs.ts` — the CLI
186
+ * composes both into the final lockfile's `upstreams` list.
185
187
  *
186
- * The four sub-resolvers run sequentially (not concurrently) because
188
+ * The sub-resolvers run sequentially (not concurrently) because
187
189
  * (a) the callbacks they share — `fetchUrl`, `readFile` — may themselves
188
190
  * serialize work, and (b) the diagnostics output is easier to reason
189
191
  * about with a deterministic order. Wrap inside `Promise.all` only when
@@ -194,7 +196,6 @@ async function resolveUpstreams(opts) {
194
196
  const lockedAt = now.toISOString();
195
197
  const refResults = await resolveReferences(opts.entries, opts.fetchUrl);
196
198
  const profResults = await resolveProfileChain(opts.profileChain, opts.readFile);
197
- const regResults = await resolveRegistries(opts.config, opts.fetchUrl);
198
199
  const boundResults = await resolveBoundEntries(opts.entries, opts.mappings);
199
200
  const edges = extractEdgeQuads(opts.entries);
200
201
  const canonicalEdgeHash = await (0, canonical_edges_js_1.hashCanonicalEdges)(edges);
@@ -212,13 +213,11 @@ async function resolveUpstreams(opts) {
212
213
  const diagnostics = [
213
214
  ...refResults.flatMap((r) => r.diagnostics),
214
215
  ...profResults.flatMap((r) => r.diagnostics),
215
- ...regResults.flatMap((r) => r.diagnostics),
216
216
  ...boundResults.flatMap((r) => r.diagnostics),
217
217
  ];
218
218
  return {
219
219
  references: refResults,
220
220
  profiles: profResults,
221
- registries: regResults,
222
221
  boundEntries: boundResults,
223
222
  canonicalEdgeHash,
224
223
  canonicalEdgeCount: edges.length,
@@ -305,66 +304,6 @@ async function resolveProfileChain(chain, readFile) {
305
304
  return out;
306
305
  }
307
306
  // ---------------------------------------------------------------------------
308
- // Registry resolution (Task 16)
309
- // ---------------------------------------------------------------------------
310
- /**
311
- * Resolve federated parent registries (and the fallback, when not already
312
- * listed). Each URL's `<url>/manifest` is fetched; the body is parsed
313
- * loosely for `markspec-schema` (defaults to 1 on parse failure).
314
- */
315
- async function resolveRegistries(config, fetchUrl) {
316
- const urls = [...config.parents];
317
- if (config.parentFallback && !urls.includes(config.parentFallback)) {
318
- urls.push(config.parentFallback);
319
- }
320
- const out = [];
321
- for (const url of urls) {
322
- const manifestUrl = url.endsWith("/")
323
- ? `${url}manifest`
324
- : `${url}/manifest`;
325
- const fetched = await fetchUrl(manifestUrl);
326
- if (fetched instanceof Uint8Array) {
327
- const hash = await (0, hash_js_1.sha256Bytes)(fetched);
328
- let markspecSchema = 1;
329
- try {
330
- const parsed = JSON.parse(new TextDecoder().decode(fetched));
331
- if (typeof parsed["markspec-schema"] === "number") {
332
- markspecSchema = parsed["markspec-schema"];
333
- }
334
- }
335
- catch { /* leave default */ }
336
- out.push({
337
- upstream: {
338
- kind: "registry",
339
- id: `urn:markspec:registry:${url}`,
340
- api: url,
341
- resolvedManifestHash: hash,
342
- markspecSchema,
343
- },
344
- diagnostics: [],
345
- });
346
- }
347
- else {
348
- out.push({
349
- upstream: {
350
- kind: "registry",
351
- id: `urn:markspec:registry:${url}`,
352
- api: url,
353
- resolvedManifestHash: "sha256:0",
354
- markspecSchema: 1,
355
- },
356
- diagnostics: [{
357
- code: "MSL-L101",
358
- severity: "warning",
359
- message: `Failed to fetch registry manifest from ${manifestUrl}: ${fetched.error}`,
360
- location: undefined,
361
- }],
362
- });
363
- }
364
- }
365
- return out;
366
- }
367
- // ---------------------------------------------------------------------------
368
307
  // Bound-entry resolution (Task 17)
369
308
  // ---------------------------------------------------------------------------
370
309
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"serializer.d.ts","sourceRoot":"","sources":["../../src/lock/serializer.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,KAAK,EAEV,QAAQ,EAIT,MAAM,YAAY,CAAC;AAOpB,8DAA8D;AAC9D,wBAAgB,iBAAiB,CAAC,EAAE,EAAE,QAAQ,GAAG,MAAM,CAuGtD"}
1
+ {"version":3,"file":"serializer.d.ts","sourceRoot":"","sources":["../../src/lock/serializer.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,KAAK,EAEV,QAAQ,EAKT,MAAM,YAAY,CAAC;AAOpB,8DAA8D;AAC9D,wBAAgB,iBAAiB,CAAC,EAAE,EAAE,QAAQ,GAAG,MAAM,CA+HtD"}
@@ -69,6 +69,29 @@ function serializeLockfile(lf) {
69
69
  parts.push(`api = ${tomlString(r.api)}\n`);
70
70
  parts.push(`resolved-manifest-hash = ${tomlString(r.resolvedManifestHash)}\n`);
71
71
  parts.push(`markspec-schema = ${r.markspecSchema}\n`);
72
+ if (r.version !== undefined) {
73
+ parts.push(`version = ${tomlString(r.version)}\n`);
74
+ }
75
+ if (r.snapshot !== undefined) {
76
+ parts.push(`snapshot = ${tomlString(r.snapshot)}\n`);
77
+ }
78
+ if (r.lockedAt !== undefined) {
79
+ parts.push(`locked-at = ${tomlString(r.lockedAt)}\n`);
80
+ }
81
+ }
82
+ const deps = lf.upstreams
83
+ .filter((u) => u.kind === "dependency")
84
+ .slice()
85
+ .sort((a, b) => a.id.localeCompare(b.id));
86
+ for (const d of deps) {
87
+ parts.push("\n[[upstream.dependency]]\n");
88
+ parts.push(`id = ${tomlString(d.id)}\n`);
89
+ parts.push(`url = ${tomlString(d.url)}\n`);
90
+ parts.push(`intent = ${tomlString(d.intent)}\n`);
91
+ parts.push(`resolved = ${tomlString(d.resolved)}\n`);
92
+ parts.push(`sha = ${tomlString(d.sha)}\n`);
93
+ parts.push(`snapshot = ${tomlString(d.snapshot)}\n`);
94
+ parts.push(`locked-at = ${tomlString(d.lockedAt)}\n`);
72
95
  }
73
96
  const bounds = lf.boundEntries.slice().sort((a, b) => a.displayId.localeCompare(b.displayId));
74
97
  for (const be of bounds) {
@@ -0,0 +1,29 @@
1
+ /**
2
+ * @module core/lock/upstream_common
3
+ *
4
+ * Primitives shared by the two lock-mediated upstream acquirers —
5
+ * `upstream_refs.ts` (published `references:` snapshots) and
6
+ * `upstream_deps.ts` (git `dependencies:` trees). Both emit the same
7
+ * MSL-L213 "could not be locked" warning (differing only by the noun) and
8
+ * write a `[path, bytes][]` cache batch with identical error handling, so
9
+ * the primitive lives here once rather than duplicated in each module.
10
+ */
11
+ import type { Diagnostic } from "../model/mod.js";
12
+ /** The two upstream kinds, used only to word the shared MSL-L213 message. */
13
+ export type UpstreamNoun = "reference" | "dependency";
14
+ /**
15
+ * Warn-and-write diagnostic (design §4.2, decision 1): one upstream could
16
+ * not be locked. Identical shape for both kinds — `noun` selects the word.
17
+ */
18
+ export declare function upstreamNotLockable(noun: UpstreamNoun, id: string, detail: string): Diagnostic;
19
+ /**
20
+ * Write a batch of `[absolutePath, bytes]` cache files via the injected
21
+ * `writeFile` (which creates parent directories). Returns an MSL-L213
22
+ * warning naming the clean `id` (never the raw path) on the first failure,
23
+ * or `undefined` when every write succeeds. Shared by both acquirers' cache
24
+ * writers so a cache-write-failure message is worded identically.
25
+ */
26
+ export declare function writeCacheFiles(writes: ReadonlyArray<readonly [string, Uint8Array]>, noun: UpstreamNoun, id: string, writeFile: (path: string, bytes: Uint8Array) => Promise<{
27
+ error?: string;
28
+ }>): Promise<Diagnostic | undefined>;
29
+ //# sourceMappingURL=upstream_common.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"upstream_common.d.ts","sourceRoot":"","sources":["../../src/lock/upstream_common.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAElD,6EAA6E;AAC7E,MAAM,MAAM,YAAY,GAAG,WAAW,GAAG,YAAY,CAAC;AAEtD;;;GAGG;AACH,wBAAgB,mBAAmB,CACjC,IAAI,EAAE,YAAY,EAClB,EAAE,EAAE,MAAM,EACV,MAAM,EAAE,MAAM,GACb,UAAU,CAOZ;AAED;;;;;;GAMG;AACH,wBAAsB,eAAe,CACnC,MAAM,EAAE,aAAa,CAAC,SAAS,CAAC,MAAM,EAAE,UAAU,CAAC,CAAC,EACpD,IAAI,EAAE,YAAY,EAClB,EAAE,EAAE,MAAM,EACV,SAAS,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,UAAU,KAAK,OAAO,CAAC;IAAE,KAAK,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC,GAC1E,OAAO,CAAC,UAAU,GAAG,SAAS,CAAC,CAYjC"}