@qvac/core 0.10.4 → 0.11.1

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 (104) hide show
  1. package/CHANGELOG.md +114 -1
  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 +6 -2
  5. package/dist-lib/lib/api/chunk-delta.js +69 -7
  6. package/dist-lib/lib/api/chunks.js +6 -2
  7. package/dist-lib/lib/api/config.d.ts +4 -1
  8. package/dist-lib/lib/api/config.js +23 -4
  9. package/dist-lib/lib/api/devices.js +3 -1
  10. package/dist-lib/lib/api/rag.js +4 -2
  11. package/dist-lib/lib/assistant/harness.d.ts +3 -1
  12. package/dist-lib/lib/assistant/harness.js +10 -0
  13. package/dist-lib/lib/assistant/history.d.ts +2 -1
  14. package/dist-lib/lib/assistant/history.js +39 -6
  15. package/dist-lib/lib/assistant/message.d.ts +3 -0
  16. package/dist-lib/lib/assistant/message.js +10 -2
  17. package/dist-lib/lib/assistant/pdf-budget.d.ts +3 -0
  18. package/dist-lib/lib/assistant/pdf-budget.js +13 -0
  19. package/dist-lib/lib/assistant-tree.d.ts +1 -0
  20. package/dist-lib/lib/assistant-tree.js +10 -3
  21. package/dist-lib/lib/assistant.d.ts +5 -1
  22. package/dist-lib/lib/assistant.js +112 -37
  23. package/dist-lib/lib/client.js +10 -1
  24. package/dist-lib/lib/core/archived-mesh.js +1 -0
  25. package/dist-lib/lib/core/chunk.d.ts +5 -2
  26. package/dist-lib/lib/core/chunk.js +74 -18
  27. package/dist-lib/lib/core/collections.d.ts +1 -0
  28. package/dist-lib/lib/core/collections.js +1 -0
  29. package/dist-lib/lib/core/config-value.d.ts +6 -0
  30. package/dist-lib/lib/core/config-value.js +14 -0
  31. package/dist-lib/lib/core/contract/chat.d.ts +1 -0
  32. package/dist-lib/lib/core/contract/chat.js +8 -1
  33. package/dist-lib/lib/core/contract/chunks.js +20 -6
  34. package/dist-lib/lib/core/contract/compute.d.ts +1 -1
  35. package/dist-lib/lib/core/contract/compute.js +2 -1
  36. package/dist-lib/lib/core/contract/devices.js +3 -2
  37. package/dist-lib/lib/core/departures.js +7 -0
  38. package/dist-lib/lib/core/devices.d.ts +2 -1
  39. package/dist-lib/lib/core/devices.js +4 -2
  40. package/dist-lib/lib/core/document-attachment.d.ts +7 -0
  41. package/dist-lib/lib/core/document-attachment.js +6 -0
  42. package/dist-lib/lib/core/files/index.d.ts +1 -1
  43. package/dist-lib/lib/core/files/index.js +1 -1
  44. package/dist-lib/lib/core/files/rag/index.d.ts +1 -1
  45. package/dist-lib/lib/core/files/rag/index.js +1 -1
  46. package/dist-lib/lib/core/files/rag/retrieval/full-text.d.ts +1 -0
  47. package/dist-lib/lib/core/files/rag/retrieval/full-text.js +4 -1
  48. package/dist-lib/lib/core/identity.d.ts +2 -0
  49. package/dist-lib/lib/core/identity.js +19 -0
  50. package/dist-lib/lib/core/inference-calls-receiver.js +2 -2
  51. package/dist-lib/lib/core/known-sender.d.ts +3 -0
  52. package/dist-lib/lib/core/known-sender.js +26 -0
  53. package/dist-lib/lib/core/local/index.d.ts +2 -0
  54. package/dist-lib/lib/core/local/index.js +17 -10
  55. package/dist-lib/lib/core/mesh.d.ts +5 -1
  56. package/dist-lib/lib/core/mesh.js +6 -6
  57. package/dist-lib/lib/core/migrations/chat-chunks.d.ts +4 -0
  58. package/dist-lib/lib/core/migrations/chat-chunks.js +43 -0
  59. package/dist-lib/lib/core/pdf/rasterize.d.ts +0 -1
  60. package/dist-lib/lib/core/pdf/rasterize.js +0 -1
  61. package/dist-lib/lib/core/skill-overlay-receiver.js +2 -2
  62. package/dist-lib/lib/core/skill-secrets.js +2 -2
  63. package/dist-lib/lib/core.d.ts +12 -1
  64. package/dist-lib/lib/core.js +75 -11
  65. package/dist-lib/lib/credential-pusher.d.ts +1 -0
  66. package/dist-lib/lib/credential-pusher.js +34 -48
  67. package/dist-lib/lib/device-tree.d.ts +18 -0
  68. package/dist-lib/lib/device-tree.js +32 -0
  69. package/dist-lib/lib/errors.d.ts +8 -0
  70. package/dist-lib/lib/errors.js +8 -0
  71. package/dist-lib/lib/oauth/flow-core.js +2 -0
  72. package/dist-lib/lib/oauth/loopback.d.ts +1 -0
  73. package/dist-lib/lib/oauth/loopback.js +31 -1
  74. package/dist-lib/lib/oauth/register.js +33 -18
  75. package/dist-lib/lib/oauth/request.d.ts +10 -0
  76. package/dist-lib/lib/oauth/request.js +22 -0
  77. package/dist-lib/lib/oauth/token-exchange-core.js +29 -32
  78. package/dist-lib/lib/oauth/types.d.ts +3 -0
  79. package/dist-lib/lib/oauth.d.ts +2 -1
  80. package/dist-lib/lib/oauth.js +1 -0
  81. package/dist-lib/lib/run-replay.d.ts +8 -2
  82. package/dist-lib/lib/run-replay.js +29 -11
  83. package/dist-lib/schema/engine.js +20 -3
  84. package/dist-lib/schema/field-order.js +8 -1
  85. package/dist-lib/schema/local.js +7 -3
  86. package/dist-lib/schema/qvac.js +19 -2
  87. package/dist-lib/spec/hrpc/messages.js +1236 -1184
  88. package/dist-lib/spec/hyperschema/index.js +1236 -1184
  89. package/dist-lib/spec/hyperschema/schema.json +47 -0
  90. package/dist-lib/spec/hyperschema/types.d.ts +11 -0
  91. package/dist-lib/spec/local/hyperdb/messages.js +70 -20
  92. package/dist-lib/spec/local/hyperschema/index.js +36 -11
  93. package/dist-lib/spec/local/hyperschema/schema.json +21 -1
  94. package/dist-lib/spec/local/hyperschema/types.d.ts +5 -1
  95. package/dist-lib/spec/mesh/hyperdb/db.json +17 -1
  96. package/dist-lib/spec/mesh/hyperdb/index.js +83 -2
  97. package/dist-lib/spec/mesh/hyperdb/messages.js +573 -255
  98. package/dist-lib/spec/mesh/hyperdispatch/dispatch.json +7 -1
  99. package/dist-lib/spec/mesh/hyperdispatch/index.js +18 -1
  100. package/dist-lib/spec/mesh/hyperdispatch/messages.js +121 -8
  101. package/dist-lib/spec/mesh/hyperschema/index.js +121 -8
  102. package/dist-lib/spec/mesh/hyperschema/schema.json +69 -1
  103. package/dist-lib/spec/mesh/hyperschema/types.d.ts +19 -1
  104. package/package.json +12 -10
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": 10,
2
+ "version": 11,
3
3
  "offset": 0,
