@agentshouse/mdmodel 0.1.0-cd6a8e5bc7efc → 0.1.0-cdaa2262b2988

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 (330) hide show
  1. package/API.md +108 -115
  2. package/README.md +15 -13
  3. package/dist/built-in.d.ts.map +1 -1
  4. package/dist/built-in.js +10 -1
  5. package/dist/definition.d.ts +10 -3
  6. package/dist/definition.d.ts.map +1 -1
  7. package/dist/definition.js +99 -21
  8. package/dist/document.d.ts +3 -2
  9. package/dist/document.d.ts.map +1 -1
  10. package/dist/document.js +113 -71
  11. package/dist/event.d.ts +4 -7
  12. package/dist/event.d.ts.map +1 -1
  13. package/dist/event.js +3 -2
  14. package/dist/facts.d.ts.map +1 -1
  15. package/dist/facts.js +8 -4
  16. package/dist/fields.d.ts +1 -1
  17. package/dist/fields.d.ts.map +1 -1
  18. package/dist/fields.js +2 -2
  19. package/dist/folders.d.ts +5 -0
  20. package/dist/folders.d.ts.map +1 -0
  21. package/dist/folders.js +19 -0
  22. package/dist/form.d.ts.map +1 -1
  23. package/dist/form.js +3 -2
  24. package/dist/house-model.d.ts +190 -24
  25. package/dist/house-model.d.ts.map +1 -1
  26. package/dist/house-model.js +99 -15
  27. package/dist/house-references/crockford.d.ts.map +1 -0
  28. package/dist/house-references/patterns.d.ts +13 -0
  29. package/dist/house-references/patterns.d.ts.map +1 -0
  30. package/dist/house-references/patterns.js +20 -0
  31. package/dist/index.d.ts +23 -16
  32. package/dist/index.d.ts.map +1 -1
  33. package/dist/index.js +17 -13
  34. package/dist/indexed.d.ts +10 -0
  35. package/dist/indexed.d.ts.map +1 -0
  36. package/dist/indexed.js +63 -0
  37. package/dist/kinds.d.ts +9 -1
  38. package/dist/kinds.d.ts.map +1 -1
  39. package/dist/kinds.js +68 -0
  40. package/dist/markdown.d.ts +0 -4
  41. package/dist/markdown.d.ts.map +1 -1
  42. package/dist/markdown.js +1 -34
  43. package/dist/media-type.d.ts +72 -0
  44. package/dist/media-type.d.ts.map +1 -0
  45. package/dist/media-type.js +157 -0
  46. package/dist/moment.d.ts +9 -0
  47. package/dist/moment.d.ts.map +1 -0
  48. package/dist/moment.js +40 -0
  49. package/dist/not-ready.d.ts +2 -0
  50. package/dist/not-ready.d.ts.map +1 -0
  51. package/dist/not-ready.js +5 -0
  52. package/dist/paths.d.ts +6 -0
  53. package/dist/paths.d.ts.map +1 -1
  54. package/dist/paths.js +33 -3
  55. package/dist/query/language.d.ts +4 -1
  56. package/dist/query/language.d.ts.map +1 -1
  57. package/dist/query/language.js +8 -7
  58. package/dist/query/match.d.ts +1 -1
  59. package/dist/query/match.d.ts.map +1 -1
  60. package/dist/query/match.js +3 -24
  61. package/dist/query/rows.d.ts +6 -1
  62. package/dist/query/rows.d.ts.map +1 -1
  63. package/dist/query/rows.js +37 -8
  64. package/dist/query/sql.d.ts +10 -1
  65. package/dist/query/sql.d.ts.map +1 -1
  66. package/dist/query/sql.js +22 -3
  67. package/dist/query/walk.d.ts +73 -0
  68. package/dist/query/walk.d.ts.map +1 -0
  69. package/dist/query/walk.js +277 -0
  70. package/dist/references.d.ts +2 -2
  71. package/dist/references.d.ts.map +1 -1
  72. package/dist/references.js +1 -1
  73. package/dist/reserved.d.ts +1 -1
  74. package/dist/reserved.d.ts.map +1 -1
  75. package/dist/reserved.js +15 -6
  76. package/dist/room-types.d.ts +2 -1
  77. package/dist/room-types.d.ts.map +1 -1
  78. package/dist/room-types.js +19 -13
  79. package/dist/schema.d.ts +1 -1
  80. package/dist/schema.d.ts.map +1 -1
  81. package/dist/schema.js +6 -7
  82. package/dist/types.d.ts +11 -31
  83. package/dist/types.d.ts.map +1 -1
  84. package/dist/validate.d.ts +7 -3
  85. package/dist/validate.d.ts.map +1 -1
  86. package/dist/validate.js +108 -46
  87. package/dist/view.d.ts +5 -0
  88. package/dist/view.d.ts.map +1 -0
  89. package/dist/view.js +27 -0
  90. package/dist/yaml.d.ts +7 -5
  91. package/dist/yaml.d.ts.map +1 -1
  92. package/dist/yaml.js +154 -33
  93. package/fixtures/README.md +64 -57
  94. package/fixtures/cases/absent-link-dangles/{schema.yaml → schema.md} +2 -0
  95. package/fixtures/cases/absent-optional-field/{schema.yaml → schema.md} +2 -0
  96. package/fixtures/cases/absolute-link/{schema.yaml → schema.md} +2 -0
  97. package/fixtures/cases/attachment-reference-any-file/{schema.yaml → schema.md} +2 -0
  98. package/fixtures/cases/attachment-reference-dangles/{schema.yaml → schema.md} +2 -0
  99. package/fixtures/cases/attachment-reference-outside/{schema.yaml → schema.md} +2 -0
  100. package/fixtures/cases/binary-any-reference/{schema.yaml → schema.md} +2 -0
  101. package/fixtures/cases/binary-document-collision/{schema.yaml → schema.md} +2 -0
  102. package/fixtures/cases/binary-image-dangles/{schema.yaml → schema.md} +2 -0
  103. package/fixtures/cases/binary-link-dangles/{schema.yaml → schema.md} +2 -0
  104. package/fixtures/cases/binary-link-outside-collection/{schema.yaml → schema.md} +2 -0
  105. package/fixtures/cases/binary-prototype-reference/{schema.yaml → schema.md} +2 -0
  106. package/fixtures/cases/binary-typed-reference/{schema.yaml → schema.md} +2 -0
  107. package/fixtures/cases/block-scalar-frontmatter/expected.json +1 -0
  108. package/fixtures/cases/block-scalar-frontmatter/library/notes/literal.md +17 -0
  109. package/fixtures/cases/block-scalar-frontmatter/library/skills/notes/SKILL.md +10 -0
  110. package/fixtures/cases/boolean-field/{schema.yaml → schema.md} +2 -0
  111. package/fixtures/cases/{duplicate-link-definition/schema.yaml → bracketed-link-definition/schema.md} +2 -0
  112. package/fixtures/cases/closed-nested-object/{schema.yaml → schema.md} +2 -0
  113. package/fixtures/cases/composed-root-reference/{schema.yaml → schema.md} +2 -0
  114. package/fixtures/cases/conditional-long-text/{schema.yaml → schema.md} +2 -0
  115. package/fixtures/cases/cross-room-link/{schema.yaml → schema.md} +2 -0
  116. package/fixtures/cases/cross-room-reference/{schema.yaml → schema.md} +2 -0
  117. package/fixtures/cases/date-time-format/{schema.yaml → schema.md} +2 -0
  118. package/fixtures/cases/declared-binary-links/schema.md +3 -0
  119. package/fixtures/cases/default-unfilled/schema.md +57 -0
  120. package/fixtures/cases/defs-pattern/schema.md +57 -0
  121. package/fixtures/cases/dependent-rule/schema.md +57 -0
  122. package/fixtures/cases/{bracketed-link-definition/schema.yaml → duplicate-link-definition/schema.md} +2 -0
  123. package/fixtures/cases/email-format/schema.md +57 -0
  124. package/fixtures/cases/equal-labels/{schema.yaml → schema.md} +2 -0
  125. package/fixtures/cases/fenced-link-definition/schema.md +7 -0
  126. package/fixtures/cases/field-enum/{schema.yaml → schema.md} +2 -0
  127. package/fixtures/cases/folder-keeps-a-built-in-type/context.json +1 -0
  128. package/fixtures/cases/folder-keeps-a-built-in-type/expected.json +1 -0
  129. package/fixtures/cases/folder-keeps-a-built-in-type/library/tickets/door.md +3 -0
  130. package/fixtures/cases/folder-keeps-a-built-in-type/library/tickets/host.md +13 -0
  131. package/fixtures/cases/folder-keeps-a-built-in-type/library/tickets/map.md +24 -0
  132. package/fixtures/cases/folder-keeps-a-built-in-type/library/tickets/open.md +13 -0
  133. package/fixtures/cases/folder-keeps-a-built-in-type/schema.md +9 -0
  134. package/fixtures/cases/folder-keeps-a-record/context.json +1 -0
  135. package/fixtures/cases/folder-keeps-a-record/expected.json +1 -0
  136. package/fixtures/cases/folder-keeps-a-record/library/tickets/2026-11-16-d_1.r.md +13 -0
  137. package/fixtures/cases/folder-keeps-a-record/library/tickets/door.md +3 -0
  138. package/fixtures/cases/folder-keeps-a-record/schema.md +9 -0
  139. package/fixtures/cases/folder-names-no-type-of-the-schema/context.json +1 -0
  140. package/fixtures/cases/folder-names-no-type-of-the-schema/expected.json +5 -0
  141. package/fixtures/cases/folder-names-no-type-of-the-schema/schema.md +7 -0
  142. package/fixtures/cases/folder-nearer-entry-types-a-document/context.json +1 -0
  143. package/fixtures/cases/folder-nearer-entry-types-a-document/expected.json +6 -0
  144. package/fixtures/cases/folder-nearer-entry-types-a-document/library/tickets/archive/2025/old.md +1 -0
  145. package/fixtures/cases/folder-nearer-entry-types-a-document/schema.md +15 -0
  146. package/fixtures/cases/folder-refuses-a-declared-any/context.json +1 -0
  147. package/fixtures/cases/folder-refuses-a-declared-any/expected.json +6 -0
  148. package/fixtures/cases/folder-refuses-a-declared-any/library/tickets/door.md +5 -0
  149. package/fixtures/cases/folder-refuses-a-declared-any/schema.md +9 -0
  150. package/fixtures/cases/folder-refuses-another-declared-type/context.json +1 -0
  151. package/fixtures/cases/folder-refuses-another-declared-type/expected.json +6 -0
  152. package/fixtures/cases/folder-refuses-another-declared-type/library/tickets/door.md +5 -0
  153. package/fixtures/cases/folder-refuses-another-declared-type/schema.md +12 -0
  154. package/fixtures/cases/folder-type-is-the-type-a-reference-reaches/context.json +1 -0
  155. package/fixtures/cases/folder-type-is-the-type-a-reference-reaches/expected.json +1 -0
  156. package/fixtures/cases/folder-type-is-the-type-a-reference-reaches/library/notes/plan.md +7 -0
  157. package/fixtures/cases/folder-type-is-the-type-a-reference-reaches/library/tickets/door.md +3 -0
  158. package/fixtures/cases/folder-type-is-the-type-a-reference-reaches/library/tickets/gate.md +7 -0
  159. package/fixtures/cases/folder-type-is-the-type-a-reference-reaches/schema.md +13 -0
  160. package/fixtures/cases/folder-types-a-document-in-a-folder-below-it/context.json +1 -0
  161. package/fixtures/cases/folder-types-a-document-in-a-folder-below-it/expected.json +6 -0
  162. package/fixtures/cases/folder-types-a-document-in-a-folder-below-it/library/tickets/2026/gate.md +1 -0
  163. package/fixtures/cases/folder-types-a-document-in-a-folder-below-it/schema.md +9 -0
  164. package/fixtures/cases/folder-types-a-document-that-names-no-type/context.json +1 -0
  165. package/fixtures/cases/folder-types-a-document-that-names-no-type/expected.json +7 -0
  166. package/fixtures/cases/folder-types-a-document-that-names-no-type/library/tickets/door.md +3 -0
  167. package/fixtures/cases/folder-types-a-document-that-names-no-type/schema.md +9 -0
  168. package/fixtures/cases/folder-under-a-reserved-name/context.json +1 -0
  169. package/fixtures/cases/folder-under-a-reserved-name/expected.json +5 -0
  170. package/fixtures/cases/folder-under-a-reserved-name/schema.md +7 -0
  171. package/fixtures/cases/folder-without-a-trailing-slash/context.json +1 -0
  172. package/fixtures/cases/folder-without-a-trailing-slash/expected.json +5 -0
  173. package/fixtures/cases/folder-without-a-trailing-slash/schema.md +7 -0
  174. package/fixtures/cases/frontmatter-construct/context.json +1 -0
  175. package/fixtures/cases/frontmatter-construct/expected.json +7 -0
  176. package/fixtures/cases/frontmatter-construct/library/note.md +6 -0
  177. package/fixtures/cases/integer-field/schema.md +57 -0
  178. package/fixtures/cases/interrupted-link-definition/schema.md +3 -0
  179. package/fixtures/cases/json-schema-constructs/schema.md +57 -0
  180. package/fixtures/cases/labels-in-the-rooms-language/{schema.yaml → schema.md} +2 -0
  181. package/fixtures/cases/lazy-list-item/{schema.yaml → schema.md} +2 -0
  182. package/fixtures/cases/link-into-a-reserved-name/{schema.yaml → schema.md} +2 -0
  183. package/fixtures/cases/list-item-enum/{schema.yaml → schema.md} +2 -0
  184. package/fixtures/cases/list-item-kind/{schema.yaml → schema.md} +2 -0
  185. package/fixtures/cases/list-items/{schema.yaml → schema.md} +2 -0
  186. package/fixtures/cases/list-of-objects-closed/schema.md +57 -0
  187. package/fixtures/cases/list-of-objects-item/schema.md +57 -0
  188. package/fixtures/cases/list-of-objects-reference/{schema.yaml → schema.md} +2 -0
  189. package/fixtures/cases/list-reference-path/{schema.yaml → schema.md} +2 -0
  190. package/fixtures/cases/list-reference-type/{schema.yaml → schema.md} +2 -0
  191. package/fixtures/cases/list-size/schema.md +57 -0
  192. package/fixtures/cases/long-fence-link-definition/schema.md +3 -0
  193. package/fixtures/cases/long-value-past-six-levels/{schema.yaml → schema.md} +2 -0
  194. package/fixtures/cases/malformed-definition/{schema.yaml → schema.md} +2 -0
  195. package/fixtures/cases/malformed-list/{schema.yaml → schema.md} +2 -0
  196. package/fixtures/cases/member-document/{schema.yaml → schema.md} +2 -0
  197. package/fixtures/cases/member-on-another-type/{schema.yaml → schema.md} +2 -0
  198. package/fixtures/cases/missing-required-field/{schema.yaml → schema.md} +2 -0
  199. package/fixtures/cases/misspelled-key/schema.md +57 -0
  200. package/fixtures/cases/name-not-a-string/{schema.yaml → schema.md} +2 -0
  201. package/fixtures/cases/nested-defs/{schema.yaml → schema.md} +2 -0
  202. package/fixtures/cases/nested-object-reference/schema.md +34 -0
  203. package/fixtures/cases/nested-reference/schema.md +34 -0
  204. package/fixtures/cases/nested-required-field/schema.md +57 -0
  205. package/fixtures/cases/numeric-range/schema.md +57 -0
  206. package/fixtures/cases/one-key-two-labels/{schema.yaml → schema.md} +2 -0
  207. package/fixtures/cases/one-key-two-types/{schema.yaml → schema.md} +2 -0
  208. package/fixtures/cases/one-of-variant/schema.md +57 -0
  209. package/fixtures/cases/other-room-reference/schema.md +34 -0
  210. package/fixtures/cases/paragraph-link-definition/schema.md +3 -0
  211. package/fixtures/cases/prototype-field/schema.md +7 -0
  212. package/fixtures/cases/quoted-link-definition/schema.md +3 -0
  213. package/fixtures/cases/reference-into-a-reserved-name/{schema.yaml → schema.md} +2 -0
  214. package/fixtures/cases/reference-to-any-file-name/context.json +1 -0
  215. package/fixtures/cases/reference-to-any-file-name/expected.json +1 -0
  216. package/fixtures/cases/reference-to-any-file-name/library/people/100%.md +4 -0
  217. package/fixtures/cases/reference-to-any-file-name/library/people/C#.md +4 -0
  218. package/fixtures/cases/reference-to-any-file-name/library/people/My notes.md +4 -0
  219. package/fixtures/cases/reference-to-any-file-name/library/people/[draft].md +4 -0
  220. package/fixtures/cases/reference-to-any-file-name/library/people/c (d).md +4 -0
  221. package/fixtures/cases/reference-to-any-file-name/library/people/caf/303/251.md +4 -0
  222. package/fixtures/cases/reference-to-any-file-name/library/people//320/236/321/202/321/207/321/221/321/202.md +4 -0
  223. package/fixtures/cases/reference-to-any-file-name/library/tasks/bracket.md +9 -0
  224. package/fixtures/cases/reference-to-any-file-name/library/tasks/cyrillic.md +9 -0
  225. package/fixtures/cases/reference-to-any-file-name/library/tasks/decomposed.md +9 -0
  226. package/fixtures/cases/reference-to-any-file-name/library/tasks/hash.md +9 -0
  227. package/fixtures/cases/reference-to-any-file-name/library/tasks/parenthesis.md +9 -0
  228. package/fixtures/cases/reference-to-any-file-name/library/tasks/percent.md +9 -0
  229. package/fixtures/cases/reference-to-any-file-name/library/tasks/spaced.md +9 -0
  230. package/fixtures/cases/{referenced-missing-file/schema.yaml → reference-to-any-file-name/schema.md} +2 -0
  231. package/fixtures/cases/referenced-missing-file/schema.md +12 -0
  232. package/fixtures/cases/referenced-missing-non-latin-file/context.json +1 -0
  233. package/fixtures/cases/referenced-missing-non-latin-file/expected.json +6 -0
  234. package/fixtures/cases/referenced-missing-non-latin-file/library/tasks/a.md +9 -0
  235. package/fixtures/cases/referenced-missing-non-latin-file/library/tasks/b.md +9 -0
  236. package/fixtures/cases/referenced-missing-non-latin-file/schema.md +12 -0
  237. package/fixtures/cases/remote-ref/{schema.yaml → schema.md} +2 -0
  238. package/fixtures/cases/schema-body-ignored/context.json +1 -0
  239. package/fixtures/cases/schema-body-ignored/expected.json +1 -0
  240. package/fixtures/cases/schema-body-ignored/schema.md +9 -0
  241. package/fixtures/cases/schema-type-named-folders/context.json +1 -0
  242. package/fixtures/cases/schema-type-named-folders/expected.json +5 -0
  243. package/fixtures/cases/schema-type-named-folders/schema.md +5 -0
  244. package/fixtures/cases/schema-type-named-type/context.json +1 -0
  245. package/fixtures/cases/schema-type-named-type/expected.json +5 -0
  246. package/fixtures/cases/{unknown-type/schema.yaml → schema-type-named-type/schema.md} +3 -1
  247. package/fixtures/cases/second-member-document/{schema.yaml → schema.md} +2 -0
  248. package/fixtures/cases/sections-keyword-refused/{schema.yaml → schema.md} +2 -0
  249. package/fixtures/cases/shortcut-reference-link/schema.md +7 -0
  250. package/fixtures/cases/string-length/schema.md +57 -0
  251. package/fixtures/cases/submission-keys/{schema.yaml → schema.md} +2 -0
  252. package/fixtures/cases/text-field-kind/{schema.yaml → schema.md} +2 -0
  253. package/fixtures/cases/thematic-break-ends-the-values/{schema.yaml → schema.md} +2 -0
  254. package/fixtures/cases/truncated-link-definition/schema.md +3 -0
  255. package/fixtures/cases/typed-path-names-another-type/{schema.yaml → schema.md} +2 -0
  256. package/fixtures/cases/typed-path-names-its-type/{schema.yaml → schema.md} +2 -0
  257. package/fixtures/cases/typed-path-names-no-type/{schema.yaml → schema.md} +2 -0
  258. package/fixtures/cases/types-folder-content/{schema.yaml → schema.md} +2 -0
  259. package/fixtures/cases/undeclared-field/schema.md +7 -0
  260. package/fixtures/cases/unevaluated-items-closed/{schema.yaml → schema.md} +2 -0
  261. package/fixtures/cases/unique-in-app-schema/context.json +1 -0
  262. package/fixtures/cases/unique-in-app-schema/expected.json +5 -0
  263. package/fixtures/cases/unique-in-app-schema/schema.yaml +7 -0
  264. package/fixtures/cases/unique-indexed-field/context.json +1 -0
  265. package/fixtures/cases/unique-indexed-field/expected.json +1 -0
  266. package/fixtures/cases/unique-indexed-field/library/tickets/first.md +8 -0
  267. package/fixtures/cases/unique-indexed-field/library/tickets/second.md +8 -0
  268. package/fixtures/cases/unique-indexed-field/schema.md +9 -0
  269. package/fixtures/cases/unique-off-indexed-field/context.json +1 -0
  270. package/fixtures/cases/unique-off-indexed-field/expected.json +5 -0
  271. package/fixtures/cases/unique-off-indexed-field/schema.md +9 -0
  272. package/fixtures/cases/unlisted-reference-type/{schema.yaml → schema.md} +2 -0
  273. package/fixtures/cases/unnamed-typed-path-checks-its-fields/{schema.yaml → schema.md} +2 -0
  274. package/fixtures/cases/unnamed-typed-path-names-a-type/{schema.yaml → schema.md} +2 -0
  275. package/fixtures/cases/unnamed-typed-path-reads-its-type/{schema.yaml → schema.md} +2 -0
  276. package/fixtures/cases/unnamed-typed-path-without-a-body/{schema.yaml → schema.md} +2 -0
  277. package/fixtures/cases/unresolved-link/schema.md +7 -0
  278. package/fixtures/cases/valid-typed-document/{schema.yaml → schema.md} +2 -0
  279. package/fixtures/cases/wide-item-fence-link/schema.md +3 -0
  280. package/fixtures/forms.json +24 -0
  281. package/fixtures/preamble.json +4 -4
  282. package/fixtures/queries.json +1010 -2
  283. package/fixtures/references.json +15 -0
  284. package/package.json +2 -2
  285. package/dist/crockford.d.ts.map +0 -1
  286. package/dist/divide.d.ts +0 -3
  287. package/dist/divide.d.ts.map +0 -1
  288. package/dist/divide.js +0 -321
  289. package/dist/house-references.d.ts +0 -4
  290. package/dist/house-references.d.ts.map +0 -1
  291. package/dist/house-references.js +0 -7
  292. package/dist/project.d.ts +0 -22
  293. package/dist/project.d.ts.map +0 -1
  294. package/dist/project.js +0 -101
  295. package/fixtures/cases/declared-binary-links/schema.yaml +0 -1
  296. package/fixtures/cases/default-unfilled/schema.yaml +0 -55
  297. package/fixtures/cases/defs-pattern/schema.yaml +0 -55
  298. package/fixtures/cases/dependent-rule/schema.yaml +0 -55
  299. package/fixtures/cases/email-format/schema.yaml +0 -55
  300. package/fixtures/cases/fenced-link-definition/schema.yaml +0 -5
  301. package/fixtures/cases/frontmatter-schema/expected.json +0 -5
  302. package/fixtures/cases/integer-field/schema.yaml +0 -55
  303. package/fixtures/cases/interrupted-link-definition/schema.yaml +0 -1
  304. package/fixtures/cases/json-schema-constructs/schema.yaml +0 -55
  305. package/fixtures/cases/list-of-objects-closed/schema.yaml +0 -55
  306. package/fixtures/cases/list-of-objects-item/schema.yaml +0 -55
  307. package/fixtures/cases/list-size/schema.yaml +0 -55
  308. package/fixtures/cases/long-fence-link-definition/schema.yaml +0 -1
  309. package/fixtures/cases/misspelled-key/schema.yaml +0 -55
  310. package/fixtures/cases/nested-object-reference/schema.yaml +0 -32
  311. package/fixtures/cases/nested-reference/schema.yaml +0 -32
  312. package/fixtures/cases/nested-required-field/schema.yaml +0 -55
  313. package/fixtures/cases/numeric-range/schema.yaml +0 -55
  314. package/fixtures/cases/one-of-variant/schema.yaml +0 -55
  315. package/fixtures/cases/other-room-reference/schema.yaml +0 -32
  316. package/fixtures/cases/paragraph-link-definition/schema.yaml +0 -1
  317. package/fixtures/cases/prototype-field/schema.yaml +0 -5
  318. package/fixtures/cases/quoted-link-definition/schema.yaml +0 -1
  319. package/fixtures/cases/shortcut-reference-link/schema.yaml +0 -5
  320. package/fixtures/cases/string-length/schema.yaml +0 -55
  321. package/fixtures/cases/truncated-link-definition/schema.yaml +0 -1
  322. package/fixtures/cases/undeclared-field/schema.yaml +0 -5
  323. package/fixtures/cases/unresolved-link/schema.yaml +0 -5
  324. package/fixtures/cases/wide-item-fence-link/schema.yaml +0 -1
  325. package/fixtures/division.json +0 -454
  326. package/fixtures/projection.json +0 -358
  327. /package/dist/{crockford.d.ts → house-references/crockford.d.ts} +0 -0
  328. /package/dist/{crockford.js → house-references/crockford.js} +0 -0
  329. /package/fixtures/cases/{frontmatter-schema → block-scalar-frontmatter}/context.json +0 -0
  330. /package/fixtures/cases/{frontmatter-schema/schema.yaml → unknown-type/schema.md} +0 -0
