@dialecte/core 0.6.4 → 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 (699) hide show
  1. package/dist/assets/hub.worker-B1HcVDhn.js +2 -0
  2. package/dist/diagnostics/diagnostics.d.ts +30 -0
  3. package/dist/diagnostics/diagnostics.d.ts.map +1 -0
  4. package/dist/diagnostics/index.d.ts +3 -0
  5. package/dist/diagnostics/index.d.ts.map +1 -0
  6. package/dist/diagnostics/types.d.ts +77 -0
  7. package/dist/diagnostics/types.d.ts.map +1 -0
  8. package/dist/dialecte/create-dialecte-project.d.ts +11 -0
  9. package/dist/dialecte/create-dialecte-project.d.ts.map +1 -0
  10. package/dist/dialecte/create-project-factory.d.ts +14 -0
  11. package/dist/dialecte/create-project-factory.d.ts.map +1 -0
  12. package/dist/dialecte/define-dialecte.d.ts +12 -0
  13. package/dist/dialecte/define-dialecte.d.ts.map +1 -0
  14. package/dist/dialecte/dialecte.constants.d.ts +4 -0
  15. package/dist/dialecte/dialecte.constants.d.ts.map +1 -0
  16. package/dist/dialecte/dialecte.types.d.ts +75 -0
  17. package/dist/dialecte/dialecte.types.d.ts.map +1 -0
  18. package/dist/dialecte/index.d.ts +4 -0
  19. package/dist/dialecte/index.d.ts.map +1 -0
  20. package/dist/{project-DGQAe9G9.js → dialecte-gIPrRzni.js} +7225 -7511
  21. package/dist/document/bind-extensions.d.ts +4 -1
  22. package/dist/document/bind-extensions.d.ts.map +1 -1
  23. package/dist/document/document.d.ts +58 -5
  24. package/dist/document/document.d.ts.map +1 -1
  25. package/dist/document/progress/progress.types.d.ts +21 -4
  26. package/dist/document/progress/progress.types.d.ts.map +1 -1
  27. package/dist/document/query/find/ancestor/find-ancestor.d.ts +2 -0
  28. package/dist/document/query/find/ancestor/find-ancestor.d.ts.map +1 -1
  29. package/dist/document/query/find/by-attribute/find-by-attributes.d.ts +4 -0
  30. package/dist/document/query/find/by-attribute/find-by-attributes.d.ts.map +1 -1
  31. package/dist/document/query/find/descendant/find-descendant.d.ts +2 -0
  32. package/dist/document/query/find/descendant/find-descendant.d.ts.map +1 -1
  33. package/dist/document/query/get/attribute/get-attribute.d.ts +4 -0
  34. package/dist/document/query/get/attribute/get-attribute.d.ts.map +1 -1
  35. package/dist/document/query/get/attribute/get-attributes.d.ts +4 -0
  36. package/dist/document/query/get/attribute/get-attributes.d.ts.map +1 -1
  37. package/dist/document/query/get/definition/get-definition.d.ts +2 -0
  38. package/dist/document/query/get/definition/get-definition.d.ts.map +1 -1
  39. package/dist/document/query/get/record/get-child.d.ts +2 -0
  40. package/dist/document/query/get/record/get-child.d.ts.map +1 -1
  41. package/dist/document/query/get/record/get-children.d.ts +2 -0
  42. package/dist/document/query/get/record/get-children.d.ts.map +1 -1
  43. package/dist/document/query/get/record/get-record.d.ts +2 -0
  44. package/dist/document/query/get/record/get-record.d.ts.map +1 -1
  45. package/dist/document/query/get/record/get-records-by-tagname.d.ts +2 -0
  46. package/dist/document/query/get/record/get-records-by-tagname.d.ts.map +1 -1
  47. package/dist/document/query/get/record/get-records.d.ts +2 -0
  48. package/dist/document/query/get/record/get-records.d.ts.map +1 -1
  49. package/dist/document/query/get/record/load-live-records.d.ts +2 -0
  50. package/dist/document/query/get/record/load-live-records.d.ts.map +1 -1
  51. package/dist/document/query/get/record/resolve-record.d.ts +2 -0
  52. package/dist/document/query/get/record/resolve-record.d.ts.map +1 -1
  53. package/dist/document/query/get/record/staged-lookup.d.ts +4 -0
  54. package/dist/document/query/get/record/staged-lookup.d.ts.map +1 -1
  55. package/dist/document/query/get/tree/get-tree.d.ts +6 -0
  56. package/dist/document/query/get/tree/get-tree.d.ts.map +1 -1
  57. package/dist/document/query/main.d.ts +50 -15
  58. package/dist/document/query/main.d.ts.map +1 -1
  59. package/dist/document/query/snapshot/collect-snapshot.d.ts +2 -0
  60. package/dist/document/query/snapshot/collect-snapshot.d.ts.map +1 -1
  61. package/dist/document/query/snapshot/get-snapshot.d.ts +2 -0
  62. package/dist/document/query/snapshot/get-snapshot.d.ts.map +1 -1
  63. package/dist/document/query/snapshot/records-to-tree.d.ts +2 -0
  64. package/dist/document/query/snapshot/records-to-tree.d.ts.map +1 -1
  65. package/dist/document/query/tree-filter/omit.d.ts +8 -0
  66. package/dist/document/query/tree-filter/omit.d.ts.map +1 -1
  67. package/dist/document/query/tree-filter/order.d.ts +5 -2
  68. package/dist/document/query/tree-filter/order.d.ts.map +1 -1
  69. package/dist/document/query/tree-filter/unwrap.d.ts +2 -0
  70. package/dist/document/query/tree-filter/unwrap.d.ts.map +1 -1
  71. package/dist/document/staged-operations.d.ts +5 -1
  72. package/dist/document/staged-operations.d.ts.map +1 -1
  73. package/dist/document/transaction/clone/clone.d.ts +2 -0
  74. package/dist/document/transaction/clone/clone.d.ts.map +1 -1
  75. package/dist/document/transaction/commit/commit.d.ts.map +1 -1
  76. package/dist/document/transaction/commit/merge-operations.d.ts +1 -1
  77. package/dist/document/transaction/commit/merge-operations.d.ts.map +1 -1
  78. package/dist/document/transaction/commit/summarize-operations.d.ts +16 -0
  79. package/dist/document/transaction/commit/summarize-operations.d.ts.map +1 -0
  80. package/dist/document/transaction/commit/summarize-operations.types.d.ts +17 -0
  81. package/dist/document/transaction/commit/summarize-operations.types.d.ts.map +1 -0
  82. package/dist/document/transaction/create/create.d.ts +2 -0
  83. package/dist/document/transaction/create/create.d.ts.map +1 -1
  84. package/dist/document/transaction/guard.d.ts +5 -0
  85. package/dist/document/transaction/guard.d.ts.map +1 -1
  86. package/dist/document/transaction/index.d.ts +2 -0
  87. package/dist/document/transaction/index.d.ts.map +1 -1
  88. package/dist/document/transaction/main.d.ts +46 -16
  89. package/dist/document/transaction/main.d.ts.map +1 -1
  90. package/dist/document/transaction/stage-operations.d.ts.map +1 -1
  91. package/dist/document/transaction/update/update.d.ts +2 -0
  92. package/dist/document/transaction/update/update.d.ts.map +1 -1
  93. package/dist/document/types.d.ts +3 -5
  94. package/dist/document/types.d.ts.map +1 -1
  95. package/dist/engine-store-CIEqgPUb.js +348 -0
  96. package/dist/engine.constants-DBMjMmV9.js +98 -0
  97. package/dist/engine.d.ts +9 -0
  98. package/dist/engine.d.ts.map +1 -0
  99. package/dist/engine.js +15805 -0
  100. package/dist/errors/codes.d.ts +455 -0
  101. package/dist/errors/codes.d.ts.map +1 -1
  102. package/dist/errors/errors.constants.d.ts +3 -0
  103. package/dist/errors/errors.constants.d.ts.map +1 -0
  104. package/dist/errors/errors.d.ts +10 -0
  105. package/dist/errors/errors.d.ts.map +1 -1
  106. package/dist/errors/types.d.ts +14 -0
  107. package/dist/errors/types.d.ts.map +1 -1
  108. package/dist/helpers/assert-fixed.d.ts +3 -1
  109. package/dist/helpers/assert-fixed.d.ts.map +1 -1
  110. package/dist/helpers/assert-xml-characters.d.ts +35 -0
  111. package/dist/helpers/assert-xml-characters.d.ts.map +1 -0
  112. package/dist/helpers/assert-xml-characters.types.d.ts +26 -0
  113. package/dist/helpers/assert-xml-characters.types.d.ts.map +1 -0
  114. package/dist/helpers/assert-xsi-type.d.ts +4 -0
  115. package/dist/helpers/assert-xsi-type.d.ts.map +1 -1
  116. package/dist/helpers/converter.d.ts +21 -6
  117. package/dist/helpers/converter.d.ts.map +1 -1
  118. package/dist/helpers/evaluate-expectations.d.ts +21 -0
  119. package/dist/helpers/evaluate-expectations.d.ts.map +1 -0
  120. package/dist/helpers/evaluate-expectations.types.d.ts +31 -0
  121. package/dist/helpers/evaluate-expectations.types.d.ts.map +1 -0
  122. package/dist/helpers/guard.d.ts +24 -4
  123. package/dist/helpers/guard.d.ts.map +1 -1
  124. package/dist/helpers/index.d.ts +2 -0
  125. package/dist/helpers/index.d.ts.map +1 -1
  126. package/dist/helpers/merge-extensions.d.ts +2 -0
  127. package/dist/helpers/merge-extensions.d.ts.map +1 -1
  128. package/dist/helpers/read-attributes.d.ts +4 -0
  129. package/dist/helpers/read-attributes.d.ts.map +1 -1
  130. package/dist/helpers/standardizing.d.ts +10 -0
  131. package/dist/helpers/standardizing.d.ts.map +1 -1
  132. package/dist/helpers/strip-attributes.d.ts +2 -0
  133. package/dist/helpers/strip-attributes.d.ts.map +1 -1
  134. package/dist/helpers-DVShv41E.js +489 -0
  135. package/dist/helpers.js +3 -439
  136. package/dist/in-process-link-DBeAOZRp.js +2791 -0
  137. package/dist/index.d.ts +2 -0
  138. package/dist/index.d.ts.map +1 -1
  139. package/dist/index.js +23 -3
  140. package/dist/perf/create-perf.d.ts +8 -1
  141. package/dist/perf/create-perf.d.ts.map +1 -1
  142. package/dist/perf/index.d.ts +1 -1
  143. package/dist/perf/index.d.ts.map +1 -1
  144. package/dist/perf/noop-perf.d.ts.map +1 -1
  145. package/dist/perf/perf.types.d.ts +65 -6
  146. package/dist/perf/perf.types.d.ts.map +1 -1
  147. package/dist/project/index.d.ts +7 -4
  148. package/dist/project/index.d.ts.map +1 -1
  149. package/dist/project/io/export-blob.d.ts +5 -2
  150. package/dist/project/io/export-blob.d.ts.map +1 -1
  151. package/dist/project/io/export-document.d.ts +5 -4
  152. package/dist/project/io/export-document.d.ts.map +1 -1
  153. package/dist/project/io/index.d.ts +1 -1
  154. package/dist/project/io/index.d.ts.map +1 -1
  155. package/dist/project/io/init-empty-document.d.ts +2 -0
  156. package/dist/project/io/init-empty-document.d.ts.map +1 -1
  157. package/dist/project/io/resolve-config.d.ts +4 -0
  158. package/dist/project/io/resolve-config.d.ts.map +1 -0
  159. package/dist/project/io/run-export.d.ts +19 -0
  160. package/dist/project/io/run-export.d.ts.map +1 -0
  161. package/dist/project/io/run-export.types.d.ts +45 -0
  162. package/dist/project/io/run-export.types.d.ts.map +1 -0
  163. package/dist/project/io/run-import.d.ts +15 -0
  164. package/dist/project/io/run-import.d.ts.map +1 -0
  165. package/dist/project/io/run-import.types.d.ts +19 -0
  166. package/dist/project/io/run-import.types.d.ts.map +1 -0
  167. package/dist/project/io/store-runtime.constants.d.ts +6 -0
  168. package/dist/project/io/store-runtime.constants.d.ts.map +1 -0
  169. package/dist/project/io/store-runtime.d.ts +12 -0
  170. package/dist/project/io/store-runtime.d.ts.map +1 -0
  171. package/dist/project/io/store-runtime.types.d.ts +18 -0
  172. package/dist/project/io/store-runtime.types.d.ts.map +1 -0
  173. package/dist/project/project-channel.d.ts +11 -0
  174. package/dist/project/project-channel.d.ts.map +1 -0
  175. package/dist/project/project.constants.d.ts +12 -0
  176. package/dist/project/project.constants.d.ts.map +1 -0
  177. package/dist/project/project.d.ts +339 -25
  178. package/dist/project/project.d.ts.map +1 -1
  179. package/dist/project/state/document-lifecycle.d.ts +6 -0
  180. package/dist/project/state/document-lifecycle.d.ts.map +1 -0
  181. package/dist/project/state/document-state.d.ts +4 -0
  182. package/dist/project/state/document-state.d.ts.map +1 -1
  183. package/dist/project/types.d.ts +158 -48
  184. package/dist/project/types.d.ts.map +1 -1
  185. package/dist/project-key-Ch34EtFa.js +1435 -0
  186. package/dist/rolldown-runtime-CYdcPHCu.js +12 -0
  187. package/dist/running-operations-vnijBvn7.js +76 -0
  188. package/dist/same-json-value-C6kUaoyt.js +1603 -0
  189. package/dist/sqlite.d.ts +5 -0
  190. package/dist/sqlite.d.ts.map +1 -0
  191. package/dist/sqlite.js +2671 -0
  192. package/dist/sqlite3.wasm +0 -0
  193. package/dist/store/apply-record-patch.d.ts +13 -0
  194. package/dist/store/apply-record-patch.d.ts.map +1 -0
  195. package/dist/store/closing-connections.d.ts +7 -0
  196. package/dist/store/closing-connections.d.ts.map +1 -0
  197. package/dist/store/closing-connections.types.d.ts +13 -0
  198. package/dist/store/closing-connections.types.d.ts.map +1 -0
  199. package/dist/store/commit-progress.d.ts +10 -0
  200. package/dist/store/commit-progress.d.ts.map +1 -0
  201. package/dist/store/compare-by-id.d.ts +10 -0
  202. package/dist/store/compare-by-id.d.ts.map +1 -0
  203. package/dist/store/document-path.constants.d.ts +20 -0
  204. package/dist/store/document-path.constants.d.ts.map +1 -0
  205. package/dist/store/document-path.d.ts +75 -0
  206. package/dist/store/document-path.d.ts.map +1 -0
  207. package/dist/store/document-path.types.d.ts +11 -0
  208. package/dist/store/document-path.types.d.ts.map +1 -0
  209. package/dist/store/engine/client/check-engine-wire.d.ts +8 -0
  210. package/dist/store/engine/client/check-engine-wire.d.ts.map +1 -0
  211. package/dist/store/engine/client/client.constants.d.ts +30 -0
  212. package/dist/store/engine/client/client.constants.d.ts.map +1 -0
  213. package/dist/store/engine/client/client.types.d.ts +200 -0
  214. package/dist/store/engine/client/client.types.d.ts.map +1 -0
  215. package/dist/store/engine/client/engine-client.d.ts +15 -0
  216. package/dist/store/engine/client/engine-client.d.ts.map +1 -0
  217. package/dist/store/engine/client/engine-control.d.ts +16 -0
  218. package/dist/store/engine/client/engine-control.d.ts.map +1 -0
  219. package/dist/store/engine/client/heartbeat-watch.d.ts +17 -0
  220. package/dist/store/engine/client/heartbeat-watch.d.ts.map +1 -0
  221. package/dist/store/engine/client/hub-connector.d.ts +11 -0
  222. package/dist/store/engine/client/hub-connector.d.ts.map +1 -0
  223. package/dist/store/engine/client/hub-connector.types.d.ts +25 -0
  224. package/dist/store/engine/client/hub-connector.types.d.ts.map +1 -0
  225. package/dist/store/engine/client/worker-connector.d.ts +32 -0
  226. package/dist/store/engine/client/worker-connector.d.ts.map +1 -0
  227. package/dist/store/engine/creation-refusal.d.ts +10 -0
  228. package/dist/store/engine/creation-refusal.d.ts.map +1 -0
  229. package/dist/store/engine/dialecte-refusal.d.ts +18 -0
  230. package/dist/store/engine/dialecte-refusal.d.ts.map +1 -0
  231. package/dist/store/engine/engine-store.d.ts +163 -0
  232. package/dist/store/engine/engine-store.d.ts.map +1 -0
  233. package/dist/store/engine/engine-store.types.d.ts +53 -0
  234. package/dist/store/engine/engine-store.types.d.ts.map +1 -0
  235. package/dist/store/engine/engine.constants.d.ts +14 -0
  236. package/dist/store/engine/engine.constants.d.ts.map +1 -0
  237. package/dist/store/engine/engine.types.d.ts +165 -0
  238. package/dist/store/engine/engine.types.d.ts.map +1 -0
  239. package/dist/store/engine/host/engine-wire.d.ts +19 -0
  240. package/dist/store/engine/host/engine-wire.d.ts.map +1 -0
  241. package/dist/store/engine/host/heartbeat.d.ts +33 -0
  242. package/dist/store/engine/host/heartbeat.d.ts.map +1 -0
  243. package/dist/store/engine/host/host.constants.d.ts +13 -0
  244. package/dist/store/engine/host/host.constants.d.ts.map +1 -0
  245. package/dist/store/engine/host/host.types.d.ts +65 -0
  246. package/dist/store/engine/host/host.types.d.ts.map +1 -0
  247. package/dist/store/engine/host/store-events.d.ts +14 -0
  248. package/dist/store/engine/host/store-events.d.ts.map +1 -0
  249. package/dist/store/engine/hub/hub-client.constants.d.ts +27 -0
  250. package/dist/store/engine/hub/hub-client.constants.d.ts.map +1 -0
  251. package/dist/store/engine/hub/hub-client.d.ts +46 -0
  252. package/dist/store/engine/hub/hub-client.d.ts.map +1 -0
  253. package/dist/store/engine/hub/hub-client.types.d.ts +208 -0
  254. package/dist/store/engine/hub/hub-client.types.d.ts.map +1 -0
  255. package/dist/store/engine/hub/hub-protocol.types.d.ts +193 -0
  256. package/dist/store/engine/hub/hub-protocol.types.d.ts.map +1 -0
  257. package/dist/store/engine/hub/hub-router.d.ts +9 -0
  258. package/dist/store/engine/hub/hub-router.d.ts.map +1 -0
  259. package/dist/store/engine/hub/hub-shell.d.ts +13 -0
  260. package/dist/store/engine/hub/hub-shell.d.ts.map +1 -0
  261. package/dist/store/engine/hub/hub-shell.types.d.ts +64 -0
  262. package/dist/store/engine/hub/hub-shell.types.d.ts.map +1 -0
  263. package/dist/store/engine/hub/hub.constants.d.ts +33 -0
  264. package/dist/store/engine/hub/hub.constants.d.ts.map +1 -0
  265. package/dist/store/engine/hub/hub.types.d.ts +305 -0
  266. package/dist/store/engine/hub/hub.types.d.ts.map +1 -0
  267. package/dist/store/engine/hub/hub.worker.d.ts +2 -0
  268. package/dist/store/engine/hub/hub.worker.d.ts.map +1 -0
  269. package/dist/store/engine/hub/realm-host.d.ts +10 -0
  270. package/dist/store/engine/hub/realm-host.d.ts.map +1 -0
  271. package/dist/store/engine/hub/realm-host.types.d.ts +78 -0
  272. package/dist/store/engine/hub/realm-host.types.d.ts.map +1 -0
  273. package/dist/store/engine/project-key.d.ts +15 -0
  274. package/dist/store/engine/project-key.d.ts.map +1 -0
  275. package/dist/store/engine/wire/error-envelope.d.ts +25 -0
  276. package/dist/store/engine/wire/error-envelope.d.ts.map +1 -0
  277. package/dist/store/engine/wire/wire-values.d.ts +33 -0
  278. package/dist/store/engine/wire/wire-values.d.ts.map +1 -0
  279. package/dist/store/engine/wire/wire.constants.d.ts +116 -0
  280. package/dist/store/engine/wire/wire.constants.d.ts.map +1 -0
  281. package/dist/store/engine/wire/wire.types.d.ts +119 -0
  282. package/dist/store/engine/wire/wire.types.d.ts.map +1 -0
  283. package/dist/store/hub-public.d.ts +33 -0
  284. package/dist/store/hub-public.d.ts.map +1 -0
  285. package/dist/store/ignore-destroy-outcome.d.ts +6 -0
  286. package/dist/store/ignore-destroy-outcome.d.ts.map +1 -0
  287. package/dist/store/in-memory/in-memory-state.d.ts +46 -0
  288. package/dist/store/in-memory/in-memory-state.d.ts.map +1 -0
  289. package/dist/store/in-memory/in-memory-store.constants.d.ts +7 -0
  290. package/dist/store/in-memory/in-memory-store.constants.d.ts.map +1 -0
  291. package/dist/store/in-memory/in-memory-store.d.ts +105 -17
  292. package/dist/store/in-memory/in-memory-store.d.ts.map +1 -1
  293. package/dist/store/in-memory/types.d.ts +55 -1
  294. package/dist/store/in-memory/types.d.ts.map +1 -1
  295. package/dist/store/index.d.ts +8 -2
  296. package/dist/store/index.d.ts.map +1 -1
  297. package/dist/store/json-values.constants.d.ts +18 -0
  298. package/dist/store/json-values.constants.d.ts.map +1 -0
  299. package/dist/store/json-values.d.ts +40 -0
  300. package/dist/store/json-values.d.ts.map +1 -0
  301. package/dist/store/json-values.types.d.ts +18 -0
  302. package/dist/store/json-values.types.d.ts.map +1 -0
  303. package/dist/store/local/dexie-store.constants.d.ts +20 -0
  304. package/dist/store/local/dexie-store.constants.d.ts.map +1 -0
  305. package/dist/store/local/dexie-store.d.ts +134 -5
  306. package/dist/store/local/dexie-store.d.ts.map +1 -1
  307. package/dist/store/local/types.d.ts +9 -0
  308. package/dist/store/local/types.d.ts.map +1 -1
  309. package/dist/store/lost-write.d.ts +32 -0
  310. package/dist/store/lost-write.d.ts.map +1 -0
  311. package/dist/store/lost-write.types.d.ts +4 -0
  312. package/dist/store/lost-write.types.d.ts.map +1 -0
  313. package/dist/store/open-connections.d.ts +4 -0
  314. package/dist/store/open-connections.d.ts.map +1 -0
  315. package/dist/store/open-connections.types.d.ts +17 -0
  316. package/dist/store/open-connections.types.d.ts.map +1 -0
  317. package/dist/store/own-import.d.ts +10 -0
  318. package/dist/store/own-import.d.ts.map +1 -0
  319. package/dist/store/project-name.d.ts +10 -0
  320. package/dist/store/project-name.d.ts.map +1 -0
  321. package/dist/store/resolve-store.d.ts +28 -4
  322. package/dist/store/resolve-store.d.ts.map +1 -1
  323. package/dist/store/running-operations.d.ts +7 -0
  324. package/dist/store/running-operations.d.ts.map +1 -0
  325. package/dist/store/running-operations.types.d.ts +10 -0
  326. package/dist/store/running-operations.types.d.ts.map +1 -0
  327. package/dist/store/same-json-value.d.ts +9 -0
  328. package/dist/store/same-json-value.d.ts.map +1 -0
  329. package/dist/store/sqlite/adapter/in-process-link.d.ts +20 -0
  330. package/dist/store/sqlite/adapter/in-process-link.d.ts.map +1 -0
  331. package/dist/store/sqlite/adapter/in-process-link.types.d.ts +21 -0
  332. package/dist/store/sqlite/adapter/in-process-link.types.d.ts.map +1 -0
  333. package/dist/store/sqlite/adapter/realm-storage.d.ts +10 -0
  334. package/dist/store/sqlite/adapter/realm-storage.d.ts.map +1 -0
  335. package/dist/store/sqlite/adapter/sqlite-connector.d.ts +14 -0
  336. package/dist/store/sqlite/adapter/sqlite-connector.d.ts.map +1 -0
  337. package/dist/store/sqlite/adapter/sqlite-engine-settings.d.ts +4 -0
  338. package/dist/store/sqlite/adapter/sqlite-engine-settings.d.ts.map +1 -0
  339. package/dist/store/sqlite/adapter/sqlite-hub-spawner.d.ts +8 -0
  340. package/dist/store/sqlite/adapter/sqlite-hub-spawner.d.ts.map +1 -0
  341. package/dist/store/sqlite/adapter/sqlite-hub-spawner.types.d.ts +5 -0
  342. package/dist/store/sqlite/adapter/sqlite-hub-spawner.types.d.ts.map +1 -0
  343. package/dist/store/sqlite/adapter/sqlite-worker-connector.d.ts +8 -0
  344. package/dist/store/sqlite/adapter/sqlite-worker-connector.d.ts.map +1 -0
  345. package/dist/store/sqlite/adapter/sqlite-worker-connector.types.d.ts +5 -0
  346. package/dist/store/sqlite/adapter/sqlite-worker-connector.types.d.ts.map +1 -0
  347. package/dist/store/sqlite/engine/blobs.d.ts +55 -0
  348. package/dist/store/sqlite/engine/blobs.d.ts.map +1 -0
  349. package/dist/store/sqlite/engine/bulk-insert.d.ts +31 -0
  350. package/dist/store/sqlite/engine/bulk-insert.d.ts.map +1 -0
  351. package/dist/store/sqlite/engine/commit.d.ts +20 -0
  352. package/dist/store/sqlite/engine/commit.d.ts.map +1 -0
  353. package/dist/store/sqlite/engine/device-cache.d.ts +13 -0
  354. package/dist/store/sqlite/engine/device-cache.d.ts.map +1 -0
  355. package/dist/store/sqlite/engine/engine-errors.d.ts +26 -0
  356. package/dist/store/sqlite/engine/engine-errors.d.ts.map +1 -0
  357. package/dist/store/sqlite/engine/engine.constants.d.ts +144 -0
  358. package/dist/store/sqlite/engine/engine.constants.d.ts.map +1 -0
  359. package/dist/store/sqlite/engine/engine.types.d.ts +361 -0
  360. package/dist/store/sqlite/engine/engine.types.d.ts.map +1 -0
  361. package/dist/store/sqlite/engine/history.d.ts +114 -0
  362. package/dist/store/sqlite/engine/history.d.ts.map +1 -0
  363. package/dist/store/sqlite/engine/import-queue.d.ts +7 -0
  364. package/dist/store/sqlite/engine/import-queue.d.ts.map +1 -0
  365. package/dist/store/sqlite/engine/import-target.d.ts +23 -0
  366. package/dist/store/sqlite/engine/import-target.d.ts.map +1 -0
  367. package/dist/store/sqlite/engine/import-window.d.ts +23 -0
  368. package/dist/store/sqlite/engine/import-window.d.ts.map +1 -0
  369. package/dist/store/sqlite/engine/reclaim.d.ts +13 -0
  370. package/dist/store/sqlite/engine/reclaim.d.ts.map +1 -0
  371. package/dist/store/sqlite/engine/records.d.ts +117 -0
  372. package/dist/store/sqlite/engine/records.d.ts.map +1 -0
  373. package/dist/store/sqlite/engine/registry.d.ts +76 -0
  374. package/dist/store/sqlite/engine/registry.d.ts.map +1 -0
  375. package/dist/store/sqlite/engine/schema.d.ts +57 -0
  376. package/dist/store/sqlite/engine/schema.d.ts.map +1 -0
  377. package/dist/store/sqlite/engine/sqlite-engine.d.ts +14 -0
  378. package/dist/store/sqlite/engine/sqlite-engine.d.ts.map +1 -0
  379. package/dist/store/sqlite/engine/transaction.d.ts +12 -0
  380. package/dist/store/sqlite/engine/transaction.d.ts.map +1 -0
  381. package/dist/store/sqlite/list-projects.constants.d.ts +12 -0
  382. package/dist/store/sqlite/list-projects.constants.d.ts.map +1 -0
  383. package/dist/store/sqlite/list-projects.d.ts +22 -0
  384. package/dist/store/sqlite/list-projects.d.ts.map +1 -0
  385. package/dist/store/sqlite/list-projects.types.d.ts +28 -0
  386. package/dist/store/sqlite/list-projects.types.d.ts.map +1 -0
  387. package/dist/store/sqlite/load-sqlite.d.ts +11 -0
  388. package/dist/store/sqlite/load-sqlite.d.ts.map +1 -0
  389. package/dist/store/sqlite/runtime/close-engine.d.ts +18 -0
  390. package/dist/store/sqlite/runtime/close-engine.d.ts.map +1 -0
  391. package/dist/store/sqlite/runtime/install-pool.d.ts +94 -0
  392. package/dist/store/sqlite/runtime/install-pool.d.ts.map +1 -0
  393. package/dist/store/sqlite/runtime/pool-header.d.ts +13 -0
  394. package/dist/store/sqlite/runtime/pool-header.d.ts.map +1 -0
  395. package/dist/store/sqlite/runtime/progress-beat.d.ts +13 -0
  396. package/dist/store/sqlite/runtime/progress-beat.d.ts.map +1 -0
  397. package/dist/store/sqlite/runtime/runtime.constants.d.ts +57 -0
  398. package/dist/store/sqlite/runtime/runtime.constants.d.ts.map +1 -0
  399. package/dist/store/sqlite/runtime/runtime.types.d.ts +56 -0
  400. package/dist/store/sqlite/runtime/runtime.types.d.ts.map +1 -0
  401. package/dist/store/sqlite/runtime/serve-dialecte-engine.d.ts +16 -0
  402. package/dist/store/sqlite/runtime/serve-dialecte-engine.d.ts.map +1 -0
  403. package/dist/store/sqlite/sqlite-store-of.d.ts +7 -0
  404. package/dist/store/sqlite/sqlite-store-of.d.ts.map +1 -0
  405. package/dist/store/sqlite/sqlite-text.d.ts +20 -0
  406. package/dist/store/sqlite/sqlite-text.d.ts.map +1 -0
  407. package/dist/store/sqlite/sqlite-wasm-url.d.ts +9 -0
  408. package/dist/store/sqlite/sqlite-wasm-url.d.ts.map +1 -0
  409. package/dist/store/sqlite/sqlite.constants.d.ts +15 -0
  410. package/dist/store/sqlite/sqlite.constants.d.ts.map +1 -0
  411. package/dist/store/sqlite/sqlite.types.d.ts +36 -0
  412. package/dist/store/sqlite/sqlite.types.d.ts.map +1 -0
  413. package/dist/store/sqlite-storage.constants.d.ts +14 -0
  414. package/dist/store/sqlite-storage.constants.d.ts.map +1 -0
  415. package/dist/store/sqlite-storage.d.ts +22 -0
  416. package/dist/store/sqlite-storage.d.ts.map +1 -0
  417. package/dist/store/sqlite-storage.types.d.ts +24 -0
  418. package/dist/store/sqlite-storage.types.d.ts.map +1 -0
  419. package/dist/store/store-errors.d.ts +51 -0
  420. package/dist/store/store-errors.d.ts.map +1 -0
  421. package/dist/store/store.constants.d.ts +15 -3
  422. package/dist/store/store.constants.d.ts.map +1 -1
  423. package/dist/store/store.types.d.ts +280 -16
  424. package/dist/store/store.types.d.ts.map +1 -1
  425. package/dist/store/stored-record.d.ts +16 -0
  426. package/dist/store/stored-record.d.ts.map +1 -0
  427. package/dist/store/unfinished-imports.d.ts +15 -0
  428. package/dist/store/unfinished-imports.d.ts.map +1 -0
  429. package/dist/store/write-outcome.d.ts +34 -0
  430. package/dist/store/write-outcome.d.ts.map +1 -0
  431. package/dist/test/assert-valid-xml/assert-valid-xml.constants.d.ts +7 -0
  432. package/dist/test/assert-valid-xml/assert-valid-xml.constants.d.ts.map +1 -0
  433. package/dist/test/assert-valid-xml/assert-valid-xml.d.ts +19 -18
  434. package/dist/test/assert-valid-xml/assert-valid-xml.d.ts.map +1 -1
  435. package/dist/test/assert-valid-xml/assert-valid-xml.types.d.ts +8 -4
  436. package/dist/test/assert-valid-xml/assert-valid-xml.types.d.ts.map +1 -1
  437. package/dist/test/assert-xml/assert-xml.constants.d.ts +25 -0
  438. package/dist/test/assert-xml/assert-xml.constants.d.ts.map +1 -0
  439. package/dist/test/assert-xml/assert-xml.d.ts +23 -34
  440. package/dist/test/assert-xml/assert-xml.d.ts.map +1 -1
  441. package/dist/test/assert-xml/assert-xml.types.d.ts +48 -0
  442. package/dist/test/assert-xml/assert-xml.types.d.ts.map +1 -0
  443. package/dist/test/assert-xml/describe-nearby.d.ts +16 -0
  444. package/dist/test/assert-xml/describe-nearby.d.ts.map +1 -0
  445. package/dist/test/assert-xml/describe-node-place.d.ts +15 -0
  446. package/dist/test/assert-xml/describe-node-place.d.ts.map +1 -0
  447. package/dist/test/assert-xml/index.d.ts +1 -1
  448. package/dist/test/assert-xml/index.d.ts.map +1 -1
  449. package/dist/test/assert-xml/query-failure-message.d.ts +24 -0
  450. package/dist/test/assert-xml/query-failure-message.d.ts.map +1 -0
  451. package/dist/test/assert-xml/read-xpath-step.d.ts +8 -0
  452. package/dist/test/assert-xml/read-xpath-step.d.ts.map +1 -0
  453. package/dist/test/assert-xml/xpath-parser.d.ts +2 -1
  454. package/dist/test/assert-xml/xpath-parser.d.ts.map +1 -1
  455. package/dist/test/config.d.ts +5 -0
  456. package/dist/test/config.d.ts.map +1 -1
  457. package/dist/test/constant.d.ts +2 -0
  458. package/dist/test/constant.d.ts.map +1 -1
  459. package/dist/test/create-test-dialecte.d.ts +32 -37
  460. package/dist/test/create-test-dialecte.d.ts.map +1 -1
  461. package/dist/test/create-test-dialecte.types.d.ts +99 -0
  462. package/dist/test/create-test-dialecte.types.d.ts.map +1 -0
  463. package/dist/test/create-test-helpers-internal.types.d.ts +19 -0
  464. package/dist/test/create-test-helpers-internal.types.d.ts.map +1 -0
  465. package/dist/test/create-test-helpers.d.ts +13 -0
  466. package/dist/test/create-test-helpers.d.ts.map +1 -0
  467. package/dist/test/create-test-helpers.types.d.ts +50 -0
  468. package/dist/test/create-test-helpers.types.d.ts.map +1 -0
  469. package/dist/test/fixtures/test-entry-scan-constraint.d.ts +3 -0
  470. package/dist/test/fixtures/test-entry-scan-constraint.d.ts.map +1 -0
  471. package/dist/test/fixtures/test-entry-scan-edges.types.d.ts +10 -0
  472. package/dist/test/fixtures/test-entry-scan-edges.types.d.ts.map +1 -0
  473. package/dist/test/fixtures/test-entry-scan-recursive.d.ts +4 -0
  474. package/dist/test/fixtures/test-entry-scan-recursive.d.ts.map +1 -0
  475. package/dist/test/fixtures/test-entry-scan-recursive.types.d.ts +15 -0
  476. package/dist/test/fixtures/test-entry-scan-recursive.types.d.ts.map +1 -0
  477. package/dist/test/fixtures/test-entry-scan-shapes.d.ts +14 -0
  478. package/dist/test/fixtures/test-entry-scan-shapes.d.ts.map +1 -0
  479. package/dist/test/fixtures/test-entry-scan-shapes.types.d.ts +14 -0
  480. package/dist/test/fixtures/test-entry-scan-shapes.types.d.ts.map +1 -0
  481. package/dist/test/fixtures/test-entry-scan-tree.d.ts +3 -0
  482. package/dist/test/fixtures/test-entry-scan-tree.d.ts.map +1 -0
  483. package/dist/test/fixtures/test-entry-scan.d.ts +5 -0
  484. package/dist/test/fixtures/test-entry-scan.d.ts.map +1 -0
  485. package/dist/test/fixtures/test-entry-scan.types.d.ts +5 -0
  486. package/dist/test/fixtures/test-entry-scan.types.d.ts.map +1 -0
  487. package/dist/test/generated/definition.generated.d.ts +5 -0
  488. package/dist/test/generated/definition.generated.d.ts.map +1 -1
  489. package/dist/test/in-memory-storage.setup.d.ts +2 -0
  490. package/dist/test/in-memory-storage.setup.d.ts.map +1 -0
  491. package/dist/test/index.d.ts +6 -0
  492. package/dist/test/index.d.ts.map +1 -1
  493. package/dist/test/normalize-uuids.constants.d.ts +3 -0
  494. package/dist/test/normalize-uuids.constants.d.ts.map +1 -0
  495. package/dist/test/normalize-uuids.d.ts +12 -0
  496. package/dist/test/normalize-uuids.d.ts.map +1 -1
  497. package/dist/test/run-test-cases.d.ts +30 -11
  498. package/dist/test/run-test-cases.d.ts.map +1 -1
  499. package/dist/test/run-test-cases.type.d.ts +16 -0
  500. package/dist/test/run-test-cases.type.d.ts.map +1 -1
  501. package/dist/test/sqlite-storage.setup.d.ts +1 -0
  502. package/dist/test/sqlite-storage.setup.d.ts.map +1 -0
  503. package/dist/test/test-dialecte-setup.d.ts +31 -0
  504. package/dist/test/test-dialecte-setup.d.ts.map +1 -0
  505. package/dist/test/test-dialecte-setup.types.d.ts +29 -0
  506. package/dist/test/test-dialecte-setup.types.d.ts.map +1 -0
  507. package/dist/test/test-dialecte.d.ts +2722 -0
  508. package/dist/test/test-dialecte.d.ts.map +1 -0
  509. package/dist/test/test-dialecte.types.d.ts +3 -0
  510. package/dist/test/test-dialecte.types.d.ts.map +1 -0
  511. package/dist/test/test-dialecte.worker.d.ts +2 -0
  512. package/dist/test/test-dialecte.worker.d.ts.map +1 -0
  513. package/dist/test/test-entry-environment.constants.d.ts +27 -0
  514. package/dist/test/test-entry-environment.constants.d.ts.map +1 -0
  515. package/dist/test/test-record.d.ts +49 -1
  516. package/dist/test/test-record.d.ts.map +1 -1
  517. package/dist/test/test-storage/index.d.ts +5 -0
  518. package/dist/test/test-storage/index.d.ts.map +1 -0
  519. package/dist/test/test-storage/read-test-storage.d.ts +4 -0
  520. package/dist/test/test-storage/read-test-storage.d.ts.map +1 -0
  521. package/dist/test/test-storage/resolve-test-storage.d.ts +9 -0
  522. package/dist/test/test-storage/resolve-test-storage.d.ts.map +1 -0
  523. package/dist/test/test-storage/test-storage.constants.d.ts +9 -0
  524. package/dist/test/test-storage/test-storage.constants.d.ts.map +1 -0
  525. package/dist/test/test-storage/test-storage.types.d.ts +15 -0
  526. package/dist/test/test-storage/test-storage.types.d.ts.map +1 -0
  527. package/dist/test/test-storage/test-store-for.d.ts +19 -0
  528. package/dist/test/test-storage/test-store-for.d.ts.map +1 -0
  529. package/dist/test/test-storage/use-test-storage.d.ts +14 -0
  530. package/dist/test/test-storage/use-test-storage.d.ts.map +1 -0
  531. package/dist/test/test-timing.constants.d.ts +15 -0
  532. package/dist/test/test-timing.constants.d.ts.map +1 -0
  533. package/dist/test/xml/engine-console.d.ts +6 -0
  534. package/dist/test/xml/engine-console.d.ts.map +1 -0
  535. package/dist/test/xml/engine.d.ts +3 -0
  536. package/dist/test/xml/engine.d.ts.map +1 -0
  537. package/dist/test/xml/index.d.ts +8 -0
  538. package/dist/test/xml/index.d.ts.map +1 -0
  539. package/dist/test/xml/malformed-xml-error.d.ts +5 -0
  540. package/dist/test/xml/malformed-xml-error.d.ts.map +1 -0
  541. package/dist/test/xml/print-node.d.ts +7 -0
  542. package/dist/test/xml/print-node.d.ts.map +1 -0
  543. package/dist/test/xml/select-nodes.d.ts +14 -0
  544. package/dist/test/xml/select-nodes.d.ts.map +1 -0
  545. package/dist/test/xml/with-xml-document.constants.d.ts +7 -0
  546. package/dist/test/xml/with-xml-document.constants.d.ts.map +1 -0
  547. package/dist/test/xml/with-xml-document.d.ts +14 -0
  548. package/dist/test/xml/with-xml-document.d.ts.map +1 -0
  549. package/dist/test/xml/xml-query-refused-error.d.ts +13 -0
  550. package/dist/test/xml/xml-query-refused-error.d.ts.map +1 -0
  551. package/dist/test/xml/xml.constants.d.ts +16 -0
  552. package/dist/test/xml/xml.constants.d.ts.map +1 -0
  553. package/dist/test/xml/xml.types.d.ts +31 -0
  554. package/dist/test/xml/xml.types.d.ts.map +1 -0
  555. package/dist/test/xsd/test-ext.xsd +226 -0
  556. package/dist/test/xsd/test.xsd +528 -0
  557. package/dist/test.js +3427 -406
  558. package/dist/types/dialecte-config.d.ts +6 -0
  559. package/dist/types/dialecte-config.d.ts.map +1 -1
  560. package/dist/types/io.d.ts +33 -25
  561. package/dist/types/io.d.ts.map +1 -1
  562. package/dist/utils/attribute-rules.d.ts +16 -1
  563. package/dist/utils/attribute-rules.d.ts.map +1 -1
  564. package/dist/utils/child-occurrences.constants.d.ts +4 -0
  565. package/dist/utils/child-occurrences.constants.d.ts.map +1 -0
  566. package/dist/utils/child-occurrences.d.ts +17 -0
  567. package/dist/utils/child-occurrences.d.ts.map +1 -0
  568. package/dist/utils/child-occurrences.types.d.ts +6 -0
  569. package/dist/utils/child-occurrences.types.d.ts.map +1 -0
  570. package/dist/utils/datatype.d.ts +4 -0
  571. package/dist/utils/datatype.d.ts.map +1 -1
  572. package/dist/utils/format-xml.d.ts +4 -0
  573. package/dist/utils/format-xml.d.ts.map +1 -1
  574. package/dist/utils/index.d.ts +5 -1
  575. package/dist/utils/index.d.ts.map +1 -1
  576. package/dist/utils/invariant.d.ts +2 -0
  577. package/dist/utils/invariant.d.ts.map +1 -1
  578. package/dist/utils/namespaces.d.ts +15 -1
  579. package/dist/utils/namespaces.d.ts.map +1 -1
  580. package/dist/utils/order-children.d.ts +14 -3
  581. package/dist/utils/order-children.d.ts.map +1 -1
  582. package/dist/utils/order-children.types.d.ts +10 -0
  583. package/dist/utils/order-children.types.d.ts.map +1 -0
  584. package/dist/utils/particle-occurrences.d.ts +4 -0
  585. package/dist/utils/particle-occurrences.d.ts.map +1 -0
  586. package/dist/utils/required-choices.d.ts +17 -0
  587. package/dist/utils/required-choices.d.ts.map +1 -0
  588. package/dist/utils/required-choices.types.d.ts +15 -0
  589. package/dist/utils/required-choices.types.d.ts.map +1 -0
  590. package/dist/utils/resolve-definition.d.ts +4 -0
  591. package/dist/utils/resolve-definition.d.ts.map +1 -1
  592. package/dist/utils/save-to-disk.constants.d.ts +3 -0
  593. package/dist/utils/save-to-disk.constants.d.ts.map +1 -0
  594. package/dist/utils/save-to-disk.d.ts +17 -5
  595. package/dist/utils/save-to-disk.d.ts.map +1 -1
  596. package/dist/utils/save-to-disk.types.d.ts +17 -0
  597. package/dist/utils/save-to-disk.types.d.ts.map +1 -0
  598. package/dist/utils/seeded-uuid.constants.d.ts +5 -0
  599. package/dist/utils/seeded-uuid.constants.d.ts.map +1 -0
  600. package/dist/utils/seeded-uuid.d.ts +15 -0
  601. package/dist/utils/seeded-uuid.d.ts.map +1 -0
  602. package/dist/utils/seeded-uuid.types.d.ts +8 -0
  603. package/dist/utils/seeded-uuid.types.d.ts.map +1 -0
  604. package/dist/utils/tell-listener.constants.d.ts +9 -0
  605. package/dist/utils/tell-listener.constants.d.ts.map +1 -0
  606. package/dist/utils/tell-listener.d.ts +24 -0
  607. package/dist/utils/tell-listener.d.ts.map +1 -0
  608. package/dist/utils/xml-characters.constants.d.ts +9 -0
  609. package/dist/utils/xml-characters.constants.d.ts.map +1 -0
  610. package/dist/utils/xml-characters.d.ts +8 -0
  611. package/dist/utils/xml-characters.d.ts.map +1 -0
  612. package/dist/utils/xml-whitespace.constants.d.ts +8 -0
  613. package/dist/utils/xml-whitespace.constants.d.ts.map +1 -0
  614. package/dist/utils/xml-whitespace.d.ts +19 -0
  615. package/dist/utils/xml-whitespace.d.ts.map +1 -0
  616. package/dist/utils/xsi-type.d.ts +4 -0
  617. package/dist/utils/xsi-type.d.ts.map +1 -1
  618. package/dist/utils/yield-to-queue.d.ts +6 -0
  619. package/dist/utils/yield-to-queue.d.ts.map +1 -0
  620. package/dist/utils-USNkj4sT.js +1275 -0
  621. package/dist/utils.js +1 -2
  622. package/dist/xml/build/document-root.d.ts +7 -0
  623. package/dist/xml/build/document-root.d.ts.map +1 -0
  624. package/dist/xml/build/index.d.ts +0 -5
  625. package/dist/xml/build/index.d.ts.map +1 -1
  626. package/dist/xml/build/record-element.d.ts +15 -0
  627. package/dist/xml/build/record-element.d.ts.map +1 -0
  628. package/dist/xml/build/record-element.types.d.ts +12 -0
  629. package/dist/xml/build/record-element.types.d.ts.map +1 -0
  630. package/dist/xml/build/write-xml-records.d.ts +7 -0
  631. package/dist/xml/build/write-xml-records.d.ts.map +1 -0
  632. package/dist/xml/build/write-xml-records.types.d.ts +11 -0
  633. package/dist/xml/build/write-xml-records.types.d.ts.map +1 -0
  634. package/dist/xml/build/xml-element.d.ts +79 -0
  635. package/dist/xml/build/xml-element.d.ts.map +1 -0
  636. package/dist/xml/build/xml-element.types.d.ts +34 -0
  637. package/dist/xml/build/xml-element.types.d.ts.map +1 -0
  638. package/dist/xml/build/xml-writer.constants.d.ts +24 -0
  639. package/dist/xml/build/xml-writer.constants.d.ts.map +1 -0
  640. package/dist/xml/build/xml-writer.d.ts +40 -0
  641. package/dist/xml/build/xml-writer.d.ts.map +1 -0
  642. package/dist/xml/build/xml-writer.types.d.ts +34 -0
  643. package/dist/xml/build/xml-writer.types.d.ts.map +1 -0
  644. package/dist/xml/dom/index.d.ts +3 -0
  645. package/dist/xml/dom/index.d.ts.map +1 -0
  646. package/dist/xml/dom/xml-document-from-file.d.ts +10 -0
  647. package/dist/xml/dom/xml-document-from-file.d.ts.map +1 -0
  648. package/dist/xml/dom/xml-document-from-file.types.d.ts +5 -0
  649. package/dist/xml/dom/xml-document-from-file.types.d.ts.map +1 -0
  650. package/dist/xml/index.d.ts +1 -0
  651. package/dist/xml/index.d.ts.map +1 -1
  652. package/dist/xml/inspect-xml.d.ts +2 -0
  653. package/dist/xml/inspect-xml.d.ts.map +1 -1
  654. package/dist/xml/parse/index.d.ts +1 -1
  655. package/dist/xml/parse/index.d.ts.map +1 -1
  656. package/dist/xml/parse/parse-xml-document.constants.d.ts +5 -0
  657. package/dist/xml/parse/parse-xml-document.constants.d.ts.map +1 -0
  658. package/dist/xml/parse/parse-xml-document.d.ts +13 -2
  659. package/dist/xml/parse/parse-xml-document.d.ts.map +1 -1
  660. package/dist/xml/parse/parse-xml-document.types.d.ts +12 -2
  661. package/dist/xml/parse/parse-xml-document.types.d.ts.map +1 -1
  662. package/dist/xml/parse/parser.constants.d.ts +7 -0
  663. package/dist/xml/parse/parser.constants.d.ts.map +1 -0
  664. package/dist/xml/parse/parser.d.ts +4 -2
  665. package/dist/xml/parse/parser.d.ts.map +1 -1
  666. package/dist/xml/parse/types.d.ts +2 -0
  667. package/dist/xml/parse/types.d.ts.map +1 -1
  668. package/package.json +88 -8
  669. package/skills/dialecte/SKILL.md +276 -0
  670. package/skills/dialecte/references/api.json +1830 -0
  671. package/skills/dialecte/references/api.md +557 -0
  672. package/skills/dialecte/references/core-api.md +204 -0
  673. package/skills/dialecte/references/testing.md +116 -0
  674. package/skills/dialecte-contributing/SKILL.md +328 -0
  675. package/skills/dialecte-contributing/references/code-rules.md +108 -0
  676. package/skills/dialecte-contributing/references/landing-changes.md +83 -0
  677. package/skills/dialecte-contributing/references/perf.md +39 -0
  678. package/skills/dialecte-contributing/references/traps.md +89 -0
  679. package/skills/dialecte-lot/SKILL.md +471 -0
  680. package/skills/dialecte-lot/references/briefs.md +152 -0
  681. package/skills/dialecte-lot/references/model-tiers.md +52 -0
  682. package/skills/dialecte-lot/references/retro.md +51 -0
  683. package/dist/project/io/import-document.d.ts +0 -7
  684. package/dist/project/io/import-document.d.ts.map +0 -1
  685. package/dist/test/assert-xml/types.d.ts +0 -2
  686. package/dist/test/assert-xml/types.d.ts.map +0 -1
  687. package/dist/utils-CTBHUFs9.js +0 -620
  688. package/dist/xml/build/build-xml-document.d.ts +0 -10
  689. package/dist/xml/build/build-xml-document.d.ts.map +0 -1
  690. package/dist/xml/build/build-xml-document.types.d.ts +0 -22
  691. package/dist/xml/build/build-xml-document.types.d.ts.map +0 -1
  692. package/dist/xml/build/download-file.d.ts +0 -7
  693. package/dist/xml/build/download-file.d.ts.map +0 -1
  694. package/dist/xml/build/formatter.d.ts +0 -2
  695. package/dist/xml/build/formatter.d.ts.map +0 -1
  696. package/dist/xml/build/serialize.d.ts +0 -11
  697. package/dist/xml/build/serialize.d.ts.map +0 -1
  698. package/dist/xml/build/serialize.types.d.ts +0 -12
  699. package/dist/xml/build/serialize.types.d.ts.map +0 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dialecte/core",
