@driftsys/markspec 0.5.0 → 0.6.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 (484) hide show
  1. package/README.md +74 -20
  2. package/esm/ast/build.d.ts +11 -21
  3. package/esm/ast/build.d.ts.map +1 -1
  4. package/esm/ast/build.js +50 -139
  5. package/esm/ast/nodes.d.ts +11 -43
  6. package/esm/ast/nodes.d.ts.map +1 -1
  7. package/esm/ast/nodes.js +6 -1
  8. package/esm/ast/normalize.d.ts +8 -17
  9. package/esm/ast/normalize.d.ts.map +1 -1
  10. package/esm/ast/normalize.js +14 -72
  11. package/esm/compiler/constants.d.ts +16 -0
  12. package/esm/compiler/constants.d.ts.map +1 -0
  13. package/esm/compiler/constants.js +26 -0
  14. package/esm/compiler/discipline_classifier.d.ts +55 -0
  15. package/esm/compiler/discipline_classifier.d.ts.map +1 -0
  16. package/esm/compiler/discipline_classifier.js +191 -0
  17. package/esm/compiler/inverses.d.ts +7 -0
  18. package/esm/compiler/inverses.d.ts.map +1 -1
  19. package/esm/compiler/inverses.js +1 -18
  20. package/esm/compiler/mod.d.ts +30 -1
  21. package/esm/compiler/mod.d.ts.map +1 -1
  22. package/esm/compiler/mod.js +198 -65
  23. package/esm/compiler/schema.d.ts +15 -0
  24. package/esm/compiler/schema.d.ts.map +1 -1
  25. package/esm/compiler/schema.js +12 -0
  26. package/esm/config/markspec.d.ts +5 -0
  27. package/esm/config/markspec.d.ts.map +1 -1
  28. package/esm/config/markspec.js +17 -2
  29. package/esm/formatter/mod.d.ts +9 -3
  30. package/esm/formatter/mod.d.ts.map +1 -1
  31. package/esm/formatter/mod.js +97 -49
  32. package/esm/lexicons/loader.d.ts +35 -0
  33. package/esm/lexicons/loader.d.ts.map +1 -0
  34. package/esm/lexicons/loader.js +51 -0
  35. package/esm/lexicons/mod.d.ts +13 -0
  36. package/esm/lexicons/mod.d.ts.map +1 -0
  37. package/esm/lexicons/mod.js +12 -0
  38. package/esm/lint/glossary.d.ts +45 -0
  39. package/esm/lint/glossary.d.ts.map +1 -0
  40. package/esm/lint/glossary.js +85 -0
  41. package/esm/lint/mod.d.ts +4 -0
  42. package/esm/lint/mod.d.ts.map +1 -1
  43. package/esm/lint/mod.js +2 -0
  44. package/esm/lint/range_util.d.ts +25 -0
  45. package/esm/lint/range_util.d.ts.map +1 -0
  46. package/esm/lint/range_util.js +50 -0
  47. package/esm/lint/rules/ears.d.ts +39 -0
  48. package/esm/lint/rules/ears.d.ts.map +1 -0
  49. package/esm/lint/rules/ears.js +316 -0
  50. package/esm/lint/rules/incose_sentence.d.ts +46 -0
  51. package/esm/lint/rules/incose_sentence.d.ts.map +1 -0
  52. package/esm/lint/rules/incose_sentence.js +417 -0
  53. package/esm/lint/rules/modal_sentence.d.ts +46 -0
  54. package/esm/lint/rules/modal_sentence.d.ts.map +1 -0
  55. package/esm/lint/rules/modal_sentence.js +146 -0
  56. package/esm/lint/rules/passive.d.ts +64 -0
  57. package/esm/lint/rules/passive.d.ts.map +1 -0
  58. package/esm/lint/rules/passive.js +282 -0
  59. package/esm/lint/rules/suppression.d.ts +38 -3
  60. package/esm/lint/rules/suppression.d.ts.map +1 -1
  61. package/esm/lint/rules/suppression.js +58 -4
  62. package/esm/lint/rules/xref.d.ts +19 -0
  63. package/esm/lint/rules/xref.d.ts.map +1 -0
  64. package/esm/lint/rules/xref.js +248 -0
  65. package/esm/lint/runner.d.ts +31 -11
  66. package/esm/lint/runner.d.ts.map +1 -1
  67. package/esm/lint/runner.js +67 -26
  68. package/esm/lint/score.d.ts +64 -0
  69. package/esm/lint/score.d.ts.map +1 -0
  70. package/esm/lint/score.js +163 -0
  71. package/esm/lint/segmenter.d.ts +32 -0
  72. package/esm/lint/segmenter.d.ts.map +1 -0
  73. package/esm/lint/segmenter.js +79 -0
  74. package/esm/lint/types.d.ts +12 -0
  75. package/esm/lint/types.d.ts.map +1 -1
  76. package/esm/lock/canonical_edges.d.ts +31 -0
  77. package/esm/lock/canonical_edges.d.ts.map +1 -0
  78. package/esm/lock/canonical_edges.js +57 -0
  79. package/esm/lock/check.d.ts +24 -0
  80. package/esm/lock/check.d.ts.map +1 -0
  81. package/esm/lock/check.js +127 -0
  82. package/esm/lock/hash.d.ts +12 -0
  83. package/esm/lock/hash.d.ts.map +1 -0
  84. package/esm/lock/hash.js +32 -0
  85. package/esm/lock/mod.d.ts +19 -0
  86. package/esm/lock/mod.d.ts.map +1 -0
  87. package/esm/lock/mod.js +14 -0
  88. package/esm/lock/model.d.ts +81 -0
  89. package/esm/lock/model.d.ts.map +1 -0
  90. package/esm/lock/model.js +7 -0
  91. package/esm/lock/parser.d.ts +26 -0
  92. package/esm/lock/parser.d.ts.map +1 -0
  93. package/esm/lock/parser.js +195 -0
  94. package/esm/lock/resolve.d.ts +142 -0
  95. package/esm/lock/resolve.d.ts.map +1 -0
  96. package/esm/lock/resolve.js +389 -0
  97. package/esm/lock/serializer.d.ts +14 -0
  98. package/esm/lock/serializer.d.ts.map +1 -0
  99. package/esm/lock/serializer.js +104 -0
  100. package/esm/mod.d.ts +16 -9
  101. package/esm/mod.d.ts.map +1 -1
  102. package/esm/mod.js +12 -4
  103. package/esm/model/attributes.d.ts +6 -0
  104. package/esm/model/attributes.d.ts.map +1 -1
  105. package/esm/model/attributes.js +37 -0
  106. package/esm/model/discipline.d.ts +53 -0
  107. package/esm/model/discipline.d.ts.map +1 -0
  108. package/esm/model/discipline.js +50 -0
  109. package/esm/model/mod.d.ts +188 -30
  110. package/esm/model/mod.d.ts.map +1 -1
  111. package/esm/model/mod.js +42 -1
  112. package/esm/model/profile.d.ts +69 -0
  113. package/esm/model/profile.d.ts.map +1 -1
  114. package/esm/parser/attributes.d.ts.map +1 -1
  115. package/esm/parser/attributes.js +1 -10
  116. package/esm/parser/body_tokens.d.ts +35 -0
  117. package/esm/parser/body_tokens.d.ts.map +1 -0
  118. package/esm/parser/body_tokens.js +232 -0
  119. package/esm/parser/glossary.d.ts +8 -0
  120. package/esm/parser/glossary.d.ts.map +1 -1
  121. package/esm/parser/glossary.js +6 -4
  122. package/esm/parser/grammars.d.ts +5 -3
  123. package/esm/parser/grammars.d.ts.map +1 -1
  124. package/esm/parser/grammars.js +12 -4
  125. package/esm/parser/language_spec.d.ts +55 -0
  126. package/esm/parser/language_spec.d.ts.map +1 -0
  127. package/esm/parser/language_spec.js +419 -0
  128. package/esm/parser/line_map.d.ts +60 -0
  129. package/esm/parser/line_map.d.ts.map +1 -0
  130. package/esm/parser/line_map.js +41 -0
  131. package/esm/parser/markdown.d.ts +9 -0
  132. package/esm/parser/markdown.d.ts.map +1 -1
  133. package/esm/parser/markdown.js +107 -31
  134. package/esm/parser/mod.d.ts +4 -0
  135. package/esm/parser/mod.d.ts.map +1 -1
  136. package/esm/parser/mod.js +30 -8
  137. package/esm/parser/source.d.ts +39 -8
  138. package/esm/parser/source.d.ts.map +1 -1
  139. package/esm/parser/source.js +155 -65
  140. package/esm/parser/translate.d.ts +24 -0
  141. package/esm/parser/translate.d.ts.map +1 -0
  142. package/esm/parser/translate.js +99 -0
  143. package/esm/profile/chain.d.ts +8 -0
  144. package/esm/profile/chain.d.ts.map +1 -1
  145. package/esm/profile/chain.js +29 -1
  146. package/esm/profile/default_profile.d.ts +25 -0
  147. package/esm/profile/default_profile.d.ts.map +1 -0
  148. package/esm/profile/default_profile.js +43 -0
  149. package/esm/profile/discipline_mode.d.ts +64 -0
  150. package/esm/profile/discipline_mode.d.ts.map +1 -0
  151. package/esm/profile/discipline_mode.js +133 -0
  152. package/esm/profile/discipline_registry.d.ts +41 -0
  153. package/esm/profile/discipline_registry.d.ts.map +1 -0
  154. package/esm/profile/discipline_registry.js +67 -0
  155. package/esm/profile/load.d.ts +3 -1
  156. package/esm/profile/load.d.ts.map +1 -1
  157. package/esm/profile/load.js +24 -5
  158. package/esm/profile/manifest.d.ts.map +1 -1
  159. package/esm/profile/manifest.js +253 -20
  160. package/esm/profile/merge.d.ts.map +1 -1
  161. package/esm/profile/merge.js +112 -0
  162. package/esm/profile/mod.d.ts +2 -0
  163. package/esm/profile/mod.d.ts.map +1 -1
  164. package/esm/profile/mod.js +2 -0
  165. package/esm/sync/locked_attributes.d.ts +19 -0
  166. package/esm/sync/locked_attributes.d.ts.map +1 -0
  167. package/esm/sync/locked_attributes.js +27 -0
  168. package/esm/sync/log.d.ts +34 -0
  169. package/esm/sync/log.d.ts.map +1 -0
  170. package/esm/sync/log.js +48 -0
  171. package/esm/sync/mapping.d.ts +66 -0
  172. package/esm/sync/mapping.d.ts.map +1 -0
  173. package/esm/sync/mapping.js +165 -0
  174. package/esm/sync/mod.d.ts +16 -0
  175. package/esm/sync/mod.d.ts.map +1 -0
  176. package/esm/sync/mod.js +12 -0
  177. package/esm/sync/status.d.ts +23 -0
  178. package/esm/sync/status.d.ts.map +1 -0
  179. package/esm/sync/status.js +21 -0
  180. package/esm/typl/ast.d.ts +87 -0
  181. package/esm/typl/ast.d.ts.map +1 -0
  182. package/esm/typl/ast.js +21 -0
  183. package/esm/typl/bridge.d.ts +32 -0
  184. package/esm/typl/bridge.d.ts.map +1 -0
  185. package/esm/typl/bridge.js +27 -0
  186. package/esm/typl/bullet.d.ts +34 -0
  187. package/esm/typl/bullet.d.ts.map +1 -0
  188. package/esm/typl/bullet.js +44 -0
  189. package/esm/typl/diagnostics.d.ts +43 -0
  190. package/esm/typl/diagnostics.d.ts.map +1 -0
  191. package/esm/typl/diagnostics.js +61 -0
  192. package/esm/typl/fence.d.ts +31 -0
  193. package/esm/typl/fence.d.ts.map +1 -0
  194. package/esm/typl/fence.js +24 -0
  195. package/esm/typl/grammar.d.ts +20 -0
  196. package/esm/typl/grammar.d.ts.map +1 -0
  197. package/esm/typl/grammar.js +471 -0
  198. package/esm/typl/inline.d.ts +34 -0
  199. package/esm/typl/inline.d.ts.map +1 -0
  200. package/esm/typl/inline.js +48 -0
  201. package/esm/typl/lexer.d.ts +37 -0
  202. package/esm/typl/lexer.d.ts.map +1 -0
  203. package/esm/typl/lexer.js +234 -0
  204. package/esm/typl/mod.d.ts +23 -0
  205. package/esm/typl/mod.d.ts.map +1 -0
  206. package/esm/typl/mod.js +16 -0
  207. package/esm/typl/registry.d.ts +42 -0
  208. package/esm/typl/registry.d.ts.map +1 -0
  209. package/esm/typl/registry.js +26 -0
  210. package/esm/typl/validator.d.ts +29 -0
  211. package/esm/typl/validator.d.ts.map +1 -0
  212. package/esm/typl/validator.js +141 -0
  213. package/esm/util/line_endings.d.ts +33 -0
  214. package/esm/util/line_endings.d.ts.map +1 -0
  215. package/esm/util/line_endings.js +53 -0
  216. package/esm/util/modals.d.ts +29 -0
  217. package/esm/util/modals.d.ts.map +1 -0
  218. package/esm/util/modals.js +38 -0
  219. package/esm/validator/discipline.d.ts +35 -0
  220. package/esm/validator/discipline.d.ts.map +1 -0
  221. package/esm/validator/discipline.js +204 -0
  222. package/esm/validator/mod.d.ts +1 -1
  223. package/esm/validator/mod.d.ts.map +1 -1
  224. package/esm/validator/mod.js +23 -2
  225. package/esm/validator/modal_keywords.d.ts +15 -13
  226. package/esm/validator/modal_keywords.d.ts.map +1 -1
  227. package/esm/validator/modal_keywords.js +26 -109
  228. package/esm/validator/pattern.d.ts +15 -8
  229. package/esm/validator/pattern.d.ts.map +1 -1
  230. package/esm/validator/pattern.js +42 -19
  231. package/esm/validator/per_type_attrs.d.ts +2 -2
  232. package/esm/validator/per_type_attrs.d.ts.map +1 -1
  233. package/esm/validator/per_type_attrs.js +2 -2
  234. package/esm/validator/pipeline.d.ts +11 -0
  235. package/esm/validator/pipeline.d.ts.map +1 -1
  236. package/esm/validator/pipeline.js +37 -15
  237. package/esm/validator/type_resolution.d.ts +3 -3
  238. package/esm/validator/type_resolution.d.ts.map +1 -1
  239. package/esm/validator/type_resolution.js +31 -9
  240. package/package.json +2 -2
  241. package/script/ast/build.d.ts +11 -21
  242. package/script/ast/build.d.ts.map +1 -1
  243. package/script/ast/build.js +51 -140
  244. package/script/ast/nodes.d.ts +11 -43
  245. package/script/ast/nodes.d.ts.map +1 -1
  246. package/script/ast/nodes.js +6 -1
  247. package/script/ast/normalize.d.ts +8 -17
  248. package/script/ast/normalize.d.ts.map +1 -1
  249. package/script/ast/normalize.js +16 -74
  250. package/script/compiler/constants.d.ts +16 -0
  251. package/script/compiler/constants.d.ts.map +1 -0
  252. package/script/compiler/constants.js +29 -0
  253. package/script/compiler/discipline_classifier.d.ts +55 -0
  254. package/script/compiler/discipline_classifier.d.ts.map +1 -0
  255. package/script/compiler/discipline_classifier.js +196 -0
  256. package/script/compiler/inverses.d.ts +7 -0
  257. package/script/compiler/inverses.d.ts.map +1 -1
  258. package/script/compiler/inverses.js +2 -19
  259. package/script/compiler/mod.d.ts +30 -1
  260. package/script/compiler/mod.d.ts.map +1 -1
  261. package/script/compiler/mod.js +202 -69
  262. package/script/compiler/schema.d.ts +15 -0
  263. package/script/compiler/schema.d.ts.map +1 -1
  264. package/script/compiler/schema.js +12 -0
  265. package/script/config/markspec.d.ts +5 -0
  266. package/script/config/markspec.d.ts.map +1 -1
  267. package/script/config/markspec.js +17 -2
  268. package/script/formatter/mod.d.ts +9 -3
  269. package/script/formatter/mod.d.ts.map +1 -1
  270. package/script/formatter/mod.js +99 -51
  271. package/script/lexicons/loader.d.ts +35 -0
  272. package/script/lexicons/loader.d.ts.map +1 -0
  273. package/script/lexicons/loader.js +55 -0
  274. package/script/lexicons/mod.d.ts +13 -0
  275. package/script/lexicons/mod.d.ts.map +1 -0
  276. package/script/lexicons/mod.js +17 -0
  277. package/script/lint/glossary.d.ts +45 -0
  278. package/script/lint/glossary.d.ts.map +1 -0
  279. package/script/lint/glossary.js +88 -0
  280. package/script/lint/mod.d.ts +4 -0
  281. package/script/lint/mod.d.ts.map +1 -1
  282. package/script/lint/mod.js +6 -1
  283. package/script/lint/range_util.d.ts +25 -0
  284. package/script/lint/range_util.d.ts.map +1 -0
  285. package/script/lint/range_util.js +53 -0
  286. package/script/lint/rules/ears.d.ts +39 -0
  287. package/script/lint/rules/ears.d.ts.map +1 -0
  288. package/script/lint/rules/ears.js +320 -0
  289. package/script/lint/rules/incose_sentence.d.ts +46 -0
  290. package/script/lint/rules/incose_sentence.d.ts.map +1 -0
  291. package/script/lint/rules/incose_sentence.js +421 -0
  292. package/script/lint/rules/modal_sentence.d.ts +46 -0
  293. package/script/lint/rules/modal_sentence.d.ts.map +1 -0
  294. package/script/lint/rules/modal_sentence.js +150 -0
  295. package/script/lint/rules/passive.d.ts +64 -0
  296. package/script/lint/rules/passive.d.ts.map +1 -0
  297. package/script/lint/rules/passive.js +286 -0
  298. package/script/lint/rules/suppression.d.ts +38 -3
  299. package/script/lint/rules/suppression.d.ts.map +1 -1
  300. package/script/lint/rules/suppression.js +59 -3
  301. package/script/lint/rules/xref.d.ts +19 -0
  302. package/script/lint/rules/xref.d.ts.map +1 -0
  303. package/script/lint/rules/xref.js +251 -0
  304. package/script/lint/runner.d.ts +31 -11
  305. package/script/lint/runner.d.ts.map +1 -1
  306. package/script/lint/runner.js +67 -26
  307. package/script/lint/score.d.ts +64 -0
  308. package/script/lint/score.d.ts.map +1 -0
  309. package/script/lint/score.js +167 -0
  310. package/script/lint/segmenter.d.ts +32 -0
  311. package/script/lint/segmenter.d.ts.map +1 -0
  312. package/script/lint/segmenter.js +82 -0
  313. package/script/lint/types.d.ts +12 -0
  314. package/script/lint/types.d.ts.map +1 -1
  315. package/script/lock/canonical_edges.d.ts +31 -0
  316. package/script/lock/canonical_edges.d.ts.map +1 -0
  317. package/script/lock/canonical_edges.js +61 -0
  318. package/script/lock/check.d.ts +24 -0
  319. package/script/lock/check.d.ts.map +1 -0
  320. package/script/lock/check.js +130 -0
  321. package/script/lock/hash.d.ts +12 -0
  322. package/script/lock/hash.d.ts.map +1 -0
  323. package/script/lock/hash.js +36 -0
  324. package/script/lock/mod.d.ts +19 -0
  325. package/script/lock/mod.d.ts.map +1 -0
  326. package/script/lock/mod.js +31 -0
  327. package/script/lock/model.d.ts +81 -0
  328. package/script/lock/model.d.ts.map +1 -0
  329. package/script/lock/model.js +10 -0
  330. package/script/lock/parser.d.ts +26 -0
  331. package/script/lock/parser.d.ts.map +1 -0
  332. package/script/lock/parser.js +198 -0
  333. package/script/lock/resolve.d.ts +142 -0
  334. package/script/lock/resolve.d.ts.map +1 -0
  335. package/script/lock/resolve.js +397 -0
  336. package/script/lock/serializer.d.ts +14 -0
  337. package/script/lock/serializer.d.ts.map +1 -0
  338. package/script/lock/serializer.js +107 -0
  339. package/script/mod.d.ts +16 -9
  340. package/script/mod.d.ts.map +1 -1
  341. package/script/mod.js +111 -38
  342. package/script/model/attributes.d.ts +6 -0
  343. package/script/model/attributes.d.ts.map +1 -1
  344. package/script/model/attributes.js +38 -1
  345. package/script/model/discipline.d.ts +53 -0
  346. package/script/model/discipline.d.ts.map +1 -0
  347. package/script/model/discipline.js +53 -0
  348. package/script/model/mod.d.ts +188 -30
  349. package/script/model/mod.d.ts.map +1 -1
  350. package/script/model/mod.js +48 -1
  351. package/script/model/profile.d.ts +69 -0
  352. package/script/model/profile.d.ts.map +1 -1
  353. package/script/parser/attributes.d.ts.map +1 -1
  354. package/script/parser/attributes.js +1 -10
  355. package/script/parser/body_tokens.d.ts +35 -0
  356. package/script/parser/body_tokens.d.ts.map +1 -0
  357. package/script/parser/body_tokens.js +235 -0
  358. package/script/parser/glossary.d.ts +8 -0
  359. package/script/parser/glossary.d.ts.map +1 -1
  360. package/script/parser/glossary.js +7 -4
  361. package/script/parser/grammars.d.ts +5 -3
  362. package/script/parser/grammars.d.ts.map +1 -1
  363. package/script/parser/grammars.js +15 -8
  364. package/script/parser/language_spec.d.ts +55 -0
  365. package/script/parser/language_spec.d.ts.map +1 -0
  366. package/script/parser/language_spec.js +423 -0
  367. package/script/parser/line_map.d.ts +60 -0
  368. package/script/parser/line_map.d.ts.map +1 -0
  369. package/script/parser/line_map.js +44 -0
  370. package/script/parser/markdown.d.ts +9 -0
  371. package/script/parser/markdown.d.ts.map +1 -1
  372. package/script/parser/markdown.js +105 -29
  373. package/script/parser/mod.d.ts +4 -0
  374. package/script/parser/mod.d.ts.map +1 -1
  375. package/script/parser/mod.js +32 -7
  376. package/script/parser/source.d.ts +39 -8
  377. package/script/parser/source.d.ts.map +1 -1
  378. package/script/parser/source.js +156 -69
  379. package/script/parser/translate.d.ts +24 -0
  380. package/script/parser/translate.d.ts.map +1 -0
  381. package/script/parser/translate.js +102 -0
  382. package/script/profile/chain.d.ts +8 -0
  383. package/script/profile/chain.d.ts.map +1 -1
  384. package/script/profile/chain.js +29 -1
  385. package/script/profile/default_profile.d.ts +25 -0
  386. package/script/profile/default_profile.d.ts.map +1 -0
  387. package/script/profile/default_profile.js +46 -0
  388. package/script/profile/discipline_mode.d.ts +64 -0
  389. package/script/profile/discipline_mode.d.ts.map +1 -0
  390. package/script/profile/discipline_mode.js +138 -0
  391. package/script/profile/discipline_registry.d.ts +41 -0
  392. package/script/profile/discipline_registry.d.ts.map +1 -0
  393. package/script/profile/discipline_registry.js +70 -0
  394. package/script/profile/load.d.ts +3 -1
  395. package/script/profile/load.d.ts.map +1 -1
  396. package/script/profile/load.js +24 -5
  397. package/script/profile/manifest.d.ts.map +1 -1
  398. package/script/profile/manifest.js +252 -19
  399. package/script/profile/merge.d.ts.map +1 -1
  400. package/script/profile/merge.js +112 -0
  401. package/script/profile/mod.d.ts +2 -0
  402. package/script/profile/mod.d.ts.map +1 -1
  403. package/script/profile/mod.js +6 -1
  404. package/script/sync/locked_attributes.d.ts +19 -0
  405. package/script/sync/locked_attributes.d.ts.map +1 -0
  406. package/script/sync/locked_attributes.js +30 -0
  407. package/script/sync/log.d.ts +34 -0
  408. package/script/sync/log.d.ts.map +1 -0
  409. package/script/sync/log.js +52 -0
  410. package/script/sync/mapping.d.ts +66 -0
  411. package/script/sync/mapping.d.ts.map +1 -0
  412. package/script/sync/mapping.js +169 -0
  413. package/script/sync/mod.d.ts +16 -0
  414. package/script/sync/mod.d.ts.map +1 -0
  415. package/script/sync/mod.js +21 -0
  416. package/script/sync/status.d.ts +23 -0
  417. package/script/sync/status.d.ts.map +1 -0
  418. package/script/sync/status.js +24 -0
  419. package/script/typl/ast.d.ts +87 -0
  420. package/script/typl/ast.d.ts.map +1 -0
  421. package/script/typl/ast.js +24 -0
  422. package/script/typl/bridge.d.ts +32 -0
  423. package/script/typl/bridge.d.ts.map +1 -0
  424. package/script/typl/bridge.js +30 -0
  425. package/script/typl/bullet.d.ts +34 -0
  426. package/script/typl/bullet.d.ts.map +1 -0
  427. package/script/typl/bullet.js +47 -0
  428. package/script/typl/diagnostics.d.ts +43 -0
  429. package/script/typl/diagnostics.d.ts.map +1 -0
  430. package/script/typl/diagnostics.js +65 -0
  431. package/script/typl/fence.d.ts +31 -0
  432. package/script/typl/fence.d.ts.map +1 -0
  433. package/script/typl/fence.js +27 -0
  434. package/script/typl/grammar.d.ts +20 -0
  435. package/script/typl/grammar.d.ts.map +1 -0
  436. package/script/typl/grammar.js +474 -0
  437. package/script/typl/inline.d.ts +34 -0
  438. package/script/typl/inline.d.ts.map +1 -0
  439. package/script/typl/inline.js +51 -0
  440. package/script/typl/lexer.d.ts +37 -0
  441. package/script/typl/lexer.d.ts.map +1 -0
  442. package/script/typl/lexer.js +237 -0
  443. package/script/typl/mod.d.ts +23 -0
  444. package/script/typl/mod.d.ts.map +1 -0
  445. package/script/typl/mod.js +29 -0
  446. package/script/typl/registry.d.ts +42 -0
  447. package/script/typl/registry.d.ts.map +1 -0
  448. package/script/typl/registry.js +29 -0
  449. package/script/typl/validator.d.ts +29 -0
  450. package/script/typl/validator.d.ts.map +1 -0
  451. package/script/typl/validator.js +144 -0
  452. package/script/util/line_endings.d.ts +33 -0
  453. package/script/util/line_endings.d.ts.map +1 -0
  454. package/script/util/line_endings.js +58 -0
  455. package/script/util/modals.d.ts +29 -0
  456. package/script/util/modals.d.ts.map +1 -0
  457. package/script/util/modals.js +42 -0
  458. package/script/validator/discipline.d.ts +35 -0
  459. package/script/validator/discipline.d.ts.map +1 -0
  460. package/script/validator/discipline.js +207 -0
  461. package/script/validator/mod.d.ts +1 -1
  462. package/script/validator/mod.d.ts.map +1 -1
  463. package/script/validator/mod.js +23 -1
  464. package/script/validator/modal_keywords.d.ts +15 -13
  465. package/script/validator/modal_keywords.d.ts.map +1 -1
  466. package/script/validator/modal_keywords.js +26 -109
  467. package/script/validator/pattern.d.ts +15 -8
  468. package/script/validator/pattern.d.ts.map +1 -1
  469. package/script/validator/pattern.js +42 -19
  470. package/script/validator/per_type_attrs.d.ts +2 -2
  471. package/script/validator/per_type_attrs.d.ts.map +1 -1
  472. package/script/validator/per_type_attrs.js +2 -2
  473. package/script/validator/pipeline.d.ts +11 -0
  474. package/script/validator/pipeline.d.ts.map +1 -1
  475. package/script/validator/pipeline.js +40 -17
  476. package/script/validator/type_resolution.d.ts +3 -3
  477. package/script/validator/type_resolution.d.ts.map +1 -1
  478. package/script/validator/type_resolution.js +31 -9
  479. package/esm/parser/entity_refs.d.ts +0 -53
  480. package/esm/parser/entity_refs.d.ts.map +0 -1
  481. package/esm/parser/entity_refs.js +0 -151
  482. package/script/parser/entity_refs.d.ts +0 -53
  483. package/script/parser/entity_refs.d.ts.map +0 -1
  484. package/script/parser/entity_refs.js +0 -155
