@qvac/core 1.0.0-rc.1 → 1.0.0-rc.3

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 (548) hide show
  1. package/CHANGELOG.md +1008 -1
  2. package/README.md +40 -81
  3. package/dist-lib/index.d.ts +1 -1
  4. package/dist-lib/index.js +1 -1
  5. package/dist-lib/lib/api/agent-folders.d.ts +22 -0
  6. package/dist-lib/lib/api/agent-folders.js +115 -0
  7. package/dist-lib/lib/api/agents.d.ts +19 -2
  8. package/dist-lib/lib/api/agents.js +121 -24
  9. package/dist-lib/lib/api/app-config.d.ts +4 -1
  10. package/dist-lib/lib/api/app-config.js +17 -6
  11. package/dist-lib/lib/api/attachments.js +3 -2
  12. package/dist-lib/lib/api/chat-move.d.ts +4 -0
  13. package/dist-lib/lib/api/chat-move.js +7 -0
  14. package/dist-lib/lib/api/chat.d.ts +13 -2
  15. package/dist-lib/lib/api/chat.js +114 -9
  16. package/dist-lib/lib/api/chunk-delta.d.ts +12 -0
  17. package/dist-lib/lib/api/chunk-delta.js +115 -0
  18. package/dist-lib/lib/api/chunks.d.ts +17 -2
  19. package/dist-lib/lib/api/chunks.js +70 -13
  20. package/dist-lib/lib/api/config.d.ts +6 -2
  21. package/dist-lib/lib/api/config.js +47 -5
  22. package/dist-lib/lib/api/current-mesh.d.ts +13 -5
  23. package/dist-lib/lib/api/current-mesh.js +15 -11
  24. package/dist-lib/lib/api/custom-models.d.ts +7 -1
  25. package/dist-lib/lib/api/custom-models.js +12 -12
  26. package/dist-lib/lib/api/device-routes.d.ts +9 -0
  27. package/dist-lib/lib/api/device-routes.js +123 -0
  28. package/dist-lib/lib/api/devices.d.ts +3 -2
  29. package/dist-lib/lib/api/devices.js +23 -11
  30. package/dist-lib/lib/api/diagnostics.d.ts +2 -1
  31. package/dist-lib/lib/api/diagnostics.js +2 -2
  32. package/dist-lib/lib/api/execution.d.ts +12 -1
  33. package/dist-lib/lib/api/execution.js +44 -14
  34. package/dist-lib/lib/api/files.d.ts +1 -1
  35. package/dist-lib/lib/api/files.js +65 -8
  36. package/dist-lib/lib/api/host-run-log.d.ts +2 -41
  37. package/dist-lib/lib/api/host-run-log.js +35 -83
  38. package/dist-lib/lib/api/index.d.ts +28 -6
  39. package/dist-lib/lib/api/index.js +101 -33
  40. package/dist-lib/lib/api/instrument.d.ts +2 -2
  41. package/dist-lib/lib/api/instrument.js +24 -48
  42. package/dist-lib/lib/api/knowledge.d.ts +4 -1
  43. package/dist-lib/lib/api/knowledge.js +25 -7
  44. package/dist-lib/lib/api/local-files.d.ts +5 -1
  45. package/dist-lib/lib/api/local-files.js +9 -5
  46. package/dist-lib/lib/api/logs.js +3 -3
  47. package/dist-lib/lib/api/members.d.ts +10 -1
  48. package/dist-lib/lib/api/members.js +67 -26
  49. package/dist-lib/lib/api/mesh.d.ts +12 -4
  50. package/dist-lib/lib/api/mesh.js +12 -8
  51. package/dist-lib/lib/api/model-download.d.ts +2 -1
  52. package/dist-lib/lib/api/model-download.js +2 -2
  53. package/dist-lib/lib/api/network.d.ts +10 -2
  54. package/dist-lib/lib/api/network.js +8 -2
  55. package/dist-lib/lib/api/notifications.d.ts +3 -1
  56. package/dist-lib/lib/api/notifications.js +14 -9
  57. package/dist-lib/lib/api/projects.d.ts +20 -0
  58. package/dist-lib/lib/api/projects.js +169 -0
  59. package/dist-lib/lib/api/rag.d.ts +0 -1
  60. package/dist-lib/lib/api/rag.js +71 -34
  61. package/dist-lib/lib/api/served.d.ts +17 -0
  62. package/dist-lib/lib/api/served.js +48 -0
  63. package/dist-lib/lib/api/sync.d.ts +2 -1
  64. package/dist-lib/lib/api/sync.js +2 -2
  65. package/dist-lib/lib/api/tool-activity.d.ts +2 -1
  66. package/dist-lib/lib/api/tool-activity.js +4 -3
  67. package/dist-lib/lib/api/tool-configs.d.ts +2 -1
  68. package/dist-lib/lib/api/tool-configs.js +6 -9
  69. package/dist-lib/lib/api/upload-frames.d.ts +0 -1
  70. package/dist-lib/lib/api/upload-frames.js +0 -1
  71. package/dist-lib/lib/api/watchable.d.ts +3 -2
  72. package/dist-lib/lib/api/watchable.js +2 -3
  73. package/dist-lib/lib/api/workspace.d.ts +5 -0
  74. package/dist-lib/lib/api/workspace.js +47 -0
  75. package/dist-lib/lib/assistant/fake-models.d.ts +20 -0
  76. package/dist-lib/lib/assistant/fake-models.js +112 -0
  77. package/dist-lib/lib/assistant/harness.d.ts +37 -31
  78. package/dist-lib/lib/assistant/harness.js +51 -10
  79. package/dist-lib/lib/assistant/history.d.ts +30 -17
  80. package/dist-lib/lib/assistant/history.js +179 -87
  81. package/dist-lib/lib/assistant/host-run-log.d.ts +6 -1
  82. package/dist-lib/lib/assistant/host-run-log.js +24 -36
  83. package/dist-lib/lib/assistant/message.d.ts +27 -1
  84. package/dist-lib/lib/assistant/message.js +65 -2
  85. package/dist-lib/lib/assistant/model-round.d.ts +100 -0
  86. package/dist-lib/lib/assistant/model-round.js +619 -0
  87. package/dist-lib/lib/assistant/pdf-budget.d.ts +11 -0
  88. package/dist-lib/lib/assistant/pdf-budget.js +12 -0
  89. package/dist-lib/lib/assistant/pdf-pages.d.ts +25 -0
  90. package/dist-lib/lib/assistant/pdf-pages.js +75 -0
  91. package/dist-lib/lib/assistant/round-host.d.ts +42 -0
  92. package/dist-lib/lib/assistant/round-host.js +241 -0
  93. package/dist-lib/lib/assistant/skill-encode.d.ts +2 -1
  94. package/dist-lib/lib/assistant/skill-encode.js +2 -1
  95. package/dist-lib/lib/assistant/video-budget.d.ts +13 -0
  96. package/dist-lib/lib/assistant/video-budget.js +29 -0
  97. package/dist-lib/lib/assistant-client.d.ts +4 -1
  98. package/dist-lib/lib/assistant-client.js +27 -8
  99. package/dist-lib/lib/assistant-tree.d.ts +10 -3
  100. package/dist-lib/lib/assistant-tree.js +63 -20
  101. package/dist-lib/lib/assistant.d.ts +93 -24
  102. package/dist-lib/lib/assistant.js +2048 -1231
  103. package/dist-lib/lib/audio-format.js +1 -1
  104. package/dist-lib/lib/chat-suggestion.d.ts +3 -0
  105. package/dist-lib/lib/chat-suggestion.js +47 -0
  106. package/dist-lib/lib/client.d.ts +2 -2
  107. package/dist-lib/lib/client.js +10 -1
  108. package/dist-lib/lib/compaction.d.ts +3 -1
  109. package/dist-lib/lib/compaction.js +18 -4
  110. package/dist-lib/lib/constants.d.ts +10 -0
  111. package/dist-lib/lib/constants.js +10 -0
  112. package/dist-lib/lib/core/agent-copies.d.ts +9 -0
  113. package/dist-lib/lib/core/agent-copies.js +40 -0
  114. package/dist-lib/lib/core/agent-hosting.d.ts +25 -0
  115. package/dist-lib/lib/core/agent-hosting.js +71 -0
  116. package/dist-lib/lib/core/agent.d.ts +9 -1
  117. package/dist-lib/lib/core/agent.js +45 -19
  118. package/dist-lib/lib/core/archived-mesh.d.ts +11 -6
  119. package/dist-lib/lib/core/archived-mesh.js +77 -58
  120. package/dist-lib/lib/core/async-iterable.js +1 -1
  121. package/dist-lib/lib/core/blind-peers.d.ts +1 -0
  122. package/dist-lib/lib/core/blind-peers.js +1 -0
  123. package/dist-lib/lib/core/chat-activity.d.ts +1 -1
  124. package/dist-lib/lib/core/chat-activity.js +45 -34
  125. package/dist-lib/lib/core/chat-copy.d.ts +42 -0
  126. package/dist-lib/lib/core/chat-copy.js +395 -0
  127. package/dist-lib/lib/core/chat-fork.d.ts +16 -0
  128. package/dist-lib/lib/core/chat-fork.js +246 -0
  129. package/dist-lib/lib/core/chat-group.js +8 -7
  130. package/dist-lib/lib/core/chat-move.d.ts +75 -0
  131. package/dist-lib/lib/core/chat-move.js +598 -0
  132. package/dist-lib/lib/core/chat-order.d.ts +2 -1
  133. package/dist-lib/lib/core/chat-order.js +19 -4
  134. package/dist-lib/lib/core/chat-project.d.ts +2 -0
  135. package/dist-lib/lib/core/chat-project.js +15 -0
  136. package/dist-lib/lib/core/chat-read.d.ts +4 -0
  137. package/dist-lib/lib/core/chat-read.js +49 -0
  138. package/dist-lib/lib/core/chat-search.js +14 -12
  139. package/dist-lib/lib/core/chat.d.ts +33 -4
  140. package/dist-lib/lib/core/chat.js +122 -39
  141. package/dist-lib/lib/core/chunk.d.ts +35 -7
  142. package/dist-lib/lib/core/chunk.js +250 -45
  143. package/dist-lib/lib/core/collections.d.ts +40 -1
  144. package/dist-lib/lib/core/collections.js +40 -1
  145. package/dist-lib/lib/core/config-value.d.ts +6 -0
  146. package/dist-lib/lib/core/config-value.js +14 -0
  147. package/dist-lib/lib/core/contract/activity.d.ts +3 -2
  148. package/dist-lib/lib/core/contract/activity.js +39 -21
  149. package/dist-lib/lib/core/contract/agent-join.d.ts +10 -0
  150. package/dist-lib/lib/core/contract/agent-join.js +104 -0
  151. package/dist-lib/lib/core/contract/agents.d.ts +5 -0
  152. package/dist-lib/lib/core/contract/agents.js +142 -3
  153. package/dist-lib/lib/core/contract/chat.d.ts +4 -0
  154. package/dist-lib/lib/core/contract/chat.js +53 -3
  155. package/dist-lib/lib/core/contract/chunks.d.ts +7 -0
  156. package/dist-lib/lib/core/contract/chunks.js +125 -38
  157. package/dist-lib/lib/core/contract/devices.js +6 -4
  158. package/dist-lib/lib/core/contract/index.d.ts +2 -3
  159. package/dist-lib/lib/core/contract/index.js +36 -11
  160. package/dist-lib/lib/core/contract/indexing.d.ts +1 -0
  161. package/dist-lib/lib/core/contract/indexing.js +51 -7
  162. package/dist-lib/lib/core/contract/invites.d.ts +3 -14
  163. package/dist-lib/lib/core/contract/invites.js +26 -36
  164. package/dist-lib/lib/core/contract/joined-meshes.js +3 -1
  165. package/dist-lib/lib/core/contract/knowledge.d.ts +1 -0
  166. package/dist-lib/lib/core/contract/knowledge.js +57 -6
  167. package/dist-lib/lib/core/contract/members.d.ts +3 -1
  168. package/dist-lib/lib/core/contract/members.js +34 -4
  169. package/dist-lib/lib/core/contract/mesh-kind.d.ts +3 -3
  170. package/dist-lib/lib/core/contract/mesh-kind.js +20 -16
  171. package/dist-lib/lib/core/contract/mesh-name.d.ts +3 -0
  172. package/dist-lib/lib/core/contract/mesh-name.js +31 -0
  173. package/dist-lib/lib/core/contract/mesh-rules.d.ts +8 -0
  174. package/dist-lib/lib/core/contract/mesh-rules.js +35 -0
  175. package/dist-lib/lib/core/contract/mesh-seeds.d.ts +2 -0
  176. package/dist-lib/lib/core/contract/mesh-seeds.js +26 -0
  177. package/dist-lib/lib/core/contract/model-requests.d.ts +26 -0
  178. package/dist-lib/lib/core/contract/model-requests.js +280 -0
  179. package/dist-lib/lib/core/contract/oldest-version.d.ts +9 -0
  180. package/dist-lib/lib/core/contract/oldest-version.js +20 -0
  181. package/dist-lib/lib/core/contract/open-join.d.ts +2 -0
  182. package/dist-lib/lib/core/contract/open-join.js +77 -0
  183. package/dist-lib/lib/core/contract/project-device-keys.d.ts +7 -0
  184. package/dist-lib/lib/core/contract/project-device-keys.js +38 -0
  185. package/dist-lib/lib/core/contract/project-host-keys.d.ts +7 -0
  186. package/dist-lib/lib/core/contract/project-host-keys.js +41 -0
  187. package/dist-lib/lib/core/contract/project-order.d.ts +2 -0
  188. package/dist-lib/lib/core/contract/project-order.js +25 -0
  189. package/dist-lib/lib/core/contract/projects.d.ts +21 -0
  190. package/dist-lib/lib/core/contract/projects.js +327 -0
  191. package/dist-lib/lib/core/contract/public-mesh.d.ts +3 -0
  192. package/dist-lib/lib/core/contract/public-mesh.js +31 -0
  193. package/dist-lib/lib/core/contract/public-seeds.d.ts +9 -0
  194. package/dist-lib/lib/core/contract/public-seeds.js +43 -0
  195. package/dist-lib/lib/core/contract/roles.d.ts +10 -0
  196. package/dist-lib/lib/core/contract/roles.js +121 -0
  197. package/dist-lib/lib/core/contract/run-requests.d.ts +10 -0
  198. package/dist-lib/lib/core/contract/run-requests.js +81 -0
  199. package/dist-lib/lib/core/contract/seed-defaults.d.ts +3 -1
  200. package/dist-lib/lib/core/contract/seed-defaults.js +17 -4
  201. package/dist-lib/lib/core/contract/shipped-rows.d.ts +2 -0
  202. package/dist-lib/lib/core/contract/shipped-rows.js +22 -0
  203. package/dist-lib/lib/core/contract/skill-secrets.d.ts +3 -0
  204. package/dist-lib/lib/core/contract/skill-secrets.js +32 -0
  205. package/dist-lib/lib/core/contract/tool-activity.js +12 -1
  206. package/dist-lib/lib/core/contract/tool-configs.js +2 -1
  207. package/dist-lib/lib/core/contract/types.d.ts +2 -2
  208. package/dist-lib/lib/core/contract/workspace.d.ts +31 -0
  209. package/dist-lib/lib/core/contract/workspace.js +311 -0
  210. package/dist-lib/lib/core/contract/writers.js +100 -16
  211. package/dist-lib/lib/core/departures.d.ts +16 -5
  212. package/dist-lib/lib/core/departures.js +79 -6
  213. package/dist-lib/lib/core/device-control.d.ts +21 -0
  214. package/dist-lib/lib/core/device-control.js +91 -0
  215. package/dist-lib/lib/core/device-seal.d.ts +4 -0
  216. package/dist-lib/lib/core/device-seal.js +22 -0
  217. package/dist-lib/lib/core/devices.d.ts +2 -1
  218. package/dist-lib/lib/core/devices.js +5 -3
  219. package/dist-lib/lib/core/document-attachment.d.ts +10 -0
  220. package/dist-lib/lib/core/document-attachment.js +14 -0
  221. package/dist-lib/lib/core/files/attachments.js +8 -7
  222. package/dist-lib/lib/core/files/index.d.ts +27 -14
  223. package/dist-lib/lib/core/files/index.js +220 -43
  224. package/dist-lib/lib/core/files/knowledge.d.ts +10 -1
  225. package/dist-lib/lib/core/files/knowledge.js +77 -5
  226. package/dist-lib/lib/core/files/preview/index.js +6 -2
  227. package/dist-lib/lib/core/files/processing/claims.d.ts +7 -0
  228. package/dist-lib/lib/core/files/processing/claims.js +33 -7
  229. package/dist-lib/lib/core/files/processing/document.d.ts +8 -0
  230. package/dist-lib/lib/core/files/processing/document.js +26 -2
  231. package/dist-lib/lib/core/files/processing/index.d.ts +8 -3
  232. package/dist-lib/lib/core/files/processing/index.js +99 -73
  233. package/dist-lib/lib/core/files/processing/protocol.d.ts +7 -1
  234. package/dist-lib/lib/core/files/processing/protocol.js +14 -3
  235. package/dist-lib/lib/core/files/processing/source.d.ts +4 -0
  236. package/dist-lib/lib/core/files/processing/source.js +12 -4
  237. package/dist-lib/lib/core/files/processing/state.d.ts +5 -1
  238. package/dist-lib/lib/core/files/processing/state.js +9 -1
  239. package/dist-lib/lib/core/files/rag/build.d.ts +5 -1
  240. package/dist-lib/lib/core/files/rag/build.js +32 -8
  241. package/dist-lib/lib/core/files/rag/failure.d.ts +20 -0
  242. package/dist-lib/lib/core/files/rag/failure.js +57 -0
  243. package/dist-lib/lib/core/files/rag/index.d.ts +13 -2
  244. package/dist-lib/lib/core/files/rag/index.js +30 -8
  245. package/dist-lib/lib/core/files/rag/joined-index.d.ts +6 -0
  246. package/dist-lib/lib/core/files/rag/joined-index.js +35 -0
  247. package/dist-lib/lib/core/files/rag/limits.d.ts +1 -0
  248. package/dist-lib/lib/core/files/rag/limits.js +1 -0
  249. package/dist-lib/lib/core/files/rag/load.js +6 -3
  250. package/dist-lib/lib/core/files/rag/policy.d.ts +10 -1
  251. package/dist-lib/lib/core/files/rag/policy.js +23 -2
  252. package/dist-lib/lib/core/files/rag/produce.d.ts +1 -1
  253. package/dist-lib/lib/core/files/rag/produce.js +31 -18
  254. package/dist-lib/lib/core/files/rag/retrieval/full-text.d.ts +2 -0
  255. package/dist-lib/lib/core/files/rag/retrieval/full-text.js +8 -2
  256. package/dist-lib/lib/core/files/rag/similarity.d.ts +2 -2
  257. package/dist-lib/lib/core/files/rag/similarity.js +2 -3
  258. package/dist-lib/lib/core/files/records/chunks.js +22 -1
  259. package/dist-lib/lib/core/files/records/index.d.ts +1 -1
  260. package/dist-lib/lib/core/files/records/index.js +1 -1
  261. package/dist-lib/lib/core/files/records/knowledge.d.ts +11 -1
  262. package/dist-lib/lib/core/files/records/knowledge.js +40 -3
  263. package/dist-lib/lib/core/files/records/purge.js +13 -8
  264. package/dist-lib/lib/core/files/records/reclaim.js +20 -48
  265. package/dist-lib/lib/core/files/records/routing.d.ts +1 -1
  266. package/dist-lib/lib/core/files/records/routing.js +6 -2
  267. package/dist-lib/lib/core/files/records/source.js +3 -5
  268. package/dist-lib/lib/core/files/records/sweep.d.ts +3 -0
  269. package/dist-lib/lib/core/files/records/sweep.js +9 -3
  270. package/dist-lib/lib/core/files/store/blob.d.ts +2 -0
  271. package/dist-lib/lib/core/files/store/blob.js +2 -2
  272. package/dist-lib/lib/core/files/store/index.d.ts +3 -1
  273. package/dist-lib/lib/core/files/store/index.js +4 -1
  274. package/dist-lib/lib/core/files/store/reference.d.ts +3 -0
  275. package/dist-lib/lib/core/files/store/reference.js +12 -2
  276. package/dist-lib/lib/core/files/store/sweep.js +3 -1
  277. package/dist-lib/lib/core/files/upload.d.ts +5 -1
  278. package/dist-lib/lib/core/files/upload.js +53 -14
  279. package/dist-lib/lib/core/first-event.d.ts +6 -0
  280. package/dist-lib/lib/core/first-event.js +13 -0
  281. package/dist-lib/lib/core/fs-drives.d.ts +6 -3
  282. package/dist-lib/lib/core/fs-drives.js +30 -18
  283. package/dist-lib/lib/core/id.d.ts +1 -0
  284. package/dist-lib/lib/core/id.js +3 -0
  285. package/dist-lib/lib/core/identity.d.ts +3 -1
  286. package/dist-lib/lib/core/identity.js +25 -4
  287. package/dist-lib/lib/core/invite.d.ts +6 -2
  288. package/dist-lib/lib/core/invite.js +22 -8
  289. package/dist-lib/lib/core/local/files.d.ts +2 -1
  290. package/dist-lib/lib/core/local/files.js +5 -7
  291. package/dist-lib/lib/core/local/index.d.ts +86 -7
  292. package/dist-lib/lib/core/local/index.js +312 -27
  293. package/dist-lib/lib/core/local/run-logs.d.ts +38 -0
  294. package/dist-lib/lib/core/local/run-logs.js +132 -0
  295. package/dist-lib/lib/core/member-key.d.ts +7 -0
  296. package/dist-lib/lib/core/member-key.js +24 -0
  297. package/dist-lib/lib/core/membership.d.ts +3 -14
  298. package/dist-lib/lib/core/membership.js +3 -96
  299. package/dist-lib/lib/core/mesh.d.ts +107 -30
  300. package/dist-lib/lib/core/mesh.js +625 -171
  301. package/dist-lib/lib/core/migrations/agent-tools-scope.d.ts +2 -0
  302. package/dist-lib/lib/core/migrations/agent-tools-scope.js +24 -0
  303. package/dist-lib/lib/core/migrations/chat-chunks.d.ts +4 -0
  304. package/dist-lib/lib/core/migrations/chat-chunks.js +47 -0
  305. package/dist-lib/lib/core/migrations/file-index.d.ts +1 -1
  306. package/dist-lib/lib/core/migrations/file-index.js +8 -6
  307. package/dist-lib/lib/core/migrations/index.d.ts +2 -1
  308. package/dist-lib/lib/core/migrations/index.js +69 -8
  309. package/dist-lib/lib/core/model-requests.d.ts +13 -0
  310. package/dist-lib/lib/core/model-requests.js +65 -0
  311. package/dist-lib/lib/core/next-frame.js +2 -1
  312. package/dist-lib/lib/core/notification.js +100 -25
  313. package/dist-lib/lib/core/pdf/figure.d.ts +22 -0
  314. package/dist-lib/lib/core/pdf/figure.js +64 -0
  315. package/dist-lib/lib/core/pdf/rasterize.d.ts +12 -3
  316. package/dist-lib/lib/core/pdf/rasterize.js +77 -28
  317. package/dist-lib/lib/core/peer-duplex.d.ts +34 -0
  318. package/dist-lib/lib/core/{harness-loan.js → peer-duplex.js} +104 -45
  319. package/dist-lib/lib/core/project-keys.d.ts +13 -0
  320. package/dist-lib/lib/core/project-keys.js +56 -0
  321. package/dist-lib/lib/core/prompt-history.js +4 -4
  322. package/dist-lib/lib/core/protocol-pairing.d.ts +11 -0
  323. package/dist-lib/lib/core/protocol-pairing.js +22 -0
  324. package/dist-lib/lib/core/public-mesh.d.ts +26 -0
  325. package/dist-lib/lib/core/public-mesh.js +94 -0
  326. package/dist-lib/lib/core/purge.d.ts +3 -0
  327. package/dist-lib/lib/core/purge.js +7 -0
  328. package/dist-lib/lib/core/run-driver.d.ts +17 -0
  329. package/dist-lib/lib/core/run-driver.js +20 -0
  330. package/dist-lib/lib/core/run-requests.d.ts +11 -0
  331. package/dist-lib/lib/core/run-requests.js +58 -0
  332. package/dist-lib/lib/core/send.d.ts +2 -0
  333. package/dist-lib/lib/core/send.js +17 -4
  334. package/dist-lib/lib/core/senders.d.ts +19 -0
  335. package/dist-lib/lib/core/senders.js +45 -0
  336. package/dist-lib/lib/core/shared-agents.d.ts +40 -0
  337. package/dist-lib/lib/core/shared-agents.js +283 -0
  338. package/dist-lib/lib/core/skill-secrets.d.ts +10 -16
  339. package/dist-lib/lib/core/skill-secrets.js +90 -72
  340. package/dist-lib/lib/core/sync/background.d.ts +35 -0
  341. package/dist-lib/lib/core/sync/background.js +85 -0
  342. package/dist-lib/lib/core/sync/changed.d.ts +20 -0
  343. package/dist-lib/lib/core/sync/changed.js +7 -0
  344. package/dist-lib/lib/core/sync/devices.js +6 -3
  345. package/dist-lib/lib/core/sync/files.d.ts +1 -0
  346. package/dist-lib/lib/core/sync/files.js +50 -72
  347. package/dist-lib/lib/core/sync/index.d.ts +1 -1
  348. package/dist-lib/lib/core/sync/index.js +164 -81
  349. package/dist-lib/lib/core/sync/view-updates.d.ts +33 -0
  350. package/dist-lib/lib/core/sync/view-updates.js +133 -0
  351. package/dist-lib/lib/core/sync-status.js +3 -3
  352. package/dist-lib/lib/core/system-info.d.ts +2 -2
  353. package/dist-lib/lib/core/system-info.js +10 -11
  354. package/dist-lib/lib/core/tool-configs.d.ts +5 -3
  355. package/dist-lib/lib/core/tool-configs.js +11 -11
  356. package/dist-lib/lib/core/transcript-visibility.d.ts +5 -5
  357. package/dist-lib/lib/core/transcript-visibility.js +27 -31
  358. package/dist-lib/lib/core/upgrade-agents.d.ts +11 -0
  359. package/dist-lib/lib/core/upgrade-agents.js +78 -0
  360. package/dist-lib/lib/core/video/attachment.d.ts +1 -0
  361. package/dist-lib/lib/core/video/attachment.js +7 -0
  362. package/dist-lib/lib/core/video/digest.d.ts +16 -0
  363. package/dist-lib/lib/core/video/digest.js +57 -0
  364. package/dist-lib/lib/core/video/frames.d.ts +32 -0
  365. package/dist-lib/lib/core/video/frames.js +224 -0
  366. package/dist-lib/lib/core/workspace-upgrade.d.ts +22 -0
  367. package/dist-lib/lib/core/workspace-upgrade.js +50 -0
  368. package/dist-lib/lib/core.d.ts +303 -84
  369. package/dist-lib/lib/core.js +3952 -1511
  370. package/dist-lib/lib/credential-pusher.d.ts +17 -7
  371. package/dist-lib/lib/credential-pusher.js +111 -62
  372. package/dist-lib/lib/custom-model-pusher.d.ts +2 -4
  373. package/dist-lib/lib/custom-model-task.d.ts +2 -1
  374. package/dist-lib/lib/custom-model-task.js +2 -2
  375. package/dist-lib/lib/device-tree.d.ts +18 -0
  376. package/dist-lib/lib/device-tree.js +32 -0
  377. package/dist-lib/lib/diagnostics.d.ts +7 -0
  378. package/dist-lib/lib/diagnostics.js +22 -0
  379. package/dist-lib/lib/doctor/checks.d.ts +15 -0
  380. package/dist-lib/lib/doctor/checks.js +272 -0
  381. package/dist-lib/lib/doctor/redact.d.ts +4 -0
  382. package/dist-lib/lib/doctor/redact.js +31 -0
  383. package/dist-lib/lib/doctor/render.d.ts +8 -0
  384. package/dist-lib/lib/doctor/render.js +83 -0
  385. package/dist-lib/lib/doctor/tree.d.ts +5 -0
  386. package/dist-lib/lib/doctor/tree.js +167 -0
  387. package/dist-lib/lib/downloads-allowed-pusher.d.ts +8 -0
  388. package/dist-lib/lib/downloads-allowed-pusher.js +37 -0
  389. package/dist-lib/lib/errors.d.ts +794 -0
  390. package/dist-lib/lib/errors.js +728 -0
  391. package/dist-lib/lib/fs-drive-bridge.d.ts +8 -1
  392. package/dist-lib/lib/fs-drive-bridge.js +312 -31
  393. package/dist-lib/lib/guards.d.ts +1 -0
  394. package/dist-lib/lib/guards.js +4 -0
  395. package/dist-lib/lib/inference-calls.d.ts +1 -2
  396. package/dist-lib/lib/inference-calls.js +2 -10
  397. package/dist-lib/lib/integrations/setup-routes.js +7 -5
  398. package/dist-lib/lib/knowledge-search.d.ts +1 -1
  399. package/dist-lib/lib/knowledge-search.js +5 -51
  400. package/dist-lib/lib/kv-cache-reclaim.d.ts +2 -1
  401. package/dist-lib/lib/kv-cache-reclaim.js +30 -0
  402. package/dist-lib/lib/kv-cache-retention.d.ts +35 -0
  403. package/dist-lib/lib/kv-cache-retention.js +98 -0
  404. package/dist-lib/lib/latest-frame.d.ts +10 -0
  405. package/dist-lib/lib/latest-frame.js +48 -0
  406. package/dist-lib/lib/log.d.ts +7 -6
  407. package/dist-lib/lib/log.js +14 -7
  408. package/dist-lib/lib/logger-type.d.ts +2 -5
  409. package/dist-lib/lib/mesh-scoped-engine.js +42 -2
  410. package/dist-lib/lib/model-download-status.d.ts +3 -3
  411. package/dist-lib/lib/model-download.d.ts +16 -12
  412. package/dist-lib/lib/model-download.js +90 -34
  413. package/dist-lib/lib/model-idle-pusher.d.ts +2 -4
  414. package/dist-lib/lib/model-memory-cap.d.ts +27 -0
  415. package/dist-lib/lib/model-memory-cap.js +69 -0
  416. package/dist-lib/lib/models-watch.d.ts +1 -1
  417. package/dist-lib/lib/models-watch.js +4 -4
  418. package/dist-lib/lib/oauth/browser-connect.js +3 -2
  419. package/dist-lib/lib/oauth/flow-core.js +5 -3
  420. package/dist-lib/lib/oauth/flow.js +1 -1
  421. package/dist-lib/lib/oauth/loopback.d.ts +1 -0
  422. package/dist-lib/lib/oauth/loopback.js +57 -12
  423. package/dist-lib/lib/oauth/providers.js +4 -2
  424. package/dist-lib/lib/oauth/redirect-types.d.ts +1 -0
  425. package/dist-lib/lib/oauth/register.js +35 -19
  426. package/dist-lib/lib/oauth/request.d.ts +10 -0
  427. package/dist-lib/lib/oauth/request.js +22 -0
  428. package/dist-lib/lib/oauth/resolve.js +13 -5
  429. package/dist-lib/lib/oauth/token-exchange-core.js +31 -33
  430. package/dist-lib/lib/oauth/types.d.ts +3 -0
  431. package/dist-lib/lib/oauth.d.ts +2 -1
  432. package/dist-lib/lib/oauth.js +1 -0
  433. package/dist-lib/lib/persistent-dir.d.ts +1 -0
  434. package/dist-lib/lib/persistent-dir.js +9 -0
  435. package/dist-lib/lib/probe-rounds.d.ts +3 -0
  436. package/dist-lib/lib/probe-rounds.js +5 -0
  437. package/dist-lib/lib/reconnecting-watch.js +19 -11
  438. package/dist-lib/lib/run-input.d.ts +14 -0
  439. package/dist-lib/lib/run-input.js +33 -0
  440. package/dist-lib/lib/run-notices.d.ts +5 -0
  441. package/dist-lib/lib/run-notices.js +13 -2
  442. package/dist-lib/lib/run-replay.d.ts +44 -0
  443. package/dist-lib/lib/run-replay.js +158 -0
  444. package/dist-lib/lib/run-transcript.d.ts +11 -12
  445. package/dist-lib/lib/run-transcript.js +16 -18
  446. package/dist-lib/lib/suspend-lifecycle.js +15 -5
  447. package/dist-lib/lib/task.js +6 -4
  448. package/dist-lib/lib/test-env.d.ts +1 -0
  449. package/dist-lib/lib/test-env.js +4 -0
  450. package/dist-lib/schema/build.js +66 -55
  451. package/dist-lib/schema/config.d.ts +1 -1
  452. package/dist-lib/schema/config.js +1 -1
  453. package/dist-lib/schema/content.d.ts +5 -1
  454. package/dist-lib/schema/content.js +60 -12
  455. package/dist-lib/schema/engine.d.ts +1 -0
  456. package/dist-lib/schema/engine.js +780 -155
  457. package/dist-lib/schema/field-order.js +8 -1
  458. package/dist-lib/schema/indexes.d.ts +7 -0
  459. package/dist-lib/schema/indexes.js +48 -3
  460. package/dist-lib/schema/local.js +80 -5
  461. package/dist-lib/schema/qvac.d.ts +4 -1
  462. package/dist-lib/schema/qvac.js +474 -14
  463. package/dist-lib/spec/bind.js +212 -48
  464. package/dist-lib/spec/calls.js +46 -5
  465. package/dist-lib/spec/capabilities.d.ts +100 -18
  466. package/dist-lib/spec/config/hyperconf/index.js +1 -1
  467. package/dist-lib/spec/hrpc/hrpc.json +739 -206
  468. package/dist-lib/spec/hrpc/index.js +844 -345
  469. package/dist-lib/spec/hrpc/messages.js +3906 -1749
  470. package/dist-lib/spec/hyperschema/index.js +3906 -1749
  471. package/dist-lib/spec/hyperschema/schema.json +4809 -3119
  472. package/dist-lib/spec/hyperschema/types.d.ts +482 -62
  473. package/dist-lib/spec/local/hyperdb/db.json +95 -1
  474. package/dist-lib/spec/local/hyperdb/index.js +459 -2
  475. package/dist-lib/spec/local/hyperdb/messages.js +1565 -487
  476. package/dist-lib/spec/local/hyperschema/index.js +573 -16
  477. package/dist-lib/spec/local/hyperschema/schema.json +354 -1
  478. package/dist-lib/spec/local/hyperschema/types.d.ts +85 -2
  479. package/dist-lib/spec/mesh/hyperdb/db.json +577 -7
  480. package/dist-lib/spec/mesh/hyperdb/index.js +2224 -6
  481. package/dist-lib/spec/mesh/hyperdb/messages.js +6476 -1266
  482. package/dist-lib/spec/mesh/hyperdispatch/dispatch.json +193 -1
  483. package/dist-lib/spec/mesh/hyperdispatch/index.js +545 -1
  484. package/dist-lib/spec/mesh/hyperdispatch/messages.js +3655 -265
  485. package/dist-lib/spec/mesh/hyperschema/index.js +3655 -265
  486. package/dist-lib/spec/mesh/hyperschema/schema.json +1974 -19
  487. package/dist-lib/spec/mesh/hyperschema/types.d.ts +498 -6
  488. package/package.json +64 -43
  489. package/worker/assistant-sidecar.mjs +18 -2
  490. package/worker/stow-entry.mjs +2 -0
  491. package/dist-lib/lib/core/contract/compute.d.ts +0 -11
  492. package/dist-lib/lib/core/contract/compute.js +0 -48
  493. package/dist-lib/lib/core/device-invites.d.ts +0 -11
  494. package/dist-lib/lib/core/device-invites.js +0 -63
  495. package/dist-lib/lib/core/files/processing/settle.d.ts +0 -13
  496. package/dist-lib/lib/core/files/processing/settle.js +0 -86
  497. package/dist-lib/lib/core/grant-expiry.d.ts +0 -11
  498. package/dist-lib/lib/core/grant-expiry.js +0 -66
  499. package/dist-lib/lib/core/handoff-channel.d.ts +0 -47
  500. package/dist-lib/lib/core/handoff-channel.js +0 -123
  501. package/dist-lib/lib/core/harness-loan.d.ts +0 -29
  502. package/dist-lib/lib/core/host-run-log-store.d.ts +0 -114
  503. package/dist-lib/lib/core/host-run-log-store.js +0 -976
  504. package/dist-lib/lib/core/hosted-agents.d.ts +0 -38
  505. package/dist-lib/lib/core/hosted-agents.js +0 -140
  506. package/dist-lib/lib/core/inference-calls-handoff.d.ts +0 -20
  507. package/dist-lib/lib/core/inference-calls-handoff.js +0 -37
  508. package/dist-lib/lib/core/inference-calls-receiver.d.ts +0 -14
  509. package/dist-lib/lib/core/inference-calls-receiver.js +0 -42
  510. package/dist-lib/lib/core/mesh-seed-handoff.d.ts +0 -25
  511. package/dist-lib/lib/core/mesh-seed-handoff.js +0 -52
  512. package/dist-lib/lib/core/migrations/device-indexes.d.ts +0 -2
  513. package/dist-lib/lib/core/migrations/device-indexes.js +0 -7
  514. package/dist-lib/lib/core/secret-handoff.d.ts +0 -17
  515. package/dist-lib/lib/core/secret-handoff.js +0 -29
  516. package/dist-lib/lib/core/skill-overlay-handoff.d.ts +0 -25
  517. package/dist-lib/lib/core/skill-overlay-handoff.js +0 -50
  518. package/dist-lib/lib/core/skill-overlay-receiver.d.ts +0 -8
  519. package/dist-lib/lib/core/skill-overlay-receiver.js +0 -23
  520. package/dist-lib/lib/image-cache-dir.d.ts +0 -1
  521. package/dist-lib/lib/image-cache-dir.js +0 -5
  522. package/dist-lib/lib/log-levels.d.ts +0 -7
  523. package/dist-lib/lib/log-levels.js +0 -1
  524. package/dist-lib/lib/logger.d.ts +0 -5
  525. package/dist-lib/lib/logger.js +0 -18
  526. package/dist-lib/lib/oauth/loopback.stub.d.ts +0 -3
  527. package/dist-lib/lib/oauth/loopback.stub.js +0 -6
  528. package/tui/README.md +0 -142
  529. package/tui/app.mjs +0 -6939
  530. package/tui/boot.mjs +0 -111
  531. package/tui/index.mjs +0 -53
  532. package/tui/lib/boot-timing.mjs +0 -41
  533. package/tui/lib/busy-words.mjs +0 -116
  534. package/tui/lib/export.mjs +0 -194
  535. package/tui/lib/knowledge-command.mjs +0 -190
  536. package/tui/lib/knowledge-import.mjs +0 -171
  537. package/tui/lib/render.mjs +0 -196
  538. package/tui/lib/save-file.mjs +0 -88
  539. package/tui/lib/select.mjs +0 -81
  540. package/tui/lib/selection.mjs +0 -18
  541. package/tui/lib/setup.mjs +0 -101
  542. package/tui/lib/sidebar.mjs +0 -63
  543. package/tui/lib/splash-art.mjs +0 -107
  544. package/tui/lib/splash.mjs +0 -18
  545. package/tui/lib/upload-frames.mjs +0 -9
  546. package/tui/lib/usage.mjs +0 -59
  547. package/tui/lib/wrap.mjs +0 -143
  548. package/tui/main.mjs +0 -264