3
- "version": "0.6.4",
3
+ "version": "0.8.0",
4
4
  "description": "Dialecte - Core functionality for Dialecte SDK",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -13,6 +13,8 @@
13
13
  "source": "src/index.ts",
14
14
  "files": [
15
15
  "dist",
16
+ "skills",
17
+ "!skills/*/evals",
16
18
  "bin"
17
19
  ],
18
20
  "type": "module",
@@ -25,6 +27,7 @@
25
27
  "types": "./dist/test.d.ts",
26
28
  "default": "./dist/test.js"
27
29
  },
30
+ "./test/xsd/*": "./dist/test/xsd/*",
28
31
  "./utils": {
29
32
  "types": "./dist/utils.d.ts",
30
33
  "default": "./dist/utils.js"
@@ -32,30 +35,45 @@
32
35
  "./helpers": {
33
36
  "types": "./dist/helpers.d.ts",
34
37
  "default": "./dist/helpers.js"
38
+ },
39
+ "./engine": {
40
+ "types": "./dist/engine.d.ts",
41
+ "default": "./dist/engine.js"
42
+ },
43
+ "./sqlite": {
44
+ "types": "./dist/sqlite.d.ts",
45
+ "default": "./dist/sqlite.js"
35
46
  }
36
47
  },
37
48
  "scripts": {
38
49
  "//====== BUILD ======//": "",
39
50
  "build": "run-p type-check \"build-only {@}\" --",
40
- "build-only": "tsc -p tsconfig.json && vite build",
51
+ "build-only": "tsc -p tsconfig.json && vite build && vite build -c vite.engine.config.ts",
41
52
  "build:watch": "vite build --watch",
42
53
  "//====== VITEPRESS ======//": "",
43
54
  "doc:dev": "vitepress dev",
44
55
  "doc:build": "vitepress build",
45
56
  "doc:preview": "vitepress preview",
46
57
  "//====== TEST ======//": "",
47
- "test": "vitest --project unit",
58
+ "test": "npm run test:node && npm run test:browser",
59
+ "test:node": "vitest run --project node --project node-indexeddb --project node-sqlite",
60
+ "test:browser": "vitest run --project browser",
61
+ "test:browser:all": "vitest run --project browser-all",
48
62
  "test:perf": "VITE_BENCH=1 vitest run --project perf --mode bench --reporter=verbose",
63
+ "test:perf:node": "VITE_BENCH=1 vitest run --project perf-node --mode bench --reporter=verbose",
49
64
  "//====== CHECK ======//": "",
50
- "check": "run-p type-check type-check:test lint:check format:check",
65
+ "check": "run-p type-check type-check:test type-check:node lint:check format:check",
66
+ "skills:generate": "dialecte skills generate",
67
+ "skills:check": "dialecte skills check",
51
68
  "type-check": "tsc -p tsconfig.build.json --noEmit --skipLibCheck",
52
69
  "type-check:test": "tsc -p tsconfig.vitest.json --noEmit",
70
+ "type-check:node": "tsc -p tsconfig.node.json --noEmit",
53
71
  "//====== TYPE PERF ======//": "",
54
72
  "coverage:gen": "dialecte coverage",
55
73
  "type-bench": "npm run coverage:gen && dialecte bench",
56
74
  "type-bench:check": "npm run coverage:gen && dialecte bench --check",
57
75
  "type-narrowing": "npm run coverage:gen && dialecte narrowing",
58
- "lint:check": "oxlint",
76
+ "lint:check": "oxlint --deny-warnings",
59
77
  "lint:fix": "oxlint . --fix -D correctness --ignore-path .gitignore",
60
78
  "format:check": "oxfmt --check",
61
79
  "format:fix": "oxfmt",
@@ -63,10 +81,12 @@
63
81
  "prepare": "husky"
64
82
  },
