@qvac/core 1.0.0-rc.2 → 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 (195) hide show
  1. package/CHANGELOG.md +158 -2
  2. package/dist-lib/index.d.ts +1 -0
  3. package/dist-lib/index.js +1 -0
  4. package/dist-lib/lib/api/chunk-delta.d.ts +7 -2
  5. package/dist-lib/lib/api/chunk-delta.js +89 -7
  6. package/dist-lib/lib/api/chunks.js +14 -8
  7. package/dist-lib/lib/api/config.d.ts +4 -1
  8. package/dist-lib/lib/api/config.js +45 -4
  9. package/dist-lib/lib/api/custom-models.js +3 -5
  10. package/dist-lib/lib/api/devices.js +3 -1
  11. package/dist-lib/lib/api/files.d.ts +1 -1
  12. package/dist-lib/lib/api/files.js +65 -8
  13. package/dist-lib/lib/api/instrument.js +12 -4
  14. package/dist-lib/lib/api/members.js +7 -13
  15. package/dist-lib/lib/api/mesh.d.ts +1 -3
  16. package/dist-lib/lib/api/mesh.js +2 -2
  17. package/dist-lib/lib/api/notifications.js +8 -4
  18. package/dist-lib/lib/api/projects.js +5 -1
  19. package/dist-lib/lib/api/rag.js +32 -19
  20. package/dist-lib/lib/api/served.js +2 -1
  21. package/dist-lib/lib/api/workspace.js +0 -1
  22. package/dist-lib/lib/assistant/harness.d.ts +8 -2
  23. package/dist-lib/lib/assistant/harness.js +17 -4
  24. package/dist-lib/lib/assistant/history.d.ts +1 -1
  25. package/dist-lib/lib/assistant/history.js +19 -13
  26. package/dist-lib/lib/assistant/message.d.ts +6 -1
  27. package/dist-lib/lib/assistant/message.js +22 -2
  28. package/dist-lib/lib/assistant/model-round.d.ts +5 -0
  29. package/dist-lib/lib/assistant/model-round.js +46 -18
  30. package/dist-lib/lib/assistant/pdf-budget.d.ts +10 -2
  31. package/dist-lib/lib/assistant/pdf-budget.js +10 -11
  32. package/dist-lib/lib/assistant/pdf-pages.d.ts +25 -0
  33. package/dist-lib/lib/assistant/pdf-pages.js +75 -0
  34. package/dist-lib/lib/assistant/round-host.js +5 -3
  35. package/dist-lib/lib/assistant-client.d.ts +2 -1
  36. package/dist-lib/lib/assistant-client.js +24 -6
  37. package/dist-lib/lib/assistant-tree.d.ts +2 -0
  38. package/dist-lib/lib/assistant-tree.js +8 -5
  39. package/dist-lib/lib/assistant.d.ts +20 -7
  40. package/dist-lib/lib/assistant.js +468 -240
  41. package/dist-lib/lib/client.js +10 -1
  42. package/dist-lib/lib/compaction.d.ts +3 -1
  43. package/dist-lib/lib/compaction.js +18 -4
  44. package/dist-lib/lib/constants.d.ts +3 -0
  45. package/dist-lib/lib/constants.js +3 -0
  46. package/dist-lib/lib/core/chat-activity.js +13 -16
  47. package/dist-lib/lib/core/chat-copy.js +1 -1
  48. package/dist-lib/lib/core/chat-fork.js +2 -1
  49. package/dist-lib/lib/core/chat-move.d.ts +4 -0
  50. package/dist-lib/lib/core/chat-move.js +42 -11
  51. package/dist-lib/lib/core/chat.d.ts +0 -1
  52. package/dist-lib/lib/core/chat.js +1 -1
  53. package/dist-lib/lib/core/chunk.d.ts +14 -3
  54. package/dist-lib/lib/core/chunk.js +112 -22
  55. package/dist-lib/lib/core/collections.d.ts +12 -1
  56. package/dist-lib/lib/core/collections.js +12 -1
  57. package/dist-lib/lib/core/config-value.d.ts +6 -0
  58. package/dist-lib/lib/core/config-value.js +14 -0
  59. package/dist-lib/lib/core/contract/activity.d.ts +3 -2
  60. package/dist-lib/lib/core/contract/activity.js +39 -21
  61. package/dist-lib/lib/core/contract/agent-join.js +15 -19
  62. package/dist-lib/lib/core/contract/agents.js +8 -7
  63. package/dist-lib/lib/core/contract/chat.d.ts +3 -0
  64. package/dist-lib/lib/core/contract/chat.js +12 -1
  65. package/dist-lib/lib/core/contract/chunks.js +16 -6
  66. package/dist-lib/lib/core/contract/devices.js +6 -4
  67. package/dist-lib/lib/core/contract/index.js +2 -1
  68. package/dist-lib/lib/core/contract/invites.js +12 -31
  69. package/dist-lib/lib/core/contract/joined-meshes.js +2 -1
  70. package/dist-lib/lib/core/contract/mesh-rules.js +4 -0
  71. package/dist-lib/lib/core/contract/model-requests.js +7 -6
  72. package/dist-lib/lib/core/contract/project-device-keys.js +15 -6
  73. package/dist-lib/lib/core/contract/project-host-keys.js +5 -4
  74. package/dist-lib/lib/core/contract/projects.js +12 -13
  75. package/dist-lib/lib/core/contract/public-seeds.js +5 -5
  76. package/dist-lib/lib/core/contract/roles.js +2 -1
  77. package/dist-lib/lib/core/contract/run-requests.d.ts +1 -1
  78. package/dist-lib/lib/core/contract/run-requests.js +19 -13
  79. package/dist-lib/lib/core/contract/shipped-rows.d.ts +2 -0
  80. package/dist-lib/lib/core/contract/shipped-rows.js +22 -0
  81. package/dist-lib/lib/core/contract/workspace.js +4 -10
  82. package/dist-lib/lib/core/contract/writers.js +20 -6
  83. package/dist-lib/lib/core/devices.d.ts +2 -1
  84. package/dist-lib/lib/core/devices.js +4 -2
  85. package/dist-lib/lib/core/document-attachment.d.ts +6 -3
  86. package/dist-lib/lib/core/document-attachment.js +10 -5
  87. package/dist-lib/lib/core/files/attachments.js +3 -3
  88. package/dist-lib/lib/core/files/index.d.ts +8 -5
  89. package/dist-lib/lib/core/files/index.js +109 -18
  90. package/dist-lib/lib/core/files/processing/index.d.ts +1 -1
  91. package/dist-lib/lib/core/files/processing/index.js +8 -2
  92. package/dist-lib/lib/core/files/processing/source.d.ts +1 -0
  93. package/dist-lib/lib/core/files/processing/source.js +3 -0
  94. package/dist-lib/lib/core/files/processing/state.d.ts +1 -0
  95. package/dist-lib/lib/core/files/processing/state.js +7 -0
  96. package/dist-lib/lib/core/files/rag/build.d.ts +1 -0
  97. package/dist-lib/lib/core/files/rag/build.js +14 -1
  98. package/dist-lib/lib/core/files/rag/index.d.ts +1 -1
  99. package/dist-lib/lib/core/files/rag/index.js +1 -1
  100. package/dist-lib/lib/core/files/rag/produce.js +1 -0
  101. package/dist-lib/lib/core/files/rag/retrieval/full-text.d.ts +2 -0
  102. package/dist-lib/lib/core/files/rag/retrieval/full-text.js +7 -1
  103. package/dist-lib/lib/core/first-event.d.ts +6 -0
  104. package/dist-lib/lib/core/first-event.js +13 -0
  105. package/dist-lib/lib/core/invite.d.ts +2 -2
  106. package/dist-lib/lib/core/invite.js +5 -4
  107. package/dist-lib/lib/core/local/index.d.ts +10 -1
  108. package/dist-lib/lib/core/local/index.js +105 -10
  109. package/dist-lib/lib/core/mesh.d.ts +15 -4
  110. package/dist-lib/lib/core/mesh.js +128 -57
  111. package/dist-lib/lib/core/migrations/chat-chunks.d.ts +4 -0
  112. package/dist-lib/lib/core/migrations/chat-chunks.js +47 -0
  113. package/dist-lib/lib/core/migrations/file-index.d.ts +1 -1
  114. package/dist-lib/lib/core/migrations/file-index.js +6 -2
  115. package/dist-lib/lib/core/migrations/index.d.ts +2 -1
  116. package/dist-lib/lib/core/migrations/index.js +66 -9
  117. package/dist-lib/lib/core/notification.js +96 -23
  118. package/dist-lib/lib/core/pdf/figure.d.ts +22 -0
  119. package/dist-lib/lib/core/pdf/figure.js +64 -0
  120. package/dist-lib/lib/core/pdf/rasterize.d.ts +10 -1
  121. package/dist-lib/lib/core/pdf/rasterize.js +72 -22
  122. package/dist-lib/lib/core/peer-duplex.js +57 -5
  123. package/dist-lib/lib/core/public-mesh.js +8 -2
  124. package/dist-lib/lib/core/run-requests.js +2 -3
  125. package/dist-lib/lib/core/senders.d.ts +7 -6
  126. package/dist-lib/lib/core/senders.js +23 -30
  127. package/dist-lib/lib/core/shared-agents.d.ts +1 -0
  128. package/dist-lib/lib/core/shared-agents.js +47 -19
  129. package/dist-lib/lib/core/sync/background.d.ts +3 -15
  130. package/dist-lib/lib/core/sync/background.js +25 -102
  131. package/dist-lib/lib/core/sync/devices.js +6 -3
  132. package/dist-lib/lib/core/sync/index.js +12 -2
  133. package/dist-lib/lib/core/sync-status.js +3 -3
  134. package/dist-lib/lib/core.d.ts +59 -10
  135. package/dist-lib/lib/core.js +706 -174
  136. package/dist-lib/lib/credential-pusher.d.ts +11 -7
  137. package/dist-lib/lib/credential-pusher.js +40 -8
  138. package/dist-lib/lib/device-tree.d.ts +18 -0
  139. package/dist-lib/lib/device-tree.js +32 -0
  140. package/dist-lib/lib/doctor/redact.js +1 -1
  141. package/dist-lib/lib/errors.d.ts +4 -0
  142. package/dist-lib/lib/errors.js +4 -0
  143. package/dist-lib/lib/fs-drive-bridge.d.ts +7 -0
  144. package/dist-lib/lib/fs-drive-bridge.js +308 -30
  145. package/dist-lib/lib/integrations/setup-routes.js +7 -5
  146. package/dist-lib/lib/knowledge-search.d.ts +1 -1
  147. package/dist-lib/lib/knowledge-search.js +5 -46
  148. package/dist-lib/lib/kv-cache-retention.d.ts +35 -0
  149. package/dist-lib/lib/kv-cache-retention.js +98 -0
  150. package/dist-lib/lib/latest-frame.d.ts +10 -0
  151. package/dist-lib/lib/latest-frame.js +48 -0
  152. package/dist-lib/lib/model-download.d.ts +6 -1
  153. package/dist-lib/lib/model-download.js +32 -17
  154. package/dist-lib/lib/oauth/resolve.js +13 -5
  155. package/dist-lib/lib/reconnecting-watch.js +19 -11
  156. package/dist-lib/lib/run-notices.d.ts +2 -0
  157. package/dist-lib/lib/run-notices.js +5 -0
  158. package/dist-lib/lib/run-replay.d.ts +13 -1
  159. package/dist-lib/lib/run-replay.js +58 -21
  160. package/dist-lib/schema/build.js +66 -57
  161. package/dist-lib/schema/content.js +2 -1
  162. package/dist-lib/schema/engine.js +37 -5
  163. package/dist-lib/schema/field-order.js +7 -1
  164. package/dist-lib/schema/indexes.d.ts +4 -0
  165. package/dist-lib/schema/indexes.js +18 -0
  166. package/dist-lib/schema/local.js +9 -2
  167. package/dist-lib/schema/qvac.js +112 -4
  168. package/dist-lib/spec/bind.js +3 -0
  169. package/dist-lib/spec/calls.js +1 -0
  170. package/dist-lib/spec/capabilities.d.ts +2 -0
  171. package/dist-lib/spec/hrpc/hrpc.json +13 -0
  172. package/dist-lib/spec/hrpc/index.js +15 -3
  173. package/dist-lib/spec/hrpc/messages.js +1475 -1392
  174. package/dist-lib/spec/hyperschema/index.js +1475 -1392
  175. package/dist-lib/spec/hyperschema/schema.json +86 -1
  176. package/dist-lib/spec/hyperschema/types.d.ts +21 -1
  177. package/dist-lib/spec/local/hyperdb/messages.js +110 -54
  178. package/dist-lib/spec/local/hyperschema/index.js +56 -28
  179. package/dist-lib/spec/local/hyperschema/schema.json +55 -20
  180. package/dist-lib/spec/local/hyperschema/types.d.ts +8 -1
  181. package/dist-lib/spec/mesh/hyperdb/db.json +255 -51
  182. package/dist-lib/spec/mesh/hyperdb/index.js +1063 -404
  183. package/dist-lib/spec/mesh/hyperdb/messages.js +1647 -1214
  184. package/dist-lib/spec/mesh/hyperdispatch/dispatch.json +62 -56
  185. package/dist-lib/spec/mesh/hyperdispatch/index.js +156 -139
  186. package/dist-lib/spec/mesh/hyperdispatch/messages.js +787 -629
  187. package/dist-lib/spec/mesh/hyperschema/index.js +787 -629
  188. package/dist-lib/spec/mesh/hyperschema/schema.json +283 -174
  189. package/dist-lib/spec/mesh/hyperschema/types.d.ts +29 -1
  190. package/package.json +23 -17
  191. package/worker/assistant-sidecar.mjs +3 -0
  192. package/dist-lib/lib/core/files/processing/settle.d.ts +0 -13
  193. package/dist-lib/lib/core/files/processing/settle.js +0 -86
  194. package/dist-lib/lib/core/migrations/device-indexes.d.ts +0 -2
  195. package/dist-lib/lib/core/migrations/device-indexes.js +0 -7