4
4
  "schema": [
5
5
  {
@@ -253,6 +253,12 @@
253
253
  "name": "@qvac/put-mesh-seed",
254
254
  "requestType": "@qvac/mesh-seed",
255
255
  "version": 10
256
+ },
257
+ {
258
+ "id": 42,
259
+ "name": "@qvac/reindex-chat-chunks",
260
+ "requestType": "@qvac/reindex-chat-chunks-operation",
261
+ "version": 11
256
262
  }
257
263
  ]
258
264
  }
@@ -50,8 +50,9 @@ class Router {
50
50
  this._handler39 = null
51
51
  this._handler40 = null
52
52
  this._handler41 = null
53
+ this._handler42 = null
53
54
 
54
- this._missing = 42
55
+ this._missing = 43
55
56
  }
56
57
 
57
58
  add (name, handler) {
@@ -182,6 +183,9 @@ class Router {
182
183
  case '@qvac/put-mesh-seed':
183
184
  this._handler41 = handler
184
185
  break
186
+ case '@qvac/reindex-chat-chunks':
187
+ this._handler42 = handler
188
+ break
185
189
  default:
186
190
  throw DispatchError.NONEXISTENT_ROUTE(name)
187
191
  }
@@ -231,6 +235,7 @@ class Router {
231
235
  assert(this._handler39 !== null, 'Missing handler for "@qvac/name-mesh"')
232
236
  assert(this._handler40 !== null, 'Missing handler for "@qvac/open-join"')
233
237
  assert(this._handler41 !== null, 'Missing handler for "@qvac/put-mesh-seed"')
238
+ assert(this._handler42 !== null, 'Missing handler for "@qvac/reindex-chat-chunks"')
234
239
  }
235
240
 
236
241
  async dispatch (message, context) {
@@ -327,6 +332,8 @@ class Router {
327
332
  return this._handler40(op.value, context)
328
333
  case 41:
329
334
  return this._handler41(op.value, context)
335
+ case 42:
336
+ return this._handler42(op.value, context)
330
337
  default:
331
338
  throw DispatchError.HANDLER_NOT_FOUND_BY_ID(op.id)
332
339
  }
@@ -612,6 +619,12 @@ const route41 = {
612
619
  enc: getEncoding('@qvac/mesh-seed')
613
620
  }
614
621
 
622
+ const route42 = {
623
+ name: '@qvac/reindex-chat-chunks',
624
+ id: 42,
625
+ enc: getEncoding('@qvac/reindex-chat-chunks-operation')
626
+ }
627
+
615
628
  function getRouteByName (name) {
616
629
  switch (name) {
617
630
  case '@qvac/append-chunk':
@@ -698,6 +711,8 @@ function getRouteByName (name) {
698
711
  return route40
699
712
  case '@qvac/put-mesh-seed':
700
713
  return route41
714
+ case '@qvac/reindex-chat-chunks':
715
+ return route42
701
716
  default:
702
717
  throw DispatchError.ROUTE_NOT_FOUND_BY_NAME(name)
703
718
  }
@@ -789,6 +804,8 @@ function getRouteById (id) {
789
804
  return route40
790
805
  case 41:
791
806
  return route41
807
+ case 42:
808
+ return route42
792
809
  default:
793
810
  throw DispatchError.HANDLER_NOT_FOUND_BY_ID(id)
794
811
  }
@@ -1,12 +1,12 @@
1
1
  // This file is autogenerated by the hyperschema compiler
2
- // Schema Version: 16
2
+ // Schema Version: 17
3
3
  /* eslint-disable camelcase */
4
4
  /* eslint-disable quotes */
5
5
  /* eslint-disable space-before-function-paren */
6
6
 
7
7
  import { c } from 'hyperschema/runtime'
8
8
 
9
- const VERSION = 16
9
+ const VERSION = 17
10
10
 
11
11
  // eslint-disable-next-line no-unused-vars
12
12
  let version = VERSION
@@ -2256,7 +2256,8 @@ const encoding47 = {
2256
2256
  ((version >= 4 && m.attestedAt) ? 65536 : 0) |
2257
2257
  ((version >= 7 && m.claimedMemberId) ? 131072 : 0) |
2258
2258
  ((version >= 7 && m.inviteToken) ? 262144 : 0) |
2259
- ((version >= 7 && m.deviceSignature) ? 524288 : 0)
2259
+ ((version >= 7 && m.deviceSignature) ? 524288 : 0) |
2260
+ ((version >= 17 && m.customModels) ? 1048576 : 0)
2260
2261
 
2261
2262
  c.fixed32.preencode(state, m.id)
2262
2263
  c.string.preencode(state, m.name)
@@ -2284,6 +2285,7 @@ const encoding47 = {
2284
2285
  if (version >= 7 && m.claimedMemberId) c.fixed32.preencode(state, m.claimedMemberId)
2285
2286
  if (version >= 7 && m.inviteToken) c.fixed32.preencode(state, m.inviteToken)
2286
2287
  if (version >= 7 && m.deviceSignature) c.buffer.preencode(state, m.deviceSignature)
2288
+ if (version >= 17 && m.customModels) encoding47_25.preencode(state, m.customModels)
2287
2289
  },
2288
2290
  encode(state, m) {
2289
2291
  const flags =
@@ -2306,7 +2308,8 @@ const encoding47 = {
2306
2308
  ((version >= 4 && m.attestedAt) ? 65536 : 0) |
2307
2309
  ((version >= 7 && m.claimedMemberId) ? 131072 : 0) |
2308
2310
  ((version >= 7 && m.inviteToken) ? 262144 : 0) |
2309
- ((version >= 7 && m.deviceSignature) ? 524288 : 0)
2311
+ ((version >= 7 && m.deviceSignature) ? 524288 : 0) |
2312
+ ((version >= 17 && m.customModels) ? 1048576 : 0)
2310
2313
 
2311
2314
  c.fixed32.encode(state, m.id)
2312
2315
  c.string.encode(state, m.name)
@@ -2334,6 +2337,7 @@ const encoding47 = {
2334
2337
  if (version >= 7 && m.claimedMemberId) c.fixed32.encode(state, m.claimedMemberId)
2335
2338
  if (version >= 7 && m.inviteToken) c.fixed32.encode(state, m.inviteToken)
2336
2339
  if (version >= 7 && m.deviceSignature) c.buffer.encode(state, m.deviceSignature)
2340
+ if (version >= 17 && m.customModels) encoding47_25.encode(state, m.customModels)
2337
2341
  },
2338
2342
  decode(state) {
2339
2343
  const r0 = c.fixed32.decode(state)
@@ -2369,7 +2373,8 @@ const encoding47 = {
2369
2373
  attestedAt: (version >= 4 && (flags & 65536) !== 0) ? c.uint.decode(state) : 0,
2370
2374
  claimedMemberId: (version >= 7 && (flags & 131072) !== 0) ? c.fixed32.decode(state) : null,
2371
2375
  inviteToken: (version >= 7 && (flags & 262144) !== 0) ? c.fixed32.decode(state) : null,
2372
- deviceSignature: (version >= 7 && (flags & 524288) !== 0) ? c.buffer.decode(state) : null
2376
+ deviceSignature: (version >= 7 && (flags & 524288) !== 0) ? c.buffer.decode(state) : null,
2377
+ customModels: (version >= 17 && (flags & 1048576) !== 0) ? encoding47_25.decode(state) : null
2373
2378
  }
2374
2379
  }
2375
2380
  }
@@ -2763,7 +2768,7 @@ const encoding59_5 = encoding43_6
2763
2768
  const encoding59 = {
2764
2769
  preencode(state, m) {
2765
2770
  c.fixed32.preencode(state, m.deviceId)
2766
- state.end++ // max flag is 32 so always one byte
2771
+ state.end++ // max flag is 64 so always one byte
2767
2772
 
2768
2773
  if (m.installedToolNames) encoding59_1.preencode(state, m.installedToolNames)
2769
2774
  if (m.installedSkillNames) encoding59_2.preencode(state, m.installedSkillNames)
@@ -2771,6 +2776,7 @@ const encoding59 = {
2771
2776
  if (m.cachedModelNames) encoding59_4.preencode(state, m.cachedModelNames)
2772
2777
  if (version >= 3 && m.readySkillNames) encoding59_5.preencode(state, m.readySkillNames)
2773
2778
  if (version >= 4 && m.toolCatalog) encoding59_6.preencode(state, m.toolCatalog)
2779
+ if (version >= 17 && m.customModels) encoding59_7.preencode(state, m.customModels)
2774
2780
  },
2775
2781
  encode(state, m) {
2776
2782
  const flags =
@@ -2779,7 +2785,8 @@ const encoding59 = {
2779
2785
  (m.installedModelNames ? 4 : 0) |
2780
2786
  (m.cachedModelNames ? 8 : 0) |
2781
2787
  ((version >= 3 && m.readySkillNames) ? 16 : 0) |
2782
- ((version >= 4 && m.toolCatalog) ? 32 : 0)
2788
+ ((version >= 4 && m.toolCatalog) ? 32 : 0) |
2789
+ ((version >= 17 && m.customModels) ? 64 : 0)
2783
2790
 
2784
2791
  c.fixed32.encode(state, m.deviceId)
2785
2792
  c.uint.encode(state, flags)
@@ -2790,6 +2797,7 @@ const encoding59 = {
2790
2797
  if (m.cachedModelNames) encoding59_4.encode(state, m.cachedModelNames)
2791
2798
  if (version >= 3 && m.readySkillNames) encoding59_5.encode(state, m.readySkillNames)
2792
2799
  if (version >= 4 && m.toolCatalog) encoding59_6.encode(state, m.toolCatalog)
2800
+ if (version >= 17 && m.customModels) encoding59_7.encode(state, m.customModels)
2793
2801
  },
2794
2802
  decode(state) {
2795
2803
  const r0 = c.fixed32.decode(state)
@@ -2803,7 +2811,8 @@ const encoding59 = {
2803
2811
  installedModelNames: (flags & 4) !== 0 ? encoding59_3.decode(state) : null,
2804
2812
  cachedModelNames: (flags & 8) !== 0 ? encoding59_4.decode(state) : null,
2805
2813
  readySkillNames: (version >= 3 && (flags & 16) !== 0) ? encoding59_5.decode(state) : null,
2806
- toolCatalog: (version >= 4 && (flags & 32) !== 0) ? encoding59_6.decode(state) : null
2814
+ toolCatalog: (version >= 4 && (flags & 32) !== 0) ? encoding59_6.decode(state) : null,
2815
+ customModels: (version >= 17 && (flags & 64) !== 0) ? encoding59_7.decode(state) : null
2807
2816
  }
2808
2817
  }
2809
2818
  }
@@ -7109,12 +7118,110 @@ const encoding178 = {
7109
7118
  }
7110
7119
  }
7111
7120
 
7121
+ // @qvac/custom-model-report-entry
7122
+ const encoding179 = {
7123
+ preencode(state, m) {
7124
+ c.string.preencode(state, m.name)
7125
+ c.string.preencode(state, m.label)
7126
+ state.end++ // max flag is 2 so always one byte
7127
+
7128
+ if (version >= 17 && m.taskType) c.string.preencode(state, m.taskType)
7129
+ if (version >= 17 && m.expectedSize) c.uint.preencode(state, m.expectedSize)
7130
+ },
7131
+ encode(state, m) {
7132
+ const flags =
7133
+ ((version >= 17 && m.taskType) ? 1 : 0) | ((version >= 17 && m.expectedSize) ? 2 : 0)
7134
+
7135
+ c.string.encode(state, m.name)
7136
+ c.string.encode(state, m.label)
7137
+ c.uint.encode(state, flags)
7138
+
7139
+ if (version >= 17 && m.taskType) c.string.encode(state, m.taskType)
7140
+ if (version >= 17 && m.expectedSize) c.uint.encode(state, m.expectedSize)
7141
+ },
7142
+ decode(state) {
7143
+ const r0 = c.string.decode(state)
7144
+ const r1 = c.string.decode(state)
7145
+ const flags = c.uint.decode(state)
7146
+
7147
+ return {
7148
+ name: r0,
7149
+ label: r1,
7150
+ taskType: (version >= 17 && (flags & 1) !== 0) ? c.string.decode(state) : null,
7151
+ expectedSize: (version >= 17 && (flags & 2) !== 0) ? c.uint.decode(state) : 0
7152
+ }
7153
+ }
7154
+ }
7155
+
7156
+ // @qvac/reindex-chat-chunks-operation-v1
7157
+ const encoding180 = {
7158
+ preencode(state, m) {
7159
+ c.string.preencode(state, m.chatId)
7160
+ },
7161
+ encode(state, m) {
7162
+ c.string.encode(state, m.chatId)
7163
+ },
7164
+ decode(state) {
7165
+ const r0 = c.string.decode(state)
7166
+
7167
+ return {
7168
+ version: 0,
7169
+ chatId: r0
7170
+ }
7171
+ }
7172
+ }
7173
+
7174
+ // @qvac/reindex-chat-chunks-operation
7175
+ const encoding181 = {
7176
+ preencode(state, m) {
7177
+ const v = m.version ?? 1
7178
+ c.uint.preencode(state, v)
7179
+ switch (v) {
7180
+ case 0:
7181
+ case 1:
7182
+ encoding180.preencode(state, m)
7183
+ break
7184
+ default:
7185
+ throw new Error('Unsupported version')
7186
+ }
7187
+ },
7188
+ encode(state, m) {
7189
+ const v = m.version ?? 1
7190
+ c.uint.encode(state, v)
7191
+ switch (v) {
7192
+ case 0:
7193
+ case 1:
7194
+ encoding180.encode(state, m)
7195
+ break
7196
+ default:
7197
+ throw new Error('Unsupported version')
7198
+ }
7199
+ },
7200
+ decode(state) {
7201
+ const v = c.uint.decode(state)
7202
+ switch (v) {
7203
+ case 0:
7204
+ case 1: {
7205
+ const decoded = encoding180.decode(state)
7206
+ decoded.version = v
7207
+ return decoded
7208
+ }
7209
+ default:
7210
+ throw new Error('Unsupported version')
7211
+ }
7212
+ }
7213
+ }
7214
+
7112
7215
  // @qvac/chat-v1.forkedFrom, deferred due to recusive use
7113
7216
  const encoding45_12 = c.frame(encoding178)
7114
7217
  // @qvac/device-v1.toolCatalog, deferred due to recusive use
7115
7218
  const encoding47_18 = c.array(c.frame(encoding112))
7219
+ // @qvac/device-v1.customModels, deferred due to recusive use
7220
+ const encoding47_25 = c.array(c.frame(encoding179))
7116
7221
  // @qvac/report-device-capabilities-operation-v1.toolCatalog, deferred due to recusive use
7117
7222
  const encoding59_6 = encoding47_18
7223
+ // @qvac/report-device-capabilities-operation-v1.customModels, deferred due to recusive use
7224
+ const encoding59_7 = encoding47_25
7118
7225
 
7119
7226
  function setVersion(v) {
7120
7227
  version = v
@@ -7531,6 +7638,12 @@ function getEncoding(name) {
7531
7638
  return encoding177
7532
7639
  case '@qvac/chat-fork-source':
7533
7640
  return encoding178
7641
+ case '@qvac/custom-model-report-entry':
7642
+ return encoding179
7643
+ case '@qvac/reindex-chat-chunks-operation-v1':
7644
+ return encoding180
7645
+ case '@qvac/reindex-chat-chunks-operation':
7646
+ return encoding181
7534
7647
  default:
7535
7648
  throw new Error('Encoder not found ' + name)
7536
7649
  }
@@ -1,12 +1,12 @@
1
1
  // This file is autogenerated by the hyperschema compiler
2
- // Schema Version: 16
2
+ // Schema Version: 17
3
3
  /* eslint-disable camelcase */
4
4
  /* eslint-disable quotes */
5
5
  /* eslint-disable space-before-function-paren */
6
6
 
7
7
  import { c } from 'hyperschema/runtime'
8
8
 
9
- const VERSION = 16
9
+ const VERSION = 17
10
10
 
11
11
  // eslint-disable-next-line no-unused-vars
12
12
  let version = VERSION
@@ -2256,7 +2256,8 @@ const encoding47 = {
2256
2256
  ((version >= 4 && m.attestedAt) ? 65536 : 0) |
2257
2257
  ((version >= 7 && m.claimedMemberId) ? 131072 : 0) |
2258
2258
  ((version >= 7 && m.inviteToken) ? 262144 : 0) |
2259
- ((version >= 7 && m.deviceSignature) ? 524288 : 0)
2259
+ ((version >= 7 && m.deviceSignature) ? 524288 : 0) |
2260
+ ((version >= 17 && m.customModels) ? 1048576 : 0)
2260
2261
 
2261
2262
  c.fixed32.preencode(state, m.id)
2262
2263
  c.string.preencode(state, m.name)
@@ -2284,6 +2285,7 @@ const encoding47 = {
2284
2285
  if (version >= 7 && m.claimedMemberId) c.fixed32.preencode(state, m.claimedMemberId)
2285
2286
  if (version >= 7 && m.inviteToken) c.fixed32.preencode(state, m.inviteToken)
2286
2287
  if (version >= 7 && m.deviceSignature) c.buffer.preencode(state, m.deviceSignature)
2288
+ if (version >= 17 && m.customModels) encoding47_25.preencode(state, m.customModels)
2287
2289
  },
2288
2290
  encode(state, m) {
2289
2291
  const flags =
@@ -2306,7 +2308,8 @@ const encoding47 = {
2306
2308
  ((version >= 4 && m.attestedAt) ? 65536 : 0) |
2307
2309
  ((version >= 7 && m.claimedMemberId) ? 131072 : 0) |
2308
2310
  ((version >= 7 && m.inviteToken) ? 262144 : 0) |
2309
- ((version >= 7 && m.deviceSignature) ? 524288 : 0)
2311
+ ((version >= 7 && m.deviceSignature) ? 524288 : 0) |
2312
+ ((version >= 17 && m.customModels) ? 1048576 : 0)
2310
2313
 
2311
2314
  c.fixed32.encode(state, m.id)
2312
2315
  c.string.encode(state, m.name)
@@ -2334,6 +2337,7 @@ const encoding47 = {
2334
2337
  if (version >= 7 && m.claimedMemberId) c.fixed32.encode(state, m.claimedMemberId)
2335
2338
  if (version >= 7 && m.inviteToken) c.fixed32.encode(state, m.inviteToken)
2336
2339
  if (version >= 7 && m.deviceSignature) c.buffer.encode(state, m.deviceSignature)
2340
+ if (version >= 17 && m.customModels) encoding47_25.encode(state, m.customModels)
2337
2341
  },
2338
2342
  decode(state) {
2339
2343
  const r0 = c.fixed32.decode(state)
@@ -2369,7 +2373,8 @@ const encoding47 = {
2369
2373
  attestedAt: (version >= 4 && (flags & 65536) !== 0) ? c.uint.decode(state) : 0,
2370
2374
  claimedMemberId: (version >= 7 && (flags & 131072) !== 0) ? c.fixed32.decode(state) : null,
2371
2375
  inviteToken: (version >= 7 && (flags & 262144) !== 0) ? c.fixed32.decode(state) : null,
2372
- deviceSignature: (version >= 7 && (flags & 524288) !== 0) ? c.buffer.decode(state) : null
2376
+ deviceSignature: (version >= 7 && (flags & 524288) !== 0) ? c.buffer.decode(state) : null,
2377
+ customModels: (version >= 17 && (flags & 1048576) !== 0) ? encoding47_25.decode(state) : null
2373
2378
  }
2374
2379
  }
2375
2380
  }
@@ -2763,7 +2768,7 @@ const encoding59_5 = encoding43_6
2763
2768
  const encoding59 = {
2764
2769
  preencode(state, m) {
2765
2770
  c.fixed32.preencode(state, m.deviceId)
2766
- state.end++ // max flag is 32 so always one byte
2771
+ state.end++ // max flag is 64 so always one byte
2767
2772
 
2768
2773
  if (m.installedToolNames) encoding59_1.preencode(state, m.installedToolNames)
2769
2774
  if (m.installedSkillNames) encoding59_2.preencode(state, m.installedSkillNames)
@@ -2771,6 +2776,7 @@ const encoding59 = {
2771
2776
  if (m.cachedModelNames) encoding59_4.preencode(state, m.cachedModelNames)
2772
2777
  if (version >= 3 && m.readySkillNames) encoding59_5.preencode(state, m.readySkillNames)
2773
2778
  if (version >= 4 && m.toolCatalog) encoding59_6.preencode(state, m.toolCatalog)
2779
+ if (version >= 17 && m.customModels) encoding59_7.preencode(state, m.customModels)
2774
2780
  },
2775
2781
  encode(state, m) {
2776
2782
  const flags =
@@ -2779,7 +2785,8 @@ const encoding59 = {
2779
2785
  (m.installedModelNames ? 4 : 0) |
2780
2786
  (m.cachedModelNames ? 8 : 0) |
2781
2787
  ((version >= 3 && m.readySkillNames) ? 16 : 0) |
2782
- ((version >= 4 && m.toolCatalog) ? 32 : 0)
2788
+ ((version >= 4 && m.toolCatalog) ? 32 : 0) |
2789
+ ((version >= 17 && m.customModels) ? 64 : 0)
2783
2790
 
2784
2791
  c.fixed32.encode(state, m.deviceId)
2785
2792
  c.uint.encode(state, flags)
@@ -2790,6 +2797,7 @@ const encoding59 = {
2790
2797
  if (m.cachedModelNames) encoding59_4.encode(state, m.cachedModelNames)
2791
2798
  if (version >= 3 && m.readySkillNames) encoding59_5.encode(state, m.readySkillNames)
2792
2799
  if (version >= 4 && m.toolCatalog) encoding59_6.encode(state, m.toolCatalog)
2800
+ if (version >= 17 && m.customModels) encoding59_7.encode(state, m.customModels)
2793
2801
  },
2794
2802
  decode(state) {
2795
2803
  const r0 = c.fixed32.decode(state)
@@ -2803,7 +2811,8 @@ const encoding59 = {
2803
2811
  installedModelNames: (flags & 4) !== 0 ? encoding59_3.decode(state) : null,
2804
2812
  cachedModelNames: (flags & 8) !== 0 ? encoding59_4.decode(state) : null,
2805
2813
  readySkillNames: (version >= 3 && (flags & 16) !== 0) ? encoding59_5.decode(state) : null,
2806
- toolCatalog: (version >= 4 && (flags & 32) !== 0) ? encoding59_6.decode(state) : null
2814
+ toolCatalog: (version >= 4 && (flags & 32) !== 0) ? encoding59_6.decode(state) : null,
2815
+ customModels: (version >= 17 && (flags & 64) !== 0) ? encoding59_7.decode(state) : null
2807
2816
  }
2808
2817
  }
2809
2818
  }
@@ -7109,12 +7118,110 @@ const encoding178 = {
7109
7118
  }
7110
7119
  }
7111
7120
 
7121
+ // @qvac/custom-model-report-entry
7122
+ const encoding179 = {
7123
+ preencode(state, m) {
7124
+ c.string.preencode(state, m.name)
7125
+ c.string.preencode(state, m.label)
7126
+ state.end++ // max flag is 2 so always one byte
7127
+
7128
+ if (version >= 17 && m.taskType) c.string.preencode(state, m.taskType)
7129
+ if (version >= 17 && m.expectedSize) c.uint.preencode(state, m.expectedSize)
7130
+ },
7131
+ encode(state, m) {
7132
+ const flags =
7133
+ ((version >= 17 && m.taskType) ? 1 : 0) | ((version >= 17 && m.expectedSize) ? 2 : 0)
7134
+
7135
+ c.string.encode(state, m.name)
7136
+ c.string.encode(state, m.label)
7137
+ c.uint.encode(state, flags)
7138
+
7139
+ if (version >= 17 && m.taskType) c.string.encode(state, m.taskType)
7140
+ if (version >= 17 && m.expectedSize) c.uint.encode(state, m.expectedSize)
7141
+ },
7142
+ decode(state) {
7143
+ const r0 = c.string.decode(state)
7144
+ const r1 = c.string.decode(state)
7145
+ const flags = c.uint.decode(state)
7146
+
7147
+ return {
7148
+ name: r0,
7149
+ label: r1,
7150
+ taskType: (version >= 17 && (flags & 1) !== 0) ? c.string.decode(state) : null,
7151
+ expectedSize: (version >= 17 && (flags & 2) !== 0) ? c.uint.decode(state) : 0
7152
+ }
7153
+ }
7154
+ }
7155
+
7156
+ // @qvac/reindex-chat-chunks-operation-v1
7157
+ const encoding180 = {
7158
+ preencode(state, m) {
7159
+ c.string.preencode(state, m.chatId)
7160
+ },
7161
+ encode(state, m) {
7162
+ c.string.encode(state, m.chatId)
7163
+ },
7164
+ decode(state) {
7165
+ const r0 = c.string.decode(state)
7166
+
7167
+ return {
7168
+ version: 0,
7169
+ chatId: r0
7170
+ }
7171
+ }
7172
+ }
7173
+
7174
+ // @qvac/reindex-chat-chunks-operation
7175
+ const encoding181 = {
7176
+ preencode(state, m) {
7177
+ const v = m.version ?? 1
7178
+ c.uint.preencode(state, v)
7179
+ switch (v) {
7180
+ case 0:
7181
+ case 1:
7182
+ encoding180.preencode(state, m)
7183
+ break
7184
+ default:
7185
+ throw new Error('Unsupported version')
7186
+ }
7187
+ },
7188
+ encode(state, m) {
7189
+ const v = m.version ?? 1
7190
+ c.uint.encode(state, v)
7191
+ switch (v) {
7192
+ case 0:
7193
+ case 1:
7194
+ encoding180.encode(state, m)
7195
+ break
7196
+ default:
7197
+ throw new Error('Unsupported version')
7198
+ }
7199
+ },
7200
+ decode(state) {
7201
+ const v = c.uint.decode(state)
7202
+ switch (v) {
7203
+ case 0:
7204
+ case 1: {
7205
+ const decoded = encoding180.decode(state)
7206
+ decoded.version = v
7207
+ return decoded
7208
+ }
7209
+ default:
7210
+ throw new Error('Unsupported version')
7211
+ }
7212
+ }
7213
+ }
7214
+
7112
7215
  // @qvac/chat-v1.forkedFrom, deferred due to recusive use
7113
7216
  const encoding45_12 = c.frame(encoding178)
7114
7217
  // @qvac/device-v1.toolCatalog, deferred due to recusive use
7115
7218
  const encoding47_18 = c.array(c.frame(encoding112))
7219
+ // @qvac/device-v1.customModels, deferred due to recusive use
7220
+ const encoding47_25 = c.array(c.frame(encoding179))
7116
7221
  // @qvac/report-device-capabilities-operation-v1.toolCatalog, deferred due to recusive use
7117
7222
  const encoding59_6 = encoding47_18
7223
+ // @qvac/report-device-capabilities-operation-v1.customModels, deferred due to recusive use
7224
+ const encoding59_7 = encoding47_25
7118
7225
 
7119
7226
  function setVersion(v) {
7120
7227
  version = v
@@ -7531,6 +7638,12 @@ function getEncoding(name) {
7531
7638
  return encoding177
7532
7639
  case '@qvac/chat-fork-source':
7533
7640
  return encoding178
7641
+ case '@qvac/custom-model-report-entry':
7642
+ return encoding179
7643
+ case '@qvac/reindex-chat-chunks-operation-v1':
7644
+ return encoding180
7645
+ case '@qvac/reindex-chat-chunks-operation':
7646
+ return encoding181
7534
7647
  default:
7535
7648
  throw new Error('Encoder not found ' + name)
7536
7649
  }
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": 16,
2
+ "version": 17,
3
3
  "schema": [
4
4
  {
5
5
  "name": "chunk-type",
@@ -1584,6 +1584,12 @@
1584
1584
  "name": "deviceSignature",
1585
1585
  "type": "buffer",
1586
1586
  "version": 7
1587
+ },
1588
+ {
1589
+ "name": "customModels",
1590
+ "array": true,
1591
+ "type": "@qvac/custom-model-report-entry",
1592
+ "version": 17
1587
1593
  }
1588
1594
  ]
1589
1595
  },
@@ -1821,6 +1827,12 @@
1821
1827
  "array": true,
1822
1828
  "type": "@qvac/tool-report-entry",
1823
1829
  "version": 4
1830
+ },
1831
+ {
1832
+ "name": "customModels",
1833
+ "array": true,
1834
+ "type": "@qvac/custom-model-report-entry",
1835
+ "version": 17
1824
1836
  }
1825
1837
  ]
1826
1838
  },
@@ -4293,6 +4305,62 @@
4293
4305
  "version": 15
4294
4306
  }
4295
4307
  ]
4308
+ },
4309
+ {
4310
+ "name": "custom-model-report-entry",
4311
+ "namespace": "qvac",
4312
+ "compact": false,
4313
+ "flagsPosition": 2,
4314
+ "fields": [
4315
+ {
4316
+ "name": "name",
4317
+ "required": true,
4318
+ "type": "string",
4319
+ "version": 17
4320
+ },
4321
+ {
4322
+ "name": "label",
4323
+ "required": true,
4324
+ "type": "string",
4325
+ "version": 17
4326
+ },
4327
+ {
4328
+ "name": "taskType",
4329
+ "type": "string",
4330
+ "version": 17
4331
+ },
4332
+ {
4333
+ "name": "expectedSize",
4334
+ "type": "uint",
4335
+ "version": 17
4336
+ }
4337
+ ]
4338
+ },
4339
+ {
4340
+ "name": "reindex-chat-chunks-operation-v1",
4341
+ "namespace": "qvac",
4342
+ "compact": false,
4343
+ "flagsPosition": -1,
4344
+ "fields": [
4345
+ {
4346
+ "name": "chatId",
4347
+ "required": true,
4348
+ "type": "string",
4349
+ "version": 17
4350
+ }
4351
+ ]
4352
+ },
4353
+ {
4354
+ "name": "reindex-chat-chunks-operation",
4355
+ "namespace": "qvac",
4356
+ "framed": false,
4357
+ "versions": [
4358
+ {
4359
+ "type": "@qvac/reindex-chat-chunks-operation-v1",
4360
+ "map": null,
4361
+ "version": 1
4362
+ }
4363
+ ]
4296
4364
  }
4297
4365
  ]
4298
4366
  }
@@ -1,5 +1,5 @@
1
1
  // This file is autogenerated by hyperschema-ts
2
- // Schema version: 16
2
+ // Schema version: 17
3
3
  // Do not edit manually.
4
4
 
5
5
  export type QvacChunkType = "user-message" | "content" | "thinking" | "tool-call" | "tool-result" | "attachment" | "approval-request" | "run-status" | "run-request" | "sources" | "compaction"
@@ -289,6 +289,7 @@ export interface QvacDeviceV1 {
289
289
  claimedMemberId?: Buffer | null
290
290
  inviteToken?: Buffer | null
291
291
  deviceSignature?: Buffer | null
292
+ customModels?: QvacCustomModelReportEntry[] | null
292
293
  }
293
294
 
294
295
  export type QvacDevice = (QvacDeviceV1 & { version?: number })
@@ -340,6 +341,7 @@ export interface QvacReportDeviceCapabilitiesOperationV1 {
340
341
  cachedModelNames?: string[] | null
341
342
  readySkillNames?: string[] | null
342
343
  toolCatalog?: QvacToolReportEntry[] | null
344
+ customModels?: QvacCustomModelReportEntry[] | null
343
345
  }
344
346
 
345
347
  export type QvacReportDeviceCapabilitiesOperation = (QvacReportDeviceCapabilitiesOperationV1 & { version?: number })
@@ -853,6 +855,19 @@ export interface QvacChatForkSource {
853
855
  runId?: string | null
854
856
  }
855
857
 
858
+ export interface QvacCustomModelReportEntry {
859
+ name: string
860
+ label: string
861
+ taskType?: string | null
862
+ expectedSize?: number
863
+ }
864
+
865
+ export interface QvacReindexChatChunksOperationV1 {
866
+ chatId: string
867
+ }
868
+
869
+ export type QvacReindexChatChunksOperation = (QvacReindexChatChunksOperationV1 & { version?: number })
870
+
856
871
  export interface SchemaTypes {
857
872
  "@qvac/chunk-type": QvacChunkType
858
873
  "@qvac/run-state": QvacRunState
@@ -1033,4 +1048,7 @@ export interface SchemaTypes {
1033
1048
  "@qvac/mesh-seed-v1": QvacMeshSeedV1
1034
1049
  "@qvac/mesh-seed": QvacMeshSeed
1035
1050
  "@qvac/chat-fork-source": QvacChatForkSource
1051
+ "@qvac/custom-model-report-entry": QvacCustomModelReportEntry
1052
+ "@qvac/reindex-chat-chunks-operation-v1": QvacReindexChatChunksOperationV1
1053
+ "@qvac/reindex-chat-chunks-operation": QvacReindexChatChunksOperation
1036
1054
  }