@dialecte/core 0.7.0 → 0.8.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (692) hide show
  1. package/dist/assets/hub.worker-B1HcVDhn.js +2 -0
  2. package/dist/diagnostics/diagnostics.d.ts +4 -0
  3. package/dist/diagnostics/diagnostics.d.ts.map +1 -1
  4. package/dist/diagnostics/types.d.ts +6 -1
  5. package/dist/diagnostics/types.d.ts.map +1 -1
  6. package/dist/dialecte/create-dialecte-project.d.ts +11 -0
  7. package/dist/dialecte/create-dialecte-project.d.ts.map +1 -0
  8. package/dist/dialecte/create-project-factory.d.ts +14 -0
  9. package/dist/dialecte/create-project-factory.d.ts.map +1 -0
  10. package/dist/dialecte/define-dialecte.d.ts +12 -0
  11. package/dist/dialecte/define-dialecte.d.ts.map +1 -0
  12. package/dist/dialecte/dialecte.constants.d.ts +4 -0
  13. package/dist/dialecte/dialecte.constants.d.ts.map +1 -0
  14. package/dist/dialecte/dialecte.types.d.ts +75 -0
  15. package/dist/dialecte/dialecte.types.d.ts.map +1 -0
  16. package/dist/dialecte/index.d.ts +4 -0
  17. package/dist/dialecte/index.d.ts.map +1 -0
  18. package/dist/{project-DIKdMMHx.js → dialecte-gIPrRzni.js} +8031 -8457
  19. package/dist/document/bind-extensions.d.ts +4 -1
  20. package/dist/document/bind-extensions.d.ts.map +1 -1
  21. package/dist/document/document.d.ts +58 -5
  22. package/dist/document/document.d.ts.map +1 -1
  23. package/dist/document/progress/progress.types.d.ts +21 -4
  24. package/dist/document/progress/progress.types.d.ts.map +1 -1
  25. package/dist/document/query/find/ancestor/find-ancestor.d.ts +2 -0
  26. package/dist/document/query/find/ancestor/find-ancestor.d.ts.map +1 -1
  27. package/dist/document/query/find/by-attribute/find-by-attributes.d.ts +4 -0
  28. package/dist/document/query/find/by-attribute/find-by-attributes.d.ts.map +1 -1
  29. package/dist/document/query/find/descendant/find-descendant.d.ts +2 -0
  30. package/dist/document/query/find/descendant/find-descendant.d.ts.map +1 -1
  31. package/dist/document/query/get/attribute/get-attribute.d.ts +4 -0
  32. package/dist/document/query/get/attribute/get-attribute.d.ts.map +1 -1
  33. package/dist/document/query/get/attribute/get-attributes.d.ts +4 -0
  34. package/dist/document/query/get/attribute/get-attributes.d.ts.map +1 -1
  35. package/dist/document/query/get/definition/get-definition.d.ts +2 -0
  36. package/dist/document/query/get/definition/get-definition.d.ts.map +1 -1
  37. package/dist/document/query/get/record/get-child.d.ts +2 -0
  38. package/dist/document/query/get/record/get-child.d.ts.map +1 -1
  39. package/dist/document/query/get/record/get-children.d.ts +2 -0
  40. package/dist/document/query/get/record/get-children.d.ts.map +1 -1
  41. package/dist/document/query/get/record/get-record.d.ts +2 -0
  42. package/dist/document/query/get/record/get-record.d.ts.map +1 -1
  43. package/dist/document/query/get/record/get-records-by-tagname.d.ts +2 -0
  44. package/dist/document/query/get/record/get-records-by-tagname.d.ts.map +1 -1
  45. package/dist/document/query/get/record/get-records.d.ts +2 -0
  46. package/dist/document/query/get/record/get-records.d.ts.map +1 -1
  47. package/dist/document/query/get/record/load-live-records.d.ts +2 -0
  48. package/dist/document/query/get/record/load-live-records.d.ts.map +1 -1
  49. package/dist/document/query/get/record/resolve-record.d.ts +2 -0
  50. package/dist/document/query/get/record/resolve-record.d.ts.map +1 -1
  51. package/dist/document/query/get/record/staged-lookup.d.ts +4 -0
  52. package/dist/document/query/get/record/staged-lookup.d.ts.map +1 -1
  53. package/dist/document/query/get/tree/get-tree.d.ts +6 -0
  54. package/dist/document/query/get/tree/get-tree.d.ts.map +1 -1
  55. package/dist/document/query/main.d.ts +50 -15
  56. package/dist/document/query/main.d.ts.map +1 -1
  57. package/dist/document/query/snapshot/collect-snapshot.d.ts +2 -0
  58. package/dist/document/query/snapshot/collect-snapshot.d.ts.map +1 -1
  59. package/dist/document/query/snapshot/get-snapshot.d.ts +2 -0
  60. package/dist/document/query/snapshot/get-snapshot.d.ts.map +1 -1
  61. package/dist/document/query/snapshot/records-to-tree.d.ts +2 -0
  62. package/dist/document/query/snapshot/records-to-tree.d.ts.map +1 -1
  63. package/dist/document/query/tree-filter/omit.d.ts +8 -0
  64. package/dist/document/query/tree-filter/omit.d.ts.map +1 -1
  65. package/dist/document/query/tree-filter/order.d.ts +5 -2
  66. package/dist/document/query/tree-filter/order.d.ts.map +1 -1
  67. package/dist/document/query/tree-filter/unwrap.d.ts +2 -0
  68. package/dist/document/query/tree-filter/unwrap.d.ts.map +1 -1
  69. package/dist/document/staged-operations.d.ts +5 -1
  70. package/dist/document/staged-operations.d.ts.map +1 -1
  71. package/dist/document/transaction/clone/clone.d.ts +2 -0
  72. package/dist/document/transaction/clone/clone.d.ts.map +1 -1
  73. package/dist/document/transaction/commit/commit.d.ts.map +1 -1
  74. package/dist/document/transaction/commit/merge-operations.d.ts +1 -1
  75. package/dist/document/transaction/commit/merge-operations.d.ts.map +1 -1
  76. package/dist/document/transaction/commit/summarize-operations.d.ts +16 -0
  77. package/dist/document/transaction/commit/summarize-operations.d.ts.map +1 -0
  78. package/dist/document/transaction/commit/summarize-operations.types.d.ts +17 -0
  79. package/dist/document/transaction/commit/summarize-operations.types.d.ts.map +1 -0
  80. package/dist/document/transaction/create/create.d.ts +2 -0
  81. package/dist/document/transaction/create/create.d.ts.map +1 -1
  82. package/dist/document/transaction/guard.d.ts +5 -0
  83. package/dist/document/transaction/guard.d.ts.map +1 -1
  84. package/dist/document/transaction/index.d.ts +2 -0
  85. package/dist/document/transaction/index.d.ts.map +1 -1
  86. package/dist/document/transaction/main.d.ts +46 -16
  87. package/dist/document/transaction/main.d.ts.map +1 -1
  88. package/dist/document/transaction/stage-operations.d.ts.map +1 -1
  89. package/dist/document/transaction/update/update.d.ts +2 -0
  90. package/dist/document/transaction/update/update.d.ts.map +1 -1
  91. package/dist/document/types.d.ts +3 -5
  92. package/dist/document/types.d.ts.map +1 -1
  93. package/dist/engine-store-CIEqgPUb.js +348 -0
  94. package/dist/engine.constants-DBMjMmV9.js +98 -0
  95. package/dist/engine.d.ts +9 -0
  96. package/dist/engine.d.ts.map +1 -0
  97. package/dist/engine.js +15805 -0
  98. package/dist/errors/codes.d.ts +451 -0
  99. package/dist/errors/codes.d.ts.map +1 -1
  100. package/dist/errors/errors.constants.d.ts +3 -0
  101. package/dist/errors/errors.constants.d.ts.map +1 -0
  102. package/dist/errors/errors.d.ts +10 -0
  103. package/dist/errors/errors.d.ts.map +1 -1
  104. package/dist/errors/types.d.ts +14 -0
  105. package/dist/errors/types.d.ts.map +1 -1
  106. package/dist/helpers/assert-fixed.d.ts +3 -1
  107. package/dist/helpers/assert-fixed.d.ts.map +1 -1
  108. package/dist/helpers/assert-xml-characters.d.ts +35 -0
  109. package/dist/helpers/assert-xml-characters.d.ts.map +1 -0
  110. package/dist/helpers/assert-xml-characters.types.d.ts +26 -0
  111. package/dist/helpers/assert-xml-characters.types.d.ts.map +1 -0
  112. package/dist/helpers/assert-xsi-type.d.ts +4 -0
  113. package/dist/helpers/assert-xsi-type.d.ts.map +1 -1
  114. package/dist/helpers/converter.d.ts +21 -6
  115. package/dist/helpers/converter.d.ts.map +1 -1
  116. package/dist/helpers/evaluate-expectations.d.ts +21 -0
  117. package/dist/helpers/evaluate-expectations.d.ts.map +1 -0
  118. package/dist/helpers/evaluate-expectations.types.d.ts +31 -0
  119. package/dist/helpers/evaluate-expectations.types.d.ts.map +1 -0
  120. package/dist/helpers/guard.d.ts +24 -4
  121. package/dist/helpers/guard.d.ts.map +1 -1
  122. package/dist/helpers/index.d.ts +2 -0
  123. package/dist/helpers/index.d.ts.map +1 -1
  124. package/dist/helpers/merge-extensions.d.ts +2 -0
  125. package/dist/helpers/merge-extensions.d.ts.map +1 -1
  126. package/dist/helpers/read-attributes.d.ts +4 -0
  127. package/dist/helpers/read-attributes.d.ts.map +1 -1
  128. package/dist/helpers/standardizing.d.ts +10 -0
  129. package/dist/helpers/standardizing.d.ts.map +1 -1
  130. package/dist/helpers/strip-attributes.d.ts +2 -0
  131. package/dist/helpers/strip-attributes.d.ts.map +1 -1
  132. package/dist/helpers-DVShv41E.js +489 -0
  133. package/dist/helpers.js +3 -439
  134. package/dist/in-process-link-DBeAOZRp.js +2791 -0
  135. package/dist/index.d.ts +1 -0
  136. package/dist/index.d.ts.map +1 -1
  137. package/dist/index.js +13 -12
  138. package/dist/perf/create-perf.d.ts +8 -1
  139. package/dist/perf/create-perf.d.ts.map +1 -1
  140. package/dist/perf/index.d.ts +1 -1
  141. package/dist/perf/index.d.ts.map +1 -1
  142. package/dist/perf/noop-perf.d.ts.map +1 -1
  143. package/dist/perf/perf.types.d.ts +65 -6
  144. package/dist/perf/perf.types.d.ts.map +1 -1
  145. package/dist/project/index.d.ts +7 -5
  146. package/dist/project/index.d.ts.map +1 -1
  147. package/dist/project/io/export-blob.d.ts +5 -2
  148. package/dist/project/io/export-blob.d.ts.map +1 -1
  149. package/dist/project/io/export-document.d.ts +5 -4
  150. package/dist/project/io/export-document.d.ts.map +1 -1
  151. package/dist/project/io/index.d.ts +1 -1
  152. package/dist/project/io/index.d.ts.map +1 -1
  153. package/dist/project/io/init-empty-document.d.ts +2 -0
  154. package/dist/project/io/init-empty-document.d.ts.map +1 -1
  155. package/dist/project/io/run-export.d.ts +19 -0
  156. package/dist/project/io/run-export.d.ts.map +1 -0
  157. package/dist/project/io/run-export.types.d.ts +45 -0
  158. package/dist/project/io/run-export.types.d.ts.map +1 -0
  159. package/dist/project/io/run-import.d.ts +15 -0
  160. package/dist/project/io/run-import.d.ts.map +1 -0
  161. package/dist/project/io/run-import.types.d.ts +19 -0
  162. package/dist/project/io/run-import.types.d.ts.map +1 -0
  163. package/dist/project/io/store-runtime.constants.d.ts +6 -0
  164. package/dist/project/io/store-runtime.constants.d.ts.map +1 -0
  165. package/dist/project/io/store-runtime.d.ts +12 -0
  166. package/dist/project/io/store-runtime.d.ts.map +1 -0
  167. package/dist/project/io/store-runtime.types.d.ts +18 -0
  168. package/dist/project/io/store-runtime.types.d.ts.map +1 -0
  169. package/dist/project/project-channel.d.ts +11 -0
  170. package/dist/project/project-channel.d.ts.map +1 -0
  171. package/dist/project/project.constants.d.ts +12 -0
  172. package/dist/project/project.constants.d.ts.map +1 -0
  173. package/dist/project/project.d.ts +315 -31
  174. package/dist/project/project.d.ts.map +1 -1
  175. package/dist/project/state/document-lifecycle.d.ts +0 -12
  176. package/dist/project/state/document-lifecycle.d.ts.map +1 -1
  177. package/dist/project/state/document-state.d.ts +4 -0
  178. package/dist/project/state/document-state.d.ts.map +1 -1
  179. package/dist/project/types.d.ts +126 -60
  180. package/dist/project/types.d.ts.map +1 -1
  181. package/dist/project-key-Ch34EtFa.js +1435 -0
  182. package/dist/rolldown-runtime-CYdcPHCu.js +12 -0
  183. package/dist/running-operations-vnijBvn7.js +76 -0
  184. package/dist/same-json-value-C6kUaoyt.js +1603 -0
  185. package/dist/sqlite.d.ts +5 -0
  186. package/dist/sqlite.d.ts.map +1 -0
  187. package/dist/sqlite.js +2671 -0
  188. package/dist/sqlite3.wasm +0 -0
  189. package/dist/store/apply-record-patch.d.ts +13 -0
  190. package/dist/store/apply-record-patch.d.ts.map +1 -0
  191. package/dist/store/closing-connections.d.ts +7 -0
  192. package/dist/store/closing-connections.d.ts.map +1 -0
  193. package/dist/store/closing-connections.types.d.ts +13 -0
  194. package/dist/store/closing-connections.types.d.ts.map +1 -0
  195. package/dist/store/commit-progress.d.ts +10 -0
  196. package/dist/store/commit-progress.d.ts.map +1 -0
  197. package/dist/store/compare-by-id.d.ts +10 -0
  198. package/dist/store/compare-by-id.d.ts.map +1 -0
  199. package/dist/store/document-path.constants.d.ts +20 -0
  200. package/dist/store/document-path.constants.d.ts.map +1 -0
  201. package/dist/store/document-path.d.ts +75 -0
  202. package/dist/store/document-path.d.ts.map +1 -0
  203. package/dist/store/document-path.types.d.ts +11 -0
  204. package/dist/store/document-path.types.d.ts.map +1 -0
  205. package/dist/store/engine/client/check-engine-wire.d.ts +8 -0
  206. package/dist/store/engine/client/check-engine-wire.d.ts.map +1 -0
  207. package/dist/store/engine/client/client.constants.d.ts +30 -0
  208. package/dist/store/engine/client/client.constants.d.ts.map +1 -0
  209. package/dist/store/engine/client/client.types.d.ts +200 -0
  210. package/dist/store/engine/client/client.types.d.ts.map +1 -0
  211. package/dist/store/engine/client/engine-client.d.ts +15 -0
  212. package/dist/store/engine/client/engine-client.d.ts.map +1 -0
  213. package/dist/store/engine/client/engine-control.d.ts +16 -0
  214. package/dist/store/engine/client/engine-control.d.ts.map +1 -0
  215. package/dist/store/engine/client/heartbeat-watch.d.ts +17 -0
  216. package/dist/store/engine/client/heartbeat-watch.d.ts.map +1 -0
  217. package/dist/store/engine/client/hub-connector.d.ts +11 -0
  218. package/dist/store/engine/client/hub-connector.d.ts.map +1 -0
  219. package/dist/store/engine/client/hub-connector.types.d.ts +25 -0
  220. package/dist/store/engine/client/hub-connector.types.d.ts.map +1 -0
  221. package/dist/store/engine/client/worker-connector.d.ts +32 -0
  222. package/dist/store/engine/client/worker-connector.d.ts.map +1 -0
  223. package/dist/store/engine/creation-refusal.d.ts +10 -0
  224. package/dist/store/engine/creation-refusal.d.ts.map +1 -0
  225. package/dist/store/engine/dialecte-refusal.d.ts +18 -0
  226. package/dist/store/engine/dialecte-refusal.d.ts.map +1 -0
  227. package/dist/store/engine/engine-store.d.ts +163 -0
  228. package/dist/store/engine/engine-store.d.ts.map +1 -0
  229. package/dist/store/engine/engine-store.types.d.ts +53 -0
  230. package/dist/store/engine/engine-store.types.d.ts.map +1 -0
  231. package/dist/store/engine/engine.constants.d.ts +14 -0
  232. package/dist/store/engine/engine.constants.d.ts.map +1 -0
  233. package/dist/store/engine/engine.types.d.ts +165 -0
  234. package/dist/store/engine/engine.types.d.ts.map +1 -0
  235. package/dist/store/engine/host/engine-wire.d.ts +19 -0
  236. package/dist/store/engine/host/engine-wire.d.ts.map +1 -0
  237. package/dist/store/engine/host/heartbeat.d.ts +33 -0
  238. package/dist/store/engine/host/heartbeat.d.ts.map +1 -0
  239. package/dist/store/engine/host/host.constants.d.ts +13 -0
  240. package/dist/store/engine/host/host.constants.d.ts.map +1 -0
  241. package/dist/store/engine/host/host.types.d.ts +65 -0
  242. package/dist/store/engine/host/host.types.d.ts.map +1 -0
  243. package/dist/store/engine/host/store-events.d.ts +14 -0
  244. package/dist/store/engine/host/store-events.d.ts.map +1 -0
  245. package/dist/store/engine/hub/hub-client.constants.d.ts +27 -0
  246. package/dist/store/engine/hub/hub-client.constants.d.ts.map +1 -0
  247. package/dist/store/engine/hub/hub-client.d.ts +46 -0
  248. package/dist/store/engine/hub/hub-client.d.ts.map +1 -0
  249. package/dist/store/engine/hub/hub-client.types.d.ts +208 -0
  250. package/dist/store/engine/hub/hub-client.types.d.ts.map +1 -0
  251. package/dist/store/engine/hub/hub-protocol.types.d.ts +193 -0
  252. package/dist/store/engine/hub/hub-protocol.types.d.ts.map +1 -0
  253. package/dist/store/engine/hub/hub-router.d.ts +9 -0
  254. package/dist/store/engine/hub/hub-router.d.ts.map +1 -0
  255. package/dist/store/engine/hub/hub-shell.d.ts +13 -0
  256. package/dist/store/engine/hub/hub-shell.d.ts.map +1 -0
  257. package/dist/store/engine/hub/hub-shell.types.d.ts +64 -0
  258. package/dist/store/engine/hub/hub-shell.types.d.ts.map +1 -0
  259. package/dist/store/engine/hub/hub.constants.d.ts +33 -0
  260. package/dist/store/engine/hub/hub.constants.d.ts.map +1 -0
  261. package/dist/store/engine/hub/hub.types.d.ts +305 -0
  262. package/dist/store/engine/hub/hub.types.d.ts.map +1 -0
  263. package/dist/store/engine/hub/hub.worker.d.ts +2 -0
  264. package/dist/store/engine/hub/hub.worker.d.ts.map +1 -0
  265. package/dist/store/engine/hub/realm-host.d.ts +10 -0
  266. package/dist/store/engine/hub/realm-host.d.ts.map +1 -0
  267. package/dist/store/engine/hub/realm-host.types.d.ts +78 -0
  268. package/dist/store/engine/hub/realm-host.types.d.ts.map +1 -0
  269. package/dist/store/engine/project-key.d.ts +15 -0
  270. package/dist/store/engine/project-key.d.ts.map +1 -0
  271. package/dist/store/engine/wire/error-envelope.d.ts +25 -0
  272. package/dist/store/engine/wire/error-envelope.d.ts.map +1 -0
  273. package/dist/store/engine/wire/wire-values.d.ts +33 -0
  274. package/dist/store/engine/wire/wire-values.d.ts.map +1 -0
  275. package/dist/store/engine/wire/wire.constants.d.ts +116 -0
  276. package/dist/store/engine/wire/wire.constants.d.ts.map +1 -0
  277. package/dist/store/engine/wire/wire.types.d.ts +119 -0
  278. package/dist/store/engine/wire/wire.types.d.ts.map +1 -0
  279. package/dist/store/hub-public.d.ts +33 -0
  280. package/dist/store/hub-public.d.ts.map +1 -0
  281. package/dist/store/ignore-destroy-outcome.d.ts +6 -0
  282. package/dist/store/ignore-destroy-outcome.d.ts.map +1 -0
  283. package/dist/store/in-memory/in-memory-state.d.ts +46 -0
  284. package/dist/store/in-memory/in-memory-state.d.ts.map +1 -0
  285. package/dist/store/in-memory/in-memory-store.constants.d.ts +7 -0
  286. package/dist/store/in-memory/in-memory-store.constants.d.ts.map +1 -0
  287. package/dist/store/in-memory/in-memory-store.d.ts +105 -17
  288. package/dist/store/in-memory/in-memory-store.d.ts.map +1 -1
  289. package/dist/store/in-memory/types.d.ts +55 -1
  290. package/dist/store/in-memory/types.d.ts.map +1 -1
  291. package/dist/store/index.d.ts +8 -2
  292. package/dist/store/index.d.ts.map +1 -1
  293. package/dist/store/json-values.constants.d.ts +18 -0
  294. package/dist/store/json-values.constants.d.ts.map +1 -0
  295. package/dist/store/json-values.d.ts +40 -0
  296. package/dist/store/json-values.d.ts.map +1 -0
  297. package/dist/store/json-values.types.d.ts +18 -0
  298. package/dist/store/json-values.types.d.ts.map +1 -0
  299. package/dist/store/local/dexie-store.constants.d.ts +20 -0
  300. package/dist/store/local/dexie-store.constants.d.ts.map +1 -0
  301. package/dist/store/local/dexie-store.d.ts +134 -5
  302. package/dist/store/local/dexie-store.d.ts.map +1 -1
  303. package/dist/store/local/types.d.ts +6 -0
  304. package/dist/store/local/types.d.ts.map +1 -1
  305. package/dist/store/lost-write.d.ts +32 -0
  306. package/dist/store/lost-write.d.ts.map +1 -0
  307. package/dist/store/lost-write.types.d.ts +4 -0
  308. package/dist/store/lost-write.types.d.ts.map +1 -0
  309. package/dist/store/open-connections.d.ts +4 -0
  310. package/dist/store/open-connections.d.ts.map +1 -0
  311. package/dist/store/open-connections.types.d.ts +17 -0
  312. package/dist/store/open-connections.types.d.ts.map +1 -0
  313. package/dist/store/own-import.d.ts +10 -0
  314. package/dist/store/own-import.d.ts.map +1 -0
  315. package/dist/store/project-name.d.ts +10 -0
  316. package/dist/store/project-name.d.ts.map +1 -0
  317. package/dist/store/resolve-store.d.ts +28 -4
  318. package/dist/store/resolve-store.d.ts.map +1 -1
  319. package/dist/store/running-operations.d.ts +7 -0
  320. package/dist/store/running-operations.d.ts.map +1 -0
  321. package/dist/store/running-operations.types.d.ts +10 -0
  322. package/dist/store/running-operations.types.d.ts.map +1 -0
  323. package/dist/store/same-json-value.d.ts +9 -0
  324. package/dist/store/same-json-value.d.ts.map +1 -0
  325. package/dist/store/sqlite/adapter/in-process-link.d.ts +20 -0
  326. package/dist/store/sqlite/adapter/in-process-link.d.ts.map +1 -0
  327. package/dist/store/sqlite/adapter/in-process-link.types.d.ts +21 -0
  328. package/dist/store/sqlite/adapter/in-process-link.types.d.ts.map +1 -0
  329. package/dist/store/sqlite/adapter/realm-storage.d.ts +10 -0
  330. package/dist/store/sqlite/adapter/realm-storage.d.ts.map +1 -0
  331. package/dist/store/sqlite/adapter/sqlite-connector.d.ts +14 -0
  332. package/dist/store/sqlite/adapter/sqlite-connector.d.ts.map +1 -0
  333. package/dist/store/sqlite/adapter/sqlite-engine-settings.d.ts +4 -0
  334. package/dist/store/sqlite/adapter/sqlite-engine-settings.d.ts.map +1 -0
  335. package/dist/store/sqlite/adapter/sqlite-hub-spawner.d.ts +8 -0
  336. package/dist/store/sqlite/adapter/sqlite-hub-spawner.d.ts.map +1 -0
  337. package/dist/store/sqlite/adapter/sqlite-hub-spawner.types.d.ts +5 -0
  338. package/dist/store/sqlite/adapter/sqlite-hub-spawner.types.d.ts.map +1 -0
  339. package/dist/store/sqlite/adapter/sqlite-worker-connector.d.ts +8 -0
  340. package/dist/store/sqlite/adapter/sqlite-worker-connector.d.ts.map +1 -0
  341. package/dist/store/sqlite/adapter/sqlite-worker-connector.types.d.ts +5 -0
  342. package/dist/store/sqlite/adapter/sqlite-worker-connector.types.d.ts.map +1 -0
  343. package/dist/store/sqlite/engine/blobs.d.ts +55 -0
  344. package/dist/store/sqlite/engine/blobs.d.ts.map +1 -0
  345. package/dist/store/sqlite/engine/bulk-insert.d.ts +31 -0
  346. package/dist/store/sqlite/engine/bulk-insert.d.ts.map +1 -0
  347. package/dist/store/sqlite/engine/commit.d.ts +20 -0
  348. package/dist/store/sqlite/engine/commit.d.ts.map +1 -0
  349. package/dist/store/sqlite/engine/device-cache.d.ts +13 -0
  350. package/dist/store/sqlite/engine/device-cache.d.ts.map +1 -0
  351. package/dist/store/sqlite/engine/engine-errors.d.ts +26 -0
  352. package/dist/store/sqlite/engine/engine-errors.d.ts.map +1 -0
  353. package/dist/store/sqlite/engine/engine.constants.d.ts +144 -0
  354. package/dist/store/sqlite/engine/engine.constants.d.ts.map +1 -0
  355. package/dist/store/sqlite/engine/engine.types.d.ts +361 -0
  356. package/dist/store/sqlite/engine/engine.types.d.ts.map +1 -0
  357. package/dist/store/sqlite/engine/history.d.ts +114 -0
  358. package/dist/store/sqlite/engine/history.d.ts.map +1 -0
  359. package/dist/store/sqlite/engine/import-queue.d.ts +7 -0
  360. package/dist/store/sqlite/engine/import-queue.d.ts.map +1 -0
  361. package/dist/store/sqlite/engine/import-target.d.ts +23 -0
  362. package/dist/store/sqlite/engine/import-target.d.ts.map +1 -0
  363. package/dist/store/sqlite/engine/import-window.d.ts +23 -0
  364. package/dist/store/sqlite/engine/import-window.d.ts.map +1 -0
  365. package/dist/store/sqlite/engine/reclaim.d.ts +13 -0
  366. package/dist/store/sqlite/engine/reclaim.d.ts.map +1 -0
  367. package/dist/store/sqlite/engine/records.d.ts +117 -0
  368. package/dist/store/sqlite/engine/records.d.ts.map +1 -0
  369. package/dist/store/sqlite/engine/registry.d.ts +76 -0
  370. package/dist/store/sqlite/engine/registry.d.ts.map +1 -0
  371. package/dist/store/sqlite/engine/schema.d.ts +57 -0
  372. package/dist/store/sqlite/engine/schema.d.ts.map +1 -0
  373. package/dist/store/sqlite/engine/sqlite-engine.d.ts +14 -0
  374. package/dist/store/sqlite/engine/sqlite-engine.d.ts.map +1 -0
  375. package/dist/store/sqlite/engine/transaction.d.ts +12 -0
  376. package/dist/store/sqlite/engine/transaction.d.ts.map +1 -0
  377. package/dist/store/sqlite/list-projects.constants.d.ts +12 -0
  378. package/dist/store/sqlite/list-projects.constants.d.ts.map +1 -0
  379. package/dist/store/sqlite/list-projects.d.ts +22 -0
  380. package/dist/store/sqlite/list-projects.d.ts.map +1 -0
  381. package/dist/store/sqlite/list-projects.types.d.ts +28 -0
  382. package/dist/store/sqlite/list-projects.types.d.ts.map +1 -0
  383. package/dist/store/sqlite/load-sqlite.d.ts +11 -0
  384. package/dist/store/sqlite/load-sqlite.d.ts.map +1 -0
  385. package/dist/store/sqlite/runtime/close-engine.d.ts +18 -0
  386. package/dist/store/sqlite/runtime/close-engine.d.ts.map +1 -0
  387. package/dist/store/sqlite/runtime/install-pool.d.ts +94 -0
  388. package/dist/store/sqlite/runtime/install-pool.d.ts.map +1 -0
  389. package/dist/store/sqlite/runtime/pool-header.d.ts +13 -0
  390. package/dist/store/sqlite/runtime/pool-header.d.ts.map +1 -0
  391. package/dist/store/sqlite/runtime/progress-beat.d.ts +13 -0
  392. package/dist/store/sqlite/runtime/progress-beat.d.ts.map +1 -0
  393. package/dist/store/sqlite/runtime/runtime.constants.d.ts +57 -0
  394. package/dist/store/sqlite/runtime/runtime.constants.d.ts.map +1 -0
  395. package/dist/store/sqlite/runtime/runtime.types.d.ts +56 -0
  396. package/dist/store/sqlite/runtime/runtime.types.d.ts.map +1 -0
  397. package/dist/store/sqlite/runtime/serve-dialecte-engine.d.ts +16 -0
  398. package/dist/store/sqlite/runtime/serve-dialecte-engine.d.ts.map +1 -0
  399. package/dist/store/sqlite/sqlite-store-of.d.ts +7 -0
  400. package/dist/store/sqlite/sqlite-store-of.d.ts.map +1 -0
  401. package/dist/store/sqlite/sqlite-text.d.ts +20 -0
  402. package/dist/store/sqlite/sqlite-text.d.ts.map +1 -0
  403. package/dist/store/sqlite/sqlite-wasm-url.d.ts +9 -0
  404. package/dist/store/sqlite/sqlite-wasm-url.d.ts.map +1 -0
  405. package/dist/store/sqlite/sqlite.constants.d.ts +15 -0
  406. package/dist/store/sqlite/sqlite.constants.d.ts.map +1 -0
  407. package/dist/store/sqlite/sqlite.types.d.ts +36 -0
  408. package/dist/store/sqlite/sqlite.types.d.ts.map +1 -0
  409. package/dist/store/sqlite-storage.constants.d.ts +14 -0
  410. package/dist/store/sqlite-storage.constants.d.ts.map +1 -0
  411. package/dist/store/sqlite-storage.d.ts +22 -0
  412. package/dist/store/sqlite-storage.d.ts.map +1 -0
  413. package/dist/store/sqlite-storage.types.d.ts +24 -0
  414. package/dist/store/sqlite-storage.types.d.ts.map +1 -0
  415. package/dist/store/store-errors.d.ts +51 -0
  416. package/dist/store/store-errors.d.ts.map +1 -0
  417. package/dist/store/store.constants.d.ts +15 -3
  418. package/dist/store/store.constants.d.ts.map +1 -1
  419. package/dist/store/store.types.d.ts +280 -16
  420. package/dist/store/store.types.d.ts.map +1 -1
  421. package/dist/store/stored-record.d.ts +16 -0
  422. package/dist/store/stored-record.d.ts.map +1 -0
  423. package/dist/store/unfinished-imports.d.ts +15 -0
  424. package/dist/store/unfinished-imports.d.ts.map +1 -0
  425. package/dist/store/write-outcome.d.ts +34 -0
  426. package/dist/store/write-outcome.d.ts.map +1 -0
  427. package/dist/test/assert-valid-xml/assert-valid-xml.constants.d.ts +7 -0
  428. package/dist/test/assert-valid-xml/assert-valid-xml.constants.d.ts.map +1 -0
  429. package/dist/test/assert-valid-xml/assert-valid-xml.d.ts +19 -18
  430. package/dist/test/assert-valid-xml/assert-valid-xml.d.ts.map +1 -1
  431. package/dist/test/assert-valid-xml/assert-valid-xml.types.d.ts +8 -4
  432. package/dist/test/assert-valid-xml/assert-valid-xml.types.d.ts.map +1 -1
  433. package/dist/test/assert-xml/assert-xml.constants.d.ts +25 -0
  434. package/dist/test/assert-xml/assert-xml.constants.d.ts.map +1 -0
  435. package/dist/test/assert-xml/assert-xml.d.ts +23 -34
  436. package/dist/test/assert-xml/assert-xml.d.ts.map +1 -1
  437. package/dist/test/assert-xml/assert-xml.types.d.ts +48 -0
  438. package/dist/test/assert-xml/assert-xml.types.d.ts.map +1 -0
  439. package/dist/test/assert-xml/describe-nearby.d.ts +16 -0
  440. package/dist/test/assert-xml/describe-nearby.d.ts.map +1 -0
  441. package/dist/test/assert-xml/describe-node-place.d.ts +15 -0
  442. package/dist/test/assert-xml/describe-node-place.d.ts.map +1 -0
  443. package/dist/test/assert-xml/index.d.ts +1 -1
  444. package/dist/test/assert-xml/index.d.ts.map +1 -1
  445. package/dist/test/assert-xml/query-failure-message.d.ts +24 -0
  446. package/dist/test/assert-xml/query-failure-message.d.ts.map +1 -0
  447. package/dist/test/assert-xml/read-xpath-step.d.ts +8 -0
  448. package/dist/test/assert-xml/read-xpath-step.d.ts.map +1 -0
  449. package/dist/test/assert-xml/xpath-parser.d.ts +2 -1
  450. package/dist/test/assert-xml/xpath-parser.d.ts.map +1 -1
  451. package/dist/test/config.d.ts +5 -0
  452. package/dist/test/config.d.ts.map +1 -1
  453. package/dist/test/constant.d.ts +2 -0
  454. package/dist/test/constant.d.ts.map +1 -1
  455. package/dist/test/create-test-dialecte.d.ts +32 -37
  456. package/dist/test/create-test-dialecte.d.ts.map +1 -1
  457. package/dist/test/create-test-dialecte.types.d.ts +99 -0
  458. package/dist/test/create-test-dialecte.types.d.ts.map +1 -0
  459. package/dist/test/create-test-helpers-internal.types.d.ts +19 -0
  460. package/dist/test/create-test-helpers-internal.types.d.ts.map +1 -0
  461. package/dist/test/create-test-helpers.d.ts +13 -0
  462. package/dist/test/create-test-helpers.d.ts.map +1 -0
  463. package/dist/test/create-test-helpers.types.d.ts +50 -0
  464. package/dist/test/create-test-helpers.types.d.ts.map +1 -0
  465. package/dist/test/fixtures/test-entry-scan-constraint.d.ts +3 -0
  466. package/dist/test/fixtures/test-entry-scan-constraint.d.ts.map +1 -0
  467. package/dist/test/fixtures/test-entry-scan-edges.types.d.ts +10 -0
  468. package/dist/test/fixtures/test-entry-scan-edges.types.d.ts.map +1 -0
  469. package/dist/test/fixtures/test-entry-scan-recursive.d.ts +4 -0
  470. package/dist/test/fixtures/test-entry-scan-recursive.d.ts.map +1 -0
  471. package/dist/test/fixtures/test-entry-scan-recursive.types.d.ts +15 -0
  472. package/dist/test/fixtures/test-entry-scan-recursive.types.d.ts.map +1 -0
  473. package/dist/test/fixtures/test-entry-scan-shapes.d.ts +14 -0
  474. package/dist/test/fixtures/test-entry-scan-shapes.d.ts.map +1 -0
  475. package/dist/test/fixtures/test-entry-scan-shapes.types.d.ts +14 -0
  476. package/dist/test/fixtures/test-entry-scan-shapes.types.d.ts.map +1 -0
  477. package/dist/test/fixtures/test-entry-scan-tree.d.ts +3 -0
  478. package/dist/test/fixtures/test-entry-scan-tree.d.ts.map +1 -0
  479. package/dist/test/fixtures/test-entry-scan.d.ts +5 -0
  480. package/dist/test/fixtures/test-entry-scan.d.ts.map +1 -0
  481. package/dist/test/fixtures/test-entry-scan.types.d.ts +5 -0
  482. package/dist/test/fixtures/test-entry-scan.types.d.ts.map +1 -0
  483. package/dist/test/generated/definition.generated.d.ts +5 -0
  484. package/dist/test/generated/definition.generated.d.ts.map +1 -1
  485. package/dist/test/in-memory-storage.setup.d.ts +2 -0
  486. package/dist/test/in-memory-storage.setup.d.ts.map +1 -0
  487. package/dist/test/index.d.ts +6 -0
  488. package/dist/test/index.d.ts.map +1 -1
  489. package/dist/test/normalize-uuids.constants.d.ts +3 -0
  490. package/dist/test/normalize-uuids.constants.d.ts.map +1 -0
  491. package/dist/test/normalize-uuids.d.ts +12 -0
  492. package/dist/test/normalize-uuids.d.ts.map +1 -1
  493. package/dist/test/run-test-cases.d.ts +30 -11
  494. package/dist/test/run-test-cases.d.ts.map +1 -1
  495. package/dist/test/run-test-cases.type.d.ts +16 -0
  496. package/dist/test/run-test-cases.type.d.ts.map +1 -1
  497. package/dist/test/sqlite-storage.setup.d.ts +1 -0
  498. package/dist/test/sqlite-storage.setup.d.ts.map +1 -0
  499. package/dist/test/test-dialecte-setup.d.ts +31 -0
  500. package/dist/test/test-dialecte-setup.d.ts.map +1 -0
  501. package/dist/test/test-dialecte-setup.types.d.ts +29 -0
  502. package/dist/test/test-dialecte-setup.types.d.ts.map +1 -0
  503. package/dist/test/test-dialecte.d.ts +2722 -0
  504. package/dist/test/test-dialecte.d.ts.map +1 -0
  505. package/dist/test/test-dialecte.types.d.ts +3 -0
  506. package/dist/test/test-dialecte.types.d.ts.map +1 -0
  507. package/dist/test/test-dialecte.worker.d.ts +2 -0
  508. package/dist/test/test-dialecte.worker.d.ts.map +1 -0
  509. package/dist/test/test-entry-environment.constants.d.ts +27 -0
  510. package/dist/test/test-entry-environment.constants.d.ts.map +1 -0
  511. package/dist/test/test-record.d.ts +49 -1
  512. package/dist/test/test-record.d.ts.map +1 -1
  513. package/dist/test/test-storage/index.d.ts +5 -0
  514. package/dist/test/test-storage/index.d.ts.map +1 -0
  515. package/dist/test/test-storage/read-test-storage.d.ts +4 -0
  516. package/dist/test/test-storage/read-test-storage.d.ts.map +1 -0
  517. package/dist/test/test-storage/resolve-test-storage.d.ts +9 -0
  518. package/dist/test/test-storage/resolve-test-storage.d.ts.map +1 -0
  519. package/dist/test/test-storage/test-storage.constants.d.ts +9 -0
  520. package/dist/test/test-storage/test-storage.constants.d.ts.map +1 -0
  521. package/dist/test/test-storage/test-storage.types.d.ts +15 -0
  522. package/dist/test/test-storage/test-storage.types.d.ts.map +1 -0
  523. package/dist/test/test-storage/test-store-for.d.ts +19 -0
  524. package/dist/test/test-storage/test-store-for.d.ts.map +1 -0
  525. package/dist/test/test-storage/use-test-storage.d.ts +14 -0
  526. package/dist/test/test-storage/use-test-storage.d.ts.map +1 -0
  527. package/dist/test/test-timing.constants.d.ts +15 -0
  528. package/dist/test/test-timing.constants.d.ts.map +1 -0
  529. package/dist/test/xml/engine-console.d.ts +6 -0
  530. package/dist/test/xml/engine-console.d.ts.map +1 -0
  531. package/dist/test/xml/engine.d.ts +3 -0
  532. package/dist/test/xml/engine.d.ts.map +1 -0
  533. package/dist/test/xml/index.d.ts +8 -0
  534. package/dist/test/xml/index.d.ts.map +1 -0
  535. package/dist/test/xml/malformed-xml-error.d.ts +5 -0
  536. package/dist/test/xml/malformed-xml-error.d.ts.map +1 -0
  537. package/dist/test/xml/print-node.d.ts +7 -0
  538. package/dist/test/xml/print-node.d.ts.map +1 -0
  539. package/dist/test/xml/select-nodes.d.ts +14 -0
  540. package/dist/test/xml/select-nodes.d.ts.map +1 -0
  541. package/dist/test/xml/with-xml-document.constants.d.ts +7 -0
  542. package/dist/test/xml/with-xml-document.constants.d.ts.map +1 -0
  543. package/dist/test/xml/with-xml-document.d.ts +14 -0
  544. package/dist/test/xml/with-xml-document.d.ts.map +1 -0
  545. package/dist/test/xml/xml-query-refused-error.d.ts +13 -0
  546. package/dist/test/xml/xml-query-refused-error.d.ts.map +1 -0
  547. package/dist/test/xml/xml.constants.d.ts +16 -0
  548. package/dist/test/xml/xml.constants.d.ts.map +1 -0
  549. package/dist/test/xml/xml.types.d.ts +31 -0
  550. package/dist/test/xml/xml.types.d.ts.map +1 -0
  551. package/dist/test/xsd/test-ext.xsd +226 -0
  552. package/dist/test/xsd/test.xsd +528 -0
  553. package/dist/test.js +3427 -406
  554. package/dist/types/dialecte-config.d.ts +6 -0
  555. package/dist/types/dialecte-config.d.ts.map +1 -1
  556. package/dist/types/io.d.ts +5 -0
  557. package/dist/types/io.d.ts.map +1 -1
  558. package/dist/utils/attribute-rules.d.ts +16 -1
  559. package/dist/utils/attribute-rules.d.ts.map +1 -1
  560. package/dist/utils/child-occurrences.constants.d.ts +4 -0
  561. package/dist/utils/child-occurrences.constants.d.ts.map +1 -0
  562. package/dist/utils/child-occurrences.d.ts +17 -0
  563. package/dist/utils/child-occurrences.d.ts.map +1 -0
  564. package/dist/utils/child-occurrences.types.d.ts +6 -0
  565. package/dist/utils/child-occurrences.types.d.ts.map +1 -0
  566. package/dist/utils/datatype.d.ts +4 -0
  567. package/dist/utils/datatype.d.ts.map +1 -1
  568. package/dist/utils/format-xml.d.ts +4 -0
  569. package/dist/utils/format-xml.d.ts.map +1 -1
  570. package/dist/utils/index.d.ts +5 -1
  571. package/dist/utils/index.d.ts.map +1 -1
  572. package/dist/utils/invariant.d.ts +2 -0
  573. package/dist/utils/invariant.d.ts.map +1 -1
  574. package/dist/utils/namespaces.d.ts +15 -1
  575. package/dist/utils/namespaces.d.ts.map +1 -1
  576. package/dist/utils/order-children.d.ts +14 -3
  577. package/dist/utils/order-children.d.ts.map +1 -1
  578. package/dist/utils/order-children.types.d.ts +10 -0
  579. package/dist/utils/order-children.types.d.ts.map +1 -0
  580. package/dist/utils/particle-occurrences.d.ts +4 -0
  581. package/dist/utils/particle-occurrences.d.ts.map +1 -0
  582. package/dist/utils/required-choices.d.ts +17 -0
  583. package/dist/utils/required-choices.d.ts.map +1 -0
  584. package/dist/utils/required-choices.types.d.ts +15 -0
  585. package/dist/utils/required-choices.types.d.ts.map +1 -0
  586. package/dist/utils/resolve-definition.d.ts +4 -0
  587. package/dist/utils/resolve-definition.d.ts.map +1 -1
  588. package/dist/utils/save-to-disk.constants.d.ts +3 -0
  589. package/dist/utils/save-to-disk.constants.d.ts.map +1 -0
  590. package/dist/utils/save-to-disk.d.ts +17 -5
  591. package/dist/utils/save-to-disk.d.ts.map +1 -1
  592. package/dist/utils/save-to-disk.types.d.ts +17 -0
  593. package/dist/utils/save-to-disk.types.d.ts.map +1 -0
  594. package/dist/utils/seeded-uuid.constants.d.ts +5 -0
  595. package/dist/utils/seeded-uuid.constants.d.ts.map +1 -0
  596. package/dist/utils/seeded-uuid.d.ts +15 -0
  597. package/dist/utils/seeded-uuid.d.ts.map +1 -0
  598. package/dist/utils/seeded-uuid.types.d.ts +8 -0
  599. package/dist/utils/seeded-uuid.types.d.ts.map +1 -0
  600. package/dist/utils/tell-listener.constants.d.ts +9 -0
  601. package/dist/utils/tell-listener.constants.d.ts.map +1 -0
  602. package/dist/utils/tell-listener.d.ts +24 -0
  603. package/dist/utils/tell-listener.d.ts.map +1 -0
  604. package/dist/utils/xml-characters.constants.d.ts +9 -0
  605. package/dist/utils/xml-characters.constants.d.ts.map +1 -0
  606. package/dist/utils/xml-characters.d.ts +8 -0
  607. package/dist/utils/xml-characters.d.ts.map +1 -0
  608. package/dist/utils/xml-whitespace.constants.d.ts +8 -0
  609. package/dist/utils/xml-whitespace.constants.d.ts.map +1 -0
  610. package/dist/utils/xml-whitespace.d.ts +19 -0
  611. package/dist/utils/xml-whitespace.d.ts.map +1 -0
  612. package/dist/utils/xsi-type.d.ts +4 -0
  613. package/dist/utils/xsi-type.d.ts.map +1 -1
  614. package/dist/utils/yield-to-queue.d.ts +6 -0
  615. package/dist/utils/yield-to-queue.d.ts.map +1 -0
  616. package/dist/utils-USNkj4sT.js +1275 -0
  617. package/dist/utils.js +1 -2
  618. package/dist/xml/build/document-root.d.ts +7 -0
  619. package/dist/xml/build/document-root.d.ts.map +1 -0
  620. package/dist/xml/build/index.d.ts +0 -5
  621. package/dist/xml/build/index.d.ts.map +1 -1
  622. package/dist/xml/build/record-element.d.ts +15 -0
  623. package/dist/xml/build/record-element.d.ts.map +1 -0
  624. package/dist/xml/build/record-element.types.d.ts +12 -0
  625. package/dist/xml/build/record-element.types.d.ts.map +1 -0
  626. package/dist/xml/build/write-xml-records.d.ts +7 -0
  627. package/dist/xml/build/write-xml-records.d.ts.map +1 -0
  628. package/dist/xml/build/write-xml-records.types.d.ts +11 -0
  629. package/dist/xml/build/write-xml-records.types.d.ts.map +1 -0
  630. package/dist/xml/build/xml-element.d.ts +79 -0
  631. package/dist/xml/build/xml-element.d.ts.map +1 -0
  632. package/dist/xml/build/xml-element.types.d.ts +34 -0
  633. package/dist/xml/build/xml-element.types.d.ts.map +1 -0
  634. package/dist/xml/build/xml-writer.constants.d.ts +24 -0
  635. package/dist/xml/build/xml-writer.constants.d.ts.map +1 -0
  636. package/dist/xml/build/xml-writer.d.ts +40 -0
  637. package/dist/xml/build/xml-writer.d.ts.map +1 -0
  638. package/dist/xml/build/xml-writer.types.d.ts +34 -0
  639. package/dist/xml/build/xml-writer.types.d.ts.map +1 -0
  640. package/dist/xml/dom/index.d.ts +3 -0
  641. package/dist/xml/dom/index.d.ts.map +1 -0
  642. package/dist/xml/dom/xml-document-from-file.d.ts +10 -0
  643. package/dist/xml/dom/xml-document-from-file.d.ts.map +1 -0
  644. package/dist/xml/dom/xml-document-from-file.types.d.ts +5 -0
  645. package/dist/xml/dom/xml-document-from-file.types.d.ts.map +1 -0
  646. package/dist/xml/index.d.ts +1 -0
  647. package/dist/xml/index.d.ts.map +1 -1
  648. package/dist/xml/inspect-xml.d.ts +2 -0
  649. package/dist/xml/inspect-xml.d.ts.map +1 -1
  650. package/dist/xml/parse/index.d.ts +1 -1
  651. package/dist/xml/parse/index.d.ts.map +1 -1
  652. package/dist/xml/parse/parse-xml-document.constants.d.ts +5 -0
  653. package/dist/xml/parse/parse-xml-document.constants.d.ts.map +1 -0
  654. package/dist/xml/parse/parse-xml-document.d.ts +13 -2
  655. package/dist/xml/parse/parse-xml-document.d.ts.map +1 -1
  656. package/dist/xml/parse/parse-xml-document.types.d.ts +7 -2
  657. package/dist/xml/parse/parse-xml-document.types.d.ts.map +1 -1
  658. package/dist/xml/parse/parser.constants.d.ts +7 -0
  659. package/dist/xml/parse/parser.constants.d.ts.map +1 -0
  660. package/dist/xml/parse/parser.d.ts.map +1 -1
  661. package/package.json +88 -8
  662. package/skills/dialecte/SKILL.md +276 -0
  663. package/skills/dialecte/references/api.json +1830 -0
  664. package/skills/dialecte/references/api.md +557 -0
  665. package/skills/dialecte/references/core-api.md +204 -0
  666. package/skills/dialecte/references/testing.md +116 -0
  667. package/skills/dialecte-contributing/SKILL.md +328 -0
  668. package/skills/dialecte-contributing/references/code-rules.md +108 -0
  669. package/skills/dialecte-contributing/references/landing-changes.md +83 -0
  670. package/skills/dialecte-contributing/references/perf.md +39 -0
  671. package/skills/dialecte-contributing/references/traps.md +89 -0
  672. package/skills/dialecte-lot/SKILL.md +471 -0
  673. package/skills/dialecte-lot/references/briefs.md +152 -0
  674. package/skills/dialecte-lot/references/model-tiers.md +52 -0
  675. package/skills/dialecte-lot/references/retro.md +51 -0
  676. package/dist/project/io/import-document.d.ts +0 -7
  677. package/dist/project/io/import-document.d.ts.map +0 -1
  678. package/dist/test/assert-xml/types.d.ts +0 -2
  679. package/dist/test/assert-xml/types.d.ts.map +0 -1
  680. package/dist/utils-DJN0Md0v.js +0 -624
  681. package/dist/xml/build/build-xml-document.d.ts +0 -10
  682. package/dist/xml/build/build-xml-document.d.ts.map +0 -1
  683. package/dist/xml/build/build-xml-document.types.d.ts +0 -22
  684. package/dist/xml/build/build-xml-document.types.d.ts.map +0 -1
  685. package/dist/xml/build/download-file.d.ts +0 -7
  686. package/dist/xml/build/download-file.d.ts.map +0 -1
  687. package/dist/xml/build/formatter.d.ts +0 -2
  688. package/dist/xml/build/formatter.d.ts.map +0 -1
  689. package/dist/xml/build/serialize.d.ts +0 -11
  690. package/dist/xml/build/serialize.d.ts.map +0 -1
  691. package/dist/xml/build/serialize.types.d.ts +0 -12
  692. package/dist/xml/build/serialize.types.d.ts.map +0 -1
