@driftsys/markspec 0.10.3 → 0.11.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 (376) hide show
  1. package/README.md +2 -2
  2. package/esm/compiler/deserialize.d.ts +49 -0
  3. package/esm/compiler/deserialize.d.ts.map +1 -0
  4. package/esm/compiler/deserialize.js +139 -0
  5. package/esm/compiler/manifest.d.ts +3 -0
  6. package/esm/compiler/manifest.d.ts.map +1 -1
  7. package/esm/compiler/manifest.js +9 -3
  8. package/esm/compiler/mod.d.ts.map +1 -1
  9. package/esm/compiler/mod.js +16 -7
  10. package/esm/config/markspec.d.ts +38 -1
  11. package/esm/config/markspec.d.ts.map +1 -1
  12. package/esm/config/markspec.js +127 -2
  13. package/esm/config/mod.d.ts.map +1 -1
  14. package/esm/config/mod.js +143 -147
  15. package/esm/decl/duplicates.d.ts +29 -0
  16. package/esm/decl/duplicates.d.ts.map +1 -0
  17. package/esm/decl/duplicates.js +28 -0
  18. package/esm/decl/mod.d.ts +4 -2
  19. package/esm/decl/mod.d.ts.map +1 -1
  20. package/esm/decl/mod.js +2 -1
  21. package/esm/decl/surfaces.d.ts +29 -7
  22. package/esm/decl/surfaces.d.ts.map +1 -1
  23. package/esm/decl/surfaces.js +31 -18
  24. package/esm/gates/mod.d.ts +13 -2
  25. package/esm/gates/mod.d.ts.map +1 -1
  26. package/esm/gates/mod.js +38 -11
  27. package/esm/lint/runner.d.ts.map +1 -1
  28. package/esm/lint/runner.js +3 -1
  29. package/esm/lock/acquire_compile.d.ts +31 -0
  30. package/esm/lock/acquire_compile.d.ts.map +1 -0
  31. package/esm/lock/acquire_compile.js +83 -0
  32. package/esm/lock/cache_check.d.ts +28 -0
  33. package/esm/lock/cache_check.d.ts.map +1 -0
  34. package/esm/lock/cache_check.js +51 -0
  35. package/esm/lock/check.d.ts +14 -3
  36. package/esm/lock/check.d.ts.map +1 -1
  37. package/esm/lock/check.js +41 -3
  38. package/esm/lock/git_intent.d.ts +46 -0
  39. package/esm/lock/git_intent.d.ts.map +1 -0
  40. package/esm/lock/git_intent.js +111 -0
  41. package/esm/lock/mod.d.ts +10 -3
  42. package/esm/lock/mod.d.ts.map +1 -1
  43. package/esm/lock/mod.js +7 -1
  44. package/esm/lock/model.d.ts +24 -1
  45. package/esm/lock/model.d.ts.map +1 -1
  46. package/esm/lock/parser.d.ts.map +1 -1
  47. package/esm/lock/parser.js +32 -0
  48. package/esm/lock/pin_assurance.d.ts +20 -0
  49. package/esm/lock/pin_assurance.d.ts.map +1 -0
  50. package/esm/lock/pin_assurance.js +34 -0
  51. package/esm/lock/resolve.d.ts +8 -17
  52. package/esm/lock/resolve.d.ts.map +1 -1
  53. package/esm/lock/resolve.js +7 -67
  54. package/esm/lock/serializer.d.ts.map +1 -1
  55. package/esm/lock/serializer.js +23 -0
  56. package/esm/lock/upstream_common.d.ts +29 -0
  57. package/esm/lock/upstream_common.d.ts.map +1 -0
  58. package/esm/lock/upstream_common.js +38 -0
  59. package/esm/lock/upstream_deps.d.ts +63 -0
  60. package/esm/lock/upstream_deps.d.ts.map +1 -0
  61. package/esm/lock/upstream_deps.js +172 -0
  62. package/esm/lock/upstream_refs.d.ts +69 -0
  63. package/esm/lock/upstream_refs.d.ts.map +1 -0
  64. package/esm/lock/upstream_refs.js +238 -0
  65. package/esm/mod.d.ts +16 -8
  66. package/esm/mod.d.ts.map +1 -1
  67. package/esm/mod.js +15 -5
  68. package/esm/model/mod.d.ts +93 -28
  69. package/esm/model/mod.d.ts.map +1 -1
  70. package/esm/model/mod.js +66 -13
  71. package/esm/model/profile.d.ts +13 -0
  72. package/esm/model/profile.d.ts.map +1 -1
  73. package/esm/parser/markdown.d.ts.map +1 -1
  74. package/esm/parser/markdown.js +7 -51
  75. package/esm/profile/manifest.d.ts.map +1 -1
  76. package/esm/profile/manifest.js +20 -3
  77. package/esm/profile/merge.js +7 -0
  78. package/esm/reporter/mod.d.ts +11 -0
  79. package/esm/reporter/mod.d.ts.map +1 -1
  80. package/esm/reporter/mod.js +19 -8
  81. package/esm/typl/assemble.d.ts +53 -0
  82. package/esm/typl/assemble.d.ts.map +1 -0
  83. package/esm/typl/assemble.js +238 -0
  84. package/esm/typl/ast.d.ts +7 -1
  85. package/esm/typl/ast.d.ts.map +1 -1
  86. package/esm/typl/ast.js +3 -0
  87. package/esm/typl/bullet.d.ts +9 -7
  88. package/esm/typl/bullet.d.ts.map +1 -1
  89. package/esm/typl/bullet.js +6 -4
  90. package/esm/typl/citations.d.ts +27 -0
  91. package/esm/typl/citations.d.ts.map +1 -0
  92. package/esm/typl/citations.js +16 -0
  93. package/esm/typl/diagnostics.d.ts +2 -2
  94. package/esm/typl/diagnostics.d.ts.map +1 -1
  95. package/esm/typl/diagnostics.js +18 -0
  96. package/esm/typl/grammar.d.ts.map +1 -1
  97. package/esm/typl/grammar.js +6 -0
  98. package/esm/typl/lexer.d.ts.map +1 -1
  99. package/esm/typl/lexer.js +25 -4
  100. package/esm/typl/mod.d.ts +8 -2
  101. package/esm/typl/mod.d.ts.map +1 -1
  102. package/esm/typl/mod.js +5 -1
  103. package/esm/typl/recognize.js +2 -2
  104. package/esm/typl/registry.d.ts +1 -1
  105. package/esm/typl/resolve.d.ts +31 -0
  106. package/esm/typl/resolve.d.ts.map +1 -0
  107. package/esm/typl/resolve.js +27 -0
  108. package/esm/typl/table.d.ts +52 -0
  109. package/esm/typl/table.d.ts.map +1 -0
  110. package/esm/typl/table.js +69 -0
  111. package/esm/typl/validator.d.ts +24 -5
  112. package/esm/typl/validator.d.ts.map +1 -1
  113. package/esm/typl/validator.js +55 -75
  114. package/esm/upstream/mod.d.ts +45 -0
  115. package/esm/upstream/mod.d.ts.map +1 -0
  116. package/esm/upstream/mod.js +98 -0
  117. package/esm/upstream/project.d.ts +33 -0
  118. package/esm/upstream/project.d.ts.map +1 -0
  119. package/esm/upstream/project.js +38 -0
  120. package/esm/upstream/refs.d.ts +23 -0
  121. package/esm/upstream/refs.d.ts.map +1 -0
  122. package/esm/upstream/refs.js +71 -0
  123. package/esm/util/paths.d.ts +14 -0
  124. package/esm/util/paths.d.ts.map +1 -0
  125. package/esm/util/paths.js +22 -0
  126. package/esm/uxil/assemble.d.ts +38 -0
  127. package/esm/uxil/assemble.d.ts.map +1 -0
  128. package/esm/uxil/assemble.js +268 -0
  129. package/esm/uxil/ast.d.ts +63 -0
  130. package/esm/uxil/ast.d.ts.map +1 -0
  131. package/esm/uxil/ast.js +9 -0
  132. package/esm/uxil/citations.d.ts +27 -0
  133. package/esm/uxil/citations.d.ts.map +1 -0
  134. package/esm/uxil/citations.js +25 -0
  135. package/esm/uxil/diagnostics.d.ts +39 -0
  136. package/esm/uxil/diagnostics.d.ts.map +1 -0
  137. package/esm/uxil/diagnostics.js +135 -0
  138. package/esm/uxil/grammar.d.ts +72 -0
  139. package/esm/uxil/grammar.d.ts.map +1 -0
  140. package/esm/uxil/grammar.js +505 -0
  141. package/esm/uxil/lexer.d.ts +23 -0
  142. package/esm/uxil/lexer.d.ts.map +1 -0
  143. package/esm/uxil/lexer.js +58 -0
  144. package/esm/uxil/mod.d.ts +32 -0
  145. package/esm/uxil/mod.d.ts.map +1 -0
  146. package/esm/uxil/mod.js +11 -0
  147. package/esm/uxil/projection.d.ts +40 -0
  148. package/esm/uxil/projection.d.ts.map +1 -0
  149. package/esm/uxil/projection.js +41 -0
  150. package/esm/uxil/recognize.d.ts +16 -0
  151. package/esm/uxil/recognize.d.ts.map +1 -0
  152. package/esm/uxil/recognize.js +28 -0
  153. package/esm/uxil/registry.d.ts +37 -0
  154. package/esm/uxil/registry.d.ts.map +1 -0
  155. package/esm/uxil/registry.js +29 -0
  156. package/esm/uxil/surfaces.d.ts +36 -0
  157. package/esm/uxil/surfaces.d.ts.map +1 -0
  158. package/esm/uxil/surfaces.js +34 -0
  159. package/esm/uxil/validator.d.ts +36 -0
  160. package/esm/uxil/validator.d.ts.map +1 -0
  161. package/esm/uxil/validator.js +139 -0
  162. package/esm/uxil/vocab.d.ts +33 -0
  163. package/esm/uxil/vocab.d.ts.map +1 -0
  164. package/esm/uxil/vocab.js +36 -0
  165. package/esm/validator/caption_convention.d.ts +2 -1
  166. package/esm/validator/caption_convention.d.ts.map +1 -1
  167. package/esm/validator/caption_convention.js +2 -1
  168. package/esm/validator/corpus.d.ts.map +1 -1
  169. package/esm/validator/corpus.js +40 -17
  170. package/esm/validator/discipline.d.ts +6 -4
  171. package/esm/validator/discipline.d.ts.map +1 -1
  172. package/esm/validator/discipline.js +6 -4
  173. package/esm/validator/mod.d.ts.map +1 -1
  174. package/esm/validator/mod.js +28 -15
  175. package/esm/validator/pipeline.d.ts +11 -1
  176. package/esm/validator/pipeline.d.ts.map +1 -1
  177. package/esm/validator/pipeline.js +68 -18
  178. package/esm/validator/trace_types.d.ts +9 -2
  179. package/esm/validator/trace_types.d.ts.map +1 -1
  180. package/esm/validator/trace_types.js +21 -5
  181. package/esm/validator/traceability.d.ts +15 -3
  182. package/esm/validator/traceability.d.ts.map +1 -1
  183. package/esm/validator/traceability.js +39 -4
  184. package/esm/validator/types.d.ts.map +1 -1
  185. package/esm/validator/types.js +11 -1
  186. package/esm/validator/uxil_family.d.ts +43 -0
  187. package/esm/validator/uxil_family.d.ts.map +1 -0
  188. package/esm/validator/uxil_family.js +52 -0
  189. package/package.json +1 -1
  190. package/script/compiler/deserialize.d.ts +49 -0
  191. package/script/compiler/deserialize.d.ts.map +1 -0
  192. package/script/compiler/deserialize.js +144 -0
  193. package/script/compiler/manifest.d.ts +3 -0
  194. package/script/compiler/manifest.d.ts.map +1 -1
  195. package/script/compiler/manifest.js +10 -3
  196. package/script/compiler/mod.d.ts.map +1 -1
  197. package/script/compiler/mod.js +15 -6
  198. package/script/config/markspec.d.ts +38 -1
  199. package/script/config/markspec.d.ts.map +1 -1
  200. package/script/config/markspec.js +129 -3
  201. package/script/config/mod.d.ts.map +1 -1
  202. package/script/config/mod.js +143 -147
  203. package/script/decl/duplicates.d.ts +29 -0
  204. package/script/decl/duplicates.d.ts.map +1 -0
  205. package/script/decl/duplicates.js +31 -0
  206. package/script/decl/mod.d.ts +4 -2
  207. package/script/decl/mod.d.ts.map +1 -1
  208. package/script/decl/mod.js +4 -2
  209. package/script/decl/surfaces.d.ts +29 -7
  210. package/script/decl/surfaces.d.ts.map +1 -1
  211. package/script/decl/surfaces.js +32 -19
  212. package/script/gates/mod.d.ts +13 -2
  213. package/script/gates/mod.d.ts.map +1 -1
  214. package/script/gates/mod.js +37 -10
  215. package/script/lint/runner.d.ts.map +1 -1
  216. package/script/lint/runner.js +3 -1
  217. package/script/lock/acquire_compile.d.ts +31 -0
  218. package/script/lock/acquire_compile.d.ts.map +1 -0
  219. package/script/lock/acquire_compile.js +86 -0
  220. package/script/lock/cache_check.d.ts +28 -0
  221. package/script/lock/cache_check.d.ts.map +1 -0
  222. package/script/lock/cache_check.js +54 -0
  223. package/script/lock/check.d.ts +14 -3
  224. package/script/lock/check.d.ts.map +1 -1
  225. package/script/lock/check.js +41 -3
  226. package/script/lock/git_intent.d.ts +46 -0
  227. package/script/lock/git_intent.d.ts.map +1 -0
  228. package/script/lock/git_intent.js +115 -0
  229. package/script/lock/mod.d.ts +10 -3
  230. package/script/lock/mod.d.ts.map +1 -1
  231. package/script/lock/mod.js +16 -2
  232. package/script/lock/model.d.ts +24 -1
  233. package/script/lock/model.d.ts.map +1 -1
  234. package/script/lock/parser.d.ts.map +1 -1
  235. package/script/lock/parser.js +32 -0
  236. package/script/lock/pin_assurance.d.ts +20 -0
  237. package/script/lock/pin_assurance.d.ts.map +1 -0
  238. package/script/lock/pin_assurance.js +37 -0
  239. package/script/lock/resolve.d.ts +8 -17
  240. package/script/lock/resolve.d.ts.map +1 -1
  241. package/script/lock/resolve.js +7 -68
  242. package/script/lock/serializer.d.ts.map +1 -1
  243. package/script/lock/serializer.js +23 -0
  244. package/script/lock/upstream_common.d.ts +29 -0
  245. package/script/lock/upstream_common.d.ts.map +1 -0
  246. package/script/lock/upstream_common.js +42 -0
  247. package/script/lock/upstream_deps.d.ts +63 -0
  248. package/script/lock/upstream_deps.d.ts.map +1 -0
  249. package/script/lock/upstream_deps.js +175 -0
  250. package/script/lock/upstream_refs.d.ts +69 -0
  251. package/script/lock/upstream_refs.d.ts.map +1 -0
  252. package/script/lock/upstream_refs.js +244 -0
  253. package/script/mod.d.ts +16 -8
  254. package/script/mod.d.ts.map +1 -1
  255. package/script/mod.js +40 -7
  256. package/script/model/mod.d.ts +93 -28
  257. package/script/model/mod.d.ts.map +1 -1
  258. package/script/model/mod.js +70 -14
  259. package/script/model/profile.d.ts +13 -0
  260. package/script/model/profile.d.ts.map +1 -1
  261. package/script/parser/markdown.d.ts.map +1 -1
  262. package/script/parser/markdown.js +6 -50
  263. package/script/profile/manifest.d.ts.map +1 -1
  264. package/script/profile/manifest.js +20 -3
  265. package/script/profile/merge.js +7 -0
  266. package/script/reporter/mod.d.ts +11 -0
  267. package/script/reporter/mod.d.ts.map +1 -1
  268. package/script/reporter/mod.js +18 -7
  269. package/script/typl/assemble.d.ts +53 -0
  270. package/script/typl/assemble.d.ts.map +1 -0
  271. package/script/typl/assemble.js +241 -0
  272. package/script/typl/ast.d.ts +7 -1
  273. package/script/typl/ast.d.ts.map +1 -1
  274. package/script/typl/ast.js +3 -0
  275. package/script/typl/bullet.d.ts +9 -7
  276. package/script/typl/bullet.d.ts.map +1 -1
  277. package/script/typl/bullet.js +6 -4
  278. package/script/typl/citations.d.ts +27 -0
  279. package/script/typl/citations.d.ts.map +1 -0
  280. package/script/typl/citations.js +20 -0
  281. package/script/typl/diagnostics.d.ts +2 -2
  282. package/script/typl/diagnostics.d.ts.map +1 -1
  283. package/script/typl/diagnostics.js +18 -0
  284. package/script/typl/grammar.d.ts.map +1 -1
  285. package/script/typl/grammar.js +6 -0
  286. package/script/typl/lexer.d.ts.map +1 -1
  287. package/script/typl/lexer.js +25 -4
  288. package/script/typl/mod.d.ts +8 -2
  289. package/script/typl/mod.d.ts.map +1 -1
  290. package/script/typl/mod.js +14 -2
  291. package/script/typl/recognize.js +2 -2
  292. package/script/typl/registry.d.ts +1 -1
  293. package/script/typl/resolve.d.ts +31 -0
  294. package/script/typl/resolve.d.ts.map +1 -0
  295. package/script/typl/resolve.js +33 -0
  296. package/script/typl/table.d.ts +52 -0
  297. package/script/typl/table.d.ts.map +1 -0
  298. package/script/typl/table.js +75 -0
  299. package/script/typl/validator.d.ts +24 -5
  300. package/script/typl/validator.d.ts.map +1 -1
  301. package/script/typl/validator.js +55 -75
  302. package/script/upstream/mod.d.ts +45 -0
  303. package/script/upstream/mod.d.ts.map +1 -0
  304. package/script/upstream/mod.js +101 -0
  305. package/script/upstream/project.d.ts +33 -0
  306. package/script/upstream/project.d.ts.map +1 -0
  307. package/script/upstream/project.js +41 -0
  308. package/script/upstream/refs.d.ts +23 -0
  309. package/script/upstream/refs.d.ts.map +1 -0
  310. package/script/upstream/refs.js +74 -0
  311. package/script/util/paths.d.ts +14 -0
  312. package/script/util/paths.d.ts.map +1 -0
  313. package/script/util/paths.js +25 -0
  314. package/script/uxil/assemble.d.ts +38 -0
  315. package/script/uxil/assemble.d.ts.map +1 -0
  316. package/script/uxil/assemble.js +272 -0
  317. package/script/uxil/ast.d.ts +63 -0
  318. package/script/uxil/ast.d.ts.map +1 -0
  319. package/script/uxil/ast.js +10 -0
  320. package/script/uxil/citations.d.ts +27 -0
  321. package/script/uxil/citations.d.ts.map +1 -0
  322. package/script/uxil/citations.js +29 -0
  323. package/script/uxil/diagnostics.d.ts +39 -0
  324. package/script/uxil/diagnostics.d.ts.map +1 -0
  325. package/script/uxil/diagnostics.js +140 -0
  326. package/script/uxil/grammar.d.ts +72 -0
  327. package/script/uxil/grammar.d.ts.map +1 -0
  328. package/script/uxil/grammar.js +511 -0
  329. package/script/uxil/lexer.d.ts +23 -0
  330. package/script/uxil/lexer.d.ts.map +1 -0
  331. package/script/uxil/lexer.js +61 -0
  332. package/script/uxil/mod.d.ts +32 -0
  333. package/script/uxil/mod.d.ts.map +1 -0
  334. package/script/uxil/mod.js +37 -0
  335. package/script/uxil/projection.d.ts +40 -0
  336. package/script/uxil/projection.d.ts.map +1 -0
  337. package/script/uxil/projection.js +44 -0
  338. package/script/uxil/recognize.d.ts +16 -0
  339. package/script/uxil/recognize.d.ts.map +1 -0
  340. package/script/uxil/recognize.js +31 -0
  341. package/script/uxil/registry.d.ts +37 -0
  342. package/script/uxil/registry.d.ts.map +1 -0
  343. package/script/uxil/registry.js +32 -0
  344. package/script/uxil/surfaces.d.ts +36 -0
  345. package/script/uxil/surfaces.d.ts.map +1 -0
  346. package/script/uxil/surfaces.js +39 -0
  347. package/script/uxil/validator.d.ts +36 -0
  348. package/script/uxil/validator.d.ts.map +1 -0
  349. package/script/uxil/validator.js +142 -0
  350. package/script/uxil/vocab.d.ts +33 -0
  351. package/script/uxil/vocab.d.ts.map +1 -0
  352. package/script/uxil/vocab.js +41 -0
  353. package/script/validator/caption_convention.d.ts +2 -1
  354. package/script/validator/caption_convention.d.ts.map +1 -1
  355. package/script/validator/caption_convention.js +2 -1
  356. package/script/validator/corpus.d.ts.map +1 -1
  357. package/script/validator/corpus.js +39 -16
  358. package/script/validator/discipline.d.ts +6 -4
  359. package/script/validator/discipline.d.ts.map +1 -1
  360. package/script/validator/discipline.js +6 -4
  361. package/script/validator/mod.d.ts.map +1 -1
  362. package/script/validator/mod.js +27 -14
  363. package/script/validator/pipeline.d.ts +11 -1
  364. package/script/validator/pipeline.d.ts.map +1 -1
  365. package/script/validator/pipeline.js +67 -17
  366. package/script/validator/trace_types.d.ts +9 -2
  367. package/script/validator/trace_types.d.ts.map +1 -1
  368. package/script/validator/trace_types.js +20 -4
  369. package/script/validator/traceability.d.ts +15 -3
  370. package/script/validator/traceability.d.ts.map +1 -1
  371. package/script/validator/traceability.js +38 -3
  372. package/script/validator/types.d.ts.map +1 -1
  373. package/script/validator/types.js +10 -0
  374. package/script/validator/uxil_family.d.ts +43 -0
  375. package/script/validator/uxil_family.d.ts.map +1 -0
  376. package/script/validator/uxil_family.js +56 -0