@@ -1,5 +1,8 @@
1
1
  {
2
- "schema": "task:\n type: object\n properties:\n title: { type: string }\n status: { enum: [open, done] }\n due: { type: string, format: date }\n at: { type: string, format: date-time }\n ends: { type: [string, \"null\"], format: date-time }\n place:\n type: object\n properties:\n city: { type: string }\n starts: { type: string, format: time }\n points: { type: number }\n count: { type: integer }\n done: { type: boolean }\n priority: { type: integer, enum: [1, 2, 3] }\n flagged: { enum: [true, false] }\n tier: { enum: [1, 2, null] }\n rank: { enum: [1, high] }\n owner: { type: string, reference: person }\n labels: { type: array, items: { type: string } }\n times: { type: array, items: { type: string, format: date-time } }\n steps:\n type: array\n items:\n type: object\n properties:\n name: { type: string }\n at: { type: string, format: date-time }\nperson:\n type: object\n properties:\n name: { type: string }\n",
2
+ "schema": "task:\n type: object\n properties:\n title: { type: string }\n status: { enum: [open, done] }\n due: { type: string, format: date }\n at: { type: string, format: date-time }\n ends: { type: [string, \"null\"], format: date-time }\n place:\n type: object\n properties:\n city: { type: string }\n starts: { type: string, format: time }\n points: { type: number }\n count: { type: integer }\n done: { type: boolean }\n priority: { type: integer, enum: [1, 2, 3] }\n flagged: { enum: [true, false] }\n tier: { enum: [1, 2, null] }\n rank: { enum: [1, high] }\n code: { type: string, maxLength: 12 }\n owner: { type: string, reference: person }\n blocked_by: { type: array, items: { type: string, reference: task } }\n watchers: { type: array, items: { type: string, reference: person, cross_room: true } }\n labels: { type: array, items: { type: string } }\n times: { type: array, items: { type: string, format: date-time } }\n steps:\n type: array\n items:\n type: object\n properties:\n name: { type: string }\n at: { type: string, format: date-time }\n indexed: [status, due, at, ends, starts, points, count, done, tier, code]\nperson:\n type: object\n properties:\n name: { type: string }\nrecord:\n type: object\n properties:\n path: { type: string }\n received:\n type: object\n properties:\n at: { type: string, format: date-time }\n through: { type: string }\n by: { type: string }\n key: { type: string }\n original: { type: string }\n claimed: { type: object }\n json: { type: object }\n",
3
+ "reads": [
4
+ "team"
5
+ ],
3
6
  "documents": {
4
7
  "task": {
5
8
  "path": "tasks/one.md",
@@ -8,6 +11,9 @@
8
11
  "text": "# One\n\nShip the release on Friday.\n",
9
12
  "fields": {
10
13
  "title": "Ship the release",
14
+ "watchers": [
15
+ "/rooms/team/people/gone.md"
16
+ ],
11
17
  "status": "open",
12
18
  "due": "2026-10-30",
13
19
  "at": "2026-10-30T10:00:00+02:00",
@@ -16,6 +22,10 @@
16
22
  "count": 2,
17
23
  "done": false,
18
24
  "owner": "../people/ada.md",
25
+ "blocked_by": [
26
+ "two.md",
27
+ "three.md"
28
+ ],
19
29
  "labels": [
20
30
  "urgent",
21
31
  "home"
@@ -41,7 +51,9 @@
41
51
  "title": "Two",
42
52
  "status": "done",
43
53
  "ends": null,
44
- "labels": []
54
+ "labels": [],
55
+ "blocked_by": [],
56
+ "code": "Zeta"
45
57
  }
46
58
  },
47
59
  "spaced-task": {
@@ -51,6 +63,10 @@
51
63
  "text": null,
52
64
  "fields": {
53
65
  "title": "Three",
66
+ "watchers": [
67
+ "/rooms/vault/people/ada.md",
68
+ "/rooms/team/people/lin.md"
69
+ ],
54
70
  "status": "open",
55
71
  "at": "2026-10-30 08:00:00Z",
56
72
  "times": [
@@ -76,6 +92,180 @@
76
92
  "fileId": null,
77
93
  "text": "path,status\n",
78
94
  "fields": {}
95
+ },
96
+ "task-four": {
97
+ "path": "tasks/four.md",
98
+ "type": "task",
99
+ "fileId": "file-four",
100
+ "text": null,
101
+ "fields": {
102
+ "title": "Four",
103
+ "watchers": [
104
+ "/rooms/team/people/ada.md"
105
+ ],
106
+ "blocked_by": [
107
+ "two.md"
108
+ ],
109
+ "status": "done",
110
+ "due": "2025-12-31",
111
+ "at": "2026-10-29T23:30:00-10:00",
112
+ "ends": "2026-10-30T07:00:00Z",
113
+ "starts": "09:30:00+01:00",
114
+ "points": -0,
115
+ "count": 2,
116
+ "done": true,
117
+ "tier": 2,
118
+ "code": "\ufffd"
119
+ }
120
+ },
121
+ "task-five": {
122
+ "path": "tasks/five.md",
123
+ "type": "task",
124
+ "fileId": "file-five",
125
+ "text": null,
126
+ "fields": {
127
+ "title": "Five",
128
+ "watchers": [
129
+ "/rooms/team/people/lin.md"
130
+ ],
131
+ "blocked_by": [
132
+ "three.md"
133
+ ],
134
+ "status": "open",
135
+ "due": "2026-01-05",
136
+ "at": "2026-10-30T07:59:59.999999999Z",
137
+ "ends": "2026-10-30T09:00:00+01:00",
138
+ "starts": "08:00:00Z",
139
+ "points": 0,
140
+ "count": -1,
141
+ "done": false,
142
+ "tier": null,
143
+ "code": "alpha"
144
+ }
145
+ },
146
+ "task-six": {
147
+ "path": "tasks/six.md",
148
+ "type": "task",
149
+ "fileId": "file-six",
150
+ "text": null,
151
+ "fields": {
152
+ "title": "Six",
153
+ "watchers": [
154
+ "/rooms/vault/people/ada.md"
155
+ ],
156
+ "blocked_by": [
157
+ "gone.md"
158
+ ],
159
+ "status": "done",
160
+ "due": "2026-10-30",
161
+ "at": "2026-10-30T09:00:00Z",
162
+ "ends": null,
163
+ "starts": "23:59:60Z",
164
+ "points": 2.5,
165
+ "count": 10,
166
+ "done": null,
167
+ "tier": 1,
168
+ "code": "\ud835\udc9c"
169
+ }
170
+ },
171
+ "task-seven": {
172
+ "path": "tasks/seven.md",
173
+ "type": "task",
174
+ "fileId": "file-seven",
175
+ "text": null,
176
+ "fields": {
177
+ "title": "Seven",
178
+ "watchers": [
179
+ "/rooms/vault/people/ada.md",
180
+ "/rooms/team/people/ada.md"
181
+ ],
182
+ "ends": "2026-10-30T08:00:00.000000001Z",
183
+ "starts": "09:30:00Z",
184
+ "points": null,
185
+ "count": -1000000,
186
+ "done": true,
187
+ "tier": 2,
188
+ "code": "alpha"
189
+ }
190
+ },
191
+ "team-ada": {
192
+ "room": "team",
193
+ "path": "people/ada.md",
194
+ "type": "person",
195
+ "fileId": null,
196
+ "text": null,
197
+ "fields": {
198
+ "name": "Ada"
199
+ }
200
+ },
201
+ "team-lin": {
202
+ "room": "team",
203
+ "path": "people/lin.md",
204
+ "type": "person",
205
+ "fileId": null,
206
+ "text": null,
207
+ "fields": {
208
+ "name": "Lin"
209
+ }
210
+ },
211
+ "vault-ada": {
212
+ "room": "vault",
213
+ "path": "people/ada.md",
214
+ "type": "person",
215
+ "fileId": null,
216
+ "text": null,
217
+ "fields": {
218
+ "name": "Ada"
219
+ }
220
+ },
221
+ "push-record": {
222
+ "path": "payments/stripe/2026-11-16-d_1j.4.md",
223
+ "type": "record",
224
+ "fileId": "file-push-record",
225
+ "text": null,
226
+ "fields": {
227
+ "path": "payments/stripe/2026-11-16-d_1j.4.md",
228
+ "received": {
229
+ "at": "2026-11-16T09:12:03Z",
230
+ "through": "0197a3c4-5d6e-7f80-9a1b-2c3d4e5f6a7b",
231
+ "key": "evt_1Q2w3E"
232
+ },
233
+ "claimed": {
234
+ "headers": {
235
+ "content-type": "application/json",
236
+ "stripe-signature": "t=1731748323,v1=5257a8"
237
+ }
238
+ },
239
+ "json": {
240
+ "type": "invoice.paid",
241
+ "data": {
242
+ "object": {
243
+ "status": "paid",
244
+ "amount": 1200
245
+ }
246
+ }
247
+ }
248
+ }
249
+ },
250
+ "mailed-record": {
251
+ "path": "mail/inbox/quote-for-the-garden.md",
252
+ "type": "record",
253
+ "fileId": "file-mailed-record",
254
+ "text": null,
255
+ "fields": {
256
+ "path": "mail/inbox/quote-for-the-garden.md",
257
+ "received": {
258
+ "at": "2026-11-16T09:20:41Z",
259
+ "by": "0197a3c4-5d6e-7f80-9a1b-2c3d4e5f6a7c",
260
+ "key": "<CAF=quote@example.com>",
261
+ "original": "quote-for-the-garden.eml"
262
+ },
263
+ "claimed": {
264
+ "from": "Sam Ortiz <sam@example.com>",
265
+ "date": "Sat, 15 Nov 2026 18:02:11 +0100",
266
+ "subject": "Quote for the garden"
267
+ }
268
+ }
79
269
  }
80
270
  },
81
271
  "cases": [
@@ -959,6 +1149,824 @@
959
1149
  },
960
1150
  "document": "bare-task",
961
1151
  "matches": true
1152
+ },
1153
+ {
1154
+ "name": "a list holds the value an indexed field holds",
1155
+ "query": {
1156
+ "where": {
1157
+ "/status": {
1158
+ "$in": [
1159
+ "done",
1160
+ "open"
1161
+ ]
1162
+ }
1163
+ }
1164
+ },
1165
+ "document": "task",
1166
+ "matches": true
1167
+ },
1168
+ {
1169
+ "name": "a list naming null holds an explicit null",
1170
+ "query": {
1171
+ "where": {
1172
+ "/tier": {
1173
+ "$in": [
1174
+ 2,
1175
+ null
1176
+ ]
1177
+ }
1178
+ }
1179
+ },
1180
+ "document": "task-five",
1181
+ "matches": true
1182
+ },
1183
+ {
1184
+ "name": "a list naming only null leaves a missing value out",
1185
+ "query": {
1186
+ "where": {
1187
+ "/tier": {
1188
+ "$in": [
1189
+ null
1190
+ ]
1191
+ }
1192
+ }
1193
+ },
1194
+ "document": "task",
1195
+ "matches": false
1196
+ },
1197
+ {
1198
+ "name": "a list holds a date-time at the same instant in another offset",
1199
+ "query": {
1200
+ "where": {
1201
+ "/at": {
1202
+ "$in": [
1203
+ "2026-10-30T08:00:00Z",
1204
+ "2026-10-31T00:00:00Z"
1205
+ ]
1206
+ }
1207
+ }
1208
+ },
1209
+ "document": "task",
1210
+ "matches": true
1211
+ },
1212
+ {
1213
+ "name": "a list of booleans holds true",
1214
+ "query": {
1215
+ "where": {
1216
+ "/done": {
1217
+ "$in": [
1218
+ true
1219
+ ]
1220
+ }
1221
+ }
1222
+ },
1223
+ "document": "task-four",
1224
+ "matches": true
1225
+ },
1226
+ {
1227
+ "name": "an explicit null boolean equals null",
1228
+ "query": {
1229
+ "where": {
1230
+ "/done": null
1231
+ }
1232
+ },
1233
+ "document": "task-six",
1234
+ "matches": true
1235
+ },
1236
+ {
1237
+ "name": "a range holds its inclusive lower bound",
1238
+ "query": {
1239
+ "where": {
1240
+ "/count": {
1241
+ "$gte": -1,
1242
+ "$lt": 2
1243
+ }
1244
+ }
1245
+ },
1246
+ "document": "task-five",
1247
+ "matches": true
1248
+ },
1249
+ {
1250
+ "name": "a range leaves its exclusive upper bound out",
1251
+ "query": {
1252
+ "where": {
1253
+ "/count": {
1254
+ "$gte": -1,
1255
+ "$lt": 2
1256
+ }
1257
+ }
1258
+ },
1259
+ "document": "task",
1260
+ "matches": false
1261
+ },
1262
+ {
1263
+ "name": "an exclusive lower bound leaves its own value out",
1264
+ "query": {
1265
+ "where": {
1266
+ "/count": {
1267
+ "$gt": -1000000
1268
+ }
1269
+ }
1270
+ },
1271
+ "document": "task-seven",
1272
+ "matches": false
1273
+ },
1274
+ {
1275
+ "name": "a negative zero lies in a range closed at zero",
1276
+ "query": {
1277
+ "where": {
1278
+ "/points": {
1279
+ "$gte": 0,
1280
+ "$lte": 0
1281
+ }
1282
+ }
1283
+ },
1284
+ "document": "task-four",
1285
+ "matches": true
1286
+ },
1287
+ {
1288
+ "name": "a date range leaves its exclusive upper day out",
1289
+ "query": {
1290
+ "where": {
1291
+ "/due": {
1292
+ "$gte": "2025-12-31",
1293
+ "$lt": "2026-01-05"
1294
+ }
1295
+ }
1296
+ },
1297
+ "document": "task-five",
1298
+ "matches": false
1299
+ },
1300
+ {
1301
+ "name": "a time orders as its text",
1302
+ "query": {
1303
+ "where": {
1304
+ "/starts": {
1305
+ "$gte": "23:59:60Z"
1306
+ }
1307
+ }
1308
+ },
1309
+ "document": "task-six",
1310
+ "matches": true
1311
+ },
1312
+ {
1313
+ "name": "a date-time one nanosecond past an inclusive upper bound lies outside it",
1314
+ "query": {
1315
+ "where": {
1316
+ "/ends": {
1317
+ "$lte": "2026-10-30T08:00:00Z"
1318
+ }
1319
+ }
1320
+ },
1321
+ "document": "task-seven",
1322
+ "matches": false
1323
+ },
1324
+ {
1325
+ "name": "text past U+FFFD holds a letter beyond the Basic Multilingual Plane",
1326
+ "query": {
1327
+ "where": {
1328
+ "/code": {
1329
+ "$gt": "\ufffd"
1330
+ }
1331
+ }
1332
+ },
1333
+ "document": "task-six",
1334
+ "matches": true
1335
+ },
1336
+ {
1337
+ "name": "a closed text range holds its one value",
1338
+ "query": {
1339
+ "where": {
1340
+ "/code": {
1341
+ "$gte": "alpha",
1342
+ "$lte": "alpha"
1343
+ }
1344
+ }
1345
+ },
1346
+ "document": "task-five",
1347
+ "matches": true
1348
+ },
1349
+ {
1350
+ "name": "an equality and a range on two indexed fields hold together",
1351
+ "query": {
1352
+ "where": {
1353
+ "/status": "open",
1354
+ "/points": {
1355
+ "$gt": 2
1356
+ }
1357
+ }
1358
+ },
1359
+ "document": "task",
1360
+ "matches": true
1361
+ },
1362
+ {
1363
+ "name": "a hop keeps a Document whose reference names a matching Document",
1364
+ "query": {
1365
+ "hop": {
1366
+ "field": "/blocked_by",
1367
+ "where": {
1368
+ "/status": "open"
1369
+ }
1370
+ }
1371
+ },
1372
+ "document": "task-five",
1373
+ "matches": true,
1374
+ "refusedInMemory": "hop"
1375
+ },
1376
+ {
1377
+ "name": "a hop leaves out a Document whose references name no matching Document",
1378
+ "query": {
1379
+ "hop": {
1380
+ "field": "/blocked_by",
1381
+ "where": {
1382
+ "/status": "open"
1383
+ }
1384
+ }
1385
+ },
1386
+ "document": "task-four",
1387
+ "matches": false,
1388
+ "refusedInMemory": "hop"
1389
+ },
1390
+ {
1391
+ "name": "a hop keeps a list naming one matching Document and one that is not",
1392
+ "query": {
1393
+ "hop": {
1394
+ "field": "/blocked_by",
1395
+ "where": {
1396
+ "/status": "open"
1397
+ }
1398
+ }
1399
+ },
1400
+ "document": "task",
1401
+ "matches": true,
1402
+ "refusedInMemory": "hop"
1403
+ },
1404
+ {
1405
+ "name": "a hop leaves out an empty reference list",
1406
+ "query": {
1407
+ "hop": {
1408
+ "field": "/blocked_by",
1409
+ "where": {
1410
+ "/status": "open"
1411
+ }
1412
+ }
1413
+ },
1414
+ "document": "bare-task",
1415
+ "matches": false,
1416
+ "refusedInMemory": "hop"
1417
+ },
1418
+ {
1419
+ "name": "a hop leaves out a missing reference field",
1420
+ "query": {
1421
+ "hop": {
1422
+ "field": "/blocked_by",
1423
+ "where": {
1424
+ "/status": "open"
1425
+ }
1426
+ }
1427
+ },
1428
+ "document": "spaced-task",
1429
+ "matches": false,
1430
+ "refusedInMemory": "hop"
1431
+ },
1432
+ {
1433
+ "name": "a hop leaves out a reference to no Document",
1434
+ "query": {
1435
+ "hop": {
1436
+ "field": "/blocked_by",
1437
+ "where": {
1438
+ "/status": "open"
1439
+ }
1440
+ }
1441
+ },
1442
+ "document": "task-six",
1443
+ "matches": false,
1444
+ "refusedInMemory": "hop"
1445
+ },
1446
+ {
1447
+ "name": "none leaves out a Document whose reference names a matching Document",
1448
+ "query": {
1449
+ "hop": {
1450
+ "field": "/blocked_by",
1451
+ "where": {
1452
+ "/status": "open"
1453
+ },
1454
+ "none": true
1455
+ }
1456
+ },
1457
+ "document": "task-five",
1458
+ "matches": false,
1459
+ "refusedInMemory": "hop"
1460
+ },
1461
+ {
1462
+ "name": "none keeps a Document whose references name no matching Document",
1463
+ "query": {
1464
+ "hop": {
1465
+ "field": "/blocked_by",
1466
+ "where": {
1467
+ "/status": "open"
1468
+ },
1469
+ "none": true
1470
+ }
1471
+ },
1472
+ "document": "task-four",
1473
+ "matches": true,
1474
+ "refusedInMemory": "hop"
1475
+ },
1476
+ {
1477
+ "name": "none leaves out a list naming one matching Document and one that is not",
1478
+ "query": {
1479
+ "hop": {
1480
+ "field": "/blocked_by",
1481
+ "where": {
1482
+ "/status": "open"
1483
+ },
1484
+ "none": true
1485
+ }
1486
+ },
1487
+ "document": "task",
1488
+ "matches": false,
1489
+ "refusedInMemory": "hop"
1490
+ },
1491
+ {
1492
+ "name": "none keeps an empty reference list",
1493
+ "query": {
1494
+ "hop": {
1495
+ "field": "/blocked_by",
1496
+ "where": {
1497
+ "/status": "open"
1498
+ },
1499
+ "none": true
1500
+ }
1501
+ },
1502
+ "document": "bare-task",
1503
+ "matches": true,
1504
+ "refusedInMemory": "hop"
1505
+ },
1506
+ {
1507
+ "name": "none keeps a missing reference field",
1508
+ "query": {
1509
+ "hop": {
1510
+ "field": "/blocked_by",
1511
+ "where": {
1512
+ "/status": "open"
1513
+ },
1514
+ "none": true
1515
+ }
1516
+ },
1517
+ "document": "spaced-task",
1518
+ "matches": true,
1519
+ "refusedInMemory": "hop"
1520
+ },
1521
+ {
1522
+ "name": "none keeps a reference to no Document",
1523
+ "query": {
1524
+ "hop": {
1525
+ "field": "/blocked_by",
1526
+ "where": {
1527
+ "/status": "open"
1528
+ },
1529
+ "none": true
1530
+ }
1531
+ },
1532
+ "document": "task-six",
1533
+ "matches": true,
1534
+ "refusedInMemory": "hop"
1535
+ },
1536
+ {
1537
+ "name": "none keeps a Document whose referenced Document is of a type the hop does not name",
1538
+ "query": {
1539
+ "hop": {
1540
+ "field": "/blocked_by",
1541
+ "types": [
1542
+ "person"
1543
+ ],
1544
+ "none": true
1545
+ }
1546
+ },
1547
+ "document": "task-five",
1548
+ "matches": true,
1549
+ "refusedInMemory": "hop"
1550
+ },
1551
+ {
1552
+ "name": "a hop keeps a Document whose reference names a matching Document of another Room it reads",
1553
+ "query": {
1554
+ "hop": {
1555
+ "field": "/watchers",
1556
+ "where": {
1557
+ "/name": "Ada"
1558
+ }
1559
+ }
1560
+ },
1561
+ "document": "task-four",
1562
+ "matches": true,
1563
+ "refusedInMemory": "hop"
1564
+ },
1565
+ {
1566
+ "name": "a hop leaves out a Document whose reference names a Document of another Room it reads that does not match",
1567
+ "query": {
1568
+ "hop": {
1569
+ "field": "/watchers",
1570
+ "where": {
1571
+ "/name": "Ada"
1572
+ }
1573
+ }
1574
+ },
1575
+ "document": "task-five",
1576
+ "matches": false,
1577
+ "refusedInMemory": "hop"
1578
+ },
1579
+ {
1580
+ "name": "a hop matches nothing through a reference into a Room it does not read",
1581
+ "query": {
1582
+ "hop": {
1583
+ "field": "/watchers",
1584
+ "where": {
1585
+ "/name": "Ada"
1586
+ }
1587
+ }
1588
+ },
1589
+ "document": "task-six",
1590
+ "matches": false,
1591
+ "refusedInMemory": "hop"
1592
+ },
1593
+ {
1594
+ "name": "a hop keeps a list naming a matching Document of another Room beside one in a Room it does not read",
1595
+ "query": {
1596
+ "hop": {
1597
+ "field": "/watchers",
1598
+ "where": {
1599
+ "/name": "Ada"
1600
+ }
1601
+ }
1602
+ },
1603
+ "document": "task-seven",
1604
+ "matches": true,
1605
+ "refusedInMemory": "hop"
1606
+ },
1607
+ {
1608
+ "name": "a hop leaves out a list naming a Document of another Room that does not match beside one in a Room it does not read",
1609
+ "query": {
1610
+ "hop": {
1611
+ "field": "/watchers",
1612
+ "where": {
1613
+ "/name": "Ada"
1614
+ }
1615
+ }
1616
+ },
1617
+ "document": "spaced-task",
1618
+ "matches": false,
1619
+ "refusedInMemory": "hop"
1620
+ },
1621
+ {
1622
+ "name": "a hop leaves out a reference to no Document in another Room it reads",
1623
+ "query": {
1624
+ "hop": {
1625
+ "field": "/watchers",
1626
+ "where": {
1627
+ "/name": "Ada"
1628
+ }
1629
+ }
1630
+ },
1631
+ "document": "task",
1632
+ "matches": false,
1633
+ "refusedInMemory": "hop"
1634
+ },
1635
+ {
1636
+ "name": "none leaves out a Document whose reference names a matching Document of another Room it reads",
1637
+ "query": {
1638
+ "hop": {
1639
+ "field": "/watchers",
1640
+ "where": {
1641
+ "/name": "Ada"
1642
+ },
1643
+ "none": true
1644
+ }
1645
+ },
1646
+ "document": "task-four",
1647
+ "matches": false,
1648
+ "refusedInMemory": "hop"
1649
+ },
1650
+ {
1651
+ "name": "none keeps a Document whose reference names a Document of another Room it reads that does not match",
1652
+ "query": {
1653
+ "hop": {
1654
+ "field": "/watchers",
1655
+ "where": {
1656
+ "/name": "Ada"
1657
+ },
1658
+ "none": true
1659
+ }
1660
+ },
1661
+ "document": "task-five",
1662
+ "matches": true,
1663
+ "refusedInMemory": "hop"
1664
+ },
1665
+ {
1666
+ "name": "none leaves out a Document whose reference names a Room it does not read",
1667
+ "query": {
1668
+ "hop": {
1669
+ "field": "/watchers",
1670
+ "where": {
1671
+ "/name": "Ada"
1672
+ },
1673
+ "none": true
1674
+ }
1675
+ },
1676
+ "document": "task-six",
1677
+ "matches": false,
1678
+ "refusedInMemory": "hop"
1679
+ },
1680
+ {
1681
+ "name": "none leaves out a list naming a matching Document of another Room beside one in a Room it does not read",
1682
+ "query": {
1683
+ "hop": {
1684
+ "field": "/watchers",
1685
+ "where": {
1686
+ "/name": "Ada"
1687
+ },
1688
+ "none": true
1689
+ }
1690
+ },
1691
+ "document": "task-seven",
1692
+ "matches": false,
1693
+ "refusedInMemory": "hop"
1694
+ },
1695
+ {
1696
+ "name": "none leaves out a list naming a Document of another Room that does not match beside one in a Room it does not read",
1697
+ "query": {
1698
+ "hop": {
1699
+ "field": "/watchers",
1700
+ "where": {
1701
+ "/name": "Ada"
1702
+ },
1703
+ "none": true
1704
+ }
1705
+ },
1706
+ "document": "spaced-task",
1707
+ "matches": false,
1708
+ "refusedInMemory": "hop"
1709
+ },
1710
+ {
1711
+ "name": "none keeps a reference to no Document in another Room it reads",
1712
+ "query": {
1713
+ "hop": {
1714
+ "field": "/watchers",
1715
+ "where": {
1716
+ "/name": "Ada"
1717
+ },
1718
+ "none": true
1719
+ }
1720
+ },
1721
+ "document": "task",
1722
+ "matches": true,
1723
+ "refusedInMemory": "hop"
1724
+ },
1725
+ {
1726
+ "name": "a Record's push address names its delivery",
1727
+ "query": {
1728
+ "where": {
1729
+ "/received/through": "0197a3c4-5d6e-7f80-9a1b-2c3d4e5f6a7b"
1730
+ }
1731
+ },
1732
+ "document": "push-record",
1733
+ "matches": true
1734
+ },
1735
+ {
1736
+ "name": "a Record's push address leaves another address's delivery out",
1737
+ "query": {
1738
+ "where": {
1739
+ "/received/through": "0197a3c4-5d6e-7f80-9a1b-2c3d4e5f6a7d"
1740
+ }
1741
+ },
1742
+ "document": "push-record",
1743
+ "matches": false
1744
+ },
1745
+ {
1746
+ "name": "a Record its User delivered names no push address",
1747
+ "query": {
1748
+ "where": {
1749
+ "/received/through": {
1750
+ "$exists": true
1751
+ }
1752
+ }
1753
+ },
1754
+ "document": "mailed-record",
1755
+ "matches": false
1756
+ },
1757
+ {
1758
+ "name": "a Record its User delivered names its User",
1759
+ "query": {
1760
+ "where": {
1761
+ "/received/by": {
1762
+ "$exists": true
1763
+ }
1764
+ }
1765
+ },
1766
+ "document": "mailed-record",
1767
+ "matches": true
1768
+ },
1769
+ {
1770
+ "name": "a Record's claimed header is tested at its own name",
1771
+ "query": {
1772
+ "where": {
1773
+ "/claimed/headers/stripe-signature": {
1774
+ "$prefix": "t="
1775
+ }
1776
+ }
1777
+ },
1778
+ "document": "push-record",
1779
+ "matches": true
1780
+ },
1781
+ {
1782
+ "name": "a Record's claimed sender equals itself",
1783
+ "query": {
1784
+ "where": {
1785
+ "/claimed/from": "Sam Ortiz <sam@example.com>"
1786
+ }
1787
+ },
1788
+ "document": "mailed-record",
1789
+ "matches": true
1790
+ },
1791
+ {
1792
+ "name": "a Record's JSON body field matches at its exact path",
1793
+ "query": {
1794
+ "where": {
1795
+ "/json/type": "invoice.paid"
1796
+ }
1797
+ },
1798
+ "document": "push-record",
1799
+ "matches": true
1800
+ },
1801
+ {
1802
+ "name": "a Record's JSON body field nested in objects matches at its exact path",
1803
+ "query": {
1804
+ "where": {
1805
+ "/json/data/object/status": "paid"
1806
+ }
1807
+ },
1808
+ "document": "push-record",
1809
+ "matches": true
1810
+ },
1811
+ {
1812
+ "name": "a Record's JSON body number compares as a number",
1813
+ "query": {
1814
+ "where": {
1815
+ "/json/data/object/amount": {
1816
+ "$gte": 1000
1817
+ }
1818
+ }
1819
+ },
1820
+ "document": "push-record",
1821
+ "matches": true
1822
+ },
1823
+ {
1824
+ "name": "a Record with no JSON body has no JSON body field",
1825
+ "query": {
1826
+ "where": {
1827
+ "/json/type": {
1828
+ "$exists": true
1829
+ }
1830
+ }
1831
+ },
1832
+ "document": "mailed-record",
1833
+ "matches": false
1834
+ },
1835
+ {
1836
+ "name": "a Record's path prefix names its folder",
1837
+ "query": {
1838
+ "where": {
1839
+ "/path": {
1840
+ "$prefix": "payments/stripe/"
1841
+ }
1842
+ }
1843
+ },
1844
+ "document": "push-record",
1845
+ "matches": true
1846
+ },
1847
+ {
1848
+ "name": "a Record's path prefix leaves a Record of another folder out",
1849
+ "query": {
1850
+ "where": {
1851
+ "/path": {
1852
+ "$prefix": "payments/stripe/"
1853
+ }
1854
+ }
1855
+ },
1856
+ "document": "mailed-record",
1857
+ "matches": false
1858
+ }
1859
+ ],
1860
+ "orders": [
1861
+ {
1862
+ "name": "numbers ascend with nulls first, a negative zero tied with zero by Path",
1863
+ "orderBy": { "by": { "field": "/points" }, "direction": "asc", "nulls": "first" },
1864
+ "order": ["task-seven", "spaced-task", "bare-task", "task-five", "task-four", "task-six", "task"]
1865
+ },
1866
+ {
1867
+ "name": "numbers descend with nulls first, ties still by Path",
1868
+ "orderBy": { "by": { "field": "/points" }, "direction": "desc", "nulls": "first" },
1869
+ "order": ["task-seven", "spaced-task", "bare-task", "task", "task-six", "task-five", "task-four"]
1870
+ },
1871
+ {
1872
+ "name": "numbers ascend with nulls last",
1873
+ "orderBy": { "by": { "field": "/points" }, "direction": "asc", "nulls": "last" },
1874
+ "order": ["task-five", "task-four", "task-six", "task", "task-seven", "spaced-task", "bare-task"]
1875
+ },
1876
+ {
1877
+ "name": "numbers descend with nulls last",
1878
+ "orderBy": { "by": { "field": "/points" }, "direction": "desc", "nulls": "last" },
1879
+ "order": ["task", "task-six", "task-five", "task-four", "task-seven", "spaced-task", "bare-task"]
1880
+ },
1881
+ {
1882
+ "name": "integers ascend through negatives, ties by Path",
1883
+ "orderBy": { "by": { "field": "/count" }, "direction": "asc", "nulls": "first" },
1884
+ "order": ["spaced-task", "bare-task", "task-seven", "task-five", "task-four", "task", "task-six"]
1885
+ },
1886
+ {
1887
+ "name": "integers descend, ties by Path",
1888
+ "orderBy": { "by": { "field": "/count" }, "direction": "desc", "nulls": "first" },
1889
+ "order": ["spaced-task", "bare-task", "task-six", "task-four", "task", "task-five", "task-seven"]
1890
+ },
1891
+ {
1892
+ "name": "booleans ascend false before true, null with the missing",
1893
+ "orderBy": { "by": { "field": "/done" }, "direction": "asc", "nulls": "first" },
1894
+ "order": ["task-six", "spaced-task", "bare-task", "task-five", "task", "task-four", "task-seven"]
1895
+ },
1896
+ {
1897
+ "name": "booleans descend with nulls last",
1898
+ "orderBy": { "by": { "field": "/done" }, "direction": "desc", "nulls": "last" },
1899
+ "order": ["task-four", "task-seven", "task-five", "task", "task-six", "spaced-task", "bare-task"]
1900
+ },
1901
+ {
1902
+ "name": "a choice ascends by code point",
1903
+ "orderBy": { "by": { "field": "/status" }, "direction": "asc", "nulls": "first", "stringSort": "lexical" },
1904
+ "order": ["task-seven", "task-four", "task-six", "bare-task", "task-five", "task", "spaced-task"]
1905
+ },
1906
+ {
1907
+ "name": "a choice descends by code point",
1908
+ "orderBy": { "by": { "field": "/status" }, "direction": "desc", "nulls": "first", "stringSort": "lexical" },
1909
+ "order": ["task-seven", "task-five", "task", "spaced-task", "task-four", "task-six", "bare-task"]
1910
+ },
1911
+ {
1912
+ "name": "a choice of integers ascends with its null among the missing",
1913
+ "orderBy": { "by": { "field": "/tier" }, "direction": "asc", "nulls": "first" },
1914
+ "order": ["task-five", "task", "spaced-task", "bare-task", "task-six", "task-four", "task-seven"]
1915
+ },
1916
+ {
1917
+ "name": "a choice of integers descends with nulls last",
1918
+ "orderBy": { "by": { "field": "/tier" }, "direction": "desc", "nulls": "last" },
1919
+ "order": ["task-four", "task-seven", "task-six", "task-five", "task", "spaced-task", "bare-task"]
1920
+ },
1921
+ {
1922
+ "name": "dates ascend, ties by Path",
1923
+ "orderBy": { "by": { "field": "/due" }, "direction": "asc", "nulls": "first", "stringSort": "lexical" },
1924
+ "order": ["task-seven", "spaced-task", "bare-task", "task-four", "task-five", "task", "task-six"]
1925
+ },
1926
+ {
1927
+ "name": "dates descend, ties by Path",
1928
+ "orderBy": { "by": { "field": "/due" }, "direction": "desc", "nulls": "first", "stringSort": "lexical" },
1929
+ "order": ["task-seven", "spaced-task", "bare-task", "task", "task-six", "task-five", "task-four"]
1930
+ },
1931
+ {
1932
+ "name": "date-times ascend by instant whatever their offset, the same instant tied by Path",
1933
+ "orderBy": { "by": { "field": "/at" }, "direction": "asc", "nulls": "first", "stringSort": "lexical" },
1934
+ "order": ["task-seven", "bare-task", "task-five", "task", "spaced-task", "task-six", "task-four"]
1935
+ },
1936
+ {
1937
+ "name": "date-times descend by instant",
1938
+ "orderBy": { "by": { "field": "/at" }, "direction": "desc", "nulls": "first", "stringSort": "lexical" },
1939
+ "order": ["task-seven", "bare-task", "task-four", "task-six", "task", "spaced-task", "task-five"]
1940
+ },
1941
+ {
1942
+ "name": "nullable date-times ascend by instant with nulls last",
1943
+ "orderBy": { "by": { "field": "/ends" }, "direction": "asc", "nulls": "last", "stringSort": "lexical" },
1944
+ "order": ["task-four", "task-five", "task-seven", "task", "task-six", "spaced-task", "bare-task"]
1945
+ },
1946
+ {
1947
+ "name": "nullable date-times descend by instant with nulls first",
1948
+ "orderBy": { "by": { "field": "/ends" }, "direction": "desc", "nulls": "first", "stringSort": "lexical" },
1949
+ "order": ["task", "task-six", "spaced-task", "bare-task", "task-seven", "task-five", "task-four"]
1950
+ },
1951
+ {
1952
+ "name": "times ascend as text, ties by Path",
1953
+ "orderBy": { "by": { "field": "/starts" }, "direction": "asc", "nulls": "first", "stringSort": "lexical" },
1954
+ "order": ["spaced-task", "bare-task", "task-five", "task-four", "task", "task-seven", "task-six"]
1955
+ },
1956
+ {
1957
+ "name": "times descend as text, ties by Path",
1958
+ "orderBy": { "by": { "field": "/starts" }, "direction": "desc", "nulls": "first", "stringSort": "lexical" },
1959
+ "order": ["spaced-task", "bare-task", "task-six", "task", "task-seven", "task-four", "task-five"]
1960
+ },
1961
+ {
1962
+ "name": "bounded text ascends by code point, upper case first and past the basic plane last",
1963
+ "orderBy": { "by": { "field": "/code" }, "direction": "asc", "nulls": "first", "stringSort": "lexical" },
1964
+ "order": ["task", "spaced-task", "bare-task", "task-five", "task-seven", "task-four", "task-six"]
1965
+ },
1966
+ {
1967
+ "name": "bounded text descends by code point with nulls last",
1968
+ "orderBy": { "by": { "field": "/code" }, "direction": "desc", "nulls": "last", "stringSort": "lexical" },
1969
+ "order": ["task-six", "task-four", "task-five", "task-seven", "bare-task", "task", "spaced-task"]
962
1970
  }
963
1971
  ]
964
1972
  }