@@ -4,7 +4,7 @@
4
4
  import { IndexEncoder, c, b4a } from 'hyperdb/runtime'
5
5
  import { version, getEncoding, setVersion } from './messages.js'
6
6
 
7
- const versions = { schema: version, db: 8 }
7
+ const versions = { schema: version, db: 12 }
8
8
 
9
9
  import * as helpers0 from '../../../schema/indexes.js'
10
10
 
@@ -45,7 +45,7 @@ function collection0_reconstruct_key (keyBuf) {
45
45
  const collection0 = {
46
46
  name: '@qvac/chunks',
47
47
  id: 0,
48
- version: 2,
48
+ version: 12,
49
49
  encodeKey (record) {
50
50
  const key = [record.id]
51
51
  return collection0_key.encode(key)
@@ -380,7 +380,7 @@ function collection5_reconstruct_key (keyBuf) {
380
380
  const collection5 = {
381
381
  name: '@qvac/devices',
382
382
  id: 5,
383
- version: 7,
383
+ version: 12,
384
384
  encodeKey (record) {
385
385
  const key = [record.id]
386
386
  return collection5_key.encode(key)
@@ -514,7 +514,7 @@ function collection7_reconstruct_key (keyBuf) {
514
514
  const collection7 = {
515
515
  name: '@qvac/knowledge',
516
516
  id: 7,
517
- version: 1,
517
+ version: 12,
518
518
  encodeKey (record) {
519
519
  const key = [record.id]
520
520
  return collection7_key.encode(key)
@@ -2938,6 +2938,2156 @@ const collection48 = {
2938
2938
  decodedVersion: 0
2939
2939
  }
2940
2940
 
2941
+ // '@qvac/mesh-names' collection key
2942
+ const collection49_key = new IndexEncoder([
2943
+ IndexEncoder.STRING
2944
+ ], { prefix: 49 })
2945
+
2946
+ function collection49_indexify (record) {
2947
+ const a = record.id
2948
+ return a === undefined ? [] : [a]
2949
+ }
2950
+
2951
+ // '@qvac/mesh-names' value encoding
2952
+ const collection49_enc = getEncoding('@qvac/mesh-name/hyperdb#49')
2953
+
2954
+ // '@qvac/mesh-names' reconstruction function
2955
+ function collection49_reconstruct (schemaVersion, keyBuf, valueBuf) {
2956
+ const key = collection49_key.decode(keyBuf)
2957
+ setVersion(schemaVersion)
2958
+ const state = { start: 0, end: valueBuf.byteLength, buffer: valueBuf }
2959
+ const type = c.uint.decode(state)
2960
+ if (type !== 0) throw new Error('Unknown collection type: ' + type)
2961
+ collection49.decodedVersion = c.uint.decode(state)
2962
+ const record = collection49_enc.decode(state)
2963
+ record.id = key[0]
2964
+ return record
2965
+ }
2966
+ // '@qvac/mesh-names' key reconstruction function
2967
+ function collection49_reconstruct_key (keyBuf) {
2968
+ const key = collection49_key.decode(keyBuf)
2969
+ return {
2970
+ id: key[0]
2971
+ }
2972
+ }
2973
+
2974
+ // '@qvac/mesh-names'
2975
+ const collection49 = {
2976
+ name: '@qvac/mesh-names',
2977
+ id: 49,
2978
+ version: 9,
2979
+ encodeKey (record) {
2980
+ const key = [record.id]
2981
+ return collection49_key.encode(key)
2982
+ },
2983
+ encodeKeyRange ({ gt, lt, gte, lte } = {}) {
2984
+ return collection49_key.encodeRange({
2985
+ gt: gt ? collection49_indexify(gt) : null,
2986
+ lt: lt ? collection49_indexify(lt) : null,
2987
+ gte: gte ? collection49_indexify(gte) : null,
2988
+ lte: lte ? collection49_indexify(lte) : null
2989
+ })
2990
+ },
2991
+ encodeValue (schemaVersion, collectionVersion, record) {
2992
+ setVersion(schemaVersion)
2993
+ const state = { start: 0, end: 2, buffer: null }
2994
+ collection49_enc.preencode(state, record)
2995
+ state.buffer = b4a.allocUnsafe(state.end)
2996
+ state.buffer[state.start++] = 0
2997
+ state.buffer[state.start++] = collectionVersion
2998
+ collection49_enc.encode(state, record)
2999
+ return state.buffer
3000
+ },
3001
+ trigger: null,
3002
+ reconstruct: collection49_reconstruct,
3003
+ reconstructKey: collection49_reconstruct_key,
3004
+ indexes: [],
3005
+ decodedVersion: 0
3006
+ }
3007
+
3008
+ // '@qvac/mesh-seeds' collection key
3009
+ const collection50_key = new IndexEncoder([
3010
+ IndexEncoder.BUFFER
3011
+ ], { prefix: 50 })
3012
+
3013
+ function collection50_indexify (record) {
3014
+ const a = record.meshKey
3015
+ return a === undefined ? [] : [a]
3016
+ }
3017
+
3018
+ // '@qvac/mesh-seeds' value encoding
3019
+ const collection50_enc = getEncoding('@qvac/mesh-seed/hyperdb#50')
3020
+
3021
+ // '@qvac/mesh-seeds' reconstruction function
3022
+ function collection50_reconstruct (schemaVersion, keyBuf, valueBuf) {
3023
+ const key = collection50_key.decode(keyBuf)
3024
+ setVersion(schemaVersion)
3025
+ const state = { start: 0, end: valueBuf.byteLength, buffer: valueBuf }
3026
+ const type = c.uint.decode(state)
3027
+ if (type !== 0) throw new Error('Unknown collection type: ' + type)
3028
+ collection50.decodedVersion = c.uint.decode(state)
3029
+ const record = collection50_enc.decode(state)
3030
+ record.meshKey = key[0]
3031
+ return record
3032
+ }
3033
+ // '@qvac/mesh-seeds' key reconstruction function
3034
+ function collection50_reconstruct_key (keyBuf) {
3035
+ const key = collection50_key.decode(keyBuf)
3036
+ return {
3037
+ meshKey: key[0]
3038
+ }
3039
+ }
3040
+
3041
+ // '@qvac/mesh-seeds'
3042
+ const collection50 = {
3043
+ name: '@qvac/mesh-seeds',
3044
+ id: 50,
3045
+ version: 10,
3046
+ encodeKey (record) {
3047
+ const key = [record.meshKey]
3048
+ return collection50_key.encode(key)
3049
+ },
3050
+ encodeKeyRange ({ gt, lt, gte, lte } = {}) {
3051
+ return collection50_key.encodeRange({
3052
+ gt: gt ? collection50_indexify(gt) : null,
3053
+ lt: lt ? collection50_indexify(lt) : null,
3054
+ gte: gte ? collection50_indexify(gte) : null,
3055
+ lte: lte ? collection50_indexify(lte) : null
3056
+ })
3057
+ },
3058
+ encodeValue (schemaVersion, collectionVersion, record) {
3059
+ setVersion(schemaVersion)
3060
+ const state = { start: 0, end: 2, buffer: null }
3061
+ collection50_enc.preencode(state, record)
3062
+ state.buffer = b4a.allocUnsafe(state.end)
3063
+ state.buffer[state.start++] = 0
3064
+ state.buffer[state.start++] = collectionVersion
3065
+ collection50_enc.encode(state, record)
3066
+ return state.buffer
3067
+ },
3068
+ trigger: null,
3069
+ reconstruct: collection50_reconstruct,
3070
+ reconstructKey: collection50_reconstruct_key,
3071
+ indexes: [],
3072
+ decodedVersion: 0
3073
+ }
3074
+
3075
+ // '@qvac/chat-chunks' collection key
3076
+ const collection51_key = new IndexEncoder([
3077
+ IndexEncoder.STRING,
3078
+ IndexEncoder.UINT
3079
+ ], { prefix: 51 })
3080
+
3081
+ function collection51_indexify (record) {
3082
+ const arr = []
3083
+
3084
+ const a0 = record.chatId
3085
+ if (a0 === undefined) return arr
3086
+ arr.push(a0)
3087
+
3088
+ const a1 = record.seq
3089
+ if (a1 === undefined) return arr
3090
+ arr.push(a1)
3091
+
3092
+ return arr
3093
+ }
3094
+
3095
+ // '@qvac/chat-chunks' value encoding
3096
+ const collection51_enc = getEncoding('@qvac/chunk/hyperdb#51')
3097
+
3098
+ // '@qvac/chat-chunks' reconstruction function
3099
+ function collection51_reconstruct (schemaVersion, keyBuf, valueBuf) {
3100
+ const key = collection51_key.decode(keyBuf)
3101
+ setVersion(schemaVersion)
3102
+ const state = { start: 0, end: valueBuf.byteLength, buffer: valueBuf }
3103
+ const type = c.uint.decode(state)
3104
+ if (type !== 0) throw new Error('Unknown collection type: ' + type)
3105
+ collection51.decodedVersion = c.uint.decode(state)
3106
+ const record = collection51_enc.decode(state)
3107
+ record.chatId = key[0]
3108
+ record.seq = key[1]
3109
+ return record
3110
+ }
3111
+ // '@qvac/chat-chunks' key reconstruction function
3112
+ function collection51_reconstruct_key (keyBuf) {
3113
+ const key = collection51_key.decode(keyBuf)
3114
+ return {
3115
+ chatId: key[0],
3116
+ seq: key[1]
3117
+ }
3118
+ }
3119
+
3120
+ // '@qvac/chat-chunks'
3121
+ const collection51 = {
3122
+ name: '@qvac/chat-chunks',
3123
+ id: 51,
3124
+ version: 11,
3125
+ encodeKey (record) {
3126
+ const key = [record.chatId, record.seq]
3127
+ return collection51_key.encode(key)
3128
+ },
3129
+ encodeKeyRange ({ gt, lt, gte, lte } = {}) {
3130
+ return collection51_key.encodeRange({
3131
+ gt: gt ? collection51_indexify(gt) : null,
3132
+ lt: lt ? collection51_indexify(lt) : null,
3133
+ gte: gte ? collection51_indexify(gte) : null,
3134
+ lte: lte ? collection51_indexify(lte) : null
3135
+ })
3136
+ },
3137
+ encodeValue (schemaVersion, collectionVersion, record) {
3138
+ setVersion(schemaVersion)
3139
+ const state = { start: 0, end: 2, buffer: null }
3140
+ collection51_enc.preencode(state, record)
3141
+ state.buffer = b4a.allocUnsafe(state.end)
3142
+ state.buffer[state.start++] = 0
3143
+ state.buffer[state.start++] = collectionVersion
3144
+ collection51_enc.encode(state, record)
3145
+ return state.buffer
3146
+ },
3147
+ trigger: null,
3148
+ reconstruct: collection51_reconstruct,
3149
+ reconstructKey: collection51_reconstruct_key,
3150
+ indexes: [],
3151
+ decodedVersion: 0
3152
+ }
3153
+
3154
+ // '@qvac/mesh-rules' collection key
3155
+ const collection52_key = new IndexEncoder([
3156
+ IndexEncoder.STRING
3157
+ ], { prefix: 52 })
3158
+
3159
+ function collection52_indexify (record) {
3160
+ const a = record.id
3161
+ return a === undefined ? [] : [a]
3162
+ }
3163
+
3164
+ // '@qvac/mesh-rules' value encoding
3165
+ const collection52_enc = getEncoding('@qvac/mesh-rules/hyperdb#52')
3166
+
3167
+ // '@qvac/mesh-rules' reconstruction function
3168
+ function collection52_reconstruct (schemaVersion, keyBuf, valueBuf) {
3169
+ const key = collection52_key.decode(keyBuf)
3170
+ setVersion(schemaVersion)
3171
+ const state = { start: 0, end: valueBuf.byteLength, buffer: valueBuf }
3172
+ const type = c.uint.decode(state)
3173
+ if (type !== 0) throw new Error('Unknown collection type: ' + type)
3174
+ collection52.decodedVersion = c.uint.decode(state)
3175
+ const record = collection52_enc.decode(state)
3176
+ record.id = key[0]
3177
+ return record
3178
+ }
3179
+ // '@qvac/mesh-rules' key reconstruction function
3180
+ function collection52_reconstruct_key (keyBuf) {
3181
+ const key = collection52_key.decode(keyBuf)
3182
+ return {
3183
+ id: key[0]
3184
+ }
3185
+ }
3186
+
3187
+ // '@qvac/mesh-rules'
3188
+ const collection52 = {
3189
+ name: '@qvac/mesh-rules',
3190
+ id: 52,
3191
+ version: 12,
3192
+ encodeKey (record) {
3193
+ const key = [record.id]
3194
+ return collection52_key.encode(key)
3195
+ },
3196
+ encodeKeyRange ({ gt, lt, gte, lte } = {}) {
3197
+ return collection52_key.encodeRange({
3198
+ gt: gt ? collection52_indexify(gt) : null,
3199
+ lt: lt ? collection52_indexify(lt) : null,
3200
+ gte: gte ? collection52_indexify(gte) : null,
3201
+ lte: lte ? collection52_indexify(lte) : null
3202
+ })
3203
+ },
3204
+ encodeValue (schemaVersion, collectionVersion, record) {
3205
+ setVersion(schemaVersion)
3206
+ const state = { start: 0, end: 2, buffer: null }
3207
+ collection52_enc.preencode(state, record)
3208
+ state.buffer = b4a.allocUnsafe(state.end)
3209
+ state.buffer[state.start++] = 0
3210
+ state.buffer[state.start++] = collectionVersion
3211
+ collection52_enc.encode(state, record)
3212
+ return state.buffer
3213
+ },
3214
+ trigger: null,
3215
+ reconstruct: collection52_reconstruct,
3216
+ reconstructKey: collection52_reconstruct_key,
3217
+ indexes: [],
3218
+ decodedVersion: 0
3219
+ }
3220
+
3221
+ // '@qvac/public-meshes' collection key
3222
+ const collection53_key = new IndexEncoder([
3223
+ IndexEncoder.STRING
3224
+ ], { prefix: 53 })
3225
+
3226
+ function collection53_indexify (record) {
3227
+ const a = record.id
3228
+ return a === undefined ? [] : [a]
3229
+ }
3230
+
3231
+ // '@qvac/public-meshes' value encoding
3232
+ const collection53_enc = getEncoding('@qvac/public-mesh/hyperdb#53')
3233
+
3234
+ // '@qvac/public-meshes' reconstruction function
3235
+ function collection53_reconstruct (schemaVersion, keyBuf, valueBuf) {
3236
+ const key = collection53_key.decode(keyBuf)
3237
+ setVersion(schemaVersion)
3238
+ const state = { start: 0, end: valueBuf.byteLength, buffer: valueBuf }
3239
+ const type = c.uint.decode(state)
3240
+ if (type !== 0) throw new Error('Unknown collection type: ' + type)
3241
+ collection53.decodedVersion = c.uint.decode(state)
3242
+ const record = collection53_enc.decode(state)
3243
+ record.id = key[0]
3244
+ return record
3245
+ }
3246
+ // '@qvac/public-meshes' key reconstruction function
3247
+ function collection53_reconstruct_key (keyBuf) {
3248
+ const key = collection53_key.decode(keyBuf)
3249
+ return {
3250
+ id: key[0]
3251
+ }
3252
+ }
3253
+
3254
+ // '@qvac/public-meshes'
3255
+ const collection53 = {
3256
+ name: '@qvac/public-meshes',
3257
+ id: 53,
3258
+ version: 12,
3259
+ encodeKey (record) {
3260
+ const key = [record.id]
3261
+ return collection53_key.encode(key)
3262
+ },
3263
+ encodeKeyRange ({ gt, lt, gte, lte } = {}) {
3264
+ return collection53_key.encodeRange({
3265
+ gt: gt ? collection53_indexify(gt) : null,
3266
+ lt: lt ? collection53_indexify(lt) : null,
3267
+ gte: gte ? collection53_indexify(gte) : null,
3268
+ lte: lte ? collection53_indexify(lte) : null
3269
+ })
3270
+ },
3271
+ encodeValue (schemaVersion, collectionVersion, record) {
3272
+ setVersion(schemaVersion)
3273
+ const state = { start: 0, end: 2, buffer: null }
3274
+ collection53_enc.preencode(state, record)
3275
+ state.buffer = b4a.allocUnsafe(state.end)
3276
+ state.buffer[state.start++] = 0
3277
+ state.buffer[state.start++] = collectionVersion
3278
+ collection53_enc.encode(state, record)
3279
+ return state.buffer
3280
+ },
3281
+ trigger: null,
3282
+ reconstruct: collection53_reconstruct,
3283
+ reconstructKey: collection53_reconstruct_key,
3284
+ indexes: [],
3285
+ decodedVersion: 0
3286
+ }
3287
+
3288
+ // '@qvac/workspace' collection key
3289
+ const collection54_key = new IndexEncoder([
3290
+ IndexEncoder.STRING
3291
+ ], { prefix: 54 })
3292
+
3293
+ function collection54_indexify (record) {
3294
+ const a = record.id
3295
+ return a === undefined ? [] : [a]
3296
+ }
3297
+
3298
+ // '@qvac/workspace' value encoding
3299
+ const collection54_enc = getEncoding('@qvac/workspace/hyperdb#54')
3300
+
3301
+ // '@qvac/workspace' reconstruction function
3302
+ function collection54_reconstruct (schemaVersion, keyBuf, valueBuf) {
3303
+ const key = collection54_key.decode(keyBuf)
3304
+ setVersion(schemaVersion)
3305
+ const state = { start: 0, end: valueBuf.byteLength, buffer: valueBuf }
3306
+ const type = c.uint.decode(state)
3307
+ if (type !== 0) throw new Error('Unknown collection type: ' + type)
3308
+ collection54.decodedVersion = c.uint.decode(state)
3309
+ const record = collection54_enc.decode(state)
3310
+ record.id = key[0]
3311
+ return record
3312
+ }
3313
+ // '@qvac/workspace' key reconstruction function
3314
+ function collection54_reconstruct_key (keyBuf) {
3315
+ const key = collection54_key.decode(keyBuf)
3316
+ return {
3317
+ id: key[0]
3318
+ }
3319
+ }
3320
+
3321
+ // '@qvac/workspace'
3322
+ const collection54 = {
3323
+ name: '@qvac/workspace',
3324
+ id: 54,
3325
+ version: 12,
3326
+ encodeKey (record) {
3327
+ const key = [record.id]
3328
+ return collection54_key.encode(key)
3329
+ },
3330
+ encodeKeyRange ({ gt, lt, gte, lte } = {}) {
3331
+ return collection54_key.encodeRange({
3332
+ gt: gt ? collection54_indexify(gt) : null,
3333
+ lt: lt ? collection54_indexify(lt) : null,
3334
+ gte: gte ? collection54_indexify(gte) : null,
3335
+ lte: lte ? collection54_indexify(lte) : null
3336
+ })
3337
+ },
3338
+ encodeValue (schemaVersion, collectionVersion, record) {
3339
+ setVersion(schemaVersion)
3340
+ const state = { start: 0, end: 2, buffer: null }
3341
+ collection54_enc.preencode(state, record)
3342
+ state.buffer = b4a.allocUnsafe(state.end)
3343
+ state.buffer[state.start++] = 0
3344
+ state.buffer[state.start++] = collectionVersion
3345
+ collection54_enc.encode(state, record)
3346
+ return state.buffer
3347
+ },
3348
+ trigger: null,
3349
+ reconstruct: collection54_reconstruct,
3350
+ reconstructKey: collection54_reconstruct_key,
3351
+ indexes: [],
3352
+ decodedVersion: 0
3353
+ }
3354
+
3355
+ // '@qvac/member-roles' collection key
3356
+ const collection55_key = new IndexEncoder([
3357
+ IndexEncoder.BUFFER
3358
+ ], { prefix: 55 })
3359
+
3360
+ function collection55_indexify (record) {
3361
+ const a = record.memberId
3362
+ return a === undefined ? [] : [a]
3363
+ }
3364
+
3365
+ // '@qvac/member-roles' value encoding
3366
+ const collection55_enc = getEncoding('@qvac/member-role/hyperdb#55')
3367
+
3368
+ // '@qvac/member-roles' reconstruction function
3369
+ function collection55_reconstruct (schemaVersion, keyBuf, valueBuf) {
3370
+ const key = collection55_key.decode(keyBuf)
3371
+ setVersion(schemaVersion)
3372
+ const state = { start: 0, end: valueBuf.byteLength, buffer: valueBuf }
3373
+ const type = c.uint.decode(state)
3374
+ if (type !== 0) throw new Error('Unknown collection type: ' + type)
3375
+ collection55.decodedVersion = c.uint.decode(state)
3376
+ const record = collection55_enc.decode(state)
3377
+ record.memberId = key[0]
3378
+ return record
3379
+ }
3380
+ // '@qvac/member-roles' key reconstruction function
3381
+ function collection55_reconstruct_key (keyBuf) {
3382
+ const key = collection55_key.decode(keyBuf)
3383
+ return {
3384
+ memberId: key[0]
3385
+ }
3386
+ }
3387
+
3388
+ // '@qvac/member-roles'
3389
+ const collection55 = {
3390
+ name: '@qvac/member-roles',
3391
+ id: 55,
3392
+ version: 12,
3393
+ encodeKey (record) {
3394
+ const key = [record.memberId]
3395
+ return collection55_key.encode(key)
3396
+ },
3397
+ encodeKeyRange ({ gt, lt, gte, lte } = {}) {
3398
+ return collection55_key.encodeRange({
3399
+ gt: gt ? collection55_indexify(gt) : null,
3400
+ lt: lt ? collection55_indexify(lt) : null,
3401
+ gte: gte ? collection55_indexify(gte) : null,
3402
+ lte: lte ? collection55_indexify(lte) : null
3403
+ })
3404
+ },
3405
+ encodeValue (schemaVersion, collectionVersion, record) {
3406
+ setVersion(schemaVersion)
3407
+ const state = { start: 0, end: 2, buffer: null }
3408
+ collection55_enc.preencode(state, record)
3409
+ state.buffer = b4a.allocUnsafe(state.end)
3410
+ state.buffer[state.start++] = 0
3411
+ state.buffer[state.start++] = collectionVersion
3412
+ collection55_enc.encode(state, record)
3413
+ return state.buffer
3414
+ },
3415
+ trigger: null,
3416
+ reconstruct: collection55_reconstruct,
3417
+ reconstructKey: collection55_reconstruct_key,
3418
+ indexes: [],
3419
+ decodedVersion: 0
3420
+ }
3421
+
3422
+ // '@qvac/public-seeds' collection key
3423
+ const collection56_key = new IndexEncoder([
3424
+ IndexEncoder.BUFFER,
3425
+ IndexEncoder.BUFFER
3426
+ ], { prefix: 56 })
3427
+
3428
+ function collection56_indexify (record) {
3429
+ const arr = []
3430
+
3431
+ const a0 = record.memberId
3432
+ if (a0 === undefined) return arr
3433
+ arr.push(a0)
3434
+
3435
+ const a1 = record.deviceId
3436
+ if (a1 === undefined) return arr
3437
+ arr.push(a1)
3438
+
3439
+ return arr
3440
+ }
3441
+
3442
+ // '@qvac/public-seeds' value encoding
3443
+ const collection56_enc = getEncoding('@qvac/public-seed/hyperdb#56')
3444
+
3445
+ // '@qvac/public-seeds' reconstruction function
3446
+ function collection56_reconstruct (schemaVersion, keyBuf, valueBuf) {
3447
+ const key = collection56_key.decode(keyBuf)
3448
+ setVersion(schemaVersion)
3449
+ const state = { start: 0, end: valueBuf.byteLength, buffer: valueBuf }
3450
+ const type = c.uint.decode(state)
3451
+ if (type !== 0) throw new Error('Unknown collection type: ' + type)
3452
+ collection56.decodedVersion = c.uint.decode(state)
3453
+ const record = collection56_enc.decode(state)
3454
+ record.memberId = key[0]
3455
+ record.deviceId = key[1]
3456
+ return record
3457
+ }
3458
+ // '@qvac/public-seeds' key reconstruction function
3459
+ function collection56_reconstruct_key (keyBuf) {
3460
+ const key = collection56_key.decode(keyBuf)
3461
+ return {
3462
+ memberId: key[0],
3463
+ deviceId: key[1]
3464
+ }
3465
+ }
3466
+
3467
+ // '@qvac/public-seeds'
3468
+ const collection56 = {
3469
+ name: '@qvac/public-seeds',
3470
+ id: 56,
3471
+ version: 12,
3472
+ encodeKey (record) {
3473
+ const key = [record.memberId, record.deviceId]
3474
+ return collection56_key.encode(key)
3475
+ },
3476
+ encodeKeyRange ({ gt, lt, gte, lte } = {}) {
3477
+ return collection56_key.encodeRange({
3478
+ gt: gt ? collection56_indexify(gt) : null,
3479
+ lt: lt ? collection56_indexify(lt) : null,
3480
+ gte: gte ? collection56_indexify(gte) : null,
3481
+ lte: lte ? collection56_indexify(lte) : null
3482
+ })
3483
+ },
3484
+ encodeValue (schemaVersion, collectionVersion, record) {
3485
+ setVersion(schemaVersion)
3486
+ const state = { start: 0, end: 2, buffer: null }
3487
+ collection56_enc.preencode(state, record)
3488
+ state.buffer = b4a.allocUnsafe(state.end)
3489
+ state.buffer[state.start++] = 0
3490
+ state.buffer[state.start++] = collectionVersion
3491
+ collection56_enc.encode(state, record)
3492
+ return state.buffer
3493
+ },
3494
+ trigger: null,
3495
+ reconstruct: collection56_reconstruct,
3496
+ reconstructKey: collection56_reconstruct_key,
3497
+ indexes: [],
3498
+ decodedVersion: 0
3499
+ }
3500
+
3501
+ // '@qvac/projects' collection key
3502
+ const collection57_key = new IndexEncoder([
3503
+ IndexEncoder.BUFFER
3504
+ ], { prefix: 57 })
3505
+
3506
+ function collection57_indexify (record) {
3507
+ const a = record.id
3508
+ return a === undefined ? [] : [a]
3509
+ }
3510
+
3511
+ // '@qvac/projects' value encoding
3512
+ const collection57_enc = getEncoding('@qvac/project/hyperdb#57')
3513
+
3514
+ // '@qvac/projects' reconstruction function
3515
+ function collection57_reconstruct (schemaVersion, keyBuf, valueBuf) {
3516
+ const key = collection57_key.decode(keyBuf)
3517
+ setVersion(schemaVersion)
3518
+ const state = { start: 0, end: valueBuf.byteLength, buffer: valueBuf }
3519
+ const type = c.uint.decode(state)
3520
+ if (type !== 0) throw new Error('Unknown collection type: ' + type)
3521
+ collection57.decodedVersion = c.uint.decode(state)
3522
+ const record = collection57_enc.decode(state)
3523
+ record.id = key[0]
3524
+ return record
3525
+ }
3526
+ // '@qvac/projects' key reconstruction function
3527
+ function collection57_reconstruct_key (keyBuf) {
3528
+ const key = collection57_key.decode(keyBuf)
3529
+ return {
3530
+ id: key[0]
3531
+ }
3532
+ }
3533
+
3534
+ // '@qvac/projects'
3535
+ const collection57 = {
3536
+ name: '@qvac/projects',
3537
+ id: 57,
3538
+ version: 12,
3539
+ encodeKey (record) {
3540
+ const key = [record.id]
3541
+ return collection57_key.encode(key)
3542
+ },
3543
+ encodeKeyRange ({ gt, lt, gte, lte } = {}) {
3544
+ return collection57_key.encodeRange({
3545
+ gt: gt ? collection57_indexify(gt) : null,
3546
+ lt: lt ? collection57_indexify(lt) : null,
3547
+ gte: gte ? collection57_indexify(gte) : null,
3548
+ lte: lte ? collection57_indexify(lte) : null
3549
+ })
3550
+ },
3551
+ encodeValue (schemaVersion, collectionVersion, record) {
3552
+ setVersion(schemaVersion)
3553
+ const state = { start: 0, end: 2, buffer: null }
3554
+ collection57_enc.preencode(state, record)
3555
+ state.buffer = b4a.allocUnsafe(state.end)
3556
+ state.buffer[state.start++] = 0
3557
+ state.buffer[state.start++] = collectionVersion
3558
+ collection57_enc.encode(state, record)
3559
+ return state.buffer
3560
+ },
3561
+ trigger: null,
3562
+ reconstruct: collection57_reconstruct,
3563
+ reconstructKey: collection57_reconstruct_key,
3564
+ indexes: [],
3565
+ decodedVersion: 0
3566
+ }
3567
+
3568
+ // '@qvac/project-members' collection key
3569
+ const collection58_key = new IndexEncoder([
3570
+ IndexEncoder.BUFFER
3571
+ ], { prefix: 58 })
3572
+
3573
+ function collection58_indexify (record) {
3574
+ const a = record.memberId
3575
+ return a === undefined ? [] : [a]
3576
+ }
3577
+
3578
+ // '@qvac/project-members' value encoding
3579
+ const collection58_enc = getEncoding('@qvac/project-member/hyperdb#58')
3580
+
3581
+ // '@qvac/project-members' reconstruction function
3582
+ function collection58_reconstruct (schemaVersion, keyBuf, valueBuf) {
3583
+ const key = collection58_key.decode(keyBuf)
3584
+ setVersion(schemaVersion)
3585
+ const state = { start: 0, end: valueBuf.byteLength, buffer: valueBuf }
3586
+ const type = c.uint.decode(state)
3587
+ if (type !== 0) throw new Error('Unknown collection type: ' + type)
3588
+ collection58.decodedVersion = c.uint.decode(state)
3589
+ const record = collection58_enc.decode(state)
3590
+ record.memberId = key[0]
3591
+ return record
3592
+ }
3593
+ // '@qvac/project-members' key reconstruction function
3594
+ function collection58_reconstruct_key (keyBuf) {
3595
+ const key = collection58_key.decode(keyBuf)
3596
+ return {
3597
+ memberId: key[0]
3598
+ }
3599
+ }
3600
+
3601
+ // '@qvac/project-members'
3602
+ const collection58 = {
3603
+ name: '@qvac/project-members',
3604
+ id: 58,
3605
+ version: 12,
3606
+ encodeKey (record) {
3607
+ const key = [record.memberId]
3608
+ return collection58_key.encode(key)
3609
+ },
3610
+ encodeKeyRange ({ gt, lt, gte, lte } = {}) {
3611
+ return collection58_key.encodeRange({
3612
+ gt: gt ? collection58_indexify(gt) : null,
3613
+ lt: lt ? collection58_indexify(lt) : null,
3614
+ gte: gte ? collection58_indexify(gte) : null,
3615
+ lte: lte ? collection58_indexify(lte) : null
3616
+ })
3617
+ },
3618
+ encodeValue (schemaVersion, collectionVersion, record) {
3619
+ setVersion(schemaVersion)
3620
+ const state = { start: 0, end: 2, buffer: null }
3621
+ collection58_enc.preencode(state, record)
3622
+ state.buffer = b4a.allocUnsafe(state.end)
3623
+ state.buffer[state.start++] = 0
3624
+ state.buffer[state.start++] = collectionVersion
3625
+ collection58_enc.encode(state, record)
3626
+ return state.buffer
3627
+ },
3628
+ trigger: null,
3629
+ reconstruct: collection58_reconstruct,
3630
+ reconstructKey: collection58_reconstruct_key,
3631
+ indexes: [],
3632
+ decodedVersion: 0
3633
+ }
3634
+
3635
+ // '@qvac/active-knowledge-base' collection key
3636
+ const index59_key = new IndexEncoder([
3637
+ IndexEncoder.UINT,
3638
+ IndexEncoder.STRING
3639
+ ], { prefix: 59 })
3640
+
3641
+ // '@qvac/active-knowledge-base' has the following schema defined key map
3642
+ const index59_map = helpers0.activeKnowledgeBaseMap
3643
+
3644
+ function index59_indexify (record) {
3645
+ const a = record.createdAt
3646
+ return a === undefined ? [] : [a]
3647
+ }
3648
+
3649
+ // '@qvac/active-knowledge-base'
3650
+ const index59 = {
3651
+ name: '@qvac/active-knowledge-base',
3652
+ version: 12,
3653
+ id: 59,
3654
+ encodeKey (record) {
3655
+ return index59_key.encode(index59_indexify(record))
3656
+ },
3657
+ encodeKeyRange ({ gt, lt, gte, lte } = {}) {
3658
+ return index59_key.encodeRange({
3659
+ gt: gt ? index59_indexify(gt) : null,
3660
+ lt: lt ? index59_indexify(lt) : null,
3661
+ gte: gte ? index59_indexify(gte) : null,
3662
+ lte: lte ? index59_indexify(lte) : null
3663
+ })
3664
+ },
3665
+ encodeValue: (record) => index59.collection.encodeKey(record),
3666
+ encodeIndexKeys (record, context) {
3667
+ const mapped = index59_map(record, context)
3668
+ const keys = new Array(mapped.length)
3669
+ for (let i = 0; i < mapped.length; i++) {
3670
+ const mappedRecord = mapped[i]
3671
+ keys[i] = index59_key.encode([mappedRecord.createdAt, record.id])
3672
+ }
3673
+ return keys
3674
+ },
3675
+ reconstruct: (keyBuf, valueBuf) => valueBuf,
3676
+ offset: collection7.indexes.length,
3677
+ collection: collection7
3678
+ }
3679
+ collection7.indexes.push(index59)
3680
+
3681
+ // '@qvac/project-order' collection key
3682
+ const collection60_key = new IndexEncoder([
3683
+ IndexEncoder.BUFFER
3684
+ ], { prefix: 60 })
3685
+
3686
+ function collection60_indexify (record) {
3687
+ const a = record.workspaceKey
3688
+ return a === undefined ? [] : [a]
3689
+ }
3690
+
3691
+ // '@qvac/project-order' value encoding
3692
+ const collection60_enc = getEncoding('@qvac/project-order/hyperdb#60')
3693
+
3694
+ // '@qvac/project-order' reconstruction function
3695
+ function collection60_reconstruct (schemaVersion, keyBuf, valueBuf) {
3696
+ const key = collection60_key.decode(keyBuf)
3697
+ setVersion(schemaVersion)
3698
+ const state = { start: 0, end: valueBuf.byteLength, buffer: valueBuf }
3699
+ const type = c.uint.decode(state)
3700
+ if (type !== 0) throw new Error('Unknown collection type: ' + type)
3701
+ collection60.decodedVersion = c.uint.decode(state)
3702
+ const record = collection60_enc.decode(state)
3703
+ record.workspaceKey = key[0]
3704
+ return record
3705
+ }
3706
+ // '@qvac/project-order' key reconstruction function
3707
+ function collection60_reconstruct_key (keyBuf) {
3708
+ const key = collection60_key.decode(keyBuf)
3709
+ return {
3710
+ workspaceKey: key[0]
3711
+ }
3712
+ }
3713
+
3714
+ // '@qvac/project-order'
3715
+ const collection60 = {
3716
+ name: '@qvac/project-order',
3717
+ id: 60,
3718
+ version: 12,
3719
+ encodeKey (record) {
3720
+ const key = [record.workspaceKey]
3721
+ return collection60_key.encode(key)
3722
+ },
3723
+ encodeKeyRange ({ gt, lt, gte, lte } = {}) {
3724
+ return collection60_key.encodeRange({
3725
+ gt: gt ? collection60_indexify(gt) : null,
3726
+ lt: lt ? collection60_indexify(lt) : null,
3727
+ gte: gte ? collection60_indexify(gte) : null,
3728
+ lte: lte ? collection60_indexify(lte) : null
3729
+ })
3730
+ },
3731
+ encodeValue (schemaVersion, collectionVersion, record) {
3732
+ setVersion(schemaVersion)
3733
+ const state = { start: 0, end: 2, buffer: null }
3734
+ collection60_enc.preencode(state, record)
3735
+ state.buffer = b4a.allocUnsafe(state.end)
3736
+ state.buffer[state.start++] = 0
3737
+ state.buffer[state.start++] = collectionVersion
3738
+ collection60_enc.encode(state, record)
3739
+ return state.buffer
3740
+ },
3741
+ trigger: null,
3742
+ reconstruct: collection60_reconstruct,
3743
+ reconstructKey: collection60_reconstruct_key,
3744
+ indexes: [],
3745
+ decodedVersion: 0
3746
+ }
3747
+
3748
+ // '@qvac/run-request-by-run' collection key
3749
+ const index61_key = new IndexEncoder([
3750
+ IndexEncoder.STRING,
3751
+ IndexEncoder.STRING,
3752
+ IndexEncoder.STRING
3753
+ ], { prefix: 61 })
3754
+
3755
+ // '@qvac/run-request-by-run' has the following schema defined key map
3756
+ const index61_map = helpers0.runRequestByRunMap
3757
+
3758
+ function index61_indexify (record) {
3759
+ const arr = []
3760
+
3761
+ const a0 = record.chatId
3762
+ if (a0 === undefined) return arr
3763
+ arr.push(a0)
3764
+
3765
+ const a1 = record.runId
3766
+ if (a1 === undefined) return arr
3767
+ arr.push(a1)
3768
+
3769
+ return arr
3770
+ }
3771
+
3772
+ // '@qvac/run-request-by-run'
3773
+ const index61 = {
3774
+ name: '@qvac/run-request-by-run',
3775
+ version: 12,
3776
+ id: 61,
3777
+ encodeKey (record) {
3778
+ return index61_key.encode(index61_indexify(record))
3779
+ },
3780
+ encodeKeyRange ({ gt, lt, gte, lte } = {}) {
3781
+ return index61_key.encodeRange({
3782
+ gt: gt ? index61_indexify(gt) : null,
3783
+ lt: lt ? index61_indexify(lt) : null,
3784
+ gte: gte ? index61_indexify(gte) : null,
3785
+ lte: lte ? index61_indexify(lte) : null
3786
+ })
3787
+ },
3788
+ encodeValue: (record) => index61.collection.encodeKey(record),
3789
+ encodeIndexKeys (record, context) {
3790
+ const mapped = index61_map(record, context)
3791
+ const keys = new Array(mapped.length)
3792
+ for (let i = 0; i < mapped.length; i++) {
3793
+ const mappedRecord = mapped[i]
3794
+ keys[i] = index61_key.encode([mappedRecord.chatId, mappedRecord.runId, record.id])
3795
+ }
3796
+ return keys
3797
+ },
3798
+ reconstruct: (keyBuf, valueBuf) => valueBuf,
3799
+ offset: collection0.indexes.length,
3800
+ collection: collection0
3801
+ }
3802
+ collection0.indexes.push(index61)
3803
+
3804
+ // '@qvac/chat-reads' collection key
3805
+ const collection62_key = new IndexEncoder([
3806
+ IndexEncoder.STRING,
3807
+ IndexEncoder.BUFFER
3808
+ ], { prefix: 62 })
3809
+
3810
+ function collection62_indexify (record) {
3811
+ const arr = []
3812
+
3813
+ const a0 = record.chatId
3814
+ if (a0 === undefined) return arr
3815
+ arr.push(a0)
3816
+
3817
+ const a1 = record.memberId
3818
+ if (a1 === undefined) return arr
3819
+ arr.push(a1)
3820
+
3821
+ return arr
3822
+ }
3823
+
3824
+ // '@qvac/chat-reads' value encoding
3825
+ const collection62_enc = getEncoding('@qvac/chat-read/hyperdb#62')
3826
+
3827
+ // '@qvac/chat-reads' reconstruction function
3828
+ function collection62_reconstruct (schemaVersion, keyBuf, valueBuf) {
3829
+ const key = collection62_key.decode(keyBuf)
3830
+ setVersion(schemaVersion)
3831
+ const state = { start: 0, end: valueBuf.byteLength, buffer: valueBuf }
3832
+ const type = c.uint.decode(state)
3833
+ if (type !== 0) throw new Error('Unknown collection type: ' + type)
3834
+ collection62.decodedVersion = c.uint.decode(state)
3835
+ const record = collection62_enc.decode(state)
3836
+ record.chatId = key[0]
3837
+ record.memberId = key[1]
3838
+ return record
3839
+ }
3840
+ // '@qvac/chat-reads' key reconstruction function
3841
+ function collection62_reconstruct_key (keyBuf) {
3842
+ const key = collection62_key.decode(keyBuf)
3843
+ return {
3844
+ chatId: key[0],
3845
+ memberId: key[1]
3846
+ }
3847
+ }
3848
+
3849
+ // '@qvac/chat-reads'
3850
+ const collection62 = {
3851
+ name: '@qvac/chat-reads',
3852
+ id: 62,
3853
+ version: 12,
3854
+ encodeKey (record) {
3855
+ const key = [record.chatId, record.memberId]
3856
+ return collection62_key.encode(key)
3857
+ },
3858
+ encodeKeyRange ({ gt, lt, gte, lte } = {}) {
3859
+ return collection62_key.encodeRange({
3860
+ gt: gt ? collection62_indexify(gt) : null,
3861
+ lt: lt ? collection62_indexify(lt) : null,
3862
+ gte: gte ? collection62_indexify(gte) : null,
3863
+ lte: lte ? collection62_indexify(lte) : null
3864
+ })
3865
+ },
3866
+ encodeValue (schemaVersion, collectionVersion, record) {
3867
+ setVersion(schemaVersion)
3868
+ const state = { start: 0, end: 2, buffer: null }
3869
+ collection62_enc.preencode(state, record)
3870
+ state.buffer = b4a.allocUnsafe(state.end)
3871
+ state.buffer[state.start++] = 0
3872
+ state.buffer[state.start++] = collectionVersion
3873
+ collection62_enc.encode(state, record)
3874
+ return state.buffer
3875
+ },
3876
+ trigger: null,
3877
+ reconstruct: collection62_reconstruct,
3878
+ reconstructKey: collection62_reconstruct_key,
3879
+ indexes: [],
3880
+ decodedVersion: 0
3881
+ }
3882
+
3883
+ // '@qvac/knowledge-caps' collection key
3884
+ const collection63_key = new IndexEncoder([
3885
+ IndexEncoder.STRING
3886
+ ], { prefix: 63 })
3887
+
3888
+ function collection63_indexify (record) {
3889
+ const a = record.id
3890
+ return a === undefined ? [] : [a]
3891
+ }
3892
+
3893
+ // '@qvac/knowledge-caps' value encoding
3894
+ const collection63_enc = getEncoding('@qvac/knowledge-cap/hyperdb#63')
3895
+
3896
+ // '@qvac/knowledge-caps' reconstruction function
3897
+ function collection63_reconstruct (schemaVersion, keyBuf, valueBuf) {
3898
+ const key = collection63_key.decode(keyBuf)
3899
+ setVersion(schemaVersion)
3900
+ const state = { start: 0, end: valueBuf.byteLength, buffer: valueBuf }
3901
+ const type = c.uint.decode(state)
3902
+ if (type !== 0) throw new Error('Unknown collection type: ' + type)
3903
+ collection63.decodedVersion = c.uint.decode(state)
3904
+ const record = collection63_enc.decode(state)
3905
+ record.id = key[0]
3906
+ return record
3907
+ }
3908
+ // '@qvac/knowledge-caps' key reconstruction function
3909
+ function collection63_reconstruct_key (keyBuf) {
3910
+ const key = collection63_key.decode(keyBuf)
3911
+ return {
3912
+ id: key[0]
3913
+ }
3914
+ }
3915
+
3916
+ // '@qvac/knowledge-caps'
3917
+ const collection63 = {
3918
+ name: '@qvac/knowledge-caps',
3919
+ id: 63,
3920
+ version: 12,
3921
+ encodeKey (record) {
3922
+ const key = [record.id]
3923
+ return collection63_key.encode(key)
3924
+ },
3925
+ encodeKeyRange ({ gt, lt, gte, lte } = {}) {
3926
+ return collection63_key.encodeRange({
3927
+ gt: gt ? collection63_indexify(gt) : null,
3928
+ lt: lt ? collection63_indexify(lt) : null,
3929
+ gte: gte ? collection63_indexify(gte) : null,
3930
+ lte: lte ? collection63_indexify(lte) : null
3931
+ })
3932
+ },
3933
+ encodeValue (schemaVersion, collectionVersion, record) {
3934
+ setVersion(schemaVersion)
3935
+ const state = { start: 0, end: 2, buffer: null }
3936
+ collection63_enc.preencode(state, record)
3937
+ state.buffer = b4a.allocUnsafe(state.end)
3938
+ state.buffer[state.start++] = 0
3939
+ state.buffer[state.start++] = collectionVersion
3940
+ collection63_enc.encode(state, record)
3941
+ return state.buffer
3942
+ },
3943
+ trigger: null,
3944
+ reconstruct: collection63_reconstruct,
3945
+ reconstructKey: collection63_reconstruct_key,
3946
+ indexes: [],
3947
+ decodedVersion: 0
3948
+ }
3949
+
3950
+ // '@qvac/live-model-requests' collection key
3951
+ const index64_key = new IndexEncoder([
3952
+ IndexEncoder.STRING,
3953
+ IndexEncoder.UINT,
3954
+ IndexEncoder.STRING
3955
+ ], { prefix: 64 })
3956
+
3957
+ // '@qvac/live-model-requests' has the following schema defined key map
3958
+ const index64_map = helpers0.liveModelRequestsMap
3959
+
3960
+ function index64_indexify (record) {
3961
+ const arr = []
3962
+
3963
+ const a0 = record.chatId
3964
+ if (a0 === undefined) return arr
3965
+ arr.push(a0)
3966
+
3967
+ const a1 = record.seq
3968
+ if (a1 === undefined) return arr
3969
+ arr.push(a1)
3970
+
3971
+ return arr
3972
+ }
3973
+
3974
+ // '@qvac/live-model-requests'
3975
+ const index64 = {
3976
+ name: '@qvac/live-model-requests',
3977
+ version: 12,
3978
+ id: 64,
3979
+ encodeKey (record) {
3980
+ return index64_key.encode(index64_indexify(record))
3981
+ },
3982
+ encodeKeyRange ({ gt, lt, gte, lte } = {}) {
3983
+ return index64_key.encodeRange({
3984
+ gt: gt ? index64_indexify(gt) : null,
3985
+ lt: lt ? index64_indexify(lt) : null,
3986
+ gte: gte ? index64_indexify(gte) : null,
3987
+ lte: lte ? index64_indexify(lte) : null
3988
+ })
3989
+ },
3990
+ encodeValue: (record) => index64.collection.encodeKey(record),
3991
+ encodeIndexKeys (record, context) {
3992
+ const mapped = index64_map(record, context)
3993
+ const keys = new Array(mapped.length)
3994
+ for (let i = 0; i < mapped.length; i++) {
3995
+ const mappedRecord = mapped[i]
3996
+ keys[i] = index64_key.encode([mappedRecord.chatId, mappedRecord.seq, record.id])
3997
+ }
3998
+ return keys
3999
+ },
4000
+ reconstruct: (keyBuf, valueBuf) => valueBuf,
4001
+ offset: collection0.indexes.length,
4002
+ collection: collection0
4003
+ }
4004
+ collection0.indexes.push(index64)
4005
+
4006
+ // '@qvac/agent-hosts' collection key
4007
+ const collection65_key = new IndexEncoder([
4008
+ IndexEncoder.BUFFER,
4009
+ IndexEncoder.STRING
4010
+ ], { prefix: 65 })
4011
+
4012
+ function collection65_indexify (record) {
4013
+ const arr = []
4014
+
4015
+ const a0 = record.writerKey
4016
+ if (a0 === undefined) return arr
4017
+ arr.push(a0)
4018
+
4019
+ const a1 = record.agentId
4020
+ if (a1 === undefined) return arr
4021
+ arr.push(a1)
4022
+
4023
+ return arr
4024
+ }
4025
+
4026
+ // '@qvac/agent-hosts' value encoding
4027
+ const collection65_enc = getEncoding('@qvac/agent-host/hyperdb#65')
4028
+
4029
+ // '@qvac/agent-hosts' reconstruction function
4030
+ function collection65_reconstruct (schemaVersion, keyBuf, valueBuf) {
4031
+ const key = collection65_key.decode(keyBuf)
4032
+ setVersion(schemaVersion)
4033
+ const state = { start: 0, end: valueBuf.byteLength, buffer: valueBuf }
4034
+ const type = c.uint.decode(state)
4035
+ if (type !== 0) throw new Error('Unknown collection type: ' + type)
4036
+ collection65.decodedVersion = c.uint.decode(state)
4037
+ const record = collection65_enc.decode(state)
4038
+ record.writerKey = key[0]
4039
+ record.agentId = key[1]
4040
+ return record
4041
+ }
4042
+ // '@qvac/agent-hosts' key reconstruction function
4043
+ function collection65_reconstruct_key (keyBuf) {
4044
+ const key = collection65_key.decode(keyBuf)
4045
+ return {
4046
+ writerKey: key[0],
4047
+ agentId: key[1]
4048
+ }
4049
+ }
4050
+
4051
+ // '@qvac/agent-hosts'
4052
+ const collection65 = {
4053
+ name: '@qvac/agent-hosts',
4054
+ id: 65,
4055
+ version: 12,
4056
+ encodeKey (record) {
4057
+ const key = [record.writerKey, record.agentId]
4058
+ return collection65_key.encode(key)
4059
+ },
4060
+ encodeKeyRange ({ gt, lt, gte, lte } = {}) {
4061
+ return collection65_key.encodeRange({
4062
+ gt: gt ? collection65_indexify(gt) : null,
4063
+ lt: lt ? collection65_indexify(lt) : null,
4064
+ gte: gte ? collection65_indexify(gte) : null,
4065
+ lte: lte ? collection65_indexify(lte) : null
4066
+ })
4067
+ },
4068
+ encodeValue (schemaVersion, collectionVersion, record) {
4069
+ setVersion(schemaVersion)
4070
+ const state = { start: 0, end: 2, buffer: null }
4071
+ collection65_enc.preencode(state, record)
4072
+ state.buffer = b4a.allocUnsafe(state.end)
4073
+ state.buffer[state.start++] = 0
4074
+ state.buffer[state.start++] = collectionVersion
4075
+ collection65_enc.encode(state, record)
4076
+ return state.buffer
4077
+ },
4078
+ trigger: null,
4079
+ reconstruct: collection65_reconstruct,
4080
+ reconstructKey: collection65_reconstruct_key,
4081
+ indexes: [],
4082
+ decodedVersion: 0
4083
+ }
4084
+
4085
+ // '@qvac/agent-users' collection key
4086
+ const collection66_key = new IndexEncoder([
4087
+ IndexEncoder.STRING,
4088
+ IndexEncoder.BUFFER
4089
+ ], { prefix: 66 })
4090
+
4091
+ function collection66_indexify (record) {
4092
+ const arr = []
4093
+
4094
+ const a0 = record.agentId
4095
+ if (a0 === undefined) return arr
4096
+ arr.push(a0)
4097
+
4098
+ const a1 = record.userId
4099
+ if (a1 === undefined) return arr
4100
+ arr.push(a1)
4101
+
4102
+ return arr
4103
+ }
4104
+
4105
+ // '@qvac/agent-users' value encoding
4106
+ const collection66_enc = getEncoding('@qvac/agent-user/hyperdb#66')
4107
+
4108
+ // '@qvac/agent-users' reconstruction function
4109
+ function collection66_reconstruct (schemaVersion, keyBuf, valueBuf) {
4110
+ const key = collection66_key.decode(keyBuf)
4111
+ setVersion(schemaVersion)
4112
+ const state = { start: 0, end: valueBuf.byteLength, buffer: valueBuf }
4113
+ const type = c.uint.decode(state)
4114
+ if (type !== 0) throw new Error('Unknown collection type: ' + type)
4115
+ collection66.decodedVersion = c.uint.decode(state)
4116
+ const record = collection66_enc.decode(state)
4117
+ record.agentId = key[0]
4118
+ record.userId = key[1]
4119
+ return record
4120
+ }
4121
+ // '@qvac/agent-users' key reconstruction function
4122
+ function collection66_reconstruct_key (keyBuf) {
4123
+ const key = collection66_key.decode(keyBuf)
4124
+ return {
4125
+ agentId: key[0],
4126
+ userId: key[1]
4127
+ }
4128
+ }
4129
+
4130
+ // '@qvac/agent-users'
4131
+ const collection66 = {
4132
+ name: '@qvac/agent-users',
4133
+ id: 66,
4134
+ version: 12,
4135
+ encodeKey (record) {
4136
+ const key = [record.agentId, record.userId]
4137
+ return collection66_key.encode(key)
4138
+ },
4139
+ encodeKeyRange ({ gt, lt, gte, lte } = {}) {
4140
+ return collection66_key.encodeRange({
4141
+ gt: gt ? collection66_indexify(gt) : null,
4142
+ lt: lt ? collection66_indexify(lt) : null,
4143
+ gte: gte ? collection66_indexify(gte) : null,
4144
+ lte: lte ? collection66_indexify(lte) : null
4145
+ })
4146
+ },
4147
+ encodeValue (schemaVersion, collectionVersion, record) {
4148
+ setVersion(schemaVersion)
4149
+ const state = { start: 0, end: 2, buffer: null }
4150
+ collection66_enc.preencode(state, record)
4151
+ state.buffer = b4a.allocUnsafe(state.end)
4152
+ state.buffer[state.start++] = 0
4153
+ state.buffer[state.start++] = collectionVersion
4154
+ collection66_enc.encode(state, record)
4155
+ return state.buffer
4156
+ },
4157
+ trigger: null,
4158
+ reconstruct: collection66_reconstruct,
4159
+ reconstructKey: collection66_reconstruct_key,
4160
+ indexes: [],
4161
+ decodedVersion: 0
4162
+ }
4163
+
4164
+ // '@qvac/member-keys' collection key
4165
+ const collection67_key = new IndexEncoder([
4166
+ IndexEncoder.BUFFER
4167
+ ], { prefix: 67 })
4168
+
4169
+ function collection67_indexify (record) {
4170
+ const a = record.memberId
4171
+ return a === undefined ? [] : [a]
4172
+ }
4173
+
4174
+ // '@qvac/member-keys' value encoding
4175
+ const collection67_enc = getEncoding('@qvac/member-key/hyperdb#67')
4176
+
4177
+ // '@qvac/member-keys' reconstruction function
4178
+ function collection67_reconstruct (schemaVersion, keyBuf, valueBuf) {
4179
+ const key = collection67_key.decode(keyBuf)
4180
+ setVersion(schemaVersion)
4181
+ const state = { start: 0, end: valueBuf.byteLength, buffer: valueBuf }
4182
+ const type = c.uint.decode(state)
4183
+ if (type !== 0) throw new Error('Unknown collection type: ' + type)
4184
+ collection67.decodedVersion = c.uint.decode(state)
4185
+ const record = collection67_enc.decode(state)
4186
+ record.memberId = key[0]
4187
+ return record
4188
+ }
4189
+ // '@qvac/member-keys' key reconstruction function
4190
+ function collection67_reconstruct_key (keyBuf) {
4191
+ const key = collection67_key.decode(keyBuf)
4192
+ return {
4193
+ memberId: key[0]
4194
+ }
4195
+ }
4196
+
4197
+ // '@qvac/member-keys'
4198
+ const collection67 = {
4199
+ name: '@qvac/member-keys',
4200
+ id: 67,
4201
+ version: 12,
4202
+ encodeKey (record) {
4203
+ const key = [record.memberId]
4204
+ return collection67_key.encode(key)
4205
+ },
4206
+ encodeKeyRange ({ gt, lt, gte, lte } = {}) {
4207
+ return collection67_key.encodeRange({
4208
+ gt: gt ? collection67_indexify(gt) : null,
4209
+ lt: lt ? collection67_indexify(lt) : null,
4210
+ gte: gte ? collection67_indexify(gte) : null,
4211
+ lte: lte ? collection67_indexify(lte) : null
4212
+ })
4213
+ },
4214
+ encodeValue (schemaVersion, collectionVersion, record) {
4215
+ setVersion(schemaVersion)
4216
+ const state = { start: 0, end: 2, buffer: null }
4217
+ collection67_enc.preencode(state, record)
4218
+ state.buffer = b4a.allocUnsafe(state.end)
4219
+ state.buffer[state.start++] = 0
4220
+ state.buffer[state.start++] = collectionVersion
4221
+ collection67_enc.encode(state, record)
4222
+ return state.buffer
4223
+ },
4224
+ trigger: null,
4225
+ reconstruct: collection67_reconstruct,
4226
+ reconstructKey: collection67_reconstruct_key,
4227
+ indexes: [],
4228
+ decodedVersion: 0
4229
+ }
4230
+
4231
+ // '@qvac/project-keys' collection key
4232
+ const collection68_key = new IndexEncoder([
4233
+ IndexEncoder.BUFFER,
4234
+ IndexEncoder.BUFFER
4235
+ ], { prefix: 68 })
4236
+
4237
+ function collection68_indexify (record) {
4238
+ const arr = []
4239
+
4240
+ const a0 = record.projectId
4241
+ if (a0 === undefined) return arr
4242
+ arr.push(a0)
4243
+
4244
+ const a1 = record.memberId
4245
+ if (a1 === undefined) return arr
4246
+ arr.push(a1)
4247
+
4248
+ return arr
4249
+ }
4250
+
4251
+ // '@qvac/project-keys' value encoding
4252
+ const collection68_enc = getEncoding('@qvac/project-key/hyperdb#68')
4253
+
4254
+ // '@qvac/project-keys' reconstruction function
4255
+ function collection68_reconstruct (schemaVersion, keyBuf, valueBuf) {
4256
+ const key = collection68_key.decode(keyBuf)
4257
+ setVersion(schemaVersion)
4258
+ const state = { start: 0, end: valueBuf.byteLength, buffer: valueBuf }
4259
+ const type = c.uint.decode(state)
4260
+ if (type !== 0) throw new Error('Unknown collection type: ' + type)
4261
+ collection68.decodedVersion = c.uint.decode(state)
4262
+ const record = collection68_enc.decode(state)
4263
+ record.projectId = key[0]
4264
+ record.memberId = key[1]
4265
+ return record
4266
+ }
4267
+ // '@qvac/project-keys' key reconstruction function
4268
+ function collection68_reconstruct_key (keyBuf) {
4269
+ const key = collection68_key.decode(keyBuf)
4270
+ return {
4271
+ projectId: key[0],
4272
+ memberId: key[1]
4273
+ }
4274
+ }
4275
+
4276
+ // '@qvac/project-keys'
4277
+ const collection68 = {
4278
+ name: '@qvac/project-keys',
4279
+ id: 68,
4280
+ version: 12,
4281
+ encodeKey (record) {
4282
+ const key = [record.projectId, record.memberId]
4283
+ return collection68_key.encode(key)
4284
+ },
4285
+ encodeKeyRange ({ gt, lt, gte, lte } = {}) {
4286
+ return collection68_key.encodeRange({
4287
+ gt: gt ? collection68_indexify(gt) : null,
4288
+ lt: lt ? collection68_indexify(lt) : null,
4289
+ gte: gte ? collection68_indexify(gte) : null,
4290
+ lte: lte ? collection68_indexify(lte) : null
4291
+ })
4292
+ },
4293
+ encodeValue (schemaVersion, collectionVersion, record) {
4294
+ setVersion(schemaVersion)
4295
+ const state = { start: 0, end: 2, buffer: null }
4296
+ collection68_enc.preencode(state, record)
4297
+ state.buffer = b4a.allocUnsafe(state.end)
4298
+ state.buffer[state.start++] = 0
4299
+ state.buffer[state.start++] = collectionVersion
4300
+ collection68_enc.encode(state, record)
4301
+ return state.buffer
4302
+ },
4303
+ trigger: null,
4304
+ reconstruct: collection68_reconstruct,
4305
+ reconstructKey: collection68_reconstruct_key,
4306
+ indexes: [],
4307
+ decodedVersion: 0
4308
+ }
4309
+
4310
+ // '@qvac/project-host-keys' collection key
4311
+ const collection69_key = new IndexEncoder([
4312
+ IndexEncoder.BUFFER,
4313
+ IndexEncoder.BUFFER
4314
+ ], { prefix: 69 })
4315
+
4316
+ function collection69_indexify (record) {
4317
+ const arr = []
4318
+
4319
+ const a0 = record.projectId
4320
+ if (a0 === undefined) return arr
4321
+ arr.push(a0)
4322
+
4323
+ const a1 = record.deviceId
4324
+ if (a1 === undefined) return arr
4325
+ arr.push(a1)
4326
+
4327
+ return arr
4328
+ }
4329
+
4330
+ // '@qvac/project-host-keys' value encoding
4331
+ const collection69_enc = getEncoding('@qvac/project-host-key/hyperdb#69')
4332
+
4333
+ // '@qvac/project-host-keys' reconstruction function
4334
+ function collection69_reconstruct (schemaVersion, keyBuf, valueBuf) {
4335
+ const key = collection69_key.decode(keyBuf)
4336
+ setVersion(schemaVersion)
4337
+ const state = { start: 0, end: valueBuf.byteLength, buffer: valueBuf }
4338
+ const type = c.uint.decode(state)
4339
+ if (type !== 0) throw new Error('Unknown collection type: ' + type)
4340
+ collection69.decodedVersion = c.uint.decode(state)
4341
+ const record = collection69_enc.decode(state)
4342
+ record.projectId = key[0]
4343
+ record.deviceId = key[1]
4344
+ return record
4345
+ }
4346
+ // '@qvac/project-host-keys' key reconstruction function
4347
+ function collection69_reconstruct_key (keyBuf) {
4348
+ const key = collection69_key.decode(keyBuf)
4349
+ return {
4350
+ projectId: key[0],
4351
+ deviceId: key[1]
4352
+ }
4353
+ }
4354
+
4355
+ // '@qvac/project-host-keys'
4356
+ const collection69 = {
4357
+ name: '@qvac/project-host-keys',
4358
+ id: 69,
4359
+ version: 12,
4360
+ encodeKey (record) {
4361
+ const key = [record.projectId, record.deviceId]
4362
+ return collection69_key.encode(key)
4363
+ },
4364
+ encodeKeyRange ({ gt, lt, gte, lte } = {}) {
4365
+ return collection69_key.encodeRange({
4366
+ gt: gt ? collection69_indexify(gt) : null,
4367
+ lt: lt ? collection69_indexify(lt) : null,
4368
+ gte: gte ? collection69_indexify(gte) : null,
4369
+ lte: lte ? collection69_indexify(lte) : null
4370
+ })
4371
+ },
4372
+ encodeValue (schemaVersion, collectionVersion, record) {
4373
+ setVersion(schemaVersion)
4374
+ const state = { start: 0, end: 2, buffer: null }
4375
+ collection69_enc.preencode(state, record)
4376
+ state.buffer = b4a.allocUnsafe(state.end)
4377
+ state.buffer[state.start++] = 0
4378
+ state.buffer[state.start++] = collectionVersion
4379
+ collection69_enc.encode(state, record)
4380
+ return state.buffer
4381
+ },
4382
+ trigger: null,
4383
+ reconstruct: collection69_reconstruct,
4384
+ reconstructKey: collection69_reconstruct_key,
4385
+ indexes: [],
4386
+ decodedVersion: 0
4387
+ }
4388
+
4389
+ // '@qvac/project-device-keys' collection key
4390
+ const collection70_key = new IndexEncoder([
4391
+ IndexEncoder.BUFFER,
4392
+ IndexEncoder.BUFFER
4393
+ ], { prefix: 70 })
4394
+
4395
+ function collection70_indexify (record) {
4396
+ const arr = []
4397
+
4398
+ const a0 = record.projectId
4399
+ if (a0 === undefined) return arr
4400
+ arr.push(a0)
4401
+
4402
+ const a1 = record.deviceId
4403
+ if (a1 === undefined) return arr
4404
+ arr.push(a1)
4405
+
4406
+ return arr
4407
+ }
4408
+
4409
+ // '@qvac/project-device-keys' value encoding
4410
+ const collection70_enc = getEncoding('@qvac/project-device-key/hyperdb#70')
4411
+
4412
+ // '@qvac/project-device-keys' reconstruction function
4413
+ function collection70_reconstruct (schemaVersion, keyBuf, valueBuf) {
4414
+ const key = collection70_key.decode(keyBuf)
4415
+ setVersion(schemaVersion)
4416
+ const state = { start: 0, end: valueBuf.byteLength, buffer: valueBuf }
4417
+ const type = c.uint.decode(state)
4418
+ if (type !== 0) throw new Error('Unknown collection type: ' + type)
4419
+ collection70.decodedVersion = c.uint.decode(state)
4420
+ const record = collection70_enc.decode(state)
4421
+ record.projectId = key[0]
4422
+ record.deviceId = key[1]
4423
+ return record
4424
+ }
4425
+ // '@qvac/project-device-keys' key reconstruction function
4426
+ function collection70_reconstruct_key (keyBuf) {
4427
+ const key = collection70_key.decode(keyBuf)
4428
+ return {
4429
+ projectId: key[0],
4430
+ deviceId: key[1]
4431
+ }
4432
+ }
4433
+
4434
+ // '@qvac/project-device-keys'
4435
+ const collection70 = {
4436
+ name: '@qvac/project-device-keys',
4437
+ id: 70,
4438
+ version: 12,
4439
+ encodeKey (record) {
4440
+ const key = [record.projectId, record.deviceId]
4441
+ return collection70_key.encode(key)
4442
+ },
4443
+ encodeKeyRange ({ gt, lt, gte, lte } = {}) {
4444
+ return collection70_key.encodeRange({
4445
+ gt: gt ? collection70_indexify(gt) : null,
4446
+ lt: lt ? collection70_indexify(lt) : null,
4447
+ gte: gte ? collection70_indexify(gte) : null,
4448
+ lte: lte ? collection70_indexify(lte) : null
4449
+ })
4450
+ },
4451
+ encodeValue (schemaVersion, collectionVersion, record) {
4452
+ setVersion(schemaVersion)
4453
+ const state = { start: 0, end: 2, buffer: null }
4454
+ collection70_enc.preencode(state, record)
4455
+ state.buffer = b4a.allocUnsafe(state.end)
4456
+ state.buffer[state.start++] = 0
4457
+ state.buffer[state.start++] = collectionVersion
4458
+ collection70_enc.encode(state, record)
4459
+ return state.buffer
4460
+ },
4461
+ trigger: null,
4462
+ reconstruct: collection70_reconstruct,
4463
+ reconstructKey: collection70_reconstruct_key,
4464
+ indexes: [],
4465
+ decodedVersion: 0
4466
+ }
4467
+
4468
+ // '@qvac/skill-secrets' collection key
4469
+ const collection71_key = new IndexEncoder([
4470
+ IndexEncoder.STRING
4471
+ ], { prefix: 71 })
4472
+
4473
+ function collection71_indexify (record) {
4474
+ const a = record.key
4475
+ return a === undefined ? [] : [a]
4476
+ }
4477
+
4478
+ // '@qvac/skill-secrets' value encoding
4479
+ const collection71_enc = getEncoding('@qvac/skill-secret/hyperdb#71')
4480
+
4481
+ // '@qvac/skill-secrets' reconstruction function
4482
+ function collection71_reconstruct (schemaVersion, keyBuf, valueBuf) {
4483
+ const key = collection71_key.decode(keyBuf)
4484
+ setVersion(schemaVersion)
4485
+ const state = { start: 0, end: valueBuf.byteLength, buffer: valueBuf }
4486
+ const type = c.uint.decode(state)
4487
+ if (type !== 0) throw new Error('Unknown collection type: ' + type)
4488
+ collection71.decodedVersion = c.uint.decode(state)
4489
+ const record = collection71_enc.decode(state)
4490
+ record.key = key[0]
4491
+ return record
4492
+ }
4493
+ // '@qvac/skill-secrets' key reconstruction function
4494
+ function collection71_reconstruct_key (keyBuf) {
4495
+ const key = collection71_key.decode(keyBuf)
4496
+ return {
4497
+ key: key[0]
4498
+ }
4499
+ }
4500
+
4501
+ // '@qvac/skill-secrets'
4502
+ const collection71 = {
4503
+ name: '@qvac/skill-secrets',
4504
+ id: 71,
4505
+ version: 12,
4506
+ encodeKey (record) {
4507
+ const key = [record.key]
4508
+ return collection71_key.encode(key)
4509
+ },
4510
+ encodeKeyRange ({ gt, lt, gte, lte } = {}) {
4511
+ return collection71_key.encodeRange({
4512
+ gt: gt ? collection71_indexify(gt) : null,
4513
+ lt: lt ? collection71_indexify(lt) : null,
4514
+ gte: gte ? collection71_indexify(gte) : null,
4515
+ lte: lte ? collection71_indexify(lte) : null
4516
+ })
4517
+ },
4518
+ encodeValue (schemaVersion, collectionVersion, record) {
4519
+ setVersion(schemaVersion)
4520
+ const state = { start: 0, end: 2, buffer: null }
4521
+ collection71_enc.preencode(state, record)
4522
+ state.buffer = b4a.allocUnsafe(state.end)
4523
+ state.buffer[state.start++] = 0
4524
+ state.buffer[state.start++] = collectionVersion
4525
+ collection71_enc.encode(state, record)
4526
+ return state.buffer
4527
+ },
4528
+ trigger: null,
4529
+ reconstruct: collection71_reconstruct,
4530
+ reconstructKey: collection71_reconstruct_key,
4531
+ indexes: [],
4532
+ decodedVersion: 0
4533
+ }
4534
+
4535
+ // '@qvac/live-devices-by-member' collection key
4536
+ const index72_key = new IndexEncoder([
4537
+ IndexEncoder.BUFFER,
4538
+ IndexEncoder.BUFFER
4539
+ ], { prefix: 72 })
4540
+
4541
+ // '@qvac/live-devices-by-member' has the following schema defined key map
4542
+ const index72_map = helpers0.liveDevicesByMemberMap
4543
+
4544
+ function index72_indexify (record) {
4545
+ const a = record.memberId
4546
+ return a === undefined ? [] : [a]
4547
+ }
4548
+
4549
+ // '@qvac/live-devices-by-member'
4550
+ const index72 = {
4551
+ name: '@qvac/live-devices-by-member',
4552
+ version: 12,
4553
+ id: 72,
4554
+ encodeKey (record) {
4555
+ return index72_key.encode(index72_indexify(record))
4556
+ },
4557
+ encodeKeyRange ({ gt, lt, gte, lte } = {}) {
4558
+ return index72_key.encodeRange({
4559
+ gt: gt ? index72_indexify(gt) : null,
4560
+ lt: lt ? index72_indexify(lt) : null,
4561
+ gte: gte ? index72_indexify(gte) : null,
4562
+ lte: lte ? index72_indexify(lte) : null
4563
+ })
4564
+ },
4565
+ encodeValue: (record) => index72.collection.encodeKey(record),
4566
+ encodeIndexKeys (record, context) {
4567
+ const mapped = index72_map(record, context)
4568
+ const keys = new Array(mapped.length)
4569
+ for (let i = 0; i < mapped.length; i++) {
4570
+ const mappedRecord = mapped[i]
4571
+ keys[i] = index72_key.encode([mappedRecord.memberId, record.id])
4572
+ }
4573
+ return keys
4574
+ },
4575
+ reconstruct: (keyBuf, valueBuf) => valueBuf,
4576
+ offset: collection5.indexes.length,
4577
+ collection: collection5
4578
+ }
4579
+ collection5.indexes.push(index72)
4580
+
4581
+ // '@qvac/devices-by-member' collection key
4582
+ const index73_key = new IndexEncoder([
4583
+ IndexEncoder.BUFFER,
4584
+ IndexEncoder.BUFFER
4585
+ ], { prefix: 73 })
4586
+
4587
+ // '@qvac/devices-by-member' has the following schema defined key map
4588
+ const index73_map = helpers0.devicesByMemberMap
4589
+
4590
+ function index73_indexify (record) {
4591
+ const a = record.memberId
4592
+ return a === undefined ? [] : [a]
4593
+ }
4594
+
4595
+ // '@qvac/devices-by-member'
4596
+ const index73 = {
4597
+ name: '@qvac/devices-by-member',
4598
+ version: 12,
4599
+ id: 73,
4600
+ encodeKey (record) {
4601
+ return index73_key.encode(index73_indexify(record))
4602
+ },
4603
+ encodeKeyRange ({ gt, lt, gte, lte } = {}) {
4604
+ return index73_key.encodeRange({
4605
+ gt: gt ? index73_indexify(gt) : null,
4606
+ lt: lt ? index73_indexify(lt) : null,
4607
+ gte: gte ? index73_indexify(gte) : null,
4608
+ lte: lte ? index73_indexify(lte) : null
4609
+ })
4610
+ },
4611
+ encodeValue: (record) => index73.collection.encodeKey(record),
4612
+ encodeIndexKeys (record, context) {
4613
+ const mapped = index73_map(record, context)
4614
+ const keys = new Array(mapped.length)
4615
+ for (let i = 0; i < mapped.length; i++) {
4616
+ const mappedRecord = mapped[i]
4617
+ keys[i] = index73_key.encode([mappedRecord.memberId, record.id])
4618
+ }
4619
+ return keys
4620
+ },
4621
+ reconstruct: (keyBuf, valueBuf) => valueBuf,
4622
+ offset: collection5.indexes.length,
4623
+ collection: collection5
4624
+ }
4625
+ collection5.indexes.push(index73)
4626
+
4627
+ // '@qvac/agent-hosts-by-agent' collection key
4628
+ const index74_key = new IndexEncoder([
4629
+ IndexEncoder.STRING,
4630
+ IndexEncoder.BUFFER,
4631
+ IndexEncoder.STRING
4632
+ ], { prefix: 74 })
4633
+
4634
+ function index74_indexify (record) {
4635
+ const arr = []
4636
+
4637
+ const a0 = record.agentId
4638
+ if (a0 === undefined) return arr
4639
+ arr.push(a0)
4640
+
4641
+ const a1 = record.writerKey
4642
+ if (a1 === undefined) return arr
4643
+ arr.push(a1)
4644
+
4645
+ const a2 = record.agentId
4646
+ if (a2 === undefined) return arr
4647
+ arr.push(a2)
4648
+
4649
+ return arr
4650
+ }
4651
+
4652
+ // '@qvac/agent-hosts-by-agent'
4653
+ const index74 = {
4654
+ name: '@qvac/agent-hosts-by-agent',
4655
+ version: 12,
4656
+ id: 74,
4657
+ encodeKey (record) {
4658
+ return index74_key.encode(index74_indexify(record))
4659
+ },
4660
+ encodeKeyRange ({ gt, lt, gte, lte } = {}) {
4661
+ return index74_key.encodeRange({
4662
+ gt: gt ? index74_indexify(gt) : null,
4663
+ lt: lt ? index74_indexify(lt) : null,
4664
+ gte: gte ? index74_indexify(gte) : null,
4665
+ lte: lte ? index74_indexify(lte) : null
4666
+ })
4667
+ },
4668
+ encodeValue: (record) => index74.collection.encodeKey(record),
4669
+ encodeIndexKeys (record, context) {
4670
+ return [index74_key.encode([record.agentId, record.writerKey, record.agentId])]
4671
+ },
4672
+ reconstruct: (keyBuf, valueBuf) => valueBuf,
4673
+ offset: collection65.indexes.length,
4674
+ collection: collection65
4675
+ }
4676
+ collection65.indexes.push(index74)
4677
+
4678
+ // '@qvac/agent-hosts-by-device' collection key
4679
+ const index75_key = new IndexEncoder([
4680
+ IndexEncoder.BUFFER,
4681
+ IndexEncoder.BUFFER,
4682
+ IndexEncoder.STRING
4683
+ ], { prefix: 75 })
4684
+
4685
+ function index75_indexify (record) {
4686
+ const arr = []
4687
+
4688
+ const a0 = record.deviceId
4689
+ if (a0 === undefined) return arr
4690
+ arr.push(a0)
4691
+
4692
+ const a1 = record.writerKey
4693
+ if (a1 === undefined) return arr
4694
+ arr.push(a1)
4695
+
4696
+ const a2 = record.agentId
4697
+ if (a2 === undefined) return arr
4698
+ arr.push(a2)
4699
+
4700
+ return arr
4701
+ }
4702
+
4703
+ // '@qvac/agent-hosts-by-device'
4704
+ const index75 = {
4705
+ name: '@qvac/agent-hosts-by-device',
4706
+ version: 12,
4707
+ id: 75,
4708
+ encodeKey (record) {
4709
+ return index75_key.encode(index75_indexify(record))
4710
+ },
4711
+ encodeKeyRange ({ gt, lt, gte, lte } = {}) {
4712
+ return index75_key.encodeRange({
4713
+ gt: gt ? index75_indexify(gt) : null,
4714
+ lt: lt ? index75_indexify(lt) : null,
4715
+ gte: gte ? index75_indexify(gte) : null,
4716
+ lte: lte ? index75_indexify(lte) : null
4717
+ })
4718
+ },
4719
+ encodeValue: (record) => index75.collection.encodeKey(record),
4720
+ encodeIndexKeys (record, context) {
4721
+ return [index75_key.encode([record.deviceId, record.writerKey, record.agentId])]
4722
+ },
4723
+ reconstruct: (keyBuf, valueBuf) => valueBuf,
4724
+ offset: collection65.indexes.length,
4725
+ collection: collection65
4726
+ }
4727
+ collection65.indexes.push(index75)
4728
+
4729
+ // '@qvac/public-seeds-by-device' collection key
4730
+ const index76_key = new IndexEncoder([
4731
+ IndexEncoder.BUFFER,
4732
+ IndexEncoder.BUFFER,
4733
+ IndexEncoder.BUFFER
4734
+ ], { prefix: 76 })
4735
+
4736
+ function index76_indexify (record) {
4737
+ const arr = []
4738
+
4739
+ const a0 = record.deviceId
4740
+ if (a0 === undefined) return arr
4741
+ arr.push(a0)
4742
+
4743
+ const a1 = record.memberId
4744
+ if (a1 === undefined) return arr
4745
+ arr.push(a1)
4746
+
4747
+ const a2 = record.deviceId
4748
+ if (a2 === undefined) return arr
4749
+ arr.push(a2)
4750
+
4751
+ return arr
4752
+ }
4753
+
4754
+ // '@qvac/public-seeds-by-device'
4755
+ const index76 = {
4756
+ name: '@qvac/public-seeds-by-device',
4757
+ version: 12,
4758
+ id: 76,
4759
+ encodeKey (record) {
4760
+ return index76_key.encode(index76_indexify(record))
4761
+ },
4762
+ encodeKeyRange ({ gt, lt, gte, lte } = {}) {
4763
+ return index76_key.encodeRange({
4764
+ gt: gt ? index76_indexify(gt) : null,
4765
+ lt: lt ? index76_indexify(lt) : null,
4766
+ gte: gte ? index76_indexify(gte) : null,
4767
+ lte: lte ? index76_indexify(lte) : null
4768
+ })
4769
+ },
4770
+ encodeValue: (record) => index76.collection.encodeKey(record),
4771
+ encodeIndexKeys (record, context) {
4772
+ return [index76_key.encode([record.deviceId, record.memberId, record.deviceId])]
4773
+ },
4774
+ reconstruct: (keyBuf, valueBuf) => valueBuf,
4775
+ offset: collection56.indexes.length,
4776
+ collection: collection56
4777
+ }
4778
+ collection56.indexes.push(index76)
4779
+
4780
+ // '@qvac/project-host-keys-by-device' collection key
4781
+ const index77_key = new IndexEncoder([
4782
+ IndexEncoder.BUFFER,
4783
+ IndexEncoder.BUFFER,
4784
+ IndexEncoder.BUFFER
4785
+ ], { prefix: 77 })
4786
+
4787
+ function index77_indexify (record) {
4788
+ const arr = []
4789
+
4790
+ const a0 = record.deviceId
4791
+ if (a0 === undefined) return arr
4792
+ arr.push(a0)
4793
+
4794
+ const a1 = record.projectId
4795
+ if (a1 === undefined) return arr
4796
+ arr.push(a1)
4797
+
4798
+ const a2 = record.deviceId
4799
+ if (a2 === undefined) return arr
4800
+ arr.push(a2)
4801
+
4802
+ return arr
4803
+ }
4804
+
4805
+ // '@qvac/project-host-keys-by-device'
4806
+ const index77 = {
4807
+ name: '@qvac/project-host-keys-by-device',
4808
+ version: 12,
4809
+ id: 77,
4810
+ encodeKey (record) {
4811
+ return index77_key.encode(index77_indexify(record))
4812
+ },
4813
+ encodeKeyRange ({ gt, lt, gte, lte } = {}) {
4814
+ return index77_key.encodeRange({
4815
+ gt: gt ? index77_indexify(gt) : null,
4816
+ lt: lt ? index77_indexify(lt) : null,
4817
+ gte: gte ? index77_indexify(gte) : null,
4818
+ lte: lte ? index77_indexify(lte) : null
4819
+ })
4820
+ },
4821
+ encodeValue: (record) => index77.collection.encodeKey(record),
4822
+ encodeIndexKeys (record, context) {
4823
+ return [index77_key.encode([record.deviceId, record.projectId, record.deviceId])]
4824
+ },
4825
+ reconstruct: (keyBuf, valueBuf) => valueBuf,
4826
+ offset: collection69.indexes.length,
4827
+ collection: collection69
4828
+ }
4829
+ collection69.indexes.push(index77)
4830
+
4831
+ // '@qvac/project-device-keys-by-device' collection key
4832
+ const index78_key = new IndexEncoder([
4833
+ IndexEncoder.BUFFER,
4834
+ IndexEncoder.BUFFER,
4835
+ IndexEncoder.BUFFER
4836
+ ], { prefix: 78 })
4837
+
4838
+ function index78_indexify (record) {
4839
+ const arr = []
4840
+
4841
+ const a0 = record.deviceId
4842
+ if (a0 === undefined) return arr
4843
+ arr.push(a0)
4844
+
4845
+ const a1 = record.projectId
4846
+ if (a1 === undefined) return arr
4847
+ arr.push(a1)
4848
+
4849
+ const a2 = record.deviceId
4850
+ if (a2 === undefined) return arr
4851
+ arr.push(a2)
4852
+
4853
+ return arr
4854
+ }
4855
+
4856
+ // '@qvac/project-device-keys-by-device'
4857
+ const index78 = {
4858
+ name: '@qvac/project-device-keys-by-device',
4859
+ version: 12,
4860
+ id: 78,
4861
+ encodeKey (record) {
4862
+ return index78_key.encode(index78_indexify(record))
4863
+ },
4864
+ encodeKeyRange ({ gt, lt, gte, lte } = {}) {
4865
+ return index78_key.encodeRange({
4866
+ gt: gt ? index78_indexify(gt) : null,
4867
+ lt: lt ? index78_indexify(lt) : null,
4868
+ gte: gte ? index78_indexify(gte) : null,
4869
+ lte: lte ? index78_indexify(lte) : null
4870
+ })
4871
+ },
4872
+ encodeValue: (record) => index78.collection.encodeKey(record),
4873
+ encodeIndexKeys (record, context) {
4874
+ return [index78_key.encode([record.deviceId, record.projectId, record.deviceId])]
4875
+ },
4876
+ reconstruct: (keyBuf, valueBuf) => valueBuf,
4877
+ offset: collection70.indexes.length,
4878
+ collection: collection70
4879
+ }
4880
+ collection70.indexes.push(index78)
4881
+
4882
+ // '@qvac/project-device-keys-by-member' collection key
4883
+ const index79_key = new IndexEncoder([
4884
+ IndexEncoder.BUFFER,
4885
+ IndexEncoder.BUFFER,
4886
+ IndexEncoder.BUFFER
4887
+ ], { prefix: 79 })
4888
+
4889
+ function index79_indexify (record) {
4890
+ const arr = []
4891
+
4892
+ const a0 = record.memberId
4893
+ if (a0 === undefined) return arr
4894
+ arr.push(a0)
4895
+
4896
+ const a1 = record.projectId
4897
+ if (a1 === undefined) return arr
4898
+ arr.push(a1)
4899
+
4900
+ const a2 = record.deviceId
4901
+ if (a2 === undefined) return arr
4902
+ arr.push(a2)
4903
+
4904
+ return arr
4905
+ }
4906
+
4907
+ // '@qvac/project-device-keys-by-member'
4908
+ const index79 = {
4909
+ name: '@qvac/project-device-keys-by-member',
4910
+ version: 12,
4911
+ id: 79,
4912
+ encodeKey (record) {
4913
+ return index79_key.encode(index79_indexify(record))
4914
+ },
4915
+ encodeKeyRange ({ gt, lt, gte, lte } = {}) {
4916
+ return index79_key.encodeRange({
4917
+ gt: gt ? index79_indexify(gt) : null,
4918
+ lt: lt ? index79_indexify(lt) : null,
4919
+ gte: gte ? index79_indexify(gte) : null,
4920
+ lte: lte ? index79_indexify(lte) : null
4921
+ })
4922
+ },
4923
+ encodeValue: (record) => index79.collection.encodeKey(record),
4924
+ encodeIndexKeys (record, context) {
4925
+ return [index79_key.encode([record.memberId, record.projectId, record.deviceId])]
4926
+ },
4927
+ reconstruct: (keyBuf, valueBuf) => valueBuf,
4928
+ offset: collection70.indexes.length,
4929
+ collection: collection70
4930
+ }
4931
+ collection70.indexes.push(index79)
4932
+
4933
+ // '@qvac/agent-users-by-user' collection key
4934
+ const index80_key = new IndexEncoder([
4935
+ IndexEncoder.BUFFER,
4936
+ IndexEncoder.STRING,
4937
+ IndexEncoder.BUFFER
4938
+ ], { prefix: 80 })
4939
+
4940
+ function index80_indexify (record) {
4941
+ const arr = []
4942
+
4943
+ const a0 = record.userId
4944
+ if (a0 === undefined) return arr
4945
+ arr.push(a0)
4946
+
4947
+ const a1 = record.agentId
4948
+ if (a1 === undefined) return arr
4949
+ arr.push(a1)
4950
+
4951
+ const a2 = record.userId
4952
+ if (a2 === undefined) return arr
4953
+ arr.push(a2)
4954
+
4955
+ return arr
4956
+ }
4957
+
4958
+ // '@qvac/agent-users-by-user'
4959
+ const index80 = {
4960
+ name: '@qvac/agent-users-by-user',
4961
+ version: 12,
4962
+ id: 80,
4963
+ encodeKey (record) {
4964
+ return index80_key.encode(index80_indexify(record))
4965
+ },
4966
+ encodeKeyRange ({ gt, lt, gte, lte } = {}) {
4967
+ return index80_key.encodeRange({
4968
+ gt: gt ? index80_indexify(gt) : null,
4969
+ lt: lt ? index80_indexify(lt) : null,
4970
+ gte: gte ? index80_indexify(gte) : null,
4971
+ lte: lte ? index80_indexify(lte) : null
4972
+ })
4973
+ },
4974
+ encodeValue: (record) => index80.collection.encodeKey(record),
4975
+ encodeIndexKeys (record, context) {
4976
+ return [index80_key.encode([record.userId, record.agentId, record.userId])]
4977
+ },
4978
+ reconstruct: (keyBuf, valueBuf) => valueBuf,
4979
+ offset: collection66.indexes.length,
4980
+ collection: collection66
4981
+ }
4982
+ collection66.indexes.push(index80)
4983
+
4984
+ // '@qvac/project-keys-by-member' collection key
4985
+ const index81_key = new IndexEncoder([
4986
+ IndexEncoder.BUFFER,
4987
+ IndexEncoder.BUFFER,
4988
+ IndexEncoder.BUFFER
4989
+ ], { prefix: 81 })
4990
+
4991
+ function index81_indexify (record) {
4992
+ const arr = []
4993
+
4994
+ const a0 = record.memberId
4995
+ if (a0 === undefined) return arr
4996
+ arr.push(a0)
4997
+
4998
+ const a1 = record.projectId
4999
+ if (a1 === undefined) return arr
5000
+ arr.push(a1)
5001
+
5002
+ const a2 = record.memberId
5003
+ if (a2 === undefined) return arr
5004
+ arr.push(a2)
5005
+
5006
+ return arr
5007
+ }
5008
+
5009
+ // '@qvac/project-keys-by-member'
5010
+ const index81 = {
5011
+ name: '@qvac/project-keys-by-member',
5012
+ version: 12,
5013
+ id: 81,
5014
+ encodeKey (record) {
5015
+ return index81_key.encode(index81_indexify(record))
5016
+ },
5017
+ encodeKeyRange ({ gt, lt, gte, lte } = {}) {
5018
+ return index81_key.encodeRange({
5019
+ gt: gt ? index81_indexify(gt) : null,
5020
+ lt: lt ? index81_indexify(lt) : null,
5021
+ gte: gte ? index81_indexify(gte) : null,
5022
+ lte: lte ? index81_indexify(lte) : null
5023
+ })
5024
+ },
5025
+ encodeValue: (record) => index81.collection.encodeKey(record),
5026
+ encodeIndexKeys (record, context) {
5027
+ return [index81_key.encode([record.memberId, record.projectId, record.memberId])]
5028
+ },
5029
+ reconstruct: (keyBuf, valueBuf) => valueBuf,
5030
+ offset: collection68.indexes.length,
5031
+ collection: collection68
5032
+ }
5033
+ collection68.indexes.push(index81)
5034
+
5035
+ // '@qvac/terminal-run-statuses' collection key
5036
+ const index82_key = new IndexEncoder([
5037
+ IndexEncoder.STRING,
5038
+ IndexEncoder.STRING,
5039
+ IndexEncoder.STRING
5040
+ ], { prefix: 82 })
5041
+
5042
+ // '@qvac/terminal-run-statuses' has the following schema defined key map
5043
+ const index82_map = helpers0.terminalRunStatusesMap
5044
+
5045
+ function index82_indexify (record) {
5046
+ const arr = []
5047
+
5048
+ const a0 = record.chatId
5049
+ if (a0 === undefined) return arr
5050
+ arr.push(a0)
5051
+
5052
+ const a1 = record.runId
5053
+ if (a1 === undefined) return arr
5054
+ arr.push(a1)
5055
+
5056
+ return arr
5057
+ }
5058
+
5059
+ // '@qvac/terminal-run-statuses'
5060
+ const index82 = {
5061
+ name: '@qvac/terminal-run-statuses',
5062
+ version: 12,
5063
+ id: 82,
5064
+ encodeKey (record) {
5065
+ return index82_key.encode(index82_indexify(record))
5066
+ },
5067
+ encodeKeyRange ({ gt, lt, gte, lte } = {}) {
5068
+ return index82_key.encodeRange({
5069
+ gt: gt ? index82_indexify(gt) : null,
5070
+ lt: lt ? index82_indexify(lt) : null,
5071
+ gte: gte ? index82_indexify(gte) : null,
5072
+ lte: lte ? index82_indexify(lte) : null
5073
+ })
5074
+ },
5075
+ encodeValue: (record) => index82.collection.encodeKey(record),
5076
+ encodeIndexKeys (record, context) {
5077
+ const mapped = index82_map(record, context)
5078
+ const keys = new Array(mapped.length)
5079
+ for (let i = 0; i < mapped.length; i++) {
5080
+ const mappedRecord = mapped[i]
5081
+ keys[i] = index82_key.encode([mappedRecord.chatId, mappedRecord.runId, record.id])
5082
+ }
5083
+ return keys
5084
+ },
5085
+ reconstruct: (keyBuf, valueBuf) => valueBuf,
5086
+ offset: collection0.indexes.length,
5087
+ collection: collection0
5088
+ }
5089
+ collection0.indexes.push(index82)
5090
+
2941
5091
  const collections = [
2942
5092
  collection0,
2943
5093
  collection1,
@@ -2964,7 +5114,27 @@ const collections = [
2964
5114
  collection45,
2965
5115
  collection46,
2966
5116
  collection47,
2967
- collection48
5117
+ collection48,
5118
+ collection49,
5119
+ collection50,
5120
+ collection51,
5121
+ collection52,
5122
+ collection53,
5123
+ collection54,
5124
+ collection55,
5125
+ collection56,
5126
+ collection57,
5127
+ collection58,
5128
+ collection60,
5129
+ collection62,
5130
+ collection63,
5131
+ collection65,
5132
+ collection66,
5133
+ collection67,
5134
+ collection68,
5135
+ collection69,
5136
+ collection70,
5137
+ collection71
2968
5138
  ]
2969
5139
 
2970
5140
  const indexes = [
@@ -2990,7 +5160,21 @@ const indexes = [
2990
5160
  index36,
2991
5161
  index38,
2992
5162
  index39,
2993
- index43
5163
+ index43,
5164
+ index59,
5165
+ index61,
5166
+ index64,
5167
+ index72,
5168
+ index73,
5169
+ index74,
5170
+ index75,
5171
+ index76,
5172
+ index77,
5173
+ index78,
5174
+ index79,
5175
+ index80,
5176
+ index81,
5177
+ index82
2994
5178
  ]
2995
5179
 
2996
5180
  export default { versions, collections, indexes, resolveCollection, resolveIndex }
@@ -3023,6 +5207,26 @@ function resolveCollection (name) {
3023
5207
  case '@qvac/member-removals': return collection46
3024
5208
  case '@qvac/mesh-founders': return collection47
3025
5209
  case '@qvac/purged-chats': return collection48
5210
+ case '@qvac/mesh-names': return collection49
5211
+ case '@qvac/mesh-seeds': return collection50
5212
+ case '@qvac/chat-chunks': return collection51
5213
+ case '@qvac/mesh-rules': return collection52
5214
+ case '@qvac/public-meshes': return collection53
5215
+ case '@qvac/workspace': return collection54
5216
+ case '@qvac/member-roles': return collection55
5217
+ case '@qvac/public-seeds': return collection56
5218
+ case '@qvac/projects': return collection57
5219
+ case '@qvac/project-members': return collection58
5220
+ case '@qvac/project-order': return collection60
5221
+ case '@qvac/chat-reads': return collection62
5222
+ case '@qvac/knowledge-caps': return collection63
5223
+ case '@qvac/agent-hosts': return collection65
5224
+ case '@qvac/agent-users': return collection66
5225
+ case '@qvac/member-keys': return collection67
5226
+ case '@qvac/project-keys': return collection68
5227
+ case '@qvac/project-host-keys': return collection69
5228
+ case '@qvac/project-device-keys': return collection70
5229
+ case '@qvac/skill-secrets': return collection71
3026
5230
  default: return null
3027
5231
  }
3028
5232
  }
@@ -3052,6 +5256,20 @@ function resolveIndex (name) {
3052
5256
  case '@qvac/agents-by-provider': return index38
3053
5257
  case '@qvac/default-agents': return index39
3054
5258
  case '@qvac/live-devices-by-writer-key': return index43
5259
+ case '@qvac/active-knowledge-base': return index59
5260
+ case '@qvac/run-request-by-run': return index61
5261
+ case '@qvac/live-model-requests': return index64
5262
+ case '@qvac/live-devices-by-member': return index72
5263
+ case '@qvac/devices-by-member': return index73
5264
+ case '@qvac/agent-hosts-by-agent': return index74
5265
+ case '@qvac/agent-hosts-by-device': return index75
5266
+ case '@qvac/public-seeds-by-device': return index76
5267
+ case '@qvac/project-host-keys-by-device': return index77
5268
+ case '@qvac/project-device-keys-by-device': return index78
5269
+ case '@qvac/project-device-keys-by-member': return index79
5270
+ case '@qvac/agent-users-by-user': return index80
5271
+ case '@qvac/project-keys-by-member': return index81
5272
+ case '@qvac/terminal-run-statuses': return index82
3055
5273
  default: return null
3056
5274
  }
3057
5275
  }