@agentshouse/mdmodel 0.1.0-c807a6b98e2b4 → 0.1.0-c839e4b34c8dc

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