@agentshouse/mdmodel 0.1.0-cd5ace6e0b27a → 0.1.0-cd6a8e5bc7efc

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 (301) hide show
  1. package/API.md +81 -82
  2. package/README.md +12 -13
  3. package/dist/body.d.ts +85 -0
  4. package/dist/body.d.ts.map +1 -0
  5. package/dist/body.js +1083 -0
  6. package/dist/built-in.d.ts +4 -0
  7. package/dist/built-in.d.ts.map +1 -0
  8. package/dist/built-in.js +19 -0
  9. package/dist/crockford.d.ts +4 -0
  10. package/dist/crockford.d.ts.map +1 -0
  11. package/dist/crockford.js +3 -0
  12. package/dist/definition.d.ts +4 -9
  13. package/dist/definition.d.ts.map +1 -1
  14. package/dist/definition.js +102 -95
  15. package/dist/document.d.ts +7 -4
  16. package/dist/document.d.ts.map +1 -1
  17. package/dist/document.js +583 -73
  18. package/dist/event.d.ts +1 -2
  19. package/dist/event.d.ts.map +1 -1
  20. package/dist/event.js +1 -2
  21. package/dist/fields.d.ts +1 -1
  22. package/dist/fields.d.ts.map +1 -1
  23. package/dist/fields.js +1 -1
  24. package/dist/form.d.ts.map +1 -1
  25. package/dist/form.js +17 -4
  26. package/dist/house-model.d.ts +827 -0
  27. package/dist/house-model.d.ts.map +1 -0
  28. package/dist/house-model.js +459 -0
  29. package/dist/house-references.d.ts +4 -0
  30. package/dist/house-references.d.ts.map +1 -0
  31. package/dist/house-references.js +7 -0
  32. package/dist/index.d.ts +13 -4
  33. package/dist/index.d.ts.map +1 -1
  34. package/dist/index.js +8 -2
  35. package/dist/markdown.d.ts +28 -4
  36. package/dist/markdown.d.ts.map +1 -1
  37. package/dist/markdown.js +26 -32
  38. package/dist/paths.d.ts +1 -0
  39. package/dist/paths.d.ts.map +1 -1
  40. package/dist/paths.js +27 -0
  41. package/dist/project.d.ts.map +1 -1
  42. package/dist/project.js +21 -43
  43. package/dist/refuse.d.ts +1 -0
  44. package/dist/refuse.d.ts.map +1 -1
  45. package/dist/refuse.js +1 -0
  46. package/dist/room-types.d.ts +7 -0
  47. package/dist/room-types.d.ts.map +1 -0
  48. package/dist/room-types.js +136 -0
  49. package/dist/schema.d.ts +0 -2
  50. package/dist/schema.d.ts.map +1 -1
  51. package/dist/schema.js +5 -68
  52. package/dist/types.d.ts +3 -6
  53. package/dist/types.d.ts.map +1 -1
  54. package/dist/validate.d.ts +2 -1
  55. package/dist/validate.d.ts.map +1 -1
  56. package/dist/validate.js +74 -139
  57. package/fixtures/README.md +33 -23
  58. package/fixtures/cases/absent-link-dangles/library/item.md +1 -1
  59. package/fixtures/cases/absent-link-dangles/schema.yaml +2 -3
  60. package/fixtures/cases/absent-optional-field/library/companies/acme.md +1 -1
  61. package/fixtures/cases/absent-optional-field/library/deals/lead.md +3 -3
  62. package/fixtures/cases/absent-optional-field/schema.yaml +10 -11
  63. package/fixtures/cases/absolute-link/library/item.md +1 -1
  64. package/fixtures/cases/absolute-link/schema.yaml +2 -3
  65. package/fixtures/cases/attachment-reference-any-file/library/companies/acme.md +1 -1
  66. package/fixtures/cases/attachment-reference-any-file/library/deals/renewal.md +13 -10
  67. package/fixtures/cases/attachment-reference-any-file/library/places/depot.md +1 -1
  68. package/fixtures/cases/attachment-reference-any-file/library/products/seats.md +1 -1
  69. package/fixtures/cases/attachment-reference-any-file/library/products/support.md +1 -1
  70. package/fixtures/cases/attachment-reference-dangles/library/companies/acme.md +1 -1
  71. package/fixtures/cases/attachment-reference-dangles/library/deals/renewal.md +13 -10
  72. package/fixtures/cases/attachment-reference-dangles/library/places/depot.md +1 -1
  73. package/fixtures/cases/attachment-reference-dangles/library/products/seats.md +1 -1
  74. package/fixtures/cases/attachment-reference-dangles/library/products/support.md +1 -1
  75. package/fixtures/cases/attachment-reference-outside/expected.json +2 -1
  76. package/fixtures/cases/attachment-reference-outside/library/companies/acme.md +1 -1
  77. package/fixtures/cases/attachment-reference-outside/library/deals/renewal.md +13 -10
  78. package/fixtures/cases/attachment-reference-outside/library/places/depot.md +1 -1
  79. package/fixtures/cases/attachment-reference-outside/library/products/seats.md +1 -1
  80. package/fixtures/cases/attachment-reference-outside/library/products/support.md +1 -1
  81. package/fixtures/cases/binary-any-reference/expected.json +2 -1
  82. package/fixtures/cases/binary-any-reference/library/notes/draft.md +1 -1
  83. package/fixtures/cases/binary-prototype-reference/expected.json +2 -1
  84. package/fixtures/cases/binary-prototype-reference/library/notes/draft.md +1 -1
  85. package/fixtures/cases/binary-typed-reference/expected.json +2 -1
  86. package/fixtures/cases/binary-typed-reference/library/notes/draft.md +1 -1
  87. package/fixtures/cases/boolean-field/expected.json +2 -1
  88. package/fixtures/cases/boolean-field/library/companies/acme.md +1 -1
  89. package/fixtures/cases/boolean-field/library/deals/renewal.md +49 -24
  90. package/fixtures/cases/boolean-field/schema.yaml +10 -11
  91. package/fixtures/cases/bracketed-link-definition/library/item.md +1 -1
  92. package/fixtures/cases/bracketed-link-definition/schema.yaml +2 -3
  93. package/fixtures/cases/closed-nested-object/expected.json +2 -1
  94. package/fixtures/cases/closed-nested-object/library/companies/acme.md +1 -1
  95. package/fixtures/cases/closed-nested-object/library/deals/renewal.md +50 -25
  96. package/fixtures/cases/closed-nested-object/schema.yaml +10 -11
  97. package/fixtures/cases/composed-root-reference/library/a.md +2 -2
  98. package/fixtures/cases/{conditional-section → conditional-long-text}/expected.json +3 -2
  99. package/fixtures/cases/{conditional-section → conditional-long-text}/library/questions/hosting.md +2 -2
  100. package/fixtures/cases/{conditional-section → conditional-long-text}/library/questions/payments.md +2 -2
  101. package/fixtures/cases/conditional-long-text/schema.yaml +13 -0
  102. package/fixtures/cases/cross-room-link/library/clients/acme.md +1 -1
  103. package/fixtures/cases/cross-room-reference/library/clients/acme.md +4 -4
  104. package/fixtures/cases/cross-room-reference/schema.yaml +1 -2
  105. package/fixtures/cases/date-time-format/expected.json +2 -1
  106. package/fixtures/cases/date-time-format/library/companies/acme.md +1 -1
  107. package/fixtures/cases/date-time-format/library/deals/renewal.md +49 -24
  108. package/fixtures/cases/date-time-format/schema.yaml +10 -11
  109. package/fixtures/cases/default-unfilled/library/companies/acme.md +1 -1
  110. package/fixtures/cases/default-unfilled/library/deals/renewal.md +47 -22
  111. package/fixtures/cases/default-unfilled/schema.yaml +10 -11
  112. package/fixtures/cases/defs-pattern/expected.json +2 -1
  113. package/fixtures/cases/defs-pattern/library/companies/acme.md +1 -1
  114. package/fixtures/cases/defs-pattern/library/deals/renewal.md +49 -24
  115. package/fixtures/cases/defs-pattern/schema.yaml +10 -11
  116. package/fixtures/cases/dependent-rule/library/companies/acme.md +1 -1
  117. package/fixtures/cases/dependent-rule/library/deals/renewal.md +48 -23
  118. package/fixtures/cases/dependent-rule/schema.yaml +10 -11
  119. package/fixtures/cases/duplicate-link-definition/library/item.md +1 -1
  120. package/fixtures/cases/duplicate-link-definition/schema.yaml +2 -3
  121. package/fixtures/cases/email-format/expected.json +2 -1
  122. package/fixtures/cases/email-format/library/companies/acme.md +1 -1
  123. package/fixtures/cases/email-format/library/deals/renewal.md +49 -24
  124. package/fixtures/cases/email-format/schema.yaml +10 -11
  125. package/fixtures/cases/fenced-link-definition/library/item.md +1 -1
  126. package/fixtures/cases/fenced-link-definition/schema.yaml +2 -3
  127. package/fixtures/cases/field-enum/expected.json +2 -1
  128. package/fixtures/cases/field-enum/library/item.md +2 -2
  129. package/fixtures/cases/field-enum/schema.yaml +3 -4
  130. package/fixtures/cases/integer-field/expected.json +2 -1
  131. package/fixtures/cases/integer-field/library/companies/acme.md +1 -1
  132. package/fixtures/cases/integer-field/library/deals/renewal.md +49 -24
  133. package/fixtures/cases/integer-field/schema.yaml +10 -11
  134. package/fixtures/cases/json-schema-constructs/library/companies/acme.md +1 -1
  135. package/fixtures/cases/json-schema-constructs/library/deals/renewal.md +49 -24
  136. package/fixtures/cases/json-schema-constructs/schema.yaml +10 -11
  137. package/fixtures/cases/labels-in-the-rooms-language/library/deals/atlas.md +4 -3
  138. package/fixtures/cases/lazy-list-item/library/item.md +3 -1
  139. package/fixtures/cases/lazy-list-item/schema.yaml +2 -2
  140. package/fixtures/cases/link-into-a-reserved-name/library/notes/a.md +1 -1
  141. package/fixtures/cases/list-item-enum/expected.json +7 -0
  142. package/fixtures/cases/list-item-enum/library/task.md +7 -0
  143. package/fixtures/cases/list-item-enum/schema.yaml +3 -0
  144. package/fixtures/cases/list-item-kind/expected.json +7 -0
  145. package/fixtures/cases/list-item-kind/library/task.md +6 -0
  146. package/fixtures/cases/list-item-kind/schema.yaml +3 -0
  147. package/fixtures/cases/list-items/library/page.md +26 -0
  148. package/fixtures/cases/list-items/schema.yaml +10 -0
  149. package/fixtures/cases/list-of-objects-closed/expected.json +2 -1
  150. package/fixtures/cases/list-of-objects-closed/library/companies/acme.md +1 -1
  151. package/fixtures/cases/list-of-objects-closed/library/deals/renewal.md +49 -25
  152. package/fixtures/cases/list-of-objects-closed/schema.yaml +10 -11
  153. package/fixtures/cases/list-of-objects-item/expected.json +2 -1
  154. package/fixtures/cases/list-of-objects-item/library/companies/acme.md +1 -1
  155. package/fixtures/cases/list-of-objects-item/library/deals/renewal.md +49 -24
  156. package/fixtures/cases/list-of-objects-item/schema.yaml +10 -11
  157. package/fixtures/cases/list-of-objects-reference/expected.json +2 -1
  158. package/fixtures/cases/list-of-objects-reference/library/companies/acme.md +1 -1
  159. package/fixtures/cases/list-of-objects-reference/library/deals/renewal.md +12 -9
  160. package/fixtures/cases/list-of-objects-reference/library/places/depot.md +1 -1
  161. package/fixtures/cases/list-of-objects-reference/library/products/seats.md +1 -1
  162. package/fixtures/cases/list-of-objects-reference/library/products/support.md +1 -1
  163. package/fixtures/cases/list-reference-path/expected.json +7 -0
  164. package/fixtures/cases/list-reference-path/library/page.md +5 -0
  165. package/fixtures/cases/list-reference-path/schema.yaml +3 -0
  166. package/fixtures/cases/list-reference-type/expected.json +7 -0
  167. package/fixtures/cases/list-reference-type/library/page.md +6 -0
  168. package/fixtures/cases/list-reference-type/schema.yaml +3 -0
  169. package/fixtures/cases/list-size/expected.json +2 -1
  170. package/fixtures/cases/list-size/library/companies/acme.md +1 -1
  171. package/fixtures/cases/list-size/library/deals/renewal.md +51 -24
  172. package/fixtures/cases/list-size/schema.yaml +10 -11
  173. package/fixtures/cases/malformed-list/expected.json +7 -0
  174. package/fixtures/cases/{structured-section → malformed-list}/library/item.md +1 -1
  175. package/fixtures/cases/malformed-list/schema.yaml +6 -0
  176. package/fixtures/cases/member-document/library/people/ana.md +2 -2
  177. package/fixtures/cases/member-on-another-type/library/note.md +1 -1
  178. package/fixtures/cases/missing-required-field/library/item.md +1 -1
  179. package/fixtures/cases/missing-required-field/schema.yaml +3 -4
  180. package/fixtures/cases/misspelled-key/expected.json +2 -1
  181. package/fixtures/cases/misspelled-key/library/companies/acme.md +1 -1
  182. package/fixtures/cases/misspelled-key/library/deals/renewal.md +50 -25
  183. package/fixtures/cases/misspelled-key/schema.yaml +10 -11
  184. package/fixtures/cases/nested-defs/expected.json +2 -1
  185. package/fixtures/cases/nested-defs/library/deal.md +3 -3
  186. package/fixtures/cases/nested-object-reference/expected.json +2 -1
  187. package/fixtures/cases/nested-object-reference/library/companies/acme.md +1 -1
  188. package/fixtures/cases/nested-object-reference/library/deals/renewal.md +12 -9
  189. package/fixtures/cases/nested-object-reference/library/places/depot.md +1 -1
  190. package/fixtures/cases/nested-object-reference/library/products/seats.md +1 -1
  191. package/fixtures/cases/nested-object-reference/library/products/support.md +1 -1
  192. package/fixtures/cases/nested-reference/library/companies/acme.md +1 -1
  193. package/fixtures/cases/nested-reference/library/deals/renewal.md +13 -10
  194. package/fixtures/cases/nested-reference/library/places/depot.md +1 -1
  195. package/fixtures/cases/nested-reference/library/products/seats.md +1 -1
  196. package/fixtures/cases/nested-reference/library/products/support.md +1 -1
  197. package/fixtures/cases/nested-required-field/expected.json +2 -1
  198. package/fixtures/cases/nested-required-field/library/companies/acme.md +1 -1
  199. package/fixtures/cases/nested-required-field/library/deals/renewal.md +48 -23
  200. package/fixtures/cases/nested-required-field/schema.yaml +10 -11
  201. package/fixtures/cases/numeric-range/expected.json +2 -1
  202. package/fixtures/cases/numeric-range/library/companies/acme.md +1 -1
  203. package/fixtures/cases/numeric-range/library/deals/renewal.md +49 -24
  204. package/fixtures/cases/numeric-range/schema.yaml +10 -11
  205. package/fixtures/cases/one-of-variant/expected.json +2 -1
  206. package/fixtures/cases/one-of-variant/library/companies/acme.md +1 -1
  207. package/fixtures/cases/one-of-variant/library/deals/renewal.md +49 -24
  208. package/fixtures/cases/one-of-variant/schema.yaml +10 -11
  209. package/fixtures/cases/other-room-reference/expected.json +2 -1
  210. package/fixtures/cases/other-room-reference/library/companies/acme.md +1 -1
  211. package/fixtures/cases/other-room-reference/library/deals/renewal.md +12 -9
  212. package/fixtures/cases/other-room-reference/library/places/depot.md +1 -1
  213. package/fixtures/cases/other-room-reference/library/products/seats.md +1 -1
  214. package/fixtures/cases/other-room-reference/library/products/support.md +1 -1
  215. package/fixtures/cases/prototype-field/expected.json +2 -1
  216. package/fixtures/cases/prototype-field/library/item.md +2 -2
  217. package/fixtures/cases/prototype-field/schema.yaml +2 -3
  218. package/fixtures/cases/reference-into-a-reserved-name/expected.json +2 -1
  219. package/fixtures/cases/reference-into-a-reserved-name/library/notes/a.md +1 -1
  220. package/fixtures/cases/referenced-missing-file/library/a.md +2 -2
  221. package/fixtures/cases/referenced-missing-file/library/b.md +2 -2
  222. package/fixtures/cases/referenced-missing-file/schema.yaml +3 -4
  223. package/fixtures/cases/sections-keyword-refused/expected.json +5 -0
  224. package/fixtures/cases/{structured-section → sections-keyword-refused}/schema.yaml +1 -2
  225. package/fixtures/cases/shortcut-reference-link/library/item.md +1 -1
  226. package/fixtures/cases/shortcut-reference-link/schema.yaml +2 -3
  227. package/fixtures/cases/string-length/expected.json +2 -1
  228. package/fixtures/cases/string-length/library/companies/acme.md +1 -1
  229. package/fixtures/cases/string-length/library/deals/renewal.md +49 -24
  230. package/fixtures/cases/string-length/schema.yaml +10 -11
  231. package/fixtures/cases/submission-keys/library/notes/visitor.md +2 -2
  232. package/fixtures/cases/text-field-kind/expected.json +1 -4
  233. package/fixtures/cases/text-field-kind/library/page.md +1 -1
  234. package/fixtures/cases/thematic-break-ends-the-values/expected.json +1 -0
  235. package/fixtures/cases/thematic-break-ends-the-values/library/item.md +10 -0
  236. package/fixtures/cases/thematic-break-ends-the-values/schema.yaml +3 -0
  237. package/fixtures/cases/typed-path-names-its-type/library/settings/prefs/one.md +1 -1
  238. package/fixtures/cases/types-folder-content/library/types/task.md +1 -1
  239. package/fixtures/cases/undeclared-field/expected.json +2 -1
  240. package/fixtures/cases/undeclared-field/library/item.md +2 -2
  241. package/fixtures/cases/undeclared-field/schema.yaml +2 -3
  242. package/fixtures/cases/unevaluated-items-closed/expected.json +2 -1
  243. package/fixtures/cases/unevaluated-items-closed/library/trip.md +13 -3
  244. package/fixtures/cases/unnamed-typed-path-checks-its-fields/library/rooms/team/tasks/plan.md +2 -1
  245. package/fixtures/cases/unnamed-typed-path-names-a-type/library/rooms/team/tasks/plan.md +3 -2
  246. package/fixtures/cases/unnamed-typed-path-reads-its-type/library/rooms/team/tasks/plan.md +3 -2
  247. package/fixtures/cases/unnamed-typed-path-without-a-body/library/rooms/team/tasks/plan.md +2 -2
  248. package/fixtures/cases/unresolved-link/library/item.md +1 -1
  249. package/fixtures/cases/unresolved-link/schema.yaml +2 -3
  250. package/fixtures/cases/valid-typed-document/library/people/ada.md +1 -1
  251. package/fixtures/cases/valid-typed-document/library/tasks/one.md +11 -11
  252. package/fixtures/cases/valid-typed-document/schema.yaml +5 -6
  253. package/fixtures/division.json +39 -39
  254. package/fixtures/forms.json +347 -0
  255. package/fixtures/preamble.json +2 -2
  256. package/fixtures/projection.json +16 -16
  257. package/package.json +1 -1
  258. package/fixtures/cases/conditional-section/schema.yaml +0 -14
  259. package/fixtures/cases/missing-section-item-kind/expected.json +0 -5
  260. package/fixtures/cases/missing-section-item-kind/schema.yaml +0 -6
  261. package/fixtures/cases/null-refused/expected.json +0 -6
  262. package/fixtures/cases/null-refused/library/companies/acme.md +0 -4
  263. package/fixtures/cases/null-refused/library/deals/renewal.md +0 -31
  264. package/fixtures/cases/null-refused/schema.yaml +0 -56
  265. package/fixtures/cases/open-map-value/expected.json +0 -6
  266. package/fixtures/cases/open-map-value/library/companies/acme.md +0 -4
  267. package/fixtures/cases/open-map-value/library/deals/renewal.md +0 -31
  268. package/fixtures/cases/open-map-value/schema.yaml +0 -56
  269. package/fixtures/cases/section-item-enum/expected.json +0 -6
  270. package/fixtures/cases/section-item-enum/library/task.md +0 -8
  271. package/fixtures/cases/section-item-enum/schema.yaml +0 -3
  272. package/fixtures/cases/section-item-kind/expected.json +0 -6
  273. package/fixtures/cases/section-item-kind/library/task.md +0 -8
  274. package/fixtures/cases/section-item-kind/schema.yaml +0 -3
  275. package/fixtures/cases/section-items/library/page.md +0 -42
  276. package/fixtures/cases/section-items/schema.yaml +0 -10
  277. package/fixtures/cases/section-reference-path/expected.json +0 -6
  278. package/fixtures/cases/section-reference-path/library/page.md +0 -7
  279. package/fixtures/cases/section-reference-path/schema.yaml +0 -3
  280. package/fixtures/cases/section-reference-type/expected.json +0 -6
  281. package/fixtures/cases/section-reference-type/library/page.md +0 -7
  282. package/fixtures/cases/section-reference-type/schema.yaml +0 -3
  283. package/fixtures/cases/structured-section/context.json +0 -1
  284. package/fixtures/cases/structured-section/expected.json +0 -6
  285. package/fixtures/cases/thematic-break-in-a-list-section/context.json +0 -1
  286. package/fixtures/cases/thematic-break-in-a-list-section/expected.json +0 -6
  287. package/fixtures/cases/thematic-break-in-a-list-section/library/item.md +0 -7
  288. package/fixtures/cases/thematic-break-in-a-list-section/schema.yaml +0 -3
  289. /package/fixtures/cases/{conditional-section → conditional-long-text}/context.json +0 -0
  290. /package/fixtures/cases/{missing-section-item-kind → list-item-enum}/context.json +0 -0
  291. /package/fixtures/cases/{null-refused → list-item-kind}/context.json +0 -0
  292. /package/fixtures/cases/{open-map-value → list-items}/context.json +0 -0
  293. /package/fixtures/cases/{section-items → list-items}/expected.json +0 -0
  294. /package/fixtures/cases/{section-items → list-items}/library/other.md +0 -0
  295. /package/fixtures/cases/{section-item-enum → list-reference-path}/context.json +0 -0
  296. /package/fixtures/cases/{section-reference-path → list-reference-path}/library/other.md +0 -0
  297. /package/fixtures/cases/{section-item-kind → list-reference-type}/context.json +0 -0
  298. /package/fixtures/cases/{section-reference-type → list-reference-type}/library/note.md +0 -0
  299. /package/fixtures/cases/{section-items → malformed-list}/context.json +0 -0
  300. /package/fixtures/cases/{section-reference-path → sections-keyword-refused}/context.json +0 -0
  301. /package/fixtures/cases/{section-reference-type → thematic-break-ends-the-values}/context.json +0 -0
