@qvac/core 0.0.0 → 0.1.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 (586) hide show
  1. package/LICENSE.md +198 -0
  2. package/NOTICE.md +13 -0
  3. package/README.md +694 -0
  4. package/SECURITY.md +6 -0
  5. package/dist/assistant.bundle +47256 -0
  6. package/dist/assistant.cjs +18 -0
  7. package/dist/assistant.d.ts +8 -0
  8. package/dist/prebuilds-manifest.json +380 -0
  9. package/dist-lib/client.d.ts +2 -0
  10. package/dist-lib/client.js +1 -0
  11. package/dist-lib/index.d.ts +13 -0
  12. package/dist-lib/index.js +10 -0
  13. package/dist-lib/lib/agent-icons.d.ts +3 -0
  14. package/dist-lib/lib/agent-icons.js +1 -0
  15. package/dist-lib/lib/api/agents.d.ts +5 -0
  16. package/dist-lib/lib/api/agents.js +38 -0
  17. package/dist-lib/lib/api/app-config.d.ts +5 -0
  18. package/dist-lib/lib/api/app-config.js +108 -0
  19. package/dist-lib/lib/api/approval-rules.d.ts +3 -0
  20. package/dist-lib/lib/api/approval-rules.js +9 -0
  21. package/dist-lib/lib/api/attachments.d.ts +8 -0
  22. package/dist-lib/lib/api/attachments.js +15 -0
  23. package/dist-lib/lib/api/chat-groups.d.ts +5 -0
  24. package/dist-lib/lib/api/chat-groups.js +12 -0
  25. package/dist-lib/lib/api/chat.d.ts +5 -0
  26. package/dist-lib/lib/api/chat.js +38 -0
  27. package/dist-lib/lib/api/chunks.d.ts +5 -0
  28. package/dist-lib/lib/api/chunks.js +61 -0
  29. package/dist-lib/lib/api/config.d.ts +5 -0
  30. package/dist-lib/lib/api/config.js +15 -0
  31. package/dist-lib/lib/api/current-mesh.d.ts +5 -0
  32. package/dist-lib/lib/api/current-mesh.js +12 -0
  33. package/dist-lib/lib/api/custom-models.d.ts +5 -0
  34. package/dist-lib/lib/api/custom-models.js +45 -0
  35. package/dist-lib/lib/api/devices.d.ts +8 -0
  36. package/dist-lib/lib/api/devices.js +125 -0
  37. package/dist-lib/lib/api/diagnostics.d.ts +7 -0
  38. package/dist-lib/lib/api/diagnostics.js +7 -0
  39. package/dist-lib/lib/api/effective-ctx-size.d.ts +2 -0
  40. package/dist-lib/lib/api/effective-ctx-size.js +10 -0
  41. package/dist-lib/lib/api/execution.d.ts +3 -0
  42. package/dist-lib/lib/api/execution.js +45 -0
  43. package/dist-lib/lib/api/files.d.ts +3 -0
  44. package/dist-lib/lib/api/files.js +48 -0
  45. package/dist-lib/lib/api/index.d.ts +62 -0
  46. package/dist-lib/lib/api/index.js +172 -0
  47. package/dist-lib/lib/api/instrument.d.ts +2 -0
  48. package/dist-lib/lib/api/instrument.js +86 -0
  49. package/dist-lib/lib/api/knowledge.d.ts +8 -0
  50. package/dist-lib/lib/api/knowledge.js +26 -0
  51. package/dist-lib/lib/api/logs.d.ts +14 -0
  52. package/dist-lib/lib/api/logs.js +116 -0
  53. package/dist-lib/lib/api/mesh.d.ts +13 -0
  54. package/dist-lib/lib/api/mesh.js +25 -0
  55. package/dist-lib/lib/api/model-download.d.ts +5 -0
  56. package/dist-lib/lib/api/model-download.js +47 -0
  57. package/dist-lib/lib/api/network.d.ts +8 -0
  58. package/dist-lib/lib/api/network.js +6 -0
  59. package/dist-lib/lib/api/notifications.d.ts +21 -0
  60. package/dist-lib/lib/api/notifications.js +108 -0
  61. package/dist-lib/lib/api/rag.d.ts +7 -0
  62. package/dist-lib/lib/api/rag.js +216 -0
  63. package/dist-lib/lib/api/sync.d.ts +3 -0
  64. package/dist-lib/lib/api/sync.js +6 -0
  65. package/dist-lib/lib/api/tool-activity.d.ts +5 -0
  66. package/dist-lib/lib/api/tool-activity.js +53 -0
  67. package/dist-lib/lib/api/tool-configs.d.ts +6 -0
  68. package/dist-lib/lib/api/tool-configs.js +27 -0
  69. package/dist-lib/lib/api/watchable.d.ts +12 -0
  70. package/dist-lib/lib/api/watchable.js +121 -0
  71. package/dist-lib/lib/assistant-client.d.ts +21 -0
  72. package/dist-lib/lib/assistant-client.js +52 -0
  73. package/dist-lib/lib/assistant-tree.d.ts +50 -0
  74. package/dist-lib/lib/assistant-tree.js +184 -0
  75. package/dist-lib/lib/assistant.d.ts +425 -0
  76. package/dist-lib/lib/assistant.js +2706 -0
  77. package/dist-lib/lib/audio-format.d.ts +4 -0
  78. package/dist-lib/lib/audio-format.js +4 -0
  79. package/dist-lib/lib/chat-title.d.ts +5 -0
  80. package/dist-lib/lib/chat-title.js +58 -0
  81. package/dist-lib/lib/client.d.ts +25 -0
  82. package/dist-lib/lib/client.js +53 -0
  83. package/dist-lib/lib/collabora/convert.d.ts +9 -0
  84. package/dist-lib/lib/collabora/convert.js +62 -0
  85. package/dist-lib/lib/collabora/entry.d.ts +1 -0
  86. package/dist-lib/lib/collabora/entry.js +44 -0
  87. package/dist-lib/lib/collabora/protocol.d.ts +15 -0
  88. package/dist-lib/lib/collabora/protocol.js +24 -0
  89. package/dist-lib/lib/collabora/worker.d.ts +5 -0
  90. package/dist-lib/lib/collabora/worker.js +111 -0
  91. package/dist-lib/lib/compaction.d.ts +30 -0
  92. package/dist-lib/lib/compaction.js +95 -0
  93. package/dist-lib/lib/constants.d.ts +4 -0
  94. package/dist-lib/lib/constants.js +4 -0
  95. package/dist-lib/lib/core/agent.d.ts +15 -0
  96. package/dist-lib/lib/core/agent.js +149 -0
  97. package/dist-lib/lib/core/app-build.d.ts +7 -0
  98. package/dist-lib/lib/core/app-build.js +1 -0
  99. package/dist-lib/lib/core/approval-rules.d.ts +15 -0
  100. package/dist-lib/lib/core/approval-rules.js +41 -0
  101. package/dist-lib/lib/core/async-iterable.d.ts +13 -0
  102. package/dist-lib/lib/core/async-iterable.js +65 -0
  103. package/dist-lib/lib/core/attachment-link.d.ts +7 -0
  104. package/dist-lib/lib/core/attachment-link.js +6 -0
  105. package/dist-lib/lib/core/audio-attachment.d.ts +1 -0
  106. package/dist-lib/lib/core/audio-attachment.js +4 -0
  107. package/dist-lib/lib/core/blind-peers.d.ts +6 -0
  108. package/dist-lib/lib/core/blind-peers.js +13 -0
  109. package/dist-lib/lib/core/chat-activity.d.ts +7 -0
  110. package/dist-lib/lib/core/chat-activity.js +244 -0
  111. package/dist-lib/lib/core/chat-group.d.ts +14 -0
  112. package/dist-lib/lib/core/chat-group.js +79 -0
  113. package/dist-lib/lib/core/chat-search.d.ts +17 -0
  114. package/dist-lib/lib/core/chat-search.js +199 -0
  115. package/dist-lib/lib/core/chat.d.ts +37 -0
  116. package/dist-lib/lib/core/chat.js +196 -0
  117. package/dist-lib/lib/core/chunk.d.ts +61 -0
  118. package/dist-lib/lib/core/chunk.js +212 -0
  119. package/dist-lib/lib/core/contract/activity.d.ts +11 -0
  120. package/dist-lib/lib/core/contract/activity.js +45 -0
  121. package/dist-lib/lib/core/contract/agents.d.ts +2 -0
  122. package/dist-lib/lib/core/contract/agents.js +29 -0
  123. package/dist-lib/lib/core/contract/approval-rules.d.ts +2 -0
  124. package/dist-lib/lib/core/contract/approval-rules.js +14 -0
  125. package/dist-lib/lib/core/contract/attestations.d.ts +2 -0
  126. package/dist-lib/lib/core/contract/attestations.js +14 -0
  127. package/dist-lib/lib/core/contract/chat-group.d.ts +2 -0
  128. package/dist-lib/lib/core/contract/chat-group.js +20 -0
  129. package/dist-lib/lib/core/contract/chat.d.ts +2 -0
  130. package/dist-lib/lib/core/contract/chat.js +18 -0
  131. package/dist-lib/lib/core/contract/chunks.d.ts +2 -0
  132. package/dist-lib/lib/core/contract/chunks.js +156 -0
  133. package/dist-lib/lib/core/contract/devices.d.ts +2 -0
  134. package/dist-lib/lib/core/contract/devices.js +110 -0
  135. package/dist-lib/lib/core/contract/index.d.ts +2 -0
  136. package/dist-lib/lib/core/contract/index.js +30 -0
  137. package/dist-lib/lib/core/contract/indexing.d.ts +4 -0
  138. package/dist-lib/lib/core/contract/indexing.js +82 -0
  139. package/dist-lib/lib/core/contract/knowledge.d.ts +2 -0
  140. package/dist-lib/lib/core/contract/knowledge.js +55 -0
  141. package/dist-lib/lib/core/contract/members.d.ts +2 -0
  142. package/dist-lib/lib/core/contract/members.js +96 -0
  143. package/dist-lib/lib/core/contract/seed-defaults.d.ts +2 -0
  144. package/dist-lib/lib/core/contract/seed-defaults.js +29 -0
  145. package/dist-lib/lib/core/contract/tool-activity.d.ts +2 -0
  146. package/dist-lib/lib/core/contract/tool-activity.js +25 -0
  147. package/dist-lib/lib/core/contract/tool-configs.d.ts +2 -0
  148. package/dist-lib/lib/core/contract/tool-configs.js +50 -0
  149. package/dist-lib/lib/core/contract/types.d.ts +11 -0
  150. package/dist-lib/lib/core/contract/types.js +1 -0
  151. package/dist-lib/lib/core/contract/writers.d.ts +2 -0
  152. package/dist-lib/lib/core/contract/writers.js +112 -0
  153. package/dist-lib/lib/core/cpu-info-node.d.ts +3 -0
  154. package/dist-lib/lib/core/cpu-info-node.js +2 -0
  155. package/dist-lib/lib/core/departures.d.ts +41 -0
  156. package/dist-lib/lib/core/departures.js +145 -0
  157. package/dist-lib/lib/core/device-attestation.d.ts +6 -0
  158. package/dist-lib/lib/core/device-attestation.js +12 -0
  159. package/dist-lib/lib/core/devices.d.ts +14 -0
  160. package/dist-lib/lib/core/devices.js +11 -0
  161. package/dist-lib/lib/core/document-attachment.d.ts +22 -0
  162. package/dist-lib/lib/core/document-attachment.js +35 -0
  163. package/dist-lib/lib/core/files/attachments.d.ts +8 -0
  164. package/dist-lib/lib/core/files/attachments.js +50 -0
  165. package/dist-lib/lib/core/files/index.d.ts +133 -0
  166. package/dist-lib/lib/core/files/index.js +585 -0
  167. package/dist-lib/lib/core/files/knowledge.d.ts +9 -0
  168. package/dist-lib/lib/core/files/knowledge.js +31 -0
  169. package/dist-lib/lib/core/files/preview/image.d.ts +4 -0
  170. package/dist-lib/lib/core/files/preview/image.js +42 -0
  171. package/dist-lib/lib/core/files/preview/index.d.ts +33 -0
  172. package/dist-lib/lib/core/files/preview/index.js +161 -0
  173. package/dist-lib/lib/core/files/processing/claims.d.ts +26 -0
  174. package/dist-lib/lib/core/files/processing/claims.js +89 -0
  175. package/dist-lib/lib/core/files/processing/document.d.ts +100 -0
  176. package/dist-lib/lib/core/files/processing/document.js +101 -0
  177. package/dist-lib/lib/core/files/processing/index.d.ts +75 -0
  178. package/dist-lib/lib/core/files/processing/index.js +295 -0
  179. package/dist-lib/lib/core/files/processing/ownership.d.ts +11 -0
  180. package/dist-lib/lib/core/files/processing/ownership.js +41 -0
  181. package/dist-lib/lib/core/files/processing/protocol.d.ts +29 -0
  182. package/dist-lib/lib/core/files/processing/protocol.js +70 -0
  183. package/dist-lib/lib/core/files/processing/settle.d.ts +10 -0
  184. package/dist-lib/lib/core/files/processing/settle.js +75 -0
  185. package/dist-lib/lib/core/files/processing/source.d.ts +36 -0
  186. package/dist-lib/lib/core/files/processing/source.js +96 -0
  187. package/dist-lib/lib/core/files/processing/state.d.ts +64 -0
  188. package/dist-lib/lib/core/files/processing/state.js +118 -0
  189. package/dist-lib/lib/core/files/rag/artifact/codec.d.ts +3 -0
  190. package/dist-lib/lib/core/files/rag/artifact/codec.js +172 -0
  191. package/dist-lib/lib/core/files/rag/artifact/id.d.ts +10 -0
  192. package/dist-lib/lib/core/files/rag/artifact/id.js +39 -0
  193. package/dist-lib/lib/core/files/rag/artifact/types.d.ts +24 -0
  194. package/dist-lib/lib/core/files/rag/artifact/types.js +41 -0
  195. package/dist-lib/lib/core/files/rag/build.d.ts +25 -0
  196. package/dist-lib/lib/core/files/rag/build.js +60 -0
  197. package/dist-lib/lib/core/files/rag/chunk/chunking.d.ts +12 -0
  198. package/dist-lib/lib/core/files/rag/chunk/chunking.js +117 -0
  199. package/dist-lib/lib/core/files/rag/chunk/metadata.d.ts +30 -0
  200. package/dist-lib/lib/core/files/rag/chunk/metadata.js +89 -0
  201. package/dist-lib/lib/core/files/rag/chunk/tokenizer.d.ts +7 -0
  202. package/dist-lib/lib/core/files/rag/chunk/tokenizer.js +18 -0
  203. package/dist-lib/lib/core/files/rag/document-types.d.ts +11 -0
  204. package/dist-lib/lib/core/files/rag/document-types.js +94 -0
  205. package/dist-lib/lib/core/files/rag/extract/csv-text.d.ts +1 -0
  206. package/dist-lib/lib/core/files/rag/extract/csv-text.js +117 -0
  207. package/dist-lib/lib/core/files/rag/extract/document-types.d.ts +22 -0
  208. package/dist-lib/lib/core/files/rag/extract/document-types.js +152 -0
  209. package/dist-lib/lib/core/files/rag/extract/extract.d.ts +17 -0
  210. package/dist-lib/lib/core/files/rag/extract/extract.js +81 -0
  211. package/dist-lib/lib/core/files/rag/extract/html-table-text.d.ts +1 -0
  212. package/dist-lib/lib/core/files/rag/extract/html-table-text.js +125 -0
  213. package/dist-lib/lib/core/files/rag/extract/html-text.d.ts +1 -0
  214. package/dist-lib/lib/core/files/rag/extract/html-text.js +132 -0
  215. package/dist-lib/lib/core/files/rag/extract/office-collabora.d.ts +2 -0
  216. package/dist-lib/lib/core/files/rag/extract/office-collabora.js +8 -0
  217. package/dist-lib/lib/core/files/rag/extract/pdf-platform.d.ts +17 -0
  218. package/dist-lib/lib/core/files/rag/extract/pdf-platform.js +141 -0
  219. package/dist-lib/lib/core/files/rag/extract/pdf-text.d.ts +12 -0
  220. package/dist-lib/lib/core/files/rag/extract/pdf-text.js +43 -0
  221. package/dist-lib/lib/core/files/rag/extract/rtf-text.d.ts +1 -0
  222. package/dist-lib/lib/core/files/rag/extract/rtf-text.js +15 -0
  223. package/dist-lib/lib/core/files/rag/extract/text-decoding.d.ts +1 -0
  224. package/dist-lib/lib/core/files/rag/extract/text-decoding.js +91 -0
  225. package/dist-lib/lib/core/files/rag/extract/types.d.ts +36 -0
  226. package/dist-lib/lib/core/files/rag/extract/types.js +12 -0
  227. package/dist-lib/lib/core/files/rag/extract/utf.d.ts +2 -0
  228. package/dist-lib/lib/core/files/rag/extract/utf.js +18 -0
  229. package/dist-lib/lib/core/files/rag/index.d.ts +54 -0
  230. package/dist-lib/lib/core/files/rag/index.js +79 -0
  231. package/dist-lib/lib/core/files/rag/limits.d.ts +2 -0
  232. package/dist-lib/lib/core/files/rag/limits.js +2 -0
  233. package/dist-lib/lib/core/files/rag/load.d.ts +28 -0
  234. package/dist-lib/lib/core/files/rag/load.js +250 -0
  235. package/dist-lib/lib/core/files/rag/models.d.ts +1 -0
  236. package/dist-lib/lib/core/files/rag/models.js +1 -0
  237. package/dist-lib/lib/core/files/rag/policy.d.ts +2 -0
  238. package/dist-lib/lib/core/files/rag/policy.js +23 -0
  239. package/dist-lib/lib/core/files/rag/produce.d.ts +21 -0
  240. package/dist-lib/lib/core/files/rag/produce.js +214 -0
  241. package/dist-lib/lib/core/files/rag/retrieval/citation-match.d.ts +2 -0
  242. package/dist-lib/lib/core/files/rag/retrieval/citation-match.js +16 -0
  243. package/dist-lib/lib/core/files/rag/retrieval/coverage.d.ts +4 -0
  244. package/dist-lib/lib/core/files/rag/retrieval/coverage.js +48 -0
  245. package/dist-lib/lib/core/files/rag/retrieval/diversity.d.ts +10 -0
  246. package/dist-lib/lib/core/files/rag/retrieval/diversity.js +37 -0
  247. package/dist-lib/lib/core/files/rag/retrieval/floor.d.ts +5 -0
  248. package/dist-lib/lib/core/files/rag/retrieval/floor.js +21 -0
  249. package/dist-lib/lib/core/files/rag/retrieval/format.d.ts +6 -0
  250. package/dist-lib/lib/core/files/rag/retrieval/format.js +21 -0
  251. package/dist-lib/lib/core/files/rag/retrieval/full-text.d.ts +22 -0
  252. package/dist-lib/lib/core/files/rag/retrieval/full-text.js +137 -0
  253. package/dist-lib/lib/core/files/rag/retrieval/knowledge.d.ts +2 -0
  254. package/dist-lib/lib/core/files/rag/retrieval/knowledge.js +53 -0
  255. package/dist-lib/lib/core/files/rag/retrieval/notices.d.ts +16 -0
  256. package/dist-lib/lib/core/files/rag/retrieval/notices.js +27 -0
  257. package/dist-lib/lib/core/files/rag/retrieval/scoring.d.ts +8 -0
  258. package/dist-lib/lib/core/files/rag/retrieval/scoring.js +82 -0
  259. package/dist-lib/lib/core/files/rag/retrieval/search.d.ts +3 -0
  260. package/dist-lib/lib/core/files/rag/retrieval/search.js +46 -0
  261. package/dist-lib/lib/core/files/rag/retrieval/selection.d.ts +10 -0
  262. package/dist-lib/lib/core/files/rag/retrieval/selection.js +63 -0
  263. package/dist-lib/lib/core/files/rag/retrieval/source-tag-filter.d.ts +6 -0
  264. package/dist-lib/lib/core/files/rag/retrieval/source-tag-filter.js +79 -0
  265. package/dist-lib/lib/core/files/rag/retrieval/sources.d.ts +13 -0
  266. package/dist-lib/lib/core/files/rag/retrieval/sources.js +20 -0
  267. package/dist-lib/lib/core/files/rag/retrieval/target.d.ts +13 -0
  268. package/dist-lib/lib/core/files/rag/retrieval/target.js +89 -0
  269. package/dist-lib/lib/core/files/rag/retrieval/terms.d.ts +8 -0
  270. package/dist-lib/lib/core/files/rag/retrieval/terms.js +70 -0
  271. package/dist-lib/lib/core/files/rag/retrieval/types.d.ts +28 -0
  272. package/dist-lib/lib/core/files/rag/retrieval/types.js +1 -0
  273. package/dist-lib/lib/core/files/rag/retrieval/web-sources.d.ts +8 -0
  274. package/dist-lib/lib/core/files/rag/retrieval/web-sources.js +41 -0
  275. package/dist-lib/lib/core/files/rag/retrieval/whole-document-query.d.ts +1 -0
  276. package/dist-lib/lib/core/files/rag/retrieval/whole-document-query.js +96 -0
  277. package/dist-lib/lib/core/files/rag/vector/memory.d.ts +15 -0
  278. package/dist-lib/lib/core/files/rag/vector/memory.js +135 -0
  279. package/dist-lib/lib/core/files/rag/vector/types.d.ts +28 -0
  280. package/dist-lib/lib/core/files/rag/vector/types.js +1 -0
  281. package/dist-lib/lib/core/files/records/chunks.d.ts +3 -0
  282. package/dist-lib/lib/core/files/records/chunks.js +12 -0
  283. package/dist-lib/lib/core/files/records/index.d.ts +10 -0
  284. package/dist-lib/lib/core/files/records/index.js +8 -0
  285. package/dist-lib/lib/core/files/records/knowledge.d.ts +22 -0
  286. package/dist-lib/lib/core/files/records/knowledge.js +105 -0
  287. package/dist-lib/lib/core/files/records/linkage.d.ts +11 -0
  288. package/dist-lib/lib/core/files/records/linkage.js +27 -0
  289. package/dist-lib/lib/core/files/records/output.d.ts +8 -0
  290. package/dist-lib/lib/core/files/records/output.js +38 -0
  291. package/dist-lib/lib/core/files/records/reclaim.d.ts +5 -0
  292. package/dist-lib/lib/core/files/records/reclaim.js +73 -0
  293. package/dist-lib/lib/core/files/records/routing.d.ts +23 -0
  294. package/dist-lib/lib/core/files/records/routing.js +62 -0
  295. package/dist-lib/lib/core/files/records/source.d.ts +16 -0
  296. package/dist-lib/lib/core/files/records/source.js +70 -0
  297. package/dist-lib/lib/core/files/records/sweep.d.ts +2 -0
  298. package/dist-lib/lib/core/files/records/sweep.js +30 -0
  299. package/dist-lib/lib/core/files/store/blob.d.ts +29 -0
  300. package/dist-lib/lib/core/files/store/blob.js +98 -0
  301. package/dist-lib/lib/core/files/store/index.d.ts +36 -0
  302. package/dist-lib/lib/core/files/store/index.js +89 -0
  303. package/dist-lib/lib/core/files/store/inline.d.ts +8 -0
  304. package/dist-lib/lib/core/files/store/inline.js +38 -0
  305. package/dist-lib/lib/core/files/store/reference.d.ts +27 -0
  306. package/dist-lib/lib/core/files/store/reference.js +168 -0
  307. package/dist-lib/lib/core/files/store/server.d.ts +27 -0
  308. package/dist-lib/lib/core/files/store/server.js +114 -0
  309. package/dist-lib/lib/core/files/store/sweep.d.ts +2 -0
  310. package/dist-lib/lib/core/files/store/sweep.js +45 -0
  311. package/dist-lib/lib/core/files/upload-input.d.ts +27 -0
  312. package/dist-lib/lib/core/files/upload-input.js +52 -0
  313. package/dist-lib/lib/core/files/upload.d.ts +32 -0
  314. package/dist-lib/lib/core/files/upload.js +201 -0
  315. package/dist-lib/lib/core/fs-drives.d.ts +18 -0
  316. package/dist-lib/lib/core/fs-drives.js +58 -0
  317. package/dist-lib/lib/core/gpu-info-node.d.ts +3 -0
  318. package/dist-lib/lib/core/gpu-info-node.js +2 -0
  319. package/dist-lib/lib/core/handoff-channel.d.ts +46 -0
  320. package/dist-lib/lib/core/handoff-channel.js +102 -0
  321. package/dist-lib/lib/core/health-assistant.d.ts +7 -0
  322. package/dist-lib/lib/core/health-assistant.js +24 -0
  323. package/dist-lib/lib/core/helpers/index.d.ts +5 -0
  324. package/dist-lib/lib/core/helpers/index.js +74 -0
  325. package/dist-lib/lib/core/hosted-agents.d.ts +36 -0
  326. package/dist-lib/lib/core/hosted-agents.js +127 -0
  327. package/dist-lib/lib/core/id.d.ts +1 -0
  328. package/dist-lib/lib/core/id.js +5 -0
  329. package/dist-lib/lib/core/identity.d.ts +14 -0
  330. package/dist-lib/lib/core/identity.js +45 -0
  331. package/dist-lib/lib/core/image/cache-sweep.d.ts +12 -0
  332. package/dist-lib/lib/core/image/cache-sweep.js +67 -0
  333. package/dist-lib/lib/core/image/normalize.d.ts +3 -0
  334. package/dist-lib/lib/core/image/normalize.js +49 -0
  335. package/dist-lib/lib/core/image/sniff.d.ts +3 -0
  336. package/dist-lib/lib/core/image/sniff.js +149 -0
  337. package/dist-lib/lib/core/invite.d.ts +14 -0
  338. package/dist-lib/lib/core/invite.js +36 -0
  339. package/dist-lib/lib/core/local/index.d.ts +71 -0
  340. package/dist-lib/lib/core/local/index.js +391 -0
  341. package/dist-lib/lib/core/membership.d.ts +15 -0
  342. package/dist-lib/lib/core/membership.js +40 -0
  343. package/dist-lib/lib/core/mesh.d.ts +153 -0
  344. package/dist-lib/lib/core/mesh.js +509 -0
  345. package/dist-lib/lib/core/migrations/agent-catalog.d.ts +6 -0
  346. package/dist-lib/lib/core/migrations/agent-catalog.js +17 -0
  347. package/dist-lib/lib/core/migrations/index.d.ts +5 -0
  348. package/dist-lib/lib/core/migrations/index.js +7 -0
  349. package/dist-lib/lib/core/migrations/membership.d.ts +11 -0
  350. package/dist-lib/lib/core/migrations/membership.js +26 -0
  351. package/dist-lib/lib/core/min-version.d.ts +6 -0
  352. package/dist-lib/lib/core/min-version.js +31 -0
  353. package/dist-lib/lib/core/next-frame.d.ts +6 -0
  354. package/dist-lib/lib/core/next-frame.js +27 -0
  355. package/dist-lib/lib/core/notification.d.ts +6 -0
  356. package/dist-lib/lib/core/notification.js +162 -0
  357. package/dist-lib/lib/core/ota-config.d.ts +19 -0
  358. package/dist-lib/lib/core/ota-config.js +44 -0
  359. package/dist-lib/lib/core/prompt-history.d.ts +12 -0
  360. package/dist-lib/lib/core/prompt-history.js +40 -0
  361. package/dist-lib/lib/core/search-fold.d.ts +1 -0
  362. package/dist-lib/lib/core/search-fold.js +4 -0
  363. package/dist-lib/lib/core/secret-handoff.d.ts +17 -0
  364. package/dist-lib/lib/core/secret-handoff.js +29 -0
  365. package/dist-lib/lib/core/send.d.ts +18 -0
  366. package/dist-lib/lib/core/send.js +46 -0
  367. package/dist-lib/lib/core/skill-overlay-handoff.d.ts +25 -0
  368. package/dist-lib/lib/core/skill-overlay-handoff.js +50 -0
  369. package/dist-lib/lib/core/skill-overlay-receiver.d.ts +8 -0
  370. package/dist-lib/lib/core/skill-overlay-receiver.js +20 -0
  371. package/dist-lib/lib/core/skill-secrets.d.ts +25 -0
  372. package/dist-lib/lib/core/skill-secrets.js +79 -0
  373. package/dist-lib/lib/core/sync/chats.d.ts +3 -0
  374. package/dist-lib/lib/core/sync/chats.js +5 -0
  375. package/dist-lib/lib/core/sync/chunks.d.ts +9 -0
  376. package/dist-lib/lib/core/sync/chunks.js +16 -0
  377. package/dist-lib/lib/core/sync/devices.d.ts +4 -0
  378. package/dist-lib/lib/core/sync/devices.js +12 -0
  379. package/dist-lib/lib/core/sync/files.d.ts +16 -0
  380. package/dist-lib/lib/core/sync/files.js +109 -0
  381. package/dist-lib/lib/core/sync/index.d.ts +5 -0
  382. package/dist-lib/lib/core/sync/index.js +63 -0
  383. package/dist-lib/lib/core/sync-status.d.ts +17 -0
  384. package/dist-lib/lib/core/sync-status.js +129 -0
  385. package/dist-lib/lib/core/system-info.d.ts +24 -0
  386. package/dist-lib/lib/core/system-info.js +66 -0
  387. package/dist-lib/lib/core/tool-activity.d.ts +22 -0
  388. package/dist-lib/lib/core/tool-activity.js +39 -0
  389. package/dist-lib/lib/core/tool-configs.d.ts +13 -0
  390. package/dist-lib/lib/core/tool-configs.js +141 -0
  391. package/dist-lib/lib/core.d.ts +291 -0
  392. package/dist-lib/lib/core.js +2126 -0
  393. package/dist-lib/lib/credential-pusher.d.ts +67 -0
  394. package/dist-lib/lib/credential-pusher.js +290 -0
  395. package/dist-lib/lib/custom-model-pusher.d.ts +9 -0
  396. package/dist-lib/lib/custom-model-pusher.js +42 -0
  397. package/dist-lib/lib/custom-model-source.d.ts +15 -0
  398. package/dist-lib/lib/custom-model-source.js +46 -0
  399. package/dist-lib/lib/deadline.d.ts +9 -0
  400. package/dist-lib/lib/deadline.js +31 -0
  401. package/dist-lib/lib/diagnostics.d.ts +35 -0
  402. package/dist-lib/lib/diagnostics.js +14 -0
  403. package/dist-lib/lib/fetch-node.d.ts +1 -0
  404. package/dist-lib/lib/fetch-node.js +1 -0
  405. package/dist-lib/lib/fs-drive-bridge.d.ts +12 -0
  406. package/dist-lib/lib/fs-drive-bridge.js +186 -0
  407. package/dist-lib/lib/fs-grant-keys.d.ts +2 -0
  408. package/dist-lib/lib/fs-grant-keys.js +6 -0
  409. package/dist-lib/lib/fs-grants.d.ts +10 -0
  410. package/dist-lib/lib/fs-grants.js +44 -0
  411. package/dist-lib/lib/image-cache-dir.d.ts +1 -0
  412. package/dist-lib/lib/image-cache-dir.js +5 -0
  413. package/dist-lib/lib/integrations/index.d.ts +4 -0
  414. package/dist-lib/lib/integrations/index.js +3 -0
  415. package/dist-lib/lib/integrations/mcp-providers.d.ts +12 -0
  416. package/dist-lib/lib/integrations/mcp-providers.js +22 -0
  417. package/dist-lib/lib/integrations/oauth-providers.d.ts +14 -0
  418. package/dist-lib/lib/integrations/oauth-providers.js +116 -0
  419. package/dist-lib/lib/integrations/setup-routes.d.ts +12 -0
  420. package/dist-lib/lib/integrations/setup-routes.js +114 -0
  421. package/dist-lib/lib/knowledge-search.d.ts +7 -0
  422. package/dist-lib/lib/knowledge-search.js +53 -0
  423. package/dist-lib/lib/kv-cache-reclaim.d.ts +5 -0
  424. package/dist-lib/lib/kv-cache-reclaim.js +29 -0
  425. package/dist-lib/lib/kv-cache.d.ts +18 -0
  426. package/dist-lib/lib/kv-cache.js +33 -0
  427. package/dist-lib/lib/legacy-core-domain.d.ts +258 -0
  428. package/dist-lib/lib/legacy-core-domain.js +1 -0
  429. package/dist-lib/lib/llm-model-names.d.ts +1 -0
  430. package/dist-lib/lib/llm-model-names.js +1 -0
  431. package/dist-lib/lib/log-buffer.d.ts +7 -0
  432. package/dist-lib/lib/log-buffer.js +16 -0
  433. package/dist-lib/lib/log-levels.d.ts +7 -0
  434. package/dist-lib/lib/log-levels.js +1 -0
  435. package/dist-lib/lib/log.d.ts +60 -0
  436. package/dist-lib/lib/log.js +149 -0
  437. package/dist-lib/lib/logger-type.d.ts +13 -0
  438. package/dist-lib/lib/logger-type.js +1 -0
  439. package/dist-lib/lib/logger.d.ts +5 -0
  440. package/dist-lib/lib/logger.js +18 -0
  441. package/dist-lib/lib/model-catalog-revision.d.ts +9 -0
  442. package/dist-lib/lib/model-catalog-revision.js +65 -0
  443. package/dist-lib/lib/model-clamp.d.ts +6 -0
  444. package/dist-lib/lib/model-clamp.js +20 -0
  445. package/dist-lib/lib/model-context.d.ts +13 -0
  446. package/dist-lib/lib/model-context.js +71 -0
  447. package/dist-lib/lib/model-download-status.d.ts +29 -0
  448. package/dist-lib/lib/model-download-status.js +56 -0
  449. package/dist-lib/lib/model-download.d.ts +191 -0
  450. package/dist-lib/lib/model-download.js +787 -0
  451. package/dist-lib/lib/oauth/asana.d.ts +35 -0
  452. package/dist-lib/lib/oauth/asana.js +71 -0
  453. package/dist-lib/lib/oauth/browser-connect.d.ts +22 -0
  454. package/dist-lib/lib/oauth/browser-connect.js +83 -0
  455. package/dist-lib/lib/oauth/client.d.ts +9 -0
  456. package/dist-lib/lib/oauth/client.js +9 -0
  457. package/dist-lib/lib/oauth/common.d.ts +38 -0
  458. package/dist-lib/lib/oauth/common.js +36 -0
  459. package/dist-lib/lib/oauth/crypto.d.ts +3 -0
  460. package/dist-lib/lib/oauth/crypto.js +25 -0
  461. package/dist-lib/lib/oauth/fetch-platform.d.ts +1 -0
  462. package/dist-lib/lib/oauth/fetch-platform.js +1 -0
  463. package/dist-lib/lib/oauth/flow-core.d.ts +6 -0
  464. package/dist-lib/lib/oauth/flow-core.js +37 -0
  465. package/dist-lib/lib/oauth/flow.d.ts +3 -0
  466. package/dist-lib/lib/oauth/flow.js +24 -0
  467. package/dist-lib/lib/oauth/google.d.ts +37 -0
  468. package/dist-lib/lib/oauth/google.js +77 -0
  469. package/dist-lib/lib/oauth/host.d.ts +5 -0
  470. package/dist-lib/lib/oauth/host.js +3 -0
  471. package/dist-lib/lib/oauth/keys.d.ts +25 -0
  472. package/dist-lib/lib/oauth/keys.js +93 -0
  473. package/dist-lib/lib/oauth/loopback.d.ts +3 -0
  474. package/dist-lib/lib/oauth/loopback.js +119 -0
  475. package/dist-lib/lib/oauth/loopback.stub.d.ts +3 -0
  476. package/dist-lib/lib/oauth/loopback.stub.js +6 -0
  477. package/dist-lib/lib/oauth/notion.d.ts +34 -0
  478. package/dist-lib/lib/oauth/notion.js +82 -0
  479. package/dist-lib/lib/oauth/pkce-runtime.d.ts +3 -0
  480. package/dist-lib/lib/oauth/pkce-runtime.js +5 -0
  481. package/dist-lib/lib/oauth/pkce.d.ts +8 -0
  482. package/dist-lib/lib/oauth/pkce.js +6 -0
  483. package/dist-lib/lib/oauth/providers.d.ts +5 -0
  484. package/dist-lib/lib/oauth/providers.js +73 -0
  485. package/dist-lib/lib/oauth/redirect-types.d.ts +19 -0
  486. package/dist-lib/lib/oauth/redirect-types.js +1 -0
  487. package/dist-lib/lib/oauth/register.d.ts +3 -0
  488. package/dist-lib/lib/oauth/register.js +34 -0
  489. package/dist-lib/lib/oauth/resolve.d.ts +17 -0
  490. package/dist-lib/lib/oauth/resolve.js +57 -0
  491. package/dist-lib/lib/oauth/spotify.d.ts +32 -0
  492. package/dist-lib/lib/oauth/spotify.js +73 -0
  493. package/dist-lib/lib/oauth/token-exchange-core.d.ts +6 -0
  494. package/dist-lib/lib/oauth/token-exchange-core.js +97 -0
  495. package/dist-lib/lib/oauth/token-exchange.d.ts +5 -0
  496. package/dist-lib/lib/oauth/token-exchange.js +9 -0
  497. package/dist-lib/lib/oauth/types.d.ts +54 -0
  498. package/dist-lib/lib/oauth/types.js +1 -0
  499. package/dist-lib/lib/oauth.client.d.ts +5 -0
  500. package/dist-lib/lib/oauth.client.js +2 -0
  501. package/dist-lib/lib/oauth.d.ts +14 -0
  502. package/dist-lib/lib/oauth.js +12 -0
  503. package/dist-lib/lib/obsidian-key.d.ts +1 -0
  504. package/dist-lib/lib/obsidian-key.js +1 -0
  505. package/dist-lib/lib/race-resource.d.ts +5 -0
  506. package/dist-lib/lib/race-resource.js +25 -0
  507. package/dist-lib/lib/reconnecting-watch.d.ts +2 -0
  508. package/dist-lib/lib/reconnecting-watch.js +78 -0
  509. package/dist-lib/lib/retry-budget.d.ts +14 -0
  510. package/dist-lib/lib/retry-budget.js +39 -0
  511. package/dist-lib/lib/run-notices.d.ts +23 -0
  512. package/dist-lib/lib/run-notices.js +33 -0
  513. package/dist-lib/lib/run-transcript.d.ts +35 -0
  514. package/dist-lib/lib/run-transcript.js +106 -0
  515. package/dist-lib/lib/skill-readiness.d.ts +2 -0
  516. package/dist-lib/lib/skill-readiness.js +21 -0
  517. package/dist-lib/lib/skill-types.d.ts +70 -0
  518. package/dist-lib/lib/skill-types.js +1 -0
  519. package/dist-lib/lib/spec-loader.d.ts +14 -0
  520. package/dist-lib/lib/spec-loader.js +9 -0
  521. package/dist-lib/lib/suspend-lifecycle.d.ts +17 -0
  522. package/dist-lib/lib/suspend-lifecycle.js +33 -0
  523. package/dist-lib/lib/task.d.ts +26 -0
  524. package/dist-lib/lib/task.js +69 -0
  525. package/dist-lib/lib/unref.d.ts +3 -0
  526. package/dist-lib/lib/unref.js +4 -0
  527. package/dist-lib/lib/wav-duration.d.ts +1 -0
  528. package/dist-lib/lib/wav-duration.js +53 -0
  529. package/dist-lib/lib/write-queue.d.ts +22 -0
  530. package/dist-lib/lib/write-queue.js +39 -0
  531. package/dist-lib/schema/build.d.ts +1 -0
  532. package/dist-lib/schema/build.js +120 -0
  533. package/dist-lib/schema/config.d.ts +4 -0
  534. package/dist-lib/schema/config.js +7 -0
  535. package/dist-lib/schema/content.d.ts +20 -0
  536. package/dist-lib/schema/content.js +122 -0
  537. package/dist-lib/schema/engine.d.ts +2 -0
  538. package/dist-lib/schema/engine.js +2013 -0
  539. package/dist-lib/schema/field-order.d.ts +1 -0
  540. package/dist-lib/schema/field-order.js +95 -0
  541. package/dist-lib/schema/local.d.ts +2 -0
  542. package/dist-lib/schema/local.js +133 -0
  543. package/dist-lib/schema/qvac.d.ts +22 -0
  544. package/dist-lib/schema/qvac.js +722 -0
  545. package/dist-lib/spec/bind.d.ts +2 -0
  546. package/dist-lib/spec/bind.js +520 -0
  547. package/dist-lib/spec/calls.d.ts +3 -0
  548. package/dist-lib/spec/calls.js +129 -0
  549. package/dist-lib/spec/capabilities.d.ts +263 -0
  550. package/dist-lib/spec/config/hyperconf/index.d.ts +15 -0
  551. package/dist-lib/spec/config/hyperconf/index.js +24 -0
  552. package/dist-lib/spec/config/hyperconf/package.json +3 -0
  553. package/dist-lib/spec/config/hyperschema/index.js +81 -0
  554. package/dist-lib/spec/config/hyperschema/schema.json +19 -0
  555. package/dist-lib/spec/hrpc/hrpc.json +1500 -0
  556. package/dist-lib/spec/hrpc/index.d.ts +3 -0
  557. package/dist-lib/spec/hrpc/index.js +1545 -0
  558. package/dist-lib/spec/hrpc/messages.d.ts +4 -0
  559. package/dist-lib/spec/hrpc/messages.js +8373 -0
  560. package/dist-lib/spec/hyperschema/index.d.ts +20 -0
  561. package/dist-lib/spec/hyperschema/index.js +8373 -0
  562. package/dist-lib/spec/hyperschema/schema.json +6202 -0
  563. package/dist-lib/spec/hyperschema/types.d.ts +1545 -0
  564. package/dist-lib/spec/index.d.ts +36 -0
  565. package/dist-lib/spec/index.js +6 -0
  566. package/dist-lib/spec/local/hyperdb/db.json +186 -0
  567. package/dist-lib/spec/local/hyperdb/index.d.ts +9 -0
  568. package/dist-lib/spec/local/hyperdb/index.js +855 -0
  569. package/dist-lib/spec/local/hyperdb/messages.js +2189 -0
  570. package/dist-lib/spec/local/hyperschema/index.js +1208 -0
  571. package/dist-lib/spec/local/hyperschema/schema.json +639 -0
  572. package/dist-lib/spec/local/hyperschema/types.d.ts +159 -0
  573. package/dist-lib/spec/mesh/hyperdb/db.json +702 -0
  574. package/dist-lib/spec/mesh/hyperdb/index.d.ts +9 -0
  575. package/dist-lib/spec/mesh/hyperdb/index.js +2260 -0
  576. package/dist-lib/spec/mesh/hyperdb/messages.js +7453 -0
  577. package/dist-lib/spec/mesh/hyperdispatch/dispatch.json +174 -0
  578. package/dist-lib/spec/mesh/hyperdispatch/index.d.ts +13 -0
  579. package/dist-lib/spec/mesh/hyperdispatch/index.js +566 -0
  580. package/dist-lib/spec/mesh/hyperdispatch/messages.js +5713 -0
  581. package/dist-lib/spec/mesh/hyperschema/index.d.ts +14 -0
  582. package/dist-lib/spec/mesh/hyperschema/index.js +5713 -0
  583. package/dist-lib/spec/mesh/hyperschema/schema.json +3142 -0
  584. package/dist-lib/spec/mesh/hyperschema/types.d.ts +754 -0
  585. package/ducks.png +0 -0
  586. package/package.json +332 -1