65
83
  "dependencies": {
84
+ "@sqlite.org/sqlite-wasm": "3.54.1-build1",
66
85
  "@types/sax": "1.2.7",
86
+ "comlink": "4.4.2",
67
87
  "dexie": "4.4.6",
68
- "sax": "^1.4.3",
69
- "xml-formatter": "^3.6.7"
88
+ "libxml2-wasm": "0.7.2",
89
+ "sax": "^1.4.3"
70
90
  },
71
91
  "devDependencies": {
72
92
  "@dialecte/cli": "0.0.3",
@@ -74,7 +94,7 @@
74
94
  "@types/node": "^24.12.4",
75
95
  "@typescript/native": "npm:typescript@^7.0.2",
76
96
  "@vitest/browser-playwright": "^4.1.10",
77
- "@xmldom/xmldom": "^0.8.11",
97
+ "fake-indexeddb": "^6.2.6",
78
98
  "husky": "^9.1.7",
79
99
  "jiti": "^2.4.2",
80
100
  "npm-run-all2": "^8.0.4",
@@ -89,5 +109,65 @@
89
109
  "vitepress": "^2.0.0-alpha.17",
90
110
  "vitepress-plugin-llms": "^1.13.2",
91
111
  "vitest": "^4.1.10"
112
+ },
113
+ "dialecte": {
114
+ "tdd": {
115
+ "production": [
116
+ "src/test"
117
+ ]
118
+ },
119
+ "gate": {
120
+ "fast": [
121
+ {
122
+ "name": "check",
123
+ "run": "npm run check"
124
+ },
125
+ {
126
+ "name": "skills",
127
+ "run": "npm run skills:check"
128
+ },
129
+ {
130
+ "name": "tests",
131
+ "run": "npx vitest run --changed --project node --project node-indexeddb",
132
+ "counts": "tests",
133
+ "changedOnly": true,
134
+ "heavy": false
135
+ }
136
+ ],
137
+ "full": [
138
+ {
139
+ "name": "check",
140
+ "run": "npm run check"
141
+ },
142
+ {
143
+ "name": "skills",
144
+ "run": "npm run skills:check"
145
+ },
146
+ {
147
+ "name": "build",
148
+ "run": "npm run build"
149
+ },
150
+ {
151
+ "name": "tests",
152
+ "run": "nice -n 10 npm run test:node",
153
+ "counts": "tests",
154
+ "heavy": false
155
+ },
156
+ {
157
+ "name": "browser tests",
158
+ "run": "nice -n 10 npx vitest run --project browser --no-file-parallelism",
159
+ "counts": "tests"
160
+ },
161
+ {
162
+ "name": "docs",
163
+ "run": "npm run doc:build",
164
+ "restoresGeneratedDocs": true
165
+ },
166
+ {
167
+ "name": "type-bench",
168
+ "run": "npm run type-bench:check"
169
+ }
170
+ ]
171
+ }
92
172
  }