@@ -0,0 +1,389 @@
1
+ /**
2
+ * @module core/lock/resolve
3
+ *
4
+ * Shared upstream-resolution layer. Both `markspec lock` and
5
+ * `markspec compile` call {@linkcode resolveUpstreams}. All
6
+ * world-touching operations (HTTP fetch, clock) flow through
7
+ * callbacks so unit tests inject deterministic stubs.
8
+ *
9
+ * Implementation arrives in Tasks 15–18; this file ships the type
10
+ * surface and a stub.
11
+ */
12
+ import { inferLockedAttributes } from "../sync/locked_attributes.js";
13
+ import { sha256Bytes } from "./hash.js";
14
+ import { hashCanonicalEdges } from "./canonical_edges.js";
15
+ // ---------------------------------------------------------------------------
16
+ // Reference resolution (Task 15)
17
+ // ---------------------------------------------------------------------------
18
+ /**
19
+ * Extract the "resolved version" segment from a Reference's URI.
20
+ *
21
+ * Heuristics covering the URI schemes the lock CLI is expected to see:
22
+ * - `urn:iso:std:iso:26262:-6:ed-2` → `ed-2` (last `:`-segment)
23
+ * - `pkg:cargo/serde@1.0.0` → `1.0.0` (everything after the last `@`)
24
+ * - `doi:…`, `isbn:…`, plain `https://…` → undefined
25
+ */
26
+ function extractResolvedVersion(uri) {
27
+ const urnMatch = uri.match(/^urn:[^:]+(?:::|:)([^:]+)$/);
28
+ if (urnMatch)
29
+ return urnMatch[1];
30
+ const pkgMatch = uri.match(/@([^?]+)$/);
31
+ if (pkgMatch)
32
+ return pkgMatch[1];
33
+ return undefined;
34
+ }
35
+ /** First raw-attribute value matching `key`, or undefined. */
36
+ function attrValue(entry, key) {
37
+ for (const a of entry.rawAttributes) {
38
+ if (a.key === key)
39
+ return a.value;
40
+ }
41
+ return undefined;
42
+ }
43
+ /**
44
+ * Resolve every Reference entry to an upstream record. Deduplicates by
45
+ * display ID (first occurrence wins). When `Reference-url:` is set, the
46
+ * bytes are fetched and `sha256:*`-hashed; otherwise an MSL-L010 info
47
+ * diagnostic is attached and the upstream is identity-only. Fetch
48
+ * failures attach MSL-L101 and degrade to identity-only.
49
+ */
50
+ export async function resolveReferences(entries, fetchUrl) {
51
+ const out = [];
52
+ const seenSlugs = new Set();
53
+ for (const entry of entries) {
54
+ if (entry.shape !== "Reference")
55
+ continue;
56
+ if (seenSlugs.has(entry.displayId))
57
+ continue;
58
+ seenSlugs.add(entry.displayId);
59
+ const id = entry.id;
60
+ if (id === undefined)
61
+ continue;
62
+ const refUrl = attrValue(entry, "Reference-url");
63
+ const diagnostics = [];
64
+ let hash;
65
+ let source;
66
+ if (refUrl === undefined) {
67
+ diagnostics.push({
68
+ code: "MSL-L010",
69
+ severity: "info",
70
+ message: `Reference '${entry.displayId}' has no Reference-url:; identity-only lock (no hash, no drift detection).`,
71
+ location: entry.location,
72
+ });
73
+ }
74
+ else {
75
+ const fetched = await fetchUrl(refUrl);
76
+ if (fetched instanceof Uint8Array) {
77
+ hash = await sha256Bytes(fetched);
78
+ source = refUrl;
79
+ }
80
+ else {
81
+ diagnostics.push({
82
+ code: "MSL-L101",
83
+ severity: "warning",
84
+ message: `Failed to fetch Reference-url for '${entry.displayId}' (${refUrl}): ${fetched.error}. Recording identity-only.`,
85
+ location: entry.location,
86
+ });
87
+ }
88
+ }
89
+ out.push({
90
+ upstream: {
91
+ kind: "reference",
92
+ slug: entry.displayId,
93
+ id,
94
+ resolved: extractResolvedVersion(id),
95
+ hash,
96
+ source,
97
+ },
98
+ diagnostics,
99
+ });
100
+ }
101
+ return out;
102
+ }
103
+ // ---------------------------------------------------------------------------
104
+ // Full upstream resolution (Tasks 16–18)
105
+ // ---------------------------------------------------------------------------
106
+ /**
107
+ * Project an entry list to canonical edge quads. Walks the eleven core
108
+ * trace-link attributes (Satisfies, Derived-from, Verified-by, …) and
109
+ * emits one quad per resolved target ID, splitting CSV values on `,`
110
+ * or whitespace. Every quad is provenance `"local"` — externally
111
+ * sourced edges are folded in later (post-MVP).
112
+ */
113
+ export function extractEdgeQuads(entries) {
114
+ const TRACE_KEYS = [
115
+ "Satisfies",
116
+ "Derived-from",
117
+ "Verified-by",
118
+ "References",
119
+ "Tests",
120
+ "Depends-on",
121
+ "Part-of",
122
+ "Allocated-to",
123
+ "Realizes",
124
+ "Generated-from",
125
+ "Supersedes",
126
+ ];
127
+ const out = [];
128
+ for (const entry of entries) {
129
+ for (const a of entry.rawAttributes) {
130
+ if (!TRACE_KEYS.includes(a.key))
131
+ continue;
132
+ const targets = a.value.split(/[\s,]+/).filter((t) => t.length > 0);
133
+ for (const target of targets) {
134
+ out.push({
135
+ source: entry.displayId,
136
+ relation: a.key,
137
+ target,
138
+ provenance: "local",
139
+ });
140
+ }
141
+ }
142
+ }
143
+ return out;
144
+ }
145
+ /**
146
+ * Resolve every upstream the lockfile needs: References, profile chain
147
+ * tiers, federated registries, and bound entries. Computes the
148
+ * canonical edge hash from the same entry set. Returns the aggregate
149
+ * `ResolvedUpstreams` payload ready for {@link serializeLockfile}.
150
+ *
151
+ * The four sub-resolvers run sequentially (not concurrently) because
152
+ * (a) the callbacks they share — `fetchUrl`, `readFile` — may themselves
153
+ * serialize work, and (b) the diagnostics output is easier to reason
154
+ * about with a deterministic order. Wrap inside `Promise.all` only when
155
+ * profiling shows a clear win.
156
+ */
157
+ export async function resolveUpstreams(opts) {
158
+ const now = (opts.now ?? (() => new Date()))();
159
+ const lockedAt = now.toISOString();
160
+ const refResults = await resolveReferences(opts.entries, opts.fetchUrl);
161
+ const profResults = await resolveProfileChain(opts.profileChain, opts.readFile);
162
+ const regResults = await resolveRegistries(opts.config, opts.fetchUrl);
163
+ const boundResults = await resolveBoundEntries(opts.entries, opts.mappings);
164
+ const edges = extractEdgeQuads(opts.entries);
165
+ const canonicalEdgeHash = await hashCanonicalEdges(edges);
166
+ const diagnostics = [
167
+ ...refResults.flatMap((r) => r.diagnostics),
168
+ ...profResults.flatMap((r) => r.diagnostics),
169
+ ...regResults.flatMap((r) => r.diagnostics),
170
+ ...boundResults.flatMap((r) => r.diagnostics),
171
+ ];
172
+ return {
173
+ references: refResults,
174
+ profiles: profResults,
175
+ registries: regResults,
176
+ boundEntries: boundResults,
177
+ canonicalEdgeHash,
178
+ canonicalEdgeCount: edges.length,
179
+ lockedAt,
180
+ diagnostics,
181
+ };
182
+ }
183
+ // ---------------------------------------------------------------------------
184
+ // Profile chain resolution (Task 16)
185
+ // ---------------------------------------------------------------------------
186
+ /**
187
+ * Format a `ProfileSpecifier` into the lockfile-canonical specifier string.
188
+ *
189
+ * Strings are stable across runs so the lockfile diff captures only meaningful
190
+ * changes:
191
+ * - `builtin` — bundled default
192
+ * - `local:<path>` — on-disk profile
193
+ * - `git:<repo>#<tag>` or `git:<repo>//<subpath>#<tag>`
194
+ * - `npm:<scope?><name>@<range>`
195
+ */
196
+ function formatSpecifier(spec) {
197
+ switch (spec.kind) {
198
+ case "builtin":
199
+ return "builtin";
200
+ case "local":
201
+ return `local:${spec.path}`;
202
+ case "git":
203
+ return spec.subpath !== undefined
204
+ ? `git:${spec.repo}//${spec.subpath}#${spec.tag}`
205
+ : `git:${spec.repo}#${spec.tag}`;
206
+ case "npm": {
207
+ const name = spec.scope !== undefined
208
+ ? `${spec.scope}/${spec.name}`
209
+ : spec.name;
210
+ return `npm:${name}@${spec.range}`;
211
+ }
212
+ }
213
+ }
214
+ /**
215
+ * Resolve every profile chain tier into an upstream record. Each tier's
216
+ * `markspec.yaml` is read from `tier.sourcePath` via `readFile` and
217
+ * `sha256:*`-hashed; a read failure attaches MSL-L102 and degrades the
218
+ * tier's hash to `sha256:0` (identity-only).
219
+ *
220
+ * The `extends` chain is reconstructed from list order: tiers are
221
+ * already root-parent → leaf-child, so each tier's `extends` points to
222
+ * the previous tier's id. The root tier has `extends: undefined`.
223
+ */
224
+ export async function resolveProfileChain(chain, readFile) {
225
+ if (Array.isArray(chain))
226
+ return [];
227
+ const realChain = chain;
228
+ const out = [];
229
+ let parentId = undefined;
230
+ for (const tier of realChain.tiers) {
231
+ const diagnostics = [];
232
+ let hash = "sha256:0";
233
+ const fetched = await readFile(tier.sourcePath);
234
+ if (fetched instanceof Uint8Array) {
235
+ hash = await sha256Bytes(fetched);
236
+ }
237
+ else {
238
+ diagnostics.push({
239
+ code: "MSL-L102",
240
+ severity: "warning",
241
+ message: `Failed to read profile manifest at ${tier.sourcePath}: ${fetched.error}. Recording identity-only hash.`,
242
+ location: undefined,
243
+ });
244
+ }
245
+ out.push({
246
+ upstream: {
247
+ kind: "profile",
248
+ id: tier.id,
249
+ specifier: formatSpecifier(tier.specifier),
250
+ resolved: tier.version,
251
+ hash,
252
+ extends: parentId,
253
+ },
254
+ diagnostics,
255
+ });
256
+ parentId = tier.id;
257
+ }
258
+ return out;
259
+ }
260
+ // ---------------------------------------------------------------------------
261
+ // Registry resolution (Task 16)
262
+ // ---------------------------------------------------------------------------
263
+ /**
264
+ * Resolve federated parent registries (and the fallback, when not already
265
+ * listed). Each URL's `<url>/manifest` is fetched; the body is parsed
266
+ * loosely for `markspec-schema` (defaults to 1 on parse failure).
267
+ */
268
+ export async function resolveRegistries(config, fetchUrl) {
269
+ const urls = [...config.parents];
270
+ if (config.parentFallback && !urls.includes(config.parentFallback)) {
271
+ urls.push(config.parentFallback);
272
+ }
273
+ const out = [];
274
+ for (const url of urls) {
275
+ const manifestUrl = url.endsWith("/")
276
+ ? `${url}manifest`
277
+ : `${url}/manifest`;
278
+ const fetched = await fetchUrl(manifestUrl);
279
+ if (fetched instanceof Uint8Array) {
280
+ const hash = await sha256Bytes(fetched);
281
+ let markspecSchema = 1;
282
+ try {
283
+ const parsed = JSON.parse(new TextDecoder().decode(fetched));
284
+ if (typeof parsed["markspec-schema"] === "number") {
285
+ markspecSchema = parsed["markspec-schema"];
286
+ }
287
+ }
288
+ catch { /* leave default */ }
289
+ out.push({
290
+ upstream: {
291
+ kind: "registry",
292
+ id: `urn:markspec:registry:${url}`,
293
+ api: url,
294
+ resolvedManifestHash: hash,
295
+ markspecSchema,
296
+ },
297
+ diagnostics: [],
298
+ });
299
+ }
300
+ else {
301
+ out.push({
302
+ upstream: {
303
+ kind: "registry",
304
+ id: `urn:markspec:registry:${url}`,
305
+ api: url,
306
+ resolvedManifestHash: "sha256:0",
307
+ markspecSchema: 1,
308
+ },
309
+ diagnostics: [{
310
+ code: "MSL-L101",
311
+ severity: "warning",
312
+ message: `Failed to fetch registry manifest from ${manifestUrl}: ${fetched.error}`,
313
+ location: undefined,
314
+ }],
315
+ });
316
+ }
317
+ }
318
+ return out;
319
+ }
320
+ // ---------------------------------------------------------------------------
321
+ // Bound-entry resolution (Task 17)
322
+ // ---------------------------------------------------------------------------
323
+ /**
324
+ * Resolve every entry carrying `External-id:` attributes into a
325
+ * `ResolvedBoundEntry`. For each External-id, look up the mapping by
326
+ * scheme prefix, compute the locked-attribute set, and snapshot each
327
+ * local value as `sha256:*` of UTF-8 bytes.
328
+ *
329
+ * Unknown scheme → MSL-S021 error, that binding skipped. Entries with
330
+ * zero External-id attributes are silently dropped (no upstream lock
331
+ * needed). Multi-value attributes are joined with `\n` before hashing
332
+ * so a single locked-attribute hash captures the full attribute state.
333
+ */
334
+ export async function resolveBoundEntries(entries, mappings) {
335
+ const mappingBySystem = new Map();
336
+ for (const m of mappings)
337
+ mappingBySystem.set(m.system, m);
338
+ const out = [];
339
+ for (const entry of entries) {
340
+ const externalIds = [];
341
+ for (const a of entry.rawAttributes) {
342
+ if (a.key === "External-id")
343
+ externalIds.push(a.value);
344
+ }
345
+ if (externalIds.length === 0)
346
+ continue;
347
+ const diagnostics = [];
348
+ const bindings = [];
349
+ for (const eid of externalIds) {
350
+ const colonIdx = eid.indexOf(":");
351
+ const scheme = colonIdx >= 0 ? eid.slice(0, colonIdx) : eid;
352
+ const mapping = mappingBySystem.get(scheme);
353
+ if (!mapping) {
354
+ diagnostics.push({
355
+ code: "MSL-S021",
356
+ severity: "error",
357
+ message: `External-id scheme '${scheme}' on entry '${entry.displayId}' has no matching mapping.yaml.`,
358
+ location: entry.location,
359
+ });
360
+ continue;
361
+ }
362
+ const lockedAttrNames = inferLockedAttributes(mapping);
363
+ const lockedAttributes = new Map();
364
+ for (const attrName of lockedAttrNames) {
365
+ const value = entry.rawAttributes
366
+ .filter((a) => a.key === attrName)
367
+ .map((a) => a.value)
368
+ .join("\n");
369
+ const hash = await sha256Bytes(new TextEncoder().encode(value));
370
+ lockedAttributes.set(attrName, hash);
371
+ }
372
+ bindings.push({
373
+ externalId: eid,
374
+ system: scheme,
375
+ direction: mapping.direction,
376
+ lockedAttributes,
377
+ });
378
+ }
379
+ out.push({
380
+ boundEntry: {
381
+ displayId: entry.displayId,
382
+ ulid: entry.id ?? "",
383
+ bindings,
384
+ },
385
+ diagnostics,
386
+ });
387
+ }
388
+ return out;
389
+ }
@@ -0,0 +1,14 @@
1
+ /**
2
+ * @module core/lock/serializer
3
+ *
4
+ * Deterministic TOML emitter for the Lockfile model. Tables and keys in
5
+ * fixed order; arrays sorted by primary key; identical input → byte-
6
+ * identical output. We hand-roll the emitter rather than using
7
+ * @std/toml/stringify because we need (a) generated-file header
8
+ * comment, (b) precise control over nested array-of-tables emission
9
+ * order, (c) guaranteed key sort.
10
+ */
11
+ import type { Lockfile } from "./model.js";
12
+ /** Emit a deterministic TOML representation of a Lockfile. */
13
+ export declare function serializeLockfile(lf: Lockfile): string;
14
+ //# sourceMappingURL=serializer.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"serializer.d.ts","sourceRoot":"","sources":["../../src/lock/serializer.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,KAAK,EACV,QAAQ,EAIT,MAAM,YAAY,CAAC;AAMpB,8DAA8D;AAC9D,wBAAgB,iBAAiB,CAAC,EAAE,EAAE,QAAQ,GAAG,MAAM,CAwFtD"}
@@ -0,0 +1,104 @@
1
+ /**
2
+ * @module core/lock/serializer
3
+ *
4
+ * Deterministic TOML emitter for the Lockfile model. Tables and keys in
5
+ * fixed order; arrays sorted by primary key; identical input → byte-
6
+ * identical output. We hand-roll the emitter rather than using
7
+ * @std/toml/stringify because we need (a) generated-file header
8
+ * comment, (b) precise control over nested array-of-tables emission
9
+ * order, (c) guaranteed key sort.
10
+ */
11
+ const HEADER = "# @generated by `markspec lock` — do not hand-edit. Run `markspec lock`.\n" +
12
+ "# See https://markspec.dev/lock for the format.\n";
13
+ /** Emit a deterministic TOML representation of a Lockfile. */
14
+ export function serializeLockfile(lf) {
15
+ const parts = [HEADER];
16
+ parts.push(`schema = ${lf.schema}\n\n`);
17
+ parts.push("[meta]\n");
18
+ parts.push(`markspec-schema = ${lf.meta.markspecSchema}\n`);
19
+ parts.push(`locked-at = ${tomlString(lf.meta.lockedAt)}\n`);
20
+ const refs = lf.upstreams
21
+ .filter((u) => u.kind === "reference")
22
+ .slice()
23
+ .sort((a, b) => a.slug.localeCompare(b.slug));
24
+ for (const r of refs) {
25
+ parts.push("\n[[upstream.reference]]\n");
26
+ parts.push(`slug = ${tomlString(r.slug)}\n`);
27
+ parts.push(`id = ${tomlString(r.id)}\n`);
28
+ if (r.resolved !== undefined) {
29
+ parts.push(`resolved = ${tomlString(r.resolved)}\n`);
30
+ }
31
+ if (r.hash !== undefined)
32
+ parts.push(`hash = ${tomlString(r.hash)}\n`);
33
+ if (r.source !== undefined) {
34
+ parts.push(`source = ${tomlString(r.source)}\n`);
35
+ }
36
+ if (r.componentScheme !== undefined) {
37
+ parts.push(`component-scheme = ${tomlString(r.componentScheme)}\n`);
38
+ }
39
+ }
40
+ const profs = lf.upstreams
41
+ .filter((u) => u.kind === "profile")
42
+ .slice()
43
+ .sort((a, b) => a.id.localeCompare(b.id));
44
+ for (const p of profs) {
45
+ parts.push("\n[[upstream.profile]]\n");
46
+ parts.push(`id = ${tomlString(p.id)}\n`);
47
+ parts.push(`specifier = ${tomlString(p.specifier)}\n`);
48
+ parts.push(`resolved = ${tomlString(p.resolved)}\n`);
49
+ parts.push(`hash = ${tomlString(p.hash)}\n`);
50
+ if (p.extends !== undefined) {
51
+ parts.push(`extends = ${tomlString(p.extends)}\n`);
52
+ }
53
+ }
54
+ const regs = lf.upstreams
55
+ .filter((u) => u.kind === "registry")
56
+ .slice()
57
+ .sort((a, b) => a.id.localeCompare(b.id));
58
+ for (const r of regs) {
59
+ parts.push("\n[[upstream.registry]]\n");
60
+ parts.push(`id = ${tomlString(r.id)}\n`);
61
+ parts.push(`api = ${tomlString(r.api)}\n`);
62
+ parts.push(`resolved-manifest-hash = ${tomlString(r.resolvedManifestHash)}\n`);
63
+ parts.push(`markspec-schema = ${r.markspecSchema}\n`);
64
+ }
65
+ const bounds = lf.boundEntries.slice().sort((a, b) => a.displayId.localeCompare(b.displayId));
66
+ for (const be of bounds) {
67
+ parts.push("\n[[bound-entry]]\n");
68
+ parts.push(`display-id = ${tomlString(be.displayId)}\n`);
69
+ parts.push(`ulid = ${tomlString(be.ulid)}\n`);
70
+ const bindings = be.bindings.slice().sort((a, b) => a.system.localeCompare(b.system));
71
+ for (const b of bindings) {
72
+ parts.push("\n[[bound-entry.binding]]\n");
73
+ parts.push(`external-id = ${tomlString(b.externalId)}\n`);
74
+ parts.push(`system = ${tomlString(b.system)}\n`);
75
+ parts.push(`direction = ${tomlString(b.direction)}\n`);
76
+ if (b.lockedAttributes.size > 0) {
77
+ parts.push("\n[bound-entry.binding.locked-attributes]\n");
78
+ const sortedAttrs = [...b.lockedAttributes.entries()]
79
+ .sort(([k1], [k2]) => k1.localeCompare(k2));
80
+ for (const [k, v] of sortedAttrs) {
81
+ parts.push(`${k} = ${tomlString(v)}\n`);
82
+ }
83
+ }
84
+ }
85
+ }
86
+ parts.push("\n[generated-cache]\n");
87
+ parts.push(`edges-hash = ${tomlString(lf.generatedCache.edgesHash)}\n`);
88
+ parts.push(`edges-count = ${lf.generatedCache.edgesCount}\n`);
89
+ return parts.join("");
90
+ }
91
+ /**
92
+ * Emit a TOML basic string. Backslash and double-quote escaped; the three
93
+ * common whitespace control characters (`\n`, `\r`, `\t`) are escaped so
94
+ * that opaque external-system inputs (e.g. an `externalId` containing a
95
+ * newline) cannot produce invalid TOML.
96
+ */
97
+ function tomlString(s) {
98
+ return `"${s
99
+ .replace(/\\/g, "\\\\")
100
+ .replace(/"/g, '\\"')
101
+ .replace(/\n/g, "\\n")
102
+ .replace(/\r/g, "\\r")
103
+ .replace(/\t/g, "\\t")}"`;
104
+ }
package/esm/mod.d.ts CHANGED
@@ -8,36 +8,43 @@
8
8
  * from core/mod.ts, never from internal paths.