@@ -1,5 +1,5 @@
1
1
  {
2
- "schema": "$defs:\n line: { type: string }\ntask:\n type: object\n properties:\n name: { type: string }\n aliases: { type: array, items: { type: string } }\n title: { type: string, pattern: '\\S' }\n status: { enum: [open, done] }\n owner: { type: string, reference: person }\n reviewers: { type: array, items: { type: string, reference: person } }\n due: { type: string, format: date }\n estimate: { type: number }\n labels: { type: array, items: { type: string, pattern: '^[a-z]+$' } }\n contact:\n type: object\n properties:\n note: { type: string }\n email: { type: string, format: email }\n notes: { type: object, additionalProperties: { type: string } }\n backup: { $ref: '#/$defs/line', format: email }\n memo: { type: [string, 'null'] }\n steps:\n type: array\n items:\n type: object\n properties:\n title: { type: string }\n done: { type: boolean }\n required: [name, title, status]\n sections:\n Description: { kind: text, required: true }\n Acceptance: { kind: list, items: { type: string, reference: person } }\n Checklist: { kind: list, items: { type: string } }\nperson: {}\n",
2
+ "schema": "$defs:\n line: { type: string }\ntask:\n type: object\n properties:\n name: { type: string }\n aliases: { type: array, items: { type: string } }\n title: { type: string, pattern: '\\S' }\n status: { enum: [open, done] }\n owner: { type: string, reference: person }\n reviewers: { type: array, items: { type: string, reference: person } }\n due: { type: string, format: date }\n estimate: { type: number }\n labels: { type: array, items: { type: string, pattern: '^[a-z]+$' } }\n contact:\n type: object\n properties:\n note: { type: string }\n email: { type: string, format: email }\n notes: { type: object, additionalProperties: { type: string } }\n backup: { $ref: '#/$defs/line', format: email }\n memo: { type: [string, 'null'] }\n steps:\n type: array\n items:\n type: object\n properties:\n title: { type: string }\n done: { type: boolean }\n description: { type: string, contentMediaType: text/markdown, minLength: 1, title: Description }\n acceptance: { type: array, items: { type: string, reference: person }, title: Acceptance }\n checklist: { type: array, items: { type: string }, title: Checklist }\n required: [name, title, status, description]\nperson: {}\n",
3
3
  "cases": [
4
4
  {
5
5
  "name": "any body keeps labels and leaves every unsupplied destination authored",
@@ -58,7 +58,7 @@
58
58
  {
59
59
  "name": "a typed Document projects its free-text field values as bare values and no other kind",
60
60
  "file": "tasks/four.md",
61
- "source": "---\ntype: task\nname: Ship the release\naliases: [\"Launch day\", Cutover]\ntitle: Ship it\nstatus: open\nowner: ../people/ana.md\ndue: 2026-09-30\nestimate: 3\nlabels: [core, urgent]\n---\n",
61
+ "source": "---\ntype: task\n---\n# Ship the release\n\n- **aliases**:\n - Launch day\n - Cutover\n- **title**: Ship it\n- **status**: open\n- **owner**: [Ana](../people/ana.md)\n- **due**: 2026-09-30\n- **estimate**: 3\n- **labels**:\n - core\n - urgent\n",
62
62
  "documentTargets": [],
63
63
  "definition": "task",
64
64
  "move": null,
@@ -70,7 +70,7 @@
70
70
  {
71
71
  "name": "a typed Document projects its prose at any depth in document order and leaves every filtered value out",
72
72
  "file": "tasks/twelve.md",
73
- "source": "---\ntype: task\nname: Ship the release\ntitle: Ship it\nstatus: open\nowner: ../people/ana.md\nreviewers: [../people/bo.md]\ndue: 2026-09-30\ncontact:\n note: Call before noon\n email: ana@example.com\nsteps:\n - title: Tag the build\n done: true\n - title: Announce it\n done: false\n---\n\n## Description\n\nCut the release.\n\n## Acceptance\n\n- [Ana](../people/ana.md)\n\n## Checklist\n\n- Notes written\n",
73
+ "source": "---\ntype: task\n---\n# Ship the release\n\n- **title**: Ship it\n- **status**: open\n- **owner**: [Ana](../people/ana.md)\n- **reviewers**:\n - [Bo](../people/bo.md)\n- **due**: 2026-09-30\n- **contact**:\n - **note**: Call before noon\n - **email**: ana@example.com\n- **Acceptance**:\n - [Ana](../people/ana.md)\n- **Checklist**:\n - Notes written\n\n## steps\n\n| title | done |\n| --- | --- |\n| Tag the build | [x] |\n| Announce it | [ ] |\n\n## Description\n\nCut the release.\n",
74
74
  "documentTargets": [],
75
75
  "definition": "task",
76
76
  "move": null,
@@ -80,13 +80,13 @@
80
80
  },
81
81
  "expected": {
82
82
  "ok": true,
83
- "text": "Ship the release\n\nCall before noon\n\nTag the build\n\nAnnounce it\n\n\n## Description\n\nCut the release.\n\n## Checklist\n\n- Notes written\n"
83
+ "text": "Ship the release\n\nCall before noon\n\nNotes written\n\nTag the build\n\nAnnounce it\n\nCut the release.\n"
84
84
  }
85
85
  },
86
86
  {
87
87
  "name": "a typed Document projects the prose of an open map and a nullable string and leaves a formatted $ref out",
88
88
  "file": "tasks/launch.md",
89
- "source": "---\ntype: task\nname: Plan the launch\ntitle: Plan\nstatus: open\nnotes:\n monday: Book the room\n friday: Send the invite\nbackup: ana@example.com\nmemo: Bring slides\n---\n\n## Description\n\nLaunch.\n",
89
+ "source": "---\ntype: task\n---\n# Plan the launch\n\n- **title**: Plan\n- **status**: open\n- **notes**:\n - **monday**: Book the room\n - **friday**: Send the invite\n- **backup**: ana@example.com\n\n## memo\n\n```json\n\"Bring slides\"\n```\n\n## Description\n\nLaunch.\n",
90
90
  "documentTargets": [],
91
91
  "definition": "task",
92
92
  "move": null,
@@ -96,13 +96,13 @@
96
96
  },
97
97
  "expected": {
98
98
  "ok": true,
99
- "text": "Plan the launch\n\nBook the room\n\nSend the invite\n\nBring slides\n\n\n## Description\n\nLaunch.\n"
99
+ "text": "Plan the launch\n\nBook the room\n\nSend the invite\n\nBring slides\n\nLaunch.\n"
100
100
  }
101
101
  },
102
102
  {
103
- "name": "a typed Document projects its preamble and every section its type does not declare as structure",
103
+ "name": "a typed Document projects its preamble, its long values without their labels and every free section, and leaves its references out",
104
104
  "file": "tasks/one.md",
105
- "source": "---\ntype: task\nname: Shipping the release\ntitle: Ship it\nstatus: open\nowner: ../people/ana.md\n---\n\nPreamble prose that mentions [the plan](../plans/q3.md).\n\n## Description\n\nFollow [the plan][plan] and [the plan][plan] again, then [read it][].\n\n[plan]: ../plans/q3.md \"Plan\"\n[read it]: ../plans/q3.md\n\n## Acceptance\n\n- [the plan](../plans/q3.md) is linked\n\n## Checklist\n\n- [the plan](../plans/q3.md) is read\n\n## Notes\n\nUndeclared prose about [the plan](../plans/q3.md).\n",
105
+ "source": "---\ntype: task\n---\n# Shipping the release\n\n- **title**: Ship it\n- **status**: open\n- **owner**: [Ana](../people/ana.md)\n- **Acceptance**:\n - [Ana](../people/ana.md)\n- **Checklist**:\n - [the plan](../plans/q3.md) is read\n\nPreamble prose that mentions [the plan](../plans/q3.md).\n\n## Description\n\nFollow [the plan][plan] and [the plan][plan] again, then [read it][].\n\n[plan]: ../plans/q3.md \"Plan\"\n[read it]: ../plans/q3.md\n\n## Notes\n\nUndeclared prose about [the plan](../plans/q3.md).\n",
106
106
  "documentTargets": [
107
107
  "plans/q3.md",
108
108
  "plans/2026-q3.md"
@@ -117,18 +117,18 @@
117
117
  "to": "[the roadmap][plan] and",
118
118
  "expected": {
119
119
  "ok": true,
120
- "text": "Shipping the release\n\n\nPreamble prose that mentions the plan.\n\n## Description\n\nFollow the roadmap and the plan again, then read it.\n\n\n## Checklist\n\n- the plan is read\n\n## Notes\n\nUndeclared prose about the plan.\n"
120
+ "text": "Shipping the release\n\nthe plan is read\n\nPreamble prose that mentions the plan.\n\nFollow the roadmap and the plan again, then read it.\n\n\n## Notes\n\nUndeclared prose about the plan.\n"
121
121
  }
122
122
  },
123
123
  "expected": {
124
124
  "ok": true,
125
- "text": "Shipping the release\n\n\nPreamble prose that mentions the plan.\n\n## Description\n\nFollow the plan and the plan again, then read it.\n\n\n## Checklist\n\n- the plan is read\n\n## Notes\n\nUndeclared prose about the plan.\n"
125
+ "text": "Shipping the release\n\nthe plan is read\n\nPreamble prose that mentions the plan.\n\nFollow the plan and the plan again, then read it.\n\n\n## Notes\n\nUndeclared prose about the plan.\n"
126
126
  }
127
127
  },
128
128
  {
129
129
  "name": "a link definition in another section resolves its use and leaves the projection",
130
130
  "file": "tasks/two.md",
131
- "source": "---\ntype: task\ntitle: Ship it\nstatus: open\n---\n\n## Description\n\nFollow [the plan][plan].\n\n## Notes\n\n[plan]: ../plans/q3.md\n",
131
+ "source": "---\ntype: task\n---\n- **title**: Ship it\n- **status**: open\n\n## Description\n\nFollow [the plan][plan].\n\n## Notes\n\n[plan]: ../plans/q3.md\n",
132
132
  "documentTargets": [
133
133
  "plans/q3.md",
134
134
  "plans/2026-q3.md"
@@ -140,13 +140,13 @@
140
140
  },
141
141
  "expected": {
142
142
  "ok": true,
143
- "text": "\n## Description\n\nFollow the plan.\n\n## Notes\n\n"
143
+ "text": "Follow the plan.\n\n## Notes\n\n"
144
144
  }
145
145
  },
146
146
  {
147
- "name": "every occurrence of a declared free-text section is projected",
147
+ "name": "a heading that names a field after a thematic break is free text and projected with it",
148
148
  "file": "tasks/three.md",
149
- "source": "---\ntype: task\ntitle: Ship it\nstatus: open\n---\n\n## Description\n\nFirst [plan](../plans/q3.md).\n\n## Description\n\nSecond note.\n",
149
+ "source": "---\ntype: task\n---\n- **title**: Ship it\n- **status**: open\n\n## Description\n\nFirst [plan](../plans/q3.md).\n\n---\n\n## Description\n\nSecond note.\n",
150
150
  "documentTargets": [
151
151
  "plans/q3.md",
152
152
  "plans/2026-q3.md"
@@ -158,13 +158,13 @@
158
158
  },
159
159
  "expected": {
160
160
  "ok": true,
161
- "text": "\n## Description\n\nFirst plan.\n\n## Description\n\nSecond note.\n"
161
+ "text": "First plan.\n\n\n## Description\n\nSecond note.\n"
162
162
  }
163
163
  },
164
164
  {
165
165
  "name": "a declared type the caller does not supply is refused",
166
166
  "file": "tasks/one.md",
167
- "source": "---\ntype: task\nname: Shipping the release\ntitle: Ship it\nstatus: open\nowner: ../people/ana.md\n---\n\nPreamble prose that mentions [the plan](../plans/q3.md).\n\n## Description\n\nFollow [the plan][plan] and [the plan][plan] again, then [read it][].\n\n[plan]: ../plans/q3.md \"Plan\"\n[read it]: ../plans/q3.md\n\n## Acceptance\n\n- [the plan](../plans/q3.md) is linked\n\n## Checklist\n\n- [the plan](../plans/q3.md) is read\n\n## Notes\n\nUndeclared prose about [the plan](../plans/q3.md).\n",
167
+ "source": "---\ntype: task\n---\n# Shipping the release\n\n- **title**: Ship it\n- **status**: open\n- **owner**: [Ana](../people/ana.md)\n- **Acceptance**:\n - [Ana](../people/ana.md)\n- **Checklist**:\n - [the plan](../plans/q3.md) is read\n\nPreamble prose that mentions [the plan](../plans/q3.md).\n\n## Description\n\nFollow [the plan][plan] and [the plan][plan] again, then [read it][].\n\n[plan]: ../plans/q3.md \"Plan\"\n[read it]: ../plans/q3.md\n\n## Notes\n\nUndeclared prose about [the plan](../plans/q3.md).\n",
168
168
  "documentTargets": [
169
169
  "plans/q3.md",
170
170
  "plans/2026-q3.md"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agentshouse/mdmodel",
3
- "version": "0.1.0-cd5ace6e0b27a",
3
+ "version": "0.1.0-cd6a8e5bc7efc",
4
4
  "description": "MD Type language, parser, validator, structured change application, Markdown syntax profile, and conformance fixtures",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -1,14 +0,0 @@
1
- question:
2
- properties:
3
- title: { type: string }
4
- status: { enum: [open, answered, withdrawn] }
5
- required: [title, status]
6
- sections:
7
- Question: { kind: text, required: true }
8
- Answer: { kind: text }
9
- if:
10
- properties:
11
- status: { enum: [answered, withdrawn] }
12
- then:
13
- sections:
14
- Answer: { kind: text, required: true }
@@ -1,5 +0,0 @@
1
- {
2
- "verdict": "refuse",
3
- "location": "/task/sections/Acceptance/items",
4
- "rule": "sections"
5
- }
@@ -1,6 +0,0 @@
1
- task:
2
- properties:
3
- title: { type: string }
4
- required: [title]
5
- sections:
6
- Acceptance: { kind: list }
@@ -1,6 +0,0 @@
1
- {
2
- "verdict": "refuse",
3
- "file": "deals/renewal.md",
4
- "location": "/title",
5
- "rule": "type"
6
- }
@@ -1,4 +0,0 @@
1
- ---
2
- type: company
3
- name: Acme
4
- ---
@@ -1,31 +0,0 @@
1
- ---
2
- type: deal
3
- title: null
4
- company: ../companies/acme.md
5
- stage: won
6
- amount: 1200
7
- probability: 0.5
8
- open: false
9
- closes_at: 2026-10-10T09:30:00Z
10
- contact_email: ana@example.com
11
- note: null
12
- shipping:
13
- city: Paris
14
- country: FR
15
- tags: [renewal, priority]
16
- lines:
17
- - product: seats
18
- quantity: 10
19
- - product: support
20
- quantity: 1
21
- blocks:
22
- - kind: paragraph
23
- text: Signed.
24
- - { kind: quiz, question: Renew next year? }
25
- attributes:
26
- region: emea
27
- ---
28
-
29
- ## Description
30
-
31
- The yearly renewal.
@@ -1,56 +0,0 @@
1
- $defs:
2
- address:
3
- type: object
4
- properties:
5
- city: { type: string }
6
- country: { type: string, pattern: '^[A-Z]{2}$' }
7
- required: [city]
8
- company:
9
- properties:
10
- name: { type: string }
11
- deal:
12
- type: object
13
- properties:
14
- title: { type: string, minLength: 1, maxLength: 40 }
15
- company: { type: string, reference: company }
16
- stage: { enum: [lead, proposal, won, lost], default: lead }
17
- amount: { type: integer, minimum: 0 }
18
- probability: { type: number, minimum: 0, maximum: 1 }
19
- open: { type: boolean }
20
- closes_at: { type: string, format: date-time }
21
- contact_email: { type: string, format: email }
22
- note: { type: [string, 'null'] }
23
- shipping: { $ref: '#/$defs/address' }
24
- tags: { type: array, items: { type: string }, maxItems: 3 }
25
- lines:
26
- type: array
27
- items:
28
- type: object
29
- properties:
30
- product: { type: string }
31
- quantity: { type: integer, minimum: 1 }
32
- required: [product, quantity]
33
- blocks:
34
- type: array
35
- items:
36
- oneOf:
37
- - properties:
38
- kind: { const: paragraph }
39
- text: { type: string }
40
- required: [kind, text]
41
- - properties:
42
- kind: { const: quiz }
43
- question: { type: string }
44
- required: [kind, question]
45
- attributes:
46
- type: object
47
- additionalProperties: { type: string }
48
- required: [title, company, stage]
49
- if:
50
- properties:
51
- stage: { const: won }
52
- required: [stage]
53
- then:
54
- required: [amount]
55
- sections:
56
- Description: { kind: text }
@@ -1,6 +0,0 @@
1
- {
2
- "verdict": "refuse",
3
- "file": "deals/renewal.md",
4
- "location": "/attributes/region",
5
- "rule": "type"
6
- }
@@ -1,4 +0,0 @@
1
- ---
2
- type: company
3
- name: Acme
4
- ---
@@ -1,31 +0,0 @@
1
- ---
2
- type: deal
3
- title: Renewal
4
- company: ../companies/acme.md
5
- stage: won
6
- amount: 1200
7
- probability: 0.5
8
- open: false
9
- closes_at: 2026-10-10T09:30:00Z
10
- contact_email: ana@example.com
11
- note: null
12
- shipping:
13
- city: Paris
14
- country: FR
15
- tags: [renewal, priority]
16
- lines:
17
- - product: seats
18
- quantity: 10
19
- - product: support
20
- quantity: 1
21
- blocks:
22
- - kind: paragraph
23
- text: Signed.
24
- - { kind: quiz, question: Renew next year? }
25
- attributes:
26
- region: 3
27
- ---
28
-
29
- ## Description
30
-
31
- The yearly renewal.
@@ -1,56 +0,0 @@
1
- $defs:
2
- address:
3
- type: object
4
- properties:
5
- city: { type: string }
6
- country: { type: string, pattern: '^[A-Z]{2}$' }
7
- required: [city]
8
- company:
9
- properties:
10
- name: { type: string }
11
- deal:
12
- type: object
13
- properties:
14
- title: { type: string, minLength: 1, maxLength: 40 }
15
- company: { type: string, reference: company }
16
- stage: { enum: [lead, proposal, won, lost], default: lead }
17
- amount: { type: integer, minimum: 0 }
18
- probability: { type: number, minimum: 0, maximum: 1 }
19
- open: { type: boolean }
20
- closes_at: { type: string, format: date-time }
21
- contact_email: { type: string, format: email }
22
- note: { type: [string, 'null'] }
23
- shipping: { $ref: '#/$defs/address' }
24
- tags: { type: array, items: { type: string }, maxItems: 3 }
25
- lines:
26
- type: array
27
- items:
28
- type: object
29
- properties:
30
- product: { type: string }
31
- quantity: { type: integer, minimum: 1 }
32
- required: [product, quantity]
33
- blocks:
34
- type: array
35
- items:
36
- oneOf:
37
- - properties:
38
- kind: { const: paragraph }
39
- text: { type: string }
40
- required: [kind, text]
41
- - properties:
42
- kind: { const: quiz }
43
- question: { type: string }
44
- required: [kind, question]
45
- attributes:
46
- type: object
47
- additionalProperties: { type: string }
48
- required: [title, company, stage]
49
- if:
50
- properties:
51
- stage: { const: won }
52
- required: [stage]
53
- then:
54
- required: [amount]
55
- sections:
56
- Description: { kind: text }
@@ -1,6 +0,0 @@
1
- {
2
- "verdict": "refuse",
3
- "file": "task.md",
4
- "location": "Stages",
5
- "rule": "structured-section"
6
- }
@@ -1,8 +0,0 @@
1
- ---
2
- type: task
3
- ---
4
-
5
- ## Stages
6
-
7
- - draft
8
- - shipped
@@ -1,3 +0,0 @@
1
- task:
2
- sections:
3
- Stages: { kind: list, items: { enum: [draft, done] } }
@@ -1,6 +0,0 @@
1
- {
2
- "verdict": "refuse",
3
- "file": "task.md",
4
- "location": "Estimates",
5
- "rule": "structured-section"
6
- }
@@ -1,8 +0,0 @@
1
- ---
2
- type: task
3
- ---
4
-
5
- ## Estimates
6
-
7
- - 3
8
- - not a number
@@ -1,3 +0,0 @@
1
- task:
2
- sections:
3
- Estimates: { kind: list, items: { type: number } }
@@ -1,42 +0,0 @@
1
- ---
2
- type: page
3
- ---
4
-
5
- [self]: page.md
6
-
7
- ## Estimates
8
-
9
- - 3
10
- - -1.5
11
-
12
- ## Counts
13
-
14
- - 2
15
- - 0
16
-
17
- ## Flags
18
-
19
- - true
20
- - false
21
-
22
- ## Dates
23
-
24
- - 2026-10-06
25
-
26
- ## Stages
27
-
28
- - draft
29
- - done
30
-
31
- ## Related
32
-
33
- - [the other page](other.md)
34
- - [this page][self]
35
-
36
- ## Notes
37
-
38
- - any text, [a link](other.md) included
39
-
40
- ## Summary
41
-
42
- Free text with *emphasis*.
@@ -1,10 +0,0 @@
1
- page:
2
- sections:
3
- Estimates: { kind: list, items: { type: number } }
4
- Counts: { kind: list, items: { type: integer } }
5
- Flags: { kind: list, items: { type: boolean } }
6
- Dates: { kind: list, items: { type: string, format: date } }
7
- Stages: { kind: list, items: { enum: [draft, done] } }
8
- Related: { kind: list, items: { type: string, reference: page } }
9
- Notes: { kind: list, items: { type: string } }
10
- Summary: { kind: text }
@@ -1,6 +0,0 @@
1
- {
2
- "verdict": "refuse",
3
- "file": "page.md",
4
- "location": "Related",
5
- "rule": "structured-section"
6
- }
@@ -1,7 +0,0 @@
1
- ---
2
- type: page
3
- ---
4
-
5
- ## Related
6
-
7
- - other.md
@@ -1,3 +0,0 @@
1
- page:
2
- sections:
3
- Related: { kind: list, items: { type: string, reference: page } }
@@ -1,6 +0,0 @@
1
- {
2
- "verdict": "refuse",
3
- "file": "page.md",
4
- "location": "Related",
5
- "rule": "unresolved-reference"
6
- }
@@ -1,7 +0,0 @@
1
- ---
2
- type: page
3
- ---
4
-
5
- ## Related
6
-
7
- - [a note](note.md)
@@ -1,3 +0,0 @@
1
- page:
2
- sections:
3
- Related: { kind: list, items: { type: string, reference: page } }
@@ -1 +0,0 @@
1
- { "binaryTargets": [] }
@@ -1,6 +0,0 @@
1
- {
2
- "verdict": "refuse",
3
- "file": "item.md",
4
- "location": "Acceptance",
5
- "rule": "structured-section"
6
- }
@@ -1 +0,0 @@
1
- { "binaryTargets": [] }
@@ -1,6 +0,0 @@
1
- {
2
- "verdict": "refuse",
3
- "file": "item.md",
4
- "location": "Acceptance",
5
- "rule": "structured-section"
6
- }
@@ -1,7 +0,0 @@
1
- ---
2
- type: task
3
- ---
4
-
5
- ## Acceptance
6
-
7
- * * *
@@ -1,3 +0,0 @@
1
- task:
2
- sections:
3
- Acceptance: { kind: list, items: { type: string } }