@@ -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,EAAE,EAAE,MAAM,CAAC;IACpB,4DAA4D;IAC5D,QAAQ,CAAC,QAAQ,CAAC,EAA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;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
+ }
@@ -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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
170
  }
171
171
  /**
172
172
  * Resolve every upstream the lockfile needs: References, profile chain
173
- * tiers, federated registries, and bound entries. Computes the
174
- * canonical edge hash from the same entry set. Returns the aggregate
175
- * `ResolvedUpstreams` payload ready for {@link serializeLockfile}.
173
+ * tiers, and bound entries. Computes the canonical edge hash from the
174
+ * same entry set. Returns the aggregate `ResolvedUpstreams` payload
175
+ * ready for {@link serializeLockfile}. Federated registry rows (org
176
+ * `references:`) are resolved separately by
177
+ * {@linkcode resolveProjectReferences} in `upstream_refs.ts` — the CLI
178
+ * composes both into the final lockfile's `upstreams` list.
176
179
  *
177
- * The four sub-resolvers run sequentially (not concurrently) because
180
+ * The sub-resolvers run sequentially (not concurrently) because
178
181
  * (a) the callbacks they share — `fetchUrl`, `readFile` — may themselves
179
182
  * serialize work, and (b) the diagnostics output is easier to reason
180
183
  * about with a deterministic order. Wrap inside `Promise.all` only when
@@ -185,7 +188,6 @@ export async function resolveUpstreams(opts) {
185
188
  const lockedAt = now.toISOString();
186
189
  const refResults = await resolveReferences(opts.entries, opts.fetchUrl);
187
190
  const profResults = await resolveProfileChain(opts.profileChain, opts.readFile);
188
- const regResults = await resolveRegistries(opts.config, opts.fetchUrl);
189
191
  const boundResults = await resolveBoundEntries(opts.entries, opts.mappings);
190
192
  const edges = extractEdgeQuads(opts.entries);
191
193
  const canonicalEdgeHash = await hashCanonicalEdges(edges);
@@ -203,13 +205,11 @@ export async function resolveUpstreams(opts) {
203
205
  const diagnostics = [
204
206
  ...refResults.flatMap((r) => r.diagnostics),
205
207
  ...profResults.flatMap((r) => r.diagnostics),
206
- ...regResults.flatMap((r) => r.diagnostics),
207
208
  ...boundResults.flatMap((r) => r.diagnostics),
208
209
  ];
209
210
  return {
210
211
  references: refResults,
211
212
  profiles: profResults,
212
- registries: regResults,
213
213
  boundEntries: boundResults,
214
214
  canonicalEdgeHash,
215
215
  canonicalEdgeCount: edges.length,
@@ -296,66 +296,6 @@ export async function resolveProfileChain(chain, readFile) {
296
296
  return out;
297
297
  }
298
298
  // ---------------------------------------------------------------------------
299
- // Registry resolution (Task 16)
300
- // ---------------------------------------------------------------------------
301
- /**
302
- * Resolve federated parent registries (and the fallback, when not already
303
- * listed). Each URL's `<url>/manifest` is fetched; the body is parsed
304
- * loosely for `markspec-schema` (defaults to 1 on parse failure).
305
- */
306
- export async function resolveRegistries(config, fetchUrl) {
307
- const urls = [...config.parents];
308
- if (config.parentFallback && !urls.includes(config.parentFallback)) {
309
- urls.push(config.parentFallback);
310
- }
311
- const out = [];
312
- for (const url of urls) {
313
- const manifestUrl = url.endsWith("/")
314
- ? `${url}manifest`
315
- : `${url}/manifest`;
316
- const fetched = await fetchUrl(manifestUrl);
317
- if (fetched instanceof Uint8Array) {
318
- const hash = await sha256Bytes(fetched);
319
- let markspecSchema = 1;
320
- try {
321
- const parsed = JSON.parse(new TextDecoder().decode(fetched));
322
- if (typeof parsed["markspec-schema"] === "number") {
323
- markspecSchema = parsed["markspec-schema"];
324
- }
325
- }
326
- catch { /* leave default */ }
327
- out.push({
328
- upstream: {
329
- kind: "registry",
330
- id: `urn:markspec:registry:${url}`,
331
- api: url,
332
- resolvedManifestHash: hash,
333
- markspecSchema,
334
- },
335
- diagnostics: [],
336
- });
337
- }
338
- else {
339
- out.push({
340
- upstream: {
341
- kind: "registry",
342
- id: `urn:markspec:registry:${url}`,
343
- api: url,
344
- resolvedManifestHash: "sha256:0",
345
- markspecSchema: 1,
346
- },
347
- diagnostics: [{
348
- code: "MSL-L101",
349
- severity: "warning",
350
- message: `Failed to fetch registry manifest from ${manifestUrl}: ${fetched.error}`,
351
- location: undefined,
352
- }],
353
- });
354
- }
355
- }
356
- return out;
357
- }
358
- // ---------------------------------------------------------------------------
359
299
  // Bound-entry resolution (Task 17)