9
9
  */
10
10
  import "./_dnt.polyfills.js";
11
- export declare const VERSION = "0.5.0";
11
+ export declare const VERSION = "0.6.0";
12
12
  export declare const CORE_SCHEMA_VERSION = 1;
13
- export { ConfigError, DEFAULT_PROJECT_CONFIG, PALETTE_HUES, REFHUB_URL, } from "./model/mod.js";
14
- export type { Attribute, Caption, CaptionConventions, CaptionPosition, ConfigFieldError, Diagnostic, Directive, DisplayId, EffectiveProfile, EffectiveTypeDef, EntityRef, EntityRefConvention, Entry, EntryShape, EntrySource, InlineRef, LabelConcern, LabelConcernKind, LabelValue, Link, LinkKind, PaletteHue, ProfileChain, ProfileConvention, ProjectConfig, ProvenancedMap, ProvenancedMapEntry, ProvenancedValue, Severity, SourceLocation, Ulid, } from "./model/mod.js";
13
+ export { ConfigError, CORE_DISCIPLINE_REGISTRY, CORE_KINDS, DEFAULT_PROJECT_CONFIG, KNOWN_LINK_KINDS, makeDisplayId, makeUlid, MIXED_DISCIPLINE, PALETTE_HUES, REFHUB_URL, } from "./model/mod.js";
14
+ export type { Attribute, BodyToken, BodyTokenKind, Caption, CaptionConventions, CaptionPosition, ConfigFieldError, Diagnostic, Directive, Discipline, DisciplineRegistry, DisplayId, EarsTrigger, EffectiveProfile, EffectiveTypeDef, EntityRefConvention, Entry, EntryShape, EntrySource, ExtractorRule, InlineRef, KindDecl, LabelConcern, LabelConcernKind, LabelValue, Link, LinkKind, LoadedProfile, ModalCase, PaletteHue, ProfileChain, ProfileConvention, ProjectConfig, ProvenancedMap, ProvenancedMapEntry, ProvenancedValue, Severity, SourceLocation, Ulid, } from "./model/mod.js";
15
15
  export { astEquivalent } from "./ast/equivalence.js";