@@ -0,0 +1,855 @@
1
+ // This file is autogenerated by the hyperdb compiler
2
+ /* eslint-disable camelcase */
3
+
4
+ import { IndexEncoder, c, b4a } from 'hyperdb/runtime'
5
+ import { version, getEncoding, setVersion } from './messages.js'
6
+
7
+ const versions = { schema: version, db: 4 }
8
+
9
+ // '@local/config' collection key
10
+ const collection0_key = new IndexEncoder([
11
+ IndexEncoder.STRING
12
+ ], { prefix: 0 })
13
+
14
+ function collection0_indexify (record) {
15
+ const a = record.key
16
+ return a === undefined ? [] : [a]
17
+ }
18
+
19
+ // '@local/config' value encoding
20
+ const collection0_enc = getEncoding('@local/config/hyperdb#0')
21
+
22
+ // '@local/config' reconstruction function
23
+ function collection0_reconstruct (schemaVersion, keyBuf, valueBuf) {
24
+ const key = collection0_key.decode(keyBuf)
25
+ setVersion(schemaVersion)
26
+ const state = { start: 0, end: valueBuf.byteLength, buffer: valueBuf }
27
+ const type = c.uint.decode(state)
28
+ if (type !== 0) throw new Error('Unknown collection type: ' + type)
29
+ collection0.decodedVersion = c.uint.decode(state)
30
+ const record = collection0_enc.decode(state)
31
+ record.key = key[0]
32
+ return record
33
+ }
34
+ // '@local/config' key reconstruction function
35
+ function collection0_reconstruct_key (keyBuf) {
36
+ const key = collection0_key.decode(keyBuf)
37
+ return {
38
+ key: key[0]
39
+ }
40
+ }
41
+
42
+ // '@local/config'
43
+ const collection0 = {
44
+ name: '@local/config',
45
+ id: 0,
46
+ version: 1,
47
+ encodeKey (record) {
48
+ const key = [record.key]
49
+ return collection0_key.encode(key)
50
+ },
51
+ encodeKeyRange ({ gt, lt, gte, lte } = {}) {
52
+ return collection0_key.encodeRange({
53
+ gt: gt ? collection0_indexify(gt) : null,
54
+ lt: lt ? collection0_indexify(lt) : null,
55
+ gte: gte ? collection0_indexify(gte) : null,
56
+ lte: lte ? collection0_indexify(lte) : null
57
+ })
58
+ },
59
+ encodeValue (schemaVersion, collectionVersion, record) {
60
+ setVersion(schemaVersion)
61
+ const state = { start: 0, end: 2, buffer: null }
62
+ collection0_enc.preencode(state, record)
63
+ state.buffer = b4a.allocUnsafe(state.end)
64
+ state.buffer[state.start++] = 0
65
+ state.buffer[state.start++] = collectionVersion
66
+ collection0_enc.encode(state, record)
67
+ return state.buffer
68
+ },
69
+ trigger: null,
70
+ reconstruct: collection0_reconstruct,
71
+ reconstructKey: collection0_reconstruct_key,
72
+ indexes: [],
73
+ decodedVersion: 0
74
+ }
75
+
76
+ // '@local/mesh-session' collection key
77
+ const collection1_key = new IndexEncoder([
78
+ IndexEncoder.BUFFER
79
+ ], { prefix: 1 })
80
+
81
+ function collection1_indexify (record) {
82
+ const a = record.deviceId
83
+ return a === undefined ? [] : [a]
84
+ }
85
+
86
+ // '@local/mesh-session' value encoding
87
+ const collection1_enc = getEncoding('@local/mesh-session/hyperdb#1')
88
+
89
+ // '@local/mesh-session' reconstruction function
90
+ function collection1_reconstruct (schemaVersion, keyBuf, valueBuf) {
91
+ const key = collection1_key.decode(keyBuf)
92
+ setVersion(schemaVersion)
93
+ const state = { start: 0, end: valueBuf.byteLength, buffer: valueBuf }
94
+ const type = c.uint.decode(state)
95
+ if (type !== 0) throw new Error('Unknown collection type: ' + type)
96
+ collection1.decodedVersion = c.uint.decode(state)
97
+ const record = collection1_enc.decode(state)
98
+ record.deviceId = key[0]
99
+ return record
100
+ }
101
+ // '@local/mesh-session' key reconstruction function
102
+ function collection1_reconstruct_key (keyBuf) {
103
+ const key = collection1_key.decode(keyBuf)
104
+ return {
105
+ deviceId: key[0]
106
+ }
107
+ }
108
+
109
+ // '@local/mesh-session'
110
+ const collection1 = {
111
+ name: '@local/mesh-session',
112
+ id: 1,
113
+ version: 1,
114
+ encodeKey (record) {
115
+ const key = [record.deviceId]
116
+ return collection1_key.encode(key)
117
+ },
118
+ encodeKeyRange ({ gt, lt, gte, lte } = {}) {
119
+ return collection1_key.encodeRange({
120
+ gt: gt ? collection1_indexify(gt) : null,
121
+ lt: lt ? collection1_indexify(lt) : null,
122
+ gte: gte ? collection1_indexify(gte) : null,
123
+ lte: lte ? collection1_indexify(lte) : null
124
+ })
125
+ },
126
+ encodeValue (schemaVersion, collectionVersion, record) {
127
+ setVersion(schemaVersion)
128
+ const state = { start: 0, end: 2, buffer: null }
129
+ collection1_enc.preencode(state, record)
130
+ state.buffer = b4a.allocUnsafe(state.end)
131
+ state.buffer[state.start++] = 0
132
+ state.buffer[state.start++] = collectionVersion
133
+ collection1_enc.encode(state, record)
134
+ return state.buffer
135
+ },
136
+ trigger: null,
137
+ reconstruct: collection1_reconstruct,
138
+ reconstructKey: collection1_reconstruct_key,
139
+ indexes: [],
140
+ decodedVersion: 0
141
+ }
142
+
143
+ // '@local/mesh-history' collection key
144
+ const collection2_key = new IndexEncoder([
145
+ IndexEncoder.BUFFER
146
+ ], { prefix: 2 })
147
+
148
+ function collection2_indexify (record) {
149
+ const a = record.key
150
+ return a === undefined ? [] : [a]
151
+ }
152
+
153
+ // '@local/mesh-history' value encoding
154
+ const collection2_enc = getEncoding('@local/mesh-history/hyperdb#2')
155
+
156
+ // '@local/mesh-history' reconstruction function
157
+ function collection2_reconstruct (schemaVersion, keyBuf, valueBuf) {
158
+ const key = collection2_key.decode(keyBuf)
159
+ setVersion(schemaVersion)
160
+ const state = { start: 0, end: valueBuf.byteLength, buffer: valueBuf }
161
+ const type = c.uint.decode(state)
162
+ if (type !== 0) throw new Error('Unknown collection type: ' + type)
163
+ collection2.decodedVersion = c.uint.decode(state)
164
+ const record = collection2_enc.decode(state)
165
+ record.key = key[0]
166
+ return record
167
+ }
168
+ // '@local/mesh-history' key reconstruction function
169
+ function collection2_reconstruct_key (keyBuf) {
170
+ const key = collection2_key.decode(keyBuf)
171
+ return {
172
+ key: key[0]
173
+ }
174
+ }
175
+
176
+ // '@local/mesh-history'
177
+ const collection2 = {
178
+ name: '@local/mesh-history',
179
+ id: 2,
180
+ version: 1,
181
+ encodeKey (record) {
182
+ const key = [record.key]
183
+ return collection2_key.encode(key)
184
+ },
185
+ encodeKeyRange ({ gt, lt, gte, lte } = {}) {
186
+ return collection2_key.encodeRange({
187
+ gt: gt ? collection2_indexify(gt) : null,
188
+ lt: lt ? collection2_indexify(lt) : null,
189
+ gte: gte ? collection2_indexify(gte) : null,
190
+ lte: lte ? collection2_indexify(lte) : null
191
+ })
192
+ },
193
+ encodeValue (schemaVersion, collectionVersion, record) {
194
+ setVersion(schemaVersion)
195
+ const state = { start: 0, end: 2, buffer: null }
196
+ collection2_enc.preencode(state, record)
197
+ state.buffer = b4a.allocUnsafe(state.end)
198
+ state.buffer[state.start++] = 0
199
+ state.buffer[state.start++] = collectionVersion
200
+ collection2_enc.encode(state, record)
201
+ return state.buffer
202
+ },
203
+ trigger: null,
204
+ reconstruct: collection2_reconstruct,
205
+ reconstructKey: collection2_reconstruct_key,
206
+ indexes: [],
207
+ decodedVersion: 0
208
+ }
209
+
210
+ // '@local/device' collection key
211
+ const collection3_key = new IndexEncoder([
212
+ IndexEncoder.BUFFER
213
+ ], { prefix: 3 })
214
+
215
+ function collection3_indexify (record) {
216
+ const a = record.publicKey
217
+ return a === undefined ? [] : [a]
218
+ }
219
+
220
+ // '@local/device' value encoding
221
+ const collection3_enc = getEncoding('@local/device/hyperdb#3')
222
+
223
+ // '@local/device' reconstruction function
224
+ function collection3_reconstruct (schemaVersion, keyBuf, valueBuf) {
225
+ const key = collection3_key.decode(keyBuf)
226
+ setVersion(schemaVersion)
227
+ const state = { start: 0, end: valueBuf.byteLength, buffer: valueBuf }
228
+ const type = c.uint.decode(state)
229
+ if (type !== 0) throw new Error('Unknown collection type: ' + type)
230
+ collection3.decodedVersion = c.uint.decode(state)
231
+ const record = collection3_enc.decode(state)
232
+ record.publicKey = key[0]
233
+ return record
234
+ }
235
+ // '@local/device' key reconstruction function
236
+ function collection3_reconstruct_key (keyBuf) {
237
+ const key = collection3_key.decode(keyBuf)
238
+ return {
239
+ publicKey: key[0]
240
+ }
241
+ }
242
+
243
+ // '@local/device'
244
+ const collection3 = {
245
+ name: '@local/device',
246
+ id: 3,
247
+ version: 1,
248
+ encodeKey (record) {
249
+ const key = [record.publicKey]
250
+ return collection3_key.encode(key)
251
+ },
252
+ encodeKeyRange ({ gt, lt, gte, lte } = {}) {
253
+ return collection3_key.encodeRange({
254
+ gt: gt ? collection3_indexify(gt) : null,
255
+ lt: lt ? collection3_indexify(lt) : null,
256
+ gte: gte ? collection3_indexify(gte) : null,
257
+ lte: lte ? collection3_indexify(lte) : null
258
+ })
259
+ },
260
+ encodeValue (schemaVersion, collectionVersion, record) {
261
+ setVersion(schemaVersion)
262
+ const state = { start: 0, end: 2, buffer: null }
263
+ collection3_enc.preencode(state, record)
264
+ state.buffer = b4a.allocUnsafe(state.end)
265
+ state.buffer[state.start++] = 0
266
+ state.buffer[state.start++] = collectionVersion
267
+ collection3_enc.encode(state, record)
268
+ return state.buffer
269
+ },
270
+ trigger: null,
271
+ reconstruct: collection3_reconstruct,
272
+ reconstructKey: collection3_reconstruct_key,
273
+ indexes: [],
274
+ decodedVersion: 0
275
+ }
276
+
277
+ // '@local/app-config' collection key
278
+ const collection4_key = new IndexEncoder([
279
+ IndexEncoder.STRING
280
+ ], { prefix: 4 })
281
+
282
+ function collection4_indexify (record) {
283
+ const a = record.id
284
+ return a === undefined ? [] : [a]
285
+ }
286
+
287
+ // '@local/app-config' value encoding
288
+ const collection4_enc = getEncoding('@local/app-config/hyperdb#4')
289
+
290
+ // '@local/app-config' reconstruction function
291
+ function collection4_reconstruct (schemaVersion, keyBuf, valueBuf) {
292
+ const key = collection4_key.decode(keyBuf)
293
+ setVersion(schemaVersion)
294
+ const state = { start: 0, end: valueBuf.byteLength, buffer: valueBuf }
295
+ const type = c.uint.decode(state)
296
+ if (type !== 0) throw new Error('Unknown collection type: ' + type)
297
+ collection4.decodedVersion = c.uint.decode(state)
298
+ const record = collection4_enc.decode(state)
299
+ record.id = key[0]
300
+ return record
301
+ }
302
+ // '@local/app-config' key reconstruction function
303
+ function collection4_reconstruct_key (keyBuf) {
304
+ const key = collection4_key.decode(keyBuf)
305
+ return {
306
+ id: key[0]
307
+ }
308
+ }
309
+
310
+ // '@local/app-config'
311
+ const collection4 = {
312
+ name: '@local/app-config',
313
+ id: 4,
314
+ version: 1,
315
+ encodeKey (record) {
316
+ const key = [record.id]
317
+ return collection4_key.encode(key)
318
+ },
319
+ encodeKeyRange ({ gt, lt, gte, lte } = {}) {
320
+ return collection4_key.encodeRange({
321
+ gt: gt ? collection4_indexify(gt) : null,
322
+ lt: lt ? collection4_indexify(lt) : null,
323
+ gte: gte ? collection4_indexify(gte) : null,
324
+ lte: lte ? collection4_indexify(lte) : null
325
+ })
326
+ },
327
+ encodeValue (schemaVersion, collectionVersion, record) {
328
+ setVersion(schemaVersion)
329
+ const state = { start: 0, end: 2, buffer: null }
330
+ collection4_enc.preencode(state, record)
331
+ state.buffer = b4a.allocUnsafe(state.end)
332
+ state.buffer[state.start++] = 0
333
+ state.buffer[state.start++] = collectionVersion
334
+ collection4_enc.encode(state, record)
335
+ return state.buffer
336
+ },
337
+ trigger: null,
338
+ reconstruct: collection4_reconstruct,
339
+ reconstructKey: collection4_reconstruct_key,
340
+ indexes: [],
341
+ decodedVersion: 0
342
+ }
343
+
344
+ // '@local/model-download' collection key
345
+ const collection5_key = new IndexEncoder([
346
+ IndexEncoder.STRING
347
+ ], { prefix: 5 })
348
+
349
+ function collection5_indexify (record) {
350
+ const a = record.name
351
+ return a === undefined ? [] : [a]
352
+ }
353
+
354
+ // '@local/model-download' value encoding
355
+ const collection5_enc = getEncoding('@local/model-download/hyperdb#5')
356
+
357
+ // '@local/model-download' reconstruction function
358
+ function collection5_reconstruct (schemaVersion, keyBuf, valueBuf) {
359
+ const key = collection5_key.decode(keyBuf)
360
+ setVersion(schemaVersion)
361
+ const state = { start: 0, end: valueBuf.byteLength, buffer: valueBuf }
362
+ const type = c.uint.decode(state)
363
+ if (type !== 0) throw new Error('Unknown collection type: ' + type)
364
+ collection5.decodedVersion = c.uint.decode(state)
365
+ const record = collection5_enc.decode(state)
366
+ record.name = key[0]
367
+ return record
368
+ }
369
+ // '@local/model-download' key reconstruction function
370
+ function collection5_reconstruct_key (keyBuf) {
371
+ const key = collection5_key.decode(keyBuf)
372
+ return {
373
+ name: key[0]
374
+ }
375
+ }
376
+
377
+ // '@local/model-download'
378
+ const collection5 = {
379
+ name: '@local/model-download',
380
+ id: 5,
381
+ version: 1,
382
+ encodeKey (record) {
383
+ const key = [record.name]
384
+ return collection5_key.encode(key)
385
+ },
386
+ encodeKeyRange ({ gt, lt, gte, lte } = {}) {
387
+ return collection5_key.encodeRange({
388
+ gt: gt ? collection5_indexify(gt) : null,
389
+ lt: lt ? collection5_indexify(lt) : null,
390
+ gte: gte ? collection5_indexify(gte) : null,
391
+ lte: lte ? collection5_indexify(lte) : null
392
+ })
393
+ },
394
+ encodeValue (schemaVersion, collectionVersion, record) {
395
+ setVersion(schemaVersion)
396
+ const state = { start: 0, end: 2, buffer: null }
397
+ collection5_enc.preencode(state, record)
398
+ state.buffer = b4a.allocUnsafe(state.end)
399
+ state.buffer[state.start++] = 0
400
+ state.buffer[state.start++] = collectionVersion
401
+ collection5_enc.encode(state, record)
402
+ return state.buffer
403
+ },
404
+ trigger: null,
405
+ reconstruct: collection5_reconstruct,
406
+ reconstructKey: collection5_reconstruct_key,
407
+ indexes: [],
408
+ decodedVersion: 0
409
+ }
410
+
411
+ // '@local/custom-model' collection key
412
+ const collection6_key = new IndexEncoder([
413
+ IndexEncoder.STRING
414
+ ], { prefix: 6 })
415
+
416
+ function collection6_indexify (record) {
417
+ const a = record.name
418
+ return a === undefined ? [] : [a]
419
+ }
420
+
421
+ // '@local/custom-model' value encoding
422
+ const collection6_enc = getEncoding('@local/custom-model/hyperdb#6')
423
+
424
+ // '@local/custom-model' reconstruction function
425
+ function collection6_reconstruct (schemaVersion, keyBuf, valueBuf) {
426
+ const key = collection6_key.decode(keyBuf)
427
+ setVersion(schemaVersion)
428
+ const state = { start: 0, end: valueBuf.byteLength, buffer: valueBuf }
429
+ const type = c.uint.decode(state)
430
+ if (type !== 0) throw new Error('Unknown collection type: ' + type)
431
+ collection6.decodedVersion = c.uint.decode(state)
432
+ const record = collection6_enc.decode(state)
433
+ record.name = key[0]
434
+ return record
435
+ }
436
+ // '@local/custom-model' key reconstruction function
437
+ function collection6_reconstruct_key (keyBuf) {
438
+ const key = collection6_key.decode(keyBuf)
439
+ return {
440
+ name: key[0]
441
+ }
442
+ }
443
+
444
+ // '@local/custom-model'
445
+ const collection6 = {
446
+ name: '@local/custom-model',
447
+ id: 6,
448
+ version: 2,
449
+ encodeKey (record) {
450
+ const key = [record.name]
451
+ return collection6_key.encode(key)
452
+ },
453
+ encodeKeyRange ({ gt, lt, gte, lte } = {}) {
454
+ return collection6_key.encodeRange({
455
+ gt: gt ? collection6_indexify(gt) : null,
456
+ lt: lt ? collection6_indexify(lt) : null,
457
+ gte: gte ? collection6_indexify(gte) : null,
458
+ lte: lte ? collection6_indexify(lte) : null
459
+ })
460
+ },
461
+ encodeValue (schemaVersion, collectionVersion, record) {
462
+ setVersion(schemaVersion)
463
+ const state = { start: 0, end: 2, buffer: null }
464
+ collection6_enc.preencode(state, record)
465
+ state.buffer = b4a.allocUnsafe(state.end)
466
+ state.buffer[state.start++] = 0
467
+ state.buffer[state.start++] = collectionVersion
468
+ collection6_enc.encode(state, record)
469
+ return state.buffer
470
+ },
471
+ trigger: null,
472
+ reconstruct: collection6_reconstruct,
473
+ reconstructKey: collection6_reconstruct_key,
474
+ indexes: [],
475
+ decodedVersion: 0
476
+ }
477
+
478
+ // '@local/identity' collection key
479
+ const collection7_key = new IndexEncoder([
480
+ IndexEncoder.STRING
481
+ ], { prefix: 7 })
482
+
483
+ function collection7_indexify (record) {
484
+ const a = record.id
485
+ return a === undefined ? [] : [a]
486
+ }
487
+
488
+ // '@local/identity' value encoding
489
+ const collection7_enc = getEncoding('@local/identity/hyperdb#7')
490
+
491
+ // '@local/identity' reconstruction function
492
+ function collection7_reconstruct (schemaVersion, keyBuf, valueBuf) {
493
+ const key = collection7_key.decode(keyBuf)
494
+ setVersion(schemaVersion)
495
+ const state = { start: 0, end: valueBuf.byteLength, buffer: valueBuf }
496
+ const type = c.uint.decode(state)
497
+ if (type !== 0) throw new Error('Unknown collection type: ' + type)
498
+ collection7.decodedVersion = c.uint.decode(state)
499
+ const record = collection7_enc.decode(state)
500
+ record.id = key[0]
501
+ return record
502
+ }
503
+ // '@local/identity' key reconstruction function
504
+ function collection7_reconstruct_key (keyBuf) {
505
+ const key = collection7_key.decode(keyBuf)
506
+ return {
507
+ id: key[0]
508
+ }
509
+ }
510
+
511
+ // '@local/identity'
512
+ const collection7 = {
513
+ name: '@local/identity',
514
+ id: 7,
515
+ version: 3,
516
+ encodeKey (record) {
517
+ const key = [record.id]
518
+ return collection7_key.encode(key)
519
+ },
520
+ encodeKeyRange ({ gt, lt, gte, lte } = {}) {
521
+ return collection7_key.encodeRange({
522
+ gt: gt ? collection7_indexify(gt) : null,
523
+ lt: lt ? collection7_indexify(lt) : null,
524
+ gte: gte ? collection7_indexify(gte) : null,
525
+ lte: lte ? collection7_indexify(lte) : null
526
+ })
527
+ },
528
+ encodeValue (schemaVersion, collectionVersion, record) {
529
+ setVersion(schemaVersion)
530
+ const state = { start: 0, end: 2, buffer: null }
531
+ collection7_enc.preencode(state, record)
532
+ state.buffer = b4a.allocUnsafe(state.end)
533
+ state.buffer[state.start++] = 0
534
+ state.buffer[state.start++] = collectionVersion
535
+ collection7_enc.encode(state, record)
536
+ return state.buffer
537
+ },
538
+ trigger: null,
539
+ reconstruct: collection7_reconstruct,
540
+ reconstructKey: collection7_reconstruct_key,
541
+ indexes: [],
542
+ decodedVersion: 0
543
+ }
544
+
545
+ // '@local/membership' collection key
546
+ const collection8_key = new IndexEncoder([
547
+ IndexEncoder.STRING
548
+ ], { prefix: 8 })
549
+
550
+ function collection8_indexify (record) {
551
+ const a = record.id
552
+ return a === undefined ? [] : [a]
553
+ }
554
+
555
+ // '@local/membership' value encoding
556
+ const collection8_enc = getEncoding('@local/membership/hyperdb#8')
557
+
558
+ // '@local/membership' reconstruction function
559
+ function collection8_reconstruct (schemaVersion, keyBuf, valueBuf) {
560
+ const key = collection8_key.decode(keyBuf)
561
+ setVersion(schemaVersion)
562
+ const state = { start: 0, end: valueBuf.byteLength, buffer: valueBuf }
563
+ const type = c.uint.decode(state)
564
+ if (type !== 0) throw new Error('Unknown collection type: ' + type)
565
+ collection8.decodedVersion = c.uint.decode(state)
566
+ const record = collection8_enc.decode(state)
567
+ record.id = key[0]
568
+ return record
569
+ }
570
+ // '@local/membership' key reconstruction function
571
+ function collection8_reconstruct_key (keyBuf) {
572
+ const key = collection8_key.decode(keyBuf)
573
+ return {
574
+ id: key[0]
575
+ }
576
+ }
577
+
578
+ // '@local/membership'
579
+ const collection8 = {
580
+ name: '@local/membership',
581
+ id: 8,
582
+ version: 3,
583
+ encodeKey (record) {
584
+ const key = [record.id]
585
+ return collection8_key.encode(key)
586
+ },
587
+ encodeKeyRange ({ gt, lt, gte, lte } = {}) {
588
+ return collection8_key.encodeRange({
589
+ gt: gt ? collection8_indexify(gt) : null,
590
+ lt: lt ? collection8_indexify(lt) : null,
591
+ gte: gte ? collection8_indexify(gte) : null,
592
+ lte: lte ? collection8_indexify(lte) : null
593
+ })
594
+ },
595
+ encodeValue (schemaVersion, collectionVersion, record) {
596
+ setVersion(schemaVersion)
597
+ const state = { start: 0, end: 2, buffer: null }
598
+ collection8_enc.preencode(state, record)
599
+ state.buffer = b4a.allocUnsafe(state.end)
600
+ state.buffer[state.start++] = 0
601
+ state.buffer[state.start++] = collectionVersion
602
+ collection8_enc.encode(state, record)
603
+ return state.buffer
604
+ },
605
+ trigger: null,
606
+ reconstruct: collection8_reconstruct,
607
+ reconstructKey: collection8_reconstruct_key,
608
+ indexes: [],
609
+ decodedVersion: 0
610
+ }
611
+
612
+ // '@local/chat-notify' collection key
613
+ const collection9_key = new IndexEncoder([
614
+ IndexEncoder.STRING
615
+ ], { prefix: 9 })
616
+
617
+ function collection9_indexify (record) {
618
+ const a = record.chatId
619
+ return a === undefined ? [] : [a]
620
+ }
621
+
622
+ // '@local/chat-notify' value encoding
623
+ const collection9_enc = getEncoding('@local/chat-notify/hyperdb#9')
624
+
625
+ // '@local/chat-notify' reconstruction function
626
+ function collection9_reconstruct (schemaVersion, keyBuf, valueBuf) {
627
+ const key = collection9_key.decode(keyBuf)
628
+ setVersion(schemaVersion)
629
+ const state = { start: 0, end: valueBuf.byteLength, buffer: valueBuf }
630
+ const type = c.uint.decode(state)
631
+ if (type !== 0) throw new Error('Unknown collection type: ' + type)
632
+ collection9.decodedVersion = c.uint.decode(state)
633
+ const record = collection9_enc.decode(state)
634
+ record.chatId = key[0]
635
+ return record
636
+ }
637
+ // '@local/chat-notify' key reconstruction function
638
+ function collection9_reconstruct_key (keyBuf) {
639
+ const key = collection9_key.decode(keyBuf)
640
+ return {
641
+ chatId: key[0]
642
+ }
643
+ }
644
+
645
+ // '@local/chat-notify'
646
+ const collection9 = {
647
+ name: '@local/chat-notify',
648
+ id: 9,
649
+ version: 4,
650
+ encodeKey (record) {
651
+ const key = [record.chatId]
652
+ return collection9_key.encode(key)
653
+ },
654
+ encodeKeyRange ({ gt, lt, gte, lte } = {}) {
655
+ return collection9_key.encodeRange({
656
+ gt: gt ? collection9_indexify(gt) : null,
657
+ lt: lt ? collection9_indexify(lt) : null,
658
+ gte: gte ? collection9_indexify(gte) : null,
659
+ lte: lte ? collection9_indexify(lte) : null
660
+ })
661
+ },
662
+ encodeValue (schemaVersion, collectionVersion, record) {
663
+ setVersion(schemaVersion)
664
+ const state = { start: 0, end: 2, buffer: null }
665
+ collection9_enc.preencode(state, record)
666
+ state.buffer = b4a.allocUnsafe(state.end)
667
+ state.buffer[state.start++] = 0
668
+ state.buffer[state.start++] = collectionVersion
669
+ collection9_enc.encode(state, record)
670
+ return state.buffer
671
+ },
672
+ trigger: null,
673
+ reconstruct: collection9_reconstruct,
674
+ reconstructKey: collection9_reconstruct_key,
675
+ indexes: [],
676
+ decodedVersion: 0
677
+ }
678
+
679
+ // '@local/model-notify' collection key
680
+ const collection10_key = new IndexEncoder([
681
+ IndexEncoder.STRING
682
+ ], { prefix: 10 })
683
+
684
+ function collection10_indexify (record) {
685
+ const a = record.name
686
+ return a === undefined ? [] : [a]
687
+ }
688
+
689
+ // '@local/model-notify' value encoding
690
+ const collection10_enc = getEncoding('@local/model-notify/hyperdb#10')
691
+
692
+ // '@local/model-notify' reconstruction function
693
+ function collection10_reconstruct (schemaVersion, keyBuf, valueBuf) {
694
+ const key = collection10_key.decode(keyBuf)
695
+ setVersion(schemaVersion)
696
+ const state = { start: 0, end: valueBuf.byteLength, buffer: valueBuf }
697
+ const type = c.uint.decode(state)
698
+ if (type !== 0) throw new Error('Unknown collection type: ' + type)
699
+ collection10.decodedVersion = c.uint.decode(state)
700
+ const record = collection10_enc.decode(state)
701
+ record.name = key[0]
702
+ return record
703
+ }
704
+ // '@local/model-notify' key reconstruction function
705
+ function collection10_reconstruct_key (keyBuf) {
706
+ const key = collection10_key.decode(keyBuf)
707
+ return {
708
+ name: key[0]
709
+ }
710
+ }
711
+
712
+ // '@local/model-notify'
713
+ const collection10 = {
714
+ name: '@local/model-notify',
715
+ id: 10,
716
+ version: 4,
717
+ encodeKey (record) {
718
+ const key = [record.name]
719
+ return collection10_key.encode(key)
720
+ },
721
+ encodeKeyRange ({ gt, lt, gte, lte } = {}) {
722
+ return collection10_key.encodeRange({
723
+ gt: gt ? collection10_indexify(gt) : null,
724
+ lt: lt ? collection10_indexify(lt) : null,
725
+ gte: gte ? collection10_indexify(gte) : null,
726
+ lte: lte ? collection10_indexify(lte) : null
727
+ })
728
+ },
729
+ encodeValue (schemaVersion, collectionVersion, record) {
730
+ setVersion(schemaVersion)
731
+ const state = { start: 0, end: 2, buffer: null }
732
+ collection10_enc.preencode(state, record)
733
+ state.buffer = b4a.allocUnsafe(state.end)
734
+ state.buffer[state.start++] = 0
735
+ state.buffer[state.start++] = collectionVersion
736
+ collection10_enc.encode(state, record)
737
+ return state.buffer
738
+ },
739
+ trigger: null,
740
+ reconstruct: collection10_reconstruct,
741
+ reconstructKey: collection10_reconstruct_key,
742
+ indexes: [],
743
+ decodedVersion: 0
744
+ }
745
+
746
+ // '@local/mesh-departure' collection key
747
+ const collection11_key = new IndexEncoder([
748
+ IndexEncoder.BUFFER
749
+ ], { prefix: 11 })
750
+
751
+ function collection11_indexify (record) {
752
+ const a = record.key
753
+ return a === undefined ? [] : [a]
754
+ }
755
+
756
+ // '@local/mesh-departure' value encoding
757
+ const collection11_enc = getEncoding('@local/mesh-departure/hyperdb#11')
758
+
759
+ // '@local/mesh-departure' reconstruction function
760
+ function collection11_reconstruct (schemaVersion, keyBuf, valueBuf) {
761
+ const key = collection11_key.decode(keyBuf)
762
+ setVersion(schemaVersion)
763
+ const state = { start: 0, end: valueBuf.byteLength, buffer: valueBuf }
764
+ const type = c.uint.decode(state)
765
+ if (type !== 0) throw new Error('Unknown collection type: ' + type)
766
+ collection11.decodedVersion = c.uint.decode(state)
767
+ const record = collection11_enc.decode(state)
768
+ record.key = key[0]
769
+ return record
770
+ }
771
+ // '@local/mesh-departure' key reconstruction function
772
+ function collection11_reconstruct_key (keyBuf) {
773
+ const key = collection11_key.decode(keyBuf)
774
+ return {
775
+ key: key[0]
776
+ }
777
+ }
778
+
779
+ // '@local/mesh-departure'
780
+ const collection11 = {
781
+ name: '@local/mesh-departure',
782
+ id: 11,
783
+ version: 4,
784
+ encodeKey (record) {
785
+ const key = [record.key]
786
+ return collection11_key.encode(key)
787
+ },
788
+ encodeKeyRange ({ gt, lt, gte, lte } = {}) {
789
+ return collection11_key.encodeRange({
790
+ gt: gt ? collection11_indexify(gt) : null,
791
+ lt: lt ? collection11_indexify(lt) : null,
792
+ gte: gte ? collection11_indexify(gte) : null,
793
+ lte: lte ? collection11_indexify(lte) : null
794
+ })
795
+ },
796
+ encodeValue (schemaVersion, collectionVersion, record) {
797
+ setVersion(schemaVersion)
798
+ const state = { start: 0, end: 2, buffer: null }
799
+ collection11_enc.preencode(state, record)
800
+ state.buffer = b4a.allocUnsafe(state.end)
801
+ state.buffer[state.start++] = 0
802
+ state.buffer[state.start++] = collectionVersion
803
+ collection11_enc.encode(state, record)
804
+ return state.buffer
805
+ },
806
+ trigger: null,
807
+ reconstruct: collection11_reconstruct,
808
+ reconstructKey: collection11_reconstruct_key,
809
+ indexes: [],
810
+ decodedVersion: 0
811
+ }
812
+
813
+ const collections = [
814
+ collection0,
815
+ collection1,
816
+ collection2,
817
+ collection3,
818
+ collection4,
819
+ collection5,
820
+ collection6,
821
+ collection7,
822
+ collection8,
823
+ collection9,
824
+ collection10,
825
+ collection11
826
+ ]
827
+
828
+ const indexes = [
829
+ ]
830
+
831
+ export default { versions, collections, indexes, resolveCollection, resolveIndex }
832
+
833
+ function resolveCollection (name) {
834
+ switch (name) {
835
+ case '@local/config': return collection0
836
+ case '@local/mesh-session': return collection1
837
+ case '@local/mesh-history': return collection2
838
+ case '@local/device': return collection3
839
+ case '@local/app-config': return collection4
840
+ case '@local/model-download': return collection5
841
+ case '@local/custom-model': return collection6
842
+ case '@local/identity': return collection7
843
+ case '@local/membership': return collection8
844
+ case '@local/chat-notify': return collection9
845
+ case '@local/model-notify': return collection10
846
+ case '@local/mesh-departure': return collection11
847
+ default: return null
848
+ }
849
+ }
850
+
851
+ function resolveIndex (name) {
852
+ switch (name) {
853
+ default: return null
854
+ }
855
+ }