93
173
  }
@@ -0,0 +1,276 @@
1
+ ---
2
+ name: dialecte
3
+ description: Work with Dialecte, the XSD-to-typed-DSL engine (@dialecte/core plus a dialecte package - one published under @dialecte or one generated from your own XSD) in application code - open a Project, read with doc.query, write with doc.transaction, import/export XML, add a custom extension, write table-driven tests. It gives the mental model (core engine / generated definition / dialecte hooks + business extensions / your app), the reuse ladder to run before writing any helper, and the traps that make code slow or wrong. Use it whenever code imports @dialecte/*, touches records, refs, getAttributes, getTree, findDescendants, addChild, deepClone, hooks or run*TestCases, or the user mentions dialecte, even for a small read. To change dialecte itself use dialecte-contributing; for a dialecte's own business verbs use that dialecte's skill (dialecte-<id>, shipped with its package); to generate a dialecte from an XSD use dialecte-create.
4
+ license: MIT
5
+ metadata:
6
+ author: dialecte
7
+ version: '0.1.0'
8
+ ---
9
+
10
+ <!-- dialecte-skills ignore: doc.query.inventory.lowStock tx.inventory.restock project.state doc.state doc.query.myFeature.findOrphanParts -->
11
+
12
+ # Dialecte (using it)
13
+
14
+ Dialecte turns an XSD into a typed DSL over XML documents stored in a database. Almost every "I need
15
+ a function that does X with these records" already exists somewhere in its layers, and the most
16
+ common failure is writing it again: a local `toRef`, an attribute finder, an ancestor walk, a
17
+ uuid/name fix-up that a hook already performs on every write. This skill exists to stop that.
18
+
19
+ ## The mental model: four layers, each owns something
20
+
21
+ ```
22
+ your app custom extensions, services, UI (yours)
23
+ dialecte package @dialecte/<id>, @acme/widget (domain)
24
+ ├ definition/*.generated.ts generated from the XSD - never edited by hand
25
+ ├ config/ wires the definition into core, `namespace <Name>` types
26
+ ├ hooks/ automatic coherence on every write and on import
27
+ ├ extensions/<ns>/ business verbs: doc.query.<ns>.<verb>(), tx.<ns>.<verb>()
28
+ └ test/ run<Name>TestCases, XML validators for fixtures
29
+ @dialecte/core schema-agnostic engine: Project, Document, Query, Transaction,
30
+ records + refs, hook dispatch, XML import/export, stores, errors, test runner
31
+ ```
32
+
33
+ - **Core knows no domain.** It never contains the rules of any schema. A domain rule lives in the
34
+ dialecte package; an app-only rule lives in the app.
35
+ - **The definition is the source of truth** for which elements, attributes, children, parents,
36
+ defaults and types exist. From app code read it through the package's config
37
+ (`<NAME>_DIALECTE_CONFIG.children / parents / attributes / descendants / ancestors`) or
38
+ `query.getDefinition(ref)`, instead of writing a list by hand.
39
+ TypeScript types are generated from it, so the compiler already rejects an invalid child or
40
+ attribute.
41
+ - **Hooks keep a document coherent automatically.** If the dialecte has an `afterCreated` hook that
42
+ fills reference paths, your code must not fill them too. Know the hooks before writing any write.
43
+ - **Extensions are the dialecte's business API.** They are bound onto every query and transaction:
44
+ `doc.query.inventory.lowStock(...)`, `tx.inventory.restock(...)`.
45
+
46
+ ## Step 0: is this skill your version's?
47
+
48
+ This skill ships inside `@dialecte/core` and describes the core it ships with (0.8). If your project
49
+ pins another core, read the skill of that version (`npx @dialecte/cli skills sync` installs the one
50
+ matching your `node_modules`) and confirm signatures in its `.d.ts`.
51
+
52
+ ## Look it up with the cli first: one command each
53
+
54
+ `@dialecte/cli` (0.2 or later, run as `npx @dialecte/cli <command>`) answers from what is installed -
55
+ the same with or without the repositories - in a few lines (`--json` for more). Run these before
56
+ reading `node_modules`, the sources or the docs:
57
+
58
+ | You need | Run |
59
+ | --------------------------------------------------------------- | ---------------------------------------------- |
60
+ | your versions, and whether this skill is theirs (Step 0) | `npx @dialecte/cli doctor` |
61
+ | a method for what you are trying to do (reuse ladder, rung 2-4) | `npx @dialecte/cli api find "<what you need>"` |
62
+ | its exact contract: signature, summary, routes, one call | `npx @dialecte/cli api show <route>` |
63
+ | what a group holds, your own extensions included | `npx @dialecte/cli members <expression>` |
64
+ | what an element may hold: parents, children, attributes | `npx @dialecte/cli schema <Tag>` |
65
+
66
+ - A `⚠️` line of `doctor` comes first: it names the command that fixes it.
67
+ - Search by the words of your need, not by a name you imagine:
68
+ `npx @dialecte/cli api find "copy a subtree from another document"`. The best match is first; read the
69
+ `api show` of every close one before ruling it out.
70
+ - `schema` reads the installed definition through core's own readers: never list children or required
71
+ attributes by hand, never parse `definition.generated.ts` or the XSD.
72
+ - Exit 1 means nothing found (or a warning): fall back to the sources below, in their order.
73
+
74
+ ## Where the truth for your installed version lives
75
+
76
+ This skill describes shapes and rules, not exact signatures. Before calling or citing any method,
77
+ confirm it in this order:
78
+
79
+ 1. The repo, if it is checked out locally (sibling folder, `$DIALECTE_ROOT`): `src/` of the package,
80
+ at the version you run.
81
+ 2. The installed build: `node_modules/@dialecte/<pkg>/dist/**/*.d.ts` (exact for your version).
82
+ 3. The published docs, index first then the one page you need:
83
+ `https://dialecte.github.io/core/llms.txt` and the one each dialecte package publishes
84
+ (`https://dialecte.github.io/<package>/llms.txt`; `llms-full.txt` only for a cross-API search). Docs describe the latest release.
85
+
86
+ Never invent a signature. If the three disagree, the code you actually run wins.
87
+
88
+ ## The reuse ladder - run it before writing ANY helper, stop at the first hit
89
+
90
+ 1. **Your app's own dialecte layer** (custom extensions, services). Someone may have written it.
91
+ 2. **The dialecte's business extensions.** Each dialecte package ships a skill (`dialecte-<id>`)
92
+ with `references/api.md`: an index of its verbs by intent ("label of an element", "copy a
93
+ subtree from another document"), generated from the JSDoc. Search it by what you are trying to
94
+ do, not by a method name you imagine.
95
+ 3. **The dialecte's hooks.** "Whenever X is created/renamed/deleted/imported, also do Y" is a hook,
96
+ and the dialecte may already ship it. Read the package's hooks doc before writing coherence code.
97
+ 4. **Core Query / Transaction.** Traversal, lookup by attributes, trees, snapshots, add/ensure/
98
+ update/delete/deepClone. Search [references/api.md](references/api.md) by what you are trying
99
+ to do (generated from the JSDoc, intent table first); the shapes are in
100
+ [references/core-api.md](references/core-api.md).
101
+ 5. **Core and package helpers/utils** (`@dialecte/core/helpers`, `@dialecte/core/utils`, the
102
+ package's own helpers): `toRef`, record converters, guards, `readAttribute(s)`, definition and
103
+ attribute rules, namespaces, canonical ordering, `invariant`, XML formatting.
104
+ 6. **Only then write it** - as a custom extension in the standard shape (below), not as a loose
105
+ util. If every consumer of that dialecte would need it, it belongs in the dialecte package
106
+ (propose it, see `dialecte-contributing`).
107
+
108
+ When you do write new code, say in your hand-off which rung you checked and why nothing fit.
109
+ A verb whose name or summary is close to your need is read in full (JSDoc and tests) before you
110
+ rule it out: names are short, behaviour is in the doc. Name what you ruled out and why.
111
+
112
+ ## Core usage in five moves (every dialecte package ships `create<Name>Project`)
113
+
114
+ ```ts
115
+ const project = await createWidgetProject({ storage: { type: 'local' } }).open('my-project')
116
+
117
+ const { documentId, diagnostics } = await project.importFile(file) // XML -> records, inside the store
118
+ // project.import(files) never rejects per file: it returns { status: 'imported' | 'failed' } entries
119
+ const doc = project.openDocument(documentId)
120
+
121
+ const query = doc.query // a new Query per access: take it once
122
+ const root = await query.getRoot()
123
+ const { name } = await query.getAttributes(someRef) // typed value object
124
+
125
+ await doc.transaction(async (tx) => {
126
+ const part = await tx.addChild(assemblyRef, { tagName: 'Part', attributes: { name: 'P1' } })
127
+ await tx.update(part, { attributes: { desc: 'spare' } }) // reads in tx see staged writes
128
+ }) // atomic commit, undoable
129
+
130
+ const { file, filename } = await project.export({ documentId }) // a formatted UTF-8 Blob, written by the store
131
+ // { xmlDocument: true } also answers the DOM, in the page only
132
+ ```
133
+
134
+ Use the package's factory, not `new Project` / `createProjectFactory` yourself.
135
+
136
+ ## Rules that keep code correct
137
+
138
+ - **All writes inside `doc.transaction(fn)`.** One at a time on this Document: a nested or
139
+ overlapping one started on the same Document instance throws `CONCURRENT_TRANSACTION`. `doc.prepare(fn)` stages without committing (preview, then
140
+ `commit()` / `discard()`).
141
+ - **Records are values.** Never mutate a record you got back; pass a ref or record to a method.
142
+ Every public method accepts a ref (`{ tagName, id }`) or any record shape and normalises it with
143
+ `toRef` - do not convert by hand.
144
+ - **Read attributes through the API.** With a query or tx at hand: `getAttributes(ref)` /
145
+ `getAttribute(ref, { name })` (typed, sees staged writes). Without one (import pass, pure
146
+ function): `readAttribute(s)` - a dialecte package may export one bound to its config (prefer
147
+ it); core's takes `dialecteConfig`. Never `record.attributes.find(...)`. Absent vs empty:
148
+ `{ defaults: 'none', fullObject: true }` gives `undefined` when absent.
149
+ - **Never build or parse XML by hand.** `project.import` / `project.export`; normalise input in
150
+ the `beforeImport` IO hook.
151
+ - **Errors:** `throwDialecteError(key, {...})` / `invariant(cond, {...})`; a dialecte declares its
152
+ own catalogue with `defineErrors`. No ad-hoc `throw new Error`.
153
+ - **State for UI** comes from `project.state` / `doc.state` / `doc.subscribe`, not parallel flags.
154
+
155
+ ## Rules that keep code fast
156
+
157
+ Dialecte runs on large documents (hundreds of MB). A query hidden inside a per-element loop
158
+ multiplies.
159
+
160
+ - To climb, follow `record.parent` step by step and stop as soon as you know the answer.
161
+ `findAncestors` only when you need the whole chain.
162
+ - No `findAncestors` / `getTree` / `getRecordsByTagName` / path building inside a per-element loop
163
+ without a per-run `Map` cache keyed by id. Prefer reading the hierarchy once.
164
+ - Filter in the read, not after it: `findDescendants(ref, { collect: [{ Part: { where: { kind: 'spare' } } }] })`
165
+ and `getTree(ref, { select: { where } })` take attribute filters - do not collect everything and
166
+ filter in JS.
167
+ - `findDescendants` groups by tag and is NOT in document order; use `getTree` when order matters.
168
+ - `getTree` loads the whole document unless it is a committed read with an `id` and a `depth`;
169
+ and it **unwraps transparent elements by default** (the config's `transparentElements`: their
170
+ children are lifted into the parent) - pass `unwrap` explicitly when you walk or copy them.
171
+ - Prefer one pass that gathers what several steps need over re-reading the same records.
172
+
173
+ ## Hooks: what fires when (core)
174
+
175
+ | Action | Hooks, in order |
176
+ | ------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------- |
177
+ | `tx.addChild` | afterStandardizedRecord → afterCreated |
178
+ | `tx.deepClone` | per node: beforeClone → afterStandardizedRecord → afterCreated |
179
+ | `tx.update` | afterStandardizedRecord → afterUpdated (not fired for a no-op update) |
180
+ | `tx.delete` | beforeDelete (subtree still readable) → cascade → parent update staged → afterDelete |
181
+ | end of transaction | your callback → beforeCommit → commit |
182
+ | import | beforeImport(xml) → per record, at its closing tag (children before parent): afterStandardizedRecord → beforeImportRecord → store write → afterImport |
183
+
184
+ Consequences to remember:
185
+
186
+ - Operations a hook returns are staged raw: no standardisation, no fixed/xsi guards, no further
187
+ hooks. A hook that deletes must also return the parent's `updated` op.
188
+ - Import hooks never read the store or call a query: collect in `beforeImportRecord`, resolve in
189
+ `afterImport` from what was collected. Import writes are not undoable.
190
+ - `afterStandardizedRecord` runs on create, update, import and init: it must be idempotent.
191
+
192
+ ## Adding your own extension (app side)
193
+
194
+ Same shape as the dialecte's own extensions, passed at project creation:
195
+
196
+ ```ts
197
+ // my-feature/query/find-orphan-parts.ts - one function per file, types in find-orphan-parts.types.ts, test next to it
198
+ import type * as Core from '@dialecte/core'
199
+ import type { Config } from '@acme/widget/v1' // the package's Config type (check its exports)
200
+
201
+ export async function findOrphanParts(query: Core.Query<Config>, params: FindOrphanPartsParams) { ... }
202
+
203
+ // my-feature/index.ts
204
+ export const myFeature = { query: { findOrphanParts }, transaction: { ... } }
205
+
206
+ // app
207
+ const project = createWidgetProject({ extensions: { myFeature } })
208
+ doc.query.myFeature.findOrphanParts({ assembly }) // first param is bound away
209
+ ```
210
+
211
+ - First parameter is the query (or transaction), typed `Core.Query<Config>` /
212
+ `Core.Transaction<Config>`, never the hydrated `<Name>.Query` (that type is built from the
213
+ extensions: a cycle). Remaining parameters go in ONE object.
214
+ - To call a sibling method, import it and pass your own `query` / `tx`.
215
+ - Pick a namespace key of your own. A custom module whose key equals a module key the dialecte
216
+ already uses (`inventory` in `@acme/widget`) merges into it, and only a same-named method there throws `EXTENSION_METHOD_COLLISION`. Nothing
217
+ stops a top-level name from shadowing a core member: never name a module like a core method.
218
+ - Tests call the function directly with `source.query` / `tx`, not through the bound method.
219
+
220
+ ## Testing
221
+
222
+ Each dialecte package exports table-driven runners from its `/test` entry
223
+ (`<package>/<version>/test` → `run<Name>TestCases`; core's own: `@dialecte/core/test`). Details
224
+ and the case format: [references/testing.md](references/testing.md). Short version: one table per
225
+ behaviour, inline XML fixtures with `dev:db-id` ids that say intent, `.withExport` asserts the
226
+ resulting XML with XPath, `.withoutExport` asserts inside `act`, `.generic` for pure functions.
227
+ Red first, one case at a time. No test names its store: the runner chooses it (in Node on the
228
+ in-memory store under a node vitest project whose setup file calls `useTestStorage`, core 0.8+).
229
+ Assertions take XML text; on a big file, check record expectations (tag, attributes, parent,
230
+ count) with the query API instead of XPath on the whole export.
231
+
232
+ ## Check a behaviour by running it
233
+
234
+ When the question is what a call does to a document - which elements a verb writes, whether a write
235
+ is refused and with which error, what a hook adds - run it in Node instead of reasoning from the
236
+ source. `npx @dialecte/cli run` (a cli that lists `run` in its `--help`, on core 0.8) runs a script
237
+ against an in-memory project of the installed dialecte; ids are seeded, so the same script, input and
238
+ `--seed` give the same outcome.
239
+
240
+ 1. **Expectations first**, in a JSON file: `[{ "tag": "Part", "under": { "tag": "Assembly" }, "count": 2 }]` -
241
+ `where` for attribute values, `count: 0` for none, no `count` for at least one. They say what the
242
+ user wants, which a valid document does not prove.
243
+ 2. **The script** is a module whose default export receives `{ project, doc, documentId, dialecte, helpers, utils }`.
244
+ Use the dialecte's verbs, not hand-built `addChild` chains; ask the user for values that are open.
245
+ 3. **Run it**: `npx @dialecte/cli run script.ts --in fixture.xml --expect expected.json`. `--prepare` stages
246
+ the first transaction and commits nothing (its operations and what its callback returned are
247
+ printed); `--json` answers the outcome as data; `--out result.xml` writes the document;
248
+ `--package <name>` names the dialecte when the project has none or several.
249
+ 4. **Read the outcome**, not a guess: `failed: <code> <key> at <path>` for a thrown error, then
250
+ `npx @dialecte/cli explain <code>` for when it is raised and the usual fix; each unmet expectation
251
+ with the count found; the operations per tag. Exit 1 means failed or unmet.
252
+ 5. Expectations red → script → green; show the user the prepared operations before anything is
253
+ committed for real.
254
+
255
+ ## Before you hand over
256
+
257
+ - Did you walk the reuse ladder and name what you reused?
258
+ - Does a hook already do any write you added by hand?
259
+ - Any query inside a loop over elements? Any `findAncestors` that could be a parent step?
260
+ - Any hand-written list that the definition or a registry already holds?
261
+ - Every Dialecte method you call confirmed in the installed version?
262
+
263
+ ## Retro gate - before you hand over
264
+
265
+ List in your hand-over every place where this skill was wrong, missing or misleading for the task,
266
+ and every correction the user made that a skill should have prevented. Then:
267
+
268
+ - **Inside a dialecte repository**: draft each skill edit as before/after and show it to the user; an
269
+ approved edit goes in the same change (skills ship with the package that owns the code), through
270
+ `anthropic-skills:skill-creator` loaded with the Skill tool - the eval case first, failing on the text
271
+ before the change, as `dialecte-lot` describes - then `npm run skills:generate` and
272
+ `npm run skills:check` (see `dialecte-contributing`).
273
+ - **In an app**: draft an issue for the package that ships the skill - the statement that was wrong
274
+ or missing, the evidence (file, behaviour), the wording you propose - and show it to the user.
275
+ Post it only with their approval.
276
+ - Nothing to report: write "skill retro: nothing".