16
16
  export { normalizeBodyAst } from "./ast/normalize.js";
17
17
  export { render } from "./ast/render.js";
18
- export type { AdmonitionKind, BlockquoteNode, BodyBlock, CaptionNode, CodeNode, DefinitionListNode, DefinitionPair, EntityRefMarker, FeatureNode, FigureNode, InlineContent, InlineMarker, ListItemNode, ListNode, MathNode, ModalMarker, ModalMarkerClass, NoteNode, ParagraphNode, SourceRange, TableNode, UnknownNode, } from "./ast/nodes.js";
18
+ export type { AdmonitionKind, BlockquoteNode, BodyBlock, CaptionNode, CodeNode, DefinitionListNode, DefinitionPair, FeatureNode, FigureNode, InlineContent, ListItemNode, ListNode, MathNode, NoteNode, ParagraphNode, SourceRange, TableNode, UnknownNode, } from "./ast/nodes.js";
19
19
  export { discoverProjectRoot, loadConfig, parseProjectConfig, } from "./config/mod.js";
20
20
  export type { LoadConfigResult, ReadFile } from "./config/mod.js";
21
21
  export { addProfileSpecifier, MARKSPEC_YAML_FILENAME, parseMarkspecYaml, readMarkspecYaml, } from "./config/markspec.js";