360
300
  // ---------------------------------------------------------------------------
361
301
  /**
@@ -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"}
@@ -66,6 +66,29 @@ export function serializeLockfile(lf) {
66
66
  parts.push(`api = ${tomlString(r.api)}\n`);
67
67
  parts.push(`resolved-manifest-hash = ${tomlString(r.resolvedManifestHash)}\n`);
68
68
  parts.push(`markspec-schema = ${r.markspecSchema}\n`);
69
+ if (r.version !== undefined) {
70
+ parts.push(`version = ${tomlString(r.version)}\n`);
71
+ }
72
+ if (r.snapshot !== undefined) {
73
+ parts.push(`snapshot = ${tomlString(r.snapshot)}\n`);
74
+ }
75
+ if (r.lockedAt !== undefined) {
76
+ parts.push(`locked-at = ${tomlString(r.lockedAt)}\n`);
77
+ }
78
+ }
79
+ const deps = lf.upstreams
80
+ .filter((u) => u.kind === "dependency")
81
+ .slice()
82
+ .sort((a, b) => a.id.localeCompare(b.id));
83
+ for (const d of deps) {
84
+ parts.push("\n[[upstream.dependency]]\n");
85
+ parts.push(`id = ${tomlString(d.id)}\n`);
86
+ parts.push(`url = ${tomlString(d.url)}\n`);
87
+ parts.push(`intent = ${tomlString(d.intent)}\n`);
88
+ parts.push(`resolved = ${tomlString(d.resolved)}\n`);
89
+ parts.push(`sha = ${tomlString(d.sha)}\n`);
90
+ parts.push(`snapshot = ${tomlString(d.snapshot)}\n`);
91
+ parts.push(`locked-at = ${tomlString(d.lockedAt)}\n`);
69
92
  }
70
93
  const bounds = lf.boundEntries.slice().sort((a, b) => a.displayId.localeCompare(b.displayId));
71
94
  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"}
@@ -0,0 +1,38 @@
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
+ /**
12
+ * Warn-and-write diagnostic (design §4.2, decision 1): one upstream could
13
+ * not be locked. Identical shape for both kinds — `noun` selects the word.
14
+ */
15
+ export function upstreamNotLockable(noun, id, detail) {
16
+ return {
17
+ code: "MSL-L213",
18
+ severity: "warning",
19
+ message: `upstream ${noun} '${id}' could not be locked: ${detail}`,
20
+ location: undefined,
21
+ };
22
+ }
23
+ /**
24
+ * Write a batch of `[absolutePath, bytes]` cache files via the injected
25
+ * `writeFile` (which creates parent directories). Returns an MSL-L213
26
+ * warning naming the clean `id` (never the raw path) on the first failure,
27
+ * or `undefined` when every write succeeds. Shared by both acquirers' cache
28
+ * writers so a cache-write-failure message is worded identically.
29
+ */
30
+ export async function writeCacheFiles(writes, noun, id, writeFile) {
31
+ for (const [path, bytes] of writes) {
32
+ const res = await writeFile(path, bytes);
33
+ if (res.error !== undefined) {
34
+ return upstreamNotLockable(noun, id, `cache write of '${path}' failed (${res.error})`);
35
+ }
36
+ }
37
+ return undefined;
38
+ }
@@ -0,0 +1,63 @@
1
+ /**
2
+ * @module core/lock/upstream_deps
3
+ *
4
+ * Lock-mediated acquisition of org-manifest `dependencies:` git repositories
5
+ * (design §4.3), the sibling of `upstream_refs.ts`. Unlike a `references:`
6
+ * published site (fetched as ready JSON), a dependency is a git tree we
7
+ * resolve, acquire at one sha, and compile in-process into the same cache
8
+ * layout. Three flows: first-lock (resolve intent → acquire → compile → pin),
9
+ * keep/restore (pin exists → verify cache offline, re-acquire the *pinned* sha
10
+ * only to repopulate), update (`--update` → re-resolve + move the pin).
11
+ *
12
+ * Warn-and-write policy (design §4.2, decision 1): an unreachable dependency
13
+ * yields a warning and the resolvable pins still lock. Pure — git, fs, and
14
+ * temp-dir access flow through {@linkcode UpstreamDepsIO}.
15
+ */
16
+ import type { Diagnostic, ProjectRef } from "../model/mod.js";
17
+ import type { UpstreamDependency } from "./model.js";
18
+ import type { ReadFile } from "./resolve.js";
19
+ import { type RefList } from "./git_intent.js";
20
+ import type { CompiledSnapshot } from "./acquire_compile.js";
21
+ export interface GitIO {
22
+ lsRemote(url: string): Promise<RefList | {
23
+ error: string;
24
+ }>;
25
+ acquireTree(url: string, sha: string, destDir: string): Promise<{
26
+ error?: string;
27
+ }>;
28
+ }
29
+ export interface UpstreamDepsIO {
30
+ readonly git: GitIO;
31
+ readonly compileTree: (treeRoot: string) => Promise<CompiledSnapshot | {
32
+ error: string;
33
+ }>;
34
+ readonly readFile: ReadFile;
35
+ readonly writeFile: (path: string, bytes: Uint8Array) => Promise<{
36
+ error?: string;
37
+ }>;
38
+ readonly makeTempDir: () => Promise<string>;
39
+ readonly removeDir: (path: string) => Promise<void>;
40
+ }
41
+ export interface ResolveProjectDependenciesOptions {
42
+ readonly dependencies: readonly ProjectRef[];
43
+ readonly existing: readonly UpstreamDependency[];
44
+ readonly cacheRoot: string;
45
+ readonly update: boolean | string;
46
+ readonly io: UpstreamDepsIO;
47
+ readonly lockedAt: string;
48
+ /**
49
+ * Upstream ids already claimed by declared `references:` entries. A
50
+ * dependency whose derived id collides with one is skipped with an
51
+ * MSL-L216 warning (warn-and-write) — the reference snapshot owns that
52
+ * cache namespace, and two rows under one id would clobber each other's
53
+ * cache and double-map the corpus. Defaults to empty (no cross-kind
54
+ * dedup) for callers that resolve dependencies in isolation.
55
+ */
56
+ readonly reservedIds?: ReadonlySet<string>;
57
+ }
58
+ export interface ResolveProjectDependenciesResult {
59
+ readonly dependencies: UpstreamDependency[];
60
+ readonly diagnostics: Diagnostic[];
61
+ }
62
+ export declare function resolveProjectDependencies(opts: ResolveProjectDependenciesOptions): Promise<ResolveProjectDependenciesResult>;
63
+ //# sourceMappingURL=upstream_deps.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"upstream_deps.d.ts","sourceRoot":"","sources":["../../src/lock/upstream_deps.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAGH,OAAO,KAAK,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAC9D,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAC;AACrD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AAG7C,OAAO,EAAE,KAAK,OAAO,EAAiB,MAAM,iBAAiB,CAAC;AAC9D,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAE7D,MAAM,WAAW,KAAK;IACpB,QAAQ,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,GAAG;QAAE,KAAK,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IAC5D,WAAW,CACT,GAAG,EAAE,MAAM,EACX,GAAG,EAAE,MAAM,EACX,OAAO,EAAE,MAAM,GACd,OAAO,CAAC;QAAE,KAAK,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;CAChC;AAED,MAAM,W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