@@ -0,0 +1,328 @@
1
+ ---
2
+ name: dialecte-contributing
3
+ description: Change Dialecte itself - @dialecte/core, a dialecte package, the generator (create) or the type-perf CLI (cli). Covers how the repos are split, the placement decision (core vs dialecte hook vs dialecte extension vs helper vs consumer code), the red-first table-driven workflow, the Definition of Done gates (check, format, build, test, doc:build, docs + CHANGELOG), the team code rules, the verification traps that give false greens, and how a change is handed over (a commit-by-lots hand-over the user runs, never pushed by the agent). Use it whenever the working directory is inside a dialecte repo, the task says "add to core", "new hook", "new extension method", "fix dialecte", "bump core in a dialecte package", or a consumer feature is blocked on a missing dialecte capability. Load the dialecte skill too for the API map; for a dialecte's own schema knowledge also load its skill (dialecte-<id>).
4
+ license: MIT
5
+ metadata:
6
+ author: dialecte
7
+ version: '0.1.0'
8
+ ---
9
+
10
+ <!-- dialecte-skills workspace -->
11
+
12
+ # Dialecte (changing it)
13
+
14
+ Read the `dialecte` skill first: its layer model and reuse ladder apply here even more, because
15
+ in the repo you can see everything and are tempted to write a new primitive next to an old one.
16
+
17
+ Dialecte is treated as **greenfield**: internal and public APIs may change for clarity or speed.
18
+ When you see something that can be cleaner, faster or shared, do it in the same change rather than
19
+ leaving a note. A **breaking** change to public API or behaviour is always allowed as an option,
20
+ but it is proposed to the maintainer first (what breaks, why, alternatives) - never slipped in,
21
+ never avoided out of caution.
22
+
23
+ ## The repos
24
+
25
+ Each package is its own git repo; work with them checked out side by side (one folder,
26
+ optionally `$DIALECTE_ROOT`).
27
+
28
+ | Repo | Role | Notes |
29
+ | ------------------- | --------------------------------------------- | ----------------------------------------------------------------------------------------- |
30
+ | `core` | schema-agnostic engine | no domain knowledge, ever; tests run on a dummy test schema |
31
+ | `scl`, `nsd`, `plc` | dialecte packages | `src/<version>/` = generated `definition/` + hand-written config, hooks, extensions, test |
32
+ | `create` | XSD → definition generator + package template | Python XSD reader (via Pyodide) + TS derivation; `npm create @dialecte` |
33
+ | `cli` | `dialecte` dev CLI | type coverage, type bench, narrowing, readability audit |
34
+ | `playground` | Vue/Monaco sandbox | run a script against a document; `DIALECTE_LOCAL=../x npm run dev` |
35
+
36
+ All of them are **npm** projects formatted with **oxfmt**, linted with **oxlint**, tested with
37
+ **vitest**: in core, in Node on the in-memory store, and in Playwright Chromium for the tests that
38
+ need a browser ([Test tiers](#test-tiers)). Never run pnpm or prettier inside them.
39
+
40
+ Inside a dialecte package (`src/<version>/`):
41
+
42
+ ```
43
+ definition/*.generated.ts DEFINITION, constants, types - generated by create, never hand-edited
44
+ config/ dialecte config, namespaces, `namespace <Name>` hydrated types
45
+ constants/ domain registries and literals repeated in several places
46
+ errors/ defineErrors catalogue, import warning catalogue
47
+ helpers/ pure record readers
48
+ hooks/<hook-name>/ one sub-file per concern, merged into that hook's result
49
+ hooks/shared/ logic shared by several hooks and by import
50
+ hooks/io/ two-pass import session (collect, then resolve)
51
+ extensions/<ns>/{query,transaction}/<verb>.ts business verbs, one per file
52
+ extensions/<ns>/public.ts constants/guards/types offered to consumers
53
+ test/ run<Name>TestCases, fixture validators
54
+ ```
55
+
56
+ ## Where does the change go? Decide and say it before coding
57
+
58
+ Walk it top-down, stop at the first yes:
59
+
60
+ 1. **Does it already exist?** Run the reuse ladder from the `dialecte` skill across core AND the
61
+ dialecte package (grep `extensions/*/{query,transaction}/index.ts`, `hooks/*`, `hooks/shared`,
62
+ core `helpers/index.ts`, `utils/index.ts`). Test tooling and fixtures included.
63
+ 2. **Must it happen on every write or import, whoever writes?** → a **hook** in the dialecte
64
+ package (`hooks/<hook>/<concern>.ts`). Coherence (ids, names derived from references, cleanup of
65
+ orphans) is a hook, not a verb the caller must remember.
66
+ 3. **Is it a domain verb every consumer of this schema could use?** → an **extension** in the
67
+ dialecte package (`extensions/<ns>/query|transaction/<verb>.ts`).
68
+ 4. **Is it schema-agnostic engine behaviour** (traversal, mutation, IO, store, a missing hook
69
+ point)? → **core**. Typed against the generic record model, tested on the dummy test schema.
70
+ 5. **Only this app needs it?** → consumer code (custom extension in the app), not a dialecte change.
71
+
72
+ Two smells: a domain rule in core; a query whose only job is to feed a transaction (let the
73
+ transaction read the definition directly).
74
+
75
+ **Standard vs custom rule** (for a dialecte that implements a standard): the engine implements what
76
+ the standard says, and that is the default. A rule an expert wants that the standard does not
77
+ require is a consumer choice (an option on the verb or a policy hook, default = the standard). A
78
+ rule that contradicts the standard stays out of the engine (consumer override).
79
+
80
+ ## Reading the standard
81
+
82
+ For a dialecte that implements a standard: the standard your dialecte implements is the truth its rules come
83
+ from, and a long text read once by one model is not a reliable source.
84
+
85
+ - **Markdown first.** Read the standard as markdown, citing `file:line`; never the PDF. A document not yet in
86
+ markdown is converted first: markitdown for PDF, DOCX or PPTX; docling or pymupdf4llm when its tables come
87
+ out broken.
88
+ - **The converted text stays private**: kept next to the plans, outside every package repository; never
89
+ committed, never quoted or cited in committed text (code, doc, CHANGELOG, skill) or on GitHub. Committed text
90
+ states the behaviour.
91
+ - **A confirmation** (a name, a type, a cardinality the code already follows): one reader, with line references.
92
+ - **A decision that changes what the engine does or accepts** gets the cross-check, once per decision:
93
+ 1. Two or three independent readers on the `standard` tier (at least one on another model or vendor when
94
+ one is available): the same question, no shared notes, a `file:line` for every claim.
95
+ 2. One reader takes the whole relevant part, the others split it by section, so coverage does not rest on
96
+ one model's retrieval.
97
+ 3. An adjudicator on the `strong` tier compares the answers: an agreed claim with matching lines passes; a
98
+ disagreement, or a claim without a line, becomes a question for the user or the domain expert. Runs of
99
+ one model share its biases, so agreement is evidence, not proof.
100
+ 4. The result (question, claims, lines, verdict) goes in the plan's research folder, next to the plan: later
101
+ lots reuse it instead of reading the standard again.
102
+
103
+ The tiers are those of the `dialecte-lot` skill (its model-tiers reference).
104
+
105
+ ## The workflow
106
+
107
+ 1. **Orient**: read the nearest existing example of what you build (an extension in the same
108
+ package, a hook sub-file, its test) and the package's `doc/` page for the surface. Copy shapes,
109
+ don't invent them. A new extension verb starts from `npx dialecte new verb <namespace>
110
+ <query|transaction> <name>`: it writes the function, its `.types.ts`, a red table case marked
111
+ `only`, the barrel export and the namespace registration, and lists the `FILL:` placeholders
112
+ (`skills check` refuses them until written).
113
+ 2. **Red first, proven by the cli**: the tests come first, from the spec, before any production code:
114
+ a test written after the code can be shaped to please it. Write the table cases (the `dialecte`
115
+ skill's references/testing.md); where the code does not exist yet, a stub with its real type whose body
116
+ throws `new Error('not implemented: <name>')`, called inside an `expect(...)` a matcher completes.
117
+ Remove every focus marker (`.only`, `only: true`) **before** the red: `tdd red` refuses a file holding
118
+ one, and removing it after would be an edit after red. Then `npx dialecte tdd red`: each new or changed
119
+ case must fail on an assertion (or the stub's error inside `expect`); a pass, a missing export, a type
120
+ or syntax error, a timeout is refused with its kind - fix the test. Then the minimum code, the test code
121
+ untouched (tests, helpers, fixtures, snapshots), until `npx dialecte tdd green` (test code edited after
122
+ its red is refused there; snapshots are never written by the run: write a snapshot test's snapshot
123
+ before the red). `npx dialecte tdd status` shows where each case stands. With sub-agents, the test, the
124
+ test review and the code are three agents (`dialecte-lot`, Station 1). Tests share a loaded machine: a
125
+ test owns its temporary folder, and a time bound carries slack and never counts a worker's start; a test
126
+ that reads the disk, spawns a process or measures time carries an explicit bound, named
127
+ (`SOURCE_SCAN_TIMEOUT_MS` in core's `src/test/test-timing.constants.ts`) and several times what the test
128
+ takes on a quiet machine; the test review and the review check that every such test has one. A suite that
129
+ spawns git clears the inherited `GIT_*` variables before any test (a setup file in the `setupFiles` of
130
+ every vitest project that runs the suite - read the config, add one when none does it), for the code
131
+ under test as much as for its own calls: under a commit hook in a worktree they point at the outer repository
132
+ ([references/traps.md](references/traps.md), Tests).
133
+ 3. **Implement under the code rules**: [references/code-rules.md](references/code-rules.md).
134
+ Read it before writing the first line; most review comments come from it. `npx dialecte rules`
135
+ checks them on the changed files.
136
+ 4. **Gates** (below), then docs + CHANGELOG if the surface changed.
137
+ 5. **Independent review**: have a fresh reviewer (a sub-agent with only the spec, the diff and
138
+ these rules, or a human) read the diff against the previous version before hand-over. Self-review
139
+ re-reads your own intent and misses weakened assertions and unusable types.
140
+ 6. **Hand over** through `npx dialecte handover <lots.json>`: the agent writes only the lots file, the
141
+ command writes the hand-over folder and prints the card the user gets
142
+ ([references/landing-changes.md](references/landing-changes.md)). The agent never commits or pushes.
143
+
144
+ ## Test tiers
145
+
146
+ In a package whose vitest config has a `node` project (core), a test runs in one of two tiers.
147
+
148
+ - **Node by default.** Every test file runs in the `node` project, on the in-memory store, unless it is
149
+ declared browser-only. Iterate with `npx vitest run --project node <path>`. The files of
150
+ `NODE_STORE_CONTRACT_TEST_FILES` (the store contract, the IndexedDB-specific tests) run in the
151
+ `node-indexeddb` project instead, on fake-indexeddb: `npx vitest run --project node-indexeddb <path>`.
152
+ A new IndexedDB-specific test goes in that list AND in `BROWSER_ONLY_TEST_FILES` (real IndexedDB
153
+ once per lot).
154
+ - **Browser only for a browser API** (`navigator.storage`, OPFS, a worker, real IndexedDB, the page's
155
+ `DOMParser`, the save dialog or a download link): add the file to `BROWSER_ONLY_TEST_FILES` in
156
+ `vitest.config.constants.ts`, `{ path, why }`, the `why` naming that API. Iterate with
157
+ `npx vitest run --project browser <path>`. A file that reads the package from disk or starts node goes
158
+ to `NODE_ONLY_TEST_FILES` the same way. The config refuses a listed path that names no file.
159
+ - **A difference between the tiers is a bug**, of the store or of the assertion. Never move a test to
160
+ the browser list to hide it, never retry it. Reproduce it with `--project node`, pin it with a red
161
+ case first: in the store contract (`src/store/contract`) when a store answers differently, beside
162
+ core's assertion helper (`src/test/assert-xml`) when it reads the XML differently between tiers.
163
+ Then fix it. When the test's own assertion depends on something no store promises (an XPath `[1]`
164
+ relying on an order the contract leaves open), fix that assertion in the test instead, with the
165
+ reason in a comment. Then run the file in both tiers (`--project node` and `--project browser-all`).
166
+ - **No test names its store**: the runner's `useTestStorage` chooses (the `node` project's setup file
167
+ sets the in-memory store, the browser keeps the local one). See the `dialecte` skill's
168
+ references/testing.md for the assertions: XML text, XPath for small output, record expectations for
169
+ big files.
170
+
171
+ ## Definition of Done - every change, in the changed package
172
+
173
+ Run it with `npx dialecte gate --fast` while iterating and `npx dialecte gate --full` once per lot,
174
+ from the package root; before the branch merges, also the whole suite in the browser (step 4
175
+ below). The gate runs each step below unfiltered and judges it on its exit code and on the counts
176
+ the step printed (a test step that counts no test fails), prints one line per step,
177
+ restores the generated docs the package declares after the docs build, and refuses to run while a
178
+ hand-over script holds the repository. With `--fast`, a change that touches no test (a doc edit)
179
+ passes the tests step with the note "no test file is affected by the change"; any other run that
180
+ counts no test fails. Paste its lines in your report: they are the real counts. A gate of the same
181
+ mode on a tree it already passed, with the same lock, linked dependencies and steps, runs its hygiene and `tdd`
182
+ step, then answers the rest from that record (`reused`, from cli 0.2.0). `--rerun` forces a run: only when the
183
+ person asks, or when something outside the key changed (an edit, a lock or a linked dependency already makes a
184
+ new key).
185
+
186
+ Both modes run a **`tdd` step** after the hygiene: every new or changed test case holds a red receipt and a
187
+ later green one (`dialecte tdd red` / `green`), and the test code (helpers, fixtures, snapshots included)
188
+ is as the last red run froze it; a lot that changes no behaviour (wording, rename, docs) is declared
189
+ exempt by the orchestrator in `.dialecte/lot.json` (`{ "tdd": "exempt: <reason>" }`, never committed),
190
+ and the gate prints how many production and test files the change still touches.
191
+
192
+ `--fast` starts with the worktree's **hygiene**: nothing staged, no stash entry pushed on this
193
+ worktree's branch since `dialecte worktree add` made it (other branches' entries are only noted), and
194
+ every new file declared (`--declare <path>`, one per new file or folder; an undeclared one is a
195
+ warning). A failure names what changed and the read-only commands
196
+ to look at it. `--full` and the heavy steps hold a machine-wide lock: a step the package marks `heavy`, a
197
+ command naming a browser project, and any test step of a package that runs its tests in a browser (a
198
+ `@vitest/browser*` or playwright dependency, a `browser` in its vitest config). A second heavy run waits
199
+ with a line every 30 s naming the holder (`--no-wait` refuses). A heavy run outside the gate (a browser suite,
200
+ mutation tests, a bench) starts with `npx dialecte lock run -- <command>`, which takes the same lock; a cli
201
+ whose `npx dialecte --help` lists no `lock` does not have it yet: run nothing heavy while another heavy run is
202
+ on the machine (`uptime`, and `ps` or `pgrep -fl` for a browser, vitest or Stryker process), and never write a
203
+ lock script of your own.
204
+
205
+ **Waiting on a long run** (`gate --full`, a mutation run, a bench): start it in the background with its output in
206
+ a log - your harness's background run, or `cmd > "$log" 2>&1 & echo $! > "$pidfile"` - then wait for the
207
+ harness's completion notice or on that PID (`while kill -0 "$(cat "$pidfile")" 2>/dev/null; do sleep 5; done`),
208
+ with an upper bound tied to the run's expected duration; at the bound, report "timed out" with the log's tail.
209
+ Never wait with `pgrep -f "<text>"` when that text is in your own wait command: the loop finds itself and never
210
+ ends (`pgrep -f "[m]utants.ts"` if it is unavoidable). When the wait ends, read the exit code and the log's
211
+ summary line: "no process found" is not a pass.
212
+
213
+ Read the step list in the package's `package.json` (`"dialecte": { "gate" }`) when it overrides the
214
+ defaults. The gate, `rules`, `new verb`, `handover` and the `skills` check of step 6 come with `@dialecte/cli`
215
+ 0.2.0 or later. Read the package's pin first (`npm ls @dialecte/cli`): with an older one, every such command
216
+ runs as `npx @dialecte/cli@^0.2.0 <command>` - never `@latest`, which can be older than 0.2.0 and lacks them -
217
+ or the steps by hand:
218
+
219
+ 1. `npm run check` - type-checks sources AND tests, lint, format. Never a bare `tsc --noEmit`
220
+ (`tsconfig.json` is a solution file and checks nothing).
221
+ 2. `npx oxfmt <changed files>`.
222
+ 3. `npm run build` - runs the type-check in parallel and emits declarations (vite-plugin-dts),
223
+ which catches union-assignability errors the editor misses.
224
+ 4. The tests, by tier: `npm run test:node` per step (the fast gate runs its changed files), the
225
+ browser-only list once per lot (`npx vitest run --project browser --no-file-parallelism`, in the full
226
+ gate), and `npm run test:browser:all` - the whole suite in the browser - once before the branch
227
+ merges: any difference fails it, never retried. A package without a `node` project: `npx vitest run`
228
+ (`npm run test` is watch mode in some packages; create uses `npm run test:ts` + `test:py`).
229
+ One file while iterating: [Test tiers](#test-tiers).
230
+ 5. `npm run doc:build` - the VitePress docs build.
231
+ 6. `npm run skills:generate`, then `npm run skills:check` - every change, not only one that touches a skill:
232
+ the check fails on a name, path or script a skill cites that no longer exists, and on a public function
233
+ without its JSDoc summary and `@intent` (below). The scripts run the package's pinned cli; with a pin
234
+ older than 0.2.0 they check neither, so run `npx @dialecte/cli@^0.2.0 skills generate` and
235
+ `npx @dialecte/cli@^0.2.0 skills check` instead (it fails loudly while 0.2.0 is unpublished, never falls
236
+ back to an older cli).
237
+
238
+ If public API or user-visible behaviour changed, it is not done until you also:
239
+
240
+ - give every new public function or method a JSDoc whose first paragraph says what a caller gets, and an
241
+ `@intent` tag - comma-separated phrases naming what a caller is trying to do when they reach for it
242
+ (`@intent validate an exported file against its XSD, find what a document breaks`) - even when the
243
+ functions beside it carry none. Public means any function exported from an entry of the package's
244
+ `package.json` `exports` (every entry: the main one, `./utils`, `./helpers`, `./sqlite`, `./test` - other
245
+ packages' suites import the test entry - a dialecte's version entry) and any method reached from `project`,
246
+ `doc`, `doc.query` or `tx`. The skills' API index (`skills/dialecte/references/api.md`, `api.json`, what
247
+ `dialecte api find` answers from) is built from these two: a function without them is one the next agent
248
+ cannot find, and writes again. An export not meant for callers is tagged `@internal` instead and stays out
249
+ of the index;
250
+ - update the `doc/` page that describes that surface (types, verbs, contracts),
251
+ - add a line under `## UNRELEASED` in the package's `CHANGELOG.md`, written for the user, and
252
+ - update the package's `skills/` when the change touches what a skill describes (API, hooks,
253
+ extensions, scripts, layout, rules); `npm run skills:generate` refreshes the generated tables, and the
254
+ check runs in the gate (step 6).
255
+
256
+ Type performance: `npm run type-bench:check` compares type instantiations with
257
+ `benchmarks/types/baseline.json` (one per version folder in a dialecte package:
258
+ `benchmarks/types/<version>/baseline.json`; 5 % gate). A breach is a **think point**, not a wall: measure
259
+ and explain the growth; if it is legitimate, re-baseline with `npm run type-bench` in its own lot.
260
+ Never hand-edit `baseline.json`, never twist code to dodge the gate.
261
+
262
+ Run slow gates (create's `npm run proof`, corpora, mutation testing) once per lot before hand-over,
263
+ not after every fix. Fast targeted runs while iterating.
264
+
265
+ ## Cross-package changes
266
+
267
+ A dialecte package depends on a **published** core version (an installed copy, not a symlink). A
268
+ core change is invisible to the package until you: build core → put its build where the package
269
+ resolves it (`npm install ../core` in the package, a symlink
270
+ `<package>/node_modules/@dialecte/core -> ../../../core`, or a copied `dist/`) → delete the package's
271
+ `node_modules/.vite` (vitest pre-bundles deps and keeps the old core). Before committing, the
272
+ package must depend on a released core version again; never commit the link. Release order: core
273
+ first, then the packages that pin it, each with its own bump lot.
274
+
275
+ ## Verification traps (false greens)
276
+
277
+ Read [references/traps.md](references/traps.md) before trusting any gate output. The short list:
278
+ solution tsconfig checks nothing; tests have their own tsconfig; stale `.vite` cache after a core
279
+ swap; output-compacting shell wrappers can turn a failing gate into "ok" (run verdict gates raw and
280
+ read the counts); a doc build can rewrite a generated data file (restore it before the hand-over
281
+ script is written); before `@dialecte/cli` 0.2.0, `dialecte bench --help` runs the
282
+ bench and writes the baseline; a test that passes on its first run may be green by accident.
283
+
284
+ ## Skills ship with the code
285
+
286
+ Each package carries the skills that describe it in `skills/<name>/` (published in its npm tarball):
287
+ core has `dialecte`, `dialecte-contributing` and `dialecte-lot`, create `dialecte-create`, and every dialecte
288
+ package its own `dialecte-<id>` with the knowledge of its schema. A skill changes in the same PR as the code it describes - never
289
+ in another repository afterwards. `@dialecte/cli` maintains them:
290
+
291
+ | Command | Does |
292
+ | -------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
293
+ | `dialecte skills sync` | installs the skills of the app's dependencies into `.claude/skills` + `.agents/skills` (`--agent claude,copilot,agents`, `--copy`); `--from <workspace>` takes them from local checkouts |
294
+ | `dialecte skills generate` | rewrites the `<!-- dialecte-skills:generated ... -->` blocks (verb map, method and export index, hook files) from the source |
295
+ | `dialecte skills check` | frontmatter, links, and every API / path / npm script a page cites must exist; generated blocks must be fresh; every public function and method has a JSDoc summary and an `@intent`; `--workspace <dir>` also verifies pages that describe several repositories |
296
+
297
+ Write claims so the check can verify them: API as `query.<method>` / `tx.<ns>.<verb>`, paths
298
+ relative to a package, scripts as `npm run <script>`. A deliberate mention of something outside the package goes in
299
+ `<!-- dialecte-skills ignore: token -->`.
300
+
301
+ ## Performance work
302
+
303
+ Measure, don't guess: [references/perf.md](references/perf.md) (perf helper, node bench harness,
304
+ browser timeline, CPU profile). Classic regressions to avoid in review: per-element ancestor walks,
305
+ per-element queries without a cache, re-reading the same records in several passes, store reads
306
+ during import (import is in-memory two-pass by design, see the hooks rules in the `dialecte` skill).
307
+
308
+ ## Never
309
+
310
+ - Edit a `*.generated.ts` file (regenerate with `dialecte-create`).
311
+ - Add a domain rule to core because it was convenient.
312
+ - Restate a registry or the definition by hand (see code-rules).
313
+ - Commit, push, or touch a repo's git index while a hand-over script may be running.
314
+ - Leave a known improvement as a "note for later" without doing it or explaining why you cannot.
315
+
316
+ ## Retro gate - before you hand over
317
+
318
+ List in your hand-over every place where this skill was wrong, missing or misleading for the task,
319
+ and every correction the user made that a skill should have prevented. Then:
320
+
321
+ - **Inside a dialecte repository**: draft each skill edit as before/after and show it to the user; an
322
+ approved edit goes in the same change (skills ship with the package that owns the code), through
323
+ `anthropic-skills:skill-creator` loaded with the Skill tool - the eval case first, failing on the text
324
+ before the change, as `dialecte-lot` describes - then `npm run skills:generate` and `npm run skills:check`.
325
+ - **In an app**: draft an issue for the package that ships the skill - the statement that was wrong
326
+ or missing, the evidence (file, behaviour), the wording you propose - and show it to the user.
327
+ Post it only with their approval.
328
+ - Nothing to report: write "skill retro: nothing".
@@ -0,0 +1,108 @@
1
+ <!-- dialecte-skills workspace -->
2
+
3
+ # Code rules for dialecte repos
4
+
5
+ These are review-blocking. Each has a reason; the reason tells you what to do in a case the rule
6
+ does not name.
7
+
8
+ ## Contents
9
+
10
+ - Reuse and sources of truth
11
+ - Function shape
12
+ - Files and types
13
+ - Naming
14
+ - Comments and committed text
15
+ - Self-check before hand-over
16
+
17
+ ## Reuse and sources of truth
18
+
19
+ - **Search before every helper**, test tooling included. Grep the concern in
20
+ `extensions/*/{query,transaction}/index.ts`, `hooks/*`, `hooks/shared/`, core `helpers/` and
21
+ `utils/`. When you add a function, be ready to name the existing method that could replace it
22
+ and why it does not fit.
23
+ - **No new source of truth.** Before declaring a list (`const X = [...] as const`) look for it in
24
+ the definition (`ATTRIBUTES`, `CHILDREN`, `PARENTS`, identity fields, keyrefs) or in a registry
25
+ (its keys, its `target` tags). Declare only what neither knows, and declare it once: types derived
26
+ from the runtime list. A table that repeats registry content drifts silently.
27
+ - **Read derived views at the use site** instead of copying them; never `const LOCAL = GLOBAL` just
28
+ to rename.
29
+ - **Repeated literals and tag sets** go to the package `constants/` and are imported everywhere;
30
+ derive the union type with `(typeof LIST)[number]`.
31
+ - **Use Dialecte's attribute API**: `query.getAttributes(ref)` / `getAttribute(ref, { name })`, or
32
+ `readAttribute(s)` without a query. No `record.attributes.find(...)` helpers.
33
+ - **Accept a `query` / `tx`** in domain functions so they reuse the primitives, rather than taking
34
+ pre-fetched data and re-implementing lookups.
35
+
36
+ ## Function shape
37
+
38
+ - **Object parameters.** `fn(query, { targetParent, tagName, matchKey })`, not positional. The only
39
+ thing outside the object is a leading `query` / `tx`. A positional signature (a single obvious
40
+ `ref`, a symmetric `equals(a, b)`) is discussed with the maintainer first.
41
+ - **Named `function` declarations**, also for local helpers. Arrows only for tiny inline callbacks
42
+ (`.map`, `.filter`, `.some`). A closure over a local value becomes a module-level named function
43
+ taking that value as a parameter.
44
+ - **No `await` nested in an argument.** `const instances = await findInstances(query, {...})`,
45
+ then pass `instances`.
46
+ - **Immutable, explicit.** Return new values, no hidden state, no mutation of records you received.
47
+ - **Never `any`.** Use the `Any*` core types (`AnyDialecteConfig`, `AnyRawRecord`, ...) in core, the
48
+ hydrated domain types (`<Name>.*`) in a dialecte package. Narrow types as far as they go.
49
+ - **Extension methods** take `Core.Query<Config>` / `Core.Transaction<Config>` as first parameter
50
+ (not the hydrated `<Name>.Query`: type cycle). A sibling is called by import, passing the same
51
+ query. A helper not exported from the folder's `index.ts` is not a method.
52
+
53
+ ## Files and types
54
+
55
+ - **One function per file**, test co-located: `<name>.ts`, `<name>.test.ts`.
56
+ - **Types live in `<name>.types.ts`** next to the code - never exported or domain types inline in
57
+ the implementation file. Exception: no `.types.ts` for a one-line alias that just renames an
58
+ existing type; use the underlying type directly.
59
+ - **Module constants live in `<name>.constants.ts`** (or the extension's `constants/`).
60
+ - **Group by domain, not by technical layer.** Types folders hold only definitions.
61
+ - **Zero runtime cost** for type machinery; watch the type bench when adding generic types.
62
+
63
+ ## Naming
64
+
65
+ - Full, readable camelCase words: `attribute`, not `attr`; `(attribute) => attribute.name`, not
66
+ `(a) => a.name`. Existing API names like `ref` are fine; your own variables say what they are.
67
+
68
+ ## Comments and committed text
69
+
70
+ - Explain the behaviour so the comment stands on its own; a reader without your plan or ticket
71
+ must understand it.
72
+ - **No plan, lot, phase, ticket or acceptance-criterion tags** (a step id, a lot number, an
73
+ acceptance-criterion id, an issue number) in code, comments, tests, docs, CHANGELOG or commit messages. They belong in plans and PR
74
+ descriptions.
75
+ - **No citations of a standard** (a document name with a clause, table, annex or section number)
76
+ in any committed file, commit message, issue, PR or
77
+ review comment. Write the rule itself ("a name stays unique among its siblings"). Citations
78
+ live only in uncommitted plan notes. Naming the standard a library implements (site tagline, the
79
+ XSD it is generated from, the namespace prefixes of the schema, the schema's version ids) is not a citation. Never quote the standard's text anywhere (copyright).
80
+ - Do not create documentation that was not asked for, beyond the docs + CHANGELOG the Definition
81
+ of Done requires.
82
+
83
+ ## Self-check before hand-over
84
+
85
+ ```bash
86
+ npx dialecte rules # the files changed against HEAD and the new ones
87
+ npx dialecte rules <files...> # or the files you name; --json for a program
88
+ ```
89
+
90
+ It reads each file's syntax tree, not lines: an exported type outside a `*.types.ts` file, a module
91
+ constant outside a `*.constants.ts` file, a function declared as a `const`, an `await` inside an
92
+ argument, a plan or ticket tag or a standard citation (the package's own patterns included) are
93
+ errors; positional parameters beyond a leading `query` / `tx` and abbreviated names are warnings. Fix
94
+ every error; answer every warning (fix it, or say in the hand-over why the shape is right). It exits 1
95
+ on an error. A finding that is wrong is a cli bug: report it, do not work around it.
96
+
97
+ `rules` comes with `@dialecte/cli` 0.2.0 or later. Without it, the same checks as greps (not
98
+ tests/types/constants files for the first two); the last two mirror the patterns `rules` and
99
+ `handover` share (the cli's committed-text constants):
100
+
101
+ ```bash
102
+ grep -nE '^(export )?type [A-Z]|^(export )?interface ' <impl files> # inline types?
103
+ grep -nE '^const [A-Z_]+ ' <impl files> # module constants outside *.constants.ts?
104
+ grep -nE 'const [a-zA-Z]+ = (async )?\(' <files> # arrow-function declarations?
105
+ grep -nE '\((await |.*, await )' <files> # await inside an argument?
106
+ grep -nE '\blot [A-Z0-9]|\bAC[0-9]|#[0-9]{3,}\b' <files> # plan / ticket tags?
107
+ grep -nE '§ ?[0-9]|Tables? [0-9]|Annex [A-Z]|[Cc]lause [0-9]' <files> # standard citations? (a dialecte's skill adds its standard's names)
108
+ ```
@@ -0,0 +1,83 @@
1
+ <!-- dialecte-skills workspace -->
2
+
3
+ # Landing a change: commit-by-lots, human runs it
4
+
5
+ The agent prepares; a human reviews and commits. The agent never runs `git commit`, never pushes,
6
+ and never touches a repo's index (`git add`, `git checkout --`, `git stash`) while a hand-over
7
+ script may be waiting or running in the human's terminal.
8
+
9
+ ## The hand-over
10
+
11
+ The agent writes only a lots file; `npx dialecte handover <lots.json>` does the rest. One lots file per lot
12
+ group, in an uncommitted hand-over folder (for example `_commit-plan/<topic>-<yyyy-mm-dd>/lots.json` at the
13
+ workspace root, outside every repo); the hand-over files are written next to it (`--out <dir>` elsewhere):
14
+
15
+ ```json
16
+ {
17
+ "repository": "/absolute/path/to/the/repository",
18
+ "branch": "feat/the-branch",
19
+ "head": "<sha the lots go on top of>",
20
+ "gates": "the gate lines, one line, with their real counts",
21
+ "lots": [
22
+ { "paths": ["src/feature/"], "message": "feat(scope): the behaviour\n\nThe body." },
23
+ { "paths": ["CHANGELOG.md"], "message": "docs(changelog): the behaviour" }
24
+ ]
25
+ }
26
+ ```
27
+
28
+ - **Lots**: paths are files, or folders ending with `/`. Every lot is build-safe on its own (compiles,
29
+ tests green) and does not reference a later lot. Typical order: types/constants → implementation +
30
+ tests → docs → CHANGELOG → bench re-baseline (own lot) → release bump (own lot).
31
+ - **A branch lands on main through a merge lot**, in a lots file whose `repository` is the main checkout:
32
+ `{ "kind": "merge", "branch": "<branch>", "tip": "<sha>", "resolved": {}, "message": "merge: ..." }` -
33
+ a merge commit, never a fast-forward. `resolved` maps each conflicting path to the file holding its
34
+ resolution (`null` removes it). The run needs the merge's `tree`, which the rehearsal prints (`tree <sha>`):
35
+ copy it into the lot as `"tree"`, then `--rehash`.
36
+ - **Never in a lot**: generated docs data (`.vitepress/data/*`), lockfiles and version bumps (unless
37
+ the lot is the release lot), local links to sibling repos. Restore them before the hand-over
38
+ (`git checkout -- <file>` while no hand-over waits): a changed file in no lot makes `handover` refuse.
39
+ - **Interrupted?** A run stopped after staging a lot is refused at its next start with the command that
40
+ unstages those files, with its `cd`: give it to the user.
41
+ - **Guards**, checked when the folder is written (nothing is written on a refusal) and again when it
42
+ runs: the branch and HEAD, the hooks folder `core.hooksPath` names exists (a missing one makes git skip
43
+ every hook), `lots.json` as reviewed, an empty index, every changed file in exactly one lot, no plan tag or standard citation in
44
+ a lot's files (skill evals and test fixtures included) nor in its messages; when it runs, every file
45
+ against the snapshot taken when it was written, and no other file changed.
46
+ - **The folder**: the lots file, the snapshot (`files.txt`, `files.sha256`, `files.deleted`) and a one-line
47
+ `commit.sh` that runs `npx --no-install @dialecte/cli handover run <folder>` (it re-executes itself with
48
+ bash: people run it with `sh`). Nothing per lot. The repository stays locked for `dialecte gate` until
49
+ every lot is committed.
50
+ - **The run** prints each guard with its result and time, then `lot n/N`, the hook's output behind `│`
51
+ with a heartbeat while it is silent, each commit with its stat, and the card at the end; it never
52
+ pushes. A lot whose commit fails is unstaged again; the same command resumes after the lots already
53
+ committed.
54
+ - **Rehearse** when the repository has a commit hook: `npx dialecte handover run <folder> --rehearse`
55
+ commits the lots in a scratch clone holding the working tree, the hooks folder and a copy of
56
+ `node_modules`, then removes it (`--keep` keeps it). From cli 0.2.0 it rehearses only what can find
57
+ something new and prints why per lot. A plain lot is not rehearsed when its exact tree has a green
58
+ `gate --full` (same lock, linked dependencies and command), the lot leaves the lock alone and the hook
59
+ stages no files. A merge is not rehearsed when its tree is its branch tip's (main has not moved), the
60
+ tip's tree has a green record (the branch commit's hook or a `gate --full`) and the merge leaves the lock
61
+ alone; it still prints the merge's `tree <sha>`. Anything else is rehearsed: a merge onto a moved main, a
62
+ lock change, a hook that stages files. Paste the per-lot lines with the card; `--full` forces every lot
63
+ and is for when the person asks. A heavy hook that does run is rehearsed while another suite loads the
64
+ machine, as it will be when the user commits; when that is not possible, the hand-over notes the machine's
65
+ load at rehearsal time (`uptime`). The real commit's hook always runs.
66
+ - Edited a file after the snapshot (a review fix)? `npx dialecte handover --rehash <lots.json>`.
67
+ - `npx dialecte handover list` shows every hand-over folder with its state (pending, partly committed,
68
+ committed, stale); after a merge, `npx dialecte worktree prune` lists the committed ones with the merged
69
+ worktrees and prints their removal commands: an agent hands them (or the `--yes` command, which asks on
70
+ a terminal) to the user with their `cd`.
71
+ - `handover` comes with `@dialecte/cli` 0.2.0 or later; with an older cli in the package, run
72
+ `npx @dialecte/cli@^0.2.0 handover <lots.json>` (never `@latest`, which can be older).
73
+
74
+ ## Commit messages
75
+
76
+ Conventional style (`feat(scope): ...`, `fix`, `docs`, `chore(bench)`, `chore(release)`), written
77
+ as the behaviour for a reader of the history. No plan/ticket tags, no standard citations.
78
+
79
+ ## Hand-over message
80
+
81
+ The message is the card `dialecte handover` printed - repository, worktree, branch, HEAD, gates, the lots
82
+ with their files and messages, and the command to run with its absolute `cd` - pasted as printed, never
83
+ retyped; then what was not verified.
@@ -0,0 +1,39 @@
1
+ <!-- dialecte-skills workspace -->
2
+
3
+ # Measuring dialecte performance
4
+
5
+ Measure a fresh build: after a source edit, rebuild (and refresh any consumer's copy of the build)
6
+ before measuring, or you measure old code.
7
+
8
+ ## The perf helper (inside dialecte)
9
+
10
+ - Enable with `dev: { perf: true }` on project creation (the consumer passes it; dialecte never
11
+ reads its own env).
12
+ - Marks and measures go on the standard performance timeline as `dialecte::<layer>::<name>`
13
+ (`core::import::sax`, `core::store::bulkWrite`, `<dialecte>::<operation>`, ...).
14
+ - In node/vitest use `perf.report()` - per name `{ calls, totalMs, avgMs }`. Reset with
15
+ `perf.reset()` once per scenario (e.g. `beforeEach`), not inside a transaction.
16
+ - Wrap new heavy paths with the helper. Never leave ad-hoc globals or `console.time` in source.
17
+
18
+ ## Node bench harness (large synthetic documents, no browser)
19
+
20
+ - core: `src/test/fixtures/` has a stress-fixture generator (5 MB to 500 MB, gitignored) and a
21
+ benchmark runner that imports the BUILT dist. Run `npm run build` first.
22
+ - A dialecte package may ship the same pair for its schema: see its skill.
23
+ - The runner reports per-method rows, setup timings, and the perf-helper breakdown. A coverage
24
+ guard fails when a public method has no bench row: a new method needs a row. Super-linear
25
+ counter growth means a round-trip-bound (O(n²)) path.
26
+ - Each fixture has a wall-time ceiling so a regression fails fast instead of hanging.
27
+
28
+ ## In the browser
29
+
30
+ - Wall time: read `performance.getEntriesByType('measure')` filtered on `dialecte::` (through
31
+ Playwright `page.evaluate`, in the right frame).
32
+ - CPU self-time: the CDP `Profiler` domain (`Profiler.start` / `Profiler.stop`), ranked by
33
+ self-time. `console.profile()` is not readable by an agent.
34
+ - IndexedDB `count` iterates; it is not a cheap index lookup on large tables.
35
+
36
+ ## Reading results
37
+
38
+ Explain a delta before acting on it. Compare against the previous commit on the same machine,
39
+ same fixture, several runs; keep heavy runs one at a time on shared machines.