22
22
  export type { MarkspecYaml, ParseMarkspecYamlResult, } from "./config/markspec.js";
23
23
  export { computeCacheKey, computeCacheLocation, defaultAppendFile, defaultRunGit, ensureCacheGitignored, loadChain, loadProfileForCommand, mergeChain, parseManifest, resolveEntryColor, resolveGitSpecifier, resolveLocalSpecifier, } from "./profile/mod.js";
24
24
  export type { AppendFile, CacheLocation, GitCacheKeyInput, LoadChainOptions, LoadChainResult, LoadProfileForCommandResult, MergeResult, ParseManifestResult, ResolvedProfileSource, ResolveGitOptions, RunGit, RunGitResult, } from "./profile/mod.js";
25
+ export { buildEffectiveDisciplineRegistry } from "./profile/mod.js";
26
+ export { inferDisciplineMode, resolveDisciplineMode } from "./profile/mod.js";
25
27
  export { buildProfileIntrospection } from "./profile/mod.js";
26
28
  export type { AttributeDetail, ConventionDetail, LabelConcernDetail, ProfileElementDetail, ProfileElementKind, ProfileElementRef, ProfileIntrospection, ProfileOverview, ProvenancedDescription, RelationDetail, TypeDetail, } from "./profile/mod.js";