@@ -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: 11 }
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: 11,
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: 11,
517
+ version: 12,
518
518
  encodeKey (record) {
519
519
  const key = [record.id]
520
520
  return collection7_key.encode(key)
@@ -3072,20 +3072,30 @@ const collection50 = {
3072
3072
  decodedVersion: 0
3073
3073
  }
3074
3074
 
3075
- // '@qvac/mesh-rules' collection key
3075
+ // '@qvac/chat-chunks' collection key
3076
3076
  const collection51_key = new IndexEncoder([
3077
- IndexEncoder.STRING
3077
+ IndexEncoder.STRING,
3078
+ IndexEncoder.UINT
3078
3079
  ], { prefix: 51 })
3079
3080
 
3080
3081
  function collection51_indexify (record) {
3081
- const a = record.id
3082
- return a === undefined ? [] : [a]
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
3083
3093
  }
3084
3094
 
3085
- // '@qvac/mesh-rules' value encoding
3086
- const collection51_enc = getEncoding('@qvac/mesh-rules/hyperdb#51')
3095
+ // '@qvac/chat-chunks' value encoding
3096
+ const collection51_enc = getEncoding('@qvac/chunk/hyperdb#51')
3087
3097
 
3088
- // '@qvac/mesh-rules' reconstruction function
3098
+ // '@qvac/chat-chunks' reconstruction function
3089
3099
  function collection51_reconstruct (schemaVersion, keyBuf, valueBuf) {
3090
3100
  const key = collection51_key.decode(keyBuf)
3091
3101
  setVersion(schemaVersion)
@@ -3094,24 +3104,26 @@ function collection51_reconstruct (schemaVersion, keyBuf, valueBuf) {
3094
3104
  if (type !== 0) throw new Error('Unknown collection type: ' + type)
3095
3105
  collection51.decodedVersion = c.uint.decode(state)
3096
3106
  const record = collection51_enc.decode(state)
3097
- record.id = key[0]
3107
+ record.chatId = key[0]
3108
+ record.seq = key[1]
3098
3109
  return record
3099
3110
  }
3100
- // '@qvac/mesh-rules' key reconstruction function
3111
+ // '@qvac/chat-chunks' key reconstruction function
3101
3112
  function collection51_reconstruct_key (keyBuf) {
3102
3113
  const key = collection51_key.decode(keyBuf)
3103
3114
  return {
3104
- id: key[0]
3115
+ chatId: key[0],
3116
+ seq: key[1]
3105
3117
  }
3106
3118
  }
3107
3119
 
3108
- // '@qvac/mesh-rules'
3120
+ // '@qvac/chat-chunks'
3109
3121
  const collection51 = {
3110
- name: '@qvac/mesh-rules',
3122
+ name: '@qvac/chat-chunks',
3111
3123
  id: 51,
3112
3124
  version: 11,
3113
3125
  encodeKey (record) {
3114
- const key = [record.id]
3126
+ const key = [record.chatId, record.seq]
3115
3127
  return collection51_key.encode(key)
3116
3128
  },
3117
3129
  encodeKeyRange ({ gt, lt, gte, lte } = {}) {
@@ -3139,7 +3151,7 @@ const collection51 = {
3139
3151
  decodedVersion: 0
3140
3152
  }
3141
3153
 
3142
- // '@qvac/public-meshes' collection key
3154
+ // '@qvac/mesh-rules' collection key
3143
3155
  const collection52_key = new IndexEncoder([
3144
3156
  IndexEncoder.STRING
3145
3157
  ], { prefix: 52 })
@@ -3149,10 +3161,10 @@ function collection52_indexify (record) {
3149
3161
  return a === undefined ? [] : [a]
3150
3162
  }
3151
3163
 
3152
- // '@qvac/public-meshes' value encoding
3153
- const collection52_enc = getEncoding('@qvac/public-mesh/hyperdb#52')
3164
+ // '@qvac/mesh-rules' value encoding
3165
+ const collection52_enc = getEncoding('@qvac/mesh-rules/hyperdb#52')
3154
3166
 
3155
- // '@qvac/public-meshes' reconstruction function
3167
+ // '@qvac/mesh-rules' reconstruction function
3156
3168
  function collection52_reconstruct (schemaVersion, keyBuf, valueBuf) {
3157
3169
  const key = collection52_key.decode(keyBuf)
3158
3170
  setVersion(schemaVersion)
@@ -3164,7 +3176,7 @@ function collection52_reconstruct (schemaVersion, keyBuf, valueBuf) {
3164
3176
  record.id = key[0]
3165
3177
  return record
3166
3178
  }
3167
- // '@qvac/public-meshes' key reconstruction function
3179
+ // '@qvac/mesh-rules' key reconstruction function
3168
3180
  function collection52_reconstruct_key (keyBuf) {
3169
3181
  const key = collection52_key.decode(keyBuf)
3170
3182
  return {
@@ -3172,11 +3184,11 @@ function collection52_reconstruct_key (keyBuf) {
3172
3184
  }
3173
3185
  }
3174
3186
 
3175
- // '@qvac/public-meshes'
3187
+ // '@qvac/mesh-rules'
3176
3188
  const collection52 = {
3177
- name: '@qvac/public-meshes',
3189
+ name: '@qvac/mesh-rules',
3178
3190
  id: 52,
3179
- version: 11,
3191
+ version: 12,
3180
3192
  encodeKey (record) {
3181
3193
  const key = [record.id]
3182
3194
  return collection52_key.encode(key)
@@ -3206,7 +3218,7 @@ const collection52 = {
3206
3218
  decodedVersion: 0
3207
3219
  }
3208
3220
 
3209
- // '@qvac/workspace' collection key
3221
+ // '@qvac/public-meshes' collection key
3210
3222
  const collection53_key = new IndexEncoder([
3211
3223
  IndexEncoder.STRING
3212
3224
  ], { prefix: 53 })
@@ -3216,10 +3228,10 @@ function collection53_indexify (record) {
3216
3228
  return a === undefined ? [] : [a]
3217
3229
  }
3218
3230
 
3219
- // '@qvac/workspace' value encoding
3220
- const collection53_enc = getEncoding('@qvac/workspace/hyperdb#53')
3231
+ // '@qvac/public-meshes' value encoding
3232
+ const collection53_enc = getEncoding('@qvac/public-mesh/hyperdb#53')
3221
3233
 
3222
- // '@qvac/workspace' reconstruction function
3234
+ // '@qvac/public-meshes' reconstruction function
3223
3235
  function collection53_reconstruct (schemaVersion, keyBuf, valueBuf) {
3224
3236
  const key = collection53_key.decode(keyBuf)
3225
3237
  setVersion(schemaVersion)
@@ -3231,7 +3243,7 @@ function collection53_reconstruct (schemaVersion, keyBuf, valueBuf) {
3231
3243
  record.id = key[0]
3232
3244
  return record
3233
3245
  }
3234
- // '@qvac/workspace' key reconstruction function
3246
+ // '@qvac/public-meshes' key reconstruction function
3235
3247
  function collection53_reconstruct_key (keyBuf) {
3236
3248
  const key = collection53_key.decode(keyBuf)
3237
3249
  return {
@@ -3239,11 +3251,11 @@ function collection53_reconstruct_key (keyBuf) {
3239
3251
  }
3240
3252
  }
3241
3253
 
3242
- // '@qvac/workspace'
3254
+ // '@qvac/public-meshes'
3243
3255
  const collection53 = {
3244
- name: '@qvac/workspace',
3256
+ name: '@qvac/public-meshes',
3245
3257
  id: 53,
3246
- version: 11,
3258
+ version: 12,
3247
3259
  encodeKey (record) {
3248
3260
  const key = [record.id]
3249
3261
  return collection53_key.encode(key)
@@ -3273,20 +3285,20 @@ const collection53 = {
3273
3285
  decodedVersion: 0
3274
3286
  }
3275
3287
 
3276
- // '@qvac/member-roles' collection key
3288
+ // '@qvac/workspace' collection key
3277
3289
  const collection54_key = new IndexEncoder([
3278
- IndexEncoder.BUFFER
3290
+ IndexEncoder.STRING
3279
3291
  ], { prefix: 54 })
3280
3292
 
3281
3293
  function collection54_indexify (record) {
3282
- const a = record.memberId
3294
+ const a = record.id
3283
3295
  return a === undefined ? [] : [a]
3284
3296
  }
3285
3297
 
3286
- // '@qvac/member-roles' value encoding
3287
- const collection54_enc = getEncoding('@qvac/member-role/hyperdb#54')
3298
+ // '@qvac/workspace' value encoding
3299
+ const collection54_enc = getEncoding('@qvac/workspace/hyperdb#54')
3288
3300
 
3289
- // '@qvac/member-roles' reconstruction function
3301
+ // '@qvac/workspace' reconstruction function
3290
3302
  function collection54_reconstruct (schemaVersion, keyBuf, valueBuf) {
3291
3303
  const key = collection54_key.decode(keyBuf)
3292
3304
  setVersion(schemaVersion)
@@ -3295,24 +3307,24 @@ function collection54_reconstruct (schemaVersion, keyBuf, valueBuf) {
3295
3307
  if (type !== 0) throw new Error('Unknown collection type: ' + type)
3296
3308
  collection54.decodedVersion = c.uint.decode(state)
3297
3309
  const record = collection54_enc.decode(state)
3298
- record.memberId = key[0]
3310
+ record.id = key[0]
3299
3311
  return record
3300
3312
  }
3301
- // '@qvac/member-roles' key reconstruction function
3313
+ // '@qvac/workspace' key reconstruction function
3302
3314
  function collection54_reconstruct_key (keyBuf) {
3303
3315
  const key = collection54_key.decode(keyBuf)
3304
3316
  return {
3305
- memberId: key[0]
3317
+ id: key[0]
3306
3318
  }
3307
3319
  }
3308
3320
 
3309
- // '@qvac/member-roles'
3321
+ // '@qvac/workspace'
3310
3322
  const collection54 = {
3311
- name: '@qvac/member-roles',
3323
+ name: '@qvac/workspace',
3312
3324
  id: 54,
3313
- version: 11,
3325
+ version: 12,
3314
3326
  encodeKey (record) {
3315
- const key = [record.memberId]
3327
+ const key = [record.id]
3316
3328
  return collection54_key.encode(key)
3317
3329
  },
3318
3330
  encodeKeyRange ({ gt, lt, gte, lte } = {}) {
@@ -3340,30 +3352,20 @@ const collection54 = {
3340
3352
  decodedVersion: 0
3341
3353
  }
3342
3354
 
3343
- // '@qvac/public-seeds' collection key
3355
+ // '@qvac/member-roles' collection key
3344
3356
  const collection55_key = new IndexEncoder([
3345
- IndexEncoder.BUFFER,
3346
3357
  IndexEncoder.BUFFER
3347
3358
  ], { prefix: 55 })
3348
3359
 
3349
3360
  function collection55_indexify (record) {
3350
- const arr = []
3351
-
3352
- const a0 = record.memberId
3353
- if (a0 === undefined) return arr
3354
- arr.push(a0)
3355
-
3356
- const a1 = record.deviceId
3357
- if (a1 === undefined) return arr
3358
- arr.push(a1)
3359
-
3360
- return arr
3361
+ const a = record.memberId
3362
+ return a === undefined ? [] : [a]
3361
3363
  }
3362
3364
 
3363
- // '@qvac/public-seeds' value encoding
3364
- const collection55_enc = getEncoding('@qvac/public-seed/hyperdb#55')
3365
+ // '@qvac/member-roles' value encoding
3366
+ const collection55_enc = getEncoding('@qvac/member-role/hyperdb#55')
3365
3367
 
3366
- // '@qvac/public-seeds' reconstruction function
3368
+ // '@qvac/member-roles' reconstruction function
3367
3369
  function collection55_reconstruct (schemaVersion, keyBuf, valueBuf) {
3368
3370
  const key = collection55_key.decode(keyBuf)
3369
3371
  setVersion(schemaVersion)
@@ -3373,25 +3375,23 @@ function collection55_reconstruct (schemaVersion, keyBuf, valueBuf) {
3373
3375
  collection55.decodedVersion = c.uint.decode(state)
3374
3376
  const record = collection55_enc.decode(state)
3375
3377
  record.memberId = key[0]
3376
- record.deviceId = key[1]
3377
3378
  return record
3378
3379
  }
3379
- // '@qvac/public-seeds' key reconstruction function
3380
+ // '@qvac/member-roles' key reconstruction function
3380
3381
  function collection55_reconstruct_key (keyBuf) {
3381
3382
  const key = collection55_key.decode(keyBuf)
3382
3383
  return {
3383
- memberId: key[0],
3384
- deviceId: key[1]
3384
+ memberId: key[0]
3385
3385
  }
3386
3386
  }
3387
3387
 
3388
- // '@qvac/public-seeds'
3388
+ // '@qvac/member-roles'
3389
3389
  const collection55 = {
3390
- name: '@qvac/public-seeds',
3390
+ name: '@qvac/member-roles',
3391
3391
  id: 55,
3392
- version: 11,
3392
+ version: 12,
3393
3393
  encodeKey (record) {
3394
- const key = [record.memberId, record.deviceId]
3394
+ const key = [record.memberId]
3395
3395
  return collection55_key.encode(key)
3396
3396
  },
3397
3397
  encodeKeyRange ({ gt, lt, gte, lte } = {}) {
@@ -3419,20 +3419,30 @@ const collection55 = {
3419
3419
  decodedVersion: 0
3420
3420
  }
3421
3421
 
3422
- // '@qvac/projects' collection key
3422
+ // '@qvac/public-seeds' collection key
3423
3423
  const collection56_key = new IndexEncoder([
3424
+ IndexEncoder.BUFFER,
3424
3425
  IndexEncoder.BUFFER
3425
3426
  ], { prefix: 56 })
3426
3427
 
3427
3428
  function collection56_indexify (record) {
3428
- const a = record.id
3429
- return a === undefined ? [] : [a]
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
3430
3440
  }
3431
3441
 
3432
- // '@qvac/projects' value encoding
3433
- const collection56_enc = getEncoding('@qvac/project/hyperdb#56')
3442
+ // '@qvac/public-seeds' value encoding
3443
+ const collection56_enc = getEncoding('@qvac/public-seed/hyperdb#56')
3434
3444
 
3435
- // '@qvac/projects' reconstruction function
3445
+ // '@qvac/public-seeds' reconstruction function
3436
3446
  function collection56_reconstruct (schemaVersion, keyBuf, valueBuf) {
3437
3447
  const key = collection56_key.decode(keyBuf)
3438
3448
  setVersion(schemaVersion)
@@ -3441,24 +3451,26 @@ function collection56_reconstruct (schemaVersion, keyBuf, valueBuf) {
3441
3451
  if (type !== 0) throw new Error('Unknown collection type: ' + type)
3442
3452
  collection56.decodedVersion = c.uint.decode(state)
3443
3453
  const record = collection56_enc.decode(state)
3444
- record.id = key[0]
3454
+ record.memberId = key[0]
3455
+ record.deviceId = key[1]
3445
3456
  return record
3446
3457
  }
3447
- // '@qvac/projects' key reconstruction function
3458
+ // '@qvac/public-seeds' key reconstruction function
3448
3459
  function collection56_reconstruct_key (keyBuf) {
3449
3460
  const key = collection56_key.decode(keyBuf)
3450
3461
  return {
3451
- id: key[0]
3462
+ memberId: key[0],
3463
+ deviceId: key[1]
3452
3464
  }
3453
3465
  }
3454
3466
 
3455
- // '@qvac/projects'
3467
+ // '@qvac/public-seeds'
3456
3468
  const collection56 = {
3457
- name: '@qvac/projects',
3469
+ name: '@qvac/public-seeds',
3458
3470
  id: 56,
3459
- version: 11,
3471
+ version: 12,
3460
3472
  encodeKey (record) {
3461
- const key = [record.id]
3473
+ const key = [record.memberId, record.deviceId]
3462
3474
  return collection56_key.encode(key)
3463
3475
  },
3464
3476
  encodeKeyRange ({ gt, lt, gte, lte } = {}) {
@@ -3486,20 +3498,20 @@ const collection56 = {
3486
3498
  decodedVersion: 0
3487
3499
  }
3488
3500
 
3489
- // '@qvac/project-members' collection key
3501
+ // '@qvac/projects' collection key
3490
3502
  const collection57_key = new IndexEncoder([
3491
3503
  IndexEncoder.BUFFER
3492
3504
  ], { prefix: 57 })
3493
3505
 
3494
3506
  function collection57_indexify (record) {
3495
- const a = record.memberId
3507
+ const a = record.id
3496
3508
  return a === undefined ? [] : [a]
3497
3509
  }
3498
3510
 
3499
- // '@qvac/project-members' value encoding
3500
- const collection57_enc = getEncoding('@qvac/project-member/hyperdb#57')
3511
+ // '@qvac/projects' value encoding
3512
+ const collection57_enc = getEncoding('@qvac/project/hyperdb#57')
3501
3513
 
3502
- // '@qvac/project-members' reconstruction function
3514
+ // '@qvac/projects' reconstruction function
3503
3515
  function collection57_reconstruct (schemaVersion, keyBuf, valueBuf) {
3504
3516
  const key = collection57_key.decode(keyBuf)
3505
3517
  setVersion(schemaVersion)
@@ -3508,24 +3520,24 @@ function collection57_reconstruct (schemaVersion, keyBuf, valueBuf) {
3508
3520
  if (type !== 0) throw new Error('Unknown collection type: ' + type)
3509
3521
  collection57.decodedVersion = c.uint.decode(state)
3510
3522
  const record = collection57_enc.decode(state)
3511
- record.memberId = key[0]
3523
+ record.id = key[0]
3512
3524
  return record
3513
3525
  }
3514
- // '@qvac/project-members' key reconstruction function
3526
+ // '@qvac/projects' key reconstruction function
3515
3527
  function collection57_reconstruct_key (keyBuf) {
3516
3528
  const key = collection57_key.decode(keyBuf)
3517
3529
  return {
3518
- memberId: key[0]
3530
+ id: key[0]
3519
3531
  }
3520
3532
  }
3521
3533
 
3522
- // '@qvac/project-members'
3534
+ // '@qvac/projects'
3523
3535
  const collection57 = {
3524
- name: '@qvac/project-members',
3536
+ name: '@qvac/projects',
3525
3537
  id: 57,
3526
- version: 11,
3538
+ version: 12,
3527
3539
  encodeKey (record) {
3528
- const key = [record.memberId]
3540
+ const key = [record.id]
3529
3541
  return collection57_key.encode(key)
3530
3542
  },
3531
3543
  encodeKeyRange ({ gt, lt, gte, lte } = {}) {
@@ -3553,43 +3565,110 @@ const collection57 = {
3553
3565
  decodedVersion: 0
3554
3566
  }
3555
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
+
3556
3635
  // '@qvac/active-knowledge-base' collection key
3557
- const index58_key = new IndexEncoder([
3636
+ const index59_key = new IndexEncoder([
3558
3637
  IndexEncoder.UINT,
3559
3638
  IndexEncoder.STRING
3560
- ], { prefix: 58 })
3639
+ ], { prefix: 59 })
3561
3640
 
3562
3641
  // '@qvac/active-knowledge-base' has the following schema defined key map
3563
- const index58_map = helpers0.activeKnowledgeBaseMap
3642
+ const index59_map = helpers0.activeKnowledgeBaseMap
3564
3643
 
3565
- function index58_indexify (record) {
3644
+ function index59_indexify (record) {
3566
3645
  const a = record.createdAt
3567
3646
  return a === undefined ? [] : [a]
3568
3647
  }
3569
3648
 
3570
3649
  // '@qvac/active-knowledge-base'
3571
- const index58 = {
3650
+ const index59 = {
3572
3651
  name: '@qvac/active-knowledge-base',
3573
- version: 11,
3574
- id: 58,
3652
+ version: 12,
3653
+ id: 59,
3575
3654
  encodeKey (record) {
3576
- return index58_key.encode(index58_indexify(record))
3655
+ return index59_key.encode(index59_indexify(record))
3577
3656
  },
3578
3657
  encodeKeyRange ({ gt, lt, gte, lte } = {}) {
3579
- return index58_key.encodeRange({
3580
- gt: gt ? index58_indexify(gt) : null,
3581
- lt: lt ? index58_indexify(lt) : null,
3582
- gte: gte ? index58_indexify(gte) : null,
3583
- lte: lte ? index58_indexify(lte) : null
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
3584
3663
  })
3585
3664
  },
3586
- encodeValue: (record) => index58.collection.encodeKey(record),
3665
+ encodeValue: (record) => index59.collection.encodeKey(record),
3587
3666
  encodeIndexKeys (record, context) {
3588
- const mapped = index58_map(record, context)
3667
+ const mapped = index59_map(record, context)
3589
3668
  const keys = new Array(mapped.length)
3590
3669
  for (let i = 0; i < mapped.length; i++) {
3591
3670
  const mappedRecord = mapped[i]
3592
- keys[i] = index58_key.encode([mappedRecord.createdAt, record.id])
3671
+ keys[i] = index59_key.encode([mappedRecord.createdAt, record.id])
3593
3672
  }
3594
3673
  return keys
3595
3674
  },
@@ -3597,86 +3676,86 @@ const index58 = {
3597
3676
  offset: collection7.indexes.length,
3598
3677
  collection: collection7
3599
3678
  }
3600
- collection7.indexes.push(index58)
3679
+ collection7.indexes.push(index59)
3601
3680
 
3602
3681
  // '@qvac/project-order' collection key
3603
- const collection59_key = new IndexEncoder([
3682
+ const collection60_key = new IndexEncoder([
3604
3683
  IndexEncoder.BUFFER
3605
- ], { prefix: 59 })
3684
+ ], { prefix: 60 })
3606
3685
 
3607
- function collection59_indexify (record) {
3686
+ function collection60_indexify (record) {
3608
3687
  const a = record.workspaceKey
3609
3688
  return a === undefined ? [] : [a]
3610
3689
  }
3611
3690
 
3612
3691
  // '@qvac/project-order' value encoding
3613
- const collection59_enc = getEncoding('@qvac/project-order/hyperdb#59')
3692
+ const collection60_enc = getEncoding('@qvac/project-order/hyperdb#60')
3614
3693
 
3615
3694
  // '@qvac/project-order' reconstruction function
3616
- function collection59_reconstruct (schemaVersion, keyBuf, valueBuf) {
3617
- const key = collection59_key.decode(keyBuf)
3695
+ function collection60_reconstruct (schemaVersion, keyBuf, valueBuf) {
3696
+ const key = collection60_key.decode(keyBuf)
3618
3697
  setVersion(schemaVersion)
3619
3698
  const state = { start: 0, end: valueBuf.byteLength, buffer: valueBuf }
3620
3699
  const type = c.uint.decode(state)
3621
3700
  if (type !== 0) throw new Error('Unknown collection type: ' + type)
3622
- collection59.decodedVersion = c.uint.decode(state)
3623
- const record = collection59_enc.decode(state)
3701
+ collection60.decodedVersion = c.uint.decode(state)
3702
+ const record = collection60_enc.decode(state)
3624
3703
  record.workspaceKey = key[0]
3625
3704
  return record
3626
3705
  }
3627
3706
  // '@qvac/project-order' key reconstruction function
3628
- function collection59_reconstruct_key (keyBuf) {
3629
- const key = collection59_key.decode(keyBuf)
3707
+ function collection60_reconstruct_key (keyBuf) {
3708
+ const key = collection60_key.decode(keyBuf)
3630
3709
  return {
3631
3710
  workspaceKey: key[0]
3632
3711
  }
3633
3712
  }
3634
3713
 
3635
3714
  // '@qvac/project-order'
3636
- const collection59 = {
3715
+ const collection60 = {
3637
3716
  name: '@qvac/project-order',
3638
- id: 59,
3639
- version: 11,
3717
+ id: 60,
3718
+ version: 12,
3640
3719
  encodeKey (record) {
3641
3720
  const key = [record.workspaceKey]
3642
- return collection59_key.encode(key)
3721
+ return collection60_key.encode(key)
3643
3722
  },
3644
3723
  encodeKeyRange ({ gt, lt, gte, lte } = {}) {
3645
- return collection59_key.encodeRange({
3646
- gt: gt ? collection59_indexify(gt) : null,
3647
- lt: lt ? collection59_indexify(lt) : null,
3648
- gte: gte ? collection59_indexify(gte) : null,
3649
- lte: lte ? collection59_indexify(lte) : null
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
3650
3729
  })
3651
3730
  },
3652
3731
  encodeValue (schemaVersion, collectionVersion, record) {
3653
3732
  setVersion(schemaVersion)
3654
3733
  const state = { start: 0, end: 2, buffer: null }
3655
- collection59_enc.preencode(state, record)
3734
+ collection60_enc.preencode(state, record)
3656
3735
  state.buffer = b4a.allocUnsafe(state.end)
3657
3736
  state.buffer[state.start++] = 0
3658
3737
  state.buffer[state.start++] = collectionVersion
3659
- collection59_enc.encode(state, record)
3738
+ collection60_enc.encode(state, record)
3660
3739
  return state.buffer
3661
3740
  },
3662
3741
  trigger: null,
3663
- reconstruct: collection59_reconstruct,
3664
- reconstructKey: collection59_reconstruct_key,
3742
+ reconstruct: collection60_reconstruct,
3743
+ reconstructKey: collection60_reconstruct_key,
3665
3744
  indexes: [],
3666
3745
  decodedVersion: 0
3667
3746
  }
3668
3747
 
3669
3748
  // '@qvac/run-request-by-run' collection key
3670
- const index60_key = new IndexEncoder([
3749
+ const index61_key = new IndexEncoder([
3671
3750
  IndexEncoder.STRING,
3672
3751
  IndexEncoder.STRING,
3673
3752
  IndexEncoder.STRING
3674
- ], { prefix: 60 })
3753
+ ], { prefix: 61 })
3675
3754
 
3676
3755
  // '@qvac/run-request-by-run' has the following schema defined key map
3677
- const index60_map = helpers0.runRequestByRunMap
3756
+ const index61_map = helpers0.runRequestByRunMap
3678
3757
 
3679
- function index60_indexify (record) {
3758
+ function index61_indexify (record) {
3680
3759
  const arr = []
3681
3760
 
3682
3761
  const a0 = record.chatId
@@ -3691,28 +3770,28 @@ function index60_indexify (record) {
3691
3770
  }
3692
3771
 
3693
3772
  // '@qvac/run-request-by-run'
3694
- const index60 = {
3773
+ const index61 = {
3695
3774
  name: '@qvac/run-request-by-run',
3696
- version: 11,
3697
- id: 60,
3775
+ version: 12,
3776
+ id: 61,
3698
3777
  encodeKey (record) {
3699
- return index60_key.encode(index60_indexify(record))
3778
+ return index61_key.encode(index61_indexify(record))
3700
3779
  },
3701
3780
  encodeKeyRange ({ gt, lt, gte, lte } = {}) {
3702
- return index60_key.encodeRange({
3703
- gt: gt ? index60_indexify(gt) : null,
3704
- lt: lt ? index60_indexify(lt) : null,
3705
- gte: gte ? index60_indexify(gte) : null,
3706
- lte: lte ? index60_indexify(lte) : null
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
3707
3786
  })
3708
3787
  },
3709
- encodeValue: (record) => index60.collection.encodeKey(record),
3788
+ encodeValue: (record) => index61.collection.encodeKey(record),
3710
3789
  encodeIndexKeys (record, context) {
3711
- const mapped = index60_map(record, context)
3790
+ const mapped = index61_map(record, context)
3712
3791
  const keys = new Array(mapped.length)
3713
3792
  for (let i = 0; i < mapped.length; i++) {
3714
3793
  const mappedRecord = mapped[i]
3715
- keys[i] = index60_key.encode([mappedRecord.chatId, mappedRecord.runId, record.id])
3794
+ keys[i] = index61_key.encode([mappedRecord.chatId, mappedRecord.runId, record.id])
3716
3795
  }
3717
3796
  return keys
3718
3797
  },
@@ -3720,15 +3799,15 @@ const index60 = {
3720
3799
  offset: collection0.indexes.length,
3721
3800
  collection: collection0
3722
3801
  }
3723
- collection0.indexes.push(index60)
3802
+ collection0.indexes.push(index61)
3724
3803
 
3725
3804
  // '@qvac/chat-reads' collection key
3726
- const collection61_key = new IndexEncoder([
3805
+ const collection62_key = new IndexEncoder([
3727
3806
  IndexEncoder.STRING,
3728
3807
  IndexEncoder.BUFFER
3729
- ], { prefix: 61 })
3808
+ ], { prefix: 62 })
3730
3809
 
3731
- function collection61_indexify (record) {
3810
+ function collection62_indexify (record) {
3732
3811
  const arr = []
3733
3812
 
3734
3813
  const a0 = record.chatId
@@ -3743,24 +3822,24 @@ function collection61_indexify (record) {
3743
3822
  }
3744
3823
 
3745
3824
  // '@qvac/chat-reads' value encoding
3746
- const collection61_enc = getEncoding('@qvac/chat-read/hyperdb#61')
3825
+ const collection62_enc = getEncoding('@qvac/chat-read/hyperdb#62')
3747
3826
 
3748
3827
  // '@qvac/chat-reads' reconstruction function
3749
- function collection61_reconstruct (schemaVersion, keyBuf, valueBuf) {
3750
- const key = collection61_key.decode(keyBuf)
3828
+ function collection62_reconstruct (schemaVersion, keyBuf, valueBuf) {
3829
+ const key = collection62_key.decode(keyBuf)
3751
3830
  setVersion(schemaVersion)
3752
3831
  const state = { start: 0, end: valueBuf.byteLength, buffer: valueBuf }
3753
3832
  const type = c.uint.decode(state)
3754
3833
  if (type !== 0) throw new Error('Unknown collection type: ' + type)
3755
- collection61.decodedVersion = c.uint.decode(state)
3756
- const record = collection61_enc.decode(state)
3834
+ collection62.decodedVersion = c.uint.decode(state)
3835
+ const record = collection62_enc.decode(state)
3757
3836
  record.chatId = key[0]
3758
3837
  record.memberId = key[1]
3759
3838
  return record
3760
3839
  }
3761
3840
  // '@qvac/chat-reads' key reconstruction function
3762
- function collection61_reconstruct_key (keyBuf) {
3763
- const key = collection61_key.decode(keyBuf)
3841
+ function collection62_reconstruct_key (keyBuf) {
3842
+ const key = collection62_key.decode(keyBuf)
3764
3843
  return {
3765
3844
  chatId: key[0],
3766
3845
  memberId: key[1]
@@ -3768,117 +3847,117 @@ function collection61_reconstruct_key (keyBuf) {
3768
3847
  }
3769
3848
 
3770
3849
  // '@qvac/chat-reads'
3771
- const collection61 = {
3850
+ const collection62 = {
3772
3851
  name: '@qvac/chat-reads',
3773
- id: 61,
3774
- version: 11,
3852
+ id: 62,
3853
+ version: 12,
3775
3854
  encodeKey (record) {
3776
3855
  const key = [record.chatId, record.memberId]
3777
- return collection61_key.encode(key)
3856
+ return collection62_key.encode(key)
3778
3857
  },
3779
3858
  encodeKeyRange ({ gt, lt, gte, lte } = {}) {
3780
- return collection61_key.encodeRange({
3781
- gt: gt ? collection61_indexify(gt) : null,
3782
- lt: lt ? collection61_indexify(lt) : null,
3783
- gte: gte ? collection61_indexify(gte) : null,
3784
- lte: lte ? collection61_indexify(lte) : null
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
3785
3864
  })
3786
3865
  },
3787
3866
  encodeValue (schemaVersion, collectionVersion, record) {
3788
3867
  setVersion(schemaVersion)
3789
3868
  const state = { start: 0, end: 2, buffer: null }
3790
- collection61_enc.preencode(state, record)
3869
+ collection62_enc.preencode(state, record)
3791
3870
  state.buffer = b4a.allocUnsafe(state.end)
3792
3871
  state.buffer[state.start++] = 0
3793
3872
  state.buffer[state.start++] = collectionVersion
3794
- collection61_enc.encode(state, record)
3873
+ collection62_enc.encode(state, record)
3795
3874
  return state.buffer
3796
3875
  },
3797
3876
  trigger: null,
3798
- reconstruct: collection61_reconstruct,
3799
- reconstructKey: collection61_reconstruct_key,
3877
+ reconstruct: collection62_reconstruct,
3878
+ reconstructKey: collection62_reconstruct_key,
3800
3879
  indexes: [],
3801
3880
  decodedVersion: 0
3802
3881
  }
3803
3882
 
3804
3883
  // '@qvac/knowledge-caps' collection key
3805
- const collection62_key = new IndexEncoder([
3884
+ const collection63_key = new IndexEncoder([
3806
3885
  IndexEncoder.STRING
3807
- ], { prefix: 62 })
3886
+ ], { prefix: 63 })
3808
3887
 
3809
- function collection62_indexify (record) {
3888
+ function collection63_indexify (record) {
3810
3889
  const a = record.id
3811
3890
  return a === undefined ? [] : [a]
3812
3891
  }
3813
3892
 
3814
3893
  // '@qvac/knowledge-caps' value encoding
3815
- const collection62_enc = getEncoding('@qvac/knowledge-cap/hyperdb#62')
3894
+ const collection63_enc = getEncoding('@qvac/knowledge-cap/hyperdb#63')
3816
3895
 
3817
3896
  // '@qvac/knowledge-caps' reconstruction function
3818
- function collection62_reconstruct (schemaVersion, keyBuf, valueBuf) {
3819
- const key = collection62_key.decode(keyBuf)
3897
+ function collection63_reconstruct (schemaVersion, keyBuf, valueBuf) {
3898
+ const key = collection63_key.decode(keyBuf)
3820
3899
  setVersion(schemaVersion)
3821
3900
  const state = { start: 0, end: valueBuf.byteLength, buffer: valueBuf }
3822
3901
  const type = c.uint.decode(state)
3823
3902
  if (type !== 0) throw new Error('Unknown collection type: ' + type)
3824
- collection62.decodedVersion = c.uint.decode(state)
3825
- const record = collection62_enc.decode(state)
3903
+ collection63.decodedVersion = c.uint.decode(state)
3904
+ const record = collection63_enc.decode(state)
3826
3905
  record.id = key[0]
3827
3906
  return record
3828
3907
  }
3829
3908
  // '@qvac/knowledge-caps' key reconstruction function
3830
- function collection62_reconstruct_key (keyBuf) {
3831
- const key = collection62_key.decode(keyBuf)
3909
+ function collection63_reconstruct_key (keyBuf) {
3910
+ const key = collection63_key.decode(keyBuf)
3832
3911
  return {
3833
3912
  id: key[0]
3834
3913
  }
3835
3914
  }
3836
3915
 
3837
3916
  // '@qvac/knowledge-caps'
3838
- const collection62 = {
3917
+ const collection63 = {
3839
3918
  name: '@qvac/knowledge-caps',
3840
- id: 62,
3841
- version: 11,
3919
+ id: 63,
3920
+ version: 12,
3842
3921
  encodeKey (record) {
3843
3922
  const key = [record.id]
3844
- return collection62_key.encode(key)
3923
+ return collection63_key.encode(key)
3845
3924
  },
3846
3925
  encodeKeyRange ({ gt, lt, gte, lte } = {}) {
3847
- return collection62_key.encodeRange({
3848
- gt: gt ? collection62_indexify(gt) : null,
3849
- lt: lt ? collection62_indexify(lt) : null,
3850
- gte: gte ? collection62_indexify(gte) : null,
3851
- lte: lte ? collection62_indexify(lte) : null
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
3852
3931
  })
3853
3932
  },
3854
3933
  encodeValue (schemaVersion, collectionVersion, record) {
3855
3934
  setVersion(schemaVersion)
3856
3935
  const state = { start: 0, end: 2, buffer: null }
3857
- collection62_enc.preencode(state, record)
3936
+ collection63_enc.preencode(state, record)
3858
3937
  state.buffer = b4a.allocUnsafe(state.end)
3859
3938
  state.buffer[state.start++] = 0
3860
3939
  state.buffer[state.start++] = collectionVersion
3861
- collection62_enc.encode(state, record)
3940
+ collection63_enc.encode(state, record)
3862
3941
  return state.buffer
3863
3942
  },
3864
3943
  trigger: null,
3865
- reconstruct: collection62_reconstruct,
3866
- reconstructKey: collection62_reconstruct_key,
3944
+ reconstruct: collection63_reconstruct,
3945
+ reconstructKey: collection63_reconstruct_key,
3867
3946
  indexes: [],
3868
3947
  decodedVersion: 0
3869
3948
  }
3870
3949
 
3871
3950
  // '@qvac/live-model-requests' collection key
3872
- const index63_key = new IndexEncoder([
3951
+ const index64_key = new IndexEncoder([
3873
3952
  IndexEncoder.STRING,
3874
3953
  IndexEncoder.UINT,
3875
3954
  IndexEncoder.STRING
3876
- ], { prefix: 63 })
3955
+ ], { prefix: 64 })
3877
3956
 
3878
3957
  // '@qvac/live-model-requests' has the following schema defined key map
3879
- const index63_map = helpers0.liveModelRequestsMap
3958
+ const index64_map = helpers0.liveModelRequestsMap
3880
3959
 
3881
- function index63_indexify (record) {
3960
+ function index64_indexify (record) {
3882
3961
  const arr = []
3883
3962
 
3884
3963
  const a0 = record.chatId
@@ -3893,28 +3972,28 @@ function index63_indexify (record) {
3893
3972
  }
3894
3973
 
3895
3974
  // '@qvac/live-model-requests'
3896
- const index63 = {
3975
+ const index64 = {
3897
3976
  name: '@qvac/live-model-requests',
3898
- version: 11,
3899
- id: 63,
3977
+ version: 12,
3978
+ id: 64,
3900
3979
  encodeKey (record) {
3901
- return index63_key.encode(index63_indexify(record))
3980
+ return index64_key.encode(index64_indexify(record))
3902
3981
  },
3903
3982
  encodeKeyRange ({ gt, lt, gte, lte } = {}) {
3904
- return index63_key.encodeRange({
3905
- gt: gt ? index63_indexify(gt) : null,
3906
- lt: lt ? index63_indexify(lt) : null,
3907
- gte: gte ? index63_indexify(gte) : null,
3908
- lte: lte ? index63_indexify(lte) : null
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
3909
3988
  })
3910
3989
  },
3911
- encodeValue: (record) => index63.collection.encodeKey(record),
3990
+ encodeValue: (record) => index64.collection.encodeKey(record),
3912
3991
  encodeIndexKeys (record, context) {
3913
- const mapped = index63_map(record, context)
3992
+ const mapped = index64_map(record, context)
3914
3993
  const keys = new Array(mapped.length)
3915
3994
  for (let i = 0; i < mapped.length; i++) {
3916
3995
  const mappedRecord = mapped[i]
3917
- keys[i] = index63_key.encode([mappedRecord.chatId, mappedRecord.seq, record.id])
3996
+ keys[i] = index64_key.encode([mappedRecord.chatId, mappedRecord.seq, record.id])
3918
3997
  }
3919
3998
  return keys
3920
3999
  },
@@ -3922,15 +4001,15 @@ const index63 = {
3922
4001
  offset: collection0.indexes.length,
3923
4002
  collection: collection0
3924
4003
  }
3925
- collection0.indexes.push(index63)
4004
+ collection0.indexes.push(index64)
3926
4005
 
3927
4006
  // '@qvac/agent-hosts' collection key
3928
- const collection64_key = new IndexEncoder([
4007
+ const collection65_key = new IndexEncoder([
3929
4008
  IndexEncoder.BUFFER,
3930
4009
  IndexEncoder.STRING
3931
- ], { prefix: 64 })
4010
+ ], { prefix: 65 })
3932
4011
 
3933
- function collection64_indexify (record) {
4012
+ function collection65_indexify (record) {
3934
4013
  const arr = []
3935
4014
 
3936
4015
  const a0 = record.writerKey
@@ -3945,24 +4024,24 @@ function collection64_indexify (record) {
3945
4024
  }
3946
4025
 
3947
4026
  // '@qvac/agent-hosts' value encoding
3948
- const collection64_enc = getEncoding('@qvac/agent-host/hyperdb#64')
4027
+ const collection65_enc = getEncoding('@qvac/agent-host/hyperdb#65')
3949
4028
 
3950
4029
  // '@qvac/agent-hosts' reconstruction function
3951
- function collection64_reconstruct (schemaVersion, keyBuf, valueBuf) {
3952
- const key = collection64_key.decode(keyBuf)
4030
+ function collection65_reconstruct (schemaVersion, keyBuf, valueBuf) {
4031
+ const key = collection65_key.decode(keyBuf)
3953
4032
  setVersion(schemaVersion)
3954
4033
  const state = { start: 0, end: valueBuf.byteLength, buffer: valueBuf }
3955
4034
  const type = c.uint.decode(state)
3956
4035
  if (type !== 0) throw new Error('Unknown collection type: ' + type)
3957
- collection64.decodedVersion = c.uint.decode(state)
3958
- const record = collection64_enc.decode(state)
4036
+ collection65.decodedVersion = c.uint.decode(state)
4037
+ const record = collection65_enc.decode(state)
3959
4038
  record.writerKey = key[0]
3960
4039
  record.agentId = key[1]
3961
4040
  return record
3962
4041
  }
3963
4042
  // '@qvac/agent-hosts' key reconstruction function
3964
- function collection64_reconstruct_key (keyBuf) {
3965
- const key = collection64_key.decode(keyBuf)
4043
+ function collection65_reconstruct_key (keyBuf) {
4044
+ const key = collection65_key.decode(keyBuf)
3966
4045
  return {
3967
4046
  writerKey: key[0],
3968
4047
  agentId: key[1]
@@ -3970,46 +4049,46 @@ function collection64_reconstruct_key (keyBuf) {
3970
4049
  }
3971
4050
 
3972
4051
  // '@qvac/agent-hosts'
3973
- const collection64 = {
4052
+ const collection65 = {
3974
4053
  name: '@qvac/agent-hosts',
3975
- id: 64,
3976
- version: 11,
4054
+ id: 65,
4055
+ version: 12,
3977
4056
  encodeKey (record) {
3978
4057
  const key = [record.writerKey, record.agentId]
3979
- return collection64_key.encode(key)
4058
+ return collection65_key.encode(key)
3980
4059
  },
3981
4060
  encodeKeyRange ({ gt, lt, gte, lte } = {}) {
3982
- return collection64_key.encodeRange({
3983
- gt: gt ? collection64_indexify(gt) : null,
3984
- lt: lt ? collection64_indexify(lt) : null,
3985
- gte: gte ? collection64_indexify(gte) : null,
3986
- lte: lte ? collection64_indexify(lte) : null
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
3987
4066
  })
3988
4067
  },
3989
4068
  encodeValue (schemaVersion, collectionVersion, record) {
3990
4069
  setVersion(schemaVersion)
3991
4070
  const state = { start: 0, end: 2, buffer: null }
3992
- collection64_enc.preencode(state, record)
4071
+ collection65_enc.preencode(state, record)
3993
4072
  state.buffer = b4a.allocUnsafe(state.end)
3994
4073
  state.buffer[state.start++] = 0
3995
4074
  state.buffer[state.start++] = collectionVersion
3996
- collection64_enc.encode(state, record)
4075
+ collection65_enc.encode(state, record)
3997
4076
  return state.buffer
3998
4077
  },
3999
4078
  trigger: null,
4000
- reconstruct: collection64_reconstruct,
4001
- reconstructKey: collection64_reconstruct_key,
4079
+ reconstruct: collection65_reconstruct,
4080
+ reconstructKey: collection65_reconstruct_key,
4002
4081
  indexes: [],
4003
4082
  decodedVersion: 0
4004
4083
  }
4005
4084
 
4006
4085
  // '@qvac/agent-users' collection key
4007
- const collection65_key = new IndexEncoder([
4086
+ const collection66_key = new IndexEncoder([
4008
4087
  IndexEncoder.STRING,
4009
4088
  IndexEncoder.BUFFER
4010
- ], { prefix: 65 })
4089
+ ], { prefix: 66 })
4011
4090
 
4012
- function collection65_indexify (record) {
4091
+ function collection66_indexify (record) {
4013
4092
  const arr = []
4014
4093
 
4015
4094
  const a0 = record.agentId
@@ -4024,78 +4103,9 @@ function collection65_indexify (record) {
4024
4103
  }
4025
4104
 
4026
4105
  // '@qvac/agent-users' value encoding
4027
- const collection65_enc = getEncoding('@qvac/agent-user/hyperdb#65')
4106
+ const collection66_enc = getEncoding('@qvac/agent-user/hyperdb#66')
4028
4107
 
4029
4108
  // '@qvac/agent-users' 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.agentId = key[0]
4039
- record.userId = key[1]
4040
- return record
4041
- }
4042
- // '@qvac/agent-users' key reconstruction function
4043
- function collection65_reconstruct_key (keyBuf) {
4044
- const key = collection65_key.decode(keyBuf)
4045
- return {
4046
- agentId: key[0],
4047
- userId: key[1]
4048
- }
4049
- }
4050
-
4051
- // '@qvac/agent-users'
4052
- const collection65 = {
4053
- name: '@qvac/agent-users',
4054
- id: 65,
4055
- version: 11,
4056
- encodeKey (record) {
4057
- const key = [record.agentId, record.userId]
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/member-keys' collection key
4086
- const collection66_key = new IndexEncoder([
4087
- IndexEncoder.BUFFER
4088
- ], { prefix: 66 })
4089
-
4090
- function collection66_indexify (record) {
4091
- const a = record.memberId
4092
- return a === undefined ? [] : [a]
4093
- }
4094
-
4095
- // '@qvac/member-keys' value encoding
4096
- const collection66_enc = getEncoding('@qvac/member-key/hyperdb#66')
4097
-
4098
- // '@qvac/member-keys' reconstruction function
4099
4109
  function collection66_reconstruct (schemaVersion, keyBuf, valueBuf) {
4100
4110
  const key = collection66_key.decode(keyBuf)
4101
4111
  setVersion(schemaVersion)
@@ -4104,24 +4114,26 @@ function collection66_reconstruct (schemaVersion, keyBuf, valueBuf) {
4104
4114
  if (type !== 0) throw new Error('Unknown collection type: ' + type)
4105
4115
  collection66.decodedVersion = c.uint.decode(state)
4106
4116
  const record = collection66_enc.decode(state)
4107
- record.memberId = key[0]
4117
+ record.agentId = key[0]
4118
+ record.userId = key[1]
4108
4119
  return record
4109
4120
  }
4110
- // '@qvac/member-keys' key reconstruction function
4121
+ // '@qvac/agent-users' key reconstruction function
4111
4122
  function collection66_reconstruct_key (keyBuf) {
4112
4123
  const key = collection66_key.decode(keyBuf)
4113
4124
  return {
4114
- memberId: key[0]
4125
+ agentId: key[0],
4126
+ userId: key[1]
4115
4127
  }
4116
4128
  }
4117
4129
 
4118
- // '@qvac/member-keys'
4130
+ // '@qvac/agent-users'
4119
4131
  const collection66 = {
4120
- name: '@qvac/member-keys',
4132
+ name: '@qvac/agent-users',
4121
4133
  id: 66,
4122
- version: 11,
4134
+ version: 12,
4123
4135
  encodeKey (record) {
4124
- const key = [record.memberId]
4136
+ const key = [record.agentId, record.userId]
4125
4137
  return collection66_key.encode(key)
4126
4138
  },
4127
4139
  encodeKeyRange ({ gt, lt, gte, lte } = {}) {
@@ -4149,30 +4161,20 @@ const collection66 = {
4149
4161
  decodedVersion: 0
4150
4162
  }
4151
4163
 
4152
- // '@qvac/project-keys' collection key
4164
+ // '@qvac/member-keys' collection key
4153
4165
  const collection67_key = new IndexEncoder([
4154
- IndexEncoder.BUFFER,
4155
4166
  IndexEncoder.BUFFER
4156
4167
  ], { prefix: 67 })
4157
4168
 
4158
4169
  function collection67_indexify (record) {
4159
- const arr = []
4160
-
4161
- const a0 = record.projectId
4162
- if (a0 === undefined) return arr
4163
- arr.push(a0)
4164
-
4165
- const a1 = record.memberId
4166
- if (a1 === undefined) return arr
4167
- arr.push(a1)
4168
-
4169
- return arr
4170
+ const a = record.memberId
4171
+ return a === undefined ? [] : [a]
4170
4172
  }
4171
4173
 
4172
- // '@qvac/project-keys' value encoding
4173
- const collection67_enc = getEncoding('@qvac/project-key/hyperdb#67')
4174
+ // '@qvac/member-keys' value encoding
4175
+ const collection67_enc = getEncoding('@qvac/member-key/hyperdb#67')
4174
4176
 
4175
- // '@qvac/project-keys' reconstruction function
4177
+ // '@qvac/member-keys' reconstruction function
4176
4178
  function collection67_reconstruct (schemaVersion, keyBuf, valueBuf) {
4177
4179
  const key = collection67_key.decode(keyBuf)
4178
4180
  setVersion(schemaVersion)
@@ -4181,26 +4183,24 @@ function collection67_reconstruct (schemaVersion, keyBuf, valueBuf) {
4181
4183
  if (type !== 0) throw new Error('Unknown collection type: ' + type)
4182
4184
  collection67.decodedVersion = c.uint.decode(state)
4183
4185
  const record = collection67_enc.decode(state)
4184
- record.projectId = key[0]
4185
- record.memberId = key[1]
4186
+ record.memberId = key[0]
4186
4187
  return record
4187
4188
  }
4188
- // '@qvac/project-keys' key reconstruction function
4189
+ // '@qvac/member-keys' key reconstruction function
4189
4190
  function collection67_reconstruct_key (keyBuf) {
4190
4191
  const key = collection67_key.decode(keyBuf)
4191
4192
  return {
4192
- projectId: key[0],
4193
- memberId: key[1]
4193
+ memberId: key[0]
4194
4194
  }
4195
4195
  }
4196
4196
 
4197
- // '@qvac/project-keys'
4197
+ // '@qvac/member-keys'
4198
4198
  const collection67 = {
4199
- name: '@qvac/project-keys',
4199
+ name: '@qvac/member-keys',
4200
4200
  id: 67,
4201
- version: 11,
4201
+ version: 12,
4202
4202
  encodeKey (record) {
4203
- const key = [record.projectId, record.memberId]
4203
+ const key = [record.memberId]
4204
4204
  return collection67_key.encode(key)
4205
4205
  },
4206
4206
  encodeKeyRange ({ gt, lt, gte, lte } = {}) {
@@ -4228,7 +4228,7 @@ const collection67 = {
4228
4228
  decodedVersion: 0
4229
4229
  }
4230
4230
 
4231
- // '@qvac/project-host-keys' collection key
4231
+ // '@qvac/project-keys' collection key
4232
4232
  const collection68_key = new IndexEncoder([
4233
4233
  IndexEncoder.BUFFER,
4234
4234
  IndexEncoder.BUFFER
@@ -4241,17 +4241,17 @@ function collection68_indexify (record) {
4241
4241
  if (a0 === undefined) return arr
4242
4242
  arr.push(a0)
4243
4243
 
4244
- const a1 = record.deviceId
4244
+ const a1 = record.memberId
4245
4245
  if (a1 === undefined) return arr
4246
4246
  arr.push(a1)
4247
4247
 
4248
4248
  return arr
4249
4249
  }
4250
4250
 
4251
- // '@qvac/project-host-keys' value encoding
4252
- const collection68_enc = getEncoding('@qvac/project-host-key/hyperdb#68')
4251
+ // '@qvac/project-keys' value encoding
4252
+ const collection68_enc = getEncoding('@qvac/project-key/hyperdb#68')
4253
4253
 
4254
- // '@qvac/project-host-keys' reconstruction function
4254
+ // '@qvac/project-keys' reconstruction function
4255
4255
  function collection68_reconstruct (schemaVersion, keyBuf, valueBuf) {
4256
4256
  const key = collection68_key.decode(keyBuf)
4257
4257
  setVersion(schemaVersion)
@@ -4261,25 +4261,25 @@ function collection68_reconstruct (schemaVersion, keyBuf, valueBuf) {
4261
4261
  collection68.decodedVersion = c.uint.decode(state)
4262
4262
  const record = collection68_enc.decode(state)
4263
4263
  record.projectId = key[0]
4264
- record.deviceId = key[1]
4264
+ record.memberId = key[1]
4265
4265
  return record
4266
4266
  }
4267
- // '@qvac/project-host-keys' key reconstruction function
4267
+ // '@qvac/project-keys' key reconstruction function
4268
4268
  function collection68_reconstruct_key (keyBuf) {
4269
4269
  const key = collection68_key.decode(keyBuf)
4270
4270
  return {
4271
4271
  projectId: key[0],
4272
- deviceId: key[1]
4272
+ memberId: key[1]
4273
4273
  }
4274
4274
  }
4275
4275
 
4276
- // '@qvac/project-host-keys'
4276
+ // '@qvac/project-keys'
4277
4277
  const collection68 = {
4278
- name: '@qvac/project-host-keys',
4278
+ name: '@qvac/project-keys',
4279
4279
  id: 68,
4280
- version: 11,
4280
+ version: 12,
4281
4281
  encodeKey (record) {
4282
- const key = [record.projectId, record.deviceId]
4282
+ const key = [record.projectId, record.memberId]
4283
4283
  return collection68_key.encode(key)
4284
4284
  },
4285
4285
  encodeKeyRange ({ gt, lt, gte, lte } = {}) {
@@ -4307,7 +4307,7 @@ const collection68 = {
4307
4307
  decodedVersion: 0
4308
4308
  }
4309
4309
 
4310
- // '@qvac/project-device-keys' collection key
4310
+ // '@qvac/project-host-keys' collection key
4311
4311
  const collection69_key = new IndexEncoder([
4312
4312
  IndexEncoder.BUFFER,
4313
4313
  IndexEncoder.BUFFER
@@ -4327,10 +4327,10 @@ function collection69_indexify (record) {
4327
4327
  return arr
4328
4328
  }
4329
4329
 
4330
- // '@qvac/project-device-keys' value encoding
4331
- const collection69_enc = getEncoding('@qvac/project-device-key/hyperdb#69')
4330
+ // '@qvac/project-host-keys' value encoding
4331
+ const collection69_enc = getEncoding('@qvac/project-host-key/hyperdb#69')
4332
4332
 
4333
- // '@qvac/project-device-keys' reconstruction function
4333
+ // '@qvac/project-host-keys' reconstruction function
4334
4334
  function collection69_reconstruct (schemaVersion, keyBuf, valueBuf) {
4335
4335
  const key = collection69_key.decode(keyBuf)
4336
4336
  setVersion(schemaVersion)
@@ -4343,7 +4343,7 @@ function collection69_reconstruct (schemaVersion, keyBuf, valueBuf) {
4343
4343
  record.deviceId = key[1]
4344
4344
  return record
4345
4345
  }
4346
- // '@qvac/project-device-keys' key reconstruction function
4346
+ // '@qvac/project-host-keys' key reconstruction function
4347
4347
  function collection69_reconstruct_key (keyBuf) {
4348
4348
  const key = collection69_key.decode(keyBuf)
4349
4349
  return {
@@ -4352,11 +4352,11 @@ function collection69_reconstruct_key (keyBuf) {
4352
4352
  }
4353
4353
  }
4354
4354
 
4355
- // '@qvac/project-device-keys'
4355
+ // '@qvac/project-host-keys'
4356
4356
  const collection69 = {
4357
- name: '@qvac/project-device-keys',
4357
+ name: '@qvac/project-host-keys',
4358
4358
  id: 69,
4359
- version: 11,
4359
+ version: 12,
4360
4360
  encodeKey (record) {
4361
4361
  const key = [record.projectId, record.deviceId]
4362
4362
  return collection69_key.encode(key)
@@ -4386,20 +4386,30 @@ const collection69 = {
4386
4386
  decodedVersion: 0
4387
4387
  }
4388
4388
 
4389
- // '@qvac/skill-secrets' collection key
4389
+ // '@qvac/project-device-keys' collection key
4390
4390
  const collection70_key = new IndexEncoder([
4391
- IndexEncoder.STRING
4391
+ IndexEncoder.BUFFER,
4392
+ IndexEncoder.BUFFER
4392
4393
  ], { prefix: 70 })
4393
4394
 
4394
4395
  function collection70_indexify (record) {
4395
- const a = record.key
4396
- return a === undefined ? [] : [a]
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
4397
4407
  }
4398
4408
 
4399
- // '@qvac/skill-secrets' value encoding
4400
- const collection70_enc = getEncoding('@qvac/skill-secret/hyperdb#70')
4409
+ // '@qvac/project-device-keys' value encoding
4410
+ const collection70_enc = getEncoding('@qvac/project-device-key/hyperdb#70')
4401
4411
 
4402
- // '@qvac/skill-secrets' reconstruction function
4412
+ // '@qvac/project-device-keys' reconstruction function
4403
4413
  function collection70_reconstruct (schemaVersion, keyBuf, valueBuf) {
4404
4414
  const key = collection70_key.decode(keyBuf)
4405
4415
  setVersion(schemaVersion)
@@ -4408,24 +4418,26 @@ function collection70_reconstruct (schemaVersion, keyBuf, valueBuf) {
4408
4418
  if (type !== 0) throw new Error('Unknown collection type: ' + type)
4409
4419
  collection70.decodedVersion = c.uint.decode(state)
4410
4420
  const record = collection70_enc.decode(state)
4411
- record.key = key[0]
4421
+ record.projectId = key[0]
4422
+ record.deviceId = key[1]
4412
4423
  return record
4413
4424
  }
4414
- // '@qvac/skill-secrets' key reconstruction function
4425
+ // '@qvac/project-device-keys' key reconstruction function
4415
4426
  function collection70_reconstruct_key (keyBuf) {
4416
4427
  const key = collection70_key.decode(keyBuf)
4417
4428
  return {
4418
- key: key[0]
4429
+ projectId: key[0],
4430
+ deviceId: key[1]
4419
4431
  }
4420
4432
  }
4421
4433
 
4422
- // '@qvac/skill-secrets'
4434
+ // '@qvac/project-device-keys'
4423
4435
  const collection70 = {
4424
- name: '@qvac/skill-secrets',
4436
+ name: '@qvac/project-device-keys',
4425
4437
  id: 70,
4426
- version: 11,
4438
+ version: 12,
4427
4439
  encodeKey (record) {
4428
- const key = [record.key]
4440
+ const key = [record.projectId, record.deviceId]
4429
4441
  return collection70_key.encode(key)
4430
4442
  },
4431
4443
  encodeKeyRange ({ gt, lt, gte, lte } = {}) {
@@ -4453,6 +4465,629 @@ const collection70 = {
4453
4465
  decodedVersion: 0
4454
4466
  }
4455
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
+
4456
5091
  const collections = [
4457
5092
  collection0,
4458
5093
  collection1,
@@ -4489,16 +5124,17 @@ const collections = [
4489
5124
  collection55,
4490
5125
  collection56,
4491
5126
  collection57,
4492
- collection59,
4493
- collection61,
5127
+ collection58,
5128
+ collection60,
4494
5129
  collection62,
4495
- collection64,
5130
+ collection63,
4496
5131
  collection65,
4497
5132
  collection66,
4498
5133
  collection67,
4499
5134
  collection68,
4500
5135
  collection69,
4501
- collection70
5136
+ collection70,
5137
+ collection71
4502
5138
  ]
4503
5139
 
4504
5140
  const indexes = [
@@ -4525,9 +5161,20 @@ const indexes = [
4525
5161
  index38,
4526
5162
  index39,
4527
5163
  index43,
4528
- index58,
4529
- index60,
4530
- index63
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
4531
5178
  ]
4532
5179
 
4533
5180
  export default { versions, collections, indexes, resolveCollection, resolveIndex }
@@ -4562,23 +5209,24 @@ function resolveCollection (name) {
4562
5209
  case '@qvac/purged-chats': return collection48
4563
5210
  case '@qvac/mesh-names': return collection49
4564
5211
  case '@qvac/mesh-seeds': return collection50
4565
- case '@qvac/mesh-rules': return collection51
4566
- case '@qvac/public-meshes': return collection52
4567
- case '@qvac/workspace': return collection53
4568
- case '@qvac/member-roles': return collection54
4569
- case '@qvac/public-seeds': return collection55
4570
- case '@qvac/projects': return collection56
4571
- case '@qvac/project-members': return collection57
4572
- case '@qvac/project-order': return collection59
4573
- case '@qvac/chat-reads': return collection61
4574
- case '@qvac/knowledge-caps': return collection62
4575
- case '@qvac/agent-hosts': return collection64
4576
- case '@qvac/agent-users': return collection65
4577
- case '@qvac/member-keys': return collection66
4578
- case '@qvac/project-keys': return collection67
4579
- case '@qvac/project-host-keys': return collection68
4580
- case '@qvac/project-device-keys': return collection69
4581
- case '@qvac/skill-secrets': return collection70
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
4582
5230
  default: return null
4583
5231
  }
4584
5232
  }
@@ -4608,9 +5256,20 @@ function resolveIndex (name) {
4608
5256
  case '@qvac/agents-by-provider': return index38
4609
5257
  case '@qvac/default-agents': return index39
4610
5258
  case '@qvac/live-devices-by-writer-key': return index43
4611
- case '@qvac/active-knowledge-base': return index58
4612
- case '@qvac/run-request-by-run': return index60
4613
- case '@qvac/live-model-requests': return index63
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
4614
5273
  default: return null
4615
5274
  }
4616
5275
  }