27
29
  export { detectCaptions, detectDirectives, detectInlineRefs, isSupportedExtension, loadGrammar, parse, parseFile, parseSource, } from "./parser/mod.js";
28
- export type { DetectCaptionsOptions, DetectDirectivesOptions, DetectInlineRefsOptions, ParseFileResult, ParseOptions, ParseSourceOptions, ParseSourceResult, } from "./parser/mod.js";
30
+ export type { DetectCaptionsOptions, DetectDirectivesOptions, DetectInlineRefsOptions, DocCommentBlockMeta, LanguageDocCommentSpec, LineMap, ParseFileResult, ParseOptions, ParseSourceOptions, ParseSourceResult, SupportedLanguage, } from "./parser/mod.js";
29
31
  export { format } from "./formatter/mod.js";
30
32
  export type { FormatOptions, FormatResult } from "./formatter/mod.js";
31
- export { classifyEntriesStage, classifyEntry, compileDisplayIdPattern, effectiveScope, effectiveTraceRules, matchesAnyTarget, normalizeListValues, runPipeline, validate, validateAttributesForEntry, validateListingDocuments, validateTraceabilityForEntry, validateValue, } from "./validator/mod.js";
33
+ export { classifyEntriesStage, classifyEntry, compileDisplayIdPattern, effectiveScope, effectiveTraceRules, matchesAnyTarget, normalizeListValues, runPipeline, suppressDeclaredAttrR010, validate, validateAttributesForEntry, validateListingDocuments, validateTraceabilityForEntry, validateValue, } from "./validator/mod.js";
32
34
  export type { ClassifyResult, ClassifyStageResult, EffectiveAttrScope, ListingFileContext, ListingKind, PipelineResult, ValidateResult, ValueValidator, } from "./validator/mod.js";
33
35
  export { compile, generateInverses, serializeCompileResult, } from "./compiler/mod.js";
34
- export type { CompileOptions, CompileResult, GenerateInversesResult, SerializedCompileResult, SerializedEntry, } from "./compiler/mod.js";
36
+ export type { CompileOptions, CompileResult, GenerateInversesResult, SerializedCompileResult, SerializedEntry, SerializedTypeRegistry, } from "./compiler/mod.js";
35
37
  export { buildManifest } from "./compiler/manifest.js";
36
38
  export type { ManifestEdgesBlock, ManifestEntriesBlock, ManifestJson, } from "./compiler/manifest.js";
37
39
  export { buildEdgesNdjson, buildEntriesNdjson, indexToJson, } from "./compiler/ndjson_writer.js";
38
40
  export type { EntriesNdjsonResult, EntryOffset, } from "./compiler/ndjson_writer.js";
39
41
  export { report } from "./reporter/mod.js";
40
42
  export type { ReportFormat, ReportKind, ReportOptions, } from "./reporter/mod.js";
41
- export { isProseScope, runLint } from "./lint/mod.js";
42
- export type { LintDiagnostic, LintOptions, LintResult } from "./lint/mod.js";
43
+ export { ANTI_PATTERN_NOTE, computeScoreRollup, isProseScope, runLint, } from "./lint/mod.js";
44
+ export type { EntryScore, LintDiagnostic, LintOptions, LintResult, RuleContribution, ScoreRollup, } from "./lint/mod.js";
45
+ export * as typl from "./typl/mod.js";
46
+ export { canonicalEdgeJson, checkDrift, extractEdgeQuads, hashCanonicalEdges, LOCKFILE_SCHEMA_VERSION, parseLockfile, resolveBoundEntries, resolveProfileChain, resolveReferences, resolveRegistries, resolveUpstreams, serializeLockfile, sha256Bytes, sha256String, } from "./lock/mod.js";
47
+ export type { BoundEntry as LockBoundEntry, BoundEntryBinding as LockBinding, EdgeQuad, FetchUrl, GeneratedCache, LockedAttributes, Lockfile, LockfileMeta, ParseLockfileResult, ReadFile as LockReadFile, ResolvedBoundEntry, ResolvedProfile, ResolvedReference, ResolvedRegistry, ResolvedUpstreams, ResolveUpstreamsOptions, Upstream, UpstreamProfile, UpstreamReference, UpstreamRegistry, } from "./lock/mod.js";
48
+ export { aggregateStatusByState, encodeLogLine, inferLockedAttributes, parseLogLine, parseMapping, validateMappings, } from "./sync/mod.js";
49
+ export type { AttributeMapping, BoundEntryStatus, ConflictPolicy, Direction as SyncDirection, Mapping, ParseMappingResult, RemoteState, SyncLogEntry, } from "./sync/mod.js";
43
50
  //# sourceMappingURL=mod.d.ts.map
package/esm/mod.d.ts.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"mod.d.ts","sourceRoot":"","sources":["../src/mod.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,OAAO,qBAAqB,CAAC;AAG7B,eAAO,MAAM,OAAO,UAAU,CAAC;AAC/B,eAAO,MAAM,mBAAmB,IAAI,CAAC;AAGrC,OAAO,EACL,WAAW,EACX,sBAAsB,EACtB,YAAY,EACZ,UAAU,GACX,MAAM,gBAAgB,CAAC;AACxB,YAAY,EACV,SAAS,EACT,OAAO,EACP,kBAAkB,EAClB,eAAe,EACf,gBAAgB,EAChB,UAAU,EACV,SAAS,EACT,SAAS,EACT,gBAAgB,EAChB,gBAAgB,EAChB,SAAS,EACT,mBAAmB,EACnB,KAAK,EACL,UAAU,EACV,WAAW,EACX,SAAS,EACT,YAAY,EACZ,gBAAgB,EAChB,UAAU,EACV,IAAI,EACJ,QAAQ,EACR,UAAU,EACV,YAAY,EACZ,iBAAiB,EACjB,aAAa,EACb,cAAc,EACd,mBAAmB,EACnB,gBAAgB,EAChB,QAAQ,EACR,cAAc,EACd,IAAI,GACL,MAAM,gBAAgB,CAAC;AAIxB,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAC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gBAAgB,EAChB,cAAc,EACd,SAAS,IAAI,aAAa,EAC1B,OAAO,EACP,kBAAkB,EAClB,WAAW,EACX,YAAY,GACb,MAAM,eAAe,CAAC"}
package/esm/mod.js CHANGED
@@ -8,10 +8,10 @@
8
8
  * from core/mod.ts, never from internal paths.
9
9
  */
10
10
  import "./_dnt.polyfills.js";
11
- export const VERSION = "0.5.0";
11
+ export const VERSION = "0.6.0";
12
12
  export const CORE_SCHEMA_VERSION = 1;
13
13
  // Model types
14
- export { ConfigError, DEFAULT_PROJECT_CONFIG, PALETTE_HUES, REFHUB_URL, } from "./model/mod.js";
14
+ export { ConfigError, CORE_DISCIPLINE_REGISTRY, CORE_KINDS, DEFAULT_PROJECT_CONFIG, KNOWN_LINK_KINDS, makeDisplayId, makeUlid, MIXED_DISCIPLINE, PALETTE_HUES, REFHUB_URL, } from "./model/mod.js";
15
15
  // AST (canonical body-AST — spec docs/specs/markspec-core-data-model.md §2)
16
16
  // SourceRange is body-relative (no `file`); use SourceLocation for file-absolute positions.
17
17
  export { astEquivalent } from "./ast/equivalence.js";
@@ -22,13 +22,16 @@ export { discoverProjectRoot, loadConfig, parseProjectConfig, } from "./config/m
22
22
  export { addProfileSpecifier, MARKSPEC_YAML_FILENAME, parseMarkspecYaml, readMarkspecYaml, } from "./config/markspec.js";
23
23
  // Profile system (ADR-008)
24
24
  export { computeCacheKey, computeCacheLocation, defaultAppendFile, defaultRunGit, ensureCacheGitignored, loadChain, loadProfileForCommand, mergeChain, parseManifest, resolveEntryColor, resolveGitSpecifier, resolveLocalSpecifier, } from "./profile/mod.js";
25
+ export { buildEffectiveDisciplineRegistry } from "./profile/mod.js";
26
+ export { inferDisciplineMode, resolveDisciplineMode } from "./profile/mod.js";
27
+ // DisciplineMode type already re-exported via Task 2.
25
28
  export { buildProfileIntrospection } from "./profile/mod.js";
26
29
  // Parser
27
30
  export { detectCaptions, detectDirectives, detectInlineRefs, isSupportedExtension, loadGrammar, parse, parseFile, parseSource, } from "./parser/mod.js";
28
31
  // Formatter
29
32
  export { format } from "./formatter/mod.js";
30
33
  // Validator
31
- export { classifyEntriesStage, classifyEntry, compileDisplayIdPattern, effectiveScope, effectiveTraceRules, matchesAnyTarget, normalizeListValues, runPipeline, validate, validateAttributesForEntry, validateListingDocuments, validateTraceabilityForEntry, validateValue, } from "./validator/mod.js";
34
+ export { classifyEntriesStage, classifyEntry, compileDisplayIdPattern, effectiveScope, effectiveTraceRules, matchesAnyTarget, normalizeListValues, runPipeline, suppressDeclaredAttrR010, validate, validateAttributesForEntry, validateListingDocuments, validateTraceabilityForEntry, validateValue, } from "./validator/mod.js";
32
35
  // Compiler
33
36
  export { compile, generateInverses, serializeCompileResult, } from "./compiler/mod.js";
34
37
  export { buildManifest } from "./compiler/manifest.js";
@@ -36,4 +39,9 @@ export { buildEdgesNdjson, buildEntriesNdjson, indexToJson, } from "./compiler/n
36
39
  // Reporter
37
40
  export { report } from "./reporter/mod.js";
38
41
  // Lint (prose-analysis)
39
- export { isProseScope, runLint } from "./lint/mod.js";
42
+ export { ANTI_PATTERN_NOTE, computeScoreRollup, isProseScope, runLint, } from "./lint/mod.js";
43
+ export * as typl from "./typl/mod.js";
44
+ // ── Lockfile (ADR-022) ───────────────────────────────────────────────────
45
+ export { canonicalEdgeJson, checkDrift, extractEdgeQuads, hashCanonicalEdges, LOCKFILE_SCHEMA_VERSION, parseLockfile, resolveBoundEntries, resolveProfileChain, resolveReferences, resolveRegistries, resolveUpstreams, serializeLockfile, sha256Bytes, sha256String, } from "./lock/mod.js";
46
+ // ── External sync model (ADR-022) ────────────────────────────────────────
47
+ export { aggregateStatusByState, encodeLogLine, inferLockedAttributes, parseLogLine, parseMapping, validateMappings, } from "./sync/mod.js";
@@ -42,6 +42,12 @@ export interface AttributeSpec {
42
42
  export declare const ATTRIBUTE_CATALOG: readonly AttributeSpec[];
43
43
  /** Canonical Title-Case attribute keys the core recognizes. */
44
44
  export declare const UNIVERSAL_ATTRIBUTE_KEYS: readonly string[];
45
+ /**
46
+ * Attribute value types that accept CSV on input but must be emitted as
47
+ * multi-line per ADR-002 §2.6. `citation` is excluded — locators may contain
48
+ * commas.
49
+ */
50
+ export declare const CSV_SPLITTABLE_TYPES: ReadonlySet<string>;
45
51
  /** Look up an attribute specification by its canonical key. */
46
52
  export declare function attributeSpec(key: string): AttributeSpec | undefined;
47
53
  //# sourceMappingURL=attributes.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"attributes.d.ts","sourceRoot":"","sources":["../../src/model/attributes.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,KAAK,EAAE,eAAe,EAAE,kBAAkB,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAMhF,oDAAoD;AACpD,MAAM,WAAW,aAAa;IAC5B,uDAAuD;IACvD,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IACrB,0CAA0C;IAC1C,QAAQ,CAAC,IAAI,EAAE,kBAAkB,CAAC;IAClC,0CAA0C;IAC1C,QAAQ,CAAC,MAAM,EAAE,eAAe,CAAC;IACjC;;;OAGG;IACH,QAAQ,CAAC,MAAM,EAAE,SAAS,UAAU,EAAE,CAAC;IACvC,yCAAyC;IACzC,QAAQ,CAAC,QAAQ,EAAE,OAAO,CAAC;IAC3B,sDAAsD;IACtD,QAAQ,CAAC,UAAU,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;CACzC;AAgBD;;;;;;;;;;GAUG;AACH,eAAO,MAAM,iBAAiB,EAAE,SAAS,aAAa,EA0NrD,CAAC;AAEF,+DAA+D;AAC/D,eAAO,MAAM,wBAAwB,EAAE,SAAS,MAAM,EAC5B,CAAC;AAU3B,+DAA+D;AAC/D,wBAAgB,aAAa,CAAC,GAAG,EAAE,MAAM,GAAG,aAAa,GAAG,SAAS,CAEpE"}
1
+ {"version":3,"file":"attributes.d.ts","sourceRoot":"","sources":["../../src/model/attributes.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,KAAK,E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